diff --git a/static/js/controllers.js b/static/js/controllers.js index 66229fa79..65bf2e652 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -873,9 +873,15 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope ApiService.getRepoBuildLogsAsResource(params, true).withOptions(options).get(function(resp) { if (resp['commands']) { $scope.commands = resp['commands']; + + // Add the commands to the map. + for (var i = 0; i < $scope.commands.length; ++i) { + var command = $scope.commands[i]; + $scope.commandMap[command['index']] = command; + } } - processLogs(resp.logs, $scope.logStartIndex); + processLogs(resp['logs'], resp['start']); $scope.logStartIndex = resp['total']; $scope.polling = false; });