Skip to content

Commit

Permalink
Merge pull request #2677 from johannaengland/show-blacklisted-reason-…
Browse files Browse the repository at this point in the history
…in-UI

Show blacklisted reason of alert address in alert profiles
  • Loading branch information
lunkwill42 authored Sep 7, 2023
2 parents 1caa681 + 842a6b0 commit 1192591
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions python/nav/web/templates/alertprofiles/address_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
<td>
{% if not a.type.supported %}
<div class="alert-box error with-icon inside-table">{{ a.type.name }}: No longer supported</div>
{% elif a.type.blacklisted_reason %}
<div class="alert-box warning inside-table">{{ a.type.name }} is currently non-functional: {{ a.type.blacklisted_reason }}</div>
{% else %}
{{ a.type.name }}
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ <h4>
<td><a href="{% url 'alertprofiles-filter_groups-detail' s.filter_group.id %}">{{ s.filter_group.name }}</a></td>
<td>
{% if not s.alert_address.type.supported %}<div class="alert-box error with-icon inside-table" title="{{ s.alert_address.type.name }} is no longer supported">{% endif %}
{% if s.alert_address.type.blacklisted_reason %}<div class="alert-box warning inside-table" title="{{ s.alert_address.type.name }} is currently non-functional: {{ s.alert_address.type.blacklisted_reason }}">{% endif %}
<a href="{% url 'alertprofiles-address-detail' s.alert_address.id %}">{{ s.alert_address }}</a>
{% if not s.alert_address.type.supported %}</div>{% endif %}
{% if not s.alert_address.type.supported or s.alert_address.type.blacklisted_reason %}</div>{% endif %}
</td>
<td>{{ s.get_type_display|capfirst }}</td>
<td>{{ s.ignore_resolved_alerts|yesno:"Yes,No" }}</td>
Expand Down
3 changes: 2 additions & 1 deletion python/nav/web/templates/alertprofiles/timeperiods.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@
Watch <em><a href="{% url 'alertprofiles-filter_groups-detail' b.filter_group.id %}">{{ b.filter_group.name }}</a></em>,
send to
{% if not b.alert_address.type.supported %}<div class="alert-box error with-icon inside-table" title="{{ b.alert_address.type.name }} is no longer supported">{% endif %}
{% if b.alert_address.type.blacklisted_reason %}<div class="alert-box warning inside-table" title="{{ b.alert_address.type.name }} is currently non-functional: {{b.alert_address.type.blacklisted_reason}}">{% endif %}
<em><a href="{% url 'alertprofiles-address-detail' b.alert_address.id %}">{{ b.alert_address.address }}</a></em>
{% if not b.alert_address.type.supported %}</div>{% endif %},
{% if not b.alert_address.type.supported or b.alert_address.type.blacklisted_reason %}</div>{% endif %},
{{ b.get_type_display }}.
</li>
{% endfor %}
Expand Down

0 comments on commit 1192591

Please sign in to comment.