diff options
author | Adam Coldrick <adam@sotk.co.uk> | 2015-09-26 15:21:17 +0100 |
---|---|---|
committer | Adam Coldrick <adam@sotk.co.uk> | 2015-09-28 20:20:09 +0100 |
commit | 67dbe8e29e26c6daa5d72242fef779a2201fe2af (patch) | |
tree | 95f03a7305ad8d770b31e80bc0bece66fb22d98d | |
parent | 95964ece380ebf47c7184b754ee016ef4d9348bc (diff) | |
download | ciat-ui-67dbe8e29e26c6daa5d72242fef779a2201fe2af.tar.gz |
More sensible success check
-rw-r--r-- | js/main.js | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -9,8 +9,14 @@ app.config(['$httpProvider', function($httpProvider) { app.controller('VisualisationController', ['$scope', '$http', function($scope, $http) { function formatBuild(response) { + var success = false; + if (response.data.text) { + if (response.data.text.indexOf('successful') > -1) { + success = true; + } + } return { - success: response.data.text[response.data.text.length - 1] === 'successful', + success: success }; } |