diff --git a/core/core-frontend/src/assets/svg/clock.svg b/core/core-frontend/src/assets/svg/clock.svg
new file mode 100644
index 0000000000..543c400ad1
--- /dev/null
+++ b/core/core-frontend/src/assets/svg/clock.svg
@@ -0,0 +1,4 @@
+
diff --git a/core/core-frontend/src/assets/svg/threshold_full.svg b/core/core-frontend/src/assets/svg/threshold_full.svg
new file mode 100644
index 0000000000..011c456191
--- /dev/null
+++ b/core/core-frontend/src/assets/svg/threshold_full.svg
@@ -0,0 +1,8 @@
+
diff --git a/core/core-frontend/src/components/icon-custom/src/Icon.vue b/core/core-frontend/src/components/icon-custom/src/Icon.vue
index 1fd078397e..15da87560a 100644
--- a/core/core-frontend/src/components/icon-custom/src/Icon.vue
+++ b/core/core-frontend/src/components/icon-custom/src/Icon.vue
@@ -221,6 +221,8 @@ import emailTask from '@/assets/svg/email-task.svg'
import embedded from '@/assets/svg/embedded.svg'
import association from '@/assets/svg/association.svg'
import threshold from '@/assets/svg/threshold.svg'
+import threshold_full from '@/assets/svg/threshold_full.svg'
+import clock from '@/assets/svg/clock.svg'
import example from '@/assets/svg/example.svg'
import exclamationmark from '@/assets/svg/exclamationmark.svg'
import exclamationmark2 from '@/assets/svg/exclamationmark2.svg'
@@ -889,6 +891,8 @@ const iconMap = {
embedded: embedded,
association: association,
threshold: threshold,
+ threshold_full: threshold_full,
+ clock,
example: example,
exclamationmark: exclamationmark,
exclamationmark2: exclamationmark2,
diff --git a/core/core-frontend/src/locales/zh-CN.ts b/core/core-frontend/src/locales/zh-CN.ts
index 9c3dd463ac..458c726f2a 100644
--- a/core/core-frontend/src/locales/zh-CN.ts
+++ b/core/core-frontend/src/locales/zh-CN.ts
@@ -2780,6 +2780,9 @@ export default {
status: '数据状态',
base_setting: '基本设置',
threshold_setting: '告警设置',
- name: '告警名称'
+ name: '告警名称',
+ grid_title: '告警管理',
+ grid: '告警列表',
+ record: '告警记录'
}
}
diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/threshold/ThresholdApi.java b/sdk/api/api-base/src/main/java/io/dataease/api/threshold/ThresholdApi.java
new file mode 100644
index 0000000000..4de2c072f1
--- /dev/null
+++ b/sdk/api/api-base/src/main/java/io/dataease/api/threshold/ThresholdApi.java
@@ -0,0 +1,65 @@
+package io.dataease.api.threshold;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiSupport;
+import io.dataease.api.threshold.dto.ThresholdBatchReciRequest;
+import io.dataease.api.threshold.dto.ThresholdCreator;
+import io.dataease.api.threshold.dto.ThresholdGridRequest;
+import io.dataease.api.threshold.dto.ThresholdSwitchRequest;
+import io.dataease.api.threshold.vo.ThresholdGridVO;
+import io.dataease.api.threshold.vo.ThresholdInstanceVO;
+import io.dataease.model.KeywordRequest;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import java.util.List;
+
+@Tag(name = "阈值告警")
+@ApiSupport(order = 888, author = "fit2cloud-someone")
+public interface ThresholdApi {
+
+ @Operation(summary = "保存")
+ @PostMapping("/save")
+ void save(@RequestBody ThresholdCreator creator);
+
+ @Operation(summary = "修改")
+ @PostMapping("/edit")
+ void edit(@RequestBody ThresholdCreator creator);
+
+ @Operation(summary = "查询列表")
+ @Parameters({
+ @Parameter(name = "goPage", description = "目标页码", required = true, in = ParameterIn.PATH),
+ @Parameter(name = "pageSize", description = "每页容量", required = true, in = ParameterIn.PATH),
+ @Parameter(name = "request", description = "过滤条件", required = true)
+ })
+ @PostMapping("/pager/{goPage}/{pageSize}")
+ IPage pager(@PathVariable("goPage") int goPage, @PathVariable("pageSize") int pageSize, @RequestBody ThresholdGridRequest request);
+
+ @Operation(summary = "切换可用")
+ @PostMapping("/switch")
+ void switchEnable(@RequestBody ThresholdSwitchRequest request);
+
+ @Operation(summary = "删除")
+ @PostMapping("/delete")
+ void delete(@RequestBody List idList);
+
+ @Operation(summary = "批量设置接收人")
+ @PostMapping("/batchReci")
+ void batchReci(@RequestBody ThresholdBatchReciRequest request);
+
+ @Operation(summary = "查询实例列表")
+ @Parameters({
+ @Parameter(name = "goPage", description = "目标页码", required = true, in = ParameterIn.PATH),
+ @Parameter(name = "pageSize", description = "每页容量", required = true, in = ParameterIn.PATH),
+ @Parameter(name = "request", description = "过滤条件", required = true)
+ })
+ @PostMapping("/instancePager/{goPage}/{pageSize}")
+ IPage instancePager(@PathVariable("goPage") int goPage, @PathVariable("pageSize") int pageSize, @RequestBody KeywordRequest request);
+
+}
diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/threshold/dto/BaseReciDTO.java b/sdk/api/api-base/src/main/java/io/dataease/api/threshold/dto/BaseReciDTO.java
new file mode 100644
index 0000000000..0b00283e7b
--- /dev/null
+++ b/sdk/api/api-base/src/main/java/io/dataease/api/threshold/dto/BaseReciDTO.java
@@ -0,0 +1,25 @@
+package io.dataease.api.threshold.dto;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.List;
+
+@Data
+public class BaseReciDTO implements Serializable {
+ @Serial
+ private static final long serialVersionUID = -1996467050556455121L;
+
+ private List reciFlagList;
+
+ private List uidList;
+
+ private List ridList;
+
+ private List emailList;
+
+ private List larkGroupList;
+
+ private List webhookList;
+}
diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/threshold/dto/ThresholdBatchReciRequest.java b/sdk/api/api-base/src/main/java/io/dataease/api/threshold/dto/ThresholdBatchReciRequest.java
new file mode 100644
index 0000000000..68313519b7
--- /dev/null
+++ b/sdk/api/api-base/src/main/java/io/dataease/api/threshold/dto/ThresholdBatchReciRequest.java
@@ -0,0 +1,18 @@
+package io.dataease.api.threshold.dto;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.List;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class ThresholdBatchReciRequest extends BaseReciDTO implements Serializable {
+ @Serial
+ private static final long serialVersionUID = -2831988863396898760L;
+
+ private List idList;
+
+}
diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/threshold/dto/ThresholdCreator.java b/sdk/api/api-base/src/main/java/io/dataease/api/threshold/dto/ThresholdCreator.java
new file mode 100644
index 0000000000..852656c7a9
--- /dev/null
+++ b/sdk/api/api-base/src/main/java/io/dataease/api/threshold/dto/ThresholdCreator.java
@@ -0,0 +1,44 @@
+package io.dataease.api.threshold.dto;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class ThresholdCreator extends BaseReciDTO implements Serializable {
+ @Serial
+ private static final long serialVersionUID = -4085895087749460947L;
+
+ private Long id;
+
+ private String name;
+
+ private Boolean enable = true;
+
+ private Integer rateType = 1;
+
+ private Integer rateValue = 1;
+
+ private Long rateTime;
+
+ private Long resourceId;
+
+ private String resourceType;
+
+ private Long chartId;
+
+ private String chartType;
+
+ private String thresholdRules;
+
+ private Integer msgType = 0;
+
+ private String msgTitle;
+
+ private String msgContent;
+
+ private Boolean repeat = true;
+}
diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/threshold/dto/ThresholdGridRequest.java b/sdk/api/api-base/src/main/java/io/dataease/api/threshold/dto/ThresholdGridRequest.java
new file mode 100644
index 0000000000..1ff98bab2e
--- /dev/null
+++ b/sdk/api/api-base/src/main/java/io/dataease/api/threshold/dto/ThresholdGridRequest.java
@@ -0,0 +1,24 @@
+package io.dataease.api.threshold.dto;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.List;
+
+@Data
+public class ThresholdGridRequest implements Serializable {
+ @Serial
+ private static final long serialVersionUID = -2729126999572515149L;
+
+ private String keyword;
+
+ private List resourceTypeList;
+
+ private List statusList;
+
+ private List enableList;
+
+ private List timeList;
+
+}
diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/threshold/dto/ThresholdSwitchRequest.java b/sdk/api/api-base/src/main/java/io/dataease/api/threshold/dto/ThresholdSwitchRequest.java
new file mode 100644
index 0000000000..b99e2a76d0
--- /dev/null
+++ b/sdk/api/api-base/src/main/java/io/dataease/api/threshold/dto/ThresholdSwitchRequest.java
@@ -0,0 +1,16 @@
+package io.dataease.api.threshold.dto;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+@Data
+public class ThresholdSwitchRequest implements Serializable {
+ @Serial
+ private static final long serialVersionUID = -805688257417787452L;
+
+ private Long id;
+
+ private Boolean enable;
+}
diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/threshold/vo/ThresholdGridVO.java b/sdk/api/api-base/src/main/java/io/dataease/api/threshold/vo/ThresholdGridVO.java
new file mode 100644
index 0000000000..9305977c1c
--- /dev/null
+++ b/sdk/api/api-base/src/main/java/io/dataease/api/threshold/vo/ThresholdGridVO.java
@@ -0,0 +1,44 @@
+package io.dataease.api.threshold.vo;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+@Data
+public class ThresholdGridVO implements Serializable {
+ @Serial
+ private static final long serialVersionUID = 3729780170978191092L;
+
+ @JsonSerialize(using= ToStringSerializer.class)
+ private Long id;
+
+ private String name;
+
+ @JsonSerialize(using= ToStringSerializer.class)
+ private Long resourceId;
+
+ private String resourceType;
+
+ private String resourceName;
+
+ @JsonSerialize(using= ToStringSerializer.class)
+ private Long chartId;
+
+ private String chartType;
+
+ private String chartName;
+
+ private Boolean status;
+
+ private Boolean enable;
+
+ @JsonSerialize(using= ToStringSerializer.class)
+ private Long creator;
+
+ private String createName;
+
+ private Long createTime;
+}
diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/threshold/vo/ThresholdInstanceVO.java b/sdk/api/api-base/src/main/java/io/dataease/api/threshold/vo/ThresholdInstanceVO.java
new file mode 100644
index 0000000000..8c9b647747
--- /dev/null
+++ b/sdk/api/api-base/src/main/java/io/dataease/api/threshold/vo/ThresholdInstanceVO.java
@@ -0,0 +1,26 @@
+package io.dataease.api.threshold.vo;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+@Data
+public class ThresholdInstanceVO implements Serializable {
+ @Serial
+ private static final long serialVersionUID = 4896658954041017L;
+
+ private Long id;
+
+ private Long taskId;
+
+ private String name;
+
+ private Long execTime;
+
+ private Boolean status;
+
+ private String content;
+
+ private String msg;
+}