summaryrefslogtreecommitdiff
path: root/js/main.js
diff options
context:
space:
mode:
authorAdam Coldrick <adam@sotk.co.uk>2015-09-26 11:12:57 +0100
committerAdam Coldrick <adam@sotk.co.uk>2015-09-28 20:20:09 +0100
commit05522667a1f80877af2d251369dcea72685e5522 (patch)
tree6652416e28ffb01072d0011fbbe01ff26a3b1479 /js/main.js
parent947afca4799734e5951e6764794c96fb527a7fb8 (diff)
downloadciat-ui-05522667a1f80877af2d251369dcea72685e5522.tar.gz
Process the data a bit
Diffstat (limited to 'js/main.js')
-rw-r--r--js/main.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/js/main.js b/js/main.js
index fb1486e..4295b8c 100644
--- a/js/main.js
+++ b/js/main.js
@@ -8,6 +8,17 @@ app.config(['$httpProvider', function($httpProvider) {
app.controller('VisualisationController', ['$scope', '$http',
function($scope, $http) {
- $scope.builders = $http.get('http://ciat.baserock.org:8010/json/builders');
+ $scope.steps = [];
+ $http.get('http://ciat.baserock.org:8010/json/builders')
+ .then(function(builders) {
+ angular.forEach(builders.data, function(value, key) {
+ var step = {
+ name: key,
+ last_build: value.cachedBuilds[value.cachedBuilds.length - 1],
+ data: value
+ }
+ $scope.steps.push(step);
+ });
+ });
}
]);