Age | Commit message (Collapse) | Author |
|
This reverts commit 97ebdcbddb9cad76dc551086fcb887e55886a069.
The commit seems to cause errors already before the login screen.
Discussion in https://github.com/openwrt/luci/commit/97ebdcbddb9cad76dc551086fcb887e55886a069#commitcomment-139871175
Errors like:
In error(), file [C]
called from function [anonymous function] (/usr/lib/lua/luci/ucodebridge.lua:23)
called from function ((tail call))
In [anonymous function](), file /usr/share/ucode/luci/runtime.uc, line 148, byte 45:
called from function build_pagetree (/usr/share/ucode/luci/dispatcher.uc:382:73)
called from function menu_json (/usr/share/ucode/luci/dispatcher.uc:439:26)
called from function [anonymous function] (/usr/share/ucode/luci/dispatcher.uc:898:24)
called from anonymous function (/www/cgi-bin/luci:39:13)
` return lcall.call(modname, method, ...args);`
Near here ----------------------------------------^
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
|
|
Because the menu JSON can have 'depends' in them, uci changes
should force the menu to regenerate.
Closes #6423
Signed-off-by: James Haggerty <james.haggerty@morsemicro.com>
Signed-off-by: Paul Donald <newtwen@gmail.com>
|
|
In some places argument name was renamed but in the JsDoc it's remain old.
Added more typing for string enum fields like:
@param {string} [type=text]
replaced with:
@param {"blob"|"text"|"blob"} [type=text]
Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
|
|
Under certain circumstances, a staged uci option value might get unset
again before saving the config, leaving an empty section change set
behind, causing the save call to send an empty uci set request via rpc,
triggering an ubus code 4 (Resource not found) error.
In particular this prevented bridge VLANs from getting saved properly.
Fixes: #5876
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Since option deletions are sent first, followed by ubus set commands,
a call sequence like:
uci.set('config', 'section', 'option', ['foo', 'bar'])
uci.set('config', 'section', 'option', ['foo'])
uci.unset('config', 'section', 'option')
... would result in the option retainining `foo` as value, instead of it
getting removed as one would expect.
Fix this issue by reverting the internal change state of the option before
storing the deletion.
While we're at it, also rework the internal tracking of deleted options to
not result in duplicate removal requests when the same option is unset
several times.
Finally change all `undefined` returns to `null` in order to comply with
the function documentation.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
- Process deletions before additions or changes, allowing user code to
remove and recreate a section with the same name.
- Only record section deletions when the section to be removed actually
existed in the original config or when it was staged for creation
earlier. This avoids stray ubus not found exception when saving.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fixes: #3912
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit ec3a202b69b5bf5785c0785b2ac39efbe5cae2b7)
|
|
Don't overwrite the `r` variable which is supposed to refer to the reordered
uci sections with temporary data for collecting uci add parameters.
Fixes stray uci/get permission errors caused by an attempt to load
nonsensical uci package names.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
- 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>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
This is required to properly reload the configurations after applying uci
changes that solely consist of uci section ordering operations.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Add support for extended section syntax notation in @type[#] format and
refactor the package loading function to not load configurations twice
when a package load operation is already pending and another load request
is made for the same package.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Add a new rpc.js class which provides low level facilities to exchanges
messages with the ubus rpc endpoint.
Also introduce a new uci.js class which provides client side uci
manipulation routines.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|