From 089f7db00711a6bfc0b62d69ef5cf7adc3eb7bdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klemen=20Ko=C5=A1ir?= Date: Wed, 12 Jan 2022 12:09:07 +0900 Subject: [PATCH] Address comments --- promgen/static/js/promgen.vue.js | 10 ++++------ promgen/templates/promgen/host_detail.html | 2 +- .../promgen/project_detail_configuration.html | 2 +- .../templates/promgen/project_detail_exporters.html | 2 +- promgen/templates/promgen/project_detail_hosts.html | 2 +- promgen/templates/promgen/project_detail_urls.html | 2 +- promgen/templates/promgen/project_row.html | 2 +- promgen/templates/promgen/search.html | 4 ++-- promgen/templates/promgen/service_block.html | 2 +- 9 files changed, 13 insertions(+), 15 deletions(-) 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 @@

Host: {{ slug }}

{% trans "Update Project" %} - {% trans "Silence" %} + {% trans "Silence" %}