summaryrefslogtreecommitdiffstats
path: root/resmgr
diff options
context:
space:
mode:
authorSeshu-Kumar-M <seshu.kumar.m@huawei.com>2017-04-19 19:28:39 +0800
committerSeshu-Kumar-M <seshu.kumar.m@huawei.com>2017-04-19 19:28:39 +0800
commit68fdc7631612f13e8247bc811ee706bc6a9f600e (patch)
tree97244af52e378888a9f99525656d247144f3c124 /resmgr
parent9671e1758ba94acbe501e6eafd62f071bd0bec62 (diff)
SDN COntroller and BRS issues
IssueId: CLIENT-197 Change-Id: I049af87e53ed6171f5c316785ec5a7a5012b9daa Signed-off-by: Seshu-Kumar-M <seshu.kumar.m@huawei.com>
Diffstat (limited to 'resmgr')
-rw-r--r--resmgr/src/main/webapp/resmgr/js/app.js28
-rw-r--r--resmgr/src/main/webapp/resmgr/nfv-resmgr/vim/vimgraph.html2
-rw-r--r--resmgr/src/main/webapp/resmgr/sdn-resmgr/ne/neRest.js10
3 files changed, 37 insertions, 3 deletions
diff --git a/resmgr/src/main/webapp/resmgr/js/app.js b/resmgr/src/main/webapp/resmgr/js/app.js
index d930cbb1..aea4a20d 100644
--- a/resmgr/src/main/webapp/resmgr/js/app.js
+++ b/resmgr/src/main/webapp/resmgr/js/app.js
@@ -1205,9 +1205,21 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
$('#myModal #controller').append($compile(Mustache.to_html(dropDown, dropSimple_data))($scope));*/
- var dropdownResponse=[{"serviceTemplateId":"meCtrl","templateName":"mecontroller1"},{"serviceTemplateId":"meCtrl2","templateName":"mecontroller"}];
+ /*var dropdownResponse=[{"serviceTemplateId":"meCtrl","templateName":"mecontroller1"},{"serviceTemplateId":"meCtrl2","templateName":"mecontroller"}];
var dropdownInfo = translateToDropdownInfo(dropdownResponse);
- document.getElementById("medropdown").innerHTML = dropdownInfo;
+ document.getElementById("medropdown").innerHTML = dropdownInfo;*/
+
+
+ neDataService.getNECtrlDDList()
+ .then(function (response) {
+ $scope.ctrlList = response.data;
+ var dropdownInfo = translateCtrlIDToDropdownInfo($scope.ctrlList);
+ $("#myModal #medropdown").html(dropdownInfo);
+ console.log("Data: ");
+ $log.info(data);
+ }, function (reason) {
+ $scope.message = "Error is :" + JSON.stringify(reason);
+ });
/*var neController = {"ErrMsg" : {"errmsg" : "IP Address is required.", "modalVar":"ne.controller"}};
$('#myModal #controller').append($compile(Mustache.to_html(text, neController.ErrMsg))($scope));*/
@@ -1275,6 +1287,18 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
return options;
}
+ function translateCtrlIDToDropdownInfo(dropdowndata) {
+ var options = '<option value="select">--select--</option>';
+ var i;
+ for (i = 0; i < dropdowndata.length; i += 1) {
+ var option = '<option value="' + dropdowndata[i].sdnControllerId + '">' + dropdowndata[i].name
+ + '</option>';
+ options = options + option;
+ }
+
+ return options;
+ }
+
$scope.validatetextboxName = function (value){
if($scope.ne.name) {
$scope.textboxErrName = false;
diff --git a/resmgr/src/main/webapp/resmgr/nfv-resmgr/vim/vimgraph.html b/resmgr/src/main/webapp/resmgr/nfv-resmgr/vim/vimgraph.html
index 2bde05b5..badaa021 100644
--- a/resmgr/src/main/webapp/resmgr/nfv-resmgr/vim/vimgraph.html
+++ b/resmgr/src/main/webapp/resmgr/nfv-resmgr/vim/vimgraph.html
@@ -50,7 +50,7 @@
<br>
<label style="font-size:14px;">Cpu status</label>
</div>
- <div style="...">
+ <div style="width:30%;float: left;text-align:center;display: inline">
<canvas id="memoryChart"></canvas>
<br>
<label style="font-size:14px;">Memory status</label>
diff --git a/resmgr/src/main/webapp/resmgr/sdn-resmgr/ne/neRest.js b/resmgr/src/main/webapp/resmgr/sdn-resmgr/ne/neRest.js
index f67c0fec..85564215 100644
--- a/resmgr/src/main/webapp/resmgr/sdn-resmgr/ne/neRest.js
+++ b/resmgr/src/main/webapp/resmgr/sdn-resmgr/ne/neRest.js
@@ -25,6 +25,16 @@ app.factory("neDataService", function($http, DataService, $log, siteDataService)
return response;
});
},
+ getNECtrlDDList : function () {
+ // var url = "http://10.229.36.183:18008";
+ url += "/openoapi/extsys/v1/sdncontrollers";
+ return DataService.get(url)
+ .then(function(response){
+ $log.info("in get data service data is :"+response);
+ console.log(response);
+ return response;
+ });
+ },
getAllNEData : function() {
/*return $http({
url: 'http://localhost:3000/meAPI/getAllNEData',