Show degraded component in bottom bar, if only one

This commit is contained in:
Joseph Schorr 2016-03-24 14:37:18 -04:00
parent 9cbeb6086c
commit 87e820c138
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);
}
});
});
}
};