Commit Graph

23 Commits

Author SHA1 Message Date
Ramon Van Gorkom
ba590f87ea luci-mod-status: fix syslog page with syslog-ng
If you have syslog-ng installed instead of logd then
syslog page displays errors.
This commit fixes that.

Signed-off-by: Ramon Van Gorkom <Ramon00c00@gmail.com>
2026-03-16 23:22:31 +01:00
Konstantin Glukhov
8b0195ea67 luci-mod-status: improve RDNS resolution workflow
- Add new RPC declarations:
  - callLuciRpcGetNetworkDevices
  - callLuciRpcGetDHCPLeases
- Add ethers_cache for MAC-to-hostname mapping
- Replace object literals with Object.create(null) for caches:
  dns_cache, service_cache
- Make sure 'Disable DNS lookups' shows addresses
- Change lookup_queue from array to Set to simplify processing
- Introduce updateDnsCache(addr, name) helper to update caches and remove
  addresses from queues
- Update service lookup to match uppercase cache keys
- Rework address resolution workflow as async/await
  1. DHCP leases
  2. Reverse DNS via callNetworkRrdnsLookup
  3. Host hints / MAC-to-host mapping
  4. Network devices / MAC cache
- Re-write pollData() as async
- Update ACL JSON to grant luci-mod-status access to luci-rpc
  methods: getHostHints, getNetworkDevices, getDHCPLeases

This refactor modernizes the connections view host lookup logic, reduces
redundant RPC queries, and improves maintainability and cache reliability.

Signed-off-by: Konstantin Glukhov <KGlukhov@Hotmail.com>
2026-02-09 05:07:45 +01:00
Konstantin Glukhov
62fd5284f6 luci-mod-status: resolve service names for ports
- Parse and map ports to corresponding service names.
- Display service names when DNS lookups are enabled.

Rationale:

Enhance endpoint readability by showing service names where available,
improving clarity of source/destination information.

Signed-off-by: Konstantin Glukhov <KGlukhov@Hotmail.com>
2026-01-23 03:52:28 +01: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
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
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
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
Christian Korber
734442a10b luci-mod-status: display log_file in status if defined
Commit includes wrapper syslog in /usr/libexec. If a log file is configured, the output of this file is displayed. Otherwise the output of logread is displayed.

Signed-off-by: Christian Korber <ckorber@tdt.de>
2024-07-23 00:41:47 +02:00
Erik Karlsson
72f1573458 luci-mod-status: fix ACL for channel analysis
Without this fix channel analysis will not work unless write access is
also granted to luci-mod-network-config

Signed-off-by: Erik Karlsson <erik.karlsson@genexis.eu>
2023-11-27 11:16:29 +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
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
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
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
Andre Heider
8051510732 luci-mod-status: use the new ubus dsl metrics
This is significantly faster.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Tested-by: Martin Schiller <ms@dev.tdt.de>
2021-01-26 07:10:19 +01:00
Hannu Nyman
c49d33f6cb Merge pull request #4598 from Ansuel/wifi_chan
luci-mod-status: add new channel analysis page
2021-01-07 19:02:57 +02:00
Ansuel Smith
91a0008457 luci-mod-status: add channel analysis support
Add channel analysis support. This can be very useful as a user can directly use the webui to check wifi channel utilization without using external tool. This use data already provided by iwinfo.

Fixes: #4572
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2020-12-06 02:24:05 +01:00
Ansuel Smith
6cf849bcf6 luci-mod-status: add WPS control for wifi info
Add a way to trigger and get the WPS Push Button status from the webui if supported.

Fixes: #1072

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2020-10-17 17:47:50 +02:00
Jo-Philipp Wich
f4651cb129 treewide: fix trailing commans in ACL JSON files
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-17 23:40:14 +02:00
Jo-Philipp Wich
c099344013 treewide: reorganize base ACLs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-09 23:23:33 +02:00