diff options
Diffstat (limited to 'resmgr/src')
-rw-r--r-- | resmgr/src/main/webapp/resmgr/js/app.js | 16 | ||||
-rw-r--r-- | resmgr/src/main/webapp/resmgr/sdn-resmgr/site/siteRest.js | 1 |
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");
|