From: Roger Pueyo Centelles Date: Thu, 10 Mar 2016 12:41:21 +0000 (+0100) Subject: [luci-app-bmx7] Add Nodes page menu entry X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ef61e355eb2672d2a9ce40d776bb1fa32653087d;p=feed%2Frouting.git [luci-app-bmx7] Add Nodes page menu entry --- diff --git a/luci-app-bmx7/files/usr/lib/lua/luci/controller/bmx7.lua b/luci-app-bmx7/files/usr/lib/lua/luci/controller/bmx7.lua index e24c2a9..ed62628 100644 --- a/luci-app-bmx7/files/usr/lib/lua/luci/controller/bmx7.lua +++ b/luci-app-bmx7/files/usr/lib/lua/luci/controller/bmx7.lua @@ -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