summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-admin-full/luasrc/view
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2016-01-20 13:45:27 +0100
committerJo-Philipp Wich <jow@openwrt.org>2016-01-20 13:45:27 +0100
commite0988b089be0e33d64c62339cfdd90755b6dbd79 (patch)
tree0fa966fab19d9062522aec88d001ac11e9f2e575 /modules/luci-mod-admin-full/luasrc/view
parente03f2b780a9ae28bdf270d36840b651fa723413e (diff)
luci-mod-admin-full: fix device selection in wireless and bandwidth realtime stats
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'modules/luci-mod-admin-full/luasrc/view')
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/admin_status/bandwidth.htm5
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/admin_status/wireless.htm5
2 files changed, 4 insertions, 6 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/bandwidth.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/bandwidth.htm
index 04da3c123..33bbee784 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_status/bandwidth.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/bandwidth.htm
@@ -14,8 +14,7 @@
end
end
- local curdev = luci.dispatcher.context.requestpath
- curdev = curdev[#curdev] ~= "bandwidth" and curdev[#curdev] or devices[1]
+ local curdev = luci.http.formvalue("dev") or devices[1]
-%>
<%+header%>
@@ -268,7 +267,7 @@
<ul class="cbi-tabmenu">
<% for _, dev in ipairs(devices) do %>
- <li class="cbi-tab<%= dev == curdev and "" or "-disabled" %>"><a href="<%=pcdata(dev)%>"><%=pcdata(dev)%></a></li>
+ <li class="cbi-tab<%= dev == curdev and "" or "-disabled" %>"><a href="?dev=<%=pcdata(dev)%>"><%=pcdata(dev)%></a></li>
<% end %>
</ul>
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/wireless.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/wireless.htm
index f18592610..aa658ff0c 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_status/wireless.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/wireless.htm
@@ -14,8 +14,7 @@
end
end
- local curdev = luci.dispatcher.context.requestpath
- curdev = curdev[#curdev] ~= "wireless" and curdev[#curdev] or devices[1]
+ local curdev = luci.http.formvalue("dev") or devices[1]
-%>
<%+header%>
@@ -318,7 +317,7 @@
<ul class="cbi-tabmenu">
<% for _, dev in ipairs(devices) do %>
- <li class="cbi-tab<%= dev == curdev and "" or "-disabled" %>"><a href="<%=pcdata(dev)%>"><%=pcdata(dev)%></a></li>
+ <li class="cbi-tab<%= dev == curdev and "" or "-disabled" %>"><a href="?dev=<%=pcdata(dev)%>"><%=pcdata(dev)%></a></li>
<% end %>
</ul>