import { Fragment } from 'react'; import DockerNetworkHelper from 'Docker/helpers/networkHelper'; import { Widget, WidgetBody, WidgetTitle } from '@/portainer/components/widget'; import { DetailsTable } from '@/portainer/components/DetailsTable'; import { Button } from '@/portainer/components/Button'; import { Authorized } from '@/portainer/hooks/useUser'; import { isSystemNetwork } from '../network.helper'; import { DockerNetwork, IPConfig } from '../types'; interface Props { network: DockerNetwork; onRemoveNetworkClicked: () => void; } export function NetworkDetailsTable({ network, onRemoveNetworkClicked, }: Props) { const allowRemoveNetwork = !isSystemNetwork(network.Name); const ipv4Configs: IPConfig[] = DockerNetworkHelper.getIPV4Configs( network.IPAM?.Config ); const ipv6Configs: IPConfig[] = DockerNetworkHelper.getIPV6Configs( network.IPAM?.Config ); return (
{/* networkRowContent */} {network.Name} {network.Id} {allowRemoveNetwork && (