mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-27 16:54:04 +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,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();
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,9 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.modal = new Modal(this.$refs.modal);
|
this.modal = new Modal(this.$refs.modal);
|
||||||
},
|
},
|
||||||
|
beforeUnmount() {
|
||||||
|
this.cleanupModal();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
* Show the confirm dialog
|
* Show the confirm dialog
|
||||||
|
@ -58,6 +61,19 @@ export default {
|
||||||
this.$emit("added", this.groupName);
|
this.$emit("added", this.groupName);
|
||||||
this.modal.hide();
|
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>
|
</script>
|
||||||
|
|
|
@ -232,6 +232,9 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.modal = new Modal(this.$refs.modal);
|
this.modal = new Modal(this.$refs.modal);
|
||||||
},
|
},
|
||||||
|
beforeUnmount() {
|
||||||
|
this.cleanupModal();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -336,6 +339,20 @@ export default {
|
||||||
});
|
});
|
||||||
} while (this.$root.notificationList.find(it => it.name === name));
|
} while (this.$root.notificationList.find(it => it.name === name));
|
||||||
return 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() {
|
mounted() {
|
||||||
this.modal = new Modal(this.$refs.modal);
|
this.modal = new Modal(this.$refs.modal);
|
||||||
},
|
},
|
||||||
|
beforeUnmount() {
|
||||||
|
this.cleanupModal();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
* Show dialog to confirm deletion
|
* 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>
|
</script>
|
||||||
|
|
|
@ -248,6 +248,9 @@ export default {
|
||||||
this.modal = new Modal(this.$refs.modal);
|
this.modal = new Modal(this.$refs.modal);
|
||||||
this.getExistingTags();
|
this.getExistingTags();
|
||||||
},
|
},
|
||||||
|
beforeUnmount() {
|
||||||
|
this.cleanupModal();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
* Show the add tag dialog
|
* Show the add tag dialog
|
||||||
|
@ -459,6 +462,19 @@ export default {
|
||||||
this.newTags = [];
|
this.newTags = [];
|
||||||
this.deleteTags = [];
|
this.deleteTags = [];
|
||||||
this.processing = false;
|
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