Fix MIAA connection strings page showing user as undefined (#15105)

This commit is contained in:
Charles Gagnon
2021-04-12 18:15:56 -07:00
committed by GitHub
parent 0c241c6d65
commit 34c8c77dc1

View File

@@ -20,6 +20,8 @@ export class MiaaConnectionStringsPage extends DashboardPage {
super(modelView, dashboard); super(modelView, dashboard);
this.disposables.push(this._miaaModel.onConfigUpdated(_ => this.disposables.push(this._miaaModel.onConfigUpdated(_ =>
this.eventuallyRunOnInitialized(() => this.updateConnectionStrings()))); this.eventuallyRunOnInitialized(() => this.updateConnectionStrings())));
this.disposables.push(this._miaaModel.onDatabasesUpdated(_ =>
this.eventuallyRunOnInitialized(() => this.updateConnectionStrings())));
} }
protected get title(): string { protected get title(): string {
@@ -77,7 +79,7 @@ export class MiaaConnectionStringsPage extends DashboardPage {
} }
const externalEndpoint = parseIpAndPort(config.status.externalEndpoint); const externalEndpoint = parseIpAndPort(config.status.externalEndpoint);
const username = this._miaaModel.username; const username = this._miaaModel.username ?? '{your_username_here}';
return [ return [
new InputKeyValue(this.modelView.modelBuilder, 'ADO.NET', `Server=tcp:${externalEndpoint.ip},${externalEndpoint.port};Persist Security Info=False;User ID=${username};Password={your_password_here};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;`), new InputKeyValue(this.modelView.modelBuilder, 'ADO.NET', `Server=tcp:${externalEndpoint.ip},${externalEndpoint.port};Persist Security Info=False;User ID=${username};Password={your_password_here};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;`),