From 9a70d1cd8d651576b411fc4c50a5c2a4480f3950 Mon Sep 17 00:00:00 2001 From: Matthias Bilger Date: Sat, 7 Jan 2023 01:25:47 +0100 Subject: [PATCH 1/9] Added Widget for drone.io --- src/components/Widgets/DroneIo.vue | 138 +++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 src/components/Widgets/DroneIo.vue diff --git a/src/components/Widgets/DroneIo.vue b/src/components/Widgets/DroneIo.vue new file mode 100644 index 00000000..63adcab1 --- /dev/null +++ b/src/components/Widgets/DroneIo.vue @@ -0,0 +1,138 @@ + + + + + + + From 71510eeb9330b0e4c750b984038e6069b61740ed Mon Sep 17 00:00:00 2001 From: Matthias Bilger Date: Sat, 7 Jan 2023 01:35:59 +0100 Subject: [PATCH 2/9] Added info for Drone Widget --- docs/widgets.md | 35 ++++++++++++++++++++++++++++++ src/components/Widgets/DroneIo.vue | 3 +-- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/docs/widgets.md b/docs/widgets.md index 783fd26c..485b9635 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -57,6 +57,7 @@ Dashy has support for displaying dynamic content in the form of widgets. There a - [Nextcloud PHP OPcache](#nextcloud-php-opcache-stats) - [Sabnzbd](#sabnzbd) - [Gluetun VPN Info](#gluetun-vpn-info) + - [Drone.io](#drone-io-builds) - **[System Resource Monitoring](#system-resource-monitoring)** - [CPU Usage Current](#current-cpu-usage) - [CPU Usage Per Core](#cpu-usage-per-core) @@ -1910,6 +1911,40 @@ Display info from the Gluetun VPN container public IP API. This can show the IP --- +### Drone.io Builds + +Display the last builds from a (drone.io)(https://www.drone.io] instance. + +

+ +#### Options + +**Field** | **Type** | **Required** | **Description** +--- | --- | --- | --- +**`host`** | `string` | Required | The histname of the drone.io instance +**`apiKey`** | `string` | Required | The API key (https:///account) +**`limit`** | `integer` | Optional | Limit the amounts of listed builds. + +#### Example + +```yaml +- type: DroneIo + options: + host: https://drone.somedomain.com + apiKey: my-very-secret-api-key + limit: 10 +``` + +#### Info + +- **CORS**: 🟢 Enabled +- **Auth**: 🟢 Required +- **Price**: 🟢 Free +- **Host**: Self-Hosted (see [Drone](https://www.drone.io)) +- **Privacy**: _See [Drone](https://www.drone.io)_ + +--- + ## System Resource Monitoring ### Glances diff --git a/src/components/Widgets/DroneIo.vue b/src/components/Widgets/DroneIo.vue index 63adcab1..0924d75b 100644 --- a/src/components/Widgets/DroneIo.vue +++ b/src/components/Widgets/DroneIo.vue @@ -18,8 +18,7 @@ @@ -125,6 +144,13 @@ export default { color: inherit; text-decoration: none; } + .droneio-extra-info { + margin: 0.25em; + padding: 0.25em; + background: var(--item-background); + border: 1px solid var(--primary); + border-radius: 5px; + } } p.build-desc::before { content: "#"; From f43966fdb0199a7969fe6ac8c7e752ee6b8a9ad1 Mon Sep 17 00:00:00 2001 From: Matthias Bilger Date: Sun, 8 Jan 2023 06:13:29 +0100 Subject: [PATCH 6/9] Rename DroneIo to DroneCi Drone CI is the current term used for the Build System (or just Drone, which is a bit to unspecific for identification) --- docs/widgets.md | 11 ++++++----- .../Widgets/{DroneIo.vue => DroneCi.vue} | 16 ++++++++-------- src/components/Widgets/WidgetBase.vue | 2 +- 3 files changed, 15 insertions(+), 14 deletions(-) rename src/components/Widgets/{DroneIo.vue => DroneCi.vue} (91%) diff --git a/docs/widgets.md b/docs/widgets.md index 89eab92a..a1cd1543 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -57,7 +57,7 @@ Dashy has support for displaying dynamic content in the form of widgets. There a - [Nextcloud PHP OPcache](#nextcloud-php-opcache-stats) - [Sabnzbd](#sabnzbd) - [Gluetun VPN Info](#gluetun-vpn-info) - - [Drone.io](#droneio-builds) + - [Drone CI Build](#drone-ci-builds) - **[System Resource Monitoring](#system-resource-monitoring)** - [CPU Usage Current](#current-cpu-usage) - [CPU Usage Per Core](#cpu-usage-per-core) @@ -1911,9 +1911,9 @@ Display info from the Gluetun VPN container public IP API. This can show the IP --- -### Drone.io Builds +### Drone CI Builds -Display the last builds from a [drone.io](https://www.drone.io) instance. +Display the last builds from a [Drone CI](https://www.drone.ci) instance. A self-hosted CI system that uses docker.

@@ -1921,14 +1921,15 @@ Display the last builds from a [drone.io](https://www.drone.io) instance. **Field** | **Type** | **Required** | **Description** --- | --- | --- | --- -**`host`** | `string` | Required | The histname of the drone.io instance -**`apiKey`** | `string` | Required | The API key (https:///account) +**`host`** | `string` | Required | The histname of the Drone CI instance. +**`apiKey`** | `string` | Required | The API key (https:///account). **`limit`** | `integer` | Optional | Limit the amounts of listed builds. #### Example ```yaml - type: drone-io + updateInterval: 30 options: host: https://drone.somedomain.com apiKey: my-very-secret-api-key diff --git a/src/components/Widgets/DroneIo.vue b/src/components/Widgets/DroneCi.vue similarity index 91% rename from src/components/Widgets/DroneIo.vue rename to src/components/Widgets/DroneCi.vue index 9687a399..c8b0ff04 100644 --- a/src/components/Widgets/DroneIo.vue +++ b/src/components/Widgets/DroneCi.vue @@ -1,5 +1,5 @@