From ef06db2c9cd948963c21b515166e6da4fb0c6fcc Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 23 Jun 2023 13:36:58 -0400 Subject: [PATCH] fix(agent): use consistent notification field (#1057) (#1058) Signed-off-by: Thuan Vo (cherry picked from commit 13db02830ebfdb6f884d8b71406c648eb3b4202a) Co-authored-by: Thuan Vo --- src/app/Agent/AgentProbeTemplates.tsx | 2 +- src/test/Agent/AgentProbeTemplates.test.tsx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/app/Agent/AgentProbeTemplates.tsx b/src/app/Agent/AgentProbeTemplates.tsx index 2eb1c61d6..3e5d3124a 100644 --- a/src/app/Agent/AgentProbeTemplates.tsx +++ b/src/app/Agent/AgentProbeTemplates.tsx @@ -210,7 +210,7 @@ export const AgentProbeTemplates: React.FC = (props) = return [ ...old, { - name: event.message.templateName, + name: event.message.probeTemplate, xml: event.message.templateContent, } as ProbeTemplate, ]; diff --git a/src/test/Agent/AgentProbeTemplates.test.tsx b/src/test/Agent/AgentProbeTemplates.test.tsx index 6a4ae1e1c..18306de20 100644 --- a/src/test/Agent/AgentProbeTemplates.test.tsx +++ b/src/test/Agent/AgentProbeTemplates.test.tsx @@ -71,9 +71,8 @@ const mockCreateTemplateNotification = { type: mockMessageType, } as MessageMeta, message: { - templateName: mockAnotherProbeTemplate.name, + probeTemplate: mockAnotherProbeTemplate.name, templateContent: mockAnotherProbeTemplate.xml, - probeTemplate: 'files-uploads/abcdfg', }, } as NotificationMessage;