Problems: push only existing triggers to the problems list, #954
This commit is contained in:
@@ -9,6 +9,8 @@ export function joinTriggersWithProblems(problems: ZBXProblem[], triggers: ZBXTr
|
||||
const p = problems[i];
|
||||
const triggerId = Number(p.objectid);
|
||||
const t = triggers[triggerId];
|
||||
|
||||
if (t) {
|
||||
const problemDTO: ProblemDTO = {
|
||||
timestamp: Number(p.clock),
|
||||
triggerid: p.objectid,
|
||||
@@ -39,6 +41,8 @@ export function joinTriggersWithProblems(problems: ZBXProblem[], triggers: ZBXTr
|
||||
problemDTOList.push(problemDTO);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return problemDTOList;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user