mirror of
https://github.com/prometheus/alertmanager
synced 2025-01-16 02:54:37 +00:00
link and highlight silence in UI
This commit is contained in:
parent
5f46042dd5
commit
fa64b7d1b9
@ -76,6 +76,9 @@ header #logo {
|
||||
background: #bfbfbf;
|
||||
padding: .8em;
|
||||
}
|
||||
.silence.highlight .overview {
|
||||
background: #dfdfdf;
|
||||
}
|
||||
.silence .detail, .alert-item .detail {
|
||||
background: #fff;
|
||||
padding: .8em;
|
||||
|
@ -201,8 +201,9 @@ angular.module('am.controllers').controller('AlertsCtrl',
|
||||
);
|
||||
|
||||
angular.module('am.controllers').controller('SilenceCtrl',
|
||||
function($scope, Silence) {
|
||||
function($scope, $location, Silence) {
|
||||
|
||||
$scope.highlight = $location.search()['hl'] == $scope.sil.id;
|
||||
$scope.showDetails = false;
|
||||
|
||||
$scope.toggleDetails = function() {
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
<div class="right">
|
||||
<div ng-show="alert.inhibited" class="left lbl muted-lbl">inhibited</div>
|
||||
<div ng-show="alert.silenced" class="left lbl muted-lbl">silenced by {{ alert.silenced }}</div>
|
||||
<div ng-show="alert.silenced" class="left lbl muted-lbl"><a ng-href="/#/silences?hl={{ alert.silenced }}">silenced</div>
|
||||
|
||||
<button type="black" disabled small>Since {{ alert.startsAt | amCalendar }}</button>
|
||||
<button class="silence-button" type="secondary" ng-click="toggleSilenceForm()" small upper>Silence</button>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="silence" ng-controller="SilenceCtrl">
|
||||
<div class="silence {{ highlight ? 'highlight' : ''}}" ng-controller="SilenceCtrl">
|
||||
<div class="overview group">
|
||||
<div class="labels left" ng-click="toggleDetails()">
|
||||
<span ng-repeat="m in sil.matchers | orderBy:name">
|
||||
|
Loading…
Reference in New Issue
Block a user