Skip to content

Commit

Permalink
Highlight date change in alert list
Browse files Browse the repository at this point in the history
When figuring out a timeline for alerts, it is helpful to have an extra
indication showing date changes.
  • Loading branch information
kfdm committed Aug 1, 2023
1 parent 39acbb2 commit e02ac2b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions promgen/templates/promgen/alert_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
<th><a href="?sentError=1">Error</a></th>
</tr>
{% for alert in alert_list %}
{% ifchanged alert.created|date %}
<tr class="table-secondary">
<th colspan="8">{{ alert.created|date }}</th>
</tr>
{% endifchanged %}
<tr>
<td><a href="{{alert.get_absolute_url}}">{{ alert.created|timezone:TIMEZONE }}</a></td>
<td><a href="?alertname={{alert.json.commonLabels.alertname}}">{{alert.json.commonLabels.alertname}}</a></td>
Expand Down

0 comments on commit e02ac2b

Please sign in to comment.