summaryrefslogtreecommitdiffstats
path: root/resmgr/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'resmgr/src/main')
-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',