From 85ad38a90a73800ceec2275ebc101fe029015b9a Mon Sep 17 00:00:00 2001 From: "saimu.msm" Date: Mon, 7 Aug 2023 12:39:02 +0800 Subject: [PATCH] fix setMetricRelabelConfigs --- .../home/biz/listener/OpenmetricsScraperUpdateListener.java | 2 +- .../home/web/controller/OpenmetricsScraperFacadeImpl.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/listener/OpenmetricsScraperUpdateListener.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/listener/OpenmetricsScraperUpdateListener.java index 381df7399..a36792b6f 100644 --- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/listener/OpenmetricsScraperUpdateListener.java +++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/listener/OpenmetricsScraperUpdateListener.java @@ -48,7 +48,7 @@ private void upsert(OpenmetricsScraperDTO openmetricsScraperDTO) { task.setScrapeTimeout(openmetricsScraperDTO.getScrapeTimeout()); task.setScrapePort(openmetricsScraperDTO.getPort()); task.setRelabelConfigs(openmetricsScraperDTO.getRelabelConfigs()); - task.setRelabelConfigs(openmetricsScraperDTO.getMetricRelabelConfigs()); + task.setMetricRelabelConfigs(openmetricsScraperDTO.getMetricRelabelConfigs()); // List targets = new ArrayList<>(); //// 暂时 mock 一下 diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/OpenmetricsScraperFacadeImpl.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/OpenmetricsScraperFacadeImpl.java index c72e27189..c8877dbc6 100644 --- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/OpenmetricsScraperFacadeImpl.java +++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/OpenmetricsScraperFacadeImpl.java @@ -18,6 +18,7 @@ import io.holoinsight.server.home.facade.page.MonitorPageResult; import io.holoinsight.server.home.web.common.ManageCallback; import io.holoinsight.server.home.web.common.ParaCheckUtil; +import io.holoinsight.server.home.web.common.TokenUrls; import io.holoinsight.server.home.web.interceptor.MonitorScopeAuth; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -30,6 +31,7 @@ @RestController @RequestMapping("/webapi/openmetrics/scraper") +@TokenUrls("/webapi/openmetrics/scraper") public class OpenmetricsScraperFacadeImpl extends BaseFacade { @Autowired