SKU recommendation page work (#12050)

This commit is contained in:
Amir Omidi
2020-09-01 09:31:39 -07:00
committed by GitHub
parent 96a6d0674a
commit 53081cfca9
7 changed files with 99 additions and 54 deletions

View File

@@ -17,7 +17,7 @@ export class WizardController {
}
public async openWizard(profile: azdata.connection.Connection): Promise<void> {
const stateModel = new MigrationStateModel(profile);
const stateModel = new MigrationStateModel(this.extensionContext, profile);
this.extensionContext.subscriptions.push(stateModel);
this.createWizard(stateModel);
@@ -26,6 +26,8 @@ export class WizardController {
private async createWizard(stateModel: MigrationStateModel): Promise<void> {
const wizard = azdata.window.createWizard(WIZARD_TITLE, 'wide');
wizard.generateScriptButton.enabled = false;
wizard.generateScriptButton.hidden = true;
const sourceConfigurationPage = new SourceConfigurationPage(wizard, stateModel);
const skuRecommendationPage = new SKURecommendationPage(wizard, stateModel);
const subscriptionSelectionPage = new SubscriptionSelectionPage(wizard, stateModel);
@@ -47,13 +49,13 @@ export class WizardController {
});
wizard.registerNavigationValidator(async validator => {
const lastPage = validator.lastPage;
// const lastPage = validator.lastPage;
const canLeave = await pages[lastPage]?.canLeave() ?? true;
const canEnter = await pages[lastPage]?.canEnter() ?? true;
// const canLeave = await pages[lastPage]?.canLeave() ?? true;
// const canEnter = await pages[lastPage]?.canEnter() ?? true;
return canEnter && canLeave;
// return true;
// return canEnter && canLeave;
return true;
});
await Promise.all(wizardSetupPromises);