Skip to content

sysinfo-snapshot: fix ethtool -S links in generated HTML - #39

Open
dthompso wants to merge 1 commit into
Mellanox:masterfrom
dthompso:dthompso-fix_ethtool_S
Open

sysinfo-snapshot: fix ethtool -S links in generated HTML#39
dthompso wants to merge 1 commit into
Mellanox:masterfrom
dthompso:dthompso-fix_ethtool_S

Conversation

@dthompso

@dthompso dthompso commented Jun 2, 2026

Copy link
Copy Markdown

ethtool_all_interfaces is rendered from network_commands_dict, so the link-preserving path in html_write_paragraph never ran and anchor tags were escaped as literal text. Handle ethtool_all_interfaces and devlink_handler before the available_commands_collection check, and detect link lines with a generic '<a href' match.
Build ethtool -S artifact paths with a shared relative path, quoted href attributes, and safer interface-name sanitization so links target the files written under ethtool_S/.

Before this fix the "ethtool -S" portion of the generated HTML looked like:

ethtool -S output:

ethtool -S ib0

ethtool -S ib0

ethtool -S lo

ethtool -S lo

ethtool -S oob_net0

ethtool -S oob_net0

ethtool -S tmfifo_net0

ethtool -S tmfifo_net0

Now, the "ethtool -S" portion looks like (each command is underlined hyperlink):

ethtool -S output:

ethtool -S ib0

ethtool -S lo

ethtool -S oob_net0

ethtool -S tmfifo_net0

@dthompso
dthompso force-pushed the dthompso-fix_ethtool_S branch 2 times, most recently from 8feb235 to f786a99 Compare June 5, 2026 14:45
ethtool_all_interfaces is rendered from network_commands_dict, so the
link-preserving path in html_write_paragraph never ran and anchor tags
were escaped as literal text. Handle ethtool_all_interfaces and
devlink_handler before the available_commands_collection check, and
detect link lines with a generic '<a href' match.
Build ethtool -S artifact paths with a shared relative path, quoted
href attributes, and safer interface-name sanitization so links target
the files written under ethtool_S/.

Signed-off-by: David Thompson <davthompson@nvidia.com>
@dthompso
dthompso force-pushed the dthompso-fix_ethtool_S branch from f786a99 to 73183ba Compare June 5, 2026 15:24
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.

1 participant