summaryrefslogtreecommitdiffstats
path: root/resmgr/src
diff options
context:
space:
mode:
authorseshukm <seshu.kumar.m@huawei.com>2017-04-03 17:00:28 +0530
committerseshukm <seshu.kumar.m@huawei.com>2017-04-03 17:07:04 +0530
commitda657ac7df4cea2e57aa51e3639d514d30f4e444 (patch)
tree1d4d4a78355074f46de5199a93bd1ed48a6a21b1 /resmgr/src
parent3d86543420c08d5cb7a153778538f8baf257e2f9 (diff)
create Site
IssueID : CLIENT-189 Change-Id: I0824e65d196f083afb8b93b341bc3838a80a4290 Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
Diffstat (limited to 'resmgr/src')
-rw-r--r--resmgr/src/main/webapp/resmgr/js/app.js16
-rw-r--r--resmgr/src/main/webapp/resmgr/sdn-resmgr/site/siteRest.js1
2 files changed, 13 insertions, 4 deletions
diff --git a/resmgr/src/main/webapp/resmgr/js/app.js b/resmgr/src/main/webapp/resmgr/js/app.js
index af3a17ae..271041f9 100644
--- a/resmgr/src/main/webapp/resmgr/js/app.js
+++ b/resmgr/src/main/webapp/resmgr/js/app.js
@@ -478,10 +478,17 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
}
$scope.saveData = function(id) {
if (!$scope.textboxErrName) {
+
+
+ var sites ={};
+ sites.site=$scope.site;
+ sites.site.type="tenant_site";
+
+ console.log("save data.." + JSON.stringify(sites.site));
if(id) {
//edit data
- console.log("Editing data.." + JSON.stringify($scope.site));
- siteDataService.editSiteData($scope.site)
+ console.log("Editing data.." + JSON.stringify(sites));
+ siteDataService.editSiteData(sites)
.then(function (data) {
$scope.message = "Success :-)";
$state.reload();
@@ -492,8 +499,9 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"])
});
}
else {
- console.log("Adding data.." + JSON.stringify($scope.site));
- siteDataService.addSiteData($scope.site)
+ console.log("Adding data.." + JSON.stringify(sites.site));
+
+ siteDataService.addSiteData(sites)
.then(function (data) {
$scope.message = "Success :-)";
$state.reload();
diff --git a/resmgr/src/main/webapp/resmgr/sdn-resmgr/site/siteRest.js b/resmgr/src/main/webapp/resmgr/sdn-resmgr/site/siteRest.js
index 08c89fc2..329fd3da 100644
--- a/resmgr/src/main/webapp/resmgr/sdn-resmgr/site/siteRest.js
+++ b/resmgr/src/main/webapp/resmgr/sdn-resmgr/site/siteRest.js
@@ -82,6 +82,7 @@ app.factory("siteDataService", function($http, DataService, $log){
console.log(response.data);
return response.data;
});*/
+ console.log("In siteRest");
return DataService.post(uri+'/openoapi/sdnobrs/v1/sites', siteData)
.then(function(response){
console.log("Successfully added.. Data returned in DataService is");