diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2017-04-03 11:38:34 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@open-o.org> | 2017-04-03 11:38:34 +0000 |
commit | 2ef5ff784b8065a1df6aae60093428261a9c8d24 (patch) | |
tree | 42e33823195bc3f593d8a32ad4f37ad7a0f217d8 /resmgr/src | |
parent | 4d61d079e6d803e1772ab4a0cb404513bcd611ea (diff) | |
parent | da657ac7df4cea2e57aa51e3639d514d30f4e444 (diff) |
Merge "create Site"
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");
|