From 020342e4513ac2186b7e33164dd0172e49ec3768 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Sun, 11 Oct 2026 17:04:24 -0400 Subject: [PATCH 1/2] Fix Fleet Dashboard uptime zeros and card-header hover reflow 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. --- CHANGELOG.md | 2 ++ css/hmib.css | 9 +++++++-- hmib.php | 11 +++++++---- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a14c06..af86728 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ChangeLog --- develop --- +* issue: Fix the Fleet Dashboard Uptime Distribution showing all zeros by falling back to SNMP sysUpTime when the Host Resources hrSystemUptime is not reported, and apply the same fallback to the per-device Dashboard +* issue: Stop the Dashboard card header from changing height when hovering the drag handle or tool buttons by reserving space for the theme's button hover border * feature: Add a Fleet (Summary) Dashboard reached by a dashboard glyph on the Summary tab's Device Type rows: a draggable, add/remove card grid scoped to all devices or one OS type, with min/avg/max bullet charts (CPU/memory/swap/processes/uptime), a device-status stacked bar, OS type distribution, storage utilization, fleet stat tiles, and top processes by CPU and by memory; scope, card order, expanded state and refresh interval persist per user * issue: Fix 'Uncaught TypeError: runCollector(): Argument #2 ($lastrun) must be of type float, null given' in the poller when a collector's *_lastrun/*_freq setting has never been written (e.g. a task's first run); runCollector() now accepts null and normalizes it * issue: Fix the per-device Dashboard Storage, Per-Processor Load, Hardware and Installed Software cards rendering empty because they filtered on 'present = 1' while the underlying Storage/Hardware/Inventory tabs never did, and add a Process Use History card diff --git a/css/hmib.css b/css/hmib.css index 2e61951..d20fc49 100644 --- a/css/hmib.css +++ b/css/hmib.css @@ -190,6 +190,7 @@ display: flex; align-items: center; gap: 8px; + min-height: 34px; padding: 7px 10px; border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent); background: color-mix(in srgb, currentColor 8%, transparent); @@ -203,8 +204,9 @@ .hmibDashCardDrag { flex: 0 0 auto; + box-sizing: border-box; padding: 2px 5px; - border: 0; + border: 1px solid transparent; border-radius: 4px; background: transparent; color: color-mix(in srgb, currentColor 50%, transparent); @@ -217,6 +219,7 @@ .hmibDashCardDrag:focus-visible { color: currentColor; background: color-mix(in srgb, currentColor 12%, transparent); + border-color: transparent; outline: none; } @@ -244,8 +247,9 @@ } .hmibDashCardTool { + box-sizing: border-box; padding: 2px 5px; - border: 0; + border: 1px solid transparent; border-radius: 4px; background: transparent; color: color-mix(in srgb, currentColor 50%, transparent); @@ -258,6 +262,7 @@ .hmibDashCardTool:focus-visible { color: currentColor; background: color-mix(in srgb, currentColor 12%, transparent); + border-color: transparent; outline: none; } diff --git a/hmib.php b/hmib.php index 81cb03a..226ae83 100644 --- a/hmib.php +++ b/hmib.php @@ -4224,7 +4224,8 @@ function hmib_dashboard_card_body(string $key, int $host_id): string { $kv(__('Description', 'hmib'), (string) $system['sysDescr']); $kv(__('Contact', 'hmib'), (string) $system['sysContact']); $kv(__('Location', 'hmib'), (string) $system['sysLocation']); - $kv(__('Uptime', 'hmib'), hmib_dashboard_format_uptime((int) $system['uptime'])); + // hrSystemUptime (uptime) is often unreported by agents that still serve sysUpTime. + $kv(__('Uptime', 'hmib'), hmib_dashboard_format_uptime((int) $system['uptime'] > 0 ? (int) $system['uptime'] : (int) $system['sysUptime'])); $kv(__('System Time', 'hmib'), (string) $system['date']); print ''; @@ -4847,6 +4848,8 @@ function hmib_summary_stats(int $ostype): array { $where = $ostype >= 0 ? 'WHERE hrs.host_type = ?' : ''; $params = $ostype >= 0 ? [$ostype] : []; + // hrSystemUptime (uptime) is often unreported (0) by agents that still serve + // sysUpTime (sysUptime), so fall back to it for the uptime distribution. $row = db_fetch_row_prepared("SELECT COUNT(*) AS devices, SUM(host_status = 3) AS up, @@ -4869,9 +4872,9 @@ function hmib_summary_stats(int $ostype): array { MIN(CASE WHEN host_status >= 2 THEN processes END) AS minProc, AVG(CASE WHEN host_status >= 2 THEN processes END) AS avgProc, MAX(CASE WHEN host_status >= 2 THEN processes END) AS maxProc, - MIN(CASE WHEN host_status >= 2 THEN uptime END) AS minUptime, - AVG(CASE WHEN host_status >= 2 THEN uptime END) AS avgUptime, - MAX(CASE WHEN host_status >= 2 THEN uptime END) AS maxUptime + MIN(CASE WHEN host_status >= 2 THEN IF(uptime > 0, uptime, sysUptime) END) AS minUptime, + AVG(CASE WHEN host_status >= 2 THEN IF(uptime > 0, uptime, sysUptime) END) AS avgUptime, + MAX(CASE WHEN host_status >= 2 THEN IF(uptime > 0, uptime, sysUptime) END) AS maxUptime FROM plugin_hmib_hrSystem AS hrs $where", $params); From a1b0ec11b4c449b8ae454ffc6c75e82933398612 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Sun, 11 Oct 2026 18:36:08 -0400 Subject: [PATCH 2/2] Fleet Dashboard: box-sizing border-box so card header min-height includes padding/border --- css/hmib.css | 1 + 1 file changed, 1 insertion(+) diff --git a/css/hmib.css b/css/hmib.css index d20fc49..6147d66 100644 --- a/css/hmib.css +++ b/css/hmib.css @@ -190,6 +190,7 @@ display: flex; align-items: center; gap: 8px; + box-sizing: border-box; min-height: 34px; padding: 7px 10px; border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);