From 00b32704c4d243a44982e1ec13c94c5607b83e58 Mon Sep 17 00:00:00 2001 From: jx163 Date: Wed, 1 Oct 2025 14:27:43 +1300 Subject: [PATCH 1/6] Add Glances multi-system monitoring widget --- src/components/Widgets/GlCompactMetrics.vue | 702 ++++++++++++++++++++ src/components/Widgets/WidgetBase.vue | 1 + 2 files changed, 703 insertions(+) create mode 100644 src/components/Widgets/GlCompactMetrics.vue diff --git a/src/components/Widgets/GlCompactMetrics.vue b/src/components/Widgets/GlCompactMetrics.vue new file mode 100644 index 00000000..1e59290e --- /dev/null +++ b/src/components/Widgets/GlCompactMetrics.vue @@ -0,0 +1,702 @@ + + + + + diff --git a/src/components/Widgets/WidgetBase.vue b/src/components/Widgets/WidgetBase.vue index a148b476..977d88c0 100644 --- a/src/components/Widgets/WidgetBase.vue +++ b/src/components/Widgets/WidgetBase.vue @@ -127,6 +127,7 @@ const COMPAT = { weather: 'Weather', 'weather-forecast': 'WeatherForecast', 'xkcd-comic': 'XkcdComic', + 'gl-compact-metrics': 'GlCompactMetrics', }; export default { From e1f040ce89beaea20866f3ab0f3625539504a380 Mon Sep 17 00:00:00 2001 From: jx163 Date: Thu, 2 Oct 2025 11:41:40 +1300 Subject: [PATCH 2/6] resolve lint issues in uptime and metric handling --- src/components/Widgets/GlCompactMetrics.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Widgets/GlCompactMetrics.vue b/src/components/Widgets/GlCompactMetrics.vue index 1e59290e..0c8517eb 100644 --- a/src/components/Widgets/GlCompactMetrics.vue +++ b/src/components/Widgets/GlCompactMetrics.vue @@ -325,7 +325,7 @@ export default { }, formatBytes(bytes) { - if (!bytes || bytes === 0 || Number.isNaN(bytes)) return '0 B'; + if (!bytes || Number.isNaN(bytes)) return '0 B'; const k = 1024; const sizes = ['B', 'KB', 'MB', 'GB', 'TB']; const i = Math.floor(Math.log(bytes) / Math.log(k)); @@ -333,7 +333,7 @@ export default { }, formatUptime(seconds) { - if (!seconds || Number.isNaN(seconds) || seconds <= 0) return '-'; + if (!seconds || seconds <= 0) return '-'; const days = Math.floor(seconds / 86400); const hours = Math.floor((seconds % 86400) / 3600); @@ -360,7 +360,7 @@ export default { uptime = this.detailData.uptime; if (typeof uptime === 'string') { - return uptime.replace('days', 'days').replace('day', 'day'); + return uptime; } } else if (this.detailData.system && this.detailData.system.uptime) { // 3. System object uptime From 98f4a38683b67c83db122ce7154bcf767ff5e356 Mon Sep 17 00:00:00 2001 From: jx163 Date: Thu, 2 Oct 2025 11:54:02 +1300 Subject: [PATCH 3/6] fix lint issues --- src/components/Widgets/GlCompactMetrics.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Widgets/GlCompactMetrics.vue b/src/components/Widgets/GlCompactMetrics.vue index 0c8517eb..8030d44e 100644 --- a/src/components/Widgets/GlCompactMetrics.vue +++ b/src/components/Widgets/GlCompactMetrics.vue @@ -325,7 +325,7 @@ export default { }, formatBytes(bytes) { - if (!bytes || Number.isNaN(bytes)) return '0 B'; + if (bytes == null || isNaN(bytes)) return '0 B'; const k = 1024; const sizes = ['B', 'KB', 'MB', 'GB', 'TB']; const i = Math.floor(Math.log(bytes) / Math.log(k)); From a41111fbab693382eb48d7d25080b61747e363ff Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Thu, 12 Mar 2026 17:25:47 +0000 Subject: [PATCH 4/6] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20GlCompactMetrics=20to?= =?UTF-8?q?=20use=20WidgetBase=20shared=20methods?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Widgets/GlCompactMetrics.vue | 524 ++++++-------------- 1 file changed, 165 insertions(+), 359 deletions(-) diff --git a/src/components/Widgets/GlCompactMetrics.vue b/src/components/Widgets/GlCompactMetrics.vue index 8030d44e..14d1159f 100644 --- a/src/components/Widgets/GlCompactMetrics.vue +++ b/src/components/Widgets/GlCompactMetrics.vue @@ -1,9 +1,5 @@ - From 678786ff25a52dec60b828b6aaad342165f50284 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Thu, 12 Mar 2026 17:27:03 +0000 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=93=9D=20Adds=20missing=20docs=20for?= =?UTF-8?q?=20GlCompactMetrics=20widget?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/widgets.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/widgets.md b/docs/widgets.md index 24513585..754cedb2 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -90,6 +90,7 @@ Dashy has support for displaying dynamic content in the form of widgets. There a - [Resource Usage Alerts](#resource-usage-alerts) - [Public & Private IP](#ip-address) - [CPU Temperature](#cpu-temp) + - [Compact Metrics](#compact-metrics) - **[Dynamic Widgets](#dynamic-widgets)** - [Iframe Widget](#iframe-widget) - [HTML Embed Widget](#html-embedded-widget) @@ -3154,6 +3155,35 @@ You'll need to enable the sensors plugin to use this widget, using: `--enable-pl --- +### Compact Metrics + +A multi-system overview widget that displays CPU, memory and disk usage for multiple Glances instances in a compact table. Click on a row to see detailed metrics for that system. + +#### Options + +**Field** | **Type** | **Required** | **Description** +--- | --- | --- | --- +**`systems`** | `array` | Required | An array of systems to monitor, each with `header` (display name) and `url` (Glances base URL) +**`apiVersion`** | `number` | _Optional_ | Glances API version. Defaults to `4` +**`username`** | `string` | _Optional_ | If Glances is password-protected, specify the username +**`password`** | `string` | _Optional_ | If Glances is password-protected, specify the password + +#### Example + +```yaml +- type: gl-compact-metrics + options: + systems: + - header: Server 1 + url: http://192.168.1.10:61208 + - header: Server 2 + url: http://192.168.1.11:61208 + - header: NAS + url: http://192.168.1.20:61208 +``` + +--- + ## Dynamic Widgets ### Iframe Widget From 9152bd640e82fad3c53754282f640da58dfcf6a5 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Thu, 12 Mar 2026 17:35:58 +0000 Subject: [PATCH 6/6] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Split=20GlCompactMetri?= =?UTF-8?q?cs=20to=20seperate=20requests,=20to=20handle=20individual=20fai?= =?UTF-8?q?lures=20ok?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Widgets/GlCompactMetrics.vue | 65 ++++++++++++++------- 1 file changed, 45 insertions(+), 20 deletions(-) diff --git a/src/components/Widgets/GlCompactMetrics.vue b/src/components/Widgets/GlCompactMetrics.vue index 14d1159f..f9e2c2f9 100644 --- a/src/components/Widgets/GlCompactMetrics.vue +++ b/src/components/Widgets/GlCompactMetrics.vue @@ -108,6 +108,7 @@