import { Server, Trash2 } from 'lucide-react'; import { Authorized } from '@/react/hooks/useUser'; import { EnvironmentId } from '@/react/portainer/environments/types'; import { Icon } from '@/react/components/Icon'; import { Table, TableContainer, TableTitle } from '@@/datatables'; import { DetailsTable } from '@@/DetailsTable'; import { Button } from '@@/buttons'; import { Link } from '@@/Link'; import { NetworkContainer, NetworkId } from '../types'; import { useDisconnectContainer } from '../queries'; type Props = { networkContainers: NetworkContainer[]; nodeName: string; environmentId: EnvironmentId; networkId: NetworkId; }; const tableHeaders = [ 'Container Name', 'IPv4 Address', 'IPv6 Address', 'MacAddress', 'Actions', ]; export function NetworkContainersTable({ networkContainers, nodeName, environmentId, networkId, }: Props) { const disconnectContainer = useDisconnectContainer(); if (networkContainers.length === 0) { return null; } return ( {networkContainers.map((container) => ( ))}
{container.Name} {container.IPv4Address || '-'} {container.IPv6Address || '-'} {container.MacAddress || '-'}
); }