mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-15 01:25:36 -05:00
Fixes for sql db projects dashboard (#15100)
* Fix ID assignment for sql db projects dashboard * Update with new fixes * Fix tests * Fix test
This commit is contained in:
@@ -42,6 +42,7 @@ export class PublishDatabaseDialog {
|
||||
private sqlCmdVars: Record<string, string> | undefined;
|
||||
private deploymentOptions: DeploymentOptions | undefined;
|
||||
private profileUsed: boolean = false;
|
||||
private serverName: string | undefined;
|
||||
|
||||
private toDispose: vscode.Disposable[] = [];
|
||||
|
||||
@@ -183,6 +184,7 @@ export class PublishDatabaseDialog {
|
||||
public async publishClick(): Promise<void> {
|
||||
const settings: IPublishSettings = {
|
||||
databaseName: this.getTargetDatabaseName(),
|
||||
serverName: this.getServerName(),
|
||||
upgradeExisting: true,
|
||||
connectionUri: await this.getConnectionUri(),
|
||||
sqlCmdVariables: this.getSqlCmdVariablesForPublish(),
|
||||
@@ -202,6 +204,7 @@ export class PublishDatabaseDialog {
|
||||
const sqlCmdVars = this.getSqlCmdVariablesForPublish();
|
||||
const settings: IGenerateScriptSettings = {
|
||||
databaseName: this.getTargetDatabaseName(),
|
||||
serverName: this.getServerName(),
|
||||
connectionUri: await this.getConnectionUri(),
|
||||
sqlCmdVariables: sqlCmdVars,
|
||||
deploymentOptions: await this.getDeploymentOptions(),
|
||||
@@ -249,6 +252,10 @@ export class PublishDatabaseDialog {
|
||||
return this.project.projectFileName;
|
||||
}
|
||||
|
||||
public getServerName(): string {
|
||||
return this.serverName!;
|
||||
}
|
||||
|
||||
private createRadioButtons(view: azdata.ModelView): azdata.Component {
|
||||
this.connectionsRadioButton = view.modelBuilder.radioButton()
|
||||
.withProperties({
|
||||
@@ -488,6 +495,7 @@ export class PublishDatabaseDialog {
|
||||
selectConnectionButton.onDidClick(async () => {
|
||||
let connection = await azdata.connection.openConnectionDialog();
|
||||
this.connectionId = connection.connectionId;
|
||||
this.serverName = connection.options['server'];
|
||||
|
||||
let connectionTextboxValue: string = getConnectionName(connection);
|
||||
|
||||
@@ -550,6 +558,7 @@ export class PublishDatabaseDialog {
|
||||
(<azdata.DropDownComponent>this.targetDatabaseDropDown).values = [];
|
||||
|
||||
this.connectionId = result.connectionId;
|
||||
this.serverName = result.serverName;
|
||||
await this.updateConnectionComponents(result.connection, <string>this.connectionId);
|
||||
|
||||
if (result.databaseName) {
|
||||
|
||||
Reference in New Issue
Block a user