From a34c093e74d48709ff5507baabd2f219724a7f67 Mon Sep 17 00:00:00 2001 From: Blair Date: Tue, 10 Sep 2024 11:11:15 +0900 Subject: [PATCH 1/2] renaming silence_modal to silence_create_modal --- promgen/static/css/promgen.css | 2 +- promgen/static/js/promgen.vue.js | 8 ++++---- promgen/templates/base.html | 6 +++--- .../vue/{silence_modal.html => silence_create_modal.html} | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) rename promgen/templates/promgen/vue/{silence_modal.html => silence_create_modal.html} (97%) diff --git a/promgen/static/css/promgen.css b/promgen/static/css/promgen.css index d106ccbc3..bee2b6754 100644 --- a/promgen/static/css/promgen.css +++ b/promgen/static/css/promgen.css @@ -50,7 +50,7 @@ a[rel]:after { font-family: monospace; } -/* silence-modal */ +/* silence-create-modal */ .promgen-labels-list { padding: 10px 5px; min-height: 116px; diff --git a/promgen/static/js/promgen.vue.js b/promgen/static/js/promgen.vue.js index baac5975e..0faf5ecdc 100644 --- a/promgen/static/js/promgen.vue.js +++ b/promgen/static/js/promgen.vue.js @@ -167,8 +167,8 @@ app.component("silence-row", { }, }); -app.component('silence-modal', { - template: '#silence-modal-template', +app.component('silence-create-modal', { + template: '#silence-create-modal-template', delimiters: ['[[', ']]'], data: () => ({ state: silenceStore.state, @@ -215,7 +215,7 @@ app.component('silence-modal', { }); }, hideModal() { - const modal = $('#silenceModal'); + const modal = $('#silenceCreateModal'); if (modal.length) { globalStore.setMessages([]); this.form = {}; @@ -224,7 +224,7 @@ app.component('silence-modal', { } }, showModal() { - const modal = $('#silenceModal'); + const modal = $('#silenceCreateModal'); if (modal.length) { // Detect when the modal is closed, and update the state accordingly. This is // necessary in case the user closes the modal by clicking outside of it, instead of diff --git a/promgen/templates/base.html b/promgen/templates/base.html index a97a880b5..1db8e7c4e 100644 --- a/promgen/templates/base.html +++ b/promgen/templates/base.html @@ -23,7 +23,7 @@ {% endblock %}
{% include 'promgen/global_messages.html' %} - + {% include 'promgen/global_alerts.html' %} {% include 'promgen/global_silences.html' %} {% block content %}{% endblock %} @@ -52,8 +52,8 @@ - + diff --git a/promgen/templates/promgen/navbar.html b/promgen/templates/promgen/navbar.html index bce3861b6..064281d9c 100644 --- a/promgen/templates/promgen/navbar.html +++ b/promgen/templates/promgen/navbar.html @@ -51,11 +51,10 @@ Alerts - + Silences -