Age | Commit message (Collapse) | Author |
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Mostly convert HTML tables to div based markup to allow for easier styling
in the future. Also change JS accessor code accordingly.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Add a new helper function `E()` to cbi.js which can be used to conveniently
build HTML markup.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
luci-base: fix broken translation
|
|
Currently this translation refer to an old string, sync to the new one.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
|
Some of the shortcomings in Turkish were added.
|
|
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
|
|
* sync translations (aiccu removal)
* remove some other old strings
* fix Polish translation
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
|
|
http.getenv("SCRIPT_NAME") fail if it's not provided. This can happen in the login screen when we don't have any script to load.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
|
Updated Japanese translations.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
|
|
Synchronized translations with sources.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
|
|
Should prevent the crash mentioned in #1779.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
On certain environments, mainly with the embedded uhttpd interpreter, the
luci.config class cannot be loaded due to a circular dependency with the
luci.model.uci class.
Break up the dependency by deferring the loading of luci.config in
luci.model.uci until it is actually needed.
Fixes #1803, FS#1553.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
UCI apply/rollback workflow
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
luci-base: show wifi chip identification on overview
|
|
Signed-off-by: Rixerx <krystian.kozak20@gmail.com>
|
|
A simple scan of the code indicates that currently no code in the repo
is accessing the sysauth= cookie
Closes openwrt/luci#1555
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
|
|
If log configuration get changed in uci system no new values are applied
until reboot. Add /etc/init.d/log reload to exec option will solve this
issue.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
|
|
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
|
|
Ship an /etc/init.d/ucitrack for spawning a virtual service with the sole
purpose to track the configurations and dependencies formerly handled by
luci-reload.
Once all LuCI supported services ship with procd compatible init scripts,
the uci track support can be dropped.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Switch to rpcd based uci apply/rollback workflow which helps to avoid soft-
bricking devices by requiring an explicit confirmation call after config
apply.
When a user now clicks "Save & Apply", LuCI first issues a call to uci apply
which commits and reloads configuration, then goes into a polling countdown
mode where it repeatedly attempts to call uci confirm.
If the committed configuration is sane, the confirm call will go through and
cancel rpcd's pending rollback timer.
If the configuration change leads to a loss of connectivity (e.g. due to bad
firewall rules or similar), the rollback mechanism will kick in after the
timeout and revert configuration files and pending changes to the pre-apply
state.
In order to cover such rare cases where a lost of connectivity is expected
and desired, the user is offered an "unchecked" apply option after timing
out, which allows committing and applying the changes anyway, without the
extra safety checks.
As a consequence of this change, the luci-reload mechanism is now completely
unsused since rpcd uses ubus config reload signals to reload affected
services, which means that only procd-enabled services will receive proper
reload treatment with the new workflow.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Switch to per-session save directories to decouple LuCI configuration changes
from system wide ones.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Internet Explorer 11 requires the timeout to be applied after the open()
call, otherwise an invlaid state exception will be raised
Fixes aa6c97154 ("luci-base: extend xhr.js")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Show the correct wifi chip identification in case iwinfo
recognises the chip.
So far the wifidev.get_i18n function has practically always
returned just "Generic", but use iwinfo.hardware_name to
fetch the name.
In case iwinfo returns the default "Generic MAC80211", there
is a double 80211 in the final string, which is a cosmetic bug.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
This reverts commit 52cf265c9d12537d5f37043350328d30ca11bab4.
I accidentally committed unrelated changes.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
indentifies > identifies
|
|
Updated Japanese translations.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
|
|
Synchronized translations with sources.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
|
|
Add timeout options to get() and post() and introduce XHR.stop() to support
stopping a poll operation.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Support a new boolean property `cors` which - if set to true - causes the
dispatcher to positively answer CORS OPTIONS requests after authentication
without actually running the dispatching target.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Decode the HTTP message bodies of any request carrying a Content-Length
header, not just those in POST requests.
This allows handling parameters in other methods, OPTIONS in particular.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Updated japanese translations.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
|
|
Add a 3rd return value to luci.util.ubus() containing the string value
of the error return value.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Ensure that the (table) length of a file upload value has nonzero length
by initializing the first table index with the file name.
This fixes tests in the form
x = luci.http.formvalue(...)
if x and #x > 0 then ... end
Fixes #1763.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Depends on 5ef51b2ab ("lucihttp: update to latest HEAD").
Fixes #1755.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Ship an ACL definition for granting full read/write access to uci
configuration files via ubus rpc. This is a precondition for enabling
uci session isolation later on.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Restore the old luci.http behaviour of converting repeated POST params into
single tables holding all values instead of letting each repeated parameter
overwrite the value of the preceeding one.
Fixes, among other things, the handling of CBI dynamic list values.
Fixes #1752
Fixes 59dea0230 ("luci-base: switch to lucihttp based POST data processing")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Introduce luci.model.uci.set_session_id() and luci.model.uci.get_session_id()
to set and get the effective session ID respectively.
When a session ID is set, it is sent as `ubus_rpc_session` attribute to rpcd,
causing it to use per-session change directories, isolating LuCI changes from
the global system uci state.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
LuCI itself now uses ubus calls to interact with uci configuration while
the remaining direct libuci-lua users have been updated to either depend
on the binding library or to use luci.model.uci.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Also adjust the dependencies of components depending on these classes and
flatten the namespace from luci.http.protocol.* to luci.http.*
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
With only the decoder routines remaining in luci.http.protocol, it makes no
sense to keep the low level protocol class around, so fold the remaining code
into the central luci.http class.
Also adjust the few direct users of luci.http.protocol accordingly.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
- Rewrite getcookie() to use liblucihttp header value parsing
- Rewrite setfilehandler() to use local variables and have cleaner code
- Fix build_querystring() to actually *en*code the given params
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
The dtable() function has no user in the entire LuCI repo, so drop it.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
This reverts commit ad7dc4a4928e77ae142d0fe040f9e9e64b530e82.
Since we're using liblucihttp now, that library is the appropriate place to
add such decoding helper functions.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Use the liblucihttp provided multipart and x-www-urlencoded body parsers
and drop the old Lua parsing code.
The C based data parsers are way faster than their old Lua counterparts
while producing less string garbage and more correct results.
While refactoring the luci.http.protocol code, also drop unused functions
and dead code, heavily reducing the module size.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Drop the Lua implementation in luci.http.protocol and use the optimized C
variants of liblucihttp instead.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|