Show visually in webui + cli when using deprecated templates or transports (#9413)

* Show visually in webui + cli when using deprecated templates or transports

* Fixed query
This commit is contained in:
Neil Lathwood
2018-11-10 21:06:51 +00:00
committed by GitHub
parent a10503b927
commit b93e66efbe
7 changed files with 41 additions and 18 deletions

View File

@@ -1 +1 @@
INSERT INTO `alert_templates` (name, template) values('Default Alert Template', '%title\r\nSeverity: %severity\r\n{if %state == 0}Time elapsed: %elapsed\r\n{/if}Timestamp: %timestamp\r\nUnique-ID: %uid\r\nRule: {if %name}%name{else}%rule{/if}\r\n{if %faults}Faults:\r\n{foreach %faults} #%key: %value.string\r\n{/foreach}{/if}Alert sent to: {foreach %contacts}%value <%key> {/foreach}');
INSERT INTO `alert_templates` (name, template) values('Default Alert Template', '{{ $alert->title }}\\r\\n\nSeverity: {{ $alert->severity }}\\r\\n\n @if ($alert->state == 0) Time elapsed: {{ $alert->elapsed }}\\r\\n\n @endif Timestamp: {{ $alert->timestamp }}\\r\\n\nUnique-ID: {{ $alert->uid }}\\r\\n\nRule: @if ($alert->name) {{ $alert->name }} @else {{ $alert->rule }} @endif\\r\\n\n @if ($alert->faults) Faults:\\r\\n\n @foreach ($alert->faults as $key => $value) #{{ $key }}: {{ $value[\'string\'] }}\\r\\n\n @endforeach @endif Alert sent to: @foreach ($alert->contacts as $key => $value){{ $value }} <{{ $key }}> @endforeach');