luci-proto-wireguard: add option to disable peer-section

Submitted-by: Robert Walli <12079858+rwalli@users.noreply.github.com>
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
Robert Walli 2021-11-12 23:20:10 +01:00 committed by Florian Eckert
parent 00dc07bb84
commit aaa2b3dd2b

View file

@ -151,6 +151,9 @@ return network.registerProtocol('wireguard', {
]); ]);
}; };
o = ss.option(form.Flag, 'disabled', _('Peer disabled'), _('Enable / Disable peer. Restart wireguard interface to apply changes.'));
o.optional = true;
o = ss.option(form.Value, 'description', _('Description'), _('Optional. Description of peer.')); o = ss.option(form.Value, 'description', _('Description'), _('Optional. Description of peer.'));
o.placeholder = 'My Peer'; o.placeholder = 'My Peer';
o.datatype = 'string'; o.datatype = 'string';