mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-15 02:48:30 -05:00
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:
@@ -278,7 +278,7 @@ export class MiaaBackupsPage extends DashboardPage {
|
||||
} else {
|
||||
// If we don't have an endpoint then there's no point in showing the connect button - but the logic
|
||||
// to display text informing the user of this is already handled by the handleMiaaConfigUpdated
|
||||
if (this._miaaModel?.config?.status.primaryEndpoint) {
|
||||
if (this._miaaModel?.config?.status.endpoints.primaryEndpoint) {
|
||||
this._connectToServerLoading.loading = false;
|
||||
this._connectToServerButton.enabled = true;
|
||||
}
|
||||
|
||||
@@ -74,11 +74,11 @@ export class MiaaConnectionStringsPage extends DashboardPage {
|
||||
|
||||
private getConnectionStrings(): KeyValue[] {
|
||||
const config = this._miaaModel.config;
|
||||
if (!config?.status.primaryEndpoint) {
|
||||
if (!config?.status.endpoints.primaryEndpoint) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const externalEndpoint = parseIpAndPort(config.status.primaryEndpoint);
|
||||
const externalEndpoint = parseIpAndPort(config.status.endpoints.primaryEndpoint);
|
||||
const username = this._miaaModel.username ?? '{your_username_here}';
|
||||
|
||||
return [
|
||||
@@ -97,7 +97,7 @@ $conn = sqlsrv_connect($serverName, $connectionInfo);`),
|
||||
}
|
||||
|
||||
private updateConnectionStrings(): void {
|
||||
this._connectionStringsMessage.value = !this._miaaModel.config?.status.primaryEndpoint ? loc.noExternalEndpoint : '';
|
||||
this._connectionStringsMessage.value = !this._miaaModel.config?.status.endpoints.primaryEndpoint ? loc.noExternalEndpoint : '';
|
||||
this._keyValueContainer.refresh(this.getConnectionStrings());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -343,10 +343,10 @@ export class MiaaDashboardOverviewPage extends DashboardPage {
|
||||
private handleMiaaConfigUpdated(): void {
|
||||
if (this._miaaModel.config) {
|
||||
this._instanceProperties.status = this._miaaModel.config.status.state || '-';
|
||||
this._instanceProperties.externalEndpoint = this._miaaModel.config.status.primaryEndpoint || loc.notConfigured;
|
||||
this._instanceProperties.externalEndpoint = this._miaaModel.config.status.endpoints.primaryEndpoint || loc.notConfigured;
|
||||
this._instanceProperties.vCores = this._miaaModel.config.spec?.scheduling?.default?.resources?.limits?.cpu?.toString() || '';
|
||||
this._databasesMessage.value = !this._miaaModel.config.status.primaryEndpoint ? loc.noExternalEndpoint : '';
|
||||
if (!this._miaaModel.config.status.primaryEndpoint) {
|
||||
this._databasesMessage.value = !this._miaaModel.config.status.endpoints.primaryEndpoint ? loc.noExternalEndpoint : '';
|
||||
if (!this._miaaModel.config.status.endpoints.primaryEndpoint) {
|
||||
this._databasesContainer.removeItem(this._connectToServerLoading);
|
||||
}
|
||||
}
|
||||
@@ -375,7 +375,7 @@ export class MiaaDashboardOverviewPage extends DashboardPage {
|
||||
} else {
|
||||
// If we don't have an endpoint then there's no point in showing the connect button - but the logic
|
||||
// to display text informing the user of this is already handled by the handleMiaaConfigUpdated
|
||||
if (this._miaaModel?.config?.status.primaryEndpoint) {
|
||||
if (this._miaaModel?.config?.status.endpoints.primaryEndpoint) {
|
||||
this._connectToServerLoading.loading = false;
|
||||
this._connectToServerButton.enabled = true;
|
||||
}
|
||||
@@ -426,12 +426,12 @@ export class MiaaDashboardOverviewPage extends DashboardPage {
|
||||
|
||||
private refreshDashboardLinks(): void {
|
||||
if (this._miaaModel.config) {
|
||||
const kibanaUrl = this._miaaModel.config.status.logSearchDashboard ?? '';
|
||||
const kibanaUrl = this._miaaModel.config.status.endpoints.logSearchDashboard ?? '';
|
||||
this._kibanaLink.label = kibanaUrl;
|
||||
this._kibanaLink.url = kibanaUrl;
|
||||
this._kibanaLoading!.loading = false;
|
||||
|
||||
const grafanaUrl = this._miaaModel.config.status.metricsDashboard ?? '';
|
||||
const grafanaUrl = this._miaaModel.config.status.endpoints.metricsDashboard ?? '';
|
||||
this._grafanaLink.label = grafanaUrl;
|
||||
this._grafanaLink.url = grafanaUrl;
|
||||
this._grafanaLoading!.loading = false;
|
||||
|
||||
Reference in New Issue
Block a user