diff --git a/promgen/static/js/promgen.vue.js b/promgen/static/js/promgen.vue.js index 9bfdaa78c..ae8f6d6ef 100644 --- a/promgen/static/js/promgen.vue.js +++ b/promgen/static/js/promgen.vue.js @@ -56,15 +56,13 @@ const app = new Vue({ .then(() => location.reload()); }, setSilenceLabels(labels) { - if (labels.target) { - silenceStore.setLabels(labels.target.dataset); - } else { - silenceStore.setLabels(labels); - } - + silenceStore.setLabels(labels); silenceStore.showForm(); scroll(0, 0); }, + setSilenceDataset(event) { + this.setSilenceLabels(event.target.dataset); + }, addSilenceLabel(label, value) { silenceStore.addLabel(label, value); silenceStore.showForm(); diff --git a/promgen/templates/promgen/host_detail.html b/promgen/templates/promgen/host_detail.html index f7250d1f2..72fb0b362 100644 --- a/promgen/templates/promgen/host_detail.html +++ b/promgen/templates/promgen/host_detail.html @@ -19,7 +19,7 @@