Display full error information for build errors in superuser view

Allows for easier debugging of build failures

Fixes https://www.pivotaltracker.com/story/show/142883625
This commit is contained in:
Joseph Schorr 2017-04-03 15:30:15 -04:00
parent 880bcebd6c
commit 21d86597cf
3 changed files with 26 additions and 5 deletions

View file

@ -10,7 +10,8 @@ angular.module('quay').directive('buildLogError', function () {
restrict: 'C',
scope: {
'error': '=error',
'entries': '=entries'
'entries': '=entries',
'isSuperuser': '<isSuperuser'
},
controller: function($scope, $element, Config) {
$scope.localPullInfo = null;
@ -40,9 +41,21 @@ angular.module('quay').directive('buildLogError', function () {
calculateLocalPullInfo($scope.entries);
$scope.isInternalError = function() {
var entry = $scope.entries[$scope.entries.length - 1];
return entry && entry.data && entry.data['internal_error'];
$scope.getInternalError = function(entries) {
var entry = entries[entries.length - 1];
if (entry && entry.data && entry.data['internal_error']) {
return entry.data['internal_error'];
}
return null;
};
$scope.getBaseError = function(error) {
if (!error || !error.data || !error.data.base_error) {
return false;
}
return error.data.base_error;
};
$scope.isPullError = function(error) {