SDN COntroller and BRS issues
authorSeshu-Kumar-M <seshu.kumar.m@huawei.com>
Wed, 19 Apr 2017 11:28:39 +0000 (19:28 +0800)
committerSeshu-Kumar-M <seshu.kumar.m@huawei.com>
Wed, 19 Apr 2017 11:28:39 +0000 (19:28 +0800)
IssueId: CLIENT-197

Change-Id: I049af87e53ed6171f5c316785ec5a7a5012b9daa
Signed-off-by: Seshu-Kumar-M <seshu.kumar.m@huawei.com>
14 files changed:
extsys/src/main/webapp/extsys/sdncontroller/bak/controller.html
extsys/src/main/webapp/extsys/sdncontroller/css/style.css [new file with mode: 0644]
extsys/src/main/webapp/extsys/sdncontroller/index.html
extsys/src/main/webapp/extsys/sdncontroller/js/app.js
extsys/src/main/webapp/extsys/sdncontroller/js/rest.js
extsys/src/main/webapp/extsys/sdncontroller/templates/controller.html
extsys/src/main/webapp/extsys/sdncontroller/templates/templateContainer.html [new file with mode: 0644]
extsys/src/main/webapp/extsys/sdncontroller/templates/templateFunctional.html [new file with mode: 0644]
extsys/src/main/webapp/extsys/sdncontroller/templates/templateNotification.html [new file with mode: 0644]
extsys/src/main/webapp/extsys/sdncontroller/templates/templateWidget.html [new file with mode: 0644]
lifecyclemgr/src/main/webapp/lifecyclemgr/style.css [new file with mode: 0644]
resmgr/src/main/webapp/resmgr/js/app.js
resmgr/src/main/webapp/resmgr/nfv-resmgr/vim/vimgraph.html
resmgr/src/main/webapp/resmgr/sdn-resmgr/ne/neRest.js

index 144a9be..5397e6e 100644 (file)
     <head lang="en">
         <meta charset="UTF-8">
         <title></title>
