mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-15 16:35:17 +00:00
[autofix.ci] apply automated fixes
This commit is contained in:
@@ -47,11 +47,13 @@ export const EditTraefikEnv = ({ children, serverId }: Props) => {
|
|||||||
const { mutateAsync, isLoading, error, isError } =
|
const { mutateAsync, isLoading, error, isError } =
|
||||||
api.settings.writeTraefikEnv.useMutation();
|
api.settings.writeTraefikEnv.useMutation();
|
||||||
|
|
||||||
const { execute: executeWithHealthCheck, isExecuting: isHealthCheckExecuting } =
|
const {
|
||||||
useHealthCheckAfterMutation({
|
execute: executeWithHealthCheck,
|
||||||
initialDelay: 5000,
|
isExecuting: isHealthCheckExecuting,
|
||||||
successMessage: "Traefik Env Updated",
|
} = useHealthCheckAfterMutation({
|
||||||
});
|
initialDelay: 5000,
|
||||||
|
successMessage: "Traefik Env Updated",
|
||||||
|
});
|
||||||
|
|
||||||
const form = useForm<Schema>({
|
const form = useForm<Schema>({
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
|
|||||||
@@ -79,15 +79,17 @@ export const ManageTraefikPorts = ({ children, serverId }: Props) => {
|
|||||||
const { mutateAsync: updatePorts, isLoading } =
|
const { mutateAsync: updatePorts, isLoading } =
|
||||||
api.settings.updateTraefikPorts.useMutation();
|
api.settings.updateTraefikPorts.useMutation();
|
||||||
|
|
||||||
const { execute: executeWithHealthCheck, isExecuting: isHealthCheckExecuting } =
|
const {
|
||||||
useHealthCheckAfterMutation({
|
execute: executeWithHealthCheck,
|
||||||
initialDelay: 5000,
|
isExecuting: isHealthCheckExecuting,
|
||||||
successMessage: t("settings.server.webServer.traefik.portsUpdated"),
|
} = useHealthCheckAfterMutation({
|
||||||
onSuccess: () => {
|
initialDelay: 5000,
|
||||||
refetchPorts();
|
successMessage: t("settings.server.webServer.traefik.portsUpdated"),
|
||||||
setOpen(false);
|
onSuccess: () => {
|
||||||
},
|
refetchPorts();
|
||||||
});
|
setOpen(false);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (currentPorts) {
|
if (currentPorts) {
|
||||||
|
|||||||
@@ -66,13 +66,7 @@ export const useHealthCheckAfterMutation = ({
|
|||||||
|
|
||||||
await new Promise((resolve) => setTimeout(resolve, pollInterval));
|
await new Promise((resolve) => setTimeout(resolve, pollInterval));
|
||||||
await pollUntilHealthy();
|
await pollUntilHealthy();
|
||||||
}, [
|
}, [checkHealth, successMessage, reloadOnSuccess, onSuccess, pollInterval]);
|
||||||
checkHealth,
|
|
||||||
successMessage,
|
|
||||||
reloadOnSuccess,
|
|
||||||
onSuccess,
|
|
||||||
pollInterval,
|
|
||||||
]);
|
|
||||||
|
|
||||||
const execute = useCallback(
|
const execute = useCallback(
|
||||||
async <T>(mutationFn: () => Promise<T>): Promise<T> => {
|
async <T>(mutationFn: () => Promise<T>): Promise<T> => {
|
||||||
|
|||||||
Reference in New Issue
Block a user