feat: add default container config editor to Environments admin page
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:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user