luci-app-statistics: reorganise menu items
[project/luci.git] / applications / luci-app-statistics / luasrc / controller / luci_statistics / luci_statistics.lua
index 5729bb1..d0415cd 100644 (file)
@@ -1,16 +1,6 @@
---[[
-
-Luci statistics - statistics controller module
-(c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
-(c) 2012 Jo-Philipp Wich <xm@subsignal.org>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-]]--
+-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
+-- Copyright 2012 Jo-Philipp Wich <jow@openwrt.org>
+-- Licensed to the public under the Apache License 2.0.
 
 module("luci.controller.luci_statistics.luci_statistics", package.seeall)
 
@@ -30,7 +20,7 @@ function index()
 
        local labels = {
                s_output        = _("Output plugins"),
-               s_system        = _("System plugins"),
+               s_general       = _("General plugins"),
                s_network       = _("Network plugins"),
 
                conntrack       = _("Conntrack"),
@@ -40,6 +30,7 @@ function index()
                disk            = _("Disk Usage"),
                dns                     = _("DNS"),
                email           = _("Email"),
+               entropy         = _("Entropy"),
                exec            = _("Exec"),
                interface       = _("Interfaces"),
                iptables        = _("Firewall"),
@@ -63,7 +54,7 @@ function index()
        -- our collectd menu
        local collectd_menu = {
                output  = { "csv", "network", "rrdtool", "unixsock" },
-               system  = { "cpu", "df", "disk", "email", "exec", "irq", "load", "memory", "nut", "processes", "uptime" },
+               general = { "cpu", "df", "disk", "email", "entropy", "exec", "irq", "load", "memory", "nut", "processes", "uptime" },
                network = { "conntrack", "dns", "interface", "iptables", "netlink", "olsrd", "ping", "splash_leases", "tcpconns", "iwinfo" }
        }
 
@@ -71,7 +62,7 @@ function index()
        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
@@ -96,7 +87,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"
 
@@ -160,7 +151,6 @@ function statistics_render()
                if png then
                        luci.http.prepare_content("image/png")
                        l12.pump.all(l12.source.file(png), luci.http.write)
-                       png:close()
                end
                return
        end