luci-app-statistics: support graph menu entries without corresponding labels
[project/luci.git] / applications / luci-app-statistics / luasrc / controller / luci_statistics / luci_statistics.lua
index 36c5554..443f20b 100644 (file)
@@ -24,6 +24,7 @@ function index()
                s_network       = _("Network plugins"),
 
                conntrack       = _("Conntrack"),
+               contextswitch   = _("Context Switches"),
                cpu                     = _("Processor"),
                cpufreq         = _("CPU Frequency"),
                csv                     = _("CSV Output"),
@@ -58,7 +59,7 @@ function index()
        -- our collectd menu
        local collectd_menu = {
                output  = { "csv", "network", "rrdtool", "unixsock" },
-               general = { "cpu", "cpufreq", "df", "disk", "email",
+               general = { "contextswitch", "cpu", "cpufreq", "df", "disk", "email",
                        "entropy", "exec", "irq", "load", "memory",
                        "nut", "processes", "sensors", "thermal", "uptime" },
                network = { "conntrack", "dns", "interface", "iptables",
@@ -87,7 +88,7 @@ function index()
                        _entry(
                                { "admin", "statistics", "collectd", section, plugin },
                                cbi("luci_statistics/" .. plugin ),
-                               labels[plugin], j * 10
+                               labels[plugin] or plugin, j * 10
                        )
                end