forked from coolsnowwolf/lede
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0935c47
commit 2915c44
Showing
6 changed files
with
53 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 0 additions & 50 deletions
50
package/lean/luci-app-zerotier/luasrc/model/cbi/zerotier.lua
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
package/lean/luci-app-zerotier/luasrc/model/cbi/zerotier/info.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
local fs = require "nixio.fs" | ||
local conffile = "/tmp/zero.info" | ||
|
||
f = SimpleForm("logview") | ||
|
||
t = f:field(TextValue, "conf") | ||
t.rmempty = true | ||
t.rows = 15 | ||
function t.cfgvalue() | ||
luci.sys.exec("ifconfig $(ifconfig | grep zt | awk '{print $1}') > /tmp/zero.info") | ||
return fs.readfile(conffile) or "" | ||
end | ||
t.readonly="readonly" | ||
|
||
return f |
26 changes: 26 additions & 0 deletions
26
package/lean/luci-app-zerotier/luasrc/model/cbi/zerotier/settings.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
a=Map("zerotier",translate("ZeroTier"),translate("Zerotier is an open source, cross-platform and easy to use virtual LAN")) | ||
a:section(SimpleSection).template = "zerotier/zerotier_status" | ||
|
||
t=a:section(NamedSection,"sample_config","zerotier") | ||
t.anonymous=true | ||
t.addremove=false | ||
|
||
e=t:option(Flag,"enabled",translate("Enable")) | ||
e.default=0 | ||
e.rmempty=false | ||
|
||
e=t:option(DynamicList,"join",translate('ZeroTier Network ID')) | ||
e.password=true | ||
e.rmempty=false | ||
|
||
e=t:option(Flag,"nat",translate("Auto NAT Clients")) | ||
e.default=0 | ||
e.rmempty=false | ||
e.description = translate("Allow zerotier clients access your LAN network") | ||
|
||
e=t:option(DummyValue,"opennewwindow" , | ||
translate("<input type=\"button\" class=\"cbi-button cbi-button-apply\" value=\"Zerotier.com\" onclick=\"window.open('https://my.zerotier.com/network')\" />")) | ||
e.description = translate("Create or manage your zerotier network, and auth clients who could access") | ||
|
||
return a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters