portainer/app/react/kubernetes/applications/DetailsView/ApplicationContainersDatatable/columns/node.tsx

26 lines
624 B
TypeScript

import { Authorized } from '@/react/hooks/useUser';
import { Link } from '@@/Link';
import { columnHelper } from './helper';
export const node = columnHelper.accessor('nodeName', {
header: 'Node',
cell: ({ getValue }) => {
const nodeName = getValue();
return (
<Authorized
authorizations="K8sClusterNodeR"
childrenUnauthorized={nodeName}
adminOnlyCE
>
<Link to="kubernetes.cluster.node" params={{ nodeName }}>
<div className="max-w-xs truncate" title={nodeName}>
{nodeName}
</div>
</Link>
</Authorized>
);
},
});