Compare commits

...

9 commits

Author SHA1 Message Date
Couteau Arthur
522c07f9b3
Merge ffa8aad019 into 8a432ac937 2024-11-12 18:00:27 +00:00
Ionys
8a432ac937
fix(status page): Make sure the group deletion is correctly handled when groupIDList is empty (#5340)
Some checks failed
Auto Test / check-linters (push) Has been cancelled
Auto Test / armv7-simple-test (18, ARMv7) (push) Has been cancelled
Auto Test / armv7-simple-test (20, ARMv7) (push) Has been cancelled
Auto Test / e2e-test (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
Merge Conflict Labeler / Labeling (push) Has been cancelled
validate / json-yaml-validate (push) Has been cancelled
validate / validate (push) Has been cancelled
Auto Test / auto-test (18, ARM64) (push) Has been cancelled
Auto Test / auto-test (18, macos-latest) (push) Has been cancelled
Auto Test / auto-test (18, ubuntu-latest) (push) Has been cancelled
Auto Test / auto-test (18, windows-latest) (push) Has been cancelled
Auto Test / auto-test (20, ARM64) (push) Has been cancelled
Auto Test / auto-test (20, macos-latest) (push) Has been cancelled
Auto Test / auto-test (20, ubuntu-latest) (push) Has been cancelled
Auto Test / auto-test (20, windows-latest) (push) Has been cancelled
2024-11-12 19:00:09 +01:00
Logorrheique
ffa8aad019 fix warning The watch property should be above the mounted 2024-11-04 13:32:40 +01:00
Logorrheique
49a5272573 fix 2024-11-04 13:29:39 +01:00
Logorrheique
c62f0d7bd6 Revert "fix double quote"
This reverts commit c2f7747695.
2024-11-04 13:25:12 +01:00
Logorrheique
c2f7747695 fix double quote 2024-11-04 13:24:06 +01:00
Logorrheique
856ab558b9 fix package.lock 2024-11-04 11:20:41 +01:00
Logorrheique
04943c8553 Revert "redirect to /dashboard when shrinking on computer from /list on mobile size"
This reverts commit bb14bc18ca.
2024-11-04 11:15:18 +01:00
Logorrheique
bb14bc18ca redirect to /dashboard when shrinking on computer from /list on mobile size 2024-11-04 10:59:29 +01:00
2 changed files with 23 additions and 6 deletions

View file

@ -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();

View file

@ -11,6 +11,19 @@ export default {
components: {
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>