From 85dfe1f5d17dad5e035eb3620b8f516b2bcf79cd Mon Sep 17 00:00:00 2001 From: Peace <32363424+julian-piehl@users.noreply.github.com> Date: Wed, 16 Oct 2024 13:25:35 +0200 Subject: [PATCH 1/3] fix: some errors from the performance optimization (#5196) --- server/model/monitor.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index 5b7e5871a..da0c0d5c8 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -1508,10 +1508,8 @@ class Monitor extends BeanModel { return await R.getAll(` SELECT monitor_notification.monitor_id, monitor_notification.notification_id FROM monitor_notification - WHERE monitor_notification.monitor_id IN (?) - `, [ - monitorIDs, - ]); + WHERE monitor_notification.monitor_id IN (${monitorIDs.map((_) => "?").join(",")}) + `, monitorIDs); } /** @@ -1521,13 +1519,11 @@ class Monitor extends BeanModel { */ static async getMonitorTag(monitorIDs) { return await R.getAll(` - SELECT monitor_tag.monitor_id, tag.name, tag.color + SELECT monitor_tag.monitor_id, monitor_tag.tag_id, tag.name, tag.color FROM monitor_tag JOIN tag ON monitor_tag.tag_id = tag.id - WHERE monitor_tag.monitor_id IN (?) - `, [ - monitorIDs, - ]); + WHERE monitor_tag.monitor_id IN (${monitorIDs.map((_) => "?").join(",")}) + `, monitorIDs); } /** @@ -1567,6 +1563,7 @@ class Monitor extends BeanModel { tagsMap.set(row.monitor_id, []); } tagsMap.get(row.monitor_id).push({ + tag_id: row.tag_id, name: row.name, color: row.color }); From 42e77798e56474ca721ef371384dbaf3cd490a15 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Wed, 16 Oct 2024 14:58:44 +0200 Subject: [PATCH 2/3] Revert "Extend length of status bars in status page" (#5207) --- src/components/PublicGroupList.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/PublicGroupList.vue b/src/components/PublicGroupList.vue index c5d7d4500..bacddbf13 100644 --- a/src/components/PublicGroupList.vue +++ b/src/components/PublicGroupList.vue @@ -33,7 +33,7 @@