22 lines
614 B
JavaScript
22 lines
614 B
JavaScript
|
/**
|
||
|
* An element which displays the status of a build as a mini-bar.
|
||
|
*/
|
||
|
angular.module('quay').directive('buildMiniStatus', function () {
|
||
|
var directiveDefinitionObject = {
|
||
|
priority: 0,
|
||
|
templateUrl: '/static/directives/build-mini-status.html',
|
||
|
replace: false,
|
||
|
transclude: false,
|
||
|
restrict: 'C',
|
||
|
scope: {
|
||
|
'build': '=build'
|
||
|
},
|
||
|
controller: function($scope, $element) {
|
||
|
$scope.isBuilding = function(build) {
|
||
|
if (!build) { return true; }
|
||
|
return build.phase != 'complete' && build.phase != 'error';
|
||
|
};
|
||
|
}
|
||
|
};
|
||
|
return directiveDefinitionObject;
|
||
|
});
|