diff --git a/.github/AUTHORS.txt b/.github/AUTHORS.txt index 22377b60..5148356a 100644 --- a/.github/AUTHORS.txt +++ b/.github/AUTHORS.txt @@ -64,6 +64,7 @@ cauterize - 2 commits k073l <21180271+k073l@users.noreply.github.com> - 2 commits liss-bot <87835202+liss-bot@users.noreply.github.com> - 2 commits patrickheeney - 2 commits +rtm516 - 2 commits ᗪєνιη <υн> - 2 commits Alucarddelta - 3 commits Tuzi555 - 3 commits @@ -71,6 +72,7 @@ Walkx <71191962+walkxcode@users.noreply.github.com> - 3 commits aterox - 3 commits bogyeong - 3 commits stanly0726 <37040069+stanly0726@users.noreply.github.com> - 3 commits +Alberto - 4 commits David - 4 commits Lissy93 - 4 commits Niklas - 4 commits @@ -98,9 +100,9 @@ Alicia - 28 commits repo-visualizer - 71 commits snyk-bot - 74 commits Lissy93 - 78 commits -Alicia - 130 commits +Alicia - 132 commits liss-bot - 142 commits Lissy93 - 208 commits -Alicia - 250 commits +Alicia - 253 commits Alicia - 440 commits Alicia - 1488 commits \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index eb577661..57186aea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,4 +50,4 @@ CMD [ "yarn", "start" ] EXPOSE ${PORT} # Run simple healthchecks every 5 mins, to check that everythings still great -HEALTHCHECK --interval=5m --timeout=2s --start-period=30s CMD yarn health-check \ No newline at end of file +HEALTHCHECK --interval=5m --timeout=5s --start-period=30s CMD yarn health-check diff --git a/README.md b/README.md index 666a9a91..967080e2 100644 --- a/README.md +++ b/README.md @@ -552,28 +552,21 @@ Huge thanks to the sponsors helping to support Dashy's development! Eddy Lazzarin - - - Geolim4 -
- Georges.L -
- AnandChowdhary
Anand Chowdhary
- - + davidpaulyoung
David Young
- + + k-rol @@ -608,15 +601,15 @@ Huge thanks to the sponsors helping to support Dashy's development!
Brian McGonagill
- - + vlad-timofeev
Vlad Timofeev
- + + PAPAMICA diff --git a/docs/assets/CONTRIBUTORS.svg b/docs/assets/CONTRIBUTORS.svg index 16406b91..ca342246 100644 --- a/docs/assets/CONTRIBUTORS.svg +++ b/docs/assets/CONTRIBUTORS.svg @@ -39,190 +39,193 @@ + + + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + \ No newline at end of file diff --git a/docs/assets/repo-visualization.svg b/docs/assets/repo-visualization.svg index 0b7bd173..a96a8834 100644 --- a/docs/assets/repo-visualization.svg +++ b/docs/assets/repo-visualization.svg @@ -1 +1 @@ -viewsviewsutilsutilsstylesstylesmixinsmixinsdirectivesdirectivescomponentscomponentsassetsassetsWorkspaceWorkspaceWidgetsWidgetsSettingsSettingsPageStrcturePageStrctureMinimalViewMinimalViewLinkItemsLinkItemsInteractiveEditorInteractiveEditorFormElementsFormElementsConfigurationConfigurationChartsChartslocaleslocalesinterface-iconsinterface-iconsemojis.jsonemojis.jsonemojis.jsonConfigSc...ConfigSc...ConfigSc...color-th...color-th...color-th...sk.jsonsk.jsonsk.jsones.jsones.jsones.jsonen.jsonen.jsonen.jsonde.jsonde.jsonde.jsonda.jsonda.jsonda.jsonbg.jsonbg.jsonbg.jsonko.jsonko.jsonko.jsonhi.jsonhi.jsonhi.jsoncs.jsoncs.jsoncs.jsonpt.jsonpt.jsonpt.jsonfr.jsonfr.jsonfr.jsonit.jsonit.jsonit.json.js.json.scss.svg.vueeach dot sized by file size \ No newline at end of file +viewsviewsutilsutilsstylesstylesmixinsmixinsdirectivesdirectivescomponentscomponentsassetsassetsWorkspaceWorkspaceWidgetsWidgetsSettingsSettingsPageStrcturePageStrctureMinimalViewMinimalViewLinkItemsLinkItemsInteractiveEditorInteractiveEditorFormElementsFormElementsConfigurationConfigurationChartsChartslocaleslocalesinterface-iconsinterface-iconsemojis.jsonemojis.jsonemojis.jsonConfigSc...ConfigSc...ConfigSc...color-th...color-th...color-th...sk.jsonsk.jsonsk.jsones.jsones.jsones.jsonen.jsonen.jsonen.jsonde.jsonde.jsonde.jsonda.jsonda.jsonda.jsonbg.jsonbg.jsonbg.jsonko.jsonko.jsonko.jsonhi.jsonhi.jsonhi.jsoncs.jsoncs.jsoncs.jsonpt.jsonpt.jsonpt.jsonfr.jsonfr.jsonfr.jsonit.jsonit.jsonit.json.js.json.scss.svg.vueeach dot sized by file size \ No newline at end of file diff --git a/docs/credits.md b/docs/credits.md index 4fd46d1e..29737ccd 100644 --- a/docs/credits.md +++ b/docs/credits.md @@ -32,28 +32,21 @@ Eddy Lazzarin - - - Geolim4 -
- Georges.L -
- AnandChowdhary
Anand Chowdhary
- - + davidpaulyoung
David Young
- + + k-rol @@ -88,15 +81,15 @@
Brian McGonagill
- - + vlad-timofeev
Vlad Timofeev
- + + PAPAMICA @@ -232,6 +225,13 @@ UrekD + + + albcp +
+ Alberto +
+ Tracreed @@ -252,15 +252,15 @@
Totto16
- + + alucarddelta
Brent
- - + Bogyie @@ -282,13 +282,21 @@ Rúben Silva + + + rtm516 +
+ rtm516 +
+ onedr0p
ᗪєνιη ᗷυнʟ
- + + alexdelprete @@ -302,8 +310,7 @@
Stephen Rigney
- - + moemoeq @@ -324,20 +331,6 @@
Matthias Bilger
- - - - thomasdissert -
- Thomas Dissert -
- - - - k073l -
- K073l -
diff --git a/docs/widgets.md b/docs/widgets.md index fe325514..ade021d7 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -35,6 +35,8 @@ Dashy has support for displaying dynamic content in the form of widgets. There a - [GitHub Trending](#github-trending) - [GitHub Profile Stats](#github-profile-stats) - [Healthchecks Status](#healthchecks status) + - [Mvg Departure](#mvg-departure) + - [Mvg Connection](#mvg-connection) - **[Self-Hosted Services Widgets](#self-hosted-services-widgets)** - [System Info](#system-info) - [Cron Monitoring](#cron-monitoring-health-checks) @@ -58,6 +60,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 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) @@ -1173,6 +1176,92 @@ Display status of one or more HealthChecks project(s). Works with healthcheck.io --- +### MVG Departure + +Display departure time of a MVG (Münchner Verkehrs Gesellschaft) station. + +From https://www.mvg.de/impressum.html: + +> [...] Die Verarbeitung unserer Inhalte oder Daten durch Dritte erfordert unsere ausdrückliche Zustimmung. Für private, nicht-kommerzielle Zwecke, wird eine gemäßigte Nutzung ohne unsere ausdrückliche Zustimmung geduldet. Jegliche Form von Data-Mining stellt keine gemäßigte Nutzung dar.[...] + +In other words: Private, noncomercial, moderate use of the API is tolerated. They don’t consider data mining as moderate use. (This is not a legal advice) + +#### Options + +**Field** | **Type** | **Required** | **Description** +--- | --- | --- | --- +**`location`** | `string` | Required | The name of the location (exact) or the location id, startin with `de:09162:` +**`limit`** | `integer` | _Optional_ | Limit number of entries, defaults to 10. +**`title`** | `string` | _Optional_ | A custom title to be displayed. +**`header`** | `bool` | _Optional_ | Shall the title be shown? +**`filters`** | `object` | _Optional_ | Filter results +**`filters.line`** | `string/array` | _Optional_ | Filter results for given line(s). +**`filters.product`** | `string/array` | _Optional_ | Filter results for specific product (TRAM, UBAHN, SBAHN, BUS). +**`filters.destination`** | `string/object` | _Optional_ | Filter results for specific destination(s) + +```yaml +- type: mvg + options: + location: Marienplatz + limit: 5 +``` + +#### Info + +- **CORS**: 🟢 Enabled +- **Auth**: 🟢 Not Required +- **Price**: 🟢 Free / Private use only +- **Host**: [MVG](https://mvg.de) +- **Privacy**: _See [MVG Datenschutz](https://www.mvg.de/datenschutz-mvg.html)_ + +--- + +### MVG Connection + +Display the next connection for two addresses/coordinates, stations or POI within Munich using MVG MVG (Münchner Verkehrs Gesellschaft). + +From https://www.mvg.de/impressum.html: + +> [...] Die Verarbeitung unserer Inhalte oder Daten durch Dritte erfordert unsere ausdrückliche Zustimmung. Für private, nicht-kommerzielle Zwecke, wird eine gemäßigte Nutzung ohne unsere ausdrückliche Zustimmung geduldet. Jegliche Form von Data-Mining stellt keine gemäßigte Nutzung dar.[...] + +In other words: Private, noncomercial, moderate use of the API is tolerated. They don’t consider data mining as moderate use. (This is not a legal advice) + +#### Options + +**Field** | **Type** | **Required** | **Description** +--- | --- | --- | --- +**`origin`** | `string` | Required | Origin of the connection. +**`destination`** | `string` | Required | Destination of the connection. +**`title`** | `string` | _Optional_ | A custom title to be displayed. +**`header`** | `bool` | _Optional_ | Shall the title be shown? +**`filters`** | `object` | _Optional_ | Filter results +**`filters.line`** | `string/array` | _Optional_ | Filter results for given line(s). +**`filters.product`** | `string/array` | _Optional_ | Filter results for specific product (TRAM, UBAHN, SBAHN, BUS). +**`filters.destination`** | `string/object` | _Optional_ | Filter results for specific destination(s) + +```yaml +- type: mvg-connection + options: + from: Marienplatz + from: Dachauer Straße 123 + header: true + filters: + product: [UBAHN] + line: [U1,U2,U4,U5] + +``` + +#### Info + +- **CORS**: 🟢 Enabled +- **Auth**: 🟢 Not Required +- **Price**: 🟢 Free / Private use only +- **Host**: [MVG](https://mvg.de) +- **Privacy**: _See [MVG Datenschutz](https://www.mvg.de/datenschutz-mvg.html)_ + +--- + + ## Self-Hosted Services Widgets ### System Info @@ -1947,6 +2036,42 @@ Display info from the Gluetun VPN container public IP API. This can show the IP --- +### Drone CI Builds + +Display the last builds from a [Drone CI](https://www.drone.ci) instance. A self-hosted CI system that uses docker. + +

+ +#### Options + +**Field** | **Type** | **Required** | **Description** +--- | --- | --- | --- +**`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. +**`repo`** | `string` | _Optional_ | Show only builds of the specified repo + +#### Example + +```yaml +- type: drone-io + updateInterval: 30 + 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/services/healthcheck.js b/services/healthcheck.js index 503267f3..d0b4dd82 100644 --- a/services/healthcheck.js +++ b/services/healthcheck.js @@ -4,14 +4,21 @@ * Note that exiting with code 1 indicates failure, and 0 is success */ -const http = require('http'); +const isSsl = !!process.env.SSL_PRIV_KEY_PATH && !!process.env.SSL_PUB_KEY_PATH; + +const http = require(isSsl ? 'https' : 'http'); /* Location of the server to test */ -const port = process.env.PORT || !!process.env.IS_DOCKER ? 80 : 4000; +const isDocker = !!process.env.IS_DOCKER; +const port = isSsl ? (process.env.SSL_PORT || (isDocker ? 443 : 4001)) : (process.env.PORT || isDocker ? 80 : 4000); const host = process.env.HOST || '0.0.0.0'; const timeout = 2000; -const requestOptions = { host, port, timeout }; +const agent = new http.Agent({ + rejectUnauthorized: false, // Allow self-signed certificates +}); + +const requestOptions = { host, port, timeout, agent }; const startTime = new Date(); // Initialize timestamp to calculate time taken diff --git a/src/components/Widgets/DroneCi.vue b/src/components/Widgets/DroneCi.vue new file mode 100644 index 00000000..8ffb4e84 --- /dev/null +++ b/src/components/Widgets/DroneCi.vue @@ -0,0 +1,238 @@ + + + + + + + diff --git a/src/components/Widgets/Mvg.vue b/src/components/Widgets/Mvg.vue new file mode 100644 index 00000000..166eed00 --- /dev/null +++ b/src/components/Widgets/Mvg.vue @@ -0,0 +1,353 @@ + + + + + + + + diff --git a/src/components/Widgets/MvgConnection.vue b/src/components/Widgets/MvgConnection.vue new file mode 100644 index 00000000..b4eae501 --- /dev/null +++ b/src/components/Widgets/MvgConnection.vue @@ -0,0 +1,372 @@ + + + + + + + + diff --git a/src/components/Widgets/WidgetBase.vue b/src/components/Widgets/WidgetBase.vue index ecd7b536..0f310a9d 100644 --- a/src/components/Widgets/WidgetBase.vue +++ b/src/components/Widgets/WidgetBase.vue @@ -56,6 +56,7 @@ const COMPAT = { 'domain-monitor': 'DomainMonitor', 'code-stats': 'CodeStats', 'covid-stats': 'CovidStats', + 'drone-ci': 'DroneCi', embed: 'EmbedWidget', 'eth-gas-prices': 'EthGasPrices', 'exchange-rates': 'ExchangeRates', @@ -82,6 +83,8 @@ const COMPAT = { image: 'ImageWidget', joke: 'Jokes', 'mullvad-status': 'MullvadStatus', + mvg: 'Mvg', + 'mvg-connection': 'MvgConnection', 'nd-cpu-history': 'NdCpuHistory', 'nd-load-history': 'NdLoadHistory', 'nd-ram-history': 'NdRamHistory', diff --git a/src/utils/defaults.js b/src/utils/defaults.js index 8d609684..8f51df94 100644 --- a/src/utils/defaults.js +++ b/src/utils/defaults.js @@ -236,6 +236,7 @@ module.exports = { jokes: 'https://v2.jokeapi.dev/joke/', news: 'https://api.currentsapi.services/v1/latest-news', mullvad: 'https://am.i.mullvad.net/json', + mvg: 'https://www.mvg.de/api/fib/v2/', publicIp: 'https://ipapi.co/json', publicIp2: 'https://api.ipgeolocation.io/ipgeo', publicIp3: 'http://ip-api.com/json',