summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/faultApp/src
diff options
context:
space:
mode:
authorsai-neetha <sai-neetha.phulmali@highstreet-technologies.com>2023-07-07 18:11:09 +0200
committersai-neetha <sai-neetha.phulmali@highstreet-technologies.com>2023-07-07 18:12:17 +0200
commitfad3167f42d585e3144547db4c6dd7d00ea7b18a (patch)
treed6578fd008c717748e6110c2072bbe65fcb91e2e /sdnr/wt/odlux/apps/faultApp/src
parent8efd8356d7ea705e282a72aeb74d4199cdf21851 (diff)
Update ODLUX
node version yarn version update Issue-ID: CCSDK-3923 Signed-off-by: sai-neetha <sai-neetha.phulmali@highstreet-technologies.com> Change-Id: Ibd3d6a6f45a14be4f1d175cf6fc5c8738aa11dea
Diffstat (limited to 'sdnr/wt/odlux/apps/faultApp/src')
-rw-r--r--sdnr/wt/odlux/apps/faultApp/src/components/faultStatus.tsx43
-rw-r--r--sdnr/wt/odlux/apps/faultApp/src/pluginFault.tsx8
2 files changed, 42 insertions, 9 deletions
diff --git a/sdnr/wt/odlux/apps/faultApp/src/components/faultStatus.tsx b/sdnr/wt/odlux/apps/faultApp/src/components/faultStatus.tsx
index c2ca4a536..57374dd77 100644
--- a/sdnr/wt/odlux/apps/faultApp/src/components/faultStatus.tsx
+++ b/sdnr/wt/odlux/apps/faultApp/src/components/faultStatus.tsx
@@ -23,6 +23,7 @@ import Typography from '@mui/material/Typography';
import { WithStyles } from '@mui/styles';
import createStyles from '@mui/styles/createStyles';
import withStyles from '@mui/styles/withStyles';
+import Tooltip from '@mui/material/Tooltip';
import { connect, Connect } from '../../../../framework/src/flux/connect';
import { IApplicationStoreState } from '../../../../framework/src/store/applicationStore';
@@ -60,18 +61,42 @@ class FaultStatusComponent extends React.Component<FaultStatusComponentProps> {
return (
<>
- <Typography variant="body1" color="inherit" aria-label="critical-alarms">
- Alarm Status: <FontAwesomeIcon className={`${classes.icon} ${classes.critical}`} icon={faExclamationTriangle} /> { faultStatus.critical } |
+ <Typography variant="body1" color="inherit">
+ Alarm Status:
+ <Tooltip title="Critical Alarms" arrow>
+ <span aria-label="critical-alarms">
+ <FontAwesomeIcon className={`${classes.icon} ${classes.critical}`} icon={faExclamationTriangle} />
+ </span>
+ </Tooltip>
+ {faultStatus.critical} |
</Typography>
- <Typography variant="body1" color="inherit" aria-label="major-alarms">
- <FontAwesomeIcon className={`${classes.icon} ${classes.major}`} icon={faExclamationTriangle} /> { faultStatus.major } |
+
+ <Typography variant="body1" color="inherit">
+ <Tooltip title="Major Alarms" arrow>
+ <span aria-label="major-alarms">
+ <FontAwesomeIcon className={`${classes.icon} ${classes.major}`} icon={faExclamationTriangle} />
+ </span>
+ </Tooltip>
+ {faultStatus.major} |
+ </Typography>
+
+ <Typography variant="body1" color="inherit">
+ <Tooltip title="Minor Alarms" arrow>
+ <span aria-label="minor-alarms">
+ <FontAwesomeIcon className={`${classes.icon} ${classes.minor}`} icon={faExclamationTriangle} />
+ </span>
+ </Tooltip>
+ {faultStatus.minor} |
</Typography>
- <Typography variant="body1" color="inherit" aria-label="minor-alarms">
- <FontAwesomeIcon className={`${classes.icon} ${classes.minor}`} icon={faExclamationTriangle} /> { faultStatus.minor } |
+
+ <Typography variant="body1" color="inherit">
+ <Tooltip title="Warning Alarms" arrow>
+ <span aria-label="warning-alarms">
+ <FontAwesomeIcon className={`${classes.icon} ${classes.warning}`} icon={faExclamationTriangle} />
+ </span>
+ </Tooltip>
+ {faultStatus.warning} |
</Typography>
- <Typography variant="body1" color="inherit" aria-label="warning-alarms">
- <FontAwesomeIcon className={`${classes.icon} ${classes.warning}`} icon={faExclamationTriangle} /> { faultStatus.warning } |
- </Typography>
</>
);
}
diff --git a/sdnr/wt/odlux/apps/faultApp/src/pluginFault.tsx b/sdnr/wt/odlux/apps/faultApp/src/pluginFault.tsx
index ca1cfc171..2ef243c2d 100644
--- a/sdnr/wt/odlux/apps/faultApp/src/pluginFault.tsx
+++ b/sdnr/wt/odlux/apps/faultApp/src/pluginFault.tsx
@@ -158,6 +158,14 @@ export function register() {
}
applicationApi.loginEvent.addHandler(()=>{
+ if (refreshInterval) {
+ clearInterval(refreshInterval);
+ }
refreshInterval = startRefreshInterval() as any;
});
+
+ applicationApi.logoutEvent.addHandler(()=>{
+ refreshInterval && window.clearInterval(refreshInterval);
+ refreshInterval = null;
+ });
}