From 0a16da76045d166684eb007f12fc5e0b1ccd2211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Mon, 17 Apr 2017 16:14:26 -0700 Subject: [PATCH] Show inhibition status in the UI Show it the same way as @silenced is being presented --- assets/static/autocomplete.js | 4 ++++ assets/static/colors.js | 4 +++- assets/templates/alertgroup.html | 17 ++++++++++++++++- bindata_assetfs.go | 8 ++++---- 4 files changed, 27 insertions(+), 6 deletions(-) diff --git a/assets/static/autocomplete.js b/assets/static/autocomplete.js index 1edffe86c..1a5abc3ce 100644 --- a/assets/static/autocomplete.js +++ b/assets/static/autocomplete.js @@ -34,6 +34,10 @@ var Autocomplete = (function() { // static list of hints for @silenced label hints.push('@silenced=true'); hints.push('@silenced=false'); + } else if (label_key == '@inhibited') { + // static list of hints for @inhibited label + hints.push('@inhibited=true'); + hints.push('@inhibited=false'); } else { // equal and non-equal hints for everything else hints.push(label_key + '=' + label_val); diff --git a/assets/static/colors.js b/assets/static/colors.js index 7ecb3b2bd..4e49b69db 100644 --- a/assets/static/colors.js +++ b/assets/static/colors.js @@ -6,7 +6,9 @@ var Colors = (function() { var specialLabels = { '@silenced: false': 'label-danger', - '@silenced: true': 'label-success' + '@silenced: true': 'label-success', + '@inhibited: false': 'label-danger', + '@inhibited: true': 'label-success' } diff --git a/assets/templates/alertgroup.html b/assets/templates/alertgroup.html index 54bd1a866..8ac6be5a8 100644 --- a/assets/templates/alertgroup.html +++ b/assets/templates/alertgroup.html @@ -50,7 +50,7 @@