summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/view/header.htm
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-09-13 23:50:12 +0200
committerJo-Philipp Wich <jo@mein.io>2022-10-25 01:03:37 +0200
commit673f38246ac3548caefec41183e3dd7477d9f6f6 (patch)
treeb3b7682b14d8a81286f8b7fe2aa5239e5dfbf4b7 /modules/luci-base/luasrc/view/header.htm
parentded8ccf93ec5163be35c41501869110e5dab30d1 (diff)
treewide: separate Lua runtime resources
Move classes required for Lua runtime support into a new `luci-lua-runtime` package. Also replace the `luci.http` and `luci.util` classes in `luci-lib-base` with stubbed versions interacting with the ucode based runtime environment. Finally merge `luci-base-ucode` into the remainders of `luci-base`. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/luasrc/view/header.htm')
-rw-r--r--modules/luci-base/luasrc/view/header.htm38
1 files changed, 0 insertions, 38 deletions
diff --git a/modules/luci-base/luasrc/view/header.htm b/modules/luci-base/luasrc/view/header.htm
deleted file mode 100644
index cffe9482ca..0000000000
--- a/modules/luci-base/luasrc/view/header.htm
+++ /dev/null
@@ -1,38 +0,0 @@
-<%#
- Copyright 2008 Steven Barth <steven@midlink.org>
- Copyright 2008-2019 Jo-Philipp Wich <jo@mein.io>
- 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
-
- 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,
- media = media,
- resource = resource,
- scriptname = luci.http.getenv("SCRIPT_NAME"),
- pathinfo = luci.http.getenv("PATH_INFO"),
- documentroot = luci.http.getenv("DOCUMENT_ROOT"),
- requestpath = luci.dispatcher.context.requestpath,
- dispatchpath = luci.dispatcher.context.path,
- pollinterval = luci.config.main.pollinterval or 5,
- ubuspath = luci.config.main.ubuspath or '/ubus/',
- sessionid = luci.dispatcher.context.authsession,
- nodespec = luci.dispatcher.context.dispatched,
- apply_rollback = math.max(applyconf and applyconf.rollback or 90, 90),
- 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>