From bfd392026dbf8b4296aa6193d2e99e718e456ece Mon Sep 17 00:00:00 2001 From: brikim Date: Fri, 12 Apr 2024 22:33:40 -0500 Subject: [PATCH 01/14] Enhancement: option to show user for Tautulli and Emby/Jellyfin widgets (#3287) --------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com> --- docs/widgets/services/emby.md | 1 + docs/widgets/services/plex-tautulli.md | 1 + src/utils/config/service-helpers.js | 11 +++++++++++ src/widgets/emby/component.jsx | 11 +++++++++-- src/widgets/tautulli/component.jsx | 25 +++++++++++++++++-------- 5 files changed, 39 insertions(+), 10 deletions(-) diff --git a/docs/widgets/services/emby.md b/docs/widgets/services/emby.md index f262bfc6..1d70fdf3 100644 --- a/docs/widgets/services/emby.md +++ b/docs/widgets/services/emby.md @@ -16,4 +16,5 @@ widget: key: apikeyapikeyapikeyapikeyapikey enableBlocks: true # optional, defaults to false enableNowPlaying: true # optional, defaults to true + enableUser: true # optional, defaults to false ``` diff --git a/docs/widgets/services/plex-tautulli.md b/docs/widgets/services/plex-tautulli.md index b88f6eeb..cce45fc3 100644 --- a/docs/widgets/services/plex-tautulli.md +++ b/docs/widgets/services/plex-tautulli.md @@ -14,4 +14,5 @@ widget: type: tautulli url: http://tautulli.host.or.ip key: apikeyapikeyapikeyapikeyapikey + enableUser: true # optional, defaults to false ``` diff --git a/src/utils/config/service-helpers.js b/src/utils/config/service-helpers.js index d6552253..7fb81088 100644 --- a/src/utils/config/service-helpers.js +++ b/src/utils/config/service-helpers.js @@ -393,6 +393,9 @@ export function cleanServiceGroups(groups) { enableBlocks, enableNowPlaying, + // emby, jellyfin, tautulli + enableUser, + // glances, pihole version, @@ -517,6 +520,14 @@ export function cleanServiceGroups(groups) { if (["emby", "jellyfin"].includes(type)) { if (enableBlocks !== undefined) cleanedService.widget.enableBlocks = JSON.parse(enableBlocks); if (enableNowPlaying !== undefined) cleanedService.widget.enableNowPlaying = JSON.parse(enableNowPlaying); + if (enableUser !== undefined) { + cleanedService.widget.enableUser = !!JSON.parse(enableUser); + } + } + if (["tautulli"].includes(type)) { + if (enableUser !== undefined) { + cleanedService.widget.enableUser = !!JSON.parse(enableUser); + } } if (["sonarr", "radarr"].includes(type)) { if (enableQueue !== undefined) cleanedService.widget.enableQueue = JSON.parse(enableQueue); diff --git a/src/widgets/emby/component.jsx b/src/widgets/emby/component.jsx index 89fd44c3..f11a689d 100644 --- a/src/widgets/emby/component.jsx +++ b/src/widgets/emby/component.jsx @@ -27,10 +27,11 @@ function ticksToString(ticks) { return parts.map((part) => part.toString().padStart(2, "0")).join(":"); } -function SingleSessionEntry({ playCommand, session }) { +function SingleSessionEntry({ playCommand, session, enableUser }) { const { NowPlayingItem: { Name, SeriesName }, PlayState: { PositionTicks, IsPaused, IsMuted }, + UserName, } = session; const RunTimeTicks = @@ -49,6 +50,7 @@ function SingleSessionEntry({ playCommand, session }) {
{Name} {SeriesName && ` - ${SeriesName}`} + {enableUser && ` (${UserName})`}
@@ -97,10 +99,11 @@ function SingleSessionEntry({ playCommand, session }) { ); } -function SessionEntry({ playCommand, session }) { +function SessionEntry({ playCommand, session, enableUser }) { const { NowPlayingItem: { Name, SeriesName }, PlayState: { PositionTicks, IsPaused, IsMuted }, + UserName, } = session; const RunTimeTicks = @@ -142,6 +145,7 @@ function SessionEntry({ playCommand, session }) {
{Name} {SeriesName && ` - ${SeriesName}`} + {enableUser && ` (${UserName})`}
{IsMuted && }
@@ -215,6 +219,7 @@ export default function Component({ service }) { const enableBlocks = service.widget?.enableBlocks; const enableNowPlaying = service.widget?.enableNowPlaying ?? true; + const enableUser = !!service.widget?.enableUser; if (!sessionsData || !countData) { return ( @@ -272,6 +277,7 @@ export default function Component({ service }) { handlePlayCommand(currentSession, command)} session={session} + enableUser={enableUser} /> @@ -288,6 +294,7 @@ export default function Component({ service }) { key={session.Id} playCommand={(currentSession, command) => handlePlayCommand(currentSession, command)} session={session} + enableUser={enableUser} /> ))} diff --git a/src/widgets/tautulli/component.jsx b/src/widgets/tautulli/component.jsx index e1a4df00..d224391b 100644 --- a/src/widgets/tautulli/component.jsx +++ b/src/widgets/tautulli/component.jsx @@ -25,14 +25,18 @@ function millisecondsToString(milliseconds) { return parts.map((part) => part.toString().padStart(2, "0")).join(":"); } -function SingleSessionEntry({ session }) { - const { full_title, duration, view_offset, progress_percent, state, video_decision, audio_decision } = session; +function SingleSessionEntry({ session, enableUser }) { + const { full_title, duration, view_offset, progress_percent, state, video_decision, audio_decision, username } = + session; return ( <>
-
{full_title}
+
+ {full_title} + {enableUser && ` (${username})`} +
{video_decision === "direct play" && audio_decision === "direct play" && ( @@ -74,8 +78,8 @@ function SingleSessionEntry({ session }) { ); } -function SessionEntry({ session }) { - const { full_title, view_offset, progress_percent, state, video_decision, audio_decision } = session; +function SessionEntry({ session, enableUser }) { + const { full_title, view_offset, progress_percent, state, video_decision, audio_decision, username } = session; return (
@@ -94,7 +98,10 @@ function SessionEntry({ session }) { )}
-
{full_title}
+
+ {full_title} + {enableUser && ` (${username})`} +
{video_decision === "direct play" && audio_decision === "direct play" && ( @@ -162,11 +169,13 @@ export default function Component({ service }) { ); } + const enableUser = !!service.widget?.enableUser; + if (playing.length === 1) { const session = playing[0]; return (
- +
); } @@ -174,7 +183,7 @@ export default function Component({ service }) { return (
{playing.map((session) => ( - + ))}
); From 2c68f1e7eee3c017add19d1b9279f91bd6654b9a Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Mon, 15 Apr 2024 15:59:30 +0300 Subject: [PATCH 02/14] place carbon ads in docs (#3296) * place carbon ads in docs * fix lint * keep 4 space tabs --- docs/overrides/main.html | 9 +++++++++ docs/stylesheets/extra.css | 8 ++++++++ mkdocs.yml | 1 + 3 files changed, 18 insertions(+) create mode 100644 docs/overrides/main.html diff --git a/docs/overrides/main.html b/docs/overrides/main.html new file mode 100644 index 00000000..bf62d43a --- /dev/null +++ b/docs/overrides/main.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} + +{% block content %} + {% include "partials/content.html" %} +
+
+ +
+{% endblock %} diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index e6bc9bf0..8ff306a3 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -22,3 +22,11 @@ #glimeRoot * { font-family: var(--md-text-font) !important; } + +#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; +} diff --git a/mkdocs.yml b/mkdocs.yml index e58cb1e4..561e0555 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -166,6 +166,7 @@ nav: theme: name: material + custom_dir: docs/overrides language: en palette: - media: "(prefers-color-scheme)" From 60098d3909408a65a32dd5cc6d4fca63d42b94b5 Mon Sep 17 00:00:00 2001 From: Ben Phelps Date: Mon, 15 Apr 2024 22:20:39 +0300 Subject: [PATCH 03/14] Docs: move Carbon ads to sidebar (#3302) --- docs/overrides/main.html | 50 +++++++++++++++++++++++++++++++++----- docs/stylesheets/extra.css | 4 +++ mkdocs.yml | 4 ++- 3 files changed, 51 insertions(+), 7 deletions(-) diff --git a/docs/overrides/main.html b/docs/overrides/main.html index bf62d43a..e1174193 100644 --- a/docs/overrides/main.html +++ b/docs/overrides/main.html @@ -1,9 +1,47 @@ {% extends "base.html" %} -{% block content %} - {% include "partials/content.html" %} -
-
- -
+{% block site_nav %} + + {% if nav %} + {% if page.meta and page.meta.hide %} + {% set hidden = "hidden" if "navigation" in page.meta.hide %} + {% endif %} + + {% endif %} + + + {% if "toc.integrate" not in features %} + {% if page.meta and page.meta.hide %} + {% set hidden = "hidden" if "toc" in page.meta.hide %} + {% endif %} + + {% endif %} {% endblock %} diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index 8ff306a3..56ed77c8 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -23,6 +23,10 @@ font-family: var(--md-text-font) !important; } +#carbonads { + margin-top: 10px; +} + #carbon-responsive { --carbon-padding: 1em; --carbon-max-char: 20ch; diff --git a/mkdocs.yml b/mkdocs.yml index 561e0555..6c666892 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -90,6 +90,7 @@ nav: - 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 @@ -100,12 +101,12 @@ nav: - 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/pialert.md - widgets/services/pihole.md - widgets/services/plantit.md - widgets/services/plex-tautulli.md @@ -130,6 +131,7 @@ nav: - widgets/services/stash.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 From 034f6d29d683ef023968ca70eaf8bf6f4ee530d0 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 15 Apr 2024 12:53:15 -0700 Subject: [PATCH 04/14] Docs: show carbon ads on more pages too --- docs/overrides/main.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/overrides/main.html b/docs/overrides/main.html index e1174193..0a5f2bc5 100644 --- a/docs/overrides/main.html +++ b/docs/overrides/main.html @@ -15,7 +15,7 @@
{% include "partials/nav.html" %} - {% if 'widgets/' not in page.url %} + {% if 'widgets/' not in page.url and 'more/' not in page.url %} {% endif %}
@@ -34,10 +34,10 @@ data-md-type="toc" {{ hidden }} > -
+
{% include "partials/toc.html" %} - {% if 'widgets/' in page.url %} + {% if 'widgets/' in page.url or 'more/' in page.url %} {% endif %}
From 303a62369f1b48d3380b4ef11b3727cd9264898c Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue, 16 Apr 2024 15:50:32 -0700 Subject: [PATCH 05/14] Fix: pihole `ads_percentage_today` sometimes returned as string (#3313) --- src/widgets/pihole/component.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/pihole/component.jsx b/src/widgets/pihole/component.jsx index 4d95b4ac..7aa706e4 100644 --- a/src/widgets/pihole/component.jsx +++ b/src/widgets/pihole/component.jsx @@ -32,7 +32,7 @@ export default function Component({ service }) { let blockedValue = `${t("common.number", { value: parseInt(piholeData.ads_blocked_today, 10) })}`; if (!widget.fields.includes("blocked_percent")) { - blockedValue += ` (${t("common.percent", { value: parseFloat(piholeData.ads_percentage_today.toPrecision(3)) })})`; + blockedValue += ` (${t("common.percent", { value: parseFloat(piholeData.ads_percentage_today).toPrecision(3) })})`; } return ( @@ -41,7 +41,7 @@ export default function Component({ service }) { Date: Wed, 17 Apr 2024 01:42:55 -0700 Subject: [PATCH 06/14] New Crowdin translations by GitHub Action (#3270) Co-authored-by: Crowdin Bot --- public/locales/ca/common.json | 562 +++++++++++++++++----------------- public/locales/de/common.json | 2 +- public/locales/it/common.json | 48 +-- public/locales/sl/common.json | 8 +- public/locales/sv/common.json | 4 +- 5 files changed, 312 insertions(+), 312 deletions(-) diff --git a/public/locales/ca/common.json b/public/locales/ca/common.json index 382f5237..a431f9a4 100644 --- a/public/locales/ca/common.json +++ b/public/locales/ca/common.json @@ -14,7 +14,7 @@ "date": "{{value, date}}", "relativeDate": "{{value, relativeDate}}", "uptime": "{{value, uptime}}", - "months": "mo", + "months": "mes", "days": "d", "hours": "h", "minutes": "m", @@ -46,8 +46,8 @@ "used": "Utilitzat", "load": "Càrrega", "temp": "TEMP", - "max": "Max", - "uptime": "UP" + "max": "Màx.", + "uptime": "ACTIU" }, "unifi": { "users": "Usuaris", @@ -61,65 +61,65 @@ "wlan_devices": "Dispositius WLAN", "lan_users": "Usuaris LAN", "wlan_users": "Usuaris WLAN", - "up": "UP", + "up": "ACTIU", "down": "INACTIU", "wait": "Si us plau, espereu", - "empty_data": "Subsystem status unknown" + "empty_data": "Estat del subsistema desconegut" }, "docker": { "rx": "Rebut", "tx": "Transmès", "mem": "MEM", "cpu": "CPU", - "running": "Running", + "running": "En execució", "offline": "Fora de línia", "error": "Error", "unknown": "Desconegut", - "healthy": "Healthy", - "starting": "Starting", - "unhealthy": "Unhealthy", - "not_found": "Not Found", - "exited": "Exited", - "partial": "Partial" + "healthy": "Saludable", + "starting": "Iniciant", + "unhealthy": "No saludable", + "not_found": "No trobat", + "exited": "Tancat", + "partial": "Parcial" }, "ping": { "error": "Error", - "ping": "Ping", - "down": "Down", - "up": "Up", - "not_available": "Not Available" + "ping": "Latència", + "down": "Inactiu", + "up": "Actiu", + "not_available": "No Disponible" }, "siteMonitor": { - "http_status": "HTTP status", + "http_status": "Estat HTTP", "error": "Error", - "response": "Response", - "down": "Down", - "up": "Up", - "not_available": "Not Available" + "response": "Resposta", + "down": "Inactiu", + "up": "Actiu", + "not_available": "No Disponible" }, "emby": { "playing": "Reproduint", "transcoding": "Transcodificant", "bitrate": "Taxa de bits", "no_active": "Sense reproduccions actives", - "movies": "Movies", - "series": "Series", - "episodes": "Episodes", - "songs": "Songs" + "movies": "Pel·lícules", + "series": "Sèries", + "episodes": "Episodis", + "songs": "Cançons" }, "esphome": { "offline": "Fora de línia", "offline_alt": "Fora de línia", - "online": "Online", + "online": "En línia", "total": "Total", "unknown": "Desconegut" }, "evcc": { - "pv_power": "Production", - "battery_soc": "Battery", - "grid_power": "Grid", - "home_power": "Consumption", - "charge_power": "Charger", + "pv_power": "Producció", + "battery_soc": "Bateria", + "grid_power": "Xarxa", + "home_power": "Consum", + "charge_power": "Carregador", "watt_hour": "Wh" }, "flood": { @@ -129,55 +129,55 @@ "seed": "Llavor" }, "freshrss": { - "subscriptions": "Subscriptions", - "unread": "Unread" + "subscriptions": "Subcripcions", + "unread": "Sense llegir" }, "fritzbox": { "connectionStatus": "Estat", - "connectionStatusUnconfigured": "Unconfigured", - "connectionStatusConnecting": "Connecting", - "connectionStatusAuthenticating": "Authenticating", - "connectionStatusPendingDisconnect": "Pending Disconnect", - "connectionStatusDisconnecting": "Disconnecting", - "connectionStatusDisconnected": "Disconnected", - "connectionStatusConnected": "Connected", + "connectionStatusUnconfigured": "Sense configurar", + "connectionStatusConnecting": "Connectant", + "connectionStatusAuthenticating": "Autenticant", + "connectionStatusPendingDisconnect": "Desconnexió pendent", + "connectionStatusDisconnecting": "Desconnectant", + "connectionStatusDisconnected": "Desconnectat", + "connectionStatusConnected": "Connectat", "uptime": "Temps actiu", - "maxDown": "Max. Down", - "maxUp": "Max. Up", - "down": "Down", - "up": "Up", - "received": "Received", - "sent": "Sent", - "externalIPAddress": "Ext. IP" + "maxDown": "Màx. Descàrrega", + "maxUp": "Màx. Càrrega", + "down": "Inactiu", + "up": "Actiu", + "received": "Rebuts", + "sent": "Enviats", + "externalIPAddress": "IP ext." }, "caddy": { "upstreams": "Upstreams", - "requests": "Current requests", - "requests_failed": "Failed requests" + "requests": "Peticions actuals", + "requests_failed": "Peticions fallides" }, "changedetectionio": { "totalObserved": "Total d'observats", "diffsDetected": "Diferències detectades" }, "channelsdvrserver": { - "shows": "Shows", - "recordings": "Recordings", - "scheduled": "Scheduled", - "passes": "Passes" + "shows": "Sèries", + "recordings": "Gravacions", + "scheduled": "Programat", + "passes": "Aprovat" }, "tautulli": { "playing": "Reproduint", "transcoding": "Transcodificant", "bitrate": "Taxa de bits", "no_active": "Sense reproduccions actives", - "plex_connection_error": "Check Plex Connection" + "plex_connection_error": "Comprova la connexió de Plex" }, "omada": { - "connectedAp": "Connected APs", - "activeUser": "Active devices", - "alerts": "Alerts", - "connectedGateway": "Connected gateways", - "connectedSwitches": "Connected switches" + "connectedAp": "AP connectats", + "activeUser": "Dispositius actius", + "alerts": "Alertes", + "connectedGateway": "Pasarel·les connectades", + "connectedSwitches": "Conmutadors connectats" }, "nzbget": { "rate": "Taxa", @@ -187,7 +187,7 @@ "plex": { "streams": "Transmissions actives", "albums": "Àlbums", - "movies": "Movies", + "movies": "Pel·lícules", "tv": "Sèries" }, "sabnzbd": { @@ -213,12 +213,12 @@ "seed": "Llavor" }, "qnap": { - "cpuUsage": "CPU Usage", - "memUsage": "MEM Usage", - "systemTempC": "System Temp", - "poolUsage": "Pool Usage", - "volumeUsage": "Volume Usage", - "invalid": "Invalid" + "cpuUsage": "Ús de CPU", + "memUsage": "Ús de Memòria", + "systemTempC": "Temp. Sistema", + "poolUsage": "Ús de les Reserves", + "volumeUsage": "Ús dels Volums", + "invalid": "No vàlid" }, "deluge": { "download": "Descarregar", @@ -235,7 +235,7 @@ "sonarr": { "wanted": "Volgut", "queued": "En cua", - "series": "Series", + "series": "Sèries", "queue": "Cua", "unknown": "Desconegut" }, @@ -243,14 +243,14 @@ "wanted": "Volgut", "missing": "Faltant", "queued": "En cua", - "movies": "Movies", + "movies": "Pel·lícules", "queue": "Cua", "unknown": "Desconegut" }, "lidarr": { "wanted": "Volgut", "queued": "En cua", - "artists": "Artists" + "artists": "Artistes" }, "readarr": { "wanted": "Volgut", @@ -279,15 +279,15 @@ }, "netalertx": { "total": "Total", - "connected": "Connected", - "new_devices": "New Devices", - "down_alerts": "Down Alerts" + "connected": "Connectat", + "new_devices": "Nous dispositius", + "down_alerts": "Alertes de caigudes" }, "pihole": { "queries": "Consultes", "blocked": "Bloquejat", - "blocked_percent": "Blocked %", - "gravity": "Gravity" + "blocked_percent": "Bloquejat %", + "gravity": "Gravetat" }, "adguard": { "queries": "Consultes", @@ -298,37 +298,37 @@ "speedtest": { "upload": "Pujada", "download": "Descarregar", - "ping": "Ping" + "ping": "Latència" }, "portainer": { - "running": "Running", + "running": "En execució", "stopped": "Aturat", "total": "Total" }, "tailscale": { - "address": "Address", - "expires": "Expires", - "never": "Never", - "last_seen": "Last Seen", - "now": "Now", - "years": "{{number}}y", - "weeks": "{{number}}w", + "address": "Adreça", + "expires": "Caduca", + "never": "Mai", + "last_seen": "Vist per darrer cop", + "now": "Ara", + "years": "{{number}}a", + "weeks": "{{number}}set", "days": "{{number}}d", "hours": "{{number}}h", "minutes": "{{number}}m", "seconds": "{{number}}s", - "ago": "{{value}} Ago" + "ago": "Fa {{value}}" }, "tdarr": { "queue": "Cua", - "processed": "Processed", - "errored": "Errored", - "saved": "Saved" + "processed": "Processat", + "errored": "Error", + "saved": "Desat" }, "traefik": { "routers": "Encaminadors", "services": "Serveis", - "middleware": "Middleware" + "middleware": "Intermediari" }, "navidrome": { "nothing_streaming": "Sense reproduccions actives", @@ -360,7 +360,7 @@ }, "jackett": { "configured": "Configurat", - "errored": "Errored" + "errored": "Error" }, "strelaysrv": { "numActiveSessions": "Sessions", @@ -376,18 +376,18 @@ "medusa": { "wanted": "Volgut", "queued": "En cua", - "series": "Series" + "series": "Sèries" }, "minecraft": { - "players": "Players", - "version": "Version", + "players": "Jugadors", + "version": "Versió", "status": "Estat", - "up": "Online", + "up": "En línia", "down": "Fora de línia" }, "miniflux": { - "read": "Read", - "unread": "Unread" + "read": "Llegir", + "unread": "Sense llegir" }, "authentik": { "users": "Usuaris", @@ -406,28 +406,28 @@ "wait": "Si us plau, espereu", "temp": "TEMP", "_temp": "Temp", - "warn": "Warn", - "uptime": "UP", + "warn": "Avís", + "uptime": "ACTIU", "total": "Total", "free": "Lliure", "used": "Utilitzat", "days": "d", "hours": "h", - "crit": "Crit", - "read": "Read", - "write": "Write", + "crit": "Crític", + "read": "Llegir", + "write": "Escriure", "gpu": "GPU", "mem": "Mem", - "swap": "Swap" + "swap": "Intercanvi" }, "quicklaunch": { "bookmark": "Marcador", "service": "Servei", - "search": "Search", - "custom": "Custom", - "visit": "Visit", + "search": "Cercar", + "custom": "Personalitzat", + "visit": "Visitar", "url": "URL", - "searchsuggestion": "Suggestion" + "searchsuggestion": "Suggeriment" }, "wmo": { "0-day": "Assolellat", @@ -492,21 +492,21 @@ "updates": "Actualitzacions", "update_available": "Actualització disponible", "up_to_date": "Actualitzat", - "child_bridges": "Child Bridges", + "child_bridges": "Ponts fills", "child_bridges_status": "{{ok}}/{{total}}", - "up": "Up", + "up": "Actiu", "pending": "Pendent", - "down": "Down" + "down": "Inactiu" }, "healthchecks": { - "new": "New", - "up": "Up", - "grace": "In Grace Period", - "down": "Down", - "paused": "Paused", + "new": "Nou", + "up": "Actiu", + "grace": "En Període de gràcia", + "down": "Inactiu", + "paused": "En pausa", "status": "Estat", - "last_ping": "Last Ping", - "never": "No pings yet" + "last_ping": "Últim ping", + "never": "Sense pings" }, "watchtower": { "containers_scanned": "Escanejat", @@ -528,7 +528,7 @@ "truenas": { "load": "Càrrega del sistema", "uptime": "Temps actiu", - "alerts": "Alerts" + "alerts": "Alertes" }, "pyload": { "speed": "Velocitat", @@ -544,12 +544,12 @@ "hdhomerun": { "channels": "Canals", "hd": "HD", - "tunerCount": "Tuners", - "channelNumber": "Channel", - "channelNetwork": "Network", - "signalStrength": "Strength", - "signalQuality": "Quality", - "symbolQuality": "Quality", + "tunerCount": "Sintonitzadors", + "channelNumber": "Canal", + "channelNetwork": "Xarxa", + "signalStrength": "Intensitat", + "signalQuality": "Qualitat", + "symbolQuality": "Qualitat", "networkRate": "Taxa de bits", "clientIP": "Client" }, @@ -563,94 +563,94 @@ "total": "Total" }, "peanut": { - "battery_charge": "Battery Charge", - "ups_load": "UPS Load", - "ups_status": "UPS Status", - "online": "Online", - "on_battery": "On Battery", - "low_battery": "Low Battery" + "battery_charge": "Càrrega de la bateria", + "ups_load": "Càrrega del SAI", + "ups_status": "Estat del SAI", + "online": "En línia", + "on_battery": "En Bateria", + "low_battery": "Bateria Baixa" }, "nextdns": { "wait": "Espereu si us plau", - "no_devices": "No Device Data Received" + "no_devices": "No s'han rebut dades del Dispositiu" }, "mikrotik": { - "cpuLoad": "CPU Load", - "memoryUsed": "Memory Used", + "cpuLoad": "Càrrega de CPU", + "memoryUsed": "Memoria en ús", "uptime": "Temps actiu", - "numberOfLeases": "Leases" + "numberOfLeases": "IPs assignades" }, "xteve": { - "streams_all": "All Streams", + "streams_all": "Tots els fluxos", "streams_active": "Transmissions actives", - "streams_xepg": "XEPG Channels" + "streams_xepg": "Canals XEPG" }, "opendtu": { - "yieldDay": "Today", - "absolutePower": "Power", - "relativePower": "Power %", - "limit": "Limit" + "yieldDay": "Avui", + "absolutePower": "Potència", + "relativePower": "Potència %", + "limit": "Límit" }, "opnsense": { - "cpu": "CPU Load", - "memory": "Active Memory", - "wanUpload": "WAN Upload", - "wanDownload": "WAN Download" + "cpu": "Càrrega de CPU", + "memory": "Memòria activa", + "wanUpload": "Pujada WAN", + "wanDownload": "Baixada WAN" }, "moonraker": { - "printer_state": "Printer State", - "print_status": "Print Status", + "printer_state": "Estat de l'impressora", + "print_status": "Estat de l'impressió", "print_progress": "Progress", - "layers": "Layers" + "layers": "Capes" }, "octoprint": { "printer_state": "Estat", - "temp_tool": "Tool temp", - "temp_bed": "Bed temp", - "job_completion": "Completion" + "temp_tool": "Temperatura capçal", + "temp_bed": "Temperatura llit", + "job_completion": "Finalització" }, "cloudflared": { - "origin_ip": "Origin IP", + "origin_ip": "IP Origen", "status": "Estat" }, "pfsense": { - "load": "Load Avg", - "memory": "Mem Usage", - "wanStatus": "WAN Status", - "up": "Up", - "down": "Down", + "load": "Promig Càrrega", + "memory": "Ús Memòria", + "wanStatus": "Estat WAN", + "up": "Actiu", + "down": "Inactiu", "temp": "Temp", - "disk": "Disk Usage", + "disk": "Ús Disc", "wanIP": "WAN IP" }, "proxmoxbackupserver": { "datastore_usage": "Datastore", - "failed_tasks_24h": "Failed Tasks 24h", + "failed_tasks_24h": "Tasques fallides (24h)", "cpu_usage": "CPU", - "memory_usage": "Memory" + "memory_usage": "Memòria" }, "immich": { "users": "Usuaris", - "photos": "Photos", + "photos": "Fotos", "videos": "Vídeos", - "storage": "Storage" + "storage": "Emmagatzematge" }, "uptimekuma": { - "up": "Sites Up", - "down": "Sites Down", + "up": "Actius", + "down": "Caiguts", "uptime": "Temps actiu", - "incident": "Incident", + "incident": "Incidència", "m": "m" }, "atsumeru": { - "series": "Series", - "archives": "Archives", - "chapters": "Chapters", + "series": "Sèries", + "archives": "Arxius", + "chapters": "Capítols", "categories": "Categories" }, "komga": { - "libraries": "Libraries", - "series": "Series", + "libraries": "Biblioteques", + "series": "Sèries", "books": "Llibres" }, "diskstation": { @@ -659,77 +659,77 @@ "volumeAvailable": "Disponible" }, "mylar": { - "series": "Series", - "issues": "Issues", + "series": "Sèries", + "issues": "Problemes", "wanted": "Volgut" }, "photoprism": { "albums": "Àlbums", - "photos": "Photos", + "photos": "Fotos", "videos": "Vídeos", - "people": "People" + "people": "Gent" }, "fileflows": { "queue": "Cua", "processing": "Processant", - "processed": "Processed", - "time": "Time" + "processed": "Processat", + "time": "Temps" }, "grafana": { - "dashboards": "Dashboards", - "datasources": "Data Sources", - "totalalerts": "Total Alerts", - "alertstriggered": "Alerts Triggered" + "dashboards": "Taulells", + "datasources": "Origen de dades", + "totalalerts": "Alertes Totals", + "alertstriggered": "Alertes disparades" }, "nextcloud": { - "cpuload": "Cpu Load", - "memoryusage": "Memory Usage", - "freespace": "Free Space", - "activeusers": "Active Users", - "numfiles": "Files", - "numshares": "Shared Items" + "cpuload": "Càrrega de CPU", + "memoryusage": "Ús Memòria", + "freespace": "Espai lliure", + "activeusers": "Usuaris actius", + "numfiles": "Fitxers", + "numshares": "Elements compartits" }, "kopia": { "status": "Estat", - "size": "Size", - "lastrun": "Last Run", - "nextrun": "Next Run", + "size": "Mida", + "lastrun": "Darrera execució", + "nextrun": "Següent execució", "failed": "Error" }, "unmanic": { - "active_workers": "Active Workers", - "total_workers": "Total Workers", - "records_total": "Queue Length" + "active_workers": "Treballadors actius", + "total_workers": "Treballadors Totals", + "records_total": "Llargada de la Cua" }, "pterodactyl": { - "servers": "Servers", + "servers": "Servidors", "nodes": "Nodes" }, "prometheus": { - "targets_up": "Targets Up", - "targets_down": "Targets Down", - "targets_total": "Total Targets" + "targets_up": "Objectius actius", + "targets_down": "Objectius caiguts", + "targets_total": "Objectius Totals" }, "gatus": { - "up": "Sites Up", - "down": "Sites Down", + "up": "Actius", + "down": "Caiguts", "uptime": "Temps actiu" }, "ghostfolio": { - "gross_percent_today": "Today", - "gross_percent_1y": "One year", - "gross_percent_max": "All time" + "gross_percent_today": "Avui", + "gross_percent_1y": "Un any", + "gross_percent_max": "Tot" }, "audiobookshelf": { "podcasts": "Podcasts", "books": "Llibres", - "podcastsDuration": "Duration", - "booksDuration": "Duration" + "podcastsDuration": "Durada", + "booksDuration": "Durada" }, "homeassistant": { - "people_home": "People Home", - "lights_on": "Lights On", - "switches_on": "Switches On" + "people_home": "Gent a casa", + "lights_on": "Llums enceses", + "switches_on": "Endolls activats" }, "whatsupdocker": { "monitoring": "Supervisió", @@ -737,144 +737,144 @@ }, "calibreweb": { "books": "Llibres", - "authors": "Authors", + "authors": "Autors", "categories": "Categories", - "series": "Series" + "series": "Sèries" }, "jdownloader": { "downloadCount": "Cua", "downloadBytesRemaining": "Restant", - "downloadTotalBytes": "Size", + "downloadTotalBytes": "Mida", "downloadSpeed": "Velocitat" }, "kavita": { - "seriesCount": "Series", - "totalFiles": "Files" + "seriesCount": "Sèries", + "totalFiles": "Fitxers" }, "azuredevops": { - "result": "Result", + "result": "Resultat", "status": "Estat", - "buildId": "Build ID", - "succeeded": "Succeeded", - "notStarted": "Not Started", + "buildId": "Id de compilació", + "succeeded": "Amb èxit", + "notStarted": "No Iniciat", "failed": "Error", - "canceled": "Canceled", - "inProgress": "In Progress", - "totalPrs": "Total PRs", - "myPrs": "My PRs", + "canceled": "Cancel·lat", + "inProgress": "En curs", + "totalPrs": "RP Totals", + "myPrs": "Els meus RP", "approved": "Aprovat" }, "gamedig": { "status": "Estat", - "online": "Online", + "online": "En línia", "offline": "Fora de línia", - "name": "Name", - "map": "Map", - "currentPlayers": "Current players", - "players": "Players", - "maxPlayers": "Max players", + "name": "Nom", + "map": "Mapa", + "currentPlayers": "Jugadors actuals", + "players": "Jugadors", + "maxPlayers": "Màxim de jugadors", "bots": "Bots", - "ping": "Ping" + "ping": "Latència" }, "urbackup": { "ok": "Ok", "errored": "Errors", - "noRecent": "Out of Date", - "totalUsed": "Used Storage" + "noRecent": "Obsolet", + "totalUsed": "Emmagatzematge utilitzat" }, "mealie": { - "recipes": "Recipes", + "recipes": "Receptes", "users": "Usuaris", "categories": "Categories", - "tags": "Tags" + "tags": "Etiquetes" }, "openmediavault": { - "downloading": "Downloading", + "downloading": "Descarregant", "total": "Total", - "running": "Running", + "running": "En execució", "stopped": "Aturat", "passed": "Aprobat", "failed": "Error" }, "openwrt": { "uptime": "Temps actiu", - "cpuLoad": "CPU Load Avg (5m)", - "up": "Up", - "down": "Down", - "bytesTx": "Transmitted", - "bytesRx": "Received" + "cpuLoad": "Càrrega promig de CPU (5m)", + "up": "Actiu", + "down": "Inactiu", + "bytesTx": "Enviat", + "bytesRx": "Rebuts" }, "uptimerobot": { "status": "Estat", "uptime": "Temps actiu", - "lastDown": "Last Downtime", - "downDuration": "Downtime Duration", - "sitesUp": "Sites Up", - "sitesDown": "Sites Down", - "paused": "Paused", - "notyetchecked": "Not Yet Checked", - "up": "Up", - "seemsdown": "Seems Down", - "down": "Down", + "lastDown": "Darrera Inactivitat", + "downDuration": "Duració d'Inactivitat", + "sitesUp": "Actius", + "sitesDown": "Caiguts", + "paused": "En pausa", + "notyetchecked": "Sense verificar", + "up": "Actiu", + "seemsdown": "Sembla caigut", + "down": "Inactiu", "unknown": "Desconegut" }, "calendar": { - "inCinemas": "In cinemas", - "physicalRelease": "Physical release", - "digitalRelease": "Digital release", - "noEventsToday": "No events for today!", - "noEventsFound": "No events found" + "inCinemas": "En cines", + "physicalRelease": "Estrena física", + "digitalRelease": "Estrena digital", + "noEventsToday": "Cap esdeveniment per avui!", + "noEventsFound": "No s'han trobat esdeveniments" }, "romm": { - "platforms": "Platforms", - "totalRoms": "Total ROMs" + "platforms": "Plataformes", + "totalRoms": "ROMs totals" }, "netdata": { - "warnings": "Warnings", - "criticals": "Criticals" + "warnings": "Avisos", + "criticals": "Crítics" }, "plantit": { - "events": "Events", - "plants": "Plants", - "photos": "Photos", - "species": "Species" + "events": "Esdeveniments", + "plants": "Plantes", + "photos": "Fotos", + "species": "Espècies" }, "gitea": { - "notifications": "Notifications", - "issues": "Issues", - "pulls": "Pull Requests" + "notifications": "Notificacions", + "issues": "Problemes", + "pulls": "Sol·licitud de Canvis" }, "stash": { - "scenes": "Scenes", - "scenesPlayed": "Scenes Played", - "playCount": "Total Plays", - "playDuration": "Time Watched", - "sceneSize": "Scenes Size", - "sceneDuration": "Scenes Duration", - "images": "Images", - "imageSize": "Images Size", - "galleries": "Galleries", - "performers": "Performers", - "studios": "Studios", - "movies": "Movies", - "tags": "Tags", + "scenes": "Escenes", + "scenesPlayed": "Escenes reproduïdes", + "playCount": "Total reproduccions", + "playDuration": "Temps visionat", + "sceneSize": "Tamany Escena", + "sceneDuration": "Duració Escenes", + "images": "Imatges", + "imageSize": "Mida Imatges", + "galleries": "Biblioteques", + "performers": "Intèrprets", + "studios": "Estudis", + "movies": "Pel·lícules", + "tags": "Etiquetes", "oCount": "O Count" }, "tandoor": { "users": "Usuaris", - "recipes": "Recipes", - "keywords": "Keywords" + "recipes": "Receptes", + "keywords": "Paraules claus" }, "homebox": { - "items": "Items", - "totalWithWarranty": "With Warranty", - "locations": "Locations", - "labels": "Labels", + "items": "Elements", + "totalWithWarranty": "Amb Garantia", + "locations": "Ubicacions", + "labels": "Etiquetes", "users": "Usuaris", - "totalValue": "Total Value" + "totalValue": "Valor total" }, "crowdsec": { - "alerts": "Alerts", - "bans": "Bans" + "alerts": "Alertes", + "bans": "Prohibicions" } } diff --git a/public/locales/de/common.json b/public/locales/de/common.json index 82212c69..78f28c0a 100644 --- a/public/locales/de/common.json +++ b/public/locales/de/common.json @@ -875,6 +875,6 @@ }, "crowdsec": { "alerts": "Warnungen", - "bans": "Bans" + "bans": "Banns" } } diff --git a/public/locales/it/common.json b/public/locales/it/common.json index a795bc57..8f583e66 100644 --- a/public/locales/it/common.json +++ b/public/locales/it/common.json @@ -15,8 +15,8 @@ "relativeDate": "{{value, relativeDate}}", "uptime": "{{value, uptime}}", "months": "mo", - "days": "d", - "hours": "h", + "days": "g", + "hours": "o", "minutes": "m", "seconds": "s" }, @@ -140,7 +140,7 @@ "connectionStatusPendingDisconnect": "In attesa di disconnessione", "connectionStatusDisconnecting": "Disconnessione in corso", "connectionStatusDisconnected": "Disconnesso", - "connectionStatusConnected": "Connected", + "connectionStatusConnected": "Connesso", "uptime": "Tempo di attività", "maxDown": "Max. Down", "maxUp": "Max. Up", @@ -279,9 +279,9 @@ }, "netalertx": { "total": "Totale", - "connected": "Connected", - "new_devices": "New Devices", - "down_alerts": "Down Alerts" + "connected": "Connesso", + "new_devices": "Nuovi Dispositivi", + "down_alerts": "Avvisi di Disservizio" }, "pihole": { "queries": "Richieste", @@ -411,8 +411,8 @@ "total": "Totale", "free": "Libero", "used": "In utilizzo", - "days": "d", - "hours": "h", + "days": "g", + "hours": "o", "crit": "Critico", "read": "Letti", "write": "Scrittura", @@ -427,7 +427,7 @@ "custom": "Personalizzato", "visit": "Visita", "url": "URL", - "searchsuggestion": "Suggestion" + "searchsuggestion": "Suggerimenti" }, "wmo": { "0-day": "Soleggiato", @@ -546,8 +546,8 @@ "hd": "HD", "tunerCount": "Tuners", "channelNumber": "Channel", - "channelNetwork": "Network", - "signalStrength": "Strength", + "channelNetwork": "Rete", + "signalStrength": "Intensità", "signalQuality": "Quality", "symbolQuality": "Quality", "networkRate": "Bitrate", @@ -830,32 +830,32 @@ "totalRoms": "Total ROMs" }, "netdata": { - "warnings": "Warnings", + "warnings": "Avvisi", "criticals": "Criticals" }, "plantit": { "events": "Events", "plants": "Plants", "photos": "Foto", - "species": "Species" + "species": "Specie" }, "gitea": { - "notifications": "Notifications", + "notifications": "Notifiche", "issues": "Problemi", - "pulls": "Pull Requests" + "pulls": "Richieste di Pull" }, "stash": { - "scenes": "Scenes", - "scenesPlayed": "Scenes Played", - "playCount": "Total Plays", - "playDuration": "Time Watched", - "sceneSize": "Scenes Size", - "sceneDuration": "Scenes Duration", - "images": "Images", + "scenes": "Scene", + "scenesPlayed": "Scene Riprodotte", + "playCount": "Totale Riproduzioni", + "playDuration": "Tempo Guardato", + "sceneSize": "Dimensione Delle Scene", + "sceneDuration": "Durata Delle Scene", + "images": "Immagini", "imageSize": "Images Size", "galleries": "Galleries", - "performers": "Performers", - "studios": "Studios", + "performers": "Esecutori", + "studios": "Studi", "movies": "Film", "tags": "Tag", "oCount": "O Count" diff --git a/public/locales/sl/common.json b/public/locales/sl/common.json index f732fbe1..83691aab 100644 --- a/public/locales/sl/common.json +++ b/public/locales/sl/common.json @@ -140,7 +140,7 @@ "connectionStatusPendingDisconnect": "Čakanje na prekinitev", "connectionStatusDisconnecting": "Prekinitev", "connectionStatusDisconnected": "Prekinjeno", - "connectionStatusConnected": "Connected", + "connectionStatusConnected": "Povezan", "uptime": "Čas delovanja", "maxDown": "Maks. dol", "maxUp": "Maks. gor", @@ -279,9 +279,9 @@ }, "netalertx": { "total": "Skupaj", - "connected": "Connected", - "new_devices": "New Devices", - "down_alerts": "Down Alerts" + "connected": "Povezan", + "new_devices": "Nova naprave", + "down_alerts": "Alarmi nedelovanja" }, "pihole": { "queries": "Poizvedbe", diff --git a/public/locales/sv/common.json b/public/locales/sv/common.json index 9918ab64..7fc24490 100644 --- a/public/locales/sv/common.json +++ b/public/locales/sv/common.json @@ -104,7 +104,7 @@ "no_active": "Inga aktiva strömmar", "movies": "Movies", "series": "Series", - "episodes": "Episodes", + "episodes": "Avsnitt", "songs": "Songs" }, "esphome": { @@ -423,7 +423,7 @@ "quicklaunch": { "bookmark": "Bookmark", "service": "Service", - "search": "Search", + "search": "Sök", "custom": "Custom", "visit": "Visit", "url": "URL", From 068e664f1662f99033eae37cf4d34fb2e71e02c1 Mon Sep 17 00:00:00 2001 From: lavavex <27239435+lavavex@users.noreply.github.com> Date: Wed, 17 Apr 2024 19:00:37 -0500 Subject: [PATCH 07/14] Documentation: correct Medusa link (#3320) --- docs/widgets/services/medusa.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/widgets/services/medusa.md b/docs/widgets/services/medusa.md index e500d95f..82ec2b53 100644 --- a/docs/widgets/services/medusa.md +++ b/docs/widgets/services/medusa.md @@ -3,7 +3,7 @@ title: Medusa description: Medusa Widget Configuration --- -Learn more about [Medusa](https://github.com/medusajs/medusa). +Learn more about [Medusa](https://github.com/pymedusa/Medusa). Allowed fields: `["wanted", "queued", "series"]`. From c95837f54eb90ba753821c90aaf6f3008f4c6410 Mon Sep 17 00:00:00 2001 From: David Hirsch Date: Sat, 20 Apr 2024 01:32:14 +0200 Subject: [PATCH 08/14] Enhancement: configurable CPU temp scale (#3332) --------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com> --- docs/widgets/info/resources.md | 2 ++ src/components/widgets/resources/cputemp.jsx | 11 ++++++++--- src/components/widgets/resources/resources.jsx | 6 ++++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/widgets/info/resources.md b/docs/widgets/info/resources.md index b4f85d69..8281cec0 100644 --- a/docs/widgets/info/resources.md +++ b/docs/widgets/info/resources.md @@ -19,6 +19,8 @@ _Note: unfortunately, the package used for getting CPU temp ([systeminformation] memory: true disk: /disk/mount/path cputemp: true + tempmin: 0 # optional, minimum cpu temp + tempmax: 100 # optional, maximum cpu temp uptime: true units: imperial # only used by cpu temp refresh: 3000 # optional, in ms diff --git a/src/components/widgets/resources/cputemp.jsx b/src/components/widgets/resources/cputemp.jsx index 96f98096..ef994c65 100644 --- a/src/components/widgets/resources/cputemp.jsx +++ b/src/components/widgets/resources/cputemp.jsx @@ -9,7 +9,7 @@ function convertToFahrenheit(t) { return (t * 9) / 5 + 32; } -export default function CpuTemp({ expanded, units, refresh = 1500 }) { +export default function CpuTemp({ expanded, units, refresh = 1500, tempmin = 0, tempmax = -1 }) { const { t } = useTranslation(); const { data, error } = useSWR(`/api/widgets/resources?type=cputemp`, { @@ -39,7 +39,12 @@ export default function CpuTemp({ expanded, units, refresh = 1500 }) { } const unit = units === "imperial" ? "fahrenheit" : "celsius"; mainTemp = unit === "celsius" ? mainTemp : convertToFahrenheit(mainTemp); - const maxTemp = unit === "celsius" ? data.cputemp.max : convertToFahrenheit(data.cputemp.max); + + const minTemp = tempmin < mainTemp ? tempmin : mainTemp; + let maxTemp = tempmax; + if (maxTemp < minTemp) { + maxTemp = unit === "celsius" ? data.cputemp.max : convertToFahrenheit(data.cputemp.max); + } return ( ); diff --git a/src/components/widgets/resources/resources.jsx b/src/components/widgets/resources/resources.jsx index e2f2bfb8..634e0ff5 100644 --- a/src/components/widgets/resources/resources.jsx +++ b/src/components/widgets/resources/resources.jsx @@ -8,7 +8,7 @@ import CpuTemp from "./cputemp"; import Uptime from "./uptime"; export default function Resources({ options }) { - const { expanded, units, diskUnits } = options; + const { expanded, units, diskUnits, tempmin, tempmax } = options; let { refresh } = options; if (!refresh) refresh = 1500; refresh = Math.max(refresh, 1000); @@ -23,7 +23,9 @@ export default function Resources({ options }) { )) : options.disk && } - {options.cputemp && } + {options.cputemp && ( + + )} {options.uptime && }
{options.label && ( From 79e3eb9c90428100f5539c8eaa7f81bbd80b290d Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 21 Apr 2024 07:12:49 -0700 Subject: [PATCH 09/14] Documentation: fix docker stats link --- docs/configs/docker.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configs/docker.md b/docs/configs/docker.md index 4d3026db..bcd0dd61 100644 --- a/docs/configs/docker.md +++ b/docs/configs/docker.md @@ -235,4 +235,4 @@ You can show the docker stats by clicking the status indicator but this can also showStats: true ``` -Also see the settings for [show docker stats](docker.md#show-docker-stats). +Also see the settings for [show docker stats](settings.md#show-docker-stats). From 595049f7fcf792be9a6aba3e0062b4b4cd9c0565 Mon Sep 17 00:00:00 2001 From: Nuno Alexandre <38176824+NuAlex@users.noreply.github.com> Date: Mon, 22 Apr 2024 12:33:35 -0700 Subject: [PATCH 10/14] Documentation: clarify uptime kuma slug (#3345) --------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com> --- docs/widgets/services/uptime-kuma.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/widgets/services/uptime-kuma.md b/docs/widgets/services/uptime-kuma.md index 56aa5a57..399a0eee 100644 --- a/docs/widgets/services/uptime-kuma.md +++ b/docs/widgets/services/uptime-kuma.md @@ -5,7 +5,7 @@ description: Uptime Kuma Widget Configuration Learn more about [Uptime Kuma](https://github.com/louislam/uptime-kuma). -As Uptime Kuma does not yet have a full API the widget uses data from a single "status page". As such you will need a status page setup with a group of monitored sites, which is where you get the slug (without the `/status/` portion). +As Uptime Kuma does not yet have a full API the widget uses data from a single "status page". As such you will need a status page setup with a group of monitored sites, which is where you get the slug (the url without the `/status/` portion). E.g. if your status page is URL http://uptimekuma.host/status/statuspageslug, insert `slug: statuspageslug`. Allowed fields: `["up", "down", "uptime", "incident"]`. From f4fc30cd9fe851083910a4076db24523d4a00ff3 Mon Sep 17 00:00:00 2001 From: Liam Dyer Date: Mon, 22 Apr 2024 16:59:23 -0400 Subject: [PATCH 11/14] Documentation: update Authentik suggested permissions (#3349) --- docs/widgets/services/authentik.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/widgets/services/authentik.md b/docs/widgets/services/authentik.md index a92b84ec..8968f4bf 100644 --- a/docs/widgets/services/authentik.md +++ b/docs/widgets/services/authentik.md @@ -12,10 +12,8 @@ Make sure to set Intent to "API Token". The account you made the API token for also needs the following **Assigned global permissions** in Authentik: -- authentik Core - - User -- authentik Events - - Event +- authentik Core -> Can view User (Model: User) +- authentik Events -> Can view Event (Model: Event) Allowed fields: `["users", "loginsLast24H", "failedLoginsLast24H"]`. From 312e97d18b42cad6d764380aea3c9679601edd88 Mon Sep 17 00:00:00 2001 From: Ameer Abdallah Date: Mon, 22 Apr 2024 17:49:19 -0700 Subject: [PATCH 12/14] Enhancement: additional tautulli jellyfin emby configuration options (#3350) --- docs/widgets/services/emby.md | 2 + docs/widgets/services/jellyfin.md | 3 + docs/widgets/services/plex-tautulli.md | 2 + src/utils/config/service-helpers.js | 15 ++-- src/widgets/emby/component.jsx | 96 ++++++++++++++++---------- src/widgets/tautulli/component.jsx | 70 +++++++++++++------ 6 files changed, 121 insertions(+), 67 deletions(-) diff --git a/docs/widgets/services/emby.md b/docs/widgets/services/emby.md index 1d70fdf3..e658d73b 100644 --- a/docs/widgets/services/emby.md +++ b/docs/widgets/services/emby.md @@ -17,4 +17,6 @@ widget: enableBlocks: true # optional, defaults to false enableNowPlaying: true # optional, defaults to true enableUser: true # optional, defaults to false + showEpisodeNumber: true # optional, defaults to false + expandOneStreamToTwoRows: false # optional, defaults to true ``` diff --git a/docs/widgets/services/jellyfin.md b/docs/widgets/services/jellyfin.md index 0428c622..b6724a15 100644 --- a/docs/widgets/services/jellyfin.md +++ b/docs/widgets/services/jellyfin.md @@ -16,4 +16,7 @@ widget: key: apikeyapikeyapikeyapikeyapikey enableBlocks: true # optional, defaults to false enableNowPlaying: true # optional, defaults to true + enableUser: true # optional, defaults to false + showEpisodeNumber: true # optional, defaults to false + expandOneStreamToTwoRows: false # optional, defaults to true ``` diff --git a/docs/widgets/services/plex-tautulli.md b/docs/widgets/services/plex-tautulli.md index cce45fc3..9cacdf05 100644 --- a/docs/widgets/services/plex-tautulli.md +++ b/docs/widgets/services/plex-tautulli.md @@ -15,4 +15,6 @@ widget: url: http://tautulli.host.or.ip key: apikeyapikeyapikeyapikeyapikey enableUser: true # optional, defaults to false + showEpisodeNumber: true # optional, defaults to false + expandOneStreamToTwoRows: false # optional, defaults to true ``` diff --git a/src/utils/config/service-helpers.js b/src/utils/config/service-helpers.js index 7fb81088..fc4d57eb 100644 --- a/src/utils/config/service-helpers.js +++ b/src/utils/config/service-helpers.js @@ -395,6 +395,8 @@ export function cleanServiceGroups(groups) { // emby, jellyfin, tautulli enableUser, + expandOneStreamToTwoRows, + showEpisodeNumber, // glances, pihole version, @@ -520,14 +522,13 @@ export function cleanServiceGroups(groups) { if (["emby", "jellyfin"].includes(type)) { if (enableBlocks !== undefined) cleanedService.widget.enableBlocks = JSON.parse(enableBlocks); if (enableNowPlaying !== undefined) cleanedService.widget.enableNowPlaying = JSON.parse(enableNowPlaying); - if (enableUser !== undefined) { - cleanedService.widget.enableUser = !!JSON.parse(enableUser); - } } - if (["tautulli"].includes(type)) { - if (enableUser !== undefined) { - cleanedService.widget.enableUser = !!JSON.parse(enableUser); - } + if (["emby", "jellyfin", "tautulli"].includes(type)) { + if (expandOneStreamToTwoRows !== undefined) + cleanedService.widget.expandOneStreamToTwoRows = !!JSON.parse(expandOneStreamToTwoRows); + if (showEpisodeNumber !== undefined) + cleanedService.widget.showEpisodeNumber = !!JSON.parse(showEpisodeNumber); + if (enableUser !== undefined) cleanedService.widget.enableUser = !!JSON.parse(enableUser); } if (["sonarr", "radarr"].includes(type)) { if (enableQueue !== undefined) cleanedService.widget.enableQueue = JSON.parse(enableQueue); diff --git a/src/widgets/emby/component.jsx b/src/widgets/emby/component.jsx index f11a689d..9084cbac 100644 --- a/src/widgets/emby/component.jsx +++ b/src/widgets/emby/component.jsx @@ -27,12 +27,28 @@ function ticksToString(ticks) { return parts.map((part) => part.toString().padStart(2, "0")).join(":"); } -function SingleSessionEntry({ playCommand, session, enableUser }) { +function generateStreamTitle(session, enableUser, showEpisodeNumber) { const { - NowPlayingItem: { Name, SeriesName }, - PlayState: { PositionTicks, IsPaused, IsMuted }, + NowPlayingItem: { Name, SeriesName, Type, ParentIndexNumber, IndexNumber }, UserName, } = session; + let streamTitle = ""; + + if (Type === "Episode" && showEpisodeNumber) { + const seasonStr = `S${ParentIndexNumber.toString().padStart(2, "0")}`; + const episodeStr = `E${IndexNumber.toString().padStart(2, "0")}`; + streamTitle = `${SeriesName}: ${seasonStr} · ${episodeStr} - ${Name}`; + } else { + streamTitle = `${Name}${SeriesName ? ` - ${SeriesName}` : ""}`; + } + + return enableUser ? `${streamTitle} (${UserName})` : streamTitle; +} + +function SingleSessionEntry({ playCommand, session, enableUser, showEpisodeNumber }) { + const { + PlayState: { PositionTicks, IsPaused, IsMuted }, + } = session; const RunTimeTicks = session.NowPlayingItem?.RunTimeTicks ?? session.NowPlayingItem?.CurrentProgram?.RunTimeTicks ?? 0; @@ -43,14 +59,13 @@ function SingleSessionEntry({ playCommand, session, enableUser }) { const percent = Math.min(1, PositionTicks / RunTimeTicks) * 100; + const streamTitle = generateStreamTitle(session, enableUser, showEpisodeNumber); return ( <>
-
- {Name} - {SeriesName && ` - ${SeriesName}`} - {enableUser && ` (${UserName})`} +
+ {streamTitle}
@@ -99,11 +114,9 @@ function SingleSessionEntry({ playCommand, session, enableUser }) { ); } -function SessionEntry({ playCommand, session, enableUser }) { +function SessionEntry({ playCommand, session, enableUser, showEpisodeNumber }) { const { - NowPlayingItem: { Name, SeriesName }, PlayState: { PositionTicks, IsPaused, IsMuted }, - UserName, } = session; const RunTimeTicks = @@ -113,6 +126,8 @@ function SessionEntry({ playCommand, session, enableUser }) { IsVideoDirect: true, }; // if no transcodinginfo its videodirect + const streamTitle = generateStreamTitle(session, enableUser, showEpisodeNumber); + const percent = Math.min(1, PositionTicks / RunTimeTicks) * 100; return ( @@ -142,10 +157,8 @@ function SessionEntry({ playCommand, session, enableUser }) { )}
-
- {Name} - {SeriesName && ` - ${SeriesName}`} - {enableUser && ` (${UserName})`} +
+ {streamTitle}
{IsMuted && }
@@ -219,7 +232,9 @@ export default function Component({ service }) { const enableBlocks = service.widget?.enableBlocks; const enableNowPlaying = service.widget?.enableNowPlaying ?? true; - const enableUser = !!service.widget?.enableUser; + const enableUser = !!service.widget?.enableUser; // default is false + const expandOneStreamToTwoRows = service.widget?.expandOneStreamToTwoRows !== false; // default is true + const showEpisodeNumber = !!service.widget?.showEpisodeNumber; // default is false if (!sessionsData || !countData) { return ( @@ -230,9 +245,11 @@ export default function Component({ service }) {
-
-
- - -
+ {expandOneStreamToTwoRows && ( +
+ - +
+ )}
)} @@ -260,15 +277,17 @@ export default function Component({ service }) {
{t("emby.no_active")}
-
- - -
+ {expandOneStreamToTwoRows && ( +
+ - +
+ )}
); } - if (playing.length === 1) { + if (expandOneStreamToTwoRows && playing.length === 1) { const session = playing[0]; return ( <> @@ -278,28 +297,29 @@ export default function Component({ service }) { playCommand={(currentSession, command) => handlePlayCommand(currentSession, command)} session={session} enableUser={enableUser} + showEpisodeNumber={showEpisodeNumber} />
); } - if (playing.length > 0) - return ( - <> - {enableBlocks && } -
- {playing.map((session) => ( - handlePlayCommand(currentSession, command)} - session={session} - enableUser={enableUser} - /> - ))} -
- - ); + return ( + <> + {enableBlocks && } +
+ {playing.map((session) => ( + handlePlayCommand(currentSession, command)} + session={session} + enableUser={enableUser} + showEpisodeNumber={showEpisodeNumber} + /> + ))} +
+ + ); } if (enableBlocks) { diff --git a/src/widgets/tautulli/component.jsx b/src/widgets/tautulli/component.jsx index d224391b..b540c6d7 100644 --- a/src/widgets/tautulli/component.jsx +++ b/src/widgets/tautulli/component.jsx @@ -25,17 +25,31 @@ function millisecondsToString(milliseconds) { return parts.map((part) => part.toString().padStart(2, "0")).join(":"); } -function SingleSessionEntry({ session, enableUser }) { - const { full_title, duration, view_offset, progress_percent, state, video_decision, audio_decision, username } = - session; +function generateStreamTitle(session, enableUser, showEpisodeNumber) { + let stream_title = ""; + const { media_type, parent_media_index, media_index, title, grandparent_title, full_title, friendly_name } = session; + if (media_type === "episode" && showEpisodeNumber) { + const season_str = `S${parent_media_index.toString().padStart(2, "0")}`; + const episode_str = `E${media_index.toString().padStart(2, "0")}`; + stream_title = `${grandparent_title}: ${season_str} · ${episode_str} - ${title}`; + } else { + stream_title = full_title; + } + + return enableUser ? `${stream_title} (${friendly_name})` : stream_title; +} + +function SingleSessionEntry({ session, enableUser, showEpisodeNumber }) { + const { duration, view_offset, progress_percent, state, video_decision, audio_decision } = session; + + const stream_title = generateStreamTitle(session, enableUser, showEpisodeNumber); return ( <>
-
- {full_title} - {enableUser && ` (${username})`} +
+ {stream_title}
@@ -78,8 +92,10 @@ function SingleSessionEntry({ session, enableUser }) { ); } -function SessionEntry({ session, enableUser }) { - const { full_title, view_offset, progress_percent, state, video_decision, audio_decision, username } = session; +function SessionEntry({ session, enableUser, showEpisodeNumber }) { + const { view_offset, progress_percent, state, video_decision, audio_decision } = session; + + const stream_title = generateStreamTitle(session, enableUser, showEpisodeNumber); return (
@@ -98,9 +114,8 @@ function SessionEntry({ session, enableUser }) { )}
-
- {full_title} - {enableUser && ` (${username})`} +
+ {stream_title}
@@ -129,6 +144,10 @@ export default function Component({ service }) { refreshInterval: 5000, }); + const enableUser = !!service.widget?.enableUser; // default is false + const expandOneStreamToTwoRows = service.widget?.expandOneStreamToTwoRows !== false; // default is true + const showEpisodeNumber = !!service.widget?.showEpisodeNumber; // default is false + if (activityError || (activityData && Object.keys(activityData.response.data).length === 0)) { return ; } @@ -139,9 +158,11 @@ export default function Component({ service }) {
-
-
- - -
+ {expandOneStreamToTwoRows && ( +
+ - +
+ )}
); } @@ -162,20 +183,20 @@ export default function Component({ service }) {
{t("tautulli.no_active")}
-
- - -
+ {expandOneStreamToTwoRows && ( +
+ - +
+ )}
); } - const enableUser = !!service.widget?.enableUser; - - if (playing.length === 1) { + if (expandOneStreamToTwoRows && playing.length === 1) { const session = playing[0]; return (
- +
); } @@ -183,7 +204,12 @@ export default function Component({ service }) { return (
{playing.map((session) => ( - + ))}
); From 340424391f0e7e171b362ee82ac8ec8b582b62b0 Mon Sep 17 00:00:00 2001 From: Ameer Abdallah Date: Mon, 22 Apr 2024 21:20:08 -0700 Subject: [PATCH 13/14] Enhancement: add bitrate precision config option for speedtest-tracker (#3354) --------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com> --- docs/widgets/services/speedtest-tracker.md | 1 + src/utils/config/service-helpers.js | 8 ++++++++ src/widgets/speedtest/component.jsx | 18 ++++++++++++++++-- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/docs/widgets/services/speedtest-tracker.md b/docs/widgets/services/speedtest-tracker.md index 7e250967..99b5b993 100644 --- a/docs/widgets/services/speedtest-tracker.md +++ b/docs/widgets/services/speedtest-tracker.md @@ -16,4 +16,5 @@ Allowed fields: `["download", "upload", "ping"]`. widget: type: speedtest url: http://speedtest.host.or.ip + bitratePrecision: 3 # optional, default is 0 ``` diff --git a/src/utils/config/service-helpers.js b/src/utils/config/service-helpers.js index fc4d57eb..aaee636c 100644 --- a/src/utils/config/service-helpers.js +++ b/src/utils/config/service-helpers.js @@ -450,6 +450,9 @@ export function cleanServiceGroups(groups) { // proxmox node, + // speedtest + bitratePrecision, + // sonarr, radarr enableQueue, @@ -588,6 +591,11 @@ export function cleanServiceGroups(groups) { if (type === "healthchecks") { if (uuid !== undefined) cleanedService.widget.uuid = uuid; } + if (type === "speedtest") { + if (bitratePrecision !== undefined) { + cleanedService.widget.bitratePrecision = parseInt(bitratePrecision, 10); + } + } } return cleanedService; diff --git a/src/widgets/speedtest/component.jsx b/src/widgets/speedtest/component.jsx index 0102025b..9826f776 100644 --- a/src/widgets/speedtest/component.jsx +++ b/src/widgets/speedtest/component.jsx @@ -11,6 +11,11 @@ export default function Component({ service }) { const { data: speedtestData, error: speedtestError } = useWidgetAPI(widget, "speedtest/latest"); + const bitratePrecision = + !widget?.bitratePrecision || Number.isNaN(widget?.bitratePrecision) || widget?.bitratePrecision < 0 + ? 0 + : widget.bitratePrecision; + if (speedtestError) { return ; } @@ -29,9 +34,18 @@ export default function Component({ service }) { + - Date: Tue, 23 Apr 2024 22:13:53 +0100 Subject: [PATCH 14/14] Fix: format Romm statistics (#3358) --- src/widgets/romm/component.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/widgets/romm/component.jsx b/src/widgets/romm/component.jsx index 1cb3033e..44b114b0 100644 --- a/src/widgets/romm/component.jsx +++ b/src/widgets/romm/component.jsx @@ -1,9 +1,12 @@ +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 { widget } = service; + const { t } = useTranslation(); const { data: response, error: responseError } = useWidgetAPI(widget, "statistics"); @@ -24,8 +27,8 @@ export default function Component({ service }) { const totalRoms = response.reduce((total, stat) => total + stat.rom_count, 0); return ( - - + + ); }