{ },
{ }
},
- curl = config_curl,
- exec = config_exec,
- iptables = config_iptables,
logfile = {
{ "LogLevel", "File" },
{ "Timestamp" },
{ }
},
- network = config_network,
}
local plugin_dir = "/usr/lib/lua/luci/statistics/plugins/"
setfenv(plugin_fun, { _ = luci.i18n.translate })
local plugin = plugin_fun()
local name = filename:gsub("%.lua", "")
- plugins[name] = plugin.legend
+ if (name == "exec") then
+ plugins[name] = config_exec
+ elseif (name == "iptables") then
+ plugins[name] = config_iptables
+ elseif (name == "curl") then
+ plugins[name] = config_curl
+ elseif (name == "network") then
+ plugins[name] = config_network
+ else
+ plugins[name] = plugin.legend
+ end
end