diff options
author | Dirk Brenken <dev@brenken.org> | 2017-07-19 22:36:47 +0200 |
---|---|---|
committer | Dirk Brenken <dev@brenken.org> | 2017-07-20 07:44:15 +0200 |
commit | e900b892e871fcd0939df883e9586febe665c252 (patch) | |
tree | 50109c8e420961c8a019b6fc6702a63dd9b1e251 /applications/luci-app-travelmate/luasrc/controller/travelmate.lua | |
parent | 76b3af64c038905ddcc1c511b99c65e3c4879bbc (diff) |
luci-app-travelmate: sync with travelmate 0.9.0
* add a wireless station manager to edit and delete existing
interfaces or scan for new uplinks
Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'applications/luci-app-travelmate/luasrc/controller/travelmate.lua')
-rw-r--r-- | applications/luci-app-travelmate/luasrc/controller/travelmate.lua | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/applications/luci-app-travelmate/luasrc/controller/travelmate.lua b/applications/luci-app-travelmate/luasrc/controller/travelmate.lua index 86382f6ae0..71fb179961 100644 --- a/applications/luci-app-travelmate/luasrc/controller/travelmate.lua +++ b/applications/luci-app-travelmate/luasrc/controller/travelmate.lua @@ -5,8 +5,8 @@ module("luci.controller.travelmate", package.seeall) local fs = require("nixio.fs") local util = require("luci.util") -local template = require("luci.template") local i18n = require("luci.i18n") +local templ = require("luci.template") function index() if not nixio.fs.access("/etc/config/travelmate") then @@ -14,15 +14,21 @@ function index() end entry({"admin", "services", "travelmate"}, firstchild(), _("Travelmate"), 40).dependent = false entry({"admin", "services", "travelmate", "tab_from_cbi"}, cbi("travelmate/overview_tab", {hideresetbtn=true, hidesavebtn=true}), _("Overview"), 10).leaf = true - entry({"admin", "services", "travelmate", "logfile"}, call("logread"), _("View Logfile"), 20).leaf = true + entry({"admin", "services", "travelmate", "stations"}, template("travelmate/stations"), _("Wireless Stations"), 20).leaf = true + entry({"admin", "services", "travelmate", "logfile"}, call("logread"), _("View Logfile"), 30).leaf = true entry({"admin", "services", "travelmate", "advanced"}, firstchild(), _("Advanced"), 100) entry({"admin", "services", "travelmate", "advanced", "configuration"}, cbi("travelmate/configuration_tab"), _("Edit Travelmate Configuration"), 110).leaf = true entry({"admin", "services", "travelmate", "advanced", "cfg_wireless"}, cbi("travelmate/cfg_wireless_tab"), _("Edit Wireless Configuration"), 120).leaf = true entry({"admin", "services", "travelmate", "advanced", "cfg_network"}, cbi("travelmate/cfg_network_tab"), _("Edit Network Configuration"), 130).leaf = true entry({"admin", "services", "travelmate", "advanced", "cfg_firewall"}, cbi("travelmate/cfg_firewall_tab"), _("Edit Firewall Configuration"), 140).leaf = true + + entry({"admin", "services", "travelmate", "wifiscan"}, template("travelmate/wifi_scan")).leaf = true + entry({"admin", "services", "travelmate", "wifiadd"}, cbi("travelmate/wifi_add", {hideresetbtn=true, hidesavebtn=true})).leaf = true + entry({"admin", "services", "travelmate", "wifiedit"}, cbi("travelmate/wifi_edit", {hideresetbtn=true, hidesavebtn=true})).leaf = true + entry({"admin", "services", "travelmate", "wifidelete"}, cbi("travelmate/wifi_delete", {hideresetbtn=true, hidesavebtn=true})).leaf = true end function logread() local logfile = util.trim(util.exec("logread -e 'travelmate'")) - template.render("travelmate/logread", {title = i18n.translate("Travelmate Logfile"), content = logfile}) + templ.render("travelmate/logread", {title = i18n.translate("Travelmate Logfile"), content = logfile}) end |