From 87e820c138d6f7152ee6691a2ea6489251522611 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 24 Mar 2016 14:37:18 -0400 Subject: [PATCH] Show degraded component in bottom bar, if only one --- static/directives/quay-service-status.html | 1 + static/js/directives/ui/quay-service-status.js | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/static/directives/quay-service-status.html b/static/directives/quay-service-status.html index 824af4321..59951dcc3 100644 --- a/static/directives/quay-service-status.html +++ b/static/directives/quay-service-status.html @@ -3,4 +3,5 @@ ng-if="indicator != 'loading'"> {{ description }} + : {{ degraded[0].name }} diff --git a/static/js/directives/ui/quay-service-status.js b/static/js/directives/ui/quay-service-status.js index e661190c1..120cbe4b0 100644 --- a/static/js/directives/ui/quay-service-status.js +++ b/static/js/directives/ui/quay-service-status.js @@ -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); + } + }); }); } };