mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 14:54:05 +00:00
Compare commits
9 commits
657a9de55b
...
522c07f9b3
Author | SHA1 | Date | |
---|---|---|---|
|
522c07f9b3 | ||
|
8a432ac937 | ||
|
ffa8aad019 | ||
|
49a5272573 | ||
|
c62f0d7bd6 | ||
|
c2f7747695 | ||
|
856ab558b9 | ||
|
04943c8553 | ||
|
bb14bc18ca |
2 changed files with 23 additions and 6 deletions
|
@ -220,13 +220,17 @@ module.exports.statusPageSocketHandler = (socket) => {
|
||||||
|
|
||||||
// Delete groups that are not in the list
|
// Delete groups that are not in the list
|
||||||
log.debug("socket", "Delete groups that are not in the list");
|
log.debug("socket", "Delete groups that are not in the list");
|
||||||
const slots = groupIDList.map(() => "?").join(",");
|
if (groupIDList.length === 0) {
|
||||||
|
await R.exec("DELETE FROM `group` WHERE status_page_id = ?", [ statusPage.id ]);
|
||||||
|
} else {
|
||||||
|
const slots = groupIDList.map(() => "?").join(",");
|
||||||
|
|
||||||
const data = [
|
const data = [
|
||||||
...groupIDList,
|
...groupIDList,
|
||||||
statusPage.id
|
statusPage.id
|
||||||
];
|
];
|
||||||
await R.exec(`DELETE FROM \`group\` WHERE id NOT IN (${slots}) AND status_page_id = ?`, data);
|
await R.exec(`DELETE FROM \`group\` WHERE id NOT IN (${slots}) AND status_page_id = ?`, data);
|
||||||
|
}
|
||||||
|
|
||||||
const server = UptimeKumaServer.getInstance();
|
const server = UptimeKumaServer.getInstance();
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,19 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
MonitorList,
|
MonitorList,
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
"$root.isMobile"(newVal) {
|
||||||
|
if (!newVal && this.$route.path === "/list") {
|
||||||
|
this.$router.push("/dashboard");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
if (!this.$root.isMobile && this.$route.path === "/list") {
|
||||||
|
this.$router.push("/dashboard");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue