fix(core-connections): CB-595 remove this.config.name assignment

This commit is contained in:
Naumov Alexey
2020-12-21 17:12:00 +03:00
parent c2b049424d
commit aad7c78d84
2 changed files with 4 additions and 7 deletions
@@ -69,10 +69,9 @@ implements IInitializableController {
): Promise<void> => this.loadDriver(driverId, prevValue);
onFormChange = (value?: unknown, name?: string): void => {
if (name === 'name') {
return;
if (name !== 'name') {
this.updateNameTemplate(this.model.connection);
}
this.updateNameTemplate(this.model.connection);
};
@action
@@ -72,10 +72,9 @@ implements IInitializableController, IDestructibleController {
}
onChange = (value?: unknown, name?: string): void => {
if (name === 'name') {
return;
if (name !== 'name') {
this.updateNameTemplate(this.config);
}
this.updateNameTemplate(this.config);
};
onTestConnection = async () => {
@@ -212,7 +211,6 @@ implements IInitializableController, IDestructibleController {
this.config.host = this.driver.defaultServer || 'localhost';
this.config.port = this.driver.defaultPort || '';
this.config.url = this.driver.sampleURL || '';
this.config.name = this.isUrlConnection ? this.config.url : `${this.driver.name}@${this.config.host}`;
this.config.driverId = this.driver.id;
this.config.databaseName = this.driver.defaultDatabase;
this.config.properties = {};