Skip to content

Commit

Permalink
renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
bai1024 committed Aug 23, 2024
1 parent c811080 commit 14e4ac3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions promgen/static/js/promgen.vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const app = Vue.createApp({
this.setSilenceLabels(event.target.dataset);
this.addSilenceLabel('instance', this.selectedHosts.join('|'));
},
openSilenceTableModal() {
openSilenceListModal() {
silenceTableStore.showModal();
},
fetchSilences: function () {
Expand Down Expand Up @@ -243,7 +243,7 @@ app.component('silence-create-modal', {
});
},
hideModal() {
const modal = $('#silenceModal');
const modal = $('#silenceCreateModal');
if (modal.length) {
globalStore.setMessages([]);
this.form = {};
Expand All @@ -252,7 +252,7 @@ app.component('silence-create-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
Expand Down Expand Up @@ -391,15 +391,15 @@ app.component('silence-list-modal', {
},
methods: {
hideModal() {
const modal = $('#silenceTableModal');
const modal = $('#silenceListModal');
if (modal.length) {
globalStore.setMessages([]);
this.form.labels = [];
modal.modal('hide');
}
},
showModal() {
const modal = $('#silenceTableModal');
const modal = $('#silenceListModal');
if (modal.length) {
modal.on('hidden.bs.modal', () => {
silenceTableStore.hideModal();
Expand Down
4 changes: 2 additions & 2 deletions promgen/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@
{% include 'promgen/vue/promql_query.html' %}
</script>
<script type="text/x-template" id="silence-create-modal-template">
{% include 'promgen/vue/silence_modal.html' %}
{% include 'promgen/vue/silence_create_modal.html' %}
</script>
<script type="text/x-template" id="silence-row-template">
{% include 'promgen/vue/silence_row.html' %}
</script>
<script type="text/x-template" id="silence-list-modal-template">
{% include 'promgen/vue/silence_table_modal.html' %}
{% include 'promgen/vue/silence_list_modal.html' %}
</script>
<script src="{% static 'js/promgen.js' %}"></script>
<script src="{% static 'js/mixins.vue.js' %}"></script>
Expand Down
2 changes: 1 addition & 1 deletion promgen/templates/promgen/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
Alerts
<span v-text="activeAlerts.length" class="badge"></span>
</a>
<a @click="openSilenceTableModal" class="btn btn-warning navbar-btn" role="button">
<a @click="openSilenceListModal" class="btn btn-warning navbar-btn" role="button">
Silences
<span v-text="activeSilences.length" class="badge"></span>
</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div id="silenceModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="silenceModalLabel">
<div id="silenceCreateModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="silenceModalLabel">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% load i18n %}
{% load promgen %}
<div id="silenceTableModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="silenceModalLabel">
<div id="silenceListModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="silenceModalLabel">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
Expand Down

0 comments on commit 14e4ac3

Please sign in to comment.