From 7c4c9852478112cf1e9eb7d085e0fc0e830851ac Mon Sep 17 00:00:00 2001 From: Matt Hook Date: Fri, 13 Oct 2023 03:10:16 +1300 Subject: [PATCH] upgrade some badge components to match EE (#10451) --- .../ConfigMapsDatatable/columns/name.tsx | 6 ++-- .../SecretsDatatable/columns/name.tsx | 6 ++-- .../IngressDatatable/columns/name.tsx | 4 +-- .../ServicesDatatable/columns/name.tsx | 32 ++++++++++--------- 4 files changed, 25 insertions(+), 23 deletions(-) diff --git a/app/react/kubernetes/configs/ListView/ConfigMapsDatatable/columns/name.tsx b/app/react/kubernetes/configs/ListView/ConfigMapsDatatable/columns/name.tsx index 09b414403..163cf3343 100644 --- a/app/react/kubernetes/configs/ListView/ConfigMapsDatatable/columns/name.tsx +++ b/app/react/kubernetes/configs/ListView/ConfigMapsDatatable/columns/name.tsx @@ -63,15 +63,15 @@ function Cell({ row }: CellContext) { {isSystemConfigMap && ( - system + System )} {!isSystemToken && !hasConfigurationOwner && ( - external + External )} {!row.original.inUse && !isSystemConfigMap && ( - unused + Unused )} diff --git a/app/react/kubernetes/configs/ListView/SecretsDatatable/columns/name.tsx b/app/react/kubernetes/configs/ListView/SecretsDatatable/columns/name.tsx index 9a03fd57e..d9ea8db06 100644 --- a/app/react/kubernetes/configs/ListView/SecretsDatatable/columns/name.tsx +++ b/app/react/kubernetes/configs/ListView/SecretsDatatable/columns/name.tsx @@ -66,15 +66,15 @@ function Cell({ row }: CellContext) { {isSystemSecret && ( - system + System )} {!isSystemToken && !hasConfigurationOwner && ( - external + External )} {!row.original.inUse && !isSystemSecret && ( - unused + Unused )} diff --git a/app/react/kubernetes/ingresses/IngressDatatable/columns/name.tsx b/app/react/kubernetes/ingresses/IngressDatatable/columns/name.tsx index 44c6a0767..f5f7a9e43 100644 --- a/app/react/kubernetes/ingresses/IngressDatatable/columns/name.tsx +++ b/app/react/kubernetes/ingresses/IngressDatatable/columns/name.tsx @@ -22,7 +22,7 @@ function Cell({ row, getValue }: CellContext) { const isSystemIngress = isSystemNamespace(namespace); return ( -
+
) { {isSystemIngress && ( - system + System )}
diff --git a/app/react/kubernetes/services/ServicesView/ServicesDatatable/columns/name.tsx b/app/react/kubernetes/services/ServicesView/ServicesDatatable/columns/name.tsx index 99d89b5b9..6f80a6a74 100644 --- a/app/react/kubernetes/services/ServicesView/ServicesDatatable/columns/name.tsx +++ b/app/react/kubernetes/services/ServicesView/ServicesDatatable/columns/name.tsx @@ -1,6 +1,8 @@ import { Authorized } from '@/react/hooks/useUser'; import { isSystemNamespace } from '@/react/kubernetes/namespaces/utils'; +import { Badge } from '@@/Badge'; + import { columnHelper } from './helper'; export const name = columnHelper.accessor( @@ -32,21 +34,21 @@ export const name = columnHelper.accessor( !row.original.Labels['io.portainer.kubernetes.application.owner']; return ( - - {name} - - {isSystem && ( - - system - - )} - - {isExternal && !isSystem && ( - - external - - )} - +
+ + {name} + + {isSystem && ( + + System + + )} + + {isExternal && !isSystem && ( + External + )} + +
); }, }