From cb30c64aada718c479791468f8babbcd3576cbf5 Mon Sep 17 00:00:00 2001
From: sai-neetha <sai-neetha.phulmali@highstreet-technologies.com>
Date: Wed, 20 Mar 2024 15:55:54 +0100
Subject: ODLUX Update

ODLUX Update

Issue-ID: CCSDK-3999
Change-Id: I6f95cd65cabe08b27a1ff71eacb7c57aa318c376
Signed-off-by: sai-neetha <sai-neetha.phulmali@highstreet-technologies.com>
(cherry picked from commit 5418ff6a08cd2482cf76aed8def6592623253229)
Signed-off-by: sai-neetha <sai-neetha.phulmali@highstreet-technologies.com>
---
 .../apps/faultApp/src/components/dashboardHome.tsx | 24 +++++++++++++---------
 1 file changed, 14 insertions(+), 10 deletions(-)

(limited to 'sdnr/wt/odlux/apps/faultApp/src/components/dashboardHome.tsx')

diff --git a/sdnr/wt/odlux/apps/faultApp/src/components/dashboardHome.tsx b/sdnr/wt/odlux/apps/faultApp/src/components/dashboardHome.tsx
index a3e32c42c..534a14336 100644
--- a/sdnr/wt/odlux/apps/faultApp/src/components/dashboardHome.tsx
+++ b/sdnr/wt/odlux/apps/faultApp/src/components/dashboardHome.tsx
@@ -153,7 +153,7 @@ class DashboardHome extends React.Component<HomeComponentProps>  {
             let label =
               (data.datasets[tooltipItem.datasetIndex].labels &&
                 data.datasets[tooltipItem.datasetIndex].labels[
-                  tooltipItem.index
+                tooltipItem.index
                 ]) ||
               data.labels[tooltipItem.index] ||
               '';
@@ -180,10 +180,12 @@ class DashboardHome extends React.Component<HomeComponentProps>  {
         },
       },
       onClick: (event: MouseEvent, item: any) => {
-        if (item[0]) {
-          let connectionStatus = labels[item[0]._index] + '';
-          this.props.navigateToApplication('connect', '/connectionStatus/' + connectionStatus);
-        }
+        setTimeout(() => {
+          if (item[0]) {
+            let connectionStatus = labels[item[0]._index] + '';
+            this.props.navigateToApplication('connect', '/connectionStatus/' + connectionStatus);
+          }
+        }, 0);
       },
     };
 
@@ -263,7 +265,7 @@ class DashboardHome extends React.Component<HomeComponentProps>  {
             let label =
               (data.datasets[tooltipItem.datasetIndex].labels &&
                 data.datasets[tooltipItem.datasetIndex].labels[
-                  tooltipItem.index
+                tooltipItem.index
                 ]) ||
               data.labels[tooltipItem.index] ||
               '';
@@ -290,10 +292,12 @@ class DashboardHome extends React.Component<HomeComponentProps>  {
         },
       },
       onClick: (event: MouseEvent, item: any) => {
-        if (item[0]) {
-          let severity = alarmLabels[item[0]._index] + '';
-          this.props.navigateToApplication('fault', '/alarmStatus/' + severity);
-        }
+        setTimeout(() => {
+          if (item[0]) {
+            let severity = alarmLabels[item[0]._index] + '';
+            this.props.navigateToApplication('fault', '/alarmStatus/' + severity);
+          }
+        }, 0);
       },
     };
 
-- 
cgit 1.2.3-korg

