Integration issues

Integration of the Client pages to Main GUI

IssueId : CLIENT-189

Change-Id: Ifda97e420f5e83ee9c299e5a1dbb2d1e94b3d1b5
Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/conf/License.txt b/extsys/src/main/webapp/extsys/sdncontroller/bak/conf/License.txt
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/conf/License.txt
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/conf/License.txt
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/conf/dataconfig.json b/extsys/src/main/webapp/extsys/sdncontroller/bak/conf/dataconfig.json
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/conf/dataconfig.json
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/conf/dataconfig.json
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/controller.html b/extsys/src/main/webapp/extsys/sdncontroller/bak/controller.html
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/controller.html
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/controller.html
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/css/RMain.css b/extsys/src/main/webapp/extsys/sdncontroller/bak/css/RMain.css
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/css/RMain.css
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/css/RMain.css
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/css/VMMain.css b/extsys/src/main/webapp/extsys/sdncontroller/bak/css/VMMain.css
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/css/VMMain.css
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/css/VMMain.css
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/css/bootstrap-table.min.css b/extsys/src/main/webapp/extsys/sdncontroller/bak/css/bootstrap-table.min.css
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/css/bootstrap-table.min.css
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/css/bootstrap-table.min.css
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/css/bootstrap.min.css b/extsys/src/main/webapp/extsys/sdncontroller/bak/css/bootstrap.min.css
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/css/bootstrap.min.css
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/css/bootstrap.min.css
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/License.txt b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/License.txt
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/images/License.txt
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/images/License.txt
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/add.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/add.png
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/images/add.png
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/images/add.png
Binary files differ
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/arrow-down-enable.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/arrow-down-enable.png
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/images/arrow-down-enable.png
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/images/arrow-down-enable.png
Binary files differ
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/collapse_arrow.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/collapse_arrow.png
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/images/collapse_arrow.png
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/images/collapse_arrow.png
Binary files differ
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/delete.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/delete.png
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/images/delete.png
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/images/delete.png
Binary files differ
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/edit.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/edit.png
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/images/edit.png
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/images/edit.png
Binary files differ
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/expand_arrow.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/expand_arrow.png
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/images/expand_arrow.png
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/images/expand_arrow.png
Binary files differ
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/ideo_default_select.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/ideo_default_select.png
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/images/ideo_default_select.png
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/images/ideo_default_select.png
Binary files differ
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/import.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/import.png
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/images/import.png
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/images/import.png
Binary files differ
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/line.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/line.png
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/images/line.png
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/images/line.png
Binary files differ
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/loading-spinner-grey.gif b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/loading-spinner-grey.gif
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/images/loading-spinner-grey.gif
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/images/loading-spinner-grey.gif
Binary files differ
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/openo.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/openo.png
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/images/openo.png
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/images/openo.png
Binary files differ
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/page_l.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/page_l.png
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/images/page_l.png
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/images/page_l.png
Binary files differ
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/page_left_disabled.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/page_left_disabled.png
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/images/page_left_disabled.png
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/images/page_left_disabled.png
Binary files differ
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/page_r.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/page_r.png
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/images/page_r.png
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/images/page_r.png
Binary files differ
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/sort_asc.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/sort_asc.png
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/images/sort_asc.png
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/images/sort_asc.png
Binary files differ
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/sort_both.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/sort_both.png
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/images/sort_both.png
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/images/sort_both.png
Binary files differ
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/sort_desc.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/sort_desc.png
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/images/sort_desc.png
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/images/sort_desc.png
Binary files differ
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/js/bootstrap-table-filter-control.min.js b/extsys/src/main/webapp/extsys/sdncontroller/bak/js/bootstrap-table-filter-control.min.js
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/js/bootstrap-table-filter-control.min.js
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/js/bootstrap-table-filter-control.min.js
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/js/bootstrap-table.min.js b/extsys/src/main/webapp/extsys/sdncontroller/bak/js/bootstrap-table.min.js
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/js/bootstrap-table.min.js
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/js/bootstrap-table.min.js
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/js/bootstrap.min.js b/extsys/src/main/webapp/extsys/sdncontroller/bak/js/bootstrap.min.js
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/js/bootstrap.min.js
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/js/bootstrap.min.js
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/js/controller.js b/extsys/src/main/webapp/extsys/sdncontroller/bak/js/controller.js
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/js/controller.js
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/js/controller.js
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/js/jquery-1.11.2.min.js b/extsys/src/main/webapp/extsys/sdncontroller/bak/js/jquery-1.11.2.min.js
similarity index 100%
rename from extsys/src/main/webapp/extsys/sdncontroller/js/jquery-1.11.2.min.js
rename to extsys/src/main/webapp/extsys/sdncontroller/bak/js/jquery-1.11.2.min.js
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/index.html b/extsys/src/main/webapp/extsys/sdncontroller/index.html
new file mode 100644
index 0000000..bb8e3cb
--- /dev/null
+++ b/extsys/src/main/webapp/extsys/sdncontroller/index.html
@@ -0,0 +1,47 @@
+<!--

