mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
CB-4067 fixes create connection template popup SSH form
This commit is contained in:
@@ -70,21 +70,17 @@ export class ConnectionFormSSHPart extends FormPart<INetworkHandlerConfig, IConn
|
||||
return;
|
||||
}
|
||||
|
||||
let handlerConfig: NetworkHandlerConfigInput | undefined;
|
||||
|
||||
const passwordChanged = isPasswordChanged(this.state, this.initialState);
|
||||
const keyChanged = isKeyChanged(this.state, this.initialState);
|
||||
|
||||
if (this.isChanged || passwordChanged || keyChanged) {
|
||||
handlerConfig = {
|
||||
...this.state,
|
||||
savePassword: this.state.savePassword || optionsPart.state.sharedCredentials,
|
||||
key: this.state.authType === NetworkHandlerAuthType.PublicKey && keyChanged ? this.state.key : undefined,
|
||||
password: passwordChanged ? this.state.password : undefined,
|
||||
};
|
||||
let handlerConfig: NetworkHandlerConfigInput = {
|
||||
...this.state,
|
||||
savePassword: this.state.savePassword || optionsPart.state.sharedCredentials,
|
||||
key: this.state.authType === NetworkHandlerAuthType.PublicKey && keyChanged ? this.state.key : undefined,
|
||||
password: passwordChanged ? this.state.password : undefined,
|
||||
};
|
||||
|
||||
delete handlerConfig.secureProperties;
|
||||
}
|
||||
delete handlerConfig.secureProperties;
|
||||
|
||||
if (this.state.enabled && !this.state.savePassword) {
|
||||
this.formState.state.requiredNetworkHandlersIds.push(this.state.id);
|
||||
|
||||
Reference in New Issue
Block a user