Fix issue when format missing in prometheusmetric widget config
This commit is contained in:
parent
deda42af47
commit
04ff454a13
@ -8,7 +8,7 @@ search:
|
|||||||
You can also find a list of all available service widgets in the sidebar navigation.
|
You can also find a list of all available service widgets in the sidebar navigation.
|
||||||
|
|
||||||
- [Adguard Home](adguard-home.md)
|
- [Adguard Home](adguard-home.md)
|
||||||
- [ArgoCD](atsumeru.md)
|
- [ArgoCD](argocd.md)
|
||||||
- [Atsumeru](atsumeru.md)
|
- [Atsumeru](atsumeru.md)
|
||||||
- [Audiobookshelf](audiobookshelf.md)
|
- [Audiobookshelf](audiobookshelf.md)
|
||||||
- [Authentik](authentik.md)
|
- [Authentik](authentik.md)
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import Block from "components/services/widget/block";
|
|||||||
import useWidgetAPI from "utils/proxy/use-widget-api";
|
import useWidgetAPI from "utils/proxy/use-widget-api";
|
||||||
|
|
||||||
function formatValue(t, metric, rawValue) {
|
function formatValue(t, metric, rawValue) {
|
||||||
|
if (!metric?.format) return rawValue;
|
||||||
if (!rawValue) return "-";
|
if (!rawValue) return "-";
|
||||||
|
|
||||||
let value = rawValue;
|
let value = rawValue;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user