+

+    Copyright 2017, Huawei Technologies Co., Ltd.

+

+    Licensed under the Apache License, Version 2.0 (the "License");

+    you may not use this file except in compliance with the License.

+    You may obtain a copy of the License at

+

+            http://www.apache.org/licenses/LICENSE-2.0

+

+    Unless required by applicable law or agreed to in writing, software

+    distributed under the License is distributed on an "AS IS" BASIS,

+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+    See the License for the specific language governing permissions and

+    limitations under the License.

+

+-->

+<!DOCTYPE html>

+<html>

+<head lang="en">

+    <meta charset="utf-8">

+    <meta http-equiv="X-UA-Compatible" content="IE=edge">

+    <meta name="viewport" content="width=device-width, initial-scale=1">

+    <title>Controller</title>

+    <link href="thirdparty/css/bootstrap.min.css" rel="stylesheet"/>

+    <link href="framework/css/open-ostyle.css" rel="stylesheet"/>

+    <link rel="stylesheet"; href="https://unpkg.com/ng-table@2.0.2/bundles/ng-table.min.css">

+    <script src="thirdparty/js/angular.min.js"></script>

+    <script src="thirdparty/js/angular-ui-router.min.js"></script>

+    <!--<script src="https://unpkg.com/ng-table@2.0.2/bundles/ng-table.min.js"></script>-->

+    <script src="thirdparty/js/ng-table.min.js"></script>

+    <script src="thirdparty/js/jquery_1.12.4.min.js"></script>

+    <!--<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>-->

+    <script src="thirdparty/js/jquery-ui.js"></script>

+    <script type="text/javascript" src="thirdparty/js/bootstrap.min.js"></script>

+    <script src="js/app.js"></script>

+    <script src="js/rest.js"></script>

+    <script src="framework/js/DataService.js"></script>

+    <script src="thirdparty/js/mustache.js"></script>

+

+

+</head>

+

+<body ng-app="ControllerApp" onload="loadTemplate()">

+    <ui-view></ui-view>

+</body>

+</html>
\ No newline at end of file
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/js/app.js b/extsys/src/main/webapp/extsys/sdncontroller/js/app.js
new file mode 100644
index 0000000..c6f601c
--- /dev/null
+++ b/extsys/src/main/webapp/extsys/sdncontroller/js/app.js
@@ -0,0 +1,359 @@
+/*

+

+ Copyright 2017, Huawei Technologies Co., Ltd.

+

+ Licensed under the Apache License, Version 2.0 (the "License");

+ you may not use this file except in compliance with the License.

+ You may obtain a copy of the License at

+

+ http://www.apache.org/licenses/LICENSE-2.0

+

+ Unless required by applicable law or agreed to in writing, software

+ distributed under the License is distributed on an "AS IS" BASIS,

+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ See the License for the specific language governing permissions and

+ limitations under the License.

+

+ */

+

+var app = angular.module("ControllerApp", ["ui.router", "ngTable"])

+

+    /*.run(function($rootScope, $location, $state, LoginService) {

+     $rootScope.$on("$stateChangeStart", function(event, toState, toParams, fromState, fromParams){

+     if (toState.authenticate && !LoginService.isAuthenticated()){

+     // User isn’t authenticated

+     $state.transitionTo("login");

+     event.preventDefault();

+     }

+     });

+     })*/

+    .config(function($stateProvider, $urlRouterProvider, $urlMatcherFactoryProvider) {

+        //$routeProvider.caseInsensitiveMatch = true;

+        $urlMatcherFactoryProvider.caseInsensitive(true);

+        $urlRouterProvider.otherwise('/controller');

+        //$locationProvider.html5Mode(true).hashPrefix('!');

+        $stateProvider

+

+

+            .state("controller", {

+                url: "/controller",

+                templateUrl: "templates/controller.html",

+                controller: "controllerCtrl"

+            })

+    })

