feat: add default container config editor to Environments admin page
All checks were successful
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 1m20s
CI / docker (push) Successful in 1m8s
CI / deploy-feature (push) Has been skipped
CI / deploy (push) Successful in 36s

New "Default Resource Limits" section in environment detail view with
memory limit/reserve, CPU shares/limit. These defaults apply to new
apps unless overridden per-app.

Added useUpdateDefaultContainerConfig hook for the PUT endpoint.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-08 18:52:39 +02:00
parent 0ccb8bc68d
commit 863a992cc4
2 changed files with 105 additions and 1 deletions

View File

@@ -54,6 +54,18 @@ export function useUpdateEnvironment() {
});
}
export function useUpdateDefaultContainerConfig() {
const qc = useQueryClient();
return useMutation({
mutationFn: ({ id, config }: { id: string; config: Record<string, unknown> }) =>
adminFetch<Environment>(`/environments/${id}/default-container-config`, {
method: 'PUT',
body: JSON.stringify(config),
}),
onSuccess: () => qc.invalidateQueries({ queryKey: ['admin', 'environments'] }),
});
}
export function useDeleteEnvironment() {
const qc = useQueryClient();
return useMutation({