Compare commits

..

1 Commits

Author SHA1 Message Date
Crowdin Bot
98203b99e7 New Crowdin translations by GitHub Action 2025-09-26 12:13:37 +00:00
47 changed files with 1292 additions and 1824 deletions

View File

@@ -35,11 +35,10 @@ jobs:
- name: Install pnpm - name: Install pnpm
uses: pnpm/action-setup@v4 uses: pnpm/action-setup@v4
with: with:
version: 10
run_install: false run_install: false
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v6 uses: actions/setup-node@v5
with: with:
node-version: 20 node-version: 20
cache: 'pnpm' cache: 'pnpm'
@@ -94,11 +93,10 @@ jobs:
- name: Install pnpm - name: Install pnpm
uses: pnpm/action-setup@v4 uses: pnpm/action-setup@v4
with: with:
version: 10
run_install: false run_install: false
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v6 uses: actions/setup-node@v5
with: with:
node-version: 20 node-version: 20
cache: 'pnpm' cache: 'pnpm'
@@ -129,7 +127,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Setup QEMU - name: Setup QEMU
uses: docker/setup-qemu-action@v3.7.0 uses: docker/setup-qemu-action@v3.6.0
- name: Setup Docker buildx - name: Setup Docker buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3

View File

@@ -51,8 +51,6 @@ COPY --link --from=builder --chown=1000:1000 /app/.next/static/ ./.next/static
RUN apk add --no-cache su-exec iputils-ping shadow RUN apk add --no-cache su-exec iputils-ping shadow
USER root
ENV NODE_ENV=production ENV NODE_ENV=production
ENV HOSTNAME=0.0.0.0 ENV HOSTNAME=0.0.0.0
ENV PORT=3000 ENV PORT=3000

View File

@@ -57,8 +57,8 @@ if [ -d /app/.next ]; then
fi fi
# Drop privileges (when asked to) if root, otherwise run as current user # Drop privileges (when asked to) if root, otherwise run as current user
if [ "$(id -u)" = "0" ] && [ "${PUID}" != "0" ]; then if [ "$(id -u)" == "0" ] && [ "${PUID}" != "0" ]; then
exec su-exec ${PUID}:${PGID} "$@" su-exec ${PUID}:${PGID} "$@"
else else
exec "$@" exec "$@"
fi fi

View File

