Skip to content

Commit 04ff454

Browse files
committed
Fix issue when format missing in prometheusmetric widget config
1 parent deda42a commit 04ff454

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/widgets/services/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ search:
88
You can also find a list of all available service widgets in the sidebar navigation.
99

1010
- [Adguard Home](adguard-home.md)
11-
- [ArgoCD](atsumeru.md)
11+
- [ArgoCD](argocd.md)
1212
- [Atsumeru](atsumeru.md)
1313
- [Audiobookshelf](audiobookshelf.md)
1414
- [Authentik](authentik.md)

src/widgets/prometheusmetric/component.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Block from "components/services/widget/block";
55
import useWidgetAPI from "utils/proxy/use-widget-api";
66

77
function formatValue(t, metric, rawValue) {
8+
if (!metric?.format) return rawValue;
89
if (!rawValue) return "-";
910

1011
let value = rawValue;

0 commit comments

Comments
 (0)