mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-15 20:25:23 +02:00
[autofix.ci] apply automated fixes
This commit is contained in:
@@ -585,7 +585,10 @@ export const HandleBackup = ({
|
||||
<FormLabel>Database</FormLabel>
|
||||
<FormControl>
|
||||
<Input
|
||||
disabled={databaseType === "web-server" || databaseType === "libsql"}
|
||||
disabled={
|
||||
databaseType === "web-server" ||
|
||||
databaseType === "libsql"
|
||||
}
|
||||
placeholder={"dokploy"}
|
||||
{...field}
|
||||
/>
|
||||
|
||||
@@ -211,7 +211,12 @@ export const RestoreBackup = ({
|
||||
defaultValues: {
|
||||
destinationId: "",
|
||||
backupFile: "",
|
||||
databaseName: databaseType === "web-server" ? "dokploy" : databaseType === "libsql" ? "iku.db" : "",
|
||||
databaseName:
|
||||
databaseType === "web-server"
|
||||
? "dokploy"
|
||||
: databaseType === "libsql"
|
||||
? "iku.db"
|
||||
: "",
|
||||
databaseType:
|
||||
backupType === "compose" ? ("postgres" as DatabaseType) : databaseType,
|
||||
backupType: backupType,
|
||||
@@ -523,7 +528,10 @@ export const RestoreBackup = ({
|
||||
<Input
|
||||
placeholder="Enter database name"
|
||||
{...field}
|
||||
disabled={databaseType === "web-server" || databaseType === "libsql"}
|
||||
disabled={
|
||||
databaseType === "web-server" ||
|
||||
databaseType === "libsql"
|
||||
}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
|
||||
@@ -107,13 +107,18 @@ export const ShowExternalLibsqlCredentials = ({ libsqlId }: Props) => {
|
||||
);
|
||||
|
||||
if (data?.sqldNode !== "replica") {
|
||||
const grpcPort =
|
||||
form.watch("externalGRPCPort") || data?.externalGRPCPort;
|
||||
const grpcPort = form.watch("externalGRPCPort") || data?.externalGRPCPort;
|
||||
setGRPCConnectionUrl(
|
||||
`http://${data?.databaseUser}:${data?.databasePassword}@${getIp}:${grpcPort}`,
|
||||
);
|
||||
}
|
||||
}, [data?.externalGRPCPort, data?.databasePassword, form, data?.databaseUser, getIp]);
|
||||
}, [
|
||||
data?.externalGRPCPort,
|
||||
data?.databasePassword,
|
||||
form,
|
||||
data?.databaseUser,
|
||||
getIp,
|
||||
]);
|
||||
|
||||
return (
|
||||
<div className="flex w-full flex-col gap-5">
|
||||
@@ -130,10 +135,7 @@ export const ShowExternalLibsqlCredentials = ({ libsqlId }: Props) => {
|
||||
{!getIp && (
|
||||
<AlertBlock type="warning">
|
||||
You need to set an IP address in your{" "}
|
||||
<Link
|
||||
href="/dashboard/settings/server"
|
||||
className="text-primary"
|
||||
>
|
||||
<Link href="/dashboard/settings/server" className="text-primary">
|
||||
{data?.serverId
|
||||
? "Remote Servers -> Server -> Edit Server -> Update IP Address"
|
||||
: "Web Server -> Server -> Update Server IP"}
|
||||
@@ -207,9 +209,7 @@ export const ShowExternalLibsqlCredentials = ({ libsqlId }: Props) => {
|
||||
name="externalGRPCPort"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>
|
||||
External GRPC Port (Internet)
|
||||
</FormLabel>
|
||||
<FormLabel>External GRPC Port (Internet)</FormLabel>
|
||||
<FormControl>
|
||||
<Input
|
||||
placeholder="5001"
|
||||
|
||||
@@ -170,9 +170,21 @@ export const libsqlRouter = createTRPCRouter({
|
||||
}
|
||||
|
||||
const portsToCheck = [
|
||||
{ port: input.externalPort, name: "externalPort", current: libsql.externalPort },
|
||||
{ port: input.externalGRPCPort, name: "externalGRPCPort", current: libsql.externalGRPCPort },
|
||||
{ port: input.externalAdminPort, name: "externalAdminPort", current: libsql.externalAdminPort },
|
||||
{
|
||||
port: input.externalPort,
|
||||
name: "externalPort",
|
||||
current: libsql.externalPort,
|
||||
},
|
||||
{
|
||||
port: input.externalGRPCPort,
|
||||
name: "externalGRPCPort",
|
||||
current: libsql.externalGRPCPort,
|
||||
},
|
||||
{
|
||||
port: input.externalAdminPort,
|
||||
name: "externalAdminPort",
|
||||
current: libsql.externalAdminPort,
|
||||
},
|
||||
];
|
||||
|
||||
for (const { port, name, current } of portsToCheck) {
|
||||
|
||||
Reference in New Issue
Block a user