Show alerts as disabled if the plugin is disabled

This commit is contained in:
Frank Hamand 2017-04-16 12:31:17 +01:00
parent 89bb99a5e5
commit 0159cb79c0
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@
<div class="col-xs-8">
<h5>
{% for alert in service.alerts.all %}
<span class="label label-{% if service.alerts_enabled %}success{% else %}warning{% endif %}">{{ alert }}</span>
<span class="label label-{% if service.alerts_enabled and alert.enabled %}success{% else %}warning{% endif %}">{{ alert }}</span>
{% endfor %}
</h5>
</div>

View File

@ -42,7 +42,7 @@
<td title="{{ check.description }}">
<a href="{% url "update-service" pk=service.id %}">{{service.name}}</a>
{% for alert in service.alerts.all %}
<span class="label label-{% if service.alerts_enabled %}success{% else %}warning{% endif %}">{{ alert }}</span>
<span class="label label-{% if service.alerts_enabled and alert.enabled %}success{% else %}warning{% endif %}">{{ alert }}</span>
{% endfor %}
</td>
{% for user in users %}