mirror of
https://github.com/speatzle/nfsense.git
synced 2025-05-10 18:38:22 +00:00
44 lines
No EOL
2 KiB
TypeScript
44 lines
No EOL
2 KiB
TypeScript
export const editTypes: { [key: string]: { [key: string]: any } } = {
|
|
"firewall": {
|
|
name: "Firewall",
|
|
"forwardrules": {
|
|
name: "ForwardRule",
|
|
sections: [
|
|
{
|
|
fields: [
|
|
{ key: "name", label: "Name", as: "TextBox" },
|
|
{ key: "verdict", label: "Verdict", as: "PillBar", props: { options: [{ name: 'Accept' }, { name: 'Drop' }, { name: 'Continue' }] } },
|
|
{ key: "counter", label: "Counter", as: "CheckBox", },
|
|
{ key: "comment", label: "Comment", as: "MultilineTextBox", },
|
|
],
|
|
},
|
|
],
|
|
},
|
|
},
|
|
"network": {
|
|
name: "Network",
|
|
"interfaces": {
|
|
name: "Interface",
|
|
sections: [
|
|
{
|
|
fields: [
|
|
{ key: "name", label: "Name", as: "TextBox", default: "placeholder" },
|
|
{ key: "type", label: "Type", as: "PillBar", props: { options: [{ name: 'Hardware' }, { name: 'VLAN' }, { name: 'Bond' }, { name: 'Bridge' }] } },
|
|
{ key: "hardware_interface", label: "Hardware Interface", as: "TextBox", enabled: (values: any) => (values["type"] == 0) },
|
|
{ key: "vlan_id", label: "VLAN ID", as: "NumberBox", props: { min: 1, max: 4094 }, enabled: (values: any) => (values["type"] == 1) },
|
|
{ key: "bond_members", label: "Bond Members", as: "TextBox", enabled: (values: any) => (values["type"] == 2) },
|
|
{ key: "bridge_members", label: "Bridge Members", as: "TextBox", enabled: (values: any) => (values["type"] == 3) },
|
|
],
|
|
},
|
|
{
|
|
title: "Addressing",
|
|
fields: [
|
|
{ key: "addressing_mode", label: "Addressing Mode", as: "PillBar", props: { options: [{ name: 'None', selected: true }, { name: 'Static' }, { name: 'DHCP' }] } },
|
|
{ key: "address", label: "Address", as: "TextBox", enabled: (values: any) => (values["addressing_mode"] == 1) },
|
|
{ key: "comment", label: "Comment", as: "MultilineTextBox" },
|
|
],
|
|
}
|
|
],
|
|
},
|
|
},
|
|
}; |