summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Coldrick <adam@sotk.co.uk>2015-09-26 15:21:17 +0100
committerAdam Coldrick <adam@sotk.co.uk>2015-09-28 20:20:09 +0100
commit67dbe8e29e26c6daa5d72242fef779a2201fe2af (patch)
tree95f03a7305ad8d770b31e80bc0bece66fb22d98d
parent95964ece380ebf47c7184b754ee016ef4d9348bc (diff)
downloadciat-ui-67dbe8e29e26c6daa5d72242fef779a2201fe2af.tar.gz
More sensible success check
-rw-r--r--js/main.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/js/main.js b/js/main.js
index 74f0cf2..e5df047 100644
--- a/js/main.js
+++ b/js/main.js
@@ -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
};
}