luci-base: expose effective dispatched path to client side environment
authorJo-Philipp Wich <jo@mein.io>
Sun, 1 Dec 2019 19:21:04 +0000 (20:21 +0100)
committerJo-Philipp Wich <jo@mein.io>
Mon, 16 Dec 2019 17:07:17 +0000 (18:07 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/luasrc/view/header.htm

index 1ef0e5b01300359593a4daaa46b55ada974f6ce7..9cdedde5c2bc08bfbbf1a922c7e60e6193409c4b 100644 (file)
@@ -13,8 +13,8 @@
        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" src="<%=resource%>/promis.min.js?v=git-19.292.31773-cc35194"></script>
+<script type="text/javascript" src="<%=resource%>/luci.js?v=git-19.292.31773-cc35206"></script>
 <script type="text/javascript">
        L = new LuCI(<%= luci.http.write_json({
                token          = token,
@@ -22,6 +22,7 @@
                scriptname     = luci.http.getenv("SCRIPT_NAME"),
                pathinfo       = luci.http.getenv("PATH_INFO"),
                requestpath    = luci.dispatcher.context.requestpath,
+               dispatchpath   = luci.dispatcher.context.path,
                pollinterval   = luci.config.main.pollinterval or 5,
                sessionid      = luci.dispatcher.context.authsession,
                apply_rollback = math.max(applyconf and applyconf.rollback or 30, 30),