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:
parent
880bcebd6c
commit
21d86597cf
3 changed files with 26 additions and 5 deletions
|
@ -17,5 +17,13 @@
|
|||
<!-- Other issue -->
|
||||
<span bo-if="!isPullError(error) || !localPullInfo.isLocal"
|
||||
class="error-message" bo-text="error.message"></span>
|
||||
|
||||
<!-- Extended error information -->
|
||||
<div bo-if="getBaseError(error) && isSuperuser">
|
||||
Base Error Information: <pre>{{ getBaseError(entries) }}</pre>
|
||||
</div>
|
||||
<div bo-if="getInternalError(entries) && isSuperuser">
|
||||
Internal Error Information: <pre>{{ getInternalError(entries) }}</pre>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<span class="container-content build-log-phase" phase="container"></span>
|
||||
</div>
|
||||
<div ng-switch-when="error">
|
||||
<span class="container-content build-log-error" error="container" entries="logEntries"></span>
|
||||
<span class="container-content build-log-error" error="container" is-superuser="isSuperuser" entries="logEntries"></span>
|
||||
</div>
|
||||
<div ng-switch-when="command">
|
||||
<span class="container-content build-log-command" command="container"></span>
|
||||
|
|
|
@ -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) {
|
||||
|
|
Reference in a new issue