Implement getting alerts in overview
parent
f52d01d6f7
commit
04d4cee222
@ -0,0 +1,92 @@
|
|||||||
|
<div id="alerts">
|
||||||
|
{% include 'manage/threshold/partials/notify.html' %}
|
||||||
|
{% if alerts is not None %}
|
||||||
|
<div class="icons">
|
||||||
|
<button
|
||||||
|
class="button is-small">
|
||||||
|
<span class="icon" data-tooltip="Conn">
|
||||||
|
<i class="fa-solid fa-cloud-exclamation"></i>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="button is-small">
|
||||||
|
<span class="icon" data-tooltip="Highlight">
|
||||||
|
<i class="fa-solid fa-square-quote"></i>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
class="button is-small">
|
||||||
|
<span class="icon" data-tooltip="ZNC">
|
||||||
|
<i class="fa-brands fa-unity"></i>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
class="button is-small">
|
||||||
|
<span class="icon" data-tooltip="Query">
|
||||||
|
<i class="fa-solid fa-inbox"></i>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
class="button is-small">
|
||||||
|
<span class="icon" data-tooltip="Self">
|
||||||
|
<i class="fa-solid fa-message-bot"></i>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="content" style="max-height: 30em; overflow: auto;">
|
||||||
|
|
||||||
|
<div class="table-container">
|
||||||
|
<table class="table is-fullwidth is-hoverable">
|
||||||
|
<thead>
|
||||||
|
<th>ts</th>
|
||||||
|
<th>name</th>
|
||||||
|
<th>type</th>
|
||||||
|
<th>msg</th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for alert in alerts %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p>{{ alert.date }}</p>
|
||||||
|
<p>{{ alert.time }}</p>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ alert.net }}/{{ alert.num }}
|
||||||
|
<td>
|
||||||
|
{% if alert.type == 'conn' %}
|
||||||
|
<span class="icon" data-tooltip="Conn">
|
||||||
|
<i class="fa-solid fa-cloud-exclamation"></i>
|
||||||
|
</span>
|
||||||
|
{% elif alert.type == 'highlight' %}
|
||||||
|
<span class="icon" data-tooltip="Highlight">
|
||||||
|
<i class="fa-solid fa-square-quote"></i>
|
||||||
|
</span>
|
||||||
|
{% elif alert.type == 'znc' %}
|
||||||
|
<span class="icon" data-tooltip="ZNC">
|
||||||
|
<i class="fa-brands fa-unity"></i>
|
||||||
|
</span>
|
||||||
|
{% elif alert.type == 'query' %}
|
||||||
|
<span class="icon" data-tooltip="Query">
|
||||||
|
<i class="fa-solid fa-inbox"></i>
|
||||||
|
</span>
|
||||||
|
{% elif alert.type == 'self' %}
|
||||||
|
<span class="icon" data-tooltip="Self">
|
||||||
|
<i class="fa-solid fa-message-bot"></i>
|
||||||
|
</span>
|
||||||
|
{% else %}
|
||||||
|
{{ alert.type }}
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td style="max-width: 10em" class="wrap">{{ alert.msg }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
Loading…
Reference in New Issue