+

+    /*-------------------------------------------------------------------------------Controller---------------------------------------------------------------------*/

+    .controller("controllerCtrl", function ($scope, controllerDataService, $log, $compile,NgTableParams, $state) {

+

+        $scope.title = "Controller";

+        $scope.init = function() {

+            controllerDataService.getControllerData()

+                .then(function (data) {

+                    $scope.data = data;

+                    console.log("Data: ");

+                    $log.info(data);

+                    loadButtons();

+                }, function (reason) {

+

+                    $scope.message = "Error is :" + JSON.stringify(reason);

+                });

+        }

+

+        function loadButtons() {

+            var def_button_tpl = $(modelTemplate).filter('#defaultButtons').html();

+            var def_iconbutton_tpl = $(modelTemplate).filter('#defaultIconButtons').html();

+            var dialog = $(modelTemplate).filter('#dialog').html();

+            var add_data = {"title":"Create", "type":"btn btn-default",  "gType": "plus-icon", "iconPosition":"left", "clickAction":"showAddModal()"};

+           // var delete_data = {"title":"Delete Selected", "type":"btn btn-default", "gType": "delete-icon", "iconPosition":"left", "clickAction":"deleteData()"};

+            var addhtml = Mustache.to_html(def_iconbutton_tpl, add_data);

+            //var deletehtml = Mustache.to_html(def_iconbutton_tpl, delete_data);

+            $('#extsysAction').html($compile(addhtml)($scope));

+            //$('#extsysAction').append($compile(deletehtml)($scope));

+

+            $scope.checkboxes = { 'checked': false, items: {} };

+

+            //var data = [{id: 1, name: "Moroni", age: 50}, {id: 2, name: "ABC", age: 30}, {id: 3, name: "Morhoni", age: 10}, {id: 4, name: "DABC", age: 31}, {id: 5, name: "Noor", age: 30}, {id: 6, name: "ABCD", age: 40}, {id: 7, name: "DABC", age: 31}, {id: 8, name: "Noor", age: 30}, {id: 9, name: "ABCD", age: 40}, {id: 10, name: "DABC", age: 31}, {id: 11, name: "Noor", age: 30}, {id: 12, name: "ABCD", age: 40}];

+            $scope.controllerTableParams = new NgTableParams({count: 5, sorting: {name: 'asc'}    //{page: 1,count: 10,filter: {name: 'M'},sorting: {name: 'desc'}

+            }, { counts:[5, 10, 20, 50], dataset: $scope.data.controllerData});

+

+            /*$scope.$watch('checkboxes.checked', function(value) {

+                angular.forEach($scope.data.controllerData, function(item) {

+                    console.log("#######"+item.id);

+                    if (angular.isDefined(item.id)) {

+                        $scope.checkboxes.items[item.id] = value;

+                    }

+                });

+            });*/

+

+            var modelSubmit_data = {"title":"OK", "clickAction":"saveData(ext.id)"};

+            var modelSubmit_html = Mustache.to_html(def_button_tpl, modelSubmit_data);

+            $('#myModal #footerBtns').html($compile(modelSubmit_html)($scope));

+

+            var modelBtn_data = {"title":"Close", "clickAction":"closeModal()"};

+            var modelBtn_html = Mustache.to_html(def_button_tpl, modelBtn_data);

+            $('#myModal #footerBtns').append($compile(modelBtn_html)($scope));

+

+            var text = $(modelTemplate).filter('#textfield').html();

+            var dropDown = $(modelTemplate).filter('#simpleDropdownTmpl').html();

+

+            var extName = {"ErrMsg" :     {"errmsg" : "Name is required.", "modalVar":"ext.Name", "errtag":"textboxErrName", "errfunc":"validatetextboxName", "required":true}};

+            $('#myModal #name').append($compile(Mustache.to_html(text, extName.ErrMsg))($scope));

+

+            var extURL = {"ErrMsg" :     {"errmsg" : "URL is required.", "modalVar":"ext.url", "errtag":"textboxErrURL", "errfunc":"validatetextboxURL", "required":true}};

+            $('#myModal #url').append($compile(Mustache.to_html(text, extURL.ErrMsg))($scope));

+

+            var extUserName = {"ErrMsg" :     {"errmsg" : "UserName is required.", "modalVar":"ext.userName", "errtag":"textboxErrUserName", "errfunc":"validatetextboxUserName", "required":true}};

+            $('#myModal #username').append($compile(Mustache.to_html(text, extUserName.ErrMsg))($scope));

+

+            var extPassword = {"ErrMsg" :     {"errmsg" : "Password is required.", "modalVar":"ext.Password", "errtag":"textboxErrPassword", "errfunc":"validatetextboxPassword", "required":true}};

+            $('#myModal #password').append($compile(Mustache.to_html(text, extPassword.ErrMsg))($scope));

+

+            var extVersion = {"ErrMsg" :     {"errmsg" : "Version is required.", "modalVar":"ext.Version"}};

+            $('#myModal #version').append($compile(Mustache.to_html(text, extVersion.ErrMsg))($scope));

+

+            var extVendor = {"ErrMsg" :     {"errmsg" : "Vendor is required.", "modalVar":"ext.Vendor"}};

+            $('#myModal #vendor').append($compile(Mustache.to_html(text, extVendor.ErrMsg))($scope));

+

+            var extDescription = {"ErrMsg" :     {"textboxErr" : "Description is required.", "modalVar":"ext.Description"}};

+            $('#myModal #description').append($compile(Mustache.to_html(text, extDescription.ErrMsg))($scope));

+

+            /*var extProtocol = {"ErrMsg" :     {"textboxErr" : "Protocol is required.", "modalVar":"ext.protocol"}};

+            $('#myModal #protocol').append($compile(Mustache.to_html(text, extProtocol.ErrMsg))($scope));*/

+

+            var dropdowndata_protocol = {

+                "modalVar" : "ext.Protocol",

+                "labelField" : "itemLabel",

+                "optionsValue" : JSON.stringify($scope.data.dropdownProtocolData.item)

+            };

+

+            console.log("dropdown data:"+$scope.data.dropdownProtocolData.item);

+

+            $('#myModal #protocol').append($compile(Mustache.to_html(dropDown, dropdowndata_protocol))($scope));

+

+            var extProductName = {"ErrMsg" :     {"textboxErr" : "ProductName is required.", "modalVar":"ext.productName"}};

+            $('#myModal #ProductName').append($compile(Mustache.to_html(text, extProductName.ErrMsg))($scope));

+

+            /*var extType = {"ErrMsg" :     {"textboxErr" : "Type is required.", "modalVar":"ext.type"}};

+            $('#myModal #type').append($compile(Mustache.to_html(text, extType.ErrMsg))($scope));*/

+

+            var dropdowndata_type = {

+                "modalVar" : "ext.Type",

+                "labelField" : "itemLabel",

+                "optionsValue" : JSON.stringify($scope.data.dropdownTypeData.item)

+            };

+

+            $('#myModal #type').append($compile(Mustache.to_html(dropDown, dropdowndata_type))($scope));

+

+

+

+            /*

+            var extType = {"ErrMsg" :     {"textboxErr" : "The name is required.", "modalVar":"ext.type", "placeholder":"Country"}};

+            $('#myModal #Type').append($compile(Mustache.to_html(text, extType.ErrMsg))($scope));

+

+            var extCreate = {"ErrMsg" :     {"textboxErr" : "The name is required.", "modalVar":"ext.createTime", "placeholder":"memory"}};

+            $('#myModal #CreateTime').append($compile(Mustache.to_html(number, extCreate.ErrMsg))($scope));

+

+            var extOperation = {"ErrMsg" :     {"textboxErr" : "The name is required.", "modalVar":"ext.operation", "placeholder":"Hard Disk"}};

+            $('#myModal #Operation').append($compile(Mustache.to_html(text, extOperation.ErrMsg))($scope));*/

+

+

+

+        }

+

+        $scope.validatetextboxName = function (value){

+            if($scope.ext.Name) {

+                $scope.textboxErrName = false;

+            }

+            else

+                $scope.textboxErrName = true;

+        }

+

+        $scope.validatetextboxURL = function (value){

+            if($scope.ext.url) {

+                $scope.textboxErrURL = false;

+            }

+            else

+                $scope.textboxErrURL = true;

+        }

+

+        $scope.validatetextboxUserName = function (value){

+            if($scope.ext.userName) {

+                $scope.textboxErrUserName = false;

+            }

+            else

+                $scope.textboxErrUserName = true;

+        }

+

+        $scope.validatetextboxPassword = function (value){

+            if($scope.ext.Password) {

+                $scope.textboxErrPassword = false;

+            }

+            else

+                $scope.textboxErrPassword = true;

+        }

+

+

+        $scope.closeModal = function() {

+            console.log("Closing Modal...");

+            $('#myModal').modal('hide');

+            $state.reload();

+        }

+

+

+

+        /*$scope.checkAll = function () {

+            angular.forEach($scope.data, function (data) {

+                data.select = $scope.selectAll;

+            });

+        };*/

+

+        $scope.showAddModal = function () {

+            console.log("Showing Modal to Add data");

+            $scope.ext = {};

+            //$("#myModal").modal();

+            $("#myModal").modal({}).draggable();

+            $scope.textboxErrName = false;

+            $scope.textboxErrURL = false;

+            $scope.textboxErrUserName = false;

+            $scope.textboxErrPassword = false;

+        }

+        $scope.saveData = function (id) {

+            if (!$scope.textboxErrName && !$scope.textboxErrURL && !$scope.textboxErrUserName && !$scope.textboxErrPassword) {

+                if (id) {

+                    //edit data

+                    console.log("Editing data.." + JSON.stringify($scope.ext));

+                    controllerDataService.editControllerData($scope.ext)

+                        .then(function (data) {

+                            $scope.message = "Success :-)";

+                            $state.reload();

+                            //$state.go($state.current.name, {}, {reload: true})

+                        },

+                        function (reason) {

+                            //$log.info(reason);

+                            $scope.message = reason.status + " " + reason.statusText;

+                        });

+                }

+                else {

+                    console.log("Adding data.." + JSON.stringify($scope.ext));

+                    controllerDataService.addControllerData($scope.ext)

+                        .then(function (data) {

+

+                            $scope.message = "Success :-)";

+                            $state.reload();

+                            //$state.go($state.current.name, {}, {reload: true})

+                        },

+                        function (reason) {

+                            //$log.info(reason);

+                            $scope.message = reason.status + " " + reason.statusText;

+                        });

+                }

+                $('#myModal').modal('hide');

+            }

+        }

+

+        $scope.deleteData = function (id) {

+            var confirmation=false;

+            var checkbox = false;

+            var dialog_tpl = $(modelTemplate).filter('#personDialog').html();

+            var error = {"err_data" : { "title": "Error",

+                "showClose": "true",

+                "closeBtnTxt": "Cancel",

+                "icon": "glyphicon glyphicon-exclamation-sign",

+                "iconColor": "icon_error",

+                "msg": "Do you really wanted to Delete?.",

+                "buttons": [

+                    {

+                        "text": "Ok", "action": "deleteConfirmation("+id+")"

+                    }]

+            }};

+            angular.forEach($scope.checkboxes.items, function(value) {

+                if(value) {

+                    checkbox = true;

+                }

+            });

+            if (checkbox || (typeof id !== "undefined")) {

+                var html = Mustache.to_html(dialog_tpl, error.err_data);

+                $($compile(html)($scope)).modal({backdrop: "static"});

+            }

+        }

+

+        $scope.deleteConfirmation = function(id) {

+            console.log("data in controller is :");

+            //$log.info($scope.data.controllerData);

+            var deleteArr = [];

+            if (typeof id !== "undefined"){

+

+                deleteArr.push(id);

+            }

+            else {

+                angular.forEach($scope.checkboxes.items, function(value , key) {

+                    if(value) {

+                        console.log("deleting name is :"+key);

+                        deleteArr.push(key);

+                    }

+                });

+            }

+            console.log("deleteArr: "+deleteArr);

+            for(var i = 0; i < deleteArr.length; i++) {

+                console.log("To be deleted : "+deleteArr[i]);

+                controllerDataService.deleteControllerData(deleteArr[i])

+                    .then(function(data){

+                        $scope.message = "Successfully deleted :-)";

+                        $state.reload();

+                    },

+                    function(reason){

+                        $scope.message = reason.status + " " + reason.statusText;

+                    });

+            }

+        }

+

+        $scope.editData = function (id) {

+            console.log("To be edited : " + id);

+            var dataFound = false;

+            angular.forEach($scope.data.controllerData, function (data) {

+                if (!dataFound) {

+                    if (data.id == id) {

+                        console.log("Found : " + data.Name);

+                        console.log("Data is sssss :"+data);

+                        $scope.ext = data;

+                        $("#myModal").modal();

+                        dataFound = true;

+                    }

+                }

+            });

+        }

+

+

+    })

