summaryrefslogtreecommitdiffhomepage
path: root/protocols
diff options
context:
space:
mode:
authorDirk Brenken <dev@brenken.org>2018-07-09 07:51:20 +0200
committerGitHub <noreply@github.com>2018-07-09 07:51:20 +0200
commitbce7543d8fcab16636e761049775d43b6676e92c (patch)
treee6691406575168a346e4e0f9a7054b333f00d6cf /protocols
parentd35be37b889b1bc9c2edaf568cc2203824dd498b (diff)
parent140f41b40f54feb4fb8d6ddbbdf3c659c779756d (diff)
Merge pull request #1944 from rwalli/patch-1
luci-proto-wireguard: description field
Diffstat (limited to 'protocols')
-rw-r--r--protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua b/protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua
index 056f6a6e76..64e256a517 100644
--- a/protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua
+++ b/protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua
@@ -5,7 +5,7 @@
local map, section, net = ...
local ifname = net:get_interface():name()
local private_key, listen_port
-local metric, mtu, preshared_key
+local metric, mtu, preshared_key, description
local peers, public_key, allowed_ips, endpoint, persistent_keepalive
@@ -96,6 +96,16 @@ peers.anonymous = true
peers.addremove = true
+description = peers:option(
+ Value,
+ "description",
+ translate("Description"),
+ translate("Optional. Description of peer."))
+description.placeholder = "My Peer"
+description.datatype = "string"
+description.optional = true
+
+
public_key = peers:option(
Value,
"public_key",