mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Add close method to ModelView dashboards (#14812)
* Add close method to ModelView dashboards * fix closing * remove accessors * Update errors
This commit is contained in:
@@ -7,7 +7,7 @@ import * as azdata from 'azdata';
|
||||
|
||||
export abstract class Dashboard {
|
||||
|
||||
private dashboard!: azdata.window.ModelViewDashboard;
|
||||
protected dashboard!: azdata.window.ModelViewDashboard;
|
||||
|
||||
constructor(protected title: string, protected readonly name: string) { }
|
||||
|
||||
@@ -16,6 +16,10 @@ export abstract class Dashboard {
|
||||
await this.dashboard.open();
|
||||
}
|
||||
|
||||
public async closeDashboard(): Promise<void> {
|
||||
await this.dashboard.close();
|
||||
}
|
||||
|
||||
protected createDashboard(): azdata.window.ModelViewDashboard {
|
||||
const dashboard = azdata.window.createModelViewDashboard(this.title, this.name);
|
||||
dashboard.registerTabs(async modelView => {
|
||||
|
||||
Reference in New Issue
Block a user