Add doAction API call for ModelView (#10345)

* Add doAction API call for ModelView

* cleanup
This commit is contained in:
Charles Gagnon
2020-05-12 10:47:20 -07:00
committed by GitHub
parent ff848b5903
commit 3fa0deed71
13 changed files with 70 additions and 8 deletions

View File

@@ -38,7 +38,7 @@ export class BdcDashboard extends InitializingComponent {
this.dashboard.registerTabs(async (modelView: azdata.ModelView) => {
this.modelView = modelView;
const overviewPage = new BdcDashboardOverviewPage(this.model, modelView);
const overviewPage = new BdcDashboardOverviewPage(this.model, modelView, this.dashboard);
this.overviewTab = {
title: loc.bdcOverview,
id: 'overview-tab',

View File

@@ -31,7 +31,7 @@ export class BdcDashboardOverviewPage extends BdcDashboardPage {
private endpointsErrorMessage: azdata.TextComponent;
private serviceStatusErrorMessage: azdata.TextComponent;
constructor(model: BdcDashboardModel, modelView: azdata.ModelView) {
constructor(model: BdcDashboardModel, modelView: azdata.ModelView, private dashboard: azdata.window.ModelViewDashboard) {
super(model, modelView);
this.model.onDidUpdateEndpoints(endpoints => this.eventuallyRunOnInitialized(() => this.handleEndpointsUpdate(endpoints)));
this.model.onDidUpdateBdcStatus(bdcStatus => this.eventuallyRunOnInitialized(() => this.handleBdcStatusUpdate(bdcStatus)));
@@ -339,7 +339,7 @@ export class BdcDashboardOverviewPage extends BdcDashboardPage {
CSSStyles: { ...cssStyles.text }
}).component();
nameCell.onDidClick(() => {
//this.dashboard.switchToServiceTab(serviceStatus.serviceName); TODO: Enable direct link to tab page
this.dashboard.selectTab(serviceStatus.serviceName);
});
const viewDetailsButton = serviceStatus.healthStatus !== 'healthy' && serviceStatus.details && serviceStatus.details.length > 0 ? createViewDetailsButton(this.modelView.modelBuilder, serviceStatus.details) : undefined;