mirror of
https://github.com/status-im/cabot.git
synced 2025-02-25 02:45:16 +00:00
44 lines
1.8 KiB
HTML
44 lines
1.8 KiB
HTML
|
|
<table class="table bootstrap-datatable datatable">
|
|
<thead>
|
|
<tr>
|
|
{% if not services %}
|
|
<div class="col-xs-11 col-xs-offset-1">
|
|
<hr></hr>
|
|
No services configured
|
|
</div>
|
|
</tr>
|
|
{% else %}
|
|
<th>Name</th>
|
|
<th>Overall</th>
|
|
<th>Active checks</th>
|
|
<th>Disabled checks</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for service in services %}
|
|
<tr class="{% if service.alerts_enabled %}enabled{% else %}warning{% endif %}">
|
|
<td>
|
|
<a href="{% url service pk=service.id %}" title="Alerts {% if service.alerts_enabled %}enabled{% else %}disabled{% endif %}">{{service.name}} </a>
|
|
</td>
|
|
<td>
|
|
<span class="label label-{% if not service.alerts_enabled %}warning{% else %}{% if service.overall_status == service.PASSING_STATUS %}success{% else %}danger{% endif %}{% endif %}">{% if service.alerts_enabled %}{{ service.overall_status|lower|capfirst }}{% else %}Disabled{% endif %}</span>
|
|
</td>
|
|
<td>
|
|
<span class="label label-{% if service.active_status_checks.all.count > 0 %}{% if service.overall_status != service.PASSING_STATUS %}danger{% else %}success{% endif %}{% else %}default{% endif %}">{{ service.active_status_checks.all.count }}</span>
|
|
</td>
|
|
<td>
|
|
<span class="label label-{% if service.inactive_status_checks.all.count > 0 %}warning{% else %}default{% endif %}">{{ service.inactive_status_checks.all.count }}</span>
|
|
</td>
|
|
<td class="text-right">
|
|
<a class="btn btn-xs" href="{% url update-service pk=service.id %}" role="button">
|
|
<i class="glyphicon glyphicon-edit"></i>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
{% endif %}
|
|
</table>
|