validation:
use correct argument position for apply
network:
spec.need_tag -> port.need_tag agrees with old lua compat
widgets:
rv.length is undefined, use firstChild
form:
Follow-up to 315dbfc749
checkDepends recursion fix and implement cache lookup
uci:
improve timeout and Promise handling
ui:
follow-up to 92381c3ca2
renderListing sort: put directories first
getActiveTabId: check isNaN for tab state
getScrollParent: fix evaluation logic
fadeOutNotification: implement immediate timeout
openDropdown: accelerate draw via getBoundingClientRect
form:
ensure FlagValue parse always resolves
fs:
parse all 'expect' keys in RpcReply
luci:
Use the same source of truth in both the check and the dispatch
for flushRequestQueue
string check for dom string additions
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
prevent global variable bleed and reduce size somewhat
-cbi
-network
-protocol/static
-rpc
-tools/widgets
-tools/views
-uci
protocols
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
mandate proper firewall compliant zone names. Use
validation ucifw4zonename instead of uciname. The former
does not permit leading digits which
Now we only permit "*" if flags .allowany and .nocreate are
set. This is when the widget is used to select pre-existing
zones and the zone 'any' ("*") is added as a .value.
Creating a zone named "*" shall not be allowed.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This widget is modeled after CBINetworkSelect, which is similar in nature.
It presents a dropdown box of all device IPs with an accompanying badge of the
device.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Returning a device via getDevice() doesn't work out for tunnel configs,
like wireguard-wg0. Its dev property (for determining dev.getType()) is
always empty, but device is 'wireguard-wg0' and network is 'wg0'.
getDevice() returns an instantiated prototype which is not up, defeating
the purpose of querying its 'up' status.
When dealing with firewall zones and device widgets, what's interesting
is the dev. And getL3Device() is intended for this.
This effectively reverts commit f17ae7fd96
which attempted to address the problem of 'up' status; now calls via
getL3Device() get the correct up status.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Clear, crisp, resolution independent vector graphics replace the trusty
microscopic PNG. Some minor CSS changes were needed to constrain images
in some locations to make sure they don't consume too much space.
Iconography taken from Mate desktop theme with minor adjustments:
https://github.com/mate-desktop/mate-icon-theme/
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
follow-up fix for 0be4ad51a0
It seems to have been this way for a while, for zone selections
involving the 'any' ('*') choice. firewall forwards.js has no
'this.allowany;' property on the widgets, so the any choice is absent,
leading to a traceback, caused by the 'src' widget, even though
this code block operates on the 'dst' value. Certain combinations of
'src' and 'dst' also triggered tracebacks.
This might not be the correct behaviour for this widget, but it does
prevent tracebacks caused by null values.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Tunnel devices which are up, show as down, since they don't have access
to any device status. The 'device' being enumerated is e.g.
'wireguard_wg0', a configuration for a tunnel interface, whose parent
is an 'ethernet' type.
That's a bug for another day. So they shall get parent device status.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
removes a075566dbb (and subsequent fixes)
enforcing a datatype on this widget generates the following error when
multiple zones are selected:
Expecting: valid UCI identifier
(the error triggered for uciname). At its simplest: multiple selections
are no longer just a uciname, but multiple thereof.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Refactor various sort operations throughout luci-base to use the new
L.naturalCompare() comparator function.
This primarily ensures that embedded numbers are sorted numerically and
not in a lexicographical way.
It also simplifies some code as a side effect.
Ref: #5899
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Support the "loopback" interface by "widgets.NetworkSelect".
Enable the "loopback" option to include this interface.
Can be used to configure interface binding for services.
Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
- Set src/dest defaults only in initial section create state, otherwise it
is impossible to specify output rules
- Get rid of dest_remote/dest_local widget switching and implement change
logic directly in tools.widgets.CBIZoneSelect
- Remove leftover debug code
Ref: https://github.com/openwrt/luci/issues/2889
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Add a tools.widgets library which bundles a number of useful, higher
level CBI widgets like firewall zone list or network interface dropdowns
Signed-off-by: Jo-Philipp Wich <jo@mein.io>