From 730280a4485fbd59a5a63c7d5162988013d38f5d Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Mon, 24 Jan 2022 13:29:08 +0000 Subject: [PATCH] :sparkles: Adds Glances IP address widget (#437) --- docs/widgets.md | 17 ++++++ src/components/Widgets/GlIpAddress.vue | 74 ++++++++++++++++++++++++++ src/components/Widgets/WidgetBase.vue | 8 +++ 3 files changed, 99 insertions(+) create mode 100644 src/components/Widgets/GlIpAddress.vue diff --git a/docs/widgets.md b/docs/widgets.md index b02426da..131f7075 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -56,6 +56,7 @@ Dashy has support for displaying dynamic content in the form of widgets. There a - [Network Interfaces](#network-interfaces) - [Network Traffic](#network-traffic) - [Resource Usage Alerts](#resource-usage-alerts) + - [Public & Private IP](#ip-address) - **[Dynamic Widgets](#dynamic-widgets)** - [Iframe Widget](#iframe-widget) - [HTML Embed Widget](#html-embedded-widget) @@ -1471,6 +1472,22 @@ Lists recent high resource usage alerts (e.g. CPU, mem, IO, load, temp) --- +### IP Address + +Shows public and private IP address. Note that the ip plugin is not available on all instances of Glances. + +

+ +##### Example + +```yaml +- type: gl-ip-address + options: + hostname: http://192.168.130.2:61208 +``` + +--- + ## Dynamic Widgets ### Iframe Widget diff --git a/src/components/Widgets/GlIpAddress.vue b/src/components/Widgets/GlIpAddress.vue new file mode 100644 index 00000000..6cca406b --- /dev/null +++ b/src/components/Widgets/GlIpAddress.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/src/components/Widgets/WidgetBase.vue b/src/components/Widgets/WidgetBase.vue index e65b0b5b..07f98c81 100644 --- a/src/components/Widgets/WidgetBase.vue +++ b/src/components/Widgets/WidgetBase.vue @@ -160,6 +160,13 @@ @error="handleError" :ref="widgetRef" /> + import('@/components/Widgets/GlCpuHistory.vue'), GlDiskIo: () => import('@/components/Widgets/GlDiskIo.vue'), GlDiskSpace: () => import('@/components/Widgets/GlDiskSpace.vue'), + GlIpAddress: () => import('@/components/Widgets/GlIpAddress.vue'), GlLoadHistory: () => import('@/components/Widgets/GlLoadHistory.vue'), GlMemGauge: () => import('@/components/Widgets/GlMemGauge.vue'), GlMemHistory: () => import('@/components/Widgets/GlMemHistory.vue'),