Add new attribute to 'all' rules

This commit is contained in:
2024-01-04 16:53:24 +01:00
parent 307e5d1b50
commit 8cd32d35e2
5 changed files with 291 additions and 98 deletions
virtweb_backend/src
libvirt_lib_structures
libvirt_rest_structures
virtweb_frontend/src

@ -0,0 +1,27 @@
import { Layer4State } from "../../api/NWFilterApi";
import { SelectInput } from "./SelectInput";
export function NWFConnStateInput(p: {
editable: boolean;
value?: Layer4State;
onChange: (s?: Layer4State) => void;
}): React.ReactElement {
return (
<SelectInput
{...p}
label="Connection state"
value={p.value}
onValueChange={(s) => {
p.onChange?.(s as any);
}}
options={[
{ label: "None", value: undefined },
{ label: "NEW", value: "NEW" },
{ label: "ESTABLISHED", value: "ESTABLISHED" },
{ label: "RELATED", value: "RELATED" },
{ label: "INVALID", value: "INVALID" },
{ label: "NONE", value: "NONE" },
]}
/>
);
}