-        <link href="css/bootstrap.min.css" rel="stylesheet"/>
-        <link href="css/VMMain.css" rel="stylesheet"/>
-        <link href="css/bootstrap-table.min.css" rel="stylesheet"/>
-        <script type="text/javascript" src="js/jquery-1.11.2.min.js"></script>
-        <script type="text/javascript" src="js/controller.js"></script>
-        <script type="text/javascript" src="js/bootstrap.min.js"></script>
-        <script type="text/javascript" src="js/bootstrap-table.min.js"></script>
-        <script type="text/javascript" src="js/bootstrap-table-filter-control.min.js"></script>
+        <link href="/openoui/extsys/sdncontroller/bak/css/bootstrap.min.css" rel="stylesheet"/>
+        <link href="/openoui/extsys/sdncontroller/bak/css/VMMain.css" rel="stylesheet"/>
+        <link href="/openoui/extsys/sdncontroller/bak/css/bootstrap-table.min.css" rel="stylesheet"/>
+        <script type="text/javascript" src="/openoui/extsys/sdncontroller/bak/js/jquery-1.11.2.min.js"></script>
+        <script type="text/javascript" src="/openoui/extsys/sdncontroller/bak/js/controller.js"></script>
+        <script type="text/javascript" src="/openoui/extsys/sdncontroller/bak/js/bootstrap.min.js"></script>
+        <script type="text/javascript" src="/openoui/extsys/sdncontroller/bak/js/bootstrap-table.min.js"></script>
+        <script type="text/javascript" src="/openoui/extsys/sdncontroller/bak/js/bootstrap-table-filter-control.min.js"></script>
         <script type="text/javascript">
             $(document).ready(function () {
-                loadControllerData();
+              loadControllerData();
             });
             function operateFormatter(value, row, index) {
                 return ['<img class="siteDeleteImg" src="images/delete.png" href="javascript:void(0)" style="cursor: pointer" name="title" title="Delete" />']
@@ -55,7 +55,7 @@
             <div id="open_base_tpL_buttonGroup" class="openoButton_buttonGroupClass">
                 <div
                         class="openo openo-widget-button openoButton_buttonClass_parent ng-isolate-scope openoButton_buttonClass defaultbutton openoButton_button_default"
-                        tabindex="0" id="false" text="res.brApp_ui_res_btn_create" icon-url="./images/add.png"
+                        tabindex="0" id="false" text="res.brApp_ui_res_btn_create" icon-url="/openoui/extsys/sdncontroller/bak/images/add.png"
                         cls="defaultbutton" click="clickAdd"
                         style="display: inline-block; padding-left: 0px; padding-right: 0px;">
                     <div class="openoButton_buttonInnerClass openo-corner-all openoButton_Image" id="false_button">
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/css/style.css b/extsys/src/main/webapp/extsys/sdncontroller/css/style.css
new file mode 100644 (file)
index 0000000..1f81d81
--- /dev/null
@@ -0,0 +1,33 @@
+/* Copyright 2017, Huawei Technologies Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *              http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
\r
+\r
+.containerh{\r
+       background-color:white !important;\r
+       min-height:800px;\r
+\r
+}\r
+\r
+#textCenter{\r
+    padding-top:8px;\r
+}\r
+\r
+#rowSpacing{\r
+    margin-bottom: 9px;\r
+}\r
+\r
+#borderSpacing{\r
+    margin-bottom: -15px;\r
+}
\ No newline at end of file
index 6285557..1a0d84f 100644 (file)
     <!--<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>-->\r
     <script src="/openoui/thirdparty/js/jquery-ui.js"></script>\r
     <script type="text/javascript" src="/openoui/thirdparty/js/bootstrap.min.js"></script>\r
+       <link href="/openoui/extsys/sdncontroller/css/style.css" rel="stylesheet"/>\r
     <script src="/openoui/extsys/sdncontroller/js/app.js"></script>\r
     <script src="/openoui/extsys/sdncontroller/js/rest.js"></script>\r
-    <script src="/openoui/framework/js/DataService.js"></script>\r
+    <script src="/openoui/framework/browser/js/DataService.js"></script>\r
     <script src="/openoui/thirdparty/js/mustache.js"></script>\r
 \r
 \r
 </head>\r
 \r
-<body ng-app="ControllerApp" onload="loadTemplate()">\r
+<body ng-app="ControllerApp" class="containerh"> <!-- onload="loadTemplate()"-->\r
     <ui-view></ui-view>\r
 </body>\r
 </html>
\ No newline at end of file
index c6f601c..25fb256 100644 (file)
@@ -27,6 +27,12 @@ var app = angular.module("ControllerApp", ["ui.router", "ngTable"])
      }\r
      });\r
      })*/\r
+       .run(function($rootScope, $location, $state, $stateParams) {\r
+        $rootScope.$on('$viewContentLoaded', function() {\r
+            //call it here\r
+            loadTemplate();\r
+        });\r
+    })\r
     .config(function($stateProvider, $urlRouterProvider, $urlMatcherFactoryProvider) {\r
         //$routeProvider.caseInsensitiveMatch = true;\r
         $urlMatcherFactoryProvider.caseInsensitive(true);\r
@@ -54,8 +60,8 @@ var app = angular.module("ControllerApp", ["ui.router", "ngTable"])
                     $log.info(data);\r
                     loadButtons();\r
                 }, function (reason) {\r
-\r
                     $scope.message = "Error is :" + JSON.stringify(reason);\r
+                                       loadButtons();\r
                 });\r
         }\r
 \r
@@ -63,27 +69,13 @@ var app = angular.module("ControllerApp", ["ui.router", "ngTable"])
             var def_button_tpl = $(modelTemplate).filter('#defaultButtons').html();\r
             var def_iconbutton_tpl = $(modelTemplate).filter('#defaultIconButtons').html();\r
             var dialog = $(modelTemplate).filter('#dialog').html();\r
-            var add_data = {"title":"Create", "type":"btn btn-default",  "gType": "plus-icon", "iconPosition":"left", "clickAction":"showAddModal()"};\r
+            var add_data = {"title":"Create", "type":"btn btn-default", "gType": "plus-icon", "iconPosition":"left", "clickAction":"showAddModal()"};\r
            // var delete_data = {"title":"Delete Selected", "type":"btn btn-default", "gType": "delete-icon", "iconPosition":"left", "clickAction":"deleteData()"};\r
             var addhtml = Mustache.to_html(def_iconbutton_tpl, add_data);\r
             //var deletehtml = Mustache.to_html(def_iconbutton_tpl, delete_data);\r
             $('#extsysAction').html($compile(addhtml)($scope));\r
             //$('#extsysAction').append($compile(deletehtml)($scope));\r
 \r
