luci-base: expose currently dispatched node info to client side JS
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
125916f2f4
commit
94a0c57181
1 changed files with 3 additions and 2 deletions
|
@ -13,8 +13,8 @@
|
||||||
local applyconf = luci.config and luci.config.apply
|
local applyconf = luci.config and luci.config.apply
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<script type="text/javascript" src="<%=resource%>/promis.min.js?v=git-19.292.31773-cc35194"></script>
|
<script type="text/javascript" src="<%=resource%>/promis.min.js"></script>
|
||||||
<script type="text/javascript" src="<%=resource%>/luci.js?v=git-19.292.31773-cc35206"></script>
|
<script type="text/javascript" src="<%=resource%>/luci.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
L = new LuCI(<%= luci.http.write_json({
|
L = new LuCI(<%= luci.http.write_json({
|
||||||
token = token,
|
token = token,
|
||||||
|
@ -28,6 +28,7 @@
|
||||||
pollinterval = luci.config.main.pollinterval or 5,
|
pollinterval = luci.config.main.pollinterval or 5,
|
||||||
ubuspath = luci.config.main.ubuspath or '/ubus/',
|
ubuspath = luci.config.main.ubuspath or '/ubus/',
|
||||||
sessionid = luci.dispatcher.context.authsession,
|
sessionid = luci.dispatcher.context.authsession,
|
||||||
|
nodespec = luci.dispatcher.context.dispatched,
|
||||||
apply_rollback = math.max(applyconf and applyconf.rollback or 30, 30),
|
apply_rollback = math.max(applyconf and applyconf.rollback or 30, 30),
|
||||||
apply_holdoff = math.max(applyconf and applyconf.holdoff or 4, 1),
|
apply_holdoff = math.max(applyconf and applyconf.holdoff or 4, 1),
|
||||||
apply_timeout = math.max(applyconf and applyconf.timeout or 5, 1),
|
apply_timeout = math.max(applyconf and applyconf.timeout or 5, 1),
|
||||||
|
|
Loading…
Reference in a new issue