From 05522667a1f80877af2d251369dcea72685e5522 Mon Sep 17 00:00:00 2001 From: Adam Coldrick Date: Sat, 26 Sep 2015 11:12:57 +0100 Subject: Process the data a bit --- js/main.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'js/main.js') 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); + }); + }); } ]); -- cgit v1.2.1