From 1fda1e433489e43387dbd082f8aba37d136755b2 Mon Sep 17 00:00:00 2001 From: qixiaoning <jony.kee@outlook.com> Date: 星期四, 31 七月 2025 10:46:04 +0800 Subject: [PATCH] 算力管理增加事件等级,预警规则(任务描述) --- chanmanage-service/controllers/pollSet.go | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/chanmanage-service/controllers/pollSet.go b/chanmanage-service/controllers/pollSet.go index 49488b2..275584e 100644 --- a/chanmanage-service/controllers/pollSet.go +++ b/chanmanage-service/controllers/pollSet.go @@ -282,7 +282,19 @@ // } var ids []string = []string{} ids = append(ids, cE.Id) - cri.AllTasks, _ = models.GetListTask(ids) + tasks, _ := models.GetListTask(ids) + //rules + ruleMap := models.GetAllRule() + + cri.AllTasks = []commonModel.TaskM{} + for _, item := range tasks { + temp := &commonModel.TaskM{ + TaskName: item.TaskName, + EventName: item.EventName, + TaskDescription: ruleMap[item.TaskId], + } + cri.AllTasks = append(cri.AllTasks, *temp) + } //澶勭悊鎽勫儚鏈虹殑鐘舵�� if cE.RunType == commonModel.TYPE_RUNTYPE_POLL || cE.RunType == commonModel.TYPE_RUNTYPE_REALTIME { -- Gitblit v1.8.0