Age | Commit message (Collapse) | Author |
|
To complete the previous commit these functions are defined in the resulting
luci-base package but are also used in the new luci-base-libs package. So
move them into the new xml-module of the new package.
Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de>
|
|
The new package luci-base-libs provides the modules that not strictly relate
to the web-interface of luci. By separating these libs they can be used by
other packages without having to install the web-components.
This change was inspired by providing a shell-only interface for 4MB-flash
devices, by keeping as much code common with a full install.
Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de>
|
|
Support for sysauth_template was (inadvertently) dropped in refactorings
to support the json menu construction. This does not restore that
functionality, which allowed different templates for every node in the
dispatcher tree, but provides an alternative mechanism that allows a
theme to provide a sysauth.htm template file instead.
Tested-by: Karl Palsson <karlp@etactica.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Template strings have no associated name, which led to an attempt to
concat nil with a string when formatting the error message in case of
exceptions.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Update timezone data to 2020a
http://mm.icann.org/pipermail/tz-announce/2020-April/000058.html
2020a:
Morocco springs forward on 2020-05-31, not 2020-05-24.
Canada's Yukon advanced to -07 year-round on 2020-03-08.
America/Nuuk renamed from America/Godthab.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
|
|
Ref: https://github.com/openwrt/luci/issues/3937
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>
|
|
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>
|
|
Fixes: #3873
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>
|
|
Without the trailing slash, probing endpoint availability will fail.
Fixes: 529bde440 ("luci-base: make rpc webserver path configurable")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
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>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
A variable clash led to declarative `fs` dependencies being ineffective.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Fixes: #3585
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
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>
|