Changing how connection is stored in Migration Wizard and some misc code cleanup (#13951)

* Disabling pages that are not needed
Some source connection code cleanup

* Enabled some pages
This commit is contained in:
Aasim Khan
2021-01-12 16:17:14 -08:00
committed by GitHub
parent 140a1fbc3e
commit bcae0d2b02
4 changed files with 27 additions and 14 deletions

View File

@@ -20,10 +20,18 @@ class SQLMigration {
async registerCommands(): Promise<void> {
const commandDisposables: vscode.Disposable[] = [ // Array of disposables returned by registerCommand
vscode.commands.registerCommand('sqlmigration.start', async () => {
const connection = await azdata.connection.openConnectionDialog();
let activeConnection = await azdata.connection.getCurrentConnection();
let connectionId: string = '';
if (!activeConnection) {
const connection = await azdata.connection.openConnectionDialog();
if (connection) {
connectionId = connection.connectionId;
}
} else {
connectionId = activeConnection.connectionId;
}
const wizardController = new WizardController(this.context);
await wizardController.openWizard(connection);
await wizardController.openWizard(connectionId);
}),
vscode.commands.registerCommand('sqlmigration.testDialog', async () => {