Merge branch 'gethomepage:main' into feature/frigate-widget

This commit is contained in:
j0ton
2024-07-12 20:23:01 +12:00
committed by GitHub
47 changed files with 339 additions and 28 deletions

View File

@@ -36,7 +36,7 @@ Inside of the service you'd like to connect to a pod:
The `app` field is used to create a label selector, in this example case it would match pods with the label: `app.kubernetes.io/name=emby`.
Sometimes this is insufficient for complex or atypical application deployments. In these cases, the `pod-selector` field can be used. Any field selector can be used with it, so it allows for some very powerful selection capabilities.
Sometimes this is insufficient for complex or atypical application deployments. In these cases, the `podSelector` field can be used. Any field selector can be used with it, so it allows for some very powerful selection capabilities.
For instance, it can be utilized to roll multiple underlying deployments under one application to see a high-level aggregate:
@@ -47,7 +47,7 @@ For instance, it can be utilized to roll multiple underlying deployments under o
description: Matrix Synapse Powered Chat
app: matrix-element
namespace: comms
pod-selector: >-
podSelector: >-
app.kubernetes.io/instance in (
matrix-element,
matrix-media-repo,
@@ -58,7 +58,7 @@ For instance, it can be utilized to roll multiple underlying deployments under o
!!! note
A blank string as a pod-selector does not deactivate it, but will actually select all pods in the namespace. This is a useful way to capture the resource usage of a complex application siloed to a single namespace, like Longhorn.
A blank string as a podSelector does not deactivate it, but will actually select all pods in the namespace. This is a useful way to capture the resource usage of a complex application siloed to a single namespace, like Longhorn.
## Automatic Service Discovery

View File

@@ -26,5 +26,6 @@ widget:
headers: # optional, or username/password
Authorization: client_id client_token
wan: igb0
version: 2 # optional, defaults to 1 for api v1
fields: ["load", "memory", "temp", "wanStatus"] # optional
```

View File

@@ -893,5 +893,12 @@
"ping": "Pieng",
"download": "Aflaai",
"upload": "Laai Op"
},
"stocks": {
"stocks": "Aandele",
"loading": "Laai",
"open": "Oop - VS Mark",
"closed": "Toe - VS Mark",
"invalidConfiguration": "Ongeldige opstelling"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "بينغ",
"download": "التنزيل",
"upload": "التحميل"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Latència",
"download": "Descarregar",
"upload": "Pujada"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Odezva",
"download": "Stahování",
"upload": "Nahrávání"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Aktien",
"loading": "Wird geladen",
"open": "Offen - US-Markt",
"closed": "Geschlossen - US-Markt",
"invalidConfiguration": "Ungültige Konfiguration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Λήξη",
"upload": "Μεταφόρτωση"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Sondaĵo",
"download": "Elŝuti",
"upload": "Alŝuti"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Descarga",
"upload": "Subida"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Récep.",
"upload": "Envoi"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Preuzimanje",
"upload": "Prijenos"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Letöltés",
"upload": "Feltöltés"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Unduh",
"upload": "Unggah"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "ダウンロード",
"upload": "アップロード"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "다운로드",
"upload": "업로드"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Lejupielāde",
"upload": "Augšupielāde"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Muat turun",
"upload": "Muat naik"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Responstid",
"download": "Last ned",
"upload": "Opplastning"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Pobieranie",
"upload": "Wysyłanie"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Tempo de resposta",
"download": "Descarregar",
"upload": "Carregar"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

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

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Descarcă",
"upload": "Încarcă"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Пинг",
"download": "Скачивание",
"upload": "Загрузка"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Odozva",
"download": "Sťahovanie",
"upload": "Nahrávanie"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Prenos",
"upload": "Nalaganje"
},
"stocks": {
"stocks": "Delnice",
"loading": "Nalaganje",
"open": "Odprto - US trg",
"closed": "Zaprto - US trg",
"invalidConfiguration": "Neveljavna konfiguracija"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "ปิง",
"download": "ดาวน์โหลด",
"upload": "อัพโหลด"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

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

View File

@@ -893,5 +893,12 @@
"ping": "Пінг",
"download": "Завантаження",
"upload": "Відправлення"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "Download",
"upload": "Upload"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "延遲",
"download": "下載速率",
"upload": "上傳速率"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "Ping",
"download": "下载速率",
"upload": "上传速率"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -893,5 +893,12 @@
"ping": "延遲",
"download": "下載速率",
"upload": "上傳速率"
},
"stocks": {
"stocks": "Stocks",
"loading": "Loading",
"open": "Open - US Market",
"closed": "Closed - US Market",
"invalidConfiguration": "Invalid Configuration"
}
}

View File

@@ -399,7 +399,7 @@ export function cleanServiceGroups(groups) {
expandOneStreamToTwoRows,
showEpisodeNumber,
// glances, pihole
// glances, pihole, pfsense
version,
// glances
@@ -509,6 +509,9 @@ export function cleanServiceGroups(groups) {
if (type === "unifi") {
if (site) cleanedService.widget.site = site;
}
if (type === "pfsense") {
if (version) cleanedService.widget.version = version;
}
if (type === "proxmox") {
if (node) cleanedService.widget.node = node;
}

View File

@@ -9,8 +9,12 @@ export default function Component({ service }) {
const { widget } = service;
const { data: systemData, error: systemError } = useWidgetAPI(widget, "system");
const { data: interfaceData, error: interfaceError } = useWidgetAPI(widget, "interface");
const version = widget.version ?? 1;
const { data: systemData, error: systemError } = useWidgetAPI(widget, version === 1 ? "system" : "systemv2");
const { data: interfaceData, error: interfaceError } = useWidgetAPI(
widget,
version === 1 ? "interface" : "interfacev2",
);
const showWanIP = widget.fields?.filter((f) => f !== "wanIP").length <= 4 && widget.fields?.includes("wanIP");
const showDiskUsage = widget.fields?.filter((f) => f !== "disk").length <= 4 && widget.fields?.includes("disk");
@@ -34,14 +38,20 @@ export default function Component({ service }) {
}
const wan = interfaceData.data.filter((l) => l.hwif === widget.wan)[0];
let memUsage = systemData?.data.mem_usage;
let diskUsage = systemData.data.disk_usage;
if (version === 1) {
memUsage *= 100;
diskUsage *= 100;
}
return (
<Container service={service}>
<Block label="pfsense.load" value={systemData.data.load_avg[0]} />
<Block
label="pfsense.memory"
value={t("common.percent", { value: (systemData.data.mem_usage * 100).toFixed(2) })}
label="pfsense.load"
value={version === 1 ? systemData.data.load_avg[0] : systemData.data.cpu_load_avg[0]}
/>
<Block label="pfsense.memory" value={t("common.percent", { value: memUsage.toFixed(2) })} />
<Block
label="pfsense.temp"
value={t("common.number", { value: systemData.data.temp_c, style: "unit", unit: "celsius" })}
@@ -57,12 +67,7 @@ export default function Component({ service }) {
}
/>
{showWanIP && <Block label="pfsense.wanIP" value={wan.ipaddr} />}
{showDiskUsage && (
<Block
label="pfsense.disk"
value={t("common.percent", { value: (systemData.data.disk_usage * 100).toFixed(2) })}
/>
)}
{showDiskUsage && <Block label="pfsense.disk" value={t("common.percent", { value: diskUsage.toFixed(2) })} />}
</Container>
);
}

View File

@@ -1,16 +1,24 @@
import genericProxyHandler from "utils/proxy/handlers/generic";
const widget = {
api: "{url}/api/v1/{endpoint}",
api: "{url}/api/{endpoint}",
proxyHandler: genericProxyHandler,
mappings: {
system: {
endpoint: "status/system",
endpoint: "v1/status/system",
validate: ["data"],
},
interface: {
endpoint: "status/interface",
endpoint: "v1/status/interface",
validate: ["data"],
},
systemv2: {
endpoint: "v2/status/system",
validate: ["data"],
},
interfacev2: {
endpoint: "v2/status/interfaces?limit=0&offset=0",
validate: ["data"],
},
},