-            $scope.checkboxes = { 'checked': false, items: {} };\r
-\r
-            //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}];\r
-            $scope.controllerTableParams = new NgTableParams({count: 5, sorting: {name: 'asc'}    //{page: 1,count: 10,filter: {name: 'M'},sorting: {name: 'desc'}\r
-            }, { counts:[5, 10, 20, 50], dataset: $scope.data.controllerData});\r
-\r
-            /*$scope.$watch('checkboxes.checked', function(value) {\r
-                angular.forEach($scope.data.controllerData, function(item) {\r
-                    console.log("#######"+item.id);\r
-                    if (angular.isDefined(item.id)) {\r
-                        $scope.checkboxes.items[item.id] = value;\r
-                    }\r
-                });\r
-            });*/\r
 \r
             var modelSubmit_data = {"title":"OK", "clickAction":"saveData(ext.id)"};\r
             var modelSubmit_html = Mustache.to_html(def_button_tpl, modelSubmit_data);\r
@@ -120,29 +112,33 @@ var app = angular.module("ControllerApp", ["ui.router", "ngTable"])
             /*var extProtocol = {"ErrMsg" :     {"textboxErr" : "Protocol is required.", "modalVar":"ext.protocol"}};\r
             $('#myModal #protocol').append($compile(Mustache.to_html(text, extProtocol.ErrMsg))($scope));*/\r
 \r
-            var dropdowndata_protocol = {\r
+            /*var dropdowndata_protocol = {\r
                 "modalVar" : "ext.Protocol",\r
                 "labelField" : "itemLabel",\r
-                "optionsValue" : JSON.stringify($scope.data.dropdownProtocolData.item)\r
+                "optionsValue" : JSON.stringify($scope.data ? $scope.data.dropdownProtocolData.item : "")\r
             };\r
 \r
-            console.log("dropdown data:"+$scope.data.dropdownProtocolData.item);\r
+            //console.log("dropdown data:"+$scope.data.dropdownProtocolData.item);\r
+\r
+            $('#myModal #protocol').append($compile(Mustache.to_html(dropDown, dropdowndata_protocol))($scope));*/\r
 \r
-            $('#myModal #protocol').append($compile(Mustache.to_html(dropDown, dropdowndata_protocol))($scope));\r
+            var dropdownResponse=[{"id":"netconf","name":"netconf"},{"id":"snmp","name":"snmp"}];\r
+            var dropdownInfo = translateToDropdownInfo(dropdownResponse);\r
+            $('#myModal #protocolDD').html(dropdownInfo);\r
 \r
             var extProductName = {"ErrMsg" :     {"textboxErr" : "ProductName is required.", "modalVar":"ext.productName"}};\r
             $('#myModal #ProductName').append($compile(Mustache.to_html(text, extProductName.ErrMsg))($scope));\r
 \r
-            /*var extType = {"ErrMsg" :     {"textboxErr" : "Type is required.", "modalVar":"ext.type"}};\r
-            $('#myModal #type').append($compile(Mustache.to_html(text, extType.ErrMsg))($scope));*/\r
+            var extType = {"ErrMsg" :     {"textboxErr" : "Type is required.", "modalVar":"ext.type"}};\r
+            $('#myModal #type').append($compile(Mustache.to_html(text, extType.ErrMsg))($scope));\r
 \r
-            var dropdowndata_type = {\r
+            /*var dropdowndata_type = {\r
                 "modalVar" : "ext.Type",\r
                 "labelField" : "itemLabel",\r
-                "optionsValue" : JSON.stringify($scope.data.dropdownTypeData.item)\r
+                "optionsValue" : JSON.stringify($scope.data?$scope.data.dropdownTypeData.item:"")\r
             };\r
 \r
-            $('#myModal #type').append($compile(Mustache.to_html(dropDown, dropdowndata_type))($scope));\r
+            $('#myModal #type').append($compile(Mustache.to_html(dropDown, dropdowndata_type))($scope));*/\r
 \r
 \r
 \r
@@ -156,6 +152,20 @@ var app = angular.module("ControllerApp", ["ui.router", "ngTable"])
             var extOperation = {"ErrMsg" :     {"textboxErr" : "The name is required.", "modalVar":"ext.operation", "placeholder":"Hard Disk"}};\r
             $('#myModal #Operation').append($compile(Mustache.to_html(text, extOperation.ErrMsg))($scope));*/\r
 \r
+            $scope.checkboxes = { 'checked': false, items: {} };\r
+\r
+            //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}];\r
+            $scope.controllerTableParams = new NgTableParams({count: 5, sorting: {name: 'asc'}    //{page: 1,count: 10,filter: {name: 'M'},sorting: {name: 'desc'}\r
+            }, { counts:[5, 10, 20, 50], dataset: $scope.data.controllerData});\r
+\r
+            /*$scope.$watch('checkboxes.checked', function(value) {\r
+             angular.forEach($scope.data.controllerData, function(item) {\r
+             console.log("#######"+item.id);\r
+             if (angular.isDefined(item.id)) {\r
+             $scope.checkboxes.items[item.id] = value;\r
+             }\r
+             });\r
+             });*/\r
 \r
 \r
         }\r
@@ -199,6 +209,17 @@ var app = angular.module("ControllerApp", ["ui.router", "ngTable"])
             $state.reload();\r
         }\r
 \r