+

+

+/*var modelTemplate;

+

+function loadTemplate() {

+    $.get('template.html', function (template) {

+        modelTemplate = template;

+    });

+}*/

+

+var modelTemplate = "";

+function loadTemplate() {

+    $.get('framework/template.html', function (template) {

+        modelTemplate += template;

+    });

+    $.get('framework/templateContainer.html', function (template) {

+        modelTemplate += template;

+    });

+    $.get('framework/templateWidget.html', function (template) {

+        //console.log("Template is : "+template);

+        modelTemplate += template;

+    });

+    $.get('framework/templateNotification.html', function (template) {

+        modelTemplate += template;

+    });

+    $.get('framework/templateFunctional.html', function (template) {

+        modelTemplate += template;

+    });

+}

+

+

+

diff --git a/extsys/src/main/webapp/extsys/sdncontroller/js/rest.js b/extsys/src/main/webapp/extsys/sdncontroller/js/rest.js
new file mode 100644
index 0000000..47b94c6
--- /dev/null
+++ b/extsys/src/main/webapp/extsys/sdncontroller/js/rest.js
@@ -0,0 +1,95 @@
+/*

+

+ Copyright 2017, Huawei Technologies Co., Ltd.

+

+ Licensed under the Apache License, Version 2.0 (the "License");

+ you may not use this file except in compliance with the License.

+ You may obtain a copy of the License at

+

+     http://www.apache.org/licenses/LICENSE-2.0

+

+ Unless required by applicable law or agreed to in writing, software

+ distributed under the License is distributed on an "AS IS" BASIS,

+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ See the License for the specific language governing permissions and

+ limitations under the License.

+

+ */

