- Add copy button to the build logs
- Add support for timestamps in the build logs - Other small UI improvements to the build view
This commit is contained in:
parent
e227d7e526
commit
ed46d37ea7
12 changed files with 189 additions and 18 deletions
|
@ -8,11 +8,13 @@
|
|||
});
|
||||
}]);
|
||||
|
||||
function BuildViewCtrl($scope, ApiService, $routeParams, AngularPollChannel) {
|
||||
function BuildViewCtrl($scope, ApiService, $routeParams, AngularPollChannel, CookieService) {
|
||||
$scope.namespace = $routeParams.namespace;
|
||||
$scope.name = $routeParams.name;
|
||||
$scope.build_uuid = $routeParams.buildid;
|
||||
|
||||
$scope.showLogTimestamps = CookieService.get('quay.showBuildLogTimestamps') == 'true';
|
||||
|
||||
var loadBuild = function() {
|
||||
var params = {
|
||||
'repository': $scope.namespace + '/' + $scope.name,
|
||||
|
@ -39,6 +41,26 @@
|
|||
loadRepository();
|
||||
loadBuild();
|
||||
|
||||
$scope.askCancelBuild = function(build) {
|
||||
bootbox.confirm('Are you sure you want to cancel this build?', function(r) {
|
||||
if (r) {
|
||||
var params = {
|
||||
'repository': $scope.namespace + '/' + $scope.name,
|
||||
'build_uuid': build.id
|
||||
};
|
||||
|
||||
ApiService.cancelRepoBuild(null, params).then(function() {
|
||||
document.location = '/repository/' + $scope.namespace + '/' + $scope.name;
|
||||
}, ApiService.errorDisplay('Cannot cancel build'));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$scope.toggleTimestamps = function() {
|
||||
$scope.showLogTimestamps = !$scope.showLogTimestamps;
|
||||
CookieService.putPermanent('quay.showBuildLogTimestamps', $scope.showLogTimestamps);
|
||||
};
|
||||
|
||||
$scope.setUpdatedBuild = function(build) {
|
||||
$scope.build = build;
|
||||
};
|
||||
|
|
Reference in a new issue