new postgres model (#12305)

Co-authored-by: Brian Bergeron <brberger@microsoft.com>
This commit is contained in:
Brian Bergeron
2020-09-15 14:52:04 -07:00
committed by GitHub
parent 9cf80113fc
commit f79ff99d0b
16 changed files with 156 additions and 681 deletions

View File

@@ -18,7 +18,7 @@ export class PostgresConnectionStringsPage extends DashboardPage {
constructor(protected modelView: azdata.ModelView, private _postgresModel: PostgresModel) {
super(modelView);
this.disposables.push(this._postgresModel.onServiceUpdated(
this.disposables.push(this._postgresModel.onConfigUpdated(
() => this.eventuallyRunOnInitialized(() => this.handleServiceUpdated())));
}
@@ -65,7 +65,7 @@ export class PostgresConnectionStringsPage extends DashboardPage {
this.loading = this.modelView.modelBuilder.loadingComponent()
.withItem(this.keyValueContainer.container)
.withProperties<azdata.LoadingComponentProperties>({
loading: !this._postgresModel.serviceLastUpdated
loading: !this._postgresModel.configLastUpdated
}).component();
content.addItem(this.loading);
@@ -98,7 +98,7 @@ export class PostgresConnectionStringsPage extends DashboardPage {
}
private getConnectionStrings(): KeyValue[] {
const endpoint: { ip?: string, port?: number } = this._postgresModel.endpoint;
const endpoint: { ip: string, port: string } = this._postgresModel.endpoint;
return [
new InputKeyValue(this.modelView.modelBuilder, 'ADO.NET', `Server=${endpoint.ip};Database=postgres;Port=${endpoint.port};User Id=postgres;Password={your_password_here};Ssl Mode=Require;`),