fix scrollbar and gather rules completed event

This commit is contained in:
Oliver Kieselbach
2026-02-17 21:20:27 +01:00
parent f3f74f6a15
commit 1e67ea87e4
2 changed files with 21 additions and 1 deletions
@@ -97,6 +97,7 @@ namespace AutopilotMonitor.Functions.Functions
EnrollmentEvent? lastPhaseChangeEvent = null;
EnrollmentEvent? completionEvent = null;
EnrollmentEvent? failureEvent = null;
EnrollmentEvent? gatherCompletionEvent = null;
EnrollmentEvent? diagnosticsUploadedEvent = null;
string? failureReason = null;
DateTime? earliestEventTimestamp = null;
@@ -121,6 +122,10 @@ namespace AutopilotMonitor.Functions.Functions
{
completionEvent = evt;
}
else if (evt.EventType == "gather_rules_collection_completed")
{
gatherCompletionEvent = evt;
}
else if (evt.EventType == "enrollment_failed")
{
failureEvent = evt;
@@ -175,6 +180,20 @@ namespace AutopilotMonitor.Functions.Functions
);
_logger.LogWarning("{SessionPrefix} Status: Failed - {FailureReason} (transitioned={Transitioned})", sessionPrefix, failureReason, statusTransitioned);
}
else if (gatherCompletionEvent != null)
{
// Gather rules collection completed — mark session as Succeeded.
// Does not trigger enrollment stats or Teams notifications (not a real enrollment).
await _storageService.UpdateSessionStatusAsync(
request.TenantId,
request.SessionId,
SessionStatus.Succeeded,
gatherCompletionEvent.Phase,
completedAt: gatherCompletionEvent.Timestamp,
earliestEventTimestamp: earliestEventTimestamp
);
_logger.LogInformation("{SessionPrefix} Status: Succeeded (gather_rules)", sessionPrefix);
}
else if (lastPhaseChangeEvent != null)
{
// Update current phase (still in progress)
@@ -4,7 +4,8 @@
html {
scroll-behavior: smooth;
overflow-y: overlay;
overflow-y: scroll;
scrollbar-gutter: stable;
}
:root {