Commit graph

136 commits

Author SHA1 Message Date
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
Christian Marangi
938e54df17
treewide: bump PKG_RELEASE for libiwinfo ABI change
Bump PKG_RELEASE for libiwinfo ABI change for rpcd-mod-luci and
luci-mod-status.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-01-23 14:03:10 +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
97da0baeb6 luci-mod-status: transform status page Lua template into ucode template
Transform the only Lua template of the status module into an equivalent
ucode template and make it conditionally include the legacy Lua logic
factored out in a previous commit.

Only if the ucode Lua bridge is installed and loadable, the Lua template
loading the legacy Lua status partials is included.

After this commit, luci-mod-status is free of Lua dependencies.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-25 01:03:37 +02:00
Jo-Philipp Wich
daf7ceebba luci-mod-status: remove uneeded libiwinfo-lua dependency
Since the LuCI status module was rewritten into client side views,
there is no server side Lua processing anymore.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-25 01:03:37 +02: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
Jo-Philipp Wich
98d848917c luci-mod-status: correct nft meta.mark description
Ref: bf175fd51a (commitcomment-66390835)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-02-10 20:44:54 +01:00
Jo-Philipp Wich
bf175fd51a luci-mod-status: add nftables status page
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-02-07 13:24:33 +01:00
Daniel Golle
7eeea43df1
luci-mod-status: display full HE rate information
Associated Stations on the status page should also show full HE rate
information which was added by
commit f35e877dc6 ("luci-mod-network: add 802.11ax HE support")

However, it was only added to the Wireless page and not to the summary
on the Status page. Add it there as well.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-01-07 01:09:48 +00:00
Jo-Philipp Wich
a75ab22e62 luci-mod-status: change "Storage usage" heading to just "Storage"
Also rename `25_diskfree.js` to `25_storage.js` to make naming anologeous
with "Memory" / `20_memory.js`.

Fixes: f09920f21a ("luci-mod-status: add diskfree info")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-11-29 16:01:12 +01:00
Florian Eckert
f09920f21a luci-mod-status: add diskfree info
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-11-25 08:41:48 +01:00
Jo-Philipp Wich
0ad54e4a7c luci-mod-status: disable DSL status if not present
Fixes: #5465
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-10-28 14:46:27 +02:00
Jo-Philipp Wich
b5464a3e60
Merge pull request #5374 from Ansuel/fix-wifi
luci-mod-status: some improvement to wifi status
2021-09-22 13:00:00 +02:00
Paul Dee
2890d1842a luci-mod-status: Add Target Platform (e.g. ath79/ipq806x/etc)
revealed under:
ubus call system board
board.release.target

Useful reminder for what to download

Signed-off-by: Paul Dee <systemcrash@users.noreply.github.com>
2021-09-20 11:08:21 -10:00
Ansuel Smith
085c4a08f5
luci-mod-status: fix wrong logic for maclist adding feature
Currently any new entry added to the black/whitelist deletes the
others. Fix this and improve the rule apply by firstly disconnect
the wifi client.

Fixes: #5343

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-09-18 16:27:00 +02:00
Ansuel Smith
2a97d5533c
luci-mod-status: cosmetic fix for isWPSEnabled in wifi status
Drop isWPSEnabled table as it's really not needed and can directly
included in the network table.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-09-18 16:17:27 +02:00
Florian Eckert
1d26eb4200 luci-mod-status: move index acl into own file
The ACL file luci-mod-status.json is already quite long.
It is also a separate menu item in LuCI, so in my view it makes sense to
move it to a separate file. An additional positive effect is that the
file then becomes clearer.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-09-03 13:25:21 +02:00
Florian Eckert
4e29821a4e luci-mod-status: set default value if no route records found
If no entries for the status tables are available. Then add the
following default entry

'No entries available'

This looks better, because not only the table header is displayed.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-09-03 13:17:24 +02:00
Vladislav Grigoryev
c71dc1cccf luci-mod-status: optimize view/formatting for status/routing
Optimize view and formatting for the status/routing page.
Remove redundant style and header abbreviations.
Consolidate terminology for IPv4 and IPv6 categories.

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
2021-09-01 13:05:59 +03:00
Vladislav Grigoryev
a62a6c0f3b luci-mod-status: merge status/dmesg with status/syslog
Merge "Kernel Log" with "System Log" as an extra tab.
Consolidate logging facilities for more intuitive navigation.

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
2021-08-26 06:15:04 +03:00
Fritz D. Ansel
61425793a7 status: make buffered conditional
when buffered could not be read, there is
just a questionmark (on e8450 non-ubi)

