mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 14:54:05 +00:00
Compare commits
20 commits
5246683b8d
...
e5261b754e
Author | SHA1 | Date | |
---|---|---|---|
|
e5261b754e | ||
|
8a432ac937 | ||
|
e22b22ab49 | ||
|
6e93ed1392 | ||
|
9684d34ad0 | ||
|
dcb675a343 | ||
|
e868ebb68e | ||
|
adb5cbe425 | ||
|
949198d09e | ||
|
87f3c2ef94 | ||
|
498786eb39 | ||
|
95a9e0a096 | ||
|
0d2b380f44 | ||
|
56b3cf412b | ||
|
72849de1b4 | ||
|
e2ce0e38a6 | ||
|
da831893de | ||
|
45b6c8a91d | ||
|
1dceb96c7c | ||
|
401710c3bd |
5 changed files with 76 additions and 8 deletions
|
@ -220,6 +220,9 @@ module.exports.statusPageSocketHandler = (socket) => {
|
|||
|
||||
// Delete groups that are not in the list
|
||||
log.debug("socket", "Delete groups that are not in the list");
|
||||
if (groupIDList.length === 0) {
|
||||
await R.exec("DELETE FROM `group` WHERE status_page_id = ?", [ statusPage.id ]);
|
||||
} else {
|
||||
const slots = groupIDList.map(() => "?").join(",");
|
||||
|
||||
const data = [
|
||||
|
@ -227,6 +230,7 @@ module.exports.statusPageSocketHandler = (socket) => {
|
|||
statusPage.id
|
||||
];
|
||||
await R.exec(`DELETE FROM \`group\` WHERE id NOT IN (${slots}) AND status_page_id = ?`, data);
|
||||
}
|
||||
|
||||
const server = UptimeKumaServer.getInstance();
|
||||
|
||||
|
|
|
@ -42,6 +42,9 @@ export default {
|
|||
mounted() {
|
||||
this.modal = new Modal(this.$refs.modal);
|
||||
},
|
||||
beforeUnmount() {
|
||||
this.cleanupModal();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* Show the confirm dialog
|
||||
|
@ -58,6 +61,19 @@ export default {
|
|||
this.$emit("added", this.groupName);
|
||||
this.modal.hide();
|
||||
},
|
||||
/**
|
||||
* Clean up modal and restore scroll behavior
|
||||
* @returns {void}
|
||||
*/
|
||||
cleanupModal() {
|
||||
if (this.modal) {
|
||||
try {
|
||||
this.modal.hide();
|
||||
} catch (e) {
|
||||
console.warn("Modal hide failed:", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -232,6 +232,9 @@ export default {
|
|||
mounted() {
|
||||
this.modal = new Modal(this.$refs.modal);
|
||||
},
|
||||
beforeUnmount() {
|
||||
this.cleanupModal();
|
||||
},
|
||||
methods: {
|
||||
|
||||
/**
|
||||
|
@ -336,6 +339,20 @@ export default {
|
|||
});
|
||||
} while (this.$root.notificationList.find(it => it.name === name));
|
||||
return name;
|
||||
},
|
||||
|
||||
/**
|
||||
* Clean up modal and restore scroll behavior
|
||||
* @returns {void}
|
||||
*/
|
||||
cleanupModal() {
|
||||
if (this.modal) {
|
||||
try {
|
||||
this.modal.hide();
|
||||
} catch (e) {
|
||||
console.warn("Modal hide failed:", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
@ -125,11 +125,12 @@ export default {
|
|||
}
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.modal = new Modal(this.$refs.modal);
|
||||
},
|
||||
|
||||
beforeUnmount() {
|
||||
this.cleanupModal();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* Show dialog to confirm deletion
|
||||
|
@ -209,6 +210,20 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Clean up modal and restore scroll behavior
|
||||
* @returns {void}
|
||||
*/
|
||||
cleanupModal() {
|
||||
if (this.modal) {
|
||||
try {
|
||||
this.modal.hide();
|
||||
} catch (e) {
|
||||
console.warn("Modal hide failed:", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -248,6 +248,9 @@ export default {
|
|||
this.modal = new Modal(this.$refs.modal);
|
||||
this.getExistingTags();
|
||||
},
|
||||
beforeUnmount() {
|
||||
this.cleanupModal();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* Show the add tag dialog
|
||||
|
@ -459,6 +462,19 @@ export default {
|
|||
this.newTags = [];
|
||||
this.deleteTags = [];
|
||||
this.processing = false;
|
||||
},
|
||||
/**
|
||||
* Clean up modal and restore scroll behavior
|
||||
* @returns {void}
|
||||
*/
|
||||
cleanupModal() {
|
||||
if (this.modal) {
|
||||
try {
|
||||
this.modal.hide();
|
||||
} catch (e) {
|
||||
console.warn("Modal hide failed:", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue