mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Port bf9646ba98 (#12738)
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user