259 Commits

Author SHA1 Message Date
Eamon Xiong
006643dcb3 luci-mod-status: show DHCPv6 stats as tooltip
Changes DHCPv6 statistics display to tooltips in IPv6 Upstream network interface boxes.

Signed-off-by: Eamon Xiong <eamonxiong@gmail.com>
2025-12-13 17:08:37 +01:00
David Härdeman
110aec09d0 luci-mod-status: Host -> Hostname in DHCPv6 table
The DHCPv4 table already calls it "Hostname", and so do the DHCPv[46]
tables in luci-mod-network, so rename this one as well for consistency.
Note that "Hostname" is already used elsewhere, so this shouldn't cause
translation issues (I think).

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-12-09 12:34:19 +01:00
Paul Donald
dd1ede16a0 luci-mod-status: add odhcp6c stats to network include
Provides odhcp6c statistics of DHCPv6 request and response traffic,
for dhcpv6 client interfaces only.

This appends to IPv6 Upstream network interface boxes:

DHCPv6 solicit: x pkts
DHCPv6 advertise: x pkts
DHCPv6 request: x pkts
DHCPv6 confirm: x pkts
...

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-12-08 15:02:53 +01:00
Paul Donald
2decd522de luci-mod-status: ES6 network panel refactor
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-12-08 15:02:45 +01:00
David Härdeman
790d58e4e6 luci-mod-network,-status: expose DUID/IAID for DHCPv4
We already show the DUID in one table (in the overview), this makes the
tables under the "DHCP > Leases" tab consistent with the overview, and
exposes the DUID/IAID in both.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-12-03 13:36:29 +01:00
David Härdeman
70d89764e3 luci-mod-network,-status: expose the lease interface
This adds support to LuCI for showing the interface which a given lease
corresponds to (assuming that odhcpd is providing the DHCPv4/6 services,
which the code also checks for).

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-12-03 13:36:29 +01:00
David Härdeman
d2e0f88618 luci-mod-status: fix table headings
Shorten the lease time description (the header of the tables already
says it contains DHCP leases, so "Remaining Time" is enough), make it
clear that we have DHCPv4/6 leases and not DHCP/DHCPv6 leases.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-12-02 22:54:52 +01:00
Tokisaki-Galaxy
63d55a7ec1 luci-mod-status: Fix legacy rule detection false positive
Refine legacy rule detection to avoid false positives generated by the
iptables-nft compatibility layer on fw4 systems.

The logic now prioritizes `iptables-legacy-save` for accuracy, while
retaining `iptables-save` as a fallback to ensure backward
compatibility with fw3.

Signed-off-by: Tokisaki-Galaxy <starmaster@outlook.sg>
2025-11-25 21:55:25 +01:00
David Härdeman
6cb0bebf5f luci-mod-status: improve detection of static cfg
Note that "duid" from UCI can be *either* "<DUID>" or "<DUID>%<IAID>",
so update the code to handle both cases.

Also, make sure the "Reserve IP" button is disabled if the "duid" is
unknown (can only happen if dnsmasq is responsible for DHCPv6) and that
DUIDs/IAIDs are always rendered in lowercase in the UI.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-11-18 23:24:22 +01:00
David Härdeman
4a651d591b luci-mod-status: optional MAC for static lease
Note that we might not have a MAC address to set in case of a DHCPv6
lease when the DUID is of a type which isn't MAC-based.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-11-18 23:24:22 +01:00
David Härdeman
a345e036c1 luci-mod-status: store static DHCPv6 lease DUID as list
Multiple DUIDs can be defined for one static lease, and using an
"option" instead of a "list" in UCI is legacy, so store the DUID as a
list for correctness.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-11-18 23:24:22 +01:00
Paul Donald
8c2b57588b luci-mod-status: ES6 treatment
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-11-12 17:23:35 +01:00
Paul Donald
cbd1b7a19a luci-mod-status: hide disabled interfaces and show SSIDs
This reduces the amount of data polled for inactive entities.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-11-12 16:59:39 +01:00
Paul Donald
ade026366e luci-base: fix i18n string in luci-mod-status wireless
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-11-09 15:41:52 +01:00
Paul Donald
14b56c75f8 luci-mod-status: ES6 treatment, hide disabled radios and SSIDs
This reduces the amount of data polled for inactive entities.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-11-09 15:41:51 +01:00
Paul Donald
a8f18e7e23 luci-mod-status: use the (upper case) return value when stashing the DUID
Closes #8056

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-11-02 02:27:35 +01:00
Paul Donald
473df3b6dd luci-mod-status: dhcp; ES6 refactor, and a bugfix for the duid host element
Sometimes duid can be an array in the leases tab, since odhcpd takes an array.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-29 22:42:16 +01:00
Paul Donald
bc900b5d1c luci-mod-status: DHCP; properly handle lease creation with DUID & IAID
Closes #8041

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-27 16:51:00 +01:00
David Härdeman
85cb4bbd82 luci-mod-status: support DUID%IAID for static leases
Add support for creating DUID%IAID style static leases in luci-mod-status.

