Skip to content

Fix Fleet Dashboard uptime zeros and card-header hover reflow - #73

Merged
TheWitness merged 3 commits into
developfrom
fix/fleet-dashboard-uptime-hover
Oct 12, 2026
Merged

TheWitness merged 3 commits into
developfrom
fix/fleet-dashboard-uptime-hover

Conversation

@TheWitness

Copy link
Copy Markdown
Member

Summary

Two fixes to the HMIB Fleet (Summary) Dashboard (and the per-device Dashboard where the same code is shared).

1. Uptime Distribution showed all zeros

The uptime cards read the Host Resources hrSystemUptime OID (.1.3.6.1.2.1.25.1.1.0, stored in the uptime column). Many SNMP agents do not implement that object and report 0, even though they serve the standard sysUpTime (.1.3.6.1.2.1.1.3.0, stored in sysUptime). The dashboards now fall back to sysUptime when uptime is 0:

  • hmib_summary_stats() min/avg/max uptime aggregation uses IF(uptime > 0, uptime, sysUptime).
  • The per-device Dashboard "System Information" card applies the same fallback.

When hrSystemUptime is reported, behavior is unchanged.

2. Card header grew on hover

The drag handle (fa-bars) and the tool buttons in the Dashboard card header are <button>s with border: 0. The theme's button:hover adds a 1px gradient border, which enlarged the button and reflowed the header height. They now carry a transparent 1px border with box-sizing: border-box (kept transparent on hover/focus), and the header has a min-height, so hovering no longer changes its size — matching the approach used elsewhere.

Notes

Uptime Distribution showed all zeros on agents that do not report the Host
Resources hrSystemUptime (.25.1.1.0); fall back to SNMP sysUpTime (sysUptime)
in the fleet stats aggregation and in the per-device Dashboard system card.

The drag handle and tool buttons in the Dashboard card header carried a 0-width
border, so the theme's button hover border added 1px and grew the header. Give
them a transparent 1px border with border-box sizing (kept transparent on
hover/focus) and set a header min-height so hovering no longer reflows it.
@TheWitness
TheWitness requested review from bmfmancini and xmacan and a balanced review from Copilot October 11, 2026 21:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The header’s content-box minimum height unintentionally enlarges every card header to at least 49px.

1 open finding
What changed in this PR

Fixes dashboard uptime fallback behavior and stabilizes card-header sizing.

Changes:

  • Falls back from hrSystemUptime to sysUpTime.
  • Reserves button-border space to prevent hover reflow.
  • Documents both fixes in the changelog.
File Description
hmib.php Adds uptime fallback for device and fleet dashboards.
css/​hmib.css Stabilizes dashboard header controls on hover.
CHANGELOG.md Records both dashboard fixes.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread css/hmib.css Outdated
bmfmancini
bmfmancini previously approved these changes Oct 12, 2026
xmacan
xmacan previously approved these changes Oct 12, 2026
…d-uptime-hover

# Conflicts:
#	CHANGELOG.md
#	css/hmib.css
@TheWitness
TheWitness dismissed stale reviews from xmacan and bmfmancini via d8e9ba3 October 12, 2026 12:13

@somethingwithproof somethingwithproof left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Approved.

@TheWitness
TheWitness merged commit d92802c into develop Oct 12, 2026
3 checks passed
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.

5 participants