mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
fix flatfile and dacfx wizard not defaulting to selected connection when launched from command palette (#4344)
This commit is contained in:
@@ -91,7 +91,15 @@ export class DataTierApplicationWizard {
|
|||||||
if (!this.connection) {
|
if (!this.connection) {
|
||||||
// @TODO: remove cast once azdata update complete - karlb 3/1/2019
|
// @TODO: remove cast once azdata update complete - karlb 3/1/2019
|
||||||
this.connection = <azdata.connection.ConnectionProfile><any>await azdata.connection.openConnectionDialog();
|
this.connection = <azdata.connection.ConnectionProfile><any>await azdata.connection.openConnectionDialog();
|
||||||
|
|
||||||
|
// don't open the wizard if connection dialog is cancelled
|
||||||
|
if (!this.connection) {
|
||||||
|
vscode.window.showErrorMessage(localize('dacfx.needConnection', 'Please connect to a server before using this wizard.'));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.model.serverId = this.connection.connectionId;
|
||||||
|
|
||||||
this.wizard = azdata.window.createWizard('Data-tier Application Wizard');
|
this.wizard = azdata.window.createWizard('Data-tier Application Wizard');
|
||||||
let selectOperationWizardPage = azdata.window.createWizardPage(localize('dacFx.selectOperationPageName', 'Select an Operation'));
|
let selectOperationWizardPage = azdata.window.createWizardPage(localize('dacFx.selectOperationPageName', 'Select an Operation'));
|
||||||
|
|||||||
@@ -46,6 +46,9 @@ export class FlatFileWizard {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let currentConnection = await azdata.connection.getCurrentConnection();
|
||||||
|
model.serverId = currentConnection.connectionId;
|
||||||
|
|
||||||
this.wizard = azdata.window.createWizard(localize('flatFileImport.wizardName', 'Import flat file wizard'));
|
this.wizard = azdata.window.createWizard(localize('flatFileImport.wizardName', 'Import flat file wizard'));
|
||||||
let page1 = azdata.window.createWizardPage(localize('flatFileImport.page1Name', 'Specify Input File'));
|
let page1 = azdata.window.createWizardPage(localize('flatFileImport.page1Name', 'Specify Input File'));
|
||||||
let page2 = azdata.window.createWizardPage(localize('flatFileImport.page2Name', 'Preview Data'));
|
let page2 = azdata.window.createWizardPage(localize('flatFileImport.page2Name', 'Preview Data'));
|
||||||
|
|||||||
Reference in New Issue
Block a user