Commit graph

8 commits

Author SHA1 Message Date
Jo-Philipp Wich
711f759278 luci-base: harmonize JS class naming and requesting
- Make builtin classes available via `require` to allow view code to
   request external and internal classes in a consistent manner without
   having to know which classes are builtin and which not

 - Make base classes request any used class explicitely instead of
   relying on implicitly set up L.{dom,view,Poll,Request,Class} aliases

 - Consistently convert class names to lower case in JSdoc to match
   the names used in `require` statements

 - Deprecate L.{dom,view,Poll,Request,Class} aliases

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-02 21:51:20 +02:00
Jo-Philipp Wich
dc60aaeb77 luci-base: fs.js: exec_direct(): add ability to encode command as latin1
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-12 11:59:41 +01:00
Jo-Philipp Wich
da4b0f0483 luci-base: fs.js: support Blob/JSON in read_direct() and exec_direct()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-30 11:58:15 +01:00
Ansuel Smith
5e6ec8562f
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>
2020-01-16 15:02:14 +01:00
Jo-Philipp Wich
e884b63916 luci-base: fs.js: properly escape arguments in exec_direct()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-18 21:22:06 +01:00
Jo-Philipp Wich
f3724e46a5 luci-base: fs.js: add read_direct() and exec_direct() functions
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-18 21:10:15 +01:00
Jo-Philipp Wich
77a89299f4 luci.base: fs.js: expose mode param in fs.write()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-21 08:42:41 +02:00
Jo-Philipp Wich
8776e423d9 luci-base: introduce common fs.js helper class
Introduce a new fs.js helper class to gather filesystem related RPC
operations in a single file.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-10-07 11:53:35 +02:00