mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-07 20:54:20 +08:00
update 2026-08-15 20:26:22
This commit is contained in:
1 parent
d5fe2d005a
commit
a459a74f19
32 files changed
+1991
-1606
No files matched your search
@@ -2,13 +2,12 @@ api = require "luci.passwall2.api"
|
||||
api.set_default_cbi()
|
||||
|
||||
m = Map()
|
||||
m.redirect = api.url()
|
||||
m.redirect = api.url("node_list")
|
||||
|
||||
if not arg[1] or not m:get(arg[1]) then
|
||||
luci.http.redirect(api.url("node_list"))
|
||||
luci.http.redirect(m.redirect)
|
||||
end
|
||||
|
||||
fs = require "nixio.fs"
|
||||
formvalue_key = "cbid." .. m.config .. "." .. arg[1] .. "."
|
||||
|
||||
m:appendTemplate("/node_config/header", {section = arg[1]})
|
||||
@@ -24,7 +23,7 @@ m:foreach("nodes", function(s)
|
||||
end
|
||||
end)
|
||||
|
||||
s = m:section(NamedSection, arg[1], "nodes", translate("Node Config"))
|
||||
local s = m:section(NamedSection, arg[1], "nodes", translate("Node Config"))
|
||||
s.addremove = false
|
||||
s.dynamic = false
|
||||
|
||||
@@ -74,7 +73,7 @@ end
|
||||
o = s:option(ListValue, "type", translate("Type"))
|
||||
|
||||
local type_table = {}
|
||||
for filename in fs.dir(types_dir) do
|
||||
for filename in api.fs.dir(types_dir) do
|
||||
table.insert(type_table, filename)
|
||||
end
|
||||
table.sort(type_table)
|
||||
|
||||
Reference in new issue
Block a user