mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-06 20:14:19 +08:00
update 2026-10-27 11:22:48
This commit is contained in:
1 parent
a4d6470641
commit
63a5dffe55
4907 files changed
+2036791
No files matched your search
@@ -0,0 +1,32 @@
|
||||
local sys = require "luci.sys"
|
||||
local dispatcher = require "luci.dispatcher"
|
||||
|
||||
local m = Map("fastnet", translate("FastNet"))
|
||||
m.description = translate("FastNet provides network testing tools and a Web UI.")
|
||||
|
||||
local st = m:section(SimpleSection, translate("Status"))
|
||||
local running = (sys.call("pidof FastNet >/dev/null") == 0)
|
||||
local url = dispatcher.build_url("admin", "services", "linkease_apps", "open") .. "?id=fastnet"
|
||||
|
||||
st.template = "fastnet/status"
|
||||
st.running = running
|
||||
st.url = url
|
||||
|
||||
local s = m:section(TypedSection, "fastnet", translate("Settings"))
|
||||
s.anonymous = true
|
||||
|
||||
local enabled = s:option(Flag, "enabled", translate("Enable"))
|
||||
enabled.default = enabled.enabled
|
||||
|
||||
local port = s:option(Value, "port", translate("Listen Port"))
|
||||
port.datatype = "port"
|
||||
port.default = "3200"
|
||||
|
||||
local token = s:option(Value, "token", translate("API Token"))
|
||||
token.password = true
|
||||
token.rmempty = true
|
||||
|
||||
local logger = s:option(Flag, "logger", translate("Enable Logging"))
|
||||
logger.rmempty = true
|
||||
|
||||
return m
|
||||
Reference in new issue
Block a user