{
- if (v && !p.network.nwfilterref) {
- p.network.nwfilterref = { name: v, parameters: [] };
- } else if (v) {
- p.network.nwfilterref!.name = v;
- } else {
- p.network.nwfilterref = undefined;
- }
- p.onChange?.();
- }}
- options={[
- { label: "No network filer", value: undefined },
- ...p.networkFiltersList.map((v) => {
- return {
- value: v.name,
- label: `${v.name} (${v.chain?.protocol ?? "unspecified"})`,
- description: `${v.rules.length} rules - ${v.join_filters.length} joint filters`,
- };
- }),
- ]}
- />
-
- {p.network.nwfilterref && (
-
- {
+ if (p.network.type === "DefinedNetwork")
+ p.network.network = v as any;
+ p.onChange?.();
+ }}
/>
-
+
+ {/* Network Filter */}
+ {
+ if (v && !p.network.nwfilterref) {
+ p.network.nwfilterref = { name: v, parameters: [] };
+ } else if (v) {
+ p.network.nwfilterref!.name = v;
+ } else {
+ p.network.nwfilterref = undefined;
+ }
+ p.onChange?.();
+ }}
+ options={[
+ { label: "No network filer", value: undefined },
+ ...p.networkFiltersList.map((v) => {
+ return {
+ value: v.name,
+ label: `${v.name} (${v.chain?.protocol ?? "unspecified"})`,
+ description: `${v.rules.length} rules - ${v.join_filters.length} joint filters`,
+ };
+ }),
+ ]}
+ />
+
+ {p.network.nwfilterref && (
+
+
+
+ )}
+ >
)}
>
diff --git a/virtweb_frontend/src/widgets/vms/VMDetails.tsx b/virtweb_frontend/src/widgets/vms/VMDetails.tsx
index 4342314..7f05c72 100644
--- a/virtweb_frontend/src/widgets/vms/VMDetails.tsx
+++ b/virtweb_frontend/src/widgets/vms/VMDetails.tsx
@@ -288,14 +288,7 @@ function VMDetailsTabStorage(p: DetailsInnerProps): React.ReactElement {
}
function VMDetailsTabNetwork(p: DetailsInnerProps): React.ReactElement {
- return (
-
- {/* Networks section */}
-
-
-
-
- );
+ return ;
}
function VMDetailsTabDanger(p: DetailsInnerProps): React.ReactElement {