Merge pull request #1315 from coreos-inc/statuscomponent

Show degraded component in bottom bar, if only one
This commit is contained in:
josephschorr 2016-03-24 14:39:22 -04:00
commit ebb92c4547
2 changed files with 8 additions and 0 deletions

View file

@ -3,4 +3,5 @@
ng-if="indicator != 'loading'"></span>
<span class="cor-loader-inline" ng-if="indicator == 'loading'"></span>
<a href="http://status.quay.io" class="quay-service-status-description">{{ description }}</a>
<span ng-if="degraded && degraded.length == 1" style="vertical-align: middle;">: {{ degraded[0].name }}</span>
</span>

View file

@ -17,6 +17,13 @@ angular.module('quay').directive('quayServiceStatus', function () {
$scope.indicator = data['status']['indicator'];
$scope.incidents = data['incidents'];
$scope.description = data['status']['description'];
$scope.degraded = [];
data['components'].forEach(function(component, index) {
if (component.status != 'operational') {
$scope.degraded.push(component);
}
});
});
}
};