diff --git a/frontend/src/routes/(root)/(logged)/workers/+page.svelte b/frontend/src/routes/(root)/(logged)/workers/+page.svelte index a6f53244c2..8b179b40d5 100644 --- a/frontend/src/routes/(root)/(logged)/workers/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/workers/+page.svelte @@ -9,7 +9,7 @@ import Toggle from '$lib/components/Toggle.svelte' import Tooltip from '$lib/components/Tooltip.svelte' import { WorkerService, type WorkerPing, SettingService } from '$lib/gen' - import { enterpriseLicense } from '$lib/stores' + import { enterpriseLicense, superadmin } from '$lib/stores' import { sendUserToast } from '$lib/toast' import { displayDate, groupBy } from '$lib/utils' import { onDestroy, onMount } from 'svelte' @@ -51,7 +51,7 @@ async function loadGlobalCache() { try { - globalCache = (await SettingService.getGlobal({ key: worker_s3_bucket_sync })) ?? false + globalCache = (await SettingService.getGlobal({ key: worker_s3_bucket_sync })) ?? true } catch (err) { sendUserToast(`Could not load global cache: ${err}`, true) } @@ -75,31 +75,36 @@ documentationLink="https://www.windmill.dev/docs/core_concepts/worker_groups" /> -
- global cache to s3 is an enterprise feature that enable workers to do fast cold start and - share a single cache backed by s3 to ensure that even with a high number of workers, - dependencies for python/deno/bun/go are only downloaded for the first time only once by the - whole fleet. require S3_CACHE_BUCKET to be set. - { - try { - console.log('Setting global cache to', e.detail) - await SettingService.setGlobal({ - key: worker_s3_bucket_sync, - requestBody: { value: e.detail } - }) - globalCache = e.detail - } catch (err) { - sendUserToast(`Could not set global cache: ${err}`, true) - } - }} - options={{ right: 'global cache to s3' }} - disabled={!$enterpriseLicense} - /> -
+ {#if $superadmin} +
+

global cache to s3 is an enterprise feature that enable workers to do fast cold start and + share a single cache backed by s3 to ensure that even with a high number of workers, + dependencies for python/deno/bun/go are only downloaded for the first time only once by + the whole fleet. +

require S3_CACHE_BUCKET to be set and has NO effect otherwise (even if this setting is + on)
+ { + try { + console.log('Setting global cache to', e.detail) + await SettingService.setGlobal({ + key: worker_s3_bucket_sync, + requestBody: { value: e.detail } + }) + globalCache = e.detail + } catch (err) { + sendUserToast(`Could not set global cache: ${err}`, true) + } + }} + options={{ right: 'global cache to s3' }} + disabled={!$enterpriseLicense} + /> +
+ {/if} {#if workers != undefined} {#if groupedWorkers.length == 0}

No workers seems to be available