mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix: fix undefined error for database length
This commit is contained in:
parent
65254f1686
commit
936cf76a4c
@ -78,7 +78,7 @@ export const ShowExternalMariadbCredentials = ({ mariadbId }: Props) => {
|
||||
const hostname = window.location.hostname;
|
||||
const port = form.watch("externalPort") || data?.externalPort;
|
||||
|
||||
return `mariadb://${data?.databaseUser}:${'*'.repeat(data?.databasePassword.length)}@${hostname}:${port}/${data?.databaseName}`;
|
||||
return `mariadb://${data?.databaseUser}:${'*'.repeat(data?.databasePassword.length || 8)}@${hostname}:${port}/${data?.databaseName}`;
|
||||
};
|
||||
|
||||
setConnectionUrl(buildConnectionUrl());
|
||||
|
@ -60,7 +60,7 @@ export const ShowInternalMariadbCredentials = ({ mariadbId }: Props) => {
|
||||
<Label>Internal Connection URL </Label>
|
||||
<Input
|
||||
disabled
|
||||
value={`mariadb://${data?.databaseUser}:${'*'.repeat(data?.databasePassword.length)}@${data?.appName}:3306/${data?.databaseName}`}
|
||||
value={`mariadb://${data?.databaseUser}:${'*'.repeat(data?.databasePassword.length || 8)}@${data?.appName}:3306/${data?.databaseName}`}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -79,7 +79,7 @@ export const ShowExternalMongoCredentials = ({ mongoId }: Props) => {
|
||||
const hostname = window.location.hostname;
|
||||
const port = form.watch("externalPort") || data?.externalPort;
|
||||
|
||||
return `mongodb://${data?.databaseUser}:${'*'.repeat(data?.databasePassword.length)}@${hostname}:${port}`;
|
||||
return `mongodb://${data?.databaseUser}:${'*'.repeat(data?.databasePassword.length || 8)}@${hostname}:${port}`;
|
||||
};
|
||||
|
||||
setConnectionUrl(buildConnectionUrl());
|
||||
|
@ -48,7 +48,7 @@ export const ShowInternalMongoCredentials = ({ mongoId }: Props) => {
|
||||
<Label>Internal Connection URL </Label>
|
||||
<Input
|
||||
disabled
|
||||
value={`mongodb://${data?.databaseUser}:${'*'.repeat(data?.databasePassword.length)}@${data?.appName}:27017`}
|
||||
value={`mongodb://${data?.databaseUser}:${'*'.repeat(data?.databasePassword.length || 8)}@${data?.appName}:27017`}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -79,7 +79,7 @@ export const ShowExternalMysqlCredentials = ({ mysqlId }: Props) => {
|
||||
const hostname = window.location.hostname;
|
||||
const port = form.watch("externalPort") || data?.externalPort;
|
||||
|
||||
return `mysql://${data?.databaseUser}:${'*'.repeat(data?.databasePassword.length)}@${hostname}:${port}/${data?.databaseName}`;
|
||||
return `mysql://${data?.databaseUser}:${'*'.repeat(data?.databasePassword.length || 8)}@${hostname}:${port}/${data?.databaseName}`;
|
||||
};
|
||||
|
||||
setConnectionUrl(buildConnectionUrl());
|
||||
|
@ -60,7 +60,7 @@ export const ShowInternalMysqlCredentials = ({ mysqlId }: Props) => {
|
||||
<Label>Internal Connection URL </Label>
|
||||
<Input
|
||||
disabled
|
||||
value={`mysql://${data?.databaseUser}:${'*'.repeat(data?.databasePassword.length)}@${data?.appName}:3306/${data?.databaseName}`}
|
||||
value={`mysql://${data?.databaseUser}:${'*'.repeat(data?.databasePassword.length || 8)}@${data?.appName}:3306/${data?.databaseName}`}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -80,7 +80,7 @@ export const ShowExternalPostgresCredentials = ({ postgresId }: Props) => {
|
||||
const hostname = window.location.hostname;
|
||||
const port = form.watch("externalPort") || data?.externalPort;
|
||||
|
||||
return `postgresql://${data?.databaseUser}:${'*'.repeat(data?.databasePassword.length)}@${hostname}:${port}/${data?.databaseName}`;
|
||||
return `postgresql://${data?.databaseUser}:${'*'.repeat(data?.databasePassword.length || 8)}@${hostname}:${port}/${data?.databaseName}`;
|
||||
};
|
||||
|
||||
setConnectionUrl(buildConnectionUrl());
|
||||
|
@ -50,7 +50,7 @@ export const ShowInternalPostgresCredentials = ({ postgresId }: Props) => {
|
||||
<Label>Internal Connection URL </Label>
|
||||
<Input
|
||||
disabled
|
||||
value={`postgresql://${data?.databaseUser}:${'*'.repeat(data?.databasePassword.length)}@${data?.appName}:5432/${data?.databaseName}`}
|
||||
value={`postgresql://${data?.databaseUser}:${'*'.repeat(data?.databasePassword.length || 8)}@${data?.appName}:5432/${data?.databaseName}`}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -79,7 +79,7 @@ export const ShowExternalRedisCredentials = ({ redisId }: Props) => {
|
||||
const hostname = window.location.hostname;
|
||||
const port = form.watch("externalPort") || data?.externalPort;
|
||||
|
||||
return `redis://default:${'*'.repeat(data?.databasePassword.length)}@${hostname}:${port}`;
|
||||
return `redis://default:${'*'.repeat(data?.databasePassword.length || 8)}@${hostname}:${port}`;
|
||||
};
|
||||
|
||||
setConnectionUrl(buildConnectionUrl());
|
||||
|
@ -46,7 +46,7 @@ export const ShowInternalRedisCredentials = ({ redisId }: Props) => {
|
||||
<Label>Internal Connection URL </Label>
|
||||
<Input
|
||||
disabled
|
||||
value={`redis://default:${'*'.repeat(data?.databasePassword.length)}@${data?.appName}:6379`}
|
||||
value={`redis://default:${'*'.repeat(data?.databasePassword.length || 8)}@${data?.appName}:6379`}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user