diff --git a/docs/widgets.md b/docs/widgets.md index cf16db52..678558ea 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -2331,6 +2331,22 @@ Live-updating current CPU usage, as a combined average across all cores --- +### Current CPU Usage Speedometer + +Speedometer styled version of the Current CPU Usage widget + +
+ +#### Example + +```yaml +- type: gl-cpu-speedometer + options: + hostname: http://192.168.130.2:61208 +``` + +--- + ### CPU Usage Per Core Live-updating CPU usage breakdown per core @@ -2386,6 +2402,22 @@ Real-time memory usage gauge, with more info visible on click --- +### Current Memory Usage Speedometer + +Speedometer styled version of the Current Memory Usage widget + + + +#### Example + +```yaml +- type: gl-mem-speedometer + options: + hostname: http://192.168.130.2:61208 +``` + +--- + ### Memory Usage History Recent memory usage chart diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json index 60fdad8c..342c1d83 100644 --- a/src/assets/locales/en.json +++ b/src/assets/locales/en.json @@ -316,6 +316,8 @@ "general": { "loading": "Loading...", "show-more": "Expand Details", + "cpu-details": "CPU Details", + "mem-details": "Memory Details", "show-less": "Show Less", "open-link": "Continue Reading" }, diff --git a/src/components/Widgets/GlCpuSpeedometer.vue b/src/components/Widgets/GlCpuSpeedometer.vue new file mode 100644 index 00000000..adb74616 --- /dev/null +++ b/src/components/Widgets/GlCpuSpeedometer.vue @@ -0,0 +1,150 @@ + +{{ gaugeValue }}%
++ {{ showMoreInfo ? $t('widgets.general.show-less') : $t('widgets.general.cpu-details') }} +
+{{ info.label }}
+{{ info.value }}
+{{ gaugeValue }}%
++ {{ showMoreInfo ? $t('widgets.general.show-less') : $t('widgets.general.mem-details') }} +
+{{ info.label }}
+{{ info.value }}
+