1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-25 08:19:40 +02:00

upgrade some badge components to match EE (#10451)

This commit is contained in:
Matt Hook 2023-10-13 03:10:16 +13:00 committed by GitHub
parent 57c45838d5
commit 7c4c985247
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 21 deletions

View file

@ -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 (
<Authorized authorizations="K8sServiceW" childrenUnauthorized={name}>
{name}
<div className="flex">
<Authorized authorizations="K8sServiceW" childrenUnauthorized={name}>
{name}
{isSystem && (
<span className="label label-info image-tag label-margins">
system
</span>
)}
{isSystem && (
<Badge type="success" className="ml-2">
System
</Badge>
)}
{isExternal && !isSystem && (
<span className="label label-primary image-tag label-margins">
external
</span>
)}
</Authorized>
{isExternal && !isSystem && (
<Badge className="ml-2">External</Badge>
)}
</Authorized>
</div>
);
},
}