+

+

+app.factory("controllerDataService", function($http, DataService, $log){

+    var uri = 'http://192.168.9.13:18008';

+    return {

+        getControllerData : function() {

+            /*return $http({

+                url: 'http://localhost:3000/api/getControllerData',

+                method: 'GET',

+                headers: {'Content-Type': 'application/json'}

+            }).then(function(response){

+                //$log.info(response);

+                return response.data;

+            });*/

+            return DataService.get(uri+'/openoapi/extsys/v1/sdncontrollers')

+                .then(function(response){

+                    $log.info("in get data service data is  :"+response);

+                    console.log(response);

+                    return response;

+                });

+        },

+        addControllerData : function(controllerData) {

+            /*return $http({

+                url: 'http://localhost:3000/api/addProvinceData',

+                method: 'POST',

+                data: provinceDetail,

+                headers: {'Content-Type': 'application/json '}

+            }).then(function(response){

+                console.log("Response : ");

+                $log.info(response.data);

+                return response.data;

+            });*/

+            return DataService.post(uri+'/openoapi/extsys/v1/sdncontrollers', controllerData)

+                .then(function(response){

+                    console.log("Successfully added.. Data returned in DataService is");

+                    console.log(response.data);

+                    return response.data;

+                });

+        },

+        deleteControllerData : function(id) {

+            /*return $http({

+                url: 'http://localhost:3000/api/deleteProvinceData',

+                method: 'POST',

+                data: {'idList':idList},

+                headers: {'Content-Type': 'application/json'}

+            }).then(function(response){

+                console.log("Successfully Deleted..");

+                $log.info(response);

+                return response.data;

+            });*/

+            return DataService.delete(uri+'/openoapi/extsys/v1/sdncontrollers/'+id)

+                .then(function(response){

+                    $log.info("in delete data service data is  :"+response);

+                    console.log(response);

+                    return response;

+                });

+        },

+        editControllerData : function(controllerData) {

+            /*return $http({

+                url: 'http://localhost:3000/api/editProvinceData',

+                method: 'POST',

+                data: provinceDetail,

+                headers: {'Content-Type': 'application/json'}

+            }).then(function(response){

+                console.log("Successfully Edited...");

+                $log.info(response);

+                return response.data;

+            });*/

+

+            return DataService.put(uri+'/openoapi/extsys/v1/sdncontrollers', controllerData)

+                .then(function(response){

+                    console.log("Successfully edited.. Data returned in DataService is");

+                    console.log(response.data);

+                    return response.data;

+                });

+        }

+    }

+});
\ No newline at end of file
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/templates/controller.html b/extsys/src/main/webapp/extsys/sdncontroller/templates/controller.html
new file mode 100644
index 0000000..faa336d
--- /dev/null
+++ b/extsys/src/main/webapp/extsys/sdncontroller/templates/controller.html
@@ -0,0 +1,162 @@
+<!--/* Copyright 2017, Huawei Technologies Co., Ltd.

+*

+* Licensed under the Apache License, Version 2.0 (the "License");

+* you may not use this file except in compliance with the License.

+* You may obtain a copy of the License at

+*

+*    http://www.apache.org/licenses/LICENSE-2.0

+*

+* Unless required by applicable law or agreed to in writing, software

+* distributed under the License is distributed on an "AS IS" BASIS,

+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+* See the License for the specific language governing permissions and

+* limitations under the License.

+*/-->

+

+<div class="homecontent center">

+    <div class="col-md-12 col-sm-12 col-lg-12">

+<h4>{{title}}</h4>

+<br>

+<br>

+

+<div id="extsysAction" ng-init="init()">

+

+</div>

+<br><br>

+

+<table ng-table="controllerTableParams" class="table table-bordered table-striped customtable" show-filter="true">

+    <tr ng-repeat="controllerData in $data">

+        <!--<td header="'ng-table/headers/checkbox.html'">

+            <input type="checkbox" ng-model="checkboxes.items[controllerData.id]" />

+        </td>-->

+        <td title="'Name'" filter="{ Name: 'text'}" sortable="'Name'">

+            {{controllerData.Name}}

+        </td>

+        <td title="'Protocol'" filter="{ Protocol: 'text'}" sortable="'Protocol'">

+            {{controllerData.Protocol}}

+        </td>

+        <td title="'Product Name'" filter="{ productName: 'text'}" sortable="'productName'">

+            {{controllerData.productName}}

+        </td>

+        </td>

+        <td title="'Type'" filter="{ Type: 'text'}" sortable="'Type'">

+            {{controllerData.Type}}

+        </td>

+        <td title="'Vendor'" filter="{ Vendor: 'text'}" sortable="'Vendor'">

+            {{controllerData.Vendor}}

