This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/static/js/directives/ui/build-mini-status.js

23 lines
633 B
JavaScript
Raw Normal View History

2015-03-11 00:22:46 +00:00
/**
* 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',
'canView': '=canView'
2015-03-11 00:22:46 +00:00
},
2016-11-16 18:51:07 +00:00
controller: function($scope, $element, BuildService) {
2015-03-11 00:22:46 +00:00
$scope.isBuilding = function(build) {
if (!build) { return true; }
2016-11-16 18:51:07 +00:00
return BuildService.isActive(build)
2015-03-11 00:22:46 +00:00
};
}
};
return directiveDefinitionObject;
});