mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
Add a clickable link to every alert group
This links to a filter generated from alert group labels, so one can easily share it
This commit is contained in:
@@ -372,3 +372,10 @@ table.table.examples > tbody > tr td:first-child {
|
||||
.modal-body>table.table>tbody>tr>td.modal-row-actions {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.panel-heading > span.alert-group-link {
|
||||
margin-left: -8px;
|
||||
}
|
||||
span.alert-group-link > a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,14 @@
|
||||
|
||||
%div.panel{class: cls_panel}
|
||||
%div.panel-heading.text-center
|
||||
-if (Object.keys(group.labels).length > 0) {
|
||||
-var filters = [];
|
||||
-$.each(group.labels, function(label_key, label_val) {
|
||||
-filters.push(label_key + '=' + label_val);
|
||||
-var groupLink = '?q=' + filters.join(',');
|
||||
%span.pull-left.alert-group-link
|
||||
%a{href: groupLink, title: 'Link to this alert group', 'data-toggle': 'tooltip', 'data-placement': 'top'}
|
||||
%i.fa.fa-link
|
||||
%span.badge.pull-right
|
||||
=group.alerts.length
|
||||
%div.panel-title
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user