Compare commits
253 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
31c04006da | ||
|
|
499ab4d701 | ||
|
|
fbb35d3dc8 | ||
|
|
94936ed09d | ||
|
|
31a511de02 | ||
|
|
2d91b2b748 | ||
|
|
7dabd0335f | ||
|
|
96431c6085 | ||
|
|
f64aa50cc0 | ||
|
|
ac39ffdc2f | ||
|
|
f4adebca92 | ||
|
|
b2d75a99e7 | ||
|
|
bda586b04e | ||
|
|
4a4ca95fe5 | ||
|
|
6753843202 | ||
|
|
6b77ae835b | ||
|
|
d0eabf7adb | ||
|
|
30fd42dba4 | ||
|
|
7bcdba16c6 | ||
|
|
59ed5ed114 | ||
|
|
6b2a3da7ee | ||
|
|
b853c566b2 | ||
|
|
bc3adf1f2a | ||
|
|
c437b414ab | ||
|
|
9aa46e4fdd | ||
|
|
0c352b1843 | ||
|
|
f229bca609 | ||
|
|
93c18a8077 | ||
|
|
deff2f5506 | ||
|
|
a35c60f973 | ||
|
|
29928a9a5f | ||
|
|
191a95c55c | ||
|
|
48e0a0e8ef | ||
|
|
20445583cd | ||
|
|
5bc67137f6 | ||
|
|
22c02f4e45 | ||
|
|
3c28e4af44 | ||
|
|
01252c6193 | ||
|
|
27f536c267 | ||
|
|
cb3248117f | ||
|
|
c58f59c105 | ||
|
|
8cc6640d04 | ||
|
|
20df9a5e9c | ||
|
|
91e529f87a | ||
|
|
a28952ce69 | ||
|
|
276a1c3ef4 | ||
|
|
5cc487a96d | ||
|
|
e626274f34 | ||
|
|
6d829bce79 | ||
|
|
230da3d2eb | ||
|
|
aaf4a3e92f | ||
|
|
be8363cc35 | ||
|
|
907abee1aa | ||
|
|
385511f773 | ||
|
|
cbf304a4c8 | ||
|
|
897309a47c | ||
|
|
a06964dd17 | ||
|
|
cb45d89163 | ||
|
|
1656f02418 | ||
|
|
ba5e6dec07 | ||
|
|
56972535c7 | ||
|
|
2b8647b2ef | ||
|
|
94bbcbe1fb | ||
|
|
4a3a4c846e | ||
|
|
adde687331 | ||
|
|
250351f735 | ||
|
|
e730a0ceb0 | ||
|
|
d82fbc3026 | ||
|
|
535be37bef | ||
|
|
d87d347aa3 | ||
|
|
99b50b4faf | ||
|
|
1a22065c3a | ||
|
|
e938c3ac1e | ||
|
|
ef9068c5bb | ||
|
|
85637f2979 | ||
|
|
794ec127cd | ||
|
|
912ae0adfc | ||
|
|
7c3dcf20ef | ||
|
|
c12a5c01f6 | ||
|
|
6fd2b6b6dc | ||
|
|
bf0a766302 | ||
|
|
be4da9d010 | ||
|
|
b7ca6244dd | ||
|
|
e6cf86ed4a | ||
|
|
3736c1fcab | ||
|
|
3af86ffebb | ||
|
|
0aea6a6c3f | ||
|
|
01cb9e8830 | ||
|
|
a938f8b9fa | ||
|
|
261c907f52 | ||
|
|
2a6debbc79 | ||
|
|
f473569cb2 | ||
|
|
e9a31bafab | ||
|
|
bf2efce74d | ||
|
|
7cbba1ff90 | ||
|
|
6e8fe45818 | ||
|
|
c347677402 | ||
|
|
fd75f22e16 | ||
|
|
aac573a48d | ||
|
|
2245cdda55 | ||
|
|
cf9109384e | ||
|
|
db1fb4b899 | ||
|
|
20048ff567 | ||
|
|
e6c7692677 | ||
|
|
19bdc0ec34 | ||
|
|
cd8c224ffa | ||
|
|
b1ca6b8e1a | ||
|
|
3fd8247a40 | ||
|
|
798ca3dea9 | ||
|
|
5c5b6f17d9 | ||
|
|
8e6c7ec152 | ||
|
|
2cc38b9a4f | ||
|
|
50aa416612 | ||
|
|
96bd6eedc2 | ||
|
|
d12b0d5a53 | ||
|
|
e2d6794d12 | ||
|
|
50ccb0b14d | ||
|
|
132d8f4f6b | ||
|
|
c085cf1e72 | ||
|
|
ebb1a50e3f | ||
|
|
8f82976fe5 | ||
|
|
6da46dd3b1 | ||
|
|
5fc3bdee08 | ||
|
|
bcc867323f | ||
|
|
a46a234b76 | ||
|
|
f0df2122de | ||
|
|
ce695850bd | ||
|
|
8c12afced5 | ||
|
|
8c1e50d9e7 | ||
|
|
20f5134606 | ||
|
|
facc98018b | ||
|
|
581828d49a | ||
|
|
587027df37 | ||
|
|
85736c55c9 | ||
|
|
1f47ee8f11 | ||
|
|
1eb6ac6d90 | ||
|
|
295c6ea796 | ||
|
|
68c2b04090 | ||
|
|
1494458ba6 | ||
|
|
f7086c8aa3 | ||
|
|
59ccc90b2f | ||
|
|
1e9e911877 | ||
|
|
dc67024be2 | ||
|
|
b3591c3e69 | ||
|
|
9243187490 | ||
|
|
6b1080ad43 | ||
|
|
52a4f1a423 | ||
|
|
8fa6454161 | ||
|
|
e1a6acf5e6 | ||
|
|
2d0beabe9a | ||
|
|
133d2d6e02 | ||
|
|
da95c42279 | ||
|
|
989039af81 | ||
|
|
5de0019b3d | ||
|
|
d1e5d58e01 | ||
|
|
0d3a57be13 | ||
|
|
541aae1588 | ||
|
|
9d00421c73 | ||
|
|
54ed8f7a7b | ||
|
|
e454ff06b9 | ||
|
|
7b94ccb01f | ||
|
|
44f8e9d4da | ||
|
|
4c6150a545 | ||
|
|
e2518b37d9 | ||
|
|
2fc83d275b | ||
|
|
b14374f660 | ||
|
|
8ff68dd6bf | ||
|
|
132b8c32e5 | ||
|
|
f2a49eaa25 | ||
|
|
ca2a6d7664 | ||
|
|
84db5ea13d | ||
|
|
ffd465a36a | ||
|
|
0d25f5789b | ||
|
|
ca1577166d | ||
|
|
40b0f956ae | ||
|
|
2ee14eb94b | ||
|
|
9ede44b12d | ||
|
|
0dc2f2e18a | ||
|
|
2aa7a3898b | ||
|
|
805f119a25 | ||
|
|
74f76e2656 | ||
|
|
4d38222ba0 | ||
|
|
b9b7c482d4 | ||
|
|
1c5d9ca223 | ||
|
|
8fba3eee1d | ||
|
|
0d6aabc737 | ||
|
|
b124e12509 | ||
|
|
0a23bfe263 | ||
|
|
9fa38c9ba8 | ||
|
|
9484a9ff56 | ||
|
|
ed928bfa25 | ||
|
|
a996d43bbf | ||
|
|
6ce67b5ab8 | ||
|
|
5d531b11e7 | ||
|
|
eccd96a775 | ||
|
|
407376b3b7 | ||
|
|
d6188e52fe | ||
|
|
0a1a3bb8c2 | ||
|
|
16b45a313e | ||
|
|
1d820b02cb | ||
|
|
55a434c039 | ||
|
|
7831da6f6a | ||
|
|
bebecacc89 | ||
|
|
0d7072beea | ||
|
|
95ab0706b6 | ||
|
|
a522153df2 | ||
|
|
1804d0af0f | ||
|
|
9d16e280cd | ||
|
|
b8af7ad95d | ||
|
|
028324556d | ||
|
|
38c32233f6 | ||
|
|
231e2408c3 | ||
|
|
810c321881 | ||
|
|
8edfafb9f6 | ||
|
|
6ed4472441 | ||
|
|
b03467a832 | ||
|
|
148511e6f8 | ||
|
|
f07d595ed9 | ||
|
|
ec448d6c41 | ||
|
|
2a31380dbc | ||
|
|
0962e3384c | ||
|
|
0ee3e7153d | ||
|
|
11cc4a15cf | ||
|
|
ae5f0ace55 | ||
|
|
99c935f5e0 | ||
|
|
a4ee3089bc | ||
|
|
23432300c7 | ||
|
|
a7df687d82 | ||
|
|
1d993046c2 | ||
|
|
2685c20134 | ||
|
|
861a3d2091 | ||
|
|
4d88ea1883 | ||
|
|
aa33cf7295 | ||
|
|
cf14503fb0 | ||
|
|
cecfc93440 | ||
|
|
bf5264d882 | ||
|
|
3923bb3cae | ||
|
|
5d6e202840 | ||
|
|
ef154b348e | ||
|
|
d45e66969d | ||
|
|
62674372c5 | ||
|
|
5afcf445be | ||
|
|
e6f2ff970b | ||
|
|
af1695687a | ||
|
|
f0d7cf3ce6 | ||
|
|
36e77e1fe3 | ||
|
|
35dd7ec230 | ||
|
|
15cc1d98c5 | ||
|
|
9803ef70c6 | ||
|
|
ccc27142ef | ||
|
|
9a20982406 | ||
|
|
67a69a5878 | ||
|
|
b3cf985d4a |
@@ -11,3 +11,6 @@ charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
max_line_length = 120
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
@@ -13,6 +13,12 @@
|
||||
{
|
||||
"newlines-between": "always"
|
||||
}
|
||||
],
|
||||
"no-else-return": [
|
||||
"error",
|
||||
{
|
||||
"allowElseIf": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"settings": {
|
||||
|
||||
9
.github/DISCUSSION_TEMPLATE/support.yml
vendored
@@ -1,4 +1,11 @@
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
### ⚠️ Before opening a discussion:
|
||||
|
||||
- [Check the troubleshooting guide](https://gethomepage.dev/troubleshooting/).
|
||||
- [Search existing issues](https://github.com/gethomepage/homepage/search?q=&type=issues) [and discussions](https://github.com/gethomepage/homepage/search?q=&type=discussions) (including closed ones!).
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
@@ -44,6 +51,6 @@ body:
|
||||
id: troubleshooting
|
||||
attributes:
|
||||
label: Troubleshooting
|
||||
description: Please include output from your [troubleshooting tests](https://gethomepage.dev/latest/more/troubleshooting/#service-widget-errors), if relevant.
|
||||
description: Please include output from your [troubleshooting tests](https://gethomepage.dev/more/troubleshooting/#service-widget-errors), if relevant.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
3
.github/FUNDING.yml
vendored
@@ -1,2 +1,3 @@
|
||||
github: [gethomepage, benphelps, shamoon]
|
||||
github: [gethomepage]
|
||||
open_collective: homepage
|
||||
patreon: gethomepage
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -13,7 +13,7 @@ body:
|
||||
attributes:
|
||||
label: Before submitting, please confirm the following
|
||||
options:
|
||||
- label: I confirm this was discussed, and the maintainers suggest I open an issue (note that AI bots are not maintainers).
|
||||
- label: I confirm this was discussed, and the maintainers asked that I open an issue.
|
||||
required: true
|
||||
- label: I am aware that if I create this issue without a discussion, it will be removed without a response.
|
||||
required: true
|
||||
|
||||
17
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,9 +1,20 @@
|
||||
<!--
|
||||
==== STOP ====================
|
||||
======== STOP ================
|
||||
============ STOP ============
|
||||
================ STOP ========
|
||||
==================== STOP ====
|
||||
|
||||
⚠️ Before opening this pull request please review the guidelines in the checklist below.
|
||||
If this PR does not meet those guidelines it will not be accepted, and everyone will be sad.
|
||||
-->
|
||||
|
||||
## Proposed change
|
||||
|
||||
<!--
|
||||
Please include a summary of the change. Screenshots and/or videos can also be helpful if appropriate.
|
||||
|
||||
*** Please see the development guidelines for new widgets: https://gethomepage.dev/latest/more/development/#service-widget-guidelines
|
||||
*** Please see the development guidelines for new widgets: https://gethomepage.dev/more/development/#service-widget-guidelines
|
||||
*** If you do not follow these guidelines your PR will likely be closed without review.
|
||||
|
||||
New service widgets should include example(s) of relevant API output as well as updates to the docs for the new widget.
|
||||
@@ -26,6 +37,6 @@ What type of change does your PR introduce to Homepage?
|
||||
## Checklist:
|
||||
|
||||
- [ ] If applicable, I have added corresponding documentation changes.
|
||||
- [ ] If applicable, I have reviewed the [feature](https://gethomepage.dev/latest/more/development/#new-feature-guidelines) and / or [service widget guidelines](https://gethomepage.dev/latest/more/development/#service-widget-guidelines).
|
||||
- [ ] I have checked that all code style checks pass using [pre-commit hooks](https://gethomepage.dev/latest/more/development/#code-formatting-with-pre-commit-hooks) and [linting checks](https://gethomepage.dev/latest/more/development/#code-linting).
|
||||
- [ ] If applicable, I have reviewed the [feature](https://gethomepage.dev/more/development/#new-feature-guidelines) and / or [service widget guidelines](https://gethomepage.dev/more/development/#service-widget-guidelines).
|
||||
- [ ] I have checked that all code style checks pass using [pre-commit hooks](https://gethomepage.dev/more/development/#code-formatting-with-pre-commit-hooks) and [linting checks](https://gethomepage.dev/more/development/#code-linting).
|
||||
- [ ] If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.
|
||||
|
||||
6
.github/workflows/crowdin.yml
vendored
@@ -8,7 +8,7 @@ on:
|
||||
paths: [
|
||||
'/public/locales/en/**',
|
||||
]
|
||||
branches: [ main ]
|
||||
branches: [ dev ]
|
||||
|
||||
jobs:
|
||||
synchronize-with-crowdin:
|
||||
@@ -23,8 +23,8 @@ jobs:
|
||||
with:
|
||||
upload_translations: false
|
||||
download_translations: true
|
||||
crowdin_branch_name: main
|
||||
localization_branch_name: l10n_main
|
||||
crowdin_branch_name: dev
|
||||
localization_branch_name: l10n_dev
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
||||
|
||||
42
.github/workflows/docker-publish.yml
vendored
@@ -12,21 +12,20 @@ on:
|
||||
branches:
|
||||
- main
|
||||
- feature/**
|
||||
- dev
|
||||
# Publish semver tags as releases.
|
||||
tags: [ 'v*.*.*' ]
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- 'mkdocs.yml'
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
branches: [ "dev" ]
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- 'mkdocs.yml'
|
||||
merge_group:
|
||||
|
||||
env:
|
||||
# Use docker.io for Docker Hub if empty
|
||||
REGISTRY: ghcr.io
|
||||
# github.repository as <account>/<repo>
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
@@ -65,14 +64,6 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Install the cosign tool except on PR
|
||||
# https://github.com/sigstore/cosign-installer
|
||||
- name: Install cosign
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: sigstore/cosign-installer@main
|
||||
with:
|
||||
cosign-release: 'v1.13.1' # optional
|
||||
|
||||
# Setup QEMU
|
||||
# https://github.com/marketplace/actions/docker-setup-buildx#with-qemu
|
||||
- name: Setup QEMU
|
||||
@@ -98,9 +89,15 @@ jobs:
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Login to Docker Hub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
# Extract metadata (tags, labels) for Docker
|
||||
# https://github.com/docker/metadata-action
|
||||
@@ -108,7 +105,9 @@ jobs:
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
images: |
|
||||
${{ env.IMAGE_NAME }}
|
||||
ghcr.io/${{ env.IMAGE_NAME }}
|
||||
flavor: |
|
||||
latest=auto
|
||||
|
||||
@@ -116,10 +115,10 @@ jobs:
|
||||
# https://github.com/docker/build-push-action
|
||||
- name: Build and push Docker image
|
||||
id: build-and-push
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' && !(github.event_name == 'push' && startsWith(github.ref, 'refs/heads/feature')) }}
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: |
|
||||
@@ -132,19 +131,6 @@ jobs:
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
|
||||
|
||||
# Sign the resulting Docker image digest except on PRs.
|
||||
# This will only write to the public Rekor transparency log when the Docker
|
||||
# repository is public to avoid leaking data. If you would like to publish
|
||||
# transparency data even for private images, pass --force to cosign below.
|
||||
# https://github.com/sigstore/cosign
|
||||
# - name: Sign the published Docker image
|
||||
# if: ${{ github.event_name != 'pull_request' }}
|
||||
# env:
|
||||
# COSIGN_EXPERIMENTAL: "true"
|
||||
# # This step uses the identity token to provision an ephemeral certificate
|
||||
# # against the sigstore community Fulcio instance.
|
||||
# run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }}
|
||||
|
||||
# Temp fix
|
||||
# https://github.com/docker/build-push-action/issues/252
|
||||
# https://github.com/moby/buildkit/issues/1896
|
||||
|
||||
50
.github/workflows/docs-publish.yml
vendored
@@ -2,15 +2,15 @@ name: Docs
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: [ 'v*.*.*' ]
|
||||
branches: ['main']
|
||||
tags: ["v*.*.*"]
|
||||
branches: ["main"]
|
||||
paths:
|
||||
- 'docs/**'
|
||||
- 'mkdocs.yml'
|
||||
- "docs/**"
|
||||
- "mkdocs.yml"
|
||||
pull_request:
|
||||
paths:
|
||||
- 'docs/**'
|
||||
- 'mkdocs.yml'
|
||||
- "docs/**"
|
||||
- "mkdocs.yml"
|
||||
merge_group:
|
||||
workflow_dispatch:
|
||||
|
||||
@@ -22,16 +22,13 @@ jobs:
|
||||
name: Linting Checks
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
-
|
||||
name: Checkout repository
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
-
|
||||
name: Install python
|
||||
- name: Install python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
-
|
||||
name: Check files
|
||||
- name: Check files
|
||||
uses: pre-commit/action@v3.0.1
|
||||
|
||||
test:
|
||||
@@ -53,8 +50,7 @@ jobs:
|
||||
restore-keys: |
|
||||
mkdocs-material-
|
||||
- run: sudo apt-get install pngquant
|
||||
- run: pip install mike
|
||||
- run: pip install mkdocs-material
|
||||
- run: pip install mkdocs-material mkdocs-redirects "mkdocs-material[imaging]"
|
||||
- name: Test Docs Build
|
||||
run: MKINSIDERS=false mkdocs build
|
||||
deploy:
|
||||
@@ -65,8 +61,10 @@ jobs:
|
||||
- pre-commit
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
- name: Configure Git Credentials
|
||||
run: |
|
||||
git config user.name github-actions[bot]
|
||||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
@@ -78,23 +76,9 @@ jobs:
|
||||
restore-keys: |
|
||||
mkdocs-material-
|
||||
- run: sudo apt-get install pngquant
|
||||
- run: pip install mike==2.0.0
|
||||
- run: pip install git+https://${GH_TOKEN}@github.com/benphelps/mkdocs-material-insiders.git
|
||||
- name: Set Git config
|
||||
run: |
|
||||
git config --global user.name "GitHub Action"
|
||||
git config --global user.email "action@github.com"
|
||||
- name: Sync gh-pages
|
||||
run: |
|
||||
git fetch origin gh-pages
|
||||
git checkout gh-pages
|
||||
git pull origin gh-pages
|
||||
git checkout main
|
||||
- name: Docs Deploy for Main
|
||||
if: github.ref == 'refs/heads/main'
|
||||
run: MKINSIDERS=true mike deploy --update --push ${{github.ref_name}}
|
||||
- name: Docs Deploy for Tags
|
||||
if: github.ref != 'refs/heads/main'
|
||||
run: MKINSIDERS=true mike deploy --update --push ${{github.ref_name}} latest
|
||||
- run: pip install mkdocs-redirects "mkdocs-material[imaging]"
|
||||
- name: Docs Deploy
|
||||
run: MKINSIDERS=true mkdocs gh-deploy --force
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
20
.github/workflows/reaction-comments.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: 'Reaction Comments'
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created, edited]
|
||||
pull_request_review_comment:
|
||||
types: [created, edited]
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
permissions:
|
||||
actions: write
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
action:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dessant/reaction-comments@v4
|
||||
4
.github/workflows/repo-maintenance.yml
vendored
@@ -212,9 +212,9 @@ jobs:
|
||||
}
|
||||
|
||||
const CUTOFF_1_DAYS = 180;
|
||||
const CUTOFF_1_COUNT = 5;
|
||||
const CUTOFF_1_COUNT = 10;
|
||||
const CUTOFF_2_DAYS = 365;
|
||||
const CUTOFF_2_COUNT = 10;
|
||||
const CUTOFF_2_COUNT = 20;
|
||||
|
||||
const cutoff1Date = new Date();
|
||||
cutoff1Date.setDate(cutoff1Date.getDate() - CUTOFF_1_DAYS);
|
||||
|
||||
@@ -38,11 +38,11 @@ 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.
|
||||
Please see the [documentation regarding development](https://gethomepage.dev/more/development/) and specifically the [guidelines for new service widgets](https://gethomepage.dev/more/development/#service-widget-guidelines) if you are considering making one.
|
||||
|
||||
## Use a Consistent Coding Style
|
||||
|
||||
Please see information in the docs regarding [code formatting with pre-commit hooks](https://gethomepage.dev/latest/more/development/#code-formatting-with-pre-commit-hooks).
|
||||
Please see information in the docs regarding [code formatting with pre-commit hooks](https://gethomepage.dev/more/development/#code-formatting-with-pre-commit-hooks).
|
||||
|
||||
## License
|
||||
|
||||
|
||||
33
README.md
@@ -20,7 +20,7 @@
|
||||
|
||||
<a href="https://discord.gg/k4ruYNrudu"><img alt="Discord" src="https://img.shields.io/discord/1019316731635834932"></a>
|
||||
|
||||
<a href="http://gethomepage.dev/latest/" title="Docs"><img title="Docs" src="https://github.com/gethomepage/homepage/actions/workflows/docs-publish.yml/badge.svg"/></a>
|
||||
<a href="https://gethomepage.dev/" title="Docs"><img title="Docs" src="https://github.com/gethomepage/homepage/actions/workflows/docs-publish.yml/badge.svg"/></a>
|
||||
|
||||
<a href="https://paypal.me/phelpsben" title="Donate"><img alt="GitHub Sponsors" src="https://img.shields.io/github/sponsors/benphelps"></a>
|
||||
</p>
|
||||
@@ -48,37 +48,40 @@ With features like quick search, bookmarks, weather support, a wide range of int
|
||||
|
||||
## Docker Integration
|
||||
|
||||
Homepage has built-in support for Docker, and can automatically discover and add services to the homepage based on labels. See the [Docker Service Discovery](https://gethomepage.dev/latest/configs/docker/#automatic-service-discovery) page for more information.
|
||||
Homepage has built-in support for Docker, and can automatically discover and add services to the homepage based on labels. See the [Docker Service Discovery](https://gethomepage.dev/configs/docker/#automatic-service-discovery) page for more information.
|
||||
|
||||
## Service Widgets
|
||||
|
||||
Homepage also has support for over 100 3rd party services, including all popular starr apps, and most popular self-hosted apps. Some examples include: Radarr, Sonarr, Lidarr, Bazarr, Ombi, Tautulli, Plex, Jellyfin, Emby, Transmission, qBittorrent, Deluge, Jackett, NZBGet, SABnzbd, etc. As well as service integrations, Homepage also has a number of information providers, sourcing information from a variety of external 3rd party APIs. See the [Service](https://gethomepage.dev/latest/widgets/) page for more information.
|
||||
Homepage also has support for hundreds of 3rd-party services, including all popular \*arr apps, and most popular self-hosted apps. Some examples include: Radarr, Sonarr, Lidarr, Bazarr, Ombi, Tautulli, Plex, Jellyfin, Emby, Transmission, qBittorrent, Deluge, Jackett, NZBGet, SABnzbd, etc. As well as service integrations, Homepage also has a number of information providers, sourcing information from a variety of external 3rd-party APIs. See the [Service](https://gethomepage.dev/widgets/) page for more information.
|
||||
|
||||
## Information Widgets
|
||||
|
||||
Homepage has built-in support for a number of information providers, including weather, time, date, search, glances and more. System and status information presented at the top of the page. See the [Information Providers](https://gethomepage.dev/latest/widgets/) page for more information.
|
||||
Homepage has built-in support for a number of information providers, including weather, time, date, search, glances and more. System and status information presented at the top of the page. See the [Information Providers](https://gethomepage.dev/widgets/) page for more information.
|
||||
|
||||
## Customization
|
||||
|
||||
Homepage is highly customizable, with support for custom themes, custom CSS & JS, custom layouts, formatting, localization and more. See the [Settings](https://gethomepage.dev/latest/configs/settings/) page for more information.
|
||||
Homepage is highly customizable, with support for custom themes, custom CSS & JS, custom layouts, formatting, localization and more. See the [Settings](https://gethomepage.dev/configs/settings/) page for more information.
|
||||
|
||||
# Getting Started
|
||||
|
||||
For configuration options, examples and more, [please check out the homepage documentation](http://gethomepage.dev).
|
||||
|
||||
## Security Notice 🔒
|
||||
|
||||
Please note that when using features such as widgets, Homepage can access personal information (for example from your home automation system) and Homepage currently does not (and is not planned to) include any authentication layer itself. Thus, we recommend homepage be deployed behind a reverse proxy including authentication, SSL etc, and / or behind a VPN.
|
||||
|
||||
## With Docker
|
||||
|
||||
Using docker compose:
|
||||
|
||||
```yaml
|
||||
version: "3.3"
|
||||
services:
|
||||
homepage:
|
||||
image: ghcr.io/gethomepage/homepage:latest
|
||||
container_name: homepage
|
||||
environment:
|
||||
PUID: 1000 -- optional, your user id
|
||||
PGID: 1000 -- optional, your group id
|
||||
PUID: 1000 # optional, your user id
|
||||
PGID: 1000 # optional, your group id
|
||||
ports:
|
||||
- 3000:3000
|
||||
volumes:
|
||||
@@ -100,7 +103,7 @@ docker run --name homepage \
|
||||
ghcr.io/gethomepage/homepage:latest
|
||||
```
|
||||
|
||||
## With Node
|
||||
## From Source
|
||||
|
||||
First, clone the repository:
|
||||
|
||||
@@ -123,15 +126,9 @@ Finally, run the server in production mode:
|
||||
pnpm start
|
||||
```
|
||||
|
||||
or development mode:
|
||||
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
# Configuration
|
||||
|
||||
Please refer to the [homepage documentation](https://gethomepage.dev/) website for more information. Everything you need to know about configuring Homepage is there. Please read everything carefully before asking for help, as most questions are answered there or are simple YAML configuration issues.
|
||||
Please refer to the [homepage documentation website](https://gethomepage.dev/) for more information. Everything you need to know about configuring Homepage is there. Please read everything carefully before asking for help, as most questions are answered there or are simple YAML configuration issues.
|
||||
|
||||
# Development
|
||||
|
||||
@@ -171,6 +168,10 @@ mkdocs serve # or build, to build the static site
|
||||
|
||||
If you have any questions, suggestions, or general issues, please start a discussion on the [Discussions](https://github.com/gethomepage/homepage/discussions) page.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
In addition to the docs, the [troubleshooting guide](https://gethomepage.dev/troubleshooting/) can help reveal many basic config or network issues. If you're having a problem, it's a good place to start.
|
||||
|
||||
## Contributing & Contributors
|
||||
|
||||
Contributions are welcome! Please see the [CONTRIBUTING.md](CONTRIBUTING.md) file for more information.
|
||||
|
||||
1
docs/CNAME
Normal file
@@ -0,0 +1 @@
|
||||
gethomepage.dev
|
||||
BIN
docs/assets/banner_dark@2x.webp
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
docs/assets/banner_light@2x.webp
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
docs/assets/blossom_valley.jpg
Normal file
|
After Width: | Height: | Size: 461 KiB |
BIN
docs/assets/blossom_valley_blur.jpg
Normal file
|
After Width: | Height: | Size: 67 KiB |
BIN
docs/assets/homepage_demo.webp
Normal file
|
After Width: | Height: | Size: 139 KiB |
BIN
docs/assets/homepage_demo_clip.png
Normal file
|
After Width: | Height: | Size: 721 KiB |
BIN
docs/assets/homepage_demo_clip.webp
Normal file
|
After Width: | Height: | Size: 139 KiB |
BIN
docs/assets/light_squircle@2x.webp
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
docs/assets/sections.png
Normal file
|
After Width: | Height: | Size: 331 KiB |
BIN
docs/assets/sections.webp
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
docs/assets/widget_stocks_demo.png
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
@@ -153,6 +153,18 @@ labels:
|
||||
- homepage.widget.fields=["field1","field2"] # optional
|
||||
```
|
||||
|
||||
Multiple widgets can be specified by incrementing the index, e.g.
|
||||
|
||||
```yaml
|
||||
labels: ...
|
||||
- homepage.widget[0].type=emby
|
||||
- homepage.widget[0].url=http://emby.home
|
||||
- homepage.widget[0].key=yourembyapikeyhere
|
||||
- homepage.widget[1].type=uptimekuma
|
||||
- homepage.widget[1].url=http://uptimekuma.home
|
||||
- homepage.widget[1].slug=youreventslughere
|
||||
```
|
||||
|
||||
You can add specify fields for e.g. the [CustomAPI](../widgets/services/customapi.md) widget by using array-style dot notation:
|
||||
|
||||
```yaml
|
||||
@@ -203,7 +215,7 @@ In order to detect every service within the Docker swarm it is necessary that se
|
||||
|
||||
## Multiple Homepage Instances
|
||||
|
||||
The optional field `instanceName` can be configured in [settings.md](settings.md#instance-name) to differentiate between multiple homepage instances.
|
||||
The optional field `instanceName` can be configured in [settings.yaml](settings.md#instance-name) to differentiate between multiple homepage instances.
|
||||
|
||||
To limit a label to an instance, insert `.instance.{{instanceName}}` after the `homepage` prefix.
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
---
|
||||
title: Configuration
|
||||
description: Homepage Configuration
|
||||
icon: material/cog
|
||||
---
|
||||
|
||||
Homepage uses YAML for configuration, YAML stands for "YAML Ain't Markup Language.". It's a human-readable data serialization format that's a superset of JSON. Great for config files, easy to read and write. Supports complex data types like lists and objects. **Indentation matters.** If you already use Docker Compose, you already use YAML.
|
||||
|
||||
24
docs/configs/info-widgets.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
title: Information Widgets
|
||||
description: Homepage info widgets.
|
||||
---
|
||||
|
||||
Information widgets are widgets that provide information about your system or environment and are displayed at the top of the homepage. You can find a list of all available info widgets under the [Info Widgets](../widgets/info/index.md) section.
|
||||
|
||||
Info widgets are defined in the widgets.yaml
|
||||
|
||||
Each widget has its own configuration options, which are detailed in the widget's documentation.
|
||||
|
||||
## Layout
|
||||
|
||||
Info widgets are displayed in the order they are defined in the `widgets.yaml` file. You can change the order by moving the widgets around in the file. However, some widgets (weather, search and datetime) are aligned to the right side of the screen which can affect the layout of the widgets.
|
||||
|
||||
## Adding A Link
|
||||
|
||||
You can add a link to an info widget such as the logo or text widgets by adding an `href` option, for example:
|
||||
|
||||
```yaml
|
||||
logo:
|
||||
href: https://example.com
|
||||
target: _blank # Optional, can be set in settings
|
||||
```
|
||||
@@ -36,7 +36,7 @@ Inside of the service you'd like to connect to a pod:
|
||||
|
||||
The `app` field is used to create a label selector, in this example case it would match pods with the label: `app.kubernetes.io/name=emby`.
|
||||
|
||||
Sometimes this is insufficient for complex or atypical application deployments. In these cases, the `pod-selector` field can be used. Any field selector can be used with it, so it allows for some very powerful selection capabilities.
|
||||
Sometimes this is insufficient for complex or atypical application deployments. In these cases, the `podSelector` field can be used. Any field selector can be used with it, so it allows for some very powerful selection capabilities.
|
||||
|
||||
For instance, it can be utilized to roll multiple underlying deployments under one application to see a high-level aggregate:
|
||||
|
||||
@@ -47,7 +47,7 @@ For instance, it can be utilized to roll multiple underlying deployments under o
|
||||
description: Matrix Synapse Powered Chat
|
||||
app: matrix-element
|
||||
namespace: comms
|
||||
pod-selector: >-
|
||||
podSelector: >-
|
||||
app.kubernetes.io/instance in (
|
||||
matrix-element,
|
||||
matrix-media-repo,
|
||||
@@ -58,7 +58,7 @@ For instance, it can be utilized to roll multiple underlying deployments under o
|
||||
|
||||
!!! note
|
||||
|
||||
A blank string as a pod-selector does not deactivate it, but will actually select all pods in the namespace. This is a useful way to capture the resource usage of a complex application siloed to a single namespace, like Longhorn.
|
||||
A blank string as a podSelector does not deactivate it, but will actually select all pods in the namespace. This is a useful way to capture the resource usage of a complex application siloed to a single namespace, like Longhorn.
|
||||
|
||||
## Automatic Service Discovery
|
||||
|
||||
@@ -98,6 +98,10 @@ When the Kubernetes cluster connection has been properly configured, this servic
|
||||
|
||||
If you are using multiple instances of homepage, an `instance` annotation can be specified to limit services to a specific instance. If no instance is provided, the service will be visible on all instances.
|
||||
|
||||
If you have a single service that needs to be shown on multiple specific instances of homepage (but not on all of them), the service can be annotated by multiple `instance.name` annotations, where `name` can be the names of your specific multiple homepage instances. For example, a service that is annotated with `gethomepage.dev/instance.public: ""` and `gethomepage.dev/instance.internal: ""` will be shown on `public` and `internal` homepage instances.
|
||||
|
||||
Use the `gethomepage.dev/pod-selector` selector to specify the pod used for the health check. For example, a service that is annotated with `gethomepage.dev/pod-selector: app.kubernetes.io/name=deployment` would link to a pod with the label `app.kubernetes.io/name: deployment`.
|
||||
|
||||
### Traefik IngressRoute support
|
||||
|
||||
Homepage can also read ingresses defined using the Traefik IngressRoute custom resource definition. Due to the complex nature of Traefik routing rules, it is required for the `gethomepage.dev/href` annotation to be set:
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
---
|
||||
title: Service Widgets
|
||||
description: Service Widget Configuration
|
||||
---
|
||||
|
||||
Unless otherwise noted, URLs should not end with a `/` or other API path. Each widget will handle the path on its own.
|
||||
|
||||
Each service can have one widget attached to it (often matching the service type, but that's not forced).
|
||||
|
||||
In addition to the href of the service, you can also specify the target location in which to open that link. See [Link Target](settings.md#link-target) for more details.
|
||||
|
||||
Using Emby as an example, this is how you would attach the Emby service widget.
|
||||
|
||||
```yaml
|
||||
- Emby:
|
||||
icon: emby.png
|
||||
href: http://emby.host.or.ip/
|
||||
description: Movies & TV Shows
|
||||
widget:
|
||||
type: emby
|
||||
url: http://emby.host.or.ip
|
||||
key: apikeyapikeyapikeyapikeyapikey
|
||||
```
|
||||
|
||||
## Field Visibility
|
||||
|
||||
Each widget can optionally provide a list of which fields should be visible via the `fields` widget property. If no fields are specified, then all fields will be displayed. The `fields` property must be a valid YAML array of strings. As an example, here is the entry for Sonarr showing only a couple of fields.
|
||||
|
||||
**In all cases a widget will work and display all fields without specifying the `fields` property.**
|
||||
|
||||
```yaml
|
||||
- Sonarr:
|
||||
icon: sonarr.png
|
||||
href: http://sonarr.host.or.ip
|
||||
widget:
|
||||
type: sonarr
|
||||
fields: ["wanted", "queued"]
|
||||
url: http://sonarr.host.or.ip
|
||||
key: apikeyapikeyapikeyapikeyapikey
|
||||
```
|
||||
@@ -21,6 +21,23 @@ Groups are defined as top-level array entries.
|
||||
|
||||
<img width="1038" alt="Service Groups" src="https://user-images.githubusercontent.com/82196/187040754-28065242-4534-4409-881c-93d1921c6141.png">
|
||||
|
||||
### Nested Groups
|
||||
|
||||
Groups can be nested by using the same format as the top-level groups.
|
||||
|
||||
```yaml
|
||||
- Group A:
|
||||
- Service A:
|
||||
href: http://localhost/
|
||||
|
||||
- Group B:
|
||||
- Service B:
|
||||
href: http://localhost/
|
||||
|
||||
- Service C:
|
||||
href: http://localhost/
|
||||
```
|
||||
|
||||
## Services
|
||||
|
||||
Services are defined as array entries on groups,
|
||||
@@ -43,6 +60,60 @@ Services are defined as array entries on groups,
|
||||
|
||||
<img width="1038" alt="Service Services" src="https://user-images.githubusercontent.com/82196/187040763-038023a2-8bee-4d87-b5cc-13447e7365a4.png">
|
||||
|
||||
### Service Widgets
|
||||
|
||||
Each service can have widgets attached to it (often matching the service type, but that's not forced).
|
||||
|
||||
In addition to the href of the service, you can also specify the target location in which to open that link. See [Link Target](settings.md#link-target) for more details.
|
||||
|
||||
Using Emby as an example, this is how you would attach the Emby service widget.
|
||||
|
||||
```yaml
|
||||
- Emby:
|
||||
icon: emby.png
|
||||
href: http://emby.host.or.ip/
|
||||
description: Movies & TV Shows
|
||||
widget:
|
||||
type: emby
|
||||
url: http://emby.host.or.ip
|
||||
key: apikeyapikeyapikeyapikeyapikey
|
||||
```
|
||||
|
||||
#### Multiple Widgets
|
||||
|
||||
Each service can have multiple widgets attached to it, for example:
|
||||
|
||||
```yaml
|
||||
- Emby:
|
||||
icon: emby.png
|
||||
href: http://emby.host.or.ip/
|
||||
description: Movies & TV Shows
|
||||
widgets:
|
||||
- type: emby
|
||||
url: http://emby.host.or.ip
|
||||
key: apikeyapikeyapikeyapikeyapikey
|
||||
- type: uptimekuma
|
||||
url: http://uptimekuma.host.or.ip:port
|
||||
slug: statuspageslug
|
||||
```
|
||||
|
||||
#### Field Visibility
|
||||
|
||||
Each widget can optionally provide a list of which fields should be visible via the `fields` widget property. If no fields are specified, then all fields will be displayed. The `fields` property must be a valid YAML array of strings. As an example, here is the entry for Sonarr showing only a couple of fields.
|
||||
|
||||
**In all cases a widget will work and display all fields without specifying the `fields` property.**
|
||||
|
||||
```yaml
|
||||
- Sonarr:
|
||||
icon: sonarr.png
|
||||
href: http://sonarr.host.or.ip
|
||||
widget:
|
||||
type: sonarr
|
||||
fields: ["wanted", "queued"]
|
||||
url: http://sonarr.host.or.ip
|
||||
key: apikeyapikeyapikeyapikeyapikey
|
||||
```
|
||||
|
||||
## Descriptions
|
||||
|
||||
Services may have descriptions,
|
||||
@@ -65,9 +136,13 @@ Services may have descriptions,
|
||||
|
||||
Services may have an icon attached to them, you can use icons from [Dashboard Icons](https://github.com/walkxcode/dashboard-icons) automatically, by passing the name of the icon, with, or without `.png` or with `.svg` to use the svg version.
|
||||
|
||||
You can also specify prefixed icons from [Material Design Icons](https://materialdesignicons.com) with `mdi-XX` or [Simple Icons](https://simpleicons.org/) with `si-XX`.
|
||||
You can also specify prefixed icons from:
|
||||
|
||||
You can specify a custom color by adding a hex color code as suffix e.g. `mdi-XX-#f0d453` or `si-XX-#a712a2`.
|
||||
- [Material Design Icons](https://pictogrammers.com/library/mdi/) with `mdi-XX`
|
||||
- [Simple Icons](https://simpleicons.org/) with `si-XX`
|
||||
- [selfh.st/icons](https://selfh.st/icons/) with `sh-XX` to use the png version or `sh-XX.svg/png/webp` for a specific version
|
||||
|
||||
You can specify a custom color for `mdi` and `si` icons by adding a hex color code as a suffix e.g. `mdi-XX-#f0d453` or `si-XX-#a712a2`.
|
||||
|
||||
To use a remote icon, use the absolute URL (e.g. `https://...`).
|
||||
|
||||
@@ -171,7 +246,7 @@ Services may be connected to a Docker container, either running on the local mac
|
||||
|
||||
!!! note
|
||||
|
||||
This can also be controlled with `showStats`. See [show docker stats](docker.md#show-docker-stats) for more information
|
||||
This can also be controlled with `showStats`. See [show docker stats](docker.md#show-stats) for more information
|
||||
|
||||
<img width="1038" alt="Docker Stats Expanded" src="https://github.com/gethomepage/homepage/assets/88257202/f95fd595-449e-48ae-af67-fd89618904ec">
|
||||
|
||||
|
||||
@@ -118,6 +118,22 @@ As an example, this would produce the following layout:
|
||||
|
||||
<img width="1260" alt="Screenshot 2022-09-15 at 8 03 57 PM" src="https://user-images.githubusercontent.com/82196/190466646-8ca94505-0fcf-4964-9687-3a6c7cd3144f.png">
|
||||
|
||||
### Icons-Only Layout
|
||||
|
||||
You can also specify the an icon-only layout for bookmarks, either like so:
|
||||
|
||||
```yaml
|
||||
layout:
|
||||
Media:
|
||||
iconsOnly: true
|
||||
```
|
||||
|
||||
or globally:
|
||||
|
||||
```yaml
|
||||
bookmarksStyle: icons
|
||||
```
|
||||
|
||||
### Sorting
|
||||
|
||||
Service groups and bookmark groups can be mixed in order, **but should use different group names**. If you do not specify any bookmark groups they will all show at the bottom of the page.
|
||||
@@ -137,6 +153,27 @@ layout:
|
||||
columns: 3
|
||||
```
|
||||
|
||||
### Nested Groups
|
||||
|
||||
If your services config has nested groups, you can apply settings to these groups by nesting them in the layout block
|
||||
and using the same settings. For example
|
||||
|
||||
```yaml
|
||||
layout:
|
||||
Group A:
|
||||
style: row
|
||||
columns: 4
|
||||
Group C:
|
||||
style: row
|
||||
columns: 2
|
||||
Nested Group A:
|
||||
style: row
|
||||
columns: 2
|
||||
Nested Group B:
|
||||
style: row
|
||||
columns: 2
|
||||
```
|
||||
|
||||
### Headers
|
||||
|
||||
You can hide headers for each section in the layout as well by passing `header` as false, like so:
|
||||
@@ -348,12 +385,12 @@ This can also be set for individual services. Note setting this at the service l
|
||||
|
||||
## Providers
|
||||
|
||||
The `providers` section allows you to define shared API provider options and secrets. Currently this allows you to define your weather API keys in secret and is also the location of the Longhorn URL and credentials.
|
||||
The `providers` section allows you to define shared API provider options and secrets.
|
||||
|
||||
```yaml
|
||||
providers:
|
||||
openweathermap: openweathermapapikey
|
||||
weatherapi: weatherapiapikey
|
||||
finnhub: yourfinnhubapikeyhere
|
||||
longhorn:
|
||||
url: https://longhorn.example.com
|
||||
username: admin
|
||||
@@ -363,10 +400,10 @@ providers:
|
||||
You can then pass `provider` instead of `apiKey` in your widget configuration.
|
||||
|
||||
```yaml
|
||||
- weatherapi:
|
||||
- openweathermap:
|
||||
latitude: 50.449684
|
||||
longitude: 30.525026
|
||||
provider: weatherapi
|
||||
provider: openweathermap
|
||||
```
|
||||
|
||||
## Quick Launch
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
---
|
||||
title: Home
|
||||
description: A modern, fully static, fast, secure, fully proxied, highly customizable application dashboard with integrations for over 100 services and translations into multiple languages.
|
||||
icon: material/home
|
||||
hide:
|
||||
- navigation
|
||||
- toc
|
||||
@@ -10,17 +12,21 @@ hide:
|
||||
|
||||
<div style="margin-top: -100px;"></div>
|
||||
|
||||
<p align="center" style="max-width: 75%; margin: 0 auto; display: block;" markdown>
|
||||

|
||||

|
||||
<div style="max-width: 70%; margin: 0 auto; display: block;">
|
||||
|
||||
A modern, <em>fully static, fast</em>, secure <em>fully proxied</em>, highly customizable application dashboard with integrations for over 100 services and translations into multiple languages. Easily configured via YAML files or through docker label discovery.
|
||||
<img src="assets/banner_light@2x.webp" alt="homepage" style="max-width: 100%; max-height: 175px; margin: 0 auto; display: block;" />
|
||||
|
||||

|
||||
<img src="assets/homepage_demo_clip.webp" alt="homepage" style="max-width: 100%; margin: 0 auto; display: block;" />
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.digitalocean.com/?refcode=df14bcb7c016&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge"><img src="https://web-platforms.sfo2.cdn.digitaloceanspaces.com/WWW/Badge%203.svg" alt="DigitalOcean Referral Badge" /></a>
|
||||
</p>
|
||||
<p align="center">
|
||||
<em>Homepage builds are kindly powered by DigitalOcean.</em>
|
||||
</p>
|
||||
<p style="margin: 0 0 30px;">A modern, <em>fully static, fast</em>, secure <em>fully proxied</em>, highly customizable application dashboard with integrations for over 100 services and translations into multiple languages. Easily configured via YAML files or through docker label discovery.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.md-header__source {
|
||||
display: none;
|
||||
}
|
||||
.md-typeset img, .md-typeset svg, .md-typeset video {
|
||||
box-shadow: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -6,7 +6,6 @@ description: Install and run homepage from Docker
|
||||
Using docker compose:
|
||||
|
||||
```yaml
|
||||
version: "3.3"
|
||||
services:
|
||||
homepage:
|
||||
image: ghcr.io/gethomepage/homepage:latest
|
||||
@@ -27,7 +26,6 @@ _Using the docker socket directly is not the recommended method of integration a
|
||||
In the docker compose example below, the environment variables `$PUID` and `$PGID` are set in a `.env` file.
|
||||
|
||||
```yaml
|
||||
version: "3.3"
|
||||
services:
|
||||
homepage:
|
||||
image: ghcr.io/gethomepage/homepage:latest
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
---
|
||||
title: Installation
|
||||
description: Docs intro
|
||||
icon: simple/docker
|
||||
---
|
||||
|
||||
<p>
|
||||
You have a few options for deploying homepage, depending on your needs. We offer docker images for a majority of platforms. You can also install and run homepage from source if Docker is not your thing. It can even be installed on Kubernetes with Helm.
|
||||
</p>
|
||||
|
||||
!!! warning
|
||||
|
||||
Please note that when using features such as widgets, Homepage can access personal information (for example from your home automation system) and Homepage currently does not (and is not planned to) include any authentication layer itself. Thus, we recommend homepage be deployed behind a reverse proxy including authentication, SSL etc, and / or behind a VPN.
|
||||
|
||||
<br>
|
||||
|
||||
<div class="grid cards" style="margin: 0 auto;" markdown>
|
||||
|
||||
@@ -175,6 +175,7 @@ data:
|
||||
expanded: true
|
||||
cpu: true
|
||||
memory: true
|
||||
network: default
|
||||
- search:
|
||||
provider: duckduckgo
|
||||
target: _blank
|
||||
@@ -209,7 +210,7 @@ rules:
|
||||
- get
|
||||
- list
|
||||
- apiGroups:
|
||||
- traefik.containo.us
|
||||
- traefik.io
|
||||
resources:
|
||||
- ingressroutes
|
||||
verbs:
|
||||
@@ -370,7 +371,7 @@ prevent unnecessary re-renders on page loads and window / tab focusing. The
|
||||
procedure for enabling sticky sessions depends on your Ingress controller. Below
|
||||
is an example using Traefik as the Ingress controller.
|
||||
|
||||
```
|
||||
```yaml
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
|
||||
@@ -31,15 +31,15 @@ You may need to set the permissions of the folders to be able to edit the files.
|
||||
|
||||
- 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:
|
||||
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.
|
||||
|
||||
252
docs/layouts/custom.yml
Normal file
@@ -0,0 +1,252 @@
|
||||
# Copyright (c) 2016-2024 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Configuration
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# Definitions
|
||||
definitions:
|
||||
# Background image
|
||||
- &background_image >-
|
||||
{{ layout.background_image | x }}
|
||||
|
||||
# Background color (default: indigo)
|
||||
- &background_color >-
|
||||
{%- if layout.background_color -%}
|
||||
{{ layout.background_color }}
|
||||
{%- else -%}
|
||||
{%- set palette = config.theme.palette or {} -%}
|
||||
{%- if not palette is mapping -%}
|
||||
{%- set list = palette | selectattr("primary") | list + palette -%}
|
||||
{%- set palette = list | first -%}
|
||||
{%- endif -%}
|
||||
{%- set primary = palette.get("primary", "indigo") -%}
|
||||
{%- set primary = primary.replace(" ", "-") -%}
|
||||
{{ {
|
||||
"red": "#ef5552",
|
||||
"pink": "#e92063",
|
||||
"purple": "#ab47bd",
|
||||
"deep-purple": "#7e56c2",
|
||||
"indigo": "#4051b5",
|
||||
"blue": "#2094f3",
|
||||
"light-blue": "#02a6f2",
|
||||
"cyan": "#00bdd6",
|
||||
"teal": "#009485",
|
||||
"green": "#4cae4f",
|
||||
"light-green": "#8bc34b",
|
||||
"lime": "#cbdc38",
|
||||
"yellow": "#ffec3d",
|
||||
"amber": "#ffc105",
|
||||
"orange": "#ffa724",
|
||||
"deep-orange": "#ff6e42",
|
||||
"brown": "#795649",
|
||||
"grey": "#757575",
|
||||
"blue-grey": "#546d78",
|
||||
"black": "#000000",
|
||||
"white": "#ffffff"
|
||||
}[primary] or "#4051b5" }}
|
||||
{%- endif -%}
|
||||
|
||||
# Text color (default: white)
|
||||
- &color >-
|
||||
{%- if layout.color -%}
|
||||
{{ layout.color }}
|
||||
{%- else -%}
|
||||
{%- set palette = config.theme.palette or {} -%}
|
||||
{%- if not palette is mapping -%}
|
||||
{%- set list = palette | selectattr("primary") | list + palette -%}
|
||||
{%- set palette = list | first -%}
|
||||
{%- endif -%}
|
||||
{%- set primary = palette.get("primary", "indigo") -%}
|
||||
{%- set primary = primary.replace(" ", "-") -%}
|
||||
{{ {
|
||||
"red": "#ffffff",
|
||||
"pink": "#ffffff",
|
||||
"purple": "#ffffff",
|
||||
"deep-purple": "#ffffff",
|
||||
"indigo": "#ffffff",
|
||||
"blue": "#ffffff",
|
||||
"light-blue": "#ffffff",
|
||||
"cyan": "#ffffff",
|
||||
"teal": "#ffffff",
|
||||
"green": "#ffffff",
|
||||
"light-green": "#ffffff",
|
||||
"lime": "#000000",
|
||||
"yellow": "#000000",
|
||||
"amber": "#000000",
|
||||
"orange": "#000000",
|
||||
"deep-orange": "#ffffff",
|
||||
"brown": "#ffffff",
|
||||
"grey": "#ffffff",
|
||||
"blue-grey": "#ffffff",
|
||||
"black": "#ffffff",
|
||||
"white": "#000000"
|
||||
}[primary] or "#ffffff" }}
|
||||
{%- endif -%}
|
||||
|
||||
# Font family (default: Roboto)
|
||||
- &font_family >-
|
||||
{%- if layout.font_family -%}
|
||||
{{ layout.font_family }}
|
||||
{%- elif config.theme.font is mapping -%}
|
||||
{{ config.theme.font.get("text", "Roboto") }}
|
||||
{%- else -%}
|
||||
Roboto
|
||||
{%- endif -%}
|
||||
|
||||
# Font variant
|
||||
- &font_variant >-
|
||||
{%- if layout.font_variant -%}
|
||||
{{ layout.font_variant }}
|
||||
{%- endif -%}
|
||||
|
||||
# Site name
|
||||
- &site_name >-
|
||||
{{ config.site_name }}
|
||||
|
||||
# Page title
|
||||
- &page_title >-
|
||||
{%- if layout.title -%}
|
||||
{{ layout.title }}
|
||||
{%- else -%}
|
||||
{{ page.meta.get("title", page.title) }}
|
||||
{%- endif -%}
|
||||
|
||||
# Page title with site name
|
||||
- &page_title_with_site_name >-
|
||||
{%- if not page.is_homepage -%}
|
||||
{{ page.meta.get("title", page.title) }} - {{ config.site_name }}
|
||||
{%- else -%}
|
||||
{{ page.meta.get("title", page.title) }}
|
||||
{%- endif -%}
|
||||
|
||||
# Page description
|
||||
- &page_description >-
|
||||
{%- if layout.description -%}
|
||||
{{ layout.description }}
|
||||
{%- else -%}
|
||||
{{ page.meta.get("description", config.site_description) | x }}
|
||||
{%- endif -%}
|
||||
|
||||
# Page icon
|
||||
- &page_icon >-
|
||||
{{ page.meta.icon | x }}
|
||||
|
||||
# Logo
|
||||
- &logo >-
|
||||
{%- if layout.logo -%}
|
||||
{{ layout.logo }}
|
||||
{%- elif config.theme.logo -%}
|
||||
{{ config.docs_dir }}/{{ config.theme.logo }}
|
||||
{%- endif -%}
|
||||
|
||||
# Logo (icon)
|
||||
- &logo_icon >-
|
||||
{%- if not layout.logo and config.theme.icon -%}
|
||||
{{ config.theme.icon.logo | x }}
|
||||
{%- endif -%}
|
||||
|
||||
# Meta tags
|
||||
tags:
|
||||
# Open Graph
|
||||
og:type: website
|
||||
og:title: *page_title_with_site_name
|
||||
og:description: *page_description
|
||||
og:image: "{{ image.url }}"
|
||||
og:image:type: "{{ image.type }}"
|
||||
og:image:width: "{{ image.width }}"
|
||||
og:image:height: "{{ image.height }}"
|
||||
og:url: "{{ page.canonical_url }}"
|
||||
|
||||
# Twitter
|
||||
twitter:card: summary_large_image
|
||||
twitter:title: *page_title_with_site_name
|
||||
twitter:description: *page_description
|
||||
twitter:image: "{{ image.url }}"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Specification
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# Card size and layers
|
||||
size: { width: 1200, height: 630 }
|
||||
layers:
|
||||
# Background
|
||||
- background:
|
||||
image: *background_image
|
||||
color: *background_color
|
||||
|
||||
# Page icon
|
||||
- size: { width: 630, height: 630 }
|
||||
offset: { x: 800, y: 0 }
|
||||
icon:
|
||||
value: *page_icon
|
||||
color: "#FFFFFF20"
|
||||
|
||||
# Logo
|
||||
- size: { width: 64, height: 64 }
|
||||
offset: { x: 64, y: 64 }
|
||||
background:
|
||||
image: *logo
|
||||
icon:
|
||||
value: *logo_icon
|
||||
color: *color
|
||||
|
||||
# Site name
|
||||
- size: { width: 768, height: 42 }
|
||||
offset: { x: 160, y: 74 }
|
||||
typography:
|
||||
content: *site_name
|
||||
color: *color
|
||||
font:
|
||||
family: *font_family
|
||||
variant: *font_variant
|
||||
style: Bold
|
||||
|
||||
# Page title
|
||||
- size: { width: 864, height: 256 }
|
||||
offset: { x: 62, y: 192 }
|
||||
typography:
|
||||
content: *page_title
|
||||
align: start
|
||||
color: *color
|
||||
line:
|
||||
amount: 3
|
||||
height: 1.25
|
||||
font:
|
||||
family: *font_family
|
||||
variant: *font_variant
|
||||
style: Bold
|
||||
|
||||
# Page description
|
||||
- size: { width: 864, height: 64 }
|
||||
offset: { x: 64, y: 512 }
|
||||
typography:
|
||||
content: *page_description
|
||||
align: start
|
||||
color: *color
|
||||
line:
|
||||
amount: 2
|
||||
height: 1.5
|
||||
font:
|
||||
family: *font_family
|
||||
variant: *font_variant
|
||||
style: Regular
|
||||
57
docs/more/coverage.md
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
title: Community Coverage
|
||||
description: Homepage has been covered by quite a few YouTube channels, here are some of them.
|
||||
---
|
||||
|
||||
Homepage has been covered by quite a few YouTube channels, here are some of them. If you have a video you'd like to add, please open a PR!
|
||||
|
||||
## English
|
||||
|
||||
<div class="grid" markdown>
|
||||
|
||||
[](https://www.youtube.com/watch?v=mC3tjysJ01E)
|
||||
|
||||
[](https://www.youtube.com/watch?v=o9SLve4wBPY)
|
||||
|
||||
[](https://www.youtube.com/watch?v=j9kbQucNwlc)
|
||||
|
||||
[](https://www.youtube.com/watch?v=3Ux7zfCCM1A)
|
||||
|
||||
[](https://www.youtube.com/watch?v=4AwUNy2eztA)
|
||||
|
||||
[](https://www.youtube.com/watch?v=7mUUCB3kP0E)
|
||||
|
||||
[](https://www.youtube.com/watch?v=a5-4u0qFKaE)
|
||||
|
||||
[](https://www.youtube.com/watch?v=tV7-06FU4gQ)
|
||||
|
||||
[](https://www.youtube.com/watch?v=X2ycbT7rPu4)
|
||||
|
||||
[](https://www.youtube.com/watch?v=1jEWUJqL-eo)
|
||||
|
||||
</div>
|
||||
|
||||
<div class="grid" markdown>
|
||||
|
||||
<div markdown>
|
||||
## French
|
||||
[](https://www.youtube.com/watch?v=aGztk8you6o)
|
||||
[](https://www.youtube.com/watch?v=pQfhWqZh7YE)
|
||||
</div>
|
||||
|
||||
<div markdown>
|
||||
## German
|
||||
[](https://www.youtube.com/watch?v=DrDgg-WRA2g)
|
||||
</div>
|
||||
|
||||
<div markdown>
|
||||
## Chinese
|
||||
[{: style="width: 100%"}](https://www.youtube.com/watch?v=DAW15ckt4n4)
|
||||
</div>
|
||||
|
||||
<div markdown>
|
||||
## Russian
|
||||
[](https://www.youtube.com/watch?v=dk3Cp5ck8mY)
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -1,6 +1,7 @@
|
||||
---
|
||||
title: More
|
||||
description: More homepage resources and guides.
|
||||
icon: material/information-slab-circle
|
||||
---
|
||||
|
||||
Here you'll find resources and guides for Homepage, troubleshooting tips, and more.
|
||||
|
||||
58
docs/more/sponsors.md
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
title: Sponsors
|
||||
description: Homepage is supported by these awesome people and companies.
|
||||
---
|
||||
|
||||
If you would like to support the Homepage project, you can do so by becoming a sponsor. Your sponsorship helps to keep the project running and growing.
|
||||
|
||||
<div class="grid" markdown>
|
||||
|
||||
[:simple-github: GitHub Sponsors](https://github.com/sponsors/gethomepage){ .md-button }
|
||||
|
||||
[:simple-opencollective: OpenCollective](https://opencollective.com/homepage){ .md-button }
|
||||
|
||||
[:simple-patreon: Patreon](https://www.patreon.com/gethomepage){ .md-button .w-full }
|
||||
|
||||
</div>
|
||||
|
||||
<hr style="margin-top: 48px;" />
|
||||
|
||||
These companies help the Homepage project by providing services, tools, and resources.
|
||||
|
||||
<div class="grid" markdown>
|
||||
<div style="margin-bottom: 16px;">
|
||||
<a href="https://www.digitalocean.com/?refcode=df14bcb7c016&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge"><img src="https://web-platforms.sfo2.cdn.digitaloceanspaces.com/WWW/Badge%202.svg" alt="DigitalOcean" style="max-width: 100%; height: 64px; display: block;" /></a>
|
||||
<p>
|
||||
DigitalOcean provides the GitHub Actions runner for the project. Dramatically speeding up the CI/CD process.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 16px;">
|
||||
<a href="https://crowdin.com/project/homepage"><img src="https://support.crowdin.com/assets/logos/core-logo/png/crowdin-core-logo-cWhite.png" alt="Crowdin" style="max-width: 100%; height: 64px; display: block;" /></a>
|
||||
<p>
|
||||
Crowdin provides the translation platform for the project. Making it easy to translate the project into multiple languages.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 16px;">
|
||||
<a href="https://www.jetbrains.com/"><img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jetbrains.png" alt="JetBrains" style="max-width: 100%; height: 64px; display: block;" /></a>
|
||||
<p>
|
||||
JetBrains provides the project with free licenses for their awesome tools.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 16px;">
|
||||
<a href="https://www.buysellads.com/"><img src="https://www.buysellads.com/hubfs/raw_assets/public/BSA-2023/images/logo.svg" alt="BuySellAds" style="max-width: 100%; height: 64px; display: block; filter: invert();" /></a>
|
||||
<p>
|
||||
BuySellAds provides the project with the ability to monetize the website, with high quality ads from the CarbonAds network. All earnings are sent directly to the projects OpenCollective.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.md-typeset img,
|
||||
.md-typeset svg,
|
||||
.md-typeset video {
|
||||
box-shadow: none;
|
||||
}
|
||||
</style>
|
||||
@@ -1,5 +1,10 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block header %}
|
||||
<div id="blur-overlay" class="blur-overlay"></div>
|
||||
{% include "partials/header.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block site_nav %}
|
||||
<!-- Navigation -->
|
||||
{% if nav %}
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
var glimeScript;
|
||||
var glimeStyles = [];
|
||||
document$.subscribe(function () {
|
||||
if (!glimeScript) {
|
||||
glimeScript = document.createElement("script");
|
||||
glimeScript.setAttribute("src", "https://cdn.glimelab.ai/widget/1.0.0/widget.js");
|
||||
glimeScript.setAttribute("onload", "onGlimeLoad()");
|
||||
document.head.appendChild(glimeScript);
|
||||
} else {
|
||||
var newGlimeStyle = document.createElement("style");
|
||||
document.head.appendChild(newGlimeStyle);
|
||||
var i = 0;
|
||||
glimeStyles.forEach((rule) => {
|
||||
newGlimeStyle.sheet.insertRule(rule.cssText, i);
|
||||
i++;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
onGlimeLoad = () => {
|
||||
window.glime.init("Bl3mlvfCnTnRm5");
|
||||
setTimeout(() => {
|
||||
const sheets = document.styleSheets;
|
||||
[...sheets].forEach((sheet) => {
|
||||
if (!sheet.href) {
|
||||
[...sheet.cssRules].forEach((rule) => {
|
||||
if (!rule || rule.href || !rule.selectorText) return;
|
||||
if (rule.selectorText.indexOf(".css-") === 0 || rule.selectorText.indexOf("glime") > -1) {
|
||||
glimeStyles.push(rule);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
};
|
||||
@@ -1,36 +1,288 @@
|
||||
[data-md-toggle="search"]:not(:checked) ~ .md-header .md-search__form::after {
|
||||
position: absolute;
|
||||
top: .3rem;
|
||||
right: .3rem;
|
||||
display: block;
|
||||
padding: .1rem .4rem;
|
||||
color: var(--md-default-fg-color--lighter);
|
||||
font-weight: bold;
|
||||
font-size: .8rem;
|
||||
border: .05rem solid var(--md-default-fg-color--lighter);
|
||||
border-radius: .1rem;
|
||||
content: "/";
|
||||
}
|
||||
|
||||
[data-md-color-scheme="default"][data-md-color-primary="black"] {
|
||||
[data-md-toggle="search"]:not(:checked) ~ .md-header .md-search__form::after {
|
||||
color: var(--md-default-bg-color--lighter);
|
||||
border-color: var(--md-default-bg-color--lighter);
|
||||
}
|
||||
[data-md-color-scheme="slate"] {
|
||||
--md-hue: 220;
|
||||
--md-default-bg-color: hsla(0, 0%, 14%, 0.6);
|
||||
--md-code-bg-color: hsla(0, 0%, 0%, 0.2);
|
||||
}
|
||||
|
||||
#glimeRoot * {
|
||||
font-family: var(--md-text-font) !important;
|
||||
[data-md-color-scheme="default"] {
|
||||
--md-hue: 220;
|
||||
--md-default-fg-color--light: white;
|
||||
--md-default-fg-color--lighter: hsla(0, 0%, 100%, 0.6);
|
||||
--md-default-bg-color: hsla(0, 0%, 100%, 0.8);
|
||||
--md-code-bg-color: hsla(0, 0%, 100%, 0.6);
|
||||
--md-code-bg-color--lighter: hsla(0, 0%, 100%, 0.6);
|
||||
--md-default-fg-color: white;
|
||||
}
|
||||
|
||||
[data-md-color-scheme="default"] .md-search__inner {
|
||||
--md-default-fg-color--light: gray;
|
||||
--md-default-fg-color--lighter: black;
|
||||
--md-default-bg-color: hsla(0, 0%, 100%, 0.9);
|
||||
}
|
||||
|
||||
[data-md-color-scheme="default"] .md-search__inner .md-search__input {
|
||||
color: var(--md-default-fg-color--light);
|
||||
}
|
||||
|
||||
[data-md-toggle="search"]:not(:checked) ~ .md-header .md-search__form::after {
|
||||
position: absolute;
|
||||
top: 0.3rem;
|
||||
right: 0.3rem;
|
||||
display: block;
|
||||
padding: 0.1rem 0.4rem;
|
||||
color: var(--md-default-fg-color--lighter);
|
||||
font-weight: bold;
|
||||
font-size: 0.8rem;
|
||||
border: 0.05rem solid var(--md-default-fg-color--lighter);
|
||||
border-radius: 0.1rem;
|
||||
content: "/";
|
||||
}
|
||||
|
||||
[data-md-color-scheme="default"][data-md-color-primary="black"] {
|
||||
[data-md-toggle="search"]:not(:checked) ~ .md-header .md-search__form::after {
|
||||
color: var(--md-default-bg-color--lighter);
|
||||
border-color: var(--md-default-bg-color--lighter);
|
||||
}
|
||||
}
|
||||
|
||||
#carbonads {
|
||||
margin-top: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#carbon-responsive {
|
||||
--carbon-padding: 1em;
|
||||
--carbon-max-char: 20ch;
|
||||
--carbon-bg-primary: var(--md-default-bg-color) !important;
|
||||
--carbon-bg-secondary: var(--md-default-fg-color--lightest) !important;
|
||||
--carbon-text-color: var(--md-typeset-color) !important;
|
||||
--carbon-padding: 1em;
|
||||
--carbon-max-char: 20ch;
|
||||
--carbon-bg-primary: var(--md-default-bg-color) !important;
|
||||
--carbon-bg-secondary: var(--md-default-fg-color--lightest) !important;
|
||||
--carbon-text-color: var(--md-typeset-color) !important;
|
||||
}
|
||||
|
||||
[data-md-color-scheme="default"] .carbon-text {
|
||||
color: var(--md-code-fg-color) !important;
|
||||
--carbon-text-color: #313131 !important;
|
||||
}
|
||||
|
||||
.md-typeset__table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.md-typeset table:not([class]) {
|
||||
display: table;
|
||||
}
|
||||
|
||||
/* less than 1440px wide */
|
||||
@media (max-width: 1440px) {
|
||||
.md-footer-meta__inner {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
/* less than 740px wide */
|
||||
@media (max-width: 740px) {
|
||||
.md-footer-meta__inner {
|
||||
justify-content: left;
|
||||
flex-direction: column;
|
||||
}
|
||||
.md-social {
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.md-header__button.md-logo {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.md-header__button.md-logo img,
|
||||
.md-header__button.md-logo svg {
|
||||
height: 2rem;
|
||||
}
|
||||
|
||||
.md-header__topic .md-ellipsis {
|
||||
display: none;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: transparent !important;
|
||||
background-image: url("https://raw.githubusercontent.com/gethomepage/homepage/main/docs/assets/blossom_valley.jpg");
|
||||
background-size: cover;
|
||||
background-attachment: fixed;
|
||||
background-position: center;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
|
||||
.md-typeset h1 {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
body[data-md-color-scheme="default"] {
|
||||
color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
|
||||
.blur-overlay {
|
||||
z-index: -1;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: hsl(0deg 0% 0% / 10%);
|
||||
backdrop-filter: blur(128px);
|
||||
-webkit-backdrop-filter: blur(128px);
|
||||
}
|
||||
|
||||
[data-md-color-scheme="default"] .blur-overlay {
|
||||
background: hsla(0, 0%, 0%, 0);
|
||||
}
|
||||
|
||||
.md-nav--lifted > .md-nav__list > .md-nav__item--active > .md-nav__link,
|
||||
.md-nav--secondary .md-nav__title {
|
||||
background: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
[data-md-color-scheme="slate"] .md-main,
|
||||
[data-md-color-scheme="slate"] .md-tabs,
|
||||
[data-md-color-scheme="slate"] .md-footer {
|
||||
background-color: hsla(0, 0%, 0%, 0.3);
|
||||
}
|
||||
|
||||
[data-md-color-scheme="default"] .md-main,
|
||||
[data-md-color-scheme="default"] .md-tabs,
|
||||
[data-md-color-scheme="default"] .md-footer {
|
||||
background-color: hsla(0, 0%, 100%, 0.1);
|
||||
}
|
||||
|
||||
[data-md-color-scheme="slate"] .md-header {
|
||||
background-color: hsla(0, 0%, 0%, 0.3);
|
||||
backdrop-filter: blur(16px);
|
||||
-webkit-backdrop-filter: blur(16px);
|
||||
}
|
||||
|
||||
[data-md-color-scheme="default"] .md-header {
|
||||
background-color: hsla(0, 0%, 100%, 0.1);
|
||||
backdrop-filter: blur(16px);
|
||||
-webkit-backdrop-filter: blur(16px);
|
||||
}
|
||||
|
||||
.md-header:has(.md-search-result__item),
|
||||
.md-header:has(.md-search__input.focus-visible) {
|
||||
backdrop-filter: none !important;
|
||||
-webkit-backdrop-filter: none !important;
|
||||
}
|
||||
|
||||
.md-footer-meta {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
[data-md-color-scheme="slate"][data-md-color-primary="black"],
|
||||
[data-md-color-scheme="default"][data-md-color-primary="black"] {
|
||||
--md-typeset-a-color: #ffffff;
|
||||
}
|
||||
|
||||
.md-content__inner a {
|
||||
text-decoration: underline;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
[data-md-color-scheme="default"] .highlight .p,
|
||||
[data-md-color-scheme="default"] .highlight .o,
|
||||
[data-md-color-scheme="default"] .highlight .ow,
|
||||
[data-md-color-scheme="default"] .highlight .c,
|
||||
[data-md-color-scheme="default"] .highlight .c1,
|
||||
[data-md-color-scheme="default"] .highlight .ch,
|
||||
[data-md-color-scheme="default"] .highlight .cm,
|
||||
[data-md-color-scheme="default"] .highlight .cs,
|
||||
[data-md-color-scheme="default"] .highlight .sd {
|
||||
color: #36464eaa;
|
||||
}
|
||||
|
||||
[data-md-color-scheme="default"] .md-annotation__index:after {
|
||||
background-color: #36464ecc;
|
||||
}
|
||||
|
||||
/* I know this is a farce, but I want it to look nice. */
|
||||
.css-9if7bc {
|
||||
background-color: hsla(0, 0%, 0%, 0.3);
|
||||
backdrop-filter: blur(16px);
|
||||
-webkit-backdrop-filter: blur(16px);
|
||||
}
|
||||
|
||||
@media screen and (max-width: 76.234375em) {
|
||||
.md-nav--primary,
|
||||
.md-nav--primary .md-nav {
|
||||
background-color: hsla(0, 0%, 0%, 0.8);
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 76.234375em) {
|
||||
.md-nav--primary .md-nav__title ~ .md-nav__list {
|
||||
background-color: hsla(0, 0%, 0%, 0.8);
|
||||
backdrop-filter: blur(16px);
|
||||
-webkit-backdrop-filter: blur(16px);
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 76.234375em) {
|
||||
.md-nav--primary .md-nav__title {
|
||||
background-color: hsla(0, 0%, 0%, 0.8);
|
||||
backdrop-filter: blur(16px);
|
||||
}
|
||||
}
|
||||
|
||||
.md-search__scrollwrap {
|
||||
background-color: hsla(0, 0%, 0%, 0.8);
|
||||
backdrop-filter: blur(16px);
|
||||
-webkit-backdrop-filter: blur(16px);
|
||||
}
|
||||
|
||||
.md-search-result .md-typeset h1 {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
[data-md-color-scheme="default"] .highlight span.filename,
|
||||
[data-md-color-scheme="default"] .linenodiv a {
|
||||
color: #36464e;
|
||||
font-weight: light;
|
||||
}
|
||||
|
||||
.linenodiv a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.md-typeset .admonition,
|
||||
.md-typeset details {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.md-typeset img,
|
||||
.md-typeset svg,
|
||||
.md-typeset video {
|
||||
box-shadow: 0 0 1rem 0.25rem hsla(0, 0%, 0%, 0.1);
|
||||
}
|
||||
|
||||
.highlight {
|
||||
box-shadow: 0 0 1rem 0.25rem hsla(0, 0%, 0%, 0.1);
|
||||
}
|
||||
|
||||
.md-typeset .admonition.tip,
|
||||
.md-typeset details.tip {
|
||||
box-shadow: 0 0 1rem 0.25rem hsl(171.83deg 100% 37.45% / 20%);
|
||||
}
|
||||
|
||||
.md-typeset .admonition.note,
|
||||
.md-typeset details.note {
|
||||
box-shadow: 0 0 1rem 0.25rem hsl(214.29deg 100% 37.45% / 20%);
|
||||
}
|
||||
|
||||
.md-typeset .admonition.warning,
|
||||
.md-typeset details.warning {
|
||||
box-shadow: 0 0 1rem 0.25rem hsl(40.91deg 100% 37.45% / 20%);
|
||||
}
|
||||
|
||||
.md-typeset .admonition.danger,
|
||||
.md-typeset details.danger {
|
||||
box-shadow: 0 0 1rem 0.25rem hsl(0deg 100% 37.45% / 20%);
|
||||
}
|
||||
|
||||
.md-tabs__link {
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
---
|
||||
title: Troubleshooting
|
||||
description: Basic Troubleshooting
|
||||
|
||||
icon: material/message-question
|
||||
hide:
|
||||
- navigation
|
||||
---
|
||||
|
||||
## Introducing the Homepage AI Bot
|
||||
|
||||
Thanks to the generous folks at [Glime](https://glimelab.ai), Homepage is now equipped with a pretty clever AI-powered bot. The bot has full knowledge of our docs, GitHub issues and discussions and is great at answering specific questions about setting up your Homepage. To use the bot, just hit the 'Ask AI' button on any page in our docs, [open a GitHub discussion](https://github.com/gethomepage/homepage/discussions) or check out the [#ai-support channel on Discord](https://discord.com/channels/1019316731635834932/1177885603552038993)!
|
||||
|
||||
## General Troubleshooting Tips
|
||||
|
||||
- For API errors, clicking the "API Error Information" button in the widget will usually show some helpful information as to whether the issue is reaching the service host, an authentication issue, etc.
|
||||
@@ -21,7 +17,7 @@ Thanks to the generous folks at [Glime](https://glimelab.ai), Homepage is now eq
|
||||
|
||||
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. **URLs should not end with a / or other API path. Each widget will handle the path on its own.**. Including a trailing slash can result in an error.
|
||||
|
||||
2. Verify the homepage installation can connect to the IP address or host you are using for the widget `url`. This is most simply achieved by pinging the server from the homepage machine, in Docker this means _from inside the container_ itself, e.g.:
|
||||
|
||||
50
docs/widgets/authoring/api.md
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
title: API Guide
|
||||
description: Get comfortable with making API calls from inside your widget.
|
||||
---
|
||||
|
||||
Homepage provides the `useWidgetAPI` hook to help you fetch data from an API. This hook insures that the data is fetched using a proxy, and is critical for security.
|
||||
|
||||
Here is an example of how the `useWidgetAPI` hook looks:
|
||||
|
||||
```js title="Fetch data from the stats endpoint"
|
||||
import useWidgetAPI from "utils/proxy/use-widget-api";
|
||||
|
||||
export default function Component({ service }) {
|
||||
const { data, error } = useWidgetAPI(widget, "stats");
|
||||
}
|
||||
```
|
||||
|
||||
## `useWidgetAPI`
|
||||
|
||||
`useWidgetAPI` takes three possible arguments:
|
||||
|
||||
- `widget`: The widget metadata object.
|
||||
- `endpoint`: The name of the endpoint to fetch data from.
|
||||
- `params`: An optional object containing query parameters to pass to the API.
|
||||
|
||||
### `widget`
|
||||
|
||||
The `widget` argument is the metadata object for the widget. It contains information about the API endpoint, proxy handler, and mappings. This object is used by the `useWidgetAPI` hook to fetch data from the API. This is generally passed in as a prop from the parent component.
|
||||
|
||||
### `endpoint`
|
||||
|
||||
The `endpoint` argument is the name of the endpoint to fetch data from. This is [defined in the widget metadata object](metadata.md#endpoint). The `useWidgetAPI` hook uses this argument to determine which endpoint to fetch data from.
|
||||
|
||||
If no endpoint is provided, the `useWidgetAPI` hook will call the API endpoint defined in the widget metadata object directly.
|
||||
|
||||
### `params`
|
||||
|
||||
The `params` argument is an optional object containing query parameters to pass to the API. This is useful for filtering data or passing additional information to the API. This object is passed directly to the API endpoint as query parameters.
|
||||
|
||||
Here is an example of how to use the `params` argument:
|
||||
|
||||
```js title="Fetch data from the stats endpoint with query parameters"
|
||||
import useWidgetAPI from "utils/proxy/use-widget-api";
|
||||
|
||||
export default function Component({ service }) {
|
||||
const { data, error } = useWidgetAPI(widget, "stats", { start: "2021-01-01", end: "2021-12-31" });
|
||||
}
|
||||
```
|
||||
|
||||
The `params` must be [whitelisted in the widget metadata object](metadata.md#params). This is done to prevent arbitrary query parameters from being passed to the API.
|
||||
102
docs/widgets/authoring/component.md
Normal file
@@ -0,0 +1,102 @@
|
||||
---
|
||||
title: Component Guide
|
||||
description: Learn more about the widget component in Homepage, and how to build your widget UI.
|
||||
---
|
||||
|
||||
Homepage widgets are built using React components. These components are responsible for fetching data from the API and rendering the widget UI. Homepage provides a set of hooks and utilities to help you build your widget component.
|
||||
|
||||
## A Basic Widget Component
|
||||
|
||||
Here is an example of a basic widget component:
|
||||
|
||||
```js
|
||||
import { useTranslation } from "next-i18next";
|
||||
|
||||
import Container from "components/services/widget/container";
|
||||
import Block from "components/services/widget/block";
|
||||
import useWidgetAPI from "utils/proxy/use-widget-api";
|
||||
|
||||
export default function Component({ service }) {
|
||||
const { t } = useTranslation();
|
||||
const { widget } = service;
|
||||
const { data, error } = useWidgetAPI(widget, "info");
|
||||
|
||||
if (error) {
|
||||
return <Container service={service} error={error} />;
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
return (
|
||||
<Container service={service}>
|
||||
<Block label="yourwidget.key1" />
|
||||
<Block label="yourwidget.key2" />
|
||||
<Block label="yourwidget.key3" />
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Container service={service}>
|
||||
<Block label="yourwidget.key1" value={t("common.number", { value: data.key1 })} />
|
||||
<Block label="yourwidget.key2" value={t("common.number", { value: data.key2 })} />
|
||||
<Block label="yourwidget.key3" value={t("common.number", { value: data.key3 })} />
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
### Breakdown
|
||||
|
||||
We'll cover two sections of the widget component: hooks and components.
|
||||
|
||||
#### Hooks
|
||||
|
||||
**`useTranslation`**
|
||||
|
||||
This hook is used to translate text and numerical content in widgets. Homepage provides a set of helpers to help you localize your widgets. You can learn more about translations in the [Translations Guide](translations.md).
|
||||
|
||||
**`useWidgetAPI`**
|
||||
|
||||
This hook is used to fetch data from the API. We cover this hook in more detail in the [API Guide](api.md).
|
||||
|
||||
#### Components
|
||||
|
||||
Homepage provides a set of components to help you build your widget UI. These components are designed to provide a consistent layout, and all widgets are expected to use these components.
|
||||
|
||||

|
||||
|
||||
**`<Container>`**
|
||||
|
||||
This component is a wrapper for the widget. It provides a consistent layout for all widgets.
|
||||
|
||||
```js
|
||||
<Container service={service}></Container>
|
||||
```
|
||||
|
||||
`service` is a prop that is passed to the widget component. It contains information about the service that the widget is displaying.
|
||||
|
||||
If there is an error fetching data from the API, the `error` prop can be passed to the `Container` component.
|
||||
|
||||
```js
|
||||
<Container service={service} error={error}></Container>
|
||||
```
|
||||
|
||||
**`<Block>`**
|
||||
|
||||
This component is used to display a key-value pair. It takes a label and value as props.
|
||||
|
||||
```js
|
||||
<Block label="yourwidget.key1" value={t("common.number", { value: data.key1 })} />
|
||||
```
|
||||
|
||||
The `label` prop is used to look up the translation key in the translation files. The `value` prop is used to display the value of the block. To learn more about translations, please refer to the [Translations Guide](translations.md).
|
||||
|
||||
If there is no data available, the `Block` component can be used to display a placeholder layout.
|
||||
|
||||
```js
|
||||
<Container service={service}>
|
||||
<Block label="yourwidget.key1" />
|
||||
<Block label="yourwidget.key2" />
|
||||
<Block label="yourwidget.key3" />
|
||||
</Container>
|
||||
```
|
||||
@@ -1,9 +1,11 @@
|
||||
---
|
||||
title: Development
|
||||
description: Homepage Development
|
||||
title: Getting Started
|
||||
description: Get started developing for Homepage.
|
||||
---
|
||||
|
||||
## Development Overview
|
||||
We'll cover getting homepage up and running on your local machine for development, as well as some guidelines for developing new features and widgets.
|
||||
|
||||
## Development
|
||||
|
||||
First, clone the homepage repository.
|
||||
|
||||
@@ -46,15 +48,15 @@ self-hosted / open-source alternative, we ask that any widgets, etc. are develop
|
||||
|
||||
## New Feature Guidelines
|
||||
|
||||
- New features should be linked to an existing feature request with at least 10 'up-votes'. The purpose of this requirement is to avoid the addition (and maintenance) of features that might only benefit a small number of users.
|
||||
- If you have ideas for a larger feature, please open a discussion first.
|
||||
- Please note that though it is a requirement, a discussion with 10 'up-votes' in no way guarantees that a PR will be merged.
|
||||
- New features should be linked to an existing feature request. The purpose of this requirement is to avoid the addition (and maintenance) of features that might only benefit a small number of users.
|
||||
- If you have ideas for a larger feature you may want to open a discussion first.
|
||||
|
||||
## Service Widget Guidelines
|
||||
|
||||
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 10 'up-votes'. The purpose of this requirement is to avoid the addition (and maintenance) of service widgets that might only benefit a small number of users.
|
||||
- Please only submit widgets that target a feature request discussion with at least 20 'up-votes'. The purpose of this requirement is to avoid the addition (and maintenance) of service widgets that might only benefit a small number of users.
|
||||
- Note that we reserve the right to decline widgets for projects that are very young (eg < ~1y) or those with a small reach (eg low GitHub stars). Again, this is in an effort to keep overall widget maintenance under control.
|
||||
- Widgets should be only one row of blocks
|
||||
- Widgets should be no more than 4 blocks wide and generally conform to the styling / design choices of other widgets
|
||||
- Minimize the number of API calls
|
||||
33
docs/widgets/authoring/index.md
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
title: Guides & Tutorials
|
||||
description: Learn how to create and customize widgets in Homepage. Explore translations, widget components, widget metadata, proxy handlers, and making API calls.
|
||||
icon: fontawesome/solid/graduation-cap
|
||||
---
|
||||
|
||||
Widgets are a core component of Homepage. They are used to display information about your system, services, and environment.
|
||||
|
||||
## Overview
|
||||
|
||||
If you are new to Homepage widgets, and are looking to create a new widget, please follow along with the guide here: [Widget Tutorial](tutorial.md).
|
||||
|
||||
### Translations
|
||||
|
||||
All text and numerical content in widgets should be translated and localized. English is the default language, and other languages can be added via [Crowdin](https://crowdin.com/project/gethomepage).
|
||||
|
||||
To learn more about translations, please refer to the guide here: [Translations Guide](translations.md).
|
||||
|
||||
### Widget Component
|
||||
|
||||
The widget component is the core of the widget. It is responsible for [fetching data from the API](api.md) and rendering the widget UI. Homepage provides a set of hooks and utilities to help you build your widget component.
|
||||
|
||||
To learn more about widget components, please refer to the guide here: [Component Guide](component.md).
|
||||
|
||||
### Widget Metadata
|
||||
|
||||
Widget metadata defines the configuration of the widget. It defines the API endpoint to fetch data from, the proxy handler to use, and any data mappings.
|
||||
|
||||
To learn more about widget metadata, endpoint and data mapping, please refer to the guide here: [Metadata Guide](metadata.md).
|
||||
|
||||
To learn more about proxy handlers, please refer to the guide here: [Proxies Guide](proxies.md).
|
||||
|
||||
To learn more about making API calls from inside your widget, please refer to the guide here: [API Guide](api.md).
|
||||
310
docs/widgets/authoring/metadata.md
Normal file
@@ -0,0 +1,310 @@
|
||||
---
|
||||
title: Metadata Guide
|
||||
description: Explore all the metadata properties that can be used to configure a widget in Homepage.
|
||||
---
|
||||
|
||||
Here, we will go over how to create and configure Homepage widget metadata. Metadata is a JS object that contains information about the widget, such as the API endpoint, proxy handler, and mappings. This metadata is used by Homepage to fetch data from the API and pass it to the widget.
|
||||
|
||||
## Widgets Configuration
|
||||
|
||||
Here are some examples of how to configure a widget's metadata object.
|
||||
|
||||
=== "Basic Example"
|
||||
|
||||
```js
|
||||
import genericProxyHandler from "utils/proxy/handlers/generic";
|
||||
|
||||
const widgetExample = {
|
||||
api: "{url}/api/{endpoint}",
|
||||
proxyHandler: genericProxyHandler,
|
||||
|
||||
mappings: {
|
||||
stats: { endpoint: "stats" }
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
=== "Advanced Example"
|
||||
|
||||
```js
|
||||
import credentialedProxyHandler from "utils/proxy/handlers/credentialed";
|
||||
import { asJson, jsonArrayFilter } from "utils/proxy/api-helpers";
|
||||
|
||||
const widgetExample = {
|
||||
api: "{url}/api/{endpoint}",
|
||||
proxyHandler: credentialedProxyHandler,
|
||||
|
||||
mappings: {
|
||||
stats: {
|
||||
endpoint: "stats",
|
||||
validate: ["total", "average"],
|
||||
params: ["start", "end"],
|
||||
},
|
||||
notices: {
|
||||
endpoint: "notices",
|
||||
map: (data) => {
|
||||
total: asJson(data).length;
|
||||
},
|
||||
},
|
||||
warnings: {
|
||||
endpoint: "notices",
|
||||
map: (data) => {
|
||||
total: jsonArrayFilter(data, (alert) => alert.type === "warning").length;
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
A widget's metadata is quite powerful and can be configured in many different ways.
|
||||
|
||||
## Configuration Properties
|
||||
|
||||
### `api`
|
||||
|
||||
The `api` property is a string that represents the URL of the API endpoint that the widget will use to fetch data. The URL can contain placeholders that will be replaced with actual values at runtime. For example, the `{url}` placeholder will be replaced with the URL of the configured widget, and the `{endpoint}` placeholder will be replaced with the value of the `endpoint` property in the `mappings` object.
|
||||
|
||||
```js
|
||||
const widgetExample = {
|
||||
api: "{url}/api/{endpoint}",
|
||||
};
|
||||
```
|
||||
|
||||
### `proxyHandler`
|
||||
|
||||
The `proxyHandler` property is a function that will be used to make the API request. Homepage includes some built-in proxy handlers that can be used out of the box:
|
||||
|
||||
Here is an example of the generic proxy handler that makes unauthenticated requests to the specified API endpoint.
|
||||
|
||||
=== "widget.js"
|
||||
|
||||
```js
|
||||
const widgetExample = {
|
||||
api: "{url}/api/{endpoint}",
|
||||
proxyHandler: genericProxyHandler,
|
||||
};
|
||||
```
|
||||
|
||||
=== "services.yaml"
|
||||
|
||||
```yaml
|
||||
- Services:
|
||||
- Your Widget:
|
||||
icon: yourwidget.svg
|
||||
href: https://example.com/
|
||||
widget:
|
||||
type: yourwidget
|
||||
url: http://127.0.0.1:1337
|
||||
```
|
||||
|
||||
If you are looking to learn more about proxy handlers, please refer to the guide here: [Proxies Guide](proxies.md).
|
||||
|
||||
### `mappings`
|
||||
|
||||
The `mappings` property is an object that contains information about the API endpoint, such as the endpoint name, validation rules, and parameter names. The `mappings` object can contain multiple endpoints, each with its own configuration.
|
||||
|
||||
!!! note "Security Note"
|
||||
|
||||
The `mappings` or `allowedEndpoints` property is required for the widget to fetch data from more than a static URL. Homepage uses a whitelist approach to ensure that widgets only access allowed endpoints.
|
||||
|
||||
```js
|
||||
import { asJson } from "utils/proxy/api-helpers";
|
||||
|
||||
const widgetExample = {
|
||||
api: "{url}/api/{endpoint}",
|
||||
mappings: {
|
||||
// `/api/stats?start=...&end=...`
|
||||
stats: {
|
||||
endpoint: "stats",
|
||||
validate: ["total", "average"],
|
||||
params: ["start", "end"],
|
||||
},
|
||||
// `/api/notices`
|
||||
notices: {
|
||||
endpoint: "notices",
|
||||
map: (data) => {
|
||||
total: asJson(data).length;
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
#### `endpoint`
|
||||
|
||||
The `endpoint` property is a string that represents the name of the API endpoint that the widget will use to fetch data. This value will be used to replace the `{endpoint}` placeholder in the `api` property.
|
||||
|
||||
```js
|
||||
const widgetExample = {
|
||||
api: "{url}/api/{endpoint}",
|
||||
mappings: {
|
||||
// `/api/stats`
|
||||
stats: {
|
||||
endpoint: "stats",
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
#### `validate`
|
||||
|
||||
The `validate` property is an array of strings that represent the keys that should be validated in the API response. If the response does not contain all of the specified keys, the widget will not render.
|
||||
|
||||
```js
|
||||
const widgetExample = {
|
||||
api: "{url}/api/{endpoint}",
|
||||
mappings: {
|
||||
// `/api/stats`
|
||||
stats: {
|
||||
endpoint: "stats",
|
||||
validate: ["total", "average"],
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
This configuration will ensure that the API response contains the `total` and `average` keys before the widget is rendered.
|
||||
|
||||
#### `params`
|
||||
|
||||
The `params` property is an array of strings that represent the keys that should be passed as parameters to the API endpoint. These keys will be replaced with the actual values at runtime.
|
||||
|
||||
=== "widget.js"
|
||||
|
||||
```js
|
||||
const widgetExample = {
|
||||
api: "{url}/api/{endpoint}",
|
||||
mappings: {
|
||||
// `/api/stats?start=...&end=...`
|
||||
stats: {
|
||||
endpoint: "stats",
|
||||
params: ["start", "end"],
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
=== "component.jsx"
|
||||
|
||||
```js
|
||||
const { data: statsData, error: statsError } = useWidgetAPI(widget, "stats", {
|
||||
start: new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
|
||||
end: new Date(),
|
||||
});
|
||||
```
|
||||
|
||||
This configuration will pass the `start` and `end` keys as parameters to the API endpoint. The values are passed as an object to the `useWidgetAPI` hook.
|
||||
|
||||
#### `map`
|
||||
|
||||
The `map` property is a function that will be used to transform the API response before it is passed to the widget. This function is passed the raw API response and should return the transformed data.
|
||||
|
||||
```js
|
||||
import { asJson } from "utils/proxy/api-helpers";
|
||||
|
||||
const widgetExample = {
|
||||
api: "{url}/api/{endpoint}",
|
||||
mappings: {
|
||||
// `/api/notices`
|
||||
notices: {
|
||||
endpoint: "notices",
|
||||
map: (data) => {
|
||||
total: asJson(data).length;
|
||||
},
|
||||
},
|
||||
// `/api/notices`
|
||||
warnings: {
|
||||
endpoint: "notices",
|
||||
map: (data) => {
|
||||
total: asJson(data).filter((alert) => alert.type === "warning").length;
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
#### `method`
|
||||
|
||||
The `method` property is a string that represents the HTTP method that should be used to make the API request. The default value is `GET`.
|
||||
|
||||
```js
|
||||
const widgetExample = {
|
||||
api: "{url}/api/{endpoint}",
|
||||
mappings: {
|
||||
// `/api/stats`
|
||||
stats: {
|
||||
endpoint: "stats",
|
||||
method: "POST",
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
#### `headers`
|
||||
|
||||
The `headers` property is an object that contains additional headers that should be included in the API request. If your endpoint requires specific headers, you can include them here.
|
||||
|
||||
```js
|
||||
const widgetExample = {
|
||||
api: "{url}/api/{endpoint}",
|
||||
mappings: {
|
||||
// `/api/stats`
|
||||
stats: {
|
||||
endpoint: "stats",
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
#### `body`
|
||||
|
||||
The `body` property is an object that contains the data that should be sent in the request body. This property is only used when the `method` property is set to `POST` or `PUT`.
|
||||
|
||||
```js
|
||||
const widgetExample = {
|
||||
api: "{url}/api/{endpoint}",
|
||||
mappings: {
|
||||
// `/api/graphql`
|
||||
stats: {
|
||||
endpoint: "graphql",
|
||||
method: "POST",
|
||||
body: {
|
||||
query: `
|
||||
query {
|
||||
stats {
|
||||
total
|
||||
average
|
||||
}
|
||||
}
|
||||
`,
|
||||
},
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
### `allowedEndpoints`
|
||||
|
||||
The `allowedEndpoints` property is a RegExp that represents the allowed endpoints that the widget can use. If the widget tries to access an endpoint that is not allowed, the request will be blocked.
|
||||
|
||||
`allowedEndpoints` can be used when endpoint validation is simple and can be done using a regular expression, and more control is not required.
|
||||
|
||||
!!! note "Security Note"
|
||||
|
||||
The `mappings` or `allowedEndpoints` property is required for the widget to fetch data from more than a static URL. Homepage uses a whitelist approach to ensure that widgets only access allowed endpoints.
|
||||
|
||||
```js
|
||||
const widgetExample = {
|
||||
api: "{url}/api/{endpoint}",
|
||||
allowedEndpoints: /^stats|notices$/,
|
||||
};
|
||||
```
|
||||
|
||||
This configuration will only allow the widget to access the `stats` and `notices` endpoints.
|
||||
203
docs/widgets/authoring/proxies.md
Normal file
@@ -0,0 +1,203 @@
|
||||
---
|
||||
title: Proxies Guide
|
||||
description: Learn about proxy handlers in Homepage, and how to securely fetch data from an API.
|
||||
---
|
||||
|
||||
Homepage includes a set of built-in proxy handlers that can be used to fetch data from an API. We will go over how to use these proxy handlers and briefly cover how to create your own.
|
||||
|
||||
## Available Proxy Handlers
|
||||
|
||||
Homepage comes with a few built-in proxy handlers that can be used to fetch data from an API. These handlers are located in the `utils/proxy/handlers` directory.
|
||||
|
||||
### `genericProxyHandler`
|
||||
|
||||
A proxy handler that makes generally unauthenticated requests to the specified API endpoint.
|
||||
|
||||
```js
|
||||
import genericProxyHandler from "utils/proxy/handlers/generic";
|
||||
|
||||
const widgetExample = {
|
||||
api: "{url}/api/{endpoint}",
|
||||
proxyHandler: genericProxyHandler,
|
||||
};
|
||||
```
|
||||
|
||||
You can also pass API keys from the widget configuration to the proxy handler, for authenticated requests.
|
||||
|
||||
=== "widget.js"
|
||||
|
||||
```js
|
||||
import genericProxyHandler from "utils/proxy/handlers/generic";
|
||||
|
||||
const widgetExample = {
|
||||
api: "{url}/api/{endpoint}?key={key}",
|
||||
proxyHandler: genericProxyHandler,
|
||||
};
|
||||
```
|
||||
|
||||
=== "services.yaml"
|
||||
|
||||
```yaml
|
||||
# Widget Configuration
|
||||
- Your Widget:
|
||||
icon: yourwidget.svg
|
||||
href: https://example.com/
|
||||
widget:
|
||||
type: yourwidget
|
||||
url: http://example.com
|
||||
key: your-api-key
|
||||
```
|
||||
|
||||
### `credentialedProxyHandler`
|
||||
|
||||
A proxy handler that makes authenticated requests by setting request headers. Credentials are pulled from the widgets configuration.
|
||||
|
||||
By default the key is passed as an `X-API-Key` header. If you need to pass the key as something else, either add a case to the credentialedProxyHandler or create a new proxy handler.
|
||||
|
||||
=== "widget.js"
|
||||
|
||||
```js
|
||||
import credentialedProxyHandler from "utils/proxy/handlers/credentialed";
|
||||
|
||||
const widgetExample = {
|
||||
api: "{url}/api/{endpoint}?key={key}",
|
||||
proxyHandler: credentialedProxyHandler,
|
||||
};
|
||||
```
|
||||
|
||||
=== "services.yaml"
|
||||
|
||||
```yaml
|
||||
- Your Widget:
|
||||
icon: yourwidget.svg
|
||||
href: https://example.com/
|
||||
widget:
|
||||
type: yourwidget
|
||||
url: http://127.0.0.1:1337
|
||||
key: your-api-key
|
||||
```
|
||||
|
||||
### `jsonrpcProxyHandler`
|
||||
|
||||
A proxy handler that makes authenticated JSON-RPC requests to the specified API endpoint, either using username + password or an API token.
|
||||
The endpoint is the method to call and queryParams are used as the parameters.
|
||||
|
||||
=== "component.js"
|
||||
|
||||
```js
|
||||
import Container from "components/services/widget/container";
|
||||
import useWidgetAPI from "utils/proxy/use-widget-api";
|
||||
|
||||
export default function Component({ service }) {
|
||||
const { widget } = service;
|
||||
|
||||
const { data, error } = useWidgetAPI(widget, 'trigger', { "triggerids": "14062", "output": "extend", "selectFunctions": "extend" });
|
||||
}
|
||||
```
|
||||
|
||||
=== "widget.js"
|
||||
|
||||
```js
|
||||
import jsonrpcProxyHandler from "utils/proxy/handlers/jsonrpc";
|
||||
|
||||
const widgetExample = {
|
||||
api: "{url}/api/jsonrpc",
|
||||
proxyHandler: jsonrpcProxyHandler,
|
||||
|
||||
mappings: {
|
||||
total: { endpoint: "total" },
|
||||
average: { endpoint: "average" },
|
||||
trigger: { endpoint: "trigger.get" },
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
=== "services.yaml"
|
||||
|
||||
```yaml
|
||||
- Your Widget:
|
||||
icon: yourwidget.svg
|
||||
href: https://example.com/
|
||||
widget:
|
||||
type: yourwidget
|
||||
url: http://127.0.0.1:1337
|
||||
username: your-username
|
||||
password: your-password
|
||||
```
|
||||
|
||||
```yaml
|
||||
- Your Widget:
|
||||
icon: yourwidget.svg
|
||||
href: https://example.com/
|
||||
widget:
|
||||
type: yourwidget
|
||||
url: http://127.0.0.1:1337
|
||||
key: your-api-token
|
||||
```
|
||||
|
||||
### `synologyProxyHandler`
|
||||
|
||||
A proxy handler that makes authenticated requests to the specified Synology API endpoint. This is used exclusively for Synology DSM services.
|
||||
|
||||
=== "widget.js"
|
||||
|
||||
```js
|
||||
import synologyProxyHandler from "utils/proxy/handlers/synology";
|
||||
|
||||
const widgetExample = {
|
||||
api: "{url}/webapi/{cgiPath}?api={apiName}&version={maxVersion}&method={apiMethod}",
|
||||
proxyHandler: synologyProxyHandler,
|
||||
|
||||
mappings: {
|
||||
system_storage: {
|
||||
apiName: "SYNO.Core.System",
|
||||
apiMethod: 'info&type="storage"',
|
||||
endpoint: "system_storage",
|
||||
}
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
=== "services.yaml"
|
||||
|
||||
```yaml
|
||||
- Your Widget:
|
||||
icon: yourwidget.svg
|
||||
href: https://example.com/
|
||||
widget:
|
||||
type: yourwidget
|
||||
url: http://127.0.0.1:1337
|
||||
username: your-username
|
||||
password: your-password
|
||||
```
|
||||
|
||||
## Creating a Custom Proxy Handler
|
||||
|
||||
You can create your own proxy handler to fetch data from an API. A proxy handler is a function that takes a configuration object and returns a function that makes the API request.
|
||||
|
||||
The proxy handler function takes three arguments:
|
||||
|
||||
- `req`: The request object.
|
||||
- `res`: The response object.
|
||||
- `map`: A function that maps the API response to the widget data.
|
||||
|
||||
The proxy handler function should return a promise that resolves to the API response.
|
||||
|
||||
Here is an example of a simple proxy handler that fetches data from an API and passes it to the widget:
|
||||
|
||||
```js
|
||||
import createLogger from "utils/logger";
|
||||
import { httpProxy } from "utils/proxy/http";
|
||||
|
||||
const logger = createLogger("customProxyHandler");
|
||||
|
||||
export default async function customProxyHandler(req, res, map) {
|
||||
const { url } = req.query;
|
||||
|
||||
const [status, contentType, data] = await httpProxy(url);
|
||||
|
||||
return res.status(status).send(data);
|
||||
}
|
||||
```
|
||||
|
||||
Proxy handlers are a complex topic and require a good understanding of JavaScript and the Homepage codebase. If you are new to Homepage, we recommend using the built-in proxy handlers.
|
||||
88
docs/widgets/authoring/translations.md
Normal file
@@ -0,0 +1,88 @@
|
||||
---
|
||||
title: Translations Guide
|
||||
description: Tips and tricks for translating and localizing Homepage widgets.
|
||||
---
|
||||
|
||||
All text and numerical content in widgets should be translated and localized. English is the default language, and other languages can be added via [Crowdin](https://crowdin.com/project/gethomepage).
|
||||
|
||||
## Translations
|
||||
|
||||
Homepage uses the [next-i18next](https://github.com/i18next/next-i18next) library to handle translations. This library provides a set of hooks and utilities to help you localize your widgets, and Homepage has extended this library to support additional features.
|
||||
|
||||
=== "component.jsx"
|
||||
|
||||
```js
|
||||
import { useTranslation } from "next-i18next";
|
||||
|
||||
import Container from "components/services/widget/container";
|
||||
import Block from "components/services/widget/block";
|
||||
|
||||
export default function Component() {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<Container service={service}>
|
||||
<Block label="yourwidget.key1" />
|
||||
<Block label="yourwidget.key2" />
|
||||
<Block label="yourwidget.key3" />
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
## Set up translation strings
|
||||
|
||||
Homepage uses translated and localized strings for **all text and numerical content** in widgets. English is the default language, and other languages can be added via [Crowdin](https://crowdin.com/project/gethomepage). To add the English translations for your widget, follow these steps:
|
||||
|
||||
Open the `public/locales/en/common.js` file.
|
||||
|
||||
Add a new object for your widget to the bottom of the list, like this:
|
||||
|
||||
```json
|
||||
"yourwidget": {
|
||||
"key1": "Value 1",
|
||||
"key2": "Value 2",
|
||||
"key3": "Value 3"
|
||||
}
|
||||
```
|
||||
|
||||
!!! note
|
||||
|
||||
Even if you natively speak another language, you should only add English translations. You can then add translations in your native language via [Crowdin](https://crowdin.com/project/gethomepage), once your widget is merged.
|
||||
|
||||
## Common Translations
|
||||
|
||||
Homepage provides a set of common translations that you can use in your widgets. These translations are used to format numerical content, dates, and other common elements.
|
||||
|
||||
### Numbers
|
||||
|
||||
| Key | Translation | Description |
|
||||
| --------------------- | --------------- | -------------------------------- |
|
||||
| `common.bytes` | `1,000 B` | Format a number in bytes. |
|
||||
| `common.bits` | `1,000 bit` | Format a number in bits. |
|
||||
| `common.bbytes` | `1 KiB` | Format a number in binary bytes. |
|
||||
| `common.bbits` | `1 Kibit` | Format a number in binary bits. |
|
||||
| `common.byterate` | `1,000 B/s` | Format a byte rate. |
|
||||
| `common.bibyterate` | `1 KiB/s` | Format a binary byte rate. |
|
||||
| `common.bitrate` | `1,000 bit/s` | Format a bit rate. |
|
||||
| `common.bibitrate` | `1 Kibit/s` | Format a binary bit rate. |
|
||||
| `common.percent` | `50%` | Format a percentage. |
|
||||
| `common.number` | `1,000` | Format a number. |
|
||||
| `common.ms` | `1,000 ms` | Format a number in milliseconds. |
|
||||
| `common.date` | `2024-01-01` | Format a date. |
|
||||
| `common.relativeDate` | `1 day ago` | Format a relative date. |
|
||||
| `common.duration` | `1 day, 1 hour` | Format an duration. |
|
||||
|
||||
### Text
|
||||
|
||||
| Key | Translation | Description |
|
||||
| ------------------ | ----------- | ------------------ |
|
||||
| `resources.cpu` | `CPU` | CPU usage. |
|
||||
| `resources.mem` | `MEM` | Memory usage. |
|
||||
| `resources.total` | `Total` | Total resource. |
|
||||
| `resources.free` | `Free` | Free resource. |
|
||||
| `resources.used` | `Used` | Used resource. |
|
||||
| `resources.load` | `Load` | Load value. |
|
||||
| `resources.temp` | `TEMP` | Temperature value. |
|
||||
| `resources.max` | `Max` | Maximum value. |
|
||||
| `resources.uptime` | `UP` | Uptime. |
|
||||
273
docs/widgets/authoring/tutorial.md
Normal file
@@ -0,0 +1,273 @@
|
||||
---
|
||||
title: Widget Tutorial
|
||||
description: Follow along with this guide to learn how to create a custom widget for Homepage. We'll cover the basic structure of a widget, how to use translations, and how to fetch data from an API.
|
||||
---
|
||||
|
||||
In this guide, we'll walk through the process of creating a custom widget for Homepage. We'll cover the basic structure of a widget, how to use translations, and how to fetch data from an API. By the end of this guide, you'll have a solid understanding of how to build your own custom widget.
|
||||
|
||||
**Prerequisites:**
|
||||
|
||||
- Basic knowledge of React and JavaScript
|
||||
- Familiarity with the Homepage platform
|
||||
- Understanding of JSON and API interactions
|
||||
|
||||
Throughout this guide, we'll use `yourwidget` as a placeholder for the unique name of your custom widget. Replace `yourwidget` with the actual name of your widget. It should contain only lowercase letters and no spaces.
|
||||
|
||||
This guide makes use of a fake API, which would return a JSON response as such, when called with the `v1/info` endpoint:
|
||||
|
||||
```json
|
||||
{ "key1": 123, "key2": 456, "key3": 789 }
|
||||
```
|
||||
|
||||
## Set up the widget definition
|
||||
|
||||
Create a new folder for your widget in the `src/widgets` directory. Name the folder `yourwidget`.
|
||||
|
||||
Inside the `yourwidget` folder, create a new file named `widget.js`. This file will contain the metadata for your widget.
|
||||
|
||||
Open the `widget.js` file and add the following code:
|
||||
|
||||
```js title="src/widgets/yourwidget/widget.js"
|
||||
import genericProxyHandler from "utils/proxy/handlers/generic"; // (1)!
|
||||
|
||||
const widget = /* (2)! */ {
|
||||
api: "{url}/{endpoint}" /* (3)! */,
|
||||
proxyHandler: genericProxyHandler /* (1)! */,
|
||||
|
||||
mappings: /* (4)! */ {
|
||||
info: /* (5)! */ {
|
||||
endpoint: "v1/info" /* (6)! */,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default widget;
|
||||
```
|
||||
|
||||
1. We import the `genericProxyHandler` from the `utils/proxy/handlers/generic` module. The `genericProxyHandler` is a generic handler that can be used to fetch data from an API. We then assign the `genericProxyHandler` to the `proxyHandler` property of the `widget` object. There are other handlers available that you can use depending on your requirements. You can also create custom handlers if needed.
|
||||
2. We define a `widget` object that contains the metadata for the widget.
|
||||
3. The API endpoint to fetch data from. You can use placeholders like `{url}` and `{endpoint}` to dynamically generate the API endpoint based on the widget configuration.
|
||||
4. An object that contains mappings for different endpoints. Each mapping should have an `endpoint` property that specifies the endpoint to fetch data from.
|
||||
5. A mapping named `info` that specifies the `v1/info` endpoint to fetch data from. This would be called from the component as such: `#!js useWidgetAPI(widget, "info");`
|
||||
6. The `endpoint` property of the `info` mapping specifies the endpoint to fetch data from. There are other properties you can pass to the mapping, such as `method`, `headers`, and `body`.
|
||||
|
||||
!!! warning "Important"
|
||||
|
||||
All widgets that fetch data from dynamic endpoints should have either `mappings` or an `allowedEndpoints` property.
|
||||
|
||||
## Including translation strings in your widget
|
||||
|
||||
Refer to the [translations guide](translations.md) for more details. The Homepage community prides itself on being multilingual, and we strongly encourage you to add translations for your widgets.
|
||||
|
||||
## Create the widget component
|
||||
|
||||
Create a new file for your widgets component, named `component.jsx`, in the `src/widgets/yourwidget` directory. We'll build the contents of the `component.jsx` file step by step.
|
||||
|
||||
First, we'll import the necessary dependencies:
|
||||
|
||||
```js title="src/widgets/yourwidget/component.jsx" linenums="1"
|
||||
import { useTranslation } from "next-i18next"; // (1)!
|
||||
|
||||
import Container from "components/services/widget/container"; // (2)!
|
||||
import Block from "components/services/widget/block"; // (3)!
|
||||
import useWidgetAPI from "utils/proxy/use-widget-api"; // (4)!
|
||||
```
|
||||
|
||||
1. `#!js useTranslation()` is a hook provided by `next-i18next` that allows us to access the translation strings
|
||||
2. `#!jsx <Container>` and `#!jsx <Block>` are custom components that we'll use to structure our widget.
|
||||
3. `#!jsx <Container>` and `#!jsx <Block>` are custom components that we'll use to structure our widget.
|
||||
4. `#!js useWidgetAPI(widget, endpoint)` is a custom hook that we'll use to fetch data from an API.
|
||||
|
||||
---
|
||||
|
||||
Next, we'll define a functional component named `Component` that takes a `service` prop.
|
||||
|
||||
```js title="src/widgets/yourwidget/component.jsx" linenums="7"
|
||||
export default function Component({ service }) {}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
We grab the helper functions from the `useTranslation` hook.
|
||||
|
||||
```js title="src/widgets/yourwidget/component.jsx" linenums="8"
|
||||
const { t } = useTranslation();
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
We destructure the `widget` object from the `service` prop. The `widget` object contains the metadata for the widget, such as the API endpoint to fetch data from.
|
||||
|
||||
```js title="src/widgets/yourwidget/component.jsx" linenums="9"
|
||||
const { widget } = service;
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Now, the fun part! We use the `useWidgetAPI` hook to fetch data from an API. The `useWidgetAPI` hook takes two arguments: the `widget` object and the API endpoint to fetch data from. The `useWidgetAPI` hook returns an object with `data` and `error` properties.
|
||||
|
||||
```js title="src/widgets/yourwidget/component.jsx" linenums="10"
|
||||
const { data, error } = useWidgetAPI(widget, "info");
|
||||
```
|
||||
|
||||
!!! tip "API Tips"
|
||||
|
||||
You'll see here how part of the API url is built using the `url` and `endpoint` properties from the widget definition.
|
||||
|
||||
In this case, we're fetching data from the `info` endpoint. The `info` endpoint is defined in the `mappings` object. So the full API endpoint will be `"{url}/v1/info"`.
|
||||
|
||||
The mapping and endpoint are often the same, but must be defined regardless.
|
||||
|
||||
---
|
||||
|
||||
Next, we check if there's an error or no data.
|
||||
|
||||
If there's an error, we return a `Container` and pass it the `service` and `error` as props. The `Container` component will handle displaying the error message.
|
||||
|
||||
```js title="src/widgets/yourwidget/component.jsx" linenums="12"
|
||||
if (error) {
|
||||
return <Container service={service} error={error} />;
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
If there's no data, we return a `Container` component with three `Block` components, each with a `label`.
|
||||
|
||||
```js title="src/widgets/yourwidget/component.jsx" linenums="16"
|
||||
if (!data) {
|
||||
return (
|
||||
<Container service={service}>
|
||||
<Block label="yourwidget.key1" />
|
||||
<Block label="yourwidget.key2" />
|
||||
<Block label="yourwidget.key3" />
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
This will render the widget with placeholders for the data, i.e., a skeleton view.
|
||||
|
||||
!!! tip "Translation Tips"
|
||||
|
||||
The `label` prop in the `Block` component corresponds to the translation key we defined earlier in the `common.js` file. All text and numerical content should be translated.
|
||||
|
||||
---
|
||||
|
||||
If there is data, we return a `Container` component with three `Block` components, each with a `label` and a `value`.
|
||||
|
||||
Here we use the `t` function from the `useTranslation` hook to translate the data values. The `t` function takes the translation key and an object with variables to interpolate into the translation string.
|
||||
|
||||
We're using the `common.number` translation key to format the data values as numbers. This allows for easy localization of numbers, such as using commas or periods as decimal separators.
|
||||
|
||||
There are a large number of `common` numerical translation keys available, which you can learn more about in the [Translation Guide](translations.md).
|
||||
|
||||
```js title="src/widgets/yourwidget/component.jsx" linenums="26"
|
||||
return (
|
||||
<Container service={service}>
|
||||
<Block label="yourwidget.key1" value={t("common.number", { value: data.key1 })} />
|
||||
<Block label="yourwidget.key2" value={t("common.number", { value: data.key2 })} />
|
||||
<Block label="yourwidget.key3" value={t("common.number", { value: data.key3 })} />
|
||||
</Container>
|
||||
);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Here's the complete `component.jsx` file:
|
||||
|
||||
```js title="src/widgets/yourwidget/component.jsx" linenums="1"
|
||||
import { useTranslation } from "next-i18next";
|
||||
|
||||
import Container from "components/services/widget/container";
|
||||
import Block from "components/services/widget/block";
|
||||
import useWidgetAPI from "utils/proxy/use-widget-api";
|
||||
|
||||
export default function Component({ service }) {
|
||||
const { t } = useTranslation();
|
||||
const { widget } = service;
|
||||
const { data, error } = useWidgetAPI(widget, "info");
|
||||
|
||||
if (error) {
|
||||
return <Container service={service} error={error} />;
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
return (
|
||||
<Container service={service}>
|
||||
<Block label="yourwidget.key1" />
|
||||
<Block label="yourwidget.key2" />
|
||||
<Block label="yourwidget.key3" />
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Container service={service}>
|
||||
<Block label="yourwidget.key1" value={t("common.number", { value: data.key1 })} />
|
||||
<Block label="yourwidget.key2" value={t("common.number", { value: data.key2 })} />
|
||||
<Block label="yourwidget.key3" value={t("common.number", { value: data.key3 })} />
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
## Add the widget to the Homepage
|
||||
|
||||
To add your widget to the Homepage, you need to register it in the `src/widgets/widgets.js` file.
|
||||
|
||||
Open the `src/widgets/widgets.js` file and import the `Component` from your widget's `component.jsx` file. Please keep the alphabetical order.
|
||||
|
||||
```js
|
||||
// ...
|
||||
import yourwidget from "./yourwidget/widget";
|
||||
// ...
|
||||
```
|
||||
|
||||
Add `yourwidget` to the `widgets` object. Please keep the alphabetical order.
|
||||
|
||||
```js
|
||||
const widgets = {
|
||||
// ...
|
||||
yourwidget: yourwidget,
|
||||
// ...
|
||||
};
|
||||
```
|
||||
|
||||
You also need to add the widget to the `components` object in the `src/widgets/components.js` file.
|
||||
|
||||
Open the `src/widgets/components.js` file and import the `Component` from your widget's `component.jsx` file.
|
||||
|
||||
Please keep the alphabetical order.
|
||||
|
||||
```js
|
||||
const components = {
|
||||
// ...
|
||||
yourwidget: dynamic(() => import("./yourwidget/component")),
|
||||
// ...
|
||||
};
|
||||
```
|
||||
|
||||
## Using the widget
|
||||
|
||||
You can now use your custom widget in your Homepage. Open your `services.yaml` file and add a new service with the `yourwidget` widget.
|
||||
|
||||
```yaml
|
||||
- Services:
|
||||
- Your Widget:
|
||||
icon: yourwidget.svg
|
||||
href: https://example.com/
|
||||
widget:
|
||||
type: yourwidget
|
||||
url: http://127.0.0.1:1337
|
||||
```
|
||||
|
||||
!!! tip "API Tips"
|
||||
|
||||
You'll see here how part of the API url is built using the `url` and `endpoint` properties from the widget definition.
|
||||
|
||||
We defined the api endpoint as `"{url}/{endpoint}"`. This is where the `url` is defined. So the full API endpoint will be `http://127.0.0.1:1337/{endpoint}`.
|
||||
|
||||
---
|
||||
|
||||
That's it! You've successfully created a custom widget for Homepage. If you have any questions or need help, feel free to reach out to the Homepage community for assistance. Happy coding!
|
||||
@@ -1,10 +1,13 @@
|
||||
---
|
||||
title: Widgets
|
||||
description: Homepage info and status widgets.
|
||||
description: Find information on how to configure specific widgets in Homepage.
|
||||
icon: material/widgets
|
||||
---
|
||||
|
||||
Homepage has two types of widgets: info and service. Below we'll cover each type and how to configure them.
|
||||
|
||||
The left navigation of this site contains links to all available widgets.
|
||||
|
||||
## Service Widgets
|
||||
|
||||
Service widgets are used to display the status of a service, often a web service or API. Services (and their widgets) are defined in your `services.yaml` file. Here's an example:
|
||||
@@ -16,12 +19,17 @@ Service widgets are used to display the status of a service, often a web service
|
||||
description: Watch movies and TV shows.
|
||||
server: localhost
|
||||
container: plex
|
||||
widget:
|
||||
type: tautulli
|
||||
url: http://172.16.1.1:8181
|
||||
key: aabbccddeeffgghhiijjkkllmmnnoo
|
||||
widgets:
|
||||
- type: tautulli
|
||||
url: http://172.16.1.1:8181
|
||||
key: aabbccddeeffgghhiijjkkllmmnnoo
|
||||
- type: uptimekuma
|
||||
url: http://172.16.1.2:8080
|
||||
slug: aaaaaaabbbbb
|
||||
```
|
||||
|
||||
More detail on configuring service widgets can be found in the [Service Widgets Config](../configs/services.md) section.
|
||||
|
||||
## Info Widgets
|
||||
|
||||
Info widgets are used to display information in the header, often about your system or environment. Info widgets are defined your `widgets.yaml` file. Here's an example:
|
||||
@@ -33,3 +41,5 @@ Info widgets are used to display information in the header, often about your sys
|
||||
longitude: -117.51
|
||||
cache: 5
|
||||
```
|
||||
|
||||
More detail on configuring info widgets can be found in the [Info Widgets Config](../configs/info-widgets.md) section.
|
||||
|
||||
@@ -1,4 +1,21 @@
|
||||
---
|
||||
title: Info Widgets
|
||||
description: Homepage info widgets.
|
||||
search:
|
||||
exclude: true
|
||||
---
|
||||
|
||||
You can also find a list of all available info widgets in the sidebar navigation.
|
||||
|
||||
- [Date & Time](datetime.md)
|
||||
- [Glances](glances.md)
|
||||
- [Greeting](greeting.md)
|
||||
- [Kubernetes](kubernetes.md)
|
||||
- [Logo](logo.md)
|
||||
- [Longhorn](longhorn.md)
|
||||
- [OpenMeteo](openmeteo.md)
|
||||
- [OpenWeatherMap](openweathermap.md)
|
||||
- [Resources](resources.md)
|
||||
- [Search](search.md)
|
||||
- [Stocks](stocks.md)
|
||||
- [UniFi Controller](unifi_controller.md)
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Open-Meteo
|
||||
description: Open-Meteo Information Widget Configuration
|
||||
---
|
||||
|
||||
No registration is required at all! See [https://open-meteo.com/en/docs](https://open-meteo.com/en/docs)
|
||||
Homepage's recommended weather widget. No registration is required at all! See [https://open-meteo.com/en/docs](https://open-meteo.com/en/docs)
|
||||
|
||||
```yaml
|
||||
- openmeteo:
|
||||
|
||||
@@ -9,6 +9,8 @@ The disk path is the path reported by `df` (Mounted On), or the mount point of t
|
||||
|
||||
The cpu and memory resource information are the container's usage while [glances](glances.md) displays statistics for the host machine on which it is installed.
|
||||
|
||||
The resources widget primarily relies on a popular tool called [systeminformation](https://systeminformation.io). Thus, any limitiations of that software apply, for example, BRTFS RAID is not supported for the disk usage. In this case users may want to use the [glances widget](glances.md) instead.
|
||||
|
||||
_Note: unfortunately, the package used for getting CPU temp ([systeminformation](https://systeminformation.io)) is not compatible with some setups and will not report any value(s) for CPU temp._
|
||||
|
||||
**Any disk you wish to access must be mounted to your container as a volume.**
|
||||
@@ -22,9 +24,10 @@ _Note: unfortunately, the package used for getting CPU temp ([systeminformation]
|
||||
tempmin: 0 # optional, minimum cpu temp
|
||||
tempmax: 100 # optional, maximum cpu temp
|
||||
uptime: true
|
||||
units: imperial # only used by cpu temp
|
||||
units: imperial # only used by cpu temp, options: 'imperial' or 'metric'
|
||||
refresh: 3000 # optional, in ms
|
||||
diskUnits: bytes # optional, bytes (default) or bbytes. Only applies to disk
|
||||
network: true # optional, uses 'default' if true or specify a network interface name
|
||||
```
|
||||
|
||||
You can also pass a `label` option, which allows you to group resources under named sections,
|
||||
|
||||
48
docs/widgets/info/stocks.md
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
title: Stocks
|
||||
description: Stocks Information Widget Configuration
|
||||
---
|
||||
|
||||
_(Find the Stocks service widget [here](../services/stocks.md))_
|
||||
|
||||
The Stocks Information Widget allows you to include basic stock market data in
|
||||
your Homepage header. The widget includes the current price of a stock, and the
|
||||
change in price for the day.
|
||||
|
||||
Finnhub.io is currently the only supported provider for the stocks widget.
|
||||
You can sign up for a free api key at [finnhub.io](https://finnhub.io).
|
||||
You are encouraged to read finnhub.io's
|
||||
[terms of service/privacy policy](https://finnhub.io/terms-of-service) before
|
||||
signing up. The documentation for the endpoint that is utilized can be viewed
|
||||
[here](https://finnhub.io/docs/api/quote).
|
||||
|
||||
You must set `finnhub` as a provider in your `settings.yaml` like below:
|
||||
|
||||
```yaml
|
||||
providers:
|
||||
finnhub: yourfinnhubapikeyhere
|
||||
```
|
||||
|
||||
Next, configure the stocks widget in your `widgets.yaml`:
|
||||
|
||||
The information widget allows for up to 8 items in the watchlist.
|
||||
|
||||
```yaml
|
||||
- stocks:
|
||||
provider: finnhub
|
||||
color: true # optional, defaults to true
|
||||
cache: 1 # optional, default caches results for 1 minute
|
||||
watchlist:
|
||||
- GME
|
||||
- AMC
|
||||
- NVDA
|
||||
- AMD
|
||||
- TSM
|
||||
- MSFT
|
||||
- AAPL
|
||||
- BRK.A
|
||||
```
|
||||
|
||||
The above configuration would result in something like this:
|
||||
|
||||

|
||||
@@ -5,11 +5,17 @@ description: Unifi Controller Information Widget Configuration
|
||||
|
||||
_(Find the Unifi Controller service widget [here](../services/unifi-controller.md))_
|
||||
|
||||
You can display general connectivity status from your Unifi (Network) Controller. When authenticating you will want to use a local account that has at least read privileges.
|
||||
You can display general connectivity status from your Unifi (Network) Controller.
|
||||
|
||||
!!! warning
|
||||
|
||||
When authenticating you will want to use a local account that has at least read privileges.
|
||||
|
||||
An optional 'site' parameter can be supplied, if it is not the widget will use the default site for the controller.
|
||||
|
||||
_Note: If you enter e.g. incorrect credentials and receive an "API Error", you may need to recreate the container to clear the cache._
|
||||
!!! hint
|
||||
|
||||
If you enter e.g. incorrect credentials and receive an "API Error", you may need to recreate the container to clear the cache.
|
||||
|
||||
<img width="162" alt="unifi_infowidget" src="https://user-images.githubusercontent.com/4887959/197706832-f5a8706b-7282-4892-a666-b7d999752562.png">
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
title: Weather API
|
||||
description: Weather API Information Widget Configuration
|
||||
---
|
||||
|
||||
**Note: this widget is considered 'deprecated' since there is no longer a free Weather API tier for new members. See the openmeteo or openweathermap widgets for alternatives.**
|
||||
|
||||
The free tier is all that's required, you will need to [register](https://www.weatherapi.com/signup.aspx) and grab your API key.
|
||||
|
||||
```yaml
|
||||
- weatherapi:
|
||||
label: Kyiv # optional
|
||||
latitude: 50.449684
|
||||
longitude: 30.525026
|
||||
units: metric # or imperial
|
||||
apiKey: yourweatherapikey
|
||||
cache: 5 # Time in minutes to cache API responses, to stay within limits
|
||||
format: # optional, Intl.NumberFormat options
|
||||
maximumFractionDigits: 1
|
||||
```
|
||||
|
||||
You can optionally not pass a `latitude` and `longitude` and the widget will use your current location (requires a secure context, eg. HTTPS).
|
||||
33
docs/widgets/services/argocd.md
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
title: ArgoCD
|
||||
description: ArgoCD Widget Configuration
|
||||
---
|
||||
|
||||
Learn more about [ArgoCD](https://argo-cd.readthedocs.io/en/stable/).
|
||||
|
||||
Allowed fields (limited to a max of 4): `["apps", "synced", "outOfSync", "healthy", "progressing", "degraded", "suspended", "missing"]`
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
type: argocd
|
||||
url: http://argocd.host.or.ip:port
|
||||
key: argocdapikey
|
||||
```
|
||||
|
||||
You can generate an API key either by creating a bearer token for an existing account, see [Authorization](https://argo-cd.readthedocs.io/en/latest/developer-guide/api-docs/#authorization) (not recommended) or create a new local user account with limited privileges and generate an authentication token for this account. To do this the steps are:
|
||||
|
||||
- [Create a new local user](https://argo-cd.readthedocs.io/en/stable/operator-manual/user-management/#create-new-user) and give it the `apiKey` capability
|
||||
- Setup [RBAC configuration](https://argo-cd.readthedocs.io/en/stable/operator-manual/rbac/#rbac-configuration) for your the user and give it readonly access to your ArgoCD resources, e.g. by giving it the `role:readonly` role.
|
||||
- In your ArgoCD project under _Settings / Accounts_ open the newly created account and in the _Tokens_ section click on _Generate New_ to generate an access token, optionally specifying an expiry date.
|
||||
|
||||
If you installed ArgoCD via the official Helm chart, the account creation and rbac config can be achived by overriding these helm values:
|
||||
|
||||
```yaml
|
||||
configs:
|
||||
cm:
|
||||
accounts.readonly: apiKey
|
||||
rbac:
|
||||
policy.csv: "g, readonly, role:readonly"
|
||||
```
|
||||
|
||||
This creates a new account called `readonly` and attaches the `role:readonly` role to it.
|
||||
@@ -20,6 +20,6 @@ Allowed fields: `["users", "loginsLast24H", "failedLoginsLast24H"]`.
|
||||
```yaml
|
||||
widget:
|
||||
type: authentik
|
||||
url: http://authentik.host.or.ip:22070
|
||||
url: http://authentik.host.or.ip:port
|
||||
key: api_token
|
||||
```
|
||||
|
||||
28
docs/widgets/services/beszel.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
title: Beszel
|
||||
description: Beszel Widget Configuration
|
||||
---
|
||||
|
||||
Learn more about [Beszel](https://github.com/henrygd/beszel)
|
||||
|
||||
The widget has two modes, a single system with detailed info if `systemId` is provided, or an overview of all systems if `systemId` is not provided.
|
||||
|
||||
The `systemID` in the `id` field on the collections page of Beszel.
|
||||
|
||||
Allowed fields for 'overview' mode: `["systems", "up"]`
|
||||
Allowed fields for a single system: `["name", "status", "updated", "cpu", "memory", "disk", "network"]`
|
||||
|
||||
| Beszel Version | Homepage Widget Version |
|
||||
| -------------- | ----------------------- |
|
||||
| < 0.9.0 | 1 (default) |
|
||||
| >= 0.9.0 | 2 |
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
type: beszel
|
||||
url: http://beszel.host.or.ip
|
||||
username: username # email
|
||||
password: password
|
||||
systemId: systemId # optional
|
||||
version: 2 # optional, default is 1
|
||||
```
|
||||
@@ -7,6 +7,8 @@ Learn more about [Changedetection.io](https://github.com/dgtlmoon/changedetectio
|
||||
|
||||
Find your API key under `Settings > API`.
|
||||
|
||||
Allowed fields: `["diffsDetected", "totalObserved"]`.
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
type: changedetectionio
|
||||
|
||||
@@ -54,12 +54,20 @@ widget:
|
||||
time: other key
|
||||
color: theme # optional - defaults to "". Allowed values: `["theme", "adaptive", "black", "white"]`.
|
||||
format: date # optional
|
||||
- field: key
|
||||
label: Number of things in array
|
||||
format: size
|
||||
# This (no field) will take the root of the API response, e.g. when APIs return an array:
|
||||
- label: Number of items
|
||||
format: size
|
||||
```
|
||||
|
||||
Supported formats for the values are `text`, `number`, `float`, `percent`, `bytes`, `bitrate`, `date` and `relativeDate`.
|
||||
Supported formats for the values are `text`, `number`, `float`, `percent`, `bytes`, `bitrate`, `size`, `date` and `relativeDate`.
|
||||
|
||||
The `dateStyle` and `timeStyle` options of the `date` format are passed directly to [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) and the `style` and `numeric` options of `relativeDate` are passed to [Intl.RelativeTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat).
|
||||
|
||||
The `size` format will return the length of the array or string, or the number of keys in an object. This is then formatted as `number`.
|
||||
|
||||
## Example
|
||||
|
||||
For the following JSON object from the API:
|
||||
|
||||
@@ -14,4 +14,5 @@ widget:
|
||||
type: deluge
|
||||
url: http://deluge.host.or.ip
|
||||
password: password # webui password
|
||||
enableLeechProgress: true # optional, defaults to false
|
||||
```
|
||||
|
||||
14
docs/widgets/services/develancacheui.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: DeveLanCacheUI
|
||||
description: DeveLanCacheUI Widget Configuration
|
||||
---
|
||||
|
||||
Learn more about [DeveLanCacheUI](https://github.com/devedse/DeveLanCacheUI_Backend).
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
type: develancacheui
|
||||
url: http://your.develancacheui_backend.host:port
|
||||
```
|
||||
|
||||
The url should point to the DeveLanCacheUI Backend (API)
|
||||
@@ -16,4 +16,6 @@ To group both `offline` and `unknown` devices together, users should use the `of
|
||||
widget:
|
||||
type: esphome
|
||||
url: http://esphome.host.or.ip:port
|
||||
username: myesphomeuser # only if auth enabled
|
||||
password: myesphomepass # only if auth enabled
|
||||
```
|
||||
|
||||
@@ -3,7 +3,7 @@ title: EVCC
|
||||
description: EVCC Widget Configuration
|
||||
---
|
||||
|
||||
Learn more about [EVSS](https://github.com/evcc-io/evcc).
|
||||
Learn more about [EVCC](https://github.com/evcc-io/evcc).
|
||||
|
||||
Allowed fields: `["pv_power", "grid_power", "home_power", "charge_power]`.
|
||||
|
||||
|
||||
17
docs/widgets/services/frigate.md
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
title: Frigate
|
||||
description: Frigate Widget Configuration
|
||||
---
|
||||
|
||||
Learn more about [Frigate](https://frigate.video/).
|
||||
|
||||
Allowed fields: `["cameras", "uptime", "version"]`.
|
||||
|
||||
A recent event listing is disabled by default, but can be enabled with the `enableRecentEvents` option.
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
type: frigate
|
||||
url: http://frigate.host.or.ip:port
|
||||
enableRecentEvents: true # Optional, defaults to false
|
||||
```
|
||||
20
docs/widgets/services/gitlab.md
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
title: Gitlab
|
||||
description: Gitlab Widget Configuration
|
||||
---
|
||||
|
||||
Learn more about [Gitlab](https://gitlab.com).
|
||||
|
||||
API requires a personal access token with either `read_api` or `api` permission. See the [gitlab documentation](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#create-a-personal-access-token) for details on generating one.
|
||||
|
||||
Your Gitlab user ID can be found on [your profile page](https://support.circleci.com/hc/en-us/articles/20761157174043-How-to-find-your-GitLab-User-ID).
|
||||
|
||||
Allowed fields: `["events", "issues", "merges", "projects"]`.
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
type: gitlab
|
||||
url: http://gitlab.host.or.ip:port
|
||||
key: personal-access-token
|
||||
user_id: 123456
|
||||
```
|
||||
@@ -51,6 +51,8 @@ The metric field in the configuration determines the type of system monitoring d
|
||||
|
||||
`process`: Top 5 processes based on CPU usage. Gives an overview of which processes are consuming the most resources.
|
||||
|
||||
`containers`: Docker or Kubernetes containers list. Shows up to 5 containers running on the system and their resource usage.
|
||||
|
||||
`network:<interface_name>`: Network data usage for the specified interface. Replace `<interface_name>` with the name of your network interface, e.g., `network:enp0s25`, as specified in glances.
|
||||
|
||||
`sensor:<sensor_id>`: Temperature of the specified sensor, typically used to monitor CPU temperature. Replace `<sensor_id>` with the name of your sensor, e.g., `sensor:Package id 0` as specified in glances.
|
||||
|
||||
@@ -11,8 +11,11 @@ Learn more about [Gluetun](https://github.com/qdm12/gluetun).
|
||||
|
||||
Allowed fields: `["public_ip", "region", "country"]`.
|
||||
|
||||
To setup authentication, follow [the official Gluetun documentation](https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/control-server.md#authentication).
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
type: gluetun
|
||||
url: http://gluetun.host.or.ip:port
|
||||
key: gluetunkey # Not required if /v1/publicip/ip endpoint is configured with `auth = none`
|
||||
```
|
||||
|
||||
20
docs/widgets/services/headscale.md
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
title: Headscale
|
||||
description: Headscale Widget Configuration
|
||||
---
|
||||
|
||||
Learn more about [Headscale](https://headscale.net/).
|
||||
|
||||
You will need to generate an API access token from the [command line](https://headscale.net/ref/remote-cli/#create-an-api-key) using `headscale apikeys create` command.
|
||||
|
||||
To find your node ID, you can use `headscale nodes list` command.
|
||||
|
||||
Allowed fields: `["name", "address", "last_seen", "status"]`.
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
type: headscale
|
||||
url: http://headscale.host.or.ip:port
|
||||
nodeId: nodeid
|
||||
key: headscaleapiaccesstoken
|
||||
```
|
||||
@@ -5,6 +5,11 @@ description: Immich Widget Configuration
|
||||
|
||||
Learn more about [Immich](https://github.com/immich-app/immich).
|
||||
|
||||
| Immich Version | Homepage Widget Version |
|
||||
| -------------- | ----------------------- |
|
||||
| < v1.118 | 1 (default) |
|
||||
| >= v1.118 | 2 |
|
||||
|
||||
Find your API key under `Account Settings > API Keys`.
|
||||
|
||||
Allowed fields: `["users" ,"photos", "videos", "storage"]`.
|
||||
@@ -16,4 +21,5 @@ widget:
|
||||
type: immich
|
||||
url: http://immich.host.or.ip
|
||||
key: adminapikeyadminapikeyadminapikey
|
||||
version: 2 # optional, default is 1
|
||||
```
|
||||
|
||||
@@ -1,4 +1,141 @@
|
||||
---
|
||||
title: Service Widgets
|
||||
description: Homepage service widgets.
|
||||
search:
|
||||
exclude: true
|
||||
---
|
||||
|
||||
You can also find a list of all available service widgets in the sidebar navigation.
|
||||
|
||||
- [Adguard Home](adguard-home.md)
|
||||
- [ArgoCD](argocd.md)
|
||||
- [Atsumeru](atsumeru.md)
|
||||
- [Audiobookshelf](audiobookshelf.md)
|
||||
- [Authentik](authentik.md)
|
||||
- [Autobrr](autobrr.md)
|
||||
- [Azure DevOps](azuredevops.md)
|
||||
- [Bazarr](bazarr.md)
|
||||
- [Beszel](beszel.md)
|
||||
- [Caddy](caddy.md)
|
||||
- [Calendar](calendar.md)
|
||||
- [Calibre-Web](calibre-web.md)
|
||||
- [ChangeDetection.io](changedetectionio.md)
|
||||
- [Channels DVR Server](channelsdvrserver.md)
|
||||
- [Cloudflared](cloudflared.md)
|
||||
- [Coin Market Cap](coin-market-cap.md)
|
||||
- [CrowdSec](crowdsec.md)
|
||||
- [Custom API](customapi.md)
|
||||
- [Deluge](deluge.md)
|
||||
- [DeveLanCacheUI](develancacheui.md)
|
||||
- [DiskStation](diskstation.md)
|
||||
- [DownloadStation](downloadstation.md)
|
||||
- [Emby](emby.md)
|
||||
- [ESPHome](esphome.md)
|
||||
- [EVCC](evcc.md)
|
||||
- [Fileflows](fileflows.md)
|
||||
- [Flood](flood.md)
|
||||
- [FreshRSS](freshrss.md)
|
||||
- [Frigate](frigate.md)
|
||||
- [Fritz!Box](fritzbox.md)
|
||||
- [GameDig](gamedig.md)
|
||||
- [Gatus](gatus.md)
|
||||
- [Ghostfolio](ghostfolio.md)
|
||||
- [Gitea](gitea.md)
|
||||
- [Gitlab](gitlab.md)
|
||||
- [Glances](glances.md)
|
||||
- [Gluetun](gluetun.md)
|
||||
- [Gotify](gotify.md)
|
||||
- [Grafana](grafana.md)
|
||||
- [HDHomeRun](hdhomerun.md)
|
||||
- [Headscale](headscale.md)
|
||||
- [Healthchecks](healthchecks.md)
|
||||
- [Home Assistant](homeassistant.md)
|
||||
- [HomeBox](homebox.md)
|
||||
- [Homebridge](homebridge.md)
|
||||
- [iFrame](iframe.md)
|
||||
- [Immich](immich.md)
|
||||
- [Jackett](jackett.md)
|
||||
- [JDownloader](jdownloader.md)
|
||||
- [Jellyfin](jellyfin.md)
|
||||
- [Jellyseerr](jellyseerr.md)
|
||||
- [Kavita](kavita.md)
|
||||
- [Komga](komga.md)
|
||||
- [Kopia](kopia.md)
|
||||
- [Lidarr](lidarr.md)
|
||||
- [Linkwarden](linkwarden.md)
|
||||
- [Lubelogger](lubelogger.md)
|
||||
- [Mastodon](mastodon.md)
|
||||
- [Mailcow](mailcow.md)
|
||||
- [Mealie](mealie.md)
|
||||
- [Medusa](medusa.md)
|
||||
- [Mikrotik](mikrotik.md)
|
||||
- [Minecraft](minecraft.md)
|
||||
- [Miniflux](miniflux.md)
|
||||
- [MJpeg](mjpeg.md)
|
||||
- [Moonraker](moonraker.md)
|
||||
- [Mylar](mylar.md)
|
||||
- [MySpeed](myspeed.md)
|
||||
- [Navidrome](navidrome.md)
|
||||
- [NetAlertX](netalertx.md)
|
||||
- [Netdata](netdata.md)
|
||||
- [Nextcloud](nextcloud.md)
|
||||
- [NextDNS](nextdns.md)
|
||||
- [NGINX Proxy Manager](nginx-proxy-manager.md)
|
||||
- [NZBGet](nzbget.md)
|
||||
- [OctoPrint](octoprint.md)
|
||||
- [Omada](omada.md)
|
||||
- [Ombi](ombi.md)
|
||||
- [OpenDTU](opendtu.md)
|
||||
- [OpenMediaVault](openmediavault.md)
|
||||
- [OpenWRT](openwrt.md)
|
||||
- [OPNsense](opnsense.md)
|
||||
- [Overseerr](overseerr.md)
|
||||
- [PaperlessNGX](paperlessngx.md)
|
||||
- [Peanut](peanut.md)
|
||||
- [pfSense](pfsense.md)
|
||||
- [PhotoPrism](photoprism.md)
|
||||
- [Pi-hole](pihole.md)
|
||||
- [PlantIt](plantit.md)
|
||||
- [Plex & Tautulli](plex-tautulli.md)
|
||||
- [Plex](plex.md)
|
||||
- [Portainer](portainer.md)
|
||||
- [Prometheus](prometheus.md)
|
||||
- [Prometheus Metric](prometheusmetric.md)
|
||||
- [Prowlarr](prowlarr.md)
|
||||
- [Proxmox](proxmox.md)
|
||||
- [Proxmox Backup Server](proxmoxbackupserver.md)
|
||||
- [Pterodactyl](pterodactyl.md)
|
||||
- [PyLoad](pyload.md)
|
||||
- [qBittorrent](qbittorrent.md)
|
||||
- [QNAP](qnap.md)
|
||||
- [Radarr](radarr.md)
|
||||
- [Readarr](readarr.md)
|
||||
- [ROMM](romm.md)
|
||||
- [ruTorrent](rutorrent.md)
|
||||
- [SABnzbd](sabnzbd.md)
|
||||
- [Scrutiny](scrutiny.md)
|
||||
- [Sonarr](sonarr.md)
|
||||
- [Speedtest Tracker](speedtest-tracker.md)
|
||||
- [Stash](stash.md)
|
||||
- [Stocks](stocks.md)
|
||||
- [SwagDashboard](swagdashboard.md)
|
||||
- [Syncthing Relay Server](syncthing-relay-server.md)
|
||||
- [Tailscale](tailscale.md)
|
||||
- [Tandoor](tandoor.md)
|
||||
- [Technitium DNS](technitium.md)
|
||||
- [TDarr](tdarr.md)
|
||||
- [Traefik](traefik.md)
|
||||
- [Transmission](transmission.md)
|
||||
- [TrueNAS](truenas.md)
|
||||
- [TubeArchivist](tubearchivist.md)
|
||||
- [UniFi Controller](unifi-controller.md)
|
||||
- [Unmanic](unmanic.md)
|
||||
- [Uptime Kuma](uptime-kuma.md)
|
||||
- [UptimeRobot](uptimerobot.md)
|
||||
- [UrBackup](urbackup.md)
|
||||
- [Vikunja](vikunja.md)
|
||||
- [Watchtower](watchtower.md)
|
||||
- [WGEasy](wgeasy.md)
|
||||
- [WhatsUpDocker](whatsupdocker.md)
|
||||
- [xTeVe](xteve.md)
|
||||
- [Zabbix](zabbix.md)
|
||||
|
||||
15
docs/widgets/services/linkwarden.md
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: Linkwarden
|
||||
description: Linkwarden Widget Configuration
|
||||
---
|
||||
|
||||
Learn more about [Linkwarden](https://linkwarden.app/).
|
||||
|
||||
Allowed fields: `["links", "collections", "tags"]`.
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
type: linkwarden
|
||||
url: http://linkwarden.host.or.ip
|
||||
key: myApiKeyHere # On your Linkwarden install, go to Settings > Access Tokens. Generate a token.
|
||||
```
|
||||
20
docs/widgets/services/lubelogger.md
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
title: LubeLogger
|
||||
description: LubeLogger Widget Configuration
|
||||
---
|
||||
|
||||
Learn more about [LubeLogger](https://github.com/hargata/lubelog) (v1.3.7 or higher is required).
|
||||
|
||||
The widget comes in two 'flavors', one shows data for all vehicles or for just a specific vehicle with the `vehicleID` parameter.
|
||||
|
||||
Allowed fields: `["vehicles", "serviceRecords", "reminders"]`.
|
||||
For the single-vehicle version: `["vehicle", "serviceRecords", "reminders", "nextReminder"]`.
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
type: lubelogger
|
||||
url: https://lubelogger.host.or.ip
|
||||
username: lubeloggerusername
|
||||
password: lubeloggerpassword
|
||||
vehicleID: 1 # optional, changes to single-vehicle version
|
||||
```
|
||||
15
docs/widgets/services/mailcow.md
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: Mailcow
|
||||
description: Mailcow Widget Configuration
|
||||
---
|
||||
|
||||
Learn more about [Mailcow](https://github.com/mailcow/mailcow-dockerized).
|
||||
|
||||
Allowed fields: `["domains", "mailboxes", "mails", "storage"]`.
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
type: mailcow
|
||||
url: https://mailcow.host.or.ip
|
||||
key: mailcowapikey
|
||||
```
|
||||
@@ -14,4 +14,5 @@ widget:
|
||||
type: mealie
|
||||
url: http://mealie-frontend.host.or.ip
|
||||
key: mealieapitoken
|
||||
version: 2 # only required if version > 1, defaults to 1
|
||||
```
|
||||
|
||||
@@ -3,7 +3,7 @@ title: MJPEG
|
||||
description: MJPEG Stream Widget Configuration
|
||||
---
|
||||
|
||||

|
||||

|
||||
|
||||
Pass the stream URL from a service like [µStreamer](https://github.com/pikvm/ustreamer) or [camera-streamer](https://github.com/ayufan/camera-streamer).
|
||||
|
||||
|
||||
15
docs/widgets/services/myspeed.md
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: MySpeed
|
||||
description: MySpeed Widget Configuration
|
||||
---
|
||||
|
||||
Learn more about [MySpeed](https://myspeed.dev/).
|
||||
|
||||
Allowed fields: `["ping", "download", "upload"]`.
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
type: myspeed
|
||||
url: http://myspeed.host.or.ip:port
|
||||
password: password # only required if password is set
|
||||
```
|
||||
@@ -9,8 +9,11 @@ _Note that the project was renamed from PiAlert to NetAlertX._
|
||||
|
||||
Allowed fields: `["total", "connected", "new_devices", "down_alerts"]`.
|
||||
|
||||
If you have enabled a password on your NetAlertX instance, you will need to provide the `SYNC_api_token` as the `key` in your config.
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
type: netalertx
|
||||
url: http://ip:port
|
||||
key: netalertxsyncapitoken # optional, only if password is enabled
|
||||
```
|
||||
|
||||
@@ -8,7 +8,7 @@ Learn more about [OPNSense](https://opnsense.org/).
|
||||
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
|
||||
- Status: Traffic Graph / Reporting: Traffic (OPNSENSE 24.7.x)
|
||||
|
||||
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.
|
||||
|
||||
@@ -20,4 +20,5 @@ widget:
|
||||
url: http://opnsense.host.or.ip
|
||||
username: key
|
||||
password: secret
|
||||
wan: opt1 # optional, defaults to wan
|
||||
```
|
||||
|
||||
@@ -9,7 +9,7 @@ This widget requires the installation of the [pfsense-api](https://github.com/ja
|
||||
|
||||
Once pfSense API is installed, you can set the API to be read-only in System > API > Settings.
|
||||
|
||||
There are two currently supported authentication modes: 'Local Database' and 'API Token'. For 'Local Database', use `username` and `password` with the credentials of an admin user. For 'API Token', utilize the `headers` parameter with `client_token` and `client_id` obtained from pfSense as shown below. Do not use both headers and username / password.
|
||||
There are two currently supported authentication modes: 'Local Database' and 'API Key' (v2) / 'API Token' (v1). For 'Local Database', use `username` and `password` with the credentials of an admin user. The specifics of using the API key / token depend on the version of the pfSense API, see the config examples below. Do not use both headers and username / password.
|
||||
|
||||
The interface to monitor is defined by updating the `wan` parameter. It should be referenced as it is shown under Interfaces > Assignments in pfSense.
|
||||
|
||||
@@ -17,14 +17,25 @@ Load is returned instead of cpu utilization. This is a limitation in the pfSense
|
||||
|
||||
Allowed fields: `["load", "memory", "temp", "wanStatus", "wanIP", "disk"]` (maximum of 4)
|
||||
|
||||
For version 2:
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
type: pfsense
|
||||
url: http://pfsense.host.or.ip:port
|
||||
username: user # optional, or API token
|
||||
password: pass # optional, or API token
|
||||
username: user # optional, or API key
|
||||
password: pass # optional, or API key
|
||||
headers: # optional, or username/password
|
||||
Authorization: client_id client_token
|
||||
X-API-Key: key
|
||||
wan: igb0
|
||||
version: 2 # optional, defaults to 1 for api v1
|
||||
fields: ["load", "memory", "temp", "wanStatus"] # optional
|
||||
```
|
||||
|
||||
For version 1:
|
||||
|
||||
```yaml
|
||||
headers: # optional, or username/password
|
||||
Authorization: client_id client_token # obtained from pfSense API
|
||||
version: 1
|
||||
```
|
||||
|
||||
@@ -3,7 +3,9 @@ title: PhotoPrism
|
||||
description: PhotoPrism Widget Configuration
|
||||
---
|
||||
|
||||
Learn more about [PhotoPrism](https://github.com/photoprism/photoprism)..
|
||||
Learn more about [PhotoPrism](https://github.com/photoprism/photoprism).
|
||||
|
||||
Authentication is possible via [app passwords](https://docs.photoprism.app/user-guide/settings/account/#apps-and-devices) or username/password.
|
||||
|
||||
Allowed fields: `["albums", "photos", "videos", "people"]`.
|
||||
|
||||
@@ -11,6 +13,7 @@ Allowed fields: `["albums", "photos", "videos", "people"]`.
|
||||
widget:
|
||||
type: photoprism
|
||||
url: http://photoprism.host.or.ip:port
|
||||
username: admin
|
||||
password: password
|
||||
username: admin # required only if using username/password
|
||||
password: password # required only if using username/password
|
||||
key: # required only if using app passwords
|
||||
```
|
||||
|
||||
@@ -5,8 +5,6 @@ description: PiHole Widget Configuration
|
||||
|
||||
Learn more about [PiHole](https://github.com/pi-hole/pi-hole).
|
||||
|
||||
As of v2022.12 [PiHole requires the use of an API key](https://pi-hole.net/blog/2022/11/17/upcoming-changes-authentication-for-more-api-endpoints-required/#page-content) if an admin password is set. Older versions do not require any authentication even if the admin uses a password.
|
||||
|
||||
Allowed fields: `["queries", "blocked", "blocked_percent", "gravity"]`.
|
||||
|
||||
Note: by default the "blocked" and "blocked_percent" fields are merged e.g. "1,234 (15%)" but explicitly including the "blocked_percent" field will change them to display separately.
|
||||
@@ -16,7 +14,5 @@ widget:
|
||||
type: pihole
|
||||
url: http://pi.hole.or.ip
|
||||
version: 6 # required if running v6 or higher, defaults to 5
|
||||
key: yourpiholeapikey # optional
|
||||
key: yourpiholeapikey # optional, in v6 can be your password or app password
|
||||
```
|
||||
|
||||
_Added in v0.1.0, updated in v0.8.9_
|
||||
|
||||
67
docs/widgets/services/prometheusmetric.md
Normal file
@@ -0,0 +1,67 @@
|
||||
---
|
||||
title: Prometheus Metric
|
||||
description: Prometheus Metric Widget Configuration
|
||||
---
|
||||
|
||||
Learn more about [Querying Prometheus](https://prometheus.io/docs/prometheus/latest/querying/basics/).
|
||||
|
||||
This widget can show metrics for your service defined by PromQL queries which are requested from a running Prometheus instance.
|
||||
|
||||
Quries can be defined in the `metrics` array of the widget along with a label to be used to present the metric value. You can optionally specify a global `refreshInterval` in milliseconds and/or define the `refreshInterval` per metric. Inside the optional `format` object of a metric various formatting styles and transformations can be applied (see below).
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
type: prometheusmetric
|
||||
url: https://prometheus.host.or.ip
|
||||
refreshInterval: 10000 # optional - in milliseconds, defaults to 10s
|
||||
metrics:
|
||||
- label: Metric 1
|
||||
query: alertmanager_alerts{state="active"}
|
||||
- label: Metric 2
|
||||
query: apiserver_storage_size_bytes{node="mynode"}
|
||||
format:
|
||||
type: bytes
|
||||
- label: Metric 3
|
||||
query: avg(prometheus_notifications_latency_seconds)
|
||||
format:
|
||||
type: number
|
||||
suffix: s
|
||||
options:
|
||||
maximumFractionDigits: 4
|
||||
- label: Metric 4
|
||||
query: time()
|
||||
refreshInterval: 1000 # will override global refreshInterval
|
||||
format:
|
||||
type: date
|
||||
scale: 1000
|
||||
options:
|
||||
timeStyle: medium
|
||||
```
|
||||
|
||||
## Formatting
|
||||
|
||||
Supported values for `format.type` are `text`, `number`, `percent`, `bytes`, `bits`, `bbytes`, `bbits`, `byterate`, `bibyterate`, `bitrate`, `bibitrate`, `date`, `duration`, `relativeDate`, and `text` which is the default.
|
||||
|
||||
The `dateStyle` and `timeStyle` options of the `date` format are passed directly to [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) and the `style` and `numeric` options of `relativeDate` are passed to [Intl.RelativeTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat). For the `number` format, options of [Intl.NumberFormat](https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) can be used, e.g. `maximumFractionDigits` or `minimumFractionDigits`.
|
||||
|
||||
### Data Transformation
|
||||
|
||||
You can manipulate your metric value with the following tools: `scale`, `prefix` and `suffix`, for example:
|
||||
|
||||
```yaml
|
||||
- query: my_custom_metric{}
|
||||
label: Metric 1
|
||||
format:
|
||||
type: number
|
||||
scale: 1000 # multiplies value by a number or fraction string e.g. 1/16
|
||||
- query: my_custom_metric{}
|
||||
label: Metric 2
|
||||
format:
|
||||
type: number
|
||||
prefix: "$" # prefixes value with given string
|
||||
- query: my_custom_metric{}
|
||||
label: Metric 3
|
||||
format:
|
||||
type: number
|
||||
suffix: "€" # suffixes value with given string
|
||||
```
|
||||
@@ -9,22 +9,22 @@ This widget shows the running and total counts of both QEMU VMs and LX Container
|
||||
|
||||
You will need to generate an API Token for new or an existing user. Here is an example of how to do this for a new user.
|
||||
|
||||
1. Navigate to the Proxmox portal, click on Datacenter
|
||||
2. Expand Permissions, click on Groups
|
||||
3. Click the Create button
|
||||
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
|
||||
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
|
||||
9. Expand Permissions, click on API Tokens
|
||||
1. Navigate to the Proxmox portal, click on Datacenter
|
||||
2. Expand Permissions, click on Groups
|
||||
3. Click the Create button
|
||||
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
|
||||
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
|
||||
9. Expand Permissions, click on API Tokens
|
||||
10. Click the Add button
|
||||
- User: user from bullet 8 above
|
||||
- Token ID: something informative like the application or purpose like `homepage`
|
||||
|
||||
@@ -15,4 +15,5 @@ widget:
|
||||
url: http://qbittorrent.host.or.ip
|
||||
username: username
|
||||
password: password
|
||||
enableLeechProgress: true # optional, defaults to false
|
||||
```
|
||||
|
||||
@@ -3,7 +3,8 @@ title: Romm
|
||||
description: Romm Widget Configuration
|
||||
---
|
||||
|
||||
Allowed fields: `["platforms", "totalRoms"]`.
|
||||
Allowed fields: `["platforms", "totalRoms", "saves", "states", "screenshots", "totalfilesize"]`.
|
||||
If more than (4) fields are provided, only the first (4) will be used.
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
@@ -11,4 +12,5 @@ widget:
|
||||
url: http://romm.host.or.ip
|
||||
username: username # optional
|
||||
password: password # optional
|
||||
fields: ["platforms", "totalRoms", "saves", "states"] # optional - default fields shown
|
||||
```
|
||||
|
||||
15
docs/widgets/services/spoolman.md
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: Spoolman
|
||||
description: Spoolman Widget Configuration
|
||||
---
|
||||
|
||||
Learn more about [Spoolman](https://github.com/Donkie/Spoolman).
|
||||
|
||||
4 spools are displayed by default. If more than 4 spools are configured in spoolman you can use the spoolIds configuration option to control which are displayed.
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
type: spoolman
|
||||
url: http://spoolman.host.or.ip
|
||||
spoolIds: [1, 2, 3, 4] # optional
|
||||
```
|
||||
50
docs/widgets/services/stocks.md
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
title: Stocks
|
||||
description: Stocks Service Widget Configuration
|
||||
---
|
||||
|
||||
_(Find the Stocks information widget [here](../info/stocks.md))_
|
||||
|
||||
The widget includes:
|
||||
|
||||
- US stock market status
|
||||
- Current price of provided stock symbol
|
||||
- Change in price of stock symbol for the day.
|
||||
|
||||
Finnhub.io is currently the only supported provider for the stocks widget.
|
||||
You can sign up for a free api key at [finnhub.io](https://finnhub.io).
|
||||
You are encouraged to read finnhub.io's
|
||||
[terms of service/privacy policy](https://finnhub.io/terms-of-service) before
|
||||
signing up.
|
||||
|
||||
Allowed fields: no configurable fields for this widget.
|
||||
|
||||
You must set `finnhub` as a provider in your `settings.yaml`:
|
||||
|
||||
```yaml
|
||||
providers:
|
||||
finnhub: yourfinnhubapikeyhere
|
||||
```
|
||||
|
||||
Next, configure the stocks widget in your `services.yaml`:
|
||||
|
||||
The service widget allows for up to 28 items in the watchlist. You may get rate
|
||||
limited if using the information and service widgets together.
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
type: stocks
|
||||
provider: finnhub
|
||||
showUSMarketStatus: true # optional, defaults to true
|
||||
watchlist:
|
||||
- GME
|
||||
- AMC
|
||||
- NVDA
|
||||
- TSM
|
||||
- BRK.A
|
||||
- TSLA
|
||||
- AAPL
|
||||
- MSFT
|
||||
- AMZN
|
||||
- BRK.B
|
||||
```
|
||||
20
docs/widgets/services/suwayomi.md
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
title: Suwayomi
|
||||
description: Suwayomi Widget Configuration
|
||||
---
|
||||
|
||||
Learn more about [Suwayomi](https://github.com/Suwayomi/Suwayomi-Server).
|
||||
|
||||
Allowed fields: ["download", "nondownload", "read", "unread", "downloadedread", "downloadedunread", "nondownloadedread", "nondownloadedunread"]
|
||||
|
||||
The widget defaults to the first four above. If more than four fields are provided, only the first 4 are displayed.
|
||||
Category IDs can be obtained from the url when navigating to it, `?tab={categoryID}`.
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
type: suwayomi
|
||||
url: http://suwayomi.host.or.ip
|
||||
username: username #optional
|
||||
password: password #optional
|
||||
category: 0 #optional, defaults to all categories
|
||||
```
|
||||
@@ -11,4 +11,5 @@ Allowed fields: `["queue", "processed", "errored", "saved"]`.
|
||||
widget:
|
||||
type: tdarr
|
||||
url: http://tdarr.host.or.ip
|
||||
key: tdarrapikey # optional
|
||||
```
|
||||
|
||||
26
docs/widgets/services/technitium.md
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
title: Technitium DNS Server
|
||||
description: Technitium DNS Server Widget Configuration
|
||||
---
|
||||
|
||||
Learn more about [Technitium DNS Server](https://technitium.com/dns/).
|
||||
|
||||
Allowed fields (up to 4): `["totalQueries","totalNoError","totalServerFailure","totalNxDomain","totalRefused","totalAuthoritative","totalRecursive","totalCached","totalBlocked","totalDropped","totalClients"]`.
|
||||
|
||||
Defaults to: `["totalQueries", "totalAuthoritative", "totalCached", "totalServerFailure"]`
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
type: technitium
|
||||
url: <url to dns server>
|
||||
key: biglongapitoken
|
||||
range: LastDay # optional, defaults to LastHour
|
||||
```
|
||||
|
||||
#### API Key
|
||||
|
||||
This can be generated via the Technitium DNS Dashboard, and should be generated from a special API specific user.
|
||||
|
||||
#### Range
|
||||
|
||||
`range` value determines how far back of statistics to pull data for. The value comes directly from Technitium API documentation found [here](https://github.com/TechnitiumSoftware/DnsServer/blob/master/APIDOCS.md#dashboard-api-calls), defined as `"type"`. The value can be one of: `LastHour`, `LastDay`, `LastWeek`, `LastMonth`, `LastYear`.
|
||||
@@ -5,7 +5,7 @@ description: Tube Archivist Widget Configuration
|
||||
|
||||
Learn more about [Tube Archivist](https://github.com/tubearchivist/tubearchivist).
|
||||
|
||||
Requires API key.
|
||||
You must be running at least version 0.4.4
|
||||
|
||||
Allowed fields: `["downloads", "videos", "channels", "playlists"]`.
|
||||
|
||||
@@ -13,5 +13,5 @@ Allowed fields: `["downloads", "videos", "channels", "playlists"]`.
|
||||
widget:
|
||||
type: tubearchivist
|
||||
url: http://tubearchivist.host.or.ip
|
||||
key: apikeyapikeyapikeyapikeyapikey
|
||||
key: tubearchivistapikey
|
||||
```
|
||||
|
||||
@@ -7,13 +7,19 @@ Learn more about [Unifi Controller](https://ui.com/).
|
||||
|
||||
_(Find the Unifi Controller information widget [here](../info/unifi_controller.md))_
|
||||
|
||||
You can display general connectivity status from your Unifi (Network) Controller. When authenticating you will want to use an account that has at least read privileges.
|
||||
You can display general connectivity status from your Unifi (Network) Controller.
|
||||
|
||||
!!! warning
|
||||
|
||||
When authenticating you will want to use a local account that has at least read privileges.
|
||||
|
||||
An optional 'site' parameter can be supplied, if it is not the widget will use the default site for the controller.
|
||||
|
||||
Allowed fields: `["uptime", "wan", "lan", "lan_users", "lan_devices", "wlan", "wlan_users", "wlan_devices"]` (maximum of four).
|
||||
Allowed fields: `["uptime", "wan", "lan", "lan_users", "lan_devices", "wlan", "wlan_users", "wlan_devices"]` (maximum of four). Fields unsupported by the unifi device will not be shown.
|
||||
|
||||
Note that fields unsupported by the unifi device will not be shown.
|
||||
!!! hint
|
||||
|
||||
If you enter e.g. incorrect credentials and receive an "API Error", you may need to recreate the container to clear the cache.
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
|
||||
18
docs/widgets/services/vikunja.md
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
title: Vikunja
|
||||
description: Vikunja Widget Configuration
|
||||
---
|
||||
|
||||
Learn more about [Vikunja](https://vikunja.io).
|
||||
|
||||
Allowed fields: `["projects", "tasks7d", "tasksOverdue", "tasksInProgress"]`.
|
||||
|
||||
A list of the next 5 tasks ordered by due date is disabled by default, but can be enabled with the `enableTaskList` option.
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
type: vikunja
|
||||
url: http[s]://vikunja.host.or.ip[:port]
|
||||
key: vikunjaapikey
|
||||
enableTaskList: true # optional, defaults to false
|
||||
```
|
||||
@@ -5,7 +5,7 @@ description: Watchtower Widget Configuration
|
||||
|
||||
Learn more about [Watchtower](https://github.com/containrrr/watchtower).
|
||||
|
||||
To use this widget, Watchtower needs to be configured to to [enable metrics](https://containrrr.dev/watchtower/metrics/).
|
||||
To use this widget, Watchtower needs to be configured to [enable metrics](https://containrrr.dev/watchtower/metrics/).
|
||||
|
||||
Allowed fields: `["containers_scanned", "containers_updated", "containers_failed"]`.
|
||||
|
||||
|
||||