Merge pull request #1315 from coreos-inc/statuscomponent
Show degraded component in bottom bar, if only one
This commit is contained in:
commit
ebb92c4547
2 changed files with 8 additions and 0 deletions
|
@ -3,4 +3,5 @@
|
||||||
ng-if="indicator != 'loading'"></span>
|
ng-if="indicator != 'loading'"></span>
|
||||||
<span class="cor-loader-inline" 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>
|
<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>
|
</span>
|
||||||
|
|
|
@ -17,6 +17,13 @@ angular.module('quay').directive('quayServiceStatus', function () {
|
||||||
$scope.indicator = data['status']['indicator'];
|
$scope.indicator = data['status']['indicator'];
|
||||||
$scope.incidents = data['incidents'];
|
$scope.incidents = data['incidents'];
|
||||||
$scope.description = data['status']['description'];
|
$scope.description = data['status']['description'];
|
||||||
|
$scope.degraded = [];
|
||||||
|
|
||||||
|
data['components'].forEach(function(component, index) {
|
||||||
|
if (component.status != 'operational') {
|
||||||
|
$scope.degraded.push(component);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Reference in a new issue