luci-app-mwan3: fix legacy uci api usage
authorJo-Philipp Wich <jo@mein.io>
Fri, 6 Apr 2018 07:35:39 +0000 (09:35 +0200)
committerJo-Philipp Wich <jo@mein.io>
Fri, 6 Apr 2018 07:35:39 +0000 (09:35 +0200)
Explicitely require libuci-lua in model classes that use legacy /var/state
cursor handling.

Also add a specific dependency on libuci-lua to the luci-app-mwan3
Makefile in preparation of the upcoming default removal of libuci-lua.

Finally fix the post data dispatching on the notification tab, see #1722
for reference.

Fixes #1726.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
applications/luci-app-mwan3/Makefile
applications/luci-app-mwan3/luasrc/controller/mwan3.lua
applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua
applications/luci-app-mwan3/luasrc/model/cbi/mwan/policy.lua
applications/luci-app-mwan3/luasrc/model/cbi/mwan/rule.lua

index d65cd3a..c719cb1 100644 (file)
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 LUCI_TITLE:=LuCI support for the MWAN3 multiwan hotplug script
 include $(TOPDIR)/rules.mk
 
 LUCI_TITLE:=LuCI support for the MWAN3 multiwan hotplug script
-LUCI_DEPENDS:=+mwan3 +luci-mod-admin-full +luci-app-firewall +luci-lib-nixio
+LUCI_DEPENDS:=+mwan3 +libuci-lua +luci-mod-admin-full +luci-app-firewall +luci-lib-nixio
 LUCI_PKGARCH:=all
 PKG_LICENSE:=GPLv2
 
 LUCI_PKGARCH:=all
 PKG_LICENSE:=GPLv2
 
index 27dc984..d8fba79 100644 (file)
@@ -56,7 +56,7 @@ function index()
                arcombine(cbi("mwan/rule"), cbi("mwan/ruleconfig")),
                _("Rules"), 40).leaf = true
        entry({"admin", "network", "mwan", "notify"},
                arcombine(cbi("mwan/rule"), cbi("mwan/ruleconfig")),
                _("Rules"), 40).leaf = true
        entry({"admin", "network", "mwan", "notify"},
-               cbi("mwan/notify"),
+               form("mwan/notify"),
                _("Notification"), 50).leaf = true
 end
 
                _("Notification"), 50).leaf = true
 end
 
index 556a4f7..8564231 100644 (file)
@@ -3,6 +3,7 @@
 -- Licensed to the public under the GNU General Public License v2.
 
 dsp = require "luci.dispatcher"
 -- Licensed to the public under the GNU General Public License v2.
 
 dsp = require "luci.dispatcher"
+uci = require "uci"
 
 
 function interfaceWarnings(overview, count, iface_max)
 
 
 function interfaceWarnings(overview, count, iface_max)
index c4567f7..b7a90aa 100644 (file)
@@ -3,6 +3,7 @@
 -- Licensed to the public under the GNU General Public License v2.
 
 dsp = require "luci.dispatcher"
 -- Licensed to the public under the GNU General Public License v2.
 
 dsp = require "luci.dispatcher"
+uci = require "uci"
 
 
 function policyCheck()
 
 
 function policyCheck()
index fb885f8..f0b94bd 100644 (file)
@@ -3,6 +3,7 @@
 -- Licensed to the public under the GNU General Public License v2.
 
 dsp = require "luci.dispatcher"
 -- Licensed to the public under the GNU General Public License v2.
 
 dsp = require "luci.dispatcher"
+uci = require "uci"
 
 
 function ruleCheck()
 
 
 function ruleCheck()