mirror of
https://github.com/speatzle/nfsense.git
synced 2025-05-11 19:08:20 +00:00
Add Wireguard definitions
This commit is contained in:
parent
963edbbbc1
commit
07439b094d
1 changed files with 17 additions and 33 deletions
|
@ -357,42 +357,26 @@ export const editTypes: { [key: string]: { [key: string]: any } } = {
|
||||||
name: 'VPN',
|
name: 'VPN',
|
||||||
'wireguard_interfaces': {
|
'wireguard_interfaces': {
|
||||||
name: 'Wireguard Interface',
|
name: 'Wireguard Interface',
|
||||||
validationSchema: toFormValidator(
|
fields: {
|
||||||
zod.object({
|
name: { is: 'TextBox', label: 'Name'},
|
||||||
}),
|
public_key: { is: 'TextBox', label: 'Public Key'},
|
||||||
),
|
private_key: { is: 'TextBox', label: 'Private Key'},
|
||||||
sections: [
|
listen_port: { is: 'NumberBox', label: 'Listen Port'},
|
||||||
{
|
peers: { is: 'MutliSelect', label: 'Peers', props: { searchProvider: GetPeers} },
|
||||||
fields: [
|
comment: { is: 'MultilineTextBox', label: 'Comment'},
|
||||||
{ key: 'name', label: 'Name', as: 'TextBox', default: 'placeholder' },
|
},
|
||||||
{ key: 'public_key', label: 'Public Key', as: 'TextBox', default: 'placeholder' },
|
|
||||||
{ key: 'private_key', label: 'Private Key', as: 'TextBox', default: 'placeholder' },
|
|
||||||
{ key: 'listen_port', label: 'Listen Port', as: 'NumberBox' },
|
|
||||||
{ key: 'peers', label: 'Peers', as: 'MultiSelect', props: { searchProvider: GetPeers } },
|
|
||||||
{ key: 'comment', label: 'Comment', as: 'MultilineTextBox' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
'wireguard_peers': {
|
'wireguard_peers': {
|
||||||
name: 'Wireguard Peer',
|
name: 'Wireguard Peer',
|
||||||
validationSchema: toFormValidator(
|
fields: {
|
||||||
zod.object({
|
name: { is: 'TextBox', label: 'Name'},
|
||||||
}),
|
public_key: { is: 'TextBox', label: 'Public Key'},
|
||||||
),
|
preshared_key: { is: 'TextBox', label: 'Preshared Key'},
|
||||||
sections: [
|
allowed_ips: { is: 'MutliSelect', label: 'Allowed IPs', props: { searchProvider: GetAddresses} },
|
||||||
{
|
endpoint: { is: 'TextBox', label: 'Endpoint'},
|
||||||
fields: [
|
persistent_keepalive: { is: 'NumberBox', label: 'Persistent Keepalive'},
|
||||||
{ key: 'name', label: 'Name', as: 'TextBox', default: 'placeholder' },
|
comment: { is: 'MultilineTextBox', label: 'Comment'},
|
||||||
{ key: 'public_key', label: 'Public Key', as: 'TextBox', default: 'placeholder' },
|
},
|
||||||
{ key: 'preshared_key', label: 'Preshared Key', as: 'TextBox', default: 'placeholder' },
|
|
||||||
{ key: 'allowed_ips', label: 'Allowed IPs', as: 'MultiSelect', props: { searchProvider: GetAddresses } },
|
|
||||||
{ key: 'endpoint', label: 'Endpoint', as: 'TextBox', default: 'placeholder' },
|
|
||||||
{ key: 'persistent_keepalive', label: 'Persistent Keepalive', as: 'NumberBox' },
|
|
||||||
{ key: 'comment', label: 'Comment', as: 'MultilineTextBox' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'system': {
|
'system': {
|
||||||
|
|
Loading…
Add table
Reference in a new issue