import { Fragment } from 'react'; import DockerNetworkHelper from 'Docker/helpers/networkHelper'; import { Authorized } from '@/portainer/hooks/useUser'; import { Widget, WidgetBody, WidgetTitle } from '@@/Widget'; import { DetailsTable } from '@@/DetailsTable'; import { Button } from '@@/buttons'; 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 && (