diff --git a/app/react/docker/images/ListView/ImagesDatatable/columns/id.tsx b/app/react/docker/images/ListView/ImagesDatatable/columns/id.tsx index 116781978..3a56e715a 100644 --- a/app/react/docker/images/ListView/ImagesDatatable/columns/id.tsx +++ b/app/react/docker/images/ListView/ImagesDatatable/columns/id.tsx @@ -6,6 +6,7 @@ import { getValueAsArrayOfStrings } from '@/portainer/helpers/array'; import { ImagesListResponse } from '@/react/docker/images/queries/useImages'; import { MultipleSelectionFilter } from '@@/datatables/Filter'; +import { UnusedBadge } from '@@/Badge/UnusedBadge'; import { columnHelper } from './helper'; @@ -76,9 +77,7 @@ function Cell({ {truncate(name, 40)} - {!image.used && ( - Unused - )} + {!image.used && } ); } diff --git a/app/react/docker/volumes/ListView/VolumesDatatable/columns/name.tsx b/app/react/docker/volumes/ListView/VolumesDatatable/columns/name.tsx index 43e381f07..5b1dbe940 100644 --- a/app/react/docker/volumes/ListView/VolumesDatatable/columns/name.tsx +++ b/app/react/docker/volumes/ListView/VolumesDatatable/columns/name.tsx @@ -8,6 +8,7 @@ import { Authorized } from '@/react/hooks/useUser'; import { Button } from '@@/buttons'; import { Link } from '@@/Link'; import { MultipleSelectionFilter } from '@@/datatables/Filter'; +import { UnusedBadge } from '@@/Badge/UnusedBadge'; import { DecoratedVolume } from '../../types'; import { getTableMeta } from '../tableMeta'; @@ -76,7 +77,7 @@ function Cell({ const name = getValue(); return ( - <> +
)} - {item.dangling && ( - - Unused - - )} - + {item.dangling && } +
); } diff --git a/app/react/kubernetes/applications/DetailsView/ApplicationSummaryWidget.tsx b/app/react/kubernetes/applications/DetailsView/ApplicationSummaryWidget.tsx index 77eb82e22..c868f00f4 100644 --- a/app/react/kubernetes/applications/DetailsView/ApplicationSummaryWidget.tsx +++ b/app/react/kubernetes/applications/DetailsView/ApplicationSummaryWidget.tsx @@ -10,13 +10,14 @@ import { usePublicSettings } from '@/react/portainer/settings/queries'; import { GlobalDeploymentOptions } from '@/react/portainer/settings/types'; import { DetailsTable } from '@@/DetailsTable'; -import { Badge } from '@@/Badge'; import { Link } from '@@/Link'; import { LoadingButton } from '@@/buttons'; import { WidgetBody, Widget } from '@@/Widget'; import { InlineLoader } from '@@/InlineLoader'; import { Icon } from '@@/Icon'; import { Note } from '@@/Note'; +import { ExternalBadge } from '@@/Badge/ExternalBadge'; +import { SystemBadge } from '@@/Badge/SystemBadge'; import { appStackNameLabel, @@ -127,7 +128,7 @@ export function ApplicationSummaryWidget() { > {name} {externalApplication && !isSystemNamespace && ( - external + )} @@ -156,7 +157,7 @@ export function ApplicationSummaryWidget() { > {namespace} - {isSystemNamespace && system} + {isSystemNamespace && } diff --git a/app/react/kubernetes/applications/ListView/ApplicationsStacksDatatable/SubRows.tsx b/app/react/kubernetes/applications/ListView/ApplicationsStacksDatatable/SubRows.tsx index cac5a0792..d45a1a7ff 100644 --- a/app/react/kubernetes/applications/ListView/ApplicationsStacksDatatable/SubRows.tsx +++ b/app/react/kubernetes/applications/ListView/ApplicationsStacksDatatable/SubRows.tsx @@ -4,6 +4,7 @@ import KubernetesApplicationHelper from '@/kubernetes/helpers/application'; import KubernetesNamespaceHelper from '@/kubernetes/helpers/namespaceHelper'; import { Link } from '@@/Link'; +import { ExternalBadge } from '@@/Badge/ExternalBadge'; import { KubernetesStack } from '../../types'; @@ -26,18 +27,18 @@ export function SubRows({ > - - {app.Name} - - {KubernetesNamespaceHelper.isSystemNamespace(app.ResourcePool) && - KubernetesApplicationHelper.isExternalApplication(app) && ( - - external - - )} +
+ + {app.Name} + + {KubernetesNamespaceHelper.isSystemNamespace(app.ResourcePool) && + KubernetesApplicationHelper.isExternalApplication(app) && ( + + )} +
))} diff --git a/app/react/kubernetes/applications/ListView/ApplicationsStacksDatatable/columns.tsx b/app/react/kubernetes/applications/ListView/ApplicationsStacksDatatable/columns.tsx index 26e08fc25..d6174a6b1 100644 --- a/app/react/kubernetes/applications/ListView/ApplicationsStacksDatatable/columns.tsx +++ b/app/react/kubernetes/applications/ListView/ApplicationsStacksDatatable/columns.tsx @@ -6,6 +6,7 @@ import KubernetesNamespaceHelper from '@/kubernetes/helpers/namespaceHelper'; import { buildExpandColumn } from '@@/datatables/expand-column'; import { Link } from '@@/Link'; import { Icon } from '@@/Icon'; +import { SystemBadge } from '@@/Badge/SystemBadge'; import { KubernetesStack } from '../../types'; @@ -23,7 +24,7 @@ export const columns = [ cell: ({ getValue }) => { const value = getValue(); return ( - <> +
{KubernetesNamespaceHelper.isSystemNamespace(value) && ( - - system - + )} - +
); }, }), diff --git a/app/react/kubernetes/configs/ListView/ConfigMapsDatatable/columns/name.tsx b/app/react/kubernetes/configs/ListView/ConfigMapsDatatable/columns/name.tsx index ebb354700..8a258e750 100644 --- a/app/react/kubernetes/configs/ListView/ConfigMapsDatatable/columns/name.tsx +++ b/app/react/kubernetes/configs/ListView/ConfigMapsDatatable/columns/name.tsx @@ -3,8 +3,10 @@ import { CellContext } from '@tanstack/react-table'; import { Authorized } from '@/react/hooks/useUser'; import { appOwnerLabel } from '@/react/kubernetes/applications/constants'; +import { ExternalBadge } from '@@/Badge/ExternalBadge'; +import { SystemBadge } from '@@/Badge/SystemBadge'; +import { UnusedBadge } from '@@/Badge/UnusedBadge'; import { Link } from '@@/Link'; -import { Badge } from '@@/Badge'; import { ConfigMapRowData } from '../types'; import { configurationOwnerUsernameLabel } from '../../../constants'; @@ -47,7 +49,7 @@ function Cell({ row }: CellContext) { return ( -
+
) { > {name} - {isSystemConfigMap && ( - - System - - )} - {!isSystemToken && !hasConfigurationOwner && ( - External - )} - {!row.original.inUse && !isSystemConfigMap && ( - - Unused - - )} + {isSystemConfigMap && } + {!isSystemToken && !hasConfigurationOwner && } + {!row.original.inUse && !isSystemConfigMap && }
); diff --git a/app/react/kubernetes/configs/ListView/SecretsDatatable/columns/name.tsx b/app/react/kubernetes/configs/ListView/SecretsDatatable/columns/name.tsx index fe6ee43a5..7746fad76 100644 --- a/app/react/kubernetes/configs/ListView/SecretsDatatable/columns/name.tsx +++ b/app/react/kubernetes/configs/ListView/SecretsDatatable/columns/name.tsx @@ -3,8 +3,10 @@ import { CellContext } from '@tanstack/react-table'; import { Authorized } from '@/react/hooks/useUser'; import { appOwnerLabel } from '@/react/kubernetes/applications/constants'; +import { SystemBadge } from '@@/Badge/SystemBadge'; +import { ExternalBadge } from '@@/Badge/ExternalBadge'; +import { UnusedBadge } from '@@/Badge/UnusedBadge'; import { Link } from '@@/Link'; -import { Badge } from '@@/Badge'; import { SecretRowData } from '../types'; import { configurationOwnerUsernameLabel } from '../../../constants'; @@ -60,19 +62,10 @@ function Cell({ row }: CellContext) { > {name} - {isSystemSecret && ( - - System - - )} - {!isSystemToken && !hasConfigurationOwner && ( - External - )} - {!row.original.inUse && !isSystemSecret && ( - - Unused - - )} + + {isSystemSecret && } + {!isSystemToken && !hasConfigurationOwner && } + {!row.original.inUse && !isSystemSecret && }
); diff --git a/app/react/kubernetes/ingresses/IngressDatatable/columns/name.tsx b/app/react/kubernetes/ingresses/IngressDatatable/columns/name.tsx index 5e96da37c..3dec6c002 100644 --- a/app/react/kubernetes/ingresses/IngressDatatable/columns/name.tsx +++ b/app/react/kubernetes/ingresses/IngressDatatable/columns/name.tsx @@ -2,8 +2,8 @@ import { CellContext } from '@tanstack/react-table'; import { Authorized } from '@/react/hooks/useUser'; +import { SystemBadge } from '@@/Badge/SystemBadge'; import { Link } from '@@/Link'; -import { Badge } from '@@/Badge'; import { Ingress } from '../../types'; @@ -20,7 +20,7 @@ function Cell({ row, getValue }: CellContext) { const namespace = row.original.Namespace; return ( -
+
) { {name} - {row.original.IsSystem && ( - - System - - )} + {row.original.IsSystem && }
); } diff --git a/app/react/kubernetes/services/ServicesView/ServicesDatatable/columns/name.tsx b/app/react/kubernetes/services/ServicesView/ServicesDatatable/columns/name.tsx index 88c6bdece..3a7183299 100644 --- a/app/react/kubernetes/services/ServicesView/ServicesDatatable/columns/name.tsx +++ b/app/react/kubernetes/services/ServicesView/ServicesDatatable/columns/name.tsx @@ -1,6 +1,7 @@ import { Authorized } from '@/react/hooks/useUser'; -import { Badge } from '@@/Badge'; +import { SystemBadge } from '@@/Badge/SystemBadge'; +import { ExternalBadge } from '@@/Badge/ExternalBadge'; import { columnHelper } from './helper'; @@ -31,19 +32,13 @@ export const name = columnHelper.accessor( !row.original.Labels['io.portainer.kubernetes.application.owner']; return ( -
+
{name} - {row.original.IsSystem && ( - - System - - )} + {row.original.IsSystem && } - {isExternal && !row.original.IsSystem && ( - External - )} + {isExternal && !row.original.IsSystem && }
);