import { Server, Trash2 } from 'lucide-react'; import { Authorized } from '@CE/react/hooks/useUser'; import { EnvironmentId } from '@CE/react/portainer/environments/types'; import { Icon } from '@CE/react/components/Icon'; import { notifySuccess } from '@CE/portainer/services/notifications'; import { TableContainer, TableTitle } from '@@CE/datatables'; import { DetailsTable } from '@@CE/DetailsTable'; import { Button } from '@@CE/buttons'; import { Link } from '@@CE/Link'; import { NetworkContainer, NetworkId } from '../types'; import { useDisconnectContainer } from '../queries/useDisconnectContainerMutation'; 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({ environmentId, networkId, }); if (networkContainers.length === 0) { return null; } return ( {networkContainers.map((container) => ( {container.Name} {container.IPv4Address || '-'} {container.IPv6Address || '-'} {container.MacAddress || '-'} ))} ); }