This commit is contained in:
Clayton 2026-01-20 19:16:41 +00:00 committed by GitHub
commit 6bf6b5f523
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 22 additions and 3 deletions

View File

@ -1057,6 +1057,14 @@ let needSetup = false;
await startMonitor(socket.userID, monitorID);
await server.sendUpdateMonitorIntoList(socket, monitorID);
const monitor = await R.findOne("monitor", " id = ? ", [monitorID]);
if (monitor && monitor.type === "group") {
const childrenIDs = await Monitor.getAllChildrenIDs(monitorID);
for (const childID of childrenIDs) {
await server.sendUpdateMonitorIntoList(socket, childID);
}
}
callback({
ok: true,
msg: "successResumed",
@ -1076,6 +1084,14 @@ let needSetup = false;
await pauseMonitor(socket.userID, monitorID);
await server.sendUpdateMonitorIntoList(socket, monitorID);
const monitor = await R.findOne("monitor", " id = ? ", [monitorID]);
if (monitor && monitor.type === "group") {
const childrenIDs = await Monitor.getAllChildrenIDs(monitorID);
for (const childID of childrenIDs) {
await server.sendUpdateMonitorIntoList(socket, childID);
}
}
callback({
ok: true,
msg: "successPaused",

View File

@ -3171,9 +3171,12 @@ message HealthCheckResponse {
}
let createdNewParent = false;
let parentCreatedAsActive = false;
if (this.draftGroupName && this.monitor.parent === -1) {
// Create Monitor with name of draft group
const parentActive = this.isClone ? this.monitor.active !== false : false;
parentCreatedAsActive = parentActive;
const res = await new Promise((resolve) => {
this.$root.add(
{
@ -3181,7 +3184,7 @@ message HealthCheckResponse {
type: "group",
name: this.draftGroupName,
interval: this.monitor.interval,
active: false,
active: parentActive,
},
resolve
);
@ -3203,7 +3206,7 @@ message HealthCheckResponse {
await this.$refs.tagsManager.submit(res.monitorID);
// Start the new parent monitor after edit is done
if (createdNewParent) {
if (createdNewParent && !parentCreatedAsActive) {
await this.startParentGroupMonitor();
}
this.processing = false;
@ -3223,7 +3226,7 @@ message HealthCheckResponse {
this.init();
// Start the new parent monitor after edit is done
if (createdNewParent) {
if (createdNewParent && !parentCreatedAsActive) {
this.startParentGroupMonitor();
}
});