Fix issue when format missing in prometheusmetric widget config

This commit is contained in:
Felix Cornelius
2024-11-17 21:43:31 +01:00
parent deda42af47
commit 04ff454a13
2 changed files with 2 additions and 1 deletions

View File

@@ -8,7 +8,7 @@ search:
You can also find a list of all available service widgets in the sidebar navigation.
- [Adguard Home](adguard-home.md)
- [ArgoCD](atsumeru.md)
- [ArgoCD](argocd.md)
- [Atsumeru](atsumeru.md)
- [Audiobookshelf](audiobookshelf.md)
- [Authentik](authentik.md)

View File

@@ -5,6 +5,7 @@ import Block from "components/services/widget/block";
import useWidgetAPI from "utils/proxy/use-widget-api";
function formatValue(t, metric, rawValue) {
if (!metric?.format) return rawValue;
if (!rawValue) return "-";
let value = rawValue;