@@ -271,4 +271,4 @@ You can show the docker stats by clicking the status indicator but this can also
showStats: true showStats: true
``` ```
Also see the settings for [show docker stats](settings.md#show-container-stats). Also see the settings for [show docker stats](settings.md#show-docker-stats).

View File

@@ -178,32 +178,3 @@ See [ClusterRole and ClusterRoleBinding](../installation/k8s.md#clusterrole-and-
## Caveats ## Caveats
Similarly to Docker service discovery, there currently is no rigid ordering to discovered services and discovered services will be displayed above those specified in the `services.yaml`. Similarly to Docker service discovery, there currently is no rigid ordering to discovered services and discovered services will be displayed above those specified in the `services.yaml`.
## Adding extra configuration files
Some Homepage features (for example, [Proxmox](../configs/proxmox.md)) require additional configuration files such as `proxmox.yaml`.
When running Homepage on Kubernetes, these files must be provided via a `ConfigMap` and mounted into the container at `/app/config`.
### ConfigMap example
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: homepage
data:
proxmox.yaml: |
pve:
url: https://proxmox.host.or.ip:8006
token: username@pam!Token ID
secret: secret
```
Mount the file into `/app/config` by updating the `Deployment`:
```yaml
volumeMounts:
- mountPath: /app/config/proxmox.yaml
name: homepage-config
subPath: proxmox.yaml
```

View File

@@ -4,10 +4,10 @@ description: Proxmox Configuration
--- ---
The Proxmox connection is configured in the `proxmox.yaml` file. See [Create token](#create-token) section below for details on how to generate the required API token. The Proxmox connection is configured in the `proxmox.yaml` file. See [Create token](#create-token) section below for details on how to generate the required API token.
To configure multiple nodes, ensure the key name in the `proxmox.yaml` matches the `proxmoxNode` field used in your service configuration. You can configure multiple nodes - be sure to use the exact `proxmoxNode` identifier!
```yaml ```yaml
pve: # must match your actual Proxmox node name pve:
url: https://proxmox.host.or.ip:8006 url: https://proxmox.host.or.ip:8006
token: username@pam!Token ID token: username@pam!Token ID
secret: secret secret: secret

View File

@@ -118,47 +118,6 @@ Each widget can optionally provide a list of which fields should be visible via
key: apikeyapikeyapikeyapikeyapikey key: apikeyapikeyapikeyapikeyapikey
``` ```
### Block Highlighting
Widgets can tint their metric block text automatically based on rules defined alongside the service. Attach a `highlight` section to the widget configuration and map each block to one or more numeric or string rules using the field key (for example, `queued`, `lan_users`).
```yaml
- Sonarr:
icon: sonarr.png
href: http://sonarr.host.or.ip
widget:
type: sonarr
url: http://sonarr.host.or.ip
key: ${SONARR_API_KEY}
highlight:
queued:
numeric:
- level: danger
when: gte
value: 20
- level: warn
when: gte
value: 5
- level: good
when: eq
value: 0
status:
string:
- level: danger
when: regex
value: "(failed|import) pending"
- level: good
when: equals
value: "All good"
status_code:
string:
- level: warn
when: regex
value: "^5\\d{2}$"
```
Supported numeric operators for the `when` property are `gt`, `gte`, `lt`, `lte`, `eq`, `ne`, `between`, and `outside`. String rules support `equals`, `includes`, `startsWith`, `endsWith`, and `regex`. Each rule can be inverted with `negate: true`, and string rules may pass `caseSensitive: true` or custom regex `flags`. The highlight engine does its best to coerce formatted values, but you will get the most reliable results when you pass plain numbers or strings into `<Block>`.
## Descriptions ## Descriptions
Services may have descriptions, Services may have descriptions,

View File

@@ -109,20 +109,6 @@ color: slate
Supported colors are: `slate`, `gray`, `zinc`, `neutral`, `stone`, `amber`, `yellow`, `lime`, `green`, `emerald`, `teal`, `cyan`, `sky`, `blue`, `indigo`, `violet`, `purple`, `fuchsia`, `pink`, `rose`, `red`, `white` Supported colors are: `slate`, `gray`, `zinc`, `neutral`, `stone`, `amber`, `yellow`, `lime`, `green`, `emerald`, `teal`, `cyan`, `sky`, `blue`, `indigo`, `violet`, `purple`, `fuchsia`, `pink`, `rose`, `red`, `white`
## Block Highlight Levels
You can override the default Tailwind classes applied when a widget highlight rule resolves to the `good`, `warn`, or `danger` level.
```yaml
blockHighlights:
levels:
good: "bg-emerald-500/40 text-emerald-950 dark:bg-emerald-900/60 dark:text-emerald-400"
warn: "bg-amber-300/30 text-amber-900 dark:bg-amber-900/30 dark:text-amber-200"
danger: "bg-rose-700/45 text-rose-200 dark:bg-rose-950/70 dark:text-rose-400"
```
Any unspecified level falls back to the built-in defaults.
## Layout ## Layout
You can configure service and bookmarks sections to be either "column" or "row" based layouts, like so: You can configure service and bookmarks sections to be either "column" or "row" based layouts, like so:
@@ -500,9 +486,9 @@ logpath: /logfile/path
By default, logs are sent both to `stdout` and to a file at the path specified. This can be changed by setting the `LOG_TARGETS` environment variable to one of `both` (default), `stdout` or `file`. By default, logs are sent both to `stdout` and to a file at the path specified. This can be changed by setting the `LOG_TARGETS` environment variable to one of `both` (default), `stdout` or `file`.
## Show Container Stats ## Show Docker Stats
You can show all docker or proxmox stats expanded in `settings.yaml`: You can show all docker stats expanded in `settings.yaml`:
```yaml ```yaml
showStats: true showStats: true

View File

@@ -14,7 +14,7 @@ services:
- 3000:3000 - 3000:3000
volumes: volumes:
- /path/to/config:/app/config # Make sure your local config directory exists - /path/to/config:/app/config # Make sure your local config directory exists
- /var/run/docker.sock:/var/run/docker.sock:ro # (optional) For docker integrations - /var/run/docker.sock:/var/run/docker.sock # (optional) For docker integrations
environment: environment:
HOMEPAGE_ALLOWED_HOSTS: gethomepage.dev # required, may need port. See gethomepage.dev/installation/#homepage_allowed_hosts HOMEPAGE_ALLOWED_HOSTS: gethomepage.dev # required, may need port. See gethomepage.dev/installation/#homepage_allowed_hosts
``` ```
@@ -36,7 +36,7 @@ services:
- 3000:3000 - 3000:3000
volumes: volumes:
- /path/to/config:/app/config # Make sure your local config directory exists - /path/to/config:/app/config # Make sure your local config directory exists
- /var/run/docker.sock:/var/run/docker.sock:ro # (optional) For docker integrations, see alternative methods - /var/run/docker.sock:/var/run/docker.sock # (optional) For docker integrations, see alternative methods
environment: environment:
HOMEPAGE_ALLOWED_HOSTS: gethomepage.dev # required, may need port. See gethomepage.dev/installation/#homepage_allowed_hosts HOMEPAGE_ALLOWED_HOSTS: gethomepage.dev # required, may need port. See gethomepage.dev/installation/#homepage_allowed_hosts
PUID: $PUID PUID: $PUID

View File

@@ -68,19 +68,7 @@ All service widgets work essentially the same, that is, homepage makes a proxied
If, after correctly adding and mapping your custom icons via the [Icons](../configs/services.md#icons) instructions, you are still unable to see your icons please try recreating your container. If, after correctly adding and mapping your custom icons via the [Icons](../configs/services.md#icons) instructions, you are still unable to see your icons please try recreating your container.
## Enabling IPv6 for the homepage container ## Disabling IPv6
To enable IPv6 support for the homepage container, you can set the `HOSTNAME` environment variable, for example:
```yaml
services:
homepage:
...
environment:
- HOSTNAME=::
```
## Disabling IPv6 for http requests {#disabling-ipv6}
If you are having issues with certain widgets that are unable to reach public APIs (e.g. weather), in certain setups you may need to disable IPv6. You can set the environment variable `HOMEPAGE_PROXY_DISABLE_IPV6` to `true` to disable IPv6 for the homepage proxy. If you are having issues with certain widgets that are unable to reach public APIs (e.g. weather), in certain setups you may need to disable IPv6. You can set the environment variable `HOMEPAGE_PROXY_DISABLE_IPV6` to `true` to disable IPv6 for the homepage proxy.

View File

@@ -62,4 +62,3 @@ To ensure cohesiveness of various widgets, the following should be used as a gui
- Minimize the number of API calls - Minimize the number of API calls
- Avoid the use of custom proxy unless absolutely necessary - Avoid the use of custom proxy unless absolutely necessary
- Widgets should be 'read-only', as in they should not make write changes using the relevant tool's API. Homepage widgets are designed to surface information, not to be a (usually worse) replacement for the tool itself. - Widgets should be 'read-only', as in they should not make write changes using the relevant tool's API. Homepage widgets are designed to surface information, not to be a (usually worse) replacement for the tool itself.
- Widgets should not allow manually overriding the "refresh interval" setting, as misconfigured refresh intervals can easily lead to performance issues for users.

View File

@@ -17,6 +17,6 @@ widget:
url: http://komodo.hostname.or.ip:port url: http://komodo.hostname.or.ip:port
key: K-xxxxxx... key: K-xxxxxx...
secret: S-xxxxxx... secret: S-xxxxxx...
showSummary: true # optional, default: false. Takes precedence over showStacks showSummary: true # optional, default: false
showStacks: true # optional, default: false showStacks: true # optional, default: false
``` ```

View File

@@ -3,7 +3,7 @@ title: Omada
description: Omada Widget Configuration description: Omada Widget Configuration
--- ---
The widget supports controller versions 3, 4, 5 and 6. The widget supports controller versions 3, 4 and 5.
Allowed fields: `["connectedAp", "activeUser", "alerts", "connectedGateways", "connectedSwitches"]`. Allowed fields: `["connectedAp", "activeUser", "alerts", "connectedGateways", "connectedSwitches"]`.

View File

@@ -16,5 +16,4 @@ widget:
username: username username: username
password: password password: password
enableLeechProgress: true # optional, defaults to false enableLeechProgress: true # optional, defaults to false
enableLeechSize: true # optional, defaults to false
``` ```

View File

@@ -10,11 +10,11 @@ The Unraid widget allows you to monitor the resources of an Unraid server.
**Minimum Requirements:** **Minimum Requirements:**
- Unraid 7.2 -or- Unraid Connect plugin 2025.08.19.1850 - Unraid 7.2 -or- Unraid Connect plugin 2025.08.19.1850
- API key with the **ADMIN** role: [Managing API Keys](https://docs.unraid.net/go/managing-api-keys) - API key with the **GUEST** (read only) role: [Managing API Keys](https://docs.unraid.net/go/managing-api-keys)
The widget can display metrics for selected Unraid pools. If using one of the "pool" fields, you must also add the pool name to the settings. The widget can display metrics for selected Unraid pools. If using one of the "pool" fields, you must also add the pool name to the settings.
**Allowed fields:** `["cpu","memoryPercent","memoryAvailable","memoryUsed","notifications","arrayFree","arrayUsedSpace","arrayUsedPercent","status","pool1UsedSpace","pool1FreeSpace","pool1UsedPercent","pool2UsedSpace","pool2FreeSpace","pool2UsedPercent","pool3UsedSpace","pool3FreeSpace","pool3UsedPercent","pool4UsedSpace","pool4FreeSpace","pool4UsedPercent"]` **Allowed fields:** `["cpu","memoryPercent","memoryAvailable","memoryUsed","notifications","arrayFreeSpace","arrayUsedSpace","arrayUsedPercent","status","pool1UsedSpace","pool1FreeSpace","pool1UsedPercent","pool2UsedSpace","pool2FreeSpace","pool2UsedPercent","pool3UsedSpace","pool3FreeSpace","pool3UsedPercent","pool4UsedSpace","pool4FreeSpace","pool4UsedPercent"]`
```yaml ```yaml
widget: widget:

View File

@@ -1,6 +1,6 @@
{ {
"name": "homepage", "name": "homepage",
"version": "1.7.0", "version": "1.5.0",
"private": true, "private": true,
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm", "preinstall": "npx only-allow pnpm",
@@ -11,14 +11,14 @@
"telemetry": "next telemetry disable" "telemetry": "next telemetry disable"
}, },
"dependencies": { "dependencies": {
"@headlessui/react": "^2.2.9", "@headlessui/react": "^2.2.7",
"@kubernetes/client-node": "^1.0.0", "@kubernetes/client-node": "^1.0.0",
"classnames": "^2.5.1", "classnames": "^2.5.1",
"compare-versions": "^6.1.1", "compare-versions": "^6.1.1",
"dockerode": "^4.0.7", "dockerode": "^4.0.7",
"follow-redirects": "^1.15.11", "follow-redirects": "^1.15.11",
"gamedig": "^5.3.2", "gamedig": "^5.3.1",
"i18next": "^25.5.3", "i18next": "^24.2.3",
"ical.js": "^2.1.0", "ical.js": "^2.1.0",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",
"json-rpc-2.0": "^1.7.0", "json-rpc-2.0": "^1.7.0",
@@ -28,8 +28,8 @@
"next": "^15.5.2", "next": "^15.5.2",
"next-i18next": "^12.1.0", "next-i18next": "^12.1.0",
"ping": "^0.4.4", "ping": "^0.4.4",
"pretty-bytes": "^7.1.0", "pretty-bytes": "^6.1.1",
"raw-body": "^3.0.1", "raw-body": "^3.0.0",
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"react-i18next": "^15.5.3", "react-i18next": "^15.5.3",
@@ -44,18 +44,18 @@
}, },
"devDependencies": { "devDependencies": {
"@tailwindcss/forms": "^0.5.10", "@tailwindcss/forms": "^0.5.10",
"@tailwindcss/postcss": "^4.1.14", "@tailwindcss/postcss": "^4.0.9",
"eslint": "^9.25.1", "eslint": "^9.25.1",
"eslint-config-next": "^15.2.4", "eslint-config-next": "^15.2.4",
"eslint-config-prettier": "^10.1.8", "eslint-config-prettier": "^10.1.1",
"eslint-plugin-import": "^2.32.0", "eslint-plugin-import": "^2.32.0",
"eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-prettier": "^5.5.4", "eslint-plugin-prettier": "^5.5.1",
"eslint-plugin-react": "^7.37.4", "eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^5.2.0", "eslint-plugin-react-hooks": "^5.2.0",
"postcss": "^8.5.6", "postcss": "^8.5.6",
"prettier": "^3.6.2", "prettier": "^3.6.2",
"prettier-plugin-organize-imports": "^4.3.0", "prettier-plugin-organize-imports": "^4.1.0",
"tailwind-scrollbar": "^4.0.2", "tailwind-scrollbar": "^4.0.2",
"tailwindcss": "^4.0.9", "tailwindcss": "^4.0.9",
"typescript": "^5.7.3" "typescript": "^5.7.3"
@@ -63,6 +63,13 @@
"optionalDependencies": { "optionalDependencies": {
"osx-temperature-sensor": "^1.0.8" "osx-temperature-sensor": "^1.0.8"
}, },
"packageManager": "pnpm@10.8.1",
"devEngines": {
"packageManager": {
"name": "pnpm",
"version": "10.8.1"
}
},
"pnpm": { "pnpm": {
"onlyBuiltDependencies": [ "onlyBuiltDependencies": [
"osx-temperature-sensor", "osx-temperature-sensor",

663
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -1093,7 +1093,7 @@
"DISABLE_DISK": "Skyf Gedeaktiveer", "DISABLE_DISK": "Skyf Gedeaktiveer",
"SWAP_DSBL": "Ruil Gedeaktiveer", "SWAP_DSBL": "Ruil Gedeaktiveer",
"INVALID_EXPANSION": "Ongeldige Uitbreiding", "INVALID_EXPANSION": "Ongeldige Uitbreiding",
"PARITY_NOT_BIGGEST": "Pariteit nie die Grootste nie", "PARITY_NOT_BIGGEST": "Pariteit nie die grootste nie",
"TOO_MANY_MISSING_DISKS": "Te Veel Ontbrekende Skywe", "TOO_MANY_MISSING_DISKS": "Te Veel Ontbrekende Skywe",
"NEW_DISK_TOO_SMALL": "Nuwe Skyf te Klein", "NEW_DISK_TOO_SMALL": "Nuwe Skyf te Klein",
"NO_DATA_DISKS": "Geen Data Skywe", "NO_DATA_DISKS": "Geen Data Skywe",
@@ -1116,8 +1116,8 @@
"bytes_added_30": "Grepe bygevoeg" "bytes_added_30": "Grepe bygevoeg"
}, },
"yourspotify": { "yourspotify": {
"songs": "Liedjies", "songs": "Songs",
"time": "Tyd", "time": "Time",
"artists": "Kunstenaars" "artists": "Artists"
} }
} }

View File

@@ -93,8 +93,8 @@
"http_status": "HTTP-Status", "http_status": "HTTP-Status",
"error": "Fehler", "error": "Fehler",
"response": "Antwort", "response": "Antwort",
"down": "Offline", "down": "Online",
"up": "Online", "up": "Offline",
"not_available": "Nicht verfügbar" "not_available": "Nicht verfügbar"
}, },
"emby": { "emby": {
@@ -276,7 +276,7 @@
"pending": "Wartend", "pending": "Wartend",
"approved": "Genehmigt", "approved": "Genehmigt",
"available": "Verfügbar", "available": "Verfügbar",
"issues": "Offene Issues" "issues": "Open Issues"
}, },
"overseerr": { "overseerr": {
"pending": "Wartend", "pending": "Wartend",
@@ -1086,38 +1086,38 @@
"nextRenewingSubscription": "Nächste Zahlung" "nextRenewingSubscription": "Nächste Zahlung"
}, },
"unraid": { "unraid": {
"STARTED": "Gestartet", "STARTED": "Started",
"STOPPED": "Angehalten", "STOPPED": "Stopped",
"NEW_ARRAY": "Neues Array", "NEW_ARRAY": "New Array",
"RECON_DISK": "Festplatte wird neu aufgebaut", "RECON_DISK": "Reconstructing Disk",
"DISABLE_DISK": "Festplatte deaktiviert", "DISABLE_DISK": "Disk Disabled",
"SWAP_DSBL": "Swap deaktivieren", "SWAP_DSBL": "Swap Disable",
"INVALID_EXPANSION": "Üngültige Erweiterung", "INVALID_EXPANSION": "Invalid Expansion",
"PARITY_NOT_BIGGEST": "Parity Not Biggest", "PARITY_NOT_BIGGEST": "Parity Not Biggest",
"TOO_MANY_MISSING_DISKS": "Zu viele fehlende Festplatten", "TOO_MANY_MISSING_DISKS": "Too Many Missing Disks",
"NEW_DISK_TOO_SMALL": "Neue Festplatte zu klein", "NEW_DISK_TOO_SMALL": "New Disk Too Small",
"NO_DATA_DISKS": "Keine Datenträger", "NO_DATA_DISKS": "No Data Disks",
"notifications": "Mitteilungen", "notifications": "Notifications",
"status": "Status", "status": "Status",
"cpu": "CPU", "cpu": "CPU",
"memoryUsed": "Speichernutzung", "memoryUsed": "Memory Used",
"memoryAvailable": "Verfügbarer Speicher", "memoryAvailable": "Memory Available",
"arrayUsed": "Array verwendet", "arrayUsed": "Array Used",
"arrayFree": "Array frei", "arrayFree": "Array Free",
"poolUsed": "{{pool}} verwendet", "poolUsed": "{{pool}} Used",
"poolFree": "{{pool}} frei" "poolFree": "{{pool}} Free"
}, },
"backrest": { "backrest": {
"num_plans": "Pläne", "num_plans": "Plans",
"num_success_30": "Erfolgreich", "num_success_30": "Successes",
"num_failure_30": "Fehlerhaft", "num_failure_30": "Failures",
"num_success_latest": "Erfolgreich", "num_success_latest": "Succeeding",
"num_failure_latest": "Fehlgeschlagen", "num_failure_latest": "Failing",
"bytes_added_30": "Bytes hinzugefügt" "bytes_added_30": "Bytes Added"
}, },
"yourspotify": { "yourspotify": {
"songs": "Titel", "songs": "Songs",
"time": "Zeit", "time": "Time",
"artists": "Künstler" "artists": "Artists"
} }
} }

View File

@@ -276,7 +276,7 @@
"pending": "Pendiente", "pending": "Pendiente",
"approved": "Aprobado", "approved": "Aprobado",
"available": "Disponible", "available": "Disponible",
"issues": "Issues Abiertos" "issues": "Open Issues"
}, },
"overseerr": { "overseerr": {
"pending": "Pendiente", "pending": "Pendiente",
@@ -1108,16 +1108,16 @@
"poolFree": "{{pool}} Libre" "poolFree": "{{pool}} Libre"
}, },
"backrest": { "backrest": {
"num_plans": "Planes", "num_plans": "Plans",
"num_success_30": "Éxitos", "num_success_30": "Successes",
"num_failure_30": "Fallos", "num_failure_30": "Failures",
"num_success_latest": "Exitosa", "num_success_latest": "Succeeding",
"num_failure_latest": "Fallida", "num_failure_latest": "Failing",
"bytes_added_30": "Bytes Añadidos" "bytes_added_30": "Bytes Added"
}, },
"yourspotify": { "yourspotify": {
"songs": "Canciones", "songs": "Songs",
"time": "Tiempo", "time": "Time",
"artists": "Artistas" "artists": "Artists"
} }
} }

View File

@@ -276,7 +276,7 @@
"pending": "En attente", "pending": "En attente",
"approved": "Approuvé", "approved": "Approuvé",
"available": "Disponible", "available": "Disponible",
"issues": "Problèmes non résolus" "issues": "Open Issues"
}, },
"overseerr": { "overseerr": {
"pending": "En attente", "pending": "En attente",
@@ -1086,38 +1086,38 @@
"nextRenewingSubscription": "Prochain paiement" "nextRenewingSubscription": "Prochain paiement"
}, },
"unraid": { "unraid": {
"STARTED": "Commencé", "STARTED": "Started",
"STOPPED": "Arrêté", "STOPPED": "Stopped",
"NEW_ARRAY": "Nouveau tableau", "NEW_ARRAY": "New Array",
"RECON_DISK": "Reconstruction du disque", "RECON_DISK": "Reconstructing Disk",
"DISABLE_DISK": "Disque désactivé", "DISABLE_DISK": "Disk Disabled",
"SWAP_DSBL": "Swap Disable", "SWAP_DSBL": "Swap Disable",
"INVALID_EXPANSION": "Extension invalide", "INVALID_EXPANSION": "Invalid Expansion",
"PARITY_NOT_BIGGEST": "La parité n'est pas la plus grande", "PARITY_NOT_BIGGEST": "Parity Not Biggest",
"TOO_MANY_MISSING_DISKS": "Trop de disques manquants", "TOO_MANY_MISSING_DISKS": "Too Many Missing Disks",
"NEW_DISK_TOO_SMALL": "Nouveau disque trop petit", "NEW_DISK_TOO_SMALL": "New Disk Too Small",
"NO_DATA_DISKS": "Aucun disque de données", "NO_DATA_DISKS": "No Data Disks",
"notifications": "Notifications", "notifications": "Notifications",
"status": "État", "status": "État",
"cpu": "UCT", "cpu": "UCT",
"memoryUsed": "Mémoire Utilisé", "memoryUsed": "Mémoire Utilisé",
"memoryAvailable": "Mémoire Disponible", "memoryAvailable": "Mémoire Disponible",
"arrayUsed": "RAID utilisé", "arrayUsed": "Array Used",
"arrayFree": "RAID libre", "arrayFree": "Array Free",
"poolUsed": "{{pool}} Utilisé", "poolUsed": "{{pool}} Used",
"poolFree": "{{pool}} Libre" "poolFree": "{{pool}} Free"
}, },
"backrest": { "backrest": {
"num_plans": "Abonnements", "num_plans": "Plans",
"num_success_30": "Succès", "num_success_30": "Successes",
"num_failure_30": "Échecs", "num_failure_30": "Failures",
"num_success_latest": "Réussi", "num_success_latest": "Succeeding",
"num_failure_latest": "Échoué", "num_failure_latest": "Failing",
"bytes_added_30": "Octets ajoutés" "bytes_added_30": "Bytes Added"
}, },
"yourspotify": { "yourspotify": {
"songs": "Musiques", "songs": "Songs",
"time": "Durée", "time": "Time",
"artists": "Artistes" "artists": "Artists"
} }
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -61,7 +61,7 @@
"wlan_devices": "Dispositivos WLAN", "wlan_devices": "Dispositivos WLAN",
"lan_users": "Usuários de LAN", "lan_users": "Usuários de LAN",
"wlan_users": "Usuários de WLAN", "wlan_users": "Usuários de WLAN",
"up": "ATIVO", "up": "UP",
"down": "Desligado", "down": "Desligado",
"wait": "Por favor, aguarde", "wait": "Por favor, aguarde",
"empty_data": "Status do Subsistema desconhecido" "empty_data": "Status do Subsistema desconhecido"
@@ -246,7 +246,7 @@
"unknown": "Desconhecido" "unknown": "Desconhecido"
}, },
"radarr": { "radarr": {
"wanted": "Desejado", "wanted": "Wanted",
"missing": "Faltando", "missing": "Faltando",
"queued": "Em fila", "queued": "Em fila",
"movies": "Filmes", "movies": "Filmes",
@@ -254,13 +254,13 @@
"unknown": "Desconhecido" "unknown": "Desconhecido"
}, },
"lidarr": { "lidarr": {
"wanted": "Desejado", "wanted": "Wanted",
"queued": "Na fila", "queued": "Queued",
"artists": "Artistas" "artists": "Artistas"
}, },
"readarr": { "readarr": {
"wanted": "Desejado", "wanted": "Wanted",
"queued": "Na fila", "queued": "Queued",
"books": "Livros" "books": "Livros"
}, },
"bazarr": { "bazarr": {
@@ -273,20 +273,20 @@
"available": "Disponível" "available": "Disponível"
}, },
"jellyseerr": { "jellyseerr": {
"pending": "Pendente", "pending": "Pending",
"approved": "Aprovado", "approved": "Approved",
"available": "Disponível", "available": "Available",
"issues": "Incidentes Abertos" "issues": "Open Issues"
}, },
"overseerr": { "overseerr": {
"pending": "Pendente", "pending": "Pending",
"processing": "Processando", "processing": "Processando",
"approved": "Aprovado", "approved": "Approved",
"available": "Disponível" "available": "Available"
}, },
"netalertx": { "netalertx": {
"total": "Total", "total": "Total",
"connected": "Conectado", "connected": "Connected",
"new_devices": "Novos dispositivos", "new_devices": "Novos dispositivos",
"down_alerts": "Alertas de Inatividade" "down_alerts": "Alertas de Inatividade"
}, },
@@ -297,26 +297,26 @@
"gravity": "Gravidade" "gravity": "Gravidade"
}, },
"adguard": { "adguard": {
"queries": "Consultas", "queries": "Queries",
"blocked": "Bloqueado", "blocked": "Blocked",
"filtered": "Filtrado", "filtered": "Filtrado",
"latency": "Latência" "latency": "Latência"
}, },
"speedtest": { "speedtest": {
"upload": "Enviar", "upload": "Upload",
"download": "Baixar", "download": "Download",
"ping": "Ping" "ping": "Ping"
}, },
"portainer": { "portainer": {
"running": "Executando", "running": "Running",
"stopped": "Parado", "stopped": "Parado",
"total": "Total" "total": "Total"
}, },
"suwayomi": { "suwayomi": {
"download": "Baixado", "download": "Downloaded",
"nondownload": "Não Baixado", "nondownload": "Não Baixado",
"read": "Lido", "read": "Read",
"unread": "Não lido", "unread": "Unread",
"downloadedread": "Baixado e Lido", "downloadedread": "Baixado e Lido",
"downloadedunread": "Baixado e Não Lido", "downloadedunread": "Baixado e Não Lido",
"nondownloadedread": "Não Baixado e Lido", "nondownloadedread": "Não Baixado e Lido",
@@ -337,7 +337,7 @@
"ago": "{{value}} Atrás" "ago": "{{value}} Atrás"
}, },
"technitium": { "technitium": {
"totalQueries": "Consultas", "totalQueries": "Queries",
"totalNoError": "Sucesso", "totalNoError": "Sucesso",
"totalServerFailure": "Falhas", "totalServerFailure": "Falhas",
"totalNxDomain": "Domínios NX", "totalNxDomain": "Domínios NX",
@@ -345,12 +345,12 @@
"totalAuthoritative": "Autoritativo", "totalAuthoritative": "Autoritativo",
"totalRecursive": "Recursivo", "totalRecursive": "Recursivo",
"totalCached": "Em cache", "totalCached": "Em cache",
"totalBlocked": "Bloqueado", "totalBlocked": "Blocked",
"totalDropped": "Perdidos", "totalDropped": "Perdidos",
"totalClients": "Clientes" "totalClients": "Clientes"
}, },
"tdarr": { "tdarr": {
"queue": "Fila de espera", "queue": "Queue",
"processed": "Processado", "processed": "Processado",
"errored": "Erro", "errored": "Erro",
"saved": "Guardado" "saved": "Guardado"
@@ -361,13 +361,13 @@
"middleware": "" "middleware": ""
}, },
"trilium": { "trilium": {
"version": "Versão", "version": "Version",
"notesCount": "Notas", "notesCount": "Notas",
"dbSize": "Tamanho do banco de dados", "dbSize": "Tamanho do banco de dados",
"unknown": "Desconhecido" "unknown": "Unknown"
}, },
"navidrome": { "navidrome": {
"nothing_streaming": "Sem Streams Ativos", "nothing_streaming": "No Active Streams",
"please_wait": "Por favor, aguarde" "please_wait": "Por favor, aguarde"
}, },
"npm": { "npm": {
@@ -384,49 +384,49 @@
}, },
"gotify": { "gotify": {
"apps": "Aplicações", "apps": "Aplicações",
"clients": "Clientes", "clients": "Clients",
"messages": "Mensagens" "messages": "Mensagens"
}, },
"prowlarr": { "prowlarr": {
"enableIndexers": "Indexadores", "enableIndexers": "Indexadores",
"numberOfGrabs": "Agarrados", "numberOfGrabs": "Agarrados",
"numberOfQueries": "Consultas", "numberOfQueries": "Queries",
"numberOfFailGrabs": "Falhados", "numberOfFailGrabs": "Falhados",
"numberOfFailQueries": "Pesquisas falhadas" "numberOfFailQueries": "Pesquisas falhadas"
}, },
"jackett": { "jackett": {
"configured": "Configurado", "configured": "Configurado",
"errored": "Falhou" "errored": "Errored"
}, },
"strelaysrv": { "strelaysrv": {
"numActiveSessions": "Sessões", "numActiveSessions": "Sessões",
"numConnections": "Conexões", "numConnections": "Conexões",
"dataRelayed": "Retransmitido", "dataRelayed": "Retransmitido",
"transferRate": "Taxa" "transferRate": "Rate"
}, },
"mastodon": { "mastodon": {
"user_count": "Usuários", "user_count": "Users",
"status_count": "Postagens", "status_count": "Postagens",
"domain_count": "Domínios" "domain_count": "Domínios"
}, },
"medusa": { "medusa": {
"wanted": "Desejado", "wanted": "Wanted",
"queued": "Na fila", "queued": "Queued",
"series": "Séries" "series": "Series"
}, },
"minecraft": { "minecraft": {
"players": "Reprodutores", "players": "Reprodutores",
"version": "Versão", "version": "Versão",
"status": "Status", "status": "Status",
"up": "Online", "up": "Online",
"down": "Desconectado" "down": "Offline"
}, },
"miniflux": { "miniflux": {
"read": "Lido", "read": "Lido",
"unread": "Não lido" "unread": "Unread"
}, },
"authentik": { "authentik": {
"users": "Usuários", "users": "Users",
"loginsLast24H": "Inícios de sessão (24h)", "loginsLast24H": "Inícios de sessão (24h)",
"failedLoginsLast24H": "Inícios de sessão falhados (24h)" "failedLoginsLast24H": "Inícios de sessão falhados (24h)"
}, },
@@ -438,19 +438,19 @@
}, },
"glances": { "glances": {
"cpu": "CPU", "cpu": "CPU",
"load": "Carga", "load": "Load",
"wait": "Por favor, aguarde", "wait": "Please wait",
"temp": "TEMPERATURA", "temp": "TEMP",
"_temp": "Temperatura", "_temp": "Temperatura",
"warn": "Aviso", "warn": "Aviso",
"uptime": "ATIVO", "uptime": "UP",
"total": "Total", "total": "Total",
"free": "Livre", "free": "Free",
"used": "Utilizado", "used": "Used",
"days": "d", "days": "d",
"hours": "h", "hours": "h",
"crit": "Crítico", "crit": "Crítico",
"read": "Leitura", "read": "Read",
"write": "Escrita", "write": "Escrita",
"gpu": "GPU", "gpu": "GPU",
"mem": "Memória", "mem": "Memória",
@@ -471,57 +471,57 @@
"1-day": "Maioritariamente ensolarado", "1-day": "Maioritariamente ensolarado",
"1-night": "Maioritariamente Limpo", "1-night": "Maioritariamente Limpo",
"2-day": "Parcialmente Nublado", "2-day": "Parcialmente Nublado",
"2-night": "Parcialmente Nublado", "2-night": "Partly Cloudy",
"3-day": "Nublado", "3-day": "Nublado",
"3-night": "Nublado", "3-night": "Cloudy",
"45-day": "Nevoeiro", "45-day": "Nevoeiro",
"45-night": "Nevoeiro", "45-night": "Foggy",
"48-day": "Nevoeiro", "48-day": "Foggy",
"48-night": "Nevoeiro", "48-night": "Foggy",
"51-day": "Aguaceiros", "51-day": "Aguaceiros",
"51-night": "Leve Garoa", "51-night": "Light Drizzle",
"53-day": "Chuvisco", "53-day": "Chuvisco",
"53-night": "Garoa", "53-night": "Drizzle",
"55-day": "Aguaceiro Forte", "55-day": "Aguaceiro Forte",
"55-night": "Garoa Forte", "55-night": "Heavy Drizzle",
"56-day": "Leve Garoa Congelante", "56-day": "Leve Garoa Congelante",
"56-night": "Garoa Congelante Fraca", "56-night": "Light Freezing Drizzle",
"57-day": "Garoa Congelante", "57-day": "Garoa Congelante",
"57-night": "Garoa Congelante", "57-night": "Freezing Drizzle",
"61-day": "Chuva fraca", "61-day": "Chuva fraca",
"61-night": "Chuva Fraca", "61-night": "Light Rain",
"63-day": "Chuva", "63-day": "Chuva",
"63-night": "Chuva", "63-night": "Rain",
"65-day": "Chuva forte", "65-day": "Chuva forte",
"65-night": "Chuva Forte", "65-night": "Heavy Rain",
"66-day": "Chuva Congelante", "66-day": "Chuva Congelante",
"66-night": "Chuva Congelante", "66-night": "Freezing Rain",
"67-day": "Chuva Congelante", "67-day": "Freezing Rain",
"67-night": "Chuva Congelante", "67-night": "Freezing Rain",
"71-day": "Neve fraca", "71-day": "Neve fraca",
"71-night": "Neve Fraca", "71-night": "Light Snow",
"73-day": "Neve", "73-day": "Neve",
"73-night": "Neve", "73-night": "Snow",
"75-day": "Neve forte", "75-day": "Neve forte",
"75-night": "Neve Forte", "75-night": "Heavy Snow",
"77-day": "Grãos de Neve", "77-day": "Grãos de Neve",
"77-night": "Grãos de Neve", "77-night": "Snow Grains",
"80-day": "Neve fraca", "80-day": "Neve fraca",
"80-night": "Pancadas de Chuva Leves", "80-night": "Light Showers",
"81-day": "Chuviscos", "81-day": "Chuviscos",
"81-night": "Pancadas de Chuva", "81-night": "Showers",
"82-day": "Chuviscos fortes", "82-day": "Chuviscos fortes",
"82-night": "Pancadas de Chuva Forte", "82-night": "Heavy Showers",
"85-day": "Precipitação de Neve", "85-day": "Precipitação de Neve",
"85-night": "Pancadas de Neve", "85-night": "Snow Showers",
"86-day": "Pancadas de Neve", "86-day": "Snow Showers",
"86-night": "Pancadas de Neve", "86-night": "Snow Showers",
"95-day": "Trovoada", "95-day": "Trovoada",
"95-night": "Tempestade Com Raios", "95-night": "Thunderstorm",
"96-day": "Trovoada com granizo", "96-day": "Trovoada com granizo",
"96-night": "Tempestade Com Raios e Granizo", "96-night": "Thunderstorm With Hail",
"99-day": "Tempestade Com Raios e Granizo", "99-day": "Thunderstorm With Hail",
"99-night": "Tempestade Com Raios e Granizo" "99-night": "Thunderstorm With Hail"
}, },
"homebridge": { "homebridge": {
"available_update": "Sistema", "available_update": "Sistema",
@@ -530,15 +530,15 @@
"up_to_date": "Atualizado", "up_to_date": "Atualizado",
"child_bridges": "Pontes Filhas", "child_bridges": "Pontes Filhas",
"child_bridges_status": "{{ok}}/{{total}}", "child_bridges_status": "{{ok}}/{{total}}",
"up": "Ativo", "up": "Up",
"pending": "Pendente", "pending": "Pending",
"down": "Inativo" "down": "Down"
}, },
"healthchecks": { "healthchecks": {
"new": "Novo", "new": "Novo",
"up": "Ativo", "up": "Up",
"grace": "Em Período Gratuito", "grace": "Em Período Gratuito",
"down": "Inativo", "down": "Down",
"paused": "Pausado", "paused": "Pausado",
"status": "Status", "status": "Status",
"last_ping": "Ultimo Ping", "last_ping": "Ultimo Ping",
@@ -550,26 +550,26 @@
"containers_failed": "Falhou" "containers_failed": "Falhou"
}, },
"autobrr": { "autobrr": {
"approvedPushes": "Aprovado", "approvedPushes": "Approved",
"rejectedPushes": "Rejeitado", "rejectedPushes": "Rejeitado",
"filters": "Filtros", "filters": "Filtros",
"indexers": "Indexadores" "indexers": "Indexers"
}, },
"tubearchivist": { "tubearchivist": {
"downloads": "Fila de espera", "downloads": "Queue",
"videos": "Vídeos", "videos": "Vídeos",
"channels": "Canais", "channels": "Canais",
"playlists": "Listas" "playlists": "Listas"
}, },
"truenas": { "truenas": {
"load": "Carga do sistema", "load": "Carga do sistema",
"uptime": "Tempo ativo", "uptime": "Uptime",
"alerts": "Alertas" "alerts": "Alerts"
}, },
"pyload": { "pyload": {
"speed": "Velocidade", "speed": "Velocidade",
"active": "Ativo", "active": "Active",
"queue": "Fila de espera", "queue": "Queue",
"total": "Total" "total": "Total"
}, },
"gluetun": { "gluetun": {
@@ -579,21 +579,21 @@
"port_forwarded": "Porta Encaminhada" "port_forwarded": "Porta Encaminhada"
}, },
"hdhomerun": { "hdhomerun": {
"channels": "Canais", "channels": "Channels",
"hd": "HD", "hd": "HD",
"tunerCount": "Sintonizadores", "tunerCount": "Sintonizadores",
"channelNumber": "Canal", "channelNumber": "Canal",
"channelNetwork": "Rede", "channelNetwork": "Rede",
"signalStrength": "Potência", "signalStrength": "Potência",
"signalQuality": "Qualidade", "signalQuality": "Qualidade",
"symbolQuality": "Qualidade", "symbolQuality": "Quality",
"networkRate": "Bitrate", "networkRate": "Bitrate",
"clientIP": "Cliente" "clientIP": "Cliente"
}, },
"scrutiny": { "scrutiny": {
"passed": "Aprovado", "passed": "Aprovado",
"failed": "Falhou", "failed": "Failed",
"unknown": "Desconhecido" "unknown": "Unknown"
}, },
"paperlessngx": { "paperlessngx": {
"inbox": "Caixa de entrada", "inbox": "Caixa de entrada",
@@ -608,18 +608,18 @@
"low_battery": "Bateria Fraca" "low_battery": "Bateria Fraca"
}, },
"nextdns": { "nextdns": {
"wait": "Por favor, aguarde", "wait": "Please Wait",
"no_devices": "Nenhum dado do dispositivo recebido" "no_devices": "Nenhum dado do dispositivo recebido"
}, },
"mikrotik": { "mikrotik": {
"cpuLoad": "Carga do CPU", "cpuLoad": "Carga do CPU",
"memoryUsed": "Memória Utilizada", "memoryUsed": "Memória Utilizada",
"uptime": "Tempo ativo", "uptime": "Uptime",
"numberOfLeases": "Concessões" "numberOfLeases": "Concessões"
}, },
"xteve": { "xteve": {
"streams_all": "Todos os Streams", "streams_all": "Todos os Streams",
"streams_active": "Streams Ativas", "streams_active": "Active Streams",
"streams_xepg": "Canais XEPG" "streams_xepg": "Canais XEPG"
}, },
"opendtu": { "opendtu": {
@@ -629,7 +629,7 @@
"limit": "Limite" "limit": "Limite"
}, },
"opnsense": { "opnsense": {
"cpu": "Carga do CPU", "cpu": "CPU Load",
"memory": "Memória Ativa", "memory": "Memória Ativa",
"wanUpload": "Envio WAN", "wanUpload": "Envio WAN",
"wanDownload": "WAN Descarga" "wanDownload": "WAN Descarga"
@@ -654,9 +654,9 @@
"load": "Carga Média", "load": "Carga Média",
"memory": "Uso de memória", "memory": "Uso de memória",
"wanStatus": "Estado WAN", "wanStatus": "Estado WAN",
"up": "Ativo", "up": "Up",
"down": "Inativo", "down": "Down",
"temp": "Temp.", "temp": "Temp",
"disk": "Uso do disco", "disk": "Uso do disco",
"wanIP": "IP WAN" "wanIP": "IP WAN"
}, },
@@ -667,49 +667,49 @@
"memory_usage": "Memória" "memory_usage": "Memória"
}, },
"immich": { "immich": {
"users": "Usuários", "users": "Users",
"photos": "Fotos", "photos": "Fotos",
"videos": "Vídeos", "videos": "Videos",
"storage": "Armazenamento" "storage": "Armazenamento"
}, },
"uptimekuma": { "uptimekuma": {
"up": "Sites no Ar", "up": "Sites no Ar",
"down": "Sites Fora do Ar", "down": "Sites Fora do Ar",
"uptime": "Tempo ativo", "uptime": "Uptime",
"incident": "Incidente", "incident": "Incidente",
"m": "m" "m": "m"
}, },
"atsumeru": { "atsumeru": {
"series": "Séries", "series": "Series",
"archives": "Arquivos", "archives": "Arquivos",
"chapters": "Capítulos", "chapters": "Capítulos",
"categories": "Categorias" "categories": "Categorias"
}, },
"komga": { "komga": {
"libraries": "Bibliotecas", "libraries": "Bibliotecas",
"series": "Séries", "series": "Series",
"books": "Livros" "books": "Books"
}, },
"diskstation": { "diskstation": {
"days": "Dias", "days": "Days",
"uptime": "Tempo ativo", "uptime": "Uptime",
"volumeAvailable": "Disponível" "volumeAvailable": "Available"
}, },
"mylar": { "mylar": {
"series": "Séries", "series": "Series",
"issues": "Problemas", "issues": "Problemas",
"wanted": "Desejado" "wanted": "Wanted"
}, },
"photoprism": { "photoprism": {
"albums": "Álbuns", "albums": "Albums",
"photos": "Fotos", "photos": "Photos",
"videos": "Vídeos", "videos": "Videos",
"people": "Pessoa" "people": "Pessoa"
}, },
"fileflows": { "fileflows": {
"queue": "Fila de espera", "queue": "Queue",
"processing": "Processando", "processing": "Processing",
"processed": "Processado", "processed": "Processed",
"time": "Hora" "time": "Hora"
}, },
"firefly": { "firefly": {
@@ -735,7 +735,7 @@
"size": "Tamanho", "size": "Tamanho",
"lastrun": "Ultima Execução", "lastrun": "Ultima Execução",
"nextrun": "Próxima Execução", "nextrun": "Próxima Execução",
"failed": "Falhou" "failed": "Failed"
}, },
"unmanic": { "unmanic": {
"active_workers": "Workers Ativos", "active_workers": "Workers Ativos",
@@ -752,20 +752,20 @@
"targets_total": "Total de Alvos" "targets_total": "Total de Alvos"
}, },
"gatus": { "gatus": {
"up": "Sites no Ar", "up": "Sites Up",
"down": "Sites Fora do Ar", "down": "Sites Down",
"uptime": "Tempo ativo" "uptime": "Uptime"
}, },
"ghostfolio": { "ghostfolio": {
"gross_percent_today": "Hoje", "gross_percent_today": "Today",
"gross_percent_1y": "Um ano", "gross_percent_1y": "Um ano",
"gross_percent_max": "Todo o tempo" "gross_percent_max": "Todo o tempo"
}, },
"audiobookshelf": { "audiobookshelf": {
"podcasts": "Podcasts", "podcasts": "Podcasts",
"books": "Livros", "books": "Books",
"podcastsDuration": "Duração", "podcastsDuration": "Duração",
"booksDuration": "Duração" "booksDuration": "Duration"
}, },
"homeassistant": { "homeassistant": {
"people_home": "Pessoas em Casa", "people_home": "Pessoas em Casa",
@@ -774,23 +774,23 @@
}, },
"whatsupdocker": { "whatsupdocker": {
"monitoring": "Monitorando", "monitoring": "Monitorando",
"updates": "Atualizações" "updates": "Updates"
}, },
"calibreweb": { "calibreweb": {
"books": "Livros", "books": "Books",
"authors": "Autores", "authors": "Autores",
"categories": "Categorias", "categories": "Categories",
"series": "Séries" "series": "Series"
}, },
"jdownloader": { "jdownloader": {
"downloadCount": "Fila de espera", "downloadCount": "Queue",
"downloadBytesRemaining": "Restante", "downloadBytesRemaining": "Remaining",
"downloadTotalBytes": "Tamanho", "downloadTotalBytes": "Size",
"downloadSpeed": "Velocidade" "downloadSpeed": "Speed"
}, },
"kavita": { "kavita": {
"seriesCount": "Séries", "seriesCount": "Series",
"totalFiles": "Arquivos" "totalFiles": "Files"
}, },
"azuredevops": { "azuredevops": {
"result": "Resultado", "result": "Resultado",
@@ -798,21 +798,21 @@
"buildId": "ID Compilação", "buildId": "ID Compilação",
"succeeded": "Bem-sucedido", "succeeded": "Bem-sucedido",
"notStarted": "Não iniciado", "notStarted": "Não iniciado",
"failed": "Falhou", "failed": "Failed",
"canceled": "Cancelado", "canceled": "Cancelado",
"inProgress": "Em Progresso", "inProgress": "Em Progresso",
"totalPrs": "Total de PRs", "totalPrs": "Total de PRs",
"myPrs": "Minhas PRs", "myPrs": "Minhas PRs",
"approved": "Aprovado" "approved": "Approved"
}, },
"gamedig": { "gamedig": {
"status": "Status", "status": "Status",
"online": "Online", "online": "Online",
"offline": "Desconectado", "offline": "Offline",
"name": "Nome", "name": "Nome",
"map": "Mapa", "map": "Mapa",
"currentPlayers": "Jogadores atuais", "currentPlayers": "Jogadores atuais",
"players": "Jogadores", "players": "Players",
"maxPlayers": "Número Máximo de Jogadores", "maxPlayers": "Número Máximo de Jogadores",
"bots": "Robôs", "bots": "Robôs",
"ping": "Ping" "ping": "Ping"
@@ -825,39 +825,39 @@
}, },
"mealie": { "mealie": {
"recipes": "Receitas", "recipes": "Receitas",
"users": "Usuários", "users": "Users",
"categories": "Categorias", "categories": "Categories",
"tags": "Marcadores" "tags": "Marcadores"
}, },
"openmediavault": { "openmediavault": {
"downloading": "Baixando", "downloading": "Baixando",
"total": "Total", "total": "Total",
"running": "Executando", "running": "Running",
"stopped": "Parado", "stopped": "Stopped",
"passed": "Aprovado", "passed": "Passed",
"failed": "Falhou" "failed": "Failed"
}, },
"openwrt": { "openwrt": {
"uptime": "Tempo ativo", "uptime": "Uptime",
"cpuLoad": "Carga da CPU média (5m)", "cpuLoad": "Carga da CPU média (5m)",
"up": "Ativo", "up": "Up",
"down": "Inativo", "down": "Down",
"bytesTx": "Transmitido", "bytesTx": "Transmitido",
"bytesRx": "Recebido" "bytesRx": "Received"
}, },
"uptimerobot": { "uptimerobot": {
"status": "Status", "status": "Status",
"uptime": "Tempo ativo", "uptime": "Uptime",
"lastDown": "Última inatividade", "lastDown": "Última inatividade",
"downDuration": "Duração de inatividade", "downDuration": "Duração de inatividade",
"sitesUp": "Sites no Ar", "sitesUp": "Sites Up",
"sitesDown": "Sites Fora do Ar", "sitesDown": "Sites Down",
"paused": "Pausado", "paused": "Paused",
"notyetchecked": "Não conferidos ainda", "notyetchecked": "Não conferidos ainda",
"up": "Ativo", "up": "Up",
"seemsdown": "Parece Desconectado", "seemsdown": "Parece Desconectado",
"down": "Inativo", "down": "Down",
"unknown": "Desconhecido" "unknown": "Unknown"
}, },
"calendar": { "calendar": {
"inCinemas": "Nos cinemas", "inCinemas": "Nos cinemas",
@@ -876,10 +876,10 @@
"totalfilesize": "Tamanho total" "totalfilesize": "Tamanho total"
}, },
"mailcow": { "mailcow": {
"domains": "Domínios", "domains": "Domains",
"mailboxes": "Caixas de e-mail", "mailboxes": "Caixas de e-mail",
"mails": "Mensagens", "mails": "Mensagens",
"storage": "Armazenamento" "storage": "Storage"
}, },
"netdata": { "netdata": {
"warnings": "Alertas", "warnings": "Alertas",
@@ -888,12 +888,12 @@
"plantit": { "plantit": {
"events": "Eventos", "events": "Eventos",
"plants": "Plantas", "plants": "Plantas",
"photos": "Fotos", "photos": "Photos",
"species": "Espécies" "species": "Espécies"
}, },
"gitea": { "gitea": {
"notifications": "Notificações", "notifications": "Notificações",
"issues": "Problemas", "issues": "Issues",
"pulls": "Solicitações de Envio", "pulls": "Solicitações de Envio",
"repositories": "Repositórios" "repositories": "Repositórios"
}, },
@@ -909,13 +909,13 @@
"galleries": "Galerias", "galleries": "Galerias",
"performers": "Atores", "performers": "Atores",
"studios": "Estúdios", "studios": "Estúdios",
"movies": "Filmes", "movies": "Movies",
"tags": "Etiquetas", "tags": "Tags",
"oCount": "Contagem 0" "oCount": "Contagem 0"
}, },
"tandoor": { "tandoor": {
"users": "Usuários", "users": "Users",
"recipes": "Receitas", "recipes": "Recipes",
"keywords": "Palavras-chave" "keywords": "Palavras-chave"
}, },
"homebox": { "homebox": {
@@ -923,17 +923,17 @@
"totalWithWarranty": "Com Garantia", "totalWithWarranty": "Com Garantia",
"locations": "Localização", "locations": "Localização",
"labels": "Rótulos", "labels": "Rótulos",
"users": "Usuários", "users": "Users",
"totalValue": "Valor Total" "totalValue": "Valor Total"
}, },
"crowdsec": { "crowdsec": {
"alerts": "Alertas", "alerts": "Alerts",
"bans": "Banimentos" "bans": "Banimentos"
}, },
"wgeasy": { "wgeasy": {
"connected": "Conectado", "connected": "Connected",
"enabled": "Ativo", "enabled": "Enabled",
"disabled": "Desativado", "disabled": "Disabled",
"total": "Total" "total": "Total"
}, },
"swagdashboard": { "swagdashboard": {
@@ -944,8 +944,8 @@
}, },
"myspeed": { "myspeed": {
"ping": "Ping", "ping": "Ping",
"download": "Baixar", "download": "Download",
"upload": "Enviar" "upload": "Upload"
}, },
"stocks": { "stocks": {
"stocks": "Ações", "stocks": "Ações",
@@ -956,17 +956,17 @@
}, },
"frigate": { "frigate": {
"cameras": "Câmeras", "cameras": "Câmeras",
"uptime": "Tempo ativo", "uptime": "Uptime",
"version": "Versão" "version": "Version"
}, },
"linkwarden": { "linkwarden": {
"links": "Links", "links": "Links",
"collections": "Coleções", "collections": "Coleções",
"tags": "Etiquetas" "tags": "Tags"
}, },
"zabbix": { "zabbix": {
"unclassified": "Não classificado", "unclassified": "Não classificado",
"information": "Informação", "information": "Information",
"warning": "Aviso", "warning": "Aviso",
"average": "Médio", "average": "Médio",
"high": "Alto", "high": "Alto",
@@ -987,24 +987,24 @@
"tasksInProgress": "Tarefas em Andamento" "tasksInProgress": "Tarefas em Andamento"
}, },
"headscale": { "headscale": {
"name": "Nome", "name": "Name",
"address": "Endereço", "address": "Address",
"last_seen": "Visto por último", "last_seen": "Last Seen",
"status": "Status", "status": "Status",
"online": "Online", "online": "Online",
"offline": "Desconectado" "offline": "Offline"
}, },
"beszel": { "beszel": {
"name": "Nome", "name": "Name",
"systems": "Sistemas", "systems": "Sistemas",
"up": "Ativo", "up": "Up",
"down": "Inativo", "down": "Down",
"paused": "Pausado", "paused": "Paused",
"pending": "Pendente", "pending": "Pending",
"status": "Status", "status": "Status",
"updated": "Atualizado", "updated": "Updated",
"cpu": "CPU", "cpu": "CPU",
"memory": "MEM.", "memory": "MEM",
"disk": "Disco", "disk": "Disco",
"network": "Rede" "network": "Rede"
}, },
@@ -1012,26 +1012,26 @@
"apps": "Aplicativos", "apps": "Aplicativos",
"synced": "Sincronizado", "synced": "Sincronizado",
"outOfSync": "Fora de sincronia", "outOfSync": "Fora de sincronia",
"healthy": "Saudável", "healthy": "Healthy",
"degraded": "Degradado", "degraded": "Degradado",
"progressing": "Progredindo", "progressing": "Progredindo",
"missing": "Faltando", "missing": "Missing",
"suspended": "Suspenso" "suspended": "Suspenso"
}, },
"spoolman": { "spoolman": {
"loading": "Carregando" "loading": "Loading"
}, },
"gitlab": { "gitlab": {
"groups": "Grupos", "groups": "Grupos",
"issues": "Problemas", "issues": "Issues",
"merges": "Solicitações de mesclagem", "merges": "Solicitações de mesclagem",
"projects": "Projetos" "projects": "Projetos"
}, },
"apcups": { "apcups": {
"status": "Status", "status": "Status",
"load": "Carga", "load": "Load",
"bcharge": "Carga da Bateria", "bcharge": "Battery Charge",
"timeleft": "Tempo Restante" "timeleft": "Time Left"
}, },
"karakeep": { "karakeep": {
"bookmarks": "Marcadores", "bookmarks": "Marcadores",
@@ -1039,23 +1039,23 @@
"archived": "Arquivados", "archived": "Arquivados",
"highlights": "Destaques", "highlights": "Destaques",
"lists": "Listas", "lists": "Listas",
"tags": "Etiquetas" "tags": "Tags"
}, },
"slskd": { "slskd": {
"slskStatus": "Rede", "slskStatus": "Network",
"connected": "Conectado", "connected": "Connected",
"disconnected": "Desconectado", "disconnected": "Disconnected",
"updateStatus": "Atualize", "updateStatus": "Atualize",
"update_yes": "Disponível", "update_yes": "Available",
"update_no": "Atualizado", "update_no": "Up to Date",
"downloads": "Transferências", "downloads": "Transferências",
"uploads": "Envios", "uploads": "Envios",
"sharedFiles": "Arquivos" "sharedFiles": "Files"
}, },
"jellystat": { "jellystat": {
"songs": "Músicas", "songs": "Songs",
"movies": "Filmes", "movies": "Movies",
"episodes": "Episódios", "episodes": "Episodes",
"other": "Outro" "other": "Outro"
}, },
"checkmk": { "checkmk": {
@@ -1064,60 +1064,60 @@
}, },
"komodo": { "komodo": {
"total": "Total", "total": "Total",
"running": "Executando", "running": "Running",
"stopped": "Parado", "stopped": "Stopped",
"down": "Inativo", "down": "Down",
"unhealthy": "Não-saudável", "unhealthy": "Unhealthy",
"unknown": "Desconhecido", "unknown": "Unknown",
"servers": "Servidores", "servers": "Servers",
"stacks": "Pilhas", "stacks": "Stacks",
"containers": "Contêineres" "containers": "Containers"
}, },
"filebrowser": { "filebrowser": {
"available": "Disponível", "available": "Available",
"used": "Utilizado", "used": "Used",
"total": "Total" "total": "Total"
}, },
"wallos": { "wallos": {
"activeSubscriptions": "Assinaturas", "activeSubscriptions": "Subscriptions",
"thisMonthlyCost": "Este Mês", "thisMonthlyCost": "This Month",
"nextMonthlyCost": "Próximo Mês", "nextMonthlyCost": "Next Month",
"previousMonthlyCost": "Mês Anterior", "previousMonthlyCost": "Prev. Month",
"nextRenewingSubscription": "Próximo Pagamento" "nextRenewingSubscription": "Next Payment"
}, },
"unraid": { "unraid": {
"STARTED": "Iniciado", "STARTED": "Started",
"STOPPED": "Parado", "STOPPED": "Stopped",
"NEW_ARRAY": "Nova Array", "NEW_ARRAY": "New Array",
"RECON_DISK": "Reconstruindo Disco", "RECON_DISK": "Reconstructing Disk",
"DISABLE_DISK": "Disco Desativado", "DISABLE_DISK": "Disk Disabled",
"SWAP_DSBL": "Swap Desabilitado", "SWAP_DSBL": "Swap Disable",
"INVALID_EXPANSION": "Expansão Inválida", "INVALID_EXPANSION": "Invalid Expansion",
"PARITY_NOT_BIGGEST": "Paridade Não É O Maior Disco", "PARITY_NOT_BIGGEST": "Parity Not Biggest",
"TOO_MANY_MISSING_DISKS": "Muitos Discos Ausentes", "TOO_MANY_MISSING_DISKS": "Too Many Missing Disks",
"NEW_DISK_TOO_SMALL": "Novo Disco É Muito Pequeno", "NEW_DISK_TOO_SMALL": "New Disk Too Small",
"NO_DATA_DISKS": "Sem Discos de Dados", "NO_DATA_DISKS": "No Data Disks",
"notifications": "Notificações", "notifications": "Notifications",
"status": "Status", "status": "Status",
"cpu": "CPU", "cpu": "CPU",
"memoryUsed": "Memória Utilizada", "memoryUsed": "Memory Used",
"memoryAvailable": "Memória Disponível", "memoryAvailable": "Memory Available",
"arrayUsed": "Array Utilizado", "arrayUsed": "Array Used",
"arrayFree": "Array Disponível", "arrayFree": "Array Free",
"poolUsed": "{{pool}} Utilizado", "poolUsed": "{{pool}} Used",
"poolFree": "{{pool}} Livre" "poolFree": "{{pool}} Free"
}, },
"backrest": { "backrest": {
"num_plans": "Planos", "num_plans": "Plans",
"num_success_30": "Sucessos", "num_success_30": "Successes",
"num_failure_30": "Falhas", "num_failure_30": "Failures",
"num_success_latest": "Executando com sucesso", "num_success_latest": "Succeeding",
"num_failure_latest": "Falhando", "num_failure_latest": "Failing",
"bytes_added_30": "Bytes Adicionados" "bytes_added_30": "Bytes Added"
}, },
"yourspotify": { "yourspotify": {
"songs": "Músicas", "songs": "Songs",
"time": "Tempo", "time": "Time",
"artists": "Artistas" "artists": "Artists"
} }
} }

View File

@@ -1116,8 +1116,8 @@
"bytes_added_30": "Додати бајтови" "bytes_added_30": "Додати бајтови"
}, },
"yourspotify": { "yourspotify": {
"songs": "Песме", "songs": "Songs",
"time": "Време", "time": "Time",
"artists": "Извођачи" "artists": "Artists"
} }
} }

View File

@@ -735,7 +735,7 @@
"size": "Boyut", "size": "Boyut",
"lastrun": "Son Çalışma", "lastrun": "Son Çalışma",
"nextrun": "Sonraki Çalışma", "nextrun": "Sonraki Çalışma",
"failed": "Başarısız" "failed": "Failed"
}, },
"unmanic": { "unmanic": {
"active_workers": "Etkin kullanıcılar", "active_workers": "Etkin kullanıcılar",
@@ -798,7 +798,7 @@
"buildId": "Yapı Kimliği", "buildId": "Yapı Kimliği",
"succeeded": "Başarılı", "succeeded": "Başarılı",
"notStarted": "Henüz Başlamadı", "notStarted": "Henüz Başlamadı",
"failed": "Başarısız", "failed": "Failed",
"canceled": "İptal edildi", "canceled": "İptal edildi",
"inProgress": "Sürüyor", "inProgress": "Sürüyor",
"totalPrs": "Toplam Çekme İstekleri", "totalPrs": "Toplam Çekme İstekleri",
@@ -835,7 +835,7 @@
"running": "Çalışıyor", "running": "Çalışıyor",
"stopped": "Durdu", "stopped": "Durdu",
"passed": "Passed", "passed": "Passed",
"failed": "Başarısız" "failed": "Failed"
}, },
"openwrt": { "openwrt": {
"uptime": "Çalışma süresi", "uptime": "Çalışma süresi",
@@ -876,7 +876,7 @@
"totalfilesize": "Toplam Kapasite" "totalfilesize": "Toplam Kapasite"
}, },
"mailcow": { "mailcow": {
"domains": "Alan Adları", "domains": "Domains",
"mailboxes": "Posta kutuları", "mailboxes": "Posta kutuları",
"mails": "Postalar", "mails": "Postalar",
"storage": "Depolama" "storage": "Depolama"
@@ -988,7 +988,7 @@
}, },
"headscale": { "headscale": {
"name": "Ad", "name": "Ad",
"address": "Adres", "address": "Address",
"last_seen": "Last Seen", "last_seen": "Last Seen",
"status": "Durum", "status": "Durum",
"online": "Çevrimiçi", "online": "Çevrimiçi",
@@ -1002,21 +1002,21 @@
"paused": "Durduruldu", "paused": "Durduruldu",
"pending": "Pending", "pending": "Pending",
"status": "Durum", "status": "Durum",
"updated": "Güncellendi", "updated": "Updated",
"cpu": "İşlemci", "cpu": "İşlemci",
"memory": "Bellek", "memory": "Bellek",
"disk": "Disk", "disk": "Disk",
"network": "NET" "network": "NET"
}, },
"argocd": { "argocd": {
"apps": "Uygulamalar", "apps": "Apps",
"synced": "Synced", "synced": "Synced",
"outOfSync": "Out Of Sync", "outOfSync": "Out Of Sync",
"healthy": "Sağlıklı", "healthy": "Sağlıklı",
"degraded": "Degraded", "degraded": "Degraded",
"progressing": "Progressing", "progressing": "Progressing",
"missing": "Eksik", "missing": "Eksik",
"suspended": "Askıya Alındı" "suspended": "Suspended"
}, },
"spoolman": { "spoolman": {
"loading": "Yükleniyor" "loading": "Yükleniyor"

View File

@@ -200,10 +200,10 @@
"rutorrent": { "rutorrent": {
"active": "活动中", "active": "活动中",
"upload": "Upload", "upload": "Upload",
"download": "下载" "download": "Download"
}, },
"transmission": { "transmission": {
"download": "下载", "download": "Download",
"upload": "", "upload": "",
"leech": "Leech", "leech": "Leech",
"seed": "Seed" "seed": "Seed"
@@ -223,8 +223,8 @@
"invalid": "Invalid" "invalid": "Invalid"
}, },
"deluge": { "deluge": {
"download": "下载", "download": "Download",
"upload": "上传", "upload": "Upload",
"leech": "Leech", "leech": "Leech",
"seed": "Seed" "seed": "Seed"
}, },

View File

@@ -1,47 +1,16 @@
import classNames from "classnames"; import classNames from "classnames";
import { useTranslation } from "next-i18next"; import { useTranslation } from "next-i18next";
import { useContext, useMemo } from "react";
import { BlockHighlightContext } from "./highlight-context"; export default function Block({ value, label }) {
import { evaluateHighlight, getHighlightClass } from "utils/highlights";
export default function Block({ value, label, field }) {
const { t } = useTranslation(); const { t } = useTranslation();
const highlightConfig = useContext(BlockHighlightContext);
const highlight = useMemo(() => {
if (!highlightConfig) return null;
const labels = Array.isArray(label) ? label : [label];
const candidates = [];
if (typeof field === "string") candidates.push(field);
for (const candidateLabel of labels) {
if (typeof candidateLabel === "string") candidates.push(candidateLabel);
}
for (const candidate of candidates) {
const result = evaluateHighlight(candidate, value, highlightConfig);
if (result) return result;
}
return null;
}, [field, label, value, highlightConfig]);
const highlightClass = useMemo(() => {
if (!highlight?.level) return undefined;
return getHighlightClass(highlight.level, highlightConfig);
}, [highlight, highlightConfig]);
return ( return (
<div <div
className={classNames( className={classNames(
"bg-theme-200/50 dark:bg-theme-900/20 rounded-sm m-1 flex-1 flex flex-col items-center justify-center text-center p-1", "bg-theme-200/50 dark:bg-theme-900/20 rounded-sm m-1 flex-1 flex flex-col items-center justify-center text-center p-1",
value === undefined ? "animate-pulse" : "", value === undefined ? "animate-pulse" : "",
highlightClass,
"service-block", "service-block",
)} )}
data-highlight-level={highlight?.level}
data-highlight-source={highlight?.source}
> >
<div className="font-thin text-sm">{value === undefined || value === null ? "-" : value}</div> <div className="font-thin text-sm">{value === undefined || value === null ? "-" : value}</div>
<div className="font-bold text-xs uppercase">{t(label)}</div> <div className="font-bold text-xs uppercase">{t(label)}</div>

View File

@@ -1,10 +1,7 @@
import { useContext, useMemo } from "react"; import { useContext } from "react";
import { SettingsContext } from "utils/contexts/settings"; import { SettingsContext } from "utils/contexts/settings";
import Error from "./error"; import Error from "./error";
import { BlockHighlightContext } from "./highlight-context";
import { buildHighlightConfig } from "utils/highlights";
const ALIASED_WIDGETS = { const ALIASED_WIDGETS = {
pialert: "netalertx", pialert: "netalertx",
@@ -14,11 +11,6 @@ const ALIASED_WIDGETS = {
export default function Container({ error = false, children, service }) { export default function Container({ error = false, children, service }) {
const { settings } = useContext(SettingsContext); const { settings } = useContext(SettingsContext);
const highlightConfig = useMemo(
() => buildHighlightConfig(settings?.blockHighlights, service?.widget?.highlight, service?.widget?.type),
[settings?.blockHighlights, service?.widget?.highlight, service?.widget?.type],
);
if (error) { if (error) {
if (settings.hideErrors || service.widget.hide_errors) { if (settings.hideErrors || service.widget.hide_errors) {
return null; return null;
@@ -59,11 +51,6 @@ export default function Container({ error = false, children, service }) {
}), }),
); );
} }
const content = <div className="relative flex flex-row w-full service-container">{visibleChildren}</div>;
if (!highlightConfig) { return <div className="relative flex flex-row w-full service-container">{visibleChildren}</div>;
return content;
}
return <BlockHighlightContext.Provider value={highlightConfig}>{content}</BlockHighlightContext.Provider>;
} }

View File

@@ -1,3 +0,0 @@
import { createContext } from "react";
export const BlockHighlightContext = createContext(null);

View File

@@ -55,7 +55,8 @@ export default function Version({ disableUpdateCheck = false }) {
</span> </span>
{!validate(version) {!validate(version)
? null ? null
: latestRelease && : releaseData &&
latestRelease &&
compareVersions(latestRelease.tag_name, version) > 0 && ( compareVersions(latestRelease.tag_name, version) > 0 && (
<a <a
href={latestRelease.html_url} href={latestRelease.html_url}

View File

@@ -113,7 +113,7 @@ export default function Widget({ options }) {
<Resource <Resource
icon={FaMemory} icon={FaMemory}
value={t("common.bytes", { value={t("common.bytes", {
value: data.mem.available, value: data.mem.free,
maximumFractionDigits: 1, maximumFractionDigits: 1,
binary: true, binary: true,
})} })}

View File

@@ -1,4 +1,4 @@
export default function QueueEntry({ title, activity, timeLeft, progress, size }) { export default function QueueEntry({ title, activity, timeLeft, progress }) {
return ( return (
<div className="text-theme-700 dark:text-theme-200 relative h-5 rounded-md bg-theme-200/50 dark:bg-theme-900/20 m-1 px-1 flex"> <div className="text-theme-700 dark:text-theme-200 relative h-5 rounded-md bg-theme-200/50 dark:bg-theme-900/20 m-1 px-1 flex">
<div <div
@@ -11,7 +11,6 @@ export default function QueueEntry({ title, activity, timeLeft, progress, size }
<div className="absolute w-full whitespace-nowrap text-ellipsis overflow-hidden text-left">{title}</div> <div className="absolute w-full whitespace-nowrap text-ellipsis overflow-hidden text-left">{title}</div>
</div> </div>
<div className="self-center text-xs flex justify-end mr-1.5 pl-1 z-10 text-ellipsis overflow-hidden whitespace-nowrap"> <div className="self-center text-xs flex justify-end mr-1.5 pl-1 z-10 text-ellipsis overflow-hidden whitespace-nowrap">
{size && `${size} - `}
{timeLeft ? `${activity} - ${timeLeft}` : activity} {timeLeft ? `${activity} - ${timeLeft}` : activity}
</div> </div>
</div> </div>

View File

@@ -417,7 +417,6 @@ function Home({ initialSettings }) {
)} )}
<meta name="msapplication-TileColor" content={themes[settings.color || "slate"][settings.theme || "dark"]} /> <meta name="msapplication-TileColor" content={themes[settings.color || "slate"][settings.theme || "dark"]} />
<meta name="theme-color" content={themes[settings.color || "slate"][settings.theme || "dark"]} /> <meta name="theme-color" content={themes[settings.color || "slate"][settings.theme || "dark"]} />
<meta name="color-scheme" content="dark light"></meta>
</Head> </Head>
<Script src="/api/config/custom.js" /> <Script src="/api/config/custom.js" />
@@ -425,7 +424,7 @@ function Home({ initialSettings }) {
<div <div
className={classNames( className={classNames(
settings.fullWidth ? "" : "container", settings.fullWidth ? "" : "container",
"relative m-auto flex flex-col justify-start z-10 h-full min-h-screen", "relative m-auto flex flex-col justify-start z-10 h-full",
)} )}
> >
<QuickLaunch <QuickLaunch
@@ -540,48 +539,38 @@ export default function Wrapper({ initialSettings, fallback }) {
html.classList.add(desiredThemeClass); html.classList.add(desiredThemeClass);
} }
if (backgroundImage) { // Remove any previously applied inline styles
const safeBackgroundImage = backgroundImage.replace(/'/g, "\\'"); body.style.backgroundImage = "";
body.style.backgroundImage = `linear-gradient(rgb(var(--bg-color) / ${opacity}), rgb(var(--bg-color) / ${opacity})), url('${safeBackgroundImage}')`; body.style.backgroundColor = "";
body.style.backgroundSize = "cover"; body.style.backgroundAttachment = "";
body.style.backgroundPosition = "center";
body.style.backgroundAttachment = "fixed";
body.style.backgroundRepeat = "no-repeat";
body.style.backgroundColor = "";
} else {
body.style.backgroundImage = "none";
body.style.backgroundColor = "rgb(var(--bg-color))";
body.style.backgroundSize = "";
body.style.backgroundPosition = "";
body.style.backgroundAttachment = "";
body.style.backgroundRepeat = "";
}
return () => {
body.style.backgroundImage = "";
body.style.backgroundColor = "";
body.style.backgroundSize = "";
body.style.backgroundPosition = "";
body.style.backgroundAttachment = "";
body.style.backgroundRepeat = "";
};
}, [backgroundImage, opacity, theme, color, initialSettings.color]); }, [backgroundImage, opacity, theme, color, initialSettings.color]);
return ( return (
<div id="page_wrapper" className="relative min-h-screen"> <>
<div {backgroundImage && (
id="inner_wrapper" <div
tabIndex="-1" id="background"
className={classNames( aria-hidden="true"
"w-full min-h-screen overflow-auto", style={{
backgroundBlur && backgroundImage: `linear-gradient(rgb(var(--bg-color) / ${opacity}), rgb(var(--bg-color) / ${opacity})), url('${backgroundImage}')`,
`backdrop-blur${initialSettings.background.blur?.length ? `-${initialSettings.background.blur}` : ""}`, }}
backgroundSaturate && `backdrop-saturate-${initialSettings.background.saturate}`, />
backgroundBrightness && `backdrop-brightness-${initialSettings.background.brightness}`, )}
)} <div id="page_wrapper" className="relative h-full">
> <div
<Index initialSettings={initialSettings} fallback={fallback} /> id="inner_wrapper"
tabIndex="-1"
className={classNames(
"w-full h-full overflow-auto",
backgroundBlur &&
`backdrop-blur${initialSettings.background.blur?.length ? `-${initialSettings.background.blur}` : ""}`,
backgroundSaturate && `backdrop-saturate-${initialSettings.background.saturate}`,
backgroundBrightness && `backdrop-brightness-${initialSettings.background.brightness}`,
)}
>
<Index initialSettings={initialSettings} fallback={fallback} />
</div>
</div> </div>
</div> </>
); );
} }

View File

@@ -30,6 +30,18 @@ body,
height: 100%; height: 100%;
margin: 0; margin: 0;
padding: 0; padding: 0;
background-color: rgb(var(--bg-color));
}
#background {
position: fixed;
inset: 0;
z-index: 0;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
background-attachment: scroll;
pointer-events: none;
} }
html, html,

View File

@@ -254,7 +254,6 @@ export function cleanServiceGroups(groups) {
// all widgets // all widgets
fields, fields,
hideErrors, hideErrors,
highlight,
type, type,
// azuredevops // azuredevops
@@ -285,7 +284,6 @@ export function cleanServiceGroups(groups) {
// deluge, qbittorrent // deluge, qbittorrent
enableLeechProgress, enableLeechProgress,
enableLeechSize,
// diskstation // diskstation
volume, volume,
@@ -442,21 +440,6 @@ export function cleanServiceGroups(groups) {
index, index,
}; };
if (highlight) {
let parsedHighlight = highlight;
if (typeof highlight === "string") {
try {
parsedHighlight = JSON.parse(highlight);
} catch (e) {
logger.error("Invalid highlight configuration detected in config for service '%s'", service.name);
parsedHighlight = null;
}
}
if (parsedHighlight && typeof parsedHighlight === "object") {
widget.highlight = parsedHighlight;
}
}
if (type === "azuredevops") { if (type === "azuredevops") {
if (userEmail) widget.userEmail = userEmail; if (userEmail) widget.userEmail = userEmail;
if (repositoryId) widget.repositoryId = repositoryId; if (repositoryId) widget.repositoryId = repositoryId;
@@ -510,7 +493,6 @@ export function cleanServiceGroups(groups) {
} }
if (["deluge", "qbittorrent"].includes(type)) { if (["deluge", "qbittorrent"].includes(type)) {
if (enableLeechProgress !== undefined) widget.enableLeechProgress = JSON.parse(enableLeechProgress); if (enableLeechProgress !== undefined) widget.enableLeechProgress = JSON.parse(enableLeechProgress);
if (enableLeechSize !== undefined) widget.enableLeechSize = JSON.parse(enableLeechSize);
} }
if (["opnsense", "pfsense"].includes(type)) { if (["opnsense", "pfsense"].includes(type)) {
if (wan) widget.wan = wan; if (wan) widget.wan = wan;

View File

@@ -1,257 +0,0 @@
const DEFAULT_LEVEL_CLASSES = {
good: "bg-emerald-500/40 text-emerald-950 dark:bg-emerald-900/60 dark:text-emerald-400",
warn: "bg-amber-300/30 text-amber-900 dark:bg-amber-900/30 dark:text-amber-200",
danger: "bg-rose-700/45 text-rose-200 dark:bg-rose-950/70 dark:text-rose-400",
};
const normalizeFieldKeys = (fields, widgetType) => {
if (!fields || typeof fields !== "object") return {};
return Object.entries(fields).reduce((acc, [key, value]) => {
if (value === null || value === undefined) return acc;
if (typeof key !== "string") return acc;
const trimmedKey = key.trim();
if (trimmedKey === "") return acc;
acc[trimmedKey] = value;
if (widgetType && !trimmedKey.includes(".")) {
const namespacedKey = `${widgetType}.${trimmedKey}`;
if (!(namespacedKey in acc)) {
acc[namespacedKey] = value;
}
}
return acc;
}, {});
};
export const buildHighlightConfig = (globalConfig, widgetConfig, widgetType) => {
const levels = {
...DEFAULT_LEVEL_CLASSES,
...(globalConfig?.levels || {}),
...(widgetConfig?.levels || {}),
};
const { levels: _levels, ...fields } = widgetConfig || {};
const normalizedFields = normalizeFieldKeys(fields, widgetType);
const hasLevels = Object.values(levels).some(Boolean);
const hasFields = Object.keys(normalizedFields).length > 0;
if (!hasLevels && !hasFields) return null;
return { levels, fields: normalizedFields };
};
const NUMERIC_OPERATORS = {
gt: (value, target) => value > target,
gte: (value, target) => value >= target,
lt: (value, target) => value < target,
lte: (value, target) => value <= target,
eq: (value, target) => value === target,
ne: (value, target) => value !== target,
};
const STRING_OPERATORS = {
equals: (value, target, caseSensitive) =>
caseSensitive ? value === target : value.toLowerCase() === target.toLowerCase(),
includes: (value, target, caseSensitive) =>
caseSensitive ? value.includes(target) : value.toLowerCase().includes(target.toLowerCase()),
startsWith: (value, target, caseSensitive) =>
caseSensitive ? value.startsWith(target) : value.toLowerCase().startsWith(target.toLowerCase()),
endsWith: (value, target, caseSensitive) =>
caseSensitive ? value.endsWith(target) : value.toLowerCase().endsWith(target.toLowerCase()),
};
const toNumber = (value) => {
if (typeof value === "number" && Number.isFinite(value)) return value;
if (typeof value === "string" && value.trim()) {
const trimmed = value.trim();
const candidate = Number(trimmed);
if (!Number.isNaN(candidate)) return candidate;
}
return undefined;
};
const parseNumericValue = (value) => {
if (value === null || value === undefined) return undefined;
if (typeof value === "number" && Number.isFinite(value)) return value;
if (typeof value === "string") {
const trimmed = value.trim();
if (!trimmed) return undefined;
const direct = Number(trimmed);
if (!Number.isNaN(direct)) return direct;
const compact = trimmed.replace(/\s+/g, "");
if (!compact || !/^[-+]?[0-9.,]+$/.test(compact)) return undefined;
const commaCount = (compact.match(/,/g) || []).length;
const dotCount = (compact.match(/\./g) || []).length;
if (commaCount && dotCount) {
const lastComma = compact.lastIndexOf(",");
const lastDot = compact.lastIndexOf(".");
if (lastComma > lastDot) {
const asDecimal = compact.replace(/\./g, "").replace(/,/g, ".");
const parsed = Number(asDecimal);
return Number.isNaN(parsed) ? undefined : parsed;
}
const asThousands = compact.replace(/,/g, "");
const parsed = Number(asThousands);
return Number.isNaN(parsed) ? undefined : parsed;
}
if (commaCount) {
const parts = compact.split(",");
if (commaCount === 1 && parts[1]?.length <= 2) {
const parsed = Number(compact.replace(",", "."));
if (!Number.isNaN(parsed)) return parsed;
}
const isGrouped = parts.length > 1 && parts.slice(1).every((part) => part.length === 3);
if (isGrouped) {
const parsed = Number(compact.replace(/,/g, ""));
if (!Number.isNaN(parsed)) return parsed;
}
return undefined;
}
if (dotCount) {
const parts = compact.split(".");
if (dotCount === 1 && parts[1]?.length <= 2) {
const parsed = Number(compact);
if (!Number.isNaN(parsed)) return parsed;
}
const isGrouped = parts.length > 1 && parts.slice(1).every((part) => part.length === 3);
if (isGrouped) {
const parsed = Number(compact.replace(/\./g, ""));
if (!Number.isNaN(parsed)) return parsed;
}
const parsed = Number(compact);
return Number.isNaN(parsed) ? undefined : parsed;
}
const parsed = Number(compact);
return Number.isNaN(parsed) ? undefined : parsed;
}
if (typeof value === "object" && value !== null && "props" in value) {
return undefined;
}
return undefined;
};
const evaluateNumericRule = (value, rule) => {
if (!rule || typeof rule !== "object") return false;
const operator = rule.when && NUMERIC_OPERATORS[rule.when];
const numericValue = toNumber(rule.value);
if (operator && numericValue !== undefined) {
const passes = operator(value, numericValue);
return rule.negate ? !passes : passes;
}
if (rule.when === "between") {
const min = toNumber(rule.min ?? rule.value?.min);
const max = toNumber(rule.max ?? rule.value?.max);
if (min === undefined && max === undefined) return false;
const lowerBound = min ?? Number.NEGATIVE_INFINITY;
const upperBound = max ?? Number.POSITIVE_INFINITY;
const passes = value >= lowerBound && value <= upperBound;
return rule.negate ? !passes : passes;
}
if (rule.when === "outside") {
const min = toNumber(rule.min ?? rule.value?.min);
const max = toNumber(rule.max ?? rule.value?.max);
if (min === undefined && max === undefined) return false;
const passes = value < (min ?? Number.NEGATIVE_INFINITY) || value > (max ?? Number.POSITIVE_INFINITY);
return rule.negate ? !passes : passes;
}
return false;
};
const evaluateStringRule = (value, rule) => {
if (!rule || typeof rule !== "object") return false;
if (rule.when === "regex" && typeof rule.value === "string") {
try {
const flags = rule.flags || (rule.caseSensitive ? "" : "i");
const regex = new RegExp(rule.value, flags);
const passes = regex.test(value);
return rule.negate ? !passes : passes;
} catch (error) {
return false;
}
}
const operator = rule.when && STRING_OPERATORS[rule.when];
if (!operator || typeof rule.value !== "string") return false;
const passes = operator(value, rule.value, Boolean(rule.caseSensitive));
return rule.negate ? !passes : passes;
};
const ensureArray = (value) => {
if (Array.isArray(value)) return value;
if (value === undefined || value === null) return [];
return [value];
};
const findHighlightLevel = (ruleSet, numericValue, stringValue) => {
const { numeric, string } = ruleSet;
if (numeric && numericValue !== undefined) {
const numericRules = ensureArray(numeric);
const numericCandidates = Array.isArray(numericValue) ? numericValue : [numericValue];
for (const candidate of numericCandidates) {
for (const rule of numericRules) {
if (rule?.level && evaluateNumericRule(candidate, rule)) {
return { level: rule.level, source: "numeric", rule };
}
}
}
}
if (string && stringValue !== undefined) {
const stringRules = ensureArray(string);
for (const rule of stringRules) {
if (rule?.level && evaluateStringRule(stringValue, rule)) {
return { level: rule.level, source: "string", rule };
}
}
}
return null;
};
export const evaluateHighlight = (fieldKey, value, highlightConfig) => {
if (!highlightConfig || !fieldKey) return null;
const { fields } = highlightConfig;
if (!fields || typeof fields !== "object") return null;
const ruleSet = fields[fieldKey];
if (!ruleSet) return null;
const numericValue = parseNumericValue(value);
let stringValue;
if (typeof value === "string") {
stringValue = value;
} else if (typeof value === "number" || typeof value === "bigint") {
stringValue = String(value);
} else if (typeof value === "boolean") {
stringValue = value ? "true" : "false";
}
const normalizedString = typeof stringValue === "string" ? stringValue.trim() : stringValue;
return findHighlightLevel(ruleSet, numericValue, normalizedString);
};
export const getHighlightClass = (level, highlightConfig) => {
if (!level || !highlightConfig) return undefined;
return highlightConfig.levels?.[level];
};
export const getDefaultHighlightLevels = () => DEFAULT_LEVEL_CLASSES;

View File

@@ -24,11 +24,10 @@ function buildResponse(plans) {
plans.forEach((plan) => { plans.forEach((plan) => {
const statuses = plan?.recentBackups?.status; const statuses = plan?.recentBackups?.status;
// See https://github.com/garethgeorge/backrest/blob/4357295a17cb2e71639473c9929a060c4dd1b624/proto/v1/operations.proto#L78-L87
if (Array.isArray(statuses) && statuses.length > 0) { if (Array.isArray(statuses) && statuses.length > 0) {
if (statuses[0] === "STATUS_SUCCESS") { if (statuses[0] === "STATUS_SUCCESS") {
numSuccessLatest++; numSuccessLatest++;
} else if (statuses[0] === "STATUS_ERROR") { } else {
numFailureLatest++; numFailureLatest++;
} }
} }

View File

@@ -106,19 +106,13 @@ export default function Integration({ config, params, setEvents, hideErrors, tim
}; };
const eventsToAdd = []; const eventsToAdd = [];
events.forEach((event) => { events.forEach((event, index) => {
const occurrences = getOcurrencesFromRange(event); const occurrences = getOcurrencesFromRange(event);
occurrences.forEach((icalDate) => { occurrences.forEach((icalDate) => {
const date = icalDate.toJSDate(); const date = icalDate.toJSDate();
const occurrenceTimestamp = date.getTime(); const hash = simpleHash(`${event.id}-${event.title}-${index}-${date.toString()}`);
const eventIdentifier =
event.id ??
simpleHash(
`${event.title ?? ""}-${event.type ?? ""}-${event.status ?? ""}-${event.url ?? ""}-${event.location ?? ""}`,
);
const hash = simpleHash(`${eventIdentifier}-${occurrenceTimestamp}`);
let title = event.title; let title = event.title;
if (showName) { if (showName) {

View File

@@ -205,14 +205,13 @@ export default function Component({ service }) {
const { t } = useTranslation(); const { t } = useTranslation();
const { widget } = service; const { widget } = service;
const enableNowPlaying = service.widget?.enableNowPlaying ?? true;
const { const {
data: sessionsData, data: sessionsData,
error: sessionsError, error: sessionsError,
mutate: sessionMutate, mutate: sessionMutate,
} = useWidgetAPI(widget, enableNowPlaying ? "Sessions" : "", { } = useWidgetAPI(widget, "Sessions", {
refreshInterval: enableNowPlaying ? 5000 : undefined, refreshInterval: 5000,
}); });
const { data: countData, error: countError } = useWidgetAPI(widget, "Count", { const { data: countData, error: countError } = useWidgetAPI(widget, "Count", {
@@ -240,12 +239,13 @@ export default function Component({ service }) {
} }
const enableBlocks = service.widget?.enableBlocks; const enableBlocks = service.widget?.enableBlocks;
const enableNowPlaying = service.widget?.enableNowPlaying ?? true;
const enableMediaControl = service.widget?.enableMediaControl !== false; // default is true const enableMediaControl = service.widget?.enableMediaControl !== false; // default is true
const enableUser = !!service.widget?.enableUser; // default is false const enableUser = !!service.widget?.enableUser; // default is false
const expandOneStreamToTwoRows = service.widget?.expandOneStreamToTwoRows !== false; // default is true const expandOneStreamToTwoRows = service.widget?.expandOneStreamToTwoRows !== false; // default is true
const showEpisodeNumber = !!service.widget?.showEpisodeNumber; // default is false const showEpisodeNumber = !!service.widget?.showEpisodeNumber; // default is false
if ((enableNowPlaying && !sessionsData) || !countData) { if (!sessionsData || !countData) {
return ( return (
<> <>
{enableBlocks && <CountBlocks service={service} countData={null} />} {enableBlocks && <CountBlocks service={service} countData={null} />}

View File

@@ -14,12 +14,6 @@ export default function Component({ service }) {
return <Container service={service} error={resultError} />; return <Container service={service} error={resultError} />;
} }
if (!widget.fields || widget.fields.length === 0) {
widget.fields = ["online", "offline", "offline_alt", "total"];
} else if (widget.fields.length > 4) {
widget.fields = widget.fields.slice(0, 4);
}
if (!resultData) { if (!resultData) {
return ( return (
<Container service={service}> <Container service={service}>

View File

@@ -27,7 +27,7 @@ export default function Component({ service }) {
useEffect(() => { useEffect(() => {
if (data) { if (data) {
setDataPoints((prevDataPoints) => { setDataPoints((prevDataPoints) => {
const newDataPoints = [...prevDataPoints, { a: data.used, b: data.available }]; const newDataPoints = [...prevDataPoints, { a: data.used, b: data.free }];
if (newDataPoints.length > pointsLimit) { if (newDataPoints.length > pointsLimit) {
newDataPoints.shift(); newDataPoints.shift();
} }
@@ -67,10 +67,10 @@ export default function Component({ service }) {
{data && !error && ( {data && !error && (
<Block position="bottom-3 left-3"> <Block position="bottom-3 left-3">
{data.available && chart && ( {data.free && chart && (
<div className="text-xs opacity-50"> <div className="text-xs opacity-50">
{t("common.bytes", { {t("common.bytes", {
value: data.available, value: data.free,
maximumFractionDigits: 1, maximumFractionDigits: 1,
binary: true, binary: true,
})}{" "} })}{" "}
@@ -93,10 +93,10 @@ export default function Component({ service }) {
{!chart && ( {!chart && (
<Block position="top-3 right-3"> <Block position="top-3 right-3">
{data.available && ( {data.free && (
<div className="text-xs opacity-50"> <div className="text-xs opacity-50">
{t("common.bytes", { {t("common.bytes", {
value: data.available, value: data.free,
maximumFractionDigits: 1, maximumFractionDigits: 1,
binary: true, binary: true,
})}{" "} })}{" "}

View File

@@ -32,7 +32,7 @@ export default function Component({ service }) {
if ( if (
(!widget.showStacks && !containersData) || (!widget.showStacks && !containersData) ||
(widget.showSummary && (!containersData || !stacksData || !serversData)) || (widget.showSummary && (!stacksData || !serversData)) ||
(widget.showStacks && !stacksData) (widget.showStacks && !stacksData)
) { ) {
return widget.showSummary ? ( return widget.showSummary ? (

View File

@@ -33,6 +33,14 @@ export default function Component({ service }) {
return ( return (
<Container service={service}> <Container service={service}>
<Block
label="myspeed.ping"
value={t("common.ms", {
value: data[0].ping,
style: "unit",
unit: "millisecond",
})}
/>
<Block <Block
label="myspeed.download" label="myspeed.download"
value={t("common.bitrate", { value={t("common.bitrate", {
@@ -47,14 +55,6 @@ export default function Component({ service }) {
decimals: 2, decimals: 2,
})} })}
/> />
<Block
label="myspeed.ping"
value={t("common.ms", {
value: data[0].ping,
style: "unit",
unit: "millisecond",
})}
/>
</Container> </Container>
); );
} }

View File

@@ -66,7 +66,7 @@ export default async function omadaProxyHandler(req, res) {
const controllerVersionMajor = parseInt(controllerVersion.split(".")[0], 10); const controllerVersionMajor = parseInt(controllerVersion.split(".")[0], 10);
if (![3, 4, 5, 6].includes(controllerVersionMajor)) { if (![3, 4, 5].includes(controllerVersionMajor)) {
return res.status(500).json({ error: { message: "Error determining controller version", data } }); return res.status(500).json({ error: { message: "Error determining controller version", data } });
} }
@@ -80,7 +80,6 @@ export default async function omadaProxyHandler(req, res) {
loginUrl = `${url}/api/v2/login`; loginUrl = `${url}/api/v2/login`;
break; break;
case 5: case 5:
case 6:
loginUrl = `${url}/${cId}/api/v2/login`; loginUrl = `${url}/${cId}/api/v2/login`;
break; break;
default: default:
@@ -123,7 +122,6 @@ export default async function omadaProxyHandler(req, res) {
sitesUrl = `${url}/api/v2/sites?token=${token}&currentPage=1&currentPageSize=1000`; sitesUrl = `${url}/api/v2/sites?token=${token}&currentPage=1&currentPageSize=1000`;
break; break;
case 5: case 5:
case 6:
sitesUrl = `${url}/${cId}/api/v2/sites?token=${token}&currentPage=1&currentPageSize=1000`; sitesUrl = `${url}/${cId}/api/v2/sites?token=${token}&currentPage=1&currentPageSize=1000`;
break; break;
default: default:
@@ -209,8 +207,8 @@ export default async function omadaProxyHandler(req, res) {
connectedAp = siteResponseData.result.connectedAp; connectedAp = siteResponseData.result.connectedAp;
activeUser = siteResponseData.result.activeUser; activeUser = siteResponseData.result.activeUser;
alerts = siteResponseData.result.alerts; alerts = siteResponseData.result.alerts;
} else if ([4, 5, 6].includes(controllerVersionMajor)) { } else if (controllerVersionMajor === 4 || controllerVersionMajor === 5) {
const siteName = controllerVersionMajor > 4 ? site.id : site.key; const siteName = controllerVersionMajor === 5 ? site.id : site.key;
const siteStatsUrl = const siteStatsUrl =
controllerVersionMajor === 4 controllerVersionMajor === 4
? `${url}/api/v2/sites/${siteName}/dashboard/overviewDiagram?token=${token}&currentPage=1&currentPageSize=1000` ? `${url}/api/v2/sites/${siteName}/dashboard/overviewDiagram?token=${token}&currentPage=1&currentPageSize=1000`

View File

@@ -80,11 +80,6 @@ export default function Component({ service }) {
timeLeft={t("common.duration", { value: queueEntry.eta })} timeLeft={t("common.duration", { value: queueEntry.eta })}
title={queueEntry.name} title={queueEntry.name}
activity={queueEntry.state} activity={queueEntry.state}
size={
widget?.enableLeechSize
? t("common.bbytes", { value: queueEntry.size, maximumFractionDigits: 1 })
: undefined
}
key={`${queueEntry.name}-${queueEntry.amount_left}`} key={`${queueEntry.name}-${queueEntry.amount_left}`}
/> />
))} ))}

View File

@@ -52,7 +52,6 @@ export default function Component({ service }) {
let status; let status;
let uptime = 0; let uptime = 0;
let logIndex = 0; let logIndex = 0;
const hasLogs = Array.isArray(monitor.logs) && monitor.logs.length > 0;
switch (monitor.status) { switch (monitor.status) {
case 0: case 0:
@@ -63,7 +62,7 @@ export default function Component({ service }) {
break; break;
case 2: case 2:
status = t("uptimerobot.up"); status = t("uptimerobot.up");
uptime = t("common.duration", { value: hasLogs ? monitor.logs[0].duration : 0 }); uptime = t("common.duration", { value: monitor.logs[0].duration });
logIndex = 1; logIndex = 1;
break; break;
case 8: case 8:
@@ -77,14 +76,14 @@ export default function Component({ service }) {
break; break;
} }
const lastDown = hasLogs ? new Date(monitor.logs[logIndex].datetime * 1000).toLocaleString() : ""; const lastDown = new Date(monitor.logs[logIndex].datetime * 1000).toLocaleString();
const downDuration = t("common.duration", { value: hasLogs ? monitor.logs[logIndex].duration : 0 }); const downDuration = t("common.duration", { value: monitor.logs[logIndex].duration });
const hideDown = !hasLogs || (logIndex === 1 && monitor.logs[logIndex].type !== 1); const hideDown = logIndex === 1 && monitor.logs[logIndex].type !== 1;
return ( return (
<Container service={service}> <Container service={service}>
<Block label="uptimerobot.status" value={status} /> <Block label="uptimerobot.status" value={status} />
{hasLogs && <Block label="uptimerobot.uptime" value={uptime} />} <Block label="uptimerobot.uptime" value={uptime} />
{!hideDown && <Block label="uptimerobot.lastDown" value={lastDown} />} {!hideDown && <Block label="uptimerobot.lastDown" value={lastDown} />}
{!hideDown && <Block label="uptimerobot.downDuration" value={downDuration} />} {!hideDown && <Block label="uptimerobot.downDuration" value={downDuration} />}
</Container> </Container>