diff options
5 files changed, 35 insertions, 17 deletions
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/js/app.js b/extsys/src/main/webapp/extsys/sdncontroller/js/app.js index 25fb256b..9a47d6c6 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/js/app.js +++ b/extsys/src/main/webapp/extsys/sdncontroller/js/app.js @@ -122,7 +122,7 @@ var app = angular.module("ControllerApp", ["ui.router", "ngTable"]) $('#myModal #protocol').append($compile(Mustache.to_html(dropDown, dropdowndata_protocol))($scope));*/
- var dropdownResponse=[{"id":"netconf","name":"netconf"},{"id":"snmp","name":"snmp"}];
+ var dropdownResponse=[{"id":"netconf","name":"netconf"},{"id":"snmp","name":"snmp"},{"id":"https","name":"https"},{"id":"http","name":"http"}];
var dropdownInfo = translateToDropdownInfo(dropdownResponse);
$('#myModal #protocolDD').html(dropdownInfo);
@@ -156,7 +156,7 @@ var app = angular.module("ControllerApp", ["ui.router", "ngTable"]) //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});
+ }, { counts:[5, 10, 20, 50], dataset: $scope.data});
/*$scope.$watch('checkboxes.checked', function(value) {
angular.forEach($scope.data.controllerData, function(item) {
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/templates/controller.html b/extsys/src/main/webapp/extsys/sdncontroller/templates/controller.html index 1aab2bdf..2d336101 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/templates/controller.html +++ b/extsys/src/main/webapp/extsys/sdncontroller/templates/controller.html @@ -30,32 +30,32 @@ <input type="checkbox" ng-model="checkboxes.items[controllerData.id]" />
</td>-->
<td title="'Name'" filter="{ Name: 'text'}" sortable="'Name'">
- {{controllerData.Name}}
+ {{controllerData.name}}
</td>
<td title="'Protocol'" filter="{ Protocol: 'text'}" sortable="'Protocol'">
- {{controllerData.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}}
+ {{controllerData.type}}
</td>
<td title="'Vendor'" filter="{ Vendor: 'text'}" sortable="'Vendor'">
- {{controllerData.Vendor}}
+ {{controllerData.vendor}}
</td>
<td title="'Version'" filter="{ Version: 'number'}" sortable="'Version'">
- {{controllerData.Version}}
+ {{controllerData.version}}
</td>
<td title="'Description'" filter="{ Description: 'text'}" sortable="'Description'">
- {{controllerData.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}}
+ {{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>
diff --git a/resmgr/src/main/webapp/resmgr/js/app.js b/resmgr/src/main/webapp/resmgr/js/app.js index 2ffcc2b6..2ca5177b 100644 --- a/resmgr/src/main/webapp/resmgr/js/app.js +++ b/resmgr/src/main/webapp/resmgr/js/app.js @@ -134,9 +134,18 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) var portName = {"ErrMsg" : {"errmsg" : "Name is required.", "modalVar":"port.name", "errtag":"textboxErrName", "errfunc":"validatetextboxName", "required":true}};
$('#myModal #name').append($compile(Mustache.to_html(text, portName.ErrMsg))($scope));
- var portMe = {"ErrMsg" : {"errmsg" : "ME is required.", "modalVar":"port.meID", "errtag":"textboxErrMe", "errfunc":"validatetextboxMe", "required":true}};
- $('#myModal #meID').append($compile(Mustache.to_html(text, portMe.ErrMsg))($scope));
-
+ portDataService.getAllNEData().then(function(response) {
+ var medata = [];
+ for(var i = 0; i < response.managedElements.length; i+=1){
+ medata[i] = {"serviceTemplateId":response.managedElements[i].id,"templateName":response.managedElements[i].name};
+ }
+ var dropdownInfo = translateToDropdownInfo(medata);
+ $("#myModal #medropdown").html(dropdownInfo);
+ console.log("Data: ");
+ $log.info(data);
+ }, function(reason) {
+ $scope.message = "Error is :" + JSON.stringify(reason);
+ });
//var portType = {"ErrMsg" : {"textboxErr" : "The name is required.", "modalVar":"port.type"}};
//$('#myModal #type').append($compile(Mustache.to_html(dropDown, $scope.data.dropdowntypeData))($scope));
@@ -148,7 +157,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) $('#myModal #type').append($compile(Mustache.to_html(dropDown, dropSimple_data))($scope));*/
- var dropdownResponse=[{"serviceTemplateId":"tenant_site","templateName":"portType1"},{"serviceTemplateId":"tenant_site2","templateName":"portType2"}];
+ var dropdownResponse=[{"serviceTemplateId":"ETH","templateName":"ETH"},{"serviceTemplateId":"POS","templateName":"POS"},{"serviceTemplateId":"Trunk","templateName":"Trunk"},{"serviceTemplateId":"Loopback","templateName":"Loopback"}];
var dropdownInfo = translateToDropdownInfo(dropdownResponse);
document.getElementById("portdropdown").innerHTML = dropdownInfo;
@@ -169,7 +178,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) $('#myModal #Edgepoint').append($compile(Mustache.to_html(dropDown, dropSimple_data))($scope));*/
- var dropdownResponse=[{"serviceTemplateId":"tenant_site","templateName":"Edgepoint1"},{"serviceTemplateId":"tenant_site2","templateName":"Edgepoint2"}];
+ var dropdownResponse=[{"serviceTemplateId":"true","templateName":"true"},{"serviceTemplateId":"false","templateName":"false"}];
var dropdownInfo = translateToDropdownInfo(dropdownResponse);
document.getElementById("portEdropdown").innerHTML = dropdownInfo;
@@ -464,7 +473,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) $('#myModal #type').append($compile(Mustache.to_html(dropDown, dropSimple_data))($scope));*/
- var dropdownResponse=[{"serviceTemplateId":"tenant_site","templateName":"tenant_site"},{"serviceTemplateId":"tenant_site2","templateName":"tenant_site2"}];
+ var dropdownResponse=[{"serviceTemplateId":"network_site","templateName":"network_site"},{"serviceTemplateId":"tenant_site","templateName":"tenant_site"}];
var dropdownInfo = translateToDropdownInfo(dropdownResponse);
document.getElementById("sitedropdown").innerHTML = dropdownInfo;
@@ -1212,7 +1221,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) neDataService.getNECtrlDDList()
.then(function (response) {
- $scope.ctrlList = response.data;
+ $scope.ctrlList = response;
var dropdownInfo = translateCtrlIDToDropdownInfo($scope.ctrlList);
$("#myModal #medropdown").html(dropdownInfo);
console.log("Data: ");
@@ -1224,7 +1233,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) /*var neController = {"ErrMsg" : {"errmsg" : "IP Address is required.", "modalVar":"ne.controller"}};
$('#myModal #controller').append($compile(Mustache.to_html(text, neController.ErrMsg))($scope));*/
- var neIPAddress = {"ErrMsg" : {"errmsg" : "IP Address is required.", "modalVar":"ne.ipAddress","errtag":"textboxErrIP", "errfunc":"validatetextboxIP","required":true}};
+ var neIPAddress = {"ErrMsg" : {"errmsg" : "IP Address is required.", "modalVar":"ne.ipAddress"}};
$('#myModal #ipAddress').append($compile(Mustache.to_html(text, neIPAddress.ErrMsg))($scope));
diff --git a/resmgr/src/main/webapp/resmgr/sdn-resmgr/port/port.html b/resmgr/src/main/webapp/resmgr/sdn-resmgr/port/port.html index f81265b0..e980af6a 100644 --- a/resmgr/src/main/webapp/resmgr/sdn-resmgr/port/port.html +++ b/resmgr/src/main/webapp/resmgr/sdn-resmgr/port/port.html @@ -95,6 +95,7 @@ <div class="form-group row" id="rowSpacing">
<label class="col-xs-4 col-form-label" id="textCenter">me</label>
<div id="meID" class="col-xs-8" >
+ <select id="medropdown" class="form-control inputfield" ng-model="siteData.optSelect"></select>
</div>
</div>
<div class="form-group row" id="rowSpacing">
diff --git a/resmgr/src/main/webapp/resmgr/sdn-resmgr/port/portRest.js b/resmgr/src/main/webapp/resmgr/sdn-resmgr/port/portRest.js index 6bed2640..ad960cd7 100644 --- a/resmgr/src/main/webapp/resmgr/sdn-resmgr/port/portRest.js +++ b/resmgr/src/main/webapp/resmgr/sdn-resmgr/port/portRest.js @@ -90,6 +90,14 @@ app.factory("portDataService", function($http,DataService, $log){ console.log(response);
return response;
});
+ },
+ getAllNEData : function() {
+ return DataService.get("/openoapi/extsys/v1/sdncontrollers")
+ .then(function(response){
+ $log.info("in get data service data is :"+response);
+ console.log(response);
+ return response;
+ });
}
}
});
\ No newline at end of file |