From db6146a25caaa3f52e14e28a12779ceaf6565bd5 Mon Sep 17 00:00:00 2001 From: Simon Behar Date: Thu, 15 Aug 2019 11:14:06 -0700 Subject: [PATCH] Added more health filters in UI (#2160) --- .../application-details/application-details.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/src/app/applications/components/application-details/application-details.tsx b/ui/src/app/applications/components/application-details/application-details.tsx index cb6e028dfe..6ddc05b5a1 100644 --- a/ui/src/app/applications/components/application-details/application-details.tsx +++ b/ui/src/app/applications/components/application-details/application-details.tsx @@ -118,8 +118,10 @@ export class ApplicationDetails extends React.Component Health }, { value: 'health:Healthy', label: 'Healthy' }, - // Unhealthy includes 'Unknown', 'Progressing', 'Degraded' and 'Missing' - { value: 'health:Unhealthy', label: 'Unhealthy' }, + { value: 'health:Progressing', label: 'Progressing' }, + { value: 'health:Degraded', label: 'Degraded' }, + { value: 'health:Missing', label: 'Missing' }, + { value: 'health:Unknown', label: 'Unknown' }, { content: (setSelection) => (
Kinds setSelection(noKindsFilter.concat(kinds.map((kind) => `kind:${kind}`)))}>all / item === 'OutOfSync' ? ['OutOfSync', 'Unknown'] : [item] ).reduce( (first, second) => first.concat(second), []); - const healthStatuses = filter.health.map((item) => item === 'Unhealthy' ? ['Unknown', 'Progressing', 'Degraded', 'Missing'] : [item] ).reduce( - (first, second) => first.concat(second), []); return (filter.kind.length === 0 || filter.kind.indexOf(node.kind) > -1) && (syncStatuses.length === 0 || node.root.hook || node.root.status && syncStatuses.indexOf(node.root.status) > -1) && - (healthStatuses.length === 0 || node.root.hook || node.root.health && healthStatuses.indexOf(node.root.health.status) > -1); + (filter.health.length === 0 || node.root.hook || node.root.health && filter.health.indexOf(node.root.health.status) > -1); } private loadAppInfo(name: string): Observable<{application: appModels.Application, tree: appModels.ApplicationTree}> {