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>
Adds PoE/PSE configuration support for modern linux (PSE-PD).
This change is based on the PSE-PD backport (from 6.17)
and netifd|ubus changes.
* Add getPSE() [receive all status information]
and hasPSE() [has the device PSE hardware?]
* Changes ACL permissions to query network.device status information
* Add two new PoE icons (PoE active with link up + link down) for
the port status page
* Changes port status to show PoE information, next to link information
and data transfer.
* Add a new tab for PoE/PSE to the device configuration,
which will only be displayed if the device supports PSE
Signed-off-by: Carlo Szelinsky <github@szelinsky.de>
Bonding is configured under interface properties, and handled by netifd.
luci-proto-bonding was removed, even if the proto-bonding package is still
useful. This change prevents the trace-back from attempting to load
luci-proto-bonding.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This patch adds a badge to the associated wireless stations with the vlan id
and name. It is displayed in the same color as the network, to which it is
bridged, so the color corresponds to the color in the network configuration
page.
Signed-off-by: Tobias Waldvogel <tobias.waldvogel@gmail.com>
Manifests in the console as:
RPCError: RPC call to uci/get failed with ubus code 4: Resource not found
The lazy-loading is harmless and has been that way for years, but the
presence of the trace-back clouds other problems. This should keep the
console cleaner; it conditionally attempts to load wireless when a more
fundamental check for it passes.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit introduces a streamlined method for retrieving lease time
information on IPv6 interfaces.
While IPv4 interfaces typically have a single lease time (available
in the interface data), IPv6 interfaces commonly feature multiple
lease times due to factors like delegated prefixes or multiple /64 subnet.
Users typically receive only one prefix delegation from their ISP, leading
this PR to the retrieval of lease time from the first available prefix
or IPv6 address.
To enhance usability and provide users with a more comprehensive view
of lease time information, however, alternative approaches
should be discussed.
Suggestions include returning an array of lease times or aggregating
the various possible values using methods like min or max.
These enhancements aim to improve the clarity the lease time
management on IPv6 interfaces.
Signed-off-by: hitech95 <nicveronese@gmail.com>
Access Point is the string used on the network wireless setup dialogue.
Use Access Point to report the mode on the network wireless and status
screens.
Signed-off-by: Evan Benn <evan.benn@morsemicro.com>
uci mesh was being displayed as 'Mesh', while iwinfo mesh was being
reported as 'Mesh Point'. Unify those. Update getActiveModeI18n to deal
with all the values iwinfo returns. Fix the incorrect 'Mash'
translation.
Signed-off-by: Evan Benn <evan.benn@morsemicro.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>
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>
For network devices declared in uci but not yet created by netifd, the
runtime status information will be unavailable, causing methods such as
`getType()` to assume plain ethernet interfaces and `getParent()` to fail
resolving parent devices.
Fall back to infer the information from uci configuration settings in such
cases to give accurate type hints to callers.
In particular, this prevents LuCI from turning wireless target networks
containing a to-be-created bridge device into bridges themselves.
Fixes: https://github.com/openwrt/packages/issues/18768
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Only treat the given identifier as Linux netdev name if we can find a
corresponding entry in the device info cache and do not consider strings
starting with "wlan", "ath" or "wl" to be existing devices.
This fixes incorrectly adding wireless sections as ifnames to network
interfaces when the wifi-iface section name begins with one of the
`iface_patterns_wireless` patterns.
Fixes: #5069
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
When removing a `config interface` section in `/etc/config/network`, drop
related `rule` and `rule6` sections too, as well as related `dhcp` sections
in `/etc/config/dhcp`.
Ref: https://forum.openwrt.org/t/grooming-etc-config/109764/7
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Add the known values returned for 802.11ax HW as well as HT modes to the
respective method descriptions.
Signed-off-by: David Bauer <mail@david-bauer.net>
This commit adds the ability to configure HE-modes for radios
(HE20 / HE40 / HE80 / HE160) as well as HE rate information in the
assiciation view.
Tested-on: Ubiquiti UniFi 6 Lite / LR
Signed-off-by: David Bauer <mail@david-bauer.net>
Update frontend JS code which uses luci-rpc getHostHints to support the new
response format which removes the `ipv4` and `ipv6` host hint string fields
and replaces them with `ipaddrs` and `ip6addrs` weighted string list fields.
Signed-off-by: Niels Widger <niels@qacafe.com>
[rework code to be forwards/backwards compatible, fix some Network.Hosts
methods, fix IP choice ordering, change commit subject, rewrap commit
message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Use the newly introduced devtype attribute for more robust network device
type detection. This also allows us to easily recognize DSA ports.
Furthermore, synthesize VLAN devices declared by uci bridge-vlan sections,
similar to how it is done for legacy swconfig switch_vlan ones.
Finally implement a new Network.Device.getParent() method to use the newly
available "parent" attribute to resolve the base device of DSA ports or
VLAN devices.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Iterate through VLANs to get the clients connected on configured wifi
VLANs (as configured by `wifi-vlan` sections in `wireless` configuration).
This is a minimum support for VLANs on wireless network. The VLAN name is
nowhere displayed, but at least clients using VLANs are visible.
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
- 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>
Currently relay.js is included in any case even if
the router doesn't have the needed package to use it.
Fix this by checking if the system has this feature.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>