From f5055d29696c2a93140e3ee1a260b365fe2aebeb Mon Sep 17 00:00:00 2001 From: Ashish Agrawal Date: Fri, 14 Jul 2023 17:09:39 -0700 Subject: [PATCH] Fix monitor parse and alerts table (#645) Signed-off-by: Ashish Agrawal (cherry picked from commit 69726670bd1ee388bf300b092a3c2c0c1b466470) --- public/pages/MonitorDetails/containers/MonitorDetails.js | 4 +++- public/utils/contextMenu/monitors.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/public/pages/MonitorDetails/containers/MonitorDetails.js b/public/pages/MonitorDetails/containers/MonitorDetails.js index 2a9752b53..3bda926bb 100644 --- a/public/pages/MonitorDetails/containers/MonitorDetails.js +++ b/public/pages/MonitorDetails/containers/MonitorDetails.js @@ -493,7 +493,9 @@ export default class MonitorDetails extends Component { ) : null} {this.state.tabContent} - ) : null} + ) : ( + this.renderAlertsTable() + )} {isJsonModalOpen && ( diff --git a/public/utils/contextMenu/monitors.ts b/public/utils/contextMenu/monitors.ts index 02b5b5ecc..4717f3e35 100644 --- a/public/utils/contextMenu/monitors.ts +++ b/public/utils/contextMenu/monitors.ts @@ -22,7 +22,7 @@ const getMonitors = async (params) => { const parseMonitor = (monitor) => { const state = monitor.monitor.enabled ? 'enabled' : 'disabled'; - const latestAlert = monitor.latestAlert === "--" ? undefined : monitor.latestAlert; + const latestAlert = monitor.lastNotificationTime === "--" ? undefined : monitor.lastNotificationTime; return { name: monitor.name, state: state,