aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/odlux/apps')
-rw-r--r--sdnr/wt/odlux/apps/apiDemo/pom.xml4
-rw-r--r--sdnr/wt/odlux/apps/configurationApp/pom.xml4
-rw-r--r--sdnr/wt/odlux/apps/configurationApp/src/yang/yangParser.ts88
-rw-r--r--sdnr/wt/odlux/apps/configurationApp/webpack.config.js2
-rw-r--r--sdnr/wt/odlux/apps/connectApp/pom.xml4
-rw-r--r--sdnr/wt/odlux/apps/connectApp/tsconfig.json35
-rw-r--r--sdnr/wt/odlux/apps/demoApp/pom.xml4
-rw-r--r--sdnr/wt/odlux/apps/eventLogApp/pom.xml4
-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
-rw-r--r--sdnr/wt/odlux/apps/helpApp/pom.xml4
-rw-r--r--sdnr/wt/odlux/apps/inventoryApp/pom.xml4
-rw-r--r--sdnr/wt/odlux/apps/maintenanceApp/pom.xml4
-rw-r--r--sdnr/wt/odlux/apps/mediatorApp/pom.xml6
-rw-r--r--sdnr/wt/odlux/apps/minimumApp/pom.xml4
-rw-r--r--sdnr/wt/odlux/apps/performanceHistoryApp/pom.xml4
17 files changed, 123 insertions, 103 deletions
diff --git a/sdnr/wt/odlux/apps/apiDemo/pom.xml b/sdnr/wt/odlux/apps/apiDemo/pom.xml
index 0c161ea61..e608a38fa 100644
--- a/sdnr/wt/odlux/apps/apiDemo/pom.xml
+++ b/sdnr/wt/odlux/apps/apiDemo/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/configurationApp/pom.xml b/sdnr/wt/odlux/apps/configurationApp/pom.xml
index 7bacaaea6..06d13ffe0 100644
--- a/sdnr/wt/odlux/apps/configurationApp/pom.xml
+++ b/sdnr/wt/odlux/apps/configurationApp/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/configurationApp/src/yang/yangParser.ts b/sdnr/wt/odlux/apps/configurationApp/src/yang/yangParser.ts
index cc2520100..2dbbae274 100644
--- a/sdnr/wt/odlux/apps/configurationApp/src/yang/yangParser.ts
+++ b/sdnr/wt/odlux/apps/configurationApp/src/yang/yangParser.ts
@@ -288,6 +288,8 @@ class YangLexer {
export class YangParser {
private _groupingsToResolve: ViewSpecification[] = [];
+ private _typeRefToResolve: (() => void)[] = [];
+
private _identityToResolve: (() => void)[] = [];
private _unionsToResolve: (() => void)[] = [];
@@ -608,33 +610,42 @@ export class YangParser {
}
});
+ this._typeRefToResolve.forEach(cb => {
+ try { cb(); } catch (error) {
+ console.warn(error.message);
+ }
+ });
+
this._modulesToResolve.forEach(cb => {
try { cb(); } catch (error) {
console.warn(error.message);
}
});
- // // resolve readOnly
- // const resolveReadOnly = (view: ViewSpecification, parentConfig: boolean) => {
+ // resolve readOnly
+ const resolveReadOnly = (view: ViewSpecification, parentConfig: boolean) => {
- // // update view config
- // view.config = view.config && parentConfig;
+ // update view config
+ view.config = view.config && parentConfig;
- // Object.keys(view.elements).forEach((key) => {
- // const elm = view.elements[key];
+ Object.keys(view.elements).forEach((key) => {
+ const elm = view.elements[key];
- // // update element config
- // elm.config = elm.config && view.config;
+ // update element config
+ elm.config = elm.config && view.config;
- // // update all sub-elements of objects
- // if (elm.uiType === 'object') {
- // resolveReadOnly(this.views[+elm.viewId], elm.config);
- // }
+ // update all sub-elements of objects
+ if (elm.uiType === 'object') {
+ resolveReadOnly(this.views[+elm.viewId], elm.config);
+ }
- // });
- // };
+ });
+ };
- // const dump = resolveReadOnly(this.views[0], true);
+ const dump = resolveReadOnly(this.views[0], true);
+ if (LOGLEVEL > 2) {
+ console.log('Resolved views:', dump);
+ }
}
private _nextId = 1;
@@ -661,7 +672,7 @@ export class YangParser {
const typedefs = this.extractNodes(statement, 'typedef');
typedefs && typedefs.forEach(def => {
if (!def.arg) {
- throw new Error(`Module: [${module.name}]. Found typefed without name.`);
+ throw new Error(`Module: [${module.name}]. Found typedef without name.`);
}
module.typedefs[def.arg] = this.getViewElement(def, module, 0, currentPath, false);
});
@@ -1436,28 +1447,35 @@ export class YangParser {
let typeRef = this.resolveType(type, module);
if (typeRef == null) console.error(new Error(`Could not resolve type ${type} in [${module.name}][${currentPath}].`));
-
if (isViewElementString(typeRef)) {
typeRef = this.resolveStringType(typeRef, extractPattern(), extractRange(0, +18446744073709551615));
} else if (isViewElementNumber(typeRef)) {
typeRef = this.resolveNumberType(typeRef, extractRange(typeRef.min, typeRef.max));
}
- // spoof date type here from special string type
- if ((type === 'date-and-time' || type.endsWith(':date-and-time')) && typeRef.module === 'ietf-yang-types') {
- return {
- ...typeRef,
- ...element,
- description: description,
- uiType: 'date',
- };
- }
-
- return ({
- ...typeRef,
- ...element,
- description: description,
- }) as ViewElement;
+ const res = {
+ id: element.id,
+ } as ViewElement;
+
+ this._typeRefToResolve.push(() => {
+ // spoof date type here from special string type
+ if ((type === 'date-and-time' || type.endsWith(':date-and-time')) && typeRef.module === 'ietf-yang-types') {
+ Object.assign(res, {
+ ...typeRef,
+ ...element,
+ description: description,
+ uiType: 'date',
+ });
+ } else {
+ Object.assign(res, {
+ ...typeRef,
+ ...element,
+ description: description,
+ });
+ }
+ });
+
+ return res;
}
}
@@ -1573,9 +1591,9 @@ export class YangParser {
}
private resolveType(type: string, module: Module) {
- const collonInd = type.indexOf(':');
- const preFix = collonInd > -1 ? type.slice(0, collonInd) : '';
- const typeName = collonInd > -1 ? type.slice(collonInd + 1) : type;
+ const colonInd = type.indexOf(':');
+ const preFix = colonInd > -1 ? type.slice(0, colonInd) : '';
+ const typeName = colonInd > -1 ? type.slice(colonInd + 1) : type;
const res = preFix
? this._modules[module.imports[preFix]].typedefs[typeName]
diff --git a/sdnr/wt/odlux/apps/configurationApp/webpack.config.js b/sdnr/wt/odlux/apps/configurationApp/webpack.config.js
index 0d37c7d87..2f7ab11b4 100644
--- a/sdnr/wt/odlux/apps/configurationApp/webpack.config.js
+++ b/sdnr/wt/odlux/apps/configurationApp/webpack.config.js
@@ -41,7 +41,7 @@ module.exports = (env) => {
output: {
path: distPath,
filename: "[name].js",
- library: "[name]",
+ library: "configurationApp",
libraryTarget: "umd2",
chunkFilename: "[name].js"
},
diff --git a/sdnr/wt/odlux/apps/connectApp/pom.xml b/sdnr/wt/odlux/apps/connectApp/pom.xml
index 9d4f07fef..61debbe25 100644
--- a/sdnr/wt/odlux/apps/connectApp/pom.xml
+++ b/sdnr/wt/odlux/apps/connectApp/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/connectApp/tsconfig.json b/sdnr/wt/odlux/apps/connectApp/tsconfig.json
index ca65092e0..18956db7c 100644
--- a/sdnr/wt/odlux/apps/connectApp/tsconfig.json
+++ b/sdnr/wt/odlux/apps/connectApp/tsconfig.json
@@ -1,37 +1,6 @@
{
+ "extends": "../../tsconfig.json",
"compilerOptions": {
- "baseUrl": "./src",
"outDir": "./dist",
- "sourceMap": true,
- "forceConsistentCasingInFileNames": true,
- "allowSyntheticDefaultImports": true,
- "allowUnreachableCode": false,
- "allowUnusedLabels": false,
- "noFallthroughCasesInSwitch": true,
- "noImplicitAny": true,
- "noImplicitReturns": true,
- "noImplicitThis": true,
- "strictNullChecks": true,
- "pretty": true,
- "newLine": "LF",
- "module": "es2015",
- "target": "es2016",
- "moduleResolution": "node",
- "experimentalDecorators": true,
- "jsx": "preserve",
- "lib": [
- "dom",
- "es2015",
- "es2016"
- ],
- "types": [
- "prop-types",
- "react",
- "react-dom"
- ]
- },
- "exclude": [
- "dist",
- "node_modules"
- ]
+ },
}
diff --git a/sdnr/wt/odlux/apps/demoApp/pom.xml b/sdnr/wt/odlux/apps/demoApp/pom.xml
index 03df31b1a..5d676e89b 100644
--- a/sdnr/wt/odlux/apps/demoApp/pom.xml
+++ b/sdnr/wt/odlux/apps/demoApp/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/eventLogApp/pom.xml b/sdnr/wt/odlux/apps/eventLogApp/pom.xml
index 4d3ee0282..97243e36f 100644
--- a/sdnr/wt/odlux/apps/eventLogApp/pom.xml
+++ b/sdnr/wt/odlux/apps/eventLogApp/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/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;
+ });
}
diff --git a/sdnr/wt/odlux/apps/helpApp/pom.xml b/sdnr/wt/odlux/apps/helpApp/pom.xml
index cffb9f72a..22a102e74 100644
--- a/sdnr/wt/odlux/apps/helpApp/pom.xml
+++ b/sdnr/wt/odlux/apps/helpApp/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/inventoryApp/pom.xml b/sdnr/wt/odlux/apps/inventoryApp/pom.xml
index 01cdc5f6b..164f97bb8 100644
--- a/sdnr/wt/odlux/apps/inventoryApp/pom.xml
+++ b/sdnr/wt/odlux/apps/inventoryApp/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/maintenanceApp/pom.xml b/sdnr/wt/odlux/apps/maintenanceApp/pom.xml
index 08c44996e..eda21d76f 100644
--- a/sdnr/wt/odlux/apps/maintenanceApp/pom.xml
+++ b/sdnr/wt/odlux/apps/maintenanceApp/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/mediatorApp/pom.xml b/sdnr/wt/odlux/apps/mediatorApp/pom.xml
index 03ffb9a0c..b4f0162b3 100644
--- a/sdnr/wt/odlux/apps/mediatorApp/pom.xml
+++ b/sdnr/wt/odlux/apps/mediatorApp/pom.xml
@@ -31,7 +31,7 @@
<groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
<artifactId>sdnr-wt-odlux-app-mediatorApp</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.6.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>ccsdk-features :: ${project.artifactId}</name>
@@ -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/minimumApp/pom.xml b/sdnr/wt/odlux/apps/minimumApp/pom.xml
index b567c2da1..f477a43d1 100644
--- a/sdnr/wt/odlux/apps/minimumApp/pom.xml
+++ b/sdnr/wt/odlux/apps/minimumApp/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/performanceHistoryApp/pom.xml b/sdnr/wt/odlux/apps/performanceHistoryApp/pom.xml
index 11d555a63..dd151e217 100644
--- a/sdnr/wt/odlux/apps/performanceHistoryApp/pom.xml
+++ b/sdnr/wt/odlux/apps/performanceHistoryApp/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>