summaryrefslogtreecommitdiffstats
path: root/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum')
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-bundle/pom.xml119
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml19
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/pom.xml15
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/images/bluelight.gifbin0 -> 61554 bytes
-rwxr-xr-xsdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/images/mwtnSpectrum.pngbin0 -> 3229 bytes
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/mwtnSpectrum-custom.css45
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/mwtnSpectrum.controller.js135
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/mwtnSpectrum.module.js54
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/mwtnSpectrum.services.js90
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/mwtnSpectrum.tpl.html64
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/pom.xml24
11 files changed, 565 insertions, 0 deletions
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-bundle/pom.xml b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-bundle/pom.xml
new file mode 100644
index 00000000..7a50612c
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-bundle/pom.xml
@@ -0,0 +1,119 @@
+<?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>mwtnSpectrum</artifactId>
+ <groupId>cn.com.zte.odl.dlux</groupId>
+ <version>0.5.1-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <artifactId>mwtnSpectrum-bundle</artifactId>
+ <name>${prefix} ${project.artifactId}</name>
+ <packaging>bundle</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <version>${osgi.core.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.compendium</artifactId>
+ <version>${osgi.core.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.osgi.compendium</artifactId>
+ <version>${apache.felix.compendium}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.dlux</groupId>
+ <artifactId>loader</artifactId>
+ <version>${dlux.loader.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>cn.com.zte.odl.dlux</groupId>
+ <artifactId>mwtnSpectrum-module</artifactId>
+ <version>0.5.1-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <resources>
+ <resource>
+ <directory>target/generated-resources</directory>
+ </resource>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <!--loader Resources -->
+ <execution>
+ <id>unpack-loader-resources</id>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <phase>generate-resources</phase>
+ <configuration>
+ <outputDirectory>${project.build.directory}/generated-resources</outputDirectory>
+ <groupId>cn.com.zte.odl.dlux</groupId>
+ <includeArtifactIds>mwtnSpectrum-module</includeArtifactIds>
+ <excludes>META-INF\/**</excludes>
+ <excludeTransitive>true</excludeTransitive>
+ <ignorePermissions>false</ignorePermissions>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Import-Package>org.osgi.service.http,
+ org.osgi.framework;version="1.0.0",
+ org.opendaylight.dlux.loader
+ </Import-Package>
+ <Export-Package></Export-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+
+ <!-- <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>3.0.1</version>
+ <executions>
+ <execution>
+ <id>copy-resources</id>
+ <!- - here the phase you need - ->
+ <phase>package</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>../../deploy</outputDirectory>
+ <resources>
+ <resource>
+ <directory>target</directory>
+ <includes>
+ <include>${project.artifactId}-${project.version}.jar</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin> -->
+
+ </plugins>
+ </build>
+</project>
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml
new file mode 100644
index 00000000..51ddc024
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -0,0 +1,19 @@
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+ <reference id="httpService" availability="mandatory" activation="eager" interface="org.osgi.service.http.HttpService"/>
+ <reference id="loader" availability="mandatory" activation="eager" interface="org.opendaylight.dlux.loader.DluxModuleLoader"/>
+
+ <bean id="bundle" init-method="initialize" destroy-method="clean" class="org.opendaylight.dlux.loader.DluxModule">
+ <property name="httpService" ref="httpService"/>
+ <property name="loader" ref="loader"/>
+ <property name="moduleName" value="mwtnSpectrum"/>
+ <property name="url" value="/src/app/mwtnSpectrum"/>
+ <property name="directory" value="/mwtnSpectrum"/>
+ <property name="requireJs" value="app/mwtnSpectrum/mwtnSpectrum.module"/>
+ <property name="angularJs" value="app.mwtnSpectrum"/>
+ <property name="cssDependencies">
+ <list>
+ <value>src/app/mwtnSpectrum/mwtnSpectrum-custom.css</value>
+ </list>
+ </property>
+ </bean>
+</blueprint> \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/pom.xml b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/pom.xml
new file mode 100644
index 00000000..ca8ef939
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/pom.xml
@@ -0,0 +1,15 @@
+<?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>mwtnSpectrum</artifactId>
+ <groupId>cn.com.zte.odl.dlux</groupId>
+ <version>0.5.1-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <artifactId>mwtnSpectrum-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/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/images/bluelight.gif b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/images/bluelight.gif
new file mode 100644
index 00000000..33de2178
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/images/bluelight.gif
Binary files differ
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/images/mwtnSpectrum.png b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/images/mwtnSpectrum.png
new file mode 100755
index 00000000..23956335
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/images/mwtnSpectrum.png
Binary files differ
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/mwtnSpectrum-custom.css b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/mwtnSpectrum-custom.css
new file mode 100644
index 00000000..df461795
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/mwtnSpectrum-custom.css
@@ -0,0 +1,45 @@
+/**
+ * Add your application related css here
+ */
+
+.alarm div {
+ height: 160px;
+ vertical-align: middle;
+}
+
+.cleared {
+ color: lightgreen;
+}
+.cleared span {
+ color: lightgreen;
+}
+
+.raised {
+ color: red;
+}
+.raised span {
+ color: red;
+}
+
+.mwtnSpectrumGrid {
+ height: 600px;
+ background-color: white;
+}
+
+.mwtnSpectrumGrid span {
+ color: #393939;
+}
+
+.mwtnSpectrumGrid span.mismatch {
+ font-weight: bold;
+ color: #428bca;
+}
+
+.mwtnSpectrumGrid .green {
+ color: darkgreen;
+}
+.mwtnSpectrumGrid .green span {
+ color: darkgreen;
+}
+
+ \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/mwtnSpectrum.controller.js b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/mwtnSpectrum.controller.js
new file mode 100644
index 00000000..f2433853
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/mwtnSpectrum.controller.js
@@ -0,0 +1,135 @@
+/*
+ * 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(['app/mwtnSpectrum/mwtnSpectrum.module',
+ 'app/mwtnSpectrum/mwtnSpectrum.services',
+ 'app/mwtnCommons/mwtnCommons.services'], function(mwtnSpectrumApp) {
+
+ mwtnSpectrumApp.register.controller('mwtnSpectrumCtrl', ['$scope', '$rootScope', 'uiGridConstants','$mwtnSpectrum', '$mwtnLog', 'OnfNetworkElement', 'MicrowavePhysicalSection',
+ function($scope, $rootScope, uiGridConstants, $mwtnSpectrum, $mwtnLog, OnfNetworkElement, MicrowavePhysicalSection) {
+
+ var COMPONENT = 'mwtnSpectrumCtrl';
+ $mwtnLog.info({component: COMPONENT, message: 'mwtnSpectrumCtrl started!'});
+
+ $rootScope.section_logo = 'src/app/mwtnSpectrum/images/mwtnSpectrum.png'; // Add your topbar logo location here such as 'assets/images/logo_topology.gif'
+
+ $scope.interference = {
+ alarmStatus: 'cleared'
+ };
+
+ $scope.execute = function() {
+ $scope.interference.alarmStatus = 'raised';
+ $mwtnSpectrum.execute().then(function(success) {
+ $scope.interference.alarmStatus = 'cleared';
+ }, function(error) {
+ $scope.interference.alarmStatus = 'cleared';
+ });
+ };
+ $scope.clear = function() {
+ console.log("Cleared");
+ $scope.interference.alarmStatus = 'cleared';
+ };
+
+ var updateAirInterface = function(spec, data) {
+ if (data) {
+ var radioSignalID = data.airInterfaceConfiguration.radioSignalID;
+ $scope.gridOptions.data.map(function(row){
+ if (row.name === spec.nodeId && row.radioSignalID === radioSignalID) {
+ row.actualTxFrequency = data.airInterfaceConfiguration.txFrequency;
+ row.actualRxFrequency = data.airInterfaceConfiguration.rxFrequency;
+ }
+ });
+ } else {
+ $scope.gridOptions.data.map(function(row){
+ if (row.nodeId === spec.nodeId) {
+ row.actualTxFrequency = '?';
+ row.actualRxFrequency = '?';
+ }
+ });
+ }
+ };
+
+ $scope.processing = false;
+ $scope.refresh = function() {
+ $scope.processing = true;
+ $scope.interference.alarmStatus = 'cleared';
+ $mwtnSpectrum.refresh().then(function(success){
+ $scope.processing = false;
+ $scope.gridOptions.data = success.airInterfaces;
+ success.actualNodes.map(function(actualNode){
+ if (actualNode.connectionStatus !== 'connected') {
+ return;
+ }
+ var revision = '2016-09-01';
+ $mwtnSpectrum.getActualNetworkElement(actualNode.id, revision).then(function(onfNe){
+ var aOnfNe = new OnfNetworkElement(onfNe.NetworkElement);
+ aOnfNe.getLTPMwpsList().map(function(ltp){
+ var spec = {
+ nodeId: actualNode.id,
+ revision: revision,
+ pacId: 'airinterface',
+ layerProtocolId: ltp._lpList[0].uuid,
+ partId: 'Configuration'
+ };
+ $mwtnSpectrum.getPacParts(spec).then(function(success){
+ updateAirInterface(spec, success);
+ }, function(error){
+ updateAirInterface(spec, error);
+ });
+ });
+ }, function(error){
+ // do nothing
+ });
+ });
+ }, function(error){
+ $scope.processing = false;
+ $scope.gridOptions.data = [];
+ });
+ };
+
+ $scope.highlightFilteredHeader = $mwtnSpectrum.highlightFilteredHeader;
+
+ var requiredNesConnectionStatusCellTemplate = [
+ '<div class="ui-grid-cell-contents" ng-class="{ \'green\': grid.getCellValue(row, col) === \'connected\'}"}>',
+ ' <i ng-show="grid.getCellValue(row, col) === \'connected\'" class="fa fa-link" aria-hidden="true"></i>',
+ ' <span>{{grid.getCellValue(row, col)}}</span>',
+ '</div>'].join('');
+
+ var actualTxFrequencyCellTemplate = [
+ '<div class="ui-grid-cell-contents" ng-class="{ \'green\': grid.getCellValue(row, col) === \'connected\'}"}>',
+ ' <span ng-class="{\'mismatch\': {{row.entity.plannedTxFrequency}} !== grid.getCellValue(row, col) }">{{grid.getCellValue(row, col)}}</span>',
+ '</div>'].join('');
+
+ var actualRxFrequencyCellTemplate = [
+ '<div class="ui-grid-cell-contents" ng-class="{ \'green\': grid.getCellValue(row, col) === \'connected\'}"}>',
+ ' <span ng-class="{\'mismatch\': {{row.entity.plannedRxFrequency}} !== grid.getCellValue(row, col) }">{{grid.getCellValue(row, col)}}</span>',
+ '</div>'].join('');
+
+ $scope.gridOptions = JSON.parse(JSON.stringify($mwtnSpectrum.gridOptions));
+ $scope.gridOptions.columnDefs = [
+ { field: 'id', type: 'number', displayName: 'Id', headerCellClass: $scope.highlightFilteredHeader, width : 50, cellClass: 'number', pinnedLeft : true , sort: {
+ direction: uiGridConstants.ASC,
+ ignoreSort: false,
+ priority: 0
+ }},
+ { field: 'name', type: 'string', displayName: 'Name', headerCellClass: $scope.highlightFilteredHeader, width : 140 },
+ { field: 'connectionStatus', type: 'string', displayName: 'Connection status', headerCellClass: $scope.highlightFilteredHeader, width : 150, cellTemplate: requiredNesConnectionStatusCellTemplate },
+ { field: 'airInterfaceName', type: 'string', displayName: 'Airinterface name', headerCellClass: $scope.highlightFilteredHeader, width : 140 },
+ { field: 'radioSignalID', type: 'string', displayName: 'Radio signal id', headerCellClass: $scope.highlightFilteredHeader, width : 130 },
+ { field: 'plannedTxFrequency', type: 'number', displayName: 'TX (plan)', headerCellClass: $scope.highlightFilteredHeader, width : 110, cellClass: 'number' },
+ { field: 'actualTxFrequency', type: 'number', displayName: 'TX (actual)', headerCellClass: $scope.highlightFilteredHeader, width : 110, cellClass: 'number', cellTemplate: actualTxFrequencyCellTemplate},
+ { field: 'plannedRxFrequency', type: 'number', displayName: 'RX (plan)', headerCellClass: $scope.highlightFilteredHeader, width : 110, cellClass: 'number' },
+ { field: 'actualRxFrequency', type: 'number', displayName: 'RX (actual)', headerCellClass: $scope.highlightFilteredHeader, width : 110, cellClass: 'number', cellTemplate: actualRxFrequencyCellTemplate}
+ ];
+
+ $scope.refresh();
+
+ }]);
+
+
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/mwtnSpectrum.module.js b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/mwtnSpectrum.module.js
new file mode 100644
index 00000000..238f3ad3
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/mwtnSpectrum.module.js
@@ -0,0 +1,54 @@
+/*
+ * 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'], function(ng) {
+ var mwtnSpectrumApp = angular.module('app.mwtnSpectrum', ['ui.grid', 'ui.bootstrap', 'app.core', 'ui.router.state','config']);
+
+ mwtnSpectrumApp.config(function($stateProvider, $compileProvider, $controllerProvider, $provide, NavHelperProvider, $translateProvider) {
+ mwtnSpectrumApp.register = {
+ controller : $controllerProvider.register,
+ directive : $compileProvider.directive,
+ factory : $provide.factory,
+ service : $provide.service
+
+ };
+
+
+ NavHelperProvider.addControllerUrl('app/mwtnSpectrum/mwtnSpectrum.controller');
+ NavHelperProvider.addToMenu('mwtnSpectrum', {
+ "link" : "#/mwtnSpectrum",
+ "active" : "main.mwtnSpectrum",
+ "title" : "MWTN Spectrum",
+ "icon" : "fa fa-bar-chart", // Add navigation icon css class here
+ "page" : {
+ "title" : "MWTN Spectrum",
+ "description" : "mwtnSpectrum"
+ }
+ });
+
+ var access = routingConfig.accessLevels;
+
+ $stateProvider.state('main.mwtnSpectrum', {
+ url: 'mwtnSpectrum',
+ access: access.admin,
+ views : {
+ 'content' : {
+ templateUrl: 'src/app/mwtnSpectrum/mwtnSpectrum.tpl.html',
+ controller: 'mwtnSpectrumCtrl'
+ }
+ }
+ });
+
+ });
+
+ return mwtnSpectrumApp;
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/mwtnSpectrum.services.js b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/mwtnSpectrum.services.js
new file mode 100644
index 00000000..df822a9b
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/mwtnSpectrum.services.js
@@ -0,0 +1,90 @@
+/*
+ * 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(['app/mwtnSpectrum/mwtnSpectrum.module'],function(mwtnSpectrumApp) {
+
+
+ mwtnSpectrumApp.register.factory('$mwtnSpectrum', function($q, $mwtnCommons, $mwtnLog) {
+ var service = {};
+
+ service.gridOptions = $mwtnCommons.gridOptions;
+ service.highlightFilteredHeader = $mwtnCommons.highlightFilteredHeader;
+ service.getActualNetworkElement = $mwtnCommons.getActualNetworkElement;
+ service.getPacParts = $mwtnCommons.getPacParts;
+
+
+ service.execute = function() {
+ var request = {
+ method: 'POST',
+ url: 'operations/scheduler:next'
+ };
+ var deferred = $q.defer();
+ $mwtnCommons.genericRequest(request).then(function(success) {
+ deferred.resolve(success);
+ }, function(error) {
+ deferred.reject(error);
+ });
+ return deferred.promise;
+ };
+
+ service.refresh = function() {
+ var deferred = $q.defer();
+ $mwtnCommons.getRequiredNetworkElements(true).then(function(pNes){
+ var neIds = pNes.map(function(pNe){
+ pNe._source.connectionStatus = 'disconnected';
+ return pNe._id;
+ });
+ $mwtnCommons.getMountPoints(). then(function(mountpoints){
+ var actualNodes = mountpoints.map(function(mountpoint){
+ var pIndex = neIds.indexOf(mountpoint['node-id']);
+ if (pIndex > -1) {
+ pNes[pIndex]._source.connectionStatus = mountpoint['netconf-node-topology:connection-status'];
+ }
+ return {
+ id: mountpoint['node-id'],
+ connectionStatus: mountpoint['netconf-node-topology:connection-status']
+ };
+ });
+ var airInterfaces = [];
+ pNes.map(function(hit){
+ hit._source.MW_AirInterface_Pac.filter(function(airinterface){
+ return airinterface.airInterfaceConfiguration;
+ }).map(function(airinterface){
+ airInterfaces.push({
+ id: $mwtnCommons.getNodeIntIdFromNodeId(hit._source.nodeId),
+ name: hit._source.nodeId,
+ connectionStatus: hit._source.connectionStatus,
+ airInterfaceName: airinterface.airInterfaceConfiguration.airInterfaceName,
+ radioSignalID: airinterface.airInterfaceConfiguration.radioSignalID,
+ plannedTxFrequency: airinterface.airInterfaceConfiguration.txFrequency,
+ actualTxFrequency: '?',
+ plannedRxFrequency: airinterface.airInterfaceConfiguration.rxFrequency,
+ actualRxFrequency: '?'
+ });
+ });
+ });
+
+ airInterfaces.sort(function(a, b){
+ if(a.radioSignalID < b.radioSignalID) return -1;
+ if(a.radioSignalID > b.radioSignalID) return 1;
+ return 0;
+ });
+ deferred.resolve({airInterfaces: airInterfaces, actualNodes: actualNodes});
+ }, function(error){
+ deferred.reject([]);
+ });
+
+ }, function(error){
+ deferred.reject([]);
+ });
+ return deferred.promise;
+ };
+
+ return service;
+ });
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/mwtnSpectrum.tpl.html b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/mwtnSpectrum.tpl.html
new file mode 100644
index 00000000..ae9543dd
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/mwtnSpectrum-module/src/main/resources/mwtnSpectrum/mwtnSpectrum.tpl.html
@@ -0,0 +1,64 @@
+<ht-header help-link='sdnr/mwtnSpectrum/0.4.0/README.md'></ht-header>
+<div class="owl container">
+ <div class="row">
+ <div clase="col-md-12 text-left radio"
+ ng-class="{'raised':interference.alarmStatus !== 'cleared', 'cleared':interference.alarmStatus === 'cleared' }">
+ <span>{{'MWTN_INTERFERENCE_ALARM_STATUS' | translate}}: </span>
+ <i class="fa fa-bell" aria-hidden="true" ng-show="interference.alarmStatus !== 'cleared'"></i>
+ <span>{{interference.alarmStatus}}</span>
+ </div>
+ </div>
+ <div class="row">
+ <div clase="col-md-12">
+ <hr/>
+ <button class="btn btn-lg btn-block" ng-click="execute()" ng-class="{'btn-danger':interference.alarmStatus !== 'cleared', 'btn-success':interference.alarmStatus === 'cleared' }">
+ <div class="container" >
+ <div class="row alarm">
+ <div class="col-md-2 text-left">
+ <img ng-show="interference.alarmStatus !== 'cleared'" src="src/app/mwtnSpectrum/images/bluelight.gif" ></img>
+ </div>
+ <div class="col-md-8">
+ </br></br>
+ <i class="fa" ng-class="{'fa-exclamation-triangle':interference.alarmStatus !== 'cleared', 'fa-question-circle-o':interference.alarmStatus === 'cleared' }" aria-hidden="true"></i>
+ <span ng-show="interference.alarmStatus !== 'cleared'">{{'MWTN_INTERFERENCE_ALARM!' | translate}}</span>
+ <span ng-show="interference.alarmStatus === 'cleared'">{{'MWTN_INTERFERENCE_ALARM?' | translate}}</span>
+ </div>
+ <div class="col-md-2">
+ <img ng-show="interference.alarmStatus !== 'cleared'" src="src/app/mwtnSpectrum/images/bluelight.gif" ></img>
+ </div>
+ </div>
+ </div>
+ </button>
+ <hr/>
+ </div>
+ </div>
+<!-- <div class="row">
+ <div clase="col-md-12">
+ <button class="btn btn-success" ng-click="clear()">
+ <i class="fa fa-magic" aria-hidden="true"></i>
+ <span>{{'MWTN_CLEAR' | translate}}</span>
+ </button>
+ </div>
+ </div> -->
+ <div class="row">
+ <div clase="col-md-12 text-right">
+ <button class="btn btn-primary pull-right" ng-click="refresh()">
+ <i class="fa fa-refresh" ng-class="{'fa-spin':processing == true}" aria-hidden="true"></i>
+ <span>{{'MWTN_REFRESH' | translate}}</span>
+ </button>
+ </div>
+ </div>
+ <div class="row">
+ <div clase="col-md-12">
+ <div><span class="white">All frequencies in kHz</span></div>
+ <div id="mwtnSpectrumGrid" ui-grid="gridOptions" ui-grid-exporter ui-grid-selection ui-grid-pinning ui-grid-resize-columns ui-grid-move-columns
+ class="mwtnSpectrumGrid">
+ </div>
+ </div>
+ </div>
+
+</div>
+<hr />
+<div class="owl">
+ <span class="white">ONAP SDN-R | ONF Wireless for @distversion@ - Build: @buildtime@</span>
+</div> \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/pom.xml b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/pom.xml
new file mode 100644
index 00000000..06cc878a
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnSpectrum/pom.xml
@@ -0,0 +1,24 @@
+<?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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>mwtn</artifactId>
+ <groupId>com.highstreet.technologies.odl.dlux</groupId>
+ <version>0.5.1-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <packaging>pom</packaging>
+ <groupId>cn.com.zte.odl.dlux</groupId>
+ <artifactId>mwtnSpectrum</artifactId>
+ <name>${prefix} ${project.artifactId}</name>
+
+ <prerequisites>
+ <maven>3.0</maven>
+ </prerequisites>
+
+ <modules>
+ <module>mwtnSpectrum-module</module>
+ <module>mwtnSpectrum-bundle</module>
+ </modules>
+</project> \ No newline at end of file