Add description 1944/head
authorrwalli <rwalli@gmx.net>
Sun, 8 Jul 2018 17:46:10 +0000 (19:46 +0200)
committerGitHub <noreply@github.com>
Sun, 8 Jul 2018 17:46:10 +0000 (19:46 +0200)
protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua

index 056f6a6e76d3ead9edf603be3902b403500dcb4b..64e256a517cbf5185d52a1488af15d132cf93187 100644 (file)
@@ -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",