From 57e1d60c7ae14c406582ba271cace23e38cf8a26 Mon Sep 17 00:00:00 2001 From: Erik Darling <2136037+erikdarlingdata@users.noreply.github.com> Date: Fri, 5 Jun 2026 12:18:12 -0400 Subject: [PATCH] Fix #1048: show "Other: n/a" instead of "Other: 0%" on Linux CPU detail On Linux the alert engine returns host/other-process CPU as NULL (no DMV exposes true host CPU there; SystemIdle is always 0). CpuDisplayText already drops the Other figure, but CpuDetailText coalesced the NULL to 0, rendering a misleading "Other: 0%" that reads as a real zero measurement. Branch on .HasValue so a missing value renders "n/a", matching the honest treatment in CpuDisplayText. No query or datatype change; the value stays int?/NULL and only the final display string differs. Co-Authored-By: Claude Opus 4.8 (1M context) --- Dashboard/Models/ServerHealthStatus.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dashboard/Models/ServerHealthStatus.cs b/Dashboard/Models/ServerHealthStatus.cs index 793b38b2..dc6a6b75 100644 --- a/Dashboard/Models/ServerHealthStatus.cs +++ b/Dashboard/Models/ServerHealthStatus.cs @@ -205,7 +205,8 @@ public string CpuDetailText get { if (!_cpuPercent.HasValue && !_otherCpuPercent.HasValue) return ""; - return $"SQL: {_cpuPercent ?? 0}% Other: {_otherCpuPercent ?? 0}%"; + string other = _otherCpuPercent.HasValue ? $"{_otherCpuPercent}%" : "n/a"; + return $"SQL: {_cpuPercent ?? 0}% Other: {other}"; } }