diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 3baa91251..464c861be 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -48,7 +48,7 @@ jobs: # Install the cosign tool except on PR # https://github.com/sigstore/cosign-installer - name: Install cosign - if: github.event_name != 'pull_request' + if: github.event_name != 'pull_request' uses: sigstore/cosign-installer@main with: cosign-release: 'v1.13.1' # optional @@ -57,11 +57,11 @@ jobs: # https://github.com/marketplace/actions/docker-setup-buildx#with-qemu - name: Setup QEMU uses: docker/setup-qemu-action@v3 - + # Workaround: https://github.com/docker/build-push-action/issues/461 - name: Setup Docker buildx uses: docker/setup-buildx-action@v3 - + # This step is being disabled because the runner is on a self-hosted machine # where the cache will stick between runs. # - name: Cache Docker layers diff --git a/.github/workflows/docs-publish.yml b/.github/workflows/docs-publish.yml index f13c85b11..804f99fb7 100644 --- a/.github/workflows/docs-publish.yml +++ b/.github/workflows/docs-publish.yml @@ -40,7 +40,7 @@ jobs: - name: Test Docs Build run: MKINSIDERS=false mkdocs build deploy: - name: Build & Deploy + name: Build & Deploy if: github.repository == 'gethomepage/homepage' && github.event_name != 'pull_request' runs-on: ubuntu-latest steps: diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index f989048e5..a339e8429 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community. Examples of behavior that contributes to a positive environment for our community include: -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience -* Focusing on what is best not just for us as individuals, but for the +- Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: -* The use of sexualized language or imagery, and sexual attention or +- The use of sexualized language or imagery, and sexual attention or advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a +- Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban. ### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an +standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ef705612a..2920f8d29 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,5 @@ # Contributing to Homepage + We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's: - Reporting a bug @@ -8,16 +9,20 @@ We love your input! We want to make contributing to this project as easy and tra - Becoming a maintainer ## We Develop with Github + We use github to host code, to track issues and feature requests, as well as accept pull requests. ## Any contributions you make will be under the GNU General Public License v3.0 + In short, when you submit code changes, your submissions are understood to be under the same [GNU General Public License v3.0](https://choosealicense.com/licenses/gpl-3.0/) that covers the project. Feel free to contact the maintainers if that's a concern. ## Report bugs using Github's [issues](https://github.com/gethomepage/homepage/issues) + We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/gethomepage/homepage/issues/new); it's that easy! ## Write bug reports with detail, background, and sample configurations -Homepage includes a lot of configuration options and is often deploying in larger systems. Please include as much information (configurations, deployment method, Docker & API versions, etc) as you can when reporting an issue. + +Homepage includes a lot of configuration options and is often deploying in larger systems. Please include as much information (configurations, deployment method, Docker & API versions, etc) as you can when reporting an issue. **Great Bug Reports** tend to have: @@ -29,16 +34,20 @@ Homepage includes a lot of configuration options and is often deploying in large - What actually happens - Notes (possibly including why you think this might be happening, or stuff you tried that didn't work) -People *love* thorough bug reports. I'm not even kidding. +People _love_ thorough bug reports. I'm not even kidding. ## Development Guidelines + Please see the [documentation regarding development](https://gethomepage.dev/latest/more/development/) and specifically the [guidelines for new service widgets](https://gethomepage.dev/latest/more/development/#service-widget-guidelines) if you are considering making one. ## Use a Consistent Coding Style + This project follows the [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript), please follow it when submitting pull requests. ## License + By contributing, you agree that your contributions will be licensed under its GNU General Public License. ## References + This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/main/CONTRIBUTING.md) diff --git a/docs/configs/bookmarks.md b/docs/configs/bookmarks.md index 1b1b10596..27f6c2737 100644 --- a/docs/configs/bookmarks.md +++ b/docs/configs/bookmarks.md @@ -13,20 +13,20 @@ By default, the description will use the hostname of the link, but you can overr ```yaml - Developer: - - Github: - - abbr: GH - href: https://github.com/ + - Github: + - abbr: GH + href: https://github.com/ - Social: - - Reddit: - - icon: reddit.png - href: https://reddit.com/ - description: The front page of the internet + - Reddit: + - icon: reddit.png + href: https://reddit.com/ + description: The front page of the internet - Entertainment: - - YouTube: - - abbr: YT - href: https://youtube.com/ + - YouTube: + - abbr: YT + href: https://youtube.com/ ``` Bookmarks diff --git a/docs/configs/docker.md b/docs/configs/docker.md index b4e089bb3..cc9ec465c 100644 --- a/docs/configs/docker.md +++ b/docs/configs/docker.md @@ -9,8 +9,8 @@ For IP:PORT, simply make sure your Docker instance [has been configured](https:/ ```yaml my-remote-docker: - host: 192.168.0.101 - port: 2375 + host: 192.168.0.101 + port: 2375 ``` ## Using Docker TLS @@ -19,12 +19,12 @@ Since Docker supports connecting with TLS and client certificate authentication, ```yaml my-remote-docker: - host: 192.168.0.101 - port: 275 - tls: - keyFile: tls/key.pem - caFile: tls/ca.pem - certFile: tls/cert.pem + host: 192.168.0.101 + port: 275 + tls: + keyFile: tls/key.pem + caFile: tls/ca.pem + certFile: tls/cert.pem ``` ## Using Docker Socket Proxy @@ -35,35 +35,35 @@ Here is an example docker-compose file that will expose the docker socket, and t ```yaml dockerproxy: - image: ghcr.io/tecnativa/docker-socket-proxy:latest - container_name: dockerproxy - environment: - - CONTAINERS=1 # Allow access to viewing containers - - SERVICES=1 # Allow access to viewing services (necessary when using Docker Swarm) - - TASKS=1 # Allow access to viewing tasks (necessary when using Docker Swarm) - - POST=0 # Disallow any POST operations (effectively read-only) - ports: - - 127.0.0.1:2375:2375 - volumes: - - /var/run/docker.sock:/var/run/docker.sock:ro # Mounted as read-only - restart: unless-stopped + image: ghcr.io/tecnativa/docker-socket-proxy:latest + container_name: dockerproxy + environment: + - CONTAINERS=1 # Allow access to viewing containers + - SERVICES=1 # Allow access to viewing services (necessary when using Docker Swarm) + - TASKS=1 # Allow access to viewing tasks (necessary when using Docker Swarm) + - POST=0 # Disallow any POST operations (effectively read-only) + ports: + - 127.0.0.1:2375:2375 + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro # Mounted as read-only + restart: unless-stopped homepage: - image: ghcr.io/gethomepage/homepage:latest - container_name: homepage - volumes: - - /path/to/config:/app/config - ports: - - 3000:3000 - restart: unless-stopped + image: ghcr.io/gethomepage/homepage:latest + container_name: homepage + volumes: + - /path/to/config:/app/config + ports: + - 3000:3000 + restart: unless-stopped ``` Then, inside of your `docker.yaml` settings file, you'd configure the docker instance like so: ```yaml my-docker: - host: dockerproxy - port: 2375 + host: dockerproxy + port: 2375 ``` ## Using Socket Directly @@ -76,14 +76,14 @@ If you'd rather use the socket directly, first make sure that you're passing the ```yaml homepage: - image: ghcr.io/gethomepage/homepage:latest - container_name: homepage - volumes: - - /path/to/config:/app/config - - /var/run/docker.sock:/var/run/docker.sock # pass local proxy - ports: - - 3000:3000 - restart: unless-stopped + image: ghcr.io/gethomepage/homepage:latest + container_name: homepage + volumes: + - /path/to/config:/app/config + - /var/run/docker.sock:/var/run/docker.sock # pass local proxy + ports: + - 3000:3000 + restart: unless-stopped ``` If you're using `docker run`, this would be `-v /var/run/docker.sock:/var/run/docker.sock`. @@ -92,7 +92,7 @@ Then, inside of your `docker.yaml` settings file, you'd configure the docker ins ```yaml my-docker: - socket: /var/run/docker.sock + socket: /var/run/docker.sock ``` ## Services @@ -118,18 +118,18 @@ Below is an example of the same service entry shown above, as docker labels. ```yaml services: - emby: - image: lscr.io/linuxserver/emby:latest - container_name: emby - ports: - - 8096:8096 - restart: unless-stopped - labels: - - homepage.group=Media - - homepage.name=Emby - - homepage.icon=emby.png - - homepage.href=http://emby.home/ - - homepage.description=Media server + emby: + image: lscr.io/linuxserver/emby:latest + container_name: emby + ports: + - 8096:8096 + restart: unless-stopped + labels: + - homepage.group=Media + - homepage.name=Emby + - homepage.icon=emby.png + - homepage.href=http://emby.home/ + - homepage.description=Media server ``` When your Docker instance has been properly configured, this service will be automatically discovered and added to your Homepage. **You do not need to specify the `server` or `container` values, as they will be automatically inferred.** @@ -142,32 +142,32 @@ You may also configure widgets, along with the standard service entry, again, us ```yaml labels: - - homepage.group=Media - - homepage.name=Emby - - homepage.icon=emby.png - - homepage.href=http://emby.home/ - - homepage.description=Media server - - homepage.widget.type=emby - - homepage.widget.url=http://emby.home - - homepage.widget.key=yourembyapikeyhere - - homepage.widget.fields=["field1","field2"] # optional + - homepage.group=Media + - homepage.name=Emby + - homepage.icon=emby.png + - homepage.href=http://emby.home/ + - homepage.description=Media server + - homepage.widget.type=emby + - homepage.widget.url=http://emby.home + - homepage.widget.key=yourembyapikeyhere + - homepage.widget.fields=["field1","field2"] # optional ``` You can add specify fields for e.g. the [CustomAPI](/widgets/services/customapi) widget by using array-style dot notation: ```yaml labels: - - homepage.group=Media - - homepage.name=Emby - - homepage.icon=emby.png - - homepage.href=http://emby.home/ - - homepage.description=Media server - - homepage.widget.type=customapi - - homepage.widget.url=http://argus.service/api/v1/service/summary/emby - - homepage.widget.field[0].label=Deployed Version - - homepage.widget.field[0].field.status=deployed_version - - homepage.widget.field[1].label=Latest Version - - homepage.widget.field[1].field.status=latest_version + - homepage.group=Media + - homepage.name=Emby + - homepage.icon=emby.png + - homepage.href=http://emby.home/ + - homepage.description=Media server + - homepage.widget.type=customapi + - homepage.widget.url=http://argus.service/api/v1/service/summary/emby + - homepage.widget.field[0].label=Deployed Version + - homepage.widget.field[0].field.status=deployed_version + - homepage.widget.field[1].label=Latest Version + - homepage.widget.field[1].field.status=latest_version ``` ## Docker Swarm @@ -176,8 +176,8 @@ Docker swarm is supported and Docker services are specified with the same `serve ```yaml my-docker: - socket: /var/run/docker.sock - swarm: true + socket: /var/run/docker.sock + swarm: true ``` For the automatic service discovery to discover all services it is important that homepage should be deployed on a manager node. Set deploy requirements to the master node in your stack yaml config, e.g. @@ -205,9 +205,9 @@ In order to detect every service within the Docker swarm it is necessary that se As of v0.6.4 discovered services can include an optional `weight` field to determine sorting such that: -- Default weight for discovered services is 0 -- Default weight for configured services is their index within their group scaled by 100, i.e. (index + 1) \* 100 -- If two items have the same weight value, then they will be sorted by name +- Default weight for discovered services is 0 +- Default weight for configured services is their index within their group scaled by 100, i.e. (index + 1) \* 100 +- If two items have the same weight value, then they will be sorted by name ## Show stats diff --git a/docs/configs/kubernetes.md b/docs/configs/kubernetes.md index 1d46fe8c2..c1777612d 100644 --- a/docs/configs/kubernetes.md +++ b/docs/configs/kubernetes.md @@ -5,15 +5,15 @@ description: Kubernetes Configuration The Kubernetes connectivity has the following requirements: -- Kubernetes 1.19+ -- Metrics Service -- An Ingress controller +- Kubernetes 1.19+ +- Metrics Service +- An Ingress controller The Kubernetes connection is configured in the `kubernetes.yaml` file. There are 3 modes to choose from: -- **disabled** - disables kubernetes connectivity -- **default** - uses the default kubeconfig [resolution](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) -- **cluster** - uses a service account inside the cluster +- **disabled** - disables kubernetes connectivity +- **default** - uses the default kubeconfig [resolution](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) +- **cluster** - uses a service account inside the cluster ```yaml mode: default @@ -42,18 +42,18 @@ For instance, it can be utilized to roll multiple underlying deployments under o ```yaml - Element Chat: - icon: matrix-light.png - href: https://chat.example.com - description: Matrix Synapse Powered Chat - app: matrix-element - namespace: comms - pod-selector: >- - app.kubernetes.io/instance in ( - matrix-element, - matrix-media-repo, - matrix-media-repo-postgresql, - matrix-synapse - ) + icon: matrix-light.png + href: https://chat.example.com + description: Matrix Synapse Powered Chat + app: matrix-element + namespace: comms + pod-selector: >- + app.kubernetes.io/instance in ( + matrix-element, + matrix-media-repo, + matrix-media-repo-postgresql, + matrix-synapse + ) ``` !!! note @@ -68,29 +68,29 @@ Homepage features automatic service discovery by Ingress annotations. All config apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: emby - annotations: - gethomepage.dev/enabled: "true" - gethomepage.dev/description: Media Server - gethomepage.dev/group: Media - gethomepage.dev/icon: emby.png - gethomepage.dev/name: Emby - gethomepage.dev/widget.type: "emby" - gethomepage.dev/widget.url: "https://emby.example.com" - gethomepage.dev/pod-selector: "" - gethomepage.dev/weight: 10 # optional + name: emby + annotations: + gethomepage.dev/enabled: "true" + gethomepage.dev/description: Media Server + gethomepage.dev/group: Media + gethomepage.dev/icon: emby.png + gethomepage.dev/name: Emby + gethomepage.dev/widget.type: "emby" + gethomepage.dev/widget.url: "https://emby.example.com" + gethomepage.dev/pod-selector: "" + gethomepage.dev/weight: 10 # optional spec: - rules: - - host: emby.example.com - http: - paths: - - backend: - service: - name: emby - port: - number: 8080 - path: / - pathType: Prefix + rules: + - host: emby.example.com + http: + paths: + - backend: + service: + name: emby + port: + number: 8080 + path: / + pathType: Prefix ``` When the Kubernetes cluster connection has been properly configured, this service will be automatically discovered and added to your Homepage. **You do not need to specify the `namespace` or `app` values, as they will be automatically inferred.** @@ -103,33 +103,33 @@ Homepage can also read ingresses defined using the Traefik IngressRoute custom r apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: - name: emby - annotations: - gethomepage.dev/href: "https://emby.example.com" - gethomepage.dev/enabled: "true" - gethomepage.dev/description: Media Server - gethomepage.dev/group: Media - gethomepage.dev/icon: emby.png - gethomepage.dev/app: emby-app # optional, may be needed if app.kubernetes.io/name != ingress metadata.name - gethomepage.dev/name: Emby - gethomepage.dev/widget.type: "emby" - gethomepage.dev/widget.url: "https://emby.example.com" - gethomepage.dev/pod-selector: "" - gethomepage.dev/weight: 10 # optional + name: emby + annotations: + gethomepage.dev/href: "https://emby.example.com" + gethomepage.dev/enabled: "true" + gethomepage.dev/description: Media Server + gethomepage.dev/group: Media + gethomepage.dev/icon: emby.png + gethomepage.dev/app: emby-app # optional, may be needed if app.kubernetes.io/name != ingress metadata.name + gethomepage.dev/name: Emby + gethomepage.dev/widget.type: "emby" + gethomepage.dev/widget.url: "https://emby.example.com" + gethomepage.dev/pod-selector: "" + gethomepage.dev/weight: 10 # optional spec: - entryPoints: - - websecure - routes: - - kind: Rule - match: Host(`emby.example.com`) - services: - - kind: Service - name: emby - namespace: emby - port: 8080 - scheme: http - strategy: RoundRobin - weight: 10 + entryPoints: + - websecure + routes: + - kind: Rule + match: Host(`emby.example.com`) + services: + - kind: Service + name: emby + namespace: emby + port: 8080 + scheme: http + strategy: RoundRobin + weight: 10 ``` If the `href` attribute is not present, Homepage will ignore the specific IngressRoute. diff --git a/docs/configs/service-widgets.md b/docs/configs/service-widgets.md index 93ed968ed..4cdf49305 100644 --- a/docs/configs/service-widgets.md +++ b/docs/configs/service-widgets.md @@ -13,13 +13,13 @@ 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 + icon: emby.png + href: http://emby.host.or.ip/ + description: Movies & TV Shows + widget: + type: emby + url: http://emby.host.or.ip + key: apikeyapikeyapikeyapikeyapikey ``` ## Field Visibility @@ -30,11 +30,11 @@ Each widget can optionally provide a list of which fields should be visible via ```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 + icon: sonarr.png + href: http://sonarr.host.or.ip + widget: + type: sonarr + fields: ["wanted", "queued"] + url: http://sonarr.host.or.ip + key: apikeyapikeyapikeyapikeyapikey ``` diff --git a/docs/configs/settings.md b/docs/configs/settings.md index 06b6b40a7..f2c179342 100644 --- a/docs/configs/settings.md +++ b/docs/configs/settings.md @@ -391,7 +391,7 @@ You can choose from the following styles for docker or k8s status and ping: `dot For example: ```yaml -statusStyle: 'dot' +statusStyle: "dot" ``` or per-service (`services.yaml`) with: diff --git a/docs/installation/docker.md b/docs/installation/docker.md index 7c696792b..1f9f07d67 100644 --- a/docs/installation/docker.md +++ b/docs/installation/docker.md @@ -8,14 +8,14 @@ Using docker compose: ```yaml version: "3.3" services: - homepage: - image: ghcr.io/gethomepage/homepage:latest - container_name: homepage - ports: - - 3000:3000 - volumes: - - /path/to/config:/app/config # Make sure your local config directory exists - - /var/run/docker.sock:/var/run/docker.sock # (optional) For docker integrations + homepage: + image: ghcr.io/gethomepage/homepage:latest + container_name: homepage + ports: + - 3000:3000 + volumes: + - /path/to/config:/app/config # Make sure your local config directory exists + - /var/run/docker.sock:/var/run/docker.sock # (optional) For docker integrations ``` ### Running as non-root @@ -29,17 +29,17 @@ In the docker compose example below, the environment variables `$PUID` and `$PGI ```yaml version: "3.3" services: - homepage: - image: ghcr.io/gethomepage/homepage:latest - container_name: homepage - ports: - - 3000:3000 - volumes: - - /path/to/config:/app/config # Make sure your local config directory exists - - /var/run/docker.sock:/var/run/docker.sock # (optional) For docker integrations, see alternative methods - environment: - PUID: $PUID - PGID: $PGID + homepage: + image: ghcr.io/gethomepage/homepage:latest + container_name: homepage + ports: + - 3000:3000 + volumes: + - /path/to/config:/app/config # Make sure your local config directory exists + - /var/run/docker.sock:/var/run/docker.sock # (optional) For docker integrations, see alternative methods + environment: + PUID: $PUID + PGID: $PGID ``` ### With Docker Run @@ -52,6 +52,6 @@ docker run -p 3000:3000 -v /path/to/config:/app/config -v /var/run/docker.sock:/ You can also include environment variables in your config files to protect sensitive information. Note: -- Environment variables must start with `HOMEPAGE_VAR_` or `HOMEPAGE_FILE_` -- The value of env var `HOMEPAGE_VAR_XXX` will replace `{{HOMEPAGE_VAR_XXX}}` in any config -- The value of env var `HOMEPAGE_FILE_XXX` must be a file path, the contents of which will be used to replace `{{HOMEPAGE_FILE_XXX}}` in any config +- Environment variables must start with `HOMEPAGE_VAR_` or `HOMEPAGE_FILE_` +- The value of env var `HOMEPAGE_VAR_XXX` will replace `{{HOMEPAGE_VAR_XXX}}` in any config +- The value of env var `HOMEPAGE_FILE_XXX` must be a file path, the contents of which will be used to replace `{{HOMEPAGE_FILE_XXX}}` in any config diff --git a/docs/installation/k8s.md b/docs/installation/k8s.md index 336801d84..685472ea0 100644 --- a/docs/installation/k8s.md +++ b/docs/installation/k8s.md @@ -16,70 +16,70 @@ The helm chart allows for all the configurations to be inlined directly in your ```yaml config: - bookmarks: - - Developer: - - Github: - - abbr: GH - href: https://github.com/ - services: - - My First Group: - - My First Service: - href: http://localhost/ - description: Homepage is awesome + bookmarks: + - Developer: + - Github: + - abbr: GH + href: https://github.com/ + services: + - My First Group: + - My First Service: + href: http://localhost/ + description: Homepage is awesome - - My Second Group: - - My Second Service: - href: http://localhost/ - description: Homepage is the best + - My Second Group: + - My Second Service: + href: http://localhost/ + description: Homepage is the best - - My Third Group: - - My Third Service: - href: http://localhost/ - description: Homepage is 😎 - widgets: - # show the kubernetes widget, with the cluster summary and individual nodes - - kubernetes: - cluster: - show: true - cpu: true - memory: true - showLabel: true - label: "cluster" - nodes: - show: true - cpu: true - memory: true - showLabel: true - - search: - provider: duckduckgo - target: _blank - kubernetes: - mode: cluster - settings: + - My Third Group: + - My Third Service: + href: http://localhost/ + description: Homepage is 😎 + widgets: + # show the kubernetes widget, with the cluster summary and individual nodes + - kubernetes: + cluster: + show: true + cpu: true + memory: true + showLabel: true + label: "cluster" + nodes: + show: true + cpu: true + memory: true + showLabel: true + - search: + provider: duckduckgo + target: _blank + kubernetes: + mode: cluster + settings: # The service account is necessary to allow discovery of other services serviceAccount: - create: true - name: homepage + create: true + name: homepage # This enables the service account to access the necessary resources enableRbac: true ingress: - main: - enabled: true - annotations: - # Example annotations to add Homepage to your Homepage! - gethomepage.dev/enabled: "true" - gethomepage.dev/name: "Homepage" - gethomepage.dev/description: "Dynamically Detected Homepage" - gethomepage.dev/group: "Dynamic" - gethomepage.dev/icon: "homepage.png" - hosts: - - host: homepage.example.com - paths: - - path: / - pathType: Prefix + main: + enabled: true + annotations: + # Example annotations to add Homepage to your Homepage! + gethomepage.dev/enabled: "true" + gethomepage.dev/name: "Homepage" + gethomepage.dev/description: "Dynamically Detected Homepage" + gethomepage.dev/group: "Dynamic" + gethomepage.dev/icon: "homepage.png" + hosts: + - host: homepage.example.com + paths: + - path: / + pathType: Prefix ``` ## Install with Kubernetes Manifests @@ -94,12 +94,12 @@ Here's a working example of the resources you need: apiVersion: v1 kind: ServiceAccount metadata: - name: homepage - namespace: default - labels: - app.kubernetes.io/name: homepage + name: homepage + namespace: default + labels: + app.kubernetes.io/name: homepage secrets: - - name: homepage + - name: homepage ``` #### Secret @@ -109,12 +109,12 @@ apiVersion: v1 kind: Secret type: kubernetes.io/service-account-token metadata: - name: homepage - namespace: default - labels: - app.kubernetes.io/name: homepage - annotations: - kubernetes.io/service-account.name: homepage + name: homepage + namespace: default + labels: + app.kubernetes.io/name: homepage + annotations: + kubernetes.io/service-account.name: homepage ``` #### ConfigMap @@ -123,62 +123,62 @@ metadata: apiVersion: v1 kind: ConfigMap metadata: - name: homepage - namespace: default - labels: - app.kubernetes.io/name: homepage + name: homepage + namespace: default + labels: + app.kubernetes.io/name: homepage data: - kubernetes.yaml: | - mode: cluster - settings.yaml: "" - #settings.yaml: | - # providers: - # longhorn: - # url: https://longhorn.my.network - custom.css: "" - custom.js: "" - bookmarks.yaml: | - - Developer: - - Github: - - abbr: GH - href: https://github.com/ - services.yaml: | - - My First Group: - - My First Service: - href: http://localhost/ - description: Homepage is awesome + kubernetes.yaml: | + mode: cluster + settings.yaml: "" + #settings.yaml: | + # providers: + # longhorn: + # url: https://longhorn.my.network + custom.css: "" + custom.js: "" + bookmarks.yaml: | + - Developer: + - Github: + - abbr: GH + href: https://github.com/ + services.yaml: | + - My First Group: + - My First Service: + href: http://localhost/ + description: Homepage is awesome - - My Second Group: - - My Second Service: - href: http://localhost/ - description: Homepage is the best + - My Second Group: + - My Second Service: + href: http://localhost/ + description: Homepage is the best - - My Third Group: - - My Third Service: - href: http://localhost/ - description: Homepage is 😎 - widgets.yaml: | - - kubernetes: - cluster: - show: true - cpu: true - memory: true - showLabel: true - label: "cluster" - nodes: - show: true - cpu: true - memory: true - showLabel: true - - resources: - backend: resources - expanded: true - cpu: true - memory: true - - search: - provider: duckduckgo - target: _blank - docker.yaml: "" + - My Third Group: + - My Third Service: + href: http://localhost/ + description: Homepage is 😎 + widgets.yaml: | + - kubernetes: + cluster: + show: true + cpu: true + memory: true + showLabel: true + label: "cluster" + nodes: + show: true + cpu: true + memory: true + showLabel: true + - resources: + backend: resources + expanded: true + cpu: true + memory: true + - search: + provider: duckduckgo + target: _blank + docker.yaml: "" ``` #### ClusterRole and ClusterRoleBinding @@ -187,57 +187,57 @@ data: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: homepage - labels: - app.kubernetes.io/name: homepage + name: homepage + labels: + app.kubernetes.io/name: homepage rules: - - apiGroups: - - "" - resources: - - namespaces - - pods - - nodes - verbs: - - get - - list - - apiGroups: - - extensions - - networking.k8s.io - resources: - - ingresses - verbs: - - get - - list - - apiGroups: - - traefik.containo.us - resources: - - ingressroutes - verbs: - - get - - list - - apiGroups: - - metrics.k8s.io - resources: - - nodes - - pods - verbs: - - get - - list + - apiGroups: + - "" + resources: + - namespaces + - pods + - nodes + verbs: + - get + - list + - apiGroups: + - extensions + - networking.k8s.io + resources: + - ingresses + verbs: + - get + - list + - apiGroups: + - traefik.containo.us + resources: + - ingressroutes + verbs: + - get + - list + - apiGroups: + - metrics.k8s.io + resources: + - nodes + - pods + verbs: + - get + - list --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: homepage - labels: - app.kubernetes.io/name: homepage + name: homepage + labels: + app.kubernetes.io/name: homepage roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: homepage + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: homepage subjects: - - kind: ServiceAccount - name: homepage - namespace: default + - kind: ServiceAccount + name: homepage + namespace: default ``` #### Service @@ -246,20 +246,20 @@ subjects: apiVersion: v1 kind: Service metadata: - name: homepage - namespace: default - labels: - app.kubernetes.io/name: homepage - annotations: + name: homepage + namespace: default + labels: + app.kubernetes.io/name: homepage + annotations: spec: - type: ClusterIP - ports: - - port: 3000 - targetPort: http - protocol: TCP - name: http - selector: - app.kubernetes.io/name: homepage + type: ClusterIP + ports: + - port: 3000 + targetPort: http + protocol: TCP + name: http + selector: + app.kubernetes.io/name: homepage ``` #### Deployment @@ -268,68 +268,68 @@ spec: apiVersion: apps/v1 kind: Deployment metadata: - name: homepage - namespace: default - labels: - app.kubernetes.io/name: homepage + name: homepage + namespace: default + labels: + app.kubernetes.io/name: homepage spec: - revisionHistoryLimit: 3 - replicas: 1 - strategy: - type: RollingUpdate - selector: - matchLabels: - app.kubernetes.io/name: homepage - template: - metadata: - labels: - app.kubernetes.io/name: homepage - spec: - serviceAccountName: homepage - automountServiceAccountToken: true - dnsPolicy: ClusterFirst - enableServiceLinks: true - containers: - - name: homepage - image: "ghcr.io/gethomepage/homepage:latest" - imagePullPolicy: Always - ports: - - name: http - containerPort: 3000 - protocol: TCP - volumeMounts: - - mountPath: /app/config/custom.js - name: homepage-config - subPath: custom.js - - mountPath: /app/config/custom.css - name: homepage-config - subPath: custom.css - - mountPath: /app/config/bookmarks.yaml - name: homepage-config - subPath: bookmarks.yaml - - mountPath: /app/config/docker.yaml - name: homepage-config - subPath: docker.yaml - - mountPath: /app/config/kubernetes.yaml - name: homepage-config - subPath: kubernetes.yaml - - mountPath: /app/config/services.yaml - name: homepage-config - subPath: services.yaml - - mountPath: /app/config/settings.yaml - name: homepage-config - subPath: settings.yaml - - mountPath: /app/config/widgets.yaml - name: homepage-config - subPath: widgets.yaml - - mountPath: /app/config/logs - name: logs - volumes: - - name: homepage-config - configMap: - name: homepage - - name: logs - emptyDir: {} + revisionHistoryLimit: 3 + replicas: 1 + strategy: + type: RollingUpdate + selector: + matchLabels: + app.kubernetes.io/name: homepage + template: + metadata: + labels: + app.kubernetes.io/name: homepage + spec: + serviceAccountName: homepage + automountServiceAccountToken: true + dnsPolicy: ClusterFirst + enableServiceLinks: true + containers: + - name: homepage + image: "ghcr.io/gethomepage/homepage:latest" + imagePullPolicy: Always + ports: + - name: http + containerPort: 3000 + protocol: TCP + volumeMounts: + - mountPath: /app/config/custom.js + name: homepage-config + subPath: custom.js + - mountPath: /app/config/custom.css + name: homepage-config + subPath: custom.css + - mountPath: /app/config/bookmarks.yaml + name: homepage-config + subPath: bookmarks.yaml + - mountPath: /app/config/docker.yaml + name: homepage-config + subPath: docker.yaml + - mountPath: /app/config/kubernetes.yaml + name: homepage-config + subPath: kubernetes.yaml + - mountPath: /app/config/services.yaml + name: homepage-config + subPath: services.yaml + - mountPath: /app/config/settings.yaml + name: homepage-config + subPath: settings.yaml + - mountPath: /app/config/widgets.yaml + name: homepage-config + subPath: widgets.yaml + - mountPath: /app/config/logs + name: logs + volumes: + - name: homepage-config + configMap: + name: homepage + - name: logs + emptyDir: {} ``` #### Ingress @@ -338,26 +338,26 @@ spec: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: homepage - namespace: default - labels: - app.kubernetes.io/name: homepage - annotations: - gethomepage.dev/description: Dynamically Detected Homepage - gethomepage.dev/enabled: "true" - gethomepage.dev/group: Cluster Management - gethomepage.dev/icon: homepage.png - gethomepage.dev/name: Homepage + name: homepage + namespace: default + labels: + app.kubernetes.io/name: homepage + annotations: + gethomepage.dev/description: Dynamically Detected Homepage + gethomepage.dev/enabled: "true" + gethomepage.dev/group: Cluster Management + gethomepage.dev/icon: homepage.png + gethomepage.dev/name: Homepage spec: - rules: - - host: "homepage.my.network" - http: - paths: - - path: "/" - pathType: Prefix - backend: - service: - name: homepage - port: - number: 3000 + rules: + - host: "homepage.my.network" + http: + paths: + - path: "/" + pathType: Prefix + backend: + service: + name: homepage + port: + number: 3000 ``` diff --git a/docs/installation/unraid.md b/docs/installation/unraid.md index 192837d2b..eb5be7a8d 100644 --- a/docs/installation/unraid.md +++ b/docs/installation/unraid.md @@ -7,39 +7,39 @@ Homepage has an UNRAID community package that you may use to install homepage. T ## Install the Plugin -- In the UNRAID webGUI, go to the **Apps** tab. -- In the search bar, search for `homepage`. -- Click on **Install**. -- Change the parameters to your liking. - - Click on **APPLY**. +- In the UNRAID webGUI, go to the **Apps** tab. +- In the search bar, search for `homepage`. +- Click on **Install**. +- Change the parameters to your liking. + - Click on **APPLY**. ## Run the Container -- While the container is running, open the WebUI. - - Opening the page will generate the configuration files. +- While the container is running, open the WebUI. + - Opening the page will generate the configuration files. You may need to set the permissions of the folders to be able to edit the files. -- Click on the Homepage icon. -- Click on **Console**. - - Enter `chmod -R u-x,go-rwx,go+u,ugo+X /app/config` and press **Enter**. - - Enter `chmod -R u-x,go-rwx,go+u,ugo+X /app/public/icons` and press **Enter**. - - Enter `chown -R nobody:users /app/config` and press **Enter**. - - Enter `chown -R nobody:users /app/public/icons` and press **Enter**. +- Click on the Homepage icon. +- Click on **Console**. + - Enter `chmod -R u-x,go-rwx,go+u,ugo+X /app/config` and press **Enter**. + - Enter `chmod -R u-x,go-rwx,go+u,ugo+X /app/public/icons` and press **Enter**. + - Enter `chown -R nobody:users /app/config` and press **Enter**. + - Enter `chown -R nobody:users /app/public/icons` and press **Enter**. ## Some Other Notes -- To use the [Docker integration](../configs/docker.md), you only need to use the `container:` parameter. There is no need to set the server. +- To use the [Docker integration](../configs/docker.md), you only need to use the `container:` parameter. There is no need to set the server. - !!! note + !!! note To view detailed container statistics (CPU, RAM, etc.), or if you use a remote docker socket, `container:` will still need to be set. For example: - ``` - - Plex: - icon: /icons/plex.png - href: https://app.plex.com - container: plex - ``` + ``` + - Plex: + icon: /icons/plex.png + href: https://app.plex.com + container: plex + ``` -- When you upload a new image into the **/images** folder, you will need to restart the container for it to show up in the WebUI. Please see the [service icons](../configs/services.md#icons) for more information. +- When you upload a new image into the **/images** folder, you will need to restart the container for it to show up in the WebUI. Please see the [service icons](../configs/services.md#icons) for more information. diff --git a/docs/more/development.md b/docs/more/development.md index af5a58ddc..f0468e7f7 100644 --- a/docs/more/development.md +++ b/docs/more/development.md @@ -35,8 +35,8 @@ pnpm lint To ensure cohesiveness of various widgets, the following should be used as a guide for developing new widgets: -- Please only submit widgets that have been requested and have at least 5 'up-votes' -- Widgets should be only one row of blocks -- Widgets should be no more than 4 blocks wide -- Minimize the number of API calls -- Avoid the use of custom proxy unless absolutely necessary +- Please only submit widgets that have been requested and have at least 5 'up-votes' +- Widgets should be only one row of blocks +- Widgets should be no more than 4 blocks wide +- Minimize the number of API calls +- Avoid the use of custom proxy unless absolutely necessary diff --git a/docs/more/homepage-move.md b/docs/more/homepage-move.md index de99e6407..061fd21b2 100644 --- a/docs/more/homepage-move.md +++ b/docs/more/homepage-move.md @@ -5,4 +5,4 @@ description: Homepage Container Deprecation As of v0.7.2 homepage migrated from benphelps/homepage to an "organization" repository located at [gethomepage/homepage](https://github.com/gethomepage/homepage/). The reason for this was to setup the project for longevity and allow for community maintenance. -Migrating your installation should be as simple as changing `image: ghcr.io/benphelps/homepage:latest` to `image: ghcr.io/gethomepage/homepage:latest`. \ No newline at end of file +Migrating your installation should be as simple as changing `image: ghcr.io/benphelps/homepage:latest` to `image: ghcr.io/gethomepage/homepage:latest`. diff --git a/docs/more/translations.md b/docs/more/translations.md index 7a978989e..824d6cb6d 100644 --- a/docs/more/translations.md +++ b/docs/more/translations.md @@ -3,7 +3,7 @@ title: Translations description: Contributing Translations --- -Homepage is developed in English, component contributions must be in English. All translations are community provided, so a huge thanks go out to all those who have helped out so far! +Homepage is developed in English, component contributions must be in English. All translations are community provided, so a huge thanks go out to all those who have helped out so far! ## Support Translations diff --git a/docs/more/troubleshooting.md b/docs/more/troubleshooting.md index 3ca3eb737..9d0fdc752 100644 --- a/docs/more/troubleshooting.md +++ b/docs/more/troubleshooting.md @@ -17,9 +17,9 @@ 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/latest/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. Ensure that you follow the rule mentioned on https://gethomepage.dev/latest/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. -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.: +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.: ``` docker exec homepage ping SERVICEIPORDOMAIN @@ -27,10 +27,10 @@ All service widgets work essentially the same, that is, homepage makes a proxied If your homepage install (container) cannot reach the service then you need to figure out why, for example in Docker this can mean putting the two containers on the same network, checking firewall issues, etc. -3. If you have verified that homepage can in fact reach the service then you can also check the API output using e.g. `curl`, which is often helpful if you do need to file a bug report. Again, depending on your networking setup this may need to be run from _inside the container_ as IP / hostname resolution can differ inside vs outside. +3. If you have verified that homepage can in fact reach the service then you can also check the API output using e.g. `curl`, which is often helpful if you do need to file a bug report. Again, depending on your networking setup this may need to be run from _inside the container_ as IP / hostname resolution can differ inside vs outside. !!! note - + `curl` is not installed in the base image by default but can be added inside the container with `apk add curl`. The exact API endpoints and authentication vary of course, but in many cases instructions can be found by searching the web or if you feel comfortable looking at the homepage source code (e.g. `src/widgets/{widget}/widget.js`). diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index 0756f2781..f7a8217ef 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -17,4 +17,4 @@ color: var(--md-default-bg-color--lighter); border-color: var(--md-default-bg-color--lighter); } -} \ No newline at end of file +} diff --git a/docs/widgets/info/datetime.md b/docs/widgets/info/datetime.md index 47feb45f7..71ea007bf 100644 --- a/docs/widgets/info/datetime.md +++ b/docs/widgets/info/datetime.md @@ -9,9 +9,9 @@ Formatting is locale aware and will present your date in the regional format you ```yaml - datetime: - text_size: xl - format: - timeStyle: short + text_size: xl + format: + timeStyle: short ``` Any options passed to `format` are passed directly to [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat), please reference the MDN documentation for all available options. @@ -23,29 +23,29 @@ A few examples, ```yaml # 13:37 format: - timeStyle: short - hourCycle: h23 + timeStyle: short + hourCycle: h23 ``` ```yaml # 1:37 PM format: - timeStyle: short - hour12: true + timeStyle: short + hour12: true ``` ```yaml # 1/23/22, 1:37 PM format: - dateStyle: short - timeStyle: short - hour12: true + dateStyle: short + timeStyle: short + hour12: true ``` ```yaml # 4 januari 2023 om 13:51:25 PST locale: nl format: - dateStyle: long - timeStyle: long + dateStyle: long + timeStyle: long ``` diff --git a/docs/widgets/info/glances.md b/docs/widgets/info/glances.md index e5cbc7bc4..e6fc2a616 100644 --- a/docs/widgets/info/glances.md +++ b/docs/widgets/info/glances.md @@ -9,16 +9,16 @@ The Glances widget allows you to monitor the resources (CPU, memory, storage, te ```yaml - glances: - url: http://host.or.ip:port - username: user # optional if auth enabled in Glances - password: pass # optional if auth enabled in Glances - cpu: true # optional, enabled by default, disable by setting to false - mem: true # optional, enabled by default, disable by setting to false - cputemp: true # disabled by default - uptime: true # disabled by default - disk: / # disabled by default, use mount point of disk(s) in glances. Can also be a list (see below) - expanded: true # show the expanded view - label: MyMachine # optional + url: http://host.or.ip:port + username: user # optional if auth enabled in Glances + password: pass # optional if auth enabled in Glances + cpu: true # optional, enabled by default, disable by setting to false + mem: true # optional, enabled by default, disable by setting to false + cputemp: true # disabled by default + uptime: true # disabled by default + disk: / # disabled by default, use mount point of disk(s) in glances. Can also be a list (see below) + expanded: true # show the expanded view + label: MyMachine # optional ``` Multiple disks can be specified as: diff --git a/docs/widgets/info/greeting.md b/docs/widgets/info/greeting.md index 0902814a0..8a11290cd 100644 --- a/docs/widgets/info/greeting.md +++ b/docs/widgets/info/greeting.md @@ -7,8 +7,8 @@ This allows you to display simple text, can be configured like so: ```yaml - greeting: - text_size: xl - text: Greeting Text + text_size: xl + text: Greeting Text ``` Valid text sizes are `4xl`, `3xl`, `2xl`, `xl`, `md`, `sm`, `xs`. diff --git a/docs/widgets/info/kubernetes.md b/docs/widgets/info/kubernetes.md index d424a9c47..36096579a 100644 --- a/docs/widgets/info/kubernetes.md +++ b/docs/widgets/info/kubernetes.md @@ -9,23 +9,23 @@ It provides CPU and Memory usage, by node and/or at the cluster level. ```yaml - kubernetes: - cluster: - # Shows cluster-wide statistics - show: true - # Shows the aggregate CPU stats - cpu: true - # Shows the aggregate memory stats - memory: true - # Shows a custom label - showLabel: true - label: "cluster" - nodes: - # Shows node-specific statistics - show: true - # Shows the CPU for each node - cpu: true - # Shows the memory for each node - memory: true - # Shows the label, which is always the node name - showLabel: true + cluster: + # Shows cluster-wide statistics + show: true + # Shows the aggregate CPU stats + cpu: true + # Shows the aggregate memory stats + memory: true + # Shows a custom label + showLabel: true + label: "cluster" + nodes: + # Shows node-specific statistics + show: true + # Shows the CPU for each node + cpu: true + # Shows the memory for each node + memory: true + # Shows the label, which is always the node name + showLabel: true ``` diff --git a/docs/widgets/info/longhorn.md b/docs/widgets/info/longhorn.md index 4c7bbdbe4..e25c844b6 100644 --- a/docs/widgets/info/longhorn.md +++ b/docs/widgets/info/longhorn.md @@ -12,18 +12,18 @@ It can show the aggregate metrics and/or the individual node metrics. ```yaml - longhorn: - # Show the expanded view - expanded: true - # Shows a node representing the aggregate values - total: true - # Shows the node names as labels - labels: true - # Show the nodes - nodes: true - # An explicit list of nodes to show. All are shown by default if "nodes" is true - include: - - node1 - - node2 + # Show the expanded view + expanded: true + # Shows a node representing the aggregate values + total: true + # Shows the node names as labels + labels: true + # Show the nodes + nodes: true + # An explicit list of nodes to show. All are shown by default if "nodes" is true + include: + - node1 + - node2 ``` The Longhorn URL and credentials are stored in the `providers` section of the `settings.yaml`. diff --git a/docs/widgets/info/openmeteo.md b/docs/widgets/info/openmeteo.md index db1daac33..4cc49e269 100644 --- a/docs/widgets/info/openmeteo.md +++ b/docs/widgets/info/openmeteo.md @@ -7,12 +7,12 @@ No registration is required at all! See [https://open-meteo.com/en/docs](https:/ ```yaml - openmeteo: - label: Kyiv # optional - latitude: 50.449684 - longitude: 30.525026 - timezone: Europe/Kiev # optional - units: metric # or imperial - cache: 5 # Time in minutes to cache API responses, to stay within limits + label: Kyiv # optional + latitude: 50.449684 + longitude: 30.525026 + timezone: Europe/Kiev # optional + units: metric # or imperial + cache: 5 # Time in minutes to cache API responses, to stay within limits ``` 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/docs/widgets/info/openweathermap.md b/docs/widgets/info/openweathermap.md index 63e7295d2..8c9729882 100644 --- a/docs/widgets/info/openweathermap.md +++ b/docs/widgets/info/openweathermap.md @@ -7,13 +7,13 @@ The free tier "One Call API" is all thats required, you will need to [subscribe] ```yaml - openweathermap: - label: Kyiv #optional - latitude: 50.449684 - longitude: 30.525026 - units: metric # or imperial - provider: openweathermap - apiKey: youropenweathermapkey # required only if not using provider, this reveals api key in requests - cache: 5 # Time in minutes to cache API responses, to stay within limits + label: Kyiv #optional + latitude: 50.449684 + longitude: 30.525026 + units: metric # or imperial + provider: openweathermap + apiKey: youropenweathermapkey # required only if not using provider, this reveals api key in requests + cache: 5 # Time in minutes to cache API responses, to stay within limits ``` 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/docs/widgets/info/resources.md b/docs/widgets/info/resources.md index 43dea381a..fb4678bcb 100644 --- a/docs/widgets/info/resources.md +++ b/docs/widgets/info/resources.md @@ -15,26 +15,26 @@ _Note: unfortunately, the package used for getting CPU temp ([systeminformation] ```yaml - resources: - cpu: true - memory: true - disk: /disk/mount/path - cputemp: true - uptime: true - units: imperial # only used by cpu temp - refresh: 3000 # optional, in ms + cpu: true + memory: true + disk: /disk/mount/path + cputemp: true + uptime: true + units: imperial # only used by cpu temp + refresh: 3000 # optional, in ms ``` You can also pass a `label` option, which allows you to group resources under named sections, ```yaml - resources: - label: System - cpu: true - memory: true + label: System + cpu: true + memory: true - resources: - label: Storage - disk: /mnt/storage + label: Storage + disk: /mnt/storage ``` Which produces something like this, @@ -45,11 +45,11 @@ If you have more than a single disk and would like to group them together under ```yaml - resources: - label: Storage - disk: - - /mnt/storage - - /mnt/backup - - /mnt/media + label: Storage + disk: + - /mnt/storage + - /mnt/backup + - /mnt/media ``` To produce something like this, @@ -60,12 +60,12 @@ You can additionally supply an optional `expanded` property set to true in order ```yaml - resources: - label: Array Disks - expanded: true - disk: - - /disk1 - - /disk2 - - /disk3 + label: Array Disks + expanded: true + disk: + - /disk1 + - /disk2 + - /disk3 ``` ![194136533-c4238c82-4d67-41a4-b3c8-18bf26d33ac2](https://user-images.githubusercontent.com/3441425/194728642-a9885274-922b-4027-acf5-a746f58fdfce.png) diff --git a/docs/widgets/info/search.md b/docs/widgets/info/search.md index a03d711cb..a9851bb18 100644 --- a/docs/widgets/info/search.md +++ b/docs/widgets/info/search.md @@ -7,25 +7,25 @@ You can add a search bar to your top widget area that can search using Google, D ```yaml - search: - provider: google # google, duckduckgo, bing, baidu, brave or custom - focus: true # Optional, will set focus to the search bar on page load - target: _blank # One of _self, _blank, _parent or _top + provider: google # google, duckduckgo, bing, baidu, brave or custom + focus: true # Optional, will set focus to the search bar on page load + target: _blank # One of _self, _blank, _parent or _top ``` or for a custom search: ```yaml - search: - provider: custom - url: https://lougle.com/?q= - target: _blank + provider: custom + url: https://lougle.com/?q= + target: _blank ``` multiple providers is also supported via a dropdown (excluding custom): ```yaml - search: - provider: [brave, google, duckduckgo] + provider: [brave, google, duckduckgo] ``` _Added in v0.1.6, updated in 0.6.0_ diff --git a/docs/widgets/info/weather.md b/docs/widgets/info/weather.md index 338ca256e..4893089eb 100644 --- a/docs/widgets/info/weather.md +++ b/docs/widgets/info/weather.md @@ -9,12 +9,12 @@ The free tier is all thats required, you will need to [register](https://www.wea ```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 + 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 ``` 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/docs/widgets/services/adguard-home.md b/docs/widgets/services/adguard-home.md index 57fad6a61..af922f77f 100644 --- a/docs/widgets/services/adguard-home.md +++ b/docs/widgets/services/adguard-home.md @@ -9,8 +9,8 @@ Allowed fields: `["queries", "blocked", "filtered", "latency"]`. ```yaml widget: - type: adguard - url: http://adguard.host.or.ip - username: admin - password: password + type: adguard + url: http://adguard.host.or.ip + username: admin + password: password ``` diff --git a/docs/widgets/services/atsumeru.md b/docs/widgets/services/atsumeru.md index 06126f2e7..774322168 100644 --- a/docs/widgets/services/atsumeru.md +++ b/docs/widgets/services/atsumeru.md @@ -9,8 +9,8 @@ Allowed fields: `["series", "archives", "chapters", "categories"]`. ```yaml widget: - type: atsumeru - url: http://atsumeru.host.or.ip:port - username: username - password: password + type: atsumeru + url: http://atsumeru.host.or.ip:port + username: username + password: password ``` diff --git a/docs/widgets/services/audiobookshelf.md b/docs/widgets/services/audiobookshelf.md index 73e2b7447..10beec249 100644 --- a/docs/widgets/services/audiobookshelf.md +++ b/docs/widgets/services/audiobookshelf.md @@ -9,7 +9,7 @@ Allowed fields: `["podcasts", "podcastsDuration", "books", "booksDuration"]` ```yaml widget: - type: audiobookshelf - url: http://audiobookshelf.host.or.ip:port - key: audiobookshelflapikey + type: audiobookshelf + url: http://audiobookshelf.host.or.ip:port + key: audiobookshelflapikey ``` diff --git a/docs/widgets/services/authentik.md b/docs/widgets/services/authentik.md index 306107e0b..b3f8cdd6d 100644 --- a/docs/widgets/services/authentik.md +++ b/docs/widgets/services/authentik.md @@ -18,7 +18,7 @@ Allowed fields: `["users", "loginsLast24H", "failedLoginsLast24H"]`. ```yaml widget: - type: authentik - url: http://authentik.host.or.ip:22070 - key: api_token + type: authentik + url: http://authentik.host.or.ip:22070 + key: api_token ``` diff --git a/docs/widgets/services/autobrr.md b/docs/widgets/services/autobrr.md index ba034d2ae..d41d7c324 100644 --- a/docs/widgets/services/autobrr.md +++ b/docs/widgets/services/autobrr.md @@ -9,7 +9,7 @@ Allowed fields: `["approvedPushes", "rejectedPushes", "filters", "indexers"]`. ```yaml widget: - type: autobrr - url: http://autobrr.host.or.ip - key: apikeyapikeyapikeyapikeyapikey + type: autobrr + url: http://autobrr.host.or.ip + key: apikeyapikeyapikeyapikeyapikey ``` diff --git a/docs/widgets/services/azuredevops.md b/docs/widgets/services/azuredevops.md index a9142731d..32ff22967 100644 --- a/docs/widgets/services/azuredevops.md +++ b/docs/widgets/services/azuredevops.md @@ -15,12 +15,12 @@ You will need to generate a personal access token for an existing user, see the ```yaml widget: - type: azuredevops - organization: myOrganization - project: myProject - definitionId: pipelineDefinitionId # required for pipelines - branchName: branchName # optional for pipelines, leave empty for all - userEmail: email # required for pull requests - repositoryId: prRepositoryId # required for pull requests - key: personalaccesstoken + type: azuredevops + organization: myOrganization + project: myProject + definitionId: pipelineDefinitionId # required for pipelines + branchName: branchName # optional for pipelines, leave empty for all + userEmail: email # required for pull requests + repositoryId: prRepositoryId # required for pull requests + key: personalaccesstoken ``` diff --git a/docs/widgets/services/bazarr.md b/docs/widgets/services/bazarr.md index 3a48821e3..ac1a95c8e 100644 --- a/docs/widgets/services/bazarr.md +++ b/docs/widgets/services/bazarr.md @@ -9,7 +9,7 @@ Allowed fields: `["missingEpisodes", "missingMovies"]`. ```yaml widget: - type: bazarr - url: http://bazarr.host.or.ip - key: apikeyapikeyapikeyapikeyapikey + type: bazarr + url: http://bazarr.host.or.ip + key: apikeyapikeyapikeyapikeyapikey ``` diff --git a/docs/widgets/services/caddy.md b/docs/widgets/services/caddy.md index 52c1d4620..c85d1d9ad 100644 --- a/docs/widgets/services/caddy.md +++ b/docs/widgets/services/caddy.md @@ -7,6 +7,6 @@ Allowed fields: `["upstreams", "requests", "requests_failed"]`. ```yaml widget: - type: caddy - url: http://caddy.host.or.ip:adminport # default admin port is 2019 + type: caddy + url: http://caddy.host.or.ip:adminport # default admin port is 2019 ``` diff --git a/docs/widgets/services/calibre-web.md b/docs/widgets/services/calibre-web.md index f9090f8d3..5de503e6e 100644 --- a/docs/widgets/services/calibre-web.md +++ b/docs/widgets/services/calibre-web.md @@ -9,8 +9,8 @@ Allowed fields: `["books", "authors", "categories", "series"]`. ```yaml widget: - type: calibreweb - url: http://your.calibreweb.host:port - username: username - password: password + type: calibreweb + url: http://your.calibreweb.host:port + username: username + password: password ``` diff --git a/docs/widgets/services/changedetectionio.md b/docs/widgets/services/changedetectionio.md index 674db9a89..060043fde 100644 --- a/docs/widgets/services/changedetectionio.md +++ b/docs/widgets/services/changedetectionio.md @@ -7,7 +7,7 @@ Find your API key under `Settings > API`. ```yaml widget: - type: changedetectionio - url: http://changedetection.host.or.ip:port - key: apikeyapikeyapikeyapikeyapikey + type: changedetectionio + url: http://changedetection.host.or.ip:port + key: apikeyapikeyapikeyapikeyapikey ``` diff --git a/docs/widgets/services/channelsdvrserver.md b/docs/widgets/services/channelsdvrserver.md index 390df42c9..59edaac52 100644 --- a/docs/widgets/services/channelsdvrserver.md +++ b/docs/widgets/services/channelsdvrserver.md @@ -5,6 +5,6 @@ description: Channels DVR Server Widget Configuration ```yaml widget: - type: channelsdvrserver - url: http://192.168.1.55:8089 + type: channelsdvrserver + url: http://192.168.1.55:8089 ``` diff --git a/docs/widgets/services/cloudflared.md b/docs/widgets/services/cloudflared.md index 3212a2788..663d0d6ea 100644 --- a/docs/widgets/services/cloudflared.md +++ b/docs/widgets/services/cloudflared.md @@ -9,8 +9,8 @@ Allowed fields: `["status", "origin_ip"]`. ```yaml widget: - type: cloudflared - accountid: accountid # from zero trust dashboard url e.g. https://one.dash.cloudflare.com//home/quick-start - tunnelid: tunnelid # found in tunnels dashboard under the tunnel name - key: cloudflareapitoken # api token with `Account.Cloudflare Tunnel:Read` https://dash.cloudflare.com/profile/api-tokens + type: cloudflared + accountid: accountid # from zero trust dashboard url e.g. https://one.dash.cloudflare.com//home/quick-start + tunnelid: tunnelid # found in tunnels dashboard under the tunnel name + key: cloudflareapitoken # api token with `Account.Cloudflare Tunnel:Read` https://dash.cloudflare.com/profile/api-tokens ``` diff --git a/docs/widgets/services/coin-market-cap.md b/docs/widgets/services/coin-market-cap.md index caa6ffc48..558482a1e 100644 --- a/docs/widgets/services/coin-market-cap.md +++ b/docs/widgets/services/coin-market-cap.md @@ -9,18 +9,18 @@ Allowed fields: no configurable fields for this widget. ```yaml widget: - type: coinmarketcap - currency: GBP # Optional - symbols: [BTC, LTC, ETH] - key: apikeyapikeyapikeyapikeyapikey - defaultinterval: 7d # Optional + type: coinmarketcap + currency: GBP # Optional + symbols: [BTC, LTC, ETH] + key: apikeyapikeyapikeyapikeyapikey + defaultinterval: 7d # Optional ``` You can also specify slugs instead of symbols (since symbols aren't garaunteed to be unique). If you supply both, slugs will be used. For example: ```yaml widget: - type: coinmarketcap - slugs: [chia-network, uniswap] - key: apikeyapikeyapikeyapikeyapikey + type: coinmarketcap + slugs: [chia-network, uniswap] + key: apikeyapikeyapikeyapikeyapikey ``` diff --git a/docs/widgets/services/customapi.md b/docs/widgets/services/customapi.md index 79ffc6fe2..034af934e 100644 --- a/docs/widgets/services/customapi.md +++ b/docs/widgets/services/customapi.md @@ -9,28 +9,28 @@ Fields need to be defined in the `mappings` section YAML object to correlate wit ```yaml widget: - type: customapi - url: http://custom.api.host.or.ip:port/path/to/exact/api/endpoint - refreshInterval: 10000 # optional - in milliseconds, defaults to 10s - username: username # auth - optional - password: password # auth - optional - method: GET # optional, e.g. POST - headers: # optional, must be object, see below - mappings: - - field: key # needs to be YAML string or object - label: Field 1 - format: text # optional - defaults to text - - field: # needs to be YAML string or object - path: - to: key2 - format: number # optional - defaults to text - label: Field 2 - - field: # needs to be YAML string or object - path: - to: - another: key3 - label: Field 3 - format: percent # optional - defaults to text + type: customapi + url: http://custom.api.host.or.ip:port/path/to/exact/api/endpoint + refreshInterval: 10000 # optional - in milliseconds, defaults to 10s + username: username # auth - optional + password: password # auth - optional + method: GET # optional, e.g. POST + headers: # optional, must be object, see below + mappings: + - field: key # needs to be YAML string or object + label: Field 1 + format: text # optional - defaults to text + - field: # needs to be YAML string or object + path: + to: key2 + format: number # optional - defaults to text + label: Field 2 + - field: # needs to be YAML string or object + path: + to: + another: key3 + label: Field 3 + format: percent # optional - defaults to text ``` Supported formats for the values are `text`, `number`, `float`, `percent`, `bytes` and `bitrate`. @@ -41,22 +41,22 @@ For the following JSON object from the API: ```json { - "id": 1, - "name": "Rick Sanchez", - "status": "Alive", - "species": "Human", - "gender": "Male", - "origin": { - "name": "Earth (C-137)" + "id": 1, + "name": "Rick Sanchez", + "status": "Alive", + "species": "Human", + "gender": "Male", + "origin": { + "name": "Earth (C-137)" + }, + "locations": [ + { + "name": "Earth (C-137)" }, - "locations": [ - { - "name": "Earth (C-137)" - }, - { - "name": "Citadel of Ricks" - } - ] + { + "name": "Citadel of Ricks" + } + ] } ``` @@ -64,17 +64,17 @@ Define the `mappings` section as an aray, for example: ```yaml mappings: - - field: name # Rick Sanchez - label: Name - - field: status # Alive - label: Status - - field: - origin: name # Earth (C-137) - label: Origin - - field: - locations: - 1: name # Citadel of Ricks - label: Location + - field: name # Rick Sanchez + label: Name + - field: status # Alive + label: Status + - field: + origin: name # Earth (C-137) + label: Origin + - field: + locations: + 1: name # Citadel of Ricks + label: Location ``` ## Data Transformation @@ -86,12 +86,12 @@ You can manipulate data with the following tools `remap`, `scale` and `suffix`, label: Field 4 format: text remap: - - value: 0 - to: None - - value: 1 - to: Connected - - any: true # will map all other values - to: Unknown + - value: 0 + to: None + - value: 1 + to: Connected + - any: true # will map all other values + to: Unknown - field: key5 label: Power format: float @@ -105,5 +105,5 @@ Pass custom headers using the `headers` option, for example: ```yaml headers: - X-API-Token: token + X-API-Token: token ``` diff --git a/docs/widgets/services/deluge.md b/docs/widgets/services/deluge.md index 2ce7023f8..9408ea2a6 100644 --- a/docs/widgets/services/deluge.md +++ b/docs/widgets/services/deluge.md @@ -9,7 +9,7 @@ Allowed fields: `["leech", "download", "seed", "upload"]`. ```yaml widget: - type: deluge - url: http://deluge.host.or.ip - password: password # webui password + type: deluge + url: http://deluge.host.or.ip + password: password # webui password ``` diff --git a/docs/widgets/services/diskstation.md b/docs/widgets/services/diskstation.md index 571630632..29936d30e 100644 --- a/docs/widgets/services/diskstation.md +++ b/docs/widgets/services/diskstation.md @@ -17,9 +17,9 @@ To access these system metrics you need to connect to the DiskStation with an ac 4. On the `Permissions` tab check the top box for `No Access`, effectively prohibiting the user from accessing anything in the shared folders. 5. Under `Applications` check the box next to `Deny` in the header to explicitly prohibit login to all applications. 6. Now _only_ allow login to the `Download Station` application, either by - - unchecking `Deny` in the respective row, or (if inheriting permission doesn't work because of other group settings) - - checking `Allow` for this app, or - - checking `By IP` for this app to limit the source of login attempts to one or more IP addresses/subnets. + - unchecking `Deny` in the respective row, or (if inheriting permission doesn't work because of other group settings) + - checking `Allow` for this app, or + - checking `By IP` for this app to limit the source of login attempts to one or more IP addresses/subnets. 7. When the `Preview` column shows `Allow` in the `Download Station` row, click `Save`. Now configure the widget with the correct login information and test it. @@ -28,9 +28,9 @@ If you encounter issues during testing, make sure to uncheck the option for auto ```yaml widget: - type: diskstation - url: http://diskstation.host.or.ip:port - username: username - password: password - volume: volume_N # optional + type: diskstation + url: http://diskstation.host.or.ip:port + username: username + password: password + volume: volume_N # optional ``` diff --git a/docs/widgets/services/downloadstation.md b/docs/widgets/services/downloadstation.md index f97dd7fb5..22bb8da98 100644 --- a/docs/widgets/services/downloadstation.md +++ b/docs/widgets/services/downloadstation.md @@ -9,8 +9,8 @@ Allowed fields: `["leech", "download", "seed", "upload"]`. ```yaml widget: - type: downloadstation - url: http://downloadstation.host.or.ip:port - username: username - password: password + type: downloadstation + url: http://downloadstation.host.or.ip:port + username: username + password: password ``` diff --git a/docs/widgets/services/emby.md b/docs/widgets/services/emby.md index 52b9e8877..fb922d76e 100644 --- a/docs/widgets/services/emby.md +++ b/docs/widgets/services/emby.md @@ -9,9 +9,9 @@ As of v0.6.11 the widget supports fields `["movies", "series", "episodes", "song ```yaml widget: - type: emby - url: http://emby.host.or.ip - key: apikeyapikeyapikeyapikeyapikey - enableBlocks: true # optional, defaults to false - enableNowPlaying: true # optional, defaults to true + type: emby + url: http://emby.host.or.ip + key: apikeyapikeyapikeyapikeyapikey + enableBlocks: true # optional, defaults to false + enableNowPlaying: true # optional, defaults to true ``` diff --git a/docs/widgets/services/evcc.md b/docs/widgets/services/evcc.md index 5fbbdf91a..a3b95ba73 100644 --- a/docs/widgets/services/evcc.md +++ b/docs/widgets/services/evcc.md @@ -7,6 +7,6 @@ Allowed fields: `["pv_power", "grid_power", "home_power", "charge_power]`. ```yaml widget: - type: evcc - url: http://evcc.host.or.ip:port + type: evcc + url: http://evcc.host.or.ip:port ``` diff --git a/docs/widgets/services/fileflows.md b/docs/widgets/services/fileflows.md index 46762f333..2679cbd7f 100644 --- a/docs/widgets/services/fileflows.md +++ b/docs/widgets/services/fileflows.md @@ -7,6 +7,6 @@ Allowed fields: `["queue", "processing", "processed", "time"]`. ```yaml widget: - type: fileflows - url: http://your.fileflows.host:port + type: fileflows + url: http://your.fileflows.host:port ``` diff --git a/docs/widgets/services/flood.md b/docs/widgets/services/flood.md index f9b8285bd..8585fedb3 100644 --- a/docs/widgets/services/flood.md +++ b/docs/widgets/services/flood.md @@ -7,8 +7,8 @@ Allowed fields: `["leech", "download", "seed", "upload"]`. ```yaml widget: - type: flood - url: http://flood.host.or.ip - username: username # if set - password: password # if set + type: flood + url: http://flood.host.or.ip + username: username # if set + password: password # if set ``` diff --git a/docs/widgets/services/freshrss.md b/docs/widgets/services/freshrss.md index a5e2c7d96..d9e8834f6 100644 --- a/docs/widgets/services/freshrss.md +++ b/docs/widgets/services/freshrss.md @@ -9,8 +9,8 @@ Allowed fields: `["subscriptions", "unread"]`. ```yaml widget: - type: freshrss - url: http://freshrss.host.or.ip:port - username: username - password: password + type: freshrss + url: http://freshrss.host.or.ip:port + username: username + password: password ``` diff --git a/docs/widgets/services/gamedig.md b/docs/widgets/services/gamedig.md index 2157c8867..d287f69a5 100644 --- a/docs/widgets/services/gamedig.md +++ b/docs/widgets/services/gamedig.md @@ -9,7 +9,7 @@ Allowed fields (limited to a max of 4): `["status", "name", "map", "currentPlaye ```yaml widget: - type: gamedig - serverType: csgo # see https://github.com/gamedig/node-gamedig#games-list - url: udp://server.host.or.ip:port + type: gamedig + serverType: csgo # see https://github.com/gamedig/node-gamedig#games-list + url: udp://server.host.or.ip:port ``` diff --git a/docs/widgets/services/ghostfolio.md b/docs/widgets/services/ghostfolio.md index ca91a6100..554e68432 100644 --- a/docs/widgets/services/ghostfolio.md +++ b/docs/widgets/services/ghostfolio.md @@ -17,7 +17,7 @@ Allowed fields: `["gross_percent_today", "gross_percent_1y", "gross_percent_max" ```yaml widget: - type: ghostfolio - url: http://ghostfoliohost:port - key: ghostfoliobearertoken + type: ghostfolio + url: http://ghostfoliohost:port + key: ghostfoliobearertoken ``` diff --git a/docs/widgets/services/gluetun.md b/docs/widgets/services/gluetun.md index 08b5c70b7..89d0057b1 100644 --- a/docs/widgets/services/gluetun.md +++ b/docs/widgets/services/gluetun.md @@ -9,6 +9,6 @@ Allowed fields: `["public_ip", "region", "country"]`. ```yaml widget: - type: gluetun - url: http://gluetun.host.or.ip + type: gluetun + url: http://gluetun.host.or.ip ``` diff --git a/docs/widgets/services/gotify.md b/docs/widgets/services/gotify.md index 1eb16c03e..871eefaaa 100644 --- a/docs/widgets/services/gotify.md +++ b/docs/widgets/services/gotify.md @@ -9,7 +9,7 @@ Allowed fields: `["apps", "clients", "messages"]`. ```yaml widget: - type: gotify - url: http://gotify.host.or.ip - key: clientoken + type: gotify + url: http://gotify.host.or.ip + key: clientoken ``` diff --git a/docs/widgets/services/grafana.md b/docs/widgets/services/grafana.md index 5d3aab9eb..bfdebb2cc 100644 --- a/docs/widgets/services/grafana.md +++ b/docs/widgets/services/grafana.md @@ -7,8 +7,8 @@ Allowed fields: `["dashboards", "datasources", "totalalerts", "alertstriggered"] ```yaml widget: - type: grafana - url: http://grafana.host.or.ip:port - username: username - password: password + type: grafana + url: http://grafana.host.or.ip:port + username: username + password: password ``` diff --git a/docs/widgets/services/hdhomerun.md b/docs/widgets/services/hdhomerun.md index 850deea5a..c862200e0 100644 --- a/docs/widgets/services/hdhomerun.md +++ b/docs/widgets/services/hdhomerun.md @@ -7,6 +7,6 @@ Allowed fields: `["channels", "hd"]`. ```yaml widget: - type: hdhomerun - url: http://hdhomerun.host.or.ip + type: hdhomerun + url: http://hdhomerun.host.or.ip ``` diff --git a/docs/widgets/services/healthchecks.md b/docs/widgets/services/healthchecks.md index c8effa924..ae8f1e269 100644 --- a/docs/widgets/services/healthchecks.md +++ b/docs/widgets/services/healthchecks.md @@ -13,8 +13,8 @@ Allowed fields: `["status", "last_ping"]`. ```yaml widget: - type: healthchecks - url: http://healthchecks.host.or.ip:port - key: - uuid: + type: healthchecks + url: http://healthchecks.host.or.ip:port + key: + uuid: ``` diff --git a/docs/widgets/services/homeassistant.md b/docs/widgets/services/homeassistant.md index f792511c7..8d8b04e95 100644 --- a/docs/widgets/services/homeassistant.md +++ b/docs/widgets/services/homeassistant.md @@ -12,25 +12,25 @@ Allowed fields: `["people_home", "lights_on", "switches_on"]`. Up to a maximum of four custom states and/or templates can be queried via the `custom` property like in the example below. The `custom` property will have no effect as long as the `fields` property is defined. -- `state` will query the state of the specified `entity_id` - - state labels and values can be user defined and may reference entity attributes in curly brackets - - if no state label is defined it will default to `"{attributes.friendly_name}"` - - if no state value is defined it will default to `"{state} {attributes.unit_of_measurement}"` -- `template` will query the specified template, see (Home Assistant Templating)[https://www.home-assistant.io/docs/configuration/templating] - - if no template label is defined it will be empty +- `state` will query the state of the specified `entity_id` + - state labels and values can be user defined and may reference entity attributes in curly brackets + - if no state label is defined it will default to `"{attributes.friendly_name}"` + - if no state value is defined it will default to `"{state} {attributes.unit_of_measurement}"` +- `template` will query the specified template, see (Home Assistant Templating)[https://www.home-assistant.io/docs/configuration/templating] + - if no template label is defined it will be empty ```yaml widget: - type: homeassistant - url: http://homeassistant.host.or.ip:port - key: access_token - custom: - - state: sensor.total_power - - state: sensor.total_energy_today - label: energy today - - template: "{{ states.switch|selectattr('state','equalto','on')|list|length }}" - label: switches on - - state: weather.forecast_home - label: wind speed - value: "{attributes.wind_speed} {attributes.wind_speed_unit}" + type: homeassistant + url: http://homeassistant.host.or.ip:port + key: access_token + custom: + - state: sensor.total_power + - state: sensor.total_energy_today + label: energy today + - template: "{{ states.switch|selectattr('state','equalto','on')|list|length }}" + label: switches on + - state: weather.forecast_home + label: wind speed + value: "{attributes.wind_speed} {attributes.wind_speed_unit}" ``` diff --git a/docs/widgets/services/homebridge.md b/docs/widgets/services/homebridge.md index bd6acaf8b..d71ca93be 100644 --- a/docs/widgets/services/homebridge.md +++ b/docs/widgets/services/homebridge.md @@ -9,8 +9,8 @@ Allowed fields: `["updates", "child_bridges"]`. ```yaml widget: - type: homebridge - url: http://homebridge.host.or.ip:port - username: username - password: password + type: homebridge + url: http://homebridge.host.or.ip:port + username: username + password: password ``` diff --git a/docs/widgets/services/immich.md b/docs/widgets/services/immich.md index 007d33032..6fd37e513 100644 --- a/docs/widgets/services/immich.md +++ b/docs/widgets/services/immich.md @@ -9,7 +9,7 @@ Note that API key must be from admin user. ```yaml widget: - type: immich - url: http://immich.host.or.ip - key: adminapikeyadminapikeyadminapikey + type: immich + url: http://immich.host.or.ip + key: adminapikeyadminapikeyadminapikey ``` diff --git a/docs/widgets/services/jackett.md b/docs/widgets/services/jackett.md index cdbb76387..91c58b28d 100644 --- a/docs/widgets/services/jackett.md +++ b/docs/widgets/services/jackett.md @@ -9,6 +9,6 @@ Allowed fields: `["configured", "errored"]`. ```yaml widget: - type: jackett - url: http://jackett.host.or.ip + type: jackett + url: http://jackett.host.or.ip ``` diff --git a/docs/widgets/services/jdownloader.md b/docs/widgets/services/jdownloader.md index bced032e6..31469fb9d 100644 --- a/docs/widgets/services/jdownloader.md +++ b/docs/widgets/services/jdownloader.md @@ -9,8 +9,8 @@ Allowed fields: `["downloadCount", "downloadTotalBytes","downloadBytesRemaining" ```yaml widget: - type: jdownloader - username: JDownloader Username - password: JDownloader Password - client: Name of JDownloader Instance + type: jdownloader + username: JDownloader Username + password: JDownloader Password + client: Name of JDownloader Instance ``` diff --git a/docs/widgets/services/jellyfin.md b/docs/widgets/services/jellyfin.md index 14f97c63d..cc9617891 100644 --- a/docs/widgets/services/jellyfin.md +++ b/docs/widgets/services/jellyfin.md @@ -9,9 +9,9 @@ As of v0.6.11 the widget supports fields `["movies", "series", "episodes", "song ```yaml widget: - type: jellyfin - url: http://jellyfin.host.or.ip - key: apikeyapikeyapikeyapikeyapikey - enableBlocks: true # optional, defaults to false - enableNowPlaying: true # optional, defaults to true + type: jellyfin + url: http://jellyfin.host.or.ip + key: apikeyapikeyapikeyapikeyapikey + enableBlocks: true # optional, defaults to false + enableNowPlaying: true # optional, defaults to true ``` diff --git a/docs/widgets/services/jellyseerr.md b/docs/widgets/services/jellyseerr.md index 57267845a..f6e071d85 100644 --- a/docs/widgets/services/jellyseerr.md +++ b/docs/widgets/services/jellyseerr.md @@ -9,7 +9,7 @@ Allowed fields: `["pending", "approved", "available"]`. ```yaml widget: - type: jellyseerr - url: http://jellyseerr.host.or.ip - key: apikeyapikeyapikeyapikeyapikey + type: jellyseerr + url: http://jellyseerr.host.or.ip + key: apikeyapikeyapikeyapikeyapikey ``` diff --git a/docs/widgets/services/kavita.md b/docs/widgets/services/kavita.md index 4c2b90e46..59bc91d4a 100644 --- a/docs/widgets/services/kavita.md +++ b/docs/widgets/services/kavita.md @@ -9,8 +9,8 @@ Allowed fields: `["seriesCount", "totalFiles"]`. ```yaml widget: - type: kavita - url: http://kavita.host.or.ip:port - username: username - password: password + type: kavita + url: http://kavita.host.or.ip:port + username: username + password: password ``` diff --git a/docs/widgets/services/komga.md b/docs/widgets/services/komga.md index 0f972d715..a05f67d93 100644 --- a/docs/widgets/services/komga.md +++ b/docs/widgets/services/komga.md @@ -9,8 +9,8 @@ Allowed fields: `["libraries", "series", "books"]`. ```yaml widget: - type: komga - url: http://komga.host.or.ip:port - username: username - password: password + type: komga + url: http://komga.host.or.ip:port + username: username + password: password ``` diff --git a/docs/widgets/services/kopia.md b/docs/widgets/services/kopia.md index 304e640ac..00f1ff701 100644 --- a/docs/widgets/services/kopia.md +++ b/docs/widgets/services/kopia.md @@ -9,10 +9,10 @@ You may optionally pass values for `snapshotHost` and / or `snapshotPath` to sel ```yaml widget: - type: kopia - url: http://kopia.host.or.ip:port - username: username - password: password - snapshotHost: hostname # optional - snapshotPath: path # optional + type: kopia + url: http://kopia.host.or.ip:port + username: username + password: password + snapshotHost: hostname # optional + snapshotPath: path # optional ``` diff --git a/docs/widgets/services/lidarr.md b/docs/widgets/services/lidarr.md index 3c7fe48f6..b6c1e34b1 100644 --- a/docs/widgets/services/lidarr.md +++ b/docs/widgets/services/lidarr.md @@ -9,7 +9,7 @@ Allowed fields: `["wanted", "queued", "artists"]`. ```yaml widget: - type: lidarr - url: http://lidarr.host.or.ip - key: apikeyapikeyapikeyapikeyapikey + type: lidarr + url: http://lidarr.host.or.ip + key: apikeyapikeyapikeyapikeyapikey ``` diff --git a/docs/widgets/services/mastodon.md b/docs/widgets/services/mastodon.md index 1195af4b5..5a0ed703c 100644 --- a/docs/widgets/services/mastodon.md +++ b/docs/widgets/services/mastodon.md @@ -9,6 +9,6 @@ Allowed fields: `["user_count", "status_count", "domain_count"]`. ```yaml widget: - type: mastodon - url: https://mastodon.host.name + type: mastodon + url: https://mastodon.host.name ``` diff --git a/docs/widgets/services/mealie.md b/docs/widgets/services/mealie.md index 3167e812c..cb7b957fb 100644 --- a/docs/widgets/services/mealie.md +++ b/docs/widgets/services/mealie.md @@ -9,7 +9,7 @@ Allowed fields: `["recipes", "users", "categories", "tags"]`. ```yaml widget: - type: mealie - url: http://mealie-frontend.host.or.ip - key: mealieapitoken + type: mealie + url: http://mealie-frontend.host.or.ip + key: mealieapitoken ``` diff --git a/docs/widgets/services/medusa.md b/docs/widgets/services/medusa.md index 27b0f1d25..d9b37fed2 100644 --- a/docs/widgets/services/medusa.md +++ b/docs/widgets/services/medusa.md @@ -7,7 +7,7 @@ Allowed fields: `["wanted", "queued", "series"]`. ```yaml widget: - type: medusa - url: http://medusa.host.or.ip:port - key: medusaapikeyapikeyapikeyapikeyapikey + type: medusa + url: http://medusa.host.or.ip:port + key: medusaapikeyapikeyapikeyapikeyapikey ``` diff --git a/docs/widgets/services/mikrotik.md b/docs/widgets/services/mikrotik.md index 18371217b..4e3877456 100644 --- a/docs/widgets/services/mikrotik.md +++ b/docs/widgets/services/mikrotik.md @@ -9,8 +9,8 @@ Allowed fields: `["uptime", "cpuLoad", "memoryUsed", "numberOfLeases"]`. ```yaml widget: - type: mikrotik - url: https://mikrotik.host.or.ip - username: username - password: password + type: mikrotik + url: https://mikrotik.host.or.ip + username: username + password: password ``` diff --git a/docs/widgets/services/minecraft.md b/docs/widgets/services/minecraft.md index 2d15f1f54..44d860c85 100644 --- a/docs/widgets/services/minecraft.md +++ b/docs/widgets/services/minecraft.md @@ -7,6 +7,6 @@ Allowed fields: `["players", "version", "status"]`. ```yaml widget: - type: minecraft - url: udp://minecraftserveripordomain:port + type: minecraft + url: udp://minecraftserveripordomain:port ``` diff --git a/docs/widgets/services/miniflux.md b/docs/widgets/services/miniflux.md index 1327dd637..0b1dfc872 100644 --- a/docs/widgets/services/miniflux.md +++ b/docs/widgets/services/miniflux.md @@ -9,7 +9,7 @@ Allowed fields: `["unread", "read"]`. ```yaml widget: - type: miniflux - url: http://miniflux.host.or.ip:port - key: minifluxapikey + type: miniflux + url: http://miniflux.host.or.ip:port + key: minifluxapikey ``` diff --git a/docs/widgets/services/mjpeg.md b/docs/widgets/services/mjpeg.md index 2fefbec64..e0e912d03 100644 --- a/docs/widgets/services/mjpeg.md +++ b/docs/widgets/services/mjpeg.md @@ -9,6 +9,6 @@ Pass the stream URL from a service like [µStreamer](https://github.com/pikvm/us ```yaml widget: - type: mjpeg - stream: http://mjpeg.host.or.ip/webcam/stream + type: mjpeg + stream: http://mjpeg.host.or.ip/webcam/stream ``` diff --git a/docs/widgets/services/moonraker.md b/docs/widgets/services/moonraker.md index 83293df24..e3374e608 100644 --- a/docs/widgets/services/moonraker.md +++ b/docs/widgets/services/moonraker.md @@ -7,6 +7,6 @@ Allowed fields: `["printer_state", "print_status", "print_progress", "layers"]`. ```yaml widget: - type: moonraker - url: http://moonraker.host.or.ip:port + type: moonraker + url: http://moonraker.host.or.ip:port ``` diff --git a/docs/widgets/services/mylar.md b/docs/widgets/services/mylar.md index dc49d0368..9ec1397f9 100644 --- a/docs/widgets/services/mylar.md +++ b/docs/widgets/services/mylar.md @@ -9,7 +9,7 @@ Allowed fields: `["series", "issues", "wanted"]`. ```yaml widget: - type: mylar - url: http://mylar3.host.or.ip:port - key: yourmylar3apikey + type: mylar + url: http://mylar3.host.or.ip:port + key: yourmylar3apikey ``` diff --git a/docs/widgets/services/navidrome.md b/docs/widgets/services/navidrome.md index 87e45dca0..bb57f635e 100644 --- a/docs/widgets/services/navidrome.md +++ b/docs/widgets/services/navidrome.md @@ -9,9 +9,9 @@ Allowed fields: no configurable fields for this widget. ```yaml widget: - type: navidrome - url: http://navidrome.host.or.ip:port - user: username - token: token #md5(password + salt) - salt: randomsalt + type: navidrome + url: http://navidrome.host.or.ip:port + user: username + token: token #md5(password + salt) + salt: randomsalt ``` diff --git a/docs/widgets/services/nextcloud.md b/docs/widgets/services/nextcloud.md index 1ef107b59..1e9d53f90 100644 --- a/docs/widgets/services/nextcloud.md +++ b/docs/widgets/services/nextcloud.md @@ -11,15 +11,15 @@ Note "cpuload" and "memoryusage" were deprecated in v0.6.18 and a maximum of 4 f ```yaml widget: - type: nextcloud - url: https://nextcloud.host.or.ip:port - key: token + type: nextcloud + url: https://nextcloud.host.or.ip:port + key: token ``` ```yaml widget: - type: nextcloud - url: https://nextcloud.host.or.ip:port - username: username - password: password + type: nextcloud + url: https://nextcloud.host.or.ip:port + username: username + password: password ``` diff --git a/docs/widgets/services/nextdns.md b/docs/widgets/services/nextdns.md index 5ba73c370..b646c11db 100644 --- a/docs/widgets/services/nextdns.md +++ b/docs/widgets/services/nextdns.md @@ -7,7 +7,7 @@ Api key is found under Account > API, profile ID is found under Setup > Endpoint ```yaml widget: - type: nextdns - profile: profileid - key: yourapikeyhere + type: nextdns + profile: profileid + key: yourapikeyhere ``` diff --git a/docs/widgets/services/nginx-proxy-manager.md b/docs/widgets/services/nginx-proxy-manager.md index eb77a3ab9..dc201627a 100644 --- a/docs/widgets/services/nginx-proxy-manager.md +++ b/docs/widgets/services/nginx-proxy-manager.md @@ -9,8 +9,8 @@ Allowed fields: `["enabled", "disabled", "total"]`. ```yaml widget: - type: npm - url: http://npm.host.or.ip - username: admin_username - password: admin_password + type: npm + url: http://npm.host.or.ip + username: admin_username + password: admin_password ``` diff --git a/docs/widgets/services/nzbget.md b/docs/widgets/services/nzbget.md index 36903e9bf..f069910a2 100644 --- a/docs/widgets/services/nzbget.md +++ b/docs/widgets/services/nzbget.md @@ -9,8 +9,8 @@ Allowed fields: `["rate", "remaining", "downloaded"]`. ```yaml widget: - type: nzbget - url: http://nzbget.host.or.ip - username: controlusername - password: controlpassword + type: nzbget + url: http://nzbget.host.or.ip + username: controlusername + password: controlpassword ``` diff --git a/docs/widgets/services/octoprint.md b/docs/widgets/services/octoprint.md index 7dba46ace..7688e13fa 100644 --- a/docs/widgets/services/octoprint.md +++ b/docs/widgets/services/octoprint.md @@ -7,7 +7,7 @@ Allowed fields: `["printer_state", "temp_tool", "temp_bed", "job_completion"]`. ```yaml widget: - type: octoprint - url: http://octoprint.host.or.ip:port - key: youroctoprintapikey + type: octoprint + url: http://octoprint.host.or.ip:port + key: youroctoprintapikey ``` diff --git a/docs/widgets/services/omada.md b/docs/widgets/services/omada.md index 907704107..f42e73a6c 100644 --- a/docs/widgets/services/omada.md +++ b/docs/widgets/services/omada.md @@ -9,9 +9,9 @@ Allowed fields: `["connectedAp", "activeUser", "alerts", "connectedGateways", "c ```yaml widget: - type: omada - url: http://omada.host.or.ip:port - username: username - password: password - site: sitename + type: omada + url: http://omada.host.or.ip:port + username: username + password: password + site: sitename ``` diff --git a/docs/widgets/services/ombi.md b/docs/widgets/services/ombi.md index 97c22ef18..de2708d09 100644 --- a/docs/widgets/services/ombi.md +++ b/docs/widgets/services/ombi.md @@ -9,7 +9,7 @@ Allowed fields: `["pending", "approved", "available"]`. ```yaml widget: - type: ombi - url: http://ombi.host.or.ip - key: apikeyapikeyapikeyapikeyapikey + type: ombi + url: http://ombi.host.or.ip + key: apikeyapikeyapikeyapikeyapikey ``` diff --git a/docs/widgets/services/opendtu.md b/docs/widgets/services/opendtu.md index 81a924684..6a6111cce 100644 --- a/docs/widgets/services/opendtu.md +++ b/docs/widgets/services/opendtu.md @@ -7,6 +7,6 @@ Allowed fields: `["yieldDay", "relativePower", "absolutePower", "limit"]`. ```yaml widget: - type: opendtu - url: http://opendtu.host.or.ip + type: opendtu + url: http://opendtu.host.or.ip ``` diff --git a/docs/widgets/services/openmediavault.md b/docs/widgets/services/openmediavault.md index 67fe7b892..43ff2dea6 100644 --- a/docs/widgets/services/openmediavault.md +++ b/docs/widgets/services/openmediavault.md @@ -7,11 +7,11 @@ Provides useful information from your OpenMediaVault ```yaml widget: - type: openmediavault - url: http://omv.host.or.ip - username: admin - password: pass - method: services.getStatus # required + type: openmediavault + url: http://omv.host.or.ip + username: admin + password: pass + method: services.getStatus # required ``` ## Methods diff --git a/docs/widgets/services/opnsense.md b/docs/widgets/services/opnsense.md index d4ea44976..5838cee60 100644 --- a/docs/widgets/services/opnsense.md +++ b/docs/widgets/services/opnsense.md @@ -5,8 +5,8 @@ description: OPNSense Widget Configuration The API key & secret can be generated via the webui by creating a new user at _System/Access/Users_. Ensure "Generate a scrambled password to prevent local database logins for this user" is checked and then edit the effective privileges selecting **only**: -- Diagnostics: System Activity -- Status: Traffic Graph +- Diagnostics: System Activity +- Status: Traffic Graph Finally, create a new API key which will download an `apikey.txt` file with your key and secret in it. Use the values as the username and password fields, respectively, in your homepage config. @@ -14,8 +14,8 @@ Allowed fields: `["cpu", "memory", "wanUpload", "wanDownload"]`. ```yaml widget: - type: opnsense - url: http://opnsense.host.or.ip - username: key - password: secret + type: opnsense + url: http://opnsense.host.or.ip + username: key + password: secret ``` diff --git a/docs/widgets/services/overseerr.md b/docs/widgets/services/overseerr.md index f4546ed5e..9c2055b34 100644 --- a/docs/widgets/services/overseerr.md +++ b/docs/widgets/services/overseerr.md @@ -9,7 +9,7 @@ Allowed fields: `["pending", "approved", "available", "processing"]`. ```yaml widget: - type: overseerr - url: http://overseerr.host.or.ip - key: apikeyapikeyapikeyapikeyapikey + type: overseerr + url: http://overseerr.host.or.ip + key: apikeyapikeyapikeyapikeyapikey ``` diff --git a/docs/widgets/services/paperlessngx.md b/docs/widgets/services/paperlessngx.md index 6205b060f..be5f3af4c 100644 --- a/docs/widgets/services/paperlessngx.md +++ b/docs/widgets/services/paperlessngx.md @@ -9,15 +9,15 @@ Allowed fields: `["total", "inbox"]`. ```yaml widget: - type: paperlessngx - url: http://paperlessngx.host.or.ip:port - username: username - password: password + type: paperlessngx + url: http://paperlessngx.host.or.ip:port + username: username + password: password ``` ```yaml widget: - type: paperlessngx - url: http://paperlessngx.host.or.ip:port - key: token + type: paperlessngx + url: http://paperlessngx.host.or.ip:port + key: token ``` diff --git a/docs/widgets/services/pfsense.md b/docs/widgets/services/pfsense.md index d37ac7372..3c35c3be7 100644 --- a/docs/widgets/services/pfsense.md +++ b/docs/widgets/services/pfsense.md @@ -17,9 +17,9 @@ Allowed fields: `["load", "memory", "temp", "wanStatus", "wanIP", "disk"]` (maxi ```yaml widget: - type: pfsense - url: http://pfsense.host.or.ip:port - username: user - password: pass - wan: igb0 + type: pfsense + url: http://pfsense.host.or.ip:port + username: user + password: pass + wan: igb0 ``` diff --git a/docs/widgets/services/photoprism.md b/docs/widgets/services/photoprism.md index 55a758579..46bf112bf 100644 --- a/docs/widgets/services/photoprism.md +++ b/docs/widgets/services/photoprism.md @@ -7,8 +7,8 @@ Allowed fields: `["albums", "photos", "videos", "people"]`. ```yaml widget: - type: photoprism - url: http://photoprism.host.or.ip:port - username: admin - password: password + type: photoprism + url: http://photoprism.host.or.ip:port + username: admin + password: password ``` diff --git a/docs/widgets/services/pialert.md b/docs/widgets/services/pialert.md index e3e597977..6c154322c 100644 --- a/docs/widgets/services/pialert.md +++ b/docs/widgets/services/pialert.md @@ -9,6 +9,6 @@ Allowed fields: `["total", "connected", "new_devices", "down_alerts"]`. ```yaml widget: - type: pialert - url: http://ip:port + type: pialert + url: http://ip:port ``` diff --git a/docs/widgets/services/pihole.md b/docs/widgets/services/pihole.md index a92b8fda2..d87f283e6 100644 --- a/docs/widgets/services/pihole.md +++ b/docs/widgets/services/pihole.md @@ -9,9 +9,9 @@ Allowed fields: `["queries", "blocked", "blocked_percent", "gravity"]`. ```yaml widget: - type: pihole - url: http://pi.hole.or.ip - key: yourpiholeapikey # optional + type: pihole + url: http://pi.hole.or.ip + key: yourpiholeapikey # optional ``` _Added in v0.1.0, udpated in v0.6.18_ diff --git a/docs/widgets/services/plex-tautulli.md b/docs/widgets/services/plex-tautulli.md index 6d0448fd6..d6138b6bc 100644 --- a/docs/widgets/services/plex-tautulli.md +++ b/docs/widgets/services/plex-tautulli.md @@ -9,7 +9,7 @@ Allowed fields: no configurable fields for this widget. ```yaml widget: - type: tautulli - url: http://tautulli.host.or.ip - key: apikeyapikeyapikeyapikeyapikey + type: tautulli + url: http://tautulli.host.or.ip + key: apikeyapikeyapikeyapikeyapikey ``` diff --git a/docs/widgets/services/plex.md b/docs/widgets/services/plex.md index c2f936113..996d20b93 100644 --- a/docs/widgets/services/plex.md +++ b/docs/widgets/services/plex.md @@ -9,7 +9,7 @@ Allowed fields: `["streams", "albums", "movies", "tv"]`. ```yaml widget: - type: plex - url: http://plex.host.or.ip:32400 - key: mytokenhere # see https://www.plexopedia.com/plex-media-server/general/plex-token/ + type: plex + url: http://plex.host.or.ip:32400 + key: mytokenhere # see https://www.plexopedia.com/plex-media-server/general/plex-token/ ``` diff --git a/docs/widgets/services/portainer.md b/docs/widgets/services/portainer.md index 33a6bea69..55e854b0d 100644 --- a/docs/widgets/services/portainer.md +++ b/docs/widgets/services/portainer.md @@ -9,8 +9,8 @@ Allowed fields: `["running", "stopped", "total"]`. ```yaml widget: - type: portainer - url: https://portainer.host.or.ip:9443 - env: 1 - key: ptr_accesskeyaccesskeyaccesskeyaccesskey + type: portainer + url: https://portainer.host.or.ip:9443 + env: 1 + key: ptr_accesskeyaccesskeyaccesskeyaccesskey ``` diff --git a/docs/widgets/services/prometheus.md b/docs/widgets/services/prometheus.md index 4bbbd2515..2b15d861a 100644 --- a/docs/widgets/services/prometheus.md +++ b/docs/widgets/services/prometheus.md @@ -7,6 +7,6 @@ Allowed fields: `["targets_up", "targets_down", "targets_total"]` ```yaml widget: - type: prometheus - url: http://prometheushost:port + type: prometheus + url: http://prometheushost:port ``` diff --git a/docs/widgets/services/prowlarr.md b/docs/widgets/services/prowlarr.md index dc12ee721..0b22b33b1 100644 --- a/docs/widgets/services/prowlarr.md +++ b/docs/widgets/services/prowlarr.md @@ -9,7 +9,7 @@ Allowed fields: `["numberOfGrabs", "numberOfQueries", "numberOfFailGrabs", "numb ```yaml widget: - type: prowlarr - url: http://prowlarr.host.or.ip - key: apikeyapikeyapikeyapikeyapikey + type: prowlarr + url: http://prowlarr.host.or.ip + key: apikeyapikeyapikeyapikeyapikey ``` diff --git a/docs/widgets/services/proxmox.md b/docs/widgets/services/proxmox.md index 611a1c18a..3a42e4454 100644 --- a/docs/widgets/services/proxmox.md +++ b/docs/widgets/services/proxmox.md @@ -13,15 +13,15 @@ You will need to generate an API Token for new or an existing user. Here is an e 4. Name the group something informative, like api-ro-users 5. Click on the Permissions "folder" 6. Click Add -> Group Permission - - Path: / - - Group: group from bullet 4 above - - Role: PVEAuditor - - Propagate: Checked + - Path: / + - Group: group from bullet 4 above + - Role: PVEAuditor + - Propagate: Checked 7. Expand Permissions, click on Users 8. Click the Add button - - User name: something informative like `api` - - Realm: Linux PAM standard authentication - - Group: group from bullet 4 above + - User name: something informative like `api` + - Realm: Linux PAM standard authentication + - Group: group from bullet 4 above 9. Expand Permissions, click on API Tokens 10. Click the Add button - User: user from bullet 8 above @@ -42,9 +42,9 @@ You can set the optional `node` setting when you want to show metrics for a sing ```yaml widget: - type: proxmox - url: https://proxmox.host.or.ip:8006 - username: api_token_id - password: api_token_secret - node: pve-1 # optional + type: proxmox + url: https://proxmox.host.or.ip:8006 + username: api_token_id + password: api_token_secret + node: pve-1 # optional ``` diff --git a/docs/widgets/services/proxmoxbackupserver.md b/docs/widgets/services/proxmoxbackupserver.md index b62f9ede9..912e74403 100644 --- a/docs/widgets/services/proxmoxbackupserver.md +++ b/docs/widgets/services/proxmoxbackupserver.md @@ -7,8 +7,8 @@ Allowed fields: `["datastore_usage", "failed_tasks_24h", "cpu_usage", "memory_us ```yaml widget: - type: proxmoxbackupserver - url: https://proxmoxbackupserver.host:port - username: api_token_id - password: api_token_secret + type: proxmoxbackupserver + url: https://proxmoxbackupserver.host:port + username: api_token_id + password: api_token_secret ``` diff --git a/docs/widgets/services/pterodactyl.md b/docs/widgets/services/pterodactyl.md index e66b7cfa2..90084253f 100644 --- a/docs/widgets/services/pterodactyl.md +++ b/docs/widgets/services/pterodactyl.md @@ -7,7 +7,7 @@ Allowed fields: `["nodes", "servers"]` ```yaml widget: - type: pterodactyl - url: http://pterodactylhost:port - key: pterodactylapikey + type: pterodactyl + url: http://pterodactylhost:port + key: pterodactylapikey ``` diff --git a/docs/widgets/services/pyload.md b/docs/widgets/services/pyload.md index ff4526946..b35c639aa 100644 --- a/docs/widgets/services/pyload.md +++ b/docs/widgets/services/pyload.md @@ -7,8 +7,8 @@ Allowed fields: `["speed", "active", "queue", "total"]`. ```yaml widget: - type: pyload - url: http://pyload.host.or.ip:port - username: username - password: password # only needed if set + type: pyload + url: http://pyload.host.or.ip:port + username: username + password: password # only needed if set ``` diff --git a/docs/widgets/services/qbittorrent.md b/docs/widgets/services/qbittorrent.md index 8d507df2a..28b9ee5fc 100644 --- a/docs/widgets/services/qbittorrent.md +++ b/docs/widgets/services/qbittorrent.md @@ -9,8 +9,8 @@ Allowed fields: `["leech", "download", "seed", "upload"]`. ```yaml widget: - type: qbittorrent - url: http://qbittorrent.host.or.ip - username: username - password: password + type: qbittorrent + url: http://qbittorrent.host.or.ip + username: username + password: password ``` diff --git a/docs/widgets/services/qnap.md b/docs/widgets/services/qnap.md index ac73e227b..6cb950f97 100644 --- a/docs/widgets/services/qnap.md +++ b/docs/widgets/services/qnap.md @@ -7,10 +7,10 @@ Allowed fields: `["cpuUsage", "memUsage", "systemTempC", "poolUsage", "volumeUsa ```yaml widget: - type: qnap - url: http://qnap.host.or.ip:port - username: user - password: pass + type: qnap + url: http://qnap.host.or.ip:port + username: user + password: pass ``` If the QNAP device has multiple volumes, the _poolUsage_ will be a sum of all volumes. diff --git a/docs/widgets/services/radarr.md b/docs/widgets/services/radarr.md index d659020a3..7782c2aec 100644 --- a/docs/widgets/services/radarr.md +++ b/docs/widgets/services/radarr.md @@ -11,8 +11,8 @@ A detailed queue listing is disabled by default, but can be enabled with the `en ```yaml widget: - type: radarr - url: http://radarr.host.or.ip - key: apikeyapikeyapikeyapikeyapikey - enableQueue: true # optional, defaults to false + type: radarr + url: http://radarr.host.or.ip + key: apikeyapikeyapikeyapikeyapikey + enableQueue: true # optional, defaults to false ``` diff --git a/docs/widgets/services/readarr.md b/docs/widgets/services/readarr.md index 0df61e2dc..c8c314d1f 100644 --- a/docs/widgets/services/readarr.md +++ b/docs/widgets/services/readarr.md @@ -9,7 +9,7 @@ Allowed fields: `["wanted", "queued", "books"]`. ```yaml widget: - type: readarr - url: http://readarr.host.or.ip - key: apikeyapikeyapikeyapikeyapikey + type: readarr + url: http://readarr.host.or.ip + key: apikeyapikeyapikeyapikeyapikey ``` diff --git a/docs/widgets/services/rutorrent.md b/docs/widgets/services/rutorrent.md index a073ad02b..33b542937 100644 --- a/docs/widgets/services/rutorrent.md +++ b/docs/widgets/services/rutorrent.md @@ -9,8 +9,8 @@ Allowed fields: `["active", "upload", "download"]`. ```yaml widget: - type: rutorrent - url: http://rutorrent.host.or.ip - username: username # optional, false if not used - password: password # optional, false if not used + type: rutorrent + url: http://rutorrent.host.or.ip + username: username # optional, false if not used + password: password # optional, false if not used ``` diff --git a/docs/widgets/services/sabnzbd.md b/docs/widgets/services/sabnzbd.md index e0efb6853..d78ee22e1 100644 --- a/docs/widgets/services/sabnzbd.md +++ b/docs/widgets/services/sabnzbd.md @@ -9,7 +9,7 @@ Allowed fields: `["rate", "queue", "timeleft"]`. ```yaml widget: - type: sabnzbd - url: http://sabnzbd.host.or.ip - key: apikeyapikeyapikeyapikeyapikey + type: sabnzbd + url: http://sabnzbd.host.or.ip + key: apikeyapikeyapikeyapikeyapikey ``` diff --git a/docs/widgets/services/scrutiny.md b/docs/widgets/services/scrutiny.md index 5f9e1f889..bcdfd2dd6 100644 --- a/docs/widgets/services/scrutiny.md +++ b/docs/widgets/services/scrutiny.md @@ -7,6 +7,6 @@ Allowed fields: `["passed", "failed", "unknown"]`. ```yaml widget: - type: scrutiny - url: http://scrutiny.host.or.ip + type: scrutiny + url: http://scrutiny.host.or.ip ``` diff --git a/docs/widgets/services/sonarr.md b/docs/widgets/services/sonarr.md index f9b6ff8b5..0f4102bf1 100644 --- a/docs/widgets/services/sonarr.md +++ b/docs/widgets/services/sonarr.md @@ -11,8 +11,8 @@ A detailed queue listing is disabled by default, but can be enabled with the `en ```yaml widget: - type: sonarr - url: http://sonarr.host.or.ip - key: apikeyapikeyapikeyapikeyapikey - enableQueue: true # optional, defaults to false + type: sonarr + url: http://sonarr.host.or.ip + key: apikeyapikeyapikeyapikeyapikey + enableQueue: true # optional, defaults to false ``` diff --git a/docs/widgets/services/speedtest-tracker.md b/docs/widgets/services/speedtest-tracker.md index 7ad3f4e37..35eeabc5c 100644 --- a/docs/widgets/services/speedtest-tracker.md +++ b/docs/widgets/services/speedtest-tracker.md @@ -11,6 +11,6 @@ Allowed fields: `["download", "upload", "ping"]`. ```yaml widget: - type: speedtest - url: http://speedtest.host.or.ip + type: speedtest + url: http://speedtest.host.or.ip ``` diff --git a/docs/widgets/services/syncthing-relay-server.md b/docs/widgets/services/syncthing-relay-server.md index a60367733..89017cd13 100644 --- a/docs/widgets/services/syncthing-relay-server.md +++ b/docs/widgets/services/syncthing-relay-server.md @@ -9,6 +9,6 @@ Allowed fields: `["numActiveSessions", "numConnections", "bytesProxied"]`. ```yaml widget: - type: strelaysrv - url: http://syncthing.host.or.ip:22070 + type: strelaysrv + url: http://syncthing.host.or.ip:22070 ``` diff --git a/docs/widgets/services/tailscale.md b/docs/widgets/services/tailscale.md index 0db502c91..8f3f0d568 100644 --- a/docs/widgets/services/tailscale.md +++ b/docs/widgets/services/tailscale.md @@ -11,7 +11,7 @@ Allowed fields: `["address", "last_seen", "expires"]`. ```yaml widget: - type: tailscale - deviceid: deviceid - key: tailscalekey + type: tailscale + deviceid: deviceid + key: tailscalekey ``` diff --git a/docs/widgets/services/tdarr.md b/docs/widgets/services/tdarr.md index ff182d432..e54c1abb2 100644 --- a/docs/widgets/services/tdarr.md +++ b/docs/widgets/services/tdarr.md @@ -7,6 +7,6 @@ Allowed fields: `["queue", "processed", "errored", "saved"]`. ```yaml widget: - type: tdarr - url: http://tdarr.host.or.ip + type: tdarr + url: http://tdarr.host.or.ip ``` diff --git a/docs/widgets/services/traefik.md b/docs/widgets/services/traefik.md index 1d476338a..a1c3e5b16 100644 --- a/docs/widgets/services/traefik.md +++ b/docs/widgets/services/traefik.md @@ -10,8 +10,8 @@ Allowed fields: `["routers", "services", "middleware"]`. ```yaml widget: - type: traefik - url: http://traefik.host.or.ip - username: username # optional - password: password # optional + type: traefik + url: http://traefik.host.or.ip + username: username # optional + password: password # optional ``` diff --git a/docs/widgets/services/transmission.md b/docs/widgets/services/transmission.md index c4960dd65..ad09b57ed 100644 --- a/docs/widgets/services/transmission.md +++ b/docs/widgets/services/transmission.md @@ -9,9 +9,9 @@ Allowed fields: `["leech", "download", "seed", "upload"]`. ```yaml widget: - type: transmission - url: http://transmission.host.or.ip - username: username - password: password - rpcUrl: /transmission/ # Optional. Matches the value of "rpc-url" in your Transmission's settings.json file + type: transmission + url: http://transmission.host.or.ip + username: username + password: password + rpcUrl: /transmission/ # Optional. Matches the value of "rpc-url" in your Transmission's settings.json file ``` diff --git a/docs/widgets/services/truenas.md b/docs/widgets/services/truenas.md index eb392e7c9..8dc58d08e 100644 --- a/docs/widgets/services/truenas.md +++ b/docs/widgets/services/truenas.md @@ -9,9 +9,9 @@ To create an API Key, follow [the official TrueNAS documentation](https://www.tr ```yaml widget: - type: truenas - url: http://truenas.host.or.ip - username: user # not required if using api key - password: pass # not required if using api key - key: yourtruenasapikey # not required if using username / password + type: truenas + url: http://truenas.host.or.ip + username: user # not required if using api key + password: pass # not required if using api key + key: yourtruenasapikey # not required if using username / password ``` diff --git a/docs/widgets/services/tubearchivist.md b/docs/widgets/services/tubearchivist.md index c662c0e13..f1628c8c7 100644 --- a/docs/widgets/services/tubearchivist.md +++ b/docs/widgets/services/tubearchivist.md @@ -9,7 +9,7 @@ Allowed fields: `["downloads", "videos", "channels", "playlists"]`. ```yaml widget: - type: tubearchivist - url: http://tubearchivist.host.or.ip - key: apikeyapikeyapikeyapikeyapikey + type: tubearchivist + url: http://tubearchivist.host.or.ip + key: apikeyapikeyapikeyapikeyapikey ``` diff --git a/docs/widgets/services/unmanic.md b/docs/widgets/services/unmanic.md index 7e3b4ff27..a52da87a6 100644 --- a/docs/widgets/services/unmanic.md +++ b/docs/widgets/services/unmanic.md @@ -7,6 +7,6 @@ Allowed fields: `["active_workers", "total_workers", "records_total"]`. ```yaml widget: - type: unmanic - url: http://unmanic.host.or.ip:port + type: unmanic + url: http://unmanic.host.or.ip:port ``` diff --git a/docs/widgets/services/uptime-kuma.md b/docs/widgets/services/uptime-kuma.md index 1280eb4d2..6aa806f17 100644 --- a/docs/widgets/services/uptime-kuma.md +++ b/docs/widgets/services/uptime-kuma.md @@ -9,7 +9,7 @@ Allowed fields: `["up", "down", "uptime", "incident"]`. ```yaml widget: - type: uptimekuma - url: http://uptimekuma.host.or.ip:port - slug: statuspageslug + type: uptimekuma + url: http://uptimekuma.host.or.ip:port + slug: statuspageslug ``` diff --git a/docs/widgets/services/uptimerobot.md b/docs/widgets/services/uptimerobot.md index 5e1ba80cd..5554bb737 100644 --- a/docs/widgets/services/uptimerobot.md +++ b/docs/widgets/services/uptimerobot.md @@ -8,23 +8,23 @@ To generate an API key, select `My Settings`, and either `Monitor-Specific API K A `Monitor-Specific API Key` will provide the following detailed information for the selected monitor: -- Current status -- Current uptime -- Date/time of last downtime -- Duration of last downtime +- Current status +- Current uptime +- Date/time of last downtime +- Duration of last downtime Allowed fields: `["status", "uptime", "lastDown", "downDuration"]`. A `Read-Only API Key` will provide a summary of all monitors in your account: -- Number of 'Up' monitors -- Number of 'Down' monitors +- Number of 'Up' monitors +- Number of 'Down' monitors Allowed fields: `["sitesUp", "sitesDown"]`. ```yaml widget: - type: uptimerobot - url: https://api.uptimerobot.com - key: uptimerobotapitoken + type: uptimerobot + url: https://api.uptimerobot.com + key: uptimerobotapitoken ``` diff --git a/docs/widgets/services/urbackup.md b/docs/widgets/services/urbackup.md index 4efe2a094..1af189d20 100644 --- a/docs/widgets/services/urbackup.md +++ b/docs/widgets/services/urbackup.md @@ -15,9 +15,9 @@ Allowed fields: `["ok", "errored", "noRecent", "totalUsed"]`. _Note that `totalU ```yaml widget: - type: urbackup - username: urbackupUsername - password: urbackupPassword - url: http://urbackupUrl:55414 - maxDays: 5 # optional + type: urbackup + username: urbackupUsername + password: urbackupPassword + url: http://urbackupUrl:55414 + maxDays: 5 # optional ``` diff --git a/docs/widgets/services/watchtower.md b/docs/widgets/services/watchtower.md index 24ef38e46..47b937d2c 100644 --- a/docs/widgets/services/watchtower.md +++ b/docs/widgets/services/watchtower.md @@ -9,7 +9,7 @@ Allowed fields: `["containers_scanned", "containers_updated", "containers_failed ```yaml widget: - type: watchtower - url: http://your-ip-address:8080 - key: demotoken + type: watchtower + url: http://your-ip-address:8080 + key: demotoken ``` diff --git a/docs/widgets/services/whatsupdocker.md b/docs/widgets/services/whatsupdocker.md index 01b90a98d..c9427de55 100644 --- a/docs/widgets/services/whatsupdocker.md +++ b/docs/widgets/services/whatsupdocker.md @@ -9,6 +9,6 @@ Allowed fields: `["monitoring", "updates"]`. ```yaml widget: - type: whatsupdocker - url: http://whatsupdocker:port + type: whatsupdocker + url: http://whatsupdocker:port ``` diff --git a/docs/widgets/services/xteve.md b/docs/widgets/services/xteve.md index 01ce67ce5..fbb4f313a 100644 --- a/docs/widgets/services/xteve.md +++ b/docs/widgets/services/xteve.md @@ -7,8 +7,8 @@ Allowed fields: `["streams_all", "streams_active", "streams_xepg"]`. ```yaml widget: - type: xteve - url: http://xteve.host.or.ip - username: username # optional - password: password # optional + type: xteve + url: http://xteve.host.or.ip + username: username # optional + password: password # optional ``` diff --git a/jsconfig.json b/jsconfig.json index c88cadc4b..73a261bb8 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -3,4 +3,4 @@ "baseUrl": "./src/", }, "include": ["src/**/*"] -} \ No newline at end of file +} diff --git a/k3d/.gitignore b/k3d/.gitignore index eaeec3187..f940e0b55 100644 --- a/k3d/.gitignore +++ b/k3d/.gitignore @@ -1,2 +1 @@ kubeconfig - diff --git a/k3d/README.md b/k3d/README.md index f144d7633..2ab4634e3 100644 --- a/k3d/README.md +++ b/k3d/README.md @@ -11,7 +11,7 @@ All the commands in the document should be run from the `k3d` directory. ## Requisite Tools | Tool | Description | -|-------------------------------------------------------------|----------------------------------------------------------| +| ----------------------------------------------------------- | -------------------------------------------------------- | | [docker](https://docker.io) | Docker container runtime | | [kubectl](https://kubernetes.io/releases/download/#kubectl) | Kubernetes CLI | | [helm](https://helm.sh) | Kubernetes package manager | @@ -20,7 +20,6 @@ All the commands in the document should be run from the `k3d` directory. | [tilt](https://tilt.dev) | (Optional) Local CI loop for kubernetes deployment | | [direnv](https://direnv.net/) | (Optional) Automatically loads `kubeconfig` via `.envrc` | - ## One-off Test Deployments Create a cluster: @@ -57,7 +56,7 @@ tilt up Press space bar to open the tilt web UI, which is quite informative. -Open the Homepage deployment: +Finally, open the Homepage deployment: ```sh xdg-open http://homepage.k3d.localhost:8080/ diff --git a/kubernetes.md b/kubernetes.md index 9da1b54b4..326d6e844 100644 --- a/kubernetes.md +++ b/kubernetes.md @@ -2,9 +2,9 @@ ## Requirements -* Kubernetes 1.19+ -* Metrics service -* An Ingress controller +- Kubernetes 1.19+ +- Metrics service +- An Ingress controller ## Deployment diff --git a/next-i18next.config.js b/next-i18next.config.js index 54aeebb4a..6852346ba 100644 --- a/next-i18next.config.js +++ b/next-i18next.config.js @@ -69,7 +69,7 @@ function prettyBytes(number, options) { const exponent = Math.min( Math.floor(options.binary ? Math.log(number) / Math.log(1024) : Math.log10(number) / 3), - UNITS.length - 1 + UNITS.length - 1, ); number /= (options.binary ? 1024 : 1000) ** exponent; @@ -94,13 +94,18 @@ module.exports = { { init: (i18next) => { i18next.services.formatter.add("bytes", (value, lng, options) => - prettyBytes(parseFloat(value), { locale: lng, ...options }) + prettyBytes(parseFloat(value), { locale: lng, ...options }), ); i18next.services.formatter.add("rate", (value, lng, options) => { - const k = options.binary ? 1024 : 1000; - const sizes = options.bits ? (options.binary ? BIBIT_UNITS : BIT_UNITS) : (options.binary ? BIBYTE_UNITS : BYTE_UNITS); + const sizes = options.bits + ? options.binary + ? BIBIT_UNITS + : BIT_UNITS + : options.binary + ? BIBYTE_UNITS + : BYTE_UNITS; if (value === 0) return `0 ${sizes[0]}/s`; @@ -109,14 +114,14 @@ module.exports = { const i = options.binary ? 2 : Math.floor(Math.log(value) / Math.log(k)); const formatted = new Intl.NumberFormat(lng, { maximumFractionDigits: dm, minimumFractionDigits: dm }).format( - parseFloat(value / k ** i) + parseFloat(value / k ** i), ); return `${formatted} ${sizes[i]}/s`; }); i18next.services.formatter.add("percent", (value, lng, options) => - new Intl.NumberFormat(lng, { style: "percent", ...options }).format(parseFloat(value) / 100.0) + new Intl.NumberFormat(lng, { style: "percent", ...options }).format(parseFloat(value) / 100.0), ); }, type: "3rdParty", diff --git a/postcss.config.js b/postcss.config.js index 33ad091d2..12a703d90 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -3,4 +3,4 @@ module.exports = { tailwindcss: {}, autoprefixer: {}, }, -} +}; diff --git a/src/components/bookmarks/group.jsx b/src/components/bookmarks/group.jsx index 2cfcad23a..c5e6a2f1c 100644 --- a/src/components/bookmarks/group.jsx +++ b/src/components/bookmarks/group.jsx @@ -1,6 +1,6 @@ import { useRef } from "react"; import classNames from "classnames"; -import { Disclosure, Transition } from '@headlessui/react'; +import { Disclosure, Transition } from "@headlessui/react"; import { MdKeyboardArrowDown } from "react-icons/md"; import ErrorBoundary from "components/errorboundry"; @@ -15,7 +15,7 @@ export default function BookmarksGroup({ bookmarks, layout, disableCollapse }) { className={classNames( "bookmark-group", layout?.style === "row" ? "basis-full" : "basis-full md:basis-1/4 lg:basis-1/5 xl:basis-1/6", - layout?.header === false ? "flex-1 px-1 -my-1" : "flex-1 p-1" + layout?.header === false ? "flex-1 px-1 -my-1" : "flex-1 p-1", )} > @@ -28,12 +28,14 @@ export default function BookmarksGroup({ bookmarks, layout, disableCollapse }) { )} -

