mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Merge pull request #20 from jesse-holden/main
fix(typo): enviroment -> environment
This commit is contained in:
@@ -21,19 +21,19 @@ import { api } from "@/utils/api";
|
|||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
import { Textarea } from "@/components/ui/textarea";
|
import { Textarea } from "@/components/ui/textarea";
|
||||||
|
|
||||||
const addEnviromentSchema = z.object({
|
const addEnvironmentSchema = z.object({
|
||||||
enviroment: z.string(),
|
environment: z.string(),
|
||||||
});
|
});
|
||||||
|
|
||||||
type EnviromentSchema = z.infer<typeof addEnviromentSchema>;
|
type EnvironmentSchema = z.infer<typeof addEnvironmentSchema>;
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ShowEnviroment = ({ applicationId }: Props) => {
|
export const ShowEnvironment = ({ applicationId }: Props) => {
|
||||||
const { mutateAsync, isLoading } =
|
const { mutateAsync, isLoading } =
|
||||||
api.application.saveEnviroment.useMutation();
|
api.application.saveEnvironment.useMutation();
|
||||||
|
|
||||||
const { data, refetch } = api.application.one.useQuery(
|
const { data, refetch } = api.application.one.useQuery(
|
||||||
{
|
{
|
||||||
@@ -43,32 +43,32 @@ export const ShowEnviroment = ({ applicationId }: Props) => {
|
|||||||
enabled: !!applicationId,
|
enabled: !!applicationId,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
const form = useForm<EnviromentSchema>({
|
const form = useForm<EnvironmentSchema>({
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
enviroment: "",
|
environment: "",
|
||||||
},
|
},
|
||||||
resolver: zodResolver(addEnviromentSchema),
|
resolver: zodResolver(addEnvironmentSchema),
|
||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (data) {
|
if (data) {
|
||||||
form.reset({
|
form.reset({
|
||||||
enviroment: data.env || "",
|
environment: data.env || "",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [form.reset, data, form]);
|
}, [form.reset, data, form]);
|
||||||
|
|
||||||
const onSubmit = async (data: EnviromentSchema) => {
|
const onSubmit = async (data: EnvironmentSchema) => {
|
||||||
mutateAsync({
|
mutateAsync({
|
||||||
env: data.enviroment,
|
env: data.environment,
|
||||||
applicationId,
|
applicationId,
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
toast.success("Enviroments Added");
|
toast.success("Environments Added");
|
||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to add enviroment");
|
toast.error("Error to add environment");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -76,9 +76,9 @@ export const ShowEnviroment = ({ applicationId }: Props) => {
|
|||||||
<div className="flex w-full flex-col gap-5 ">
|
<div className="flex w-full flex-col gap-5 ">
|
||||||
<Card className="bg-background">
|
<Card className="bg-background">
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle className="text-xl">Enviroment Settings</CardTitle>
|
<CardTitle className="text-xl">Environment Settings</CardTitle>
|
||||||
<CardDescription>
|
<CardDescription>
|
||||||
You can add enviroment variables to your resource.
|
You can add environment variables to your resource.
|
||||||
</CardDescription>
|
</CardDescription>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent>
|
<CardContent>
|
||||||
@@ -90,7 +90,7 @@ export const ShowEnviroment = ({ applicationId }: Props) => {
|
|||||||
>
|
>
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="enviroment"
|
name="environment"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem className="w-full">
|
<FormItem className="w-full">
|
||||||
<FormControl>
|
<FormControl>
|
||||||
@@ -21,18 +21,18 @@ import { api } from "@/utils/api";
|
|||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
import { Textarea } from "@/components/ui/textarea";
|
import { Textarea } from "@/components/ui/textarea";
|
||||||
|
|
||||||
const addEnviromentSchema = z.object({
|
const addEnvironmentSchema = z.object({
|
||||||
enviroment: z.string(),
|
environment: z.string(),
|
||||||
});
|
});
|
||||||
|
|
||||||
type EnviromentSchema = z.infer<typeof addEnviromentSchema>;
|
type EnvironmentSchema = z.infer<typeof addEnvironmentSchema>;
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
mariadbId: string;
|
mariadbId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ShowMariadbEnviroment = ({ mariadbId }: Props) => {
|
export const ShowMariadbEnvironment = ({ mariadbId }: Props) => {
|
||||||
const { mutateAsync, isLoading } = api.mariadb.saveEnviroment.useMutation();
|
const { mutateAsync, isLoading } = api.mariadb.saveEnvironment.useMutation();
|
||||||
|
|
||||||
const { data, refetch } = api.mariadb.one.useQuery(
|
const { data, refetch } = api.mariadb.one.useQuery(
|
||||||
{
|
{
|
||||||
@@ -42,32 +42,32 @@ export const ShowMariadbEnviroment = ({ mariadbId }: Props) => {
|
|||||||
enabled: !!mariadbId,
|
enabled: !!mariadbId,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
const form = useForm<EnviromentSchema>({
|
const form = useForm<EnvironmentSchema>({
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
enviroment: "",
|
environment: "",
|
||||||
},
|
},
|
||||||
resolver: zodResolver(addEnviromentSchema),
|
resolver: zodResolver(addEnvironmentSchema),
|
||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (data) {
|
if (data) {
|
||||||
form.reset({
|
form.reset({
|
||||||
enviroment: data.env || "",
|
environment: data.env || "",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [form.reset, data, form]);
|
}, [form.reset, data, form]);
|
||||||
|
|
||||||
const onSubmit = async (data: EnviromentSchema) => {
|
const onSubmit = async (data: EnvironmentSchema) => {
|
||||||
mutateAsync({
|
mutateAsync({
|
||||||
env: data.enviroment,
|
env: data.environment,
|
||||||
mariadbId,
|
mariadbId,
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
toast.success("Enviroments Added");
|
toast.success("Environments Added");
|
||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to add enviroment");
|
toast.error("Error to add environment");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -75,9 +75,9 @@ export const ShowMariadbEnviroment = ({ mariadbId }: Props) => {
|
|||||||
<div className="flex w-full flex-col gap-5 ">
|
<div className="flex w-full flex-col gap-5 ">
|
||||||
<Card className="bg-background">
|
<Card className="bg-background">
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle className="text-xl">Enviroment Settings</CardTitle>
|
<CardTitle className="text-xl">Environment Settings</CardTitle>
|
||||||
<CardDescription>
|
<CardDescription>
|
||||||
You can add enviroment variables to your database.
|
You can add environment variables to your database.
|
||||||
</CardDescription>
|
</CardDescription>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent>
|
<CardContent>
|
||||||
@@ -89,7 +89,7 @@ export const ShowMariadbEnviroment = ({ mariadbId }: Props) => {
|
|||||||
>
|
>
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="enviroment"
|
name="environment"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem className="w-full">
|
<FormItem className="w-full">
|
||||||
<FormControl>
|
<FormControl>
|
||||||
@@ -21,18 +21,18 @@ import { useForm } from "react-hook-form";
|
|||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
const addEnviromentSchema = z.object({
|
const addEnvironmentSchema = z.object({
|
||||||
enviroment: z.string(),
|
environment: z.string(),
|
||||||
});
|
});
|
||||||
|
|
||||||
type EnviromentSchema = z.infer<typeof addEnviromentSchema>;
|
type EnvironmentSchema = z.infer<typeof addEnvironmentSchema>;
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
mongoId: string;
|
mongoId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ShowMongoEnviroment = ({ mongoId }: Props) => {
|
export const ShowMongoEnvironment = ({ mongoId }: Props) => {
|
||||||
const { mutateAsync, isLoading } = api.mongo.saveEnviroment.useMutation();
|
const { mutateAsync, isLoading } = api.mongo.saveEnvironment.useMutation();
|
||||||
|
|
||||||
const { data, refetch } = api.mongo.one.useQuery(
|
const { data, refetch } = api.mongo.one.useQuery(
|
||||||
{
|
{
|
||||||
@@ -42,32 +42,32 @@ export const ShowMongoEnviroment = ({ mongoId }: Props) => {
|
|||||||
enabled: !!mongoId,
|
enabled: !!mongoId,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
const form = useForm<EnviromentSchema>({
|
const form = useForm<EnvironmentSchema>({
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
enviroment: "",
|
environment: "",
|
||||||
},
|
},
|
||||||
resolver: zodResolver(addEnviromentSchema),
|
resolver: zodResolver(addEnvironmentSchema),
|
||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (data) {
|
if (data) {
|
||||||
form.reset({
|
form.reset({
|
||||||
enviroment: data.env || "",
|
environment: data.env || "",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [form.reset, data, form]);
|
}, [form.reset, data, form]);
|
||||||
|
|
||||||
const onSubmit = async (data: EnviromentSchema) => {
|
const onSubmit = async (data: EnvironmentSchema) => {
|
||||||
mutateAsync({
|
mutateAsync({
|
||||||
env: data.enviroment,
|
env: data.environment,
|
||||||
mongoId,
|
mongoId,
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
toast.success("Enviroments Added");
|
toast.success("Environments Added");
|
||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to add enviroment");
|
toast.error("Error to add environment");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -75,9 +75,9 @@ export const ShowMongoEnviroment = ({ mongoId }: Props) => {
|
|||||||
<div className="flex w-full flex-col gap-5 ">
|
<div className="flex w-full flex-col gap-5 ">
|
||||||
<Card className="bg-background">
|
<Card className="bg-background">
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle className="text-xl">Enviroment Settings</CardTitle>
|
<CardTitle className="text-xl">Environment Settings</CardTitle>
|
||||||
<CardDescription>
|
<CardDescription>
|
||||||
You can add enviroment variables to your database.
|
You can add environment variables to your database.
|
||||||
</CardDescription>
|
</CardDescription>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent>
|
<CardContent>
|
||||||
@@ -89,7 +89,7 @@ export const ShowMongoEnviroment = ({ mongoId }: Props) => {
|
|||||||
>
|
>
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="enviroment"
|
name="environment"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem className="w-full">
|
<FormItem className="w-full">
|
||||||
<FormControl>
|
<FormControl>
|
||||||
@@ -21,18 +21,18 @@ import { api } from "@/utils/api";
|
|||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
import { Textarea } from "@/components/ui/textarea";
|
import { Textarea } from "@/components/ui/textarea";
|
||||||
|
|
||||||
const addEnviromentSchema = z.object({
|
const addEnvironmentSchema = z.object({
|
||||||
enviroment: z.string(),
|
environment: z.string(),
|
||||||
});
|
});
|
||||||
|
|
||||||
type EnviromentSchema = z.infer<typeof addEnviromentSchema>;
|
type EnvironmentSchema = z.infer<typeof addEnvironmentSchema>;
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
mysqlId: string;
|
mysqlId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ShowMysqlEnviroment = ({ mysqlId }: Props) => {
|
export const ShowMysqlEnvironment = ({ mysqlId }: Props) => {
|
||||||
const { mutateAsync, isLoading } = api.mysql.saveEnviroment.useMutation();
|
const { mutateAsync, isLoading } = api.mysql.saveEnvironment.useMutation();
|
||||||
|
|
||||||
const { data, refetch } = api.mysql.one.useQuery(
|
const { data, refetch } = api.mysql.one.useQuery(
|
||||||
{
|
{
|
||||||
@@ -42,32 +42,32 @@ export const ShowMysqlEnviroment = ({ mysqlId }: Props) => {
|
|||||||
enabled: !!mysqlId,
|
enabled: !!mysqlId,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
const form = useForm<EnviromentSchema>({
|
const form = useForm<EnvironmentSchema>({
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
enviroment: "",
|
environment: "",
|
||||||
},
|
},
|
||||||
resolver: zodResolver(addEnviromentSchema),
|
resolver: zodResolver(addEnvironmentSchema),
|
||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (data) {
|
if (data) {
|
||||||
form.reset({
|
form.reset({
|
||||||
enviroment: data.env || "",
|
environment: data.env || "",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [form.reset, data, form]);
|
}, [form.reset, data, form]);
|
||||||
|
|
||||||
const onSubmit = async (data: EnviromentSchema) => {
|
const onSubmit = async (data: EnvironmentSchema) => {
|
||||||
mutateAsync({
|
mutateAsync({
|
||||||
env: data.enviroment,
|
env: data.environment,
|
||||||
mysqlId,
|
mysqlId,
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
toast.success("Enviroments Added");
|
toast.success("Environments Added");
|
||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to add enviroment");
|
toast.error("Error to add environment");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -75,9 +75,9 @@ export const ShowMysqlEnviroment = ({ mysqlId }: Props) => {
|
|||||||
<div className="flex w-full flex-col gap-5 ">
|
<div className="flex w-full flex-col gap-5 ">
|
||||||
<Card className="bg-background">
|
<Card className="bg-background">
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle className="text-xl">Enviroment Settings</CardTitle>
|
<CardTitle className="text-xl">Environment Settings</CardTitle>
|
||||||
<CardDescription>
|
<CardDescription>
|
||||||
You can add enviroment variables to your database.
|
You can add environment variables to your database.
|
||||||
</CardDescription>
|
</CardDescription>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent>
|
<CardContent>
|
||||||
@@ -89,7 +89,7 @@ export const ShowMysqlEnviroment = ({ mysqlId }: Props) => {
|
|||||||
>
|
>
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="enviroment"
|
name="environment"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem className="w-full">
|
<FormItem className="w-full">
|
||||||
<FormControl>
|
<FormControl>
|
||||||
@@ -21,18 +21,18 @@ import { api } from "@/utils/api";
|
|||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
import { Textarea } from "@/components/ui/textarea";
|
import { Textarea } from "@/components/ui/textarea";
|
||||||
|
|
||||||
const addEnviromentSchema = z.object({
|
const addEnvironmentSchema = z.object({
|
||||||
enviroment: z.string(),
|
environment: z.string(),
|
||||||
});
|
});
|
||||||
|
|
||||||
type EnviromentSchema = z.infer<typeof addEnviromentSchema>;
|
type EnvironmentSchema = z.infer<typeof addEnvironmentSchema>;
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
postgresId: string;
|
postgresId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ShowPostgresEnviroment = ({ postgresId }: Props) => {
|
export const ShowPostgresEnvironment = ({ postgresId }: Props) => {
|
||||||
const { mutateAsync, isLoading } = api.postgres.saveEnviroment.useMutation();
|
const { mutateAsync, isLoading } = api.postgres.saveEnvironment.useMutation();
|
||||||
|
|
||||||
const { data, refetch } = api.postgres.one.useQuery(
|
const { data, refetch } = api.postgres.one.useQuery(
|
||||||
{
|
{
|
||||||
@@ -42,32 +42,32 @@ export const ShowPostgresEnviroment = ({ postgresId }: Props) => {
|
|||||||
enabled: !!postgresId,
|
enabled: !!postgresId,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
const form = useForm<EnviromentSchema>({
|
const form = useForm<EnvironmentSchema>({
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
enviroment: "",
|
environment: "",
|
||||||
},
|
},
|
||||||
resolver: zodResolver(addEnviromentSchema),
|
resolver: zodResolver(addEnvironmentSchema),
|
||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (data) {
|
if (data) {
|
||||||
form.reset({
|
form.reset({
|
||||||
enviroment: data.env || "",
|
environment: data.env || "",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [form.reset, data, form]);
|
}, [form.reset, data, form]);
|
||||||
|
|
||||||
const onSubmit = async (data: EnviromentSchema) => {
|
const onSubmit = async (data: EnvironmentSchema) => {
|
||||||
mutateAsync({
|
mutateAsync({
|
||||||
env: data.enviroment,
|
env: data.environment,
|
||||||
postgresId,
|
postgresId,
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
toast.success("Enviroments Added");
|
toast.success("Environments Added");
|
||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to add enviroment");
|
toast.error("Error to add environment");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -75,9 +75,9 @@ export const ShowPostgresEnviroment = ({ postgresId }: Props) => {
|
|||||||
<div className="flex w-full flex-col gap-5 ">
|
<div className="flex w-full flex-col gap-5 ">
|
||||||
<Card className="bg-background">
|
<Card className="bg-background">
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle className="text-xl">Enviroment Settings</CardTitle>
|
<CardTitle className="text-xl">Environment Settings</CardTitle>
|
||||||
<CardDescription>
|
<CardDescription>
|
||||||
You can add enviroment variables to your database.
|
You can add environment variables to your database.
|
||||||
</CardDescription>
|
</CardDescription>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent>
|
<CardContent>
|
||||||
@@ -89,7 +89,7 @@ export const ShowPostgresEnviroment = ({ postgresId }: Props) => {
|
|||||||
>
|
>
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="enviroment"
|
name="environment"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem className="w-full">
|
<FormItem className="w-full">
|
||||||
<FormControl>
|
<FormControl>
|
||||||
@@ -21,18 +21,18 @@ import { api } from "@/utils/api";
|
|||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
import { Textarea } from "@/components/ui/textarea";
|
import { Textarea } from "@/components/ui/textarea";
|
||||||
|
|
||||||
const addEnviromentSchema = z.object({
|
const addEnvironmentSchema = z.object({
|
||||||
enviroment: z.string(),
|
environment: z.string(),
|
||||||
});
|
});
|
||||||
|
|
||||||
type EnviromentSchema = z.infer<typeof addEnviromentSchema>;
|
type EnvironmentSchema = z.infer<typeof addEnvironmentSchema>;
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
redisId: string;
|
redisId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ShowRedisEnviroment = ({ redisId }: Props) => {
|
export const ShowRedisEnvironment = ({ redisId }: Props) => {
|
||||||
const { mutateAsync, isLoading } = api.redis.saveEnviroment.useMutation();
|
const { mutateAsync, isLoading } = api.redis.saveEnvironment.useMutation();
|
||||||
|
|
||||||
const { data, refetch } = api.redis.one.useQuery(
|
const { data, refetch } = api.redis.one.useQuery(
|
||||||
{
|
{
|
||||||
@@ -42,32 +42,32 @@ export const ShowRedisEnviroment = ({ redisId }: Props) => {
|
|||||||
enabled: !!redisId,
|
enabled: !!redisId,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
const form = useForm<EnviromentSchema>({
|
const form = useForm<EnvironmentSchema>({
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
enviroment: "",
|
environment: "",
|
||||||
},
|
},
|
||||||
resolver: zodResolver(addEnviromentSchema),
|
resolver: zodResolver(addEnvironmentSchema),
|
||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (data) {
|
if (data) {
|
||||||
form.reset({
|
form.reset({
|
||||||
enviroment: data.env || "",
|
environment: data.env || "",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [form.reset, data, form]);
|
}, [form.reset, data, form]);
|
||||||
|
|
||||||
const onSubmit = async (data: EnviromentSchema) => {
|
const onSubmit = async (data: EnvironmentSchema) => {
|
||||||
mutateAsync({
|
mutateAsync({
|
||||||
env: data.enviroment,
|
env: data.environment,
|
||||||
redisId,
|
redisId,
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
toast.success("Enviroments Added");
|
toast.success("Environments Added");
|
||||||
await refetch();
|
await refetch();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error to add enviroment");
|
toast.error("Error to add environment");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -75,9 +75,9 @@ export const ShowRedisEnviroment = ({ redisId }: Props) => {
|
|||||||
<div className="flex w-full flex-col gap-5 ">
|
<div className="flex w-full flex-col gap-5 ">
|
||||||
<Card className="bg-background">
|
<Card className="bg-background">
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle className="text-xl">Enviroment Settings</CardTitle>
|
<CardTitle className="text-xl">Environment Settings</CardTitle>
|
||||||
<CardDescription>
|
<CardDescription>
|
||||||
You can add enviroment variables to your database.
|
You can add environment variables to your database.
|
||||||
</CardDescription>
|
</CardDescription>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent>
|
<CardContent>
|
||||||
@@ -89,7 +89,7 @@ export const ShowRedisEnviroment = ({ redisId }: Props) => {
|
|||||||
>
|
>
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="enviroment"
|
name="environment"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem className="w-full">
|
<FormItem className="w-full">
|
||||||
<FormControl>
|
<FormControl>
|
||||||
@@ -8,7 +8,7 @@ import { ShowVolumes } from "@/components/dashboard/application/advanced/volumes
|
|||||||
import { DeleteApplication } from "@/components/dashboard/application/delete-application";
|
import { DeleteApplication } from "@/components/dashboard/application/delete-application";
|
||||||
import { ShowDeployments } from "@/components/dashboard/application/deployments/show-deployments";
|
import { ShowDeployments } from "@/components/dashboard/application/deployments/show-deployments";
|
||||||
import { ShowDomains } from "@/components/dashboard/application/domains/show-domains";
|
import { ShowDomains } from "@/components/dashboard/application/domains/show-domains";
|
||||||
import { ShowEnviroment } from "@/components/dashboard/application/enviroment/show";
|
import { ShowEnvironment } from "@/components/dashboard/application/environment/show";
|
||||||
import { ShowGeneralApplication } from "@/components/dashboard/application/general/show";
|
import { ShowGeneralApplication } from "@/components/dashboard/application/general/show";
|
||||||
import { ShowDockerLogs } from "@/components/dashboard/application/logs/show";
|
import { ShowDockerLogs } from "@/components/dashboard/application/logs/show";
|
||||||
import { UpdateApplication } from "@/components/dashboard/application/update-application";
|
import { UpdateApplication } from "@/components/dashboard/application/update-application";
|
||||||
@@ -127,7 +127,7 @@ const Service = (
|
|||||||
<div className="flex flex-row items-center justify-between w-full gap-4">
|
<div className="flex flex-row items-center justify-between w-full gap-4">
|
||||||
<TabsList className="md:grid md:w-fit md:grid-cols-7 max-md:overflow-y-scroll justify-start">
|
<TabsList className="md:grid md:w-fit md:grid-cols-7 max-md:overflow-y-scroll justify-start">
|
||||||
<TabsTrigger value="general">General</TabsTrigger>
|
<TabsTrigger value="general">General</TabsTrigger>
|
||||||
<TabsTrigger value="enviroment">Enviroment</TabsTrigger>
|
<TabsTrigger value="environment">Environment</TabsTrigger>
|
||||||
<TabsTrigger value="monitoring">Monitoring</TabsTrigger>
|
<TabsTrigger value="monitoring">Monitoring</TabsTrigger>
|
||||||
<TabsTrigger value="logs">Logs</TabsTrigger>
|
<TabsTrigger value="logs">Logs</TabsTrigger>
|
||||||
<TabsTrigger value="deployments">Deployments</TabsTrigger>
|
<TabsTrigger value="deployments">Deployments</TabsTrigger>
|
||||||
@@ -147,9 +147,9 @@ const Service = (
|
|||||||
<ShowGeneralApplication applicationId={applicationId} />
|
<ShowGeneralApplication applicationId={applicationId} />
|
||||||
</div>
|
</div>
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
<TabsContent value="enviroment">
|
<TabsContent value="environment">
|
||||||
<div className="flex flex-col gap-4 pt-2.5">
|
<div className="flex flex-col gap-4 pt-2.5">
|
||||||
<ShowEnviroment applicationId={applicationId} />
|
<ShowEnvironment applicationId={applicationId} />
|
||||||
</div>
|
</div>
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
<TabsContent value="monitoring">
|
<TabsContent value="monitoring">
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { ShowDockerLogs } from "@/components/dashboard/application/logs/show";
|
|||||||
import { ShowAdvancedMariadb } from "@/components/dashboard/mariadb/advanced/show-mariadb-advanced-settings";
|
import { ShowAdvancedMariadb } from "@/components/dashboard/mariadb/advanced/show-mariadb-advanced-settings";
|
||||||
import { ShowBackupMariadb } from "@/components/dashboard/mariadb/backups/show-backup-mariadb";
|
import { ShowBackupMariadb } from "@/components/dashboard/mariadb/backups/show-backup-mariadb";
|
||||||
import { DeleteMariadb } from "@/components/dashboard/mariadb/delete-mariadb";
|
import { DeleteMariadb } from "@/components/dashboard/mariadb/delete-mariadb";
|
||||||
import { ShowMariadbEnviroment } from "@/components/dashboard/mariadb/enviroment/show-mariadb-enviroment";
|
import { ShowMariadbEnvironment } from "@/components/dashboard/mariadb/environment/show-mariadb-environment";
|
||||||
import { ShowExternalMariadbCredentials } from "@/components/dashboard/mariadb/general/show-external-mariadb-credentials";
|
import { ShowExternalMariadbCredentials } from "@/components/dashboard/mariadb/general/show-external-mariadb-credentials";
|
||||||
import { ShowGeneralMariadb } from "@/components/dashboard/mariadb/general/show-general-mariadb";
|
import { ShowGeneralMariadb } from "@/components/dashboard/mariadb/general/show-general-mariadb";
|
||||||
import { ShowInternalMariadbCredentials } from "@/components/dashboard/mariadb/general/show-internal-mariadb-credentials";
|
import { ShowInternalMariadbCredentials } from "@/components/dashboard/mariadb/general/show-internal-mariadb-credentials";
|
||||||
@@ -110,7 +110,7 @@ const Mariadb = (
|
|||||||
<div className="flex flex-row items-center justify-between w-full gap-4">
|
<div className="flex flex-row items-center justify-between w-full gap-4">
|
||||||
<TabsList className="md:grid md:w-fit md:grid-cols-6 max-md:overflow-y-scroll justify-start">
|
<TabsList className="md:grid md:w-fit md:grid-cols-6 max-md:overflow-y-scroll justify-start">
|
||||||
<TabsTrigger value="general">General</TabsTrigger>
|
<TabsTrigger value="general">General</TabsTrigger>
|
||||||
<TabsTrigger value="enviroment">Enviroment</TabsTrigger>
|
<TabsTrigger value="environment">Environment</TabsTrigger>
|
||||||
<TabsTrigger value="monitoring">Monitoring</TabsTrigger>
|
<TabsTrigger value="monitoring">Monitoring</TabsTrigger>
|
||||||
<TabsTrigger value="backups">Backups</TabsTrigger>
|
<TabsTrigger value="backups">Backups</TabsTrigger>
|
||||||
<TabsTrigger value="logs">Logs</TabsTrigger>
|
<TabsTrigger value="logs">Logs</TabsTrigger>
|
||||||
@@ -131,9 +131,9 @@ const Mariadb = (
|
|||||||
<ShowExternalMariadbCredentials mariadbId={mariadbId} />
|
<ShowExternalMariadbCredentials mariadbId={mariadbId} />
|
||||||
</div>
|
</div>
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
<TabsContent value="enviroment">
|
<TabsContent value="environment">
|
||||||
<div className="flex flex-col gap-4 pt-2.5">
|
<div className="flex flex-col gap-4 pt-2.5">
|
||||||
<ShowMariadbEnviroment mariadbId={mariadbId} />
|
<ShowMariadbEnvironment mariadbId={mariadbId} />
|
||||||
</div>
|
</div>
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
<TabsContent value="monitoring">
|
<TabsContent value="monitoring">
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { ShowDockerLogs } from "@/components/dashboard/application/logs/show";
|
|||||||
import { ShowAdvancedMongo } from "@/components/dashboard/mongo/advanced/show-mongo-advanced-settings";
|
import { ShowAdvancedMongo } from "@/components/dashboard/mongo/advanced/show-mongo-advanced-settings";
|
||||||
import { ShowBackupMongo } from "@/components/dashboard/mongo/backups/show-backup-mongo";
|
import { ShowBackupMongo } from "@/components/dashboard/mongo/backups/show-backup-mongo";
|
||||||
import { DeleteMongo } from "@/components/dashboard/mongo/delete-mongo";
|
import { DeleteMongo } from "@/components/dashboard/mongo/delete-mongo";
|
||||||
import { ShowMongoEnviroment } from "@/components/dashboard/mongo/enviroment/show-mongo-enviroment";
|
import { ShowMongoEnvironment } from "@/components/dashboard/mongo/environment/show-mongo-environment";
|
||||||
import { ShowExternalMongoCredentials } from "@/components/dashboard/mongo/general/show-external-mongo-credentials";
|
import { ShowExternalMongoCredentials } from "@/components/dashboard/mongo/general/show-external-mongo-credentials";
|
||||||
import { ShowGeneralMongo } from "@/components/dashboard/mongo/general/show-general-mongo";
|
import { ShowGeneralMongo } from "@/components/dashboard/mongo/general/show-general-mongo";
|
||||||
import { ShowInternalMongoCredentials } from "@/components/dashboard/mongo/general/show-internal-mongo-credentials";
|
import { ShowInternalMongoCredentials } from "@/components/dashboard/mongo/general/show-internal-mongo-credentials";
|
||||||
@@ -111,7 +111,7 @@ const Mongo = (
|
|||||||
<div className="flex flex-row items-center justify-between w-full gap-4">
|
<div className="flex flex-row items-center justify-between w-full gap-4">
|
||||||
<TabsList className="md:grid md:w-fit md:grid-cols-6 max-md:overflow-y-scroll justify-start">
|
<TabsList className="md:grid md:w-fit md:grid-cols-6 max-md:overflow-y-scroll justify-start">
|
||||||
<TabsTrigger value="general">General</TabsTrigger>
|
<TabsTrigger value="general">General</TabsTrigger>
|
||||||
<TabsTrigger value="enviroment">Enviroment</TabsTrigger>
|
<TabsTrigger value="environment">Environment</TabsTrigger>
|
||||||
<TabsTrigger value="monitoring">Monitoring</TabsTrigger>
|
<TabsTrigger value="monitoring">Monitoring</TabsTrigger>
|
||||||
<TabsTrigger value="backups">Backups</TabsTrigger>
|
<TabsTrigger value="backups">Backups</TabsTrigger>
|
||||||
<TabsTrigger value="logs">Logs</TabsTrigger>
|
<TabsTrigger value="logs">Logs</TabsTrigger>
|
||||||
@@ -133,9 +133,9 @@ const Mongo = (
|
|||||||
<ShowExternalMongoCredentials mongoId={mongoId} />
|
<ShowExternalMongoCredentials mongoId={mongoId} />
|
||||||
</div>
|
</div>
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
<TabsContent value="enviroment">
|
<TabsContent value="environment">
|
||||||
<div className="flex flex-col gap-4 pt-2.5">
|
<div className="flex flex-col gap-4 pt-2.5">
|
||||||
<ShowMongoEnviroment mongoId={mongoId} />
|
<ShowMongoEnvironment mongoId={mongoId} />
|
||||||
</div>
|
</div>
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
<TabsContent value="monitoring">
|
<TabsContent value="monitoring">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { ShowAdvancedMysql } from "@/components/dashboard/mysql/advanced/show-mysql-advanced-settings";
|
import { ShowAdvancedMysql } from "@/components/dashboard/mysql/advanced/show-mysql-advanced-settings";
|
||||||
import { ShowBackupMySql } from "@/components/dashboard/mysql/backups/show-backup-mysql";
|
import { ShowBackupMySql } from "@/components/dashboard/mysql/backups/show-backup-mysql";
|
||||||
import { DeleteMysql } from "@/components/dashboard/mysql/delete-mysql";
|
import { DeleteMysql } from "@/components/dashboard/mysql/delete-mysql";
|
||||||
import { ShowMysqlEnviroment } from "@/components/dashboard/mysql/enviroment/show-mysql-enviroment";
|
import { ShowMysqlEnvironment } from "@/components/dashboard/mysql/environment/show-mysql-environment";
|
||||||
import { ShowExternalMysqlCredentials } from "@/components/dashboard/mysql/general/show-external-mysql-credentials";
|
import { ShowExternalMysqlCredentials } from "@/components/dashboard/mysql/general/show-external-mysql-credentials";
|
||||||
import { ShowGeneralMysql } from "@/components/dashboard/mysql/general/show-general-mysql";
|
import { ShowGeneralMysql } from "@/components/dashboard/mysql/general/show-general-mysql";
|
||||||
import { ShowInternalMysqlCredentials } from "@/components/dashboard/mysql/general/show-internal-mysql-credentials";
|
import { ShowInternalMysqlCredentials } from "@/components/dashboard/mysql/general/show-internal-mysql-credentials";
|
||||||
@@ -110,7 +110,7 @@ const MySql = (
|
|||||||
<div className="flex flex-row items-center justify-between w-full gap-4">
|
<div className="flex flex-row items-center justify-between w-full gap-4">
|
||||||
<TabsList className="md:grid md:w-fit md:grid-cols-6 max-md:overflow-y-scroll justify-start">
|
<TabsList className="md:grid md:w-fit md:grid-cols-6 max-md:overflow-y-scroll justify-start">
|
||||||
<TabsTrigger value="general">General</TabsTrigger>
|
<TabsTrigger value="general">General</TabsTrigger>
|
||||||
<TabsTrigger value="enviroment">Enviroment</TabsTrigger>
|
<TabsTrigger value="environment">Environment</TabsTrigger>
|
||||||
<TabsTrigger value="monitoring">Monitoring</TabsTrigger>
|
<TabsTrigger value="monitoring">Monitoring</TabsTrigger>
|
||||||
<TabsTrigger value="backups">Backups</TabsTrigger>
|
<TabsTrigger value="backups">Backups</TabsTrigger>
|
||||||
<TabsTrigger value="logs">Logs</TabsTrigger>
|
<TabsTrigger value="logs">Logs</TabsTrigger>
|
||||||
@@ -132,9 +132,9 @@ const MySql = (
|
|||||||
<ShowExternalMysqlCredentials mysqlId={mysqlId} />
|
<ShowExternalMysqlCredentials mysqlId={mysqlId} />
|
||||||
</div>
|
</div>
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
<TabsContent value="enviroment" className="w-full">
|
<TabsContent value="environment" className="w-full">
|
||||||
<div className="flex flex-col gap-4 pt-2.5">
|
<div className="flex flex-col gap-4 pt-2.5">
|
||||||
<ShowMysqlEnviroment mysqlId={mysqlId} />
|
<ShowMysqlEnvironment mysqlId={mysqlId} />
|
||||||
</div>
|
</div>
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
<TabsContent value="monitoring">
|
<TabsContent value="monitoring">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { ShowAdvancedPostgres } from "@/components/dashboard/postgres/advanced/show-postgres-advanced-settings";
|
import { ShowAdvancedPostgres } from "@/components/dashboard/postgres/advanced/show-postgres-advanced-settings";
|
||||||
import { ShowBackupPostgres } from "@/components/dashboard/postgres/backups/show-backup-postgres";
|
import { ShowBackupPostgres } from "@/components/dashboard/postgres/backups/show-backup-postgres";
|
||||||
import { DeletePostgres } from "@/components/dashboard/postgres/delete-postgres";
|
import { DeletePostgres } from "@/components/dashboard/postgres/delete-postgres";
|
||||||
import { ShowPostgresEnviroment } from "@/components/dashboard/postgres/enviroment/show-postgres-enviroment";
|
import { ShowPostgresEnvironment } from "@/components/dashboard/postgres/environment/show-postgres-environment";
|
||||||
import { ShowExternalPostgresCredentials } from "@/components/dashboard/postgres/general/show-external-postgres-credentials";
|
import { ShowExternalPostgresCredentials } from "@/components/dashboard/postgres/general/show-external-postgres-credentials";
|
||||||
import { ShowGeneralPostgres } from "@/components/dashboard/postgres/general/show-general-postgres";
|
import { ShowGeneralPostgres } from "@/components/dashboard/postgres/general/show-general-postgres";
|
||||||
import { ShowInternalPostgresCredentials } from "@/components/dashboard/postgres/general/show-internal-postgres-credentials";
|
import { ShowInternalPostgresCredentials } from "@/components/dashboard/postgres/general/show-internal-postgres-credentials";
|
||||||
@@ -111,7 +111,7 @@ const Postgresql = (
|
|||||||
<div className="flex flex-row items-center justify-between w-full gap-4">
|
<div className="flex flex-row items-center justify-between w-full gap-4">
|
||||||
<TabsList className="md:grid md:w-fit md:grid-cols-6 max-md:overflow-y-scroll justify-start">
|
<TabsList className="md:grid md:w-fit md:grid-cols-6 max-md:overflow-y-scroll justify-start">
|
||||||
<TabsTrigger value="general">General</TabsTrigger>
|
<TabsTrigger value="general">General</TabsTrigger>
|
||||||
<TabsTrigger value="enviroment">Enviroment</TabsTrigger>
|
<TabsTrigger value="environment">Environment</TabsTrigger>
|
||||||
<TabsTrigger value="monitoring">Monitoring</TabsTrigger>
|
<TabsTrigger value="monitoring">Monitoring</TabsTrigger>
|
||||||
<TabsTrigger value="backups">Backups</TabsTrigger>
|
<TabsTrigger value="backups">Backups</TabsTrigger>
|
||||||
<TabsTrigger value="logs">Logs</TabsTrigger>
|
<TabsTrigger value="logs">Logs</TabsTrigger>
|
||||||
@@ -133,9 +133,9 @@ const Postgresql = (
|
|||||||
<ShowExternalPostgresCredentials postgresId={postgresId} />
|
<ShowExternalPostgresCredentials postgresId={postgresId} />
|
||||||
</div>
|
</div>
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
<TabsContent value="enviroment">
|
<TabsContent value="environment">
|
||||||
<div className="flex flex-col gap-4 pt-2.5">
|
<div className="flex flex-col gap-4 pt-2.5">
|
||||||
<ShowPostgresEnviroment postgresId={postgresId} />
|
<ShowPostgresEnvironment postgresId={postgresId} />
|
||||||
</div>
|
</div>
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
<TabsContent value="monitoring">
|
<TabsContent value="monitoring">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { ShowAdvancedRedis } from "@/components/dashboard/redis/advanced/show-redis-advanced-settings";
|
import { ShowAdvancedRedis } from "@/components/dashboard/redis/advanced/show-redis-advanced-settings";
|
||||||
import { DeleteRedis } from "@/components/dashboard/redis/delete-redis";
|
import { DeleteRedis } from "@/components/dashboard/redis/delete-redis";
|
||||||
import { ShowRedisEnviroment } from "@/components/dashboard/redis/enviroment/show-redis-enviroment";
|
import { ShowRedisEnvironment } from "@/components/dashboard/redis/environment/show-redis-environment";
|
||||||
import { ShowExternalRedisCredentials } from "@/components/dashboard/redis/general/show-external-redis-credentials";
|
import { ShowExternalRedisCredentials } from "@/components/dashboard/redis/general/show-external-redis-credentials";
|
||||||
import { ShowGeneralRedis } from "@/components/dashboard/redis/general/show-general-redis";
|
import { ShowGeneralRedis } from "@/components/dashboard/redis/general/show-general-redis";
|
||||||
import { ShowInternalRedisCredentials } from "@/components/dashboard/redis/general/show-internal-redis-credentials";
|
import { ShowInternalRedisCredentials } from "@/components/dashboard/redis/general/show-internal-redis-credentials";
|
||||||
@@ -110,7 +110,7 @@ const Redis = (
|
|||||||
<div className="flex flex-row items-center justify-between w-full gap-4">
|
<div className="flex flex-row items-center justify-between w-full gap-4">
|
||||||
<TabsList className="md:grid md:w-fit md:grid-cols-5 max-md:overflow-y-scroll justify-start">
|
<TabsList className="md:grid md:w-fit md:grid-cols-5 max-md:overflow-y-scroll justify-start">
|
||||||
<TabsTrigger value="general">General</TabsTrigger>
|
<TabsTrigger value="general">General</TabsTrigger>
|
||||||
<TabsTrigger value="enviroment">Enviroment</TabsTrigger>
|
<TabsTrigger value="environment">Environment</TabsTrigger>
|
||||||
<TabsTrigger value="monitoring">Monitoring</TabsTrigger>
|
<TabsTrigger value="monitoring">Monitoring</TabsTrigger>
|
||||||
<TabsTrigger value="logs">Logs</TabsTrigger>
|
<TabsTrigger value="logs">Logs</TabsTrigger>
|
||||||
<TabsTrigger value="advanced">Advanced</TabsTrigger>
|
<TabsTrigger value="advanced">Advanced</TabsTrigger>
|
||||||
@@ -131,9 +131,9 @@ const Redis = (
|
|||||||
<ShowExternalRedisCredentials redisId={redisId} />
|
<ShowExternalRedisCredentials redisId={redisId} />
|
||||||
</div>
|
</div>
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
<TabsContent value="enviroment">
|
<TabsContent value="environment">
|
||||||
<div className="flex flex-col gap-4 pt-2.5">
|
<div className="flex flex-col gap-4 pt-2.5">
|
||||||
<ShowRedisEnviroment redisId={redisId} />
|
<ShowRedisEnvironment redisId={redisId} />
|
||||||
</div>
|
</div>
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
<TabsContent value="monitoring">
|
<TabsContent value="monitoring">
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
apiReloadApplication,
|
apiReloadApplication,
|
||||||
apiSaveBuildType,
|
apiSaveBuildType,
|
||||||
apiSaveDockerProvider,
|
apiSaveDockerProvider,
|
||||||
apiSaveEnviromentVariables,
|
apiSaveEnvironmentVariables,
|
||||||
apiSaveGitProvider,
|
apiSaveGitProvider,
|
||||||
apiSaveGithubProvider,
|
apiSaveGithubProvider,
|
||||||
apiUpdateApplication,
|
apiUpdateApplication,
|
||||||
@@ -170,8 +170,8 @@ export const applicationRouter = createTRPCRouter({
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
saveEnviroment: protectedProcedure
|
saveEnvironment: protectedProcedure
|
||||||
.input(apiSaveEnviromentVariables)
|
.input(apiSaveEnvironmentVariables)
|
||||||
.mutation(async ({ input }) => {
|
.mutation(async ({ input }) => {
|
||||||
await updateApplication(input.applicationId, {
|
await updateApplication(input.applicationId, {
|
||||||
env: input.env,
|
env: input.env,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
apiDeployMariaDB,
|
apiDeployMariaDB,
|
||||||
apiFindOneMariaDB,
|
apiFindOneMariaDB,
|
||||||
apiResetMariadb,
|
apiResetMariadb,
|
||||||
apiSaveEnviromentVariablesMariaDB,
|
apiSaveEnvironmentVariablesMariaDB,
|
||||||
apiSaveExternalPortMariaDB,
|
apiSaveExternalPortMariaDB,
|
||||||
apiUpdateMariaDB,
|
apiUpdateMariaDB,
|
||||||
} from "@/server/db/schema/mariadb";
|
} from "@/server/db/schema/mariadb";
|
||||||
@@ -134,8 +134,8 @@ export const mariadbRouter = createTRPCRouter({
|
|||||||
|
|
||||||
return mongo;
|
return mongo;
|
||||||
}),
|
}),
|
||||||
saveEnviroment: protectedProcedure
|
saveEnvironment: protectedProcedure
|
||||||
.input(apiSaveEnviromentVariablesMariaDB)
|
.input(apiSaveEnvironmentVariablesMariaDB)
|
||||||
.mutation(async ({ input }) => {
|
.mutation(async ({ input }) => {
|
||||||
const service = await updateMariadbById(input.mariadbId, {
|
const service = await updateMariadbById(input.mariadbId, {
|
||||||
env: input.env,
|
env: input.env,
|
||||||
@@ -144,7 +144,7 @@ export const mariadbRouter = createTRPCRouter({
|
|||||||
if (!service) {
|
if (!service) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
code: "BAD_REQUEST",
|
code: "BAD_REQUEST",
|
||||||
message: "Update: Error to add enviroment variables",
|
message: "Update: Error to add environment variables",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
apiDeployMongo,
|
apiDeployMongo,
|
||||||
apiFindOneMongo,
|
apiFindOneMongo,
|
||||||
apiResetMongo,
|
apiResetMongo,
|
||||||
apiSaveEnviromentVariablesMongo,
|
apiSaveEnvironmentVariablesMongo,
|
||||||
apiSaveExternalPortMongo,
|
apiSaveExternalPortMongo,
|
||||||
apiUpdateMongo,
|
apiUpdateMongo,
|
||||||
} from "@/server/db/schema/mongo";
|
} from "@/server/db/schema/mongo";
|
||||||
@@ -148,8 +148,8 @@ export const mongoRouter = createTRPCRouter({
|
|||||||
|
|
||||||
return mongo;
|
return mongo;
|
||||||
}),
|
}),
|
||||||
saveEnviroment: protectedProcedure
|
saveEnvironment: protectedProcedure
|
||||||
.input(apiSaveEnviromentVariablesMongo)
|
.input(apiSaveEnvironmentVariablesMongo)
|
||||||
.mutation(async ({ input }) => {
|
.mutation(async ({ input }) => {
|
||||||
const service = await updateMongoById(input.mongoId, {
|
const service = await updateMongoById(input.mongoId, {
|
||||||
env: input.env,
|
env: input.env,
|
||||||
@@ -158,7 +158,7 @@ export const mongoRouter = createTRPCRouter({
|
|||||||
if (!service) {
|
if (!service) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
code: "BAD_REQUEST",
|
code: "BAD_REQUEST",
|
||||||
message: "Update: Error to add enviroment variables",
|
message: "Update: Error to add environment variables",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
apiDeployMySql,
|
apiDeployMySql,
|
||||||
apiFindOneMySql,
|
apiFindOneMySql,
|
||||||
apiResetMysql,
|
apiResetMysql,
|
||||||
apiSaveEnviromentVariablesMySql,
|
apiSaveEnvironmentVariablesMySql,
|
||||||
apiSaveExternalPortMySql,
|
apiSaveExternalPortMySql,
|
||||||
apiUpdateMySql,
|
apiUpdateMySql,
|
||||||
} from "@/server/db/schema/mysql";
|
} from "@/server/db/schema/mysql";
|
||||||
@@ -147,8 +147,8 @@ export const mysqlRouter = createTRPCRouter({
|
|||||||
|
|
||||||
return mongo;
|
return mongo;
|
||||||
}),
|
}),
|
||||||
saveEnviroment: protectedProcedure
|
saveEnvironment: protectedProcedure
|
||||||
.input(apiSaveEnviromentVariablesMySql)
|
.input(apiSaveEnvironmentVariablesMySql)
|
||||||
.mutation(async ({ input }) => {
|
.mutation(async ({ input }) => {
|
||||||
const service = await updateMySqlById(input.mysqlId, {
|
const service = await updateMySqlById(input.mysqlId, {
|
||||||
env: input.env,
|
env: input.env,
|
||||||
@@ -157,7 +157,7 @@ export const mysqlRouter = createTRPCRouter({
|
|||||||
if (!service) {
|
if (!service) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
code: "BAD_REQUEST",
|
code: "BAD_REQUEST",
|
||||||
message: "Update: Error to add enviroment variables",
|
message: "Update: Error to add environment variables",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
apiDeployPostgres,
|
apiDeployPostgres,
|
||||||
apiFindOnePostgres,
|
apiFindOnePostgres,
|
||||||
apiResetPostgres,
|
apiResetPostgres,
|
||||||
apiSaveEnviromentVariablesPostgres,
|
apiSaveEnvironmentVariablesPostgres,
|
||||||
apiSaveExternalPortPostgres,
|
apiSaveExternalPortPostgres,
|
||||||
apiUpdatePostgres,
|
apiUpdatePostgres,
|
||||||
} from "@/server/db/schema/postgres";
|
} from "@/server/db/schema/postgres";
|
||||||
@@ -130,8 +130,8 @@ export const postgresRouter = createTRPCRouter({
|
|||||||
|
|
||||||
return postgres;
|
return postgres;
|
||||||
}),
|
}),
|
||||||
saveEnviroment: protectedProcedure
|
saveEnvironment: protectedProcedure
|
||||||
.input(apiSaveEnviromentVariablesPostgres)
|
.input(apiSaveEnvironmentVariablesPostgres)
|
||||||
.mutation(async ({ input }) => {
|
.mutation(async ({ input }) => {
|
||||||
const service = await updatePostgresById(input.postgresId, {
|
const service = await updatePostgresById(input.postgresId, {
|
||||||
env: input.env,
|
env: input.env,
|
||||||
@@ -140,7 +140,7 @@ export const postgresRouter = createTRPCRouter({
|
|||||||
if (!service) {
|
if (!service) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
code: "BAD_REQUEST",
|
code: "BAD_REQUEST",
|
||||||
message: "Update: Error to add enviroment variables",
|
message: "Update: Error to add environment variables",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
apiDeployRedis,
|
apiDeployRedis,
|
||||||
apiFindOneRedis,
|
apiFindOneRedis,
|
||||||
apiResetRedis,
|
apiResetRedis,
|
||||||
apiSaveEnviromentVariablesRedis,
|
apiSaveEnvironmentVariablesRedis,
|
||||||
apiSaveExternalPortRedis,
|
apiSaveExternalPortRedis,
|
||||||
apiUpdateRedis,
|
apiUpdateRedis,
|
||||||
} from "@/server/db/schema/redis";
|
} from "@/server/db/schema/redis";
|
||||||
@@ -147,8 +147,8 @@ export const redisRouter = createTRPCRouter({
|
|||||||
|
|
||||||
return redis;
|
return redis;
|
||||||
}),
|
}),
|
||||||
saveEnviroment: protectedProcedure
|
saveEnvironment: protectedProcedure
|
||||||
.input(apiSaveEnviromentVariablesRedis)
|
.input(apiSaveEnvironmentVariablesRedis)
|
||||||
.mutation(async ({ input }) => {
|
.mutation(async ({ input }) => {
|
||||||
const redis = await updateRedisById(input.redisId, {
|
const redis = await updateRedisById(input.redisId, {
|
||||||
env: input.env,
|
env: input.env,
|
||||||
@@ -157,7 +157,7 @@ export const redisRouter = createTRPCRouter({
|
|||||||
if (!redis) {
|
if (!redis) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
code: "BAD_REQUEST",
|
code: "BAD_REQUEST",
|
||||||
message: "Update: Error to add enviroment variables",
|
message: "Update: Error to add environment variables",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ export const apiSaveGitProvider = createSchema
|
|||||||
})
|
})
|
||||||
.required();
|
.required();
|
||||||
|
|
||||||
export const apiSaveEnviromentVariables = createSchema
|
export const apiSaveEnvironmentVariables = createSchema
|
||||||
.pick({
|
.pick({
|
||||||
applicationId: true,
|
applicationId: true,
|
||||||
env: true,
|
env: true,
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ export const apiChangeMariaDBStatus = createSchema
|
|||||||
})
|
})
|
||||||
.required();
|
.required();
|
||||||
|
|
||||||
export const apiSaveEnviromentVariablesMariaDB = createSchema
|
export const apiSaveEnvironmentVariablesMariaDB = createSchema
|
||||||
.pick({
|
.pick({
|
||||||
mariadbId: true,
|
mariadbId: true,
|
||||||
env: true,
|
env: true,
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ export const apiChangeMongoStatus = createSchema
|
|||||||
})
|
})
|
||||||
.required();
|
.required();
|
||||||
|
|
||||||
export const apiSaveEnviromentVariablesMongo = createSchema
|
export const apiSaveEnvironmentVariablesMongo = createSchema
|
||||||
.pick({
|
.pick({
|
||||||
mongoId: true,
|
mongoId: true,
|
||||||
env: true,
|
env: true,
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ export const apiChangeMySqlStatus = createSchema
|
|||||||
})
|
})
|
||||||
.required();
|
.required();
|
||||||
|
|
||||||
export const apiSaveEnviromentVariablesMySql = createSchema
|
export const apiSaveEnvironmentVariablesMySql = createSchema
|
||||||
.pick({
|
.pick({
|
||||||
mysqlId: true,
|
mysqlId: true,
|
||||||
env: true,
|
env: true,
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ export const apiChangePostgresStatus = createSchema
|
|||||||
})
|
})
|
||||||
.required();
|
.required();
|
||||||
|
|
||||||
export const apiSaveEnviromentVariablesPostgres = createSchema
|
export const apiSaveEnvironmentVariablesPostgres = createSchema
|
||||||
.pick({
|
.pick({
|
||||||
postgresId: true,
|
postgresId: true,
|
||||||
env: true,
|
env: true,
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ export const apiChangeRedisStatus = createSchema
|
|||||||
})
|
})
|
||||||
.required();
|
.required();
|
||||||
|
|
||||||
export const apiSaveEnviromentVariablesRedis = createSchema
|
export const apiSaveEnvironmentVariablesRedis = createSchema
|
||||||
.pick({
|
.pick({
|
||||||
redisId: true,
|
redisId: true,
|
||||||
env: true,
|
env: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user