Signed-off-by: Fritz D. Ansel <fdansel@yandex.ru>
2021-08-11 09:25:48 +02:00
Jo-Philipp Wich
57303e6483
Merge pull request #5235 from vgaetera/status-routing
luci-mod-status: status/routing support for pbr
2021-08-09 19:51:09 +02:00
Vladislav Grigoryev
fb7e48b752 luci-mod-status: fix description for luci-mod-status-channel_analysis
Update "modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json".
Fix incorrect description for "luci-mod-status-channel_analysis".

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
2021-08-08 20:34:45 +03:00
Vladislav Grigoryev
5cd9209636 luci-mod-status: status/routing support for pbr
Provide comprehensive status information for routing.
Rename the "Status > Routes" page to "Status > Routing".
Unify sorting for the "Status" and "Network" menus.
Add tabs for IPv4 and IPv6 and reorganize the contents.
Display routing rules and their priorities for each protocol.

Policy-based routing is an increasingly popular problem.
Netifd natively supports policy-based routing:
* The interface-specific options "ip4table" and "ip6table".
* The routing rules using the "rule" and "rule6" sections.
LuCI is missing the information about routing rules.

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
2021-08-07 10:51:38 +03:00
Jo-Philipp Wich
a6d957d6f5 luci-mod-status: disable "Set static" lease action on readonly view
Fixes: f6b6a12927 ("luci-mod-status: add support for one-click static lease")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-07-07 17:15:37 +02:00
Jo-Philipp Wich
e3357deb7d luci-mod-status: don't set '-' hostname when creating static lease
Fixes: #5153
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-06-30 17:26:07 +02:00
Florian Eckert
8f8ce8613f luci-mod-status: switch to html table for wlan channel analysis
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-06-21 12:18:25 +02:00
Lukasz Baj
c6a5c809ed luci-mod-status: fix NaN errors in realtime graphs
When I use Realtime Graphs I see following NaN errors:

    Error: <polyline> attribute points: Expected number, "0,298 0,NaN 5,NaN 10,NaN…".
    Error: <polyline> attribute points: Expected number, "0,298 0,NaN 5,NaN 10,NaN…".
    wireless.js?v=git-21.105.40538-2da37c2:19 Error: <polyline> attribute points: Expected number, "0,298 0,NaN 5,NaN 10,NaN…".
    eval @ wireless.js?v=git-21.105.40538-2da37c2:19
    Promise.then (async)
    eval @ wireless.js?v=git-21.105.40538-2da37c2:8
    step @ luci.js?v=git-21.105.40538-2da37c2:91
    start @ luci.js?v=git-21.105.40538-2da37c2:87
    add @ luci.js?v=git-21.105.40538-2da37c2:82
    pollData @ wireless.js?v=git-21.105.40538-2da37c2:7
    render @ wireless.js?v=git-21.105.40538-2da37c2:24
    Promise.then (async)
    __init__ @ luci.js?v=git-21.105.40538-2da37c2:148
    super @ luci.js?v=git-21.105.40538-2da37c2:22
    Anonymous42Class @ luci.js?v=git-21.105.40538-2da37c2:12
    (anonymous) @ luci.js?v=git-21.105.40538-2da37c2:181
    Promise.then (async)
    compileClass @ luci.js?v=git-21.105.40538-2da37c2:177
    Promise.then (async)
    require @ luci.js?v=git-21.105.40538-2da37c2:183
    instantiateView @ ui.js?v=git-21.105.40538-2da37c2:311
    (anonymous) @ wireless:47
    Promise.then (async)
    (anonymous) @ wireless:46

Signed-off-by: Lukasz Baj <l.baj@celerway.com>
[adjust subject]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-06-09 11:08:36 +02:00
Jo-Philipp Wich
88b9d84388 treewide: consolidate {IPv4,IPv6,MAC} {address,gateway} spellings
- Turn IPv4-Address into IPv4 address
 - Turn IPv4-Gateway into IPv4 gateway
 - Turn IPv6-Address into IPv6 address
 - Turn IPv6-Gateway into IPv6 gateway
 - Turn MAC-Address into MAC address

Also remove related duplicate translation entries.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-06-07 12:48:08 +02:00
Jo-Philipp Wich
3c66c5b165 luci-mod-status: fix potential XSS via specially crafted DNS names
When an upstream NS returns PTR domain names containing HTML, it is
added verbatim to the connection status table.

Prevent this issue by HTML escaping any values in the source and
destination columns.

Fixes: CVE-2021-32019
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-05-12 11:57:21 +02:00
Jo-Philipp Wich
d24e3295f0 luci-mod-status: iptables: always make tab pane visible
When ip6tables is not present, the tab group was not initialized,
causing the iptables status display to be empty with certain themes.

Manually mark the pane active in this case to avoid the problem.

Fixes: #5040
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-05-07 19:16:34 +02:00