diff --git a/src/Backend/AutopilotMonitor.Functions/Services/TableStorageService.cs b/src/Backend/AutopilotMonitor.Functions/Services/TableStorageService.cs index 3a8d4d2b..94bedf69 100644 --- a/src/Backend/AutopilotMonitor.Functions/Services/TableStorageService.cs +++ b/src/Backend/AutopilotMonitor.Functions/Services/TableStorageService.cs @@ -612,7 +612,10 @@ namespace AutopilotMonitor.Functions.Services EventId = entity.GetString("EventId") ?? string.Empty, SessionId = entity.GetString("SessionId") ?? string.Empty, TenantId = entity.PartitionKey, - Timestamp = entity.GetDateTime("Timestamp") ?? DateTime.UtcNow, + Timestamp = DateTime.SpecifyKind( + entity.GetDateTimeOffset("Timestamp")?.UtcDateTime + ?? entity.GetDateTime("Timestamp") + ?? DateTime.UtcNow, DateTimeKind.Utc), EventType = entity.GetString("EventType") ?? string.Empty, Severity = (EventSeverity)(entity.GetInt32("Severity") ?? 0), Source = entity.GetString("Source") ?? string.Empty, diff --git a/src/Web/autopilot-monitor-web/app/admin-configuration/page.tsx b/src/Web/autopilot-monitor-web/app/admin-configuration/page.tsx index a5061f54..6c760a43 100644 --- a/src/Web/autopilot-monitor-web/app/admin-configuration/page.tsx +++ b/src/Web/autopilot-monitor-web/app/admin-configuration/page.tsx @@ -628,25 +628,22 @@ export default function AdminConfigurationPage() { return ( -
+
{/* Header */} -
-
+
+
-
+
-
-
-

Admin Configuration

-

Galactic Admin Operations

+
+

Admin Configuration

+

Galactic Admin Operations

+
diff --git a/src/Web/autopilot-monitor-web/app/analyze-rules/page.tsx b/src/Web/autopilot-monitor-web/app/analyze-rules/page.tsx index 91fc134e..6059a44d 100644 --- a/src/Web/autopilot-monitor-web/app/analyze-rules/page.tsx +++ b/src/Web/autopilot-monitor-web/app/analyze-rules/page.tsx @@ -653,20 +653,19 @@ export default function AnalyzeRulesPage() { return ( -
+
{/* Header */} -
-
+
+
-
- -
-

Analyze Rules

-

Manage event analysis rules for issue detection

+ +
+

Analyze Rules

+

Manage event analysis rules for issue detection

+
diff --git a/src/Web/autopilot-monitor-web/app/gather-rules/page.tsx b/src/Web/autopilot-monitor-web/app/gather-rules/page.tsx index 906a054c..b0059c72 100644 --- a/src/Web/autopilot-monitor-web/app/gather-rules/page.tsx +++ b/src/Web/autopilot-monitor-web/app/gather-rules/page.tsx @@ -649,25 +649,22 @@ export default function GatherRulesPage() { return ( -
+
{/* Header */} -
-
+
+
-
+
-
-
-

Gather Rules

-

Manage data collection rules for device enrollment

+
+

Gather Rules

+

Manage data collection rules for device enrollment

+
diff --git a/src/Web/autopilot-monitor-web/app/progress/page.tsx b/src/Web/autopilot-monitor-web/app/progress/page.tsx index 69756b24..dc538789 100644 --- a/src/Web/autopilot-monitor-web/app/progress/page.tsx +++ b/src/Web/autopilot-monitor-web/app/progress/page.tsx @@ -369,7 +369,7 @@ export default function ProgressPortalPage() { return ( -
+
{/* Collapsible Header + Search */} {headerCollapsed && session ? ( diff --git a/src/Web/autopilot-monitor-web/app/sessions/[sessionId]/page.tsx b/src/Web/autopilot-monitor-web/app/sessions/[sessionId]/page.tsx index 03a69b57..50678acf 100644 --- a/src/Web/autopilot-monitor-web/app/sessions/[sessionId]/page.tsx +++ b/src/Web/autopilot-monitor-web/app/sessions/[sessionId]/page.tsx @@ -1580,18 +1580,11 @@ function DeviceDetailsCard({ events }: { events: EnrollmentEvent[] }) { const agentStarted = getEventData("agent_started"); const bootTime = getEventData("boot_time"); - // Calculate boot time from first event timestamp minus uptimeMinutes. - // The device-reported bootTimeUtc can be inconsistent with event timestamps due to - // timezone handling on the device side. Using firstEvent - uptime gives a result - // that is always consistent with the event timeline shown in the UI. - const estimatedBootTime = (() => { - const uptimeMinutes = bootTime?.uptimeMinutes ?? agentStarted?.uptimeMinutes; - if (!uptimeMinutes) return null; - const timestamps = events.map(e => new Date(e.timestamp).getTime()).filter(t => !isNaN(t)); - if (timestamps.length === 0) return null; - const firstEventMs = Math.min(...timestamps); - return new Date(firstEventMs - uptimeMinutes * 60 * 1000); - })(); + // Boot time from bootTimeUtc (device-reported UTC with Z suffix, parsed correctly as UTC by browser). + // Now that event timestamps are also serialized with Z suffix (Kind=Utc), both are consistent. + const estimatedBootTime = (bootTime?.bootTimeUtc || bootTime?.bootTime) + ? new Date(bootTime?.bootTimeUtc ?? bootTime?.bootTime) + : null; const osInfo = getEventData("os_info"); const networkAdapters = getEventData("network_adapters"); const dnsConfig = getEventData("dns_configuration");