Status dictionary update for MIAA (#21050)

* Status update for miaa structure

* Added examples in comments

Co-authored-by: Candice Ye <canye@microsoft.com>
This commit is contained in:
Candice Ye
2022-11-01 14:58:27 -07:00
committed by GitHub
parent 3295add69a
commit 3ecea1af34
5 changed files with 197 additions and 174 deletions

View File

@@ -123,7 +123,7 @@ export class MiaaModel extends ResourceModel {
}
// If we have an external endpoint configured then fetch the databases now
if (this._config.status.primaryEndpoint) {
if (this._config.status.endpoints.primaryEndpoint) {
this.getDatabases(false).catch(_err => {
// If an error occurs still fire the event so callers can know to
// update (e.g. so dashboards don't show the loading icon forever)
@@ -205,7 +205,7 @@ export class MiaaModel extends ResourceModel {
}
protected createConnectionProfile(): azdata.IConnectionProfile {
const ipAndPort = parseIpAndPort(this.config?.status.primaryEndpoint || '');
const ipAndPort = parseIpAndPort(this.config?.status.endpoints.primaryEndpoint || '');
return {
serverName: `${ipAndPort.ip},${ipAndPort.port}`,
databaseName: '',