Skip to content

Commit

Permalink
Highlight usages of unsupported alert addresses
Browse files Browse the repository at this point in the history
Because when NAV is upgraded:
- Users who have registered Jabber alert addresses need to be made aware
  that these are now unsupported
- User with subscriptions that dispatch to Jabber addresses must be made
  aware that these subscriptions will no longer work as intended.
  • Loading branch information
lunkwill42 committed Oct 3, 2019
1 parent 10dff2c commit 8b2700c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
14 changes: 12 additions & 2 deletions python/nav/web/templates/alertprofiles/address_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,20 @@
<tr>
<td><input type="checkbox" name="address" value="{{ a.id }}" /></td>
<td>
<a href="{% url 'alertprofiles-address-detail' a.id %}">{{ a.address }}</a>
<a href="{% url 'alertprofiles-address-detail' a.id %}">
{% if not a.type.supported %}
<del>{{ a.address }}</del>
{% else %}
{{ a.address }}
{% endif %}
</a>
</td>
<td>
{{ a.type.name }}
{% if not a.type.supported %}
<div class="alert-box error with-icon inside-table">{{ a.type.name }}: No longer supported</div>
{% else %}
{{ a.type.name }}
{% endif %}
</td>
</tr>
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ <h4>
<td><input type="checkbox" name="subscription"
id="id_subscription_{{ s.id }}" value="{{ s.id }}" /></td>
<td><a href="{% url 'alertprofiles-filter_groups-detail' s.filter_group.id %}">{{ s.filter_group.name }}</a></td>
<td><a href="{% url 'alertprofiles-address-detail' s.alert_address.id %}">{{ s.alert_address }}</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 %}
<a href="{% url 'alertprofiles-address-detail' s.alert_address.id %}">{{ s.alert_address }}</a>
{% if not s.alert_address.type.supported %}</div>{% endif %}
</td>
<td>{{ s.get_type_display|capfirst }}</td>
<td>{{ s.ignore_resolved_alerts|yesno:"Yes,No" }}</td>
<td><a href="{% url 'alertprofiles-profile-timeperiod-subscription' s.id %}">
Expand Down
5 changes: 4 additions & 1 deletion python/nav/web/templates/alertprofiles/timeperiods.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@
{% for b in a.alert_subscriptions %}
<li>
Watch <em><a href="{% url 'alertprofiles-filter_groups-detail' b.filter_group.id %}">{{ b.filter_group.name }}</a></em>,
send to <em><a href="{% url 'alertprofiles-address-detail' b.alert_address.id %}">{{ b.alert_address.address }}</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 %}
<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 %},
{{ b.get_type_display }}.
</li>
{% endfor %}
Expand Down

0 comments on commit 8b2700c

Please sign in to comment.