Also, this contains a bugfix. lease.ip6addrs[i] is a string of the format
"<ipv6addr>/128", which validation.parseIPv6() doesn't like (it expects an IPv6
addr without the "/128" suffix).

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-10-24 20:23:34 +02:00
David Härdeman
0a8a41f4cf luci-mod-network,-status: update DHCPv6 lease headers
Make it clearer that a single DHCPv6 lease can encompass several IPv6
addresses, e.g.  when GUA and ULA prefixes are available.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-10-24 20:23:34 +02:00
Andy Chiang
0563adb234 luci-app: fix translation strings
The current handling method introduces extraneous spaces into the translations.
For instance, 'System Log', which is correctly translated to Japanese as 'システムログ' (without extra spaces), is being displayed as 'システム ログ' under the current approach.
Other CJK/Southeast Asian languages are experiencing similar issues, including Chinese, Thai, and Lao.
Therefore, these elements should be translated together as a single unit, rather than separately.

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2025-10-23 00:16:35 +02:00
Paul Donald
3aefa56473 luci-mod-status: routes: prevent null error if the commands don't resolve
Closes #8026

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-22 01:22:04 +02:00
Paul Donald
6e263428bd luci-mod-status: partial revert of styling changes
follow-up to 788e47034b

Some of the CSS changes have knock-on effects and change behaviour in
other display areas, especially when the CSS is minified.

Simplified to change between label flavours on hide/show status.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-21 16:25:47 +02:00
Andy Chiang
f83fe35dae modules: fix default values
fix default values for luci-base and luci-mod-{dashboard,status,system}

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2025-10-21 16:12:03 +02:00
Paul Donald
b59e51a831 luci-mod-status: update syslog viewer to use the remodeled CBILogreadBox
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-20 21:11:11 +02:00
Paul Donald
523b3ea372 luci-mod-*: initialize default values
follow-up to
e67465da5e
b0004ad39c
71ea35fc7f

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-20 21:10:54 +02:00
Andy Chiang
e67465da5e luci-mod-status: use localized time
use localized time

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2025-10-20 20:40:46 +02:00
Andy Chiang
edb481a1ac luci-mod-status: remove redundant spaces
remove redundant spaces in nftables.js.

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2025-10-20 14:52:28 +02:00
David Härdeman
6f7fdff041 luci-mod-status: remove superfluous argument
As part of the commit adding MAC vendor identification (PR #7931), and
subsequent fixups, parseRoutes() grew an unused macs argument.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-10-16 01:24:42 +02:00
David Härdeman
50abd15e88 luci-mod-status,-network: remove checkUfpInstalled
Right now, the checkUfpInstalled RPC call is performed first, and only after
that can the other Promises be called. Simplify this by adding a single check
for /usr/sbin/ufpd in the rpcd ucode, and replace calls to checkUfpInstalled()
with simple L.hasSystemFeature('ufpd') check (which is only done once, and
cached).

This also allows the 'stat' permission to be removed from a couple of acls.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-10-16 01:24:42 +02:00
Paul Donald
3ed815fe4a luci-mod-status: handle ct helpers in nftables
These appear when modules such as the following are installed:
-kmod-nf-nathelper
-kmod-nf-nathelper-extra

They render as e.g.:

 Utilise *ftp* conntrack helper

when fw4 rules similar to the following exist

```
table inet fw4 {
        chain helper_lan {
                tcp dport 21 ct helper set "ftp" comment "!fw4: FTP passive connection tracking"
        }
}
```

ht @dave14305 for the working code diff

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-15 15:23:22 +02:00
Andy Chiang
f3bacd45ad luci-mod-status: fix ipv4 source
ipv4 source in json is prefsrc not src

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2025-10-14 00:03:45 +02:00
Paul Donald
40232e89ff luci-mod-status: routes; refactor and add routesj page for ip -j output
follow-up fix to 89ae891462

fs depends here should be OR, not AND :)

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-13 20:28:06 +02:00
Andy Chiang
a773103476 luci-mod-status: fix luci-bwc segfault
fixes: #8008

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2025-10-13 14:04:11 +02:00
Paul Donald
ad6591fb4b luci-mod-status: routes; refactor and add routesj page for ip -j output
follow-up fix to 89ae891462

Should not have duplicate keys

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-12 19:51:29 +02:00
Paul Donald
89ae891462 luci-mod-status: routes; refactor and add routesj page for ip -j output
Refactor functions and variables to ES6 standard.

