Extend the LuCI bootstrap procedure to scan for class files in
/www/luci-static/preload/. Any JavaScript file found there will be
required automatically before setting up the view, allowing to stage
code that should run on every page load.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0d0ad80fd1)
The LuCI.fspath() function allows constructing absolute filesystem paths
from path segments relative to the document root.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit fde144c9be)
In file `/etc/config/ucitrack`
```
config fstab
option exec '/sbin/block mount'
```
`/sbin/block mount` never be called after fstab changed.
Signed-off-by: jjm2473 <1129525450@qq.com>
(cherry picked from commit 97780a9ce1)
Add detection mechanism for system cert CA bundle installed by the
ca-bundle package. Used by LuCI to detect whether the "Use system
certificates" certificate validation option should be enabled.
Signed-off-by: David Lam <david@thedavid.net>
(cherry picked from commit 27b21c2a62)
The cbi() function has a second argument 'config' in which various
configuration parameters can be passed. When converting the lua menu
to JSON, we must also convert this parameter.
Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
(cherry picked from commit 2d8299338e)
A variable clash led to declarative `fs` dependencies being ineffective.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 7cfce56553)
When testing the luci-rpc authnetication, avoid clobbering the HTTP
post request body.
Fixes: #3470
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 38c9c9e0a2)
Refactor the dispatch logic to operate on the internal JSON representation
of the menu tree.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 184ea62300)
Introduce a new method menu_json() which converts the current dispatch
tree into JSON structure.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 852d24061d)
- 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>
(backported from commit 711f759278)
As a native English speaker the luci message displayed when clicking
'Save & Apply' has a somewhat uncomfortable English phrasing of "Waiting
for configuration to get applied". It could be improved by replacing
'get' with 'be' but once you've got that far you might as well replace
this with the shorter & simpler "Applying configuration changes". This
is also technically more correct since luci/openwrt should only be
updating/restarting processes that are related to the changed areas, not
changing the entire configuration.
As a result of that, change both the 'success' and 'rolled back'
messages to "Configuration changes have been applied" & "Configuration
changes have been rolled back"
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit 9b266d11c6)
Having quote " in a comment may cause error with non-minified code.
(explanation: caused by 'require' function's parsing behaviour)
Remove also ";" just in case.
Reference to issue 4020
(backported from 4f80f9542)
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* change wifi scanning to logical interface name,
no longer use the radio device
Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit 9d02ef1bd9)
This addresses the issue of openconnect.sh from openconnect package expecting
a vpn- suffix for the files, while the frontend didn't.
Signed-off-by: Friendly fellow <DasTestament@users.noreply.github.com>
[reword commit message]
Ref: https://github.com/openwrt/packages/issues/11584
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit adf0fb1879)
Fixes: #3951