From 439dbcaa90506159bbe769eaa910abe3de648cd9 Mon Sep 17 00:00:00 2001 From: Oliver Kieselbach Date: Thu, 26 Mar 2026 09:55:49 +0100 Subject: [PATCH] fix tenant config --- .../sections/SectionTenantConfigReport.tsx | 17 ++++++++++++++--- .../autopilot-monitor-web/tsconfig.tsbuildinfo | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/Web/autopilot-monitor-web/app/admin/tenants/sections/SectionTenantConfigReport.tsx b/src/Web/autopilot-monitor-web/app/admin/tenants/sections/SectionTenantConfigReport.tsx index 5168483e..818c4b0c 100644 --- a/src/Web/autopilot-monitor-web/app/admin/tenants/sections/SectionTenantConfigReport.tsx +++ b/src/Web/autopilot-monitor-web/app/admin/tenants/sections/SectionTenantConfigReport.tsx @@ -55,6 +55,8 @@ interface TenantConfig { rebootOnComplete?: boolean | null; rebootDelaySeconds?: number | null; enableGeoLocation?: boolean | null; + enableTimezoneAutoSet?: boolean | null; + ntpServer?: string | null; enableImeMatchLog?: boolean | null; logLevel?: string | null; maxBatchSize?: number | null; @@ -117,6 +119,8 @@ const DEFAULTS: Record = { rebootOnComplete: null, rebootDelaySeconds: null, enableGeoLocation: null, + enableTimezoneAutoSet: null, + ntpServer: 'time.windows.com', enableImeMatchLog: null, logLevel: null, maxBatchSize: null, @@ -150,6 +154,8 @@ const RUNTIME_DEFAULTS: Record = { selfDestructOnComplete: true, keepLogFile: false, enableGeoLocation: true, + enableTimezoneAutoSet: false, + ntpServer: 'time.windows.com', enableImeMatchLog: false, maxAuthFailures: 5, authFailureTimeoutMinutes: 0, @@ -275,6 +281,8 @@ function computeRuntime(c: TenantConfig): Record { selfDestructOnComplete: c.selfDestructOnComplete ?? true, keepLogFile: c.keepLogFile ?? false, enableGeoLocation: c.enableGeoLocation ?? true, + enableTimezoneAutoSet: c.enableTimezoneAutoSet ?? false, + ntpServer: c.ntpServer ?? 'time.windows.com', enableImeMatchLog: c.enableImeMatchLog ?? false, maxAuthFailures: c.maxAuthFailures ?? 5, authFailureTimeoutMinutes: c.authFailureTimeoutMinutes ?? 0, @@ -331,9 +339,7 @@ export function SectionTenantConfigReport() { })); mapped.sort((a, b) => (a.domainName || a.tenantId).localeCompare(b.domainName || b.tenantId)); setTenants(mapped); - if (mapped.length > 0 && !selectedTenantId) { - setSelectedTenantId(mapped[0].tenantId); - } + // Don't auto-select — user must pick a tenant from the dropdown } } catch (err) { if (err instanceof TokenExpiredError) { @@ -416,6 +422,7 @@ export function SectionTenantConfigReport() { disabled={loadingTenants} > {loadingTenants && } + {!loadingTenants && } {tenants.map((t) => (