Adding in UI for cancel anytime.
This commit is contained in:
parent
f6fe9023a4
commit
2fe74e4057
11 changed files with 31 additions and 25 deletions
|
@ -20,4 +20,8 @@
|
|||
|
||||
.build-state-icon .complete {
|
||||
color: #2fcc66;
|
||||
}
|
||||
}
|
||||
|
||||
.build-state-icon .cancelled {
|
||||
color: #9b9b9b;
|
||||
}
|
||||
|
|
|
@ -5,5 +5,6 @@
|
|||
<i class="fa fa-times-circle" ng-if="build.phase == 'error'"></i>
|
||||
<i class="fa fa-exclamation-circle" ng-if="build.phase == 'expired'"></i>
|
||||
<i class="fa fa-exclamation-circle" ng-if="build.phase == 'internalerror'"></i>
|
||||
<i class="fa fa-minus-circle" ng-if="build.phase == 'cancelled'"></i>
|
||||
</span>
|
||||
</span>
|
||||
|
|
|
@ -12,10 +12,10 @@ angular.module('quay').directive('buildMiniStatus', function () {
|
|||
'build': '=build',
|
||||
'isAdmin': '=isAdmin'
|
||||
},
|
||||
controller: function($scope, $element) {
|
||||
controller: function($scope, $element, BuildService) {
|
||||
$scope.isBuilding = function(build) {
|
||||
if (!build) { return true; }
|
||||
return build.phase != 'complete' && build.phase != 'error';
|
||||
return BuildService.isActive(build)
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
* Service which provides helper methods for reasoning about builds.
|
||||
*/
|
||||
angular.module('quay').factory('BuildService', [function() {
|
||||
var buildService = {}
|
||||
var buildService = {};
|
||||
buildService.isActive = function(build) {
|
||||
return build.phase != 'complete' && build.phase != 'error' && build.phase != 'expired';
|
||||
return build.phase != 'complete' && build.phase != 'error' && build.phase != 'expired' && build.phase != 'cancelled';
|
||||
};
|
||||
|
||||
buildService.getBuildMessage = function(phase) {
|
||||
|
@ -51,6 +51,10 @@ angular.module('quay').factory('BuildService', [function() {
|
|||
|
||||
case 'internalerror':
|
||||
return 'An internal system error occurred while building; the build will be retried in the next few minutes.';
|
||||
|
||||
case 'cancelled':
|
||||
return 'This build was previously cancelled.';
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -41,8 +41,7 @@
|
|||
<i class="fa fa-clock-o"></i> Show Timestamps
|
||||
</span>
|
||||
</span>
|
||||
<span class="cor-option" option-click="askCancelBuild(build)"
|
||||
ng-if="build.phase == 'waiting'">
|
||||
<span class="cor-option" option-click="askCancelBuild(build)">
|
||||
<i class="fa fa-times"></i> Cancel Build
|
||||
</span>
|
||||
</span>
|
||||
|
|
Reference in a new issue