luci icon indicating copy to clipboard operation
luci copied to clipboard

luci-mod-status: add dynamic ethernet devices to port status view

Open KarstenH792 opened this issue 7 months ago • 5 comments

Extend the port status view to include dynamically detected ethernet interfaces (e.g. USB adapters) in addition to board-defined ports.

Devices are derived from netifd's device map and merged into the existing port list if not already present. Loopback interfaces are excluded.

To ensure correct hotplug behaviour, the device list is filtered against the current kernel device list (/sys/class/net), preventing stale entries from being displayed after device removal.

Tested on:

  • GL.iNet GL-MT6000
  • OpenWrt 25.12.1
  • Apple USB ethernet adapters (100 Mbps and 2.5 Gbps)

Verified link state changes and device hotplug (add/remove).

KarstenH792 avatar Apr 05 '26 06:04 KarstenH792

Just as a heads up, the workflow test might fail the commit due to the Contributing Guidelines.

  • Commit subject I believe needs to be less than 60 characters, and have the subject prefixed with the component name (just like you did for the pull request title). Something like: luci-mod-status: add dynamic ethernet to port view.

  • Commit message must be broken up into multiple lines, and I believe less than 75 characters per line is the requirement. Pressing return to continue the sentence to a new line is what I've done to accomplish this.

  • For the commit Author and Signed-off-by, you cannot use a GitHub noreply email. If you are not comfortable using your personal email address, you could create an alternative email address for situations like this. Then, change your email address for these checks to pass.

Thought you might like to know in advance as these workflow tests can take some time for them to run.

ghost avatar Apr 05 '26 07:04 ghost

[!WARNING]

Some formality checks failed.

Consider (re)reading submissions guidelines.

Failed checks

Issues marked with an :x: are failing checks.

Commit d4cb8ae87551cbd11a09d2645ca8299f09a1ebc1

  • :large_orange_diamond: Author name must be either a real name 'firstname lastname' or a nickname/alias/handle Actual: KarstenH792 seems to be a nickname or an alias Expected: a real name 'firstname lastname'
  • :x: Author email must not be a GitHub noreply email Expected: a real email address
  • :large_orange_diamond: Commit(ter) name must be either a real name 'firstname lastname' or a nickname/alias/handle Actual: GitHub seems to be a nickname or an alias Expected: a real name 'firstname lastname'
  • :x: Commit subject must start with <package name or prefix>:
  • :x: Signed-off-by must not be a GitHub noreply email Expected: a real email address
  • :large_orange_diamond: Commit message lines should be <= 75 characters long Actual: line 2 is 136 characters long $\textsf{Extend the port status view to include dynamically detected ethernet interf\color{red}{aces (e.g. USB adapters) in addition to board-defined ports. }}$ Actual: line 4 is 153 characters long $\textsf{Devices are derived from netifd's device map (port_map) and merged into the\color{red}{ existing port list if not already present. Loopback interfaces are excluded. }}$ Actual: line 6 is 201 characters long $\textsf{To ensure correct hotplug behaviour, the device list is filtered against th\color{red}{e current kernel device list obtained via /sys/class/net, preventing stale entries from being displayed after device removal. }}$

For more details, see the full job log.

Something broken? Consider providing feedback.

github-actions[bot] avatar Apr 05 '26 10:04 github-actions[bot]

Thanks for the heads up — fixed commit format, author details and line wrapping.

From: Owl @.> Date: 5 April 2026 at 17:57:20 AEST To: openwrt/luci @.> Cc: KarstenH792 @.>, Author @.> Subject: Re: [openwrt/luci] luci-mod-status: add dynamic ethernet devices to port status view (PR #8525) Reply-To: openwrt/luci @.***>

 owlsy left a comment (openwrt/luci#8525)

Just as a heads up, the workflow test might fail the commit due to the Contributing Guidelines.

Commit subject I believe needs to be less than 50 characters per line, and have the subject prefixed with the component name (just like you did for the pull request title). Something like: luci-mod-status: dynamic ethernet to port view.

Commit message must be broken up into multiple lines, and I believe less than 70 characters per line is the requirement. Pressing return to continue the sentence to a new line is what I've done to accomplish this.

For the commit Author and Signed-off-by, you cannot use a GitHub noreply email. If you are not comfortable using your personal email address, you could create an alternative email address for situations like this. Then, change your email address for these checks to pass.

Thought you might like to know in advance as these workflow tests can take some time for them to run.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

KarstenH792 avatar Apr 06 '26 09:04 KarstenH792

[!WARNING]

Some formality checks failed.

Consider (re)reading submissions guidelines.

Failed checks

Issues marked with an :x: are failing checks.

Commit e3340223811f6218ace6dfa8aae03c4f3e076e32

  • :large_orange_diamond: Author name must be either a real name 'firstname lastname' or a nickname/alias/handle Actual: KarstenH792 seems to be a nickname or an alias Expected: a real name 'firstname lastname'
  • :x: Author email must not be a GitHub noreply email Expected: a real email address
  • :x: Signed-off-by must match author Actual: missing or doesn't match author Expected: Signed-off-by: KarstenH792 <[email protected]>

For more details, see the full job log.

Something broken? Consider providing feedback.

github-actions[bot] avatar Apr 06 '26 18:04 github-actions[bot]

Updated the commit to fix indentation and keep it aligned with the file's tab-based style.

Regarding port_map: the intent is to show additional ethernet devices already known to netifd / assigned to a network, rather than every unconfigured device present in /sys/class/net. The /sys/class/net list is only used to avoid stale entries after hotplug removal.

KarstenH792 avatar Jun 14 '26 00:06 KarstenH792