+        </td>

+        <td title="'Version'" filter="{ Version: 'number'}" sortable="'Version'">

+            {{controllerData.Version}}

+        </td>

+        <td title="'Description'" filter="{ Description: 'text'}" sortable="'Description'">

+            {{controllerData.Description}}

+        </td>

+        <td title="'Create Time'" filter="{ createTime: 'number'}" sortable="'createTime'">

+            {{controllerData.createTime}}

+        </td>

+        <td title="'Operation'" filter="{ Operation: 'text'}" sortable="'Operation'">

+            {{controllerData.Operation}}

+        </td>

+        <td title="'Action'">

+           <!-- <span class="pull-right glyphicon glyphicon-edit" ng-click="editData(controllerData.name)" style="cursor: pointer;margin: 0 5px"></span>

+            <span class="pull-right glyphicon glyphicon-trash" ng-click="deleteIndividualData(controllerData.name)" style="cursor: pointer;margin: 0 5px"></span>-->

+            <span  ng-click="editData(controllerData.id)" style="cursor: pointer;margin: 0 5px"> <img src="framework/images/edit.png" height="15" align="left"/></span>

+            <span  ng-click="deleteData(controllerData.id)" style="cursor: pointer;margin: 0 5px"><img src="framework/images/delete.png" height="15" align="middle"/></span>

+        </td>

+    </tr>

+</table>

+

+<!--<script type="text/ng-template" id="ng-table/headers/checkbox.html">

+    <input type="checkbox" ng-model="checkboxes.checked" name="filter-checkbox" value="" />

+</script>-->

+

+<div id="myTable"></div>

+

+<!-- Modal -->

+<div id="myModal" class="modal fade" role="dialog">

+    <div class="modal-dialog">

+

+        <!-- Modal content-->

+        <div class="modal-content">

+            <div class="modal-header">

+                <button type="button" class="close" data-dismiss="modal">&times;</button>

+                <h5 class="modal-title">Modal Header</h5>

