alertmanager/web/templates/silences.html

60 lines
2.1 KiB
HTML

{{define "silencesTabClass"}}active{{end}}
{{define "head"}}
<script src="/static/js/alerts.js"></script>
{{end}}
{{define "content"}}
<h2>Silences</h2>
<p><a href="#edit_silence_modal" role="button" class="btn btn-primary" id="new_silence_btn" data-toggle="modal">New Silence</a></p>
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th>ID</th>
<th>Labels</th>
<th>Creator</th>
<th>Created At</th>
<th>Ends At</th>
<th>Notes</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{{range .Silences}}
<tr>
<td>{{.Id}}</td>
<td>
{{range .Filters}}
<b>{{.Name}}</b>="{{.Value}}",
{{end}}
</td>
<td>{{.CreatedBy}}</td>
<td>{{.CreatedAt}}</td>
<td>{{.EndsAt}}</td>
<td>{{.Comment}}</td>
<td>
<input type="hidden" name="silence_id" value="{{.Id}}">
<a href="#edit_silence_modal" role="button" class="btn btn-mini btn-primary edit_silence_btn" id="new_silence_btn" data-toggle="modal">Edit Silence</a>
<a href="#del_silence_modal" role="button" class="btn btn-mini btn-danger del_silence_modal_btn" data-toggle="modal">Remove Silence</a>
</td>
</tr>
{{end}}
</tbody>
</table>
{{template "editSilenceModal" .}}
<div id="del_silence_modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="del_silence_header">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3 id="del_silence_header">Deletion Confirmation</h3>
</div>
<div class="modal-body">
<p>Do you really want to delete this silence?</p>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</a>
<button class="btn btn-primary btn-danger del_silence_btn">Delete</a>
</div>
</div>
{{end}}