initial import for Open Source 🎉
This commit is contained in:
parent
1898c361f3
commit
9c0dd3b722
2048 changed files with 218743 additions and 0 deletions
23
static/js/directives/ui/quay-service-status-bar.js
Normal file
23
static/js/directives/ui/quay-service-status-bar.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
/**
|
||||
* An element which displays the current status of the service as an announcement bar.
|
||||
*/
|
||||
angular.module('quay').directive('quayServiceStatusBar', function () {
|
||||
var directiveDefinitionObject = {
|
||||
priority: 0,
|
||||
templateUrl: '/static/directives/quay-service-status-bar.html',
|
||||
replace: false,
|
||||
transclude: false,
|
||||
restrict: 'C',
|
||||
scope: {},
|
||||
controller: function($scope, $element, StatusService) {
|
||||
$scope.indicator = 'loading';
|
||||
|
||||
StatusService.getStatus(function(data) {
|
||||
$scope.indicator = data['status']['indicator'];
|
||||
$scope.incidents = data['incidents'] || [];
|
||||
$scope.scheduled_maintenances = data['scheduled_maintenances'] || [];
|
||||
});
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
});
|
Reference in a new issue