diff --git a/extensions/sql-migration/src/dashboard/dashboardTab.ts b/extensions/sql-migration/src/dashboard/dashboardTab.ts index a6edffb898..309261f26b 100644 --- a/extensions/sql-migration/src/dashboard/dashboardTab.ts +++ b/extensions/sql-migration/src/dashboard/dashboardTab.ts @@ -347,27 +347,27 @@ export class DashboardTab extends TabBase { { title: loc.DASHBOARD_HELP_LINK_MIGRATE_USING_ADS, description: loc.DASHBOARD_HELP_DESCRIPTION_MIGRATE_USING_ADS, - link: 'https://docs.microsoft.com/azure/dms/migration-using-azure-data-studio' + link: 'https://learn.microsoft.com/azure/dms/migration-using-azure-data-studio' }, { title: loc.DASHBOARD_HELP_LINK_MI_TUTORIAL, description: loc.DASHBOARD_HELP_DESCRIPTION_MI_TUTORIAL, - link: 'https://docs.microsoft.com/azure/dms/tutorial-sql-server-managed-instance-online-ads' + link: 'https://learn.microsoft.com/azure/dms/tutorial-sql-server-managed-instance-online-ads' }, { title: loc.DASHBOARD_HELP_LINK_VM_TUTORIAL, description: loc.DASHBOARD_HELP_DESCRIPTION_VMTUTORIAL, - link: 'https://docs.microsoft.com/azure/dms/tutorial-sql-server-to-virtual-machine-online-ads' + link: 'https://learn.microsoft.com/azure/dms/tutorial-sql-server-to-virtual-machine-online-ads' }, { title: loc.DASHBOARD_HELP_LINK_SQLDB_TUTORIAL, description: loc.DASHBOARD_HELP_DESCRIPTION_SQLDBTUTORIAL, - link: 'https://docs.microsoft.com/azure/dms/tutorial-sql-server-to-sql-db-offline-ads' + link: 'https://learn.microsoft.com/azure/dms/tutorial-sql-server-azure-sql-database-offline-ads' }, { title: loc.DASHBOARD_HELP_LINK_DMS_GUIDE, description: loc.DASHBOARD_HELP_DESCRIPTION_DMS_GUIDE, - link: 'https://docs.microsoft.com/data-migration/' + link: 'https://learn.microsoft.com/data-migration/' }, ]; diff --git a/extensions/sql-migration/src/wizard/skuRecommendationPage.ts b/extensions/sql-migration/src/wizard/skuRecommendationPage.ts index bfc3684e5a..999e7dd155 100644 --- a/extensions/sql-migration/src/wizard/skuRecommendationPage.ts +++ b/extensions/sql-migration/src/wizard/skuRecommendationPage.ts @@ -558,10 +558,6 @@ export class SKURecommendationPage extends MigrationWizardPage { } public async onPageEnter(pageChangeInfo: azdata.window.WizardPageChangeInfo): Promise { - if (pageChangeInfo.newPage < pageChangeInfo.lastPage) { - return; - } - this.wizard.registerNavigationValidator((pageChangeInfo) => { this.wizard.message = { text: '' }; if (pageChangeInfo.newPage < pageChangeInfo.lastPage) { @@ -585,20 +581,14 @@ export class SKURecommendationPage extends MigrationWizardPage { } return true; }); - this.wizard.nextButton.enabled = false; await this.constructDetails(); this.wizard.nextButton.enabled = this.migrationStateModel._assessmentResults !== undefined; } public async onPageLeave(pageChangeInfo: azdata.window.WizardPageChangeInfo): Promise { + this.wizard.message = { text: '' }; + this.wizard.registerNavigationValidator((pageChangeInfo) => true); this.eventListener?.dispose(); - this.wizard.message = { - text: '', - level: azdata.window.MessageLevel.Error - }; - this.wizard.registerNavigationValidator((pageChangeInfo) => { - return true; - }); } protected async handleStateChange(e: StateChangeEvent): Promise { diff --git a/extensions/sql-migration/src/wizard/targetSelectionPage.ts b/extensions/sql-migration/src/wizard/targetSelectionPage.ts index 4ec575a2b7..4069ce9c2a 100644 --- a/extensions/sql-migration/src/wizard/targetSelectionPage.ts +++ b/extensions/sql-migration/src/wizard/targetSelectionPage.ts @@ -152,7 +152,7 @@ export class TargetSelectionPage extends MigrationWizardPage { if (!targetMi || resourceDropdownValue === constants.NO_MANAGED_INSTANCE_FOUND) { errors.push(constants.INVALID_MANAGED_INSTANCE_ERROR); } - if (targetMi.properties.state !== 'Ready') { + if (targetMi?.properties?.state !== 'Ready') { errors.push(constants.MI_NOT_READY_ERROR(targetMi.name, targetMi.properties.state)); } break; @@ -168,7 +168,7 @@ export class TargetSelectionPage extends MigrationWizardPage { errors.push(constants.INVALID_SQL_DATABASE_ERROR); } // TODO: verify what state check is needed/possible? - if (targetSqlDB.properties.state !== 'Ready') { + if (targetSqlDB?.properties?.state !== 'Ready') { errors.push(constants.SQLDB_NOT_READY_ERROR(targetSqlDB.name, targetSqlDB.properties.state)); } @@ -666,6 +666,8 @@ export class TargetSelectionPage extends MigrationWizardPage { } break; } + + await this._validateFields(); } else { this.migrationStateModel._targetServerInstance = undefined!; if (isSqlDbTarget) { @@ -751,7 +753,10 @@ export class TargetSelectionPage extends MigrationWizardPage { }, ], }) - .withValidation(table => table.dataValues !== undefined && table.dataValues.length > 0) + .withValidation( + table => + this.migrationStateModel._targetType !== MigrationTargetType.SQLDB + || (table.dataValues !== undefined && table.dataValues.length > 0)) .component(); } @@ -1012,4 +1017,16 @@ export class TargetSelectionPage extends MigrationWizardPage { } return errors; } + + private async _validateFields(): Promise { + await this._azureAccountsDropdown.validate(); + await this._accountTenantDropdown.validate(); + await this._azureSubscriptionDropdown.validate(); + await this._azureLocationDropdown.validate(); + await this._azureResourceGroupDropdown.validate(); + await this._azureResourceDropdown.validate(); + await this._targetPasswordInputBox.validate(); + await this._targetUserNameInputBox.validate(); + await this._azureResourceTable.validate(); + } }