From 4f4f9963c78461e744cfa52206c0f8b6e3a75bc3 Mon Sep 17 00:00:00 2001 From: Singebob Date: Thu, 17 Feb 2022 15:52:07 +0100 Subject: [PATCH 01/97] :whale: add user in dockerfile --- Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ebb6f41c..af6f2350 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,8 +30,15 @@ FROM node:16.13.2-alpine # Define some ENV Vars ENV PORT=80 \ DIRECTORY=/app \ - IS_DOCKER=true + IS_DOCKER=true \ + UID=1000 \ + GUID=1000 +# Create a group and user +RUN addgroup --gid ${GUID} application \ + && adduser --no-create-home --uid ${UID} application application + +USER application # Create and set the working directory WORKDIR ${DIRECTORY} From 2e63da041ab8a8ddb18a8ef219b4830214654a07 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Thu, 17 Feb 2022 18:00:02 +0000 Subject: [PATCH 02/97] :memo: Updates widget contributing docs --- docs/widgets.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/widgets.md b/docs/widgets.md index 1059d7ad..20334b4d 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -1791,8 +1791,6 @@ Alternatively, for displaying simple data, you could also just use the either th Suggestions for widget ideas are welcome. But there is no guarantee that I will build your widget idea. -You can suggest a widget [here](https://git.io/Jygo3), please star the repo before submitting a ticket. - Please only request widgets for services that: - Have a publicly accessible API - Are CORS and HTTPS enabled @@ -1800,6 +1798,8 @@ Please only request widgets for services that: - Allow for use in their Terms of Service - Would be useful for other users +You can suggest a widget [here](https://git.io/Jygo3), please star the repo before submitting a ticket. If you are a monthly GitHub sponsor, I will happily build out a custom widget for any service that meets the above criteria, usually 2 within weeks of initial request. + For services that are not officially supported, it is likely still possible to display data using either the [iframe](#iframe-widget), [embed](#html-embedded-widget) or [API response](#api-response) widgets. For more advanced features, like charts and action buttons, you could also build your own widget, using [this tutorial](/docs/development-guides.md#building-a-widget), it's fairly straight forward, and you can use an [existing widget](https://github.com/Lissy93/dashy/tree/master/src/components/Widgets) (or [this example](https://git.io/JygKI)) as a template. --- From bbbcd09b448a3f4b3bd88b31ae76bbf20c7b9e8a Mon Sep 17 00:00:00 2001 From: Jeremy Chauvin Date: Fri, 18 Feb 2022 08:01:36 +0100 Subject: [PATCH 03/97] :whale: refactor to add user --- Dockerfile | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index af6f2350..e785e887 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,22 +31,31 @@ FROM node:16.13.2-alpine ENV PORT=80 \ DIRECTORY=/app \ IS_DOCKER=true \ - UID=1000 \ - GUID=1000 + USER=docker \ + UID=12345 \ + GID=23456 -# Create a group and user -RUN addgroup --gid ${GUID} application \ - && adduser --no-create-home --uid ${UID} application application +# Install tini for initialization and tzdata for setting timezone +RUN apk add --no-cache tzdata tini \ + # Add group + && addgroup --gid ${GID} "${USER}" \ + # Add user + && adduser \ + --disabled-password \ + --ingroup "${USER}" \ + --gecos "" \ + --home "${DIRECTORY}" \ + --no-create-home \ + --uid "$UID" \ + "$USER" + +USER ${USER} -USER application # Create and set the working directory WORKDIR ${DIRECTORY} -# Install tini for initialization and tzdata for setting timezone -RUN apk add --no-cache tzdata tini - # Copy built application from build phase -COPY --from=BUILD_IMAGE /app ./ +COPY --from=BUILD_IMAGE --chown=${USER}:${USER} /app ./ # Finally, run start command to serve up the built application ENTRYPOINT [ "/sbin/tini", "--" ] From be093a1f684f9444a9733041e9c6b73bd7f2f4d2 Mon Sep 17 00:00:00 2001 From: liss-bot Date: Sun, 20 Feb 2022 01:26:24 +0000 Subject: [PATCH 04/97] :purple_heart: Updates contributors list --- docs/credits.md | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/docs/credits.md b/docs/credits.md index daa09dd5..c9a85620 100644 --- a/docs/credits.md +++ b/docs/credits.md @@ -8,7 +8,7 @@ peng1can
- peng1can + Peng1can
@@ -161,6 +161,13 @@ + + + Singebob +
+ Jeremy Chauvin +
+ BeginCI @@ -195,15 +202,15 @@
Iaroslav Dronskii
- + + b1thunt3r
Ishan Jain
- - + KierenConnell @@ -238,15 +245,15 @@
Xert
- + + icy-comet
Aniket Teredesai
- - + jnach From e1ffb4535b334435db4457988c2ac71f1ea548f6 Mon Sep 17 00:00:00 2001 From: liss-bot Date: Sun, 20 Feb 2022 01:26:25 +0000 Subject: [PATCH 05/97] :yellow_heart: Updates sponsors table --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4ea8f5ab..2f9b1ac5 100644 --- a/README.md +++ b/README.md @@ -490,7 +490,7 @@ Huge thanks to the sponsors helping to support Dashy's development! peng1can
- peng1can + Peng1can
From 2981168082ae4bffedae3fad57a1e9ef7e5bb59a Mon Sep 17 00:00:00 2001 From: Alicia Bot <87835202+liss-bot@users.noreply.github.com> Date: Sun, 20 Feb 2022 01:26:30 +0000 Subject: [PATCH 06/97] :blue_heart: Updates contributor SVG --- docs/assets/CONTRIBUTORS.svg | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/docs/assets/CONTRIBUTORS.svg b/docs/assets/CONTRIBUTORS.svg index f6bd0f86..b234111d 100644 --- a/docs/assets/CONTRIBUTORS.svg +++ b/docs/assets/CONTRIBUTORS.svg @@ -33,40 +33,43 @@ + + + - + - + - + - + - + - + - + - + - + - + - + - + \ No newline at end of file From bb40627401ace393f45509909f42fb7a7f05ffe9 Mon Sep 17 00:00:00 2001 From: Alicia Bot <87835202+liss-bot@users.noreply.github.com> Date: Sun, 20 Feb 2022 01:26:35 +0000 Subject: [PATCH 07/97] :blue_heart: Makes author list --- .github/AUTHORS.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/AUTHORS.txt b/.github/AUTHORS.txt index 72e8942b..163070a6 100644 --- a/.github/AUTHORS.txt +++ b/.github/AUTHORS.txt @@ -6,10 +6,12 @@ Devin - 1 commits FormatToday <616099456@qq.com> - 1 commits Iaroslav - 1 commits Ishan - 1 commits +Jeremy - 1 commits Kieren - 1 commits Rune - 1 commits Ryan - 1 commits Shreya - 1 commits +Singebob - 1 commits Xert - 1 commits deepsource-io[bot] - 1 commits icy-comet <50461557+icy-comet@users.noreply.github.com> - 1 commits @@ -32,13 +34,13 @@ Alicia - 16 commits github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> - 16 commits snyk-bot - 18 commits EVOTk <45015615+EVOTk@users.noreply.github.com> - 22 commits -repo-visualizer - 24 commits +repo-visualizer - 25 commits Alicia - 28 commits snyk-bot - 29 commits -Alicia - 49 commits +Alicia - 50 commits Alicia - 60 commits -liss-bot - 61 commits +liss-bot - 63 commits Lissy93 - 78 commits Lissy93 - 206 commits Alicia - 332 commits -Alicia - 1402 commits \ No newline at end of file +Alicia - 1426 commits \ No newline at end of file From 57bbee70c529d7965bd0c5fb4ce8280231744d4a Mon Sep 17 00:00:00 2001 From: repo-visualizer Date: Sun, 20 Feb 2022 01:27:25 +0000 Subject: [PATCH 08/97] :yellow_heart: Updates repo diagram --- docs/assets/repo-visualization.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/assets/repo-visualization.svg b/docs/assets/repo-visualization.svg index a664a218..a6bec5e2 100644 --- a/docs/assets/repo-visualization.svg +++ b/docs/assets/repo-visualization.svg @@ -1 +1 @@ -viewsviewsutilsutilsstylesstylesmixinsmixinscomponentscomponentsassetsassetsWorkspaceWorkspaceWidgetsWidgetsSettingsSettingsPageStrcturePageStrctureMinimalViewMinimalViewLinkItemsLinkItemsInteractiveEditorInteractiveEditorFormElementsFormElementsConfigurationConfigurationChartsChartslocaleslocalesinterface-iconsinterface-iconsemojis.jsonemojis.jsonemojis.jsonConfigSc...ConfigSc...ConfigSc...color-th...color-th...color-th...WidgetBa...WidgetBa...WidgetBa...Item.vueItem.vueItem.vuehi.jsonhi.jsonhi.json.js.json.scss.svg.vueeach dot sized by file size \ No newline at end of file +viewsviewsutilsutilsstylesstylesmixinsmixinscomponentscomponentsassetsassetsWorkspaceWorkspaceWidgetsWidgetsSettingsSettingsPageStrcturePageStrctureMinimalViewMinimalViewLinkItemsLinkItemsInteractiveEditorInteractiveEditorFormElementsFormElementsConfigurationConfigurationChartsChartslocaleslocalesinterface-iconsinterface-iconsemojis.jsonemojis.jsonemojis.jsonConfigSc...ConfigSc...ConfigSc...color-th...color-th...color-th...WidgetBa...WidgetBa...WidgetBa...Item.vueItem.vueItem.vuehi.jsonhi.jsonhi.json.js.json.scss.svg.vueeach dot sized by file size \ No newline at end of file From 4701eedc3b7e421cb8809d70d97979fba0b47736 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sun, 20 Feb 2022 11:56:26 +0000 Subject: [PATCH 09/97] Revert "Add group and user in dockerfile to run container as unprivileged" --- Dockerfile | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/Dockerfile b/Dockerfile index e785e887..ebb6f41c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,32 +30,16 @@ FROM node:16.13.2-alpine # Define some ENV Vars ENV PORT=80 \ DIRECTORY=/app \ - IS_DOCKER=true \ - USER=docker \ - UID=12345 \ - GID=23456 - -# Install tini for initialization and tzdata for setting timezone -RUN apk add --no-cache tzdata tini \ - # Add group - && addgroup --gid ${GID} "${USER}" \ - # Add user - && adduser \ - --disabled-password \ - --ingroup "${USER}" \ - --gecos "" \ - --home "${DIRECTORY}" \ - --no-create-home \ - --uid "$UID" \ - "$USER" - -USER ${USER} + IS_DOCKER=true # Create and set the working directory WORKDIR ${DIRECTORY} +# Install tini for initialization and tzdata for setting timezone +RUN apk add --no-cache tzdata tini + # Copy built application from build phase -COPY --from=BUILD_IMAGE --chown=${USER}:${USER} /app ./ +COPY --from=BUILD_IMAGE /app ./ # Finally, run start command to serve up the built application ENTRYPOINT [ "/sbin/tini", "--" ] From 426a4fd6527c1f0bcd82f93419cfd94a129b0859 Mon Sep 17 00:00:00 2001 From: liss-bot Date: Sun, 27 Feb 2022 01:26:12 +0000 Subject: [PATCH 10/97] :purple_heart: Updates contributors list --- docs/credits.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/credits.md b/docs/credits.md index c9a85620..38c8754a 100644 --- a/docs/credits.md +++ b/docs/credits.md @@ -39,14 +39,21 @@ Famku + + + hugalafutro +
+ hugalafutro +
+ + KierenConnell
Kieren Connell
- - + ratty222 From 1aa63e5a1c5a67d6f4d2e18548b5c1c5686f2d3e Mon Sep 17 00:00:00 2001 From: liss-bot Date: Sun, 27 Feb 2022 01:26:13 +0000 Subject: [PATCH 11/97] :yellow_heart: Updates sponsors table --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2f9b1ac5..0d0d162f 100644 --- a/README.md +++ b/README.md @@ -521,14 +521,21 @@ Huge thanks to the sponsors helping to support Dashy's development! Famku + + + hugalafutro +
+ hugalafutro +
+ + KierenConnell
Kieren Connell
- - + ratty222 From fb7a1e5ce4adfe085971845fcf34a4cce3ad1c8e Mon Sep 17 00:00:00 2001 From: Alicia Bot <87835202+liss-bot@users.noreply.github.com> Date: Sun, 27 Feb 2022 01:26:26 +0000 Subject: [PATCH 12/97] :blue_heart: Makes author list --- .github/AUTHORS.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/AUTHORS.txt b/.github/AUTHORS.txt index 163070a6..d640fd2d 100644 --- a/.github/AUTHORS.txt +++ b/.github/AUTHORS.txt @@ -34,13 +34,13 @@ Alicia - 16 commits github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> - 16 commits snyk-bot - 18 commits EVOTk <45015615+EVOTk@users.noreply.github.com> - 22 commits -repo-visualizer - 25 commits +repo-visualizer - 26 commits Alicia - 28 commits snyk-bot - 29 commits -Alicia - 50 commits -Alicia - 60 commits -liss-bot - 63 commits +Alicia - 52 commits +Alicia - 61 commits +liss-bot - 65 commits Lissy93 - 78 commits Lissy93 - 206 commits -Alicia - 332 commits -Alicia - 1426 commits \ No newline at end of file +Alicia - 334 commits +Alicia - 1427 commits \ No newline at end of file From 2c6f9948b6fb1446101f9cc64cc366c102d2ac11 Mon Sep 17 00:00:00 2001 From: repo-visualizer Date: Sun, 27 Feb 2022 01:31:50 +0000 Subject: [PATCH 13/97] :yellow_heart: Updates repo diagram --- docs/assets/repo-visualization.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/assets/repo-visualization.svg b/docs/assets/repo-visualization.svg index a6bec5e2..c242038d 100644 --- a/docs/assets/repo-visualization.svg +++ b/docs/assets/repo-visualization.svg @@ -1 +1 @@ -viewsviewsutilsutilsstylesstylesmixinsmixinscomponentscomponentsassetsassetsWorkspaceWorkspaceWidgetsWidgetsSettingsSettingsPageStrcturePageStrctureMinimalViewMinimalViewLinkItemsLinkItemsInteractiveEditorInteractiveEditorFormElementsFormElementsConfigurationConfigurationChartsChartslocaleslocalesinterface-iconsinterface-iconsemojis.jsonemojis.jsonemojis.jsonConfigSc...ConfigSc...ConfigSc...color-th...color-th...color-th...WidgetBa...WidgetBa...WidgetBa...Item.vueItem.vueItem.vuehi.jsonhi.jsonhi.json.js.json.scss.svg.vueeach dot sized by file size \ No newline at end of file +viewsviewsutilsutilsstylesstylesmixinsmixinscomponentscomponentsassetsassetsWorkspaceWorkspaceWidgetsWidgetsSettingsSettingsPageStrcturePageStrctureMinimalViewMinimalViewLinkItemsLinkItemsInteractiveEditorInteractiveEditorFormElementsFormElementsConfigurationConfigurationChartsChartslocaleslocalesinterface-iconsinterface-iconsemojis.jsonemojis.jsonemojis.jsonConfigSc...ConfigSc...ConfigSc...color-th...color-th...color-th...WidgetBa...WidgetBa...WidgetBa...Item.vueItem.vueItem.vuehi.jsonhi.jsonhi.json.js.json.scss.svg.vueeach dot sized by file size \ No newline at end of file From ce5ea35d46d7bd56095093f150251acb48f89006 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Tue, 1 Mar 2022 00:50:59 +0000 Subject: [PATCH 14/97] fix: upgrade @sentry/tracing from 6.17.4 to 6.17.5 Snyk has created this PR to upgrade @sentry/tracing from 6.17.4 to 6.17.5. See this package in npm: See this project in Snyk: https://app.snyk.io/org/lissy93/project/564ca11b-8665-48b8-befa-ccd607c3e09a?utm_source=github&utm_medium=referral&page=upgrade-pr --- package.json | 2 +- yarn.lock | 47 +++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index adbdd615..1b887e6b 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ }, "dependencies": { "@formschema/native": "^2.0.0-beta.6", - "@sentry/tracing": "^6.17.4", + "@sentry/tracing": "^6.17.5", "@sentry/vue": "^6.17.4", "ajv": "^8.10.0", "axios": "^0.25.0", diff --git a/yarn.lock b/yarn.lock index 6fb27f1d..18130937 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1169,6 +1169,15 @@ "@sentry/utils" "6.17.4" tslib "^1.9.3" +"@sentry/hub@6.18.1": + version "6.18.1" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-6.18.1.tgz#fcfb8cb84515efefaf4e48472305ea5a71455abb" + integrity sha512-+zGzgc/xX3an/nKA3ELMn9YD9VmqbNaNwWZ5/SjNUvzsYHh2UNZ7YzT8WawQsRVOXLljyCKxkWpFB4EchiYGbw== + dependencies: + "@sentry/types" "6.18.1" + "@sentry/utils" "6.18.1" + tslib "^1.9.3" + "@sentry/minimal@6.17.4": version "6.17.4" resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-6.17.4.tgz#6a35dbdb22a1c532d1eb7b4c0d9223618cb67ccd" @@ -1178,15 +1187,24 @@ "@sentry/types" "6.17.4" tslib "^1.9.3" -"@sentry/tracing@^6.17.4": - version "6.17.4" - resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-6.17.4.tgz#17c2ab50d9e4cdf727b9b25e7f91ae3a9ea19437" - integrity sha512-UV6wWH/fqndts0k0cptsNtzD0h8KXqHInJSCGqlWDlygFRO16jwMKv0wfXgqsgc3cBGDlsl8C4l6COSwz9ROdg== +"@sentry/minimal@6.18.1": + version "6.18.1" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-6.18.1.tgz#eac73d2262589930aa0bb33e0e12380ac5b766a9" + integrity sha512-dm+0MuasWNi/LASvHX+09oCo8IBZY5WpMK8qXvQMnwQ9FVfklrjcfEI3666WORDCmeUhDCSeL2MbjPDm+AmPLg== dependencies: - "@sentry/hub" "6.17.4" - "@sentry/minimal" "6.17.4" - "@sentry/types" "6.17.4" - "@sentry/utils" "6.17.4" + "@sentry/hub" "6.18.1" + "@sentry/types" "6.18.1" + tslib "^1.9.3" + +"@sentry/tracing@^6.17.5": + version "6.18.1" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-6.18.1.tgz#7cc54b328dd051102900ade53e907e7441426f83" + integrity sha512-OxozmSfxGx246Ae1XhO01I7ZWxO3briwMBh55E5KyjQb8fuS9gVE7Uy8ZRs5hhNjDutFAU7nMtC0zipfVxP6fg== + dependencies: + "@sentry/hub" "6.18.1" + "@sentry/minimal" "6.18.1" + "@sentry/types" "6.18.1" + "@sentry/utils" "6.18.1" tslib "^1.9.3" "@sentry/types@6.17.4": @@ -1194,6 +1212,11 @@ resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.17.4.tgz#36b78d7c4a6de19b2bbc631bb34893bcad30c0ba" integrity sha512-RUyiXCKf61k2GIMP7FQX0naoSew4zLxe+UrtbjwVcWU4AFPZfH7tLNtTpVE85zAKbxsaiq3OD2FPtTZarHcwxQ== +"@sentry/types@6.18.1": + version "6.18.1" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.18.1.tgz#e2de38dd0da8096a5d22f8effc6756c919266ede" + integrity sha512-wp741NoBKnXE/4T9L723sWJ8EcNMxeTIT1smgNJOfbPwrsDICoYmGEt6JFa05XHpWBGI66WuNvnDjoHVeh6zhA== + "@sentry/utils@6.17.4": version "6.17.4" resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-6.17.4.tgz#4f109629d2e7f16c5595b4367445ef47bfe96b61" @@ -1202,6 +1225,14 @@ "@sentry/types" "6.17.4" tslib "^1.9.3" +"@sentry/utils@6.18.1": + version "6.18.1" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-6.18.1.tgz#1aa819502b042540612f4db7bcb86c7b176f5a6b" + integrity sha512-IFZmuvA+c5lDGlZEri13JSyUP0BHelzY0S4dcKxAzskPW+BtBdQDgYGV90iED1y+IRMLawWb34GF7HyJSouN1Q== + dependencies: + "@sentry/types" "6.18.1" + tslib "^1.9.3" + "@sentry/vue@^6.17.4": version "6.17.4" resolved "https://registry.yarnpkg.com/@sentry/vue/-/vue-6.17.4.tgz#f77ad22fcc6b9d2efa5967d133dccc24d49163a8" From 0fd5976573b204b6560e07bd6041e36264fe3531 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Tue, 1 Mar 2022 00:51:04 +0000 Subject: [PATCH 15/97] fix: upgrade simple-icons from 6.8.0 to 6.9.0 Snyk has created this PR to upgrade simple-icons from 6.8.0 to 6.9.0. See this package in npm: See this project in Snyk: https://app.snyk.io/org/lissy93/project/564ca11b-8665-48b8-befa-ccd607c3e09a?utm_source=github&utm_medium=referral&page=upgrade-pr --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index adbdd615..5cdc68f1 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "register-service-worker": "^1.7.2", "remedial": "^1.0.8", "rsup-progress": "^3.0.0", - "simple-icons": "^6.8.0", + "simple-icons": "^6.9.0", "v-jsoneditor": "^1.4.5", "v-tooltip": "^2.1.3", "vue": "^2.6.14", diff --git a/yarn.lock b/yarn.lock index 6fb27f1d..38a9a3fb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8715,10 +8715,10 @@ signal-exit@^3.0.0, signal-exit@^3.0.2: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== -simple-icons@^6.8.0: - version "6.8.0" - resolved "https://registry.yarnpkg.com/simple-icons/-/simple-icons-6.8.0.tgz#ee837f4222dc00b600d90ec0025f52ea44c2c749" - integrity sha512-Ow1ISgCpRZuXa1xvwVqUrep6xqdtNmcgqd9pCtMgni7m1XmQI56EuSSJYAbyvCcoakXVcbtHFajtPXEd86iMCA== +simple-icons@^6.9.0: + version "6.12.0" + resolved "https://registry.yarnpkg.com/simple-icons/-/simple-icons-6.12.0.tgz#92bf40b332d759d2fdd7f59929e00c90e921e7c8" + integrity sha512-SLupP1dHUcrLSDHpOfjy4u010IYj79QzFkH460ITfGElvo9cB1V2hO4krz0aSZpRWFglwtFJIYPaIOKHp4+NBw== simple-swizzle@^0.2.2: version "0.2.2" From 36db80fb3f9b99bae39e8bfd2842d01d64db82e6 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Tue, 1 Mar 2022 13:33:20 +0000 Subject: [PATCH 16/97] =?UTF-8?q?=F0=9F=93=9D=20Updates=20reverse=20proxy?= =?UTF-8?q?=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/management.md | 84 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/docs/management.md b/docs/management.md index d38881e4..2d1d12c0 100644 --- a/docs/management.md +++ b/docs/management.md @@ -15,6 +15,7 @@ _The following article is a primer on managing self-hosted apps. It covers every - [Authentication](#authentication) - [Managing with Compose](#managing-containers-with-docker-compose) - [Environmental Variables](#passing-in-environmental-variables) +- [Setting Headers](#setting-headers) - [Remote Access](#remote-access) - [Custom Domain](#custom-domain) - [Securing Containers](#container-security) @@ -288,6 +289,89 @@ If you've got many environmental variables, you might find it useful to put them --- +## Setting Headers + +Any external requests made to a different origin (app/ service under a different domain) will be blocked if the correct headers are not specified. This is known as [Cross-Origin Resource Sharing](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) (CORS) and is a security feature built into modern browsers. + +If you see a CORS error in your console, this can be easily fixed by setting the correct headers. This is not a bug with Dashy, so please don't raise it as a bug! + +### Example Headers +- [Caddy](#caddy) +- [NGINX](#nginx) +- [Træfɪk](#traefik) +- [HAProxy](#haproxy) +- [Apache](#apache) + +_The following section briefly outlines how you can set headers for common web proxies/ servers. More info can be found in the documentation for the proxy that you are using, or in the [MDN Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)._ + +These examples are using: +- `Access-Control-Allow-Origin` header, but depending on what type of content you are enabling, this will vary. For example, to allow a site to be loaded in an iframe (for the modal or workspace views) you would use `X-Frame-Options`. +- The domain root (`/`), if your're hosting from a sub-page, replace that with your path. +- A wildcard (`*`), which would allow access from traffic on any domain, this is discorouaged, and you should replace it with the URL where you are hosting Dashy. Note that for requests that transport sensitive info, like credentials (e.g. Keycloak login), the wildcard is [disallowed all together](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#requests_with_credentials) and will be blocked. + +#### Caddy + +> See [Caddy `header` docs](https://caddyserver.com/docs/caddyfile/directives/header) for more info. + +``` +headers / { + Access-Control-Allow-Origin * +} +``` + +#### NGINX + +> See [NGINX `ngx_http_headers_module` docs](https://nginx.org/en/docs/http/ngx_http_headers_module.html) for more info. + +``` +location / { + add_header Access-Control-Allow-Origin *; +} +``` + +Note this can also be done through the UI, using NGINX Proxy Manager. + +#### Traefik + +> See [Træfɪk CORS headers docs](https://doc.traefik.io/traefik/middlewares/http/headers/#cors-headers) for more info. + +``` +labels: + - "traefik.http.middlewares.testheader.headers.accesscontrolallowmethods=GET,OPTIONS,PUT" + - "traefik.http.middlewares.testheader.headers.accesscontrolalloworiginlist=https://foo.bar.org,https://example.org" + - "traefik.http.middlewares.testheader.headers.accesscontrolmaxage=100" + - "traefik.http.middlewares.testheader.headers.addvaryheader=true" +``` + +#### HAProxy + +> See [HAProxy Rewrite Response Docs](https://www.haproxy.com/documentation/hapee/latest/traffic-routing/rewrites/rewrite-responses/) for more info. + +``` +/ + http-response add-header Access-Control-Allow-Origin * +``` + +#### Apache + +> See [Apache `mode_headers` docs](https://httpd.apache.org/docs/current/mod/mod_headers.html) for more info. + +``` +Header always set Access-Control-Allow-Origin "*" +``` + +#### Squid + +> See [Squid `request_header_access` docs](http://www2.gr.squid-cache.org/Doc/config/request_header_access/) for more info. + +``` +request_header_access Authorization allow all +``` + +**[⬆️ Back to Top](#management)** + +--- + ## Remote Access - [WireGuard](#wireguard) From 6bb2298c283c37df7130b5d32670d682460bc0ec Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Tue, 1 Mar 2022 13:47:17 +0000 Subject: [PATCH 17/97] =?UTF-8?q?=F0=9F=93=9D=20Adds=20Docker=20Directory?= =?UTF-8?q?=20solution=20and=20link=20to=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/troubleshooting.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index c60cc4dc..4dd4fb94 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -9,6 +9,8 @@ - [404 On Static Hosting](#404-on-static-hosting) - [Yarn Build or Run Error](#yarn-error) - [Auth Validation Error: "should be object"](#auth-validation-error-should-be-object) +- [Keycloak Redirect Error](#keycloak-redirect-error) +- [Docker Directory Error](#docker-directory) - [Config Not Updating](#config-not-updating) - [Config Still not Updating](#config-still-not-updating) - [Styles and Assets not Updating](#styles-and-assets-not-updating) @@ -114,6 +116,41 @@ auth: --- +## Keycloak Redirect Error + +Check the [browser's console output](#how-to-open-browser-console), if you've not set any headers, you will likely see a CORS error here, which would be the source of the issue. + +You need to allow Dashy to make requests to Keycloak, and Keycloak to redirect to Dashy. The way you do this depends on how you're hosting these applications / which proxy you are using, and examples can be found in the [Management Docs](/docs/management.md#setting-headers). + +For example, add the access control header to Keycloak, like: + +`Access-Control-Allow-Origin [URL-of Dashy]` + +Note that for requests that transport sensitive info like credentials, setting the accept header to a wildcard (`*`) is not allowed - see [MDN Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#requests_with_credentials), so you will need to specify the actual URL. + +You should also ensure that Keycloak is correctly configured, with a user, realm and application, and be sure that you have set a valid redirect URL in Keycloak ([screenshot](https://user-images.githubusercontent.com/1862727/148599768-db4ee4f8-72c5-402d-8f00-051d999e6267.png)). + +For more details on how to set headers, see the [Example Headers](/docs/management.md#setting-headers) in the management docs, or reference the documentation for your proxy. + +See also: #479, #409, #507, #491, #341, #520 + +--- + +## Docker Directory + +``` +Error response from daemon: OCI runtime create failed: container_linux.go:380: +starting container process caused: process_linux.go:545: container init caused: +rootfs_linux.go:76: mounting "/home/ubuntu/my-conf.yml" to rootfs at +"/app/public/conf.yml" caused: mount through procfd: not a directory: +unknown: Are you trying to mount a directory onto a file (or vice-versa)? +Check if the specified host path exists and is the expected type. +``` + +If you get an error similar to the one above, you are mounting a directory to the config file's location, when a plain file is expected. Create a YAML file, (`touch my-conf.yml`), populate it with a sample config, then pass it as a volume: `-v ./my-local-conf.yml:/app/public/conf.yml` + +--- + ## Config Not Updating Dashy has the option to save settings and config locally, in browser storage. Anything here will take precedence over whatever is in your config file, sometimes with unintended consequences. If you've updated the config file manually, and are not seeing changes reflected in the UI, then try visiting the site in Incognito mode. If that works, then the solution is just to clear local storage. This can be done from the config menu, under "Clear Local Settings". From 1062251a159d5233a933da5e3048bddd16d6935d Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Tue, 1 Mar 2022 14:05:01 +0000 Subject: [PATCH 18/97] =?UTF-8?q?=F0=9F=93=9D=20Adds=20link=20to=20setting?= =?UTF-8?q?=20headers=20for=20KC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/authentication.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/authentication.md b/docs/authentication.md index 4d64f753..99654981 100644 --- a/docs/authentication.md +++ b/docs/authentication.md @@ -161,6 +161,8 @@ sections: groups: ['ProductTeam'] ``` +Depending on how you're hosting Dashy and Keycloak, you may also need to set some HTTP headers, to prevent a CORS error. This would typically be the `Access-Control-Allow-Origin [URL-of Dashy]` on your Keycloak instance. See the [Setting Headers](https://github.com/Lissy93/dashy/blob/master/docs/management.md#setting-headers) guide in the management docs for more info. + Your app is now secured :) When you load Dashy, it will redirect to your Keycloak login page, and any user without valid credentials will be prevented from accessing your dashboard. From within the Keycloak console, you can then configure things like time-outs, password policies, etc. You can also backup your full Keycloak config, and it is recommended to do this, along with your Dashy config. You can spin up both Dashy and Keycloak simultaneously and restore both applications configs using a `docker-compose.yml` file, and this is recommended. From 6068375c9eac0c07a08e77a114f90fe937737c39 Mon Sep 17 00:00:00 2001 From: liss-bot Date: Wed, 2 Mar 2022 18:49:03 +0000 Subject: [PATCH 19/97] :purple_heart: Updates contributors list --- docs/credits.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/credits.md b/docs/credits.md index 38c8754a..422a46ba 100644 --- a/docs/credits.md +++ b/docs/credits.md @@ -32,21 +32,28 @@ Vlad Timofeev + + + aghybris +
+ aghybris +
+ Famku
Famku
- + + hugalafutro
- hugalafutro + Hugalafutro
- - + KierenConnell From f6d3fa42ddd6c2c32feb371eb90999b4e073a26d Mon Sep 17 00:00:00 2001 From: liss-bot Date: Wed, 2 Mar 2022 18:49:06 +0000 Subject: [PATCH 20/97] :yellow_heart: Updates sponsors table --- README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0d0d162f..df93496c 100644 --- a/README.md +++ b/README.md @@ -514,21 +514,28 @@ Huge thanks to the sponsors helping to support Dashy's development! Vlad Timofeev + + + aghybris +
+ aghybris +
+ Famku
Famku
- + + hugalafutro
- hugalafutro + Hugalafutro
- - + KierenConnell From 4c4790ec83d40c9061a898256abaa9e68544fab6 Mon Sep 17 00:00:00 2001 From: Alicia Bot <87835202+liss-bot@users.noreply.github.com> Date: Wed, 2 Mar 2022 18:49:47 +0000 Subject: [PATCH 21/97] :blue_heart: Makes author list --- .github/AUTHORS.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/AUTHORS.txt b/.github/AUTHORS.txt index d640fd2d..fac637aa 100644 --- a/.github/AUTHORS.txt +++ b/.github/AUTHORS.txt @@ -34,13 +34,13 @@ Alicia - 16 commits github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> - 16 commits snyk-bot - 18 commits EVOTk <45015615+EVOTk@users.noreply.github.com> - 22 commits -repo-visualizer - 26 commits +repo-visualizer - 27 commits Alicia - 28 commits -snyk-bot - 29 commits -Alicia - 52 commits -Alicia - 61 commits -liss-bot - 65 commits +snyk-bot - 32 commits +Alicia - 53 commits +Alicia - 64 commits +liss-bot - 67 commits Lissy93 - 78 commits Lissy93 - 206 commits Alicia - 334 commits -Alicia - 1427 commits \ No newline at end of file +Alicia - 1430 commits \ No newline at end of file From 72e8087c77f98fe2f24e5f4f37431298b3a9a3d2 Mon Sep 17 00:00:00 2001 From: tazboyz16 Date: Wed, 2 Mar 2022 13:51:55 -0700 Subject: [PATCH 22/97] Update deployment.md fix a misspell on DigitalOcean --- docs/deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/deployment.md b/docs/deployment.md index 83f76830..03790efe 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -189,7 +189,7 @@ https://vercel.com/new/project?template=https://github.com/lissy93/dashy #### DigitalOcean [![Deploy to DO](https://i.ibb.co/PFt0PkB/deploy-digital-ocean-button.png)](https://cloud.digitalocean.com/apps/new?repo=https://github.com/lissy93/dashy/tree/deploy_digital-ocean&refcode=3838338e7f79) -[DigitalOcan](https://www.digitalocean.com/) is a cloud service providing affordable developer-friendly virtual machines from $5/month. But they also have an app platform, where you can run web apps, static sites, APIs and background workers. CDN-backed static sites are free for personal use. +[DigitalOcean](https://www.digitalocean.com/) is a cloud service providing affordable developer-friendly virtual machines from $5/month. But they also have an app platform, where you can run web apps, static sites, APIs and background workers. CDN-backed static sites are free for personal use. ``` https://cloud.digitalocean.com/apps/new?repo=https://github.com/lissy93/dashy/tree/deploy_digital-ocean From aeec449dc7632fbeed381aa9429829d45be49eef Mon Sep 17 00:00:00 2001 From: aterox Date: Sat, 5 Mar 2022 01:22:12 -0500 Subject: [PATCH 23/97] Pull conf.yml from server --- server.js | 9 +++++++++ services/get-conf.js | 10 ++++++++++ src/store.js | 11 ++++++++++- src/utils/ConfigAccumalator.js | 4 ++-- src/utils/defaults.js | 1 + 5 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 services/get-conf.js diff --git a/server.js b/server.js index 4cef9e23..7d395ade 100644 --- a/server.js +++ b/server.js @@ -27,6 +27,7 @@ const rebuild = require('./services/rebuild-app'); // A script to programmatical const systemInfo = require('./services/system-info'); // Basic system info, for resource widget const sslServer = require('./services/ssl-server'); // TLS-enabled web server const corsProxy = require('./services/cors-proxy'); // Enables API requests to CORS-blocked services +const getConf = require('./services/get-conf'); // Returns the configuration as a JSON object /* Helper functions, and default config */ const printMessage = require('./services/print-message'); // Function to print welcome msg on start @@ -116,6 +117,14 @@ const app = express() } catch (e) { res.end(JSON.stringify({ success: false, message: e })); } + }) + // GET endpoint returns the app configuration + .use(ENDPOINTS.getConf, (req, res) => { + try { + res.end(JSON.stringify(getConf())); + } catch (e) { + res.end(JSON.stringify({ success: false, message: e })); + } }); /* Create HTTP server from app on port, and print welcome message */ diff --git a/services/get-conf.js b/services/get-conf.js new file mode 100644 index 00000000..df952256 --- /dev/null +++ b/services/get-conf.js @@ -0,0 +1,10 @@ +/** + * Gets the configuration from conf.yml + */ +const fs = require('fs'); +const yaml = require('js-yaml'); + +module.exports = () => { + const conf = yaml.load(fs.readFileSync('./public/conf.yml', 'utf-8')); + return conf; +}; diff --git a/src/store.js b/src/store.js index 95ae846c..83bf628b 100644 --- a/src/store.js +++ b/src/store.js @@ -1,6 +1,7 @@ /* eslint-disable no-param-reassign, prefer-destructuring */ import Vue from 'vue'; import Vuex from 'vuex'; +import axios from 'axios'; import Keys from '@/utils/StoreMutations'; import ConfigAccumulator from '@/utils/ConfigAccumalator'; import { componentVisibility } from '@/utils/ConfigHelpers'; @@ -8,12 +9,14 @@ import { applyItemId } from '@/utils/SectionHelpers'; import filterUserSections from '@/utils/CheckSectionVisibility'; import { InfoHandler, InfoKeys } from '@/utils/ErrorHandler'; import { isUserAdmin } from '@/utils/Auth'; +import { serviceEndpoints } from '@/utils/defaults'; Vue.use(Vuex); const { INITIALIZE_CONFIG, SET_CONFIG, + SET_REMOTE_CONFIG, SET_MODAL_OPEN, SET_LANGUAGE, SET_ITEM_LAYOUT, @@ -38,6 +41,7 @@ const { const store = new Vuex.Store({ state: { config: {}, + remoteConfig: {}, // The configuration stored on the server editMode: false, // While true, the user can drag and edit items + sections modalOpen: false, // KB shortcut functionality will be disabled when modal is open navigateConfToTab: undefined, // Used to switch active tab in config modal @@ -126,6 +130,9 @@ const store = new Vuex.Store({ [SET_CONFIG](state, config) { state.config = config; }, + [SET_REMOTE_CONFIG](state, config) { + state.remoteConfig = config; + }, [SET_LANGUAGE](state, lang) { const newConfig = state.config; newConfig.appConfig.language = lang; @@ -271,7 +278,9 @@ const store = new Vuex.Store({ }, actions: { /* Called when app first loaded. Reads config and sets state */ - [INITIALIZE_CONFIG]({ commit }) { + async [INITIALIZE_CONFIG]({ commit }) { + // Get the config file from the server and store it for use by the accumulator + commit(SET_REMOTE_CONFIG, (await axios.get(serviceEndpoints.getConf)).data); const deepCopy = (json) => JSON.parse(JSON.stringify(json)); const config = deepCopy(new ConfigAccumulator().config()); commit(SET_CONFIG, config); diff --git a/src/utils/ConfigAccumalator.js b/src/utils/ConfigAccumalator.js index a1756461..15131e7d 100644 --- a/src/utils/ConfigAccumalator.js +++ b/src/utils/ConfigAccumalator.js @@ -14,11 +14,11 @@ import { } from '@/utils/defaults'; import ErrorHandler from '@/utils/ErrorHandler'; import { applyItemId } from '@/utils/SectionHelpers'; -import conf from '../../public/conf.yml'; +import $store from '../store'; export default class ConfigAccumulator { constructor() { - this.conf = conf; + this.conf = $store.state.remoteConfig; } /* App Config */ diff --git a/src/utils/defaults.js b/src/utils/defaults.js index 57cabb6d..aba08691 100644 --- a/src/utils/defaults.js +++ b/src/utils/defaults.js @@ -42,6 +42,7 @@ module.exports = { statusCheck: '/status-check', save: '/config-manager/save', rebuild: '/config-manager/rebuild', + getConf: '/config-manager/get', systemInfo: '/system-info', corsProxy: '/cors-proxy', }, From 7c86d6085bbd634970d0a7a3871458438adeefa6 Mon Sep 17 00:00:00 2001 From: aterox Date: Sat, 5 Mar 2022 01:22:32 -0500 Subject: [PATCH 24/97] Load components after config has been pulled --- src/App.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/App.vue b/src/App.vue index d669556f..27984144 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,8 +3,8 @@
- -