Files
cacti/tests/tools
edeaf135a1 fix(ui): use the three-bar action menu on the Details and Time View graph pages (#8641)
* fix(ui): use the three-bar action menu on the Details and Time View graph pages

The graph drilldown icons were switched to a hidden three-bar (hamburger)
action menu for the thumbnail/preview/tree graph areas, but the Details
(zoom) and Time View (utility) pages still rendered the raw glyph anchors.
Give those two areas the same graphDrillDownToggle treatment so the action
glyphs stay hidden behind the hamburger until it is activated, render the
drilldown container id through get_filter_request_var('local_graph_id'), and
move the Details graph title outside the toggle's positioning container
(matching html_graph_area() in lib/html.php) so a wide title no longer pushes
the hamburger off the graph corner.

Use the native Element.matches(':hover') in graphDrilldownStillHovered()
instead of jQuery's :hover: jQuery delegates :hover to Sizzle for a node
outside the document and throws "unsupported pseudo: hover" when a pending
close timer runs after the Details/Time View area reloads.  A detached node
is treated as not hovered, so the native check cannot throw.

Add a coverage fixture that renders html_graph_single_view() and
html_graph_zoom() with their I/O stubbed and asserts the menu structure and
title placement, so the changed PHP output - not just handwritten browser
HTML - is exercised by the changed-line and request coverage gates.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* docs(changelog): add issue#8641 entry

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* security(html_graph): html-escape local_graph_id in drilldown container id

SonarCloud/Semgrep flag the raw get_filter_request_var(local_graph_id)
echoed into the drilldown container id attribute in html_graph_single_view()
and html_graph_zoom() as reflected XSS. The value is already int-validated,
but wrap it in htmle() so the request-to-response taint path is closed and
the scanners are satisfied.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: TheWitness <copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-09 09:56:53 -05:00
..
2026-01-28 16:11:10 -05:00