This commit is contained in:
Charles Gagnon
2020-10-05 12:52:46 -07:00
committed by GitHub
parent c801d46814
commit 1f65216889
14 changed files with 51 additions and 24 deletions

View File

@@ -9,7 +9,7 @@ export abstract class Dashboard {
private dashboard!: azdata.window.ModelViewDashboard;
constructor(protected title: string) { }
constructor(protected title: string, protected readonly name: string) { }
public async showDashboard(): Promise<void> {
this.dashboard = this.createDashboard();
@@ -17,7 +17,7 @@ export abstract class Dashboard {
}
protected createDashboard(): azdata.window.ModelViewDashboard {
const dashboard = azdata.window.createModelViewDashboard(this.title);
const dashboard = azdata.window.createModelViewDashboard(this.title, this.name);
dashboard.registerTabs(async modelView => {
return await this.registerTabs(modelView);
});

View File

@@ -12,7 +12,7 @@ import * as loc from '../../../localizedConstants';
export class ControllerDashboard extends Dashboard {
constructor(private _controllerModel: ControllerModel) {
super(loc.arcControllerDashboard(_controllerModel.info.name));
super(loc.arcControllerDashboard(_controllerModel.info.name), 'ArcDataControllerDashboard');
}
public async showDashboard(): Promise<void> {

View File

@@ -14,7 +14,7 @@ import { MiaaModel } from '../../../models/miaaModel';
export class MiaaDashboard extends Dashboard {
constructor(private _controllerModel: ControllerModel, private _miaaModel: MiaaModel) {
super(loc.miaaDashboard(_miaaModel.info.name));
super(loc.miaaDashboard(_miaaModel.info.name), 'ArcMiaaDashboard');
}
public async showDashboard(): Promise<void> {

View File

@@ -18,7 +18,7 @@ import { PostgresResourceHealthPage } from './postgresResourceHealthPage';
export class PostgresDashboard extends Dashboard {
constructor(private _context: vscode.ExtensionContext, private _controllerModel: ControllerModel, private _postgresModel: PostgresModel) {
super(loc.postgresDashboard(_postgresModel.name));
super(loc.postgresDashboard(_postgresModel.name), 'ArcPgDashboard');
}
public async showDashboard(): Promise<void> {

View File

@@ -34,7 +34,7 @@ export class BdcDashboard extends InitializingComponent {
}
private async createDashboard(): Promise<void> {
this.dashboard = azdata.window.createModelViewDashboard(this.title, { alwaysShowTabs: true });
this.dashboard = azdata.window.createModelViewDashboard(this.title, 'BdcDashboard', { alwaysShowTabs: true });
this.dashboard.registerTabs(async (modelView: azdata.ModelView) => {
this.modelView = modelView;

View File

@@ -75,7 +75,7 @@ export class SchemaCompareMainWindow {
this.SchemaCompareActionMap[mssql.SchemaUpdateAction.Change] = loc.changeAction;
this.SchemaCompareActionMap[mssql.SchemaUpdateAction.Add] = loc.addAction;
this.editor = azdata.workspace.createModelViewEditor(loc.SchemaCompareLabel, { retainContextWhenHidden: true, supportsSave: true, resourceName: schemaCompareResourceName });
this.editor = azdata.workspace.createModelViewEditor(loc.SchemaCompareLabel, { retainContextWhenHidden: true, supportsSave: true, resourceName: schemaCompareResourceName }, 'SchemaCompareEditor');
}
// schema compare can get started with three contexts for the source: