summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/ui/components/pods/podsController.js
diff options
context:
space:
mode:
Diffstat (limited to 'testapi/opnfv_testapi/ui/components/pods/podsController.js')
-rw-r--r--testapi/opnfv_testapi/ui/components/pods/podsController.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/testapi/opnfv_testapi/ui/components/pods/podsController.js b/testapi/opnfv_testapi/ui/components/pods/podsController.js
index 3a94338..3b6ab97 100644
--- a/testapi/opnfv_testapi/ui/components/pods/podsController.js
+++ b/testapi/opnfv_testapi/ui/components/pods/podsController.js
@@ -94,17 +94,17 @@
role: pod.role,
details: pod.details
};
- ctrl.podsRequest =
- $http.post(pods_url, body).success(function (data) {
+ ctrl.podsRequest = $http.post(pods_url, body)
+
+ ctrl.podsRequest.success(function (data) {
ctrl.success = "Create Success"
ctrl.toastSuccess()
ctrl.listPods();
- return true;
}).catch(function (data) {
ctrl.error = data.statusText;
ctrl.toastError()
- return false;
});
+ return ctrl.podsRequest
}
else{
ctrl.error = 'Name is missing.'
@@ -262,9 +262,9 @@
*/
function confirm() {
if (angular.isDefined(ctrl.data.successHandler)) {
- if(ctrl.data.successHandler(ctrl.pod)){
+ ctrl.data.successHandler(ctrl.pod).success( function(data){
$uibModalInstance.close();
- }
+ })
}
}