From 0d74b5a1f211cb255242ae3df5608a7101601009 Mon Sep 17 00:00:00 2001 From: Oliver Kieselbach Date: Tue, 14 Apr 2026 22:13:32 +0200 Subject: [PATCH] fix session search and analyze rule KO button --- .../components/AnalyzeRuleCard.tsx | 63 ++++++++++++++----- .../app/dashboard/components/SessionTable.tsx | 2 +- 2 files changed, 47 insertions(+), 18 deletions(-) diff --git a/src/Web/autopilot-monitor-web/app/analyze-rules/components/AnalyzeRuleCard.tsx b/src/Web/autopilot-monitor-web/app/analyze-rules/components/AnalyzeRuleCard.tsx index d11d847c..2d55a71f 100644 --- a/src/Web/autopilot-monitor-web/app/analyze-rules/components/AnalyzeRuleCard.tsx +++ b/src/Web/autopilot-monitor-web/app/analyze-rules/components/AnalyzeRuleCard.tsx @@ -85,24 +85,16 @@ export default function AnalyzeRuleCard({ )} - {/* KO-criterion toggle: only meaningful when the rule is actually enabled. Click cycles - the tenant override; the badge colour reflects the effective value. */} - {!readOnly && rule.enabled && onToggleMarkAsFailed && ( - + KO + )} @@ -290,6 +282,43 @@ export default function AnalyzeRuleCard({ )} + {/* KO criterion toggle — deliberately placed in the expanded detail view (not the header) + to prevent accidental clicks. Visible to tenant admins for any enabled rule. */} + {!readOnly && rule.enabled && onToggleMarkAsFailed && ( +
+
+
+
+

KO criterion

+ {effectiveMarkAsFailed && ( + + ACTIVE + + )} + {koOverrideIsExplicit && ( + + tenant override + + )} +
+

+ When enabled, a firing of this rule marks the whole enrollment session as failed in the portal — + even if the agent itself reported the session as successful. Use this for rules that represent a hard pass/fail criterion for your organization + (e.g. certificate provisioning must succeed). +

+
+ +
+
+ )} + {/* Actions */} {!readOnly && (
diff --git a/src/Web/autopilot-monitor-web/app/dashboard/components/SessionTable.tsx b/src/Web/autopilot-monitor-web/app/dashboard/components/SessionTable.tsx index efe1cf95..8439ff85 100644 --- a/src/Web/autopilot-monitor-web/app/dashboard/components/SessionTable.tsx +++ b/src/Web/autopilot-monitor-web/app/dashboard/components/SessionTable.tsx @@ -238,7 +238,7 @@ export function SessionTable({ document.addEventListener("mousedown", handleClickOutside); return () => document.removeEventListener("mousedown", handleClickOutside); } - }, [showColumnSelector, openFilterColumn, showTenantSuggestions]); + }, [showColumnSelector, openFilterColumn, showTenantSuggestions, showSearchSuggestions]); // Compute unique values for a filterable field from all sessions (not filtered) const getUniqueValues = (field: keyof Session): string[] => {