Files
azuredatastudio/src/sql/parts/query/editor/charting/chartTab.ts
Anthony Dresser 27735dd68b Clean up result tab better (#3015)
* do a better job cleaning up results tab

* formatting
2018-10-29 11:54:42 -07:00

37 lines
1.2 KiB
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { IPanelTab } from 'sql/base/browser/ui/panel/panel';
import { ChartView } from './chartView';
import QueryRunner from 'sql/parts/query/execution/queryRunner';
import { localize } from 'vs/nls';
import { generateUuid } from 'vs/base/common/uuid';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
export class ChartTab implements IPanelTab {
public readonly title = localize('chartTabTitle', 'Chart');
public readonly identifier = 'ChartTab';
public readonly view: ChartView;
constructor( @IInstantiationService instantiationService: IInstantiationService) {
this.view = instantiationService.createInstance(ChartView);
}
public set queryRunner(runner: QueryRunner) {
this.view.queryRunner = runner;
}
public chart(dataId: { batchId: number, resultId: number }): void {
this.view.chart(dataId);
}
public dispose() {
this.view.dispose();
}
}