mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 09:35:36 -05:00
add open table designer event telemetry (#17595)
* add open table designer telemetry event * rename variables to reflect the text change * format code
This commit is contained in:
@@ -143,7 +143,7 @@ export class TableDesignerComponentInput implements DesignerComponentInput {
|
||||
this._viewModel = designerInfo.viewModel;
|
||||
this.setDefaultData();
|
||||
|
||||
const advancedTabComponents: DesignerDataPropertyInfo[] = [
|
||||
const generalTabComponents: DesignerDataPropertyInfo[] = [
|
||||
{
|
||||
componentType: 'dropdown',
|
||||
propertyName: designers.TableProperty.Schema,
|
||||
@@ -161,12 +161,12 @@ export class TableDesignerComponentInput implements DesignerComponentInput {
|
||||
];
|
||||
|
||||
if (designerInfo.view.additionalTableProperties) {
|
||||
advancedTabComponents.push(...designerInfo.view.additionalTableProperties);
|
||||
generalTabComponents.push(...designerInfo.view.additionalTableProperties);
|
||||
}
|
||||
|
||||
const advancedTab = <DesignerTab>{
|
||||
const generalTab = <DesignerTab>{
|
||||
title: localize('tableDesigner.generalTab', "General"),
|
||||
components: advancedTabComponents
|
||||
components: generalTabComponents
|
||||
};
|
||||
|
||||
const columnProperties: DesignerDataPropertyInfo[] = [
|
||||
@@ -261,7 +261,7 @@ export class TableDesignerComponentInput implements DesignerComponentInput {
|
||||
]
|
||||
};
|
||||
|
||||
const tabs = [columnsTab, advancedTab];
|
||||
const tabs = [columnsTab, generalTab];
|
||||
if (designerInfo.view.additionalTabs) {
|
||||
tabs.push(...tabs);
|
||||
}
|
||||
|
||||
@@ -9,11 +9,14 @@ import * as azdata from 'azdata';
|
||||
import { ACTIVE_GROUP, IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { TableDesignerInput } from 'sql/workbench/browser/editor/tableDesigner/tableDesignerInput';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
import { TelemetryAction, TelemetryView } from 'sql/platform/telemetry/common/telemetryKeys';
|
||||
|
||||
export class TableDesignerService implements ITableDesignerService {
|
||||
|
||||
constructor(@IEditorService private _editorService: IEditorService,
|
||||
@IInstantiationService private _instantiationService: IInstantiationService) { }
|
||||
@IInstantiationService private _instantiationService: IInstantiationService,
|
||||
@IAdsTelemetryService private _adsTelemetryService: IAdsTelemetryService) { }
|
||||
|
||||
public _serviceBrand: undefined;
|
||||
private _providers = new Map<string, TableDesignerProvider>();
|
||||
@@ -41,6 +44,10 @@ export class TableDesignerService implements ITableDesignerService {
|
||||
}
|
||||
|
||||
public async openTableDesigner(providerId: string, tableInfo: azdata.designers.TableInfo): Promise<void> {
|
||||
this._adsTelemetryService.createActionEvent(TelemetryView.TableDesigner, TelemetryAction.Open).withAdditionalProperties({
|
||||
provider: providerId,
|
||||
newTable: tableInfo.isNewTable
|
||||
}).send();
|
||||
const provider = this.getProvider(providerId);
|
||||
const tableDesignerInput = this._instantiationService.createInstance(TableDesignerInput, provider, tableInfo);
|
||||
await this._editorService.openEditor(tableDesignerInput, { pinned: true }, ACTIVE_GROUP);
|
||||
|
||||
Reference in New Issue
Block a user