modules/admin-full: move realtime stats into submenu
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 15 Oct 2011 05:10:58 +0000 (05:10 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 15 Oct 2011 05:10:58 +0000 (05:10 +0000)
modules/admin-full/luasrc/controller/admin/status.lua
modules/admin-full/luasrc/view/admin_status/bandwidth.htm
modules/admin-full/luasrc/view/admin_status/connections.htm
modules/admin-full/luasrc/view/admin_status/load.htm
modules/admin-full/luasrc/view/admin_status/wireless.htm

index 413bc6ec162563f21a1f3010f89f7d774c719ce8..f77d91b3434552aa833705c48c638f3bd8602094 100644 (file)
@@ -22,20 +22,21 @@ function index()
        entry({"admin", "status", "routes"}, template("admin_status/routes"), _("Routes"), 3)
        entry({"admin", "status", "syslog"}, call("action_syslog"), _("System Log"), 4)
        entry({"admin", "status", "dmesg"}, call("action_dmesg"), _("Kernel Log"), 5)
+       entry({"admin", "status", "processes"}, cbi("admin_status/processes"), _("Processes"), 6)
 
-       entry({"admin", "status", "load"}, template("admin_status/load"), _("Realtime Load"), 6).leaf = true
-       entry({"admin", "status", "load_status"}, call("action_load")).leaf = true
+       entry({"admin", "status", "realtime"}, alias("admin", "status", "realtime", "load"), _("Realtime Graphs"), 7)
 
-       entry({"admin", "status", "bandwidth"}, template("admin_status/bandwidth"), _("Realtime Traffic"), 7).leaf = true
-       entry({"admin", "status", "bandwidth_status"}, call("action_bandwidth")).leaf = true
+       entry({"admin", "status", "realtime", "load"}, template("admin_status/load"), _("Load"), 1).leaf = true
+       entry({"admin", "status", "realtime", "load_status"}, call("action_load")).leaf = true
 
-       entry({"admin", "status", "wireless"}, template("admin_status/wireless"), _("Realtime Wireless"), 8).leaf = true
-       entry({"admin", "status", "wireless_status"}, call("action_wireless")).leaf = true
+       entry({"admin", "status", "realtime", "bandwidth"}, template("admin_status/bandwidth"), _("Traffic"), 2).leaf = true
+       entry({"admin", "status", "realtime", "bandwidth_status"}, call("action_bandwidth")).leaf = true
 
-       entry({"admin", "status", "connections"}, template("admin_status/connections"), _("Realtime Connections"), 9).leaf = true
-       entry({"admin", "status", "connections_status"}, call("action_connections")).leaf = true
+       entry({"admin", "status", "realtime", "wireless"}, template("admin_status/wireless"), _("Wireless"), 3).leaf = true
+       entry({"admin", "status", "realtime", "wireless_status"}, call("action_wireless")).leaf = true
 
-       entry({"admin", "status", "processes"}, cbi("admin_status/processes"), _("Processes"), 20)
+       entry({"admin", "status", "realtime", "connections"}, template("admin_status/connections"), _("Connections"), 4).leaf = true
+       entry({"admin", "status", "realtime", "connections_status"}, call("action_connections")).leaf = true
 end
 
 function action_syslog()
index b8a21bd33c6683d1c0d765a1efed9a4c02abd226..e793dde8662679dfa695912a88803670c45e9f92 100644 (file)
@@ -169,7 +169,7 @@ $Id$
                                label_scale.innerHTML = String.format('<%:(%d minute window, %d second interval)%>', data_wanted / 60, 3);
 
                                /* render datasets, start update interval */
-                               XHR.poll(3, '<%=build_url("admin/status/bandwidth_status", curdev)%>', null,
+                               XHR.poll(3, '<%=build_url("admin/status/realtime/bandwidth_status", curdev)%>', null,
                                        function(x, data)
                                        {
                                                var data_max   = 0;
@@ -192,7 +192,7 @@ $Id$
                                                        {
                                                                var time_delta = data[i][TIME] - data[i-1][TIME];
                                                                if (time_delta)
-                                                       {
+                                                               {
                                                                        data_rx.push((data[i][RXB] - data[i-1][RXB]) / time_delta);
                                                                        data_tx.push((data[i][TXB] - data[i-1][TXB]) / time_delta);
                                                                }
index dfd12f0717f2a48cf062f476d569a7aa6fa8d47c..c296cfb6ea58f4535c42bb667b169f407bfec828 100644 (file)
@@ -141,7 +141,7 @@ $Id$
                                label_scale.innerHTML = String.format('<%:(%d minute window, %d second interval)%>', data_wanted / 60, 3);
 
                                /* render datasets, start update interval */
-                               XHR.poll(3, '<%=build_url("admin/status/connections_status")%>', null,
+                               XHR.poll(3, '<%=build_url("admin/status/realtime/connections_status")%>', null,
                                        function(x, json)
                                        {
                                                var conn = json.connections;
index e1e163c705dd0d133f4370af0ae4ef46f62d472f..4537645ca057e93c57380a0014f4f32126f584b0 100644 (file)
@@ -138,7 +138,7 @@ $Id$
                                label_scale.innerHTML = String.format('<%:(%d minute window, %d second interval)%>', data_wanted / 60, 3);
 
                                /* render datasets, start update interval */
-                               XHR.poll(3, '<%=build_url("admin/status/load_status")%>', null,
+                               XHR.poll(3, '<%=build_url("admin/status/realtime/load_status")%>', null,
                                        function(x, data)
                                        {
                                                var data_max   = 0;
index f70e3b26fc758bac519297480f6f05694c1588f5..006cee7011f8786a6a85af5e34f02765a25041ee 100644 (file)
@@ -179,7 +179,7 @@ $Id$
                                label_scale_2.innerHTML = String.format('<%:(%d minute window, %d second interval)%>', data_wanted / 60, 3);
 
                                /* render datasets, start update interval */
-                               XHR.poll(3, '<%=build_url("admin/status/wireless_status", curdev)%>', null,
+                               XHR.poll(3, '<%=build_url("admin/status/realtime/wireless_status", curdev)%>', null,
                                        function(x, data)
                                        {
                                                var noise_floor = 255;