Developing lightweight computation at the DSG edge

Commit 8ec00b31 authored by p4u's avatar p4u
Browse files

Added redirection to wait page after apply changes

parent 0b46874e
......@@ -20,7 +20,7 @@
--]]
require("luci.sys")
local http = require "luci.http"
m = Map("qmp", "Quick Mesh Project")
ethernet_interfaces = { 'eth', 'ath', 'wlan' }
......@@ -77,6 +77,7 @@ for i,l in ipairs(eth_int) do
end
function m.on_commit(self,map)
http.redirect("/luci-static/resources/qmp/wait_long.html")
luci.sys.call('/etc/qmp/qmp_control.sh configure_network > /tmp/qmp_control_network.log &')
end
......
......@@ -20,7 +20,7 @@
--]]
require("luci.sys")
local http = require "luci.http"
m = Map("qmp", "Quick Mesh Project")
ethernet_interfaces = { 'eth', 'ath', 'wlan' }
......@@ -94,6 +94,7 @@ overlapping_section:option(Value, "qmp_leasetime", "DHCP leassetime","Leassetime
-------------------------
function m.on_commit(self,map)
http.redirect("/luci-static/resources/qmp/wait_long.html")
luci.sys.call('/etc/qmp/qmp_control.sh configure_network > /tmp/qmp_control_network.log &')
end
......
......@@ -20,6 +20,7 @@
--]]
require("luci.sys")
local http = require "luci.http"
m = Map("qmp", "Quick Mesh Project")
......@@ -32,6 +33,7 @@ primary_device = node_section:option(Value,"primary_device", translate("Primary
function m.on_commit(self,map)
http.redirect("/luci-static/resources/qmp/wait_short.html")
luci.sys.call('/etc/qmp/qmp_control.sh configure_system > /tmp/qmp_control_system.log &')
end
......
......@@ -20,6 +20,7 @@
--]]
require("luci.sys")
local http = require "luci.http"
package.path = package.path .. ";/etc/qmp/?.lua"
qmp = require "qmpinfo"
......@@ -109,6 +110,7 @@ end
function m.on_commit(self,map)
http.redirect("/luci-static/resources/qmp/wait_short.html")
luci.sys.call('/etc/qmp/qmp_control.sh configure_wifi > /tmp/qmp_control_wifi.log &')
end
......
......@@ -28,7 +28,7 @@ qmpinfo = require "qmpinfo"
m = SimpleForm("qmp_tmp", translate("qMp Wizard"))
netmode = m:field(ListValue, "_netmode",translate("Network mode"),translate("Roaming for quick deployments.<br/>Community for network communities"))
netmode = m:field(ListValue, "_netmode",translate("Network mode"),translate("Roaming is used for quick deployments.<br/>Community for network communities"))
netmode:value("community","community")
netmode:value("roaming","roaming")
netmode.default="roaming"
......@@ -156,7 +156,7 @@ function netmode.write(self, section, value)
end
function apply(self)
http.redirect("/luci-static/resources/qmp/wait.html")
http.redirect("/luci-static/resources/qmp/wait_long.html")
luci.sys.call('qmpcontrol configure_network >> /tmp/log/qmp_control_network.log &')
luci.sys.call('qmpcontrol configure_wifi >> /tmp/log/qmp_control_wifi.log &')
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment