From bbc88262ee264ccd5f6dbff3cda58f64ff5e5086 Mon Sep 17 00:00:00 2001 From: Alex Fornuto Date: Sat, 26 Oct 2024 20:54:47 -0500 Subject: [PATCH 001/203] Update README.md Fixed ToC anchor link. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ea4eb72..91bd6ef 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ ## Table of Contents - [Features](#features) -- [Getting started](#getting-started) +- [Getting started](#get-started) - [Kubernetes Installation](docs/kubernetes.md) - [Configuration](docs/configuration.md) - [Theming](docs/theming.md) From 95f1d94219153046f099834fb86b8993c3313051 Mon Sep 17 00:00:00 2001 From: Hector Cuesta Date: Thu, 18 May 2023 20:45:50 +0100 Subject: [PATCH 002/203] Add the option to set custom headers in the SW --- docs/configuration.md | 4 ++++ src/mixins/service.js | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/docs/configuration.md b/docs/configuration.md index 15976ea..c1c366e 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -31,6 +31,10 @@ connectivityCheck: true # whether you want to display a message when the apps ar # Optional: Proxy / hosting option proxy: useCredentials: false # send cookies & authorization headers when fetching service specific data. Set to `true` if you use an authentication proxy. Can be overrided on service level. + headers: # send custom headers when fetching service specific data. Can also be set on a service level. + Test: "Example" + Test1: "Example1" + # Set the default layout and color scheme defaults: diff --git a/src/mixins/service.js b/src/mixins/service.js index 64c7f05..1e29a24 100644 --- a/src/mixins/service.js +++ b/src/mixins/service.js @@ -19,12 +19,21 @@ export default { options.credentials = "include"; } + if (this.proxy?.headers) { + options.headers = this.proxy.headers; + } + // Each item can override the credential settings if (this.item.useCredentials !== undefined) { options.credentials = this.item.useCredentials === true ? "include" : "omit"; } + // Each item can have their own headers + if (this.item.headers !== undefined) { + options.headers = this.item.headers; + } + options = Object.assign(options, init); if (path.startsWith("/")) { From b168430fbf3f3a85bfcd6aa2d84aab455d4e464b Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Sun, 27 Oct 2024 14:40:43 +0100 Subject: [PATCH 003/203] fix: empty / null headers issue --- docs/customservices.md | 1 + src/mixins/service.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/customservices.md b/docs/customservices.md index b28e5b2..b92dd60 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -55,6 +55,7 @@ within Homer: url: "http://my-service-link" endpoint: "http://my-service-endpoint" # Optional: alternative base URL used to fetch service data is necessary. useCredentials: false # Optional: Override global proxy.useCredentials configuration. + headers: # Optional: Override global proxy.headers configuration. type: "" ``` diff --git a/src/mixins/service.js b/src/mixins/service.js index 1e29a24..f058b8f 100644 --- a/src/mixins/service.js +++ b/src/mixins/service.js @@ -19,7 +19,7 @@ export default { options.credentials = "include"; } - if (this.proxy?.headers) { + if (this.proxy?.headers && !!this.proxy.headers) { options.headers = this.proxy.headers; } @@ -30,7 +30,7 @@ export default { } // Each item can have their own headers - if (this.item.headers !== undefined) { + if (this.item.headers !== undefined && !!this.item.headers) { options.headers = this.item.headers; } From c7a6f54f35ff694eb1294cb5b948bcde89c59356 Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Wed, 30 Oct 2024 13:39:05 +0100 Subject: [PATCH 004/203] doc: Avoid tarball install issue. fix #620 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 91bd6ef..31e8151 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ wget https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip unzip homer.zip -d homer cd homer cp assets/config.yml.dist assets/config.yml -npx serve # or python -m http.server 8010 or any web server. +pnpx http-server # or python -m http.server 8010 or any web server. ``` ### Build manually From a2866e1714b7c8a1310d5efd864d6729c1af537b Mon Sep 17 00:00:00 2001 From: Ronald Jerez Date: Mon, 20 Feb 2023 23:11:53 -0500 Subject: [PATCH 005/203] Pass accept header when fetching the message via url --- src/components/Message.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/Message.vue b/src/components/Message.vue index 3756952..cf5188a 100644 --- a/src/components/Message.vue +++ b/src/components/Message.vue @@ -67,12 +67,14 @@ export default { }, downloadMessage: function (url) { - return fetch(url).then(function (response) { - if (response.status != 200) { - return; + return fetch(url, { headers: { Accept: "application/json" } }).then( + function (response) { + if (response.status != 200) { + return; + } + return response.json(); } - return response.json(); - }); + ); }, mapRemoteMessage: function (message) { From 779deedecd8b89266822aa1d83f8a83b01147107 Mon Sep 17 00:00:00 2001 From: Rich Schumacher Date: Thu, 31 Oct 2024 16:32:08 -0400 Subject: [PATCH 006/203] feat: Add Gotify custom service component (#706) This adds a new custom service component for Gotify, a system for sending and receiving messages. The component will display the number of messages outstanding as well as the overall system health. Co-authored-by: Bastien Wirtz --- docs/customservices.md | 14 ++++ src/components/services/Gotify.vue | 105 +++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+) create mode 100644 src/components/services/Gotify.vue diff --git a/docs/customservices.md b/docs/customservices.md index b92dd60..c7b45c5 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -42,6 +42,7 @@ within Homer: - [Jellystat](#jellystat) - [Home Assistant](#home-assistant) - [FreshRSS](#freshrss) +- [Gotify](#gotify) > [!IMPORTANT] > Using smart cards will probably requires @@ -529,3 +530,16 @@ The FreshRSS service displays unread and subscriptions counts from your FreshRSS password: "<-- Your password -->" updateInterval: 5000 # (Optional) Interval (in ms) for updating the stats ``` + +## Gotify + +The Gotify service will show the number of currently oustanding messages +available as well as the overall health of the system. + +Note that `apikey` must be a client token, not an app token. + +```yaml +- name: "Gotify" + type: "Gotify" + apikey: "" # Client token to retrieve messages +``` diff --git a/src/components/services/Gotify.vue b/src/components/services/Gotify.vue new file mode 100644 index 0000000..279f0b1 --- /dev/null +++ b/src/components/services/Gotify.vue @@ -0,0 +1,105 @@ + + + + + From 1febbadfba9115f591dc29b431a21751ede4a417 Mon Sep 17 00:00:00 2001 From: Bothari <18599875+Bothari@users.noreply.github.com> Date: Sat, 2 Nov 2024 07:44:01 -0700 Subject: [PATCH 007/203] Improve warning and missing reports for Radarr connections (#809) Improve warning and missing reports for Radarr connections --- src/components/services/Radarr.vue | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/components/services/Radarr.vue b/src/components/services/Radarr.vue index 3352778..0fb93f2 100644 --- a/src/components/services/Radarr.vue +++ b/src/components/services/Radarr.vue @@ -77,6 +77,19 @@ export default { } }) .catch(handleError); + if (!this.item.legacyApi) { + this.fetch(`${this.apiPath}/queue/details?apikey=${this.item.apikey}`) + .then((queue) => { + for (var i = 0; i < queue.length; i++) { + if (queue[i].trackedDownloadStatus == "warning") { + this.warnings++; + } else if (queue[i].trackedDownloadStaus == "error") { + this.errors++; + } + } + }) + .catch(handleError); + } this.fetch(`${this.apiPath}/queue?apikey=${this.item.apikey}`) .then((queue) => { this.activity = 0; @@ -93,11 +106,14 @@ export default { }) .catch(handleError); if (!this.item.legacyApi) { - this.fetch(`${this.apiPath}/movie?apikey=${this.item.apikey}`) - .then((movies) => { - this.missing = movies.filter( - (m) => m.monitored && !m.hasFile - ).length; + this.fetch(`${this.apiPath}/wanted/missing?pageSize=1&apikey=${this.item.apikey}`) + .then((overview) => { + this.fetch(`${this.apiPath}/wanted/missing?pageSize=${overview.totalRecords}&apikey=${this.item.apikey}`) + .then((movies) => { + this.missing = movies.records.filter( + (m) => m.monitored && m.isAvailable && !m.hasFile + ).length; + }) }) .catch(handleError); } From 18360e223fe9f6e2faef6f0104b79072c02cfa6f Mon Sep 17 00:00:00 2001 From: Jian Qin Date: Mon, 4 Nov 2024 01:04:19 -0800 Subject: [PATCH 008/203] Display round-trip time on the subtitle of the custom service ping (#800) * Show rtt on subtitle of custom service ping * Display subtitle when showRtt is false and handle offline service RTT - Ensure the subtitle is still displayed even if `showRtt` is set to false. - When `showRtt` is true and the service is not online, display "N/A" instead of omitting the RTT value. --- docs/customservices.md | 5 +++-- src/components/services/Ping.vue | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/docs/customservices.md b/docs/customservices.md index c7b45c5..0faabfc 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -145,16 +145,17 @@ API key can be generated in Settings > Administration > Auth Tokens ## Ping -For Ping you need to set the type to Ping and provide a url. By default the HEAD method is used but it can be configured to use GET using the optional `method` property. +For Ping you need to set the type to Ping and provide a url. By default the HEAD method is used but it can be configured to use GET using the optional `method` property. You can also choose to show the round trip time (RTT) by setting `showRtt` to true, default is false. The RTT will be displayed in the subtitle section. ```yaml - name: "Awesome app" type: Ping logo: "assets/tools/sample.png" - subtitle: "Bookmark example" tag: "app" url: "https://www.reddit.com/r/selfhosted/" method: "head" + subtitle: "Bookmark example" + # showRtt: true ``` ## Prometheus diff --git a/src/components/services/Ping.vue b/src/components/services/Ping.vue index b0254fd..658aa47 100644 --- a/src/components/services/Ping.vue +++ b/src/components/services/Ping.vue @@ -5,6 +5,20 @@ {{ status }} + @@ -23,6 +37,7 @@ export default { }, data: () => ({ status: null, + rtt: null, }), created() { this.fetchStatus(); @@ -39,12 +54,17 @@ export default { return; } + const startTime = performance.now(); + this.fetch("/", { method, cache: "no-cache" }, false) .then(() => { this.status = "online"; + const endTime = performance.now(); + this.rtt = Math.round(endTime - startTime); }) .catch(() => { this.status = "offline"; + this.rtt = null; // Reset rtt on failure }); }, }, @@ -81,3 +101,4 @@ export default { } } + From 1ca9a4b0eb4a2d81b8ae8d1e2abaa1d190b9b794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Hansen?= Date: Mon, 4 Nov 2024 20:39:05 +0100 Subject: [PATCH 009/203] Fixes mealie when meal plan is empty (#819) --- src/components/services/Mealie.vue | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/components/services/Mealie.vue b/src/components/services/Mealie.vue index 916783c..0df8c17 100644 --- a/src/components/services/Mealie.vue +++ b/src/components/services/Mealie.vue @@ -6,9 +6,11 @@ - - @@ -32,6 +34,20 @@ export default { stats: null, meal: null, }), + computed: { + mealtext: function () { + if (this.meal && this.meal.length > 0) { + return `Today: ${this.meal[0].recipe.name}`; + } + return null; + }, + statsText: function () { + if (this.stats) { + return `Happily keeping ${this.stats.totalRecipes} recipes organized`; + } + return null; + } + }, created() { this.fetchStatus(); }, From 546db41ab7541ca7fef1b8c06876b5f7c773bb8e Mon Sep 17 00:00:00 2001 From: SergeiTarkhanov Date: Mon, 4 Nov 2024 21:15:54 +0300 Subject: [PATCH 010/203] Fix immich widget after breaking changes update --- docs/customservices.md | 2 +- src/components/services/Immich.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/customservices.md b/docs/customservices.md index 0faabfc..0d53e91 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -463,7 +463,7 @@ The PiAlert service displays stats from your PiAlert server. ## Immich The Immich service displays stats from your Immich server. -The Immich server must be running at least version 1.85.0 for the correct api endpoint to work. +The Immich server must be running at least version 1.118.0 for the correct api endpoint to work. ```yaml - name: "Immich" diff --git a/src/components/services/Immich.vue b/src/components/services/Immich.vue index 61dbb79..fcf06c7 100644 --- a/src/components/services/Immich.vue +++ b/src/components/services/Immich.vue @@ -78,7 +78,7 @@ export default { "x-api-key": this.item.apikey, }; - this.fetch(`/api/server-info/statistics`, { headers }) + this.fetch(`/api/server/statistics`, { headers }) .then((stats) => { this.photos = stats.photos; this.videos = stats.videos; From aa8be8e5769088deec1a0a2b90d117654157e3e2 Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Mon, 4 Nov 2024 20:49:06 +0100 Subject: [PATCH 011/203] release version bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8b18976..542df01 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "homer", - "version": "24.10.2", + "version": "24.11.1", "type": "module", "scripts": { "dev": "vite", From f7cc9761e994b1820a806e31b76b76b3d519f799 Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Wed, 6 Nov 2024 13:56:12 +0100 Subject: [PATCH 012/203] doc: add lemmy and dashboard icons links, cleanup --- README.md | 11 ++++----- docs/customservices.md | 2 +- docs/tips-and-tricks.md | 6 +++++ public/assets/config-demo.yml.dist | 17 ++++++++++++-- public/assets/config.yml.dist | 37 ++++++++++++++++++++---------- 5 files changed, 51 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 31e8151..c628f04 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,6 @@ License: Apache 2 - Gitter chat Download homer static build @@ -58,10 +55,10 @@ - 📂 Multi pages & item grouping - 🎨 Theme customization - ⌨️ keyboard shortcuts: - - `/` Start searching. - - `Escape` Stop searching. - - `Enter` Open the first matching result (respects the bookmark's `_target` property). - - `Alt`/`Option` + `Enter` Open the first matching result in a new tab. + - / Start searching. + - Escape Stop searching. + - Enter Open the first matching result (respects the bookmark's `_target` property). + - Alt (or Option) + Enter Open the first matching result in a new tab. ## Get started diff --git a/docs/customservices.md b/docs/customservices.md index 0d53e91..3c52191 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -152,7 +152,7 @@ For Ping you need to set the type to Ping and provide a url. By default the HEAD type: Ping logo: "assets/tools/sample.png" tag: "app" - url: "https://www.reddit.com/r/selfhosted/" + url: "https://www.wikipedia.org/" method: "head" subtitle: "Bookmark example" # showRtt: true diff --git a/docs/tips-and-tricks.md b/docs/tips-and-tricks.md index 9464b62..992bc0e 100644 --- a/docs/tips-and-tricks.md +++ b/docs/tips-and-tricks.md @@ -2,6 +2,12 @@ Here is a collection of neat tips and tricks that Homer users have come up with! +## Dashboard icons + +Great source to find service icons + +- + ## Use Homer as a custom "new tab" page #### `by @vosdev` diff --git a/public/assets/config-demo.yml.dist b/public/assets/config-demo.yml.dist index 8a4b22e..283be7f 100644 --- a/public/assets/config-demo.yml.dist +++ b/public/assets/config-demo.yml.dist @@ -67,12 +67,18 @@ services: subtitle: "Displays dynamic information or actions." tag: "setup" url: "https://github.com/bastienwirtz/homer/blob/main/docs/theming.md" + - name: "Dashboard icons" + icon: "fa-solid fa-icons" + subtitle: "Dashboard icons" + tag: "setup" + url: "https://github.com/walkxcode/dashboard-icons" - name: "Buy me a coffee!" subtitle: "Sponsor this project" icon: "fa-solid fa-mug-hot" url: "https://www.buymeacoffee.com/bastien" - name: "Smart cards showcase" icon: "fa-solid fa-brain" + class: "highlight-purple" items: - name: "Octoprint" logo: "https://cdn-icons-png.flaticon.com/512/3112/3112529.png" @@ -102,12 +108,19 @@ services: type: "OpenWeather" - name: "Ressources" icon: "fa-regular fa-bookmark" + class: highlight-inverted items: - name: "r/selfhosted" icon: "fa-brands fa-reddit-alien" - subtitle: "Bookmark example" - tag: "reddit" + subtitle: "selfhosted community on Reddit" + tag: "community" url: "https://www.reddit.com/r/selfhosted/" + target: "_blank" + - name: "c/selfhosted" + logo: "https://icons.iconarchive.com/icons/simpleicons-team/simple/256/lemmy-icon.png" + subtitle: "selfhosted community on Lemmy" + tag: "community" + url: "https://lemmy.world/c/selfhosted" target: "_blank" - name: "Awesome selfhosted" icon: "fa-solid fa-star" diff --git a/public/assets/config.yml.dist b/public/assets/config.yml.dist index 58a03ac..f7dae53 100644 --- a/public/assets/config.yml.dist +++ b/public/assets/config.yml.dist @@ -74,15 +74,28 @@ services: - name: "Applications" icon: "fas fa-cloud" items: - - name: "Awesome app" - logo: "assets/tools/sample.png" - subtitle: "Bookmark example" - tag: "app" - keywords: "self hosted reddit" - url: "https://www.reddit.com/r/selfhosted/" - target: "_blank" # optional html a tag target attribute - - name: "Another one" - logo: "assets/tools/sample2.png" - subtitle: "Another application" - tag: "app" - url: "#" + - name: "Get started" + icon: "fa-solid fa-download" + subtitle: "Start using Homer in a few minutes" + tag: "setup" + url: "https://github.com/bastienwirtz/homer?tab=readme-ov-file#getting-started" + - name: "Configuration" + icon: "fa-solid fa-sliders" + subtitle: "Configuration options documentation" + tag: "setup" + url: "https://github.com/bastienwirtz/homer/blob/main/docs/configuration.md" + - name: "Theming" + icon: "fa-solid fa-palette" + subtitle: "Customize Homer appearance" + tag: "theming" + url: "https://github.com/bastienwirtz/homer/blob/main/docs/theming.md" + - name: "Smart cards" + icon: "fa-solid fa-palette" + subtitle: "Displays dynamic information or actions." + tag: "setup" + url: "https://github.com/bastienwirtz/homer/blob/main/docs/theming.md" + - name: "Dashboard icons" + icon: "fa-solid fa-icons" + subtitle: "Dashboard icons" + tag: "setup" + url: "https://github.com/walkxcode/dashboard-icons" From a666d7aa9390559afdcc00c0af085b142db9c181 Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Fri, 8 Nov 2024 18:08:14 +0100 Subject: [PATCH 013/203] feat(smartcard): Simplify ping card --- docs/customservices.md | 8 +++----- src/components/services/Ping.vue | 19 ++++++++++++------- src/mixins/service.js | 2 +- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/docs/customservices.md b/docs/customservices.md index 3c52191..6271562 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -145,17 +145,15 @@ API key can be generated in Settings > Administration > Auth Tokens ## Ping -For Ping you need to set the type to Ping and provide a url. By default the HEAD method is used but it can be configured to use GET using the optional `method` property. You can also choose to show the round trip time (RTT) by setting `showRtt` to true, default is false. The RTT will be displayed in the subtitle section. +This card checks if the target link is available. All you need is to set the `type` to `Ping` and provide a url. By default the HEAD method is used but it can be configured to use GET using the optional `method` property. By default, the subtitle line shows the round trip time (RTT) of the request, unless you provide the `subtitle` property. ```yaml - name: "Awesome app" type: Ping logo: "assets/tools/sample.png" - tag: "app" url: "https://www.wikipedia.org/" - method: "head" - subtitle: "Bookmark example" - # showRtt: true + # method: "head" + # subtitle: "Bookmark example" # By default, request round trip time is displayed when subtitle is not set. ``` ## Prometheus diff --git a/src/components/services/Ping.vue b/src/components/services/Ping.vue index 658aa47..8492c55 100644 --- a/src/components/services/Ping.vue +++ b/src/components/services/Ping.vue @@ -8,15 +8,12 @@