Enhancement: support for new grafana alerting api (#5476)
Some checks failed
Docker CI / Linting Checks (push) Has been cancelled
Docker CI / Docker Build & Push (push) Has been cancelled

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
Oriano de Stefani
2025-07-12 17:36:13 +02:00
committed by GitHub
parent f5ecd6d787
commit dba3a1f893
4 changed files with 65 additions and 14 deletions

View File

@@ -407,6 +407,9 @@ export function cleanServiceGroups(groups) {
// spoolman
spoolIds,
// grafana
alerts,
} = widgetData;
let fieldsList = fields;
@@ -514,7 +517,18 @@ export function cleanServiceGroups(groups) {
if (snapshotPath) widget.snapshotPath = snapshotPath;
}
if (
["beszel", "glances", "immich", "komga", "mealie", "pfsense", "pihole", "speedtest", "wgeasy"].includes(type)
[
"beszel",
"glances",
"immich",
"komga",
"mealie",
"pfsense",
"pihole",
"speedtest",
"wgeasy",
"grafana",
].includes(type)
) {
if (version) widget.version = parseInt(version, 10);
}
@@ -593,6 +607,9 @@ export function cleanServiceGroups(groups) {
if (type === "jellystat") {
if (days !== undefined) widget.days = parseInt(days, 10);
}
if (type === "grafana") {
if (alerts) widget.alerts = alerts;
}
return widget;
});
return cleanedService;