diff options
Diffstat (limited to 'sdnr/wt/odlux/apps')
-rw-r--r-- | sdnr/wt/odlux/apps/apiDemo/pom.xml | 4 | ||||
-rw-r--r-- | sdnr/wt/odlux/apps/configurationApp/pom.xml | 4 | ||||
-rw-r--r-- | sdnr/wt/odlux/apps/configurationApp/src/yang/yangParser.ts | 88 | ||||
-rw-r--r-- | sdnr/wt/odlux/apps/configurationApp/webpack.config.js | 2 | ||||
-rw-r--r-- | sdnr/wt/odlux/apps/connectApp/pom.xml | 4 | ||||
-rw-r--r-- | sdnr/wt/odlux/apps/connectApp/tsconfig.json | 35 | ||||
-rw-r--r-- | sdnr/wt/odlux/apps/demoApp/pom.xml | 4 | ||||
-rw-r--r-- | sdnr/wt/odlux/apps/eventLogApp/pom.xml | 4 | ||||
-rw-r--r-- | sdnr/wt/odlux/apps/faultApp/pom.xml | 4 | ||||
-rw-r--r-- | sdnr/wt/odlux/apps/faultApp/src/components/faultStatus.tsx | 43 | ||||
-rw-r--r-- | sdnr/wt/odlux/apps/faultApp/src/pluginFault.tsx | 8 | ||||
-rw-r--r-- | sdnr/wt/odlux/apps/helpApp/pom.xml | 4 | ||||
-rw-r--r-- | sdnr/wt/odlux/apps/inventoryApp/pom.xml | 4 | ||||
-rw-r--r-- | sdnr/wt/odlux/apps/maintenanceApp/pom.xml | 4 | ||||
-rw-r--r-- | sdnr/wt/odlux/apps/mediatorApp/pom.xml | 6 | ||||
-rw-r--r-- | sdnr/wt/odlux/apps/minimumApp/pom.xml | 4 | ||||
-rw-r--r-- | sdnr/wt/odlux/apps/performanceHistoryApp/pom.xml | 4 |
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 9c355956d..67def2685 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 b6fb70298..3cbd1d1a6 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 27769ba8c..6a71b53e8 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 3f65b8853..e56d3d5fa 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 a349913cf..1705be28e 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 d81262dc2..d6e4eb07e 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 f8c982e26..398be2e14 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 ff37c711f..1f51cfbee 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 d75cb69b7..2a0a5458e 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 50dcb7b99..8155b304d 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 10d676639..8678f7ea0 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 9a280ed55..dfd47c790 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> |