|
@@ -1,13 +1,10 @@
|
|
|
package com.jay.monitor.data.server.avue.template;
|
|
|
|
|
|
-import com.jay.monitor.data.server.controllers.AlertPlatformController;
|
|
|
+import com.jay.monitor.data.server.avue.enums.StatusEnum;
|
|
|
import com.jay.monitor.data.server.controllers.AlertRuleController;
|
|
|
import com.jay.monitor.data.server.enums.MatchRuleEnums;
|
|
|
-import com.ruoyi.client.annotation.AVueConfig;
|
|
|
-import com.ruoyi.client.annotation.AVueRouteKey;
|
|
|
-import com.ruoyi.client.annotation.AVueTableOption;
|
|
|
-import com.ruoyi.client.annotation.column.AVueInput;
|
|
|
-import com.ruoyi.client.annotation.column.AVueSelect;
|
|
|
+import com.ruoyi.client.annotation.*;
|
|
|
+import com.ruoyi.client.annotation.column.*;
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
@@ -20,7 +17,11 @@ import java.util.Date;
|
|
|
*/
|
|
|
@AVueRouteKey(groupKey = "alert-rule")
|
|
|
@AVueTableOption(title = "告警规则管理", dialogDrag = true, pageRoot = "pageModel", pageData = "resultSet")
|
|
|
-@AVueConfig(list = AlertRuleController.LIST_URL, update = AlertRuleController.UPDATE_URL, save = AlertRuleController.ADD_URL)
|
|
|
+@AVueFromOption(successField = "success", successKeyword = "true", messageField = "message")
|
|
|
+@AVueConfig(list = AlertRuleController.LIST_URL, update = AlertRuleController.UPDATE_URL, save = AlertRuleController.ADD_URL, del = AlertRuleController.DEL_URL)
|
|
|
+@AVueEventButtons(tableTopLeftButtons = {
|
|
|
+ @AVueClickButton(methodName = "hrefClick", btnName = "使用介绍", type = "success", icon = "el-icon-setting", attrExt = {
|
|
|
+ @AVueAttr(name = "url", value = "https://www.yuque.com/docs/share/573f3b55-2814-4e41-b6c9-8eeb7812d76c")})})
|
|
|
public class AlertRuleAVueModel {
|
|
|
|
|
|
@AVueInput(prop = "id", label = "主键", addDisplay = false, editDisplay = false)
|
|
@@ -28,55 +29,49 @@ public class AlertRuleAVueModel {
|
|
|
/**
|
|
|
* 规则名称
|
|
|
*/
|
|
|
- @AVueInput(prop = "ruleName", label = "规则名称", search = true)
|
|
|
+ @AVueInput(prop = "ruleName", label = "规则名称", search = true, required = true)
|
|
|
private String ruleName;
|
|
|
/**
|
|
|
* 项目名称 , ALL 应用所有项目
|
|
|
*/
|
|
|
- @AVueInput(prop = "project", label = "项目名称", search = true)
|
|
|
+ @AVueInput(prop = "project", label = "项目名称", search = true, required = true)
|
|
|
private String project;
|
|
|
/**
|
|
|
* 规则描述
|
|
|
*/
|
|
|
- @AVueInput(prop = "title", label = "告警标题", search = true)
|
|
|
+ @AVueInput(prop = "title", label = "告警标题", search = true, required = true)
|
|
|
private String title;
|
|
|
/**
|
|
|
* 规则类型, 该类型会基于字段值去做计算
|
|
|
*/
|
|
|
- @AVueSelect(prop = "ruleType", label = "规则类型", dicData = "MatchRuleEnums", search = true)
|
|
|
+ @AVueSelect(prop = "ruleType", label = "规则类型", dicData = "MatchRuleEnums", search = true, required = true, hide = true)
|
|
|
private MatchRuleEnums ruleType;
|
|
|
/**
|
|
|
* 字段名称
|
|
|
*/
|
|
|
- @AVueInput(prop = "fieldName", label = "字段名称")
|
|
|
+ @AVueInput(prop = "fieldName", label = "字段名称", hide = true)
|
|
|
private String fieldName;
|
|
|
/**
|
|
|
* 字段值
|
|
|
*/
|
|
|
- @AVueInput(prop = "fieldValue", label = "字段值")
|
|
|
+ @AVueTextarea(prop = "fieldValue", label = "字段值", required = true, hide = true)
|
|
|
private String fieldValue;
|
|
|
|
|
|
- @AVueSelect(prop = "platformType", label = "告警平台类型", dicData = "AlertMsgEnums", cascaderItem = {"alertPlatformId"})
|
|
|
- private String platformType;
|
|
|
-
|
|
|
- /**
|
|
|
- * 告警编号
|
|
|
- */
|
|
|
- @AVueSelect(prop = "alertPlatformId", label = "选择告警组", dicUrl = AlertPlatformController.TYPE_LIST_URL, dicMethod = "post", props = "{'label':'alertName','value':'id'}", dicQuery = "{'platformType':'{{platformType}}'}")
|
|
|
- private String alertPlatformId;
|
|
|
+ @AVueDynamic(prop = "alertPlatformList", label = "告警组", required = true, hide = true)
|
|
|
+ private AlertPlaformNodelModel alertPlatformList;
|
|
|
|
|
|
/**
|
|
|
* 状态
|
|
|
*/
|
|
|
@AVueSelect(prop = "status", label = "状态", dicData = "StatusEnum", addDisplay = true)
|
|
|
- private Integer status;
|
|
|
+ private Integer status = (Integer)StatusEnum.valid.getCode();
|
|
|
|
|
|
@AVueInput(prop = "creator", label = "创建人", addDisplay = false, editDisabled = true)
|
|
|
private String creator;
|
|
|
- @AVueInput(prop = "created", label = "创建时间", addDisplay = false, editDisabled = true)
|
|
|
- private Date created;
|
|
|
+ @AVueDatetime(prop = "createDate", label = "创建时间", format = "yyyy-MM-dd HH:mm:ss", addDisplay = false, editDisabled = true)
|
|
|
+ private Date createDate;
|
|
|
@AVueInput(prop = "updator", label = "修改人", addDisplay = false, editDisabled = true)
|
|
|
private String updator;
|
|
|
- @AVueInput(prop = "updated", label = "修改时间", addDisplay = false, editDisabled = true)
|
|
|
+ @AVueDatetime(prop = "updated", label = "修改时间", format = "yyyy-MM-dd HH:mm:ss", addDisplay = false, editDisabled = true)
|
|
|
private Date updated;
|
|
|
}
|