From 50ccb0b14d85a11e29b4614a28642a70ade22170 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:51:20 -0700 Subject: [PATCH 001/195] Docs: make it a warning admonition --- docs/installation/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation/index.md b/docs/installation/index.md index 778b9ef2..d954cf37 100644 --- a/docs/installation/index.md +++ b/docs/installation/index.md @@ -8,7 +8,7 @@ icon: simple/docker You have a few options for deploying homepage, depending on your needs. We offer docker images for a majority of platforms. You can also install and run homepage from source if Docker is not your thing. It can even be installed on Kubernetes with Helm.
-!!! danger +!!! warning Please note that when using features such as widgets, Homepage can access personal information (for example from your home automation system) and Homepage currently does not (and is not planned to) include any authentication layer itself. Thus, we recommend homepage be deployed behind a reverse proxy including authentication, SSL etc, and / or behind a VPN. From 19bdc0ec34a8bc9576d71e6df7b182e192c6b814 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 10 Oct 2024 14:01:42 -0700 Subject: [PATCH 002/195] Enhancement: handle immich v1.118 breaking API change (#4110) --- docs/widgets/services/immich.md | 6 ++++++ src/utils/config/service-helpers.js | 6 +++--- src/widgets/immich/component.jsx | 18 +++++++++++++----- src/widgets/immich/widget.js | 14 ++++++++++---- 4 files changed, 32 insertions(+), 12 deletions(-) diff --git a/docs/widgets/services/immich.md b/docs/widgets/services/immich.md index 63780ee0..4da6e187 100644 --- a/docs/widgets/services/immich.md +++ b/docs/widgets/services/immich.md @@ -5,6 +5,11 @@ description: Immich Widget Configuration Learn more about [Immich](https://github.com/immich-app/immich). +| Immich Version | Homepage Widget Version | +| -------------- | ----------------------- | +| < v1.118 | 1 (default) | +| >= v1.118 | 2 | + Find your API key under `Account Settings > API Keys`. Allowed fields: `["users" ,"photos", "videos", "storage"]`. @@ -16,4 +21,5 @@ widget: type: immich url: http://immich.host.or.ip key: adminapikeyadminapikeyadminapikey + version: 2 # optional, default is 1 ``` diff --git a/src/utils/config/service-helpers.js b/src/utils/config/service-helpers.js index 6138d2e9..24ba57e2 100644 --- a/src/utils/config/service-helpers.js +++ b/src/utils/config/service-helpers.js @@ -406,7 +406,7 @@ export function cleanServiceGroups(groups) { // frigate enableRecentEvents, - // glances, mealie, pihole, pfsense + // glances, immich, mealie, pihole, pfsense version, // glances @@ -568,8 +568,8 @@ export function cleanServiceGroups(groups) { if (snapshotHost) cleanedService.widget.snapshotHost = snapshotHost; if (snapshotPath) cleanedService.widget.snapshotPath = snapshotPath; } - if (["glances", "mealie", "pfsense", "pihole"].includes(type)) { - if (version) cleanedService.widget.version = version; + if (["glances", "immich", "mealie", "pfsense", "pihole"].includes(type)) { + if (version) cleanedService.widget.version = parseInt(version, 10); } if (type === "glances") { if (metric) cleanedService.widget.metric = metric; diff --git a/src/widgets/immich/component.jsx b/src/widgets/immich/component.jsx index 5f5bbedd..ed27d4d8 100644 --- a/src/widgets/immich/component.jsx +++ b/src/widgets/immich/component.jsx @@ -8,11 +8,19 @@ export default function Component({ service }) { const { t } = useTranslation(); const { widget } = service; - const { data: versionData, error: versionError } = useWidgetAPI(widget, "version"); - // see https://github.com/gethomepage/homepage/issues/2282 - const endpoint = - versionData?.major > 1 || (versionData?.major === 1 && versionData?.minor > 84) ? "statistics" : "stats"; - const { data: immichData, error: immichError } = useWidgetAPI(widget, endpoint); + const { version = 1 } = widget; + + const versionEndpoint = version === 2 ? "version_v2" : "version"; + + const { data: versionData, error: versionError } = useWidgetAPI(widget, versionEndpoint); + + let statsEndpoint = version === 2 ? "statistics_v2" : "stats"; + if (version === 1) { + // see https://github.com/gethomepage/homepage/issues/2282 + statsEndpoint = + versionData?.major > 1 || (versionData?.major === 1 && versionData?.minor > 84) ? "statistics" : "stats"; + } + const { data: immichData, error: immichError } = useWidgetAPI(widget, statsEndpoint); if (immichError || versionError || immichData?.statusCode === 401) { return
+### Nested Groups
+
+Groups can be nested by using the same format as the top-level groups.
+
+```yaml
+- Group A:
+ - Service A:
+ href: http://localhost/
+
+ - Group B:
+ - Service B:
+ href: http://localhost/
+
+ - Service C:
+ href: http://localhost/
+```
+
## Services
Services are defined as array entries on groups,
@@ -43,6 +60,60 @@ Services are defined as array entries on groups,
+### Service Widgets
+
+Each service can have widgets attached to it (often matching the service type, but that's not forced).
+
+In addition to the href of the service, you can also specify the target location in which to open that link. See [Link Target](settings.md#link-target) for more details.
+
+Using Emby as an example, this is how you would attach the Emby service widget.
+
+```yaml
+- Emby:
+ icon: emby.png
+ href: http://emby.host.or.ip/
+ description: Movies & TV Shows
+ widget:
+ type: emby
+ url: http://emby.host.or.ip
+ key: apikeyapikeyapikeyapikeyapikey
+```
+
+#### Multiple Widgets
+
+Each service can have multiple widgets attached to it, for example:
+
+```yaml
+- Emby:
+ icon: emby.png
+ href: http://emby.host.or.ip/
+ description: Movies & TV Shows
+ widgets:
+ - type: emby
+ url: http://emby.host.or.ip
+ key: apikeyapikeyapikeyapikeyapikey
+ - type: uptimekuma
+ url: http://uptimekuma.host.or.ip:port
+ slug: statuspageslug
+```
+
+#### Field Visibility
+
+Each widget can optionally provide a list of which fields should be visible via the `fields` widget property. If no fields are specified, then all fields will be displayed. The `fields` property must be a valid YAML array of strings. As an example, here is the entry for Sonarr showing only a couple of fields.
+
+**In all cases a widget will work and display all fields without specifying the `fields` property.**
+
+```yaml
+- Sonarr:
+ icon: sonarr.png
+ href: http://sonarr.host.or.ip
+ widget:
+ type: sonarr
+ fields: ["wanted", "queued"]
+ url: http://sonarr.host.or.ip
+ key: apikeyapikeyapikeyapikeyapikey
+```
+
## Descriptions
Services may have descriptions,
diff --git a/docs/configs/settings.md b/docs/configs/settings.md
index 2f387a65..7e1815bb 100644
--- a/docs/configs/settings.md
+++ b/docs/configs/settings.md
@@ -137,6 +137,27 @@ layout:
columns: 3
```
+### Nested Groups
+
+If your services config has nested groups, you can apply settings to these groups by nesting them in the layout block
+and using the same settings. For example
+
+```yaml
+layout:
+ Group A:
+ style: row
+ columns: 4
+ Group C:
+ style: row
+ columns: 2
+ Nested Group A:
+ style: row
+ columns: 2
+ Nested Group B:
+ style: row
+ columns: 2
+```
+
### Headers
You can hide headers for each section in the layout as well by passing `header` as false, like so:
@@ -348,12 +369,12 @@ This can also be set for individual services. Note setting this at the service l
## Providers
-The `providers` section allows you to define shared API provider options and secrets. Currently this allows you to define your weather API keys in secret and is also the location of the Longhorn URL and credentials.
+The `providers` section allows you to define shared API provider options and secrets.
```yaml
providers:
openweathermap: openweathermapapikey
- weatherapi: weatherapiapikey
+ finnhub: yourfinnhubapikeyhere
longhorn:
url: https://longhorn.example.com
username: admin
@@ -363,10 +384,10 @@ providers:
You can then pass `provider` instead of `apiKey` in your widget configuration.
```yaml
-- weatherapi:
+- openweathermap:
latitude: 50.449684
longitude: 30.525026
- provider: weatherapi
+ provider: openweathermap
```
## Quick Launch
diff --git a/docs/troubleshooting/index.md b/docs/troubleshooting/index.md
index 82a7381c..bbde4cf3 100644
--- a/docs/troubleshooting/index.md
+++ b/docs/troubleshooting/index.md
@@ -17,7 +17,7 @@ hide:
All service widgets work essentially the same, that is, homepage makes a proxied call to an API made available by that service. The majority of the time widgets don't work it is a configuration issue. Of course, sometimes things do break. Some basic steps to try:
-1. Ensure that you follow the rule mentioned on https://gethomepage.dev/configs/service-widgets/. **Unless otherwise noted, URLs should not end with a / or other API path. Each widget will handle the path on its own.**. This is very important as including a trailing slash can result in an error.
+1. **URLs should not end with a / or other API path. Each widget will handle the path on its own.**. Including a trailing slash can result in an error.
2. Verify the homepage installation can connect to the IP address or host you are using for the widget `url`. This is most simply achieved by pinging the server from the homepage machine, in Docker this means _from inside the container_ itself, e.g.:
diff --git a/docs/widgets/authoring/proxies.md b/docs/widgets/authoring/proxies.md
index 15cdb670..a8b8073e 100644
--- a/docs/widgets/authoring/proxies.md
+++ b/docs/widgets/authoring/proxies.md
@@ -50,7 +50,7 @@ You can also pass API keys from the widget configuration to the proxy handler, f
### `credentialedProxyHandler`
-A proxy handler that makes authenticated by setting request headers. Credentials are pulled from the widgets configuration.
+A proxy handler that makes authenticated requests by setting request headers. Credentials are pulled from the widgets configuration.
By default the key is passed as an `X-API-Key` header. If you need to pass the key as something else, either add a case to the credentialedProxyHandler or create a new proxy handler.
diff --git a/docs/widgets/index.md b/docs/widgets/index.md
index 4bd45af7..fbb8edc6 100644
--- a/docs/widgets/index.md
+++ b/docs/widgets/index.md
@@ -28,6 +28,8 @@ Service widgets are used to display the status of a service, often a web service
slug: aaaaaaabbbbb
```
+More detail on configuring service widgets can be found in the [Service Widgets Config](../configs/services.md) section.
+
## Info Widgets
Info widgets are used to display information in the header, often about your system or environment. Info widgets are defined your `widgets.yaml` file. Here's an example:
@@ -39,3 +41,5 @@ Info widgets are used to display information in the header, often about your sys
longitude: -117.51
cache: 5
```
+
+More detail on configuring info widgets can be found in the [Info Widgets Config](../configs/info-widgets.md) section.
diff --git a/docs/widgets/info/openmeteo.md b/docs/widgets/info/openmeteo.md
index fb5bb171..ec84ab17 100644
--- a/docs/widgets/info/openmeteo.md
+++ b/docs/widgets/info/openmeteo.md
@@ -3,7 +3,7 @@ title: Open-Meteo
description: Open-Meteo Information Widget Configuration
---
-No registration is required at all! See [https://open-meteo.com/en/docs](https://open-meteo.com/en/docs)
+Homepage's recommended weather widget. No registration is required at all! See [https://open-meteo.com/en/docs](https://open-meteo.com/en/docs)
```yaml
- openmeteo:
diff --git a/docs/widgets/info/weather.md b/docs/widgets/info/weather.md
deleted file mode 100644
index ab13b673..00000000
--- a/docs/widgets/info/weather.md
+++ /dev/null
@@ -1,22 +0,0 @@
----
-title: Weather API
-description: Weather API Information Widget Configuration
----
-
-**Note: this widget is considered 'deprecated' since there is no longer a free Weather API tier for new members. See the openmeteo or openweathermap widgets for alternatives.**
-
-The free tier is all that's required, you will need to [register](https://www.weatherapi.com/signup.aspx) and grab your API key.
-
-```yaml
-- weatherapi:
- label: Kyiv # optional
- latitude: 50.449684
- longitude: 30.525026
- units: metric # or imperial
- apiKey: yourweatherapikey
- cache: 5 # Time in minutes to cache API responses, to stay within limits
- format: # optional, Intl.NumberFormat options
- maximumFractionDigits: 1
-```
-
-You can optionally not pass a `latitude` and `longitude` and the widget will use your current location (requires a secure context, eg. HTTPS).
diff --git a/mkdocs.yml b/mkdocs.yml
index a19d3b83..fa2188ad 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -21,8 +21,8 @@ nav:
- configs/index.md
- configs/settings.md
- configs/bookmarks.md
+ - configs/info-widgets.md
- configs/services.md
- - configs/service-widgets.md
- configs/kubernetes.md
- configs/docker.md
- configs/custom-css-js.md
@@ -142,6 +142,7 @@ nav:
- widgets/services/spoolman.md
- widgets/services/stash.md
- widgets/services/stocks.md
+ - widgets/services/suwayomi.md
- widgets/services/swagdashboard.md
- widgets/services/syncthing-relay-server.md
- widgets/services/tailscale.md
@@ -177,7 +178,6 @@ nav:
- widgets/info/search.md
- widgets/info/stocks.md
- widgets/info/unifi_controller.md
- - widgets/info/weather.md
- "Learn":
- widgets/authoring/index.md
- "Getting Started": widgets/authoring/getting-started.md
diff --git a/src/skeleton/services.yaml b/src/skeleton/services.yaml
index 77626b1c..39b37926 100644
--- a/src/skeleton/services.yaml
+++ b/src/skeleton/services.yaml
@@ -1,6 +1,6 @@
---
# For configuration options and examples, please see:
-# https://gethomepage.dev/configs/services
+# https://gethomepage.dev/configs/services/
- My First Group:
- My First Service:
diff --git a/src/skeleton/settings.yaml b/src/skeleton/settings.yaml
index 141053f5..2e828c08 100644
--- a/src/skeleton/settings.yaml
+++ b/src/skeleton/settings.yaml
@@ -1,6 +1,6 @@
---
# For configuration options and examples, please see:
-# https://gethomepage.dev/configs/settings
+# https://gethomepage.dev/configs/settings/
providers:
openweathermap: openweathermapapikey
diff --git a/src/skeleton/widgets.yaml b/src/skeleton/widgets.yaml
index 23c8d613..b1cf0f55 100644
--- a/src/skeleton/widgets.yaml
+++ b/src/skeleton/widgets.yaml
@@ -1,6 +1,6 @@
---
# For configuration options and examples, please see:
-# https://gethomepage.dev/configs/service-widgets
+# https://gethomepage.dev/configs/info-widgets/
- resources:
cpu: true
From 5cc487a96ddd6327d2d7a0d6acfabc3d5f960e59 Mon Sep 17 00:00:00 2001
From: zombaru <16330202+zombaru@users.noreply.github.com>
Date: Thu, 28 Nov 2024 20:15:28 -0800
Subject: [PATCH 056/195] Documentation: Add missing admonition type to UniFi
docs (#4353)
---
docs/widgets/info/unifi_controller.md | 2 +-
docs/widgets/services/unifi-controller.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/widgets/info/unifi_controller.md b/docs/widgets/info/unifi_controller.md
index b77d8ed0..e16ca40b 100644
--- a/docs/widgets/info/unifi_controller.md
+++ b/docs/widgets/info/unifi_controller.md
@@ -7,7 +7,7 @@ _(Find the Unifi Controller service widget [here](../services/unifi-controller.m
You can display general connectivity status from your Unifi (Network) Controller.
-!!!
+!!! warning
When authenticating you will want to use a local account that has at least read privileges.
diff --git a/docs/widgets/services/unifi-controller.md b/docs/widgets/services/unifi-controller.md
index d137c2a9..c5efc688 100644
--- a/docs/widgets/services/unifi-controller.md
+++ b/docs/widgets/services/unifi-controller.md
@@ -9,7 +9,7 @@ _(Find the Unifi Controller information widget [here](../info/unifi_controller.m
You can display general connectivity status from your Unifi (Network) Controller.
-!!!
+!!! warning
When authenticating you will want to use a local account that has at least read privileges.
From 276a1c3ef423f7b027a84ad5c8ac7ef30d04ca2f Mon Sep 17 00:00:00 2001
From: shamoon <4887959+shamoon@users.noreply.github.com>
Date: Thu, 28 Nov 2024 21:54:22 -0800
Subject: [PATCH 057/195] Chore: better tailscale error handling
---
src/widgets/tailscale/component.jsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/widgets/tailscale/component.jsx b/src/widgets/tailscale/component.jsx
index 3929b2ed..d3c937d5 100644
--- a/src/widgets/tailscale/component.jsx
+++ b/src/widgets/tailscale/component.jsx
@@ -11,8 +11,8 @@ export default function Component({ service }) {
const { data: statsData, error: statsError } = useWidgetAPI(widget, "device");
- if (statsError) {
- return
+### Icons-Only Layout
+
+You can also specify the an icon-only layout for bookmarks, either like so:
+
+```yaml
+layout:
+ Media:
+ iconsOnly: true
+```
+
+or globally:
+
+```yaml
+bookmarksStyle: icons
+```
+
### Sorting
Service groups and bookmark groups can be mixed in order, **but should use different group names**. If you do not specify any bookmark groups they will all show at the bottom of the page.
diff --git a/src/components/bookmarks/group.jsx b/src/components/bookmarks/group.jsx
index 3a9f8323..9deb1b6a 100644
--- a/src/components/bookmarks/group.jsx
+++ b/src/components/bookmarks/group.jsx
@@ -7,7 +7,13 @@ import ErrorBoundary from "components/errorboundry";
import List from "components/bookmarks/list";
import ResolvedIcon from "components/resolvedicon";
-export default function BookmarksGroup({ bookmarks, layout, disableCollapse, groupsInitiallyCollapsed }) {
+export default function BookmarksGroup({
+ bookmarks,
+ layout,
+ disableCollapse,
+ groupsInitiallyCollapsed,
+ bookmarksStyle,
+}) {
const panel = useRef();
useEffect(() => {
@@ -64,7 +70,7 @@ export default function BookmarksGroup({ bookmarks, layout, disableCollapse, gro
>
{validateError}
+ You have a few options for deploying homepage, depending on your needs. We offer docker images for a majority of platforms. You can also install and run homepage from source if Docker is not your thing. It can even be installed on Kubernetes with Helm. -
-!!! warning +!!! info Please note that when using features such as widgets, Homepage can access personal information (for example from your home automation system) and Homepage currently does not (and is not planned to) include any authentication layer itself. Thus, we recommend homepage be deployed behind a reverse proxy including authentication, SSL etc, and / or behind a VPN. @@ -28,3 +26,7 @@ You have a few options for deploying homepage, depending on your needs. We offer { .card }HOMEPAGE_ALLOWED_HOSTS. This is a comma separated list of allowed hosts that can access your homepage. See the [docker](docker.md) and [source](source.md) installation pages for examples.
From 666d075ec453aeced0b229750cde8171ba79147c Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 26 Feb 2025 09:07:06 -0800
Subject: [PATCH 176/195] Chore(deps): Bump docker/setup-qemu-action from 3.4.0
to 3.5.0 (#4836)
Signed-off-by: dependabot[bot]