mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
@@ -259,7 +259,7 @@ export const AddSwarmSettings = ({ applicationId }: Props) => {
|
|||||||
refetch();
|
refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update the swarm settings");
|
toast.error("Error updating the swarm settings");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ export const ShowClusterSettings = ({ applicationId }: Props) => {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update the command");
|
toast.error("Error updating the command");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export const AddCommand = ({ applicationId }: Props) => {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update the command");
|
toast.error("Error updating the command");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ export const AddPort = ({
|
|||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to create the port");
|
toast.error("Error creating the port");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -47,10 +47,10 @@ export const DeletePort = ({ portId }: Props) => {
|
|||||||
applicationId: data?.applicationId,
|
applicationId: data?.applicationId,
|
||||||
});
|
});
|
||||||
|
|
||||||
toast.success("Port delete succesfully");
|
toast.success("Port delete successfully");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to delete the port");
|
toast.error("Error deleting the port");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ export const UpdatePort = ({ portId }: Props) => {
|
|||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update the port");
|
toast.error("Error updating the port");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ export const AddRedirect = ({
|
|||||||
onDialogToggle(false);
|
onDialogToggle(false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to create the redirect");
|
toast.error("Error creating the redirect");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -50,10 +50,10 @@ export const DeleteRedirect = ({ redirectId }: Props) => {
|
|||||||
utils.application.readTraefikConfig.invalidate({
|
utils.application.readTraefikConfig.invalidate({
|
||||||
applicationId: data?.applicationId,
|
applicationId: data?.applicationId,
|
||||||
});
|
});
|
||||||
toast.success("Redirect delete succesfully");
|
toast.success("Redirect delete successfully");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to delete the redirect");
|
toast.error("Error deleting the redirect");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ export const UpdateRedirect = ({ redirectId }: Props) => {
|
|||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update the redirect");
|
toast.error("Error updating the redirect");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ export const AddSecurity = ({
|
|||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to create the security");
|
toast.error("Error creating security");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -50,10 +50,10 @@ export const DeleteSecurity = ({ securityId }: Props) => {
|
|||||||
utils.application.readTraefikConfig.invalidate({
|
utils.application.readTraefikConfig.invalidate({
|
||||||
applicationId: data?.applicationId,
|
applicationId: data?.applicationId,
|
||||||
});
|
});
|
||||||
toast.success("Security delete succesfully");
|
toast.success("Security delete successfully");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to delete the security");
|
toast.error("Error deleting the security");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ export const UpdateSecurity = ({ securityId }: Props) => {
|
|||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update the security");
|
toast.error("Error updating the security");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,13 @@ import React, { useEffect } from "react";
|
|||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
import {
|
||||||
|
Tooltip,
|
||||||
|
TooltipContent,
|
||||||
|
TooltipProvider,
|
||||||
|
TooltipTrigger,
|
||||||
|
} from "@/components/ui/tooltip";
|
||||||
|
import { InfoIcon } from "lucide-react";
|
||||||
|
|
||||||
const addResourcesApplication = z.object({
|
const addResourcesApplication = z.object({
|
||||||
memoryReservation: z.number().nullable().optional(),
|
memoryReservation: z.number().nullable().optional(),
|
||||||
@@ -72,7 +79,7 @@ export const ShowApplicationResources = ({ applicationId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to Update the resources");
|
toast.error("Error updating the resources");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
@@ -101,10 +108,25 @@ export const ShowApplicationResources = ({ applicationId }: Props) => {
|
|||||||
name="memoryReservation"
|
name="memoryReservation"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Memory Reservation</FormLabel>
|
<div className="flex items-center gap-2">
|
||||||
|
<FormLabel>Memory Reservation</FormLabel>
|
||||||
|
<TooltipProvider>
|
||||||
|
<Tooltip delayDuration={0}>
|
||||||
|
<TooltipTrigger>
|
||||||
|
<InfoIcon className="h-4 w-4 text-muted-foreground" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>
|
||||||
|
Memory soft limit in bytes. Example: 256MB =
|
||||||
|
268435456 bytes
|
||||||
|
</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder="256 MB"
|
placeholder="268435456 (256MB in bytes)"
|
||||||
{...field}
|
{...field}
|
||||||
value={field.value?.toString() || ""}
|
value={field.value?.toString() || ""}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
@@ -120,7 +142,6 @@ export const ShowApplicationResources = ({ applicationId }: Props) => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
@@ -132,10 +153,25 @@ export const ShowApplicationResources = ({ applicationId }: Props) => {
|
|||||||
render={({ field }) => {
|
render={({ field }) => {
|
||||||
return (
|
return (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Memory Limit</FormLabel>
|
<div className="flex items-center gap-2">
|
||||||
|
<FormLabel>Memory Limit</FormLabel>
|
||||||
|
<TooltipProvider>
|
||||||
|
<Tooltip delayDuration={0}>
|
||||||
|
<TooltipTrigger>
|
||||||
|
<InfoIcon className="h-4 w-4 text-muted-foreground" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>
|
||||||
|
Memory hard limit in bytes. Example: 1GB =
|
||||||
|
1073741824 bytes
|
||||||
|
</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder={"1024 MB"}
|
placeholder="1073741824 (1GB in bytes)"
|
||||||
{...field}
|
{...field}
|
||||||
value={field.value?.toString() || ""}
|
value={field.value?.toString() || ""}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
@@ -163,21 +199,36 @@ export const ShowApplicationResources = ({ applicationId }: Props) => {
|
|||||||
render={({ field }) => {
|
render={({ field }) => {
|
||||||
return (
|
return (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Cpu Limit</FormLabel>
|
<div className="flex items-center gap-2">
|
||||||
|
<FormLabel>CPU Limit</FormLabel>
|
||||||
|
<TooltipProvider>
|
||||||
|
<Tooltip delayDuration={0}>
|
||||||
|
<TooltipTrigger>
|
||||||
|
<InfoIcon className="h-4 w-4 text-muted-foreground" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>
|
||||||
|
CPU quota in units of 10^-9 CPUs. Example: 2
|
||||||
|
CPUs = 2000000000
|
||||||
|
</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder={"2"}
|
placeholder="2000000000 (2 CPUs)"
|
||||||
{...field}
|
{...field}
|
||||||
type="number"
|
|
||||||
value={field.value?.toString() || ""}
|
value={field.value?.toString() || ""}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const value = e.target.value;
|
const value = e.target.value;
|
||||||
if (
|
if (value === "") {
|
||||||
value === "" ||
|
field.onChange(null);
|
||||||
/^[0-9]*\.?[0-9]*$/.test(value)
|
} else {
|
||||||
) {
|
const number = Number.parseInt(value, 10);
|
||||||
const float = Number.parseFloat(value);
|
if (!Number.isNaN(number)) {
|
||||||
field.onChange(float);
|
field.onChange(number);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@@ -193,21 +244,36 @@ export const ShowApplicationResources = ({ applicationId }: Props) => {
|
|||||||
render={({ field }) => {
|
render={({ field }) => {
|
||||||
return (
|
return (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Cpu Reservation</FormLabel>
|
<div className="flex items-center gap-2">
|
||||||
|
<FormLabel>CPU Reservation</FormLabel>
|
||||||
|
<TooltipProvider>
|
||||||
|
<Tooltip delayDuration={0}>
|
||||||
|
<TooltipTrigger>
|
||||||
|
<InfoIcon className="h-4 w-4 text-muted-foreground" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>
|
||||||
|
CPU shares (relative weight). Example: 1 CPU =
|
||||||
|
1000000000
|
||||||
|
</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder={"1"}
|
placeholder="1000000000 (1 CPU)"
|
||||||
{...field}
|
{...field}
|
||||||
type="number"
|
|
||||||
value={field.value?.toString() || ""}
|
value={field.value?.toString() || ""}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const value = e.target.value;
|
const value = e.target.value;
|
||||||
if (
|
if (value === "") {
|
||||||
value === "" ||
|
field.onChange(null);
|
||||||
/^[0-9]*\.?[0-9]*$/.test(value)
|
} else {
|
||||||
) {
|
const number = Number.parseInt(value, 10);
|
||||||
const float = Number.parseFloat(value);
|
if (!Number.isNaN(number)) {
|
||||||
field.onChange(float);
|
field.onChange(number);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ export const UpdateTraefikConfig = ({ applicationId }: Props) => {
|
|||||||
form.reset();
|
form.reset();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update the traefik config");
|
toast.error("Error updating the Traefik config");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ export const AddVolumes = ({
|
|||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to create the Bind mount");
|
toast.error("Error creating the Bind mount");
|
||||||
});
|
});
|
||||||
} else if (data.type === "volume") {
|
} else if (data.type === "volume") {
|
||||||
await mutateAsync({
|
await mutateAsync({
|
||||||
@@ -122,7 +122,7 @@ export const AddVolumes = ({
|
|||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to create the Volume mount");
|
toast.error("Error creating the Volume mount");
|
||||||
});
|
});
|
||||||
} else if (data.type === "file") {
|
} else if (data.type === "file") {
|
||||||
await mutateAsync({
|
await mutateAsync({
|
||||||
@@ -138,7 +138,7 @@ export const AddVolumes = ({
|
|||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to create the File mount");
|
toast.error("Error creating the File mount");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ export const DeleteVolume = ({ mountId, refetch }: Props) => {
|
|||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
refetch();
|
refetch();
|
||||||
toast.success("Mount deleted succesfully");
|
toast.success("Mount deleted successfully");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to delete the mount");
|
toast.error("Error deleting the mount");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ export const UpdateVolume = ({
|
|||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update the Bind mount");
|
toast.error("Error updating the Bind mount");
|
||||||
});
|
});
|
||||||
} else if (data.type === "volume") {
|
} else if (data.type === "volume") {
|
||||||
await mutateAsync({
|
await mutateAsync({
|
||||||
@@ -153,7 +153,7 @@ export const UpdateVolume = ({
|
|||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update the Volume mount");
|
toast.error("Error updating the Volume mount");
|
||||||
});
|
});
|
||||||
} else if (data.type === "file") {
|
} else if (data.type === "file") {
|
||||||
await mutateAsync({
|
await mutateAsync({
|
||||||
@@ -168,7 +168,7 @@ export const UpdateVolume = ({
|
|||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update the File mount");
|
toast.error("Error updating the File mount");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
refetch();
|
refetch();
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ export const ShowBuildChooseForm = ({ applicationId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to save the build type");
|
toast.error("Error saving the build type");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export const RefreshToken = ({ applicationId }: Props) => {
|
|||||||
toast.success("Refresh updated");
|
toast.success("Refresh updated");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update the refresh token");
|
toast.error("Error updating the refresh token");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -105,8 +105,8 @@ export const AddDomain = ({
|
|||||||
const dictionary = {
|
const dictionary = {
|
||||||
success: domainId ? "Domain Updated" : "Domain Created",
|
success: domainId ? "Domain Updated" : "Domain Created",
|
||||||
error: domainId
|
error: domainId
|
||||||
? "Error to update the domain"
|
? "Error updating the domain"
|
||||||
: "Error to create the domain",
|
: "Error creating the domain",
|
||||||
submit: domainId ? "Update" : "Create",
|
submit: domainId ? "Update" : "Create",
|
||||||
dialogDescription: domainId
|
dialogDescription: domainId
|
||||||
? "In this section you can edit a domain"
|
? "In this section you can edit a domain"
|
||||||
|
|||||||
@@ -57,10 +57,10 @@ export const DeleteDomain = ({ domainId }: Props) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
toast.success("Domain delete succesfully");
|
toast.success("Domain delete successfully");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to delete Domain");
|
toast.error("Error deleting the Domain");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export const ShowEnvironment = ({ applicationId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to add environment");
|
toast.error("Error adding environment");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export const DeployApplication = ({ applicationId }: Props) => {
|
|||||||
applicationId,
|
applicationId,
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
toast.success("Application deployed succesfully");
|
toast.success("Application deployed successfully");
|
||||||
await refetch();
|
await refetch();
|
||||||
router.push(
|
router.push(
|
||||||
`/dashboard/project/${data?.projectId}/services/application/${applicationId}?tab=deployments`,
|
`/dashboard/project/${data?.projectId}/services/application/${applicationId}?tab=deployments`,
|
||||||
@@ -59,7 +59,7 @@ export const DeployApplication = ({ applicationId }: Props) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to deploy Application");
|
toast.error("Error deploying the Application");
|
||||||
});
|
});
|
||||||
|
|
||||||
await refetch();
|
await refetch();
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ export const SaveBitbucketProvider = ({ applicationId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to save the Bitbucket provider");
|
toast.error("Error saving the Bitbucket provider");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ export const SaveDockerProvider = ({ applicationId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to save the Docker provider");
|
toast.error("Error saving the Docker provider");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export const SaveDragNDrop = ({ applicationId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to save the deployment");
|
toast.error("Error saving the deployment");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ export const SaveGitProvider = ({ applicationId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to save the Git provider");
|
toast.error("Error saving the Git provider");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ export const SaveGithubProvider = ({ applicationId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to save the github provider");
|
toast.error("Error saving the github provider");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ export const SaveGitlabProvider = ({ applicationId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to save the gitlab provider");
|
toast.error("Error saving the gitlab provider");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export const ResetApplication = ({ applicationId, appName }: Props) => {
|
|||||||
toast.success("Service Reloaded");
|
toast.success("Service Reloaded");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to reload the service");
|
toast.error("Error reloading the service");
|
||||||
});
|
});
|
||||||
await refetch();
|
await refetch();
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ export const ShowGeneralApplication = ({ applicationId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update Auto Deploy");
|
toast.error("Error updating Auto Deploy");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
className="flex flex-row gap-2 items-center"
|
className="flex flex-row gap-2 items-center"
|
||||||
|
|||||||
@@ -105,8 +105,8 @@ export const AddPreviewDomain = ({
|
|||||||
const dictionary = {
|
const dictionary = {
|
||||||
success: domainId ? "Domain Updated" : "Domain Created",
|
success: domainId ? "Domain Updated" : "Domain Created",
|
||||||
error: domainId
|
error: domainId
|
||||||
? "Error to update the domain"
|
? "Error updating the domain"
|
||||||
: "Error to create the domain",
|
: "Error creating the domain",
|
||||||
submit: domainId ? "Update" : "Create",
|
submit: domainId ? "Update" : "Create",
|
||||||
dialogDescription: domainId
|
dialogDescription: domainId
|
||||||
? "In this section you can edit a domain"
|
? "In this section you can edit a domain"
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ export const RedbuildApplication = ({ applicationId }: Props) => {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to rebuild the application");
|
toast.error("Error rebuilding the application");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -49,10 +49,10 @@ export const StartApplication = ({ applicationId }: Props) => {
|
|||||||
await utils.application.one.invalidate({
|
await utils.application.one.invalidate({
|
||||||
applicationId,
|
applicationId,
|
||||||
});
|
});
|
||||||
toast.success("Application started succesfully");
|
toast.success("Application started successfully");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to start the Application");
|
toast.error("Error starting the Application");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -49,10 +49,10 @@ export const StopApplication = ({ applicationId }: Props) => {
|
|||||||
await utils.application.one.invalidate({
|
await utils.application.one.invalidate({
|
||||||
applicationId,
|
applicationId,
|
||||||
});
|
});
|
||||||
toast.success("Application stopped succesfully");
|
toast.success("Application stopped successfully");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to stop the Application");
|
toast.error("Error stopping the Application");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -76,14 +76,14 @@ export const UpdateApplication = ({ applicationId }: Props) => {
|
|||||||
description: formData.description || "",
|
description: formData.description || "",
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
toast.success("Application updated succesfully");
|
toast.success("Application updated successfully");
|
||||||
utils.application.one.invalidate({
|
utils.application.one.invalidate({
|
||||||
applicationId: applicationId,
|
applicationId: applicationId,
|
||||||
});
|
});
|
||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update the application");
|
toast.error("Error updating the Application");
|
||||||
})
|
})
|
||||||
.finally(() => {});
|
.finally(() => {});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ export const AddCommandCompose = ({ composeId }: Props) => {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update the command");
|
toast.error("Error updating the command");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export const RefreshTokenCompose = ({ composeId }: Props) => {
|
|||||||
toast.success("Refresh Token updated");
|
toast.success("Refresh Token updated");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update the refresh token");
|
toast.error("Error updating the refresh token");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -127,8 +127,8 @@ export const AddDomainCompose = ({
|
|||||||
const dictionary = {
|
const dictionary = {
|
||||||
success: domainId ? "Domain Updated" : "Domain Created",
|
success: domainId ? "Domain Updated" : "Domain Created",
|
||||||
error: domainId
|
error: domainId
|
||||||
? "Error to update the domain"
|
? "Error updating the domain"
|
||||||
: "Error to create the domain",
|
: "Error creating the domain",
|
||||||
submit: domainId ? "Update" : "Create",
|
submit: domainId ? "Update" : "Create",
|
||||||
dialogDescription: domainId
|
dialogDescription: domainId
|
||||||
? "In this section you can edit a domain"
|
? "In this section you can edit a domain"
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export const ShowEnvironmentCompose = ({ composeId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to add environment");
|
toast.error("Error adding environment");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ export const ComposeActions = ({ composeId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update Auto Deploy");
|
toast.error("Error updating Auto Deploy");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
className="flex flex-row gap-2 items-center"
|
className="flex flex-row gap-2 items-center"
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ export const ComposeFileEditor = ({ composeId }: Props) => {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
toast.error("Error to update the compose config");
|
toast.error("Error updating the Compose config");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export const DeployCompose = ({ composeId }: Props) => {
|
|||||||
);
|
);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to deploy Compose");
|
toast.error("Error deploying Compose");
|
||||||
});
|
});
|
||||||
|
|
||||||
await refetch();
|
await refetch();
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ export const SaveBitbucketProviderCompose = ({ composeId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to save the Bitbucket provider");
|
toast.error("Error saving the Bitbucket provider");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ export const SaveGitProviderCompose = ({ composeId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to save the Git provider");
|
toast.error("Error saving the Git provider");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ export const SaveGithubProviderCompose = ({ composeId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to save the github provider");
|
toast.error("Error saving the Github provider");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ export const SaveGitlabProviderCompose = ({ composeId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to save the gitlab provider");
|
toast.error("Error saving the Gitlab provider");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ export const RandomizeCompose = ({ composeId }: Props) => {
|
|||||||
toast.success("Compose updated");
|
toast.success("Compose updated");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to randomize the compose");
|
toast.error("Error randomizing the compose");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ export const RandomizeCompose = ({ composeId }: Props) => {
|
|||||||
toast.success("Compose randomized");
|
toast.success("Compose randomized");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to randomize the compose");
|
toast.error("Error randomizing the compose");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ export const RedbuildCompose = ({ composeId }: Props) => {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to rebuild the compose");
|
toast.error("Error rebuilding the compose");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ export const ShowConvertedCompose = ({ composeId }: Props) => {
|
|||||||
toast.success("Fetched source type");
|
toast.success("Fetched source type");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
toast.error("Error to fetch source type", {
|
toast.error("Error fetching source type", {
|
||||||
description: err.message,
|
description: err.message,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -53,10 +53,10 @@ export const StopCompose = ({ composeId }: Props) => {
|
|||||||
await utils.compose.one.invalidate({
|
await utils.compose.one.invalidate({
|
||||||
composeId,
|
composeId,
|
||||||
});
|
});
|
||||||
toast.success("Compose stopped succesfully");
|
toast.success("Compose stopped successfully");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to stop the compose");
|
toast.error("Error stopping the compose");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -49,10 +49,10 @@ export const StartCompose = ({ composeId }: Props) => {
|
|||||||
await utils.compose.one.invalidate({
|
await utils.compose.one.invalidate({
|
||||||
composeId,
|
composeId,
|
||||||
});
|
});
|
||||||
toast.success("Compose started succesfully");
|
toast.success("Compose started successfully");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to start the Compose");
|
toast.error("Error starting the Compose");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -49,10 +49,10 @@ export const StopCompose = ({ composeId }: Props) => {
|
|||||||
await utils.compose.one.invalidate({
|
await utils.compose.one.invalidate({
|
||||||
composeId,
|
composeId,
|
||||||
});
|
});
|
||||||
toast.success("Compose stopped succesfully");
|
toast.success("Compose stopped successfully");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to stop the Compose");
|
toast.error("Error stopping the Compose");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -76,14 +76,14 @@ export const UpdateCompose = ({ composeId }: Props) => {
|
|||||||
description: formData.description || "",
|
description: formData.description || "",
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
toast.success("Compose updated succesfully");
|
toast.success("Compose updated successfully");
|
||||||
utils.compose.one.invalidate({
|
utils.compose.one.invalidate({
|
||||||
composeId: composeId,
|
composeId: composeId,
|
||||||
});
|
});
|
||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update the Compose");
|
toast.error("Error updating the Compose");
|
||||||
})
|
})
|
||||||
.finally(() => {});
|
.finally(() => {});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ export const AddBackup = ({ databaseId, databaseType, refetch }: Props) => {
|
|||||||
refetch();
|
refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to create a backup");
|
toast.error("Error creating a backup");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -46,10 +46,10 @@ export const DeleteBackup = ({ backupId, refetch }: Props) => {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
refetch();
|
refetch();
|
||||||
|
|
||||||
toast.success("Backup delete succesfully");
|
toast.success("Backup deleted successfully");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to delete the backup");
|
toast.error("Error deleting the backup");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ export const UpdateBackup = ({ backupId, refetch }: Props) => {
|
|||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update the backup");
|
toast.error("Error updating the Backup");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ export const ShowTraefikFile = ({ path, serverId }: Props) => {
|
|||||||
refetch();
|
refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update the traefik config");
|
toast.error("Error updating the Traefik config");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ export const ShowAdvancedMariadb = ({ mariadbId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to Update the resources");
|
toast.error("Error updating the resources");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -18,6 +18,13 @@ import {
|
|||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import { api } from "@/utils/api";
|
import { api } from "@/utils/api";
|
||||||
import { zodResolver } from "@hookform/resolvers/zod";
|
import { zodResolver } from "@hookform/resolvers/zod";
|
||||||
|
import {
|
||||||
|
TooltipProvider,
|
||||||
|
TooltipTrigger,
|
||||||
|
TooltipContent,
|
||||||
|
Tooltip,
|
||||||
|
} from "@/components/ui/tooltip";
|
||||||
|
import { InfoIcon } from "lucide-react";
|
||||||
import React, { useEffect } from "react";
|
import React, { useEffect } from "react";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
@@ -71,7 +78,7 @@ export const ShowMariadbResources = ({ mariadbId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to Update the resources");
|
toast.error("Error updating the resources");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
@@ -100,28 +107,40 @@ export const ShowMariadbResources = ({ mariadbId }: Props) => {
|
|||||||
name="memoryReservation"
|
name="memoryReservation"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Memory Reservation</FormLabel>
|
<div className="flex items-center gap-2">
|
||||||
|
<FormLabel>Memory Reservation</FormLabel>
|
||||||
|
<TooltipProvider>
|
||||||
|
<Tooltip delayDuration={0}>
|
||||||
|
<TooltipTrigger>
|
||||||
|
<InfoIcon className="h-4 w-4 text-muted-foreground" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>
|
||||||
|
Memory soft limit in bytes. Example: 256MB =
|
||||||
|
268435456 bytes
|
||||||
|
</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder="256 MB"
|
placeholder="268435456 (256MB in bytes)"
|
||||||
{...field}
|
{...field}
|
||||||
value={field.value?.toString() || ""}
|
value={field.value?.toString() || ""}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const value = e.target.value;
|
const value = e.target.value;
|
||||||
if (value === "") {
|
if (value === "") {
|
||||||
// Si el campo está vacío, establece el valor como null.
|
|
||||||
field.onChange(null);
|
field.onChange(null);
|
||||||
} else {
|
} else {
|
||||||
const number = Number.parseInt(value, 10);
|
const number = Number.parseInt(value, 10);
|
||||||
if (!Number.isNaN(number)) {
|
if (!Number.isNaN(number)) {
|
||||||
// Solo actualiza el valor si se convierte a un número válido.
|
|
||||||
field.onChange(number);
|
field.onChange(number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
@@ -133,21 +152,34 @@ export const ShowMariadbResources = ({ mariadbId }: Props) => {
|
|||||||
render={({ field }) => {
|
render={({ field }) => {
|
||||||
return (
|
return (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Memory Limit</FormLabel>
|
<div className="flex items-center gap-2">
|
||||||
|
<FormLabel>Memory Limit</FormLabel>
|
||||||
|
<TooltipProvider>
|
||||||
|
<Tooltip delayDuration={0}>
|
||||||
|
<TooltipTrigger>
|
||||||
|
<InfoIcon className="h-4 w-4 text-muted-foreground" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>
|
||||||
|
Memory hard limit in bytes. Example: 1GB =
|
||||||
|
1073741824 bytes
|
||||||
|
</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder={"1024 MB"}
|
placeholder="1073741824 (1GB in bytes)"
|
||||||
{...field}
|
{...field}
|
||||||
value={field.value?.toString() || ""}
|
value={field.value?.toString() || ""}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const value = e.target.value;
|
const value = e.target.value;
|
||||||
if (value === "") {
|
if (value === "") {
|
||||||
// Si el campo está vacío, establece el valor como null.
|
|
||||||
field.onChange(null);
|
field.onChange(null);
|
||||||
} else {
|
} else {
|
||||||
const number = Number.parseInt(value, 10);
|
const number = Number.parseInt(value, 10);
|
||||||
if (!Number.isNaN(number)) {
|
if (!Number.isNaN(number)) {
|
||||||
// Solo actualiza el valor si se convierte a un número válido.
|
|
||||||
field.onChange(number);
|
field.onChange(number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -166,21 +198,34 @@ export const ShowMariadbResources = ({ mariadbId }: Props) => {
|
|||||||
render={({ field }) => {
|
render={({ field }) => {
|
||||||
return (
|
return (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Cpu Limit</FormLabel>
|
<div className="flex items-center gap-2">
|
||||||
|
<FormLabel>CPU Limit</FormLabel>
|
||||||
|
<TooltipProvider>
|
||||||
|
<Tooltip delayDuration={0}>
|
||||||
|
<TooltipTrigger>
|
||||||
|
<InfoIcon className="h-4 w-4 text-muted-foreground" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>
|
||||||
|
CPU quota in units of 10^-9 CPUs. Example: 2
|
||||||
|
CPUs = 2000000000
|
||||||
|
</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder={"2"}
|
placeholder="2000000000 (2 CPUs)"
|
||||||
{...field}
|
{...field}
|
||||||
value={field.value?.toString() || ""}
|
value={field.value?.toString() || ""}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const value = e.target.value;
|
const value = e.target.value;
|
||||||
if (value === "") {
|
if (value === "") {
|
||||||
// Si el campo está vacío, establece el valor como null.
|
|
||||||
field.onChange(null);
|
field.onChange(null);
|
||||||
} else {
|
} else {
|
||||||
const number = Number.parseInt(value, 10);
|
const number = Number.parseInt(value, 10);
|
||||||
if (!Number.isNaN(number)) {
|
if (!Number.isNaN(number)) {
|
||||||
// Solo actualiza el valor si se convierte a un número válido.
|
|
||||||
field.onChange(number);
|
field.onChange(number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -198,21 +243,34 @@ export const ShowMariadbResources = ({ mariadbId }: Props) => {
|
|||||||
render={({ field }) => {
|
render={({ field }) => {
|
||||||
return (
|
return (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Cpu Reservation</FormLabel>
|
<div className="flex items-center gap-2">
|
||||||
|
<FormLabel>CPU Reservation</FormLabel>
|
||||||
|
<TooltipProvider>
|
||||||
|
<Tooltip delayDuration={0}>
|
||||||
|
<TooltipTrigger>
|
||||||
|
<InfoIcon className="h-4 w-4 text-muted-foreground" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>
|
||||||
|
CPU shares (relative weight). Example: 1 CPU =
|
||||||
|
1000000000
|
||||||
|
</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder={"1"}
|
placeholder="1000000000 (1 CPU)"
|
||||||
{...field}
|
{...field}
|
||||||
value={field.value?.toString() || ""}
|
value={field.value?.toString() || ""}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const value = e.target.value;
|
const value = e.target.value;
|
||||||
if (value === "") {
|
if (value === "") {
|
||||||
// Si el campo está vacío, establece el valor como null.
|
|
||||||
field.onChange(null);
|
field.onChange(null);
|
||||||
} else {
|
} else {
|
||||||
const number = Number.parseInt(value, 10);
|
const number = Number.parseInt(value, 10);
|
||||||
if (!Number.isNaN(number)) {
|
if (!Number.isNaN(number)) {
|
||||||
// Solo actualiza el valor si se convierte a un número válido.
|
|
||||||
field.onChange(number);
|
field.onChange(number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ export const ShowBackupMariadb = ({ mariadbId }: Props) => {
|
|||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error(
|
toast.error(
|
||||||
"Error to Create the manual backup",
|
"Error creating the manual backup",
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export const ShowMariadbEnvironment = ({ mariadbId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to add environment");
|
toast.error("Error adding environment");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -55,12 +55,12 @@ export const DeployMariadb = ({ mariadbId }: Props) => {
|
|||||||
await deploy({
|
await deploy({
|
||||||
mariadbId,
|
mariadbId,
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
toast.error("Error to deploy Database");
|
toast.error("Error deploying Database");
|
||||||
});
|
});
|
||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
toast.error(e.message || "Error to deploy Database");
|
toast.error(e.message || "Error deploying Database");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export const ResetMariadb = ({ mariadbId, appName }: Props) => {
|
|||||||
toast.success("Service Reloaded");
|
toast.success("Service Reloaded");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to reload the service");
|
toast.error("Error reloading the service");
|
||||||
});
|
});
|
||||||
await refetch();
|
await refetch();
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ export const ShowExternalMariadbCredentials = ({ mariadbId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to save the external port");
|
toast.error("Error saving the external port");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -49,10 +49,10 @@ export const StopMariadb = ({ mariadbId }: Props) => {
|
|||||||
await utils.mariadb.one.invalidate({
|
await utils.mariadb.one.invalidate({
|
||||||
mariadbId,
|
mariadbId,
|
||||||
});
|
});
|
||||||
toast.success("Application stopped succesfully");
|
toast.success("Application stopped successfully");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to stop the Application");
|
toast.error("Error stopping the Application");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -49,10 +49,10 @@ export const StartMariadb = ({ mariadbId }: Props) => {
|
|||||||
await utils.mariadb.one.invalidate({
|
await utils.mariadb.one.invalidate({
|
||||||
mariadbId,
|
mariadbId,
|
||||||
});
|
});
|
||||||
toast.success("Database started succesfully");
|
toast.success("Database started successfully");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to start the Database");
|
toast.error("Error starting the Database");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -75,13 +75,13 @@ export const UpdateMariadb = ({ mariadbId }: Props) => {
|
|||||||
description: formData.description || "",
|
description: formData.description || "",
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
toast.success("MariaDB updated succesfully");
|
toast.success("MariaDB updated successfully");
|
||||||
utils.mariadb.one.invalidate({
|
utils.mariadb.one.invalidate({
|
||||||
mariadbId: mariadbId,
|
mariadbId: mariadbId,
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update the Mariadb");
|
toast.error("Error updating the Mariadb");
|
||||||
})
|
})
|
||||||
.finally(() => {});
|
.finally(() => {});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ export const ShowAdvancedMongo = ({ mongoId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to Update the resources");
|
toast.error("Error updating the resources");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -19,6 +19,13 @@ import { Input } from "@/components/ui/input";
|
|||||||
import { api } from "@/utils/api";
|
import { api } from "@/utils/api";
|
||||||
import { zodResolver } from "@hookform/resolvers/zod";
|
import { zodResolver } from "@hookform/resolvers/zod";
|
||||||
import React, { useEffect } from "react";
|
import React, { useEffect } from "react";
|
||||||
|
import {
|
||||||
|
TooltipProvider,
|
||||||
|
TooltipTrigger,
|
||||||
|
TooltipContent,
|
||||||
|
Tooltip,
|
||||||
|
} from "@/components/ui/tooltip";
|
||||||
|
import { InfoIcon } from "lucide-react";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
@@ -71,7 +78,7 @@ export const ShowMongoResources = ({ mongoId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to Update the resources");
|
toast.error("Error updating the resources");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
@@ -89,10 +96,6 @@ export const ShowMongoResources = ({ mongoId }: Props) => {
|
|||||||
the changes.
|
the changes.
|
||||||
</AlertBlock>
|
</AlertBlock>
|
||||||
<Form {...form}>
|
<Form {...form}>
|
||||||
<AlertBlock type="info">
|
|
||||||
Please remember to click Redeploy after modify the resources to
|
|
||||||
apply the changes.
|
|
||||||
</AlertBlock>
|
|
||||||
<form
|
<form
|
||||||
id="hook-form"
|
id="hook-form"
|
||||||
onSubmit={form.handleSubmit(onSubmit)}
|
onSubmit={form.handleSubmit(onSubmit)}
|
||||||
@@ -104,28 +107,40 @@ export const ShowMongoResources = ({ mongoId }: Props) => {
|
|||||||
name="memoryReservation"
|
name="memoryReservation"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Memory Reservation</FormLabel>
|
<div className="flex items-center gap-2">
|
||||||
|
<FormLabel>Memory Reservation</FormLabel>
|
||||||
|
<TooltipProvider>
|
||||||
|
<Tooltip delayDuration={0}>
|
||||||
|
<TooltipTrigger>
|
||||||
|
<InfoIcon className="h-4 w-4 text-muted-foreground" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>
|
||||||
|
Memory soft limit in bytes. Example: 256MB =
|
||||||
|
268435456 bytes
|
||||||
|
</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder="256 MB"
|
placeholder="268435456 (256MB in bytes)"
|
||||||
{...field}
|
{...field}
|
||||||
value={field.value?.toString() || ""}
|
value={field.value?.toString() || ""}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const value = e.target.value;
|
const value = e.target.value;
|
||||||
if (value === "") {
|
if (value === "") {
|
||||||
// Si el campo está vacío, establece el valor como null.
|
|
||||||
field.onChange(null);
|
field.onChange(null);
|
||||||
} else {
|
} else {
|
||||||
const number = Number.parseInt(value, 10);
|
const number = Number.parseInt(value, 10);
|
||||||
if (!Number.isNaN(number)) {
|
if (!Number.isNaN(number)) {
|
||||||
// Solo actualiza el valor si se convierte a un número válido.
|
|
||||||
field.onChange(number);
|
field.onChange(number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
@@ -137,21 +152,34 @@ export const ShowMongoResources = ({ mongoId }: Props) => {
|
|||||||
render={({ field }) => {
|
render={({ field }) => {
|
||||||
return (
|
return (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Memory Limit</FormLabel>
|
<div className="flex items-center gap-2">
|
||||||
|
<FormLabel>Memory Limit</FormLabel>
|
||||||
|
<TooltipProvider>
|
||||||
|
<Tooltip delayDuration={0}>
|
||||||
|
<TooltipTrigger>
|
||||||
|
<InfoIcon className="h-4 w-4 text-muted-foreground" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>
|
||||||
|
Memory hard limit in bytes. Example: 1GB =
|
||||||
|
1073741824 bytes
|
||||||
|
</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder={"1024 MB"}
|
placeholder="1073741824 (1GB in bytes)"
|
||||||
{...field}
|
{...field}
|
||||||
value={field.value?.toString() || ""}
|
value={field.value?.toString() || ""}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const value = e.target.value;
|
const value = e.target.value;
|
||||||
if (value === "") {
|
if (value === "") {
|
||||||
// Si el campo está vacío, establece el valor como null.
|
|
||||||
field.onChange(null);
|
field.onChange(null);
|
||||||
} else {
|
} else {
|
||||||
const number = Number.parseInt(value, 10);
|
const number = Number.parseInt(value, 10);
|
||||||
if (!Number.isNaN(number)) {
|
if (!Number.isNaN(number)) {
|
||||||
// Solo actualiza el valor si se convierte a un número válido.
|
|
||||||
field.onChange(number);
|
field.onChange(number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -170,21 +198,34 @@ export const ShowMongoResources = ({ mongoId }: Props) => {
|
|||||||
render={({ field }) => {
|
render={({ field }) => {
|
||||||
return (
|
return (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Cpu Limit</FormLabel>
|
<div className="flex items-center gap-2">
|
||||||
|
<FormLabel>CPU Limit</FormLabel>
|
||||||
|
<TooltipProvider>
|
||||||
|
<Tooltip delayDuration={0}>
|
||||||
|
<TooltipTrigger>
|
||||||
|
<InfoIcon className="h-4 w-4 text-muted-foreground" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>
|
||||||
|
CPU quota in units of 10^-9 CPUs. Example: 2
|
||||||
|
CPUs = 2000000000
|
||||||
|
</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder={"2"}
|
placeholder="2000000000 (2 CPUs)"
|
||||||
{...field}
|
{...field}
|
||||||
value={field.value?.toString() || ""}
|
value={field.value?.toString() || ""}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const value = e.target.value;
|
const value = e.target.value;
|
||||||
if (value === "") {
|
if (value === "") {
|
||||||
// Si el campo está vacío, establece el valor como null.
|
|
||||||
field.onChange(null);
|
field.onChange(null);
|
||||||
} else {
|
} else {
|
||||||
const number = Number.parseInt(value, 10);
|
const number = Number.parseInt(value, 10);
|
||||||
if (!Number.isNaN(number)) {
|
if (!Number.isNaN(number)) {
|
||||||
// Solo actualiza el valor si se convierte a un número válido.
|
|
||||||
field.onChange(number);
|
field.onChange(number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -202,21 +243,34 @@ export const ShowMongoResources = ({ mongoId }: Props) => {
|
|||||||
render={({ field }) => {
|
render={({ field }) => {
|
||||||
return (
|
return (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Cpu Reservation</FormLabel>
|
<div className="flex items-center gap-2">
|
||||||
|
<FormLabel>CPU Reservation</FormLabel>
|
||||||
|
<TooltipProvider>
|
||||||
|
<Tooltip delayDuration={0}>
|
||||||
|
<TooltipTrigger>
|
||||||
|
<InfoIcon className="h-4 w-4 text-muted-foreground" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>
|
||||||
|
CPU shares (relative weight). Example: 1 CPU =
|
||||||
|
1000000000
|
||||||
|
</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder={"1"}
|
placeholder="1000000000 (1 CPU)"
|
||||||
{...field}
|
{...field}
|
||||||
value={field.value?.toString() || ""}
|
value={field.value?.toString() || ""}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const value = e.target.value;
|
const value = e.target.value;
|
||||||
if (value === "") {
|
if (value === "") {
|
||||||
// Si el campo está vacío, establece el valor como null.
|
|
||||||
field.onChange(null);
|
field.onChange(null);
|
||||||
} else {
|
} else {
|
||||||
const number = Number.parseInt(value, 10);
|
const number = Number.parseInt(value, 10);
|
||||||
if (!Number.isNaN(number)) {
|
if (!Number.isNaN(number)) {
|
||||||
// Solo actualiza el valor si se convierte a un número válido.
|
|
||||||
field.onChange(number);
|
field.onChange(number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ export const ShowBackupMongo = ({ mongoId }: Props) => {
|
|||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error(
|
toast.error(
|
||||||
"Error to Create the manual backup",
|
"Error creating the manual backup",
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export const ShowMongoEnvironment = ({ mongoId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to add environment");
|
toast.error("Error adding environment");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -55,12 +55,12 @@ export const DeployMongo = ({ mongoId }: Props) => {
|
|||||||
await deploy({
|
await deploy({
|
||||||
mongoId,
|
mongoId,
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
toast.error("Error to deploy Database");
|
toast.error("Error deploying Database");
|
||||||
});
|
});
|
||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
toast.error(e.message || "Error to deploy Database");
|
toast.error(e.message || "Error deploying Database");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export const ResetMongo = ({ mongoId, appName }: Props) => {
|
|||||||
toast.success("Service Reloaded");
|
toast.success("Service Reloaded");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to reload the service");
|
toast.error("Error reloading the service");
|
||||||
});
|
});
|
||||||
await refetch();
|
await refetch();
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ export const ShowExternalMongoCredentials = ({ mongoId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to save the external port");
|
toast.error("Error saving the external port");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -49,10 +49,10 @@ export const StopMongo = ({ mongoId }: Props) => {
|
|||||||
await utils.mongo.one.invalidate({
|
await utils.mongo.one.invalidate({
|
||||||
mongoId,
|
mongoId,
|
||||||
});
|
});
|
||||||
toast.success("Application stopped succesfully");
|
toast.success("Application stopped successfully");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to stop the Application");
|
toast.error("Error stopping the Application");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -49,10 +49,10 @@ export const StartMongo = ({ mongoId }: Props) => {
|
|||||||
await utils.mongo.one.invalidate({
|
await utils.mongo.one.invalidate({
|
||||||
mongoId,
|
mongoId,
|
||||||
});
|
});
|
||||||
toast.success("Database started succesfully");
|
toast.success("Database started successfully");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to start the Database");
|
toast.error("Error starting the Database");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -76,14 +76,14 @@ export const UpdateMongo = ({ mongoId }: Props) => {
|
|||||||
description: formData.description || "",
|
description: formData.description || "",
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
toast.success("Mongo updated succesfully");
|
toast.success("Mongo updated successfully");
|
||||||
utils.mongo.one.invalidate({
|
utils.mongo.one.invalidate({
|
||||||
mongoId: mongoId,
|
mongoId: mongoId,
|
||||||
});
|
});
|
||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update mongo database");
|
toast.error("Error updating mongo database");
|
||||||
})
|
})
|
||||||
.finally(() => {});
|
.finally(() => {});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ export const ShowAdvancedMysql = ({ mysqlId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to Update the resources");
|
toast.error("Error updating the resources");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -20,6 +20,13 @@ import { api } from "@/utils/api";
|
|||||||
import { zodResolver } from "@hookform/resolvers/zod";
|
import { zodResolver } from "@hookform/resolvers/zod";
|
||||||
import React, { useEffect } from "react";
|
import React, { useEffect } from "react";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
|
import {
|
||||||
|
TooltipProvider,
|
||||||
|
TooltipTrigger,
|
||||||
|
TooltipContent,
|
||||||
|
Tooltip,
|
||||||
|
} from "@/components/ui/tooltip";
|
||||||
|
import { InfoIcon } from "lucide-react";
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
@@ -71,7 +78,7 @@ export const ShowMysqlResources = ({ mysqlId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to Update the resources");
|
toast.error("Error updating the resources");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
@@ -100,28 +107,40 @@ export const ShowMysqlResources = ({ mysqlId }: Props) => {
|
|||||||
name="memoryReservation"
|
name="memoryReservation"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Memory Reservation</FormLabel>
|
<div className="flex items-center gap-2">
|
||||||
|
<FormLabel>Memory Reservation</FormLabel>
|
||||||
|
<TooltipProvider>
|
||||||
|
<Tooltip delayDuration={0}>
|
||||||
|
<TooltipTrigger>
|
||||||
|
<InfoIcon className="h-4 w-4 text-muted-foreground" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>
|
||||||
|
Memory soft limit in bytes. Example: 256MB =
|
||||||
|
268435456 bytes
|
||||||
|
</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder="256 MB"
|
placeholder="268435456 (256MB in bytes)"
|
||||||
{...field}
|
{...field}
|
||||||
value={field.value?.toString() || ""}
|
value={field.value?.toString() || ""}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const value = e.target.value;
|
const value = e.target.value;
|
||||||
if (value === "") {
|
if (value === "") {
|
||||||
// Si el campo está vacío, establece el valor como null.
|
|
||||||
field.onChange(null);
|
field.onChange(null);
|
||||||
} else {
|
} else {
|
||||||
const number = Number.parseInt(value, 10);
|
const number = Number.parseInt(value, 10);
|
||||||
if (!Number.isNaN(number)) {
|
if (!Number.isNaN(number)) {
|
||||||
// Solo actualiza el valor si se convierte a un número válido.
|
|
||||||
field.onChange(number);
|
field.onChange(number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
@@ -133,21 +152,34 @@ export const ShowMysqlResources = ({ mysqlId }: Props) => {
|
|||||||
render={({ field }) => {
|
render={({ field }) => {
|
||||||
return (
|
return (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Memory Limit</FormLabel>
|
<div className="flex items-center gap-2">
|
||||||
|
<FormLabel>Memory Limit</FormLabel>
|
||||||
|
<TooltipProvider>
|
||||||
|
<Tooltip delayDuration={0}>
|
||||||
|
<TooltipTrigger>
|
||||||
|
<InfoIcon className="h-4 w-4 text-muted-foreground" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>
|
||||||
|
Memory hard limit in bytes. Example: 1GB =
|
||||||
|
1073741824 bytes
|
||||||
|
</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder={"1024 MB"}
|
placeholder="1073741824 (1GB in bytes)"
|
||||||
{...field}
|
{...field}
|
||||||
value={field.value?.toString() || ""}
|
value={field.value?.toString() || ""}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const value = e.target.value;
|
const value = e.target.value;
|
||||||
if (value === "") {
|
if (value === "") {
|
||||||
// Si el campo está vacío, establece el valor como null.
|
|
||||||
field.onChange(null);
|
field.onChange(null);
|
||||||
} else {
|
} else {
|
||||||
const number = Number.parseInt(value, 10);
|
const number = Number.parseInt(value, 10);
|
||||||
if (!Number.isNaN(number)) {
|
if (!Number.isNaN(number)) {
|
||||||
// Solo actualiza el valor si se convierte a un número válido.
|
|
||||||
field.onChange(number);
|
field.onChange(number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -166,21 +198,34 @@ export const ShowMysqlResources = ({ mysqlId }: Props) => {
|
|||||||
render={({ field }) => {
|
render={({ field }) => {
|
||||||
return (
|
return (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Cpu Limit</FormLabel>
|
<div className="flex items-center gap-2">
|
||||||
|
<FormLabel>CPU Limit</FormLabel>
|
||||||
|
<TooltipProvider>
|
||||||
|
<Tooltip delayDuration={0}>
|
||||||
|
<TooltipTrigger>
|
||||||
|
<InfoIcon className="h-4 w-4 text-muted-foreground" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>
|
||||||
|
CPU quota in units of 10^-9 CPUs. Example: 2
|
||||||
|
CPUs = 2000000000
|
||||||
|
</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder={"2"}
|
placeholder="2000000000 (2 CPUs)"
|
||||||
{...field}
|
{...field}
|
||||||
value={field.value?.toString() || ""}
|
value={field.value?.toString() || ""}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const value = e.target.value;
|
const value = e.target.value;
|
||||||
if (value === "") {
|
if (value === "") {
|
||||||
// Si el campo está vacío, establece el valor como null.
|
|
||||||
field.onChange(null);
|
field.onChange(null);
|
||||||
} else {
|
} else {
|
||||||
const number = Number.parseInt(value, 10);
|
const number = Number.parseInt(value, 10);
|
||||||
if (!Number.isNaN(number)) {
|
if (!Number.isNaN(number)) {
|
||||||
// Solo actualiza el valor si se convierte a un número válido.
|
|
||||||
field.onChange(number);
|
field.onChange(number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -198,21 +243,34 @@ export const ShowMysqlResources = ({ mysqlId }: Props) => {
|
|||||||
render={({ field }) => {
|
render={({ field }) => {
|
||||||
return (
|
return (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Cpu Reservation</FormLabel>
|
<div className="flex items-center gap-2">
|
||||||
|
<FormLabel>CPU Reservation</FormLabel>
|
||||||
|
<TooltipProvider>
|
||||||
|
<Tooltip delayDuration={0}>
|
||||||
|
<TooltipTrigger>
|
||||||
|
<InfoIcon className="h-4 w-4 text-muted-foreground" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>
|
||||||
|
CPU shares (relative weight). Example: 1 CPU =
|
||||||
|
1000000000
|
||||||
|
</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder={"1"}
|
placeholder="1000000000 (1 CPU)"
|
||||||
{...field}
|
{...field}
|
||||||
value={field.value?.toString() || ""}
|
value={field.value?.toString() || ""}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const value = e.target.value;
|
const value = e.target.value;
|
||||||
if (value === "") {
|
if (value === "") {
|
||||||
// Si el campo está vacío, establece el valor como null.
|
|
||||||
field.onChange(null);
|
field.onChange(null);
|
||||||
} else {
|
} else {
|
||||||
const number = Number.parseInt(value, 10);
|
const number = Number.parseInt(value, 10);
|
||||||
if (!Number.isNaN(number)) {
|
if (!Number.isNaN(number)) {
|
||||||
// Solo actualiza el valor si se convierte a un número válido.
|
|
||||||
field.onChange(number);
|
field.onChange(number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ export const ShowBackupMySql = ({ mysqlId }: Props) => {
|
|||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error(
|
toast.error(
|
||||||
"Error to Create the manual backup",
|
"Error creating the manual backup",
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export const ShowMysqlEnvironment = ({ mysqlId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to add environment");
|
toast.error("Error adding environment");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -55,12 +55,12 @@ export const DeployMysql = ({ mysqlId }: Props) => {
|
|||||||
await deploy({
|
await deploy({
|
||||||
mysqlId,
|
mysqlId,
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
toast.error("Error to deploy Database");
|
toast.error("Error deploying Database");
|
||||||
});
|
});
|
||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
toast.error(e.message || "Error to deploy Database");
|
toast.error(e.message || "Error deploying Database");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export const ResetMysql = ({ mysqlId, appName }: Props) => {
|
|||||||
toast.success("Service Reloaded");
|
toast.success("Service Reloaded");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to reload the service");
|
toast.error("Error reloading the service");
|
||||||
});
|
});
|
||||||
await refetch();
|
await refetch();
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ export const ShowExternalMysqlCredentials = ({ mysqlId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to save the external port");
|
toast.error("Error saving the external port");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -49,10 +49,10 @@ export const StopMysql = ({ mysqlId }: Props) => {
|
|||||||
await utils.mysql.one.invalidate({
|
await utils.mysql.one.invalidate({
|
||||||
mysqlId,
|
mysqlId,
|
||||||
});
|
});
|
||||||
toast.success("Application stopped succesfully");
|
toast.success("MySQL stopped successfully");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to stop the Application");
|
toast.error("Error stopping MySQL");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -49,10 +49,10 @@ export const StartMysql = ({ mysqlId }: Props) => {
|
|||||||
await utils.mysql.one.invalidate({
|
await utils.mysql.one.invalidate({
|
||||||
mysqlId,
|
mysqlId,
|
||||||
});
|
});
|
||||||
toast.success("Database started succesfully");
|
toast.success("Database started successfully");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to start the Database");
|
toast.error("Error starting the Database");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -75,13 +75,13 @@ export const UpdateMysql = ({ mysqlId }: Props) => {
|
|||||||
description: formData.description || "",
|
description: formData.description || "",
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
toast.success("MySQL updated succesfully");
|
toast.success("MySQL updated successfully");
|
||||||
utils.mysql.one.invalidate({
|
utils.mysql.one.invalidate({
|
||||||
mysqlId: mysqlId,
|
mysqlId: mysqlId,
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update the MySQL");
|
toast.error("Error updating MySQL");
|
||||||
})
|
})
|
||||||
.finally(() => {});
|
.finally(() => {});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ export const ShowAdvancedPostgres = ({ postgresId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to Update the resources");
|
toast.error("Error updating the resources");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -21,6 +21,13 @@ import { zodResolver } from "@hookform/resolvers/zod";
|
|||||||
import React, { useEffect } from "react";
|
import React, { useEffect } from "react";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
|
import {
|
||||||
|
TooltipProvider,
|
||||||
|
TooltipTrigger,
|
||||||
|
TooltipContent,
|
||||||
|
Tooltip,
|
||||||
|
} from "@/components/ui/tooltip";
|
||||||
|
import { InfoIcon } from "lucide-react";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
const addResourcesPostgres = z.object({
|
const addResourcesPostgres = z.object({
|
||||||
@@ -71,7 +78,7 @@ export const ShowPostgresResources = ({ postgresId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to Update the resources");
|
toast.error("Error updating the resources");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
@@ -100,10 +107,25 @@ export const ShowPostgresResources = ({ postgresId }: Props) => {
|
|||||||
name="memoryReservation"
|
name="memoryReservation"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Memory Reservation</FormLabel>
|
<div className="flex items-center gap-2">
|
||||||
|
<FormLabel>Memory Reservation</FormLabel>
|
||||||
|
<TooltipProvider>
|
||||||
|
<Tooltip delayDuration={0}>
|
||||||
|
<TooltipTrigger>
|
||||||
|
<InfoIcon className="h-4 w-4 text-muted-foreground" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>
|
||||||
|
Memory soft limit in bytes. Example: 256MB =
|
||||||
|
268435456 bytes
|
||||||
|
</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder="256 MB"
|
placeholder="268435456 (256MB in bytes)"
|
||||||
{...field}
|
{...field}
|
||||||
value={field.value?.toString() || ""}
|
value={field.value?.toString() || ""}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
@@ -119,7 +141,6 @@ export const ShowPostgresResources = ({ postgresId }: Props) => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
@@ -131,10 +152,25 @@ export const ShowPostgresResources = ({ postgresId }: Props) => {
|
|||||||
render={({ field }) => {
|
render={({ field }) => {
|
||||||
return (
|
return (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Memory Limit</FormLabel>
|
<div className="flex items-center gap-2">
|
||||||
|
<FormLabel>Memory Limit</FormLabel>
|
||||||
|
<TooltipProvider>
|
||||||
|
<Tooltip delayDuration={0}>
|
||||||
|
<TooltipTrigger>
|
||||||
|
<InfoIcon className="h-4 w-4 text-muted-foreground" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>
|
||||||
|
Memory hard limit in bytes. Example: 1GB =
|
||||||
|
1073741824 bytes
|
||||||
|
</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder={"1024 MB"}
|
placeholder="1073741824 (1GB in bytes)"
|
||||||
{...field}
|
{...field}
|
||||||
value={field.value?.toString() || ""}
|
value={field.value?.toString() || ""}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
@@ -162,10 +198,25 @@ export const ShowPostgresResources = ({ postgresId }: Props) => {
|
|||||||
render={({ field }) => {
|
render={({ field }) => {
|
||||||
return (
|
return (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Cpu Limit</FormLabel>
|
<div className="flex items-center gap-2">
|
||||||
|
<FormLabel>CPU Limit</FormLabel>
|
||||||
|
<TooltipProvider>
|
||||||
|
<Tooltip delayDuration={0}>
|
||||||
|
<TooltipTrigger>
|
||||||
|
<InfoIcon className="h-4 w-4 text-muted-foreground" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>
|
||||||
|
CPU quota in units of 10^-9 CPUs. Example: 2
|
||||||
|
CPUs = 2000000000
|
||||||
|
</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder={"2"}
|
placeholder="2000000000 (2 CPUs)"
|
||||||
{...field}
|
{...field}
|
||||||
value={field.value?.toString() || ""}
|
value={field.value?.toString() || ""}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
@@ -192,10 +243,25 @@ export const ShowPostgresResources = ({ postgresId }: Props) => {
|
|||||||
render={({ field }) => {
|
render={({ field }) => {
|
||||||
return (
|
return (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Cpu Reservation</FormLabel>
|
<div className="flex items-center gap-2">
|
||||||
|
<FormLabel>CPU Reservation</FormLabel>
|
||||||
|
<TooltipProvider>
|
||||||
|
<Tooltip delayDuration={0}>
|
||||||
|
<TooltipTrigger>
|
||||||
|
<InfoIcon className="h-4 w-4 text-muted-foreground" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>
|
||||||
|
CPU shares (relative weight). Example: 1 CPU =
|
||||||
|
1000000000
|
||||||
|
</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder={"1"}
|
placeholder="1000000000 (1 CPU)"
|
||||||
{...field}
|
{...field}
|
||||||
value={field.value?.toString() || ""}
|
value={field.value?.toString() || ""}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ export const ShowBackupPostgres = ({ postgresId }: Props) => {
|
|||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error(
|
toast.error(
|
||||||
"Error to Create the manual backup",
|
"Error creating the manual backup",
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export const ShowPostgresEnvironment = ({ postgresId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to add environment");
|
toast.error("Error adding environment");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -55,12 +55,12 @@ export const DeployPostgres = ({ postgresId }: Props) => {
|
|||||||
await deploy({
|
await deploy({
|
||||||
postgresId,
|
postgresId,
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
toast.error("Error to deploy Database");
|
toast.error("Error deploying Database");
|
||||||
});
|
});
|
||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
toast.error(e.message || "Error to deploy Database");
|
toast.error(e.message || "Error deploying Database");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export const ResetPostgres = ({ postgresId, appName }: Props) => {
|
|||||||
toast.success("Service Reloaded");
|
toast.success("Service Reloaded");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to reload the service");
|
toast.error("Error reloading the service");
|
||||||
});
|
});
|
||||||
await refetch();
|
await refetch();
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ export const ShowExternalPostgresCredentials = ({ postgresId }: Props) => {
|
|||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to save the external port");
|
toast.error("Error saving the external port");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -49,10 +49,10 @@ export const StopPostgres = ({ postgresId }: Props) => {
|
|||||||
await utils.postgres.one.invalidate({
|
await utils.postgres.one.invalidate({
|
||||||
postgresId,
|
postgresId,
|
||||||
});
|
});
|
||||||
toast.success("Application stopped succesfully");
|
toast.success("Postgres stopped successfully");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to stop the Application");
|
toast.error("Error stopping Postgres");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -49,10 +49,10 @@ export const StartPostgres = ({ postgresId }: Props) => {
|
|||||||
await utils.postgres.one.invalidate({
|
await utils.postgres.one.invalidate({
|
||||||
postgresId,
|
postgresId,
|
||||||
});
|
});
|
||||||
toast.success("Database started succesfully");
|
toast.success("Database started successfully");
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to start the Database");
|
toast.error("Error starting the Database");
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -76,14 +76,14 @@ export const UpdatePostgres = ({ postgresId }: Props) => {
|
|||||||
description: formData.description || "",
|
description: formData.description || "",
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
toast.success("Postgres updated succesfully");
|
toast.success("Postgres updated successfully");
|
||||||
utils.postgres.one.invalidate({
|
utils.postgres.one.invalidate({
|
||||||
postgresId: postgresId,
|
postgresId: postgresId,
|
||||||
});
|
});
|
||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to update the postgres");
|
toast.error("Error updating Postgres");
|
||||||
})
|
})
|
||||||
.finally(() => {});
|
.finally(() => {});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ export const AddApplication = ({ projectId, projectName }: Props) => {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
toast.error("Error to create the service");
|
toast.error("Error creating the service");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -176,7 +176,7 @@ export const AddApplication = ({ projectId, projectName }: Props) => {
|
|||||||
side="top"
|
side="top"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
If not server is selected, the application will be
|
If no server is selected, the application will be
|
||||||
deployed on the server where the user is logged in.
|
deployed on the server where the user is logged in.
|
||||||
</span>
|
</span>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
@@ -229,7 +229,7 @@ export const AddApplication = ({ projectId, projectName }: Props) => {
|
|||||||
<FormLabel>Description</FormLabel>
|
<FormLabel>Description</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Textarea
|
<Textarea
|
||||||
placeholder="Description about your service..."
|
placeholder="Description of your service..."
|
||||||
className="resize-none"
|
className="resize-none"
|
||||||
{...field}
|
{...field}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ export const AddCompose = ({ projectId, projectName }: Props) => {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to create the compose");
|
toast.error("Error creating the compose");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -183,7 +183,7 @@ export const AddCompose = ({ projectId, projectName }: Props) => {
|
|||||||
side="top"
|
side="top"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
If not server is selected, the application will be
|
If no server is selected, the application will be
|
||||||
deployed on the server where the user is logged in.
|
deployed on the server where the user is logged in.
|
||||||
</span>
|
</span>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
@@ -262,7 +262,7 @@ export const AddCompose = ({ projectId, projectName }: Props) => {
|
|||||||
<FormLabel>Description</FormLabel>
|
<FormLabel>Description</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Textarea
|
<Textarea
|
||||||
placeholder="Description about your service..."
|
placeholder="Description of your service..."
|
||||||
className="resize-none"
|
className="resize-none"
|
||||||
{...field}
|
{...field}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user