2021-09-11 22:44:15 +00:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
{% block head %}
|
2021-09-16 22:41:29 +00:00
|
|
|
<meta http-equiv="refresh" content="15;url=/alerts" />
|
2021-09-11 22:44:15 +00:00
|
|
|
{% endblock %}
|
|
|
|
{% block content_inner %}
|
|
|
|
{% if data %}
|
|
|
|
<h2>Current Alerts: {{ data.alert_count_current }}</h2>
|
|
|
|
|
|
|
|
<div class="accordion" id="accordionExample">
|
|
|
|
{% for alert in data.alerts_current %}
|
|
|
|
<div class="card alert-{{ alert.ui_class }}">
|
|
|
|
<div class="card-header" id="headingOne">
|
|
|
|
<h2 class="mb-0">
|
|
|
|
<button class="btn btn-link btn-block text-left" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
|
|
|
|
{{ alert.title }}
|
|
|
|
</button>
|
|
|
|
<span class="badge badge-{{ alert.ui_class}}">{{ alert.severity }}</span>
|
|
|
|
</h2>
|
|
|
|
<span class="badge">Since {{ alert.start_time }}</span>
|
|
|
|
<span class="badge">Last Seen {{ alert.last_time }}</span>
|
|
|
|
{% if alert.end_time > -1 %}
|
|
|
|
<span class="badge">Ended {{ alert.end_time }}</span>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordionExample">
|
|
|
|
<div class="card-body">
|
2021-09-16 22:41:29 +00:00
|
|
|
<strong>Module: </strong><a href="/logs/{{ alert.module }}" title="Click for logs">{{ alert.module }}</a>
|
|
|
|
{% autoescape false %}
|
|
|
|
<p>{{ alert.description | replace("\n\n", "</p><p>") | replace("\n", "<br/>")}}</p>
|
|
|
|
{% endautoescape %}
|
2021-09-11 22:44:15 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<h2>Previous Alerts: {{ data.alert_count_previous }}</h2>
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|