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

index e24c2a9f42ae91a6744a911d09b1579bff64cff8..ed62628d4b915dfb3e9fe1809756fa0d566488f3 100644 (file)
@@ -59,8 +59,19 @@ function index()
        entry(place,call("action_status_j"),"Status",0)
        table.remove(place)
 
+       -- Nodes list
+       table.insert(place,"Nodes")
+       entry(place,call("action_nodes_j"),"Nodes",1)
+       table.remove(place)
 end
 
+
 function action_status_j()
        luci.template.render("bmx7/status_j", {})
 end
+
+function action_nodes_j()
+       local http = require "luci.http"
+       local link_non_js = "/cgi-bin/luci" .. http.getenv("PATH_INFO") .. '/nodes_nojs'
+       luci.template.render("bmx7/nodes_j", {link_non_js=link_non_js})
+end