Modern Docker Management, Designed for Everyone
Go composecontainer-managementcontainersdockerdocker-composedocker-managementgoself-hostedsveltekittypescriptweb-ui
fix: require saved job enablement before manual runs (#4550)
I'm Groot 🌳f9cd3608a618
diff --git a/frontend/messages/en.json b/frontend/messages/en.jsonindex 6f14f7cb9..6356e0099 100644--- a/frontend/messages/en.json+++ b/frontend/messages/en.json@@ -3738,6 +3738,7 @@"system_volume_backups_ignore_anonymous": "Ignore anonymous volumes","system_volume_backups_ignore_anonymous_description": "Anonymous Docker volumes remain visible above but are skipped during backup runs.","jobs_run_queued": "Run queued",+ "jobs_save_before_run": "Save the job settings before running this job.","jobs_submitting": "Queuing…","jobs_run_history": "Run history","jobs_run_attempts": "Attempts",diff --git a/frontend/src/lib/hooks/use-job-actions.svelte.ts b/frontend/src/lib/hooks/use-job-actions.svelte.tsindex 8a33bf6eb..3747a8185 100644--- a/frontend/src/lib/hooks/use-job-actions.svelte.ts+++ b/frontend/src/lib/hooks/use-job-actions.svelte.ts@@ -37,15 +37,18 @@ export function useJobActions(getOptions: () => JobActionOptions) {const options = $derived(getOptions());const run = $derived(options.job.currentRun ?? options.job.lastRun);const isEnabled = $derived(options.enabledOverride ?? options.job.enabled);+ const requiresSave = $derived(isEnabled && !options.job.enabled);const managerLocked = $derived(options.isAgent && options.job.managerOnly);const canRun = $derived(- options.durableRuns && isEnabled && options.job.canRunManually && !runMutation.isPending && !managerLocked+ options.durableRuns && isEnabled && !requiresSave && options.job.canRunManually && !runMutation.isPending && !managerLocked);const canEditSchedule = $derived(isEnabled && !!options.job.settingsKey && !managerLocked);const canRestartWorker = $derived(options.durableRuns && options.job.isContinuous && isEnabled);- const description = $derived(- options.job.id.startsWith('environment-health:') ? m.jobs_health_scope_description() : options.job.description- );+ const description = $derived.by(() => {+ if (requiresSave) return m.jobs_save_before_run();+ if (options.job.id.startsWith('environment-health:')) return m.jobs_health_scope_description();+ return options.job.description;+ });return {runMutation,diff --git a/frontend/src/routes/(app)/environments/[id]/+page.svelte b/frontend/src/routes/(app)/environments/[id]/+page.svelteindex ba15d3c02..e9ddc1f38 100644--- a/frontend/src/routes/(app)/environments/[id]/+page.svelte+++ b/frontend/src/routes/(app)/environments/[id]/+page.svelte@@ -485,6 +485,7 @@// The root load's refresh re-reads the environment list into the store.await queryClient.invalidateQueries({ queryKey: queryKeys.environments.all });+ await queryClient.invalidateQueries({ queryKey: queryKeys.jobs.list(environmentId) });await refreshEnvironment();}