alertmanager/ui/app/partials/silence.html
Fabian Reinartz 2098be4f93 ui: handle silence edit modes
This change makes actions around silences in different stages more
clear. Changes that are not allowed to be in-place are handled by
creating a new silence and deleting/expiring the old one behind the
scenes.
2016-08-09 12:01:31 +02:00

51 lines
1.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="silence-item {{ highlight ? 'highlight' : ''}}" ng-controller="SilenceCtrl">
<div class="overview group">
<button type="primary" class="expand" ng-show="showDetails" ng-click="toggleDetails()" small></button>
<button type="primary" class="expand" ng-hide="showDetails" ng-click="toggleDetails()" small>+</button>
<div class="labels left">
<span ng-repeat="m in sil.matchers | orderBy:name">
<span class="lbl {{ m.name == 'alertname' ? 'lbl-highlight' : '' }}">
{{ m.name }} =<span ng-show="m.isRegex">~</span> "{{ m.value }}"
</span>
</span>
</div>
<div class="right">
<button ng-show="sil.pending" type="black" disabled small>Starts {{ sil.endsAt | amCalendar }}</button>
<button ng-show="sil.active" type="black" disabled small>Ends {{ sil.endsAt | amCalendar }}</button>
<button ng-show="sil.pending" class="delete-button" type="black" ng-click="delete(sil.id)" small upper>Delete</button>
<button ng-show="sil.active" class="delete-button" type="black" ng-click="delete(sil.id)" small upper>Expire</button>
<button ng-show="!sil.elapsed" class="edit-button" type="black" ng-click="toggleSilenceForm()" small upper>Edit</button>
<button ng-show="sil.elapsed" class="edit-button" type="black" ng-click="toggleSilenceForm()" small upper>Recreate</button>
</div>
</div>
<div class="edit-silence" ng-show="showSilenceForm">
<silence-form silence="sil"></silence-form>
</div>
<div class="detail group" ng-show="showDetails">
<table class="table-flat">
<tbody>
<tr ng-show="sil.createdBy">
<td>creator</td>
<td>{{ sil.createdBy }}</td>
</tr>
<tr ng-show="sil.comment">
<td>comment</td>
<td>{{ sil.comment }}</td>
</tr>
<tr>
<td>active</td>
<td>
<span>{{ sil.startsAt | date:'yyyy-MM-dd HH:mm' }}</span>
<span>{{ sil.endsAt | date:'yyyy-MM-dd HH:mm' }}</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>