summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/ui
diff options
context:
space:
mode:
authorSerena Feng <feng.xiaowei@zte.com.cn>2018-04-26 01:25:39 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-04-26 01:25:39 +0000
commit17a2b121e9c79dd4f4924e54b4c3d11a7613a5f9 (patch)
treee0416f1101127ce02bf778bbc96477be43d2e151 /testapi/opnfv_testapi/ui
parent8155cf8530af46cc5a45d73bcd92a93034ac0d3a (diff)
parent98522eb10272955dab984fbe0106f151cc6d335d (diff)
Merge "Add tests for the toast message in the pods page"
Diffstat (limited to 'testapi/opnfv_testapi/ui')
-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();
- }
+ })
}
}