summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorseshukm <seshu.kumar.m@huawei.com>2017-04-06 17:22:34 +0530
committerseshukm <seshu.kumar.m@huawei.com>2017-04-06 17:22:34 +0530
commit6e14691c60ba2258c126af5dfe882021826a5b4e (patch)
tree5d13c5ce8035f32e34adedfb745aca2e71b7b839
parentef9cd2561e325c82d4d1fcb03fef4582a53d7839 (diff)
Integration of Client pages to Main GUI
IssueId : CLIENT-189 Change-Id: I22b5706272b0f6f368ca95c6f8f0f2115dcf7f3a Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
-rw-r--r--lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js9
-rw-r--r--lifecyclemgr/src/main/webapp/lifecyclemgr/templates/home.html4
-rw-r--r--lifecyclemgr/src/main/webapp/lifecyclemgr/templates/overlayVPN.html2
-rw-r--r--lifecyclemgr/src/main/webapp/lifecyclemgr/templates/underlayVPN.html2
-rw-r--r--provincemgr/src/main/webapp/provincemgr/index.html35
-rw-r--r--provincemgr/src/main/webapp/provincemgr/js/app.js15
-rw-r--r--provincemgr/src/main/webapp/provincemgr/js/rest.js3
-rw-r--r--provincemgr/src/main/webapp/provincemgr/templates/management.html6
-rw-r--r--resmgr/src/main/webapp/resmgr/js/app.js119
-rw-r--r--resmgr/src/main/webapp/resmgr/sdn-resmgr/link/link.html1
-rw-r--r--resmgr/src/main/webapp/resmgr/sdn-resmgr/ne/ne.html1
-rw-r--r--resmgr/src/main/webapp/resmgr/sdn-resmgr/port/port.html2
-rw-r--r--resmgr/src/main/webapp/resmgr/sdn-resmgr/site/site.html3
13 files changed, 148 insertions, 54 deletions
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js
index 5155738e..053ee41d 100644
--- a/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js
@@ -238,7 +238,8 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', '
}, { counts:[5, 10, 15], dataset: $scope.tableData});
$scope.$watch('checkboxes.checked', function(value) {
- angular.forEach($scope.tableData, function(item) {
+ $scope.checkboxes.items = [];
+ angular.forEach($scope.tableParams.data, function(item) {
if (angular.isDefined(item.id)) {
$scope.checkboxes.items[item.id] = value;
}
@@ -648,7 +649,8 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', '
$scope.checkboxes = { 'checked': false, items: {} };
$scope.$watch('checkboxes.checked', function(value) {
- angular.forEach($scope.overlayData, function(item) {
+ $scope.checkboxes.items = [];
+ angular.forEach($scope.tableParams.data, function(item) {
if (angular.isDefined(item.id)) {
$scope.checkboxes.items[item.id] = value;
}
@@ -693,7 +695,8 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', '
$scope.checkboxes = { 'checked': false, items: {} };
$scope.$watch('checkboxes.checked', function(value) {
- angular.forEach($scope.underlayVPN.underlayData, function(item) {
+ $scope.checkboxes.items = [];
+ angular.forEach($scope.tableParams.data, function(item) {
if (angular.isDefined(item.id)) {
$scope.checkboxes.items[item.id] = value;
}
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/home.html b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/home.html
index 8030137b..4fc8fd73 100644
--- a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/home.html
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/home.html
@@ -43,8 +43,8 @@
<td title="'Action'">
<!--<img src="../images/delete.png" ng-click="editData(lcData.id)" style="cursor: pointer"></img>-->
<!--<span class="pull-right glyphicon glyphicon-edit" ng-click="editData(lcData.serviceId)" style="cursor: pointer;margin: 0 5px"></span>-->
- <span class="pull-right glyphicon glyphicon-trash" ng-click="deleteIndividualData(lcData.serviceId)" style="cursor: pointer;margin: 0 5px"></span>
- <span class="pull-right glyphicon glyphicon-circle-arrow-right" ng-click="scaleData(lcData.serviceId)" style="cursor: pointer;margin: 0 5px"></span>
+ <span ng-click="scaleData(lcData.serviceId)" style="cursor: pointer;margin: 0 5px"><img src="/openoui/framework/browser/thirdparty/images/edit.png" height="15" align="left"/></span>
+ <span ng-click="deleteIndividualData(lcData.serviceId)" style="cursor: pointer;margin: 0 5px"><img src="/openoui/framework/browser/thirdparty/images/delete.png" height="15" align="middle"/></span>
</td>
</tr>
</table>
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/overlayVPN.html b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/overlayVPN.html
index 5f484f1a..16719833 100644
--- a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/overlayVPN.html
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/overlayVPN.html
@@ -53,7 +53,7 @@
</td>
<td title="'Action'">
<!--<span class="pull-right glyphicon glyphicon-edit" ng-click="editData(overlayData.id)" style="cursor: pointer;margin: 0 5px"></span>-->
- <span class="pull-right glyphicon glyphicon-trash" ng-click="deleteIndividualData(overlayData.id)" style="cursor: pointer;margin: 0 5px"></span>
+ <span ng-click="deleteIndividualData(overlayData.id)" style="cursor: pointer;margin: 0 5px"><img src="/openoui/framework/browser/thirdparty/images/delete.png" height="15" align="middle"/></span>
</td>
</tr>
</table>
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/underlayVPN.html b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/underlayVPN.html
index 385db8ce..5cd4126d 100644
--- a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/underlayVPN.html
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/underlayVPN.html
@@ -41,7 +41,7 @@
</td>
<td title="'Action'">
<!--<span class="pull-right glyphicon glyphicon-edit" ng-click="editData(underlayData.id)" style="cursor: pointer;margin: 0 5px"></span>-->
- <span class="pull-right glyphicon glyphicon-trash" ng-click="deleteIndividualData(underlayData.id)" style="cursor: pointer;margin: 0 5px"></span>
+ <span ng-click="deleteIndividualData(underlayData.id)" style="cursor: pointer;margin: 0 5px"><img src="/openoui/framework/browser/thirdparty/images/delete.png" height="15" align="middle"/></span>
</td>
</tr>
</table>
diff --git a/provincemgr/src/main/webapp/provincemgr/index.html b/provincemgr/src/main/webapp/provincemgr/index.html
index f53edcca..6f9b8996 100644
--- a/provincemgr/src/main/webapp/provincemgr/index.html
+++ b/provincemgr/src/main/webapp/provincemgr/index.html
@@ -23,23 +23,24 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Province Management</title>
- <link href="thirdparty/css/bootstrap.min.css" rel="stylesheet"/>
- <link href="thirdparty/css/font-awesome.min.css" rel="stylesheet">
- <link href="thirdparty/css/zTreeStyle.css" rel="stylesheet"/>
- <link href="thirdparty/css/magic-check.css" rel="stylesheet"/>
- <link href="thirdparty/css/ng-table.min.css" rel="stylesheet"/>
- <link href="framework/css/open-ostyle.css" rel="stylesheet"/>
- <script src="thirdparty/js/angular.min.js"></script>
- <script src="thirdparty/js/angular-ui-router.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="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>
- <script src="thirdparty/js/jquery.ztree.core-3.5.js"></script>
+ <link href="/openoui/thirdparty/css/bootstrap.min.css" rel="stylesheet"/>
+ <link href="/openoui/thirdparty/css/font-awesome.min.css" rel="stylesheet">
+ <link href="/openoui/thirdparty/css/zTreeStyle.css" rel="stylesheet"/>
+ <link href="/openoui/thirdparty/css/magic-check.css" rel="stylesheet"/>
+ <link href="/openoui/thirdparty/css/ng-table.min.css" rel="stylesheet"/>
+ <link href="/openoui/framework/css/open-ostyle.css" rel="stylesheet"/>
+
+ <script src="/openoui/thirdparty/js/angular.min.js"></script>
+ <script src="/openoui/thirdparty/js/angular-ui-router.min.js"></script>
+ <script src="/openoui/thirdparty/js/ng-table.min.js"></script>
+ <script src="/openoui/thirdparty/js/jquery_1.12.4.min.js"></script>
+ <script src="/openoui/thirdparty/js/jquery-ui.js"></script>
+ <script type="text/javascript" src="/openoui/thirdparty/js/bootstrap.min.js"></script>
+ <script src="/openoui/provincemgr/js/app.js"></script>
+ <script src="/openoui/provincemgr/js/rest.js"></script>
+ <script type="text/javascript" src="/openoui/provincemgr/js/DataService.js"></script>
+ <script src="/openoui/thirdparty/js/mustache.js"></script>
+ <script src="/openoui/thirdparty/js/jquery.ztree.core-3.5.js"></script>
</head>
diff --git a/provincemgr/src/main/webapp/provincemgr/js/app.js b/provincemgr/src/main/webapp/provincemgr/js/app.js
index b8979dd9..7a972175 100644
--- a/provincemgr/src/main/webapp/provincemgr/js/app.js
+++ b/provincemgr/src/main/webapp/provincemgr/js/app.js
@@ -6,7 +6,7 @@
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
+ 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,
@@ -33,7 +33,7 @@ var app = angular.module("ProvinceManagementApp", ["ui.router", "ngTable"])
.controller("managementCtrl", function($scope, $log, provinceDataService, $state, $compile, NgTableParams){
- $scope.message = "Management";
+ $scope.title = "Management";
$scope.init = function() {
provinceDataService.getAllProvinceData()
@@ -43,6 +43,7 @@ var app = angular.module("ProvinceManagementApp", ["ui.router", "ngTable"])
loadButtons();
$log.info(data.provinceData);
}, function(reason){
+ loadButtons();
$scope.message = "Error is :" + JSON.stringify(reason);
});
@@ -284,20 +285,20 @@ var app = angular.module("ProvinceManagementApp", ["ui.router", "ngTable"])
var modelTemplate = "";
function loadTemplate() {
- $.get('framework/template.html', function (template) {
+ $.get('/openoui/resmgr/templates/template.html', function (template) {
modelTemplate += template;
});
- $.get('framework/templateContainer.html', function (template) {
+ $.get('/openoui/resmgr/templates/templateContainer.html', function (template) {
modelTemplate += template;
});
- $.get('framework/templateWidget.html', function (template) {
+ $.get('/openoui/resmgr/templates/templateWidget.html', function (template) {
//console.log("Template is : "+template);
modelTemplate += template;
});
- $.get('framework/templateNotification.html', function (template) {
+ $.get('/openoui/resmgr/templates/templateNotification.html', function (template) {
modelTemplate += template;
});
- $.get('framework/templateFunctional.html', function (template) {
+ $.get('/openoui/resmgr/templates/templateFunctional.html', function (template) {
modelTemplate += template;
});
} \ No newline at end of file
diff --git a/provincemgr/src/main/webapp/provincemgr/js/rest.js b/provincemgr/src/main/webapp/provincemgr/js/rest.js
index 6432ca16..b2c994cf 100644
--- a/provincemgr/src/main/webapp/provincemgr/js/rest.js
+++ b/provincemgr/src/main/webapp/provincemgr/js/rest.js
@@ -18,7 +18,8 @@
app.factory("provinceDataService", function($http,DataService, $log){
- var uri ;//'http://192.168.9.13:18008';
+ /* var uri = 'http://192.168.9.13:18008'; */
+ var uri ;
return {
getAllProvinceData : function() {
/*return $http({
diff --git a/provincemgr/src/main/webapp/provincemgr/templates/management.html b/provincemgr/src/main/webapp/provincemgr/templates/management.html
index 934eff09..ccbd45eb 100644
--- a/provincemgr/src/main/webapp/provincemgr/templates/management.html
+++ b/provincemgr/src/main/webapp/provincemgr/templates/management.html
@@ -17,7 +17,7 @@
-->
<div class="homecontent center">
<div class="col-md-12 col-sm-12 col-lg-12">
- <h4>{{message}}</h4>
+ <h4>{{title}}</h4>
<br><br>
<div id="provinceAction" ng-init="init()">
@@ -43,8 +43,8 @@
{{provinceData.desc}}
</td>
<td title="'Action'">
- <span ng-click="editData(provinceData.id)" style="cursor: pointer;margin: 0 5px"> <img src="framework/images/edit.png" height="15" align="left"/></span>
- <span ng-click="deleteData(provinceData.id)" style="cursor: pointer;margin: 0 5px"><img src="framework/images/delete.png" height="15" align="middle"/></span>
+ <span ng-click="editData(provinceData.id)" style="cursor: pointer;margin: 0 5px"> <img src="/openoui/framework/browser/thirdparty/images/edit.png" height="15" align="left"/></span>
+ <span ng-click="deleteData(provinceData.id)" style="cursor: pointer;margin: 0 5px"><img src="/openoui/framework/browser/thirdparty/images/delete.png" height="15" align="middle"/></span>
</td>
</tr>
</table>
diff --git a/resmgr/src/main/webapp/resmgr/js/app.js b/resmgr/src/main/webapp/resmgr/js/app.js
index be7b5ee1..b86393ff 100644
--- a/resmgr/src/main/webapp/resmgr/js/app.js
+++ b/resmgr/src/main/webapp/resmgr/js/app.js
@@ -147,6 +147,10 @@ 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 dropdownInfo = translateToDropdownInfo(dropdownResponse);
+ document.getElementById("portdropdown").innerHTML = dropdownInfo;
var portType = {"ErrMsg" : {"errmsg" : "The name is required.", "modalVar":"port.logicalType"}};
$('#myModal #logicalType').append($compile(Mustache.to_html(text, portType.ErrMsg))($scope));
@@ -164,6 +168,11 @@ 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 dropdownInfo = translateToDropdownInfo(dropdownResponse);
+ document.getElementById("portEdropdown").innerHTML = dropdownInfo;
+
var portEdgepoint = {"ErrMsg" : {"errmsg" : "The name is required.", "modalVar":"port.isEdgePoint"}};
$('#myModal #isEdgePoint').append($compile(Mustache.to_html(text, portEdgepoint.ErrMsg))($scope));
@@ -186,7 +195,8 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
}, { counts:[5, 10, 20, 50], dataset: $scope.data});
$scope.$watch('checkboxes.checked', function(value) {
- angular.forEach($scope.data, function(item) {
+ $scope.checkboxes.items = [];
+ angular.forEach($scope.portTableParams.data, function(item) {
if (angular.isDefined(item.id)) {
$scope.checkboxes.items[item.id] = value;
}
@@ -194,6 +204,18 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
});
}
+
+ function translateToDropdownInfo(dropdowndata) {
+ var options = '<option value="select">--select--</option>';
+ var i;
+ for (i = 0; i < dropdowndata.length; i += 1) {
+ var option = '<option value="' + dropdowndata[i].serviceTemplateId + '">' + dropdowndata[i].templateName
+ + '</option>';
+ options = options + option;
+ }
+
+ return options;
+ }
$scope.validatetextboxName = function (value){
if($scope.port.name) {
@@ -303,7 +325,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
"msg": "Do you really wanted to Delete?.",
"buttons": [
{
- "text": "OK", "action": "deleteConfirmation("+id+")"
+ "text": "OK", "action": "deleteConfirmation('"+[id]+"')"
}]
}};
angular.forEach($scope.checkboxes.items, function(value) {
@@ -321,7 +343,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
console.log("data in port data is ::");
$log.info($scope.data.portData);
var deleteArr = [];
- if (typeof id !== "undefined"){
+ if (id){
deleteArr.push(id);
}
@@ -355,6 +377,8 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
if (data.id == id) {
console.log("Found : " + data.id);
$scope.port = data;
+ $('#portdropdown').val(data.logicalType);
+ $('#portEdropdown').val(data.isEdgePoint);
$("#myModal").modal();
dataFound = true;
}
@@ -401,7 +425,8 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
}, { counts:[5, 10, 20, 50], dataset: $scope.data});
$scope.$watch('checkboxes.checked', function(value) {
- angular.forEach($scope.data, function(item) {
+ $scope.checkboxes.items = [];
+ angular.forEach($scope.siteTableParams.data, function(item) {
console.log(item.id);
if (angular.isDefined(item.id)) {
$scope.checkboxes.items[item.id] = value;
@@ -437,6 +462,10 @@ 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 dropdownInfo = translateToDropdownInfo(dropdownResponse);
+ document.getElementById("sitedropdown").innerHTML = dropdownInfo;
var siteType = {"ErrMsg" : {"errmsg" : "The name is required.", "modalVar":"site.type"}};
$('#myModal #type').append($compile(Mustache.to_html(text, siteType.ErrMsg))($scope));
@@ -451,6 +480,19 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
$('#myModal #location').append($compile(Mustache.to_html(text, siteLocation.ErrMsg))($scope));
}
+
+ function translateToDropdownInfo(dropdowndata) {
+ var options = '<option value="select">--select--</option>';
+ var i;
+ for (i = 0; i < dropdowndata.length; i += 1) {
+ var option = '<option value="' + dropdowndata[i].serviceTemplateId + '">' + dropdowndata[i].templateName
+ + '</option>';
+ options = options + option;
+ }
+
+ return options;
+ }
+
$scope.validatetextboxName = function (value){
if($scope.site.name) {
$scope.textboxErrName = false;
@@ -529,7 +571,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
"msg": "Do you really wanted to Delete?.",
"buttons": [
{
- "text": "Ok", "action": "deleteConfirmation("+id+")"
+ "text": "Ok", "action": "deleteConfirmation('"+[id]+"')"
}]
}};
@@ -548,7 +590,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
console.log("data in site data is :");
$log.info($scope.data.siteData);
var deleteArr = [];
- if (typeof id !== "undefined"){
+ if (id){
deleteArr.push(id);
}
@@ -583,6 +625,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
console.log("Found : " + data.name);
console.log("Found : " + data);
$scope.site = data;
+ $('#sitedropdown').val(data.type);
$("#myModal").modal();
dataFound = true;
}
@@ -658,7 +701,8 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
}, { counts:[5, 10, 20, 50], dataset: $scope.data.locationData});
$scope.$watch('checkboxes.checked', function(value) {
- angular.forEach($scope.data.locationData, function(item) {
+ $scope.checkboxes.items = [];
+ angular.forEach($scope.neTableParams.data, function(item) {
if (angular.isDefined(item.Id)) {
$scope.checkboxes.items[item.Id] = value;
}
@@ -768,7 +812,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
"msg": "Do you really wanted to Delete?.",
"buttons": [
{
- "text": "OK", "action": "deleteConfirmation("+id+")"
+ "text": "OK", "action": "deleteConfirmation('"+[id]+"')"
}]
}};
angular.forEach($scope.checkboxes.items, function(value) {
@@ -786,7 +830,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
console.log("data in location data is :");
$log.info($scope.data.locationData);
var deleteArr = [];
- if (typeof id !== "undefined"){
+ if (id){
deleteArr.push(id);
}
@@ -882,6 +926,10 @@ 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":"TP1"},{"serviceTemplateId":"tenant_site2","templateName":"TP2"}];
+ var dropdownInfo = translateToDropdownInfo(dropdownResponse);
+ document.getElementById("linkdropdown").innerHTML = dropdownInfo;
var linkType = {"ErrMsg" : {"errmsg" : "The name is required.", "modalVar":"link.logicalType"}};
$('#myModal #logicalType').append($compile(Mustache.to_html(text, linkType.ErrMsg))($scope));
@@ -913,7 +961,8 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
}, { counts:[5, 10, 20, 50], dataset: $scope.data});
$scope.$watch('checkboxes.checked', function(value) {
- angular.forEach($scope.data, function(item) {
+ $scope.checkboxes.items = [];
+ angular.forEach($scope.linkTableParams.data, function(item) {
console.log(item.id);
if (angular.isDefined(item.id)) {
$scope.checkboxes.items[item.id] = value;
@@ -922,6 +971,18 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
});
}
+
+ function translateToDropdownInfo(dropdowndata) {
+ var options = '<option value="select">--select--</option>';
+ var i;
+ for (i = 0; i < dropdowndata.length; i += 1) {
+ var option = '<option value="' + dropdowndata[i].serviceTemplateId + '">' + dropdowndata[i].templateName
+ + '</option>';
+ options = options + option;
+ }
+
+ return options;
+ }
$scope.validatetextbox = function (value){
if($scope.link.name) {
@@ -1014,7 +1075,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
"msg": "Do you really wanted to Delete?.",
"buttons": [
{
- "text": "OK", "action": "deleteConfirmation("+id+")"
+ "text": "OK", "action": "deleteConfirmation('"+[id]+"')"
}]
}};
angular.forEach($scope.checkboxes.items, function(value) {
@@ -1032,7 +1093,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
console.log("data in link data is :");
$log.info($scope.data.linkData);
var deleteArr = [];
- if (typeof id !== "undefined"){
+ if (id){
deleteArr.push(id);
}
@@ -1066,6 +1127,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
if (data.id == id) {
console.log("Found : " + data.id);
$scope.link = data;
+ $('#linkdropdown').val(data.logicalType);
$("#myModal").modal();
dataFound = true;
}
@@ -1133,6 +1195,10 @@ 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 dropdownInfo = translateToDropdownInfo(dropdownResponse);
+ document.getElementById("medropdown").innerHTML = dropdownInfo;
var neController = {"ErrMsg" : {"errmsg" : "IP Address is required.", "modalVar":"ne.controller"}};
$('#myModal #controller').append($compile(Mustache.to_html(text, neController.ErrMsg))($scope));
@@ -1155,7 +1221,8 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
}, { counts:[5, 10, 20, 50], dataset: $scope.data});
$scope.$watch('checkboxes.checked', function(value) {
- angular.forEach($scope.data, function(item) {
+ $scope.checkboxes.items = [];
+ angular.forEach($scope.neTableParams.data, function(item) {
if (angular.isDefined(item.id)) {
$scope.checkboxes.items[item.id] = value;
}
@@ -1163,6 +1230,18 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
});
}
+
+ function translateToDropdownInfo(dropdowndata) {
+ var options = '<option value="select">--select--</option>';
+ var i;
+ for (i = 0; i < dropdowndata.length; i += 1) {
+ var option = '<option value="' + dropdowndata[i].serviceTemplateId + '">' + dropdowndata[i].templateName
+ + '</option>';
+ options = options + option;
+ }
+
+ return options;
+ }
$scope.validatetextboxName = function (value){
@@ -1248,7 +1327,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
"msg": "Do you really wanted to Delete?.",
"buttons": [
{
- "text": "OK", "action": "deleteConfirmation("+id+")"
+ "text": "OK", "action": "deleteConfirmation('"+[id]+"')"
}]
}};
angular.forEach($scope.checkboxes.items, function(value) {
@@ -1266,7 +1345,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
console.log("data in ne data is :");
$log.info($scope.data.neData);
var deleteArr = [];
- if (typeof id !== "undefined") {
+ if (id) {
deleteArr.push(id);
}
@@ -1299,6 +1378,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
if (data.id == id) {
console.log("Found : " + data.id);
$scope.ne = data;
+ $('#medropdown').val(data.controller);
$("#myModal").modal();
dataFound = true;
}
@@ -1402,7 +1482,10 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
}, { counts:[5, 10, 20, 50], dataset: $scope.data.datacenterData});
$scope.$watch('checkboxes.checked', function(value) {
- angular.forEach($scope.data.datacenterData, function(item) {
+ $scope.checkboxes.items = [];
+
+ angular.forEach($scope.neTableParams.data, function(item) {
+
if (angular.isDefined(item.Id)) {
$scope.checkboxes.items[item.Id] = value;
}
@@ -1492,7 +1575,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
"msg": "Do you really wanted to Delete?.",
"buttons": [
{
- "text": "OK", "action": "deleteConfirmation("+id+")"
+ "text": "OK", "action": "deleteConfirmation('"+[id]+"')"
}]
}};
angular.forEach($scope.checkboxes.items, function(value) {
@@ -1510,7 +1593,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
console.log("data in datacenter data is :");
$log.info($scope.data.datacenter);
var deleteArr = [];
- if (typeof id !== "undefined"){
+ if (id){
deleteArr.push(id);
}
diff --git a/resmgr/src/main/webapp/resmgr/sdn-resmgr/link/link.html b/resmgr/src/main/webapp/resmgr/sdn-resmgr/link/link.html
index e28abfcd..f0269354 100644
--- a/resmgr/src/main/webapp/resmgr/sdn-resmgr/link/link.html
+++ b/resmgr/src/main/webapp/resmgr/sdn-resmgr/link/link.html
@@ -94,6 +94,7 @@
<div class="form-group row">
<label class="col-xs-4 col-form-label">Type</label>
<div id="logicalType" class="col-xs-8" >
+ <select id="linkdropdown" class="form-control inputfield" ng-model="siteData.optSelect" ng-options="item.templateName for item in optionsValue"></select>
</div>
</div>
<div class="form-group row">
diff --git a/resmgr/src/main/webapp/resmgr/sdn-resmgr/ne/ne.html b/resmgr/src/main/webapp/resmgr/sdn-resmgr/ne/ne.html
index 45f5da33..a1422f02 100644
--- a/resmgr/src/main/webapp/resmgr/sdn-resmgr/ne/ne.html
+++ b/resmgr/src/main/webapp/resmgr/sdn-resmgr/ne/ne.html
@@ -104,6 +104,7 @@
<div class="form-group row">
<label class="col-xs-4 col-form-label">Controller</label>
<div id="controller" class="col-xs-8" >
+ <select id="medropdown" class="form-control inputfield" ng-model="meData.optSelect" ng-options="item.templateName for item in optionsValue"></select>
</div>
</div>
<div class="form-group row">
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 09cf3a6c..d3e63222 100644
--- a/resmgr/src/main/webapp/resmgr/sdn-resmgr/port/port.html
+++ b/resmgr/src/main/webapp/resmgr/sdn-resmgr/port/port.html
@@ -100,6 +100,7 @@
<div class="form-group row">
<label class="col-xs-4 col-form-label">Type</label>
<div id="logicalType" class="col-xs-8" >
+ <select id="portdropdown" class="form-control inputfield" ng-model="siteData.optSelect" ng-options="item.templateName for item in optionsValue"></select>
</div>
</div>
<div class="form-group row">
@@ -110,6 +111,7 @@
<div class="form-group row">
<label class="col-xs-4 col-form-label">Edge Point</label>
<div id="isEdgePoint" class="col-xs-8" >
+ <select id="portEdropdown" class="form-control inputfield" ng-model="siteData.optSelect" ng-options="item.templateName for item in optionsValue"></select>
</div>
</div>
<div class="form-group row">
diff --git a/resmgr/src/main/webapp/resmgr/sdn-resmgr/site/site.html b/resmgr/src/main/webapp/resmgr/sdn-resmgr/site/site.html
index fb250664..86258435 100644
--- a/resmgr/src/main/webapp/resmgr/sdn-resmgr/site/site.html
+++ b/resmgr/src/main/webapp/resmgr/sdn-resmgr/site/site.html
@@ -80,8 +80,9 @@
</div>
</div>
<div class="form-group row">
- <label class="col-xs-4 col-form-label">Tenant name</label>
+ <label class="col-xs-4 col-form-label">Type</label>
<div id="tenantID" class="col-xs-8" >
+ <select id="sitedropdown" class="form-control inputfield" ng-model="siteData.optSelect" ng-options="item.templateName for item in optionsValue"></select>
</div>
</div>
<div class="form-group row">