Commit graph

135 commits

Author SHA1 Message Date
Jo-Philipp Wich
fa6c345e19 luci-mod-status: fix sporadic logical interfaces resolve failures
Correct the incorrect netmask calculation logic leading to incorrect
network range comparisons in some cases.

Fixes: #6956
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2024-03-04 23:57:05 +01:00
Thomas Schröder
6b0953af64 luci-mod-status: BUGFIX: routes: help strings to clarify column titles
Adds a missing closing bracket.

Signed-off-by: Thomas Schröder <tschroeder_github@outlook.com>
2024-02-18 18:53:10 +02:00
Paul Donald
2abc93c6e8 luci-mod-status: routes: help strings to clarify column titles
Signed-off-by: Paul Donald <newtwen@gmail.com>
2024-02-17 17:55:38 +01:00
Ramon Van Gorkom
eb6b2bdaae luci-mod-status: Adding scroll buttons on syslog and kernellog status pages
Signed-off-by: Ramon Van Gorkom <Ramon00c00@gmail.com>
2024-02-11 21:05:10 +01:00
David Härdeman
9116a93d43 luci-mod-network: put each IPv6 address on a separate line
Right now, when there's active DHCPv6 leases and more than one address per host
(e.g. because ULA is used together with GUA prefixes), the two IPv6 addresses
will be printed on one line (which may or may not get broken up depending on
the length of the addresses, which also looks inconsistent).

Putting each address on a separate line makes it much easier to read the
addresses (IMHO).

Signed-off-by: David Härdeman <david@hardeman.nu>
2024-02-08 02:07:49 +01:00
Paul Donald
8b651996ff
Merge pull request #6723 from knarrff/channel_analysis__base-channel
luci-mod-status: highlight primary 20 MHz channel
2023-12-18 00:21:01 +01:00
Frank Löffler
008c1cf356
luci-mod-status: channel_analysis: use svg grad
Instead of using a second, semitransparent quadliteral of the
same station color to highlight the main 20 MHz channel of a
station with a bandwidht wider than 20 MHz, use a semitransparent,
black svg gradient with the same shape and size.
This has the benefit that it is harder to mistake for a second,
overlain station.

The gradient is black because this way it can be reused for
all stations, instead of having to create a separate one for
each station color.

Signed-off-by: Frank Löffler <frank.loeffler@uni-jena.de>
2023-12-10 22:54:02 +01:00
Frank Löffler
aa06da6aa6
luci-mod-status: channel_analysis: correct VHT 20/40 MHz center channels (#6728)
* luci-mod-status: add missing vht40 channels

As of now, channel_analysis is missing 40 MHz VHT channels. 
What it does for those right now is
display them as 20 MHz channels (both in the plot and the table below),
but it uses the center frequency of the 40 MHz channel, which means
their (wrong) 20 MHz band in the plot is offset by 2.

This fixes #6419. Note that this only occurs for **other** stations.
The code for local_wifi is different and already complete.

Signed-off-by: Frank Löffler <frank.loeffler@uni-jena.de>
2023-12-07 14:33:28 +01:00
Christian Marangi
f1db42e670 luci-mod-status: add ACL entry for storage index
Add missing ACL entry for storage index page.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>

luci-mod-status: expand storage index page with mount points

Expand storage index page with mount points. For custom mounts point we
use the device name and we reference the mount point between ().

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>

luci-mod-status: ensure each storage getMountPoints result is unique

Signed-off-by: Paul Donald <newtwen@gmail.com>

Closes #2767
2023-12-07 00:15:33 +01:00
Paul Donald
706668243b
Merge pull request #6295 from jjm2473/patch-1
luci-mod-status: fix iptables jump on argon theme
2023-12-04 03:44:10 +01:00
Frank Löffler
66a00ed8e4
luci-mod-status: highlight primary 20 MHz channel
As of now, channel analysis highlights the complete frequency spectrum of a base station (all channels used by the station, which might be more or fewer depending on channel bonding). This means in particular, that in the plot, a station at one main channel might look identical to another station at a different channel, because both might use the same bonded channel spectrum.

One such example is two 80 MHz stations on channels 100 and 108 respectively: both will be plotted from channel 100 up to 115, as both will use those those 80 MHz. This is not incorrect, but it makes it more difficult to see which station is really where, as they might as well switch back to 20 or 40 MHz at times, or for different clients, and where they are then is currently not visible in the plot.

This patch adds another trapez to the plot at the main 20 MHz channel of a station, with width 20 MHz, in case the station uses a wider general width. This is visible, because those polygons are partially transparent. It also moves the x-position of the label to the main channel of the station (which now is marked: this would have looked odd before).

This does not highlight the primary 40 MHz channel for 80 MHz channels and wider. It should be possible be compute this from the knowledge in luci of the primary 20 MHz channel, the center channel and the bandwidth, assuming ac logic, but I decided against adding it, to keep the plot less cluttered.

Signed-off-by: Frank Löffler <frank.loeffler@uni-jena.de>
2023-11-27 08:19:55 +01:00
Jo-Philipp Wich
0b8f8ab075 luci-mod-status: nftables.js: fix translation of iif expression
Fixes: https://github.com/openwrt/openwrt/issues/14003
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-11-19 00:58:08 +01:00
Jo-Philipp Wich
9d5e205b66 luci-mod-status: 29_ports.js: mute zone colors for disconnected ports
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-11-02 15:29:16 +01:00
Jo-Philipp Wich
0bf5e5ca06 luci-mod-status: 29_ports.js: handle devices without speed indication
Use carrier state to distinguish connected/no link states and simply
print "Connected" if no speed indication is available.

Fixes: #6663
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-10-31 23:54:55 +01:00
Jo-Philipp Wich
25dd8934f1 luci-mod-status: protect against infinite recursion in port status
When attempting to resolve VLAN devices, protect against potential deep
recursion due to invalid bridge configs referencing themselves.

Fixes: #6648
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-10-25 23:16:13 +02:00
Jo-Philipp Wich
603992560c luci-mod-status: persist sorting of DHCP lease status tables
Add an ID attribute to the dynamically generated lease status tables to
persist row ordering choice across reloads.

Fixes: #6640
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-10-19 23:46:03 +02:00
Andre Heider
318ef4c83f luci-mod-status: add support for the 6g band
Enable support for the 6GHz band now that the code supports it. For that it
just needs to be added to the "bands" object.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2023-09-18 13:40:34 +02:00
Andre Heider
31d7943bcd luci-mod-status: only add infos if the band matches
This prevents adding entries to mismatching bands when a channel
number exists on more than one band.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2023-09-18 13:40:34 +02:00
Andre Heider
9f8a553d19 luci-mod-status: reuse the already provided band info
iwinfo already provides the band information with every channel, so just
use that instead.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2023-09-18 13:40:34 +02:00
Liangbin Lian
2ca117c5a6
luci-mod-status: fix iptables not showing comments
Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
2023-09-05 14:26:33 +08:00
Jo-Philipp Wich
ed059e4cd3 luci-mod-status: 29_ports.js: attempt to use getBuiltinEthernetPorts
Try to use the new luci/getBuiltinEthernetPorts RPC call to enumerate known
ports and fall back to manual board.json parsing if the call is unavailable
yet. The fallback code will be dropped in a while when everything settled.

Ref: #6534, #6538
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-08-24 16:49:30 +02:00
Jo-Philipp Wich
0ea74956c9
Merge pull request #6490 from Ansuel/improve-chan-grap 2023-08-03 17:09:36 +02:00
Christian Marangi
69a8e4a98d luci-mod-status: improve channel graph for 5GHz radio
Improve channel graph for 5GHz radio by using dotted lines to identify
the intermediate channel, full line to identify the different channel
band and bold line to identify the different section of the wifi
channels.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-07-30 23:09:59 +02:00
Christian Marangi
6d722ccdae luci-mod-status: fix wrong position of channel for 5GHz radio
Channel tag for 5GHz radios is wrong and is confusing for any user
that wants to better identify the used channel from the graph.

Add some additional logic to better position the channel tag.

Fixes: #6419
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-07-30 23:09:59 +02:00
Jo-Philipp Wich
00a941e618 luci-mod-status: gracefully handle missing port stats
Ref: cba58fcafb (commitcomment-123043170)
Fixes: 4e46624817 ("luci-mod-status: introduce ethernet port status view")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-07-29 22:03:31 +02:00
Jo-Philipp Wich
4e46624817 luci-mod-status: introduce ethernet port status view
This commit adds an ethernet port status overview to the main status page.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-07-27 13:07:26 +02:00
Milad Mohtashamirad
03f1684059 luci-mod-status: channel_analysis.js: fix stale scan result.
When the new result is empty, including when another scan is running in the background, the table was emptied, but the graph persisted.
With this change, the list will persist and missing APs will be shown faded.

Signed-off-by: Milad Mohtashamirad <miladmohtashamirad@gmail.com>
2023-07-07 11:14:28 +10:00
Liangbin Lian
db543b5fed luci-mod-status: fix iptables jump on argon theme
Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
2023-03-17 16:38:15 +08:00
Ingo Heinrich
8c7c56f4e4 luci-mod-status: nftables add counter and comment for empty match
Signed-off-by: Ingo Heinrich <ingo-github@goheinrich.de>
2023-03-04 12:17:50 +01:00
Jan Hoffmann
e3950b5eeb luci-mod-status: reduce DSL information shown in overview.
As there is now a page in luci-mod-dsl that shows detailed DSl status,
it is no longer necessary to have the entire information in the overview
page. Only show the most important data on the overview instead.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
2023-02-09 22:33:55 +01:00
Jo-Philipp Wich
b8f91d53b4 luci-mod-status: nftables.js: remove unused fwtool require
Fixes: #6203
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-02-07 10:13:26 +01:00
Jan Hoffmann
2f1c6fa7a1 luci-mod-status: extend DSL metrics
Add the following metrics:

- Bitswap and rate adaptation status
- Impulse noise protection (INP)
- Retransmission status (G.INP)
- Channel error counters (CV-C, FEC-C)
- G.INP counters (MINEFTR, LEFTRS, rtx-tx, rtx-c, rtx-uc)
- Modem chipset and firmware version

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
2023-02-03 19:31:21 +01:00
Jan Hoffmann
08f2312abf luci-mod-status: rename some DSL status items
Fix some small inaccuracies and inconsistencies between items.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
2023-02-03 19:30:58 +01:00
Jan Hoffmann
06724c5a9c luci-mod-status: group DSL metrics into sections for more readability
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
2023-02-03 19:21:10 +01:00
Jan Hoffmann
1d43b7b725 luci-mod-status: improve handling of DSL metrics that are not available
Currently, non-existing values (null or undefined) are formatted like
zero values. Add explicit handling to allow the user to distinguish
between those and actual zero values.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
2023-01-28 19:13:30 +01:00
Florian Eckert
025d8e79ba luci-mod-status: add missing cbi-section class to routing view
With the material theme, there is a gap between the tab view and the
content. The css class 'cbi-section' is missing here in the data-tab div.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2023-01-26 10:38:56 +01:00
Kevin Darbyshire-Bryant
a18b1a6bea luci-mod-status: fix neighbour display
The neighbour display parses the output of 'ip -4 neigh show' e.g.

192.168.219.95 dev eth1 lladdr 38:b4:d3:c9:b2:0c REACHABLE
192.168.219.200 dev eth1 lladdr 04:c4:61:12:f2:d2 STALE

Using regexp /^([0-9a-f:.]+) (.+) (\S+)$/  Unfortunately there's a
space character that sneaks in at the end of line, so let's make this
less brittle by accepting lines that may end with spaces e.g.

/^([0-9a-f:.]+) (.+) (\S+) *$/

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2022-12-30 12:51:53 +00:00
Christian Marangi
307e385ba1
luci-mod-status: handle HE channel width for channel_analysis
Handle HE channel width for channel analysis status page and correctly
draw local interface band width.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-12-23 19:28:07 +01:00
Christian Marangi
54f5b171bc
luci-mod-status: fix channel_analysis ReferenceError: diff is not defined
In refactoring the code there was an error and the sort function wasn't
correctly reworked with diff not correctly dropped.

Drop that and correctly sort the WiFi ap if the channel is different.

Fixes: 75dcb09754 ("luci-mod-status: improve channel_analysis page")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-12-23 19:19:26 +01:00
Jo-Philipp Wich
a27d2dbc32 luci-base, luci-mod-status: expose LuCI version via ubus
Instead of scraping the LuCI version from Lua sources, fetch it via ubus
in order to be independent from the Lua runtime.

Fixes: #6154
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-12-17 15:01:46 +01:00
Jo-Philipp Wich
bad783a6d2 luci-mid-status: nftables.js: minor cleanups and enhancements
- Recognize `log` expression as action
 - Recognize `meta time` expression
 - Remove debug tooltip from `reject` targets

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-12-13 23:49:11 +01:00
Ansuel Smith
75dcb09754 luci-mod-status: improve channel_analysis page
Many user complained problem with using pool with wifi scan. This comes
from the limitation that some wifi driver have problems with scanning
nearby wifi and keeping traffic.

Fix this by doing the wifi scan only one time on page load and provide a
button to refresh the channels manually. The original implementation is
preserved as the user can simply reenable the poll referesh from the ui.

While at it also sort the table by channel instead of by signal quality
to better track the most used channels in the table.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[rewrap commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-12-13 23:30:53 +01:00
Jo-Philipp Wich
b5f11bf6ee luci-mod-status: fix determining DSL modem type
The `network.getDSLModemType()` function returns a promise, so handle it
accordingly.

Fixes: 45ab2cd6be ("luci-mod-status: use network.getDSLModemType()")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-22 15:46:47 +02:00
Andre Heider
45ab2cd6be luci-mod-status: use network.getDSLModemType()
This matches what luci-mod-network does for the DSL modem configuration.

Since this is based on a common uci config, it may also prevent issues as
fixed with 111c551c "luci-base: fix DSL feature detection" in the future.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2022-10-21 09:08:13 +02:00
Kevin Darbyshire-Bryant
6a03a88430 luci-mod-status: nftables.js: correct icmp display
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2022-09-18 09:11:14 +01:00
Alexander Georgievskiy
88c62fe218 luci-mod-status: nftables.js: fix OOM on big nftables IP sets
Signed-off-by: Alexander Georgievskiy <galeksandrp@gmail.com>
2022-07-05 15:00:38 +03:00
Jo-Philipp Wich
2f80fe3767 luci-mod-status: hide iptables firewall status when nft is present
Do not expose the iptables status page as menu item when nftables is present
on the system. Instead add a warning banner to the nftables status page
directing the user to the hidden iptables status page when we encounter
legacy rules on the system.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-04-27 13:19:48 +02:00
Jo-Philipp Wich
f2f7e0c1f7 luci-mod-status: nftables: add translations for further expression kinds
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-04-27 12:19:13 +02:00
Max S Kash
8a46648e5b luci-mod-status,mod-network: Added fqdn-name to DHCPv4 lease table
Added code to display fcdn-name in DHCPv4 lease table.
(based on code in DHCPv6 lease table)

Signed-off-by: Max S Kash <asukms@ya.ru>
Indentation adjused and wrapped commit message
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-03-28 09:52:05 +02:00
Jo-Philipp Wich
e6f21f84ca luci-mod-status: nftables.js: align flow expr workaround with upstream
Ref: https://git.netfilter.org/nftables/commit/?id=160d44c91113849b9c09f6bbad159e10ded1ca54
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-02-10 20:52:34 +01:00