luci-base: remove hardcoded cgi-bin path
authorAnsuel Smith <ansuelsmth@gmail.com>
Wed, 15 Jan 2020 23:30:30 +0000 (00:30 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 4 Mar 2020 07:50:21 +0000 (08:50 +0100)
commitc1fd6f522245e7e8ba2cd76a209d843af12e14d8
tree5b885c31549aa91202e5aa6f6a99209b0436d0da
parent7295b326dee0df53469487b2d3062657ec63894c
luci-base: remove hardcoded cgi-bin path

Currently LuCI can be loaded only when placed in the root of the server as the cgi-bin path are hardcoded. Change the index.html to load the cgi-bin path from the current level.
Also add a new entry in the env Object to make the cgi_base path easily accessible.
This variable will be based on the position of /cgi-bin/luci.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
(cherry picked from commit 5e6ec8562fe828934ef835490cee405653b06d3a)
modules/luci-base/htdocs/luci-static/resources/fs.js
modules/luci-base/htdocs/luci-static/resources/luci.js
modules/luci-base/htdocs/luci-static/resources/ui.js
modules/luci-base/root/www/index.html
modules/luci-mod-system/htdocs/luci-static/resources/view/system/flash.js