luci-mod-dashboard: add live charts and a configurable layout - #9060
Merged
Merged
Conversation
eamonxg
force-pushed
the
dashboard-customize
branch
from
September 21, 2026 12:35
69291d2 to
17e3a8c
Compare
openwrt-ai
reviewed
Sep 21, 2026
eamonxg
force-pushed
the
dashboard-customize
branch
from
September 22, 2026 01:23
17e3a8c to
40d0dd0
Compare
openwrt-ai
reviewed
Sep 22, 2026
openwrt-ai
reviewed
Sep 22, 2026
eamonxg
force-pushed
the
dashboard-customize
branch
2 times, most recently
from
September 23, 2026 02:30
9d20aaf to
11b8cf2
Compare
openwrt-ai
reviewed
Sep 23, 2026
openwrt-ai
left a comment
Collaborator
There was a problem hiding this comment.
Commit checks
- 11b8cf2 "luci-mod-dashboard: show IP addresses for wireless clients" — the
.dashboard-donut { margin-inline: 0 }Footstrap override is unrelated to the client IP column and unmentioned in the message; fold it into the first commit or give it its own.
Generated by Claude Code
Add configurable dashboard cards and tabs, along with five-minute WAN traffic, CPU and memory history charts. This includes: - status cards for CPU, memory, load and uptime next to Internet, all of one shape: a title, a value and one line of text; - charts of the WAN traffic and of CPU and memory usage over the last five minutes; - a Layout tab to choose which cards, charts and tabs are shown and in what order, kept in UCI as dashboard.layout; - the time a wireless client has been connected, in the tooltips of the wireless client data usage chart and in the client table; - the IPv4 and the IPv6 address of the uplink on the Internet card, one line each, and the IPv6 address in the Internet tab. The samples behind the charts are taken on the router by a small rpcd ucode plugin, luci.dashboard, every five seconds whether or not somebody is looking, so the charts are full whenever the page is opened. It keeps the raw counters of /proc/stat, /proc/meminfo and /proc/net/dev with the router's monotonic clock in a ring of 60 samples. The page fetches what is new since its last poll and takes the differences, so a reload or a hidden tab leaves no gap and the rates do not depend on the browser's timing. One pass takes 2 to 3 ms on a quad-core IPQ60xx, about 0.07% of one core, and the ring about 360 kB of memory. Includes declare their widgets with a slot, an order and whether they show by default. An include with nothing on the page is not polled, and polling stops while the page is hidden. The layout form is a form.Map of three DynamicLists in the last tab; while it is open the poll redraws the cards and charts only. ui.DynamicList greys out a choice only once it is picked and always offers a custom value, so the form marks the values a list starts out with and drops the custom entry. All of it stays within luci-mod-dashboard. Name the charts WAN traffic, Wireless client distribution and Wireless client data usage to make their scope clear. Remove <code> formatting for consistent data display in tab tables, and add CPU usage breakdown tooltips to the total and per-core rows. Signed-off-by: Eamon Xiong <eamonxiong@gmail.com>
Add an IP Address column to the wireless client table so users can identify devices alongside their traffic without checking DHCP leases. Match known host addresses by the client MAC and show at most one IPv4 and one IPv6 address, taking the first of each from the host hints after excluding IPv6 link-local addresses. Show a dash when no address is known and allow long addresses to wrap on narrow screens. Signed-off-by: Eamon Xiong <eamonxiong@gmail.com>
eamonxg
force-pushed
the
dashboard-customize
branch
from
September 23, 2026 06:04
11b8cf2 to
73a06f0
Compare
Contributor
Author
|
Hi @hnyman, I think this PR should be ready to merge now. When you have a chance, could you take a look? Thanks! |
Contributor
|
Have you tested the new dashboard with 25.12? |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Pull request details
Description
This PR adds configurable dashboard cards and tabs, along with five-minute WAN traffic, CPU and memory history charts:
dashboard.layout.<code>formatting for consistent data display in tab tables, and client/lease tables no longer rely on right-aligned columns or empty footer cells.Chart names distinguish WAN traffic from Wireless client data usage and Wireless client distribution. The WAN chart shows transfer rates; wireless data usage shows the byte totals reported for each connected wireless client.
A small rpcd ucode plugin,
luci.dashboard, samples/proc/stat,/proc/meminfoand/proc/net/devevery five seconds, even when the page is closed. It keeps 60 samples with the router's monotonic clock. The page fetches new samples and calculates rates from counter differences, preserving history across reloads and avoiding dependence on browser polling timing.Includes declare their widgets, display order and defaults. Includes with no visible widgets are not polled, and browser polling pauses while the page is hidden. While Layout is open, polling updates only the cards and charts so it does not interrupt editing. All changes stay within
luci-mod-dashboard.Screenshot or video of changes
Bootstrap
Bootstrap Dark
Bootstrap Mobile
Footstrap
Material
Layout configuration
All components enabled
Tested on
Hardware: JDCloud RE-SS-01, qualcommax/ipq60xx
OpenWrt version: SNAPSHOT r0-b88dfb6, Linux 6.18.44
LuCI version: Master 26.261.50869~aef4a82, with this dashboard branch deployed
Web browser(s): Google Chrome 153.0.8010.48; Safari 27.0 (22625.1.29.11.27)