+            </div>

+            <form  name="extsysForm" method="post">

+                <div class="modal-body">

+

+                    <div class="form-group row">

+                        <label class="col-xs-4 col-form-label">Name</label>

+                        <div id="name" class="col-xs-8">

+                        </div>

+                    </div>

+

+                    <div class="form-group row">

+                        <label class="col-xs-4 col-form-label">URL</label>

+                        <div id="url" class="col-xs-8">

+                        </div>

+                    </div>

+

+                    <div class="form-group row">

+                        <label class="col-xs-4 col-form-label">User Name</label>

+                        <div id="username" class="col-xs-8">

+                        </div>

+                    </div>

+

+                    <div class="form-group row">

+                        <label class="col-xs-4 col-form-label">Password</label>

+                        <div id="password" class="col-xs-8">

+                        </div>

+                    </div>

+

+                    <div class="form-group row">

+                        <label class="col-xs-4 col-form-label">Version</label>

+                        <div id="version" class="col-xs-8" >

+                        </div>

+                    </div>

+

+                    <div class="form-group row">

+                        <label class="col-xs-4 col-form-label">Vendor</label>

+                        <div id="vendor" class="col-xs-8" >

+                        </div>

+                    </div>

+

+                    <div class="form-group row">

+                        <label class="col-xs-4 col-form-label">Description</label>

+                        <div id="description" class="col-xs-8" >

+                        </div>

+                    </div>

+

+                    <div class="form-group row">

+                        <label class="col-xs-4 col-form-label">Protocol</label>

+                        <div id="protocol" class="col-xs-8" >

+                        </div>

+                    </div>

+

+                    <div class="form-group row">

+                        <label class="col-xs-4 col-form-label">Product Name</label>

+                        <div id="ProductName" class="col-xs-8" >

+                        </div>

+                    </div>

+

+                    <div class="form-group row">

+                        <label class="col-xs-4 col-form-label">Type</label>

+                        <div id="type" class="col-xs-8" >

+                        </div>

+                    </div>

+

+                </div>

+

+                <div id="footerBtns" class="modal-footer">

+                    <!--<button type="button" class="btn btn-default" ng-click="addData(province._id)" data-dismiss="modal" ng-disabled="provinceForm.$invalid">OK</button>-->

+                    <!--<input type="submit" class="btn btn-default" value="Submit"/>

+                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>-->

+                </div>

+            </form>

+        </div>

+

+

+    </div>

+</div>

+        </div>

+    </div>
\ No newline at end of file
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js
index 77d3f1f..f26f710 100644
--- a/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js
@@ -288,8 +288,8 @@
                     $log.info(tmplatesResponse);

                     var templatesInfo = translateToTemplatesInfo(tmplatesResponse);

                     document.getElementById("svcTempl").innerHTML = templatesInfo;

-                   /* $scope.optionsValue = tmplatesResponse;

-                    var dropSimple_data = {

+                    $scope.optionsValue = tmplatesResponse;

+                   /* var dropSimple_data = {

                         "errmsg" : "Service template is required.",

                         "modalVar" : "lifecycleData.optSelect",

                         "labelField" : "templateName",

@@ -448,7 +448,8 @@
             var serviceBaseInfo = {

                  'name' :  $scope.lifecycleData.serviceName,

                  'description' : $scope.lifecycleData.description,

-                 'templateId' :  $scope.lifecycleData.optSelect.serviceTemplateId

+                 //'templateId' :  $scope.lifecycleData.optSelect.serviceTemplateId

+				 'templateId' :  $("#svcTempl").val()

             };

             //send message

             $.when(DataService.createService(serviceBaseInfo))

diff --git a/resmgr/src/main/webapp/resmgr/js/app.js b/resmgr/src/main/webapp/resmgr/js/app.js
index 62f78ab..be7b5ee 100644
--- a/resmgr/src/main/webapp/resmgr/js/app.js
+++ b/resmgr/src/main/webapp/resmgr/js/app.js
@@ -261,7 +261,7 @@
             $scope.numericErr = false;

         }

         $scope.saveData = function(id) {

-            if (!$scope.textboxErrName && $scope.textboxErrMe) {

+            if (!$scope.textboxErrName && !$scope.textboxErrMe) {

 				var ports ={};

 				ports.logicalTerminationPoint=$scope.port;

                 if(id) {