diff options
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); + }); + }); } ]); |