Skip to content

luci-mod-status: add description to port status#8659

Open
YusDyr wants to merge 1 commit into
openwrt:masterfrom
YusDyr:port-status-description
Open

luci-mod-status: add description to port status#8659
YusDyr wants to merge 1 commit into
openwrt:masterfrom
YusDyr:port-status-description

Conversation

@YusDyr

@YusDyr YusDyr commented May 25, 2026

Copy link
Copy Markdown

Summary

Companion change to #8657 (which adds option description support to
the Interfaces and Devices views in luci-mod-network).

If a config device section in /etc/config/network has an
option description set for a physical port (e.g. lan2, lan3),
the description is shown as a subtitle below the port name in the
Port Status widget on the Overview page.

  • Ports without a description are unaffected
  • Long descriptions are truncated with ; the full text is shown as a tooltip on hover

Use case

Label physical LAN ports on DSA-based routers so the port function is
visible at a glance on the Overview page (e.g. lan2NVR/Cameras,
lan3TV).

Screenshots

Port Status widget — description subtitle under port name:

Port Status

Testing

  • Port with option description set: subtitle appears below port name
  • Port without option description: no subtitle, layout unchanged
  • Long description: truncated with , full text on hover

Tested on

OpenWrt version: OpenWrt 24.10.3
LuCI version: openwrt-24.10
Web browser: Safari

If a `config device` section in `/etc/config/network` has an
`option description` set for a physical port (e.g. lan2, lan3),
the description is shown as a subtitle below the port name in the
Port Status widget on the Overview page.

Ports without a description are unaffected.

Signed-off-by: Denis Iusupov <yusdyr@gmail.com>
@YusDyr YusDyr force-pushed the port-status-description branch from 2237982 to 3fcec19 Compare May 26, 2026 22:18
];

if (portDesc)
ifaceboxChildren.push(E('div', { 'class': 'ifacebox-head', 'style': 'font-weight:normal;font-size:80%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis', 'title': portDesc }, portDesc));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do these hard-coded style elements look in the other supported themes? Seems like maybe a new class is needed, or pick from an existing one that's "close enough"?

(You only show one graphic in the PR, so it's hard to know how it will look with all of default, 2020 and material.)

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 new commit; no new issues found.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants