diff options
author | demx8as6 <martin.skorupski@highstreet-technologies.com> | 2018-07-10 18:07:44 +0200 |
---|---|---|
committer | Timoney, Dan (dt5972) <dt5972@att.com> | 2018-07-11 16:30:28 -0400 |
commit | 27fb2d06608fbb070ae2c15a5580a4f5b2423d15 (patch) | |
tree | ccd717991b4e556b67f1fd2cacb345b4d174b41f /sdnr/wireless-transport/code-Carbon-SR1/ux/ethService | |
parent | 60315525ab5e7c12a9f47c409092e8dba6ad656d (diff) |
Add seed code for sdnr app based on ONF Centennial
At this point in time all the Carbon code from ONF Centennial is added to ONAP.
Later it needs to be refactored and modified for ODL Oxygen.
Change-Id: Iff85dd940c05c3827f1c4e6f9542ecd060c58a46
Issue-ID: SDNC-374
Signed-off-by: demx8as6 <martin.skorupski@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wireless-transport/code-Carbon-SR1/ux/ethService')
10 files changed, 342 insertions, 0 deletions
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-bundle/pom.xml b/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-bundle/pom.xml new file mode 100644 index 00000000..d0850dea --- /dev/null +++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-bundle/pom.xml @@ -0,0 +1,118 @@ +<?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> + + <artifactId>ethService-bundle</artifactId> + <packaging>bundle</packaging> + <name>${prefix} ${project.artifactId}</name> + + <parent> + <artifactId>ethService</artifactId> + <groupId>com.highstreet.technologies.odl.dlux</groupId> + <version>0.5.1-SNAPSHOT</version> + </parent> + + <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>ethService-module</artifactId> + <version>${project.version}</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>ethService-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/ethService/ethService-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml new file mode 100644 index 00000000..b92ee913 --- /dev/null +++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-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="ethService"/> + <property name="url" value="/src/app/ethService"/> + <property name="directory" value="/ethService"/> + <property name="requireJs" value="app/ethService/ethService.module"/> + <property name="angularJs" value="app.ethService"/> + <property name="cssDependencies"> + <list> + <value>src/app/ethService/ethService-custom.css</value> + </list> + </property> + </bean> +</blueprint>
\ No newline at end of file diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-module/pom.xml b/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-module/pom.xml new file mode 100644 index 00000000..6a99723c --- /dev/null +++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-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> + <artifactId>ethService-module</artifactId> + <name>${prefix} ${project.artifactId}</name> + <packaging>jar</packaging> + <parent> + <artifactId>ethService</artifactId> + <groupId>com.highstreet.technologies.odl.dlux</groupId> + <version>0.5.1-SNAPSHOT</version> + </parent> +</project>
\ No newline at end of file diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-module/src/main/resources/ethService/ethService-custom.css b/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-module/src/main/resources/ethService/ethService-custom.css new file mode 100644 index 00000000..fed4402a --- /dev/null +++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-module/src/main/resources/ethService/ethService-custom.css @@ -0,0 +1,58 @@ +/** + * Add your application related css here + */ +.ethServiceGrid { + height: 600px; + background-color: white; +} + +.ethServiceGrid span { + color: #393939; +} +.ht-pagination span { + color: #393939; +} +.ht-pagination span.dark { + color: #393939; +} +.dark { + color: #393939; +} + + + +.ethServiceGrid div.debug { + color: #393939; + background-color: white; +} +.ethServiceGrid div.error { + color: #ff0000; + background-color: #ffeeee; + font-weight: bold; +} + +.ethServiceGrid div.info { + color: #3276b1; + background-color: #eeeeff; +} + +.ethServiceGrid div.warning { + color: #ffa500; + background-color: #ffeedd; +} + +.rotated { + transform: rotate(180deg); + -webkit-transform: rotate(180deg); + -ms-transform: rotate(180deg); + -moz-transform: rotate(180deg); + -o-transform: rotate(180deg); +} + +h3.modal-title { + color: #393939; +} + +.modal-body span { + color: #393939; +}
\ No newline at end of file diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-module/src/main/resources/ethService/ethService.controller.js b/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-module/src/main/resources/ethService/ethService.controller.js new file mode 100644 index 00000000..080aa33b --- /dev/null +++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-module/src/main/resources/ethService/ethService.controller.js @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2017 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/ethService/ethService.module', + 'app/ethService/ethService.services'], + function (ethServiceApp) { + + ethServiceApp.register.controller('ethServiceCtrl', ['uiGridConstants', '$uibModal', '$scope', '$rootScope', '$window', '$timeout', '$ethService', '$mwtnLog', + function (uiGridConstants, $uibModal, $scope, $rootScope, $window, $timeout, $ethService, $mwtnLog) { + + var COMPONENT = 'ethServiceCtrl'; + $mwtnLog.info({ component: COMPONENT, message: 'ethServiceCtrl started!' }); + + $rootScope.section_logo = 'src/app/ethService/images/ethService.png'; // Add your topbar logo location here such as 'assets/images/logo_topology.gif' + + $scope.highlightFilteredHeader = $ethService.highlightFilteredHeader; + + }]); + + }); diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-module/src/main/resources/ethService/ethService.module.js b/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-module/src/main/resources/ethService/ethService.module.js new file mode 100644 index 00000000..14729451 --- /dev/null +++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-module/src/main/resources/ethService/ethService.module.js @@ -0,0 +1,56 @@ +/* + * 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 ethServiceApp = angular.module('app.ethService', ['ui.grid', 'ui.bootstrap', 'app.core', + 'ui.router.state', 'config', 'ui.grid.exporter', + 'ui.grid.moveColumns', 'ui.grid.pinning', 'ui.grid.selection', + 'ui.grid.resizeColumns', 'ui.grid.infiniteScroll','ui.grid.pagination' ]); + + ethServiceApp.config(function($stateProvider, $compileProvider, $controllerProvider, $provide, NavHelperProvider, $translateProvider) { + ethServiceApp.register = { + controller : $controllerProvider.register, + directive : $compileProvider.directive, + factory : $provide.factory, + service : $provide.service + }; + + + NavHelperProvider.addControllerUrl('app/ethService/ethService.controller'); + NavHelperProvider.addToMenu('ethService', { + "link" : "#/ethService/", + "active" : "main.ethService", + "title" : "ETH Service", + "icon" : "fa fa-arrows-h", // Add navigation icon css class here + "page" : { + "title" : "ETH Service", + "description" : "Ethernet Service Provisioning" + } + }); + + var access = routingConfig.accessLevels; + + $stateProvider.state('main.ethService', { + url: 'ethService/:nodeId', + access: access.admin, + views : { + 'content' : { + templateUrl: 'src/app/ethService/ethService.tpl.html', + controller: 'ethServiceCtrl' + } + } + }); + + }); + + return ethServiceApp; +}); diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-module/src/main/resources/ethService/ethService.services.js b/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-module/src/main/resources/ethService/ethService.services.js new file mode 100644 index 00000000..fa8ef2f6 --- /dev/null +++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-module/src/main/resources/ethService/ethService.services.js @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2017 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/ethService/ethService.module', 'app/mwtnCommons/mwtnCommons.services'], function (ethServiceApp) { + + ethServiceApp.register.factory('$ethService', function ($q, $http, Base64, $mwtnCommons, $mwtnDatabase, $mwtnLog) { + + var service = {}; + + service.checkModules = $mwtnCommons.checkModules; + + + return service; + }); +}); diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-module/src/main/resources/ethService/ethService.tpl.html b/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-module/src/main/resources/ethService/ethService.tpl.html new file mode 100644 index 00000000..b5f022f8 --- /dev/null +++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-module/src/main/resources/ethService/ethService.tpl.html @@ -0,0 +1,9 @@ +<ht-header help-link='sdnr/ethService/0.4.0/README.md'></ht-header> + +<h1 style="color: red; transform: rotate(-30deg);">Under Construction</h1> +<br/><br/><br/><br/><br/> + +<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/ethService/ethService-module/src/main/resources/ethService/images/ethService.png b/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-module/src/main/resources/ethService/images/ethService.png Binary files differnew file mode 100755 index 00000000..9cca24f1 --- /dev/null +++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/ethService-module/src/main/resources/ethService/images/ethService.png diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/pom.xml b/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/pom.xml new file mode 100644 index 00000000..ba49da79 --- /dev/null +++ b/sdnr/wireless-transport/code-Carbon-SR1/ux/ethService/pom.xml @@ -0,0 +1,23 @@ +<?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> + + + <groupId>com.highstreet.technologies.odl.dlux</groupId> + <artifactId>ethService</artifactId> + <name>${prefix} ${project.artifactId}</name> + <packaging>pom</packaging> + + <parent> + <artifactId>mwtn</artifactId> + <groupId>com.highstreet.technologies.odl.dlux</groupId> + <version>0.5.1-SNAPSHOT</version> + </parent> + + <modules> + <module>ethService-module</module> + <module>ethService-bundle</module> + </modules> + +</project> |