Detect whether one of the JSON enabled ip variants is installed, and
prefer it to display route information over the text handling. This is
handled by the acls and menu depends.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-12 19:43:57 +02:00
Paul Donald
cbaeb5e300 luci-mod-status: handle vmaps in nftables
- Support vmaps
- Support goto, continue actions
- Recognize DSCP and MAC address expressions
- Support log action without prefix.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-12 18:54:15 +02:00
Andy Chiang
dc0bdc9ff7 luci-mod-status: add source/gateway display for ipv4/ipv6
*add source display for ipv4
*add gateway display for ipv6

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2025-10-11 21:39:43 +02:00
Paul Donald
e6dc9ac18c luci-mod-status: Fix call params to routes.js functions
follow-up fix to 70b7176fc2

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-10 18:39:19 +02:00
jpfox156
18786c56a8 luci-mod-status: amend luci-bwc.c to use conntrack tool
Fall through to /usr/sbin/conntrack tool if /proc/net/nf_conntrack or
ip_conntrack is not available.

/proc/net/nf_conntrack has been obsoleted in recent kernels
(https://cateee.net/lkddb/web-lkddb/NF_CONNTRACK_PROCFS.html). This
change enables luci-bwc to collect conntrack information via the
/usr/sbin/conntrack tool (if installed) instead.

Populates the /luci/admin/status/realtime/connections chart.

Signed-off-by: James Fox <jpfox156@yahoo.com.au>
[ format using tabs ]
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-02 15:42:52 +02:00
Christian Marangi
788e47034b luci-mod-status: add support to show/hide index cards
Add support to show/hide index cards. A card's state is saved using the
browser localstorage and its state is restored on page reload/relogin.

Rework the pool function to check and skip loading of hidden cards.

Rework themes to address new button position.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
[ changed tabs in CSS ]
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-02 15:11:51 +02:00
Christian Marangi
874752bcc4 luci-mod-status: reorganize include load function for status page
Reorganize include load function for status page an move it inside view
extend index page.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-10-02 14:57:50 +02:00
Christian Marangi
b92c7f696e luci-mod-status: reorganize poll function for index page
Reorganize poll function for index page. Drop the external function and
use the poll_status pattern used in other page that use poll.add API.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-10-02 14:57:49 +02:00
Paul Donald
f53e99d229 luci-mod-status: fix syslog warning (4) log level filter
Closes #7967

the warning syslog level is internally denoted as 'warn'.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-09-29 16:00:57 +02:00
Christian Korber
7b07b93ff9 luci-mod-status: add vendor info in index file
In the overview page are all active dhcp leases displayed.
For easier recognition, the listed MAC addresses fo these leases are
resolved to their vendor names.

Signed-off-by: Christian Korber <ck@dev.tdt.de>
2025-09-25 13:25:33 +02:00
Christian Korber
70b7176fc2 luci-mod-status,luci-mod-network: support oui to vendor resolving
For easier definition of connected devices, this commit adds support
to identify them by vendor name.

Package `upf-neigh` is needed to lookup the vendor name in a hash table.
It implements a ubus-call `ubus call fingerprint fingerprint`:

```
root@<redacted> ~ # ubus call fingerprint fingerprint
{
        "7c:c2:55:XX:XX:XX": {
                "vendor": "Super Micro Computer, Inc."
        }
}
```

Fixes: #2065
Depends on: openwrt/packages#27257

Signed-off-by: Christian Korber <ck@dev.tdt.de>
2025-09-25 13:25:33 +02:00
David Härdeman
19057e3760 luci-mod-network,-status: show DHCPv6 lease IAID
The IAID is important information as it allows the user to know which
interface on the client device a given DHCPv6 lease corresponds to.
odhcpd already exposes this information (e.g. via "ubus call dhcp
ipv6leases"), but it would be good to have access to the same
information via the web interface, especially since odhcpd does take the
IAID into account when allocating addresses.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-09-22 18:16:07 +02:00
Paul Donald
b7ebe96541 luci-mod-status: add .blur() action for kernel log scroll buttons
follow-up to f458c39c74

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-06-30 02:13:25 +02:00
Paul Donald
d115c41d6e luci-mod-status: refactor to ES6
Add CC and TX Power to wifi badges

Closes #7606

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-06-30 01:38:11 +02:00
Ramon Van Gorkom
3e66e8b7a8 luci-mod-status: Cleanup and fix syslog.js bug
Fixed bug in syslog.js where lines could be hidden even when "any" was selected, and simplified code a bit.

Signed-off-by: Ramon Van Gorkom <Ramon00c00@gmail.com>
2025-06-29 19:48:00 +02:00