Browse Source

(*)告警推送数据加字段

dev
wuqun 2 years ago
parent
commit
44caf74670
  1. 6
      api/app/lib/controllers/alarm/alarmConfirmLog.js

6
api/app/lib/controllers/alarm/alarmConfirmLog.js

@ -77,6 +77,7 @@ async function sendAppearToWeb(app, models, clickHouse, datas, ttype) {
datas.map(ld => {
let pepPId = projects.find(p => p.id == ld.projectCorrelationId).pepProjectId;
sendData.push({
projectCorrelationId: ld.projectCorrelationId,
project: projects.find(p => p.id == ld.projectCorrelationId).name || pepProjects.find(pp => pp.id == pepPId).project_name,//前者为自定义项目名称
source: ld.alarmInfo.sourceName,
type: ld.type,
@ -128,6 +129,7 @@ async function sendConfirmToWeb(app, models, clickHouse, logDatas, isAuto) {
let pepPId = projects.find(p => p.id == ld.projectCorrelationId).pepProjectId;
sendData.push({
user: userName,
projectCorrelationId: ld.projectCorrelationId,
project: projects.find(p => p.id == ld.projectCorrelationId).name || pepProjects.find(pp => pp.id == pepPId).project_name,//前者为自定义项目名称
source: ld.alarmInfo.source,
type: ld.alarmInfo.type,
@ -143,6 +145,6 @@ async function sendConfirmToWeb(app, models, clickHouse, logDatas, isAuto) {
module.exports = {
alarmConfirmLog,
sendAppearToWeb,
sendConfirmToWeb
sendAppearToWeb,//推送告警发现
sendConfirmToWeb//推送告警确认
};
Loading…
Cancel
Save