Remove PG dashboard link (#12094)

This commit is contained in:
Charles Gagnon
2020-09-02 17:22:03 -07:00
committed by GitHub
parent c5e90d0236
commit 6be8c1d54b

View File

@@ -218,16 +218,26 @@ export class ControllerDashboardOverviewPage extends DashboardPage {
iconHeight: iconSize, iconHeight: iconSize,
iconWidth: iconSize iconWidth: iconSize
}).component(); }).component();
const nameLink = this.modelView.modelBuilder.hyperlink() let nameComponent: azdata.Component;
.withProperties<azdata.HyperlinkComponentProperties>({ if (r.instanceType === ResourceType.postgresInstances) {
label: r.instanceName || '', nameComponent = this.modelView.modelBuilder.text()
url: '' .withProperties<azdata.TextComponentProperties>({
}).component(); value: r.instanceName || '',
nameLink.onDidClick(async () => { CSSStyles: { ...cssStyles.text, 'margin-block-start': '0px', 'margin-block-end': '0px' }
await this._controllerModel.treeDataProvider.openResourceDashboard(this._controllerModel, r.instanceType || '', parseInstanceName(r.instanceName)); }).component();
}); } else {
nameComponent = this.modelView.modelBuilder.hyperlink()
.withProperties<azdata.HyperlinkComponentProperties>({
label: r.instanceName || '',
url: ''
}).component();
(<azdata.HyperlinkComponent>nameComponent).onDidClick(async () => {
await this._controllerModel.treeDataProvider.openResourceDashboard(this._controllerModel, r.instanceType || '', parseInstanceName(r.instanceName));
});
}
// TODO chgagnon // TODO chgagnon
return [imageComponent, nameLink, resourceTypeToDisplayName(r.instanceType), '-'/* loc.numVCores(r.vCores) */]; return [imageComponent, nameComponent, resourceTypeToDisplayName(r.instanceType), '-'/* loc.numVCores(r.vCores) */];
}); });
this._arcResourcesLoadingComponent.loading = !this._controllerModel.registrationsLastUpdated; this._arcResourcesLoadingComponent.loading = !this._controllerModel.registrationsLastUpdated;
} }