mirror of
https://github.com/alerta/alerta.git
synced 2024-12-11 23:57:42 +00:00
cc8f93000c
* Fix oembed. Use usual json (not jsonp request) with Access-Control-Allow-Origin header. Correct path to oembed location. * Move styling to embedding page from embedded to simplify configure. Removed width/height from parameters. Allow to hide title. * More powerfull oembed. Auto-renew. Ability to open page locally (we heed to set http/https prefixes). Fix loading: we need to set alerta defaults only after script loading. * oembed example for grafana. * Remove unused width/height from js. * Ability to set empty background in case of no alerts. * Oembed work fix. qb.from_params forms incorrect arguments for query. * Grafana load fix. Grafana won't load script on "load". So it's better to embed js. * Revert api path to usual environment prefix. But leave a comment, how to use it with alerta, running in docker.
25 lines
1.2 KiB
HTML
25 lines
1.2 KiB
HTML
<div class="alerta-severity-{{ max }} alerta-div">
|
|
<table class="alerta-table">
|
|
<tbody>
|
|
{% if title %}
|
|
<tr><th class="" colspan="5">{{ title }}</th></tr>
|
|
{% endif %}
|
|
<tr>
|
|
<td class="{{ 'alerta-severity-critical' if counts['critical'] }}"><b>{{ counts['critical'] }}</b></td>
|
|
<td class="{{ 'alerta-severity-major' if counts['major'] }}"><b>{{ counts['major'] }}</b></td>
|
|
<td class="{{ 'alerta-severity-minor' if counts['minor'] }}"><b>{{ counts['minor'] }}</b></td>
|
|
<td class="{{ 'alerta-severity-warning' if counts['warning'] }}"><b>{{ counts['warning'] }}</b></td>
|
|
<td class="{{ 'alerta-severity-informational' if counts['informational'] }}"><b>{{ counts['informational'] }}</b></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<style>
|
|
.alerta-severity-critical{background-color: red;}
|
|
.alerta-severity-major{background-color: orange;}
|
|
.alerta-severity-minor {background-color: yellow;}
|
|
.alerta-severity-warning {background-color: #1E90FF;}
|
|
.alerta-severity-informational, .severity-cleared, .severity-ok, .severity-informational {background-color: #00CC00;}
|
|
.alerta-severity-debug {background-color: #7554BF;}
|
|
</style>
|
|
</div>
|