From 226ce0d3bcb8de533164e1090ecb235f287cb670 Mon Sep 17 00:00:00 2001 From: Nick Mitchell Date: Sun, 4 Sep 2022 18:45:59 -0400 Subject: [PATCH] fix(plugins/plugin-client-common): status badge for Succeeeded shows up yellow should be blue i guess --- .../src/components/Views/Sidecar/Badge.tsx | 9 ++++++++- .../src/components/spi/Tag/impl/PatternFly.tsx | 2 ++ .../plugin-client-common/src/components/spi/Tag/model.ts | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/plugins/plugin-client-common/src/components/Views/Sidecar/Badge.tsx b/plugins/plugin-client-common/src/components/Views/Sidecar/Badge.tsx index d97f9f3d367..a8b78d09066 100644 --- a/plugins/plugin-client-common/src/components/Views/Sidecar/Badge.tsx +++ b/plugins/plugin-client-common/src/components/Views/Sidecar/Badge.tsx @@ -66,7 +66,14 @@ function oneTimeRender(badgeText: KuiBadge) { badge.classList.add('badge-as-fontawesome') badge.appendChild(awesome) */ } else { - const type = className === 'green-background' ? 'ok' : className === 'red-background' ? 'error' : 'warning' + const type = + className === 'green-background' + ? 'ok' + : className === 'red-background' + ? 'error' + : className === 'blue-background' + ? 'done' + : 'warning' return (
diff --git a/plugins/plugin-client-common/src/components/spi/Tag/impl/PatternFly.tsx b/plugins/plugin-client-common/src/components/spi/Tag/impl/PatternFly.tsx index da26e26c189..a70fa398b34 100644 --- a/plugins/plugin-client-common/src/components/spi/Tag/impl/PatternFly.tsx +++ b/plugins/plugin-client-common/src/components/spi/Tag/impl/PatternFly.tsx @@ -25,6 +25,8 @@ export default function PatternFlyTag(props: Props) { const color = props.type === 'ok' ? 'green-background' + : props.type === 'done' + ? 'blue-background' : props.type === 'error' ? 'red-background' : props.type === 'warning' diff --git a/plugins/plugin-client-common/src/components/spi/Tag/model.ts b/plugins/plugin-client-common/src/components/spi/Tag/model.ts index bf17cbdee84..066efd3f227 100644 --- a/plugins/plugin-client-common/src/components/spi/Tag/model.ts +++ b/plugins/plugin-client-common/src/components/spi/Tag/model.ts @@ -19,7 +19,7 @@ import { ReactNode } from 'react' interface Props { id?: string title?: string - type?: 'ok' | 'error' | 'warning' + type?: 'ok' | 'error' | 'warning' | 'done' className?: string spanclassname?: string children: ReactNode