Fix command duplication bug

This commit is contained in:
Joseph Schorr 2014-02-11 17:12:48 -05:00
parent 8464a181cb
commit 8af8ae7ddd

View file

@ -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;
});