-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
-require("luci.sys")
+local sys = require("luci.sys")
m = Map("luci_statistics",
-- general.hostname (Hostname)
hostname = s:option( Value, "Hostname", translate("Hostname") )
-hostname.default = luci.sys.hostname()
+hostname.default = sys.hostname()
hostname.optional = true
-- general.basedir (BaseDir)
-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
-require("luci.sys")
+local sys = require("luci.sys")
m = Map("luci_statistics",
interfaces.size = 5
interfaces:depends( "enable", 1 )
interfaces:value("any")
-for k, v in pairs(luci.sys.net.devices()) do
+for k, v in pairs(sys.net.devices()) do
interfaces:value(v)
end
-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
-require("luci.sys")
+local sys = require("luci.sys")
m = Map("luci_statistics",
interfaces.widget = "select"
interfaces.size = 5
interfaces:depends( "enable", 1 )
-for k, v in pairs(luci.sys.net.devices()) do
+for k, v in pairs(sys.net.devices()) do
interfaces:value(v)
end
-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
-require("luci.sys.iptparser")
+local ip = require("luci.sys.iptparser").IptParser()
-ip = luci.sys.iptparser.IptParser()
-chains = { }
-targets = { }
+local chains = { }
+local targets = { }
-for i, rule in ipairs( ip:find() ) do
+for i, rule in ipairs( ip:find() ) do
if rule.chain and rule.target then
chains[rule.chain] = true
targets[rule.target] = true
-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
-require("luci.sys")
+local sys = require("luci.sys")
-local devices = luci.sys.net.devices()
+local devices = sys.net.devices()
m = Map("luci_statistics",