Dev/brih/feature/public preview sql db (#20644)

* sql db preview updates

* update readme release notes
This commit is contained in:
brian-harris
2022-09-26 12:50:04 -07:00
committed by GitHub
parent 11fbf5f147
commit d2fbda362c
6 changed files with 30 additions and 28 deletions

View File

@@ -117,11 +117,6 @@ export class TargetSelectionPage extends MigrationWizardPage {
await this.populateLocationDropdown();
}
if (this.migrationStateModel._didUpdateDatabasesForMigration) {
this._initializeSourceTargetDatabaseMap();
this._updateConnectionButtonState();
}
this.wizard.registerNavigationValidator((pageChangeInfo) => {
this.wizard.message = { text: '' };
if (pageChangeInfo.newPage < pageChangeInfo.lastPage) {
@@ -402,11 +397,10 @@ export class TargetSelectionPage extends MigrationWizardPage {
this._disposables.push(
this._targetUserNameInputBox.onTextChanged(
(value: string) => this.migrationStateModel._targetUserName = value ?? ''));
this._disposables.push(
this._targetUserNameInputBox.onValidityChanged(
valid => this._updateConnectionButtonState()));
async (value: string) => {
this.migrationStateModel._targetUserName = value ?? '';
await this._resetTargetMapping();
}));
// target password
const targetPasswordLabel = this._view.modelBuilder.text()
@@ -426,11 +420,10 @@ export class TargetSelectionPage extends MigrationWizardPage {
}).component();
this._disposables.push(
this._targetPasswordInputBox.onTextChanged(
(value: string) => { this.migrationStateModel._targetPassword = value ?? ''; }));
this._disposables.push(
this._targetPasswordInputBox.onValidityChanged(
valid => this._updateConnectionButtonState()));
async (value: string) => {
this.migrationStateModel._targetPassword = value ?? '';
await this._resetTargetMapping();
}));
// test connection button
this._testConectionButton = this._view.modelBuilder.button()
@@ -540,6 +533,13 @@ export class TargetSelectionPage extends MigrationWizardPage {
.component();
}
private async _resetTargetMapping(): Promise<void> {
this._initializeSourceTargetDatabaseMap();
this._updateConnectionButtonState();
await this._azureResourceTable.setDataValues([]);
await utils.updateControlDisplay(this._connectionResultsInfoBox, false);
}
private async _showConnectionResults(
databases: TargetDatabaseInfo[],
errorMessage?: string): Promise<void> {
@@ -671,10 +671,8 @@ export class TargetSelectionPage extends MigrationWizardPage {
this.migrationStateModel._sqlMigrationServices = undefined!;
if (isSqlDbTarget) {
await this._azureResourceTable.setDataValues([]);
await this._resetTargetMapping();
this._targetPasswordInputBox.value = '';
this._initializeSourceTargetDatabaseMap();
this._updateConnectionButtonState();
}
}));