Compare commits

...

45 Commits

Author SHA1 Message Date
github-actions[bot]
b8af7ad95d New Crowdin translations by GitHub Action (#3698)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2024-07-07 13:22:57 -07:00
shamoon
028324556d Fix: increase width allowance for dates in ical agenda widget (#3711) 2024-07-06 14:45:17 -07:00
shamoon
38c32233f6 Enhancement: strip whitespace when checking JSON (#3706) 2024-07-03 07:25:51 -07:00
Dylan Ullrich
231e2408c3 Feature: stock market service and info widget (#3617)
---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2024-07-01 17:16:10 -07:00
github-actions[bot]
810c321881 New Crowdin translations by GitHub Action (#3605)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2024-06-30 15:02:53 -07:00
shamoon
8edfafb9f6 Fix search dropdown overlay with boxedheaders option (#3680) 2024-06-30 06:45:42 -07:00
Mark Titorenkov
6ed4472441 Fix: Sort truenas pools by name (#3669)
---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2024-06-26 07:51:30 -07:00
shamoon
b03467a832 Fix pyload debug line 2024-06-24 15:41:57 -07:00
Mathias Wagner
148511e6f8 Feature: MySpeed widget (#3662)
---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2024-06-23 12:00:04 -07:00
Matt Sullivan
f07d595ed9 Fix: Improve error handling for Glances widgets when host is unreachable (#3657)
---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
2024-06-23 09:43:51 -07:00
Ben Phelps
ec448d6c41 only darken on dark mode 2024-06-20 12:40:22 +03:00
Ben Phelps
2a31380dbc increase contrast, fix safari 2024-06-20 12:33:16 +03:00
shamoon
0962e3384c Update docker.md 2024-06-19 07:36:04 -07:00
shamoon
0ee3e7153d Docs tweaks 2024-06-17 22:17:28 -07:00
shamoon
11cc4a15cf Fix python requirements file 2024-06-17 21:57:47 -07:00
dependabot[bot]
ae5f0ace55 Chore(deps): Bump docker/build-push-action from 5 to 6 (#3648)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-17 10:43:34 -07:00
Ben Phelps
99c935f5e0 fix image shadow on logos 2024-06-17 20:26:48 +03:00
Ben Phelps
a4ee3089bc docs updates
adjust styles
move development starting guide
switch to webp for images
add sponsors page
2024-06-17 19:35:42 +03:00
Ben Phelps
23432300c7 add webp image versions 2024-06-17 18:59:25 +03:00
Ben Phelps
a7df687d82 fix docs version selector getting hidden 2024-06-17 09:22:52 +03:00
Ben Phelps
1d993046c2 use bg static URL for the time being
will fix once tagged
2024-06-17 09:19:50 +03:00
Ben Phelps
2685c20134 new website design
this is a trial run, it could very well get reverted
2024-06-17 09:10:53 +03:00
Ben Phelps
861a3d2091 disable mkdocs optimize plugin
it seems to cause more issues than is worth it
2024-06-14 14:13:50 +03:00
Ben Phelps
4d88ea1883 improve docs header, nav and social cards 2024-06-14 14:11:23 +03:00
Ben Phelps
aa33cf7295 add mkdocs-material[imaging] 2024-06-14 00:58:58 +03:00
Ben Phelps
cf14503fb0 social cards style 2024-06-14 00:54:52 +03:00
Ben Phelps
cecfc93440 focus funding on project targets 2024-06-14 00:09:00 +03:00
Ben Phelps
bf5264d882 fix image path 2024-06-14 00:06:52 +03:00
Ben Phelps
3923bb3cae bump mkdocs-material 2024-06-14 00:06:43 +03:00
shamoon
5d6e202840 Fix: dont force lowercase URL in QuickLaunch (#3634) 2024-06-13 13:48:34 -07:00
Ben Phelps
ef154b348e ready to preview guides 2024-06-13 21:27:32 +03:00
Ben Phelps
d45e66969d Merge branch 'main' into guides
# Conflicts:
#	src/pages/api/services/proxy.js
#	src/widgets/emby/component.jsx
#	src/widgets/glances/widget.js
2024-06-13 18:58:53 +03:00
Ben Phelps
62674372c5 first guides commit 2024-06-13 18:56:35 +03:00
shamoon
5afcf445be Documentation: fix broken mjpeg image 2024-06-09 07:35:17 -07:00
shamoon
e6f2ff970b Documentation: clarify deployment recs 2024-06-06 12:38:27 -07:00
github-actions[bot]
af1695687a New Crowdin translations by GitHub Action (#3589)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2024-06-05 19:38:39 -07:00
shamoon
f0d7cf3ce6 Security: Sanitize widget api keys from response
Closes https://github.com/gethomepage/homepage/security/advisories/GHSA-cjgf-vhj6-8cx4
2024-06-05 19:38:26 -07:00
Heng-Yi Wu
36e77e1fe3 Fix: coinmarketcap widget dropdown not clickable (#3591) 2024-06-05 00:56:28 -07:00
Aldy J
35dd7ec230 Enhancement: support multiple instance annotation for Kubernetes Automatic Service Discovery (#3590) 2024-06-04 21:29:13 -07:00
shamoon
15cc1d98c5 Fix: omada widget broken in v0.9.1 (#3587) 2024-06-04 07:28:45 -07:00
Liran Vaknin
9803ef70c6 Fix: openwrt widget handle null id in json rpc responses and cpu load representation (#3576) 2024-06-04 00:11:11 -07:00
shamoon
ccc27142ef Fix: caddy widget broken in 0.9.1 (#3579) 2024-06-04 00:05:06 -07:00
shamoon
9a20982406 Lint wg-easy 2024-06-04 00:03:48 -07:00
Conner Hnatiuk
67a69a5878 Fix: wg-easy threshold not properly computed (#3574) 2024-06-03 14:52:58 -07:00
shamoon
b3cf985d4a Merge pull request from GHSA-24m5-7vjx-9x37
* Restrict emby endpoints and proxy segments

* Dont allow path traversal in segments

* Restrict qbittorrent proxy endpoints

* Restrict npm proxy endpoints

* Restrict flood proxy endpoints

* Restrict tdarr proxy endpoints

* Restrict xteve proxy endpoints

* Restrict transmission proxy endpoints

* disallow non-mapped endpoints

this change drops all requests that have un-mapped endpoint queries

allowedEndpoints is added as a method to pass proxy requests via a regex on the endpoint

most widgets with custom proxies use either no endpoint, or a static one

Co-Authored-By: Ben Phelps <ben@phelps.io>
2024-06-02 21:13:29 -07:00
125 changed files with 3216 additions and 471 deletions

View File

@@ -11,3 +11,6 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120
[*.md]
trim_trailing_whitespace = false

3
.github/FUNDING.yml vendored
View File

@@ -1,2 +1,3 @@
github: [gethomepage, benphelps, shamoon]
github: [gethomepage]
open_collective: homepage
patreon: gethomepage

View File

@@ -116,7 +116,7 @@ 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')) }}

View File

@@ -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:
@@ -54,7 +51,7 @@ jobs:
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:
@@ -80,6 +77,7 @@ jobs:
- 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
- run: pip install mkdocs-redirects "mkdocs-material[imaging]"
- name: Set Git config
run: |
git config --global user.name "GitHub Action"

View File

@@ -66,6 +66,10 @@ Homepage is highly customizable, with support for custom themes, custom CSS & JS
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:

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
docs/assets/sections.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 KiB

BIN
docs/assets/sections.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -203,7 +203,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.

View File

@@ -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.

View File

@@ -98,6 +98,8 @@ 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.
### 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:

View File

@@ -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>
![Alt text](assets/banner_dark@2x.png#only-light)
![Alt text](assets/banner_light@2x.png#only-dark)
<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;" />
![Alt text](assets/homepage_demo.png)
<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>

View File

@@ -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>
!!! danger
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>

252
docs/layouts/custom.yml Normal file
View 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
View 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>
[![Youtube Video](https://img.youtube.com/vi/mC3tjysJ01E/maxresdefault.jpg)](https://www.youtube.com/watch?v=mC3tjysJ01E)
[![Youtube Video](https://img.youtube.com/vi/o9SLve4wBPY/maxresdefault.jpg)](https://www.youtube.com/watch?v=o9SLve4wBPY)
[![Youtube Video](https://img.youtube.com/vi/j9kbQucNwlc/maxresdefault.jpg)](https://www.youtube.com/watch?v=j9kbQucNwlc)
[![Youtube Video](https://img.youtube.com/vi/3Ux7zfCCM1A/maxresdefault.jpg)](https://www.youtube.com/watch?v=3Ux7zfCCM1A)
[![Youtube Video](https://img.youtube.com/vi/4AwUNy2eztA/maxresdefault.jpg)](https://www.youtube.com/watch?v=4AwUNy2eztA)
[![Youtube Video](https://img.youtube.com/vi/7mUUCB3kP0E/maxresdefault.jpg)](https://www.youtube.com/watch?v=7mUUCB3kP0E)
[![Youtube Video](https://img.youtube.com/vi/a5-4u0qFKaE/maxresdefault.jpg)](https://www.youtube.com/watch?v=a5-4u0qFKaE)
[![Youtube Video](https://img.youtube.com/vi/tV7-06FU4gQ/maxresdefault.jpg)](https://www.youtube.com/watch?v=tV7-06FU4gQ)
[![Youtube Video](https://img.youtube.com/vi/X2ycbT7rPu4/maxresdefault.jpg)](https://www.youtube.com/watch?v=X2ycbT7rPu4)
[![Youtube Video](https://img.youtube.com/vi/1jEWUJqL-eo/maxresdefault.jpg)](https://www.youtube.com/watch?v=1jEWUJqL-eo)
</div>
<div class="grid" markdown>
<div markdown>
## French
[![Youtube Video](https://img.youtube.com/vi/aGztk8you6o/maxresdefault.jpg)](https://www.youtube.com/watch?v=aGztk8you6o)
[![Youtube Video](https://img.youtube.com/vi/pQfhWqZh7YE/maxresdefault.jpg)](https://www.youtube.com/watch?v=pQfhWqZh7YE)
</div>
<div markdown>
## German
[![Youtube Video](https://img.youtube.com/vi/DrDgg-WRA2g/maxresdefault.jpg)](https://www.youtube.com/watch?v=DrDgg-WRA2g)
</div>
<div markdown>
## Chinese
[![Youtube Video](https://img.youtube.com/vi/DAW15ckt4n4/mqdefault.jpg){: style="width: 100%"}](https://www.youtube.com/watch?v=DAW15ckt4n4)
</div>
<div markdown>
## Russian
[![Youtube Video](https://img.youtube.com/vi/dk3Cp5ck8mY/maxresdefault.jpg)](https://www.youtube.com/watch?v=dk3Cp5ck8mY)
</div>
</div>

View File

@@ -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.

65
docs/more/sponsors.md Normal file
View File

@@ -0,0 +1,65 @@
---
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://glimelab.ai/"><img src="https://framerusercontent.com/images/28KxmT1G06GrFM8TKeNAC03QIms.svg" alt="Crowdin" style="max-width: 100%; height: 64px; display: block;" /></a>
<p>
GlimeLab provides the project with the awesome AI chatbot here and on GitHub and Discord.
</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>

View File

@@ -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 %}

View File

@@ -1,36 +1,271 @@
[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);
}
[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-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: "/";
}
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);
}
[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);
}
}
#glimeRoot * {
font-family: var(--md-text-font) !important;
font-family: var(--md-text-font) !important;
}
#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;
}
.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-image: url("https://raw.githubusercontent.com/gethomepage/homepage/main/docs/assets/blossom_valley.jpg");
background-size: cover;
background-attachment: fixed;
background-position: center;
background-color: transparent;
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-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.3);
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);
}

View File

@@ -1,7 +1,7 @@
---
title: Troubleshooting
description: Basic Troubleshooting
icon: material/message-question
hide:
- navigation
---

View 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.

View 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.
![Component Sections](../../assets/sections.webp)
**`<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>
```

View File

@@ -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.

View 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).

View 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.

View File

@@ -0,0 +1,178 @@
---
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 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. Where the endpoint is the method to call.
=== "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" },
},
};
```
=== "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
```
### `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.

View 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.uptime` | `1 day, 1 hour` | Format an uptime. |
### 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. |

View 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!

View File

@@ -1,6 +1,7 @@
---
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.

View 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:
![Example of Stocks Widget](../../assets/widget_stocks_demo.png)

View File

@@ -3,7 +3,7 @@ title: MJPEG
description: MJPEG Stream Widget Configuration
---
![camera-preview](https://github.com/gethomepage/homepage-docs/assets/82196/dc375ae3-0670-489f-8db6-83ff1f423d12)
![camera-preview](https://github.com/gethomepage/homepage/assets/4887959/dbc388d7-04a6-482c-8f36-f9534689b062)
Pass the stream URL from a service like [µStreamer](https://github.com/pikvm/ustreamer) or [camera-streamer](https://github.com/ayufan/camera-streamer).

View 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
```

View 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
```

View File

@@ -1,4 +1,4 @@
site_name: homepage
site_name: Homepage
# Project information
site_url: https://gethomepage.dev/
@@ -10,199 +10,218 @@ edit_uri: https://github.com/gethomepage/homepage/tree/main/docs/
nav:
- "Home":
- index.md
- index.md
- "Installation":
- installation/index.md
- installation/docker.md
- installation/k8s.md
- installation/unraid.md
- installation/source.md
- installation/index.md
- installation/docker.md
- installation/k8s.md
- installation/unraid.md
- installation/source.md
- "Configuration":
- configs/index.md
- configs/settings.md
- configs/bookmarks.md
- configs/services.md
- configs/service-widgets.md
- configs/kubernetes.md
- configs/docker.md
- configs/custom-css-js.md
- configs/index.md
- configs/settings.md
- configs/bookmarks.md
- configs/services.md
- configs/service-widgets.md
- configs/kubernetes.md
- configs/docker.md
- configs/custom-css-js.md
- "Widgets":
- widgets/index.md
- "Service Widgets":
- widgets/services/index.md
- widgets/services/adguard-home.md
- widgets/services/atsumeru.md
- widgets/services/audiobookshelf.md
- widgets/services/authentik.md
- widgets/services/autobrr.md
- widgets/services/azuredevops.md
- widgets/services/bazarr.md
- widgets/services/caddy.md
- widgets/services/calendar.md
- widgets/services/calibre-web.md
- widgets/services/changedetectionio.md
- widgets/services/channelsdvrserver.md
- widgets/services/cloudflared.md
- widgets/services/coin-market-cap.md
- widgets/services/crowdsec.md
- widgets/services/customapi.md
- widgets/services/deluge.md
- widgets/services/diskstation.md
- widgets/services/downloadstation.md
- widgets/services/emby.md
- widgets/services/esphome.md
- widgets/services/evcc.md
- widgets/services/fileflows.md
- widgets/services/flood.md
- widgets/services/freshrss.md
- widgets/services/fritzbox.md
- widgets/services/gamedig.md
- widgets/services/gatus.md
- widgets/services/ghostfolio.md
- widgets/services/gitea.md
- widgets/services/glances.md
- widgets/services/gluetun.md
- widgets/services/gotify.md
- widgets/services/grafana.md
- widgets/services/hdhomerun.md
- widgets/services/healthchecks.md
- widgets/services/homeassistant.md
- widgets/services/homebox.md
- widgets/services/homebridge.md
- widgets/services/iframe.md
- widgets/services/immich.md
- widgets/services/jackett.md
- widgets/services/jdownloader.md
- widgets/services/jellyfin.md
- widgets/services/jellyseerr.md
- widgets/services/kavita.md
- widgets/services/komga.md
- widgets/services/kopia.md
- widgets/services/lidarr.md
- widgets/services/mastodon.md
- widgets/services/mealie.md
- widgets/services/medusa.md
- widgets/services/mikrotik.md
- widgets/services/minecraft.md
- widgets/services/miniflux.md
- widgets/services/mjpeg.md
- widgets/services/moonraker.md
- widgets/services/mylar.md
- widgets/services/navidrome.md
- widgets/services/netdata.md
- widgets/services/netalertx.md
- widgets/services/nextcloud.md
- widgets/services/nextdns.md
- widgets/services/nginx-proxy-manager.md
- widgets/services/nzbget.md
- widgets/services/octoprint.md
- widgets/services/omada.md
- widgets/services/ombi.md
- widgets/services/opendtu.md
- widgets/services/openmediavault.md
- widgets/services/opnsense.md
- widgets/services/openwrt.md
- widgets/services/overseerr.md
- widgets/services/paperlessngx.md
- widgets/services/peanut.md
- widgets/services/pfsense.md
- widgets/services/photoprism.md
- widgets/services/pihole.md
- widgets/services/plantit.md
- widgets/services/plex-tautulli.md
- widgets/services/plex.md
- widgets/services/portainer.md
- widgets/services/prometheus.md
- widgets/services/prowlarr.md
- widgets/services/proxmox.md
- widgets/services/proxmoxbackupserver.md
- widgets/services/pterodactyl.md
- widgets/services/pyload.md
- widgets/services/qbittorrent.md
- widgets/services/qnap.md
- widgets/services/radarr.md
- widgets/services/readarr.md
- widgets/services/romm.md
- widgets/services/rutorrent.md
- widgets/services/sabnzbd.md
- widgets/services/scrutiny.md
- widgets/services/sonarr.md
- widgets/services/speedtest-tracker.md
- widgets/services/stash.md
- widgets/services/swagdashboard.md
- widgets/services/syncthing-relay-server.md
- widgets/services/tailscale.md
- widgets/services/tandoor.md
- widgets/services/tdarr.md
- widgets/services/traefik.md
- widgets/services/transmission.md
- widgets/services/truenas.md
- widgets/services/tubearchivist.md
- widgets/services/unifi-controller.md
- widgets/services/unmanic.md
- widgets/services/uptime-kuma.md
- widgets/services/uptimerobot.md
- widgets/services/urbackup.md
- widgets/services/watchtower.md
- widgets/services/whatsupdocker.md
- widgets/services/xteve.md
- "Information Widgets":
- widgets/info/index.md
- widgets/info/datetime.md
- widgets/info/glances.md
- widgets/info/greeting.md
- widgets/info/kubernetes.md
- widgets/info/logo.md
- widgets/info/longhorn.md
- widgets/info/openmeteo.md
- widgets/info/openweathermap.md
- widgets/info/resources.md
- widgets/info/search.md
- widgets/info/unifi_controller.md
- widgets/info/weather.md
- more/troubleshooting.md
- widgets/index.md
- "Service Widgets":
- widgets/services/index.md
- widgets/services/adguard-home.md
- widgets/services/atsumeru.md
- widgets/services/audiobookshelf.md
- widgets/services/authentik.md
- widgets/services/autobrr.md
- widgets/services/azuredevops.md
- widgets/services/bazarr.md
- widgets/services/caddy.md
- widgets/services/calendar.md
- widgets/services/calibre-web.md
- widgets/services/changedetectionio.md
- widgets/services/channelsdvrserver.md
- widgets/services/cloudflared.md
- widgets/services/coin-market-cap.md
- widgets/services/crowdsec.md
- widgets/services/customapi.md
- widgets/services/deluge.md
- widgets/services/diskstation.md
- widgets/services/downloadstation.md
- widgets/services/emby.md
- widgets/services/esphome.md
- widgets/services/evcc.md
- widgets/services/fileflows.md
- widgets/services/flood.md
- widgets/services/freshrss.md
- widgets/services/fritzbox.md
- widgets/services/gamedig.md
- widgets/services/gatus.md
- widgets/services/ghostfolio.md
- widgets/services/gitea.md
- widgets/services/glances.md
- widgets/services/gluetun.md
- widgets/services/gotify.md
- widgets/services/grafana.md
- widgets/services/hdhomerun.md
- widgets/services/healthchecks.md
- widgets/services/homeassistant.md
- widgets/services/homebox.md
- widgets/services/homebridge.md
- widgets/services/iframe.md
- widgets/services/immich.md
- widgets/services/jackett.md
- widgets/services/jdownloader.md
- widgets/services/jellyfin.md
- widgets/services/jellyseerr.md
- widgets/services/kavita.md
- widgets/services/komga.md
- widgets/services/kopia.md
- widgets/services/lidarr.md
- widgets/services/mastodon.md
- widgets/services/mealie.md
- widgets/services/medusa.md
- widgets/services/mikrotik.md
- widgets/services/minecraft.md
- widgets/services/miniflux.md
- widgets/services/mjpeg.md
- widgets/services/moonraker.md
- widgets/services/mylar.md
- widgets/services/myspeed.md
- widgets/services/navidrome.md
- widgets/services/netdata.md
- widgets/services/netalertx.md
- widgets/services/nextcloud.md
- widgets/services/nextdns.md
- widgets/services/nginx-proxy-manager.md
- widgets/services/nzbget.md
- widgets/services/octoprint.md
- widgets/services/omada.md
- widgets/services/ombi.md
- widgets/services/opendtu.md
- widgets/services/openmediavault.md
- widgets/services/opnsense.md
- widgets/services/openwrt.md
- widgets/services/overseerr.md
- widgets/services/paperlessngx.md
- widgets/services/peanut.md
- widgets/services/pfsense.md
- widgets/services/photoprism.md
- widgets/services/pihole.md
- widgets/services/plantit.md
- widgets/services/plex-tautulli.md
- widgets/services/plex.md
- widgets/services/portainer.md
- widgets/services/prometheus.md
- widgets/services/prowlarr.md
- widgets/services/proxmox.md
- widgets/services/proxmoxbackupserver.md
- widgets/services/pterodactyl.md
- widgets/services/pyload.md
- widgets/services/qbittorrent.md
- widgets/services/qnap.md
- widgets/services/radarr.md
- widgets/services/readarr.md
- widgets/services/romm.md
- widgets/services/rutorrent.md
- widgets/services/sabnzbd.md
- widgets/services/scrutiny.md
- widgets/services/sonarr.md
- widgets/services/speedtest-tracker.md
- widgets/services/stash.md
- widgets/services/stocks.md
- widgets/services/swagdashboard.md
- widgets/services/syncthing-relay-server.md
- widgets/services/tailscale.md
- widgets/services/tandoor.md
- widgets/services/tdarr.md
- widgets/services/traefik.md
- widgets/services/transmission.md
- widgets/services/truenas.md
- widgets/services/tubearchivist.md
- widgets/services/unifi-controller.md
- widgets/services/unmanic.md
- widgets/services/uptime-kuma.md
- widgets/services/uptimerobot.md
- widgets/services/urbackup.md
- widgets/services/watchtower.md
- widgets/services/wgeasy.md
- widgets/services/whatsupdocker.md
- widgets/services/xteve.md
- "Information Widgets":
- widgets/info/index.md
- widgets/info/datetime.md
- widgets/info/glances.md
- widgets/info/greeting.md
- widgets/info/kubernetes.md
- widgets/info/logo.md
- widgets/info/longhorn.md
- widgets/info/openmeteo.md
- widgets/info/openweathermap.md
- widgets/info/resources.md
- widgets/info/search.md
- widgets/info/stocks.md
- widgets/info/unifi_controller.md
- widgets/info/weather.md
- "Learn":
- widgets/authoring/index.md
- "Getting Started": widgets/authoring/getting-started.md
- "Tutorials":
- widgets/authoring/tutorial.md
- "Guides":
- widgets/authoring/component.md
- widgets/authoring/metadata.md
- widgets/authoring/proxies.md
- widgets/authoring/api.md
- widgets/authoring/translations.md
- "Troubleshooting":
- troubleshooting/index.md
- "More":
- more/index.md
- more/development.md
- more/translations.md
- more/homepage-move.md
- more/index.md
- more/translations.md
- more/coverage.md
- more/sponsors.md
- more/homepage-move.md
theme:
name: material
custom_dir: docs/overrides
language: en
palette:
- media: "(prefers-color-scheme)"
toggle:
icon: material/brightness-auto
name: Switch to light mode
- media: "(prefers-color-scheme: light)"
scheme: default
primary: black
accent: black
toggle:
icon: material/brightness-7
name: Switch to dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: black
accent: blue
toggle:
icon: material/brightness-4
name: Switch to system preference
logo: assets/light_squircle@2x.png
- media: "(prefers-color-scheme)"
toggle:
icon: material/brightness-auto
name: Switch to light mode
- media: "(prefers-color-scheme: light)"
scheme: default
primary: black
accent: black
toggle:
icon: material/brightness-7
name: Switch to dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: black
accent: blue
toggle:
icon: material/brightness-4
name: Switch to system preference
logo: assets/banner_light@2x.webp
favicon: assets/favicon.ico
features:
- navigation.instant
- content.action.edit
- search.suggest
- search.share
- content.code.copy
- content.code.select
- navigation.tracking
- navigation.tabs
- navigation.sections
- navigation.indexes
- navigation.instant
- content.action.edit
- search.suggest
- search.share
- content.code.copy
- content.code.select
- navigation.tracking
- navigation.tabs
- navigation.sections
- navigation.indexes
- content.code.annotate
extra_css:
- "stylesheets/extra.css"
@@ -215,10 +234,12 @@ extra:
social:
- icon: fontawesome/brands/discord
link: https://discord.gg/k4ruYNrudu
- icon: fontawesome/regular/message
link: https://github.com/gethomepage/homepage/discussions
- icon: fontawesome/brands/github
link: https://github.com/gethomepage/homepage
- icon: simple/opencollective
link: https://opencollective.com/homepage
- icon: simple/patreon
link: https://www.patreon.com/gethomepage
markdown_extensions:
- pymdownx.highlight:
@@ -231,6 +252,8 @@ markdown_extensions:
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences
- pymdownx.tabbed:
alternate_style: true
- pymdownx.critic
- pymdownx.caret
- pymdownx.keys
@@ -245,12 +268,21 @@ plugins:
- group:
enabled: !ENV MKINSIDERS
plugins:
- optimize
- typeset
- social
- social:
cards_layout: default
cards_layout_options:
background_image: docs/assets/blossom_valley_blur.jpg
background_color: "rgba(13, 29, 41, 128)"
color: "#ffffff"
logo: docs/assets/light_squircle@2x.webp
- tags
- search:
pipeline:
- stemmer
- stopWordFilter
- trimmer
- redirects:
redirect_maps:
"more/troubleshooting.md": "troubleshooting/index.md"
"more/development.md": "widgets/authoring/getting-started.md"

View File

@@ -884,9 +884,21 @@
"total": "Totaal"
},
"swagdashboard": {
"proxied": "Proxied",
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
"proxied": "Gevolmagtig",
"auth": "Met Aut",
"outdated": "Verouderd",
"banned": "Verban"
},
"myspeed": {
"ping": "Pieng",
"download": "Aflaai",
"upload": "Laai Op"
},
"stocks": {
"stocks": "Aandele",
"loading": "Laai",
"open": "Oop - VS Mark",
"closed": "Toe - VS Mark",
"invalidConfiguration": "Ongeldige opstelling"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "بينغ",
"download": "التنزيل",
"upload": "التحميل"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -16,7 +16,7 @@
"uptime": "{{value, uptime}}",
"months": "mo",
"days": "d",
"hours": "h",
"hours": "ч",
"minutes": "m",
"seconds": "s"
},
@@ -412,7 +412,7 @@
"free": "Свободни",
"used": "Заети",
"days": "d",
"hours": "h",
"hours": "ч",
"crit": "Crit",
"read": "Read",
"write": "Write",
@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Latència",
"download": "Descarregar",
"upload": "Pujada"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Odezva",
"download": "Stahování",
"upload": "Nahrávání"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "Mit Auth",
"outdated": "Veraltet",
"banned": "Gebannt"
},
"myspeed": {
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Aktien",
"loading": "Wird geladen",
"open": "Offen - US-Markt",
"closed": "Geschlossen - US-Markt",
"invalidConfiguration": "Ungültige Konfiguration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Ping",
"download": "Λήξη",
"upload": "Μεταφόρτωση"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Sondaĵo",
"download": "Elŝuti",
"upload": "Alŝuti"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -31,7 +31,7 @@
},
"weather": {
"current": "Ubicación actual",
"allow": "Clic para permitir",
"allow": "Pulsa para permitir",
"updating": "Actualizando",
"wait": "Espera, por favor"
},
@@ -79,7 +79,7 @@
"starting": "Comenzando",
"unhealthy": "Insalubre",
"not_found": "No encontrado",
"exited": "Salida",
"exited": "Terminado",
"partial": "Parcial"
},
"ping": {
@@ -140,7 +140,7 @@
"connectionStatusPendingDisconnect": "Desconexión pendiente",
"connectionStatusDisconnecting": "Desconectando",
"connectionStatusDisconnected": "Desconectado",
"connectionStatusConnected": "Connected",
"connectionStatusConnected": "Conectado",
"uptime": "Tiempo activo",
"maxDown": "Descarga máxima",
"maxUp": "Subida máxima",
@@ -279,9 +279,9 @@
},
"netalertx": {
"total": "Total",
"connected": "Connected",
"new_devices": "New Devices",
"down_alerts": "Down Alerts"
"connected": "Conectado",
"new_devices": "Nuevos dispositivos",
"down_alerts": "Alertas de caída"
},
"pihole": {
"queries": "Consultas",
@@ -544,7 +544,7 @@
"hdhomerun": {
"channels": "Canales",
"hd": "Alta definición",
"tunerCount": "Tuners",
"tunerCount": "Sintonizadores",
"channelNumber": "Canal",
"channelNetwork": "Red",
"signalStrength": "Intensidad",
@@ -827,7 +827,7 @@
},
"romm": {
"platforms": "Plataformas",
"totalRoms": "Total ROMs"
"totalRoms": "ROMs totales"
},
"netdata": {
"warnings": "Advertencias",
@@ -835,38 +835,38 @@
},
"plantit": {
"events": "Eventos",
"plants": "Plants",
"plants": "Plantas",
"photos": "Fotos",
"species": "Species"
"species": "Especies"
},
"gitea": {
"notifications": "Notificaciones",
"issues": "Números",
"pulls": "Pull Requests"
"pulls": "Solicitudes de cambios"
},
"stash": {
"scenes": "Scenes",
"scenesPlayed": "Scenes Played",
"playCount": "Total Plays",
"playDuration": "Time Watched",
"sceneSize": "Scenes Size",
"sceneDuration": "Scenes Duration",
"scenes": "Escenas",
"scenesPlayed": "Escenas reproducidas",
"playCount": "Reproducciones totales",
"playDuration": "Tiempo visto",
"sceneSize": "Tamaño de las escenas",
"sceneDuration": "Duración de las escenas",
"images": "Imágenes",
"imageSize": "Tamaño de imagen",
"galleries": "Galerías",
"performers": "Performers",
"studios": "Studios",
"performers": "Intérpretes",
"studios": "Estudios",
"movies": "Películas",
"tags": "Etiquetas",
"oCount": "O Count"
"oCount": "O cuenta"
},
"tandoor": {
"users": "Usuarios",
"recipes": "Recetas",
"keywords": "Keywords"
"keywords": "Palabras clave"
},
"homebox": {
"items": "Items",
"items": "Objetos",
"totalWithWarranty": "Con Garantía",
"locations": "Ubicaciones",
"labels": "Etiquetas",
@@ -875,18 +875,30 @@
},
"crowdsec": {
"alerts": "Alertas",
"bans": "Bans"
"bans": "Baneos"
},
"wgeasy": {
"connected": "Connected",
"connected": "Conectado",
"enabled": "Activado",
"disabled": "Desactivado",
"total": "Total"
},
"swagdashboard": {
"proxied": "Proxied",
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
"proxied": "Proxy activado",
"auth": "Con Autenticación",
"outdated": "Desactualizado",
"banned": "Baneado"
},
"myspeed": {
"ping": "Ping",
"download": "Descarga",
"upload": "Subida"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -884,9 +884,21 @@
"total": "Total"
},
"swagdashboard": {
"proxied": "Proxied",
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
"proxied": "Par proxy",
"auth": "Avec authentification",
"outdated": "Obsolète",
"banned": "Banni"
},
"myspeed": {
"ping": "Ping",
"download": "Récep.",
"upload": "Envoi"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "S autentifikacijom",
"outdated": "Zastarjelo",
"banned": "Zabranjen pristup"
},
"myspeed": {
"ping": "Ping",
"download": "Preuzimanje",
"upload": "Prijenos"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Ping",
"download": "Letöltés",
"upload": "Feltöltés"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Ping",
"download": "Unduh",
"upload": "Unggah"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -545,11 +545,11 @@
"channels": "Canali",
"hd": "HD",
"tunerCount": "Tuners",
"channelNumber": "Channel",
"channelNumber": "Canale",
"channelNetwork": "Rete",
"signalStrength": "Intensità",
"signalQuality": "Quality",
"symbolQuality": "Quality",
"signalQuality": "Qualità",
"symbolQuality": "Qualità",
"networkRate": "Bitrate",
"clientIP": "Client"
},
@@ -564,11 +564,11 @@
},
"peanut": {
"battery_charge": "Battery Charge",
"ups_load": "UPS Load",
"ups_status": "UPS Status",
"ups_load": "Carico UPS",
"ups_status": "Stato UPS",
"online": "Online",
"on_battery": "On Battery",
"low_battery": "Low Battery"
"on_battery": "Alimentazione a batteria",
"low_battery": "Batteria Quasi Scarica"
},
"nextdns": {
"wait": "Attendere prego",
@@ -798,10 +798,10 @@
},
"openwrt": {
"uptime": "Tempo di attività",
"cpuLoad": "CPU Load Avg (5m)",
"cpuLoad": "Media Carico Cpu (5m)",
"up": "Up",
"down": "Down",
"bytesTx": "Transmitted",
"bytesTx": "Trasmessi",
"bytesRx": "Ricevuti"
},
"uptimerobot": {
@@ -826,7 +826,7 @@
"noEventsFound": "Nessun evento trovato"
},
"romm": {
"platforms": "Platforms",
"platforms": "Piattaforme",
"totalRoms": "Total ROMs"
},
"netdata": {
@@ -834,7 +834,7 @@
"criticals": "Criticals"
},
"plantit": {
"events": "Events",
"events": "Eventi",
"plants": "Plants",
"photos": "Foto",
"species": "Specie"
@@ -852,7 +852,7 @@
"sceneSize": "Dimensione Delle Scene",
"sceneDuration": "Durata Delle Scene",
"images": "Immagini",
"imageSize": "Images Size",
"imageSize": "Dimensioni immagine",
"galleries": "Galleries",
"performers": "Esecutori",
"studios": "Studi",
@@ -863,19 +863,19 @@
"tandoor": {
"users": "Utenti",
"recipes": "Ricette",
"keywords": "Keywords"
"keywords": "Parole chiave"
},
"homebox": {
"items": "Items",
"totalWithWarranty": "With Warranty",
"locations": "Locations",
"labels": "Labels",
"items": "Elementi",
"totalWithWarranty": "Con Garanzia",
"locations": "Luoghi",
"labels": "Etichette",
"users": "Utenti",
"totalValue": "Total Value"
"totalValue": "Valore totale"
},
"crowdsec": {
"alerts": "Allarmi",
"bans": "Bans"
"bans": "Bannati"
},
"wgeasy": {
"connected": "Connesso",
@@ -886,7 +886,19 @@
"swagdashboard": {
"proxied": "Proxied",
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
"outdated": "Obsoleto",
"banned": "Bannato"
},
"myspeed": {
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Ping",
"download": "ダウンロード",
"upload": "アップロード"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -21,7 +21,7 @@
"seconds": "s"
},
"widget": {
"missing_type": "Missing Widget Type: {{type}}",
"missing_type": "없는 위젯 유형: {{type}}",
"api_error": "API 오류",
"information": "정보",
"status": "상태",
@@ -87,15 +87,15 @@
"ping": "Ping",
"down": "Down",
"up": "Up",
"not_available": "Not Available"
"not_available": "사용할 수 없음"
},
"siteMonitor": {
"http_status": "HTTP status",
"http_status": "HTTP 상태",
"error": "오류",
"response": "Response",
"response": "응답",
"down": "Down",
"up": "Up",
"not_available": "Not Available"
"not_available": "사용할 수 없음"
},
"emby": {
"playing": "재생 중",
@@ -116,7 +116,7 @@
},
"evcc": {
"pv_power": "Production",
"battery_soc": "Battery",
"battery_soc": "배터리",
"grid_power": "Grid",
"home_power": "Consumption",
"charge_power": "Charger",
@@ -130,24 +130,24 @@
},
"freshrss": {
"subscriptions": "Subscriptions",
"unread": "Unread"
"unread": "읽지 않음"
},
"fritzbox": {
"connectionStatus": "상태",
"connectionStatusUnconfigured": "Unconfigured",
"connectionStatusConnecting": "Connecting",
"connectionStatusAuthenticating": "Authenticating",
"connectionStatusUnconfigured": "구성되지 않음",
"connectionStatusConnecting": "연결중",
"connectionStatusAuthenticating": "인증",
"connectionStatusPendingDisconnect": "Pending Disconnect",
"connectionStatusDisconnecting": "Disconnecting",
"connectionStatusDisconnected": "Disconnected",
"connectionStatusDisconnecting": "연결을 끊는 중...",
"connectionStatusDisconnected": "연결 끊김",
"connectionStatusConnected": "Connected",
"uptime": "Uptime",
"maxDown": "Max. Down",
"maxUp": "Max. Up",
"down": "Down",
"up": "Up",
"received": "Received",
"sent": "Sent",
"received": "수신됨",
"sent": "전송됨",
"externalIPAddress": "Ext. IP"
},
"caddy": {
@@ -160,9 +160,9 @@
"diffsDetected": "변경 감지됨"
},
"channelsdvrserver": {
"shows": "Shows",
"shows": "보기",
"recordings": "Recordings",
"scheduled": "Scheduled",
"scheduled": "예정됨",
"passes": "Passes"
},
"tautulli": {
@@ -306,18 +306,18 @@
"total": "총합"
},
"tailscale": {
"address": "Address",
"expires": "Expires",
"address": "주소",
"expires": "만료",
"never": "Never",
"last_seen": "Last Seen",
"now": "Now",
"years": "{{number}}y",
"weeks": "{{number}}w",
"days": "{{number}}d",
"hours": "{{number}}h",
"minutes": "{{number}}m",
"seconds": "{{number}}s",
"ago": "{{value}} Ago"
"years": "{{number}}",
"weeks": "{{number}}",
"days": "{{number}}",
"hours": "{{number}}",
"minutes": "{{number}}",
"seconds": "{{number}}",
"ago": "{{value}} "
},
"tdarr": {
"queue": "대기열",
@@ -380,14 +380,14 @@
},
"minecraft": {
"players": "Players",
"version": "Version",
"version": "버전",
"status": "상태",
"up": "Online",
"down": "중지"
},
"miniflux": {
"read": "Read",
"unread": "Unread"
"unread": "읽지 않음"
},
"authentik": {
"users": "사용자",
@@ -802,7 +802,7 @@
"up": "Up",
"down": "Down",
"bytesTx": "Transmitted",
"bytesRx": "Received"
"bytesRx": "수신됨"
},
"uptimerobot": {
"status": "상태",
@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Ping",
"download": "다운로드",
"upload": "업로드"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Ping",
"download": "Lejupielāde",
"upload": "Augšupielāde"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -174,8 +174,8 @@
},
"omada": {
"connectedAp": "Connected APs",
"activeUser": "Active devices",
"alerts": "Alerts",
"activeUser": "Peranti aktif",
"alerts": "Perhatian",
"connectedGateway": "Connected gateways",
"connectedSwitches": "Connected switches"
},
@@ -186,7 +186,7 @@
},
"plex": {
"streams": "Strim Aktif",
"albums": "Albums",
"albums": "Album",
"movies": "Filem",
"tv": "Rancangan TV"
},
@@ -250,7 +250,7 @@
"lidarr": {
"wanted": "Mahu",
"queued": "Dibaris Gilir",
"artists": "Artists"
"artists": "Artis"
},
"readarr": {
"wanted": "Mahu",
@@ -310,7 +310,7 @@
"expires": "Expires",
"never": "Never",
"last_seen": "Last Seen",
"now": "Now",
"now": "Sekarang",
"years": "{{number}}y",
"weeks": "{{number}}w",
"days": "{{number}}d",
@@ -528,7 +528,7 @@
"truenas": {
"load": "Beban Sistem",
"uptime": "Masa Hidup",
"alerts": "Alerts"
"alerts": "Perhatian"
},
"pyload": {
"speed": "Kelajuan",
@@ -600,7 +600,7 @@
"moonraker": {
"printer_state": "Printer State",
"print_status": "Print Status",
"print_progress": "Progress",
"print_progress": "Kemajuan",
"layers": "Layers"
},
"octoprint": {
@@ -631,7 +631,7 @@
},
"immich": {
"users": "Pengguna",
"photos": "Photos",
"photos": "Gambar",
"videos": "Video",
"storage": "Storage"
},
@@ -646,7 +646,7 @@
"series": "Siri",
"archives": "Archives",
"chapters": "Chapters",
"categories": "Categories"
"categories": "Memori"
},
"komga": {
"libraries": "Libraries",
@@ -664,8 +664,8 @@
"wanted": "Mahu"
},
"photoprism": {
"albums": "Albums",
"photos": "Photos",
"albums": "Album",
"photos": "Gambar",
"videos": "Video",
"people": "People"
},
@@ -738,7 +738,7 @@
"calibreweb": {
"books": "Buku",
"authors": "Pengarang/Penulis",
"categories": "Categories",
"categories": "Memori",
"series": "Siri"
},
"jdownloader": {
@@ -785,7 +785,7 @@
"mealie": {
"recipes": "Resipi",
"users": "Pengguna",
"categories": "Categories",
"categories": "Memori",
"tags": "Tanda nama"
},
"openmediavault": {
@@ -836,7 +836,7 @@
"plantit": {
"events": "Events",
"plants": "Plants",
"photos": "Photos",
"photos": "Gambar",
"species": "Species"
},
"gitea": {
@@ -845,7 +845,7 @@
"pulls": "Pull Requests"
},
"stash": {
"scenes": "Scenes",
"scenes": "Adegan",
"scenesPlayed": "Scenes Played",
"playCount": "Total Plays",
"playDuration": "Time Watched",
@@ -868,13 +868,13 @@
"homebox": {
"items": "Items",
"totalWithWarranty": "With Warranty",
"locations": "Locations",
"locations": "Lokasi",
"labels": "Labels",
"users": "Pengguna",
"totalValue": "Total Value"
"totalValue": "Jumlah nilai"
},
"crowdsec": {
"alerts": "Alerts",
"alerts": "Perhatian",
"bans": "Bans"
},
"wgeasy": {
@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Ping",
"download": "Muat turun",
"upload": "Muat naik"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Responstid",
"download": "Last ned",
"upload": "Opplastning"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Ping",
"download": "Pobieranie",
"upload": "Wysyłanie"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Tempo de resposta",
"download": "Descarregar",
"upload": "Carregar"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -317,7 +317,7 @@
"hours": "{{number}}h",
"minutes": "{{number}}m",
"seconds": "{{number}}s",
"ago": "{{value}} Ago"
"ago": "{{value}} Atrás"
},
"tdarr": {
"queue": "Fila",
@@ -328,7 +328,7 @@
"traefik": {
"routers": "Roteadores",
"services": "Serviços",
"middleware": "Middleware"
"middleware": ""
},
"navidrome": {
"nothing_streaming": "Sem Streams Ativos",
@@ -884,9 +884,21 @@
"total": "Total"
},
"swagdashboard": {
"proxied": "Proxied",
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
"proxied": "Com proxy",
"auth": "Com Autenticação",
"outdated": "Desatualizado",
"banned": "Banido"
},
"myspeed": {
"ping": "Tempo de resposta",
"download": "Descarregar",
"upload": "Carregar"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Abrir - Mercado Americano",
"closed": "Fechado - Mercado americano",
"invalidConfiguration": "Configuração Inválida"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Ping",
"download": "Descarcă",
"upload": "Încarcă"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Пинг",
"download": "Скачивание",
"upload": "Загрузка"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Zastarané",
"banned": "Zabanovaný"
},
"myspeed": {
"ping": "Odozva",
"download": "Sťahovanie",
"upload": "Nahrávanie"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "Z Auth",
"outdated": "Zastarelo",
"banned": "Prepovedan"
},
"myspeed": {
"ping": "Ping",
"download": "Prenos",
"upload": "Nalaganje"
},
"stocks": {
"stocks": "Delnice",
"loading": "Nalaganje",
"open": "Odprto - US trg",
"closed": "Zaprto - US trg",
"invalidConfiguration": "Neveljavna konfiguracija"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "ปิง",
"download": "ดาวน์โหลด",
"upload": "อัพโหลด"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -884,9 +884,21 @@
"total": "Toplam"
},
"swagdashboard": {
"proxied": "Proxied",
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
"proxied": "Proxy Üzerinden",
"auth": "Kimlik Doğrulamalı",
"outdated": "Eskimiş",
"banned": "Yasaklı"
},
"myspeed": {
"ping": "Gecikme",
"download": "İndirme",
"upload": "Yükleme"
},
"stocks": {
"stocks": "Hisse Senetleri",
"loading": "Yükleniyor",
"open": "Açık - ABD Pazarı",
"closed": "Kapalı - ABD Pazarı",
"invalidConfiguration": "Geçersiz Yapılandırma"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Пінг",
"download": "Завантаження",
"upload": "Відправлення"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "延遲",
"download": "下載速率",
"upload": "上傳速率"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "使用认证",
"outdated": "已过期",
"banned": "已禁止"
},
"myspeed": {
"ping": "Ping",
"download": "下载速率",
"upload": "上传速率"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -888,5 +888,17 @@
"auth": "With Auth",
"outdated": "Outdated",
"banned": "Banned"
},
"myspeed": {
"ping": "延遲",
"download": "下載速率",
"upload": "上傳速率"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -9,9 +9,9 @@ Jinja2==3.1.2
Markdown==3.4.4
MarkupSafe==2.1.3
mergedeep==1.3.4
mkdocs==1.5.3
mkdocs-material==9.5.2
mkdocs-material-extensions==1.3
mkdocs==1.6
mkdocs-material==9.5.26
mkdocs-material-extensions==1.3.1
packaging==23.1
paginate==0.5.6
pathspec==0.11.2
@@ -27,3 +27,5 @@ six==1.16.0
urllib3==2.0.5
watchdog==3.0.0
pre-commit==3.5.0
mkdocs-material[imaging]==9.5.26
mkdocs-redirects==1.2.1

View File

@@ -69,16 +69,18 @@ export default function QuickLaunch({ servicesAndBookmarks, searchString, setSea
}, [close, setSearchString, setCurrentItemIndex, setSearchSuggestions]);
function handleSearchChange(event) {
const rawSearchString = event.target.value.toLowerCase();
const rawSearchString = event.target.value;
try {
if (!/.+[.:].+/g.test(rawSearchString)) throw new Error(); // basic test for probably a url
let urlString = rawSearchString;
if (urlString.indexOf("http") !== 0) urlString = `https://${rawSearchString}`;
if (urlString.toLowerCase().indexOf("http") !== 0) urlString = `https://${rawSearchString}`;
setUrl(new URL(urlString)); // basic validation
setSearchString(rawSearchString);
return;
} catch (e) {
setUrl(null);
}
setSearchString(rawSearchString);
setSearchString(rawSearchString.toLowerCase());
}
function handleSearchKeyDown(event) {

View File

@@ -0,0 +1,91 @@
import useSWR from "swr";
import { useState } from "react";
import { useTranslation } from "next-i18next";
import { FaChartLine } from "react-icons/fa6";
import Error from "../widget/error";
import Container from "../widget/container";
import PrimaryText from "../widget/primary_text";
import WidgetIcon from "../widget/widget_icon";
import Raw from "../widget/raw";
export default function Widget({ options }) {
const { t, i18n } = useTranslation();
const [viewingPercentChange, setViewingPercentChange] = useState(false);
const { color } = options;
const { data, error } = useSWR(
`/api/widgets/stocks?${new URLSearchParams({ lang: i18n.language, ...options }).toString()}`,
);
if (error || data?.error) {
return <Error options={options} />;
}
if (!data) {
return (
<Container>
<WidgetIcon icon={FaChartLine} />
<PrimaryText>{t("stocks.loading")}...</PrimaryText>
</Container>
);
}
if (data) {
return (
<Container options={options} additionalClassNames="information-widget-stocks">
<Raw>
<button
type="button"
onClick={() => setViewingPercentChange(!viewingPercentChange)}
className="flex items-center w-full h-full hover:outline-none focus:outline-none"
>
<FaChartLine className="flex-none w-5 h-5 text-theme-800 dark:text-theme-200 mr-2" />
<div className="flex flex-wrap items-center gap-0.5">
{data.stocks.map(
(stock) =>
stock && (
<div
key={stock.ticker}
className="rounded h-full text-xs px-1 w-[4.75rem] flex flex-col items-center justify-center"
>
<span className="text-theme-800 dark:text-theme-200 text-xs">{stock.ticker}</span>
{!viewingPercentChange ? (
<span
className={
color !== false
? `text-xs ${stock.percentChange < 0 ? "text-rose-300/70" : "text-emerald-300/70"}`
: "text-theme-800/70 dark:text-theme-200/50 text-xs"
}
>
{stock.currentPrice !== null
? t("common.number", {
value: stock.currentPrice,
style: "currency",
currency: "USD",
})
: t("widget.api_error")}
</span>
) : (
<span
className={
color !== false
? `text-xs ${stock.percentChange < 0 ? "text-rose-300/70" : "text-emerald-300/70"}`
: "text-theme-800/70 dark:text-theme-200/70 text-xs"
}
>
{stock.percentChange !== null ? `${stock.percentChange}%` : t("widget.api_error")}
</span>
)}
</div>
),
)}
</div>
</button>
</Raw>
</Container>
);
}
}

View File

@@ -15,6 +15,7 @@ const widgetMappings = {
openmeteo: dynamic(() => import("components/widgets/openmeteo/openmeteo")),
longhorn: dynamic(() => import("components/widgets/longhorn/longhorn")),
kubernetes: dynamic(() => import("components/widgets/kubernetes/kubernetes")),
stocks: dynamic(() => import("components/widgets/stocks/stocks")),
};
export default function Widget({ widget, style }) {

View File

@@ -1,9 +1,11 @@
import cachedFetch from "utils/proxy/cached-fetch";
import { getSettings } from "utils/config/config";
import { getPrivateWidgetOptions } from "utils/config/widget-helpers";
export default async function handler(req, res) {
const { latitude, longitude, units, provider, cache, lang } = req.query;
let { apiKey } = req.query;
const { latitude, longitude, units, provider, cache, lang, index } = req.query;
const privateWidgetOptions = await getPrivateWidgetOptions("openweathermap", index);
let { apiKey } = privateWidgetOptions;
if (!apiKey && !provider) {
return res.status(400).json({ error: "Missing API key or provider" });

View File

@@ -0,0 +1,76 @@
import cachedFetch from "utils/proxy/cached-fetch";
import { getSettings } from "utils/config/config";
export default async function handler(req, res) {
const { watchlist, provider, cache } = req.query;
if (!watchlist) {
return res.status(400).json({ error: "Missing watchlist" });
}
const watchlistArr = watchlist.split(",") || [watchlist];
if (!watchlistArr.length || watchlistArr[0] === "null" || !watchlistArr[0]) {
return res.status(400).json({ error: "Missing watchlist" });
}
if (watchlistArr.length > 8) {
return res.status(400).json({ error: "Max items in watchlist is 8" });
}
const hasDuplicates = new Set(watchlistArr).size !== watchlistArr.length;
if (hasDuplicates) {
return res.status(400).json({ error: "Watchlist contains duplicates" });
}
if (!provider) {
return res.status(400).json({ error: "Missing provider" });
}
if (provider !== "finnhub") {
return res.status(400).json({ error: "Invalid provider" });
}
const providersInConfig = getSettings()?.providers;
let apiKey;
Object.entries(providersInConfig).forEach(([key, val]) => {
if (key === provider) apiKey = val;
});
if (typeof apiKey === "undefined") {
return res.status(400).json({ error: "Missing or invalid API Key for provider" });
}
if (provider === "finnhub") {
// Finnhub allows up to 30 calls/second
// https://finnhub.io/docs/api/rate-limit
const results = await Promise.all(
watchlistArr.map(async (ticker) => {
if (!ticker) {
return { ticker: null, currentPrice: null, percentChange: null };
}
// https://finnhub.io/docs/api/quote
const apiUrl = `https://finnhub.io/api/v1/quote?symbol=${ticker}&token=${apiKey}`;
// Finnhub free accounts allow up to 60 calls/minute
// https://finnhub.io/pricing
const { c, dp } = await cachedFetch(apiUrl, cache || 1);
// API sometimes returns 200, but values returned are `null`
if (c === null || dp === null) {
return { ticker, currentPrice: null, percentChange: null };
}
// Rounding percentage, but we want it back to a number for comparison
return { ticker, currentPrice: c.toFixed(2), percentChange: parseFloat(dp.toFixed(2)) };
}),
);
return res.send({
stocks: results,
});
}
return res.status(400).json({ error: "Invalid configuration" });
}

View File

@@ -1,9 +1,11 @@
import cachedFetch from "utils/proxy/cached-fetch";
import { getSettings } from "utils/config/config";
import { getPrivateWidgetOptions } from "utils/config/widget-helpers";
export default async function handler(req, res) {
const { latitude, longitude, provider, cache, lang } = req.query;
let { apiKey } = req.query;
const { latitude, longitude, provider, cache, lang, index } = req.query;
const privateWidgetOptions = await getPrivateWidgetOptions("weatherapi", index);
let { apiKey } = privateWidgetOptions;
if (!apiKey && !provider) {
return res.status(400).json({ error: "Missing API key or provider" });

View File

@@ -393,7 +393,7 @@ function Home({ initialSettings }) {
<div
id="information-widgets"
className={classNames(
"flex flex-row flex-wrap justify-between",
"flex flex-row flex-wrap justify-between z-20",
headerStyles[headerStyle],
settings.cardBlur !== undefined &&
headerStyle === "boxed" &&

View File

@@ -254,7 +254,8 @@ export async function servicesFromKubernetes() {
ingress.metadata.annotations &&
ingress.metadata.annotations[`${ANNOTATION_BASE}/enabled`] === "true" &&
(!ingress.metadata.annotations[`${ANNOTATION_BASE}/instance`] ||
ingress.metadata.annotations[`${ANNOTATION_BASE}/instance`] === instanceName),
ingress.metadata.annotations[`${ANNOTATION_BASE}/instance`] === instanceName ||
`${ANNOTATION_BASE}/instance.${instanceName}` in ingress.metadata.annotations),
)
.map((ingress) => {
let constructedService = {
@@ -456,6 +457,10 @@ export function cleanServiceGroups(groups) {
// sonarr, radarr
enableQueue,
// stocks
watchlist,
showUSMarketStatus,
// truenas
enablePools,
nasType,
@@ -599,6 +604,10 @@ export function cleanServiceGroups(groups) {
cleanedService.widget.bitratePrecision = parseInt(bitratePrecision, 10);
}
}
if (type === "stocks") {
if (watchlist) cleanedService.widget.watchlist = watchlist;
if (showUSMarketStatus) cleanedService.widget.showUSMarketStatus = showUSMarketStatus;
}
if (type === "wgeasy") {
if (threshold !== undefined) cleanedService.widget.threshold = parseInt(threshold, 10);
}

View File

@@ -32,7 +32,7 @@ export async function cleanWidgetGroups(widgets) {
const optionKeys = Object.keys(sanitizedOptions);
// delete private options from the sanitized options
["username", "password", "key"].forEach((pO) => {
["username", "password", "key", "apiKey"].forEach((pO) => {
if (optionKeys.includes(pO)) {
delete sanitizedOptions[pO];
}
@@ -57,7 +57,7 @@ export async function getPrivateWidgetOptions(type, widgetIndex) {
const widgets = await widgetsFromConfig();
const privateOptions = widgets.map((widget) => {
const { index, url, username, password, key } = widget.options;
const { index, url, username, password, key, apiKey } = widget.options;
return {
type: widget.type,
@@ -67,6 +67,7 @@ export async function getPrivateWidgetOptions(type, widgetIndex) {
username,
password,
key,
apiKey,
},
};
});

View File

@@ -3,6 +3,7 @@ import { formatApiCall, sanitizeErrorURL } from "utils/proxy/api-helpers";
import validateWidgetData from "utils/proxy/validate-widget-data";
import { httpProxy } from "utils/proxy/http";
import createLogger from "utils/logger";
import { getSettings } from "utils/config/config";
import widgets from "widgets/widgets";
const logger = createLogger("credentialedProxyHandler");
@@ -24,7 +25,12 @@ export default async function credentialedProxyHandler(req, res, map) {
"Content-Type": "application/json",
};
if (widget.type === "coinmarketcap") {
if (widget.type === "stocks") {
const { providers } = getSettings();
if (widget.provider === "finnhub" && providers?.finnhub) {
headers["X-Finnhub-Token"] = `${providers?.finnhub}`;
}
} else if (widget.type === "coinmarketcap") {
headers["X-CMC_PRO_API_KEY"] = `${widget.key}`;
} else if (widget.type === "gotify") {
headers["X-gotify-Key"] = `${widget.key}`;
@@ -69,6 +75,8 @@ export default async function credentialedProxyHandler(req, res, map) {
headers.Authorization = `Basic ${Buffer.from(`${widget.username}:${widget.password}`).toString("base64")}`;
} else if (widget.type === "plantit") {
headers.Key = `${widget.key}`;
} else if (widget.type === "myspeed") {
headers.Password = `${widget.password}`;
} else {
headers["X-API-Key"] = `${widget.key}`;
}

View File

@@ -31,6 +31,10 @@ export async function sendJsonRpcRequest(url, method, params, username, password
if (status === 200) {
const json = JSON.parse(data.toString());
if (json.id === null) {
json.id = 1;
}
// in order to get access to the underlying error object in the JSON response
// you must set `result` equal to undefined
if (json.error && json.result === null) {

View File

@@ -10,8 +10,13 @@ export default function validateWidgetData(widget, endpoint, data) {
try {
dataParsed = JSON.parse(data);
} catch (e) {
error = e;
valid = false;
try {
// try once more stripping whitespace
dataParsed = JSON.parse(data.toString().replace(/\s/g, ""));
} catch (e2) {
error = e || e2;
valid = false;
}
}
}

View File

@@ -8,7 +8,7 @@ export default function Component({ service }) {
const { t } = useTranslation();
const { widget } = service;
const { data: resultData, error: resultError } = useWidgetAPI(widget, "result");
const { data: resultData, error: resultError } = useWidgetAPI(widget, "upstreams");
if (resultError) {
return <Container service={service} error={resultError} />;

View File

@@ -1,8 +1,14 @@
import genericProxyHandler from "utils/proxy/handlers/generic";
const widget = {
api: "{url}/reverse_proxy/upstreams",
api: "{url}/{endpoint}",
proxyHandler: genericProxyHandler,
mappings: {
upstreams: {
endpoint: "reverse_proxy/upstreams",
},
},
};
export default widget;

Some files were not shown because too many files have changed in this diff Show More