summaryrefslogtreecommitdiffstats
path: root/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common')
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/LICENSE208
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/README.md51
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/authentification/auth.module.js19
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/authentification/auth.services.js199
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/authentification/auth.spec.js111
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/config/env.module.js37
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.general.directives.js43
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.general.filters.js15
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.general.module.js5
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.general.services.js63
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.navigation.directives.js232
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.navigation.module.js6
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/finishRender.module.js24
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/layout/index.tpl.html17
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/layout/layout.module.js44
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/forgot_password.tpl.html45
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.controller.js67
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.less193
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.module.js56
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.spec.js61
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.tpl.html31
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/register.tpl.html74
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/nav_item_template.tpl.html14
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation-min.less225
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.controller.js40
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.less19
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.module.js20
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.services.js14
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.spec.js103
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.tpl.html6
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/messages.tpl.html28
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/notifications.tpl.html25
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/tasks.tpl.html32
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.controller.js54
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.directives.js40
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.less40
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.module.js11
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.services.js103
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.tpl.html25
-rw-r--r--sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/user_menu.tpl.html1
40 files changed, 2401 insertions, 0 deletions
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/LICENSE b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/LICENSE
new file mode 100644
index 00000000..82d2ab25
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/LICENSE
@@ -0,0 +1,208 @@
+Eclipse Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
+LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
+CONSTITUTES RECIPIENT’S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are
+distributed by that particular Contributor. A Contribution 'originates' from a
+Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor’s behalf. Contributions do not include additions to
+the Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii) are not
+derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are
+necessarily infringed by the use or sale of its Contribution alone or when
+combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement,
+including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free copyright license to
+reproduce, prepare derivative works of, publicly display, publicly perform,
+distribute and sublicense the Contribution of such Contributor, if any, and such
+derivative works, in source code and object code form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
+Patents to make, use, sell, offer to sell, import and otherwise transfer the
+Contribution of such Contributor, if any, in source code and object code form.
+This patent license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor, such
+addition of the Contribution causes such combination to be covered by the
+Licensed Patents. The patent license shall not apply to any other combinations
+which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to
+its Contributions set forth herein, no assurances are provided by any
+Contributor that the Program does not infringe the patent or other intellectual
+property rights of any other entity. Each Contributor disclaims any liability to
+Recipient for claims brought by any other entity based on infringement of
+intellectual property rights or otherwise. As a condition to exercising the
+rights and licenses granted hereunder, each Recipient hereby assumes sole
+responsibility to secure any other intellectual property rights needed, if any.
+For example, if a third party patent license is required to allow Recipient to
+distribute the Program, it is Recipient’s responsibility to acquire that license
+before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its
+own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+i) effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title and
+non-infringement, and implied warranties or conditions of merchantability and
+fitness for a particular purpose;
+
+ii) effectively excludes on behalf of all Contributors all liability for
+damages, including direct, indirect, special, incidental and consequential
+damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by
+that Contributor alone and not by any other party; and
+
+iv) states that source code for the Program is available from such Contributor,
+and informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the
+Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if
+any, in a manner that reasonably allows subsequent Recipients to identify the
+originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with
+respect to end users, business partners and the like. While this license is
+intended to facilitate the commercial use of the Program, the Contributor who
+includes the Program in a commercial product offering should do so in a manner
+which does not create potential liability for other Contributors. Therefore, if
+a Contributor includes the Program in a commercial product offering, such
+Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
+every other Contributor ("Indemnified Contributor") against any losses, damages
+and costs (collectively "Losses") arising from claims, lawsuits and other legal
+actions brought by a third party against the Indemnified Contributor to the
+extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor to
+control, and cooperate with the Commercial Contributor in, the defense and any
+related settlement negotiations. The Indemnified Contributor may participate in
+any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product
+offering, Product X. That Contributor is then a Commercial Contributor. If that
+Commercial Contributor then makes performance claims, or offers warranties
+related to Product X, those performance claims and warranties are such
+Commercial Contributor’s responsibility alone. Under this section, the
+Commercial Contributor would have to defend claims against the other
+Contributors related to those performance claims and warranties, and if a court
+requires any other Contributor to pay any damages as a result, the Commercial
+Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
+Recipient is solely responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its exercise of
+rights under this Agreement , including but not limited to the risks and costs
+of program errors, compliance with applicable laws, damage to or loss of data,
+programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
+CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable
+law, it shall not affect the validity or enforceability of the remainder of the
+terms of this Agreement, and without further action by the parties hereto, such
+provision shall be reformed to the minimum extent necessary to make such
+provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a
+cross-claim or counterclaim in a lawsuit) alleging that the Program itself
+(excluding combinations of the Program with other software or hardware)
+infringes such Recipient’s patent(s), then such Recipient’s rights granted under
+Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient’s rights under this Agreement shall terminate if it fails to
+comply with any of the material terms or conditions of this Agreement and does
+not cure such failure in a reasonable period of time after becoming aware of
+such noncompliance. If all Recipient’s rights under this Agreement terminate,
+Recipient agrees to cease use and distribution of the Program as soon as
+reasonably practicable. However, Recipient’s obligations under this Agreement
+and any licenses granted by Recipient relating to the Program shall continue and
+survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in
+order to avoid inconsistency the Agreement is copyrighted and may only be
+modified in the following manner. The Agreement Steward reserves the right to
+publish new versions (including revisions) of this Agreement from time to time.
+No one other than the Agreement Steward has the right to modify this Agreement.
+The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation
+may assign the responsibility to serve as the Agreement Steward to a suitable
+separate entity. Each new version of the Agreement will be given a
+distinguishing version number. The Program (including Contributions) may always
+be distributed subject to the version of the Agreement under which it was
+received. In addition, after a new version of the Agreement is published,
+Contributor may elect to distribute the Program (including its Contributions)
+under the new version. Except as expressly stated in Sections 2(a) and 2(b)
+above, Recipient receives no rights or licenses to the intellectual property of
+any Contributor under this Agreement, whether expressly, by implication,
+estoppel or otherwise. All rights in the Program not expressly granted under
+this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the
+intellectual property laws of the United States of America. No party to this
+Agreement will bring a legal action under this Agreement more than one year
+after the cause of action arose. Each party waives its rights to a jury trial in
+any resulting litigation.
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/README.md b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/README.md
new file mode 100644
index 00000000..7391578f
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/README.md
@@ -0,0 +1,51 @@
+# OpenDaylight DLUX
+
+OpenDaylight DLUX is a Javascript-based stateless user interface that communicates with the service backend to provide a consistent and user-friendly interface to interact with OpenDaylight projects and base controller.
+
+
+## Build DLUX code with Karaf feature and distribution
+
+All necessary modules mentioned above such as nodesjs, bower etc. will be installed automatically, when you run the dlux build for first time. Run following command at dlux home directory /dlux to build dlux feature and distribution along with code.
+Once successful, It will make dlux feature available to install and also create dlux karaf distribution. You can find karaf distribution at dlux/distribution-dlux.
+
+ $ mvn clean install
+
+__NOTE__: Some people reported about node related error while maven build. Those errors are usually environment related, mostly happens because of the permission issues or node is not installed properly. Try to reinstall node manually.
+
+### Install NodeJS manually if needed
+
+__For Windows and Mac without brew:__
+
+ Go to http://www.nodejs.org
+ Download and install NodeJS
+
+__For Mac with brew installed:__
+
+ $ brew update
+ $ brew install node
+
+__Verify NodeJS is installed:__
+
+ $ npm --version
+
+__Run DLUX in karaf distribution__
+
+Once you have dlux distribution or you have karaf distribution from integration repository. You can turn on the dlux feature to access the UI.
+We will take example of dlux distribution here. Navigate to directory dlux/distribution-dlux/target/assembly/bin and start the karaf via following command -
+
+ ./karaf
+
+On the karaf shell, install dlux core feature via running following command -
+
+ feature:install odl-dlux-core
+
+
+It will internally install odl-restconf and dlux topology application along with core dlux components. once this feature is successfully installed.
+Access the dlux UI at __http://localhost:8181/index.html__. Default credentials are admin/admin for login.
+
+All the applications in dlux are now karaf features. You can install other dlux applications such as nodes, yang-ui from karaf console using commands such as
+
+ feature:install odl-dlux-node
+ feature:install odl-dlux-yangui
+
+For more details - follow the wiki at [dlux opendaylight](https://wiki.opendaylight.org/view/OpenDaylight_dlux:Getting_started)
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/authentification/auth.module.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/authentification/auth.module.js
new file mode 100644
index 00000000..ec953e40
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/authentification/auth.module.js
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2014 Inocybe Technologies, and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+define(['angular', './auth.services', 'common/config/env.module'], function (angular, services) {
+ 'use strict';
+ var auth = angular.module('app.common.auth', ['config']);
+
+ // services
+ auth.factory('Auth', services.Auth);
+ auth.factory('Base64', services.Base64);
+ auth.factory('NbInterceptor', services.NbInterceptor);
+
+ return auth;
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/authentification/auth.services.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/authentification/auth.services.js
new file mode 100644
index 00000000..da07de2d
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/authentification/auth.services.js
@@ -0,0 +1,199 @@
+/*
+ * Copyright (c) 2014 Inocybe Technologies, and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+define([], function () {
+ 'use strict';
+
+ var Auth = function ($http, $window, Base64, ENV) {
+ var factory = {};
+ // Set Authorization header to username + password
+ factory.setBasic = function (user, pw) {
+ $window.localStorage.odlUser = user;
+ $window.localStorage.odlPass = pw;
+ // for backward compatibility
+ $window.sessionStorage.odlUser = user;
+ $window.sessionStorage.odlPass = pw;
+ };
+
+ // for backward compatibility
+ if ($window.localStorage.odlUser && $window.localStorage.odlPass) {
+ $window.sessionStorage.odlUser = $window.localStorage.odlUser;
+ $window.sessionStorage.odlPass = $window.localStorage.odlPass;
+ }
+
+ factory.unsetBasic = function () {
+ if ($http.defaults.headers.common.Authorization !== null) {
+ delete $http.defaults.headers.common.Authorization;
+ }
+ $window.localStorage.clear();
+ $window.sessionStorage.clear();
+ document.cookie = 'JSESSIONID=; Path=/restconf; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
+ };
+
+ // Return the current user object
+ factory.getUser = function () {
+ var user = $window.localStorage.odlUser || null;
+ return user;
+ };
+
+ factory.authorize = function (accessLevel, role) {
+ if (role === undefined) {
+ role = currentUser.role;
+ }
+ return accessLevel.bitMask & role.bitMask;
+ };
+ factory.isAuthed = function () {
+ var authed = factory.getUser() ? true : false;
+ return authed;
+ };
+ factory.isLoggedIn = function (user) {
+ if (user === undefined) {
+ user = currentUser;
+ }
+ return user.role.title === userRoles.user.title || user.role.title === userRoles.admin.title;
+ };
+ factory.login = function (user, pw, cb, eb) {
+ factory.setBasic(user, pw);
+ $http.get(ENV.getBaseURL('MD_SAL') + '/restconf/modules')
+ .success(function (data) {
+ cb(data);
+ })
+ .error(function (resp) {
+ if (resp.errors) {
+ var errorDetails = resp.errors.error[0];
+ if (errorDetails && errorDetails['error-tag'] === 'data-missing') {
+ // Authentication succeed, but API does not have data, allow to enter
+ cb(resp);
+ return;
+ }
+ }
+ factory.unsetBasic();
+ eb(resp);
+ });
+ };
+ factory.logout = function (success) {
+ factory.unsetBasic();
+ success();
+ };
+ return factory;
+ };
+ Auth.$inject = ['$http', '$window', 'Base64', 'ENV'];
+
+ var Base64 = function () {
+ var keyStr = 'ABCDEFGHIJKLMNOP' +
+ 'QRSTUVWXYZabcdef' +
+ 'ghijklmnopqrstuv' +
+ 'wxyz0123456789+/' +
+ '=';
+ return {
+ encode: function (input) {
+ var output = "";
+ var chr1, chr2, chr3 = "";
+ var enc1, enc2, enc3, enc4 = "";
+ var i = 0;
+
+ do {
+ chr1 = input.charCodeAt(i++);
+ chr2 = input.charCodeAt(i++);
+ chr3 = input.charCodeAt(i++);
+
+ enc1 = chr1 >> 2;
+ enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
+ enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
+ enc4 = chr3 & 63;
+
+ if (isNaN(chr2)) {
+ enc3 = enc4 = 64;
+ } else if (isNaN(chr3)) {
+ enc4 = 64;
+ }
+
+ output = output +
+ keyStr.charAt(enc1) +
+ keyStr.charAt(enc2) +
+ keyStr.charAt(enc3) +
+ keyStr.charAt(enc4);
+ chr1 = chr2 = chr3 = "";
+ enc1 = enc2 = enc3 = enc4 = "";
+ } while (i < input.length);
+
+ return output;
+ },
+ decode: function (input) {
+ var output = "";
+ var chr1, chr2, chr3 = "";
+ var enc1, enc2, enc3, enc4 = "";
+ var i = 0;
+
+ // remove all characters that are not A-Z, a-z, 0-9, +, /, or =
+ var base64test = /[^A-Za-z0-9\+\/\=]/g;
+ if (base64test.exec(input)) {
+ alert("There were invalid base64 characters in the input text.\n" +
+ "Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\n" +
+ "Expect errors in decoding.");
+ }
+
+ input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
+
+ do {
+ enc1 = keyStr.indexOf(input.charAt(i++));
+ enc2 = keyStr.indexOf(input.charAt(i++));
+ enc3 = keyStr.indexOf(input.charAt(i++));
+ enc4 = keyStr.indexOf(input.charAt(i++));
+
+ chr1 = (enc1 << 2) | (enc2 >> 4);
+ chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
+ chr3 = ((enc3 & 3) << 6) | enc4;
+
+ output = output + String.fromCharCode(chr1);
+
+ if (enc3 != 64) {
+ output = output + String.fromCharCode(chr2);
+ }
+ if (enc4 != 64) {
+ output = output + String.fromCharCode(chr3);
+ }
+
+ chr1 = chr2 = chr3 = "";
+ enc1 = enc2 = enc3 = enc4 = "";
+
+ } while (i < input.length);
+
+ return output;
+ }
+ };
+ };
+
+ // Filter to add authorization header if its a nb api call
+ var NbInterceptor = function ($q, $window, Base64) {
+ return {
+ request: function (config) {
+ // Use AAA basic authentication
+ if (config.url.indexOf('restconf') !== -1 || config.url.indexOf('apidoc') !== -1) {
+ config.headers = config.headers || {};
+ if ($window.localStorage.odlUser && $window.localStorage.odlPass) {
+ var encoded = Base64.encode($window.localStorage.odlUser + ':' + $window.localStorage.odlPass);
+ config.headers.Authorization = 'Basic ' + encoded;
+ }
+ }
+ return config;
+ },
+ response: function (response) {
+ return response || $q.when(response);
+ }
+ };
+ };
+ NbInterceptor.$inject = ['$q', '$window', 'Base64'];
+
+ return {
+ Auth: Auth,
+ Base64: Base64,
+ NbInterceptor: NbInterceptor
+ };
+
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/authentification/auth.spec.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/authentification/auth.spec.js
new file mode 100644
index 00000000..911b56cf
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/authentification/auth.spec.js
@@ -0,0 +1,111 @@
+define(['common/authentification/auth.module'], function () {
+ describe('Auth Module', function () {
+ var _Auth, httpBackend, deferred;
+ beforeEach(module('app.common.auth'));
+
+ beforeEach(inject(function ($injector) {
+ _Auth = $injector.get('Auth');
+ httpBackend = $injector.get('$httpBackend');
+ }));
+
+ it('Should have defined function facilate the authentication process', function () {
+ expect(_Auth.setBasic).toBeDefined();
+ expect(_Auth.unsetBasic).toBeDefined();
+ expect(_Auth.getUser).toBeDefined();
+ expect(_Auth.authorize).toBeDefined();
+ expect(_Auth.isAuthed).toBeDefined();
+ expect(_Auth.isLoggedIn).toBeDefined();
+ expect(_Auth.login).toBeDefined();
+ expect(_Auth.logout).toBeDefined();
+ });
+
+ describe(':: Authentication header', function () {
+ var username = 'john',
+ password = 'abc123',
+ _window = null;
+
+ beforeEach(inject(function ($window) {
+ _window = $window;
+ }));
+
+ it('Should set the basic authenticate header', function () {
+ _Auth.setBasic(username, password);
+
+ expect(_window.localStorage.odlUser).toBeDefined();
+ expect(_window.localStorage.odlUser).toEqual(username);
+
+ expect(_window.localStorage.odlPass).toBeDefined();
+ expect(_window.localStorage.odlPass).toEqual(password);
+ });
+
+ it('Should unset the basic authenticate header', inject(function ($http) {
+ _Auth.setBasic(username, password);
+ _Auth.unsetBasic();
+
+ expect(_window.localStorage.odlUser).toBeUndefined();
+ expect(_window.localStorage.odlPass).toBeUndefined();
+ expect($http.defaults.headers.common.Authorization).toBeUndefined();
+ }));
+ });
+
+ describe(':: Login management', function () {
+ var username = 'john',
+ password = 'abc123';
+
+ it('Should return the current user or null otherwise', function () {
+ var user = _Auth.getUser();
+ expect(user).toBeNull();
+
+ _Auth.setBasic(username, password);
+ expect(user).toEqual(user);
+ });
+
+ it('Should set the authentication header and send a callback if success', function () {
+ httpBackend.expect('GET', /.*/).respond(200, '');
+ var successSpy = jasmine.createSpy("successSpy");
+ var errorSpy = jasmine.createSpy("errorSpy");
+ spyOn(_Auth, 'setBasic');
+
+ _Auth.login(username, password, successSpy, errorSpy);
+ httpBackend.flush();
+
+ expect(_Auth.setBasic).toHaveBeenCalledWith(username, password);
+ expect(successSpy).toHaveBeenCalled();
+ expect(errorSpy).not.toHaveBeenCalled();
+ });
+
+ it('Should unset the authentication header and send a callback if error', function () {
+ httpBackend.expect('GET', /.*/).respond(404, '');
+ var successSpy = jasmine.createSpy("successSpy");
+ var errorSpy = jasmine.createSpy("errorSpy");
+ spyOn(_Auth, 'setBasic');
+ spyOn(_Auth, 'unsetBasic');
+
+ _Auth.login(username, password, successSpy, errorSpy);
+ httpBackend.flush();
+
+ expect(_Auth.setBasic).toHaveBeenCalledWith(username, password);
+ expect(_Auth.unsetBasic).toHaveBeenCalled();
+ expect(successSpy).not.toHaveBeenCalled();
+ expect(errorSpy).toHaveBeenCalled();
+ });
+
+ it('Should unset the authentication header on logout', function () {
+ var successSpy = jasmine.createSpy("successSpy");
+ spyOn(_Auth, 'unsetBasic');
+
+ _Auth.logout(successSpy);
+
+ expect(_Auth.unsetBasic).toHaveBeenCalled();
+ expect(successSpy).toHaveBeenCalled();
+ });
+
+ afterEach(function () {
+ httpBackend.verifyNoOutstandingExpectation();
+ httpBackend.verifyNoOutstandingRequest();
+ });
+
+ });
+
+ });
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/config/env.module.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/config/env.module.js
new file mode 100644
index 00000000..633ad138
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/config/env.module.js
@@ -0,0 +1,37 @@
+define(['angular'], function (angular) {
+ 'use strict';
+
+ var config = angular.module('config', [])
+ .constant('ENV', {
+
+ baseURL: '',
+ adSalPort: '8080',
+ mdSalPort: '8181',
+ mdSalSecuredPort: '8443',
+ configEnv: 'ENV_PROD',
+ getBaseURL: function (salType) {
+ if (salType !== undefined) {
+ var urlPrefix = '';
+ if (this.configEnv === 'ENV_DEV') {
+ urlPrefix = this.baseURL;
+ } else {
+ urlPrefix = window.location.protocol + '//' + window.location.hostname + ':';
+ }
+
+ if (salType === 'AD_SAL') {
+ return urlPrefix + this.adSalPort;
+ } else if (salType === 'MD_SAL') {
+ var basePort = this.mdSalPort;
+ if (window.location.protocol === 'https:') {
+ basePort = this.mdSalSecuredPort;
+ }
+ return urlPrefix + basePort;
+ }
+ }
+ //default behavior
+ return '';
+ }
+ });
+
+ return config;
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.general.directives.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.general.directives.js
new file mode 100644
index 00000000..78429dc1
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.general.directives.js
@@ -0,0 +1,43 @@
+define(['common/general/common.general.module'], function(general) {
+
+ general.directive('stateIcon', function() {
+ return {
+ restrict: 'E',
+ replace: true,
+ scope: {
+ stateValue: '@value'
+ },
+ template: '<span class="glyphicon glyphicon-{{stateIcon}}-sign"></span>',
+ controller: ['$scope', function ($scope) {
+ var value = $scope.stateValue;
+
+ var icons = {1: 'ok', 0: 'exclamation'};
+ var textStates = {'true': 1, 'false': 0};
+
+ if (_.isString(value) && !value.match('^[0-9]$')) {
+ value = textStates[value];
+ }
+ $scope.stateIcon = icons[value];
+ }]
+
+ };
+ });
+
+ general.directive('portState', function() {
+ return {
+ restrict: 'E',
+ replace: true,
+ scope: {
+ stateValue: '@value'
+ },
+ template: '<span ng-style="{color: stateColor}">{{stateString}}</span>',
+ controller: ['$scope', function ($scope) {
+ var states = {0: 'DOWN', 1: 'UP'};
+ var colors = {0: 'red', 1: 'green'};
+
+ $scope.stateString = states[$scope.stateValue];
+ $scope.stateColor = colors[$scope.stateValue];
+ }]
+ };
+ });
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.general.filters.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.general.filters.js
new file mode 100644
index 00000000..519525c7
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.general.filters.js
@@ -0,0 +1,15 @@
+define(['common/general/common.general.module'], function(general) {
+
+ // Filter to return only valid ports (like id != 0)
+ general.filter('noRootPorts', function () {
+ return function (input) {
+ if (!input) {
+ return;
+ }
+ return input.filter(function(port) {
+ return port.nodeconnector.id !== "0" ? port : null;
+ });
+ };
+ });
+
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.general.module.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.general.module.js
new file mode 100644
index 00000000..68f7c68b
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.general.module.js
@@ -0,0 +1,5 @@
+define(['angularAMD', 'Restangular', 'common/config/env.module'], function(ng) {
+ var general = angular.module('app.common.general', ['restangular', 'config']);
+
+ return general;
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.general.services.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.general.services.js
new file mode 100644
index 00000000..6529ceab
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.general.services.js
@@ -0,0 +1,63 @@
+define(['common/general/common.general.module'], function(general) {
+
+ general.factory('GeneralRestangular', function(Restangular, ENV) {
+ return Restangular.withConfig(function(RestangularConfig) {
+ RestangularConfig.setBaseUrl(ENV.baseURL);
+ });
+ });
+
+
+ general.factory('SwitchSvc', function (GeneralRestangular) {
+ var svc = {
+ base: function (container) {
+ container = container || 'default';
+ return GeneralRestangular.one('controller/nb/v2').one('switchmanager', container);
+ },
+ data: null
+ };
+
+ svc.delete = function(node) {
+ /* console.log(node);
+ return svc.nodeUrl('default', node.node.type, node.node.id).remove();*/
+ };
+
+ // URL for nodes
+ svc.nodesUrl = function (container) {
+ return svc.base(container).all('nodes');
+ };
+
+ // URL for a node
+ svc.nodeUrl = function (container, type, id) {
+ return svc.base(container).one('node', type).one(id);
+ };
+
+ svc.getAll = function (container) {
+ return svc.nodesUrl(container).getList();
+ };
+
+ svc.getConnectorProperties = function (container, type, id) {
+ return svc.nodeUrl(container, type, id).get();
+ };
+
+ svc.itemData = function (i) {
+ return {
+ state: 'node.detail',
+ name: i.properties.description.value !== 'None' ? i.properties.description.value : i.node.type + '/' + i.node.id,
+ params: {nodeId: i.node.id, nodeType: i.node.type}
+ };
+ };
+
+ svc.itemsData = function (data_) {
+ var data = [];
+
+ angular.forEach(data_.nodeProperties, function (value, key) {
+ data.push(svc.itemData(value));
+ });
+
+ return data;
+ };
+
+ return svc;
+ });
+});
+
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.navigation.directives.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.navigation.directives.js
new file mode 100644
index 00000000..9c0dd759
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.navigation.directives.js
@@ -0,0 +1,232 @@
+define(['common/general/common.navigation.module'], function(common) {
+
+ /*
+ * Helper to set CSS class to active via ng-class using $location.path()
+ * or $state.includes()
+ */
+ common.directive('isActive', function($compile) {
+ return {
+ restrict: 'A',
+ replace: false,
+ scope: {
+ state: '@',
+ stateParams: '=',
+ stateActive: '@',
+ url: '@'
+ },
+
+ controller: ['$scope', '$location', '$state', function ($scope, $location, $state) {
+ $scope.$state = $state;
+ $scope.$location = $location;
+ }],
+ compile: function() {
+ return function (scope, iElement, iAttrs, controller) {
+ var active;
+ if (scope.state) {
+ var state = scope.stateActive || scope.$state.current.name.split('.')[0];
+ active = 'active: $state.includes(\'' + scope.state + '\')';
+ } else if (scope.url) {
+ active = 'active: url === $location.path()';
+ } else {
+ active = "false";
+ }
+ iElement.attr('ng-class', '{ ' + active + ' }'); // Adding the ngClass
+ iElement.removeAttr('is-active'); // Avoid infinite loop
+ $compile(iElement)(scope);
+ };
+ }
+ };
+ });
+
+
+ common.directive('brdAnchor', function ($compile, $rootScope) {
+ return {
+ restrict: 'E',
+ replace: true,
+ scope: {
+ label: '@',
+ state: '@',
+ stateParams: '=',
+ url: '@'
+ },
+
+ /* The idea is to support both state and url, to be able to set {active} either
+ if stateActive matches via $state.includes() or if the url matches
+ Change this into a actual href later on ? - see https://github.com/angular-ui/ui-router/issues/395
+ */
+ template: '<a href="" ng-click="doClick()">{{label}}</a>',
+ controller: ['$scope', '$rootScope', '$location', '$state', function ($scope, $rootScope, $location, $state) {
+ $scope.$location = $location;
+ $scope.$state = $state;
+
+ $scope.doClick = function () {
+ var args = {
+ label: $scope.label,
+ state: $scope.state,
+ stateParams: $scope.stateParams,
+ url: $scope.url
+ };
+
+ $rootScope.$broadcast('event:navigation', args);
+
+ if (!$scope.url && $scope.state) {
+ var params = $scope.stateParams || {};
+ $state.transitionTo($scope.state, params, { location: true, inherit: true, relative: $state.$current, notify: true });
+ } else if ($scope.url) {
+ $location.path($scope.url);
+ }
+ };
+ }]
+ };
+ });
+
+
+ common.directive('buttonCancel', function() {
+ // Runs during compile
+ return {
+ restrict: 'E',
+ replace: true,
+ scope: {
+ 'btnLabel': '@label',
+ 'btnSize': '@size',
+ 'btnGlyph': '@glyph',
+ 'cancelFunc': '=function',
+ 'state': '@',
+ 'stateParams': '=',
+ },
+ template: '<button class="btn btn-{{size}} btn-danger" ng-click="doCancel()"><i class="icon-remove-sign"></i> {{label}}</button>',
+ controller: ['$scope', '$state', function ($scope, $state) {
+ $scope.label = $scope.btnLabel || 'Cancel';
+ $scope.size = $scope.btnSize || 'md';
+ $scope.glyph = $scope.btnGlyph || 'remove-circle';
+
+ $scope.doCancel = function () {
+ if (angular.isFunction($scope.cancelFunc)) {
+ $scope.cancelFunc();
+ return;
+ }
+
+ var params = $scope.stateParams || {};
+ $state.transitionTo($scope.state, params, { location: true, inherit: true, relative: $state.$current, notify: true });
+
+ };
+ }]
+ };
+ });
+
+ common.directive('buttonSubmit', function(){
+ // Runs during compile
+ return {
+ restrict: 'E',
+ replace: true,
+ scope: {
+ 'btnLabel': '@label',
+ 'btnSize': '@size',
+ 'btnGlyph': '@glyph',
+ 'submitFunc': '=function',
+ 'form': '=form',
+ 'validator': '='
+ },
+ template: '<button class="btn btn-{{size}} btn-orange" ng-click="doSubmit()" ng-disabled="submitDisabled"><i class="icon-ok-sign"></i> {{label}}</button>',
+ controller: ['$scope', function ($scope) {
+ $scope.label = $scope.btnLabel || 'Submit';
+ $scope.size = $scope.btnSize || 'md';
+ $scope.glyph = $scope.btnGlyph || 'ok-circle';
+
+ $scope.submitDisabled = true;
+
+ $scope.doSubmit = function () {
+ if ($scope.submitFunc) {
+ $scope.submitFunc();
+ }
+ };
+
+ $scope.toggle = function (newVal) {
+ $scope.submitDisabled = newVal ? false : true;
+ };
+
+
+ // Setup a watch for form.$valid if it's passed
+ if (!$scope.validator && $scope.form) {
+ $scope.$watch('form.$valid', function (newVal, oldVal) {
+ $scope.toggle(newVal);
+ });
+ }
+
+ // This overrules the form watch if set - use with cauthion!
+ if ($scope.validator && angular.isFunction($scope.validator)) {
+ $scope.$watch(
+ function() {
+ return $scope.validator();
+ },
+ function(newVal, oldVal) {
+ $scope.toggle(newVal);
+ }
+ );
+ }
+
+ // Lastly if none of the above goes we'll just enable ourselves
+ if (!$scope.form && !$scope.validator) {
+ $scope.submitDisabled = false;
+ }
+ }]
+ };
+ });
+
+
+ common.directive('showSelected', function() {
+ // Runs during compile
+ return {
+ restrict: 'E',
+ replace: true,
+ scope: {
+ 'data': '='
+ },
+ template: '<span>Selected: {{data.length}}</span>'
+ };
+ });
+
+ common.directive('ctrlReload', function() {
+ // Runs during compile
+ return {
+ replace: true,
+ restrict: 'E',
+ scope: {
+ svc: '=service'
+ },
+ template: '<button class="btn btn-primary btn-xs" ng-click="svc.getAll()"><i class="icon-refresh"></i></button>',
+ link: function ($scope, iElm, iAttrs, controller) {
+ $scope.$on('evt:refresh', function() {
+ $scope.svc.getAll();
+ });
+ }
+ };
+ });
+
+ common.directive('ctrlDelete', function($rootScope) {
+ // Runs during compile
+ return {
+ replace: true,
+ restrict: 'E',
+ template: '<button class="btn btn-danger btn-xs" ng-click="deleteSelected()" ng-disabled="gridOptions.selectedItems.length == 0"><i class="icon-remove"></i></button>',
+ link: function($scope, iElm, iAttrs, controller) {
+ var i = 0;
+ var selected = $scope.gridOptions.selectedItems;
+
+ // Fire up a evt:refresh event once done.
+ $scope.deleteSelected = function () {
+ angular.forEach(selected, function(value, key) {
+ $scope.svc.delete(value).then(
+ function () {
+ i++;
+ if (i == selected.length) {
+ $rootScope.$broadcast('evt:refresh');
+ }
+ }
+ );
+ });
+ };
+ }
+ };
+ });
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.navigation.module.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.navigation.module.js
new file mode 100644
index 00000000..0bd2e848
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/common.navigation.module.js
@@ -0,0 +1,6 @@
+define(['angularAMD'], function(ng) {
+
+ var common_navigation = angular.module('app.common.navigation', []);
+
+ return common_navigation;
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/finishRender.module.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/finishRender.module.js
new file mode 100644
index 00000000..3faf3f13
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/general/finishRender.module.js
@@ -0,0 +1,24 @@
+define(['angularAMD'], function(ng) {
+ var module = angular.module('app.common.finishRender', []);
+
+ module.config(function($compileProvider) {
+ module.register = {
+ directive : $compileProvider.register
+ };
+ });
+
+ module.directive('onFinishRender', function ($timeout) {
+ return {
+ restrict: 'A',
+ link: function (scope, element, attr) {
+ if (scope.$last === true) {
+ $timeout(function () {
+ scope.$emit('ngRepeatFinished');
+ });
+ }
+ }
+ };
+ });
+
+ return module;
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/layout/index.tpl.html b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/layout/index.tpl.html
new file mode 100644
index 00000000..0c57c523
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/layout/index.tpl.html
@@ -0,0 +1,17 @@
+
+<div ui-view="topbar"></div>
+<div id="red"></div>
+<div id="gray"></div>
+<div id="wrapper">
+ <nav id="sideMenu" ui-view="navigation" role="navigation"></nav>
+ <div id="page-wrapper-content">
+ <div class="container-fluid">
+ <div class="row content-row">
+ <div id="pageContent" class="col-xs-12" ui-view="content">
+ <!-- PAGE CONTENT BEGINS -->
+ </div><!-- /.col -->
+ </div><!-- /.row -->
+ </div>
+ </div><!-- /.page-content -->
+</div>
+<!-- /.main-content -->
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/layout/layout.module.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/layout/layout.module.js
new file mode 100644
index 00000000..5438b050
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/layout/layout.module.js
@@ -0,0 +1,44 @@
+// This module is used to populate views from the index.tpl.html
+// Each module will register html pages with the appropriate HelperProvider's
+// and this module will take everything from those Helpers and fill the view.
+define(['angular', 'angular-ui-router', 'ocLazyLoad', 'common/general/common.general.directives',
+ 'common/general/common.navigation.directives', 'app/core/core.module'], function (angular) {
+ 'use strict';
+
+ var layout = angular.module('app.common.layout', ['ui.router.state', 'app.core', 'app.common.general', 'app.common.navigation']);
+
+ layout.config(function ($stateProvider, TopBarHelperProvider, NavHelperProvider, ContentHelperProvider) {
+
+ $stateProvider.state('main', {
+ url: '/',
+ views: {
+ 'mainContent@': {
+ controller: 'AppCtrl',
+ templateUrl: 'src/common/layout/index.tpl.html'
+ },
+ 'navigation@main': {
+ template: NavHelperProvider.getViews(),
+ controller: 'NavCtrl'
+ },
+ 'topbar@main': {
+ template: TopBarHelperProvider.getViews(),
+ controller: 'TopbarCtrl'
+ },
+ 'content@main': {
+ template: ContentHelperProvider.getViews()
+ }
+ },
+ resolve: {
+ loadCtrl: ['$ocLazyLoad', function ($ocLazyLoad) {
+ return $ocLazyLoad.load({
+ files: ['app/app.controller'].concat(TopBarHelperProvider.getControllers()).concat(NavHelperProvider.getControllers())
+ });
+ }]
+ }
+ });
+
+ });
+
+ return layout;
+
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/forgot_password.tpl.html b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/forgot_password.tpl.html
new file mode 100644
index 00000000..b366876b
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/forgot_password.tpl.html
@@ -0,0 +1,45 @@
+<div id="forgot-box" class="forgot-box widget-box no-border">
+ <div class="widget-body">
+ <div class="widget-main">
+ <h4 class="header red lighter bigger">
+ <i class="icon-key"></i>
+ Retrieve Password
+ </h4>
+
+ <div class="space-6"></div>
+ <p>
+ Enter your email and to receive instructions
+ </p>
+
+ <form>
+ <fieldset>
+ <label>
+ <span class="block input-icon input-icon-right">
+ <input type="email" class="span12"
+ data-ng-model="recover.email"
+ placeholder="Email"/>
+ <i class="icon-envelope"></i>
+ </span>
+ </label>
+
+ <div class="clearfix">
+ <button ng-click="sendForgotPassword()" type="button"
+ class="width-35 pull-right btn btn-small btn-danger">
+ <i class="icon-lightbulb"></i>
+ Send Me!
+ </button>
+ </div>
+ </fieldset>
+ </form>
+ </div>
+ <!--/widget-main-->
+
+ <div class="toolbar center">
+ <a href="#" onclick="show_box('login-box'); return false;" class="back-to-login-link">
+ Back to login
+ <i class="icon-arrow-right"></i>
+ </a>
+ </div>
+ </div>
+ <!--/widget-body-->
+</div><!--/forgot-box--> \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.controller.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.controller.js
new file mode 100644
index 00000000..750340d1
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.controller.js
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2014 Inocybe Technologies, and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+define(['common/login/login.module', 'common/authentification/auth.services'], function(login) {
+
+ login.controller('LoginCtrl', function ($scope, $http, $window, Auth, $location) {
+ // default values
+ $scope.login = {};
+ $scope.login.username = "";
+ $scope.login.password = "";
+ $scope.login.remember = false;
+ $scope.rememberme = true;
+
+ $scope.sendLogin = function () {
+ Auth.login($scope.login.username, $scope.login.password, $scope.success, $scope.errorDisplay);
+ };
+
+ $scope.success = function(response) {
+ $window.location.href = 'index.html';
+ };
+ $scope.errorDisplay = function (error) {
+ $scope.error = "Unable to login";
+
+ };
+ });
+
+ login.controller('forgotPasswordCtrl', function ($scope, $http) {
+ $scope.recover = {};
+ $scope.recover.email = "";
+ $scope.sendForgotPassword = function () {
+ $http.post('/recover', $scope.recover).success(function (data) {
+ if (data.recover) {
+ console.log("email sent");
+ }
+ else {
+ console.log("email not sent");
+ }
+ });
+
+ };
+ });
+
+ login.controller('registerCtrl', function ($scope, $http) {
+ $scope.register = {};
+ $scope.register.email = "";
+ $scope.register.username = "";
+ $scope.register.password = "";
+ $scope.register.repeatPassword = "";
+ $scope.register.userAgreement = false;
+
+ $scope.sendRegister = function () {
+ $http.post('/register', $scope.register).success(function (data) {
+ if (data.register) {
+ console.log("registration is successful");
+ }
+ else {
+ console.log("registration failed");
+ }
+ });
+ };
+ });
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.less b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.less
new file mode 100644
index 00000000..a4f9912a
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.less
@@ -0,0 +1,193 @@
+/* login pages */
+
+.login-container {
+ width:375px;
+ margin:0 auto;
+}
+
+.login-layout {
+ background-color:#1D2024;
+ .main-container:after {
+ display:none;
+ }
+
+ .main-content {
+ margin-left:0;
+ min-height:100%;
+ padding-left: 15px;
+ padding-right:15px;
+ }
+
+
+ label {
+ margin-bottom:11px;
+ }
+
+
+ .widget-box {
+ visibility:hidden;
+ position:absolute;
+ overflow:hidden;
+ width:100%;
+
+ border-bottom:none;
+ box-shadow:none;
+ padding:6px;
+ background-color:#394557;
+
+ .transform(~"scale(0,1) translate(-150px)");
+ &.visible {
+ visibility:visible;
+ .transform(~"scale(1,1) translate(0)");
+
+ .transition(~"all .3s ease");
+ -o-transition: none;/* too slow */
+ -webkit-transition: none;/* works in chrome but not in safari, never scales back to 1! */
+ }
+
+ .widget-main {
+ padding:16px 36px 36px;
+ background:#F7F7F7;
+ form {
+ margin:0;
+ }
+ }
+ .widget-body .toolbar > div > a {
+ font-size:15px;
+ font-weight:400;
+ text-shadow:1px 0px 1px rgba(0,0,0,0.25);
+ }
+ }
+
+
+}
+
+
+
+
+.login-box {
+ .forgot-password-link { color:#FE9; }
+ .user-signup-link { color:#CF7; }
+
+ .toolbar {
+ background:#5090C1;
+ border-top:2px solid #597597;
+ > div {
+ width:50%;
+ display:inline-block;
+ padding:9px 0 11px;
+
+ &:first-child {//the first link
+ float:left;
+ text-align:left;
+ > a {
+ margin-left:11px;
+ }
+
+ + div {//the next one
+ float:right;
+ text-align:right;
+ > a {
+ margin-right:11px;
+ }
+ }
+ }
+ }
+ }
+}
+
+
+
+
+.forgot-box .toolbar {
+ background:#C16050;
+ border-top:2px solid #976559;
+ padding:9px 18px;
+}
+
+.signup-box .toolbar {
+ background:#76B774;
+ border-top:2px solid #759759;
+ padding:9px 18px;
+}
+
+.forgot-box .back-to-login-link , .signup-box .back-to-login-link{
+ color:#FE9;
+ font-size:14px;
+ font-weight:bold;
+ text-shadow:1px 0px 1px rgba(0,0,0,0.25);
+}
+
+
+
+
+
+/* social login */
+.login-layout .login-box .widget-main {
+ padding-bottom:16px;
+}
+.login-box {
+
+ .social-or-login {
+ margin-top:4px;
+
+ position:relative; z-index:1;
+ :first-child {
+ display:inline-block;
+ background: #F7F7F7;
+ padding: 0 8px;
+ color: #5090C1; font-size: 13px;
+ }
+
+ &:before {
+ content:""; display:block;
+ position:absolute; z-index:-1;
+ top:50%; left:0; right:0;
+ border-top:1px dotted #A6C4DB;
+ }
+ }
+
+ .social-login {
+ margin-top:12px;
+ a {
+ border-radius:100%;
+ width:42px; height:42px; line-height:46px;
+ padding:0;
+ margin:0 1px;
+ border:none;
+ > [class*="icon-"] {
+ font-size:24px;
+ margin:0;
+ }
+ }
+ }
+
+}
+
+
+
+
+
+/* loginbox */
+@media only screen and (max-width: @screen-xs) {
+.login-layout .widget-box .widget-main {
+ padding:16px;
+}
+}
+@media only screen and (max-width: @screen-xs) {
+.login-container {
+ width:98%;
+}
+.login-layout .widget-box {
+ padding:0;
+}
+
+.login-box .toolbar > div {
+ width:auto;
+}
+}
+@media only screen and (max-width: @screen-xs-max) {
+.login-layout .widget-box.visible {
+ .transition(~"none");
+}
+}
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.module.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.module.js
new file mode 100644
index 00000000..72702c65
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.module.js
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2014 Inocybe Technologies, and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+define(['angularAMD', 'jquery', 'common/authentification/auth.module', 'ocLazyLoad'], function (ng, $) {
+ var login = angular.module('app.common.login', ['app.common.auth', 'ui.router.state']);
+
+ login.config(function ($stateProvider, $httpProvider) {
+ $stateProvider
+ .state('login', {
+ url: '/login',
+ views: {
+ 'mainContent@': {
+ templateUrl: 'src/common/login/login.tpl.html',
+ controller: 'LoginCtrl'
+ }
+ },
+ resolve: {
+ loadController: ['$ocLazyLoad', function ($ocLazyLoad) {
+ return $ocLazyLoad.load({
+ files: ['src/common/login/login.controller.js']
+ });
+ }]
+ }
+ });
+
+ $httpProvider.interceptors.push('NbInterceptor');
+ });
+
+ login.run(function ($rootScope, $location, Auth) {
+
+ // to avoid recursive loop
+ var publicPath = ['/login'];
+
+ var isPublicPath = function (route) {
+ var found = false;
+ $.each(publicPath, function (key, value) {
+ found = found || route.match('^' + value);
+ });
+ return found;
+ };
+
+ $rootScope.$on('$stateChangeStart', function () {
+ if (!isPublicPath($location.url()) && !Auth.isAuthed()) {
+ $location.path('/login');
+ }
+ });
+
+ });
+
+ return login;
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.spec.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.spec.js
new file mode 100644
index 00000000..47fcf35b
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.spec.js
@@ -0,0 +1,61 @@
+define(['common/login/login.controller', 'angular-ui-router', 'common/layout/layout.module'], function() {
+ describe('Login Module', function() {
+ var scope, state, controller, location, AuthMock;
+ var url = '/test';
+
+ beforeEach(module('ui.router'));
+ beforeEach(module('app.common.layout'));
+ beforeEach(module('app.common.login', function($provide) {
+ AuthMock = {
+ isAuthed: function() {},
+ login: function() {}
+ };
+ $provide.value('Auth', AuthMock);
+ }));
+
+ beforeEach(inject( function($rootScope, $controller, $state, $location) {
+ scope = $rootScope.$new();
+ controller = $controller;
+ state = $state;
+ location = $location;
+ }));
+
+ it('Should load the login state', function() {
+ var stateName = 'login';
+
+ controller('LoginCtrl', {$scope: scope, $state: state});
+ expect(state.href(stateName, {})).toBe('#/login');
+ });
+
+ it('Should redirect any url to login if not logged', function() {
+ var stateName = 'login';
+ spyOn(AuthMock,'isAuthed').andReturn(false);
+ location.url(url);
+ controller('LoginCtrl', {$scope: scope, $state: state});
+ state.go('main');
+
+ expect(AuthMock.isAuthed).toHaveBeenCalled();
+ expect(state.is("login"));
+ expect(location.url()).toEqual('/login');
+ });
+
+ it('Should not redirect if logged', function() {
+ spyOn(AuthMock,'isAuthed').andReturn(true);
+ location.url(url);
+ controller('LoginCtrl', {$scope: scope, $state: state});
+ state.go('main');
+
+ expect(AuthMock.isAuthed).toHaveBeenCalled();
+ expect(state.is("main"));
+ expect(location.url()).toEqual(url);
+ });
+
+ it('Should call the Auth module', function() {
+ spyOn(AuthMock,'login');
+ controller('LoginCtrl', {$scope: scope, $state: state});
+
+ scope.sendLogin();
+ expect(AuthMock.login).toHaveBeenCalled();
+ });
+ });
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.tpl.html b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.tpl.html
new file mode 100644
index 00000000..ae993569
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/login.tpl.html
@@ -0,0 +1,31 @@
+<div class="container">
+ <div class="row">
+ <div class="col-md-4 col-md-offset-4">
+ <div class="login-panel panel panel-default">
+ <div class="panel-heading">
+ <h3 class="panel-title">Please Sign In</h3>
+ </div>
+ <div style="color:Red;text-align: center">{{error}}</div>
+ <img style="width: 350px" src="assets/images/opendaylight-open-source.jpg" alt="OpenDayLight">
+ <div class="panel-body">
+ <form role="form">
+ <fieldset>
+ <div class="form-group">
+ <input class="form-control" ng-model="login.username" placeholder="Username" name="username" type="text" autofocus>
+ </div>
+ <div class="form-group">
+ <input class="form-control" placeholder="Password" ng-model="login.password" name="password" type="password" value="">
+ </div>
+ <div class="checkbox">
+ <label>
+ <input ng-model="login.remember" name="remember" type="checkbox" value="Remember Me">Remember Me
+ </label>
+ </div>
+ <!-- Change this to a button or input when using this as a form -->
+ <button ng-click="sendLogin()" class="btn btn-lg btn-orange btn-block">Login</a>
+ </fieldset>
+ </form>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/register.tpl.html b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/register.tpl.html
new file mode 100644
index 00000000..725dc392
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/login/register.tpl.html
@@ -0,0 +1,74 @@
+<div id="signup-box" class="signup-box widget-box no-border">
+ <div class="widget-body">
+ <div class="widget-main">
+ <h4 class="header green lighter bigger">
+ <i class="icon-group blue"></i>
+ New User Registration
+ </h4>
+
+ <div class="space-6"></div>
+ <p> Enter your details to begin: </p>
+
+ <form>
+ <fieldset>
+ <label class="block clearfix">
+ <span class="block input-icon input-icon-right">
+ <input type="email" data-ng-model="register.email" class="form-control" placeholder="Email" />
+ <i class="icon-envelope"></i>
+ </span>
+ </label>
+
+ <label class="block clearfix">
+ <span class="block input-icon input-icon-right">
+ <input type="text" data-ng-model="register.username" class="form-control" placeholder="Username" />
+ <i class="icon-user"></i>
+ </span>
+ </label>
+
+ <label class="block clearfix">
+ <span class="block input-icon input-icon-right">
+ <input type="password" data-ng-model="register.password" class="form-control" placeholder="Password" />
+ <i class="icon-lock"></i>
+ </span>
+ </label>
+
+ <label class="block clearfix">
+ <span class="block input-icon input-icon-right">
+ <input type="password" data-ng-model="register.repeatPassword" class="form-control" placeholder="Repeat password" />
+ <i class="icon-retweet"></i>
+ </span>
+ </label>
+
+ <label class="block">
+ <input type="checkbox" data-ng-model="register.userAgreement" class="ace" />
+ <span class="lbl">
+ I accept the
+ <a href="#">User Agreement</a>
+ </span>
+ </label>
+
+ <div class="space-24"></div>
+
+ <div class="clearfix">
+ <button type="reset" class="width-30 pull-left btn btn-sm">
+ <i class="icon-refresh"></i>
+ Reset
+ </button>
+
+ <button type="button" ng-click="sendRegister()" class="width-65 pull-right btn btn-sm btn-success">
+ Register
+ <i class="icon-arrow-right icon-on-right"></i>
+ </button>
+ </div>
+ </fieldset>
+ </form>
+ </div>
+
+ <div class="toolbar center">
+ <a href="#" onclick="show_box('login-box'); return false;" class="back-to-login-link">
+ <i class="icon-arrow-left"></i>
+ Back to login
+ </a>
+ </div>
+ </div><!-- /widget-body -->
+ </div><!-- /signup-box --> \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/nav_item_template.tpl.html b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/nav_item_template.tpl.html
new file mode 100644
index 00000000..391696c2
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/nav_item_template.tpl.html
@@ -0,0 +1,14 @@
+<a href="{{item.link}}" ng-if="isValid(item.submenu)" target="_self" ng-click="updateTemplate($event, item)">
+ <i class="{{item.icon}}"></i> {{item.title | translate}}
+ <span ng-show="isValid(item.submenu)" class="arrow icon-angle-down"></span>
+</a>
+<a href="{{item.link}}" target="_self" ng-if="!isValid(item.submenu)">
+ <i class="{{item.icon}}"></i> {{item.title | translate}}
+</a>
+
+<ul class="nav nav-second-level collapse" style="display: {{display}}">
+
+ <li ng-class="{ active: (isState(item.active) && !isValid(item.submenu)) }" ng-controller="NavItemCtrl" ng-repeat="item in item.submenu" ng-include="'src/common/navigation/nav_item_template.tpl.html'">
+
+ </li>
+</ul>
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation-min.less b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation-min.less
new file mode 100644
index 00000000..52d78e93
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation-min.less
@@ -0,0 +1,225 @@
+.menu_min() {
+ &.sidebar {
+ width:@sidebar-min-width;
+ &:before {
+ width:@sidebar-min-width;
+ }
+ + .main-content {
+ margin-left:(@sidebar-min-width);
+ .breadcrumbs.fixed , .breadcrumbs.breadcrumbs-fixed { left:(@sidebar-min-width); }
+ }
+ }
+
+ .nav-list a {
+ .badge , .label {
+ position:relative;
+ top:-1px;
+ right:auto;
+ left:4px;
+ }
+ }
+
+ .nav-list .submenu .submenu a {
+ .badge , .label {
+ top:0;
+ }
+ }
+
+
+ .nav-list > li {
+ > a {
+ position:relative;
+ > .menu-text {
+ display:none;
+
+ position:absolute;
+ left:(@sidebar-min-width - 1);
+ top:-2px;
+ width:(@sidebar-width - 16);
+ height:40px;
+
+ line-height:38px;
+ background-color:@menumin-bg;
+ z-index:121;
+
+ .box-shadow(@menumin-shadow);
+ border:1px solid @menumin-border;
+
+ padding-left:12px;
+ }
+ &.dropdown-toggle > .menu-text {
+ .box-shadow(none);
+ border:none;
+ top:-1px; left:@sidebar-min-width;
+ width:(@sidebar-width - 16);
+ border-bottom:1px solid @menumin-text-border;
+ }
+ .arrow {
+ display:none;
+ }
+
+ &:hover:before {/* the right side border on hover */
+ width:2px;
+ }
+ }
+
+ &:hover > a {
+ color:@menu-focus-color;
+ > .menu-text {
+ display:block;
+ }
+ }
+ &.active > a > .menu-text {
+ border-left-color:@menu-focus-color;
+ }
+ &.open > a {
+ background-color:@menu-open-bg;
+ color:@menu-color;
+ }
+ &.open.active > a {
+ background-color:@menu-active-bg;
+ }
+ &.open:hover > a {
+ color:@menu-focus-color;
+ }
+ &.active > a {
+ color:@menu-active-color;
+ }
+
+ &.active > a:after { /* the caret */
+ border-width:10px 6px;
+ top:8px;
+ }
+ &.active.open > a:after {
+ display:block;
+ }
+ &.active.open li.active > a:after {
+ display:none;
+ }
+
+
+
+ > .submenu {
+ background:@submenu-bg;
+ position:absolute; z-index:120;
+ left:(@sidebar-min-width - 1); top:-2px;
+
+ width:(@sidebar-width - 14);
+ border:1px solid @menumin-border;
+
+ .box-shadow(@menumin-shadow);
+
+ padding-top:40px;
+ padding-bottom:2px;
+
+ display:none !important;
+
+ &:before {
+ /* hide the tree like submenu in minimized mode */
+ display:none;
+ }
+
+ li {
+ &:before {
+ display:none;
+ }
+
+ > a {
+ //border-left:none;
+ margin-left:0;
+ padding-left:24px;
+ > [class*="icon-"]:first-child {
+ left:4px;
+ }
+ }
+
+ }
+ }
+
+
+
+ &:hover > .submenu {
+ display:block !important;
+ }
+ &.active > .submenu {
+ border-left-color:@menu-active-color;
+ }
+ }
+
+
+
+
+
+ //sidebar shortcuts
+ .sidebar-shortcuts {
+ position:relative;
+ }
+ .sidebar-shortcuts-mini {
+ display:block;
+ }
+
+ .sidebar-shortcuts-large {
+ display:none;
+ position:absolute;
+ z-index:20;
+ top:-1px;
+ left:@sidebar-min-width - 1;
+
+ width:(@sidebar-width - 8);
+
+ padding:0 2px 1px;
+
+ background-color:@submenu-bg;
+ .box-shadow(@menumin-shadow);
+ border:1px solid @menumin-border;
+ }
+ .sidebar-shortcuts:hover .sidebar-shortcuts-large{
+ display:block;
+ }
+
+ .sidebar-collapse { /* minimized collapse button */
+ &:before {
+ left:5px; right:5px;
+ }
+ > [class*="icon-"] {
+ font-size:13px;
+ padding:0 4px;
+ line-height:15px;
+
+ border-width:1px;
+ border-color:darken(@menumin-icon-border, 5%);
+ }
+ }
+
+
+
+
+ .nav-list > li > .submenu {
+ li > .submenu > li {
+ > a {/*3rd level*/
+ margin-left:0px;
+ padding-left:30px;
+ }
+ > .submenu > li > a {/*4th level*/
+ margin-left:0px;
+ padding-left:45px;
+ }
+ }
+
+ li.active > a:after {
+ display:none;
+ }
+ }
+
+
+ .nav-list li.active.open > .submenu > li.active > a:after {
+ display: none;
+ }
+}
+
+
+
+
+.menu-min {
+ .menu_min();
+}
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.controller.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.controller.js
new file mode 100644
index 00000000..5faa039a
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.controller.js
@@ -0,0 +1,40 @@
+define(['angular'], function (angular) {
+ 'use strict';
+
+ var NavCtrl = function ($scope, NavHelper) {
+ $scope.navList = NavHelper.getMenu();
+ };
+ NavCtrl.$inject = ['$scope', 'NavHelper'];
+
+ var NavItemCtrl = function ($scope) {
+ $scope.display = 'none';
+ $scope.isOpen = false;
+
+ $scope.isValid = function (value) {
+ if (angular.isUndefined(value) || value === null) {
+ return false;
+ } else {
+ return true;
+ }
+ };
+
+ $scope.updateTemplate = function (e) {
+ e.stopPropagation();
+ e.preventDefault();
+
+ $scope.isOpen = !$scope.isOpen;
+ if ($scope.display === 'none') {
+ $scope.display = 'block';
+ } else {
+ $scope.display = 'none';
+ }
+ };
+ };
+ NavItemCtrl.$inject = ['$scope', 'NavHelper'];
+
+ return {
+ NavCtrl: NavCtrl,
+ NavItemCtrl: NavItemCtrl
+ };
+
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.less b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.less
new file mode 100644
index 00000000..e22014a8
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.less
@@ -0,0 +1,19 @@
+#page-wrapper {
+ min-height: 0px !important;
+}
+
+.btn-orange {
+ background-color: orange;
+}
+
+.error {
+ color: Red;
+}
+
+html, body, #page-wrapper, #main-content-container{
+ height: 100%;
+}
+
+.footable {
+ margin-top: 25px;
+} \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.module.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.module.js
new file mode 100644
index 00000000..e3c0627c
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.module.js
@@ -0,0 +1,20 @@
+define(['angular', './navigation.controller', './navigation.services', 'app/core/core.module',
+ 'Restangular', 'common/config/env.module'], function (angular, controller, services) {
+
+ 'use strict';
+ var nav = angular.module('app.common.nav', ['app.core', 'restangular', 'config']);
+
+ nav.config(function (NavHelperProvider) {
+ NavHelperProvider.addToView('src/common/navigation/navigation.tpl.html');
+ NavHelperProvider.addControllerUrl('common/navigation/navigation.controller');
+ });
+
+ // controllers
+ nav.controller('NavCtrl', controller.NavCtrl);
+ nav.controller('NavItemCtrl', controller.NavItemCtrl);
+
+ // services
+ nav.factory('MDSalRestangular', services.MDSalRestangular);
+
+ return nav;
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.services.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.services.js
new file mode 100644
index 00000000..33db13a9
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.services.js
@@ -0,0 +1,14 @@
+define([], function () {
+ 'use strict';
+
+ var MDSalRestangular = function (Restangular, ENV) {
+ return Restangular.withConfig(function (RestangularConfig) {
+ RestangularConfig.setBaseUrl(ENV.getBaseURL('MD_SAL'));
+ });
+ };
+ MDSalRestangular.$inject = ['Restangular', 'ENV'];
+
+ return {
+ MDSalRestangular: MDSalRestangular
+ };
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.spec.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.spec.js
new file mode 100644
index 00000000..db4e4b18
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.spec.js
@@ -0,0 +1,103 @@
+define(['common/navigation/navigation.module', 'angular-ui-router',], function () {
+ describe('Navigation Module', function () {
+ var scope, NavHelperMock, EventMock, controller;
+
+ beforeEach(angular.mock.module('ui.router'));
+ beforeEach(module('app.core', function ($provide) {
+ function NavHelperProvider() {
+ this.addToView = function (url) {};
+ this.addControllerUrl = function (url) {};
+ this.$get = function NavHelperFactory() {
+ return new NavHelperProvider();
+ };
+ }
+ $provide.provider('NavHelper', NavHelperProvider);
+ }));
+
+ beforeEach(module('app.common.nav'));
+
+ beforeEach(inject(function ($rootScope, $controller) {
+ scope = $rootScope.$new();
+ controller = $controller;
+
+ NavHelperMock = {
+ getMenu: function () {
+ return {
+ "id": "",
+ "title": "",
+ "active": "",
+ "submenu": ""
+ };
+ }
+ };
+
+ EventMock = {
+ stopPropagation: function () {
+ return null;
+ },
+ preventDefault: function () {
+ return null;
+ }
+ };
+
+ }));
+
+ it('Should have receive all menu items', function () {
+ spyOn(NavHelperMock, 'getMenu').andCallThrough();
+ controller('NavCtrl', {
+ $scope: scope,
+ NavHelper: NavHelperMock
+ });
+
+ expect(NavHelperMock.getMenu).toHaveBeenCalled();
+ expect(scope.navList).toBeDefined();
+ });
+
+ it('Should have create utility methods to show and hide submenu', function () {
+ controller('NavItemCtrl', {
+ $scope: scope,
+ NavHelper: NavHelperMock
+ });
+
+ expect(scope.display).toEqual('none');
+ expect(scope.isOpen).toBeFalsy();
+
+ expect(scope.isValid).toBeDefined();
+ expect(scope.updateTemplate).toBeDefined();
+ });
+
+ it('Should look if a item exist or not', function () {
+ controller('NavItemCtrl', {
+ $scope: scope,
+ NavHelper: NavHelperMock
+ });
+ var item = {};
+
+ expect(scope.isValid(item)).toBeTruthy();
+ expect(scope.isValid(null)).toBeFalsy();
+ });
+
+ it('Should toggle the status of the item scope', function () {
+ spyOn(EventMock, 'stopPropagation').andCallThrough();
+ spyOn(EventMock, 'preventDefault').andCallThrough();
+ controller('NavItemCtrl', {
+ $scope: scope,
+ NavHelper: NavHelperMock
+ });
+
+ var initOpen = scope.isOpen;
+ var initDisplay = scope.display;
+
+ scope.updateTemplate(EventMock, {});
+ expect(scope.isOpen).not.toEqual(initOpen);
+ expect(scope.display).not.toEqual(initDisplay);
+
+ scope.updateTemplate(EventMock, {});
+ expect(scope.isOpen).toEqual(initOpen);
+ expect(scope.display).toEqual(initDisplay);
+
+ expect(EventMock.stopPropagation.calls.length).toEqual(2);
+ expect(EventMock.preventDefault.calls.length).toEqual(2);
+ });
+ });
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.tpl.html b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.tpl.html
new file mode 100644
index 00000000..d1053ac2
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/navigation/navigation.tpl.html
@@ -0,0 +1,6 @@
+<div class="sidebar-collapse">
+ <ul id="side-menu" class="nav">
+ <li ng-class="{ active: (isState(item.active) && !isValid(item.submenu))}" ng-controller="NavItemCtrl" ng-repeat="item in navList" ng-include="'src/common/navigation/nav_item_template.tpl.html'" ng-type="{{item.id}}">
+ </li>
+ </ul>
+</div>
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/messages.tpl.html b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/messages.tpl.html
new file mode 100644
index 00000000..b637cba6
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/messages.tpl.html
@@ -0,0 +1,28 @@
+<li class="dropdown">
+ <a data-toggle="dropdown" class="dropdown-toggle" href="">
+ <i class="icon-envelope icon-animated-vertical"></i>
+ </a>
+ <ul class="dropdown-menu dropdown-messages">
+ <li ng-repeat="message in messages.latest">
+ <a href="#">
+ <!-- <img src="/avatars/{{message.img}}" class="msg-photo" alt="{{message.name}}'s Avatar"> Do not need it for now -->
+ <div>
+ <strong>{{message.name}}</strong>
+ <span class="pull-right text-muted">
+ <em>{{message.time}}</em>
+ </span>
+ </div>
+ <div>{{message.summary}}</div>
+ </a>
+ </li>
+
+
+ <li>
+ <a href="#" class="text-center">
+ <strong>Read All Messages</strong>
+ <i class="icon-arrow-right"></i>
+ </a>
+ </li>
+
+ </ul>
+</li> \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/notifications.tpl.html b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/notifications.tpl.html
new file mode 100644
index 00000000..cefa739c
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/notifications.tpl.html
@@ -0,0 +1,25 @@
+<li class="dropdown">
+ <a data-toggle="dropdown" class="dropdown-toggle" href="">
+ <i class="icon-bell-alt icon-animated-bell"></i>
+ <span class="badge badge-important">{{ notifs.count }}</span>
+ </a>
+ <ul class="dropdown-menu dropdown-alerts">
+ <li ng-repeat="notif in notifs.latest">
+ <a href="#">
+
+ <div>
+ <i class="btn btn-xs no-hover {{notif.iconClass}} {{notif.icon}}"></i>{{notif.title}}
+ <span class="pull-right text-muted small">4 minutes ago</span>
+ </div>
+ </a>
+ </li>
+
+
+ <li>
+ <a href="#" class="text-center">
+ <strong>See all notifications</strong>
+ <i class="icon-arrow-right"></i>
+ </a>
+ </li>
+ </ul>
+</li> \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/tasks.tpl.html b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/tasks.tpl.html
new file mode 100644
index 00000000..01a47e09
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/tasks.tpl.html
@@ -0,0 +1,32 @@
+<li class="grey">
+ <a data-toggle="dropdown" class="dropdown-toggle" href="">
+ <i class="icon-tasks"></i>
+ <span class="badge badge-grey">{{ tasks.count }}</span>
+ </a>
+
+ <ul class="dropdown-menu dropdown-tasks">
+ <li ng-repeat="task in tasks.latest">
+ <a href="#">
+ <div>
+ <p><strong>{{ task.title }}</strong>
+ <span class="pull-right text-muted">{{ task.percentage }}%</span></p>
+ </div>
+ <div class="progress progress-striped active">
+
+ <div class="progress progress-mini {{task.progressClass}}">
+ <div style="width:{{task.percentage}}%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="{{task.percentage}}" role="progressbar" class="progress-bar {{task.progressBarClass}}">
+ <span class="sr-only">{{task.percentage}}% Complete</span>
+ </div>
+ </div>
+ </div>
+ </a>
+ </li>
+
+ <li>
+ <a href="#">
+ See tasks with details
+ <i class="icon-arrow-right"></i>
+ </a>
+ </li>
+ </ul>
+</li> \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.controller.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.controller.js
new file mode 100644
index 00000000..81e9616d
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.controller.js
@@ -0,0 +1,54 @@
+define(['common/topbar/topbar.module', 'common/topbar/topbar.directives', 'common/authentification/auth.services'], function(topbar) {
+
+ topbar.controller('TopbarCtrl', function() {
+ $('#toggleMenu').click(function(e) {
+ e.preventDefault();
+ $('#wrapper').toggleClass('toggled');
+ });
+ });
+
+ topbar.controller('topBarTasksCtrl', function($scope, taskFactory) {
+ $scope.tasks = taskFactory.getTaskData();
+ });
+
+ topbar.controller('topBarNotifsCtrl', function($scope, notifsFactory) {
+ $scope.notifs = notifsFactory.getNotifsData();
+ $scope.isValid = function(value) {
+ if (angular.isUndefined(value) || value === null) {
+ return false;
+ } else {
+ return true;
+ }
+ };
+ });
+
+ topbar.controller('topBarMessagesCtrl', function($scope, messageFactory) {
+ $scope.messages = messageFactory.getMessageData();
+ $scope.isValid = function(value) {
+ if (angular.isUndefined(value) || value === null) {
+ return false;
+ } else {
+ return true;
+ }
+ };
+ });
+
+ // the authorization module is not converted yet
+ topbar.controller('topBarUserMenuCtrl', function($scope, $cookieStore, Auth, $window) {
+ $scope.logOut = logout;
+
+ /**
+ * Provides logout from application and redirects to login page
+ * @return {[type]} [description]
+ */
+ function logout() {
+ Auth.logout(function() {
+ $window.location.href = 'index.html#/login';
+ });
+ }
+
+ $scope.getUsername = function() {
+ return $window.localStorage.odlUser;
+ };
+ });
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.directives.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.directives.js
new file mode 100644
index 00000000..f29e3c59
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.directives.js
@@ -0,0 +1,40 @@
+define(['common/topbar/topbar.module'], function(topbar) {
+ topbar.directive('mcTopBar', function () {
+ return {
+ replace: true,
+ templateUrl: 'topbar/topbar.tpl.html',
+ };
+ });
+
+ topbar.directive('mcTopBarTasks', function () {
+ return {
+ replace: true,
+ controller: 'topBarTasksCtrl',
+ templateUrl: 'topbar/tasks.tpl.html'
+ };
+ });
+
+ topbar.directive('mcTopBarNotifications', function () {
+ return {
+ replace: true,
+ controller: 'topBarNotifsCtrl',
+ templateUrl: 'topbar/notifications.tpl.html'
+ };
+ });
+
+ topbar.directive('mcTopBarMessages', function () {
+ return {
+ replace: true,
+ controller: 'topBarMessagesCtrl',
+ templateUrl: 'topbar/messages.tpl.html'
+ };
+ });
+
+ topbar.directive('mcTopBarUserMenu', function () {
+ return {
+ replace: true,
+ controller: 'topBarUserMenuCtrl',
+ templateUrl: 'src/common/topbar/user_menu.tpl.html'
+ };
+ });
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.less b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.less
new file mode 100644
index 00000000..dadf0a6f
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.less
@@ -0,0 +1,40 @@
+#toggleMenu {
+ display:block;
+ text-align: right;
+ padding:9px;
+ color:white !important;
+}
+
+#toggleMenu:focus, #toggleMenu:hover {
+ background-color: inherit;
+}
+
+#wrapper.toggled {
+ padding-left: 0;
+}
+
+#wrapper.toggled #sideMenu {
+ width:0;
+}
+
+#wrapper.toggled #sideMenu ul {
+ display:none;
+}
+
+div > nav.navbar {
+ margin-bottom:0;
+}
+
+#logout-button {
+ color: #ffffff !important;
+ padding: 9px !important;
+ min-height: 0;
+}
+
+#logout-button:hover, #logout-button:active, #logout-button:focus {
+ background-color: inherit !important;
+}
+
+.navbar-top-links * {
+ vertical-align: middle;
+} \ No newline at end of file
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.module.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.module.js
new file mode 100644
index 00000000..5bb0ba92
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.module.js
@@ -0,0 +1,11 @@
+define(['angularAMD', 'angular-cookies', 'app/core/core.services'], function(ng) {
+ var topbar = angular.module('app.common.topbar', ['ngCookies', 'app.core']);
+
+ topbar.config(function($compileProvider, TopBarHelperProvider) {
+
+ TopBarHelperProvider.addToView('src/common/topbar/topbar.tpl.html');
+ TopBarHelperProvider.addControllerUrl('common/topbar/topbar.controller');
+ });
+
+ return topbar;
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.services.js b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.services.js
new file mode 100644
index 00000000..6a6ba885
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.services.js
@@ -0,0 +1,103 @@
+define(['common/topbar/topbar.module'], function(topbar) {
+ topbar.factory('taskFactory',function () {
+ var factory = {};
+ factory.getTaskData = function () {
+ return {
+ count: 4,
+ latest: [
+ {
+ title: "Software Update",
+ percentage: 65
+ },
+ {
+ title: "Hardware Upgrade" ,
+ percentage: 35 ,
+ progressBarClass: "progress-bar-danger"
+ },
+ {
+ title: "Unit Testing" ,
+ percentage: 15 ,
+ progressBarClass: "progress-bar-warning"
+ },
+ {
+ title: "Bug Fixes" ,
+ percentage: 90 ,
+ progressClass: "progress-striped active",
+ progressBarClass: "progress-bar-success"
+ }
+ ]
+ };
+
+ };
+ return factory;
+ });
+
+ topbar.factory('messageFactory', function () {
+ var factory = {};
+ factory.getMessageData = function () {
+ return {
+ count: 5,
+ latest: [
+ {
+ name: "Alex",
+ img: "avatar.png",
+ time: "a moment ago",
+ summary: "Ciao sociis natoque penatibus et auctor ..."
+ },
+ {
+ name: "Susan",
+ img: "avatar3.png",
+ time: "20 minutes ago",
+ summary: "Vestibulum id ligula porta felis euismod ..."
+ },
+ {
+ name: "Bob",
+ img: "avatar4.png",
+ time: "3:15 pm",
+ summary: "Nullam quis risus eget urna mollis ornare ..."
+ }
+ ]
+ };
+ };
+ return factory;
+ });
+
+ topbar.factory('notifsFactory', function () {
+ var factory = {};
+ factory.getNotifsData = function () {
+ return {
+ "count": 8,
+ "latest": [
+ {
+ title: "New Comments",
+ icon: "icon-comment",
+ iconClass: "btn-pink",
+ badge: "+12",
+ badgeClass: "badge-info"
+ },
+ {
+ title: "Bob just signed up as an editor ...",
+ icon: "icon-user",
+ iconClass: "btn-primary"
+ },
+ {
+ title: "New Orders",
+ icon: "icon-shopping-cart",
+ iconClass: "btn-success",
+ badge: "+8",
+ badgeClass: "badge-success"
+ },
+ {
+ title: "Followers",
+ icon: "icon-twitter",
+ iconClass: "btn-info",
+ badge: "+11",
+ badgeClass: "badge-info"
+ }
+ ]
+ };
+
+ };
+ return factory;
+ });
+});
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.tpl.html b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.tpl.html
new file mode 100644
index 00000000..8fcb6efe
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/topbar.tpl.html
@@ -0,0 +1,25 @@
+<nav class="navbar navbar-default navbar-static-top" role="navigation">
+ <!-- the script for the resizing was here -->
+
+
+<img id="logo_opendaylight" src="assets/images/logo_opendaylight.gif" class="img-responsive-v1" border="0" alt="OpenDayLight" /><img id="logo_opendaylight_white" src="assets/images/logo_opendaylight_white.gif" class="img-responsive-v1" border="0" alt="OpenDayLight" /><img ng-src="{{section_logo}}" id="page_logo" class="img-responsive-v1" border="0" alt="OpenDayLight" />
+
+<div style="background-color:red;display:inline;width:100%;"></div>
+
+ <ul class="nav navbar-top-links navbar-right">
+ <li><a id="toggleMenu" class="btn" href="#"><i class="icon-reorder icon-2x"></i></a></li>
+ <!--<img src="assets/images/User.png" class="right-topbar" border="0" alt="OpenDayLight" />
+ <img src="assets/images/Info.png" class="right-topbar" border="0" alt="OpenDayLight" />
+ <img src="assets/images/OSGI.png" class="right-topbar" border="0" alt="OpenDayLight" />-->
+ <!-- for now no image since we dont use them.... -->
+ <!--
+ Don't need them for now...
+ <div data-mc-top-bar-tasks></div>
+ <div data-mc-top-bar-notifications></div>
+ <div data-mc-top-bar-messages></div>
+ -->
+ <div data-mc-top-bar-user-menu></div>
+ </ul><!-- /.ace-nav -->
+
+
+</nav>
diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/user_menu.tpl.html b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/user_menu.tpl.html
new file mode 100644
index 00000000..d8be4aa4
--- /dev/null
+++ b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/dlux-web/src/common/topbar/user_menu.tpl.html
@@ -0,0 +1 @@
+<li data-ng-click="logOut()"><a href="#" id="logout-button" class="btn"><i class="icon-off"></i> Logout ({{getUsername()}})</a></li>