Age | Commit message (Collapse) | Author |
|
Currently the ubus path that provide the webserver is hardcoded to be /ubus.
Change this to make it configurable from the luci config file.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
When testing the luci-rpc authnetication, avoid clobbering the HTTP
post request body.
Fixes: #3470
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Refactor the dispatch logic to operate on the internal JSON representation
of the menu tree.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Introduce a new method menu_json() which converts the current dispatch
tree into JSON structure.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
This allows using luci.sys without installed luci.model.network class.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Introduce two new properties for page nodes to allow for declaratively
specifiying system dependencies which is useful to e.g. make certain
views depend on specific uci values or the presence of certain files.
The recognized properties are:
- `uci_depends` - a nested table in one of the following forms:
1) `{ config = { section = { option = "exact_value" } }`
2) `{ config = { section = { option = true } }`
3) `{ config = { section = "exact_type" } }`
4) `{ config = { section = true } }`
5) `{ config = true }`
Depending on the declaration, the uci option or section type must either
match the given "exact_value" or "exact_type" values or be a non-nil value
in case boolean "true" is specified.
- `file_depends` - a flat lists of file paths that must be accessible
If a path listed in `file_depends` points to a directory, that directory
must be not empty, otherwise it suffices if the path exists.
Examples:
- Only display the node if an /etc/config/wireless file exists with
a "config wifi-device radio0" section.
node = page(...)
node.uci_depends = { wireless = { radio0 = "wifi-device" } }
- Only display the node when swconfig is installed.
node = page(...)
node.file_depends = { "/sbin/swconfig" }
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
The dispatcher failed to propagate the child target post security
requirements to the arcombine() dispatch target so far - fix this
by recursively testing the post security requirements.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Update timezone data to 2019c
http://mm.icann.org/pipermail/tz-announce/2019-September/000057.html
2019c:
* Fiji observes DST from 2019-11-10 to 2020-01-12.
* Norfolk Island starts observing Australian-style DST.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Remove the old server side support for file browsing and file uploading
and switch to a client side widget instead which uses XMLHTTPRequests to
upload files via cgi-io and RPC calls for file listing and status queries.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Instead of granting complete ubus access under the active sysauth session,
implement the ubus-rpc authorization mechanism and make the ubus proxy
endpoint unauthenticated.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
There is always more vpn services. To make the LuCI menu look cleaner, a
new top level menu "VPN" will be added with this commit. All luci-app-*
that have something to do with VPN should move to this new menu entry.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
|
|
Restore the old CBI behaviour of not automatically rendering empty
selection choices in ListValue select dropdowns when .rmempty is
specified.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
In the dc0211803e commit, the parameter "multi" in ui.js is
replaced with "multiple" everywhere. Thus, it must also be changed
in the cbi templates.
Fixes: dc0211803e
Signed-off-by: Anton Kikin <a.kikin@tano-systems.com>
|
|
Fixes: 9c7eb1dec ("luci-base: switch from server side to client side widget markup")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fixes: 2a229e50c ("luci-base: fix cbi mvalue templates")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fixes: 9c7eb1dec ("luci-base: switch from server side to client side widget markup")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
system-wide: fix escaping of magic chars
|
|
Properly handle ubus POST requests exceeding the default chunk size
and fix a possible nil dereference when rejecting incoming requests
due to bad JSON message framing.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Do not render standard widgets like checkboxes, select boxes,
text input fields etc. on the server side anymore but utilize
the ui.js primitives instead.
This avoids logic duplication between server side cbi templates
and JS widgets in the future.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Introduce a new view() target for CBI dispatch nodes, as long with the
required template and plumbing work in luci.js to allow requiring view
classes.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Add an admin/ubus route mimicking the native uhttpd-mod-ubus protocol.
The main difference to the native protocol is that this gateway requires
no additional per-object/procedure ACL setup on the router side and that
it is located under the same prefix as LuCI itself, allowing the reuse
of the session login cookie.
This route is meant to be a transitional mechanism until client side
RPC calls are eventually migrated to uhttpd-mod-ubus completely.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fixes openwrt/luci#2624
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
|
|
Fixes openwrt/luci#2624
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
|
|
Update timezone data to 2019b
http://mm.icann.org/pipermail/tz-announce/2018-December/000055.html
http://mm.icann.org/pipermail/tz/2019-July/028249.html
2019a:
* Palestine "springs forward" on 2019-03-30 instead of 2019-03-23.
* Brazil no longer observes DST.
2019b:
* Palestine's 2019 spring-forward transition was on 03-29, not 03-30.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
|
|
* fix escaping of magic lua chars (#2800)
* fix redundant second gsub line in shellstartsqescape function
* fix return value of shellstartsqescape function
Signed-off-by: Dirk Brenken <dev@brenken.org>
|
|
Modify the process status filter to allow also the processes
with a nice value to be visible on the Status/Processes page.
Filter out the top process itself.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
|
|
* fix for openwrt/packages#9148
Signed-off-by: Dirk Brenken <dev@brenken.org>
|
|
Currently only the dnsmasq lease file is read for hostname hint. If someone use only odhcpd as dhcp daemon the hostname resolution on wifi_assoc list is broken.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
|
Move duid_to_mac function from status.lua to sys.lua.
Implement translation from DUID-LL without header to MAC
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
|
luci-base: drop ipv6 lease status when IPV6 is not support
|