1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-15 03:51:51 +00:00
openmptcprouter-feeds/luci-base/luasrc/view/header.htm

34 lines
1.2 KiB
HTML
Raw Normal View History

2018-01-23 14:36:03 +00:00
<%#
Copyright 2008 Steven Barth <steven@midlink.org>
2019-07-12 16:27:38 +00:00
Copyright 2008-2019 Jo-Philipp Wich <jo@mein.io>
2018-01-23 14:36:03 +00:00
Licensed to the public under the Apache License 2.0.
-%>
<%
if not luci.dispatcher.context.template_header_sent then
include("themes/" .. theme .. "/header")
luci.dispatcher.context.template_header_sent = true
end
2019-07-12 16:27:38 +00:00
local applyconf = luci.config and luci.config.apply
2018-01-23 14:36:03 +00:00
%>
2019-05-28 19:51:29 +00:00
2019-07-12 16:27:38 +00:00
<script type="text/javascript" src="<%=resource%>/promis.min.js"></script>
2019-05-28 19:51:29 +00:00
<script type="text/javascript" src="<%=resource%>/luci.js"></script>
<script type="text/javascript">
L = new LuCI(<%= luci.http.write_json({
2019-07-12 16:27:38 +00:00
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
2019-05-28 19:51:29 +00:00
}) %>);
</script>