Compare commits

..

1 Commits

Author SHA1 Message Date
Mauricio Siu
cd8230b0e5 refactor(add-domain): remove debug log statement from AddDomain component 2025-04-06 11:14:43 -06:00
7 changed files with 17 additions and 38 deletions

View File

@@ -89,8 +89,6 @@ export const AddDomain = ({
serverId: application?.serverId || "", serverId: application?.serverId || "",
}); });
console.log("canGenerateTraefikMeDomains", canGenerateTraefikMeDomains);
const form = useForm<Domain>({ const form = useForm<Domain>({
resolver: zodResolver(domain), resolver: zodResolver(domain),
defaultValues: { defaultValues: {

View File

@@ -298,11 +298,7 @@ export const ShowPreviewSettings = ({ applicationId }: Props) => {
}) })
.then(() => { .then(() => {
refetch(); refetch();
toast.success( toast.success("Preview deployments enabled");
checked
? "Preview deployments enabled"
: "Preview deployments disabled",
);
}) })
.catch((error) => { .catch((error) => {
toast.error(error.message); toast.error(error.message);

View File

@@ -56,8 +56,6 @@ const randomImages = [
export const ProfileForm = () => { export const ProfileForm = () => {
const _utils = api.useUtils(); const _utils = api.useUtils();
const { data, refetch, isLoading } = api.user.get.useQuery(); const { data, refetch, isLoading } = api.user.get.useQuery();
console.log(data);
const { const {
mutateAsync, mutateAsync,
isLoading: isUpdating, isLoading: isUpdating,
@@ -86,17 +84,12 @@ export const ProfileForm = () => {
useEffect(() => { useEffect(() => {
if (data) { if (data) {
form.reset( form.reset({
{ email: data?.user?.email || "",
email: data?.user?.email || "", password: "",
password: form.getValues("password") || "", image: data?.user?.image || "",
image: data?.user?.image || "", currentPassword: "",
currentPassword: form.getValues("currentPassword") || "", });
},
{
keepValues: true,
},
);
if (data.user.email) { if (data.user.email) {
generateSHA256Hash(data.user.email).then((hash) => { generateSHA256Hash(data.user.email).then((hash) => {
@@ -104,7 +97,8 @@ export const ProfileForm = () => {
}); });
} }
} }
}, [form, data]); form.reset();
}, [form, form.reset, data]);
const onSubmit = async (values: Profile) => { const onSubmit = async (values: Profile) => {
await mutateAsync({ await mutateAsync({
@@ -116,12 +110,7 @@ export const ProfileForm = () => {
.then(async () => { .then(async () => {
await refetch(); await refetch();
toast.success("Profile Updated"); toast.success("Profile Updated");
form.reset({ form.reset();
email: values.email,
password: "",
image: values.image,
currentPassword: "",
});
}) })
.catch(() => { .catch(() => {
toast.error("Error updating the profile"); toast.error("Error updating the profile");

View File

@@ -1,6 +1,6 @@
{ {
"name": "dokploy", "name": "dokploy",
"version": "v0.21.5", "version": "v0.21.3",
"private": true, "private": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"type": "module", "type": "module",

View File

@@ -365,9 +365,7 @@ const Project = (
switch (service.type) { switch (service.type) {
case "application": case "application":
await applicationActions.start.mutateAsync({ await applicationActions.start.mutateAsync({ applicationId: serviceId });
applicationId: serviceId,
});
break; break;
case "compose": case "compose":
await composeActions.start.mutateAsync({ composeId: serviceId }); await composeActions.start.mutateAsync({ composeId: serviceId });
@@ -412,9 +410,7 @@ const Project = (
switch (service.type) { switch (service.type) {
case "application": case "application":
await applicationActions.stop.mutateAsync({ await applicationActions.stop.mutateAsync({ applicationId: serviceId });
applicationId: serviceId,
});
break; break;
case "compose": case "compose":
await composeActions.stop.mutateAsync({ composeId: serviceId }); await composeActions.stop.mutateAsync({ composeId: serviceId });

View File

@@ -84,7 +84,7 @@ export const buildRailpack = async (
for (const envVar of envVariables) { for (const envVar of envVariables) {
const [key, value] = envVar.split("="); const [key, value] = envVar.split("=");
if (key && value) { if (key && value) {
buildArgs.push("--secret", `id=${key},env='${key}'`); buildArgs.push("--secret", `id=${key},env=${key}`);
env[key] = value; env[key] = value;
} }
} }
@@ -132,7 +132,7 @@ export const getRailpackCommand = (
]; ];
for (const env of envVariables) { for (const env of envVariables) {
prepareArgs.push("--env", `'${env}'`); prepareArgs.push("--env", env);
} }
// Calculate secrets hash for layer invalidation // Calculate secrets hash for layer invalidation
@@ -164,7 +164,7 @@ export const getRailpackCommand = (
for (const envVar of envVariables) { for (const envVar of envVariables) {
const [key, value] = envVar.split("="); const [key, value] = envVar.split("=");
if (key && value) { if (key && value) {
buildArgs.push("--secret", `id=${key},env='${key}'`); buildArgs.push("--secret", `id=${key},env=${key}`);
exportEnvs.push(`export ${key}=${value}`); exportEnvs.push(`export ${key}=${value}`);
} }
} }

View File

@@ -37,9 +37,9 @@ export const updateServerTraefik = (
servers: [ servers: [
{ {
url: `http://dokploy:${process.env.PORT || 3000}`, url: `http://dokploy:${process.env.PORT || 3000}`,
passHostHeader: true,
}, },
], ],
passHostHeader: true,
}, },
}, },
}; };