aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat')
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-bundle/pom.xml116
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml19
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/pom.xml14
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/logo_chat.gifbin2046 -> 0 bytes
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat-custom.css3
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat.controller.js69
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat.module.js50
-rwxr-xr-xsdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat.pngbin1862 -> 0 bytes
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat.services.js103
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat.tpl.html102
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/pom.xml27
11 files changed, 0 insertions, 503 deletions
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-bundle/pom.xml b/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-bundle/pom.xml
deleted file mode 100644
index 87ebbd3c..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-bundle/pom.xml
+++ /dev/null
@@ -1,116 +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>odlChat</artifactId>
- <groupId>com.highstreet.technologies.odl.dlux</groupId>
- <version>0.5.1-SNAPSHOT</version>
- </parent>
- <artifactId>odlChat-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>com.highstreet.technologies.odl.dlux</groupId>
- <artifactId>odlChat-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>odlChat-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/odlChat/odlChat-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml
deleted file mode 100644
index ad015bd2..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-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="odlChat"/>
- <property name="url" value="/src/app/odlChat"/>
- <property name="directory" value="/odlChat"/>
- <property name="requireJs" value="app/odlChat/odlChat.module"/>
- <property name="angularJs" value="app.odlChat"/>
- <property name="cssDependencies">
- <list>
- <value>src/app/odlChat/odlChat-custom.css</value>
- </list>
- </property>
- </bean>
-</blueprint> \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/pom.xml b/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/pom.xml
deleted file mode 100644
index 730c40b1..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/pom.xml
+++ /dev/null
@@ -1,14 +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>odlChat</artifactId>
- <groupId>com.highstreet.technologies.odl.dlux</groupId>
- <version>0.5.1-SNAPSHOT</version>
- </parent>
- <artifactId>odlChat-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/odlChat/odlChat-module/src/main/resources/odlChat/logo_chat.gif b/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/logo_chat.gif
deleted file mode 100644
index deb44fd2..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/logo_chat.gif
+++ /dev/null
Binary files differ
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat-custom.css b/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat-custom.css
deleted file mode 100644
index 4d9f8d24..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat-custom.css
+++ /dev/null
@@ -1,3 +0,0 @@
-/**
- * Add your application related css here
- */ \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat.controller.js b/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat.controller.js
deleted file mode 100644
index 310e05d5..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat.controller.js
+++ /dev/null
@@ -1,69 +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/odlChat/odlChat.module', 'app/odlChat/odlChat.services' ],
- function(odlChatApp) {
-
- var main = function($scope, $rootScope, $odlChat) {
-
- $rootScope.section_logo = 'src/app/odlChat/odlChat.png';
-
- $scope.collection = [];
- $scope.chat = {
- nickname : 'anonymous',
- message : "Hey, what's up?!"
- };
-
- var listenToNotifications = function(socketLocation) {
- try {
- var notificatinSocket = new WebSocket(socketLocation);
-
- notificatinSocket.onmessage = function(event) {
- // we process our received event here
- $odlChat.getData(event, function(info, tweet) {
- $scope.collection.push(tweet);
- if ($scope.collection.length > 20) {
- $scope.collection.shift();
- }
-
- $scope.chat.message = info;
- });
- };
- notificatinSocket.onerror = function(error) {
- console.log("Socket error: " + JSON.stringify(error));
- };
- notificatinSocket.onopen = function(event) {
- console.log("Socket connection opened.");
- };
- notificatinSocket.onclose = function(event) {
- console.log("Socket connection closed.");
- };
- // if there is a problem on socket creation we get
- // exception (i.e. when socket address is incorrect)
- } catch (e) {
- alert("Error when creating WebSocket" + e);
- }
- };
-
- $scope.send = function(chat) {
- $odlChat.send(chat, function(info) {
- console.log(info);
- });
- };
-
- var path = "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='odlChat']";
- $odlChat.register(path, function(socketLocation) {
- listenToNotifications(socketLocation);
- });
- };
-
- odlChatApp.register.controller('odlChatCtrl', [ '$scope', '$rootScope',
- '$odlChat', main ]);
-
- }); \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat.module.js b/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat.module.js
deleted file mode 100644
index 6bd5387f..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat.module.js
+++ /dev/null
@@ -1,50 +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(['angularAMD', 'app/routingConfig', 'app/core/core.services', 'common/config/env.module'], function(ng) {
- var odlChatApp = angular.module('app.odlChat', ['app.core', 'ui.router.state','config']);
-
- odlChatApp.config(function($stateProvider, $compileProvider, $controllerProvider, $provide, NavHelperProvider, $translateProvider) {
- odlChatApp.register = {
- controller : $controllerProvider.register,
- directive : $compileProvider.directive,
- factory : $provide.factory,
- service : $provide.service
-
- };
-
-
- NavHelperProvider.addControllerUrl('app/odlChat/odlChat.controller');
- NavHelperProvider.addToMenu('odlChat', {
- "link" : "#/odlChat",
- "active" : "main.odlChat",
- "title" : "Chat",
- "icon" : "fa-comments", // Add navigation icon css class here
- "page" : {
- "title" : "Chat",
- "description" : "odlChat"
- }
- });
-
- var access = routingConfig.accessLevels;
-
- $stateProvider.state('main.odlChat', {
- url: 'odlChat',
- access: access.admin,
- views : {
- 'content' : {
- templateUrl: 'src/app/odlChat/odlChat.tpl.html',
- controller: 'odlChatCtrl'
- }
- }
- });
-
- });
-
- return odlChatApp;
-});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat.png b/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat.png
deleted file mode 100755
index 3b79097e..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat.png
+++ /dev/null
Binary files differ
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat.services.js b/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat.services.js
deleted file mode 100644
index 1a137f5c..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat.services.js
+++ /dev/null
@@ -1,103 +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/mwtnCommons/mwtnCommons.module', 'app/odlChat/odlChat.module'],function(odlChatApp) {
-
- odlChatApp.register.factory('$odlChat', function($http, $mwtnCommons) {
-
- var createStream = function(streamName, callback) {
- var request = {
- method : 'GET',
- url : [ service.base, 'streams/stream/', streamName ].join('')
- };
- $http(request).then(function successCallback(response) {
- console.log(response.headers('Location'));
- callback(response.headers('Location'));
- }, function errorCallback(response) {
- console.error(JSON.stringify(response));
- callback();
- });
- };
-
- var service = {
- base : window.location.origin + "/restconf/",
- };
-
-
- service.getData = function(event, callback) {
-
- var request = {
- method : 'GET',
- url : [ service.base,
- 'config/opendaylight-inventory:nodes/node/odlChat/' ].join('')
- };
- $http(request).then(function successCallback(response) {
- tweet = {
- nickname : response.data.node[0]['flow-node-inventory:manufacturer'],
- message : response.data.node[0]['flow-node-inventory:description'],
- time : JSON.stringify(new Date()).split('T')[1].substring(0, 5)
- };
- callback('', tweet);
- }, function errorCallback(response) {
- console.error(JSON.stringify(response));
- callback('ERROR while sending ;(');
- });
-
- };
-
- service.register = function(path, callback) {
- var request = {
- method : 'POST',
- url : [ service.base,
- 'operations/sal-remote:create-data-change-event-subscription' ]
- .join(''),
- data : {
- "input" : {
- "path" : path,
- "sal-remote-augment:datastore" : "CONFIGURATION",
- "sal-remote-augment:scope" : "SUBTREE"
- }
- }
- };
- $http(request).then(
- function successCallback(response) {
- createStream(response.data.output['stream-name'], function(
- socketLocation) {
- callback(socketLocation);
- });
- }, function errorCallback(response) {
- console.error(JSON.stringify(response));
- });
- };
-
- service.send = function(chat, callback) {
- var request = {
- method : 'PUT',
- url : [ service.base,
- 'config/opendaylight-inventory:nodes/node/odlChat' ].join(''),
- data : {
- "node" : [ {
- "id" : "odlChat",
- "flow-node-inventory:manufacturer" : chat.nickname,
- "flow-node-inventory:software" : "",
- "flow-node-inventory:serial-number" : "",
- "flow-node-inventory:hardware" : "",
- "flow-node-inventory:description" : chat.message
- } ]
- }
- };
- $http(request).then(function successCallback(response) {
- callback('send successfully');
- }, function errorCallback(response) {
- console.error(JSON.stringify(response));
- callback('ERROR while sending ;(');
- });
- };
- return service;
- });
-}); \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat.tpl.html b/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat.tpl.html
deleted file mode 100644
index c3d90ae3..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/odlChat-module/src/main/resources/odlChat/odlChat.tpl.html
+++ /dev/null
@@ -1,102 +0,0 @@
-<!-- This is the landing page of you application, Update the content as per your requirements -->
-<div class="owl container" style="width: 800px">
-
- <div class="row">
- <div class="col-md-11">
- <h4>Simple chat application based on (ODL) WebSockets</h4>
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-11">
- <hr/ >
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-11">
- <p>
- <span class="white">The beauty of WebSockets within OpenDaylight.</span>
- </p>
- <p>
- <span class="white">Useful links:</span>
- <ul>
- <li>
- <a href="https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Restconf:Change_event_notification_subscription">
- <span class="white">https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Restconf:Change_event_notification_subscription</span>
- </a>
- </li>
- <li>
- <a href="https://wiki.opendaylight.org/view/OpenDaylight_DLUX:Create_application_with_archetype">
- <span class="white">https://wiki.opendaylight.org/view/OpenDaylight_DLUX:Create_application_with_archetype</span>
- </a>
- </li>
- </ul>
- </p>
- <p>
- <span class="white">Code:</span>
- <ul>
- <li>
- <a href="https://github.com/OpenNetworkingFoundation/CENTENNIAL/tree/master/code/ux/odlChat">
- <span class="white">https://github.com/OpenNetworkingFoundation/CENTENNIAL/tree/master/code/ux/odlChat</span>
- </a>
- </li>
- </ul>
- </p>
-
-
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-11">
- <hr/ >
- </div>
- </div>
-
- <div class="row" ng-repeat="tweet in collection">
- <div class="col-md-2 text-right">
- <span class="white">{{tweet.nickname}}:</span>
- </div>
- <div class="col-md-8">
- <span class="white">
- <b>{{tweet.message}}</b>
- </span>
- </div>
- <div class="col-md-1">
- <span>{{tweet.time}}</span>
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-11">
- <hr/ >
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-2 text-right">
- <input class="form-control" type="text" step="1" ng-model="chat.nickname" />
- </div>
- <div class="col-md-8 text-right">
- <input class="form-control" type="text" step="1" ng-model="chat.message" />
- </div>
- <div class="col-md-1">
- <button class="btn btn-primary" type="submit" ng-click="send(chat)">{{'MWTN_SEND' | translate}}</button>
- </div>
- </div>
-
- <div class="row">
- <div class="col-md-2 text-right">
- <span class="white">{{'MWTN_NICKNAME' | translate}} </span>
- </div>
- <div class="col-md-8 text-right">
- <span class="white">{{'MWTN_MESSAGE' | translate}} </span>
- </div>
- <div class="col-md-1"></div>
- </div>
-</div>
-<hr />
-<div class="owl">
- <span class="white">ONAP SDN-R | ONF Wireless for @distversion@ - Build: @buildtime@</span>
-</div>
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/pom.xml b/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/pom.xml
deleted file mode 100644
index f81b02ed..00000000
--- a/sdnr/wireless-transport/code-Carbon-SR1/ux/odlChat/pom.xml
+++ /dev/null
@@ -1,27 +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>
- <relativePath>..</relativePath>
- </parent>
-
- <packaging>pom</packaging>
- <groupId>com.highstreet.technologies.odl.dlux</groupId>
- <artifactId>odlChat</artifactId>
- <version>0.5.1-SNAPSHOT</version>
- <name>${prefix} ${project.artifactId}</name>
-
- <prerequisites>
- <maven>3.0</maven>
- </prerequisites>
-
- <modules>
- <module>odlChat-module</module>
- <module>odlChat-bundle</module>
- </modules>
-</project> \ No newline at end of file