{bookmarks.name}

+

+ {bookmarks.name} +

diff --git a/src/components/bookmarks/item.jsx b/src/components/bookmarks/item.jsx index f7946accd..5d3b351bd 100644 --- a/src/components/bookmarks/item.jsx +++ b/src/components/bookmarks/item.jsx @@ -15,22 +15,24 @@ export default function Item({ bookmark }) { title={bookmark.name} target={bookmark.target ?? settings.target ?? "_blank"} className={classNames( - settings.cardBlur !== undefined && `backdrop-blur${settings.cardBlur.length ? '-' : ""}${settings.cardBlur}`, - "block w-full text-left cursor-pointer transition-all h-15 mb-3 rounded-md font-medium text-theme-700 dark:text-theme-200 dark:hover:text-theme-300 shadow-md shadow-theme-900/10 dark:shadow-theme-900/20 bg-theme-100/20 hover:bg-theme-300/20 dark:bg-white/5 dark:hover:bg-white/10" + settings.cardBlur !== undefined && `backdrop-blur${settings.cardBlur.length ? "-" : ""}${settings.cardBlur}`, + "block w-full text-left cursor-pointer transition-all h-15 mb-3 rounded-md font-medium text-theme-700 dark:text-theme-200 dark:hover:text-theme-300 shadow-md shadow-theme-900/10 dark:shadow-theme-900/20 bg-theme-100/20 hover:bg-theme-300/20 dark:bg-white/5 dark:hover:bg-white/10", )} >
- {bookmark.icon && + {bookmark.icon && (
- } + )} {!bookmark.icon && bookmark.abbr}
{bookmark.name}
-
{description}
+
+ {description} +
diff --git a/src/components/bookmarks/list.jsx b/src/components/bookmarks/list.jsx index 64b350768..521ca7fb9 100644 --- a/src/components/bookmarks/list.jsx +++ b/src/components/bookmarks/list.jsx @@ -9,7 +9,7 @@ export default function List({ bookmarks, layout }) {
    {bookmarks.map((bookmark) => ( diff --git a/src/components/filecontent.jsx b/src/components/filecontent.jsx index e99cbb87b..1dd6266a2 100644 --- a/src/components/filecontent.jsx +++ b/src/components/filecontent.jsx @@ -1,10 +1,10 @@ -import useSWR from "swr" - -export default function FileContent({ path, loadingValue, errorValue, emptyValue = '' }) { - const fetcher = (url) => fetch(url).then((res) => res.text()) - const { data, error, isLoading } = useSWR(`/api/config/${ path }`, fetcher) - - if (error) return (errorValue) - if (isLoading) return (loadingValue) - return (data || emptyValue) -} +import useSWR from "swr"; + +export default function FileContent({ path, loadingValue, errorValue, emptyValue = "" }) { + const fetcher = (url) => fetch(url).then((res) => res.text()); + const { data, error, isLoading } = useSWR(`/api/config/${path}`, fetcher); + + if (error) return errorValue; + if (isLoading) return loadingValue; + return data || emptyValue; +} diff --git a/src/components/quicklaunch.jsx b/src/components/quicklaunch.jsx index 0304f038e..a356fdeec 100644 --- a/src/components/quicklaunch.jsx +++ b/src/components/quicklaunch.jsx @@ -6,10 +6,19 @@ import ResolvedIcon from "./resolvedicon"; import { SettingsContext } from "utils/contexts/settings"; -export default function QuickLaunch({servicesAndBookmarks, searchString, setSearchString, isOpen, close, searchProvider}) { +export default function QuickLaunch({ + servicesAndBookmarks, + searchString, + setSearchString, + isOpen, + close, + searchProvider, +}) { const { t } = useTranslation(); const { settings } = useContext(SettingsContext); - const { searchDescriptions, hideVisitURL } = settings?.quicklaunch ? settings.quicklaunch : { searchDescriptions: false, hideVisitURL: false }; + const { searchDescriptions, hideVisitURL } = settings?.quicklaunch + ? settings.quicklaunch + : { searchDescriptions: false, hideVisitURL: false }; const searchField = useRef(); @@ -19,7 +28,7 @@ export default function QuickLaunch({servicesAndBookmarks, searchString, setSear function openCurrentItem(newWindow) { const result = results[currentItemIndex]; - window.open(result.href, newWindow ? "_blank" : result.target ?? settings.target ?? "_blank", 'noreferrer'); + window.open(result.href, newWindow ? "_blank" : result.target ?? settings.target ?? "_blank", "noreferrer"); } const closeAndReset = useCallback(() => { @@ -35,7 +44,7 @@ export default function QuickLaunch({servicesAndBookmarks, searchString, setSear try { if (!/.+[.:].+/g.test(rawSearchString)) throw new Error(); // basic test for probably a url let urlString = rawSearchString; - if (urlString.indexOf('http') !== 0) urlString = `https://${rawSearchString}`; + if (urlString.indexOf("http") !== 0) urlString = `https://${rawSearchString}`; setUrl(new URL(urlString)); // basic validation } catch (e) { setUrl(null); @@ -83,12 +92,12 @@ export default function QuickLaunch({servicesAndBookmarks, searchString, setSear useEffect(() => { if (searchString.length === 0) setResults([]); else { - let newResults = servicesAndBookmarks.filter(r => { + let newResults = servicesAndBookmarks.filter((r) => { const nameMatch = r.name.toLowerCase().includes(searchString); let descriptionMatch; if (searchDescriptions) { - descriptionMatch = r.description?.toLowerCase().includes(searchString) - r.priority = nameMatch ? 2 * (+nameMatch) : +descriptionMatch; // eslint-disable-line no-param-reassign + descriptionMatch = r.description?.toLowerCase().includes(searchString); + r.priority = nameMatch ? 2 * +nameMatch : +descriptionMatch; // eslint-disable-line no-param-reassign } return nameMatch || descriptionMatch; }); @@ -98,23 +107,19 @@ export default function QuickLaunch({servicesAndBookmarks, searchString, setSear } if (searchProvider) { - newResults.push( - { - href: searchProvider.url + encodeURIComponent(searchString), - name: `${searchProvider.name ?? t("quicklaunch.custom")} ${t("quicklaunch.search")} `, - type: 'search', - } - ) + newResults.push({ + href: searchProvider.url + encodeURIComponent(searchString), + name: `${searchProvider.name ?? t("quicklaunch.custom")} ${t("quicklaunch.search")} `, + type: "search", + }); } if (!hideVisitURL && url) { - newResults.unshift( - { - href: url.toString(), - name: `${t("quicklaunch.visit")} URL`, - type: 'url', - } - ) + newResults.unshift({ + href: url.toString(), + name: `${t("quicklaunch.visit")} URL`, + type: "url", + }); } setResults(newResults); @@ -125,7 +130,6 @@ export default function QuickLaunch({servicesAndBookmarks, searchString, setSear } }, [searchString, servicesAndBookmarks, searchDescriptions, hideVisitURL, searchProvider, url, t]); - const [hidden, setHidden] = useState(true); useEffect(() => { function handleBackdropClick(event) { @@ -134,66 +138,103 @@ export default function QuickLaunch({servicesAndBookmarks, searchString, setSear if (isOpen) { searchField.current.focus(); - document.body.addEventListener('click', handleBackdropClick); + document.body.addEventListener("click", handleBackdropClick); setHidden(false); } else { - document.body.removeEventListener('click', handleBackdropClick); + document.body.removeEventListener("click", handleBackdropClick); searchField.current.blur(); setTimeout(() => { setHidden(true); }, 300); // disable on close } - }, [isOpen, closeAndReset]); function highlightText(text) { - const parts = text.split(new RegExp(`(${searchString})`, 'gi')); - // eslint-disable-next-line react/no-array-index-key - return {parts.map((part, i) => part.toLowerCase() === searchString.toLowerCase() ? {part} : part)}; + const parts = text.split(new RegExp(`(${searchString})`, "gi")); + return ( + + {parts.map((part, i) => + part.toLowerCase() === searchString.toLowerCase() ? ( + // eslint-disable-next-line react/no-array-index-key + + {part} + + ) : ( + part + ), + )} + + ); } return ( -
} + + + ))} + + )} diff --git a/src/components/resolvedicon.jsx b/src/components/resolvedicon.jsx index 6e28ee249..885bbfac1 100644 --- a/src/components/resolvedicon.jsx +++ b/src/components/resolvedicon.jsx @@ -5,8 +5,8 @@ import { SettingsContext } from "utils/contexts/settings"; import { ThemeContext } from "utils/contexts/theme"; const iconSetURLs = { - 'mdi': "https://cdn.jsdelivr.net/npm/@mdi/svg@latest/svg/", - 'si' : "https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/", + mdi: "https://cdn.jsdelivr.net/npm/@mdi/svg@latest/svg/", + si: "https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/", }; export default function ResolvedIcon({ icon, width = 32, height = 32, alt = "logo" }) { @@ -38,12 +38,13 @@ export default function ResolvedIcon({ icon, width = 32, height = 32, alt = "log if (prefix in iconSetURLs) { // default to theme setting let iconName = icon.replace(`${prefix}-`, "").replace(".svg", ""); - let iconColor = settings.iconStyle === "theme" ? - `rgb(var(--color-${ theme === "dark" ? 300 : 900 }) / var(--tw-text-opacity, 1))` : - "linear-gradient(180deg, rgb(var(--color-logo-start)), rgb(var(--color-logo-stop)))"; + let iconColor = + settings.iconStyle === "theme" + ? `rgb(var(--color-${theme === "dark" ? 300 : 900}) / var(--tw-text-opacity, 1))` + : "linear-gradient(180deg, rgb(var(--color-logo-start)), rgb(var(--color-logo-stop)))"; // use custom hex color if provided - const colorMatches = icon.match(/[#][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]$/i) + const colorMatches = icon.match(/[#][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]$/i); if (colorMatches?.length) { iconName = icon.replace(`${prefix}-`, "").replace(".svg", "").replace(`-${colorMatches[0]}`, ""); iconColor = `${colorMatches[0]}`; @@ -56,8 +57,8 @@ export default function ResolvedIcon({ icon, width = 32, height = 32, alt = "log style={{ width, height, - maxWidth: '100%', - maxHeight: '100%', + maxWidth: "100%", + maxHeight: "100%", background: `${iconColor}`, mask: `url(${iconSource}) no-repeat center / contain`, WebkitMask: `url(${iconSource}) no-repeat center / contain`, @@ -65,7 +66,7 @@ export default function ResolvedIcon({ icon, width = 32, height = 32, alt = "log /> ); } - + // fallback to dashboard-icons if (icon.endsWith(".svg")) { const iconName = icon.replace(".svg", ""); @@ -79,13 +80,13 @@ export default function ResolvedIcon({ icon, width = 32, height = 32, alt = "log height, objectFit: "contain", maxHeight: "100%", - maxWidth: "100%" + maxWidth: "100%", }} alt={alt} /> ); } - + const iconName = icon.replace(".png", ""); return ( log
         height,
         objectFit: diff --git a/src/components/services/dropdown.jsx b/src/components/services/dropdown.jsx index 4bc25a8fd..be2027d76 100644 --- a/src/components/services/dropdown.jsx +++ b/src/components/services/dropdown.jsx @@ -33,7 +33,7 @@ export default function Dropdown({ options, value, setValue }) { type="button" className={classNames( value === option.value ? "bg-theme-300/40 dark:bg-theme-900/40" : "", - "w-full block px-3 py-1.5 text-sm hover:bg-theme-300/70 hover:dark:bg-theme-900/70 text-left" + "w-full block px-3 py-1.5 text-sm hover:bg-theme-300/70 hover:dark:bg-theme-900/70 text-left", )} > {option.label} diff --git a/src/components/services/group.jsx b/src/components/services/group.jsx index d2d18e4c8..736fd27e2 100644 --- a/src/components/services/group.jsx +++ b/src/components/services/group.jsx @@ -1,13 +1,12 @@ import { useRef } from "react"; import classNames from "classnames"; -import { Disclosure, Transition } from '@headlessui/react'; +import { Disclosure, Transition } from "@headlessui/react"; import { MdKeyboardArrowDown } from "react-icons/md"; import List from "components/services/list"; import ResolvedIcon from "components/resolvedicon"; export default function ServicesGroup({ group, services, layout, fiveColumns, disableCollapse }) { - const panel = useRef(); return ( @@ -20,45 +19,55 @@ export default function ServicesGroup({ group, services, layout, fiveColumns, di layout?.header === false ? "flex-1 px-1 -my-1" : "flex-1 p-1", )} > - + {({ open }) => ( <> - { layout?.header !== false && - - {layout?.icon && -
- -
- } -

{services.name}

- -
- } - { - panel.current.style.height = `${panel.current.scrollHeight}px`; - setTimeout(() => {panel.current.style.height = `0`}, 1); - }} - beforeEnter={() => { - panel.current.style.height = `0px`; - setTimeout(() => {panel.current.style.height = `${panel.current.scrollHeight}px`}, 1); - setTimeout(() => {panel.current.style.height = 'auto'}, 150); // animation is 150ms - }} + {layout?.header !== false && ( + + {layout?.icon && ( +
+ +
+ )} +

+ {services.name} +

+ +
+ )} + { + panel.current.style.height = `${panel.current.scrollHeight}px`; + setTimeout(() => { + panel.current.style.height = `0`; + }, 1); + }} + beforeEnter={() => { + panel.current.style.height = `0px`; + setTimeout(() => { + panel.current.style.height = `${panel.current.scrollHeight}px`; + }, 1); + setTimeout(() => { + panel.current.style.height = "auto"; + }, 150); // animation is 150ms + }} > - +
)} -
+
); } diff --git a/src/components/services/item.jsx b/src/components/services/item.jsx index 6f0cff6c6..e4dff6b23 100644 --- a/src/components/services/item.jsx +++ b/src/components/services/item.jsx @@ -14,8 +14,8 @@ import ResolvedIcon from "components/resolvedicon"; export default function Item({ service, group }) { const hasLink = service.href && service.href !== "#"; const { settings } = useContext(SettingsContext); - const showStats = (service.showStats === false) ? false : settings.showStats; - const statusStyle = (service.statusStyle !== undefined) ? service.statusStyle : settings.statusStyle; + const showStats = service.showStats === false ? false : settings.showStats; + const statusStyle = service.statusStyle !== undefined ? service.statusStyle : settings.statusStyle; const [statsOpen, setStatsOpen] = useState(service.showStats); const [statsClosing, setStatsClosing] = useState(false); @@ -34,9 +34,9 @@ export default function Item({ service, group }) {
  • @@ -65,46 +65,54 @@ export default function Item({ service, group }) { >
    {service.name} -

    {service.description}

    +

    + {service.description} +

    ) : (
    {service.name} -

    {service.description}

    +

    + {service.description} +

    )} -
    - {service.ping && ( -
    - - Ping status -
    - )} +
    + {service.ping && ( +
    + + Ping status +
    + )} - {service.container && ( - - )} - {(service.app && !service.external) && ( - - )} + {service.container && ( + + )} + {service.app && !service.external && ( + + )}
    @@ -112,20 +120,28 @@ export default function Item({ service, group }) {
    - {(showStats || statsOpen) && } + {(showStats || statsOpen) && ( + + )}
    )} {service.app && (
    - {(showStats || statsOpen) && } + {(showStats || statsOpen) && ( + + )}
    )} diff --git a/src/components/services/kubernetes-status.jsx b/src/components/services/kubernetes-status.jsx index 1b9be7639..a256a2df0 100644 --- a/src/components/services/kubernetes-status.jsx +++ b/src/components/services/kubernetes-status.jsx @@ -20,7 +20,7 @@ export default function KubernetesStatus({ service, style }) { statusLabel = statusTitle; colorClass = "text-emerald-500/80"; } - + if (data.status === "not found" || data.status === "down" || data.status === "partial") { statusTitle = data.status; statusLabel = statusTitle; @@ -28,17 +28,21 @@ export default function KubernetesStatus({ service, style }) { } } - if (style === 'dot') { - colorClass = colorClass.replace(/text-/g, 'bg-').replace(/\/\d\d/g, ''); + if (style === "dot") { + colorClass = colorClass.replace(/text-/g, "bg-").replace(/\/\d\d/g, ""); backgroundClass = "p-4 hover:bg-theme-500/10 dark:hover:bg-theme-900/20"; } return ( -
    - {style !== 'dot' ? -
    {statusLabel}
    : -
    - } +
    + {style !== "dot" ? ( +
    {statusLabel}
    + ) : ( +
    + )}
    ); } diff --git a/src/components/services/list.jsx b/src/components/services/list.jsx index 93e48e858..fe5c913c5 100644 --- a/src/components/services/list.jsx +++ b/src/components/services/list.jsx @@ -9,7 +9,7 @@ export default function List({ group, services, layout }) {