import VisibilityIcon from "@mui/icons-material/Visibility"; import { Button, IconButton, Paper, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, Typography, } from "@mui/material"; import React from "react"; import { useNavigate } from "react-router-dom"; import { NetworkApi, NetworkInfo, NetworkURL } from "../api/NetworksApi"; import { AsyncWidget } from "../widgets/AsyncWidget"; import { RouterLink } from "../widgets/RouterLink"; import { VirtWebRouteContainer } from "../widgets/VirtWebRouteContainer"; import { NetworkHookStatusWidget } from "../widgets/net/NetworkHookStatusWidget"; import { NetworkStatusWidget } from "../widgets/net/NetworkStatusWidget"; export function NetworksListRoute(): React.ReactElement { const [list, setList] = React.useState(); const [count] = React.useState(1); const load = async () => { setList(await NetworkApi.GetList()); }; return ( } /> ); } function NetworksListRouteInner(p: { list: NetworkInfo[]; }): React.ReactElement { const navigate = useNavigate(); return ( } > Name Description Network type IP State Actions {p.list.map((t) => { return ( navigate(NetworkURL(t))} > {t.name} {t.description ?? ( None )} {t.forward_mode} {t.ip_v4 && "IPv4"} {t.ip_v6 && "IPv6"} ); })}
); }