From 8d22d88471c869e38895a15e609dc07648d795c6 Mon Sep 17 00:00:00 2001 From: Jammo2k5 Date: Wed, 20 Jul 2022 22:08:30 +0100 Subject: [PATCH 1/6] added gluetun service status widget --- docs/widgets.md | 34 ++ src/components/Widgets/GluetunStatus.vue | 121 +++++ src/components/Widgets/WidgetBase.vue | 557 ++++++++++++----------- 3 files changed, 434 insertions(+), 278 deletions(-) create mode 100755 src/components/Widgets/GluetunStatus.vue mode change 100644 => 100755 src/components/Widgets/WidgetBase.vue diff --git a/docs/widgets.md b/docs/widgets.md index c2b7e3a5..8cfac96d 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -55,6 +55,7 @@ Dashy has support for displaying dynamic content in the form of widgets. There a - [Nextcloud Stats](#nextcloud-stats) - [Nextcloud PHP Opcache](#nextcloud-php-opcache-stats) - [Sabnzbd](#sabnzbd) + - [Gluetun VPN Info](#gluetun-vpn-info) - **[System Resource Monitoring](#system-resource-monitoring)** - [CPU Usage Current](#current-cpu-usage) - [CPU Usage Per Core](#cpu-usage-per-core) @@ -1827,6 +1828,39 @@ Shows queue information regarding your self hosted Sabnzbd server. --- +### Gluetun VPN Info + +Display info from the Gluetun VPN container public IP API. This can show the IP and location data for the exit VPN node. + +

+ +##### Options + +**Field** | **Type** | **Required** | **Description** +--- | --- | --- | --- +**`visibleFields`** | `string` | Required | A comma separated list of the fields you want visible in the widget. You can have any number of the following : `public_ip`, `region`, `country`, `city`, `location`, `organisation`, `postal_code`, `timezone` +**`host`** | `string` | Required | The url to the gluetun HTTP control server. E.g. `http://gluetun:8000` + + +##### Example + + +```yaml +- type: gluetun-status + useProxy: true + options: + hostname: http://server-or-conatiner-hostname:8000 + visibleFields: public_ip,region,country,city,location,organisation,postal_code,timezone +``` +##### Info +- **CORS**: 🟠 Proxied +- **Auth**: 🟢 Required +- **Price**: 🟢 Free +- **Host**: Self-Hosted (see [Gluetun](https://github.com/qdm12/gluetun)) +- **Privacy**: _See [Gluetun Wiki](https://github.com/qdm12/gluetun/wiki)_ + +--- + ## System Resource Monitoring The easiest method for displaying system info and resource usage in Dashy is with [Glances](https://nicolargo.github.io/glances/). diff --git a/src/components/Widgets/GluetunStatus.vue b/src/components/Widgets/GluetunStatus.vue new file mode 100755 index 00000000..3247c61e --- /dev/null +++ b/src/components/Widgets/GluetunStatus.vue @@ -0,0 +1,121 @@ + + + + + diff --git a/src/components/Widgets/WidgetBase.vue b/src/components/Widgets/WidgetBase.vue old mode 100644 new mode 100755 index 567a4120..d9cacab5 --- a/src/components/Widgets/WidgetBase.vue +++ b/src/components/Widgets/WidgetBase.vue @@ -1,278 +1,279 @@ - - - - - + + + + + From 74fc7419da9608866b00a3f4435da6dfb852eb59 Mon Sep 17 00:00:00 2001 From: Jammo2k5 Date: Wed, 20 Jul 2022 22:20:50 +0100 Subject: [PATCH 2/6] fix file permissions --- src/components/Widgets/GluetunStatus.vue | 0 src/components/Widgets/WidgetBase.vue | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 src/components/Widgets/GluetunStatus.vue mode change 100755 => 100644 src/components/Widgets/WidgetBase.vue diff --git a/src/components/Widgets/GluetunStatus.vue b/src/components/Widgets/GluetunStatus.vue old mode 100755 new mode 100644 diff --git a/src/components/Widgets/WidgetBase.vue b/src/components/Widgets/WidgetBase.vue old mode 100755 new mode 100644 From bbfe9a9defbddc69e513a57a275427a1fc2ba2af Mon Sep 17 00:00:00 2001 From: Jammo2k5 Date: Wed, 20 Jul 2022 22:38:29 +0100 Subject: [PATCH 3/6] Fix line feed issues in WidgetBase.vue and removed unused imports in GluetunStatus.vue --- src/components/Widgets/GluetunStatus.vue | 2 - src/components/Widgets/WidgetBase.vue | 558 +++++++++++------------ 2 files changed, 279 insertions(+), 281 deletions(-) diff --git a/src/components/Widgets/GluetunStatus.vue b/src/components/Widgets/GluetunStatus.vue index 3247c61e..8693c923 100644 --- a/src/components/Widgets/GluetunStatus.vue +++ b/src/components/Widgets/GluetunStatus.vue @@ -37,8 +37,6 @@ - - + + + + + From 53e3082dc2bcdffd43129a2f7a9aa9e87249e42d Mon Sep 17 00:00:00 2001 From: Jammo2k5 Date: Wed, 20 Jul 2022 22:46:31 +0100 Subject: [PATCH 4/6] Changed image host of Widget Docs --- docs/widgets.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/widgets.md b/docs/widgets.md index 8cfac96d..585c9873 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -1832,7 +1832,7 @@ Shows queue information regarding your self hosted Sabnzbd server. Display info from the Gluetun VPN container public IP API. This can show the IP and location data for the exit VPN node. -

+

##### Options From 19e312b777b680e40688474fe7966044d1b9f33f Mon Sep 17 00:00:00 2001 From: Jammo2k5 Date: Wed, 20 Jul 2022 22:49:10 +0100 Subject: [PATCH 5/6] Fixed image link again... --- docs/widgets.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/widgets.md b/docs/widgets.md index 585c9873..a45a2591 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -1832,7 +1832,7 @@ Shows queue information regarding your self hosted Sabnzbd server. Display info from the Gluetun VPN container public IP API. This can show the IP and location data for the exit VPN node. -

+

##### Options From 4b5dc05c28c041fbbaac5cd3581ae82f8fd7cecf Mon Sep 17 00:00:00 2001 From: Jammo2k5 Date: Thu, 21 Jul 2022 10:02:59 +0100 Subject: [PATCH 6/6] Refactor toggles to reduce variable count --- src/components/Widgets/GluetunStatus.vue | 61 ++++++++---------------- 1 file changed, 21 insertions(+), 40 deletions(-) diff --git a/src/components/Widgets/GluetunStatus.vue b/src/components/Widgets/GluetunStatus.vue index 8693c923..381265e6 100644 --- a/src/components/Widgets/GluetunStatus.vue +++ b/src/components/Widgets/GluetunStatus.vue @@ -1,34 +1,34 @@