diff options
Diffstat (limited to 'testapi/opnfv_testapi/ui')
-rw-r--r-- | testapi/opnfv_testapi/ui/Gruntfile.js | 16 | ||||
-rw-r--r-- | testapi/opnfv_testapi/ui/components/pods/podsController.js | 12 | ||||
-rw-r--r-- | testapi/opnfv_testapi/ui/package.json | 1 |
3 files changed, 23 insertions, 6 deletions
diff --git a/testapi/opnfv_testapi/ui/Gruntfile.js b/testapi/opnfv_testapi/ui/Gruntfile.js index 805ad9f..ab59475 100644 --- a/testapi/opnfv_testapi/ui/Gruntfile.js +++ b/testapi/opnfv_testapi/ui/Gruntfile.js @@ -6,7 +6,22 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-wait'); grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-connect'); + grunt.loadNpmTasks('grunt-convert'); grunt.initConfig({ + convert: { + options: { + explicitArray: false, + }, + json2xml: { + options: { + xml: { + header: true + } + }, + src: ['../tests/UI/coverage/coverage.json'], + dest: '../tests/UI/coverage/coverage.xml' + } + }, connect: { server: { options: { @@ -159,6 +174,7 @@ module.exports = function (grunt) { 'wait:default', 'protractor_coverage', 'makeReport', + 'convert', 'shell:deleteFiles' ]); } 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(); - } + }) } } diff --git a/testapi/opnfv_testapi/ui/package.json b/testapi/opnfv_testapi/ui/package.json index dc99239..2d4eb6e 100644 --- a/testapi/opnfv_testapi/ui/package.json +++ b/testapi/opnfv_testapi/ui/package.json @@ -3,6 +3,7 @@ "grunt": "~1.0.1", "grunt-contrib-connect": "^1.0.2", "grunt-contrib-copy": "^1.0.0", + "grunt-convert": "^0.1.12", "grunt-karma": "~2.0.0", "grunt-protractor-coverage": "^0.2.18", "grunt-protractor-runner": "~5.0.0", |