summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/faultApp
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/odlux/apps/faultApp')
-rw-r--r--sdnr/wt/odlux/apps/faultApp/pom.xml4
-rw-r--r--sdnr/wt/odlux/apps/faultApp/src/components/faultStatus.tsx43
-rw-r--r--sdnr/wt/odlux/apps/faultApp/src/pluginFault.tsx8
3 files changed, 44 insertions, 11 deletions
diff --git a/sdnr/wt/odlux/apps/faultApp/pom.xml b/sdnr/wt/odlux/apps/faultApp/pom.xml
index c7a274ec8..b633a0caa 100644
--- a/sdnr/wt/odlux/apps/faultApp/pom.xml
+++ b/sdnr/wt/odlux/apps/faultApp/pom.xml
@@ -139,8 +139,8 @@
<!-- optional: default phase is "generate-resources" -->
<phase>initialize</phase>
<configuration>
- <nodeVersion>v12.22.0</nodeVersion>
- <yarnVersion>v1.22.10</yarnVersion>
+ <nodeVersion>v16.17.0</nodeVersion>
+ <yarnVersion>v1.22.19</yarnVersion>
</configuration>
</execution>
<execution>
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;
+ });
}