summaryrefslogtreecommitdiffstats
path: root/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module')
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/pom.xml14
-rwxr-xr-xsdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/images/mwtnTest.pngbin0 -> 2868 bytes
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/mwtnTest-custom.css24
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/mwtnTest.controller.js477
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/mwtnTest.module.js53
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/mwtnTest.services.js32
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/templates/frame.tpl.html172
7 files changed, 772 insertions, 0 deletions
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/pom.xml b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/pom.xml
new file mode 100644
index 00000000..400eada1
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>mwtnTest</artifactId>
+ <groupId>com.highstreet.technologies.odl.dlux</groupId>
+ <version>0.5.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>mwtnTest-module</artifactId>
+ <name>${prefix} ${project.artifactId}</name>
+ <packaging>jar</packaging>
+</project> \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/images/mwtnTest.png b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/images/mwtnTest.png
new file mode 100755
index 00000000..bd00ceda
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/images/mwtnTest.png
Binary files differ
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/mwtnTest-custom.css b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/mwtnTest-custom.css
new file mode 100644
index 00000000..15c398c1
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/mwtnTest-custom.css
@@ -0,0 +1,24 @@
+/**
+ * Add your application related css here
+ */
+
+.json-formatter-row .constructor-name {
+ cursor: pointer;
+ color: #333333;
+}
+
+.json-formatter-row .toggler:after {
+ color: darkgreen;
+ font-weight: bold;
+ display: inline-block;
+ transition: transform .1s ease-in;
+ content: ">"
+}
+
+.owl span.key-text {
+ color: #333333;
+}
+
+.owl span.colon {
+ color: #333333;
+} \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/mwtnTest.controller.js b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/mwtnTest.controller.js
new file mode 100644
index 00000000..e873f19c
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/mwtnTest.controller.js
@@ -0,0 +1,477 @@
+/*
+ * @copyright 2017 highstreet technologies GmbH and others. All rights reserved.
+ *
+ * @license
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+define(['app/mwtnTest/mwtnTest.module',
+ 'app/mwtnTest/mwtnTest.services'],
+ function(mwtnTestApp) {
+
+ mwtnTestApp.register.controller('mwtnTestCtrl', ['$scope', '$rootScope', '$mwtnLog', '$mwtnTest', '$translate', 'OnfNetworkElement', 'LogicalTerminationPoint',
+ function($scope, $rootScope, $mwtnLog, $mwtnTest, $translate, OnfNetworkElement, LogicalTerminationPoint) {
+
+ var COMPONENT = 'mwtnTestCtrl';
+ $mwtnLog.info({component: COMPONENT, message: 'mwtnTestCtrl started!'});
+ $rootScope.section_logo = 'src/app/mwtnTest/images/mwtnTest.png'; // Add your topbar logo location here such as 'assets/images/logo_topology.gif'
+
+ var pacTemplate = {
+ 'layer-protocol': 'unknown'
+ };
+
+ // get important infromation from yang modules
+ $mwtnTest.getModules().then(function(success){
+
+ var pacOrder = {
+ 'onf-otn-odu-conditional-packages:otn-odu-connection-pac' : 2,
+ 'onf-otn-odu-conditional-packages:otn-odu-termination-pac' : 1,
+ 'onf-ethernet-conditional-packages:ethernet-pac' : 1,
+ 'microwave-model:mw-air-interface-diversity-pac' : 1,
+ 'microwave-model:mw-air-interface-hsb-end-point-pac' : 1,
+ 'microwave-model:mw-air-interface-hsb-fc-switch-pac' : 2,
+ 'onf-core-model-conditional-packages:holder-pac' : 3,
+ 'onf-core-model-conditional-packages:connector-pac' : 4,
+ 'onf-core-model-conditional-packages:equipment-pac' : 5,
+ 'microwave-model:mw-ethernet-container-pac' : 6,
+ 'MicrowaveModel-ObjectClasses-EthernetContainer:MW_EthernetContainer_Pac' : 7,
+ 'microwave-model:mw-ethernet-container-pac' : 8,
+ 'microwave-model:mw-tdm-container-pac': 9,
+ 'microwave-model:mw-pure-ethernet-structure-pac': 10,
+ 'microwave-model:mw-hybrid-mw-structure-pac': 11,
+ 'MicrowaveModel-ObjectClasses-PureEthernetStructure:MW_PureEthernetStructure_Pac' : 12,
+ 'microwave-model:mw-air-interface-pac' : 13,
+ 'MicrowaveModel-ObjectClasses-AirInterface:MW_AirInterface_Pac' : 14
+ };
+
+ $scope.modules = success;
+ $scope.orderedPacs = [];
+ $scope.parts = [];
+ Object.keys(success).map(function(module){
+ Object.keys(success[module]).filter(function(key){
+ return key.endsWith('-pac') || key.endsWith('_Pac');
+ }).map(function(pacName){
+ $scope.orderedPacs.push([module, pacName].join(':'));
+ // sort
+ $scope.orderedPacs.sort(function(a, b) {
+ if (!pacOrder[a]) console.warn(a);
+ if (!pacOrder[b]) console.warn(b);
+ if(pacOrder[a] > pacOrder[b]) return 1;
+ if(pacOrder[a] < pacOrder[b]) return -1;
+ return 0;
+ })
+
+ if (pacName === 'mw-air-interface-pac') {
+ $scope.parts = Object.keys(success[module][pacName]).filter(function(conditionalPackage){
+ return success[module][pacName][conditionalPackage]['local-name'];
+ }).map(function(conditionalPackage){
+ return success[module][pacName][conditionalPackage]['local-name'];
+ });
+ }
+ });
+ });
+ }, function(error){
+ $scope.modules = undefined;
+ $scope.orderedPacs = undefined;
+ $scope.parts = undefined;
+ });
+
+ /**
+ * @function updateNe
+ * A function, which updates onfNetworkElement by new data.
+ * @param {*} data New data recieved from OpenDaylight via RestConf
+ */
+ var updateNe = function(data) {
+ if (!data) return;
+ // update onfNetworkElement
+ switch ($scope.revision) {
+ case '2016-03-23':
+ $scope.onfNetworkElement = JSON.parse(JSON.stringify(data['network-element'][0]));
+ $scope.onfLtps = data['network-element'][0].ltp;
+ $scope.onfNetworkElement.ltp = undefined;
+ break;
+ case '2016-08-09':
+ case '2016-08-11':
+ case '2017-02-17':
+ case '2017-03-20':
+ // console.log(JSON.stringify(data));
+ $scope.onfNetworkElement = new OnfNetworkElement(data['network-element']);
+ $scope.onfLtps = $scope.onfNetworkElement.getLogicalTerminationPoints();
+ // $scope.onfNetworkElement.ltp = undefined;
+ break;
+ default:
+ $mwtnLog.info({component: COMPONENT, message: ['The ONF CoreModel revision', $scope.mountpoint.onfCoreModelRevision, ' is not supported (yet)!'].join(' ')});
+ $scope.onfNetworkElement = {};
+ $scope.onfLtps = {};
+ }
+
+ var order = $mwtnTest.layerProtocolNameOrder;
+ // update onfLTPs
+ $scope.onfLtps.sort(function(a, b){
+ if(order[a.getLayer()] < order[b.getLayer()]) return -1;
+ if(order[a.getLayer()] > order[b.getLayer()]) return 1;
+ if(a.getId() < b.getId()) return -1;
+ if(a.getId() > b.getId()) return 1;
+ return 0;
+ });
+
+ // calculate conditional packages
+ $scope.pacs = {};
+ $scope.onfLtps.map(function(ltp) {
+ ltp.getLayerProtocols().map(
+ /**
+ * A function processing a layer-protocol object
+ * @param {LayerProtocol} lp A layer-protocol object
+ */
+ function(lp) {
+ var template = JSON.parse(JSON.stringify(pacTemplate));
+ template['layer-protocol'] = lp.getId();
+ var conditionalPackage = lp.getConditionalPackage(true);
+ // console.log(conditionalPackage);
+ if (conditionalPackage !== '') {
+ if ($scope.pacs[conditionalPackage] === undefined) {
+ // create missing pac array
+ $scope.pacs[conditionalPackage] = [];
+ }
+ $scope.pacs[conditionalPackage].push(template);
+ } else {
+ $mwtnLog.info({component: COMPONENT, message: 'No conditional package for ' + ltp.getLabel() });
+ }
+ });
+ });
+
+ // sort the conditional packages
+ if ($scope.orderedPacs) {
+ $scope.orderedPacs.filter(function(item){
+ return $scope.pacs[item] !== undefined;
+ }).map(function(item){
+ $scope.pacs[item].sort(function(a, b){
+ if(a['layer-protocol'] < b['layer-protocol']) return -1;
+ if(a['layer-protocol'] > b['layer-protocol']) return 1;
+ return 0;
+ });
+ });
+ }
+ data.revision = undefined;
+ };
+
+ var updateNetworkElementCurrentProblems = function(data) {
+ if (!data) return;
+ $scope.neCurrentProblems = data;
+ };
+
+ var updateLtp = function(data) {
+ $scope.onfLtps.map(function(ltp){
+ if (ltp.getData().uuid === data.data.ltp[0].uuid) {
+ ltp = new LogicalTerminationPoint(data.data.ltp[0]);
+ }
+ });
+ };
+
+ /**
+ * @deprecated since all conditaional packages are handle the same way even for
+ * 3rd and 4th PoC model - 2nd PoC model not supported any more.
+ * @param {*} lpId
+ * @param {*} part
+ * @param {*} data
+ */
+ var updateAirInterface = function(lpId, part, data) {
+ // console.log(JSON.stringify(data), lpId);
+ $scope.airinterfaces.map(function(airinterface){
+ // console.log(JSON.stringify(airinterface));
+ if (airinterface['layer-protocol'] === lpId) {
+ if (Object.keys(data)[0].startsWith('air-interface')) {
+ airinterface[part] = data;
+ } else if (part === 'Capability') {
+ // 2. PoC
+ // console.log(part, JSON.stringify(data));
+ airinterface[part] = data['mw-air-interface-pac'][0]['air-interface-capability-list'];
+ } else if (part === 'CurrentProblems') {
+ // 2. PoC
+ // console.log(part, JSON.stringify(data));
+ airinterface[part] = data['mw-air-interface-pac'][0]['air-interface-current-problem-list'];
+ }
+ }
+ });
+ data.revision = undefined;
+ };
+
+ /**
+ * @deprecated since all conditaional packages are handle the same way even for
+ * 3rd and 4th PoC model - 2nd PoC model not supported any more.
+ * @param {*} lpId
+ * @param {*} part
+ * @param {*} data
+ */
+ var updateStructure = function(lpId, part, data) {
+ // console.log(JSON.stringify(data), lpId);
+ $scope.structures.map(function(structure){
+ // console.log(JSON.stringify(structure));
+ if (structure['layer-protocol'] === lpId) {
+ if (Object.keys(data)[0].contains('tructure')) {
+ structure[part] = data;
+ } else if (part === 'Capability') {
+ // 2. PoC
+ // console.log(part, JSON.stringify(data));
+ structure[part] = data['mw-structure-pac'][0]['structure.capability-list'];
+ } else if (part === 'CurrentProblems') {
+ // 2. PoC
+ // console.log(part, JSON.stringify(data));
+ structure[part] = data['mw-structure-pac'][0]['structure-current-problem-list'];
+ }
+ }
+ });
+ data.revision = undefined;
+ };
+
+ /**
+ * @deprecated since all conditaional packages are handle the same way even for
+ * 3rd and 4th PoC model - 2nd PoC model not supported any more.
+ * @param {*} lpId
+ * @param {*} part
+ * @param {*} data
+ */
+ var updateContainer = function(lpId, part, data) {
+ // console.log(JSON.stringify(data), lpId);
+ $scope.containers.map(function(container){
+ // console.log(JSON.stringify(container));
+ if (container['layer-protocol'] === lpId) {
+ if (Object.keys(data)[0].contains('ontainer') ) {
+ container[part] = data;
+ } else if (part === 'Capability') {
+ // 2. PoC
+ // console.log(part, JSON.stringify(data));
+ container[part] = data['mw-container-pac'][0]['container-capability-list'];
+ } else if (part === 'CurrentProblems') {
+ // 2. PoC
+ // console.log(part, JSON.stringify(data));
+ container[part] = data['mw-container-pac'][0]['container-current-problem-list'];
+ }
+ }
+ });
+ data.revision = undefined;
+ };
+
+ /**
+ * Creates a template of a conditional packages with its subclasses
+ * @param {{pacId: string, layerProtocolId: string, partId:string}} spec - Specification object of a conditional package subclass
+ */
+ var initPac = function(spec) {
+ $scope.pacs[spec.pacId].filter(function(conditionalPackage){
+ return conditionalPackage['layer-protocol'] === spec.layerProtocolId;
+ }).map(function(pac){
+ $scope.parts.map(function(localName){
+ pac[localName] = {id:$mwtnTest.getPartGlobalId(spec, localName),localName: localName, data:'No data available'}
+ });
+ });
+ };
+
+ /**
+ * Updates an existing template of a conditional packages with its subclasses
+ * @param {{pacId: string, layerProtocolId: string, partId:string}} spec - Specification object of a conditional package subclass
+ */
+ var updateSubClassData = function(spec, data) {
+ $scope.pacs[spec.pacId].filter(function(conditionalPackage){
+ return conditionalPackage['layer-protocol'] === spec.layerProtocolId;
+ }).map(function(conditionalPackage){
+ conditionalPackage[$mwtnTest.getPartLocalId(spec)].data = data[$mwtnTest.yangify(spec.partId)];
+ });
+ };
+
+ var updatePart = function(spec, data) {
+ switch (spec.pacId) {
+ case 'ne':
+ updateNe(data);
+ break;
+ case 'neCurrentProblems':
+ updateNetworkElementCurrentProblems(data);
+ case 'clock':
+ // console.warn('yea clock', JSON.stringify(data));
+ $scope.clock = data;
+ break;
+ case 'ltp':
+ updateLtp(data);
+ break;
+ case 'airinterface':
+ console.log(JSON.stringify(spec, JSON.stringify(data)));
+ updateAirInterface(spec.layerProtocolId, spec.partId, data);
+ break;
+ case 'structure':
+ console.log(JSON.stringify(data));
+ updateStructure(spec.layerProtocolId, spec.partId, data);
+ break;
+ case 'container':
+ console.log(JSON.stringify(data));
+ updateContainer(spec.layerProtocolId, spec.partId, data);
+ break;
+ // 3rd Poc
+ case 'MicrowaveModel-ObjectClasses-AirInterface:MW_AirInterface_Pac':
+ case 'MicrowaveModel-ObjectClasses-PureEthernetStructure:MW_PureEthernetStructure_Pac':
+ case 'MicrowaveModel-ObjectClasses-EthernetContainer:MW_EthernetContainer_Pac':
+ // 4th Poc
+ case 'microwave-model:mw-air-interface-pac':
+ case 'microwave-model:mw-air-interface-diversity-pac':
+ case 'microwave-model:mw-pure-ethernet-structure-pac':
+ case 'microwave-model:mw-hybrid-mw-structure-pac':
+ case 'microwave-model:mw-tdm-container-pac':
+ case 'microwave-model:mw-ethernet-container-pac':
+ case 'onf-ethernet-conditional-packages:ethernet-pac':
+ // Poc 4.1
+ case 'onf-otn-odu-conditional-packages:otn-odu-connection-pac':
+ case 'onf-otn-odu-conditional-packages:otn-odu-termination-pac':
+ if (!spec.partId) {
+ initPac(spec);
+ } else {
+ updateSubClassData(spec, data);
+ }
+ break;
+ }
+ };
+
+ // events
+ $scope.status = {ne:false};
+ $scope.spinner = {ne:false};
+ $scope.separator = $mwtnTest.separator; //'&nbsp;'
+
+ $scope.myClipboard = {
+ data : {'key': 'value'},
+ supported : true,
+ getJson : function() {
+ return JSON.stringify(this.data, null, ' ');
+ },
+ copyToClipboard : function() {
+ var message = 'Copied to clipboard! ' + this.getJson();
+ $mwtnLog.info({component: COMPONENT, message: message});
+ },
+ error : function(err) {
+ $mwtnLog.error({component: COMPONENT, message: err});
+ }
+ };
+
+ $scope.$watch('status', function(status, oldValue) {
+ Object.keys(status).filter(function(key){
+ return $scope.networkElementId && status[key] && status[key] !== oldValue[key];
+ }).map(function(key){
+ $scope.spinner[key] = true;
+ var info = key.split($scope.separator);
+ var spec = {
+ nodeId: $scope.networkElementId,
+ revision: $scope.revision,
+ pacId: info[0],
+ layerProtocolId: info[1],
+ partId: info[2]
+ };
+ $mwtnTest.getPacParts(spec).then(function(success){
+ success = $mwtnTest.yangifyObject(success)
+ $scope.myClipboard.data = success;
+ updatePart(spec, success);
+ $scope.spinner[key] = false;
+ }, function(error){
+ $scope.myClipboard.data = 'Opps!';
+ updatePart(spec, error);
+ $scope.spinner[key] = false;
+ });
+ $scope.mountpoint = $scope.mountPoints.filter(function(mountpoint){
+ return mountpoint['node-id'] === $scope.networkElementId;
+ })[0];
+ if (key === 'mountpoint') {
+ $scope.spinner['mountpoint'] = false;
+ $scope.myClipboard.data = $scope.mountpoint;
+ }
+ });
+ }, true);
+
+ // var spec = {
+ // nodeId: $scope.networkElementId,
+ // revision: $scope.revision,
+ // pacId: 'clock'
+ // };
+ // $mwtnTest.getPacParts(spec).then(function(success){
+ // $scope.collapseAll();
+ // updatePart(spec, $mwtnTest.yangifyObject(success));
+ // }, function(error){
+ // $scope.collapseAll();
+ // updatePart(spec, error);
+ // });
+
+
+ $scope.collapseAll = function() {
+ // close all groups
+ Object.keys($scope.status).map(function(group){
+ $scope.status[group] = false;
+ });
+ Object.keys($scope.spinner).map(function(group){
+ $scope.spinner[group] = false;
+ });
+ };
+
+ $scope.$watch('networkElement', function(neId, oldValue) {
+ if (neId && neId !== '' && neId !== oldValue) {
+
+ // clear old data
+ $scope.airinterfaces = [];
+ $scope.structures = [];
+ $scope.containers = [];
+ $scope.onfLtps = [];
+ $scope.clock = undefined;
+
+ $scope.networkElementId = neId;
+ $scope.revision = $scope.mountPoints.filter(function(mountpoint){
+ return mountpoint['node-id'] === neId;
+ }).map(function(mountpoint){
+ return mountpoint.onfCoreModelRevision;
+ })[0];
+
+ // network element alarms
+ var neAlarms = $scope.mountPoints.filter(function(mountpoint){
+ return mountpoint['node-id'] === neId;
+ }).map(function(mountpoint){
+ return mountpoint.onfCapabilities.filter(function(cap){
+ return cap.module === 'MicrowaveModel-NetworkElement-CurrentProblemList' || cap.module === 'onf-core-model-conditional-packages';
+ });
+ });
+ if (neAlarms.length === 1 && neAlarms[0].length === 1 ) {
+ $translate('MWTN_LOADING').then(function (translation) {
+ $scope.neCurrentProblems = translation;
+ });
+ } else {
+ $scope.neCurrentProblems = undefined;
+ }
+
+ var spec = {
+ nodeId: $scope.networkElementId,
+ revision: $scope.revision,
+ pacId: 'ne'
+ };
+ $mwtnTest.getPacParts(spec).then(function(success){
+ $scope.collapseAll();
+ updatePart(spec, $mwtnTest.yangifyObject(success));
+ }, function(error){
+ $scope.collapseAll();
+ updatePart(spec, error);
+ });
+
+ // ptp-clock
+ var ptpClock = $scope.mountPoints.filter(function(mountpoint){
+ return mountpoint['node-id'] === neId;
+ }).map(function(mountpoint){
+ return mountpoint.onfCapabilities.filter(function(cap){
+ return cap.module === 'onf-ptp-dataset';
+ });
+ });
+ if (ptpClock.length === 1 && ptpClock[0].length === 1 ) {
+ $translate('MWTN_LOADING').then(function (translation) {
+ $scope.clock = translation;
+ });
+ } else {
+ $scope.clock = undefined;
+ }
+
+ }
+ });
+
+ }]);
+
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/mwtnTest.module.js b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/mwtnTest.module.js
new file mode 100644
index 00000000..b2f0a8fd
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/mwtnTest.module.js
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2016 highstreet technologies GmbH and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+define(['angularAMD',
+ 'app/routingConfig',
+ 'app/core/core.services',
+ 'common/config/env.module',
+ 'app/mwtnCommons/mwtnCommons.module',
+ 'app/mwtnCommons/bower_components/angular-clipboard/angular-clipboard'], function(ng) {
+ var mwtnTestApp = angular.module('app.mwtnTest', ['ui.grid', 'ui.bootstrap', 'app.core', 'ui.router.state', 'config', 'angular-clipboard']);
+
+ mwtnTestApp.config(function($stateProvider, $compileProvider, $controllerProvider, $provide, NavHelperProvider, $translateProvider) {
+ mwtnTestApp.register = {
+ controller : $controllerProvider.register,
+ directive : $compileProvider.directive,
+ factory : $provide.factory,
+ service : $provide.service
+ };
+
+ NavHelperProvider.addControllerUrl('app/mwtnTest/mwtnTest.controller');
+ NavHelperProvider.addToMenu('mwtnTest', {
+ "link" : "#/mwtnTest/",
+ "active" : "main.mwtnTest",
+ "title" : "LTE RAN Test",
+ "icon" : "fa fa-check-square-o", // Add navigation icon css class here
+ "page" : {
+ "title" : "LTE RAN Test",
+ "description" : "mwtnTest"
+ }
+ });
+
+ var access = routingConfig.accessLevels;
+
+ $stateProvider.state('main.mwtnTest', {
+ url: 'mwtnTest/:nodeId',
+ access: access.admin,
+ views : {
+ content : {
+ templateUrl: 'src/app/mwtnTest/templates/frame.tpl.html',
+ controller: 'mwtnTestCtrl'
+ }
+ }
+ });
+
+ });
+
+ return mwtnTestApp;
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/mwtnTest.services.js b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/mwtnTest.services.js
new file mode 100644
index 00000000..b61ca531
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/mwtnTest.services.js
@@ -0,0 +1,32 @@
+/*
+ * @copyright 2017 highstreet technologies and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+define(['app/mwtnCommons/mwtnCommons.module', 'app/mwtnTest/mwtnTest.module'],function(mwtnTestApp) {
+
+ mwtnTestApp.register.factory('$mwtnTest', function($mwtnCommons, $mwtnDatabase, $mwtnLog) {
+
+ var COMPONENT = '$mwtnTest';
+ $mwtnLog.info({component: COMPONENT, message: '$mwtnTest started!'});
+
+ var service = {};
+
+ service.parts = $mwtnCommons.parts;
+ service.getPacParts = $mwtnCommons.getPacParts;
+ service.getModules = $mwtnDatabase.getModules;
+ service.getPartGlobalId = $mwtnCommons.getPartGlobalId;
+ service.getPartLocalId = $mwtnCommons.getPartLocalId;
+ service.layerProtocolNameOrder = $mwtnCommons.layerProtocolNameOrder;
+
+ service.separator = $mwtnCommons.separator;
+ service.yangify = $mwtnCommons.yangify;
+ service.yangifyObject = $mwtnCommons.yangifyObject;
+
+ return service;
+ });
+
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/templates/frame.tpl.html b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/templates/frame.tpl.html
new file mode 100644
index 00000000..6a341d20
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnTest/mwtnTest-module/src/main/resources/mwtnTest/templates/frame.tpl.html
@@ -0,0 +1,172 @@
+<ht-header help-link='sdnr/mwtnTest/0.4.0/README.md'></ht-header>
+<mwtn-select-network-element></mwtn-select-network-element>
+
+
+<div class="owl container" ng-show="networkElements.lenght !== 0">
+ <div class="row">
+
+ <uib-accordion close-others="oneAtATime">
+
+ <div uib-accordion-group class="panel-primary"
+ is-open="status.ne">
+ <uib-accordion-heading>
+ <i class="pull-left fa" ng-class="{'fa-chevron-down': status.ne, 'fa-chevron-right': !status.ne}"></i>
+ <span>{{'MWTN_NETWORKELEMENT' | translate}} '{{onfNetworkElement.getName()}}'</span>
+ <i class="pull-right fa fa-spinner fa-pulse" ng-show="spinner.ne"></i>
+ </uib-accordion-heading>
+
+ <button class="pull-right btn btn-default" type="button"
+ clipboard
+ supported="myClipboard.supported"
+ text="myClipboard.getJson()"
+ on-copied="myClipboard.copyToClipboard()"
+ on-error="myClipboard.error(err)">
+ <i class="fa fa-clipboard" aria-hidden="true"></i>
+ </button>
+
+ <json-formatter json="onfNetworkElement.data" open="1"></json-formatter>
+ </div>
+
+ <div uib-accordion-group class="panel-default"
+ is-open="status.mountpoint">
+ <uib-accordion-heading>
+ <i class="pull-left fa" ng-class="{'fa-chevron-down': status.mountpoint, 'fa-chevron-right': !status.mountpoint}"></i>
+ <span>{{'MWTN_MOUNTPOINT' | translate}}</span>
+ <i class="pull-right fa fa-spinner fa-pulse" ng-show="spinner.mountpoint"></i>
+ </uib-accordion-heading>
+
+ <button class="pull-right btn btn-default" type="button"
+ clipboard
+ supported="myClipboard.supported"
+ text="myClipboard.getJson()"
+ on-copied="myClipboard.copyToClipboard()"
+ on-error="myClipboard.error(err)">
+ <i class="fa fa-clipboard" aria-hidden="true"></i>
+ </button>
+
+ <json-formatter json="mountpoint" open="1"></json-formatter>
+ </div>
+
+ <div uib-accordion-group class="panel-default"
+ is-open="status.clock" ng-show="clock">
+ <uib-accordion-heading>
+ <i class="pull-left fa" ng-class="{'fa-chevron-down': status.clock, 'fa-chevron-right': !status.clock}"></i>
+ <span>{{'MWTN_CLOCK' | translate}}</span>
+ <i class="pull-right fa fa-spinner fa-pulse" ng-show="spinner.clock"></i>
+ </uib-accordion-heading>
+
+ <button class="pull-right btn btn-default" type="button"
+ clipboard
+ supported="myClipboard.supported"
+ text="myClipboard.getJson()"
+ on-copied="myClipboard.copyToClipboard()"
+ on-error="myClipboard.error(err)">
+ <i class="fa fa-clipboard" aria-hidden="true"></i>
+ </button>
+
+ <json-formatter json="clock" open="1"></json-formatter>
+ </div>
+
+ <div uib-accordion-group class="panel-default"
+ is-open="status.neCurrentProblems" ng-show="neCurrentProblems">
+ <uib-accordion-heading>
+ <i class="pull-left fa" ng-class="{'fa-chevron-down': status.neCurrentProblems, 'fa-chevron-right': !status.neCurrentProblems}"></i>
+ <span>{{'MWTN_CURRENT_PROBLEM_LIST' | translate}}</span>
+ <i class="pull-right fa fa-spinner fa-pulse" ng-show="spinner.neCurrentProblems"></i>
+ </uib-accordion-heading>
+
+ <button class="pull-right btn btn-default" type="button"
+ clipboard
+ supported="myClipboard.supported"
+ text="myClipboard.getJson()"
+ on-copied="myClipboard.copyToClipboard()"
+ on-error="myClipboard.error(err)">
+ <i class="fa fa-clipboard" aria-hidden="true"></i>
+ </button>
+
+ <json-formatter json="neCurrentProblems" open="1"></json-formatter>
+ </div>
+
+ <div ng-repeat="ltp in onfLtps"
+ uib-accordion-group
+ class="panel-default"
+ is-open="status['ltp' + separator + ltp.getData().uuid]">
+ <uib-accordion-heading>
+ <i class="pull-left fa" ng-class="{'fa-chevron-down': status['ltp' + separator + ltp.getData().uuid], 'fa-chevron-right': !status['ltp' + separator + ltp.getData().uuid]}"></i>
+ <span>{{'MWTN_LTP' | translate}}(</span>
+ <b>{{ltp.getLayerProtocols()[0].getItuLabel().toUpperCase()}}</b>
+ <span>): {{ltp.getId()}}</span>
+ </uib-accordion-heading>
+
+ <button class="pull-right btn btn-default" type="button"
+ clipboard
+ supported="myClipboard.supported"
+ text="myClipboard.getJson()"
+ on-copied="myClipboard.copyToClipboard()"
+ on-error="myClipboard.error(err)">
+ <i class="fa fa-clipboard" aria-hidden="true"></i>
+ </button>
+
+ <span>{{'MWTN_ID' | translate}}</span> <b>{{ltp.getId()}}</b><br/>
+ <span>{{'MWTN_DIRECTIONALITY' | translate}}</span> <b>{{ltp.getDirectionality()}}</b><br/>
+ <span>{{'MWTN_SERVER_LTPS' | translate}}</span> <b>{{ltp.getServerLtps()}}</b><br/>
+ <span>{{'MWTN_CLIENT_LTPS' | translate}}</span> <b>{{ltp.getClientLtps()}}</b><br/><br/>
+
+ <div ng-repeat="lp in ltp.getLayerProtocols()">
+ <b>{{'MWTN_LAYER_PROTOCOL' | translate}}</b><br/>
+ <span>{{'MWTN_ID' | translate}}</span> <b>{{lp.getId()}}</b><br/>
+ <span>{{'MWTN_LAYER' | translate}}</span> <b>{{lp.getLayer()}}</b><br/>
+ <span>{{'MWTN_TERMINATION_STATE' | translate}}</span> <b>{{lp.getTerminationState()}}</b><br/>
+ <span>{{'MWTN_LABEL' | translate}}</span> <b>{{lp.getItuLabel().toUpperCase()}}</b><br/>
+ <span>{{'MWTN_CAPABILITY' | translate}}</span> <b>{{lp.getCapability()}}</b><br/>
+ <span>{{'MWTN_REVISON' | translate}}</span> <b>{{lp.getRevision()}}</b><br/>
+ <span>{{'MWTN_CONDITIONAL_PACKAGE' | translate}}</span> <b>{{lp.getConditionalPackage()}}</b><br/><br/>
+ <!-- <pre>{{lp.getData() | json}}</pre> -->
+ </div>
+ <json-formatter json="ltp.getData()" open="1"></json-formatter>
+ </div>
+
+ </uib-accordion>
+ </div>
+
+ <div ng-repeat="orderedPac in orderedPacs" class="row" style="margin-top: 5px" ng-show="pacs[orderedPac]">
+ <uib-accordion close-others="oneAtATime">
+ <div ng-repeat="pac in pacs[orderedPac]"
+ uib-accordion-group
+ class="panel-primary"
+ is-open="status[ [orderedPac, pac['layer-protocol']].join(separator) ]">
+ <uib-accordion-heading>
+ <i class="pull-left fa" ng-class="{'fa-chevron-down': status[ [orderedPac, pac['layer-protocol']].join(separator) ], 'fa-chevron-right': !status[ [orderedPac, pac['layer-protocol']].join(separator) ]}"></i>
+ <span>{{ 'MWTN_' + orderedPac.toUpperCase().replaceAll('-', '_') | translate }} '{{pac['layer-protocol']}}'</span>
+ </uib-accordion-heading>
+
+ <div ng-repeat="part in parts"
+ uib-accordion-group
+ class="panel-default"
+ is-open="status[ [orderedPac, pac['layer-protocol'], pac[part].id].join(separator) ]">
+ <uib-accordion-heading>
+ <i class="pull-left fa" ng-class="{'fa-chevron-down': status[ [orderedPac, pac['layer-protocol'], pac[part].id].join(separator) ], 'fa-chevron-right': !status[ [orderedPac, pac['layer-protocol'], pac[part].id].join(separator) ]}"></i>
+ <span>{{part}}</span>
+ <i class="pull-right fa fa-spinner fa-pulse" ng-show="spinner[ [orderedPac, pac['layer-protocol'], pac[part].id].join(separator) ]"></i>
+ </uib-accordion-heading>
+
+ <button class="pull-right btn btn-default" type="button"
+ clipboard
+ supported="myClipboard.supported"
+ text="myClipboard.getJson()"
+ on-copied="myClipboard.copyToClipboard()"
+ on-error="myClipboard.error(err)">
+ <i class="fa fa-clipboard" aria-hidden="true"></i>
+ </button>
+
+ <json-formatter json="pac[part].data" open="1"></json-formatter>
+ </div>
+ </div>
+
+ </uib-accordion>
+ </div>
+</div>
+<hr />
+<div class="owl">
+ <span>ONAP SDN-R | ONF Wireless for @distversion@ - Build: @buildtime@</span>
+</div> \ No newline at end of file