From 1d69fc86177d4c2d4eda82082a211a712036f130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20GRANDIN?= Date: Sat, 23 Apr 2022 02:43:38 +0200 Subject: [PATCH 1/5] :sparkles: Add extra option to hide legend in percentageChart --- src/components/Charts/PercentageChart.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Charts/PercentageChart.vue b/src/components/Charts/PercentageChart.vue index d4b4b539..0a2ba53c 100644 --- a/src/components/Charts/PercentageChart.vue +++ b/src/components/Charts/PercentageChart.vue @@ -13,7 +13,7 @@ > -
+
@@ -31,6 +31,10 @@ export default { type: Boolean, default: true, }, + showLegend: { + type: Boolean, + default: true, + }, height: { number: Boolean, default: 1, From 6e7b0e4dd52b4f212221ee8dc0e9dc9e06f11dc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20GRANDIN?= Date: Sat, 23 Apr 2022 02:44:49 +0200 Subject: [PATCH 2/5] :sparkles: Add Synology Download Widget --- src/assets/locales/en.json | 9 + src/components/Widgets/SynologyDownload.vue | 174 ++++++++++++++++++++ src/components/Widgets/WidgetBase.vue | 8 + 3 files changed, 191 insertions(+) create mode 100644 src/components/Widgets/SynologyDownload.vue diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json index 741fcbc9..d70594ca 100644 --- a/src/assets/locales/en.json +++ b/src/assets/locales/en.json @@ -290,6 +290,15 @@ "tfl-status": { "good-service-all": "Good Service on all Lines", "good-service-rest": "Good Service on all other Lines" + }, + "synology-download": { + "download": "Download", + "upload": "Upload", + "downloaded": "Downloaded", + "uploaded": "Uploaded", + "remaining": "Remaining", + "up": "Up", + "down": "Down" } } } \ No newline at end of file diff --git a/src/components/Widgets/SynologyDownload.vue b/src/components/Widgets/SynologyDownload.vue new file mode 100644 index 00000000..15c2af3b --- /dev/null +++ b/src/components/Widgets/SynologyDownload.vue @@ -0,0 +1,174 @@ + + + + + diff --git a/src/components/Widgets/WidgetBase.vue b/src/components/Widgets/WidgetBase.vue index ac288d4f..089fc226 100644 --- a/src/components/Widgets/WidgetBase.vue +++ b/src/components/Widgets/WidgetBase.vue @@ -349,6 +349,13 @@ @error="handleError" :ref="widgetRef" /> + import('@/components/Widgets/SportsScores.vue'), StatPing: () => import('@/components/Widgets/StatPing.vue'), StockPriceChart: () => import('@/components/Widgets/StockPriceChart.vue'), + SynologyDownload: () => import('@/components/Widgets/SynologyDownload.vue'), SystemInfo: () => import('@/components/Widgets/SystemInfo.vue'), TflStatus: () => import('@/components/Widgets/TflStatus.vue'), WalletBalance: () => import('@/components/Widgets/WalletBalance.vue'), From 044b7ed94dfdf08c94644ee33f116d2727521611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20GRANDIN?= Date: Sat, 23 Apr 2022 02:45:46 +0200 Subject: [PATCH 3/5] :memo: Add Synology Download widget documentation --- docs/widgets.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/docs/widgets.md b/docs/widgets.md index bbfff1d8..85d74ef9 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -46,6 +46,7 @@ Dashy has support for displaying dynamic content in the form of widgets. There a - [Pi Hole Queries](#pi-hole-queries) - [Recent Traffic](#recent-traffic) - [Stat Ping Statuses](#stat-ping-statuses) + - [Synology Download Station](#stat-ping-statuses) - **[System Resource Monitoring](#system-resource-monitoring)** - [CPU Usage Current](#current-cpu-usage) - [CPU Usage Per Core](#cpu-usage-per-core) @@ -1325,6 +1326,41 @@ Displays the current and recent uptime of your running services, via a self-host --- +### Synology Download Station + +Displays the current downloads/torrents tasks of your Synology NAS + +

+ +##### Options + +**Field** | **Type** | **Required** | **Description** +--- | --- | --- | --- +**`hostname`** | `string` | Required | The URL to your Synology NAS, without a trailing slash +**`username`** | `string` | Required | The username of a user on your synology NAS. You will see only this user download station tasks if he is not part of the administrator group. Currently don't support OTP protected accounts. +**`password`** | `string` | Required | The password of the account specified above. + +##### Example + +```yaml +- type: synology-download + options: + hostname: http://192.168.1.1:8080 + username: dashy + password: totally-secure-password + + +``` + +##### Info +- **CORS**: 🟠 Proxied +- **Auth**: 🟢 Required +- **Price**: 🟢 Free +- **Host**: Self-Hosted (see [Synology](https://www.synology.com/en-us)) +- **Privacy**: _See [Synology Privacy Statement](https://www.synology.com/en-us/company/legal/privacy)_ + +--- + ## System Resource Monitoring The easiest method for displaying system info and resource usage in Dashy is with [Glances](https://nicolargo.github.io/glances/). From 5aab049a43f0a92b7c80d0dd51419ac2f27c81fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20GRANDIN?= Date: Sat, 23 Apr 2022 14:05:57 +0200 Subject: [PATCH 4/5] :rotating_light: Fix b =>strong as recommendedn by sonarcloud --- src/components/Widgets/SynologyDownload.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/Widgets/SynologyDownload.vue b/src/components/Widgets/SynologyDownload.vue index 15c2af3b..aa82089e 100644 --- a/src/components/Widgets/SynologyDownload.vue +++ b/src/components/Widgets/SynologyDownload.vue @@ -11,10 +11,12 @@ size: 100 - task.Progress, color: '#6092d1' }, ]" />

- {{ $t('widgets.synology-download.downloaded') }}: {{ task.Downloaded | formatSize }} + {{ $t('widgets.synology-download.downloaded') }}: + {{ task.Downloaded | formatSize }} / {{ task.TotalSize | formatSize }} ({{ task.Progress }}%) ({{ task.DownSpeed | formatSize }}/s)
- {{ $t('widgets.synology-download.uploaded') }}: {{ task.Uploaded | formatSize }} + {{ $t('widgets.synology-download.uploaded') }}: + {{ task.Uploaded | formatSize }} ({{ task.UpSpeed | formatSize }}/s) (ratio : {{ Math.floor( task.Uploaded / task.Downloaded * 100 ) / 100 }})

From 558690ad989d9ffa06341e64dd5844fb0043eb99 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sat, 23 Apr 2022 22:53:35 +0100 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=93=9D=20Fixes=20docs=20link=20to=20S?= =?UTF-8?q?ynology=20Download=20Station?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/widgets.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/widgets.md b/docs/widgets.md index 85d74ef9..562f1fd8 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -46,7 +46,7 @@ Dashy has support for displaying dynamic content in the form of widgets. There a - [Pi Hole Queries](#pi-hole-queries) - [Recent Traffic](#recent-traffic) - [Stat Ping Statuses](#stat-ping-statuses) - - [Synology Download Station](#stat-ping-statuses) + - [Synology Download Station](#synology-download-station) - **[System Resource Monitoring](#system-resource-monitoring)** - [CPU Usage Current](#current-cpu-usage) - [CPU Usage Per Core](#cpu-usage-per-core)