luci-base: remove hardcoded cgi-bin path 3511/head
authorAnsuel Smith <ansuelsmth@gmail.com>
Wed, 15 Jan 2020 23:30:30 +0000 (00:30 +0100)
committerAnsuel Smith <ansuelsmth@gmail.com>
Thu, 16 Jan 2020 14:02:14 +0000 (15:02 +0100)
commit5e6ec8562fe828934ef835490cee405653b06d3a
treeeb604f3f8c91d7d7b754611a2987eba19081ba82
parent88b9d58a44ea52e812cf0c0db5b5b6b87783bd7e
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>
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