X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=applications%2Fluci-app-statistics%2Fluasrc%2Fcontroller%2Fluci_statistics%2Fluci_statistics.lua;h=ec26f02d0db9e46bfe882cb37e2ed8d7292fff63;hp=49eab5acd4e0ed03d0247d945550443adb81eb0c;hb=808f2617931dcd6f84637e1bff3a737b9368917c;hpb=c48fbfa992c9f3be4dafd5963918031f68ef46ae diff --git a/applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua b/applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua index 49eab5acd..ec26f02d0 100644 --- a/applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua +++ b/applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua @@ -20,11 +20,14 @@ function index() local labels = { s_output = _("Output plugins"), - s_system = _("System plugins"), + s_general = _("General plugins"), s_network = _("Network plugins"), + apcups = _("APC UPS"), conntrack = _("Conntrack"), + contextswitch = _("Context Switches"), cpu = _("Processor"), + cpufreq = _("CPU Frequency"), csv = _("CSV Output"), df = _("Disk Space Usage"), disk = _("Disk Usage"), @@ -42,11 +45,14 @@ function index() network = _("Network"), nut = _("UPS"), olsrd = _("OLSRd"), + openvpn = _("OpenVPN"), ping = _("Ping"), processes = _("Processes"), rrdtool = _("RRDTool"), + sensors = _("Sensors"), splash_leases = _("Splash Leases"), tcpconns = _("TCP Connections"), + thermal = _("Thermal"), unixsock = _("UnixSock"), uptime = _("Uptime") } @@ -54,15 +60,19 @@ function index() -- our collectd menu local collectd_menu = { output = { "csv", "network", "rrdtool", "unixsock" }, - system = { "cpu", "df", "disk", "email", "entropy", "exec", "irq", "load", "memory", "nut", "processes", "uptime" }, - network = { "conntrack", "dns", "interface", "iptables", "netlink", "olsrd", "ping", "splash_leases", "tcpconns", "iwinfo" } + general = { "apcups", "contextswitch", "cpu", "cpufreq", "df", + "disk", "email", "entropy", "exec", "irq", "load", "memory", + "nut", "processes", "sensors", "thermal", "uptime" }, + network = { "conntrack", "dns", "interface", "iptables", + "netlink", "olsrd", "openvpn", "ping", + "splash_leases", "tcpconns", "iwinfo" } } -- create toplevel menu nodes local st = entry({"admin", "statistics"}, template("admin_statistics/index"), _("Statistics"), 80) st.index = true - entry({"admin", "statistics", "collectd"}, cbi("luci_statistics/collectd"), _("Collectd"), 10).subindex = true + entry({"admin", "statistics", "collectd"}, cbi("luci_statistics/collectd"), _("Setup"), 20).subindex = true -- populate collectd plugin menu @@ -79,7 +89,7 @@ function index() _entry( { "admin", "statistics", "collectd", section, plugin }, cbi("luci_statistics/" .. plugin ), - labels[plugin], j * 10 + labels[plugin] or plugin, j * 10 ) end @@ -87,7 +97,7 @@ function index() end -- output views - local page = entry( { "admin", "statistics", "graph" }, template("admin_statistics/index"), _("Graphs"), 80) + local page = entry( { "admin", "statistics", "graph" }, template("admin_statistics/index"), _("Graphs"), 10) page.setuser = "nobody" page.setgroup = "nogroup" @@ -170,7 +180,7 @@ function statistics_render() if #instances == 0 then --instances = { graph.tree:plugin_instances( plugin )[1] } instances = graph.tree:plugin_instances( plugin ) - is_index = true + is_index = (#instances > 1) -- index instance requested elseif instances[1] == "-" then