s_system = _("System plugins"),
s_network = _("Network plugins"),
- rrdtool = _("RRDTool"),
- network = _("Network"),
- unixsock = _("UnixSock"),
- csv = _("CSV Output"),
- exec = _("Exec"),
- email = _("Email"),
+ conntrack = _("Conntrack"),
cpu = _("Processor"),
+ csv = _("CSV Output"),
df = _("Disk Space Usage"),
disk = _("Disk Usage"),
+ dns = _("DNS"),
+ email = _("Email"),
+ exec = _("Exec"),
+ interface = _("Interfaces"),
+ iptables = _("Firewall"),
irq = _("Interrupts"),
- processes = _("Processes"),
+ iwinfo = _("Wireless"),
load = _("System Load"),
- interface = _("Interfaces"),
+ memory = _("Memory"),
netlink = _("Netlink"),
- iptables = _("Firewall"),
- tcpconns = _("TCP Connections"),
+ network = _("Network"),
+ olsrd = _("OLSRd"),
ping = _("Ping"),
- dns = _("DNS"),
- wireless = _("Wireless"),
- olsrd = _("OLSRd")
+ processes = _("Processes"),
+ rrdtool = _("RRDTool"),
+ tcpconns = _("TCP Connections"),
+ unixsock = _("UnixSock")
}
-- our collectd menu
local collectd_menu = {
- output = { "rrdtool", "network", "unixsock", "csv" },
- system = { "exec", "email", "cpu", "df", "disk", "irq", "processes", "load" },
- network = { "interface", "netlink", "iptables", "tcpconns", "ping", "dns", "wireless", "olsrd" }
+ output = { "csv", "network", "rrdtool", "unixsock" },
+ system = { "cpu", "df", "disk", "email", "exec", "irq", "load", "memory", "processes" },
+ network = { "conntrack", "dns", "interface", "iptables", "netlink", "olsrd", "ping", "tcpconns", "iwinfo" }
}
-- create toplevel menu nodes
- local st = entry({"admin", "statistics"}, call("statistics_index"), _("Statistics"), 80)
+ local st = entry({"admin", "statistics"}, template("admin_statistics/index"), _("Statistics"), 80)
st.i18n = "statistics"
st.index = true
for section, plugins in luci.util.kspairs( collectd_menu ) do
local e = entry(
{ "admin", "statistics", "collectd", section },
- call( "statistics_" .. section .. "plugins" ),
- labels["s_"..section], index * 10
+ firstchild(), labels["s_"..section], index * 10
)
e.index = true
end
-- output views
- local page = entry( { "admin", "statistics", "graph" }, call("statistics_index"), _("Graphs"), 80)
+ local page = entry( { "admin", "statistics", "graph" }, template("admin_statistics/index"), _("Graphs"), 80)
page.i18n = "statistics"
page.setuser = "nobody"
page.setgroup = "nogroup"
end
end
-function statistics_index()
- luci.template.render("admin_statistics/index")
-end
-
-function statistics_outputplugins()
- local translate = luci.i18n.translate
- local plugins = {
- rrdtool = translate("RRDTool"),
- network = translate("Network"),
- unixsock = translate("UnixSock"),
- csv = translate("CSV Output")
- }
-
- luci.template.render("admin_statistics/outputplugins", {plugins=plugins})
-end
-
-function statistics_systemplugins()
- local translate = luci.i18n.translate
- local plugins = {
- exec = translate("Exec"),
- email = translate("Email"),
- cpu = translate("Processor"),
- df = translate("Disk Space Usage"),
- disk = translate("Disk Usage"),
- irq = translate("Interrupts"),
- processes = translate("Processes"),
- load = translate("System Load"),
- }
-
- luci.template.render("admin_statistics/systemplugins", {plugins=plugins})
-end
-
-function statistics_networkplugins()
- local translate = luci.i18n.translate
- local plugins = {
- interface = translate("Interfaces"),
- netlink = translate("Netlink"),
- iptables = translate("Firewall"),
- tcpconns = translate("TCP Connections"),
- ping = translate("Ping"),
- dns = translate("DNS"),
- wireless = translate("Wireless"),
- olsrd = translate("OLSRd")
- }
-
- luci.template.render("admin_statistics/networkplugins", {plugins=plugins})
-end
-
-
function statistics_render()
require("luci.statistics.rrdtool")