[luci-app-bmx7] Add Status page menu entry
authorRoger Pueyo Centelles <roger.pueyo@guifi.net>
Thu, 10 Mar 2016 10:21:12 +0000 (11:21 +0100)
committerRoger Pueyo Centelles <roger.pueyo@guifi.net>
Wed, 4 May 2016 13:18:48 +0000 (15:18 +0200)
luci-app-bmx7/files/usr/lib/lua/luci/controller/bmx7.lua

index a94b5e1eaa757bae6eb63cde4dfb44bf0460dcaf..e24c2a9f42ae91a6744a911d09b1579bff64cff8 100644 (file)
@@ -47,4 +47,20 @@ function index()
        -- getting position of menu
        local uci_position = uci:get("luci-bmx7","luci","position")
 
-end
\ No newline at end of file
+
+       ---------------------------
+       -- Placing the pages in the menu
+       ---------------------------
+
+       -- Status (default)
+       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)
+
+end
+
+function action_status_j()
+       luci.template.render("bmx7/status_j", {})
+end