summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorconxuro2013-01-09 08:12:20 +0000
committerconxuro2013-01-09 08:12:20 +0000
commit28957aa1a995d35921b82c5498cd25be88311f43 (patch)
tree0ae758d03a2f704f3c17e53014850d9badc8cb82
parentcd775de66724c99cde5e8cc66eb2d306fc7f4cb5 (diff)
downloadrouting-28957aa1a995d35921b82c5498cd25be88311f43.tar.gz
Changed and made configurable the order position of the web menu
-rw-r--r--bmx6-luci/files/etc/config/luci-bmx61
-rw-r--r--bmx6-luci/files/usr/lib/lua/luci/controller/bmx6.lua16
2 files changed, 13 insertions, 4 deletions
diff --git a/bmx6-luci/files/etc/config/luci-bmx6 b/bmx6-luci/files/etc/config/luci-bmx6
index 72aeab6..f70205b 100644
--- a/bmx6-luci/files/etc/config/luci-bmx6
+++ b/bmx6-luci/files/etc/config/luci-bmx6
@@ -2,5 +2,6 @@ config 'bmx6' 'luci'
option ignore '0'
#option place 'admin status Bmx6'
option place 'qmp Mesh'
+ option position '3'
#option json 'http://127.0.0.1/cgi-bin/bmx6-info?'
option json 'exec:/www/cgi-bin/bmx6-info -s'
diff --git a/bmx6-luci/files/usr/lib/lua/luci/controller/bmx6.lua b/bmx6-luci/files/usr/lib/lua/luci/controller/bmx6.lua
index ed02a84..a9f2533 100644
--- a/bmx6-luci/files/usr/lib/lua/luci/controller/bmx6.lua
+++ b/bmx6-luci/files/usr/lib/lua/luci/controller/bmx6.lua
@@ -44,12 +44,20 @@ function index()
local util = require "luci.util"
place = util.split(uci_place," ")
end
+
+ -- getting position of menu
+ local uci_position = uci:get("luci-bmx6","luci","position")
+
---------------------------
-- Starting with the pages
---------------------------
--- status (default)
- entry(place,call("action_status_j"),place[#place])
+ entry(place,call("action_status_j"),place[#place],tonumber(uci_position))
+
+ table.insert(place,"Status")
+ entry(place,call("action_status_j"),"Status",0)
+ table.remove(place)
-- not visible
table.insert(place,"nodes_nojs")
@@ -76,14 +84,14 @@ function index()
--entry(place,call("action_gateways_j"),"Gateways").leaf = true
--table.remove(place)
- --- chat
+ --- Chat
table.insert(place,"Chat")
- entry(place,call("action_chat"),"Chat")
+ entry(place,call("action_chat"),"Chat",5)
table.remove(place)
--- Graph
table.insert(place,"Graph")
- entry(place, template("bmx6/graph",4), "Graph")
+ entry(place, template("bmx6/graph"), "Graph",4)
table.remove(place)
--- Topology (hidden)