From ae4b0f1592a568f92785a959a4a66fcc28ff8fa3 Mon Sep 17 00:00:00 2001 From: eddie Date: Tue, 25 Nov 2025 12:10:38 -0700 Subject: [PATCH 1/2] :bug: Updated GlAlerts to use latest Glances Alerts API --- src/components/Widgets/GlAlerts.vue | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/Widgets/GlAlerts.vue b/src/components/Widgets/GlAlerts.vue index df819794..5292f304 100644 --- a/src/components/Widgets/GlAlerts.vue +++ b/src/components/Widgets/GlAlerts.vue @@ -46,15 +46,15 @@ export default { const alerts = []; alertData.forEach((alert) => { alerts.push({ - time: timestampToDateTime(alert[0] * 1000), - ongoing: (alert[1] === -1), - timeAgo: getTimeAgo(alert[0] * 1000), - lasted: alert[1] ? getTimeDifference(alert[0] * 1000, alert[1] * 1000) : 'Ongoing', - severity: alert[2], - category: alert[3], - value: round(alert[5]), - minMax: `Min: ${round(alert[4])}%
Avg: ` - + `${round(alert[5])}%
Max: ${round(alert[6])}%`, + time: timestampToDateTime(alert["begin"] * 1000), + ongoing: (alert['end'] === -1), + timeAgo: getTimeAgo(alert["begin"] * 1000), + lasted: alert['begin'] ? getTimeDifference(alert['begin'] * 1000, alert['end'] * 1000) : 'Ongoing', + severity: alert['state'], + category: alert['type'], + value: round(alert['sum']), + minMax: `Min: ${round(alert['min'])}%
Avg: ` + + `${round(alert['avg'])}%
Max: ${round(alert['max'])}%`, }); }); this.alerts = alerts; From 52bb9b10563d17deb92d92e543c91273cf7a363f Mon Sep 17 00:00:00 2001 From: eddie Date: Tue, 25 Nov 2025 12:19:14 -0700 Subject: [PATCH 2/2] Converted to dot notation --- src/components/Widgets/GlAlerts.vue | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/Widgets/GlAlerts.vue b/src/components/Widgets/GlAlerts.vue index 5292f304..d0306a3b 100644 --- a/src/components/Widgets/GlAlerts.vue +++ b/src/components/Widgets/GlAlerts.vue @@ -46,15 +46,15 @@ export default { const alerts = []; alertData.forEach((alert) => { alerts.push({ - time: timestampToDateTime(alert["begin"] * 1000), - ongoing: (alert['end'] === -1), - timeAgo: getTimeAgo(alert["begin"] * 1000), - lasted: alert['begin'] ? getTimeDifference(alert['begin'] * 1000, alert['end'] * 1000) : 'Ongoing', - severity: alert['state'], - category: alert['type'], - value: round(alert['sum']), - minMax: `Min: ${round(alert['min'])}%
Avg: ` - + `${round(alert['avg'])}%
Max: ${round(alert['max'])}%`, + time: timestampToDateTime(alert.begin * 1000), + ongoing: (alert.end === -1), + timeAgo: getTimeAgo(alert.begin * 1000), + lasted: alert.begin ? getTimeDifference(alert.begin * 1000, alert.end * 1000) : 'Ongoing', + severity: alert.state, + category: alert.type, + value: round(alert.sum), + minMax: `Min: ${round(alert.min)}%
Avg: ` + + `${round(alert.avg)}%
Max: ${round(alert.max)}%`, }); }); this.alerts = alerts;