+        function translateToDropdownInfo(dropdowndata) {\r
+            var options = '<option value="select">--select--</option>';\r
+            var i;\r
+            for (i = 0; i < dropdowndata.length; i += 1) {\r
+                var option = '<option value="' + dropdowndata[i].id + '">' + dropdowndata[i].name\r
+                    + '</option>';\r
+                options = options + option;\r
+            }\r
+\r
+            return options;\r
+        }\r
 \r
 \r
         /*$scope.checkAll = function () {\r
@@ -335,22 +356,43 @@ function loadTemplate() {
     });\r
 }*/\r
 \r
-var modelTemplate = "";\r
+/*var modelTemplate = "";\r
 function loadTemplate() {\r
-    $.get('framework/template.html', function (template) {\r
+    *//*$.get('/openoui/framework/template.html', function (template) {\r
+        modelTemplate += template;\r
+    });*//*\r
+    $.get('/openoui/framework/templateContainer.html', function (template) {\r
+        modelTemplate += template;\r
+    });\r
+    $.get('/openoui/framework/templateWidget.html', function (template) {\r
+        //console.log("Template is : "+template);\r
+        modelTemplate += template;\r
+    });\r
+    $.get('/openoui/framework/templateNotification.html', function (template) {\r
+        modelTemplate += template;\r
+    });\r
+    $.get('/openoui/framework/templateFunctional.html', function (template) {\r
         modelTemplate += template;\r
     });\r
-    $.get('framework/templateContainer.html', function (template) {\r
+}*/\r
+\r
+var modelTemplate = "";\r
+function loadTemplate() {\r
+\r
+    /*$.get('/openoui/resmgr/templates/template.html', function (template) {\r
+        modelTemplate += template;\r
+     });*/\r
+    $.get('/openoui/extsys/sdncontroller/templates/templateContainer.html', function (template) {\r
         modelTemplate += template;\r
     });\r
-    $.get('framework/templateWidget.html', function (template) {\r
+    $.get('/openoui/extsys/sdncontroller/templates/templateWidget.html', function (template) {\r
         //console.log("Template is : "+template);\r
         modelTemplate += template;\r
     });\r
-    $.get('framework/templateNotification.html', function (template) {\r
+    $.get('/openoui/extsys/sdncontroller/templates/templateNotification.html', function (template) {\r
         modelTemplate += template;\r
     });\r
-    $.get('framework/templateFunctional.html', function (template) {\r
+    $.get('/openoui/extsys/sdncontroller/templates/templateFunctional.html', function (template) {\r
         modelTemplate += template;\r
     });\r
 }\r
index 47b94c6..1279c42 100644 (file)
@@ -18,7 +18,7 @@
 \r
 \r
 app.factory("controllerDataService", function($http, DataService, $log){\r
-    var uri = 'http://192.168.9.13:18008';\r
+    var uri = '';\r
     return {\r
         getControllerData : function() {\r
             /*return $http({\r
index faa336d..3e914d0 100644 (file)
                     <div class="form-group row">\r
                         <label class="col-xs-4 col-form-label">Protocol</label>\r
                         <div id="protocol" class="col-xs-8" >\r
+                            <select id="protocolDD" class="form-control inputfield" ng-model="ne.optSelect"></select>\r
                         </div>\r
                     </div>\r
 \r
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/templates/templateContainer.html b/extsys/src/main/webapp/extsys/sdncontroller/templates/templateContainer.html
new file mode 100644 (file)
index 0000000..ef6f01c
--- /dev/null
@@ -0,0 +1,79 @@
+<!--\r
+\r
+    Copyright 2016-2017, Huawei Technologies Co., Ltd.\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<!-- Accordion -->\r
+<script id="accordion" type="text/html">\r
+    {{#items}}\r
+    <div class="panel panel-default">\r
+        <h3 class="panel-title">\r
+            <a data-toggle="collapse" data-parent="#accordion" data-target="#{{tabId}}">{{header}}</a>\r
+        </h3>\r
+        <div id="{{tabId}}" class="panel-collapse collapse {{#isActive}}in{{/isActive}}">\r
+            <div class="panel-body"> {{msg}} </div>\r
+        </div>\r
+    </div>\r
+    {{/items}}\r
+</script>\r
+\r
+<!--Tabs-->\r
+<script id="tabs" type="text/html">\r
+    <ul class="nav nav-tabs">\r
+        {{#items}}<li {{#isActive}}class="active"{{/isActive}}><a data-toggle="tab" data-target="#{{target}}">{{tablabel}}</a></li>{{/items}}\r
+    </ul>\r
+    <div class="tab-content">\r
+        {{#items}}\r
+        <div id="{{target}}" class="tab-pane fade {{#isActive}}in active{{/isActive}}">\r
+            <h3>{{tablabel}}</h3>\r
+            <p>{{msg}}</p>\r
+        </div>\r
+        {{/items}}\r
+    </div>\r
+</script>\r
+\r
+<!--Vertical Tabs-->\r
+<script id="vtabs" type="text/html">\r
+    <ul class="nav nav-stacked col-sm-4 col-md-4 col-lg-4">\r
+        {{#items}}<li {{#isActive}}class="active"{{/isActive}}><a data-toggle="tab" data-target="#{{target}}">{{tablabel}}</a></li>{{/items}}\r
+    </ul>\r
+    <div class="tab-content col-sm-8 col-md-8 col-lg-8">\r
+        {{#items}}\r
+        <div id="{{target}}" class="tab-pane fade {{#isActive}}in active{{/isActive}}">\r
+            <h3>{{tablabel}}</h3>\r
+            <p>{{msg}}</p>\r
+        </div>\r
+        {{/items}}\r
+    </div>\r
+</script>\r
+\r
+<!--Table-->\r
+<script id="table" type="text/html">\r
+    {{#filter}}<input type="text" id="myInput" onkeyup="{{action}}" placeholder="Search for {{searchField}}">{{/filter}}\r
+    <table id="myTable{{#filter}}_search{{/filter}}" class="table {{#striped}}table-striped{{/striped}} {{#border}}table-bordered{{/border}} {{#hover}}table-hover{{/hover}} {{#condensed}}table-condensed{{/condensed}}">\r
+        <thead>\r
+        <tr>\r
+            {{#itemHeader}}<th>{{.}}</th>{{/itemHeader}}\r
+        </tr>\r
+        </thead>\r
+        <tbody>\r
+        {{#rowitem}}\r
+        <tr>\r
+            {{#values}}<td>{{.}}</td>{{/values}}\r
+        </tr>\r
+        {{/rowitem}}\r
+        </tbody>\r
+    </table>\r
+</script>
\ No newline at end of file
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/templates/templateFunctional.html b/extsys/src/main/webapp/extsys/sdncontroller/templates/templateFunctional.html
new file mode 100644 (file)
index 0000000..ff2f53f
--- /dev/null
@@ -0,0 +1,82 @@
+<!--\r
+\r
+    Copyright 2016-2017, Huawei Technologies Co., Ltd.\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+\r
+<script id="functionalDialog" type="text/html">\r
+    <div id="funModal" class="modal fade" role="dialog" ng-init="getDetail()">\r
+        <div class="modal-dialog modal-md">\r
+\r
+            <!-- Modal content-->\r
+            <div class="modal-content">\r
+                <div class="modal-header">\r
+                    <button type="button" class="close" data-dismiss="modal">&times;</button>\r
+                    <h4 class="modal-title titlestyle">{{title}}</h4>\r
+                </div>\r
+                <div class="modal-body">\r
+                    <div>\r
+                        <form class="form-horizontal" role="form">\r
+                            {{#labels}}\r
+                            <div class="form-group">\r
+                                <label class="control-label col-sm-3 labelstyle" for={{input_id}}>{{text}}</label>\r
+                                <div class="col-sm-7">\r
+                                    <input type={{type}} class="form-control" id={{input_id}}>\r
+                                </div>\r
+                            </div>\r
+                            {{/labels}}\r
+                        </form>\r
+                    </div>\r
+                </div>\r
+                <div class="modal-footer">\r
+                    <div>{{#buttons}} <button type="button" class="btn btnDefault btnmrg" data-dismiss="modal" >{{text}}</button> {{/buttons}}\r
+                        {{#showClose}}<button type="button" class="btn btnDefault btnmrg" data-dismiss="modal">{{closeBtnTxt}}</button>{{/showClose}}\r
+                    </div>\r
+                    <!--<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>-->\r
+                </div>\r
+            </div>\r
+\r
+        </div>\r
+    </div>\r
+</script>\r
+\r
+\r
+<script id="dialog" type="text/html">\r
+    <div id="uniModal" class="modal fade" role="dialog">\r
+        <div class="modal-dialog">\r
+\r
+            <!-- Modal content-->\r
+            <div class="modal-content">\r
+                <div class="modal-header">\r
+                    <button type="button" class="close" data-dismiss="modal">&times;</button>\r
+                    <div class="modalHeader"></div>\r
+                </div>\r
+                <form name="provinceForm" method="post"><!-- ng-submit="saveData(province.id)"-->\r
+                    <div class="modal-body">\r
+                        <div class="modalBodyContent">\r
+                        </div>\r
+                    </div>\r
+\r
+                    <div id="footerBtns" class="modal-footer">\r
+                    </div>\r
+\r
+                </form>\r
+            </div>\r
+\r
+\r
+        </div>\r
+    </div>\r
+\r
+</script>
\ No newline at end of file
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/templates/templateNotification.html b/extsys/src/main/webapp/extsys/sdncontroller/templates/templateNotification.html
new file mode 100644 (file)
index 0000000..97f26e3
--- /dev/null
@@ -0,0 +1,48 @@
+<!--\r
+\r
+    Copyright 2016-2017, Huawei Technologies Co., Ltd.\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+\r
+<!--Dialog-->\r
+<script id="personDialog" type="text/html">\r
+    <div id="msgModal" class="modal fade" role="dialog">\r
+        <div class="modal-dialog modal-md">\r
+\r
+            <!-- Modal content-->\r
+            <div class="modal-content">\r
+                <div class="modal-header">\r
+                    <button type="button" class="close" data-dismiss="modal">&times;</button>\r
+                    <h4 class="modal-title titlestyle">{{title}}</h4>\r
+                </div>\r
+                <div class="modal-body">\r
+                    <div class="container center">\r
+                        <div class="row">\r
+                            <div class="col-xs-2 col-sm-2 col-md-1 col-lg-1 icon {{icon}} {{iconColor}}"></div>\r
+                            <div class="msg col-xs-10 col-sm-10 col-md-11 col-lg-11" style="text-align:left;vertical-align: middle;">{{msg}}</div>\r
+                        </div>\r
+                    </div>\r
+                </div>\r
+                <div class="modal-footer">\r
+                    <div>{{#buttons}} <button type="button" class="btn btnDefault btnmrg" data-dismiss="modal" ng-click={{action}}>{{text}}</button> {{/buttons}}\r
+                        {{#showClose}}<button type="button" class="btn btnDefault btnmrg" data-dismiss="modal">{{closeBtnTxt}}</button>{{/showClose}}\r
+                    </div>\r
+                    <!--<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>-->\r
+                </div>\r
+            </div>\r
+\r
+        </div>\r
+    </div>\r
+</script>
\ No newline at end of file
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/templates/templateWidget.html b/extsys/src/main/webapp/extsys/sdncontroller/templates/templateWidget.html
new file mode 100644 (file)
index 0000000..bb8eef4
--- /dev/null
@@ -0,0 +1,222 @@
+<!--\r
+\r
+    Copyright 2016-2017, Huawei Technologies Co., Ltd.\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+\r
+<!-- Default Buttons <button class="btnDefault" ng-click="{{clickAction}}">{{title}}</button>-->\r
+<script id="defaultButtons" type="text/html">\r
+    <input type="button" class="btnDefault btnmrg" ng-click="{{clickAction}}" value="{{title}}"/>\r
+</script>\r
+\r
+<script id="defaultIconButtons" type="text/html">\r
+    <button id="iconBtn" type="button" class="btnDefault  btnmrg {{type}}" ng-click="{{clickAction}}">{{title}}\r
+        <span class="glyphicon {{gType}} pull-{{iconPosition}}"></span>\r
+    </button>\r
+</script>\r
+\r
+<!-- Visual Buttons -->\r
+<script id="visualButtons" type="text/html">\r
+    <button type="button" class="btn btn-{{type}}">{{title}}</button>\r
+</script>\r
+\r
+<!-- Different sized Buttons -->\r
+<script id="sizeButtons" type="text/html">\r
+    <button type="button" class="btn btn-{{type}} {{size}}">{{title}}</button>\r
+</script>\r
+\r
+<!-- Icon Buttons -->\r
+<script id="iconButtons" type="text/html">\r
+    <button type="button" class="btn btn-{{type}}">{{title}}\r
+        <span class="glyphicon {{gType}}"></span>\r
+    </button>\r
+</script>\r
+\r
+<!--Dropdown template-->\r
+<script id="dropDown" type="text/html">\r
+    <div class="drop{{position}}">\r
+        <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">{{title}}\r
+            <span class="caret"></span>\r
+        </button>\r
+        <ul class="dropdown-menu">\r
+            {{#items}}<li><a href="#">{{itemLabel}}</a></li>{{/items}}\r
+        </ul>\r
+    </div>\r
+</script>\r
+\r
+<script id="dropDownHeader" type="text/html">\r
+    <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">{{title}}\r
+        <span class="caret"></span>\r
+    </button>\r
+    <ul class="dropdown-menu">\r
+        {{#items}}\r
+        {{#isheader}}<li class="divider"></li><li class="dropdown-header">{{itemLabel}}</li><li class="divider"></li>{{/isheader}}\r
+        {{^isheader}}<li><a href="#">{{itemLabel}}</a></li>{{/isheader}}\r
+        {{/items}}\r
+    </ul>\r
+</script>\r
+\r
+<script id="simpleDropdownTmpl" type="text/html">\r
+    <div class="dropdownplain">\r
+\r
+        <select class="inputfield form-control" ng-model="{{modalVar}}" ng-options="item.{{labelField}} for item in {{optionsValue}}">\r
+            <option style="display:none" value="">--select--</option>\r
+        </select>\r
+    </div>\r
+</script>\r
+\r
+\r
+<!--Radio Buttons-->\r
+<script id="radioButtons" type="text/html">\r
+    <div>\r
+        <input class="magic-radio" type="radio" name="radio" id="radio{{id}}"/>\r
+        <label for="radio{{id}}">{{label}}</label></br>\r
+    </div>\r
+</script>\r
+\r
+<!--Check boxes template-->\r
+<script id="checkBoxes" type="text/html">\r
+    <div class="funkyradio-{{type}}">\r
+        <input type="checkbox" name="check" id="checkbox{{id}}" {{#checked}}checked{{/checked}} />\r
+        <label for="checkbox{{id}}">{{label}}</label>\r
+    </div>\r
+</script>\r
+\r
+<!--text-->\r
+<script id="textfield" type="text/html">\r
+    <div class="css-form">\r
+       <input id ="textbox" name="textbox" class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="text"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}> {{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--email-->\r
+<script id="email" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield"  placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="email"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--url-->\r
+<script  id="url" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="url"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--password-->\r
+<script  id="password" type="text/html">\r
+    <div class="css-form">\r
+\r
+\r
+        <input class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="password" pattern=".{3,}" maxlength="{{#maxLength}}{{maxLength}}{{/maxLength}}{{^maxLength}}9{{/maxLength}}" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--numeric-->\r
+<script id="numeric" type="text/html">\r
+    <div class="css-form">\r
+        <input  class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="number"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}/>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--dot-->\r
+<script  id="dot" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield"  placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="datetime-local"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--date-->\r
+<script  id="dateinput" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield"  placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="date" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--Month-->\r
+<script  id="monthinput" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="month"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+\r
+<!--Week-->\r
+<script   id="weekinput" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield"  placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="week"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--time-->\r
+<script   id="timeinput" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield"  placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="time"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--ipv4-->\r
+<script   id="ipv4" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield" type="ipv4" placeholder="{{placeholder}}" ng-model="{{modalVar}}" pattern="((^|\.)((25[0-5])|(2[0-4]\d)|(1\d\d)|([1-9]?\d))){4}$"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--ipv6-->\r
+<script   id="ipv6" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield"   placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="ipv6"  pattern="^([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--textarea-->\r
+<script id="textarea" type="text/html">\r
+    <div class="css-form">\r
+        <textarea class="form-control inputfield"  rows="4" cols="50" placeholder="{{placeholder}}" ng-model="{{modalVar}}"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}></textarea>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--note-->\r
+<script id="note" type="text/html">\r
+\r
+    <a  id="noteanchor" href="#/home/textarea" title="Note" data-toggle="popover" data-trigger="focus" data-placement="{{placement}}">\r
+        <span class="glyphicon glyphicon-info-sign "></span></a>\r
+</script>\r
+\r
+<!-- list -->\r
+<script id="list" type="text/html">\r
+\r
+    {{#items}}\r
+\r
+    <div>\r
+        <button type="button" class="btn btn-primary btn-block" ng-click="loadSubMenuPage('{{id}}', '{{level}}', '{{row}}')">{{title}}</button>\r
+    </div>\r
+\r
+    {{/items}}\r
+\r
+</script>\r
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/style.css b/lifecyclemgr/src/main/webapp/lifecyclemgr/style.css
new file mode 100644 (file)
index 0000000..b0ce4f6
--- /dev/null
@@ -0,0 +1,16 @@
+/* Copyright 2017, Huawei Technologies Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *              http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
\r
+\r
index d930cbb..aea4a20 100644 (file)
@@ -1205,9 +1205,21 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
 \r
             $('#myModal #controller').append($compile(Mustache.to_html(dropDown, dropSimple_data))($scope));*/\r
                        \r
-                       var dropdownResponse=[{"serviceTemplateId":"meCtrl","templateName":"mecontroller1"},{"serviceTemplateId":"meCtrl2","templateName":"mecontroller"}];\r
+                       /*var dropdownResponse=[{"serviceTemplateId":"meCtrl","templateName":"mecontroller1"},{"serviceTemplateId":"meCtrl2","templateName":"mecontroller"}];\r
                        var dropdownInfo = translateToDropdownInfo(dropdownResponse);\r
-            document.getElementById("medropdown").innerHTML = dropdownInfo;\r
+            document.getElementById("medropdown").innerHTML = dropdownInfo;*/\r
+\r
+\r
+            neDataService.getNECtrlDDList()\r
+                .then(function (response) {\r
+                    $scope.ctrlList = response.data;\r
+                    var dropdownInfo = translateCtrlIDToDropdownInfo($scope.ctrlList);\r
+                    $("#myModal #medropdown").html(dropdownInfo);\r
+                    console.log("Data: ");\r
+                    $log.info(data);\r
+                }, function (reason) {\r
+                    $scope.message = "Error is :" + JSON.stringify(reason);\r
+                });\r
 \r
             /*var neController = {"ErrMsg" :     {"errmsg" : "IP Address is required.", "modalVar":"ne.controller"}};\r
             $('#myModal #controller').append($compile(Mustache.to_html(text, neController.ErrMsg))($scope));*/\r
@@ -1275,6 +1287,18 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
             return options;\r
         }\r
 \r
+        function translateCtrlIDToDropdownInfo(dropdowndata) {\r
+            var options = '<option value="select">--select--</option>';\r
+            var i;\r
+            for (i = 0; i < dropdowndata.length; i += 1) {\r
+                var option = '<option value="' + dropdowndata[i].sdnControllerId + '">' + dropdowndata[i].name\r
+                    + '</option>';\r
+                options = options + option;\r
+            }\r
+\r
+            return options;\r
+        }\r
+\r
         $scope.validatetextboxName = function (value){\r
             if($scope.ne.name) {\r
                 $scope.textboxErrName = false;\r
index 2bde05b..badaa02 100644 (file)
@@ -50,7 +50,7 @@
         <br>\r
         <label style="font-size:14px;">Cpu status</label>\r
     </div>\r
-    <div style="...">\r
+    <div style="width:30%;float: left;text-align:center;display: inline">\r
         <canvas id="memoryChart"></canvas>\r
         <br>\r
         <label style="font-size:14px;">Memory status</label>\r
index f67c0fe..8556421 100644 (file)
@@ -25,6 +25,16 @@ app.factory("neDataService", function($http, DataService, $log, siteDataService)
                     return response;\r
                 });\r
         },\r
+        getNECtrlDDList : function () {\r
+           // var url = "http://10.229.36.183:18008";\r
+            url += "/openoapi/extsys/v1/sdncontrollers";\r
+            return DataService.get(url)\r
+                .then(function(response){\r
+                    $log.info("in get data service data is  :"+response);\r
+                    console.log(response);\r
+                    return response;\r
+                });\r
+        },\r
         getAllNEData : function() {\r
             /*return $http({\r
                 url: 'http://localhost:3000/meAPI/getAllNEData',\r