diff --git a/scripts/docker/bin/app.sh b/scripts/docker/bin/app.sh
index ba8152750..690357c56 100755
--- a/scripts/docker/bin/app.sh
+++ b/scripts/docker/bin/app.sh
@@ -44,7 +44,7 @@ fi
# GC
-JAVA_OPTS="$JAVA_OPTS -XX:CMSInitiatingOccupancyFraction=65 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSParallelRemarkEnabled -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSScavengeBeforeRemark -XX:CMSMaxAbortablePrecleanTime=5000 -XX:CMSScheduleRemarkEdenPenetration=50 -XX:+CMSParallelInitialMarkEnabled -XX:PermSize=256m -XX:MaxPermSize=256m -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=256m -XX:+UseCMSCompactAtFullCollection -XX:CMSFullGCsBeforeCompaction=3"
+JAVA_OPTS="$JAVA_OPTS -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSParallelRemarkEnabled -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSScavengeBeforeRemark -XX:CMSMaxAbortablePrecleanTime=5000 -XX:CMSScheduleRemarkEdenPenetration=50 -XX:+CMSParallelInitialMarkEnabled -XX:PermSize=256m -XX:MaxPermSize=256m -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=256m -XX:+UseCMSCompactAtFullCollection -XX:CMSFullGCsBeforeCompaction=3"
JAVA_OPTS="$JAVA_OPTS -Xloggc:/home/admin/logs/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintAdaptiveSizePolicy -XX:+PrintTenuringDistribution -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100m -verbose:gc -XX:+DisableExplicitGC"
# other
diff --git a/server/apm/apm-server/apm-receiver/src/main/java/io/holoinsight/server/apm/receiver/analysis/SlowSqlAnalysis.java b/server/apm/apm-server/apm-receiver/src/main/java/io/holoinsight/server/apm/receiver/analysis/SlowSqlAnalysis.java
index b3e5f24a5..d61192a9f 100644
--- a/server/apm/apm-server/apm-receiver/src/main/java/io/holoinsight/server/apm/receiver/analysis/SlowSqlAnalysis.java
+++ b/server/apm/apm-server/apm-receiver/src/main/java/io/holoinsight/server/apm/receiver/analysis/SlowSqlAnalysis.java
@@ -6,7 +6,7 @@
import io.holoinsight.server.apm.common.constants.Const;
import io.holoinsight.server.apm.common.utils.TimeUtils;
import io.holoinsight.server.apm.engine.model.SlowSqlDO;
-import io.holoinsight.server.common.trace.TraceAgentConfiguration;
+import io.holoinsight.server.common.dao.entity.dto.TraceAgentConfigurationDTO;
import io.holoinsight.server.common.trace.TraceAgentConfigurationScheduler;
import io.opentelemetry.proto.trace.v1.Span;
import io.opentelemetry.semconv.resource.attributes.ResourceAttributes;
@@ -46,10 +46,10 @@ public List analysis(Span span, Map spanAttrMap,
- TimeUtils.unixNano2MS(span.getStartTimeUnixNano());
long slowSqlThreshold = Const.SLOW_SQL_THRESHOLD;
// Get slow sql dynamic threshold from cache
- TraceAgentConfiguration configuration =
+ TraceAgentConfigurationDTO configuration =
agentConfigurationScheduler.getValue(tenant, service, getExtendInfo(spanAttrMap));
if (configuration != null) {
- slowSqlThreshold = Long.parseLong(configuration.getConfiguration()
+ slowSqlThreshold = Long.parseLong((String) configuration.getConfiguration()
.getOrDefault(Const.SLOW_SQL_THRESHOLD_CONFIG, String.valueOf(slowSqlThreshold)));
}
if (latency < slowSqlThreshold) {
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/DisplayMenuConverter.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/DisplayMenuConverter.java
similarity index 68%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/DisplayMenuConverter.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/DisplayMenuConverter.java
index fb14c1309..5bfa53f45 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/DisplayMenuConverter.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/DisplayMenuConverter.java
@@ -1,11 +1,11 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.converter;
+package io.holoinsight.server.common.dao.converter;
-import io.holoinsight.server.home.dal.model.DisplayMenu;
-import io.holoinsight.server.home.dal.model.dto.DisplayMenuDTO;
-import io.holoinsight.server.home.dal.transformer.DisplayMenuConfigMapper;
+import io.holoinsight.server.common.dao.entity.DisplayMenu;
+import io.holoinsight.server.common.dao.entity.dto.DisplayMenuDTO;
+import io.holoinsight.server.common.dao.transformer.DisplayMenuConfigMapper;
import org.mapstruct.Mapper;
import java.util.List;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/DisplayTemplateConverter.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/DisplayTemplateConverter.java
similarity index 78%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/DisplayTemplateConverter.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/DisplayTemplateConverter.java
index 26ad99e5f..c1253c7f3 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/DisplayTemplateConverter.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/DisplayTemplateConverter.java
@@ -1,10 +1,10 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.converter;
+package io.holoinsight.server.common.dao.converter;
-import io.holoinsight.server.home.dal.model.DisplayTemplate;
-import io.holoinsight.server.home.dal.model.dto.DisplayTemplateDTO;
+import io.holoinsight.server.common.dao.entity.DisplayTemplate;
+import io.holoinsight.server.common.dao.entity.dto.DisplayTemplateDTO;
import io.holoinsight.server.common.dao.transformer.MapJsonMapper;
import org.mapstruct.Mapper;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/IntegrationGeneratedConverter.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/IntegrationGeneratedConverter.java
similarity index 74%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/IntegrationGeneratedConverter.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/IntegrationGeneratedConverter.java
index 833b5ae5a..4fa958d7b 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/IntegrationGeneratedConverter.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/IntegrationGeneratedConverter.java
@@ -1,10 +1,10 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.converter;
+package io.holoinsight.server.common.dao.converter;
-import io.holoinsight.server.home.dal.model.IntegrationGenerated;
-import io.holoinsight.server.home.dal.model.dto.IntegrationGeneratedDTO;
+import io.holoinsight.server.common.dao.entity.IntegrationGenerated;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationGeneratedDTO;
import io.holoinsight.server.common.dao.transformer.MapJsonMapper;
import org.mapstruct.Mapper;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/IntegrationPluginConverter.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/IntegrationPluginConverter.java
similarity index 63%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/IntegrationPluginConverter.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/IntegrationPluginConverter.java
index a2b62f4b4..72d79b4f5 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/IntegrationPluginConverter.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/IntegrationPluginConverter.java
@@ -1,14 +1,14 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.converter;
+package io.holoinsight.server.common.dao.converter;
import io.holoinsight.server.common.J;
-import io.holoinsight.server.home.dal.model.IntegrationPlugin;
-import io.holoinsight.server.home.dal.model.dto.GaeaCollectConfigDTO.CollectRange;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
-import io.holoinsight.server.home.dal.transformer.GaeaCollectRangeMapper;
-import io.holoinsight.server.home.dal.transformer.JsonObjectMapper;
+import io.holoinsight.server.common.dao.entity.GaeaCollectRange;
+import io.holoinsight.server.common.dao.entity.IntegrationPlugin;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.transformer.GaeaCollectRangeMapper;
+import io.holoinsight.server.common.dao.transformer.JsonObjectMapper;
import io.holoinsight.server.common.dao.transformer.MapJsonMapper;
import org.apache.commons.lang3.StringUtils;
import org.mapstruct.Mapper;
@@ -25,7 +25,7 @@ public interface IntegrationPluginConverter {
List dosToDTOs(Iterable integrationPlugins);
- default String map(CollectRange value) {
+ default String map(GaeaCollectRange value) {
if (value == null) {
return StringUtils.EMPTY;
}
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/IntegrationProductConverter.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/IntegrationProductConverter.java
similarity index 54%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/IntegrationProductConverter.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/IntegrationProductConverter.java
index 57c580292..8c8c32f56 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/IntegrationProductConverter.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/IntegrationProductConverter.java
@@ -1,19 +1,19 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.converter;
+package io.holoinsight.server.common.dao.converter;
-import io.holoinsight.server.home.dal.model.IntegrationProduct;
-import io.holoinsight.server.home.dal.model.dto.IntegrationProductDTO;
-import io.holoinsight.server.home.dal.transformer.FormJsonMapper;
+import io.holoinsight.server.common.dao.entity.IntegrationProduct;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationProductDTO;
+import io.holoinsight.server.common.dao.transformer.IntegrationFormJsonMapper;
import io.holoinsight.server.common.dao.transformer.MapJsonMapper;
-import io.holoinsight.server.home.dal.transformer.MetricJsonMapper;
+import io.holoinsight.server.common.dao.transformer.MetricJsonMapper;
import org.mapstruct.Mapper;
import java.util.List;
@Mapper(componentModel = "spring",
- uses = {MetricJsonMapper.class, MapJsonMapper.class, FormJsonMapper.class})
+ uses = {MetricJsonMapper.class, MapJsonMapper.class, IntegrationFormJsonMapper.class})
public interface IntegrationProductConverter {
IntegrationProductDTO doToDTO(IntegrationProduct IntegrationProduct);
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/MarketplacePluginConverter.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/MarketplacePluginConverter.java
similarity index 65%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/MarketplacePluginConverter.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/MarketplacePluginConverter.java
index 0ba883c36..de6a22c97 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/MarketplacePluginConverter.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/MarketplacePluginConverter.java
@@ -1,15 +1,15 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.converter;
+package io.holoinsight.server.common.dao.converter;
import java.util.List;
+import io.holoinsight.server.common.dao.transformer.JsonObjectMapper;
import org.mapstruct.Mapper;
-import io.holoinsight.server.home.dal.model.MarketplacePlugin;
-import io.holoinsight.server.home.dal.model.dto.MarketplacePluginDTO;
-import io.holoinsight.server.home.dal.transformer.JsonObjectMapper;
+import io.holoinsight.server.common.dao.entity.MarketplacePlugin;
+import io.holoinsight.server.common.dao.entity.dto.MarketplacePluginDTO;
@Mapper(componentModel = "spring", uses = {JsonObjectMapper.class})
public interface MarketplacePluginConverter {
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/MarketplaceProductConverter.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/MarketplaceProductConverter.java
similarity index 56%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/MarketplaceProductConverter.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/MarketplaceProductConverter.java
index 07ba98bfb..2073acc0c 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/MarketplaceProductConverter.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/MarketplaceProductConverter.java
@@ -1,18 +1,18 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.converter;
+package io.holoinsight.server.common.dao.converter;
import java.util.List;
+import io.holoinsight.server.common.dao.transformer.IntegrationFormJsonMapper;
import org.mapstruct.Mapper;
-import io.holoinsight.server.home.dal.model.MarketplaceProduct;
-import io.holoinsight.server.home.dal.model.dto.MarketplaceProductDTO;
-import io.holoinsight.server.home.dal.transformer.FormJsonMapper;
-import io.holoinsight.server.home.dal.transformer.MetricJsonMapper;
+import io.holoinsight.server.common.dao.entity.MarketplaceProduct;
+import io.holoinsight.server.common.dao.entity.dto.MarketplaceProductDTO;
+import io.holoinsight.server.common.dao.transformer.MetricJsonMapper;
-@Mapper(componentModel = "spring", uses = {MetricJsonMapper.class, FormJsonMapper.class})
+@Mapper(componentModel = "spring", uses = {MetricJsonMapper.class, IntegrationFormJsonMapper.class})
public interface MarketplaceProductConverter {
MarketplaceProductDTO doToDTO(MarketplaceProduct MarketplaceProduct);
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/MetaTableConverter.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/MetaTableConverter.java
similarity index 57%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/MetaTableConverter.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/MetaTableConverter.java
index ad8528721..9e8ba07de 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/MetaTableConverter.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/MetaTableConverter.java
@@ -1,12 +1,12 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.converter;
+package io.holoinsight.server.common.dao.converter;
-import io.holoinsight.server.home.dal.model.MetaTable;
-import io.holoinsight.server.home.dal.model.dto.MetaTableDTO;
-import io.holoinsight.server.home.dal.transformer.MetaTableConfigMapper;
-import io.holoinsight.server.home.dal.transformer.MetaTableSchemaMapper;
+import io.holoinsight.server.common.dao.entity.MetaTable;
+import io.holoinsight.server.common.dao.entity.dto.MetaTableDTO;
+import io.holoinsight.server.common.dao.transformer.MetaTableConfigMapper;
+import io.holoinsight.server.common.dao.transformer.MetaTableSchemaMapper;
import org.mapstruct.Mapper;
import java.util.List;
diff --git a/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/MonitorInstanceConfigConverter.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/MonitorInstanceConfigConverter.java
new file mode 100644
index 000000000..9ef1144b7
--- /dev/null
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/MonitorInstanceConfigConverter.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
+ */
+
+package io.holoinsight.server.common.dao.converter;
+
+import io.holoinsight.server.common.dao.entity.MonitorInstance;
+import io.holoinsight.server.common.dao.entity.dto.MonitorInstanceDTO;
+import io.holoinsight.server.common.dao.transformer.MonitorInstanceCfgMapper;
+import org.mapstruct.Mapper;
+
+import java.util.List;
+
+/**
+ * @author jsy1001de
+ * @version 1.0: MonitorInstanceConfigConverter.java, Date: 2024-06-03 Time: 11:05
+ */
+@Mapper(componentModel = "spring", uses = {MonitorInstanceCfgMapper.class})
+public interface MonitorInstanceConfigConverter {
+ MonitorInstanceDTO doToDTO(MonitorInstance monitorInstance);
+
+ MonitorInstance dtoToDO(MonitorInstanceDTO monitorInstanceDTO);
+
+ List dosToDTOs(Iterable monitorInstances);
+}
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/TenantOpsConverter.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/TenantOpsConverter.java
similarity index 92%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/TenantOpsConverter.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/TenantOpsConverter.java
index 9b8c2deb4..1b5cccb6a 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/TenantOpsConverter.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/converter/TenantOpsConverter.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.converter;
+package io.holoinsight.server.common.dao.converter;
import io.holoinsight.server.common.dao.entity.TenantOps;
import io.holoinsight.server.common.dao.entity.dto.TenantOpsDTO;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/CustomPluginPeriodType.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/emuns/CustomPluginPeriodType.java
similarity index 92%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/CustomPluginPeriodType.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/emuns/CustomPluginPeriodType.java
index 3c4174e70..e94baf8ef 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/CustomPluginPeriodType.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/emuns/CustomPluginPeriodType.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto;
+package io.holoinsight.server.common.dao.emuns;
/**
*
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/CloudMonitorRange.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/CloudMonitorRange.java
similarity index 96%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/CloudMonitorRange.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/CloudMonitorRange.java
index 64f013e7c..616921683 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/CloudMonitorRange.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/CloudMonitorRange.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto;
+package io.holoinsight.server.common.dao.entity;
import lombok.Data;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/Dashboard.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/Dashboard.java
similarity index 94%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/Dashboard.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/Dashboard.java
index 5d6be6195..6129a1654 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/Dashboard.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/Dashboard.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model;
+package io.holoinsight.server.common.dao.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/DisplayMenu.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/DisplayMenu.java
similarity index 92%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/DisplayMenu.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/DisplayMenu.java
index 2015b2965..0794353e4 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/DisplayMenu.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/DisplayMenu.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model;
+package io.holoinsight.server.common.dao.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/DisplayTemplate.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/DisplayTemplate.java
similarity index 93%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/DisplayTemplate.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/DisplayTemplate.java
index fcb9515d2..9b7811406 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/DisplayTemplate.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/DisplayTemplate.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model;
+package io.holoinsight.server.common.dao.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/Folder.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/Folder.java
similarity index 93%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/Folder.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/Folder.java
index e9339e768..9c4cced99 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/Folder.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/Folder.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model;
+package io.holoinsight.server.common.dao.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
diff --git a/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/GaeaCollectRange.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/GaeaCollectRange.java
new file mode 100644
index 000000000..7a8f14d36
--- /dev/null
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/GaeaCollectRange.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
+ */
+
+package io.holoinsight.server.common.dao.entity;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * @author jsy1001de
+ * @version 1.0: GaeaCollectRange.java, Date: 2024-06-14 Time: 14:20
+ */
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class GaeaCollectRange implements Serializable {
+ private static final long serialVersionUID = -2140563386879600142L;
+
+ public String type;
+ public CloudMonitorRange cloudmonitor;
+
+ public boolean isEqual(GaeaCollectRange originalRecord) {
+ if ((originalRecord == null)
+ || (this.cloudmonitor == null && originalRecord.cloudmonitor != null)
+ || (this.cloudmonitor != null && originalRecord.cloudmonitor == null)) {
+ return false;
+ }
+ return this.cloudmonitor.isEqual(originalRecord.cloudmonitor);
+ }
+}
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/IntegrationGenerated.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/IntegrationGenerated.java
similarity index 93%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/IntegrationGenerated.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/IntegrationGenerated.java
index 228981daf..2cdffaeff 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/IntegrationGenerated.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/IntegrationGenerated.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model;
+package io.holoinsight.server.common.dao.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/IntegrationPlugin.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/IntegrationPlugin.java
similarity index 93%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/IntegrationPlugin.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/IntegrationPlugin.java
index 0abf30734..b95ee952c 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/IntegrationPlugin.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/IntegrationPlugin.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model;
+package io.holoinsight.server.common.dao.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/IntegrationProduct.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/IntegrationProduct.java
similarity index 94%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/IntegrationProduct.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/IntegrationProduct.java
index 859a93453..216ec2fbd 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/IntegrationProduct.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/IntegrationProduct.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model;
+package io.holoinsight.server.common.dao.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/MarketplacePlugin.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/MarketplacePlugin.java
similarity index 94%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/MarketplacePlugin.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/MarketplacePlugin.java
index 619c3311e..ce4c49547 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/MarketplacePlugin.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/MarketplacePlugin.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model;
+package io.holoinsight.server.common.dao.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/MarketplaceProduct.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/MarketplaceProduct.java
similarity index 94%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/MarketplaceProduct.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/MarketplaceProduct.java
index d07e08b69..5c347b39e 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/MarketplaceProduct.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/MarketplaceProduct.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model;
+package io.holoinsight.server.common.dao.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/MetaTable.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/MetaTable.java
similarity index 83%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/MetaTable.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/MetaTable.java
index 8efced819..46aea6dca 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/MetaTable.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/MetaTable.java
@@ -1,13 +1,13 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model;
+package io.holoinsight.server.common.dao.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
-import javax.persistence.Table;
import java.util.Date;
/**
@@ -16,7 +16,7 @@
* @version 1.0: MetaTable.java, v 0.1 2022年03月22日 11:34 上午 jinsong.yjs Exp $
*/
@Data
-@Table(name = "meta_table")
+@TableName("meta_table")
public class MetaTable {
@TableId(type = IdType.AUTO)
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/TraceAgentConfProp.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/TraceAgentConfProp.java
similarity index 69%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/TraceAgentConfProp.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/TraceAgentConfProp.java
index 8f0a6bf18..10ae23457 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/TraceAgentConfProp.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/TraceAgentConfProp.java
@@ -1,28 +1,21 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model;
+package io.holoinsight.server.common.dao.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
-import javax.persistence.Column;
@Data
@TableName("trace_agent_configuration_properties")
public class TraceAgentConfProp {
private String type;
private String language;
- @Column(name = "prop_key")
private String propKey;
private String name;
- @Column(name = "c_name")
private String cName;
private String description;
- @Column(name = "c_description")
private String cDescription;
- @Column(name = "check_expression")
private String checkExpression;
-
-
}
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/TraceAgentConfiguration.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/TraceAgentConfiguration.java
similarity index 77%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/TraceAgentConfiguration.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/TraceAgentConfiguration.java
index 6cd394624..5cb5a7617 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/TraceAgentConfiguration.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/TraceAgentConfiguration.java
@@ -1,12 +1,11 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model;
+package io.holoinsight.server.common.dao.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
-import javax.persistence.Column;
import java.util.Date;
@Data
@@ -20,10 +19,8 @@ public class TraceAgentConfiguration {
private String creator;
private String modifier;
- @Column(name = "gmt_create")
private Date gmtCreate;
- @Column(name = "gmt_modified")
private Date gmtModified;
}
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/UserinfoVerification.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/UserinfoVerification.java
similarity index 59%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/UserinfoVerification.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/UserinfoVerification.java
index b710c70cd..17814c81f 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/UserinfoVerification.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/UserinfoVerification.java
@@ -1,14 +1,13 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model;
+package io.holoinsight.server.common.dao.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
-import javax.persistence.Column;
-import javax.persistence.Table;
import java.util.Date;
/**
@@ -16,7 +15,7 @@
* @version 2023-06-07 19:01:00
*/
@Data
-@Table(name = "userinfo_verification")
+@TableName("userinfo_verification")
public class UserinfoVerification {
/**
* id
@@ -24,36 +23,25 @@ public class UserinfoVerification {
@TableId(type = IdType.AUTO)
private Long id;
- @Column(name = "gmt_create")
private Date gmtCreate;
- @Column(name = "gmt_modified")
private Date gmtModified;
- @Column(name = "code")
private String code;
- @Column(name = "verification_content")
private String verificationContent;
- @Column(name = "content_type")
private String contentType;
- @Column(name = "status")
public String status;
- @Column(name = "expire_timestamp")
private Long expireTimestamp;
- @Column(name = "tenant")
private String tenant;
- @Column(name = "workspace")
private String workspace;
- @Column(name = "creator")
public String creator;
- @Column(name = "modifier")
private String modifier;
}
diff --git a/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/AlertTemplateField.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/AlertTemplateField.java
index ccc55bef1..6b46f90d8 100644
--- a/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/AlertTemplateField.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/AlertTemplateField.java
@@ -8,47 +8,62 @@
* @version 2023-02-21 17:09:00
*/
public enum AlertTemplateField {
- ALERT_TRACE_ID("ALERT_TRACE_ID", "告警traceId", "string"), //
- ALERT_ID("ALERT_ID", "告警结果id", "string"), //
- ruleId("ruleId", "告警规则id", "string"), //
- uniqueId("uniqueId", "规则类型+规则id", "string"), //
- ALERT_METRIC("ALERT_METRIC", "告警指标", "string"), //
- metric("metric", "告警指标", "string", true), //
+ TENANT("TENANT", "租户", "string"), //
+ WORKSPACE("WORKSPACE", "空间", "string"), //
+ ALERT_RULE_UNIQUE_ID("ALERT_RULE_UNIQUE_ID", "规则类型+规则id", "string"), //
+ ALERT_TITLE("ALERT_TITLE", "告警名称", "string"), //
+ ALERT_RULE_ID("RULE_ID", "告警规则id", "string"), //
+ ALERT_HISTORY_ID("ALERT_HISTORY_ID", "告警历史id", "string"), //
+ ALERT_ID("ALERT_ID", "告警明细历史id", "string"), //
+ SOURCE_TYPE("SOURCE_TYPE", "告警来源类型", "string"), //
ALERT_PRIORITY("ALERT_PRIORITY", "告警等级", "string"), //
- alarmLevel("alarmLevel", "告警等级", "string", true), //
+
+ RULE_NAME("RULE_NAME", "规则名称", "string"), //
+ ALERT_TYPE("ALERT_TYPE", "告警类型", "string"), //
+ EVENT_TYPE("EVENT_TYPE", "指标类型", "string"), //
+
+ ALERT_METRIC("ALERT_METRIC", "告警指标", "string"), //
+
+ ALERT_TRACE_ID("ALERT_TRACE_ID", "告警traceId", "string"), //
+
+ ALERT_TRIGGER_CONDITION("ALERT_TRIGGER_CONDITION", "告警触发条件", "string"), //
+ LOG_CONTENT("LOG_CONTENT", "告警来源日志采样内容", "string"), //
+
ALERT_QUERY("ALERT_QUERY", "告警数据源查询", "string"), //
ALERT_SCOPE("ALERT_SCOPE", "告警对象", "string"), //
- alarmTags("alarmTags", "告警对象", "string", true), //
ALERT_STATUS("ALERT_STATUS", "告警检测概要", "string"), //
ALERT_DURATION("ALERT_DURATION", "持续时间(单位:sec)", "numeric"), //
ALERT_VALUE("ALERT_VALUE", "告警触发数值", "numeric"), //
- ALERT_TITLE("ALERT_TITLE", "告警名称", "string"), //
- ruleName("ruleName", "规则名称", "string"), //
- ALERT_TYPE("ALERT_TYPE", "告警类型", "string"), //
+
DATE("DATE", "告警时间(yyyy-MM-dd HH:mm:ss)", "string"), //
ALERT_START_TIME("ALERT_START_TIME", "告警首次触发时间(yyyy-MM-dd HH:mm:ss)", "string"), //
- alarmTime("alarmTime", "告警时间(yyyy-MM-dd HH:mm:ss)", "string", true), //
- alertTimestamp("alertTimestamp", "告警时间戳(Example: 1406662672000)", "numeric"), //
- alarmTimestamp("alarmTimestamp", "告警时间戳(Example: 1406662672000)", "numeric", true), //
+ AGGREGATION_NUM("AGGREGATION_NUM", "告警聚合数量", "numeric"), //
+
EVENT_MSG("EVENT_MSG", "告警内容", "string"), //
- alarmContent("alarmContent", "告警内容", "string", true), //
- EVENT_TYPE("EVENT_TYPE", "指标类型", "string"), //
HOSTNAME("HOSTNAME", "告警计算节点", "string"), //
IP("IP", "告警计算节点ip", "string"), //
ALERT_ATTACHMENTS("ALERT_ATTACHMENTS", "告警付文(json)", "string"), //
LINK("LINK", "监控链接", "string"), //
- ruleUrl("ruleUrl", "告警规则链接", "string"), //
- TENANT("TENANT", "租户", "string"), //
- tenant("tenant", "租户", "string", true), //
- WORKSPACE("WORKSPACE", "workspace", "string"), //
- aggregationNum("aggregationNum", "告警聚合数量", "numeric"), //
- ALERT_TRIGGER_CONDITION("ALERT_TRIGGER_CONDITION", "告警触发条件", "string"), //
- SOURCE_TYPE("SOURCE_TYPE", "告警来源类型", "string"), //
- LOG_CONTENT("LOG_CONTENT", "告警来源日志采样内容", "string"), //
+
TENANT_NAME("TENANT_NAME", "租户名", "string"), //
WORKSPACE_NAME("WORKSPACE_NAME", "工作空间名", "string"), //
PID("PID", "pid", "string"), //
+ tenant("tenant", "租户", "string", true), //
+ ruleUrl("ruleUrl", "告警规则链接", "string"), //
+ ruleName("ruleName", "规则名称", "string"), //
+
+ ruleId("ruleId", "告警规则id", "string"), //
+ uniqueId("uniqueId", "规则类型+规则id", "string"), //
+ metric("metric", "告警指标", "string", true), //
+ alarmLevel("alarmLevel", "告警等级", "string", true), //
+ alarmTags("alarmTags", "告警对象", "string", true), //
+ alarmTime("alarmTime", "告警时间(yyyy-MM-dd HH:mm:ss)", "string", true), //
+ alertTimestamp("alertTimestamp", "告警时间戳(Example: 1406662672000)", "numeric"), //
+ alarmTimestamp("alarmTimestamp", "告警时间戳(Example: 1406662672000)", "numeric", true), //
+ alarmContent("alarmContent", "告警内容", "string", true), //
+ aggregationNum("aggregationNum", "告警聚合数量", "numeric"), //
+
;
private String fieldName;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/DashboardDTO.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/DashboardDTO.java
similarity index 88%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/DashboardDTO.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/DashboardDTO.java
index 1d5576368..393a3ee0d 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/DashboardDTO.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/DashboardDTO.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto;
+package io.holoinsight.server.common.dao.entity.dto;
import lombok.Data;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/DisplayMenuConfig.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/DisplayMenuConfig.java
similarity index 90%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/DisplayMenuConfig.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/DisplayMenuConfig.java
index f9423b4ab..8ef7869da 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/DisplayMenuConfig.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/DisplayMenuConfig.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto;
+package io.holoinsight.server.common.dao.entity.dto;
import lombok.Data;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/DisplayMenuDTO.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/DisplayMenuDTO.java
similarity index 91%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/DisplayMenuDTO.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/DisplayMenuDTO.java
index b07552f54..700e9dc48 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/DisplayMenuDTO.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/DisplayMenuDTO.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto;
+package io.holoinsight.server.common.dao.entity.dto;
import lombok.Data;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/DisplayTemplateDTO.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/DisplayTemplateDTO.java
similarity index 91%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/DisplayTemplateDTO.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/DisplayTemplateDTO.java
index a2fffdcd5..7c3d2256c 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/DisplayTemplateDTO.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/DisplayTemplateDTO.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto;
+package io.holoinsight.server.common.dao.entity.dto;
import lombok.Data;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationConfig.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationConfig.java
similarity index 74%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationConfig.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationConfig.java
index 19a1cdc30..2a0d82427 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationConfig.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationConfig.java
@@ -1,8 +1,9 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto;
+package io.holoinsight.server.common.dao.entity.dto;
+import io.holoinsight.server.common.dao.emuns.CustomPluginPeriodType;
import lombok.Data;
/**
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationConfigDTO.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationConfigDTO.java
similarity index 85%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationConfigDTO.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationConfigDTO.java
index a567d19f2..d4faaa6a6 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationConfigDTO.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationConfigDTO.java
@@ -2,7 +2,7 @@
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto;
+package io.holoinsight.server.common.dao.entity.dto;
import lombok.Data;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationFormDTO.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationFormDTO.java
similarity index 90%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationFormDTO.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationFormDTO.java
index d2212fb03..3062e95fe 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationFormDTO.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationFormDTO.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto;
+package io.holoinsight.server.common.dao.entity.dto;
import lombok.Data;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationFormInfoDTO.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationFormInfoDTO.java
similarity index 90%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationFormInfoDTO.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationFormInfoDTO.java
index 7747c021a..abfc45e76 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationFormInfoDTO.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationFormInfoDTO.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto;
+package io.holoinsight.server.common.dao.entity.dto;
import lombok.Data;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationGeneratedDTO.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationGeneratedDTO.java
similarity index 93%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationGeneratedDTO.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationGeneratedDTO.java
index 43973679c..2d79c02fd 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationGeneratedDTO.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationGeneratedDTO.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto;
+package io.holoinsight.server.common.dao.entity.dto;
import lombok.Data;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationMetricDTO.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationMetricDTO.java
similarity index 90%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationMetricDTO.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationMetricDTO.java
index 07caa0d3a..9e6ea292b 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationMetricDTO.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationMetricDTO.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto;
+package io.holoinsight.server.common.dao.entity.dto;
import lombok.AllArgsConstructor;
import lombok.Data;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationMetricsDTO.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationMetricsDTO.java
similarity index 87%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationMetricsDTO.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationMetricsDTO.java
index 57ed71780..d3673e67d 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationMetricsDTO.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationMetricsDTO.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto;
+package io.holoinsight.server.common.dao.entity.dto;
import lombok.Data;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationPluginDTO.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationPluginDTO.java
similarity index 92%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationPluginDTO.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationPluginDTO.java
index 9419156a0..754899cc2 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationPluginDTO.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationPluginDTO.java
@@ -1,9 +1,10 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto;
+package io.holoinsight.server.common.dao.entity.dto;
import io.holoinsight.server.common.MD5Hash;
+import io.holoinsight.server.common.dao.entity.GaeaCollectRange;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -70,7 +71,7 @@ public boolean checkJsonChange(IntegrationPluginDTO originalRecord) {
@Data
@NoArgsConstructor
@AllArgsConstructor
- public static class DataRange extends GaeaCollectConfigDTO.CollectRange {
+ public static class DataRange extends GaeaCollectRange {
Map valuesMap = new HashMap<>();
Map extraMap = new HashMap<>();
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationProductDTO.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationProductDTO.java
similarity index 93%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationProductDTO.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationProductDTO.java
index 9bf729a13..87e39ecff 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/IntegrationProductDTO.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/IntegrationProductDTO.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto;
+package io.holoinsight.server.common.dao.entity.dto;
import lombok.Data;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/InterfaceTypeEnum.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/InterfaceTypeEnum.java
similarity index 95%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/InterfaceTypeEnum.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/InterfaceTypeEnum.java
index c37ac134d..429b78dd2 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/InterfaceTypeEnum.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/InterfaceTypeEnum.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto;
+package io.holoinsight.server.common.dao.entity.dto;
/**
* 接口类型
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/MarketplacePluginDTO.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/MarketplacePluginDTO.java
similarity index 92%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/MarketplacePluginDTO.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/MarketplacePluginDTO.java
index a5a91c855..821574318 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/MarketplacePluginDTO.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/MarketplacePluginDTO.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto;
+package io.holoinsight.server.common.dao.entity.dto;
import lombok.Data;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/MarketplaceProductDTO.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/MarketplaceProductDTO.java
similarity index 92%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/MarketplaceProductDTO.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/MarketplaceProductDTO.java
index ebc2ef2a3..b019b5e0a 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/MarketplaceProductDTO.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/MarketplaceProductDTO.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto;
+package io.holoinsight.server.common.dao.entity.dto;
import lombok.Data;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/MetaTableDTO.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/MetaTableDTO.java
similarity index 79%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/MetaTableDTO.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/MetaTableDTO.java
index 582cd92bc..87f62c5f7 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/MetaTableDTO.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/MetaTableDTO.java
@@ -1,10 +1,10 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto;
+package io.holoinsight.server.common.dao.entity.dto;
-import io.holoinsight.server.home.dal.model.dto.meta.MetaTableCol;
-import io.holoinsight.server.home.dal.model.dto.meta.MetaTableConfig;
+import io.holoinsight.server.common.dao.entity.dto.meta.MetaTableCol;
+import io.holoinsight.server.common.dao.entity.dto.meta.MetaTableConfig;
import lombok.Data;
import java.util.Date;
diff --git a/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/MonitorInstanceDTO.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/MonitorInstanceDTO.java
new file mode 100644
index 000000000..45396d940
--- /dev/null
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/MonitorInstanceDTO.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
+ */
+
+package io.holoinsight.server.common.dao.entity.dto;
+
+import io.holoinsight.server.common.dao.entity.MonitorInstanceCfg;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @author jsy1001de
+ * @version 1.0: MonitorInstanceDTO.java, Date: 2024-06-03 Time: 11:04
+ */
+@Data
+public class MonitorInstanceDTO {
+
+ private Long id;
+
+ /**
+ * 创建时间
+ */
+ private Date gmtCreate;
+
+ /**
+ * 修改时间
+ */
+ private Date gmtModified;
+
+ /**
+ * 实例标识
+ */
+ private String instance;
+
+ private String instanceName;
+ private String instanceType;
+ private String instanceInfo;
+
+ /**
+ * 实例类型
+ */
+ private String type;
+
+ /**
+ * 租户
+ */
+ private String tenant;
+
+ /**
+ * 租户名称
+ */
+ private String tenantName;
+
+ /**
+ * 工作空间
+ */
+ private String workspace;
+
+ /**
+ * 工作空间名称
+ */
+ private String workspaceName;
+
+ /**
+ * 计量状态
+ */
+ private int meterState;
+
+ /**
+ * 计费状态
+ */
+ private int billingState;
+
+ /**
+ * 扩展配置
+ */
+ private MonitorInstanceCfg config;
+
+ /**
+ * 软删除标记
+ */
+ private boolean deleted;
+}
diff --git a/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/NotificationTemplate.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/NotificationTemplate.java
index 4175bc89b..60be5119e 100644
--- a/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/NotificationTemplate.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/NotificationTemplate.java
@@ -27,34 +27,16 @@ public class NotificationTemplate {
public LinkedHashMap tagMap = new LinkedHashMap<>();
public String text;
- public static NotificationTemplate defaultWebhookTemplate() {
- NotificationTemplate template = new NotificationTemplate();
- template.fieldMap = new LinkedHashMap<>();
- template.fieldMap.put("uniqueId", AlertTemplateField.uniqueId);
- template.fieldMap.put("ruleId", AlertTemplateField.ruleId);
- template.fieldMap.put("ruleName", AlertTemplateField.ruleName);
- template.fieldMap.put("alarmTime", AlertTemplateField.DATE);
- template.fieldMap.put("alarmLevel", AlertTemplateField.ALERT_PRIORITY);
- template.fieldMap.put("alarmContent", AlertTemplateField.EVENT_MSG);
- template.fieldMap.put("alarmTenant", AlertTemplateField.TENANT);
- template.fieldMap.put("metric", AlertTemplateField.ALERT_METRIC);
- template.fieldMap.put("alarmTags", AlertTemplateField.ALERT_SCOPE);
- template.fieldMap.put("aggregationNum", AlertTemplateField.aggregationNum);
- template.fieldMap.put("alarmUrl", AlertTemplateField.ruleUrl);
- template.fieldMap.put("link", AlertTemplateField.LINK);
- template.text = template.getTemplateJson();
- return template;
- }
public static NotificationTemplate defaultDingtalkTemplate() {
NotificationTemplate template = new NotificationTemplate();
template.fieldMap = new LinkedHashMap<>();
- template.fieldMap.put("告警规则名称", AlertTemplateField.ruleName);
+ template.fieldMap.put("告警规则名称", AlertTemplateField.RULE_NAME);
template.fieldMap.put("告警严重度", AlertTemplateField.ALERT_PRIORITY);
template.fieldMap.put("告警内容", AlertTemplateField.EVENT_MSG);
template.fieldMap.put("告警对象", AlertTemplateField.ALERT_SCOPE);
template.fieldMap.put("告警首次触发时间", AlertTemplateField.ALERT_START_TIME);
- template.fieldMap.put("此次评估触发时间", AlertTemplateField.alarmTime);
+ template.fieldMap.put("此次评估触发时间", AlertTemplateField.DATE);
template.fieldMap.put("告警触发数值", AlertTemplateField.ALERT_VALUE);
template.fieldMap.put("日志内容", AlertTemplateField.LOG_CONTENT);
template.text = template.getTemplateJson();
@@ -64,7 +46,7 @@ public static NotificationTemplate defaultDingtalkTemplate() {
public static NotificationTemplate defaultMiniappDingtalkTemplate(TemplateValue templateValue) {
NotificationTemplate template = new NotificationTemplate();
template.fieldMap = new LinkedHashMap<>();
- template.fieldMap.put("告警规则名称", AlertTemplateField.ruleName);
+ template.fieldMap.put("告警规则名称", AlertTemplateField.RULE_NAME);
template.fieldMap.put("PID", AlertTemplateField.PID);
template.fieldMap.put("租户名", AlertTemplateField.TENANT_NAME);
template.fieldMap.put("小程序名", AlertTemplateField.WORKSPACE_NAME);
@@ -72,9 +54,9 @@ public static NotificationTemplate defaultMiniappDingtalkTemplate(TemplateValue
template.fieldMap.put("告警内容", AlertTemplateField.EVENT_MSG);
template.fieldMap.put("告警对象", AlertTemplateField.ALERT_SCOPE);
template.fieldMap.put("告警首次触发时间", AlertTemplateField.ALERT_START_TIME);
- template.fieldMap.put("此次评估触发时间", AlertTemplateField.alarmTime);
+ template.fieldMap.put("此次评估触发时间", AlertTemplateField.DATE);
template.fieldMap.put("告警触发数值", AlertTemplateField.ALERT_VALUE);
- template.fieldMap.put("聚合条数", AlertTemplateField.aggregationNum);
+ template.fieldMap.put("聚合条数", AlertTemplateField.AGGREGATION_NUM);
template.fieldMap.put("告警来源", AlertTemplateField.SOURCE_TYPE);
if (templateValue != null && StringUtils.isNotEmpty(templateValue.getLogContent())) {
template.fieldMap.put("日志内容", AlertTemplateField.LOG_CONTENT);
@@ -142,10 +124,14 @@ private String getValue(TemplateValue templateValue, AlertTemplateField field,
switch (field) {
case ALERT_TRACE_ID:
return templateValue.getAlarmTraceId();
+ case ALERT_HISTORY_ID:
+ return String.valueOf(templateValue.getAlarmHistoryId());
case ALERT_ID:
return String.valueOf(templateValue.getAlarmHistoryDetailId());
+ case ALERT_RULE_ID:
case ruleId:
return templateValue.getRuleId();
+ case ALERT_RULE_UNIQUE_ID:
case uniqueId:
return templateValue.getUniqueId();
case ALERT_METRIC:
@@ -170,6 +156,7 @@ private String getValue(TemplateValue templateValue, AlertTemplateField field,
return getAlertValue(templateValue.getAlertValue());
case ALERT_TITLE:
return buildAlertTitle(templateValue.getRuleConfig());
+ case RULE_NAME:
case ruleName:
return templateValue.getRuleName();
case ALERT_TYPE:
@@ -195,8 +182,8 @@ private String getValue(TemplateValue templateValue, AlertTemplateField field,
return templateValue.getAlertIp();
case ALERT_ATTACHMENTS:
return buildAttachments();
- // case LINK:
- // return link;
+ case LINK:
+ // return link;
case ruleUrl:
return templateValue.getRuleUrl();
case TENANT:
@@ -204,6 +191,7 @@ private String getValue(TemplateValue templateValue, AlertTemplateField field,
return templateValue.getTenant();
case WORKSPACE:
return templateValue.getWorkspace();
+ case AGGREGATION_NUM:
case aggregationNum:
return templateValue.getAggregationNum();
case ALERT_TRIGGER_CONDITION:
diff --git a/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/TraceAgentConfigurationDTO.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/TraceAgentConfigurationDTO.java
new file mode 100644
index 000000000..f7adae22f
--- /dev/null
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/TraceAgentConfigurationDTO.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
+ */
+
+package io.holoinsight.server.common.dao.entity.dto;
+
+import io.holoinsight.server.common.Const;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author jsy1001de
+ * @version 1.0: TraceAgentConfigurationDTO.java, Date: 2024-06-14 Time: 16:41
+ */
+@Data
+@AllArgsConstructor
+public class TraceAgentConfigurationDTO {
+ private String tenant;
+ private String service;
+ private String type;
+ private String language;
+ private Map configuration;
+ private String creator;
+ private String modifier;
+
+ private Date gmtCreate;
+
+ private Date gmtModified;
+
+
+ public String getCacheKey() {
+ List cacheKeys = new ArrayList() {
+ {
+ add(tenant);
+ add(service);
+ }
+ };
+ if (!StringUtils.isEmpty(type)) {
+ cacheKeys.add(type);
+ }
+ if (!StringUtils.isEmpty(language)) {
+ cacheKeys.add(language);
+ }
+ return StringUtils.join(cacheKeys, Const.TRACE_AGENT_CONFIG_KEY_JOINER);
+ }
+}
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/meta/BaseMetaDTO.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/meta/BaseMetaDTO.java
similarity index 94%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/meta/BaseMetaDTO.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/meta/BaseMetaDTO.java
index fe35826ff..31abb013d 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/meta/BaseMetaDTO.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/meta/BaseMetaDTO.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto.meta;
+package io.holoinsight.server.common.dao.entity.dto.meta;
import lombok.Data;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/meta/MetaSourceEnum.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/meta/MetaSourceEnum.java
similarity index 81%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/meta/MetaSourceEnum.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/meta/MetaSourceEnum.java
index a80780be6..7ab9f6327 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/meta/MetaSourceEnum.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/meta/MetaSourceEnum.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto.meta;
+package io.holoinsight.server.common.dao.entity.dto.meta;
/**
*
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/meta/MetaStatusEnum.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/meta/MetaStatusEnum.java
similarity index 81%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/meta/MetaStatusEnum.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/meta/MetaStatusEnum.java
index 4febc5c85..0d6ffa7ea 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/meta/MetaStatusEnum.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/meta/MetaStatusEnum.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto.meta;
+package io.holoinsight.server.common.dao.entity.dto.meta;
/**
*
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/meta/MetaTableCol.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/meta/MetaTableCol.java
similarity index 85%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/meta/MetaTableCol.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/meta/MetaTableCol.java
index e79615398..01f808e31 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/meta/MetaTableCol.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/meta/MetaTableCol.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto.meta;
+package io.holoinsight.server.common.dao.entity.dto.meta;
import lombok.Data;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/meta/MetaTableConfig.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/meta/MetaTableConfig.java
similarity index 89%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/meta/MetaTableConfig.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/meta/MetaTableConfig.java
index c5b33f471..edba1efec 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/meta/MetaTableConfig.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/meta/MetaTableConfig.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto.meta;
+package io.holoinsight.server.common.dao.entity.dto.meta;
import lombok.Data;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/meta/TenantServerDTO.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/meta/TenantServerDTO.java
similarity index 90%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/meta/TenantServerDTO.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/meta/TenantServerDTO.java
index 5fa64f3bf..c062e0399 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/meta/TenantServerDTO.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/entity/dto/meta/TenantServerDTO.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.model.dto.meta;
+package io.holoinsight.server.common.dao.entity.dto.meta;
import lombok.Data;
import lombok.EqualsAndHashCode;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/DashboardMapper.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/DashboardMapper.java
similarity index 65%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/DashboardMapper.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/DashboardMapper.java
index 6e0f6d05f..b9af9f1ed 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/DashboardMapper.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/DashboardMapper.java
@@ -1,9 +1,9 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.mapper;
+package io.holoinsight.server.common.dao.mapper;
-import io.holoinsight.server.home.dal.model.Dashboard;
+import io.holoinsight.server.common.dao.entity.Dashboard;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface DashboardMapper extends BaseMapper {
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/DisplayMenuMapper.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/DisplayMenuMapper.java
similarity index 75%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/DisplayMenuMapper.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/DisplayMenuMapper.java
index a440aa042..881165e57 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/DisplayMenuMapper.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/DisplayMenuMapper.java
@@ -1,9 +1,9 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.mapper;
+package io.holoinsight.server.common.dao.mapper;
-import io.holoinsight.server.home.dal.model.DisplayMenu;
+import io.holoinsight.server.common.dao.entity.DisplayMenu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/DisplayTemplateMapper.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/DisplayTemplateMapper.java
similarity index 75%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/DisplayTemplateMapper.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/DisplayTemplateMapper.java
index c3fb253e9..2e64a1915 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/DisplayTemplateMapper.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/DisplayTemplateMapper.java
@@ -1,9 +1,9 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.mapper;
+package io.holoinsight.server.common.dao.mapper;
-import io.holoinsight.server.home.dal.model.DisplayTemplate;
+import io.holoinsight.server.common.dao.entity.DisplayTemplate;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/FolderMapper.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/FolderMapper.java
similarity index 75%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/FolderMapper.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/FolderMapper.java
index 6e654aeca..39ffcddfd 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/FolderMapper.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/FolderMapper.java
@@ -1,9 +1,9 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.mapper;
+package io.holoinsight.server.common.dao.mapper;
-import io.holoinsight.server.home.dal.model.Folder;
+import io.holoinsight.server.common.dao.entity.Folder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/IntegrationGeneratedMapper.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/IntegrationGeneratedMapper.java
similarity index 65%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/IntegrationGeneratedMapper.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/IntegrationGeneratedMapper.java
index 906e9947e..f9a6680f3 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/IntegrationGeneratedMapper.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/IntegrationGeneratedMapper.java
@@ -1,9 +1,9 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.mapper;
+package io.holoinsight.server.common.dao.mapper;
-import io.holoinsight.server.home.dal.model.IntegrationGenerated;
+import io.holoinsight.server.common.dao.entity.IntegrationGenerated;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface IntegrationGeneratedMapper extends BaseMapper {
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/IntegrationPluginMapper.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/IntegrationPluginMapper.java
similarity index 65%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/IntegrationPluginMapper.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/IntegrationPluginMapper.java
index 97a2a811a..22e889628 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/IntegrationPluginMapper.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/IntegrationPluginMapper.java
@@ -1,9 +1,9 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.mapper;
+package io.holoinsight.server.common.dao.mapper;
-import io.holoinsight.server.home.dal.model.IntegrationPlugin;
+import io.holoinsight.server.common.dao.entity.IntegrationPlugin;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface IntegrationPluginMapper extends BaseMapper {
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/IntegrationProductMapper.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/IntegrationProductMapper.java
similarity index 56%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/IntegrationProductMapper.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/IntegrationProductMapper.java
index 5c715a31a..604e03673 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/IntegrationProductMapper.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/IntegrationProductMapper.java
@@ -1,10 +1,9 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.mapper;
+package io.holoinsight.server.common.dao.mapper;
-import io.holoinsight.server.home.dal.model.IntegrationPlugin;
-import io.holoinsight.server.home.dal.model.IntegrationProduct;
+import io.holoinsight.server.common.dao.entity.IntegrationProduct;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface IntegrationProductMapper extends BaseMapper {
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/MarketplacePluginMapper.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/MarketplacePluginMapper.java
similarity index 75%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/MarketplacePluginMapper.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/MarketplacePluginMapper.java
index a5504b2e4..4b3d76749 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/MarketplacePluginMapper.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/MarketplacePluginMapper.java
@@ -1,9 +1,9 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.mapper;
+package io.holoinsight.server.common.dao.mapper;
-import io.holoinsight.server.home.dal.model.MarketplacePlugin;
+import io.holoinsight.server.common.dao.entity.MarketplacePlugin;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/MarketplaceProductMapper.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/MarketplaceProductMapper.java
similarity index 75%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/MarketplaceProductMapper.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/MarketplaceProductMapper.java
index a60f06e03..0455960a8 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/MarketplaceProductMapper.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/MarketplaceProductMapper.java
@@ -1,9 +1,9 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.mapper;
+package io.holoinsight.server.common.dao.mapper;
-import io.holoinsight.server.home.dal.model.MarketplaceProduct;
+import io.holoinsight.server.common.dao.entity.MarketplaceProduct;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/MetaTableMapper.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/MetaTableMapper.java
similarity index 75%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/MetaTableMapper.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/MetaTableMapper.java
index c76e4baf0..d7b9b0808 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/MetaTableMapper.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/MetaTableMapper.java
@@ -1,9 +1,9 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.mapper;
+package io.holoinsight.server.common.dao.mapper;
-import io.holoinsight.server.home.dal.model.MetaTable;
+import io.holoinsight.server.common.dao.entity.MetaTable;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/TraceAgentConfPropMapper.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/TraceAgentConfPropMapper.java
similarity index 65%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/TraceAgentConfPropMapper.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/TraceAgentConfPropMapper.java
index 57027668d..51bb94086 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/TraceAgentConfPropMapper.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/TraceAgentConfPropMapper.java
@@ -1,10 +1,10 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.mapper;
+package io.holoinsight.server.common.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import io.holoinsight.server.home.dal.model.TraceAgentConfProp;
+import io.holoinsight.server.common.dao.entity.TraceAgentConfProp;
public interface TraceAgentConfPropMapper extends BaseMapper {
}
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/TraceAgentConfigurationMapper.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/TraceAgentConfigurationMapper.java
similarity index 65%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/TraceAgentConfigurationMapper.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/TraceAgentConfigurationMapper.java
index e3f22a69a..afaf714c6 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/TraceAgentConfigurationMapper.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/TraceAgentConfigurationMapper.java
@@ -1,9 +1,9 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.mapper;
+package io.holoinsight.server.common.dao.mapper;
-import io.holoinsight.server.home.dal.model.TraceAgentConfiguration;
+import io.holoinsight.server.common.dao.entity.TraceAgentConfiguration;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface TraceAgentConfigurationMapper extends BaseMapper {
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/UserinfoVerificationMapper.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/UserinfoVerificationMapper.java
similarity index 70%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/UserinfoVerificationMapper.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/UserinfoVerificationMapper.java
index 907e308c7..2147b602a 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/UserinfoVerificationMapper.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/mapper/UserinfoVerificationMapper.java
@@ -1,10 +1,10 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.mapper;
+package io.holoinsight.server.common.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import io.holoinsight.server.home.dal.model.UserinfoVerification;
+import io.holoinsight.server.common.dao.entity.UserinfoVerification;
/**
* @author masaimu
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/DisplayMenuConfigMapper.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/DisplayMenuConfigMapper.java
similarity index 84%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/DisplayMenuConfigMapper.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/DisplayMenuConfigMapper.java
index bbf17cf49..bc3f42952 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/DisplayMenuConfigMapper.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/DisplayMenuConfigMapper.java
@@ -1,10 +1,10 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.transformer;
+package io.holoinsight.server.common.dao.transformer;
import io.holoinsight.server.common.J;
-import io.holoinsight.server.home.dal.model.dto.DisplayMenuConfig;
+import io.holoinsight.server.common.dao.entity.dto.DisplayMenuConfig;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/GaeaCollectRangeMapper.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/GaeaCollectRangeMapper.java
similarity index 82%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/GaeaCollectRangeMapper.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/GaeaCollectRangeMapper.java
index af22f0d03..503284e2a 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/GaeaCollectRangeMapper.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/GaeaCollectRangeMapper.java
@@ -1,13 +1,13 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.transformer;
+package io.holoinsight.server.common.dao.transformer;
import java.lang.reflect.Type;
import io.holoinsight.server.common.J;
-import io.holoinsight.server.home.dal.model.dto.GaeaCollectConfigDTO.GaeaCollectRange;
import com.google.gson.reflect.TypeToken;
+import io.holoinsight.server.common.dao.entity.GaeaCollectRange;
/**
*
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/FormJsonMapper.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/IntegrationFormJsonMapper.java
similarity index 75%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/FormJsonMapper.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/IntegrationFormJsonMapper.java
index 30e15ff8e..702787b4f 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/FormJsonMapper.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/IntegrationFormJsonMapper.java
@@ -1,9 +1,9 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.transformer;
+package io.holoinsight.server.common.dao.transformer;
-import io.holoinsight.server.home.dal.model.dto.IntegrationFormDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationFormDTO;
import io.holoinsight.server.common.J;
import com.google.gson.reflect.TypeToken;
@@ -13,7 +13,7 @@
* @author xiangwanpeng
* @date 2022/4/14 5:35 下午
*/
-public class FormJsonMapper {
+public class IntegrationFormJsonMapper {
public static String asString(IntegrationFormDTO form) {
return J.toJson(form);
}
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/JsonObjectMapper.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/JsonObjectMapper.java
similarity index 91%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/JsonObjectMapper.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/JsonObjectMapper.java
index ebb361564..218d8a0e1 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/JsonObjectMapper.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/JsonObjectMapper.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.transformer;
+package io.holoinsight.server.common.dao.transformer;
import io.holoinsight.server.common.J;
import com.google.gson.JsonObject;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/MetaTableConfigMapper.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/MetaTableConfigMapper.java
similarity index 84%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/MetaTableConfigMapper.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/MetaTableConfigMapper.java
index c0d7c6c30..bc941ab6b 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/MetaTableConfigMapper.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/MetaTableConfigMapper.java
@@ -1,12 +1,12 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.transformer;
+package io.holoinsight.server.common.dao.transformer;
import java.lang.reflect.Type;
import io.holoinsight.server.common.J;
-import io.holoinsight.server.home.dal.model.dto.meta.MetaTableConfig;
+import io.holoinsight.server.common.dao.entity.dto.meta.MetaTableConfig;
import com.google.gson.reflect.TypeToken;
import org.springframework.stereotype.Component;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/MetaTableSchemaMapper.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/MetaTableSchemaMapper.java
similarity index 85%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/MetaTableSchemaMapper.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/MetaTableSchemaMapper.java
index ab30a5adf..ad962b0ad 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/MetaTableSchemaMapper.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/MetaTableSchemaMapper.java
@@ -1,10 +1,10 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.transformer;
+package io.holoinsight.server.common.dao.transformer;
import io.holoinsight.server.common.J;
-import io.holoinsight.server.home.dal.model.dto.meta.MetaTableCol;
+import io.holoinsight.server.common.dao.entity.dto.meta.MetaTableCol;
import com.google.gson.reflect.TypeToken;
import org.springframework.stereotype.Component;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/MetricJsonMapper.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/MetricJsonMapper.java
similarity index 81%
rename from server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/MetricJsonMapper.java
rename to server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/MetricJsonMapper.java
index c5f5bf824..1776e33b0 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/MetricJsonMapper.java
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/MetricJsonMapper.java
@@ -1,9 +1,9 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.dal.transformer;
+package io.holoinsight.server.common.dao.transformer;
-import io.holoinsight.server.home.dal.model.dto.IntegrationMetricsDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationMetricsDTO;
import io.holoinsight.server.common.J;
import com.google.gson.reflect.TypeToken;
diff --git a/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/MonitorInstanceCfgMapper.java b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/MonitorInstanceCfgMapper.java
new file mode 100644
index 000000000..84df19120
--- /dev/null
+++ b/server/common/common-dao/src/main/java/io/holoinsight/server/common/dao/transformer/MonitorInstanceCfgMapper.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
+ */
+
+package io.holoinsight.server.common.dao.transformer;
+
+import com.google.gson.reflect.TypeToken;
+import io.holoinsight.server.common.J;
+import io.holoinsight.server.common.dao.entity.MonitorInstanceCfg;
+
+import java.lang.reflect.Type;
+
+/**
+ * @author jsy1001de
+ * @version 1.0: MonitorInstanceCfgMapper.java, Date: 2024-06-03 Time: 11:07
+ */
+public class MonitorInstanceCfgMapper {
+ public static String asString(MonitorInstanceCfg map) {
+ if (map != null) {
+ return J.toJson(map);
+ }
+ return null;
+ }
+
+ public static MonitorInstanceCfg asObj(String map) {
+ if (map != null) {
+ Type t = new TypeToken() {}.getType();
+ return J.fromJson(map, t);
+ }
+ return null;
+ }
+}
diff --git a/server/common/common-service/src/main/java/io/holoinsight/server/common/ctl/ProductCtlServiceImpl.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/ctl/ProductCtlServiceImpl.java
index 2d79cce62..14e5a073d 100644
--- a/server/common/common-service/src/main/java/io/holoinsight/server/common/ctl/ProductCtlServiceImpl.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/ctl/ProductCtlServiceImpl.java
@@ -8,11 +8,13 @@
import io.holoinsight.server.common.dao.entity.MetaDataDictValue;
import io.holoinsight.server.common.dao.entity.MonitorInstance;
import io.holoinsight.server.common.dao.entity.MonitorInstanceCfg;
+import io.holoinsight.server.common.dao.entity.dto.MonitorInstanceDTO;
import io.holoinsight.server.common.service.MonitorInstanceService;
import io.holoinsight.server.common.service.SuperCacheService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.time.StopWatch;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
@@ -37,15 +39,15 @@ public class ProductCtlServiceImpl implements ProductCtlService {
protected static final String RS_DELIMITER = "_";
- @Scheduled(initialDelay = 10000L, fixedDelay = 30000L)
+ @Scheduled(initialDelay = 10000L, fixedDelay = 60000L)
private void refresh() {
- List monitorInstances = monitorInstanceService.list();
+
+ StopWatch stopWatch = StopWatch.createStarted();
+ List monitorInstances = monitorInstanceService.listAllValid();
Map> dbProductClosed = new HashMap<>();
- for (MonitorInstance monitorInstance : monitorInstances) {
- MonitorInstanceCfg cfg =
- J.get().fromJson(monitorInstance.getConfig(), MonitorInstanceCfg.class);
- cfg.getClosed().forEach((code, closed) -> {
+ for (MonitorInstanceDTO monitorInstance : monitorInstances) {
+ monitorInstance.getConfig().getClosed().forEach((code, closed) -> {
if (closed) {
dbProductClosed.computeIfAbsent(monitorInstance.getInstance(), k -> new HashSet<>())
.add(code);
@@ -71,8 +73,9 @@ private void refresh() {
// This catch statement is intentionally empty
}
- log.info("[product_ctl] refresh closed products, switchOn={}, closed={}, metricWhiteList={}",
- switchOn, productClosed, metricWhitePrefixes);
+ log.info(
+ "[product_ctl] refresh closed products, switchOn={}, closed={}, cost={}, metricWhiteList={}",
+ switchOn, productClosed.size(), stopWatch.getTime(), metricWhitePrefixes);
}
@Override
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/DashboardService.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/DashboardService.java
similarity index 87%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/DashboardService.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/DashboardService.java
index 94f415a1c..d1fecf7f5 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/DashboardService.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/DashboardService.java
@@ -1,9 +1,9 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service;
+package io.holoinsight.server.common.service;
-import io.holoinsight.server.home.dal.model.Dashboard;
+import io.holoinsight.server.common.dao.entity.Dashboard;
import io.holoinsight.server.common.MonitorPageRequest;
import io.holoinsight.server.common.MonitorPageResult;
import com.baomidou.mybatisplus.extension.service.IService;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/DisplayMenuService.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/DisplayMenuService.java
similarity index 74%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/DisplayMenuService.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/DisplayMenuService.java
index fa35ede81..0fff1c1dd 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/DisplayMenuService.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/DisplayMenuService.java
@@ -1,11 +1,11 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service;
+package io.holoinsight.server.common.service;
import com.baomidou.mybatisplus.extension.service.IService;
-import io.holoinsight.server.home.dal.model.DisplayMenu;
-import io.holoinsight.server.home.dal.model.dto.DisplayMenuDTO;
+import io.holoinsight.server.common.dao.entity.DisplayMenu;
+import io.holoinsight.server.common.dao.entity.dto.DisplayMenuDTO;
import java.util.List;
import java.util.Map;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/DisplayTemplateService.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/DisplayTemplateService.java
similarity index 75%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/DisplayTemplateService.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/DisplayTemplateService.java
index 560f8cbc8..0cebe50e4 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/DisplayTemplateService.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/DisplayTemplateService.java
@@ -1,10 +1,10 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service;
+package io.holoinsight.server.common.service;
-import io.holoinsight.server.home.dal.model.DisplayTemplate;
-import io.holoinsight.server.home.dal.model.dto.DisplayTemplateDTO;
+import io.holoinsight.server.common.dao.entity.DisplayTemplate;
+import io.holoinsight.server.common.dao.entity.dto.DisplayTemplateDTO;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/FolderService.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/FolderService.java
similarity index 87%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/FolderService.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/FolderService.java
index 8c08b80f8..8dc94df77 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/FolderService.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/FolderService.java
@@ -1,9 +1,9 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service;
+package io.holoinsight.server.common.service;
-import io.holoinsight.server.home.dal.model.Folder;
+import io.holoinsight.server.common.dao.entity.Folder;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/IntegrationGeneratedService.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/IntegrationGeneratedService.java
similarity index 84%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/IntegrationGeneratedService.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/IntegrationGeneratedService.java
index ad5f333bc..a16b66e16 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/IntegrationGeneratedService.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/IntegrationGeneratedService.java
@@ -1,10 +1,10 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service;
+package io.holoinsight.server.common.service;
-import io.holoinsight.server.home.dal.model.IntegrationGenerated;
-import io.holoinsight.server.home.dal.model.dto.IntegrationGeneratedDTO;
+import io.holoinsight.server.common.dao.entity.IntegrationGenerated;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationGeneratedDTO;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/IntegrationPluginService.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/IntegrationPluginService.java
similarity index 87%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/IntegrationPluginService.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/IntegrationPluginService.java
index d60839eb8..bbf2827c8 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/IntegrationPluginService.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/IntegrationPluginService.java
@@ -1,11 +1,11 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service;
+package io.holoinsight.server.common.service;
import com.baomidou.mybatisplus.extension.service.IService;
-import io.holoinsight.server.home.dal.model.IntegrationPlugin;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.IntegrationPlugin;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
import io.holoinsight.server.common.MonitorPageRequest;
import io.holoinsight.server.common.MonitorPageResult;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/IntegrationProductService.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/IntegrationProductService.java
similarity index 85%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/IntegrationProductService.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/IntegrationProductService.java
index fbf18207e..fe1b557cb 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/IntegrationProductService.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/IntegrationProductService.java
@@ -1,12 +1,12 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service;
+package io.holoinsight.server.common.service;
import io.holoinsight.server.common.MonitorPageRequest;
import io.holoinsight.server.common.MonitorPageResult;
-import io.holoinsight.server.home.dal.model.IntegrationProduct;
-import io.holoinsight.server.home.dal.model.dto.IntegrationProductDTO;
+import io.holoinsight.server.common.dao.entity.IntegrationProduct;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationProductDTO;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/MarketplacePluginService.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/MarketplacePluginService.java
similarity index 87%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/MarketplacePluginService.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/MarketplacePluginService.java
index 1dca768c7..c8f6e2722 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/MarketplacePluginService.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/MarketplacePluginService.java
@@ -1,10 +1,10 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service;
+package io.holoinsight.server.common.service;
-import io.holoinsight.server.home.dal.model.MarketplacePlugin;
-import io.holoinsight.server.home.dal.model.dto.MarketplacePluginDTO;
+import io.holoinsight.server.common.dao.entity.MarketplacePlugin;
+import io.holoinsight.server.common.dao.entity.dto.MarketplacePluginDTO;
import io.holoinsight.server.common.MonitorPageRequest;
import io.holoinsight.server.common.MonitorPageResult;
import com.baomidou.mybatisplus.extension.service.IService;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/MarketplaceProductService.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/MarketplaceProductService.java
similarity index 85%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/MarketplaceProductService.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/MarketplaceProductService.java
index bafeea50e..acdb77e3f 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/MarketplaceProductService.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/MarketplaceProductService.java
@@ -1,10 +1,10 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service;
+package io.holoinsight.server.common.service;
-import io.holoinsight.server.home.dal.model.MarketplaceProduct;
-import io.holoinsight.server.home.dal.model.dto.MarketplaceProductDTO;
+import io.holoinsight.server.common.dao.entity.MarketplaceProduct;
+import io.holoinsight.server.common.dao.entity.dto.MarketplaceProductDTO;
import io.holoinsight.server.common.MonitorPageRequest;
import io.holoinsight.server.common.MonitorPageResult;
import com.baomidou.mybatisplus.extension.service.IService;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/MetaTableService.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/MetaTableService.java
similarity index 81%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/MetaTableService.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/MetaTableService.java
index 039c0ab95..1d3753558 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/MetaTableService.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/MetaTableService.java
@@ -1,10 +1,10 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service;
+package io.holoinsight.server.common.service;
-import io.holoinsight.server.home.dal.model.MetaTable;
-import io.holoinsight.server.home.dal.model.dto.MetaTableDTO;
+import io.holoinsight.server.common.dao.entity.MetaTable;
+import io.holoinsight.server.common.dao.entity.dto.MetaTableDTO;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
diff --git a/server/common/common-service/src/main/java/io/holoinsight/server/common/service/MonitorInstanceService.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/MonitorInstanceService.java
index 908dbc5e5..1db2e6f45 100644
--- a/server/common/common-service/src/main/java/io/holoinsight/server/common/service/MonitorInstanceService.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/MonitorInstanceService.java
@@ -5,6 +5,7 @@
import com.baomidou.mybatisplus.extension.service.IService;
import io.holoinsight.server.common.dao.entity.MonitorInstance;
+import io.holoinsight.server.common.dao.entity.dto.MonitorInstanceDTO;
import java.util.List;
@@ -12,6 +13,8 @@ public interface MonitorInstanceService extends IService {
List listValid();
+ List listAllValid();
+
List queryByInstance(String instance);
List queryByWorkspace(String workspace);
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/TenantOpsService.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/TenantOpsService.java
similarity index 93%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/TenantOpsService.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/TenantOpsService.java
index a37bfdb65..56d816448 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/TenantOpsService.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/TenantOpsService.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service;
+package io.holoinsight.server.common.service;
import io.holoinsight.server.common.dao.entity.TenantOps;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/TraceAgentConfPropService.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/TraceAgentConfPropService.java
similarity index 73%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/TraceAgentConfPropService.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/TraceAgentConfPropService.java
index ad0733cc3..80c4f45cc 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/TraceAgentConfPropService.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/TraceAgentConfPropService.java
@@ -1,11 +1,11 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service;
+package io.holoinsight.server.common.service;
import com.baomidou.mybatisplus.extension.service.IService;
-import io.holoinsight.server.home.dal.model.TraceAgentConfProp;
+import io.holoinsight.server.common.dao.entity.TraceAgentConfProp;
import java.util.List;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/TraceAgentConfigurationService.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/TraceAgentConfigurationService.java
similarity index 58%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/TraceAgentConfigurationService.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/TraceAgentConfigurationService.java
index 43ef89dfc..b9cdde060 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/TraceAgentConfigurationService.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/TraceAgentConfigurationService.java
@@ -1,11 +1,14 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service;
+package io.holoinsight.server.common.service;
-import io.holoinsight.server.home.dal.model.TraceAgentConfiguration;
+import io.holoinsight.server.common.dao.entity.TraceAgentConfiguration;
import com.baomidou.mybatisplus.extension.service.IService;
+import io.holoinsight.server.common.dao.entity.dto.TraceAgentConfigurationDTO;
+
+import java.util.List;
public interface TraceAgentConfigurationService extends IService {
@@ -13,4 +16,6 @@ public interface TraceAgentConfigurationService extends IService getALLFromDB();
+
}
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/UserinfoVerificationService.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/UserinfoVerificationService.java
similarity index 69%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/UserinfoVerificationService.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/UserinfoVerificationService.java
index acdcdd88e..101d0ff80 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/UserinfoVerificationService.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/UserinfoVerificationService.java
@@ -1,9 +1,9 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service;
+package io.holoinsight.server.common.service;
-import io.holoinsight.server.home.dal.model.UserinfoVerification;
+import io.holoinsight.server.common.dao.entity.UserinfoVerification;
/**
* @author masaimu
diff --git a/server/common/common-service/src/main/java/io/holoinsight/server/common/service/config/CommonServiceAutoConfiguration.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/config/CommonServiceAutoConfiguration.java
index 0ce9efdc2..f1768f535 100644
--- a/server/common/common-service/src/main/java/io/holoinsight/server/common/service/config/CommonServiceAutoConfiguration.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/config/CommonServiceAutoConfiguration.java
@@ -20,14 +20,27 @@
import io.holoinsight.server.common.service.ApiKeyService;
import io.holoinsight.server.common.service.ClusterService;
import io.holoinsight.server.common.service.ClusterTaskService;
+import io.holoinsight.server.common.service.DashboardService;
+import io.holoinsight.server.common.service.DisplayMenuService;
+import io.holoinsight.server.common.service.DisplayTemplateService;
+import io.holoinsight.server.common.service.FolderService;
+import io.holoinsight.server.common.service.IntegrationGeneratedService;
+import io.holoinsight.server.common.service.IntegrationPluginService;
+import io.holoinsight.server.common.service.IntegrationProductService;
+import io.holoinsight.server.common.service.MarketplacePluginService;
+import io.holoinsight.server.common.service.MarketplaceProductService;
import io.holoinsight.server.common.service.MetaDataDictValueService;
import io.holoinsight.server.common.service.MetaDictValueService;
import io.holoinsight.server.common.service.MetaDimDataService;
+import io.holoinsight.server.common.service.MetaTableService;
import io.holoinsight.server.common.service.MetricInfoService;
import io.holoinsight.server.common.service.MonitorInstanceService;
import io.holoinsight.server.common.service.SuperCacheService;
+import io.holoinsight.server.common.service.TenantOpsService;
import io.holoinsight.server.common.service.TenantService;
import io.holoinsight.server.common.service.TimedEventService;
+import io.holoinsight.server.common.service.TraceAgentConfPropService;
+import io.holoinsight.server.common.service.TraceAgentConfigurationService;
import io.holoinsight.server.common.service.UserFavoriteService;
import io.holoinsight.server.common.service.UserOpLogService;
import io.holoinsight.server.common.service.UserinfoService;
@@ -46,12 +59,25 @@
import io.holoinsight.server.common.service.impl.ApiKeyServiceImpl;
import io.holoinsight.server.common.service.impl.ClusterServiceImpl;
import io.holoinsight.server.common.service.impl.ClusterTaskServiceImpl;
+import io.holoinsight.server.common.service.impl.DashboardServiceImpl;
+import io.holoinsight.server.common.service.impl.DisplayMenuServiceImpl;
+import io.holoinsight.server.common.service.impl.DisplayTemplateServiceImpl;
+import io.holoinsight.server.common.service.impl.FolderServiceImpl;
+import io.holoinsight.server.common.service.impl.IntegrationGeneratedServiceImpl;
+import io.holoinsight.server.common.service.impl.IntegrationPluginServiceImpl;
+import io.holoinsight.server.common.service.impl.IntegrationProductServiceImpl;
+import io.holoinsight.server.common.service.impl.MarketplacePluginServiceImpl;
+import io.holoinsight.server.common.service.impl.MarketplaceProductServiceImpl;
import io.holoinsight.server.common.service.impl.MetaDataDictValueServiceImpl;
import io.holoinsight.server.common.service.impl.MetaDimDataServiceImpl;
+import io.holoinsight.server.common.service.impl.MetaTableServiceImpl;
import io.holoinsight.server.common.service.impl.MetricInfoServiceImpl;
import io.holoinsight.server.common.service.impl.MonitorInstanceServiceImpl;
+import io.holoinsight.server.common.service.impl.TenantOpsServiceImpl;
import io.holoinsight.server.common.service.impl.TenantServiceImpl;
import io.holoinsight.server.common.service.impl.TimedEventServiceImpl;
+import io.holoinsight.server.common.service.impl.TraceAgentConfPropServiceImpl;
+import io.holoinsight.server.common.service.impl.TraceAgentConfigurationServiceImpl;
import io.holoinsight.server.common.service.impl.UserFavoriteServiceImpl;
import io.holoinsight.server.common.service.impl.UserOpLogServiceImpl;
import io.holoinsight.server.common.service.impl.UserinfoServiceImpl;
@@ -230,4 +256,82 @@ public ClusterTaskService clusterTaskService() {
public MetaDimDataService metaDimDataService() {
return new MetaDimDataServiceImpl();
}
+
+ @Bean
+ @ConditionalOnMissingBean
+ public DashboardService dashboardService() {
+ return new DashboardServiceImpl();
+ }
+
+ @Bean
+ @ConditionalOnMissingBean
+ public DisplayMenuService displayMenuService() {
+ return new DisplayMenuServiceImpl();
+ }
+
+ @Bean
+ @ConditionalOnMissingBean
+ public DisplayTemplateService displayTemplateService() {
+ return new DisplayTemplateServiceImpl();
+ }
+
+ @Bean
+ @ConditionalOnMissingBean
+ public FolderService folderService() {
+ return new FolderServiceImpl();
+ }
+
+ @Bean
+ @ConditionalOnMissingBean
+ public IntegrationGeneratedService integrationGeneratedService() {
+ return new IntegrationGeneratedServiceImpl();
+ }
+
+ @Bean
+ @ConditionalOnMissingBean
+ public IntegrationPluginService integrationPluginService() {
+ return new IntegrationPluginServiceImpl();
+ }
+
+ @Bean
+ @ConditionalOnMissingBean
+ public IntegrationProductService integrationProductService() {
+ return new IntegrationProductServiceImpl();
+ }
+
+ @Bean
+ @ConditionalOnMissingBean
+ public MarketplacePluginService marketplacePluginService() {
+ return new MarketplacePluginServiceImpl();
+ }
+
+ @Bean
+ @ConditionalOnMissingBean
+ public MarketplaceProductService marketplaceProductService() {
+ return new MarketplaceProductServiceImpl();
+ }
+
+ @Bean
+ @ConditionalOnMissingBean
+ public TraceAgentConfigurationService traceAgentConfigurationService() {
+ return new TraceAgentConfigurationServiceImpl();
+ }
+
+ @Bean
+ @ConditionalOnMissingBean
+ public TraceAgentConfPropService traceAgentConfPropService() {
+ return new TraceAgentConfPropServiceImpl();
+ }
+
+ @Bean
+ @ConditionalOnMissingBean
+ public MetaTableService metaTableService() {
+ return new MetaTableServiceImpl();
+ }
+
+ @Bean
+ @ConditionalOnMissingBean
+ public TenantOpsService tenantOpsService() {
+ return new TenantOpsServiceImpl();
+ }
}
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/DashboardServiceImpl.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/DashboardServiceImpl.java
similarity index 94%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/DashboardServiceImpl.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/DashboardServiceImpl.java
index 444d72a96..cd5ab5f25 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/DashboardServiceImpl.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/DashboardServiceImpl.java
@@ -1,16 +1,16 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service.impl;
+package io.holoinsight.server.common.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.holoinsight.server.common.MonitorPageRequest;
import io.holoinsight.server.common.MonitorPageResult;
-import io.holoinsight.server.home.biz.service.DashboardService;
-import io.holoinsight.server.home.dal.mapper.DashboardMapper;
-import io.holoinsight.server.home.dal.model.Dashboard;
+import io.holoinsight.server.common.dao.mapper.DashboardMapper;
+import io.holoinsight.server.common.dao.entity.Dashboard;
+import io.holoinsight.server.common.service.DashboardService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/DisplayMenuServiceImpl.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/DisplayMenuServiceImpl.java
similarity index 75%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/DisplayMenuServiceImpl.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/DisplayMenuServiceImpl.java
index 11ea01a1a..8e8001e24 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/DisplayMenuServiceImpl.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/DisplayMenuServiceImpl.java
@@ -1,15 +1,15 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service.impl;
+package io.holoinsight.server.common.service.impl;
-import io.holoinsight.server.home.biz.service.DisplayMenuService;
-import io.holoinsight.server.home.dal.converter.DisplayMenuConverter;
-import io.holoinsight.server.home.dal.mapper.DisplayMenuMapper;
-import io.holoinsight.server.home.dal.model.DisplayMenu;
-import io.holoinsight.server.home.dal.model.dto.DisplayMenuDTO;
+import io.holoinsight.server.common.dao.converter.DisplayMenuConverter;
+import io.holoinsight.server.common.dao.mapper.DisplayMenuMapper;
+import io.holoinsight.server.common.dao.entity.DisplayMenu;
+import io.holoinsight.server.common.dao.entity.dto.DisplayMenuDTO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import io.holoinsight.server.common.service.DisplayMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/DisplayTemplateServiceImpl.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/DisplayTemplateServiceImpl.java
similarity index 76%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/DisplayTemplateServiceImpl.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/DisplayTemplateServiceImpl.java
index 559b11b08..5b2422d63 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/DisplayTemplateServiceImpl.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/DisplayTemplateServiceImpl.java
@@ -1,15 +1,15 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service.impl;
+package io.holoinsight.server.common.service.impl;
-import io.holoinsight.server.home.biz.service.DisplayTemplateService;
-import io.holoinsight.server.home.dal.converter.DisplayTemplateConverter;
-import io.holoinsight.server.home.dal.mapper.DisplayTemplateMapper;
-import io.holoinsight.server.home.dal.model.DisplayTemplate;
-import io.holoinsight.server.home.dal.model.dto.DisplayTemplateDTO;
+import io.holoinsight.server.common.dao.converter.DisplayTemplateConverter;
+import io.holoinsight.server.common.dao.mapper.DisplayTemplateMapper;
+import io.holoinsight.server.common.dao.entity.DisplayTemplate;
+import io.holoinsight.server.common.dao.entity.dto.DisplayTemplateDTO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import io.holoinsight.server.common.service.DisplayTemplateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/FolderServiceImpl.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/FolderServiceImpl.java
similarity index 91%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/FolderServiceImpl.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/FolderServiceImpl.java
index 278f8fa63..dc267680b 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/FolderServiceImpl.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/FolderServiceImpl.java
@@ -1,13 +1,13 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service.impl;
+package io.holoinsight.server.common.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import io.holoinsight.server.home.biz.service.FolderService;
-import io.holoinsight.server.home.dal.mapper.FolderMapper;
-import io.holoinsight.server.home.dal.model.Folder;
+import io.holoinsight.server.common.dao.mapper.FolderMapper;
+import io.holoinsight.server.common.dao.entity.Folder;
+import io.holoinsight.server.common.service.FolderService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/IntegrationGeneratedServiceImpl.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/IntegrationGeneratedServiceImpl.java
similarity index 90%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/IntegrationGeneratedServiceImpl.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/IntegrationGeneratedServiceImpl.java
index a85e80fd7..cf1c9a922 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/IntegrationGeneratedServiceImpl.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/IntegrationGeneratedServiceImpl.java
@@ -1,16 +1,16 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service.impl;
+package io.holoinsight.server.common.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.holoinsight.server.common.EventBusHolder;
-import io.holoinsight.server.home.biz.service.IntegrationGeneratedService;
-import io.holoinsight.server.home.dal.converter.IntegrationGeneratedConverter;
-import io.holoinsight.server.home.dal.mapper.IntegrationGeneratedMapper;
-import io.holoinsight.server.home.dal.model.IntegrationGenerated;
-import io.holoinsight.server.home.dal.model.dto.IntegrationGeneratedDTO;
+import io.holoinsight.server.common.dao.converter.IntegrationGeneratedConverter;
+import io.holoinsight.server.common.dao.mapper.IntegrationGeneratedMapper;
+import io.holoinsight.server.common.dao.entity.IntegrationGenerated;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationGeneratedDTO;
+import io.holoinsight.server.common.service.IntegrationGeneratedService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/IntegrationPluginServiceImpl.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/IntegrationPluginServiceImpl.java
similarity index 88%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/IntegrationPluginServiceImpl.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/IntegrationPluginServiceImpl.java
index 95929f5a5..f93f290fe 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/IntegrationPluginServiceImpl.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/IntegrationPluginServiceImpl.java
@@ -1,22 +1,20 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service.impl;
+package io.holoinsight.server.common.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import io.holoinsight.server.home.biz.plugin.PluginRepository;
-import io.holoinsight.server.home.biz.service.IntegrationPluginService;
import io.holoinsight.server.common.EventBusHolder;
-import io.holoinsight.server.home.dal.converter.IntegrationPluginConverter;
-import io.holoinsight.server.home.dal.mapper.IntegrationPluginMapper;
-import io.holoinsight.server.home.dal.model.IntegrationPlugin;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
import io.holoinsight.server.common.MonitorPageRequest;
import io.holoinsight.server.common.MonitorPageResult;
+import io.holoinsight.server.common.dao.converter.IntegrationPluginConverter;
+import io.holoinsight.server.common.dao.entity.IntegrationPlugin;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.mapper.IntegrationPluginMapper;
+import io.holoinsight.server.common.service.IntegrationPluginService;
import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -35,8 +33,6 @@ public class IntegrationPluginServiceImpl extends
@Resource
private IntegrationPluginConverter integrationPluginConverter;
- @Autowired
- private PluginRepository pluginRepository;
@Override
public IntegrationPluginDTO queryById(Long id, String tenant, String workspace) {
@@ -123,26 +119,23 @@ public static boolean isClassicPlugin(String product) {
*
* @param newIntegrationPlugin
* @param originalRecord
- * @param pluginRepository
*/
public static boolean checkActionType(IntegrationPluginDTO newIntegrationPlugin,
- IntegrationPluginDTO originalRecord, PluginRepository pluginRepository) {
+ IntegrationPluginDTO originalRecord) {
// 是否数据源插件
- boolean isDataSourcePlugin = pluginRepository.isDataSourcePlugin(newIntegrationPlugin.type);
boolean isCreate = originalRecord == null;
boolean needUpsertGaea = false;
- if (isDataSourcePlugin) {
- if (isCreate) {
+ if (isCreate) {
+ needUpsertGaea = true;
+ } else {
+ // 是否插件升级
+ boolean shouldUpgrade = newIntegrationPlugin.checkVersion(originalRecord);
+ // 是否变更了采集配置
+ boolean shouldChangeJson = newIntegrationPlugin.checkJsonChange(originalRecord);
+ if (shouldUpgrade || shouldChangeJson) {
needUpsertGaea = true;
- } else {
- // 是否插件升级
- boolean shouldUpgrade = newIntegrationPlugin.checkVersion(originalRecord);
- // 是否变更了采集配置
- boolean shouldChangeJson = newIntegrationPlugin.checkJsonChange(originalRecord);
- if (shouldUpgrade || shouldChangeJson) {
- needUpsertGaea = true;
- }
}
+
newIntegrationPlugin.name = newIntegrationPlugin.tenant + '_' + newIntegrationPlugin.type;
}
@@ -168,7 +161,7 @@ public IntegrationPluginDTO updateByRequest(IntegrationPluginDTO integrationPlug
integrationPluginDTO.getTenant(), integrationPluginDTO.getWorkspace());
boolean needUpsertGaea = isClassicPlugin(integrationPluginDTO.getProduct())
- || checkActionType(integrationPluginDTO, originalRecord, this.pluginRepository);
+ || checkActionType(integrationPluginDTO, originalRecord);
IntegrationPlugin model = integrationPluginConverter.dtoToDO(integrationPluginDTO);
saveOrUpdate(model);
IntegrationPluginDTO integrationPlugin = integrationPluginConverter.doToDTO(model);
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/IntegrationProductServiceImpl.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/IntegrationProductServiceImpl.java
similarity index 94%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/IntegrationProductServiceImpl.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/IntegrationProductServiceImpl.java
index 0d9da8842..22bd1b6c5 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/IntegrationProductServiceImpl.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/IntegrationProductServiceImpl.java
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service.impl;
+package io.holoinsight.server.common.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -9,11 +9,11 @@
import io.holoinsight.server.common.EventBusHolder;
import io.holoinsight.server.common.MonitorPageRequest;
import io.holoinsight.server.common.MonitorPageResult;
-import io.holoinsight.server.home.biz.service.IntegrationProductService;
-import io.holoinsight.server.home.dal.converter.IntegrationProductConverter;
-import io.holoinsight.server.home.dal.mapper.IntegrationProductMapper;
-import io.holoinsight.server.home.dal.model.IntegrationProduct;
-import io.holoinsight.server.home.dal.model.dto.IntegrationProductDTO;
+import io.holoinsight.server.common.dao.converter.IntegrationProductConverter;
+import io.holoinsight.server.common.dao.mapper.IntegrationProductMapper;
+import io.holoinsight.server.common.dao.entity.IntegrationProduct;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationProductDTO;
+import io.holoinsight.server.common.service.IntegrationProductService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/MarketplacePluginServiceImpl.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/MarketplacePluginServiceImpl.java
similarity index 94%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/MarketplacePluginServiceImpl.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/MarketplacePluginServiceImpl.java
index 5359e19db..794891a54 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/MarketplacePluginServiceImpl.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/MarketplacePluginServiceImpl.java
@@ -1,18 +1,18 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service.impl;
+package io.holoinsight.server.common.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.holoinsight.server.common.MonitorPageRequest;
import io.holoinsight.server.common.MonitorPageResult;
-import io.holoinsight.server.home.biz.service.MarketplacePluginService;
-import io.holoinsight.server.home.dal.converter.MarketplacePluginConverter;
-import io.holoinsight.server.home.dal.mapper.MarketplacePluginMapper;
-import io.holoinsight.server.home.dal.model.MarketplacePlugin;
-import io.holoinsight.server.home.dal.model.dto.MarketplacePluginDTO;
+import io.holoinsight.server.common.dao.converter.MarketplacePluginConverter;
+import io.holoinsight.server.common.dao.mapper.MarketplacePluginMapper;
+import io.holoinsight.server.common.dao.entity.MarketplacePlugin;
+import io.holoinsight.server.common.dao.entity.dto.MarketplacePluginDTO;
+import io.holoinsight.server.common.service.MarketplacePluginService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/MarketplaceProductServiceImpl.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/MarketplaceProductServiceImpl.java
similarity index 92%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/MarketplaceProductServiceImpl.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/MarketplaceProductServiceImpl.java
index 2a57572be..c1e1153f9 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/MarketplaceProductServiceImpl.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/MarketplaceProductServiceImpl.java
@@ -1,18 +1,18 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service.impl;
+package io.holoinsight.server.common.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.holoinsight.server.common.MonitorPageRequest;
import io.holoinsight.server.common.MonitorPageResult;
-import io.holoinsight.server.home.biz.service.MarketplaceProductService;
-import io.holoinsight.server.home.dal.converter.MarketplaceProductConverter;
-import io.holoinsight.server.home.dal.mapper.MarketplaceProductMapper;
-import io.holoinsight.server.home.dal.model.MarketplaceProduct;
-import io.holoinsight.server.home.dal.model.dto.MarketplaceProductDTO;
+import io.holoinsight.server.common.dao.converter.MarketplaceProductConverter;
+import io.holoinsight.server.common.dao.mapper.MarketplaceProductMapper;
+import io.holoinsight.server.common.dao.entity.MarketplaceProduct;
+import io.holoinsight.server.common.dao.entity.dto.MarketplaceProductDTO;
+import io.holoinsight.server.common.service.MarketplaceProductService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/MetaTableServiceImpl.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/MetaTableServiceImpl.java
similarity index 89%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/MetaTableServiceImpl.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/MetaTableServiceImpl.java
index f57e5960e..6fd84985c 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/MetaTableServiceImpl.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/MetaTableServiceImpl.java
@@ -1,14 +1,14 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service.impl;
+package io.holoinsight.server.common.service.impl;
-import io.holoinsight.server.home.biz.service.MetaTableService;
+import io.holoinsight.server.common.service.MetaTableService;
import io.holoinsight.server.common.JpaUpdateUtil;
-import io.holoinsight.server.home.dal.converter.MetaTableConverter;
-import io.holoinsight.server.home.dal.mapper.MetaTableMapper;
-import io.holoinsight.server.home.dal.model.MetaTable;
-import io.holoinsight.server.home.dal.model.dto.MetaTableDTO;
+import io.holoinsight.server.common.dao.converter.MetaTableConverter;
+import io.holoinsight.server.common.dao.mapper.MetaTableMapper;
+import io.holoinsight.server.common.dao.entity.MetaTable;
+import io.holoinsight.server.common.dao.entity.dto.MetaTableDTO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.BeanUtils;
diff --git a/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/MonitorInstanceServiceImpl.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/MonitorInstanceServiceImpl.java
index 9e4af8c67..a50d0e101 100644
--- a/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/MonitorInstanceServiceImpl.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/MonitorInstanceServiceImpl.java
@@ -5,9 +5,12 @@
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import io.holoinsight.server.common.dao.converter.MonitorInstanceConfigConverter;
import io.holoinsight.server.common.dao.entity.MonitorInstance;
+import io.holoinsight.server.common.dao.entity.dto.MonitorInstanceDTO;
import io.holoinsight.server.common.dao.mapper.MonitorInstanceMapper;
import io.holoinsight.server.common.service.MonitorInstanceService;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@@ -19,6 +22,11 @@
public class MonitorInstanceServiceImpl extends ServiceImpl
implements MonitorInstanceService {
+
+ @Autowired
+ private MonitorInstanceConfigConverter monitorInstanceConfigConverter;
+
+
@Override
public List listValid() {
Map cols = new HashMap<>();
@@ -26,6 +34,13 @@ public List listValid() {
return listByMap(cols);
}
+ @Override
+ public List listAllValid() {
+ Map cols = new HashMap<>();
+ cols.put("deleted", 0);
+ return monitorInstanceConfigConverter.dosToDTOs(listByMap(cols));
+ }
+
@Override
public List queryByInstance(String instance) {
Map cols = new HashMap<>();
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/TenantOpsServiceImpl.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/TenantOpsServiceImpl.java
similarity index 91%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/TenantOpsServiceImpl.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/TenantOpsServiceImpl.java
index ad136c6b0..1dcdedcb3 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/TenantOpsServiceImpl.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/TenantOpsServiceImpl.java
@@ -1,14 +1,14 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service.impl;
+package io.holoinsight.server.common.service.impl;
+import io.holoinsight.server.common.dao.converter.TenantOpsConverter;
import io.holoinsight.server.common.dao.entity.TenantOps;
import io.holoinsight.server.common.dao.entity.dto.TenantOpsDTO;
import io.holoinsight.server.common.dao.mapper.TenantOpsMapper;
-import io.holoinsight.server.home.biz.service.TenantOpsService;
+import io.holoinsight.server.common.service.TenantOpsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import io.holoinsight.server.home.dal.converter.TenantOpsConverter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/TraceAgentConfPropServiceImpl.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/TraceAgentConfPropServiceImpl.java
similarity index 76%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/TraceAgentConfPropServiceImpl.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/TraceAgentConfPropServiceImpl.java
index d98c30155..0920b9104 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/TraceAgentConfPropServiceImpl.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/TraceAgentConfPropServiceImpl.java
@@ -1,13 +1,13 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service.impl;
+package io.holoinsight.server.common.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import io.holoinsight.server.home.biz.service.TraceAgentConfPropService;
-import io.holoinsight.server.home.dal.mapper.TraceAgentConfPropMapper;
-import io.holoinsight.server.home.dal.model.TraceAgentConfProp;
+import io.holoinsight.server.common.dao.mapper.TraceAgentConfPropMapper;
+import io.holoinsight.server.common.service.TraceAgentConfPropService;
+import io.holoinsight.server.common.dao.entity.TraceAgentConfProp;
import org.springframework.stereotype.Service;
import java.util.List;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/TraceAgentConfigurationServiceImpl.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/TraceAgentConfigurationServiceImpl.java
similarity index 59%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/TraceAgentConfigurationServiceImpl.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/TraceAgentConfigurationServiceImpl.java
index 4834a30a6..ab0629ba9 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/TraceAgentConfigurationServiceImpl.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/TraceAgentConfigurationServiceImpl.java
@@ -1,17 +1,22 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service.impl;
+package io.holoinsight.server.common.service.impl;
-import io.holoinsight.server.home.biz.service.TraceAgentConfigurationService;
-import io.holoinsight.server.home.dal.mapper.TraceAgentConfigurationMapper;
-import io.holoinsight.server.home.dal.model.TraceAgentConfiguration;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import io.holoinsight.server.common.J;
+import io.holoinsight.server.common.dao.entity.TraceAgentConfiguration;
+import io.holoinsight.server.common.dao.entity.dto.TraceAgentConfigurationDTO;
+import io.holoinsight.server.common.dao.mapper.TraceAgentConfigurationMapper;
+import io.holoinsight.server.common.service.TraceAgentConfigurationService;
import org.springframework.stereotype.Service;
+import java.util.ArrayList;
import java.util.Date;
+import java.util.List;
+import java.util.Map;
/**
*
@@ -57,4 +62,23 @@ public boolean createOrUpdate(TraceAgentConfiguration agentConfiguration) {
return result;
}
+
+
+ public List getALLFromDB() {
+ List traceAgentConfigurationList = list();
+ List result = new ArrayList<>(traceAgentConfigurationList.size());
+ for (TraceAgentConfiguration traceAgentConfiguration : traceAgentConfigurationList) {
+ Map configuration = J.toMap(traceAgentConfiguration.getValue());
+
+ TraceAgentConfigurationDTO TraceAgentConfigurationDTO = new TraceAgentConfigurationDTO(
+ traceAgentConfiguration.getTenant(), traceAgentConfiguration.getService(),
+ traceAgentConfiguration.getType(), traceAgentConfiguration.getLanguage(), configuration,
+ traceAgentConfiguration.getCreator(), traceAgentConfiguration.getModifier(),
+ traceAgentConfiguration.getGmtCreate(), traceAgentConfiguration.getGmtModified());
+
+ result.add(TraceAgentConfigurationDTO);
+ }
+
+ return result;
+ }
}
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/UserinfoVerificationServiceImpl.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/UserinfoVerificationServiceImpl.java
similarity index 65%
rename from server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/UserinfoVerificationServiceImpl.java
rename to server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/UserinfoVerificationServiceImpl.java
index 3eb543a26..9a04318b7 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/UserinfoVerificationServiceImpl.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/service/impl/UserinfoVerificationServiceImpl.java
@@ -1,10 +1,10 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
-package io.holoinsight.server.home.biz.service.impl;
+package io.holoinsight.server.common.service.impl;
-import io.holoinsight.server.home.biz.service.UserinfoVerificationService;
-import io.holoinsight.server.home.dal.model.UserinfoVerification;
+import io.holoinsight.server.common.service.UserinfoVerificationService;
+import io.holoinsight.server.common.dao.entity.UserinfoVerification;
import lombok.extern.slf4j.Slf4j;
/**
diff --git a/server/common/common-service/src/main/java/io/holoinsight/server/common/trace/TraceAgentConfiguration.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/trace/TraceAgentConfiguration.java
deleted file mode 100644
index ff40d86d8..000000000
--- a/server/common/common-service/src/main/java/io/holoinsight/server/common/trace/TraceAgentConfiguration.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
- */
-package io.holoinsight.server.common.trace;
-
-import io.holoinsight.server.common.Const;
-import lombok.Getter;
-import lombok.Setter;
-import lombok.ToString;
-import org.apache.commons.lang3.StringUtils;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Dynamic configuration items, save the dynamic configuration of the agent corresponding to the
- * service.
- *
- * @author sw1136562366
- */
-@Setter
-@Getter
-@ToString
-public class TraceAgentConfiguration {
- private String tenant;
- private String service;
- private String type;
- private String language;
- private Map configuration;
- /**
- * The uuid is calculated by the dynamic configuration of the service.
- */
- private volatile String uuid;
-
- public TraceAgentConfiguration(String tenant, String service, String type, String language,
- Map configuration, String uuid) {
- this.tenant = tenant;
- this.service = service;
- this.type = type;
- this.language = language;
- this.configuration = configuration;
- this.uuid = uuid;
- }
-
- /**
- *
- * getCacheKey.
- *
- */
- public String getCacheKey() {
- List cacheKeys = new ArrayList() {
- {
- add(tenant);
- add(service);
- }
- };
- if (!StringUtils.isEmpty(type)) {
- cacheKeys.add(type);
- }
- if (!StringUtils.isEmpty(language)) {
- cacheKeys.add(language);
- }
- return StringUtils.join(cacheKeys, Const.TRACE_AGENT_CONFIG_KEY_JOINER);
- }
-}
diff --git a/server/common/common-service/src/main/java/io/holoinsight/server/common/trace/TraceAgentConfigurationScheduler.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/trace/TraceAgentConfigurationScheduler.java
index fde46f8b0..f425a2063 100644
--- a/server/common/common-service/src/main/java/io/holoinsight/server/common/trace/TraceAgentConfigurationScheduler.java
+++ b/server/common/common-service/src/main/java/io/holoinsight/server/common/trace/TraceAgentConfigurationScheduler.java
@@ -6,6 +6,8 @@
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import io.holoinsight.server.common.Const;
+import io.holoinsight.server.common.dao.entity.dto.TraceAgentConfigurationDTO;
+import io.holoinsight.server.common.service.TraceAgentConfigurationService;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -33,7 +35,7 @@ public class TraceAgentConfigurationScheduler {
@Autowired
private TraceAgentConfigurationService traceAgentConfigurationService;
- public Cache cache;
+ public Cache cache;
/**
*
@@ -53,9 +55,9 @@ public void init() {
@Scheduled(cron = "*/30 * * * * *")
private void updateCache() {
try {
- List allFromDB = traceAgentConfigurationService.getALLFromDB();
+ List allFromDB = traceAgentConfigurationService.getALLFromDB();
cache.cleanUp();
- for (TraceAgentConfiguration agentConfiguration : allFromDB) {
+ for (TraceAgentConfigurationDTO agentConfiguration : allFromDB) {
cache.put(agentConfiguration.getCacheKey(), agentConfiguration);
}
} catch (Exception e) {
@@ -68,13 +70,13 @@ private void updateCache() {
* getValue.
*
*/
- public TraceAgentConfiguration getValue(String cacheKey) {
+ public TraceAgentConfigurationDTO getValue(String cacheKey) {
return cache.getIfPresent(cacheKey);
}
- public TraceAgentConfiguration getValue(String tenant, String service,
+ public TraceAgentConfigurationDTO getValue(String tenant, String service,
Map extendInfo) {
- TraceAgentConfiguration configuration =
+ TraceAgentConfigurationDTO configuration =
this.getValue(this.cacheKey(tenant, service, extendInfo));
// If the service configuration is empty, get the tenant configuration
if (configuration == null) {
@@ -107,12 +109,5 @@ public List subCacheKeys(String tenant, String service, Map
- * Getter for the field cache
.
- *
- */
- public Cache getCache() {
- return cache;
- }
+
}
diff --git a/server/common/common-service/src/main/java/io/holoinsight/server/common/trace/TraceAgentConfigurationService.java b/server/common/common-service/src/main/java/io/holoinsight/server/common/trace/TraceAgentConfigurationService.java
deleted file mode 100644
index 1110bb0a9..000000000
--- a/server/common/common-service/src/main/java/io/holoinsight/server/common/trace/TraceAgentConfigurationService.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
- */
-package io.holoinsight.server.common.trace;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.common.hash.Hashing;
-import io.holoinsight.server.common.dao.entity.TraceAgentConfigurationDO;
-import io.holoinsight.server.common.dao.mapper.TraceAgentConfigurationDOMapper;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- *
- * GetTraceAgentConfigurationService class.
- *
- *
- * @author sw1136562366
- */
-public class TraceAgentConfigurationService {
- @Autowired
- private TraceAgentConfigurationDOMapper traceAgentConfigurationDOMapper;
-
- /**
- *
- * getALLFromDB.
- *
- */
- public List getALLFromDB() throws JsonProcessingException {
- List traceAgentConfigurationDOList =
- traceAgentConfigurationDOMapper.selectByExampleWithBLOBs(null);
- List result = new ArrayList<>(traceAgentConfigurationDOList.size());
- for (TraceAgentConfigurationDO traceAgentConfigurationDO : traceAgentConfigurationDOList) {
- Map configuration =
- new ObjectMapper().readValue(traceAgentConfigurationDO.getValue(), HashMap.class);
-
- StringBuilder configStr = new StringBuilder();
- configuration.forEach((key, value) -> {
- configStr.append(key).append(":").append(value);
- });
-
- TraceAgentConfiguration TraceAgentConfiguration =
- new TraceAgentConfiguration(traceAgentConfigurationDO.getTenant(),
- traceAgentConfigurationDO.getService(), traceAgentConfigurationDO.getType(),
- traceAgentConfigurationDO.getLanguage(), configuration,
- Hashing.sha512().hashString(configStr.toString(), StandardCharsets.UTF_8).toString());
-
- result.add(TraceAgentConfiguration);
- }
-
- return result;
- }
-
-}
diff --git a/server/gateway/gateway-core/src/main/java/io/holoinsight/server/gateway/core/auth/TenantOpsService.java b/server/gateway/gateway-core/src/main/java/io/holoinsight/server/gateway/core/auth/TenantOpsDataService.java
similarity index 96%
rename from server/gateway/gateway-core/src/main/java/io/holoinsight/server/gateway/core/auth/TenantOpsService.java
rename to server/gateway/gateway-core/src/main/java/io/holoinsight/server/gateway/core/auth/TenantOpsDataService.java
index 319ac1d1d..f9a88c5e2 100644
--- a/server/gateway/gateway-core/src/main/java/io/holoinsight/server/gateway/core/auth/TenantOpsService.java
+++ b/server/gateway/gateway-core/src/main/java/io/holoinsight/server/gateway/core/auth/TenantOpsDataService.java
@@ -28,8 +28,8 @@
* @author sw1136562366
*/
@Service
-public class TenantOpsService {
- private static final Logger LOGGER = LoggerFactory.getLogger(TenantOpsService.class);
+public class TenantOpsDataService {
+ private static final Logger LOGGER = LoggerFactory.getLogger(TenantOpsDataService.class);
@Autowired
private TenantOpsDOMapper mapper;
diff --git a/server/gateway/gateway-core/src/main/java/io/holoinsight/server/gateway/core/grpc/GatewayGrpcServiceImpl.java b/server/gateway/gateway-core/src/main/java/io/holoinsight/server/gateway/core/grpc/GatewayGrpcServiceImpl.java
index 4227e4074..ee4884d82 100644
--- a/server/gateway/gateway-core/src/main/java/io/holoinsight/server/gateway/core/grpc/GatewayGrpcServiceImpl.java
+++ b/server/gateway/gateway-core/src/main/java/io/holoinsight/server/gateway/core/grpc/GatewayGrpcServiceImpl.java
@@ -171,6 +171,10 @@ private WriteMetricsParam convertToWriteMetricsParam(AuthInfo authInfo,
continue;
}
+ if (tr.getRefCollectKey() == "") {
+ continue;
+ }
+
WriteMetricsRequestV4.Table table = tr.getTable();
WriteMetricsRequestV4.Header header = table.getHeader();
diff --git a/server/gateway/gateway-core/src/main/java/io/holoinsight/server/gateway/core/trace/GatewayTraceConfiguration.java b/server/gateway/gateway-core/src/main/java/io/holoinsight/server/gateway/core/trace/GatewayTraceConfiguration.java
index aa636a4e7..6458c78a3 100644
--- a/server/gateway/gateway-core/src/main/java/io/holoinsight/server/gateway/core/trace/GatewayTraceConfiguration.java
+++ b/server/gateway/gateway-core/src/main/java/io/holoinsight/server/gateway/core/trace/GatewayTraceConfiguration.java
@@ -8,7 +8,6 @@
import io.holoinsight.server.common.springboot.ConditionalOnFeature;
import io.holoinsight.server.common.springboot.HoloinsightProperties;
-import io.holoinsight.server.common.trace.TraceAgentConfigurationService;
import io.holoinsight.server.gateway.core.trace.controller.TraceAgentConfigurationController;
import io.holoinsight.server.gateway.core.trace.exporter.LocalTraceExporter;
import io.holoinsight.server.gateway.core.trace.exporter.RelayTraceExporter;
@@ -42,15 +41,15 @@ public TraceAgentConfigurationController agentConfigurationController() {
return new TraceAgentConfigurationController();
}
- /**
- *
- * traceAgentConfigurationService.
- *
- */
- @Bean
- public TraceAgentConfigurationService traceAgentConfigurationService() {
- return new TraceAgentConfigurationService();
- }
+ /// **
+ // *
+ // * traceAgentConfigurationService.
+ // *
+ // */
+ // @Bean
+ // public TraceAgentConfigurationService traceAgentConfigurationService() {
+ // return new TraceAgentConfigurationService();
+ // }
@Bean
public GatewayOTLPTraceHandler gatewayOTLPTraceHandler() {
diff --git a/server/gateway/gateway-core/src/main/java/io/holoinsight/server/gateway/core/trace/controller/TraceAgentConfigurationController.java b/server/gateway/gateway-core/src/main/java/io/holoinsight/server/gateway/core/trace/controller/TraceAgentConfigurationController.java
index b78121f37..e5133cb0c 100644
--- a/server/gateway/gateway-core/src/main/java/io/holoinsight/server/gateway/core/trace/controller/TraceAgentConfigurationController.java
+++ b/server/gateway/gateway-core/src/main/java/io/holoinsight/server/gateway/core/trace/controller/TraceAgentConfigurationController.java
@@ -4,7 +4,7 @@
package io.holoinsight.server.gateway.core.trace.controller;
import com.fasterxml.jackson.databind.ObjectMapper;
-import io.holoinsight.server.common.trace.TraceAgentConfiguration;
+import io.holoinsight.server.common.dao.entity.dto.TraceAgentConfigurationDTO;
import io.holoinsight.server.common.trace.TraceAgentConfigurationScheduler;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
@@ -42,7 +42,8 @@ public class TraceAgentConfigurationController {
*/
@PostMapping("/query")
@ResponseBody
- public TraceAgentConfiguration getAgentConfiguration(@RequestBody Map request) {
+ public TraceAgentConfigurationDTO getAgentConfiguration(
+ @RequestBody Map request) {
String tenant = request.get("tenant");
String service = request.get("service");
Map extendMap = new HashMap<>();
diff --git a/server/home/home-alert/src/main/java/io/holoinsight/server/home/alert/plugin/GatewayService.java b/server/home/home-alert/src/main/java/io/holoinsight/server/home/alert/plugin/GatewayService.java
index b3d5b7f0b..4fd23696a 100644
--- a/server/home/home-alert/src/main/java/io/holoinsight/server/home/alert/plugin/GatewayService.java
+++ b/server/home/home-alert/src/main/java/io/holoinsight/server/home/alert/plugin/GatewayService.java
@@ -11,14 +11,14 @@
import io.holoinsight.server.home.alert.service.event.AlertNotifyChainBuilder;
import io.holoinsight.server.home.alert.service.event.RecordSucOrFailNotify;
import io.holoinsight.server.home.biz.plugin.model.PluginContext;
-import io.holoinsight.server.home.biz.service.IntegrationPluginService;
+import io.holoinsight.server.common.service.IntegrationPluginService;
import io.holoinsight.server.common.dao.converter.AlarmRuleConverter;
import io.holoinsight.server.common.dao.converter.AlertTemplateConverter;
import io.holoinsight.server.common.dao.mapper.AlarmRuleMapper;
import io.holoinsight.server.common.dao.mapper.AlertTemplateMapper;
import io.holoinsight.server.common.dao.entity.AlarmRule;
import io.holoinsight.server.common.dao.entity.AlertTemplate;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
import io.holoinsight.server.common.dao.entity.dto.AlarmRuleDTO;
import io.holoinsight.server.common.dao.entity.dto.AlertTemplateDTO;
import io.holoinsight.server.common.dao.entity.dto.AlertNotifyRecordDTO;
diff --git a/server/home/home-alert/src/main/java/io/holoinsight/server/home/alert/service/event/AlertNotifyChainBuilder.java b/server/home/home-alert/src/main/java/io/holoinsight/server/home/alert/service/event/AlertNotifyChainBuilder.java
index 9d0ffed1f..cd44b5c88 100644
--- a/server/home/home-alert/src/main/java/io/holoinsight/server/home/alert/service/event/AlertNotifyChainBuilder.java
+++ b/server/home/home-alert/src/main/java/io/holoinsight/server/home/alert/service/event/AlertNotifyChainBuilder.java
@@ -4,7 +4,7 @@
package io.holoinsight.server.home.alert.service.event;
import io.holoinsight.server.home.alert.plugin.NotifyChain;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
import java.util.List;
diff --git a/server/home/home-alert/src/main/java/io/holoinsight/server/home/alert/service/event/DefaultAlertNotifyChainBuilder.java b/server/home/home-alert/src/main/java/io/holoinsight/server/home/alert/service/event/DefaultAlertNotifyChainBuilder.java
index b3e69f96e..91c7a2d45 100644
--- a/server/home/home-alert/src/main/java/io/holoinsight/server/home/alert/service/event/DefaultAlertNotifyChainBuilder.java
+++ b/server/home/home-alert/src/main/java/io/holoinsight/server/home/alert/service/event/DefaultAlertNotifyChainBuilder.java
@@ -4,7 +4,7 @@
package io.holoinsight.server.home.alert.service.event;
import io.holoinsight.server.home.alert.plugin.NotifyChain;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
import java.util.Collections;
import java.util.List;
diff --git a/server/home/home-boot/src/main/java/io/holoinsight/server/home/bootstrap/HoloinsightHomeConfiguration.java b/server/home/home-boot/src/main/java/io/holoinsight/server/home/bootstrap/HoloinsightHomeConfiguration.java
index ee300cf75..e04d431f4 100644
--- a/server/home/home-boot/src/main/java/io/holoinsight/server/home/bootstrap/HoloinsightHomeConfiguration.java
+++ b/server/home/home-boot/src/main/java/io/holoinsight/server/home/bootstrap/HoloinsightHomeConfiguration.java
@@ -26,10 +26,10 @@
import io.holoinsight.server.home.biz.plugin.MetricInfoCheckServiceImpl;
import io.holoinsight.server.home.biz.service.EnvironmentService;
import io.holoinsight.server.home.biz.service.TenantInitService;
-import io.holoinsight.server.home.biz.service.UserinfoVerificationService;
+import io.holoinsight.server.common.service.UserinfoVerificationService;
import io.holoinsight.server.home.biz.service.impl.DefaultEnvironmentServiceImpl;
import io.holoinsight.server.home.biz.service.impl.DefaultTenantInitServiceImpl;
-import io.holoinsight.server.home.biz.service.impl.UserinfoVerificationServiceImpl;
+import io.holoinsight.server.common.service.impl.UserinfoVerificationServiceImpl;
import io.holoinsight.server.common.service.impl.RequestContextAdapterImpl;
import io.holoinsight.server.home.web.controller.TraceAgentFacadeImpl;
import io.holoinsight.server.home.web.security.ApiSecurityService;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/GaeaCollectConfigConverter.java b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/GaeaCollectConfigConverter.java
index 796d8856c..331f59d83 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/GaeaCollectConfigConverter.java
+++ b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/converter/GaeaCollectConfigConverter.java
@@ -7,7 +7,7 @@
import io.holoinsight.server.home.dal.model.dto.GaeaCollectConfigDTO;
import io.holoinsight.server.common.dao.transformer.BooleanIntegerMapper;
import io.holoinsight.server.home.dal.transformer.GaeaCollectConfigJsonMapper;
-import io.holoinsight.server.home.dal.transformer.GaeaCollectRangeMapper;
+import io.holoinsight.server.common.dao.transformer.GaeaCollectRangeMapper;
import io.holoinsight.server.common.dao.transformer.MapJsonMapper;
import org.mapstruct.Mapper;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/AgentConfigurationMapper.java b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/AgentConfigurationMapper.java
deleted file mode 100644
index 8db31ddcf..000000000
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/AgentConfigurationMapper.java
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
- */
-package io.holoinsight.server.home.dal.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import io.holoinsight.server.home.dal.model.AgentConfiguration;
-
-public interface AgentConfigurationMapper extends BaseMapper {
-}
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/GaeaCollectConfigMapper.java b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/GaeaCollectConfigMapper.java
index a983d453d..0a252046f 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/GaeaCollectConfigMapper.java
+++ b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/mapper/GaeaCollectConfigMapper.java
@@ -3,8 +3,8 @@
*/
package io.holoinsight.server.home.dal.mapper;
-import io.holoinsight.server.home.dal.model.GaeaCollectConfig;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import io.holoinsight.server.home.dal.model.GaeaCollectConfig;
/**
*
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/AgentConfiguration.java b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/AgentConfiguration.java
deleted file mode 100644
index e33c08dae..000000000
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/AgentConfiguration.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
- */
-package io.holoinsight.server.home.dal.model;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import javax.persistence.Column;
-import java.util.Date;
-
-@Data
-@TableName("agent_configuration")
-public class AgentConfiguration {
- private String tenant;
-
- private String service;
-
- @Column(name = "app_id")
- private String appId;
-
- @Column(name = "env_id")
- private String envId;
-
- private String value;
-
- @Column(name = "gmt_create")
- private Date gmtCreate;
-
- @Column(name = "gmt_modified")
- private Date gmtModified;
-
-}
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/ClusterTaskDTO.java b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/ClusterTaskDTO.java
deleted file mode 100644
index 1ee2e91aa..000000000
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/ClusterTaskDTO.java
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
- */
-package io.holoinsight.server.home.dal.model.dto;
-
-/**
- *
- * @author jsy1001de
- * @version 1.0: ClusterTask.java, v 0.1 2022年03月17日 7:30 下午 jinsong.yjs Exp $
- */
-public class ClusterTaskDTO {
-}
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/CustomPluginDTO.java b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/CustomPluginDTO.java
index b2176e4f2..e0f2b7435 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/CustomPluginDTO.java
+++ b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/CustomPluginDTO.java
@@ -3,6 +3,7 @@
*/
package io.holoinsight.server.home.dal.model.dto;
+import io.holoinsight.server.common.dao.emuns.CustomPluginPeriodType;
import io.holoinsight.server.common.dao.entity.AlarmMetric;
import io.holoinsight.server.home.dal.model.dto.conf.CustomPluginConf;
import lombok.Data;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/GaeaCollectConfigDTO.java b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/GaeaCollectConfigDTO.java
index 78f21c025..aeaabe9f1 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/GaeaCollectConfigDTO.java
+++ b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/GaeaCollectConfigDTO.java
@@ -3,6 +3,7 @@
*/
package io.holoinsight.server.home.dal.model.dto;
+import io.holoinsight.server.common.dao.entity.GaeaCollectRange;
import io.holoinsight.server.registry.model.integration.GaeaTask;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -10,7 +11,6 @@
import java.io.Serializable;
import java.util.Date;
-import java.util.HashMap;
import java.util.Map;
/**
@@ -31,6 +31,7 @@ public class GaeaCollectConfigDTO {
public String tableName;
public Boolean deleted;
+ public Boolean storage;
public Long version;
public String type;
@@ -44,26 +45,5 @@ public class GaeaCollectConfigDTO {
public Date gmtModified;
- @Data
- @NoArgsConstructor
- @AllArgsConstructor
- public static class GaeaCollectRange extends CollectRange {
- public String type;
- public CloudMonitorRange cloudmonitor;
-
- public boolean isEqual(GaeaCollectRange originalRecord) {
- if ((originalRecord == null)
- || (this.cloudmonitor == null && originalRecord.cloudmonitor != null)
- || (this.cloudmonitor != null && originalRecord.cloudmonitor == null)) {
- return false;
- }
- return this.cloudmonitor.isEqual(originalRecord.cloudmonitor);
- }
- }
-
- public static abstract class CollectRange implements Serializable {
- private static final long serialVersionUID = -2140563386879600142L;
-
- }
}
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/OpenmetricsScraperDTO.java b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/OpenmetricsScraperDTO.java
index b45489921..b876ac788 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/OpenmetricsScraperDTO.java
+++ b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/OpenmetricsScraperDTO.java
@@ -6,6 +6,7 @@
import java.util.Date;
import java.util.List;
+import io.holoinsight.server.common.dao.entity.CloudMonitorRange;
import io.holoinsight.server.registry.model.OpenmetricsScraperTask;
import lombok.Data;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/ResponseTypeEnum.java b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/ResponseTypeEnum.java
deleted file mode 100644
index 0a91d49cf..000000000
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/ResponseTypeEnum.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
- */
-package io.holoinsight.server.home.dal.model.dto;
-
-/**
- * 配置http错误码时的枚举类,代表从何处取错误码
- */
-public enum ResponseTypeEnum {
-
- /**
- * Return返回枚举
- */
- RETURN("Return", "Return"),
-
- /**
- * ModelMap枚举
- */
- MODEL_MAP("ModelMap", "ModelMap"),
- /**
- * 默认枚举
- */
- DEFAULT("Default", "Default");
-
-
- private String code;
- private String value;
-
- ResponseTypeEnum(String code, String value) {
- this.code = code;
- this.value = value;
- }
-
- /**
- * Getter method for property code.
- *
- * @return property value of code
- */
- public String getCode() {
- return code;
- }
-
- /**
- * Setter method for property counterType.
- *
- * @param code value to be assigned to property code
- */
- public void setCode(String code) {
- this.code = code;
- }
-
- /**
- * Getter method for property value.
- *
- * @return property value of value
- */
- public String getValue() {
- return value;
- }
-
- /**
- * Setter method for property counterType.
- *
- * @param value value to be assigned to property value
- */
- public void setValue(String value) {
- this.value = value;
- }
-}
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/TenantOpsDTO.java b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/TenantOpsDTO.java
deleted file mode 100644
index b9d2a5d8b..000000000
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/TenantOpsDTO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
- */
-package io.holoinsight.server.home.dal.model.dto;
-
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- *
- * @author jsy1001de
- * @version 1.0: TenantOps.java, v 0.1 2022年06月21日 3:07 下午 jinsong.yjs Exp $
- */
-@Data
-public class TenantOpsDTO {
- public Long id;
- public String tenant;
- public TenantOpsStorage storage;
-
- public Date gmtCreate;
- public Date gmtModified;
-}
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/TenantOpsStorage.java b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/TenantOpsStorage.java
deleted file mode 100644
index 57dd3a678..000000000
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/TenantOpsStorage.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
- */
-package io.holoinsight.server.home.dal.model.dto;
-
-import lombok.Data;
-
-/**
- *
- * { "metric": { "type": "ceresdb", "ceresdb": { "accessUser": null, // 租户名称 "accessKey": null, //
- * token "address": "address", "port": 5000 } } }
- *
- * @author jsy1001de
- * @version 1.0: TenantOpsStorage.java, v 0.1 2022年06月21日 3:08 下午 jinsong.yjs Exp $
- */
-@Data
-public class TenantOpsStorage {
- public StorageMetric metric;
-
- @Data
- public static class StorageMetric {
-
- public String type;
- public StorageCeresDB ceresdb;
- }
-
- @Data
- public static class StorageCeresDB {
- public String accessUser; // tenant
- public String accessKey; // token
- public String address; // ceresdb address
- public String port; // ceresdb port
- public Long ttl; // 保存数据周期
- }
-}
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/TokenDTO.java b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/TokenDTO.java
deleted file mode 100644
index 31af4339d..000000000
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/TokenDTO.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
- */
-package io.holoinsight.server.home.dal.model.dto;
-
-import lombok.Data;
-
-/**
- *
- * @author jsy1001de
- * @version 1.0: Token.java, v 0.1 2022年05月19日 5:48 下午 jinsong.yjs Exp $
- */
-@Data
-public class TokenDTO {
- private Long id;
-
- private String name;
-
- private String token;
-
- private Long queryLimit;
-
- private Long tenantId;
-
- private Long workspaceId;
-
- private Integer intervalCount;
-
- private Integer queueMaxSize;
-
- private Integer concurent;
-
- private Boolean share;
-
- private String authTenant;
-
- private String authBizDomain;
-
- private String authWorkspace;
-
- private Integer modelingQueueMaxSize;
-
- private String config;
-
-}
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/conf/CollectMetric.java b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/conf/CollectMetric.java
index af95876ab..906554fe1 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/conf/CollectMetric.java
+++ b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/conf/CollectMetric.java
@@ -70,14 +70,11 @@ public class CollectMetric implements Serializable {
public Integer sampleMaxLength = 4096;
/****************************** 预计算 ******************************/
- // pre calculate, 是否开启预计算
+ // pre calculate, 是否开启预计算, 开启后单机明细数据不存储
public Boolean calculate;
public LogCalculate logCalculate;
- // 单机明细数据是否存储
- public Boolean notStorage;
-
@Data
public static class Metric implements Serializable {
@@ -122,10 +119,6 @@ public static class LogSampleRule implements Serializable {
@Data
public static class LogCalculate {
- /**
- * agg 预聚合指标表名称,非前端传入,是后端自动生成
- */
- public String aggTableName;
public FillZero fillZero;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/conf/CustomPluginConf.java b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/conf/CustomPluginConf.java
index 82013e06a..5a7b80fc2 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/conf/CustomPluginConf.java
+++ b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/dto/conf/CustomPluginConf.java
@@ -3,7 +3,7 @@
*/
package io.holoinsight.server.home.dal.model.dto.conf;
-import io.holoinsight.server.home.dal.model.dto.CloudMonitorRange;
+import io.holoinsight.server.common.dao.entity.CloudMonitorRange;
import lombok.Data;
import java.io.Serializable;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/openai/CustomPluginUpsertFc.java b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/openai/CustomPluginUpsertFc.java
index 11372f03e..612dff753 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/openai/CustomPluginUpsertFc.java
+++ b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/model/openai/CustomPluginUpsertFc.java
@@ -8,7 +8,7 @@
import com.fasterxml.jackson.module.jsonSchema.JsonSchema;
import com.fasterxml.jackson.module.jsonSchema.JsonSchemaGenerator;
import io.holoinsight.server.common.J;
-import io.holoinsight.server.home.dal.model.dto.CustomPluginPeriodType;
+import io.holoinsight.server.common.dao.emuns.CustomPluginPeriodType;
import lombok.Data;
import java.util.Arrays;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/GaeaCollectConfigJsonMapper.java b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/GaeaCollectConfigJsonMapper.java
index 07c35644e..6830113aa 100644
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/GaeaCollectConfigJsonMapper.java
+++ b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/GaeaCollectConfigJsonMapper.java
@@ -4,8 +4,8 @@
package io.holoinsight.server.home.dal.transformer;
import io.holoinsight.server.common.J;
-import io.holoinsight.server.registry.model.integration.GaeaTask;
import com.google.gson.reflect.TypeToken;
+import io.holoinsight.server.registry.model.integration.GaeaTask;
import java.lang.reflect.Type;
diff --git a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/TenantOpsStorageMapper.java b/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/TenantOpsStorageMapper.java
deleted file mode 100644
index e67b74300..000000000
--- a/server/home/home-dal/src/main/java/io/holoinsight/server/home/dal/transformer/TenantOpsStorageMapper.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
- */
-package io.holoinsight.server.home.dal.transformer;
-
-import io.holoinsight.server.common.J;
-import com.google.gson.reflect.TypeToken;
-import io.holoinsight.server.home.dal.model.dto.TenantOpsStorage;
-import org.springframework.stereotype.Component;
-
-import java.lang.reflect.Type;
-
-/**
- *
- * @author jsy1001de
- * @version 1.0: TenantOpsStorageMapper.java, v 0.1 2022年06月21日 3:14 下午 jinsong.yjs Exp $
- */
-@Component
-public class TenantOpsStorageMapper {
- public static String asString(TenantOpsStorage storage) {
- return J.toJson(storage);
- }
-
- public static TenantOpsStorage asObj(String storage) {
- Type t = new TypeToken() {}.getType();
- return J.fromJson(storage, t);
- }
-}
diff --git a/server/home/home-dal/src/test/java/io/holoinsight/server/home/dal/model/dto/IntegrationPluginDTOTest.java b/server/home/home-dal/src/test/java/io/holoinsight/server/home/dal/model/dto/IntegrationPluginDTOTest.java
index 5e1580641..076edde64 100644
--- a/server/home/home-dal/src/test/java/io/holoinsight/server/home/dal/model/dto/IntegrationPluginDTOTest.java
+++ b/server/home/home-dal/src/test/java/io/holoinsight/server/home/dal/model/dto/IntegrationPluginDTOTest.java
@@ -4,11 +4,10 @@
package io.holoinsight.server.home.dal.model.dto;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
import org.junit.Assert;
import org.junit.Test;
-import static org.junit.Assert.*;
-
/**
* @author masaimu
* @version 2023-03-16 18:08:00
@@ -18,8 +17,8 @@ public class IntegrationPluginDTOTest {
@Test
public void testGet() {
IntegrationPluginDTO.DataRange dataRange = new IntegrationPluginDTO.DataRange();
- dataRange.extraMap.put("testExtra", "extraValue");
- dataRange.valuesMap.put("valueKey", "value");
+ dataRange.getExtraMap().put("testExtra", "extraValue");
+ dataRange.getValuesMap().put("valueKey", "value");
Assert.assertEquals(dataRange.getExtra("testExtra"), "extraValue");
Assert.assertEquals(dataRange.get("valueKey"), "value");
}
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/common/AggTaskUtil.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/common/AggTaskUtil.java
index b37415679..79dc29af9 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/common/AggTaskUtil.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/common/AggTaskUtil.java
@@ -146,7 +146,7 @@ public static Output buildOutput(CollectMetric collectMetric) {
OutputItem outputItem = new OutputItem();
outputItem.setType(OUTPUT_STORAGE_ENGINE);
- outputItem.setName(collectMetric.getLogCalculate().getAggTableName());
+ outputItem.setName(collectMetric.getTargetTable());
List fields = new ArrayList<>();
OutputField outputField = new OutputField();
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/common/GaeaConvertUtil.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/common/GaeaConvertUtil.java
index 515556a9e..f309a21bc 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/common/GaeaConvertUtil.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/common/GaeaConvertUtil.java
@@ -3,9 +3,9 @@
*/
package io.holoinsight.server.home.biz.common;
+import io.holoinsight.server.common.dao.entity.GaeaCollectRange;
import io.holoinsight.server.home.biz.plugin.config.MetaLabel;
-import io.holoinsight.server.home.dal.model.dto.CloudMonitorRange;
-import io.holoinsight.server.home.dal.model.dto.GaeaCollectConfigDTO.GaeaCollectRange;
+import io.holoinsight.server.common.dao.entity.CloudMonitorRange;
import org.springframework.util.CollectionUtils;
import java.util.Collections;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/listener/CustomPluginUpdateListener.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/listener/CustomPluginUpdateListener.java
index cb92c05c9..8b32e2a32 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/listener/CustomPluginUpdateListener.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/listener/CustomPluginUpdateListener.java
@@ -107,7 +107,7 @@ public void onEvent(CustomPluginDTO customPluginDTO) {
if (null != collectMetric.getCalculate() && Boolean.TRUE == collectMetric.getCalculate()) {
AggTask aggTask = buildAggTask(collectMetric, customPluginDTO);
- aggTaskMaps.put(collectMetric.logCalculate.aggTableName, aggTask);
+ aggTaskMaps.put(collectMetric.targetTable, aggTask);
}
}
@@ -278,10 +278,12 @@ private void saveMetricInfo(CustomPluginDTO customPluginDTO) {
List collectMetrics = conf.getCollectMetrics();
for (CollectMetric collectMetric : collectMetrics) {
- saveMetricByCollectMetric(customPluginDTO, collectMetric, conf.spm, false);
+ Boolean isAgg = Boolean.FALSE;
if (null != collectMetric.getCalculate() && Boolean.TRUE == collectMetric.getCalculate()) {
- saveMetricByCollectMetric(customPluginDTO, collectMetric, conf.spm, true);
+ isAgg = Boolean.TRUE;
}
+ saveMetricByCollectMetric(customPluginDTO, collectMetric, conf.spm, isAgg);
+
}
}
@@ -290,9 +292,6 @@ private void saveMetricByCollectMetric(CustomPluginDTO customPluginDTO,
CollectMetric collectMetric, Boolean isSpm, Boolean isAgg) {
String tableName = collectMetric.getTableName();
String targetTable = collectMetric.getTargetTable();
- if (isAgg) {
- targetTable = collectMetric.logCalculate.getAggTableName();
- }
try {
MetricInfoDTO metricInfoDTO = new MetricInfoDTO();
@@ -324,10 +323,10 @@ private void saveMetricByCollectMetric(CustomPluginDTO customPluginDTO,
metricInfoDTO.setPeriod(customPluginDTO.getPeriodType().dataUnitMs / 1000);
List tags = new ArrayList<>(Arrays.asList("ip", "hostname", "namespace"));
- if (!isAgg && !CollectionUtils.isEmpty(collectMetric.tags)) {
+ if (!CollectionUtils.isEmpty(collectMetric.tags)) {
tags.addAll(collectMetric.tags);
}
- if (!isAgg && !CollectionUtils.isEmpty(collectMetric.refTags)) {
+ if (!CollectionUtils.isEmpty(collectMetric.refTags)) {
tags.addAll(collectMetric.refTags);
}
metricInfoDTO.setTags(tags);
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/listener/IntegrationGeneratedUpdateListener.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/listener/IntegrationGeneratedUpdateListener.java
index 1348a3c33..eb893b152 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/listener/IntegrationGeneratedUpdateListener.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/listener/IntegrationGeneratedUpdateListener.java
@@ -14,10 +14,10 @@
import io.holoinsight.server.home.biz.plugin.config.PortCheckPluginConfig;
import io.holoinsight.server.home.biz.service.TenantInitService;
import io.holoinsight.server.common.EventBusHolder;
-import io.holoinsight.server.home.dal.model.dto.CloudMonitorRange;
-import io.holoinsight.server.home.dal.model.dto.GaeaCollectConfigDTO.GaeaCollectRange;
-import io.holoinsight.server.home.dal.model.dto.IntegrationGeneratedDTO;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.CloudMonitorRange;
+import io.holoinsight.server.common.dao.entity.GaeaCollectRange;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationGeneratedDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/listener/IntegrationPluginUpdateListener.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/listener/IntegrationPluginUpdateListener.java
index 9f7c9897b..42b42e15a 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/listener/IntegrationPluginUpdateListener.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/listener/IntegrationPluginUpdateListener.java
@@ -11,7 +11,7 @@
import io.holoinsight.server.home.biz.service.openai.OpenAiService;
import io.holoinsight.server.common.EventBusHolder;
import io.holoinsight.server.home.dal.model.dto.GaeaCollectConfigDTO;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
import com.google.common.eventbus.AllowConcurrentEvents;
import com.google.common.eventbus.Subscribe;
import lombok.extern.slf4j.Slf4j;
@@ -22,8 +22,8 @@
import java.util.ArrayList;
import java.util.List;
-import static io.holoinsight.server.home.biz.service.impl.IntegrationPluginServiceImpl.checkActionType;
-import static io.holoinsight.server.home.biz.service.impl.IntegrationPluginServiceImpl.isClassicPlugin;
+import static io.holoinsight.server.common.service.impl.IntegrationPluginServiceImpl.checkActionType;
+import static io.holoinsight.server.common.service.impl.IntegrationPluginServiceImpl.isClassicPlugin;
/**
* @author xiangwanpeng
@@ -56,7 +56,7 @@ public void onEvent(IntegrationPluginDTO integrationPluginDTO) {
integrationPluginDTO.getId());
try {
boolean needUpsertGaea = isClassicPlugin(integrationPluginDTO.getProduct())
- || checkActionType(integrationPluginDTO, null, this.pluginRepository);
+ || checkActionType(integrationPluginDTO, null);
if (needUpsertGaea) {
List upsert = upsertGaea(integrationPluginDTO);
notify(upsert);
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/AbstractHostingAlertPlugin.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/AbstractHostingAlertPlugin.java
index 24c3d2b6b..c7bd84155 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/AbstractHostingAlertPlugin.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/AbstractHostingAlertPlugin.java
@@ -9,13 +9,13 @@
import io.holoinsight.server.home.biz.plugin.model.HostingAlertList;
import io.holoinsight.server.home.biz.plugin.model.HostingPlugin;
import io.holoinsight.server.common.service.AlertRuleService;
-import io.holoinsight.server.home.biz.service.IntegrationProductService;
+import io.holoinsight.server.common.service.IntegrationProductService;
import io.holoinsight.server.common.dao.mapper.AlarmSubscribeMapper;
import io.holoinsight.server.common.dao.mapper.AlarmWebhookMapper;
import io.holoinsight.server.common.dao.entity.AlarmSubscribe;
import io.holoinsight.server.common.dao.entity.AlarmWebhook;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
-import io.holoinsight.server.home.dal.model.dto.IntegrationProductDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationProductDTO;
import io.holoinsight.server.common.dao.entity.dto.AlarmRuleDTO;
import io.holoinsight.server.common.MonitorPageRequest;
import io.holoinsight.server.common.MonitorPageResult;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/DefaultMarketplaceProductHandler.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/DefaultMarketplaceProductHandler.java
index 2132e6b13..89a5c224e 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/DefaultMarketplaceProductHandler.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/DefaultMarketplaceProductHandler.java
@@ -7,7 +7,7 @@
import io.holoinsight.server.common.J;
import io.holoinsight.server.common.service.AlertWebhookService;
import io.holoinsight.server.common.service.ApiKeyService;
-import io.holoinsight.server.home.biz.service.MarketplacePluginService;
+import io.holoinsight.server.common.service.MarketplacePluginService;
import io.holoinsight.server.common.MonitorException;
import io.holoinsight.server.common.ResultCodeEnum;
import io.holoinsight.server.common.scope.MonitorCookieUtil;
@@ -15,8 +15,8 @@
import io.holoinsight.server.common.dao.entity.AlarmWebhook;
import io.holoinsight.server.common.dao.entity.ApiKey;
import io.holoinsight.server.common.dao.entity.dto.AlarmWebhookDTO;
-import io.holoinsight.server.home.dal.model.dto.MarketplacePluginDTO;
-import io.holoinsight.server.home.dal.model.dto.MarketplaceProductDTO;
+import io.holoinsight.server.common.dao.entity.dto.MarketplacePluginDTO;
+import io.holoinsight.server.common.dao.entity.dto.MarketplaceProductDTO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/MarketplaceProductHandler.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/MarketplaceProductHandler.java
index c639384ab..c89ef81c0 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/MarketplaceProductHandler.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/MarketplaceProductHandler.java
@@ -3,8 +3,8 @@
*/
package io.holoinsight.server.home.biz.plugin;
-import io.holoinsight.server.home.dal.model.dto.MarketplacePluginDTO;
-import io.holoinsight.server.home.dal.model.dto.MarketplaceProductDTO;
+import io.holoinsight.server.common.dao.entity.dto.MarketplacePluginDTO;
+import io.holoinsight.server.common.dao.entity.dto.MarketplaceProductDTO;
/**
* @author masaimu
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/config/LogPluginConfig.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/config/LogPluginConfig.java
index af409302e..df8dd74a4 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/config/LogPluginConfig.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/config/LogPluginConfig.java
@@ -3,7 +3,7 @@
*/
package io.holoinsight.server.home.biz.plugin.config;
-import io.holoinsight.server.home.dal.model.dto.CustomPluginPeriodType;
+import io.holoinsight.server.common.dao.emuns.CustomPluginPeriodType;
import lombok.Data;
/**
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/AbstractCentralIntegrationPlugin.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/AbstractCentralIntegrationPlugin.java
index 476ebafd8..27cf9df88 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/AbstractCentralIntegrationPlugin.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/AbstractCentralIntegrationPlugin.java
@@ -3,10 +3,10 @@
*/
package io.holoinsight.server.home.biz.plugin.core;
+import io.holoinsight.server.common.dao.entity.GaeaCollectRange;
import io.holoinsight.server.home.biz.common.GaeaConvertUtil;
import io.holoinsight.server.home.biz.plugin.config.CollectType;
-import io.holoinsight.server.home.dal.model.dto.GaeaCollectConfigDTO.GaeaCollectRange;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
import io.holoinsight.server.registry.model.ExecuteRule;
import java.util.Map;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/AbstractIntegrationPlugin.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/AbstractIntegrationPlugin.java
index 5fa63d0ba..02fcff03f 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/AbstractIntegrationPlugin.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/AbstractIntegrationPlugin.java
@@ -3,15 +3,15 @@
*/
package io.holoinsight.server.home.biz.plugin.core;
+import io.holoinsight.server.common.dao.entity.GaeaCollectRange;
import io.holoinsight.server.home.biz.plugin.config.CollectType;
import io.holoinsight.server.home.biz.plugin.model.Plugin;
import io.holoinsight.server.home.biz.plugin.model.PluginType;
-import io.holoinsight.server.home.biz.service.IntegrationProductService;
+import io.holoinsight.server.common.service.IntegrationProductService;
import io.holoinsight.server.home.biz.service.MetaService;
import io.holoinsight.server.home.biz.service.TenantInitService;
-import io.holoinsight.server.home.dal.model.dto.CloudMonitorRange;
-import io.holoinsight.server.home.dal.model.dto.GaeaCollectConfigDTO.GaeaCollectRange;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.CloudMonitorRange;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
import io.holoinsight.server.registry.model.integration.GaeaTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/AbstractLocalIntegrationPlugin.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/AbstractLocalIntegrationPlugin.java
index 06b5bd606..2bf3628b1 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/AbstractLocalIntegrationPlugin.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/AbstractLocalIntegrationPlugin.java
@@ -3,12 +3,12 @@
*/
package io.holoinsight.server.home.biz.plugin.core;
+import io.holoinsight.server.common.dao.entity.GaeaCollectRange;
import io.holoinsight.server.home.biz.common.GaeaConvertUtil;
import io.holoinsight.server.home.biz.plugin.config.CollectType;
import io.holoinsight.server.home.biz.plugin.config.MetaLabel;
-import io.holoinsight.server.home.dal.model.dto.CloudMonitorRange;
-import io.holoinsight.server.home.dal.model.dto.GaeaCollectConfigDTO.GaeaCollectRange;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.CloudMonitorRange;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
import io.holoinsight.server.registry.model.Elect;
import io.holoinsight.server.registry.model.ExecuteRule;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/AlibabaCloudPlugin.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/AlibabaCloudPlugin.java
index d598aa643..118d3c13b 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/AlibabaCloudPlugin.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/AlibabaCloudPlugin.java
@@ -5,11 +5,11 @@
import com.google.gson.reflect.TypeToken;
import io.holoinsight.server.common.J;
+import io.holoinsight.server.common.dao.entity.GaeaCollectRange;
import io.holoinsight.server.home.biz.common.MetaDictUtil;
import io.holoinsight.server.home.biz.plugin.model.PluginModel;
-import io.holoinsight.server.home.dal.model.dto.CloudMonitorRange;
-import io.holoinsight.server.home.dal.model.dto.GaeaCollectConfigDTO.GaeaCollectRange;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.CloudMonitorRange;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
import io.holoinsight.server.registry.model.integration.alicloud.AliCloudTask;
import io.holoinsight.server.registry.model.integration.alicloud.AlicloudConf;
import io.holoinsight.server.registry.model.integration.alicloud.NameMetrics;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/JvmPlugin.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/JvmPlugin.java
index fb3cab6be..c7dae454e 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/JvmPlugin.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/JvmPlugin.java
@@ -5,7 +5,7 @@
import io.holoinsight.server.home.biz.plugin.config.BasePluginConfig;
import io.holoinsight.server.home.biz.plugin.model.PluginModel;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
import io.holoinsight.server.registry.model.integration.jvm.JvmTask;
import io.holoinsight.server.common.J;
import com.google.gson.reflect.TypeToken;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/LogPlugin.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/LogPlugin.java
index b4d68f58c..f4eb04da4 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/LogPlugin.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/LogPlugin.java
@@ -11,8 +11,8 @@
import io.holoinsight.server.home.biz.common.GaeaConvertUtil;
import io.holoinsight.server.home.biz.common.GaeaSqlTaskUtil;
import io.holoinsight.server.home.biz.plugin.config.LogPluginConfig;
-import io.holoinsight.server.home.dal.model.dto.CustomPluginPeriodType;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.emuns.CustomPluginPeriodType;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
import io.holoinsight.server.home.dal.model.dto.conf.CollectMetric;
import io.holoinsight.server.home.dal.model.dto.conf.CustomPluginConf;
import io.holoinsight.server.home.dal.model.dto.conf.CustomPluginConf.ExtraConfig;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/MysqlPlugin.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/MysqlPlugin.java
index 520c2757f..05a1c3ec9 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/MysqlPlugin.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/MysqlPlugin.java
@@ -4,7 +4,7 @@
package io.holoinsight.server.home.biz.plugin.core;
import io.holoinsight.server.home.biz.plugin.model.PluginModel;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
import io.holoinsight.server.registry.model.integration.mysql.MysqlTask;
import io.holoinsight.server.common.J;
import com.google.gson.reflect.TypeToken;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/MysqlPluginV2.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/MysqlPluginV2.java
index cf5d58a7f..bef9019ef 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/MysqlPluginV2.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/MysqlPluginV2.java
@@ -7,12 +7,12 @@
import com.google.gson.reflect.TypeToken;
import io.holoinsight.server.common.J;
import io.holoinsight.server.common.MD5Hash;
+import io.holoinsight.server.common.dao.entity.GaeaCollectRange;
import io.holoinsight.server.home.biz.common.GaeaConvertUtil;
import io.holoinsight.server.home.biz.plugin.config.CollectType;
import io.holoinsight.server.home.biz.plugin.config.MysqlConfig;
import io.holoinsight.server.home.biz.plugin.model.PluginModel;
-import io.holoinsight.server.home.dal.model.dto.GaeaCollectConfigDTO.GaeaCollectRange;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
import io.holoinsight.server.registry.model.integration.GaeaTask;
import io.holoinsight.server.registry.model.integration.mysql.MysqlConf;
import io.holoinsight.server.registry.model.integration.mysql.MysqlTaskV2;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/PortCheckPlugin.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/PortCheckPlugin.java
index e0639a2ef..535353794 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/PortCheckPlugin.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/PortCheckPlugin.java
@@ -10,7 +10,7 @@
import io.holoinsight.server.home.biz.plugin.model.PluginModel;
import io.holoinsight.server.home.biz.plugin.model.PluginType;
import io.holoinsight.server.home.biz.service.TenantInitService;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
import io.holoinsight.server.registry.model.integration.IntegrationTransForm;
import io.holoinsight.server.registry.model.integration.portcheck.PortCheckTask;
import io.holoinsight.server.common.J;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/SpringBootPlugin.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/SpringBootPlugin.java
index 910259040..ecab6c00c 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/SpringBootPlugin.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/core/SpringBootPlugin.java
@@ -5,7 +5,7 @@
import io.holoinsight.server.home.biz.plugin.config.SpringBootConfig;
import io.holoinsight.server.home.biz.plugin.model.PluginModel;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
import io.holoinsight.server.registry.model.integration.springboot.SpringBootConf;
import io.holoinsight.server.registry.model.integration.springboot.SpringBootTask;
import io.holoinsight.server.common.J;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/model/DefaultHostingAlertPlugin.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/model/DefaultHostingAlertPlugin.java
index 6c82481d6..c9d4bfd0f 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/model/DefaultHostingAlertPlugin.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/model/DefaultHostingAlertPlugin.java
@@ -4,7 +4,7 @@
package io.holoinsight.server.home.biz.plugin.model;
import io.holoinsight.server.home.biz.plugin.AbstractHostingAlertPlugin;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
import io.holoinsight.server.common.dao.entity.dto.AlarmRuleDTO;
import org.springframework.stereotype.Component;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/model/HostingAlert.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/model/HostingAlert.java
index 3d8898e8d..a44118005 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/model/HostingAlert.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/model/HostingAlert.java
@@ -5,8 +5,8 @@
import io.holoinsight.server.common.J;
import io.holoinsight.server.common.dao.entity.AlarmRule;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
-import io.holoinsight.server.home.dal.model.dto.IntegrationProductDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationProductDTO;
import io.holoinsight.server.common.dao.entity.dto.AlarmRuleDTO;
import io.holoinsight.server.common.dao.entity.dto.alarm.AlarmRuleConf;
import io.holoinsight.server.common.dao.entity.dto.alarm.TimeFilter;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/model/HostingAlertList.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/model/HostingAlertList.java
index 5320a946e..76d857ded 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/model/HostingAlertList.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/model/HostingAlertList.java
@@ -3,8 +3,8 @@
*/
package io.holoinsight.server.home.biz.plugin.model;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
-import io.holoinsight.server.home.dal.model.dto.IntegrationProductDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationProductDTO;
import io.holoinsight.server.common.dao.entity.dto.AlarmRuleDTO;
import io.holoinsight.server.common.dao.entity.dto.alarm.trigger.Filter;
import org.springframework.util.CollectionUtils;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/model/HostingPlugin.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/model/HostingPlugin.java
index f35d79232..665eb1cdc 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/model/HostingPlugin.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/model/HostingPlugin.java
@@ -3,7 +3,7 @@
*/
package io.holoinsight.server.home.biz.plugin.model;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
/**
* @author masaimu
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/model/IntegrationLogConfig.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/model/IntegrationLogConfig.java
index 68655c8f5..077c73596 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/model/IntegrationLogConfig.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/plugin/model/IntegrationLogConfig.java
@@ -3,7 +3,7 @@
*/
package io.holoinsight.server.home.biz.plugin.model;
-import io.holoinsight.server.home.dal.model.dto.IntegrationConfig;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationConfig;
import io.holoinsight.server.home.dal.model.dto.conf.CustomPluginConf;
import lombok.Data;
import lombok.EqualsAndHashCode;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/AgentConfigurationService.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/AgentConfigurationService.java
deleted file mode 100644
index 3a41ba06e..000000000
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/AgentConfigurationService.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
- */
-package io.holoinsight.server.home.biz.service;
-
-import io.holoinsight.server.home.dal.model.AgentConfiguration;
-import com.baomidou.mybatisplus.extension.service.IService;
-
-public interface AgentConfigurationService extends IService {
- AgentConfiguration get(AgentConfiguration agentConfiguration);
-
- boolean createOrUpdate(AgentConfiguration agentConfiguration);
-}
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/TenantInitService.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/TenantInitService.java
index fa6faad7d..c6e46218b 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/TenantInitService.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/TenantInitService.java
@@ -4,15 +4,14 @@
package io.holoinsight.server.home.biz.service;
import io.holoinsight.server.apm.common.model.specification.sw.Tag;
-import io.holoinsight.server.common.dao.entity.MetricInfo;
import io.holoinsight.server.common.dao.entity.dto.MetricInfoDTO;
import io.holoinsight.server.common.dao.entity.dto.TenantOpsStorage;
import io.holoinsight.server.home.biz.plugin.config.MetaLabel;
import io.holoinsight.server.common.scope.MonitorScope;
import io.holoinsight.server.common.scope.MonitorUser;
-import io.holoinsight.server.home.dal.model.dto.CloudMonitorRange;
+import io.holoinsight.server.common.dao.entity.CloudMonitorRange;
import io.holoinsight.server.home.dal.model.dto.CustomPluginDTO;
-import io.holoinsight.server.home.dal.model.dto.IntegrationGeneratedDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationGeneratedDTO;
import io.holoinsight.server.query.grpc.QueryProto.QueryFilter;
import java.util.List;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/AgentConfigurationServiceImpl.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/AgentConfigurationServiceImpl.java
deleted file mode 100644
index 87f0dbdb8..000000000
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/AgentConfigurationServiceImpl.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
- */
-package io.holoinsight.server.home.biz.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import io.holoinsight.server.home.biz.service.AgentConfigurationService;
-import io.holoinsight.server.home.dal.mapper.AgentConfigurationMapper;
-import io.holoinsight.server.home.dal.model.AgentConfiguration;
-import org.springframework.stereotype.Service;
-
-import java.util.Date;
-
-/**
- *
- * @author jsy1001de
- * @version 1.0: AgentConfigurationServiceImpl.java, v 0.1 2022年06月21日 3:17 下午 jinsong.yjs Exp $
- */
-@Service
-public class AgentConfigurationServiceImpl extends
- ServiceImpl implements AgentConfigurationService {
-
- @Override
- public AgentConfiguration get(AgentConfiguration agentConfiguration) {
- QueryWrapper queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("tenant", agentConfiguration.getTenant());
- queryWrapper.eq("service", agentConfiguration.getService());
- queryWrapper.eq("app_id", agentConfiguration.getAppId());
- queryWrapper.eq("env_id", agentConfiguration.getEnvId());
-
- return getOne(queryWrapper);
- }
-
- @Override
- public boolean createOrUpdate(AgentConfiguration agentConfiguration) {
- AgentConfiguration query = get(agentConfiguration);
- agentConfiguration.setGmtModified(new Date());
- boolean result;
- if (query == null) {
- agentConfiguration.setGmtCreate(new Date());
- result = save(agentConfiguration);
- } else {
- UpdateWrapper updateWrapper = new UpdateWrapper<>();
- updateWrapper.eq("tenant", agentConfiguration.getTenant());
- updateWrapper.eq("service", agentConfiguration.getService());
- updateWrapper.eq("app_id", agentConfiguration.getAppId());
- updateWrapper.eq("env_id", agentConfiguration.getEnvId());
- updateWrapper.set("value", agentConfiguration.getValue());
- updateWrapper.set("gmt_modified", agentConfiguration.getGmtModified());
-
- result = update(updateWrapper);
- }
-
- return result;
- }
-}
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/CustomPluginServiceImpl.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/CustomPluginServiceImpl.java
index aeab644b4..b29318605 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/CustomPluginServiceImpl.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/CustomPluginServiceImpl.java
@@ -222,11 +222,6 @@ private CustomPluginDTO doToDTO(CustomPlugin customPlugin) {
tableName = collectMetric.name;
}
collectMetric.targetTable = tenantInitService.getLogMonitorMetricTable(tableName);
- if (null != collectMetric.getCalculate() && Boolean.TRUE == collectMetric.getCalculate()) {
- String aggTableName = collectMetric.tableName + "_agg_" + customPluginDTO.id;
- collectMetric.logCalculate.aggTableName =
- tenantInitService.getLogMonitorMetricTable(aggTableName);
- }
});
}
return customPluginDTO;
@@ -245,13 +240,6 @@ private List dosToDTOs(List customPlugins) {
tableName = collectMetric.name;
}
collectMetric.targetTable = tenantInitService.getLogMonitorMetricTable(tableName);
-
- if (null != collectMetric.getCalculate()
- && Boolean.TRUE == collectMetric.getCalculate()) {
- String aggTableName = collectMetric.tableName + "_agg_" + customPluginDTO.id;
- collectMetric.logCalculate.aggTableName =
- tenantInitService.getLogMonitorMetricTable(aggTableName);
- }
});
}
});
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/DefaultTenantInitServiceImpl.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/DefaultTenantInitServiceImpl.java
index 9d3e84a14..268666da5 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/DefaultTenantInitServiceImpl.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/DefaultTenantInitServiceImpl.java
@@ -4,7 +4,6 @@
package io.holoinsight.server.home.biz.service.impl;
import io.holoinsight.server.apm.common.model.specification.sw.Tag;
-import io.holoinsight.server.common.dao.entity.MetricInfo;
import io.holoinsight.server.common.dao.entity.dto.MetricInfoDTO;
import io.holoinsight.server.common.dao.entity.dto.TenantOpsStorage;
import io.holoinsight.server.home.biz.common.GaeaConvertUtil;
@@ -12,9 +11,9 @@
import io.holoinsight.server.home.biz.service.TenantInitService;
import io.holoinsight.server.common.scope.MonitorScope;
import io.holoinsight.server.common.scope.MonitorUser;
-import io.holoinsight.server.home.dal.model.dto.CloudMonitorRange;
+import io.holoinsight.server.common.dao.entity.CloudMonitorRange;
import io.holoinsight.server.home.dal.model.dto.CustomPluginDTO;
-import io.holoinsight.server.home.dal.model.dto.IntegrationGeneratedDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationGeneratedDTO;
import io.holoinsight.server.query.grpc.QueryProto.QueryFilter;
import java.util.ArrayList;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/OpenmetricsScraperServiceImpl.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/OpenmetricsScraperServiceImpl.java
index 319908d6a..edaa8a103 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/OpenmetricsScraperServiceImpl.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/impl/OpenmetricsScraperServiceImpl.java
@@ -15,7 +15,7 @@
import io.holoinsight.server.home.dal.converter.OpenmetricsScraperConverter;
import io.holoinsight.server.home.dal.mapper.OpenmetricsScraperMapper;
import io.holoinsight.server.home.dal.model.OpenmetricsScraper;
-import io.holoinsight.server.home.dal.model.dto.CloudMonitorRange;
+import io.holoinsight.server.common.dao.entity.CloudMonitorRange;
import io.holoinsight.server.home.dal.model.dto.OpenmetricsScraperDTO;
import io.holoinsight.server.registry.model.OpenmetricsScraperTask;
import org.apache.commons.lang3.StringUtils;
diff --git a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/openai/OpenAiService.java b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/openai/OpenAiService.java
index 3f2015b33..d914e6a7d 100644
--- a/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/openai/OpenAiService.java
+++ b/server/home/home-service/src/main/java/io/holoinsight/server/home/biz/service/openai/OpenAiService.java
@@ -16,8 +16,8 @@
import io.holoinsight.server.common.MonitorException;
import io.holoinsight.server.common.scope.MonitorScope;
import io.holoinsight.server.common.RequestContext;
-import io.holoinsight.server.home.dal.mapper.IntegrationPluginMapper;
-import io.holoinsight.server.home.dal.model.IntegrationPlugin;
+import io.holoinsight.server.common.dao.mapper.IntegrationPluginMapper;
+import io.holoinsight.server.common.dao.entity.IntegrationPlugin;
import lombok.extern.slf4j.Slf4j;
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
diff --git a/server/home/home-task/src/main/java/io/holoinsight/server/home/task/AbstractMetricCrawlerBuilder.java b/server/home/home-task/src/main/java/io/holoinsight/server/home/task/AbstractMetricCrawlerBuilder.java
index 5b5789bd0..60855b648 100644
--- a/server/home/home-task/src/main/java/io/holoinsight/server/home/task/AbstractMetricCrawlerBuilder.java
+++ b/server/home/home-task/src/main/java/io/holoinsight/server/home/task/AbstractMetricCrawlerBuilder.java
@@ -8,7 +8,7 @@
import io.holoinsight.server.common.J;
import io.holoinsight.server.common.dao.entity.MetricInfo;
import io.holoinsight.server.home.biz.common.MetaDictUtil;
-import io.holoinsight.server.home.dal.model.dto.IntegrationProductDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationProductDTO;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.CollectionUtils;
diff --git a/server/home/home-task/src/main/java/io/holoinsight/server/home/task/MetricCrawlerBuilder.java b/server/home/home-task/src/main/java/io/holoinsight/server/home/task/MetricCrawlerBuilder.java
index e3c998f45..ba5573fb8 100644
--- a/server/home/home-task/src/main/java/io/holoinsight/server/home/task/MetricCrawlerBuilder.java
+++ b/server/home/home-task/src/main/java/io/holoinsight/server/home/task/MetricCrawlerBuilder.java
@@ -5,7 +5,7 @@
package io.holoinsight.server.home.task;
import io.holoinsight.server.common.dao.entity.MetricInfo;
-import io.holoinsight.server.home.dal.model.dto.IntegrationProductDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationProductDTO;
import java.util.List;
diff --git a/server/home/home-task/src/main/java/io/holoinsight/server/home/task/TenantIntegrationGeneratedTask.java b/server/home/home-task/src/main/java/io/holoinsight/server/home/task/TenantIntegrationGeneratedTask.java
index 2244998a2..b62b621f8 100644
--- a/server/home/home-task/src/main/java/io/holoinsight/server/home/task/TenantIntegrationGeneratedTask.java
+++ b/server/home/home-task/src/main/java/io/holoinsight/server/home/task/TenantIntegrationGeneratedTask.java
@@ -25,20 +25,20 @@
import io.holoinsight.server.home.biz.plugin.core.LogPlugin;
import io.holoinsight.server.home.biz.plugin.model.Plugin;
import io.holoinsight.server.home.biz.plugin.model.PluginType;
-import io.holoinsight.server.home.biz.service.IntegrationGeneratedService;
-import io.holoinsight.server.home.biz.service.IntegrationPluginService;
+import io.holoinsight.server.common.service.IntegrationGeneratedService;
+import io.holoinsight.server.common.service.IntegrationPluginService;
import io.holoinsight.server.home.biz.service.MetaService;
import io.holoinsight.server.home.biz.service.MetaService.AppModel;
import io.holoinsight.server.home.biz.service.TenantInitService;
-import io.holoinsight.server.home.biz.service.TenantOpsService;
+import io.holoinsight.server.common.service.TenantOpsService;
import io.holoinsight.server.common.model.TaskEnum;
import io.holoinsight.server.common.cache.local.CommonLocalCache;
-import io.holoinsight.server.home.dal.converter.IntegrationGeneratedConverter;
-import io.holoinsight.server.home.dal.model.IntegrationGenerated;
-import io.holoinsight.server.home.dal.model.dto.CloudMonitorRange;
-import io.holoinsight.server.home.dal.model.dto.GaeaCollectConfigDTO.GaeaCollectRange;
-import io.holoinsight.server.home.dal.model.dto.IntegrationGeneratedDTO;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.converter.IntegrationGeneratedConverter;
+import io.holoinsight.server.common.dao.entity.IntegrationGenerated;
+import io.holoinsight.server.common.dao.entity.CloudMonitorRange;
+import io.holoinsight.server.common.dao.entity.GaeaCollectRange;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationGeneratedDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
import io.holoinsight.server.meta.common.model.QueryExample;
import lombok.extern.slf4j.Slf4j;
diff --git a/server/home/home-task/src/main/java/io/holoinsight/server/home/task/TenantMetricCrawlerTask.java b/server/home/home-task/src/main/java/io/holoinsight/server/home/task/TenantMetricCrawlerTask.java
index 12f94c71d..182049bb5 100644
--- a/server/home/home-task/src/main/java/io/holoinsight/server/home/task/TenantMetricCrawlerTask.java
+++ b/server/home/home-task/src/main/java/io/holoinsight/server/home/task/TenantMetricCrawlerTask.java
@@ -6,9 +6,9 @@
import io.holoinsight.server.common.dao.entity.MetricInfo;
import io.holoinsight.server.common.service.MetricInfoService;
-import io.holoinsight.server.home.biz.service.IntegrationProductService;
+import io.holoinsight.server.common.service.IntegrationProductService;
import io.holoinsight.server.common.CommonThreadPool;
-import io.holoinsight.server.home.dal.model.dto.IntegrationProductDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationProductDTO;
import io.holoinsight.server.home.task.crawler.TenantMetricCrawlerTaskJob;
import io.holoinsight.server.home.task.crawler.TenantMetricCrawlerTaskJobArgs;
import lombok.extern.slf4j.Slf4j;
diff --git a/server/home/home-task/src/main/java/io/holoinsight/server/home/task/crawler/MysqlMetricCrawlerBuilder.java b/server/home/home-task/src/main/java/io/holoinsight/server/home/task/crawler/MysqlMetricCrawlerBuilder.java
index a9d952832..ce3286d42 100644
--- a/server/home/home-task/src/main/java/io/holoinsight/server/home/task/crawler/MysqlMetricCrawlerBuilder.java
+++ b/server/home/home-task/src/main/java/io/holoinsight/server/home/task/crawler/MysqlMetricCrawlerBuilder.java
@@ -7,7 +7,7 @@
import com.google.gson.reflect.TypeToken;
import io.holoinsight.server.common.J;
import io.holoinsight.server.common.dao.entity.MetricInfo;
-import io.holoinsight.server.home.dal.model.dto.IntegrationMetricDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationMetricDTO;
import io.holoinsight.server.home.task.AbstractMetricCrawlerBuilder;
import io.holoinsight.server.home.task.MetricCrawler;
import lombok.extern.slf4j.Slf4j;
diff --git a/server/home/home-task/src/main/java/io/holoinsight/server/home/task/crawler/TenantMetricCrawlerTaskJobArgs.java b/server/home/home-task/src/main/java/io/holoinsight/server/home/task/crawler/TenantMetricCrawlerTaskJobArgs.java
index c6a4b1a96..0b07dc49e 100644
--- a/server/home/home-task/src/main/java/io/holoinsight/server/home/task/crawler/TenantMetricCrawlerTaskJobArgs.java
+++ b/server/home/home-task/src/main/java/io/holoinsight/server/home/task/crawler/TenantMetricCrawlerTaskJobArgs.java
@@ -5,7 +5,7 @@
package io.holoinsight.server.home.task.crawler;
import io.holoinsight.server.common.dao.entity.MetricInfo;
-import io.holoinsight.server.home.dal.model.dto.IntegrationProductDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationProductDTO;
import java.util.List;
diff --git a/server/home/home-task/src/main/java/io/holoinsight/server/home/task/impl/TenantAppMetaSyncTask.java b/server/home/home-task/src/main/java/io/holoinsight/server/home/task/impl/TenantAppMetaSyncTask.java
index 6a3f63995..dd64d3e7f 100644
--- a/server/home/home-task/src/main/java/io/holoinsight/server/home/task/impl/TenantAppMetaSyncTask.java
+++ b/server/home/home-task/src/main/java/io/holoinsight/server/home/task/impl/TenantAppMetaSyncTask.java
@@ -14,7 +14,7 @@
import io.holoinsight.server.common.dao.entity.TenantOps;
import io.holoinsight.server.home.biz.service.MetaService;
import io.holoinsight.server.home.biz.service.MetaService.AppModel;
-import io.holoinsight.server.home.biz.service.TenantOpsService;
+import io.holoinsight.server.common.service.TenantOpsService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/CustomPluginFacadeImpl.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/CustomPluginFacadeImpl.java
index bc4cfa474..f97ce900e 100644
--- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/CustomPluginFacadeImpl.java
+++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/CustomPluginFacadeImpl.java
@@ -9,7 +9,7 @@
import io.holoinsight.server.home.biz.plugin.core.LogPluginUtil;
import io.holoinsight.server.common.service.AlarmMetricService;
import io.holoinsight.server.home.biz.service.CustomPluginService;
-import io.holoinsight.server.home.biz.service.FolderService;
+import io.holoinsight.server.common.service.FolderService;
import io.holoinsight.server.home.biz.service.TenantInitService;
import io.holoinsight.server.common.service.UserOpLogService;
import io.holoinsight.server.common.MonitorException;
@@ -21,7 +21,7 @@
import io.holoinsight.server.common.scope.PowerConstants;
import io.holoinsight.server.common.RequestContext;
import io.holoinsight.server.common.dao.entity.AlarmMetric;
-import io.holoinsight.server.home.dal.model.Folder;
+import io.holoinsight.server.common.dao.entity.Folder;
import io.holoinsight.server.home.dal.model.OpType;
import io.holoinsight.server.home.dal.model.dto.CustomPluginDTO;
import io.holoinsight.server.home.dal.model.dto.conf.CollectMetric;
@@ -276,6 +276,19 @@ public void doManage() {
if (null == customPluginDTO) {
throw new MonitorException(ResultCodeEnum.CANNOT_FIND_RECORD, "can not find record");
}
+
+ if (!CollectionUtils.isEmpty(customPluginDTO.getConf().collectMetrics)) {
+ List alarmMetrics = new ArrayList<>();
+ for (CollectMetric collectMetric : customPluginDTO.getConf().collectMetrics) {
+ List db = alarmMetricService.queryByMetric(collectMetric.getTargetTable(),
+ ms.getTenant(), ms.getWorkspace());
+ if (!CollectionUtils.isEmpty(db)) {
+ alarmMetrics.addAll(db);
+ }
+ }
+ customPluginDTO.setAlarmMetrics(alarmMetrics);
+ }
+
JsonResult.createSuccessResult(result, customPluginDTO);
}
});
diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/DashboardFacadeImpl.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/DashboardFacadeImpl.java
index f12b5f105..806f0cd5c 100644
--- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/DashboardFacadeImpl.java
+++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/DashboardFacadeImpl.java
@@ -16,8 +16,8 @@
import io.holoinsight.server.common.scope.MonitorUser;
import io.holoinsight.server.common.scope.PowerConstants;
import io.holoinsight.server.common.service.UserOpLogService;
-import io.holoinsight.server.home.biz.service.DashboardService;
-import io.holoinsight.server.home.dal.model.Dashboard;
+import io.holoinsight.server.common.service.DashboardService;
+import io.holoinsight.server.common.dao.entity.Dashboard;
import io.holoinsight.server.home.dal.model.OpType;
import io.holoinsight.server.home.web.common.DashboardType;
import io.holoinsight.server.home.web.common.ParaCheckUtil;
diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/DefaultTenantFacadeImpl.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/DefaultTenantFacadeImpl.java
index 0a5bd8d2c..cec9dcb4e 100644
--- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/DefaultTenantFacadeImpl.java
+++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/DefaultTenantFacadeImpl.java
@@ -7,13 +7,13 @@
import io.holoinsight.server.common.JsonResult;
import io.holoinsight.server.common.dao.entity.TenantOps;
import io.holoinsight.server.common.dao.entity.dto.TenantOpsDTO;
-import io.holoinsight.server.home.biz.service.TenantOpsService;
+import io.holoinsight.server.common.service.TenantOpsService;
import io.holoinsight.server.common.MonitorException;
import io.holoinsight.server.common.ResultCodeEnum;
import io.holoinsight.server.common.scope.AuthTargetType;
import io.holoinsight.server.common.scope.PowerConstants;
import io.holoinsight.server.common.RequestContext;
-import io.holoinsight.server.home.dal.converter.TenantOpsConverter;
+import io.holoinsight.server.common.dao.converter.TenantOpsConverter;
import io.holoinsight.server.common.ManageCallback;
import io.holoinsight.server.home.web.common.ParaCheckUtil;
import io.holoinsight.server.home.web.interceptor.MonitorScopeAuth;
diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/DisplayMenuFacadeImpl.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/DisplayMenuFacadeImpl.java
index c4186caac..f74f826f0 100644
--- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/DisplayMenuFacadeImpl.java
+++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/DisplayMenuFacadeImpl.java
@@ -4,17 +4,17 @@
package io.holoinsight.server.home.web.controller;
import io.holoinsight.server.home.biz.common.MetaDictUtil;
-import io.holoinsight.server.home.biz.service.DisplayMenuService;
-import io.holoinsight.server.home.biz.service.IntegrationGeneratedService;
+import io.holoinsight.server.common.service.DisplayMenuService;
+import io.holoinsight.server.common.service.IntegrationGeneratedService;
import io.holoinsight.server.common.MonitorException;
import io.holoinsight.server.common.ResultCodeEnum;
import io.holoinsight.server.common.scope.AuthTargetType;
import io.holoinsight.server.common.scope.MonitorScope;
import io.holoinsight.server.common.scope.PowerConstants;
import io.holoinsight.server.common.RequestContext;
-import io.holoinsight.server.home.dal.model.IntegrationGenerated;
-import io.holoinsight.server.home.dal.model.dto.DisplayMenuConfig;
-import io.holoinsight.server.home.dal.model.dto.DisplayMenuDTO;
+import io.holoinsight.server.common.dao.entity.IntegrationGenerated;
+import io.holoinsight.server.common.dao.entity.dto.DisplayMenuConfig;
+import io.holoinsight.server.common.dao.entity.dto.DisplayMenuDTO;
import io.holoinsight.server.common.ManageCallback;
import io.holoinsight.server.home.web.common.ParaCheckUtil;
import io.holoinsight.server.home.web.interceptor.MonitorScopeAuth;
diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/DisplayTemplateFacadeImpl.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/DisplayTemplateFacadeImpl.java
index edf8d9fe9..da27411f3 100644
--- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/DisplayTemplateFacadeImpl.java
+++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/DisplayTemplateFacadeImpl.java
@@ -3,12 +3,12 @@
*/
package io.holoinsight.server.home.web.controller;
-import io.holoinsight.server.home.biz.service.DisplayTemplateService;
+import io.holoinsight.server.common.service.DisplayTemplateService;
import io.holoinsight.server.common.MonitorException;
import io.holoinsight.server.common.ResultCodeEnum;
import io.holoinsight.server.common.scope.AuthTargetType;
import io.holoinsight.server.common.scope.PowerConstants;
-import io.holoinsight.server.home.dal.model.dto.DisplayTemplateDTO;
+import io.holoinsight.server.common.dao.entity.dto.DisplayTemplateDTO;
import io.holoinsight.server.common.ManageCallback;
import io.holoinsight.server.home.web.common.ParaCheckUtil;
import io.holoinsight.server.home.web.interceptor.MonitorScopeAuth;
diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/FolderFacadeImpl.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/FolderFacadeImpl.java
index 566d797e2..008681433 100644
--- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/FolderFacadeImpl.java
+++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/FolderFacadeImpl.java
@@ -15,8 +15,8 @@
import io.holoinsight.server.common.scope.PowerConstants;
import io.holoinsight.server.common.service.UserOpLogService;
import io.holoinsight.server.home.biz.service.CustomPluginService;
-import io.holoinsight.server.home.biz.service.FolderService;
-import io.holoinsight.server.home.dal.model.Folder;
+import io.holoinsight.server.common.service.FolderService;
+import io.holoinsight.server.common.dao.entity.Folder;
import io.holoinsight.server.home.dal.model.OpType;
import io.holoinsight.server.home.dal.model.dto.CustomPluginDTO;
import io.holoinsight.server.home.web.common.ParaCheckUtil;
diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/InitFacadeImpl.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/InitFacadeImpl.java
index 33dac7acc..a4200f7a6 100644
--- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/InitFacadeImpl.java
+++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/InitFacadeImpl.java
@@ -35,19 +35,19 @@
import io.holoinsight.server.common.dao.entity.dto.TenantOpsStorage;
import io.holoinsight.server.common.dao.entity.dto.TenantOpsStorage.StorageMetric;
import io.holoinsight.server.common.service.ApiKeyService;
-import io.holoinsight.server.home.biz.service.MetaTableService;
+import io.holoinsight.server.common.service.MetaTableService;
import io.holoinsight.server.home.biz.service.TenantInitService;
-import io.holoinsight.server.home.biz.service.TenantOpsService;
+import io.holoinsight.server.common.service.TenantOpsService;
import io.holoinsight.server.common.Debugger;
import io.holoinsight.server.common.scope.MonitorCookieUtil;
import io.holoinsight.server.common.scope.MonitorScope;
import io.holoinsight.server.common.scope.MonitorUser;
import io.holoinsight.server.common.RequestContext;
import io.holoinsight.server.common.dao.entity.ApiKey;
-import io.holoinsight.server.home.dal.model.dto.MetaTableDTO;
-import io.holoinsight.server.home.dal.model.dto.MetaTableDTO.TableStatus;
-import io.holoinsight.server.home.dal.model.dto.meta.MetaTableCol;
-import io.holoinsight.server.home.dal.model.dto.meta.MetaTableConfig;
+import io.holoinsight.server.common.dao.entity.dto.MetaTableDTO;
+import io.holoinsight.server.common.dao.entity.dto.MetaTableDTO.TableStatus;
+import io.holoinsight.server.common.dao.entity.dto.meta.MetaTableCol;
+import io.holoinsight.server.common.dao.entity.dto.meta.MetaTableConfig;
import io.holoinsight.server.common.ManageCallback;
import lombok.extern.slf4j.Slf4j;
diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/IntegrationGeneratedFacadeImpl.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/IntegrationGeneratedFacadeImpl.java
index 3568783d2..e15aa1d16 100644
--- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/IntegrationGeneratedFacadeImpl.java
+++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/IntegrationGeneratedFacadeImpl.java
@@ -18,20 +18,20 @@
import io.holoinsight.server.home.biz.plugin.core.LogPlugin;
import io.holoinsight.server.home.biz.plugin.model.Plugin;
import io.holoinsight.server.home.biz.plugin.model.PluginType;
-import io.holoinsight.server.home.biz.service.IntegrationGeneratedService;
-import io.holoinsight.server.home.biz.service.IntegrationPluginService;
-import io.holoinsight.server.home.biz.service.IntegrationProductService;
+import io.holoinsight.server.common.service.IntegrationGeneratedService;
+import io.holoinsight.server.common.service.IntegrationPluginService;
+import io.holoinsight.server.common.service.IntegrationProductService;
import io.holoinsight.server.home.biz.service.TenantInitService;
import io.holoinsight.server.common.service.UserOpLogService;
import io.holoinsight.server.common.MonitorException;
-import io.holoinsight.server.home.dal.model.IntegrationGenerated;
+import io.holoinsight.server.common.dao.entity.IntegrationGenerated;
import io.holoinsight.server.home.dal.model.OpType;
-import io.holoinsight.server.home.dal.model.dto.GaeaCollectConfigDTO.GaeaCollectRange;
-import io.holoinsight.server.home.dal.model.dto.IntegrationConfigDTO;
-import io.holoinsight.server.home.dal.model.dto.IntegrationFormDTO;
-import io.holoinsight.server.home.dal.model.dto.IntegrationGeneratedDTO;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
-import io.holoinsight.server.home.dal.model.dto.IntegrationProductDTO;
+import io.holoinsight.server.common.dao.entity.GaeaCollectRange;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationConfigDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationFormDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationGeneratedDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationProductDTO;
import io.holoinsight.server.common.ManageCallback;
import io.holoinsight.server.home.web.common.ParaCheckUtil;
import io.holoinsight.server.home.web.interceptor.MonitorScopeAuth;
diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/IntegrationPluginFacadeImpl.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/IntegrationPluginFacadeImpl.java
index b811dde0c..c9d22aefb 100644
--- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/IntegrationPluginFacadeImpl.java
+++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/IntegrationPluginFacadeImpl.java
@@ -15,9 +15,9 @@
import io.holoinsight.server.common.scope.MonitorUser;
import io.holoinsight.server.common.scope.PowerConstants;
import io.holoinsight.server.common.service.UserOpLogService;
-import io.holoinsight.server.home.biz.service.IntegrationPluginService;
+import io.holoinsight.server.common.service.IntegrationPluginService;
import io.holoinsight.server.home.dal.model.OpType;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
import io.holoinsight.server.home.web.common.ParaCheckUtil;
import io.holoinsight.server.home.web.interceptor.MonitorScopeAuth;
import org.apache.commons.lang3.StringUtils;
diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/IntegrationProductFacadeImpl.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/IntegrationProductFacadeImpl.java
index 55d886d34..38e6b8b32 100644
--- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/IntegrationProductFacadeImpl.java
+++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/IntegrationProductFacadeImpl.java
@@ -8,17 +8,17 @@
import io.holoinsight.server.common.scope.MonitorCookieUtil;
import io.holoinsight.server.common.scope.PowerConstants;
import io.holoinsight.server.common.service.MetricInfoService;
-import io.holoinsight.server.home.biz.service.IntegrationPluginService;
-import io.holoinsight.server.home.biz.service.IntegrationProductService;
+import io.holoinsight.server.common.service.IntegrationPluginService;
+import io.holoinsight.server.common.service.IntegrationProductService;
import io.holoinsight.server.home.common.service.QueryClientService;
import io.holoinsight.server.home.common.service.query.QueryResponse;
import io.holoinsight.server.home.common.service.query.Result;
import io.holoinsight.server.common.MonitorException;
import io.holoinsight.server.common.ResultCodeEnum;
-import io.holoinsight.server.home.dal.model.dto.IntegrationMetricDTO;
-import io.holoinsight.server.home.dal.model.dto.IntegrationMetricsDTO;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
-import io.holoinsight.server.home.dal.model.dto.IntegrationProductDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationMetricDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationMetricsDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationProductDTO;
import io.holoinsight.server.common.ManageCallback;
import io.holoinsight.server.home.web.common.ParaCheckUtil;
import io.holoinsight.server.home.web.interceptor.MonitorScopeAuth;
diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/MarketplacePluginFacadeImpl.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/MarketplacePluginFacadeImpl.java
index 830bc5b65..e4126f72f 100644
--- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/MarketplacePluginFacadeImpl.java
+++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/MarketplacePluginFacadeImpl.java
@@ -5,8 +5,8 @@
import io.holoinsight.server.home.biz.plugin.MarketplaceProductHandler;
import io.holoinsight.server.common.service.AlertWebhookService;
-import io.holoinsight.server.home.biz.service.MarketplacePluginService;
-import io.holoinsight.server.home.biz.service.MarketplaceProductService;
+import io.holoinsight.server.common.service.MarketplacePluginService;
+import io.holoinsight.server.common.service.MarketplaceProductService;
import io.holoinsight.server.common.service.UserOpLogService;
import io.holoinsight.server.common.MonitorException;
import io.holoinsight.server.common.ResultCodeEnum;
@@ -18,8 +18,8 @@
import io.holoinsight.server.common.RequestContext;
import io.holoinsight.server.home.dal.model.OpType;
import io.holoinsight.server.common.dao.entity.dto.AlarmWebhookDTO;
-import io.holoinsight.server.home.dal.model.dto.MarketplacePluginDTO;
-import io.holoinsight.server.home.dal.model.dto.MarketplaceProductDTO;
+import io.holoinsight.server.common.dao.entity.dto.MarketplacePluginDTO;
+import io.holoinsight.server.common.dao.entity.dto.MarketplaceProductDTO;
import io.holoinsight.server.common.ManageCallback;
import io.holoinsight.server.home.web.common.ParaCheckUtil;
import io.holoinsight.server.home.web.interceptor.MonitorScopeAuth;
diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/MarketplaceProductFacadeImpl.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/MarketplaceProductFacadeImpl.java
index df3e0e6b7..a5c6c68e4 100644
--- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/MarketplaceProductFacadeImpl.java
+++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/MarketplaceProductFacadeImpl.java
@@ -3,10 +3,10 @@
*/
package io.holoinsight.server.home.web.controller;
-import io.holoinsight.server.home.biz.service.MarketplaceProductService;
+import io.holoinsight.server.common.service.MarketplaceProductService;
import io.holoinsight.server.common.scope.AuthTargetType;
import io.holoinsight.server.common.scope.PowerConstants;
-import io.holoinsight.server.home.dal.model.dto.MarketplaceProductDTO;
+import io.holoinsight.server.common.dao.entity.dto.MarketplaceProductDTO;
import io.holoinsight.server.common.ManageCallback;
import io.holoinsight.server.home.web.interceptor.MonitorScopeAuth;
import io.holoinsight.server.common.JsonResult;
diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/MetaTableFacadeImpl.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/MetaTableFacadeImpl.java
index c52720315..b0ee4116b 100644
--- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/MetaTableFacadeImpl.java
+++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/MetaTableFacadeImpl.java
@@ -3,11 +3,11 @@
*/
package io.holoinsight.server.home.web.controller;
-import io.holoinsight.server.home.biz.service.MetaTableService;
+import io.holoinsight.server.common.service.MetaTableService;
import io.holoinsight.server.common.scope.AuthTargetType;
import io.holoinsight.server.common.scope.MonitorCookieUtil;
import io.holoinsight.server.common.scope.PowerConstants;
-import io.holoinsight.server.home.dal.model.dto.MetaTableDTO;
+import io.holoinsight.server.common.dao.entity.dto.MetaTableDTO;
import io.holoinsight.server.common.ManageCallback;
import io.holoinsight.server.home.web.interceptor.MonitorScopeAuth;
import io.holoinsight.server.common.JsonResult;
diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/MetricInfoFacadeImpl.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/MetricInfoFacadeImpl.java
index d3fb3feb0..ddd97d1d9 100644
--- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/MetricInfoFacadeImpl.java
+++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/MetricInfoFacadeImpl.java
@@ -8,10 +8,10 @@
import io.holoinsight.server.common.dao.entity.dto.MetricInfoDTO;
import io.holoinsight.server.common.service.MetricInfoService;
import io.holoinsight.server.home.biz.plugin.MetricInfoCheckService;
-import io.holoinsight.server.home.biz.service.IntegrationProductService;
+import io.holoinsight.server.common.service.IntegrationProductService;
import io.holoinsight.server.common.scope.AuthTargetType;
import io.holoinsight.server.common.scope.PowerConstants;
-import io.holoinsight.server.home.dal.model.dto.IntegrationProductDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationProductDTO;
import io.holoinsight.server.common.model.MetricCrawlerConstant;
import io.holoinsight.server.common.ManageCallback;
import io.holoinsight.server.home.web.common.ParaCheckUtil;
diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/SearchFacadeImpl.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/SearchFacadeImpl.java
index 1b1016035..8ab624a21 100644
--- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/SearchFacadeImpl.java
+++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/SearchFacadeImpl.java
@@ -7,15 +7,15 @@
import io.holoinsight.server.common.service.MetricInfoService;
import io.holoinsight.server.common.service.AlertRuleService;
import io.holoinsight.server.home.biz.service.CustomPluginService;
-import io.holoinsight.server.home.biz.service.DashboardService;
-import io.holoinsight.server.home.biz.service.FolderService;
+import io.holoinsight.server.common.service.DashboardService;
+import io.holoinsight.server.common.service.FolderService;
import io.holoinsight.server.home.biz.service.TenantInitService;
import io.holoinsight.server.common.CommonThreadPool;
import io.holoinsight.server.common.scope.AuthTargetType;
import io.holoinsight.server.common.scope.MonitorScope;
import io.holoinsight.server.common.scope.PowerConstants;
import io.holoinsight.server.common.RequestContext;
-import io.holoinsight.server.home.dal.model.Folder;
+import io.holoinsight.server.common.dao.entity.Folder;
import io.holoinsight.server.home.dal.model.dto.CustomPluginDTO;
import io.holoinsight.server.common.ManageCallback;
import io.holoinsight.server.home.web.common.ParaCheckUtil;
diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/TraceAgentFacadeImpl.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/TraceAgentFacadeImpl.java
index d824266a4..6afc323d5 100644
--- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/TraceAgentFacadeImpl.java
+++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/TraceAgentFacadeImpl.java
@@ -10,8 +10,8 @@
import io.holoinsight.server.home.biz.common.MetaDictUtil;
import io.holoinsight.server.common.service.ApiKeyService;
import io.holoinsight.server.home.biz.service.TenantInitService;
-import io.holoinsight.server.home.biz.service.TraceAgentConfPropService;
-import io.holoinsight.server.home.biz.service.TraceAgentConfigurationService;
+import io.holoinsight.server.common.service.TraceAgentConfPropService;
+import io.holoinsight.server.common.service.TraceAgentConfigurationService;
import io.holoinsight.server.common.MonitorException;
import io.holoinsight.server.common.scope.AuthTargetType;
import io.holoinsight.server.common.scope.MonitorScope;
@@ -19,8 +19,8 @@
import io.holoinsight.server.common.scope.PowerConstants;
import io.holoinsight.server.common.RequestContext;
import io.holoinsight.server.common.dao.entity.ApiKey;
-import io.holoinsight.server.home.dal.model.TraceAgentConfProp;
-import io.holoinsight.server.home.dal.model.TraceAgentConfiguration;
+import io.holoinsight.server.common.dao.entity.TraceAgentConfProp;
+import io.holoinsight.server.common.dao.entity.TraceAgentConfiguration;
import io.holoinsight.server.common.AesUtil;
import io.holoinsight.server.common.ManageCallback;
import io.holoinsight.server.home.web.common.ParaCheckUtil;
diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/UserFavoriteFacadeImpl.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/UserFavoriteFacadeImpl.java
index e124c7e25..23debde49 100644
--- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/UserFavoriteFacadeImpl.java
+++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/UserFavoriteFacadeImpl.java
@@ -4,9 +4,9 @@
package io.holoinsight.server.home.web.controller;
import io.holoinsight.server.home.biz.service.CustomPluginService;
-import io.holoinsight.server.home.biz.service.DashboardService;
-import io.holoinsight.server.home.biz.service.FolderService;
-import io.holoinsight.server.home.biz.service.IntegrationProductService;
+import io.holoinsight.server.common.service.DashboardService;
+import io.holoinsight.server.common.service.FolderService;
+import io.holoinsight.server.common.service.IntegrationProductService;
import io.holoinsight.server.home.biz.service.TenantInitService;
import io.holoinsight.server.common.service.UserFavoriteService;
import io.holoinsight.server.common.service.UserOpLogService;
@@ -18,12 +18,12 @@
import io.holoinsight.server.common.scope.MonitorUser;
import io.holoinsight.server.common.scope.PowerConstants;
import io.holoinsight.server.common.RequestContext;
-import io.holoinsight.server.home.dal.model.Dashboard;
-import io.holoinsight.server.home.dal.model.Folder;
+import io.holoinsight.server.common.dao.entity.Dashboard;
+import io.holoinsight.server.common.dao.entity.Folder;
import io.holoinsight.server.home.dal.model.OpType;
import io.holoinsight.server.common.dao.entity.UserFavorite;
import io.holoinsight.server.home.dal.model.dto.CustomPluginDTO;
-import io.holoinsight.server.home.dal.model.dto.IntegrationProductDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationProductDTO;
import io.holoinsight.server.common.MonitorPageRequest;
import io.holoinsight.server.common.MonitorPageResult;
import io.holoinsight.server.common.ManageCallback;
diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/UserinfoFacadeImpl.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/UserinfoFacadeImpl.java
index a795f3d87..f73e88f60 100644
--- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/UserinfoFacadeImpl.java
+++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/UserinfoFacadeImpl.java
@@ -16,15 +16,14 @@
import io.holoinsight.server.common.RequestContext;
import io.holoinsight.server.common.dao.converter.UserinfoConverter;
import io.holoinsight.server.common.dao.mapper.UserinfoMapper;
-import io.holoinsight.server.home.dal.mapper.UserinfoVerificationMapper;
+import io.holoinsight.server.common.dao.mapper.UserinfoVerificationMapper;
import io.holoinsight.server.home.dal.model.OpType;
import io.holoinsight.server.common.dao.entity.Userinfo;
-import io.holoinsight.server.home.dal.model.UserinfoVerification;
+import io.holoinsight.server.common.dao.entity.UserinfoVerification;
import io.holoinsight.server.common.dao.entity.dto.UserinfoDTO;
import io.holoinsight.server.common.MonitorPageRequest;
import io.holoinsight.server.common.MonitorPageResult;
import io.holoinsight.server.common.ManageCallback;
-import io.holoinsight.server.home.web.common.ParaCheckUtil;
import io.holoinsight.server.home.web.interceptor.MonitorScopeAuth;
import io.holoinsight.server.home.web.security.LevelAuthorizationAccess;
import lombok.extern.slf4j.Slf4j;
@@ -42,7 +41,6 @@
import javax.annotation.Resource;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Set;
diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/UserinfoVerificationFacadeImpl.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/UserinfoVerificationFacadeImpl.java
index 7cb315576..0eff88ca6 100644
--- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/UserinfoVerificationFacadeImpl.java
+++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/UserinfoVerificationFacadeImpl.java
@@ -9,16 +9,16 @@
import io.holoinsight.server.common.dao.entity.MetaDataDictValue;
import io.holoinsight.server.common.dao.mapper.MetaDataDictValueMapper;
import io.holoinsight.server.common.service.UserOpLogService;
-import io.holoinsight.server.home.biz.service.UserinfoVerificationService;
+import io.holoinsight.server.common.service.UserinfoVerificationService;
import io.holoinsight.server.common.MonitorException;
import io.holoinsight.server.common.scope.AuthTargetType;
import io.holoinsight.server.common.scope.MonitorScope;
import io.holoinsight.server.common.scope.MonitorUser;
import io.holoinsight.server.common.scope.PowerConstants;
import io.holoinsight.server.common.RequestContext;
-import io.holoinsight.server.home.dal.mapper.UserinfoVerificationMapper;
+import io.holoinsight.server.common.dao.mapper.UserinfoVerificationMapper;
import io.holoinsight.server.home.dal.model.OpType;
-import io.holoinsight.server.home.dal.model.UserinfoVerification;
+import io.holoinsight.server.common.dao.entity.UserinfoVerification;
import io.holoinsight.server.common.dao.emuns.PeriodType;
import io.holoinsight.server.common.ManageCallback;
import io.holoinsight.server.home.web.common.ParaCheckUtil;
diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/openai/CustomPluginFcService.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/openai/CustomPluginFcService.java
index 288c8056d..06756e9f7 100644
--- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/openai/CustomPluginFcService.java
+++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/openai/CustomPluginFcService.java
@@ -11,9 +11,9 @@
import io.holoinsight.server.common.RequestContext;
import io.holoinsight.server.home.dal.mapper.CustomPluginMapper;
import io.holoinsight.server.home.dal.model.CustomPlugin;
-import io.holoinsight.server.home.dal.model.dto.CloudMonitorRange;
+import io.holoinsight.server.common.dao.entity.CloudMonitorRange;
import io.holoinsight.server.home.dal.model.dto.CustomPluginDTO;
-import io.holoinsight.server.home.dal.model.dto.CustomPluginPeriodType;
+import io.holoinsight.server.common.dao.emuns.CustomPluginPeriodType;
import io.holoinsight.server.home.dal.model.dto.CustomPluginStatus;
import io.holoinsight.server.home.dal.model.dto.conf.CollectMetric;
import io.holoinsight.server.home.dal.model.dto.conf.CustomPluginConf;
diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/security/custom/AlarmRuleLevelAuthorizationChecker.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/security/custom/AlarmRuleLevelAuthorizationChecker.java
index 82d3a2ed3..57382bd11 100644
--- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/security/custom/AlarmRuleLevelAuthorizationChecker.java
+++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/security/custom/AlarmRuleLevelAuthorizationChecker.java
@@ -512,9 +512,9 @@ protected static boolean validTime(String time) {
private LevelAuthorizationCheckResult checkExtra(AlertRuleExtra extra, String tenant,
String workspace) {
- if (StringUtils.isNotEmpty(extra.sourceLink)) {
- return failCheckResult("sourceLink %s should be empty", extra.sourceLink);
- }
+ // if (StringUtils.isNotEmpty(extra.sourceLink)) {
+ // return failCheckResult("sourceLink %s should be empty", extra.sourceLink);
+ // }
// if (StringUtils.isNotEmpty(extra.md5)) {
// return failCheckResult("md5 %s should be empty", extra.md5);
// }
diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/security/custom/UserinfoFacadeImplChecker.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/security/custom/UserinfoFacadeImplChecker.java
index ada43c5be..db584bf61 100644
--- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/security/custom/UserinfoFacadeImplChecker.java
+++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/security/custom/UserinfoFacadeImplChecker.java
@@ -8,14 +8,15 @@
import io.holoinsight.server.common.J;
import io.holoinsight.server.common.MonitorPageRequest;
import io.holoinsight.server.common.RequestContext;
-import io.holoinsight.server.common.dao.entity.dto.AlarmBlockDTO;
+import io.holoinsight.server.common.dao.entity.Userinfo;
+import io.holoinsight.server.common.dao.entity.UserinfoVerification;
import io.holoinsight.server.common.dao.entity.dto.UserinfoDTO;
+import io.holoinsight.server.common.dao.mapper.UserinfoMapper;
+import io.holoinsight.server.common.dao.mapper.UserinfoVerificationMapper;
import io.holoinsight.server.common.scope.MonitorScope;
import io.holoinsight.server.common.scope.MonitorUser;
import io.holoinsight.server.common.service.RequestContextAdapter;
import io.holoinsight.server.home.biz.ula.ULAFacade;
-import io.holoinsight.server.home.dal.mapper.UserinfoVerificationMapper;
-import io.holoinsight.server.home.dal.model.UserinfoVerification;
import io.holoinsight.server.home.web.security.LevelAuthorizationCheck;
import io.holoinsight.server.home.web.security.LevelAuthorizationCheckResult;
import io.holoinsight.server.home.web.security.LevelAuthorizationMetaData;
@@ -27,7 +28,6 @@
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
-import java.util.Collection;
import java.util.List;
import java.util.Set;
@@ -49,6 +49,9 @@ public class UserinfoFacadeImplChecker implements AbstractResourceChecker, Level
@Resource
private UserinfoVerificationMapper verificationMapper;
+ @Autowired
+ private UserinfoMapper userinfoMapper;
+
@Override
public LevelAuthorizationCheckResult check(LevelAuthorizationMetaData levelAuthMetaData,
MethodInvocation methodInvocation) {
@@ -189,10 +192,10 @@ private boolean checkUid(String uid) {
@Override
public LevelAuthorizationCheckResult checkIdExists(Long id, String tenant, String workspace) {
- QueryWrapper queryWrapper = new QueryWrapper<>();
+ QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("id", id);
requestContextAdapter.queryWrapperTenantAdapt(queryWrapper, tenant, workspace);
- List list = this.verificationMapper.selectList(queryWrapper);
+ List list = this.userinfoMapper.selectList(queryWrapper);
if (CollectionUtils.isEmpty(list)) {
return failCheckResult("invalid UserinfoVerification id %d", id);
}
diff --git a/server/registry/registry-model/pom.xml b/server/registry/registry-model/pom.xml
index f1870bf66..450f8ddd7 100644
--- a/server/registry/registry-model/pom.xml
+++ b/server/registry/registry-model/pom.xml
@@ -24,6 +24,12 @@
org.apache.commons
commons-lang3
+
+
+ io.holoinsight.server
+ common
+ ${project.version}
+
\ No newline at end of file
diff --git a/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/CustomPluginFacadeIT.java b/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/CustomPluginFacadeIT.java
index cbd090e5b..5b68e2ef7 100644
--- a/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/CustomPluginFacadeIT.java
+++ b/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/CustomPluginFacadeIT.java
@@ -5,7 +5,7 @@
import io.holoinsight.server.common.J;
import io.holoinsight.server.home.dal.model.dto.CustomPluginDTO;
-import io.holoinsight.server.home.dal.model.dto.CustomPluginPeriodType;
+import io.holoinsight.server.common.dao.emuns.CustomPluginPeriodType;
import io.holoinsight.server.home.dal.model.dto.CustomPluginStatus;
import io.holoinsight.server.home.dal.model.dto.conf.CustomPluginConf;
import io.holoinsight.server.home.dal.model.dto.conf.LogParse;
diff --git a/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/DashboardIT.java b/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/DashboardIT.java
index 2e3da31d6..3bef59045 100644
--- a/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/DashboardIT.java
+++ b/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/DashboardIT.java
@@ -5,7 +5,7 @@
package io.holoinsight.server.test.it;
import io.holoinsight.server.common.J;
-import io.holoinsight.server.home.dal.model.Dashboard;
+import io.holoinsight.server.common.dao.entity.Dashboard;
import io.holoinsight.server.common.MonitorPageRequest;
import io.restassured.response.Response;
import org.apache.commons.lang3.RandomStringUtils;
diff --git a/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/FolderFacadeIT.java b/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/FolderFacadeIT.java
index 68dd13f84..c55c93f41 100644
--- a/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/FolderFacadeIT.java
+++ b/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/FolderFacadeIT.java
@@ -4,20 +4,17 @@
package io.holoinsight.server.test.it;
import io.holoinsight.server.common.J;
-import io.holoinsight.server.home.dal.model.Folder;
+import io.holoinsight.server.common.dao.entity.Folder;
import io.holoinsight.server.home.web.controller.model.FolderRequest;
import io.holoinsight.server.home.web.controller.model.FolderRequestCmd;
import io.restassured.response.Response;
import org.apache.commons.lang3.RandomStringUtils;
-import org.hamcrest.CustomMatcher;
-import org.hamcrest.core.Every;
import org.json.JSONObject;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import java.util.ArrayList;
import java.util.List;
-import java.util.Map;
import java.util.function.Supplier;
public class FolderFacadeIT extends BaseIT {
diff --git a/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/IntegrationPluginFacadeIT.java b/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/IntegrationPluginFacadeIT.java
index 1afa9eb19..bd7b6ec37 100644
--- a/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/IntegrationPluginFacadeIT.java
+++ b/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/IntegrationPluginFacadeIT.java
@@ -4,7 +4,7 @@
package io.holoinsight.server.test.it;
import io.holoinsight.server.common.J;
-import io.holoinsight.server.home.dal.model.dto.IntegrationPluginDTO;
+import io.holoinsight.server.common.dao.entity.dto.IntegrationPluginDTO;
import io.restassured.response.Response;
import org.apache.commons.lang3.RandomStringUtils;
import org.json.JSONObject;
diff --git a/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/OpenMetricsScraperIT.java b/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/OpenMetricsScraperIT.java
index 0e5348c9a..6eff35d7d 100644
--- a/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/OpenMetricsScraperIT.java
+++ b/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/OpenMetricsScraperIT.java
@@ -6,7 +6,7 @@
import com.google.gson.reflect.TypeToken;
import io.holoinsight.server.common.J;
-import io.holoinsight.server.home.dal.model.dto.CloudMonitorRange;
+import io.holoinsight.server.common.dao.entity.CloudMonitorRange;
import io.holoinsight.server.home.dal.model.dto.OpenmetricsScraperDTO;
import io.holoinsight.server.common.MonitorPageRequest;
import io.restassured.response.Response;
diff --git a/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/UserFavoriteFacadeIT.java b/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/UserFavoriteFacadeIT.java
index f38a5cf6c..d0bd3c4e1 100644
--- a/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/UserFavoriteFacadeIT.java
+++ b/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/UserFavoriteFacadeIT.java
@@ -4,7 +4,7 @@
package io.holoinsight.server.test.it;
import io.holoinsight.server.common.J;
-import io.holoinsight.server.home.dal.model.Folder;
+import io.holoinsight.server.common.dao.entity.Folder;
import io.holoinsight.server.common.dao.entity.UserFavorite;
import io.holoinsight.server.common.MonitorPageRequest;
import io.restassured.response.Response;
diff --git a/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/UserinfoVerificationFacadeIT.java b/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/UserinfoVerificationFacadeIT.java
index c95561a0b..679627f69 100644
--- a/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/UserinfoVerificationFacadeIT.java
+++ b/test/server-e2e-test/src/main/java/io/holoinsight/server/test/it/UserinfoVerificationFacadeIT.java
@@ -4,7 +4,7 @@
package io.holoinsight.server.test.it;
import io.holoinsight.server.common.J;
-import io.holoinsight.server.home.dal.model.UserinfoVerification;
+import io.holoinsight.server.common.dao.entity.UserinfoVerification;
import org.json.JSONObject;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;