luci-app-openvpn: sync code style with openvpn-advanced
authorFlorian Eckert <fe@dev.tdt.de>
Wed, 21 Nov 2018 11:46:29 +0000 (12:46 +0100)
committerFlorian Eckert <fe@dev.tdt.de>
Thu, 22 Nov 2018 07:18:14 +0000 (08:18 +0100)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
applications/luci-app-openvpn/luasrc/model/cbi/openvpn-basic.lua

index 65f7adf9a9ce22ee8326b490a41c37e7c3a7b11b..42eb4cfd820bd1edb91ebd294cb0ce4f151f4764 100644 (file)
@@ -7,32 +7,90 @@ local basicParams = {
        --
        -- Widget, Name, Default(s), Description
        --
-       { ListValue, "verb", { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }, translate("Set output verbosity") },
-       { Value, "nice",0, translate("Change process priority") },
-       { Value,"port",1194, translate("TCP/UDP port # for both local and remote") },
-       { ListValue,"dev_type",{ "tun", "tap" }, translate("Type of used device") },
-
-       { Value,"ifconfig","10.200.200.3 10.200.200.1", translate("Set tun/tap adapter parameters") },
-       { Value,"server","10.200.200.0 255.255.255.0", translate("Configure server mode") },
-       { Value,"server_bridge","192.168.1.1 255.255.255.0 192.168.1.128 192.168.1.254", translate("Configure server bridge") },
-       { Flag,"nobind",0, translate("Do not bind to local address and port") },
-
-       { Value,"keepalive","10 60", translate("Helper directive to simplify the expression of --ping and --ping-restart in server mode configurations") },
-
-       { ListValue,"proto",{ "udp", "tcp-client", "tcp-server" }, translate("Use protocol") },
-
-       { Flag,"client",0, translate("Configure client mode") },
-       { Flag,"client_to_client",0, translate("Allow client-to-client traffic") },
-       { DynamicList,"remote","vpnserver.example.org", translate("Remote host name or ip address") },
-
-       { FileUpload,"secret","/etc/openvpn/secret.key", translate("Enable Static Key encryption mode (non-TLS)") },
-       { ListValue,"key_direction", { 0, 1 }, translate("The key direction for 'tls-auth' and 'secret' options") },
-       { FileUpload,"pkcs12","/etc/easy-rsa/keys/some-client.pk12", translate("PKCS#12 file containing keys") },
-       { FileUpload,"ca","/etc/easy-rsa/keys/ca.crt", translate("Certificate authority") },
-       { FileUpload,"dh","/etc/easy-rsa/keys/dh1024.pem", translate("Diffie Hellman parameters") },
-       { FileUpload,"cert","/etc/easy-rsa/keys/some-client.crt", translate("Local certificate") },
-       { FileUpload,"key","/etc/easy-rsa/keys/some-client.key", translate("Local private key") },
-       { Value,"config","/etc/openvpn/ovpn-file.ovpn", translate("Local OVPN configuration file") },
+       { ListValue,
+               "verb",
+               { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
+               translate("Set output verbosity") },
+       { Value,
+               "nice",
+               0,
+               translate("Change process priority") },
+       { Value,
+               "port",
+               1194,
+               translate("TCP/UDP port # for both local and remote") },
+       { ListValue,
+               "dev_type",
+               { "tun", "tap" },
+               translate("Type of used device") },
+       { Value,
+               "ifconfig",
+               "10.200.200.3 10.200.200.1",
+               translate("Set tun/tap adapter parameters") },
+       { Value,
+               "server",
+               "10.200.200.0 255.255.255.0",
+               translate("Configure server mode") },
+       { Value,
+               "server_bridge",
+               "192.168.1.1 255.255.255.0 192.168.1.128 192.168.1.254",
+               translate("Configure server bridge") },
+       { Flag,
+               "nobind",
+               0,
+               translate("Do not bind to local address and port") },
+       { Value,
+               "keepalive",
+               "10 60",
+               translate("Helper directive to simplify the expression of --ping and --ping-restart in server mode configurations") },
+       { ListValue,
+               "proto",
+               { "udp", "tcp-client", "tcp-server" },
+               translate("Use protocol") },
+       { Flag,
+               "client",
+               0,
+               translate("Configure client mode") },
+       { Flag,
+               "client_to_client",
+               0,
+               translate("Allow client-to-client traffic") },
+       { DynamicList,
+               "remote",
+               "vpnserver.example.org",
+               translate("Remote host name or ip address") },
+       { FileUpload,
+               "secret",
+               "/etc/openvpn/secret.key",
+               translate("Enable Static Key encryption mode (non-TLS)") },
+       { ListValue,
+               "key_direction",
+               { 0, 1 },
+               translate("The key direction for 'tls-auth' and 'secret' options") },
+       { FileUpload,
+               "pkcs12",
+               "/etc/easy-rsa/keys/some-client.pk12",
+               translate("PKCS#12 file containing keys") },
+       { FileUpload,
+               "ca",
+               "/etc/easy-rsa/keys/ca.crt",
+               translate("Certificate authority") },
+       { FileUpload,
+               "dh",
+               "/etc/easy-rsa/keys/dh1024.pem",
+               translate("Diffie Hellman parameters") },
+       { FileUpload,
+               "cert",
+               "/etc/easy-rsa/keys/some-client.crt",
+               translate("Local certificate") },
+       { FileUpload,
+               "key",
+               "/etc/easy-rsa/keys/some-client.key",
+               translate("Local private key") },
+       { Value,
+               "config",
+               "/etc/openvpn/ovpn-file.ovpn",
+               translate("Local OVPN configuration file") },
 }