From 5059c19aae4afbd1bdc4fa07f93f37b70989b2c7 Mon Sep 17 00:00:00 2001 From: Michal Iskierko Date: Thu, 11 Jul 2024 09:39:19 +0200 Subject: [PATCH] feat_: add CentralizedMetricsInfo function Issue #15446 --- mobile/status.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mobile/status.go b/mobile/status.go index 409947ca6..18a5ae025 100644 --- a/mobile/status.go +++ b/mobile/status.go @@ -1426,6 +1426,18 @@ func ToggleCentralizedMetrics(requestJSON string) string { return "" } +func CentralizedMetricsInfo() string { + metricsInfo, err := statusBackend.CentralizedMetricsInfo() + if err != nil { + return makeJSONResponse(err) + } + data, err := json.Marshal(metricsInfo) + if err != nil { + return makeJSONResponse(err) + } + return string(data) +} + func AddCentralizedMetric(requestJSON string) string { var request requests.AddCentralizedMetric err := json.Unmarshal([]byte(requestJSON), &request)