mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
Enhancement: support for new grafana alerting api (#5476)
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f5ecd6d787
commit
dba3a1f893
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user