diff options
author | Adam Coldrick <adam@sotk.co.uk> | 2015-09-26 11:12:57 +0100 |
---|---|---|
committer | Adam Coldrick <adam@sotk.co.uk> | 2015-09-28 20:20:09 +0100 |
commit | 05522667a1f80877af2d251369dcea72685e5522 (patch) | |
tree | 6652416e28ffb01072d0011fbbe01ff26a3b1479 /js/main.js | |
parent | 947afca4799734e5951e6764794c96fb527a7fb8 (diff) | |
download | ciat-ui-05522667a1f80877af2d251369dcea72685e5522.tar.gz |
Process the data a bit
Diffstat (limited to 'js/main.js')
-rw-r--r-- | js/main.js | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -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); + }); + }); } ]); |