b7bde27b3c
Fixes #1663
22 lines
No EOL
611 B
JavaScript
22 lines
No EOL
611 B
JavaScript
/**
|
|
* An element which displays an icon representing the state of the build.
|
|
*/
|
|
angular.module('quay').directive('buildStateIcon', function () {
|
|
var directiveDefinitionObject = {
|
|
priority: 0,
|
|
templateUrl: '/static/directives/build-state-icon.html',
|
|
replace: false,
|
|
transclude: false,
|
|
restrict: 'C',
|
|
scope: {
|
|
'build': '=build'
|
|
},
|
|
controller: function($scope, $element, BuildService) {
|
|
$scope.isBuilding = function(build) {
|
|
if (!build) { return true; }
|
|
return BuildService.isActive(build);
|
|
};
|
|
}
|
|
};
|
|
return directiveDefinitionObject;
|
|
}); |