summaryrefslogtreecommitdiffstats
path: root/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory')
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-bundle/pom.xml115
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml19
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/pom.xml15
-rwxr-xr-xsdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/components/equipment.html37
-rwxr-xr-xsdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/components/equipment.ts28
-rwxr-xr-xsdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/components/equipmentGroup.html5
-rwxr-xr-xsdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/components/equipmentGroup.ts41
-rwxr-xr-xsdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/images/mwtnInventory.pngbin2627 -> 0 bytes
-rwxr-xr-xsdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/models/equipment.ts6
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory-custom.css31
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.controller.js372
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.controller.ts116
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.module.js33
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.module.ts36
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.service.ts144
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.services.js100
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.tpl.html16
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/templates/_0
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/templates/accordeonHeader.tpl.html13
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/pom.xml24
20 files changed, 0 insertions, 1151 deletions
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-bundle/pom.xml b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-bundle/pom.xml
deleted file mode 100644
index ea013df3..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-bundle/pom.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?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>mwtnInventory</artifactId>
- <groupId>com.highstreet.technologies.odl.dlux</groupId>
- <version>0.5.1-SNAPSHOT</version>
- </parent>
- <artifactId>mwtnInventory-bundle</artifactId>
- <packaging>bundle</packaging>
- <name>${prefix} ${project.artifactId}</name>
- <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>com.highstreet.technologies.odl.dlux</groupId>
- <artifactId>mwtnInventory-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>com.highstreet.technologies.odl.dlux</groupId>
- <includeArtifactIds>mwtnInventory-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/mwtnInventory/mwtnInventory-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml
deleted file mode 100644
index 1075069c..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<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="mwtnInventory"/>
- <property name="url" value="/src/app/mwtnInventory"/>
- <property name="directory" value="/mwtnInventory"/>
- <property name="requireJs" value="app/mwtnInventory/mwtnInventory.module"/>
- <property name="angularJs" value="app.mwtnInventory"/>
- <property name="cssDependencies">
- <list>
- <value>src/app/mwtnInventory/mwtnInventory-custom.css</value>
- </list>
- </property>
- </bean>
-</blueprint> \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/pom.xml b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/pom.xml
deleted file mode 100644
index 5a72f5e9..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/pom.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?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>mwtnInventory</artifactId>
- <groupId>com.highstreet.technologies.odl.dlux</groupId>
- <version>0.5.1-SNAPSHOT</version>
- </parent>
- <artifactId>mwtnInventory-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/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/components/equipment.html b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/components/equipment.html
deleted file mode 100755
index 5b0f5f65..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/components/equipment.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<div uib-accordion-group="" class="panel-primary" template-url="src/app/mwtnInventory/templates/accordeonHeader.tpl.html"
- heading="{{equipment.uuid + ' | '+ equipment.name || equipment.label }}">
- <div class="row">
- <div class="col">
- Manufacturer: <br /> <b> {{ equipment.manufacturer.id }} </b>
- </div>
- <div class="col">
- Serial: <br /> <b> {{ equipment.manufacturer.serial }} </b>
- </div>
-
- <div class="col">
- Version: <br /> <b> {{ equipment.manufacturer.version }} </b>
- </div>
- <div class="col">
- Date: <br /> <b> {{ equipment.manufacturer.date | date }} </b>
- </div>
-
- <div class="col">
- Description: <br /> <b> {{ equipment.manufacturer.description }} </b>
- </div>
- <div class="col">
- Part Type Id: <br /> <b> {{ equipment.manufacturer.partTypeIdentifier }} </b>
- </div>
-
- <div class="col">
- Model Identifier: <br /> <b> {{ equipment.manufacturer.modelIdentifier }} </b>
- </div>
- <div class="col">
- Type Name: <br /> <b> {{ equipment.manufacturer.partTypeIdetypeNamentifier }} </b>
- </div>
- </div>
- <div class="row">
- <mwtn-equipment-group equipments="equipment.children" />
- </div>
- <div class="row">
- </div>
-</div>
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/components/equipment.ts b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/components/equipment.ts
deleted file mode 100755
index 0ea067c9..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/components/equipment.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-declare var angular: angular.IAngularStatic;
-
-import { Equipment } from '../models/equipment';
-
-const mwtnInventory = angular.module('app.mwtnInventory');
-
-const EquipmentDirective = () => {
- return {
- templateUrl: 'src/app/mwtnInventory/components/equipment.html',
- controller: 'mwtnEquipmentCtrl',
- controllerAs: 'vm',
- scope: {
- equipment: "="
- }
- }
-};
-
-mwtnInventory.directive('mwtnEquipment', EquipmentDirective);
-
-export class EquipmentController {
- constructor(private $scope: ng.IScope & { equipment: Equipment }) {
-
- }
-
-
-}
-
-mwtnInventory.controller('mwtnEquipmentCtrl', ['$scope', EquipmentController]);
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/components/equipmentGroup.html b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/components/equipmentGroup.html
deleted file mode 100755
index ad43bff9..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/components/equipmentGroup.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<div class="app-mwtnInventory-components-equipmentGroup">
-<uib-accordion close-others="false">
- <mwtn-equipment ng-repeat="eq in equipments" equipment="eq" />
-</uib-accordion>
-</div >
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/components/equipmentGroup.ts b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/components/equipmentGroup.ts
deleted file mode 100755
index ee0945d5..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/components/equipmentGroup.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-declare var angular: angular.IAngularStatic;
-
-import { Equipment } from '../models/equipment';
-
-const mwtnInventory = angular.module('app.mwtnInventory');
-
-const EquipmentGroupDirective = ($compile) => {
- return {
- templateUrl: 'src/app/mwtnInventory/components/equipmentGroup.html',
- controller: 'mwtnEquipmentGroupCtrl',
- controllerAs: 'vm',
- scope: {
- equipments: "="
- },
- // HACK: for angular 1.4. compatibility
- compile: function (tElement, tAttr, transclude) {
- var contents = tElement.contents().remove();
- var compiledContents;
- return function (scope, iElement, iAttr) {
- if (!compiledContents) {
- compiledContents = $compile(contents, transclude);
- }
- compiledContents(scope, function (clone, scope) {
- iElement.append(clone);
- });
- };
- }
- }
-};
-
-mwtnInventory.directive('mwtnEquipmentGroup', ['$compile', EquipmentGroupDirective]);
-
-export class EquipmentGroupController {
- constructor(private $scope: ng.IScope & { equipments: Equipment[] }) {
- //console.log("EquipmentGroupController", $scope.equipments);
-
- }
-
-}
-
-mwtnInventory.controller('mwtnEquipmentGroupCtrl', ['$scope', EquipmentGroupController]); \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/images/mwtnInventory.png b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/images/mwtnInventory.png
deleted file mode 100755
index 02e626d2..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/images/mwtnInventory.png
+++ /dev/null
Binary files differ
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/models/equipment.ts b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/models/equipment.ts
deleted file mode 100755
index edc4fc5b..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/models/equipment.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export class Equipment {
- uuid: string;
- name: string;
- label: string;
- children: Equipment[];
-} \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory-custom.css b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory-custom.css
deleted file mode 100644
index 2eb9261d..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory-custom.css
+++ /dev/null
@@ -1,31 +0,0 @@
-
-.app-mwtnInventory * {
- box-sizing: border-box;
-}
-
-.app-mwtnInventory .col {
- height: 70px;
- width: 12.5%;
- float: left;
- padding: 15px;
-}
-
-.app-mwtnInventory .row::after {
- content: "";
- clear: both;
- display: table;
-}
-
-@media (max-width: 1600px) {
- .app-mwtnInventory .col { width: 25%; }
-
-}
-
-@media (max-width: 1200px) {
- .app-mwtnInventory .col { width: 33.3%; }
-}
-
-.app-mwtnInventory-components-equipmentGroup {
- padding-left: 15px;
- padding-right: 15px;
-} \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.controller.js b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.controller.js
deleted file mode 100644
index fa6a85f8..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.controller.js
+++ /dev/null
@@ -1,372 +0,0 @@
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-var __generator = (this && this.__generator) || function (thisArg, body) {
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
- function verb(n) { return function (v) { return step([n, v]); }; }
- function step(op) {
- if (f) throw new TypeError("Generator is already executing.");
- while (_) try {
- if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
- if (y = 0, t) op = [0, t.value];
- switch (op[0]) {
- case 0: case 1: t = op; break;
- case 4: _.label++; return { value: op[1], done: false };
- case 5: _.label++; y = op[1]; op = [0]; continue;
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
- default:
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
- if (t[2]) _.ops.pop();
- _.trys.pop(); continue;
- }
- op = body.call(thisArg, _);
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
- }
-};
-define("mwtnInventory.service", ["require", "exports", "angularAMD"], function (require, exports, angular) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- var mwtnInventory = angular.module('app.mwtnInventory');
- var ExtensionResult = /** @class */ (function () {
- function ExtensionResult() {
- }
- return ExtensionResult;
- }());
- var InventoryService = /** @class */ (function () {
- function InventoryService($q, $mwtnCommons, $mwtnDatabase, $mwtnLog) {
- var _this = this;
- this.$q = $q;
- this.$mwtnCommons = $mwtnCommons;
- this.$mwtnDatabase = $mwtnDatabase;
- this.$mwtnLog = $mwtnLog;
- /**
- * Helperfunction to detect and convert the 'value-name-group' .
- * @param propertyName Name of the object property.
- * @param propertyValue Value of the object property.
- * @param valueName Optional: The value-name to be used instaed of the propertyName.
- * @returns A simplified property value if this is a 'value-name-group' otherwhise the propertyValue. */
- this.convertValue = function (propertyName, propertyValue, valueName) {
- if (valueName === void 0) { valueName = ''; }
- if (propertyValue && propertyValue instanceof Array && propertyValue.length == 1 && (valueName == null ||
- propertyValue[0]["value-name"] === propertyName ||
- propertyValue[0]["value-name"] === valueName)) {
- return propertyValue[0]["value"];
- }
- return propertyValue;
- };
- /**
- * Converts an API object to a simplified local object.
- * @param apiResult The API object to convert.
- * @param valueName Optional: The value-name to be used instaed of the propertyName.
- * @returns The simplified local object.
- */
- this.convertObject = function (apiResult, valueName) {
- if (valueName === void 0) { valueName = ''; }
- if (apiResult instanceof Array) {
- return apiResult.map(function (elm) { return _this.convertObject(elm, valueName); });
- }
- else if (apiResult instanceof Object) {
- var keys = Object.keys(apiResult);
- var result_1 = {};
- keys.forEach(function (key) {
- var value = _this.convertValue(key, apiResult[key], valueName);
- result_1[key] = (value instanceof Object || value instanceof Array)
- ? _this.convertObject(value)
- : value;
- });
- return result_1;
- }
- return apiResult;
- };
- }
- /** Requests all active moint points */
- InventoryService.prototype.getConnectedMountpoints = function () {
- return this.$mwtnCommons.getMountPoints().then(function (mountpoints) {
- //console.log(mountpoints);
- return mountpoints.reduce(function (acc, cur, ind, arr) {
- if (cur['netconf-node-topology:connection-status'] === 'connected')
- acc.push(cur["node-id"]);
- return acc;
- }, []);
- });
- };
- /**
- * Requests all 'root identifiers' for the given 'node id'.
- * @param nodeId The id of the node to request the root identifiers for.
- * @returns A q.Promise containing an array of all root identifiers for the requested node id.
- * */
- InventoryService.prototype.getRootIdentifiers = function (nodeId) {
- var _this = this;
- var request = {
- url: "operational/network-topology:network-topology/topology/topology-netconf/node/" + nodeId + "/yang-ext:mount/core-model:network-element/extension/top-level-equipment",
- method: "GET"
- };
- return this.$mwtnCommons.genericRequest(request).then(function (result) {
- if (result && result.status == 200 && result.data) {
- var topLevelEquipment = _this.convertObject(result.data, 'top-level-equipment');
- var rootIdentifiers = topLevelEquipment && topLevelEquipment.extension && topLevelEquipment.extension.split(',');
- return rootIdentifiers && rootIdentifiers.map(function (identifier) { return identifier && identifier.trim(); });
- }
- return null;
- }, function (err) { return (null); });
- };
- /**
- * Requests the detail information for the given combination of 'nodeId' and 'equipmentIdentifier'.
- * @param nodeId The id of the root node.
- * @param identifier The identifier to request the details for.
- * @returns A q.Promise containing an object with all the details.
- * */
- InventoryService.prototype.getEquipmentDetails = function (nodeId, identifier) {
- var _this = this;
- var request = {
- url: "operational/network-topology:network-topology/topology/topology-netconf/node/" + nodeId + "/yang-ext:mount/core-model:equipment/" + identifier,
- method: "GET"
- };
- return this.$mwtnCommons.genericRequest(request).then(function (result) {
- if (result && result.status == 200 && result.data) {
- return _this.convertObject(result.data);
- }
- return null;
- }, function (err) { return (null); });
- };
- /**
- * Requests the conditional information for the given combination of 'nodeId' and 'equipmentIdentifier'.
- * @param nodeId The id of the root node.
- * @param identifier The identifier to request the conditionals for.
- * @returns A q.Promise containing an object with all the conditional informations.
- * */
- InventoryService.prototype.getEquipmentConditionals = function (nodeId, identifier) {
- var _this = this;
- var request = {
- url: "operational/network-topology:network-topology/topology/topology-netconf/node/" + nodeId + "/yang-ext:mount/onf-core-model-conditional-packages:equipment-pac/" + identifier,
- method: "GET"
- };
- return this.$mwtnCommons.genericRequest(request).then(function (result) {
- if (result && result.status == 200 && result.data) {
- return _this.convertObject(result.data);
- }
- return {"equipment-pac":[]};
- }, function (err) { return ({"equipment-pac":[]}); });
- };
- return InventoryService;
- }());
- exports.InventoryService = InventoryService;
- mwtnInventory.service('mwtnInventoryService', ["$q", "$mwtnCommons", "$mwtnDatabase", "$mwtnLog", InventoryService]);
-});
-define("models/equipment", ["require", "exports"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- var Equipment = /** @class */ (function () {
- function Equipment() {
- }
- return Equipment;
- }());
- exports.Equipment = Equipment;
-});
-define("components/equipment", ["require", "exports"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- var mwtnInventory = angular.module('app.mwtnInventory');
- var EquipmentDirective = function () {
- return {
- templateUrl: 'src/app/mwtnInventory/components/equipment.html',
- controller: 'mwtnEquipmentCtrl',
- controllerAs: 'vm',
- scope: {
- equipment: "="
- }
- };
- };
- mwtnInventory.directive('mwtnEquipment', EquipmentDirective);
- var EquipmentController = /** @class */ (function () {
- function EquipmentController($scope) {
- this.$scope = $scope;
- }
- return EquipmentController;
- }());
- exports.EquipmentController = EquipmentController;
- mwtnInventory.controller('mwtnEquipmentCtrl', ['$scope', EquipmentController]);
-});
-define("components/equipmentGroup", ["require", "exports"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- var mwtnInventory = angular.module('app.mwtnInventory');
- var EquipmentGroupDirective = function ($compile) {
- return {
- templateUrl: 'src/app/mwtnInventory/components/equipmentGroup.html',
- controller: 'mwtnEquipmentGroupCtrl',
- controllerAs: 'vm',
- scope: {
- equipments: "="
- },
- // HACK: for angular 1.4. compatibility
- compile: function (tElement, tAttr, transclude) {
- var contents = tElement.contents().remove();
- var compiledContents;
- return function (scope, iElement, iAttr) {
- if (!compiledContents) {
- compiledContents = $compile(contents, transclude);
- }
- compiledContents(scope, function (clone, scope) {
- iElement.append(clone);
- });
- };
- }
- };
- };
- mwtnInventory.directive('mwtnEquipmentGroup', ['$compile', EquipmentGroupDirective]);
- var EquipmentGroupController = /** @class */ (function () {
- function EquipmentGroupController($scope) {
- //console.log("EquipmentGroupController", $scope.equipments);
- this.$scope = $scope;
- }
- return EquipmentGroupController;
- }());
- exports.EquipmentGroupController = EquipmentGroupController;
- mwtnInventory.controller('mwtnEquipmentGroupCtrl', ['$scope', EquipmentGroupController]);
-});
-define( ["require", "exports", "mwtnInventory.service", "components/equipment", "components/equipmentGroup"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- var mwtnInventory = angular.module('app.mwtnInventory');
- var MwtnInventoryCtrl = /** @class */ (function () {
- function MwtnInventoryCtrl($rootScope, $scope, $state, $timeout, mwtnInventoryService) {
- var _this = this;
- this.$rootScope = $rootScope;
- this.$scope = $scope;
- this.$state = $state;
- this.$timeout = $timeout;
- this.mwtnInventoryService = mwtnInventoryService;
- // todo: change this
- $rootScope.section_logo = 'src/app/mwtnInventory/images/mwtnInventory.png';
- $scope.loading = false;
- $scope.message = "Empty";
- $scope.equipments = [];
- $scope.selectedMountPoint = null;
- $scope.activeMountPoints = [];
- var getAllChildEquipments = function (equipmentsRootId, equimentIds) { return __awaiter(_this, void 0, void 0, function () {
- var equipmentObjects, equipmentConditionals, results;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- if (!equimentIds || !equimentIds.length) {
- return [2 /*return*/, []];
- }
- return [4 /*yield*/, Promise.all(equimentIds.map(function (id) {
- return mwtnInventoryService.getEquipmentDetails(equipmentsRootId, id);
- }))];
- case 1:
- equipmentObjects = (_a.sent()).map(function (eq) { return (eq["equipment"][0]); });
- return [4 /*yield*/, Promise.all(equimentIds.map(function (id) {
- return mwtnInventoryService.getEquipmentConditionals(equipmentsRootId, id);
- }))];
- case 2:
- equipmentConditionals = (_a.sent()).map(function (eq) { return (eq["equipment-pac"][0]); });
- return [4 /*yield*/, Promise.all(equipmentObjects.map(function (eq) {
- var fruNames = (eq["contained-holder"] || []).map(function (ch) { return ch["occupying-fru"]; }).filter(function (fru) { return !!fru; });
- return getAllChildEquipments(equipmentsRootId, fruNames);
- }))];
- case 3:
- results = _a.sent();
- return [2 /*return*/, equipmentObjects.reduce(function (acc, cur, ind, arr) {
- var conditional = equipmentConditionals[ind] || null;
- // ensure EVERY property can be null or undefined
- var manufacturedThing = cur['manufactured-thing'];
- var equipmentType = manufacturedThing && manufacturedThing['equipment-type'];
- var manufacturerProperties = manufacturedThing && manufacturedThing['manufacturer-properties'];
- var equipmentInstance = manufacturedThing && manufacturedThing['equipment-instance'];
- var card = {
- name: cur.name,
- label: cur.label,
- uuid: cur.uuid,
- manufacturer: {
- version: equipmentType && equipmentType["version"],
- description: equipmentType && equipmentType["description"],
- partTypeIdentifier: equipmentType && equipmentType["part-type-identifier"],
- modelIdentifier: equipmentType && equipmentType["model-identifier"],
- partTypeIdetypeNamentifier: equipmentType && equipmentType["type-name"],
- id: manufacturerProperties && manufacturerProperties['manufacturer-identifier'],
- date: equipmentInstance && equipmentInstance['manufacture-date'] && Date.parse(equipmentInstance && equipmentInstance['manufacture-date']),
- serial: equipmentInstance && equipmentInstance['serial-number']
- },
- conditional: conditional
- };
- (results[ind].length ? card['children'] = results[ind] : null);
- acc.push(card);
- return acc;
- }, [])];
- }
- });
- }); };
- var pleaseSelect = "... please select a mount point";
- var refresh = function (equipmentsRootId) { return __awaiter(_this, void 0, void 0, function () {
- var rootIdentifiers, equipments, _a;
- return __generator(this, function (_b) {
- switch (_b.label) {
- case 0: return [4 /*yield*/, mwtnInventoryService.getRootIdentifiers(equipmentsRootId)];
- case 1:
- rootIdentifiers = _b.sent();
- _a = rootIdentifiers;
- if (!_a) return [3 /*break*/, 3];
- return [4 /*yield*/, getAllChildEquipments(equipmentsRootId, rootIdentifiers)];
- case 2:
- _a = (_b.sent());
- _b.label = 3;
- case 3:
- equipments = _a;
- $timeout(function () {
- $scope.equipments = equipments;
- });
- return [2 /*return*/];
- }
- });
- }); };
- mwtnInventoryService.getConnectedMountpoints().then(function (res) {
- $scope.activeMountPoints = [pleaseSelect].concat(res);
- $scope.selectedMountPoint = $scope.selectedMountPoint || pleaseSelect;
- });
- $scope.$watch(function () { return ($state.params.nodeId); }, function (newVal, oldVal) {
- $scope.selectedMountPoint = newVal;
- });
- $scope.$watch("selectedMountPoint", function (newVal, oldVal) { return __awaiter(_this, void 0, void 0, function () {
- var _a;
- return __generator(this, function (_b) {
- switch (_b.label) {
- case 0:
- if (!newVal || newVal === pleaseSelect) {
- $scope.equipments = [];
- return [2 /*return*/];
- }
- if ($scope.activeMountPoints[0] === pleaseSelect) {
- _a = $scope.activeMountPoints, $scope.activeMountPoints = _a.slice(1);
- }
- $scope.loading = true;
- if ($state.params.nodeId !== newVal) {
- $state.go('main.mwtnInventory', { nodeId: newVal }, { notify: false });
- }
- return [4 /*yield*/, refresh(newVal).catch(function (err) {
- $timeout(function () { $scope.equipments = null; });
- })];
- case 1:
- _b.sent();
- $timeout(function () { $scope.loading = false; });
- return [2 /*return*/];
- }
- });
- }); });
- }
- return MwtnInventoryCtrl;
- }());
- mwtnInventory.controller('mwtnInventoryCtrl', ['$rootScope', '$scope', '$state', '$timeout', 'mwtnInventoryService', MwtnInventoryCtrl]);
-});
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXd0bkludmVudG9yeS5jb250cm9sbGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3JjL2FwcC9td3RuSW52ZW50b3J5L213dG5JbnZlbnRvcnkuc2VydmljZS50cyIsInNyYy9hcHAvbXd0bkludmVudG9yeS9tb2RlbHMvZXF1aXBtZW50LnRzIiwic3JjL2FwcC9td3RuSW52ZW50b3J5L2NvbXBvbmVudHMvZXF1aXBtZW50LnRzIiwic3JjL2FwcC9td3RuSW52ZW50b3J5L2NvbXBvbmVudHMvZXF1aXBtZW50R3JvdXAudHMiLCJzcmMvYXBwL213dG5JbnZlbnRvcnkvbXd0bkludmVudG9yeS5jb250cm9sbGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0lBRUEsSUFBTSxhQUFhLEdBQUcsT0FBTyxDQUFDLE1BQU0sQ0FBQyxtQkFBbUIsQ0FBQyxDQUFDO0lBRTFEO1FBQUE7UUFJQSxDQUFDO1FBQUQsc0JBQUM7SUFBRCxDQUFDLEFBSkQsSUFJQztJQW1CRDtRQUNFLDBCQUFvQixFQUFnQixFQUFVLFlBQTJCLEVBQVUsYUFBYSxFQUFVLFFBQVE7WUFBbEgsaUJBRUM7WUFGbUIsT0FBRSxHQUFGLEVBQUUsQ0FBYztZQUFVLGlCQUFZLEdBQVosWUFBWSxDQUFlO1lBQVUsa0JBQWEsR0FBYixhQUFhLENBQUE7WUFBVSxhQUFRLEdBQVIsUUFBUSxDQUFBO1lBSWxIOzs7OztvSEFLd0c7WUFDaEcsaUJBQVksR0FBRyxVQUFDLFlBQW9CLEVBQUUsYU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pbmcgPSBmYWxzZTsgfSk7XG4gICAgfSk7XG4gIH1cbn1cblxubXd0bkludmVudG9yeS5jb250cm9sbGVyKCdtd3RuSW52ZW50b3J5Q3RybCcsIFsnJHJvb3RTY29wZScsICckc2NvcGUnLCAnJHN0YXRlJywgJyR0aW1lb3V0JywgJ213dG5JbnZlbnRvcnlTZXJ2aWNlJywgTXd0bkludmVudG9yeUN0cmxdKTtcbiJdfQ== \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.controller.ts b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.controller.ts
deleted file mode 100644
index f4cb3e86..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.controller.ts
+++ /dev/null
@@ -1,116 +0,0 @@
-declare var angular: angular.IAngularStatic;
-
-import { InventoryService } from "./mwtnInventory.service";
-import "./mwtnInventory.service";
-import "./components/equipment";
-import "./components/equipmentGroup";
-
-const mwtnInventory = angular.module('app.mwtnInventory');
-
-interface IMwtnInventoryScope extends ng.IScope {
- message: string,
- equipments: {}[];
- loading: boolean;
- activeMountPoints: string[];
- selectedMountPoint: string;
-}
-
-class MwtnInventoryCtrl {
- constructor(private $rootScope, private $scope: IMwtnInventoryScope, private $state, private $timeout, private mwtnInventoryService: InventoryService) {
- // todo: change this
- $rootScope.section_logo = 'src/app/mwtnInventory/images/mwtnInventory.png';
-
- $scope.loading = false;
- $scope.message = "Empty";
- $scope.equipments = [];
- $scope.selectedMountPoint = null;
-
- $scope.activeMountPoints = [];
-
- const getAllChildEquipments = async (equipmentsRootId: string, equimentIds: string[]) => {
- if (!equimentIds || !equimentIds.length) {
- return [];
- }
- const equipmentObjects = (await Promise.all(equimentIds.map(id => {
- return mwtnInventoryService.getEquipmentDetails(equipmentsRootId, id);
- }))).map(eq => (eq["equipment"][0]));
-
- const equipmentConditionals = (await Promise.all(equimentIds.map(id => {
- return mwtnInventoryService.getEquipmentConditionals(equipmentsRootId, id);
- }))).map(eq => (eq["equipment-pac"][0]));
-
- let results = await Promise.all(equipmentObjects.map(eq => {
- let fruNames: string[] = (eq["contained-holder"] || []).map(ch => ch["occupying-fru"]).filter(fru => !!fru);
- return getAllChildEquipments(equipmentsRootId, fruNames);
- }));
-
- return equipmentObjects.reduce((acc, cur, ind, arr) => {
- let conditional = equipmentConditionals[ind] || null;
- // ensure ENVERY property can be null or undefined
- let manufacturedThing = cur['manufactured-thing'];
- let equipmentType = manufacturedThing && manufacturedThing['equipment-type'];
- let manufacturerProperties = manufacturedThing && manufacturedThing['manufacturer-properties'];
- let equipmentInstance = manufacturedThing && manufacturedThing['equipment-instance'];
-
- let card = {
- name: cur.name,
- label: cur.label,
- uuid: cur.uuid,
- manufacturer: {
- version: equipmentType && equipmentType["version"],
- description: equipmentType && equipmentType["description"],
- partTypeIdentifier: equipmentType && equipmentType["part-type-identifier"],
- modelIdentifier: equipmentType && equipmentType["model-identifier"],
- partTypeIdetypeNamentifier: equipmentType && equipmentType["type-name"],
- id: manufacturerProperties && manufacturerProperties['manufacturer-identifier'],
- date: equipmentInstance && equipmentInstance['manufacture-date'] && Date.parse(equipmentInstance && equipmentInstance['manufacture-date']),
- serial: equipmentInstance && equipmentInstance['serial-number']
- },
- conditional: conditional
- };
- (results[ind].length ? card['children'] = results[ind] : null);
- acc.push(card);
- return acc;
- }, []);
- }
-
- const pleaseSelect = "Please select a mount point";
-
- const refresh = async (equipmentsRootId: string) => {
- let rootIdentifiers = await mwtnInventoryService.getRootIdentifiers(equipmentsRootId);
- let equipments = rootIdentifiers && await getAllChildEquipments(equipmentsRootId, rootIdentifiers);
- $timeout(() => {
- $scope.equipments = equipments;
- });
- };
-
- mwtnInventoryService.getConnectedMountpoints().then(res => {
- $scope.activeMountPoints = [pleaseSelect, ...res] ;
- $scope.selectedMountPoint = $scope.selectedMountPoint || pleaseSelect;
- });
-
- $scope.$watch(() => ($state.params.nodeId), (newVal: string, oldVal: string) => {
- $scope.selectedMountPoint = newVal;
- });
-
- $scope.$watch("selectedMountPoint", async (newVal: string, oldVal: string) => {
- if (!newVal || newVal === pleaseSelect) {
- $scope.equipments = [];
- return;
- }
- if ($scope.activeMountPoints[0] === pleaseSelect) {
- [, ...$scope.activeMountPoints] = $scope.activeMountPoints;
- }
- $scope.loading = true;
- if ($state.params.nodeId !== newVal) {
- $state.go('main.mwtnInventory', { nodeId: newVal }, { notify: false });
- }
- await refresh(newVal).catch(err => {
- $timeout(() => { $scope.equipments = null; });
- });
- $timeout(() => { $scope.loading = false; });
- });
- }
-}
-
-mwtnInventory.controller('mwtnInventoryCtrl', ['$rootScope', '$scope', '$state', '$timeout', 'mwtnInventoryService', MwtnInventoryCtrl]);
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.module.js b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.module.js
deleted file mode 100644
index 5e104941..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.module.js
+++ /dev/null
@@ -1,33 +0,0 @@
-define( ["require", "exports"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.mwtnInventory = angular.module('app.mwtnInventory', ['app.core']);
- exports.mwtnInventory.config(function ($stateProvider, $compileProvider, $controllerProvider, $provide, NavHelperProvider, $httpProvider, $translateProvider, $translatePartialLoaderProvider) {
- //$translatePartialLoaderProvider.addPart('app/mwtnInventory/locale/locale');
- NavHelperProvider.addControllerUrl('app/mwtnInventory/mwtnInventory.controller');
- NavHelperProvider.addToMenu('mwtnInventory', {
- "link": "#/pnfInventory/",
- "active": "main.mwtnInventory",
- "title": "pnf Inventory",
- "icon": "fa fa-book",
- "page": {
- "title": "pnf Inventory",
- "description": "mwtnInventory"
- }
- });
- $stateProvider.state('main.mwtnInventory', {
- url: 'pnfInventory/:nodeId?',
- access: 2,
- views: {
- 'content': {
- templateUrl: 'src/app/mwtnInventory/mwtnInventory.tpl.html',
- controller: 'mwtnInventoryCtrl'
- }
- }
- });
- });
-});
-/* non ES6 export */
-// export = mwtnInventory;
-// export default mwtnInventory;
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXd0bkludmVudG9yeS5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzcmMvYXBwL213dG5JbnZlbnRvcnkvbXd0bkludmVudG9yeS5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0lBR2EsUUFBQSxhQUFhLEdBQUcsT0FBTyxDQUFDLE1BQU0sQ0FBQyxtQkFBbUIsRUFBRSxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUM7SUFFL0UscUJBQWEsQ0FBQyxNQUFNLENBQUMsVUFBVSxjQUFjLEVBQUUsZ0JBQWdCLEVBQUUsbUJBQW1CLEVBQUUsUUFBUSxFQUFFLGlCQUFpQixFQUFFLGFBQWEsRUFBRSxrQkFBa0IsRUFBRSwrQkFBK0I7UUFFbkwsNkVBQTZFO1FBRTdFLGlCQUFpQixDQUFDLGdCQUFnQixDQUFDLDRDQUE0QyxDQUFDLENBQUM7UUFDakYsaUJBQWlCLENBQUMsU0FBUyxDQUFDLGVBQWUsRUFBRTtZQUMzQyxNQUFNLEVBQUUsa0JBQWtCO1lBQzFCLFFBQVEsRUFBRSxvQkFBb0I7WUFDOUIsT0FBTyxFQUFFLGdCQUFnQjtZQUN6QixNQUFNLEVBQUUsYUFBYTtZQUNyQixNQUFNLEVBQUU7Z0JBQ04sT0FBTyxFQUFFLFdBQVc7Z0JBQ3BCLGFBQWEsRUFBRSxl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0bkludmVudG9yeS5jb250cm9sbGVyJyk7XG4gIE5hdkhlbHBlclByb3ZpZGVyLmFkZFRvTWVudSgnbXd0bkludmVudG9yeScsIHtcbiAgICBcImxpbmtcIjogXCIjL213dG5JbnZlbnRvcnkvXCIsXG4gICAgXCJhY3RpdmVcIjogXCJtYWluLm13dG5JbnZlbnRvcnlcIixcbiAgICBcInRpdGxlXCI6IFwiTVdUTiBJbnZlbnRvcnlcIixcbiAgICBcImljb25cIjogXCJmYSAgZmEtYm9va1wiLCAgLy8gQWRkIG5hdmlnYXRpb24gaWNvbiBjc3MgY2xhc3MgaGVyZVxuICAgIFwicGFnZVwiOiB7XG4gICAgICBcInRpdGxlXCI6IFwiTVdUTiBEZW1vXCIsXG4gICAgICBcImRlc2NyaXB0aW9uXCI6IFwibXd0bkludmVudG9yeVwiXG4gICAgfVxuICB9KTtcblxuICAkc3RhdGVQcm92aWRlci5zdGF0ZSgnbWFpbi5td3RuSW52ZW50b3J5Jywge1xuICAgIHVybDogJ213dG5JbnZlbnRvcnkvOm5vZGVJZD8nLFxuICAgIGFjY2VzczogMixcbiAgICB2aWV3czoge1xuICAgICAgJ2NvbnRlbnQnOiB7XG4gICAgICAgIHRlbXBsYXRlVXJsOiAnc3JjL2FwcC9td3RuSW52ZW50b3J5L213dG5JbnZlbnRvcnkudHBsLmh0bWwnLFxuICAgICAgICBjb250cm9sbGVyOiAnbXd0bkludmVudG9yeUN0cmwnXG4gICAgICB9XG4gICAgfVxuICB9KTtcbn0pO1xuXG4vKiBub24gRVM2IGV4cG9ydCAqL1xuLy8gZXhwb3J0ID0gbXd0bkludmVudG9yeTsgICBcbi8vIGV4cG9ydCBkZWZhdWx0IG13dG5JbnZlbnRvcnk7Il19 \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.module.ts b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.module.ts
deleted file mode 100644
index 6fee7005..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.module.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-// import * as angular from 'angularAMD';
-declare var angular: angular.IAngularStatic;
-
-export const mwtnInventory = angular.module('app.mwtnInventory', ['app.core']);
-
-mwtnInventory.config(function ($stateProvider, $compileProvider, $controllerProvider, $provide, NavHelperProvider, $httpProvider, $translateProvider, $translatePartialLoaderProvider) {
-
- //$translatePartialLoaderProvider.addPart('app/mwtnInventory/locale/locale');
-
- NavHelperProvider.addControllerUrl('app/mwtnInventory/mwtnInventory.controller');
- NavHelperProvider.addToMenu('mwtnInventory', {
- "link": "#/pnfInventory/",
- "active": "main.mwtnInventory",
- "title": "pnf Inventory",
- "icon": "fa fa-book", // Add navigation icon css class here
- "page": {
- "title": "pnf Inventory",
- "description": "mwtnInventory"
- }
- });
-
- $stateProvider.state('main.mwtnInventory', {
- url: 'pnfInventory/:nodeId?',
- access: 2,
- views: {
- 'content': {
- templateUrl: 'src/app/mwtnInventory/mwtnInventory.tpl.html',
- controller: 'mwtnInventoryCtrl'
- }
- }
- });
-});
-
-/* non ES6 export */
-// export = mwtnInventory;
-// export default mwtnInventory; \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.service.ts b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.service.ts
deleted file mode 100644
index be381a4c..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.service.ts
+++ /dev/null
@@ -1,144 +0,0 @@
-import * as angular from 'angularAMD';
-
-const mwtnInventory = angular.module('app.mwtnInventory');
-
-class ExtensionResult {
- public extension: [
- { "value-name": string, "value": string }
- ]
-}
-
-interface GenericGetRequest {
- url: string;
- method: "GET";
-}
-
-interface GenericPostRequest<T> {
- url: string;
- method: "POST";
- data: T
-}
-
-interface CommonService {
- genericRequest<TResult>(request: GenericGetRequest): ng.IPromise<ng.IHttpResponse<TResult>>;
- genericRequest<TRequest, TResult>(request: GenericPostRequest<TRequest>): ng.IPromise<ng.IHttpResponse<TResult>>;
- getMountPoints<TResult>(): ng.IPromise<TResult>;
-}
-
-export class InventoryService {
- constructor(private $q: ng.IQService, private $mwtnCommons: CommonService, private $mwtnDatabase, private $mwtnLog) {
-
- }
-
- /**
- * Helperfunction to detect and convert the 'value-name-group' .
- * @param propertyName Name of the object property.
- * @param propertyValue Value of the object property.
- * @param valueName Optional: The value-name to be used instaed of the propertyName.
- * @returns A simplified property value if this is a 'value-name-group' otherwhise the propertyValue. */
- private convertValue = (propertyName: string, propertyValue: any, valueName: string = ''): any => {
- if (propertyValue && propertyValue instanceof Array && propertyValue.length == 1 && (
- valueName == null ||
- propertyValue[0]["value-name"] === propertyName ||
- propertyValue[0]["value-name"] === valueName)
- ) {
- return propertyValue[0]["value"];
- }
- return propertyValue;
- }
-
- /**
- * Converts an API object to a simplified local object.
- * @param apiResult The API object to convert.
- * @param valueName Optional: The value-name to be used instaed of the propertyName.
- * @returns The simplified local object.
- */
- private convertObject = (apiResult: any, valueName: string = ''): any => {
- if (apiResult instanceof Array) {
- return apiResult.map(elm => { return this.convertObject(elm, valueName); });
- } else if (apiResult instanceof Object) {
- const keys = Object.keys(apiResult);
- let result = {};
- keys.forEach(key => {
- const value = this.convertValue(key, apiResult[key], valueName);
- result[key] = (value instanceof Object || value instanceof Array)
- ? this.convertObject(value)
- : value;
- });
- return result;
- }
- return apiResult;
- }
-
- /** Requests all active moint points */
- public getConnectedMountpoints(): ng.IPromise<string[]> {
- return this.$mwtnCommons.getMountPoints<{}>().then((mountpoints: {}[]) => {
- //console.log(mountpoints);
- return <string[]>mountpoints.reduce((acc: string[], cur, ind, arr) => {
- if (cur['netconf-node-topology:connection-status'] === 'connected') acc.push(cur["node-id"]);
- return acc;
- }, []);
- });
- }
-
- /**
- * Requests all 'root identifiers' for the given 'node id'.
- * @param nodeId The id of the node to request the root identifiers for.
- * @returns A q.Promise containing an array of all root identifiers for the requested node id.
- * */
- public getRootIdentifiers(nodeId: string): ng.IPromise<string[]> {
-
- const request: GenericGetRequest = {
- url: `operational/network-topology:network-topology/topology/topology-netconf/node/${nodeId}/yang-ext:mount/core-model:network-element/extension/top-level-equipment`,
- method: "GET"
- };
-
- return this.$mwtnCommons.genericRequest<ExtensionResult>(request).then((result) => {
- if (result && result.status == 200 && result.data) {
- const topLevelEquipment = this.convertObject(result.data, 'top-level-equipment');
- const rootIdentifiers = topLevelEquipment && topLevelEquipment.extension && topLevelEquipment.extension.split(',');
- return rootIdentifiers && rootIdentifiers.map(identifier => identifier && identifier.trim());
- }
- return null;
- }, err => (null));
- }
-
- /**
- * Requests the detail information for the given combination of 'nodeId' and 'equipmentIdentifier'.
- * @param nodeId The id of the root node.
- * @param identifier The identifier to request the details for.
- * @returns A q.Promise containing an object with all the details.
- * */
- public getEquipmentDetails(nodeId: string, identifier: string): ng.IPromise<{}> {
- const request: GenericGetRequest = {
- url: `operational/network-topology:network-topology/topology/topology-netconf/node/${nodeId}/yang-ext:mount/core-model:equipment/${identifier}`,
- method: "GET"
- };
- return this.$mwtnCommons.genericRequest<ExtensionResult>(request).then((result) => {
- if (result && result.status == 200 && result.data) {
- return this.convertObject(result.data);
- }
- return null;
- }, err => (null));
- }
-
- /**
- * Requests the conditional information for the given combination of 'nodeId' and 'equipmentIdentifier'.
- * @param nodeId The id of the root node.
- * @param identifier The identifier to request the conditionals for.
- * @returns A q.Promise containing an object with all the conditional informations.
- * */
- public getEquipmentConditionals(nodeId: string, identifier: string): ng.IPromise<{}> {
- const request: GenericGetRequest = {
- url: `operational/network-topology:network-topology/topology/topology-netconf/node/${nodeId}/yang-ext:mount/onf-core-model-conditional-packages:equipment-pac/${identifier}`,
- method: "GET"
- };
- return this.$mwtnCommons.genericRequest<ExtensionResult>(request).then((result) => {
- if (result && result.status == 200 && result.data) {
- return this.convertObject(result.data);
- }
- return null;
- }, err => (null));
- }
-}
-mwtnInventory.service('mwtnInventoryService', ["$q", "$mwtnCommons", "$mwtnDatabase", "$mwtnLog", InventoryService]);
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.services.js b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.services.js
deleted file mode 100644
index 25f1f61c..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.services.js
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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/mwtnInventory/mwtnInventory.module','app/mwtnCommons/mwtnCommons.services'],function(mwtnInventoryApp) {
-
- mwtnInventoryApp.register.factory('$mwtnInventory', function($q, $mwtnCommons, $mwtnDatabase, $mwtnLog) {
-
- var service = {};
-
- service.checkModules = $mwtnCommons.checkModules;
- service.getMwtnWebSocketUrl = $mwtnCommons.getMwtnWebSocketUrl;
- service.gridOptions = $mwtnCommons.gridOptions;
- service.formatData = $mwtnCommons.formatData;
- service.formatTimeStamp = $mwtnCommons.formatTimeStamp;
- service.deleteDocType = $mwtnDatabase.deleteDocType;
-
-
- service.TimeStampToONFFormat=function(timestamp){
-
- timestamp=timestamp.split('-').join('');
- timestamp=timestamp.split(':').join('');
- timestamp=timestamp.split(' ').join('');
- timestamp=timestamp.replace('UTC','Z');
- return timestamp;
- };
-
- service.getAllLogEntries = function(from, size) {
- var sort = [ {
- "fault.timeStamp" : {
- order : 'desc'
- }
- }];
- var deferred = $q.defer();
- $mwtnDatabase.getAllData('sdnevents', 'faultlog', from, size, sort).then(function(success){
- deferred.resolve(success);
- }, function(error){
- $mwtnLog.error({component: '$mwtnInventory.getAllLogEntries', message: JSON.stringify(error.data)});
- deferred.reject(error);
- });
- return deferred.promise;
- };
-
- service.getAllLogEntriesWithSort= function(from, size, sort){
- var deferred = $q.defer();
- $mwtnDatabase.getAllData('sdnevents', 'faultlog', from, size, sort).then(function(success){
- deferred.resolve(success);
- }, function(error){
- $mwtnLog.error({component: '$mwtnInventory.getAllLogEntries', message: JSON.stringify(error.data)});
- deferred.reject(error);
- });
- return deferred.promise;
- };
-
- service.getFilteredSortedData=function(from, size, sort,query){
- var deferred = $q.defer();
- $mwtnDatabase.getFilteredSortedData('sdnevents', 'faultlog', from, size,sort, query).then(function(success){
- deferred.resolve(success);
- }, function(error){
- $mwtnLog.error({component: '$mwtnInventory.getFilteredSortedData', message: JSON.stringify(error.data)});
- deferred.reject(error);
- });
- return deferred.promise;
-
- };
-
- service.getFilteredData= function(from, size, query){
- var deferred = $q.defer();
- $mwtnDatabase.getFilteredData('sdnevents', 'faultlog', from, size, query).then(function(success){
- deferred.resolve(success);
- }, function(error){
- $mwtnLog.error({component: '$mwtnInventory.getFilteredData', message: JSON.stringify(error.data)});
- deferred.reject(error);
- });
- return deferred.promise;
- };
-
- service.getAllCurrentProblemEntries = function(from, size) {
- var sort = [ {
- "faultCurrent.timeStamp" : {
- order : 'desc'
- }
- }];
- var deferred = $q.defer();
- $mwtnDatabase.getAllData('sdnevents', 'faultcurrent', from, size, sort).then(function(success){
- deferred.resolve(success);
- }, function(error){
- $mwtnLog.error({component: '$mwtnInventory.getAllCurrentLogEntries', message: JSON.stringify(error.data)});
- deferred.reject(error);
- });
- return deferred.promise;
- };
-
- return service;
- });
-});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.tpl.html b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.tpl.html
deleted file mode 100644
index 4a7504a8..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/mwtnInventory.tpl.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<ht-header help-link='sdnr/pnfInventory/0.4.0/README.md'></ht-header>
-<div class="app-mwtnInventory">
- <div class="col-md-12 form-group">
- <select class="form-control" ng-model="selectedMountPoint" ng-options="x for x in activeMountPoints | orderBy" ng-disabled="loading"> </select>
- </div>
- <div ng-if="!loading && equipments != null && equipments.length > 0" >
- <mwtn-equipment-group equipments="equipments" />
- </div>
- <div class="col-md-12" ng-if="!loading && equipments == null" ><h2>This device does not support inventory</h2></div>
- <div class="col-md-12" ng-if="loading" ><h2>Loading ... </h2></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/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/templates/_ b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/templates/_
deleted file mode 100644
index e69de29b..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/templates/_
+++ /dev/null
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/templates/accordeonHeader.tpl.html b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/templates/accordeonHeader.tpl.html
deleted file mode 100644
index 1bf88a9c..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/mwtnInventory-module/src/main/resources/mwtnInventory/templates/accordeonHeader.tpl.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<div role="tab" id="{{::headingId}}" aria-selected="{{isOpen}}" class="panel-heading" ng-keypress="toggleOpen($event)">
- <h4 class="panel-title">
- <a role="button" data-toggle="collapse" href aria-expanded="{{isOpen}}" aria-controls="{{::panelId}}" tabindex="0" class="accordion-toggle"
- ng-click="toggleOpen()" uib-accordion-transclude="heading" ng-disabled="isDisabled" uib-tabindex-toggle>
- <i class="pull-left fa" ng-class="{'fa-chevron-down': isOpen, 'fa-chevron-right': !isOpen}"></i>
- <span uib-accordion-header ng-class="{'text-muted': isDisabled}">{{heading}}</span>
- </a>
- </h4>
-</div>
-<div id="{{::panelId}}" aria-labelledby="{{::headingId}}" aria-hidden="{{!isOpen}}" role="tabpanel" class="panel-collapse collapse"
- uib-collapse="!isOpen">
- <div class="panel-body" ng-transclude></div>
- </div> \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/pom.xml b/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/pom.xml
deleted file mode 100644
index bec94c14..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/mwtnInventory/pom.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?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>
- </parent>
- <packaging>pom</packaging>
- <groupId>com.highstreet.technologies.odl.dlux</groupId>
- <artifactId>mwtnInventory</artifactId>
- <version>0.5.1-SNAPSHOT</version>
- <name>${prefix} ${project.artifactId}</name>
-
- <prerequisites>
- <maven>3.0</maven>
- </prerequisites>
-
- <modules>
- <module>mwtnInventory-module</module>
- <module>mwtnInventory-bundle</module>
- </modules>
-</project>