summaryrefslogtreecommitdiffhomepage
path: root/modules/niu/luasrc/model
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2009-11-10 16:02:48 +0000
committerSteven Barth <steven@midlink.org>2009-11-10 16:02:48 +0000
commit7aed1e4b9d3d608389a8b15ea800b8e75be967ef (patch)
tree9c87318822ab98bff3f91a7a8ab52618e89a6d6c /modules/niu/luasrc/model
parent4c08e29387ea675b230d87d4f4226b18389265cf (diff)
NIU: More pages
Diffstat (limited to 'modules/niu/luasrc/model')
-rw-r--r--modules/niu/luasrc/model/cbi/niu/network/lan.lua10
-rw-r--r--modules/niu/luasrc/model/cbi/niu/system/reboot.lua1
2 files changed, 10 insertions, 1 deletions
diff --git a/modules/niu/luasrc/model/cbi/niu/network/lan.lua b/modules/niu/luasrc/model/cbi/niu/network/lan.lua
index b5d97d2b1c..6f6237e608 100644
--- a/modules/niu/luasrc/model/cbi/niu/network/lan.lua
+++ b/modules/niu/luasrc/model/cbi/niu/network/lan.lua
@@ -1,10 +1,12 @@
-local cursor = require "luci.model.uci".cursor()
+local uci = require "luci.model.uci"
+local cursor = uci.cursor()
local d = Delegator()
d.allow_finish = true
d.allow_back = true
d.allow_cancel = true
d:add("lan1", load("niu/network/lan1"))
+d:set("warnip", {Template("niu/network/warn_ip_change")})
function d.on_cancel()
cursor:revert("network")
@@ -12,6 +14,12 @@ function d.on_cancel()
end
function d.on_done()
+ if uci.inst_state:get("network", "lan", "ipaddr") ~= cursor:get("network", "lan", "ipaddr") then
+ local cs = uci.cursor_state()
+ cs:set("network", "lan", "_ipchanged", "1")
+ cs:save("network")
+ end
+
cursor:commit("network")
cursor:commit("dhcp")
end
diff --git a/modules/niu/luasrc/model/cbi/niu/system/reboot.lua b/modules/niu/luasrc/model/cbi/niu/system/reboot.lua
new file mode 100644
index 0000000000..d8f852bdc9
--- /dev/null
+++ b/modules/niu/luasrc/model/cbi/niu/system/reboot.lua
@@ -0,0 +1 @@
+local f = Form("reboot", "Rebooting Device", "Device is rebooting. Please wait...") \ No newline at end of file