summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/view/header.htm
diff options
context:
space:
mode:
Diffstat (limited to 'modules/luci-base/luasrc/view/header.htm')
-rw-r--r--modules/luci-base/luasrc/view/header.htm22
1 files changed, 15 insertions, 7 deletions
diff --git a/modules/luci-base/luasrc/view/header.htm b/modules/luci-base/luasrc/view/header.htm
index 70839c5d8..1ef0e5b01 100644
--- a/modules/luci-base/luasrc/view/header.htm
+++ b/modules/luci-base/luasrc/view/header.htm
@@ -1,6 +1,6 @@
<%#
Copyright 2008 Steven Barth <steven@midlink.org>
- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
+ Copyright 2008-2019 Jo-Philipp Wich <jo@mein.io>
Licensed to the public under the Apache License 2.0.
-%>
@@ -9,17 +9,25 @@
include("themes/" .. theme .. "/header")
luci.dispatcher.context.template_header_sent = true
end
+
+ local applyconf = luci.config and luci.config.apply
%>
<script type="text/javascript" src="<%=resource%>/promis.min.js"></script>
<script type="text/javascript" src="<%=resource%>/luci.js"></script>
<script type="text/javascript">
L = new LuCI(<%= luci.http.write_json({
- token = token,
- resource = resource,
- scriptname = luci.http.getenv("SCRIPT_NAME"),
- pathinfo = luci.http.getenv("PATH_INFO"),
- requestpath = luci.dispatcher.context.requestpath,
- pollinterval = luci.config.main.pollinterval or 5
+ token = token,
+ resource = resource,
+ scriptname = luci.http.getenv("SCRIPT_NAME"),
+ pathinfo = luci.http.getenv("PATH_INFO"),
+ requestpath = luci.dispatcher.context.requestpath,
+ pollinterval = luci.config.main.pollinterval or 5,
+ sessionid = luci.dispatcher.context.authsession,
+ apply_rollback = math.max(applyconf and applyconf.rollback or 30, 30),
+ apply_holdoff = math.max(applyconf and applyconf.holdoff or 4, 1),
+ apply_timeout = math.max(applyconf and applyconf.timeout or 5, 1),
+ apply_display = math.max(applyconf and applyconf.display or 1.5, 1),
+ rollback_token = rollback_token
}) %>);
</script>