diff --git a/frontend/src/lib/components/InstanceSetting.svelte b/frontend/src/lib/components/InstanceSetting.svelte index 6b676131da..491a5775e3 100644 --- a/frontend/src/lib/components/InstanceSetting.svelte +++ b/frontend/src/lib/components/InstanceSetting.svelte @@ -124,6 +124,16 @@ } } + $effect(() => { + if (setting.key === 'license_key') { + const key = $values['license_key'] ?? '' + const { valid } = parseLicenseKey(key) + if (valid) { + $enterpriseLicense = key.split('.')[0] + } + } + }) + let pythonAvailableVersions: ListAvailablePythonVersionsResponse = $state([]) let isPyFetching = $state(false) diff --git a/frontend/src/lib/components/InstanceSettings.svelte b/frontend/src/lib/components/InstanceSettings.svelte index 12d389b160..24b41f8bcc 100644 --- a/frontend/src/lib/components/InstanceSettings.svelte +++ b/frontend/src/lib/components/InstanceSettings.svelte @@ -234,7 +234,7 @@ const jobSettings = settings['Jobs'] ?? [] const jobIsolation = jobSettings.find((s) => s.key === 'job_isolation') const retentionPeriod = jobSettings.find((s) => s.key === 'retention_period_secs') - const objectStorage = jobSettings.find((s) => s.key === 'object_store_cache_config') + const objectStorage = settings['Object Storage']?.find((s) => s.key === 'object_store_cache_config') return [...baseWithout, ...(jobIsolation ? [jobIsolation] : []), ...(licenseKey ? [licenseKey] : []), ...(retentionPeriod ? [retentionPeriod] : []), ...(objectStorage ? [objectStorage] : [])] } return base @@ -287,7 +287,8 @@ export function discardCategory(category: string) { if (category === 'Auth/OAuth/SAML') { for (const s of scimSamlSetting) { - $values[s.key] = JSON.parse(JSON.stringify(initialValues[s.key])) + const v = initialValues[s.key] + $values[s.key] = v !== undefined ? JSON.parse(JSON.stringify(v)) : undefined } oauths = JSON.parse(JSON.stringify(initialOauths)) requirePreexistingUserForOauth = initialRequirePreexistingUserForOauth @@ -297,7 +298,8 @@ } else { const categorySettings = getSettingsForCategory(category) for (const s of categorySettings) { - $values[s.key] = JSON.parse(JSON.stringify(initialValues[s.key])) + const v = initialValues[s.key] + $values[s.key] = v !== undefined ? JSON.parse(JSON.stringify(v)) : undefined } } } @@ -360,7 +362,8 @@ // Update only the saved category's initial values for (const s of categorySettings) { - initialValues[s.key] = JSON.parse(JSON.stringify($values[s.key])) + const v = $values[s.key] + initialValues[s.key] = v !== undefined ? JSON.parse(JSON.stringify(v)) : undefined } // Handle Auth/OAuth/SAML-specific saves @@ -561,7 +564,7 @@
+ Welcome! Default credentials admin@windmill.dev / changeme have been prefilled. +
{/if}