mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
a few fixes for dacpac extension (#10595)
This commit is contained in:
@@ -76,7 +76,14 @@ export abstract class BasePage {
|
|||||||
usr = loc.defaultText;
|
usr = loc.defaultText;
|
||||||
}
|
}
|
||||||
|
|
||||||
let finalName = `${srv} (${usr})`;
|
let finalName;
|
||||||
|
// show connection name if there is one
|
||||||
|
if (c.options.connectionName) {
|
||||||
|
finalName = `${c.options.connectionName}`;
|
||||||
|
} else {
|
||||||
|
finalName = `${srv} (${usr})`;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
connection: c,
|
connection: c,
|
||||||
displayName: finalName,
|
displayName: finalName,
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ export abstract class DacFxConfigPage extends BasePage {
|
|||||||
|
|
||||||
// Handle database changes
|
// Handle database changes
|
||||||
this.databaseDropdown.onValueChanged(async () => {
|
this.databaseDropdown.onValueChanged(async () => {
|
||||||
this.model.database = (<azdata.CategoryValue>this.databaseDropdown.value).name;
|
this.model.database = <string>this.databaseDropdown.value;
|
||||||
this.fileTextBox.value = this.generateFilePathFromDatabaseAndTimestamp();
|
this.fileTextBox.value = this.generateFilePathFromDatabaseAndTimestamp();
|
||||||
this.model.filePath = this.fileTextBox.value;
|
this.model.filePath = this.fileTextBox.value;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -98,9 +98,15 @@ export class DataTierApplicationWizard {
|
|||||||
|
|
||||||
this.connection = await azdata.connection.getCurrentConnection();
|
this.connection = await azdata.connection.getCurrentConnection();
|
||||||
if (!this.connection || (profile && this.connection.connectionId !== profile.id)) {
|
if (!this.connection || (profile && this.connection.connectionId !== profile.id)) {
|
||||||
// @TODO: remove cast once azdata update complete - karlb 3/1/2019
|
// check if there are any active connections
|
||||||
this.connection = <azdata.connection.ConnectionProfile><any>await azdata.connection.openConnectionDialog(undefined, profile);
|
const connections = await azdata.connection.getConnections(true);
|
||||||
|
if (connections.length > 0) {
|
||||||
|
// set connection to the first one in the list
|
||||||
|
this.connection = connections[0];
|
||||||
|
} else {
|
||||||
|
// @TODO: remove cast once azdata update complete - karlb 3/1/2019
|
||||||
|
this.connection = <azdata.connection.ConnectionProfile><any>await azdata.connection.openConnectionDialog(undefined, profile);
|
||||||
|
}
|
||||||
// don't open the wizard if connection dialog is cancelled
|
// don't open the wizard if connection dialog is cancelled
|
||||||
if (!this.connection) {
|
if (!this.connection) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user