Add telemetry for ModelView wizards (#12596)

* Add telemetry for ModelView wizards

* Remove unnecessary params

* Fix compile error
This commit is contained in:
Charles Gagnon
2020-09-23 17:08:22 -07:00
committed by GitHub
parent 8bc7079d78
commit 807a4ae8c4
18 changed files with 40 additions and 42 deletions

View File

@@ -382,7 +382,7 @@ class WizardImpl implements azdata.window.Wizard {
private _operationHandler: BackgroundOperationHandler;
private _width: DialogWidth;
constructor(public title: string, private _extHostModelViewDialog: ExtHostModelViewDialog, extHostTaskManagement: ExtHostBackgroundTaskManagementShape) {
constructor(public title: string, public name: string, private _extHostModelViewDialog: ExtHostModelViewDialog, extHostTaskManagement: ExtHostBackgroundTaskManagementShape) {
this.doneButton = this._extHostModelViewDialog.createButton(DONE_LABEL);
this.cancelButton = this._extHostModelViewDialog.createButton(CANCEL_LABEL);
this.generateScriptButton = this._extHostModelViewDialog.createButton(GENERATE_SCRIPT_LABEL);
@@ -761,8 +761,8 @@ export class ExtHostModelViewDialog implements ExtHostModelViewDialogShape {
return page;
}
public createWizard(title: string, width: azdata.window.DialogWidth = 'wide'): azdata.window.Wizard {
let wizard = new WizardImpl(title, this, this._extHostTaskManagement);
public createWizard(title: string, name: string = 'ModelViewWizard', width: azdata.window.DialogWidth = 'wide'): azdata.window.Wizard {
let wizard = new WizardImpl(title, name, this, this._extHostTaskManagement);
wizard.width = width;
this.getHandle(wizard);
return wizard;
@@ -795,6 +795,7 @@ export class ExtHostModelViewDialog implements ExtHostModelViewDialogShape {
}
return this._proxy.$setWizardDetails(handle, {
title: wizard.title,
name: wizard.name,
width: wizard.width,
pages: wizard.pages.map(page => this.getHandle(page)),
currentPage: wizard.currentPage,

View File

@@ -437,8 +437,8 @@ export function createAdsApiFactory(accessor: ServicesAccessor): IAdsExtensionAp
createWizardPage(title: string): azdata.window.WizardPage {
return extHostModelViewDialog.createWizardPage(title, extension);
},
createWizard(title: string, width?: azdata.window.DialogWidth): azdata.window.Wizard {
return extHostModelViewDialog.createWizard(title, width);
createWizard(title: string, name?: string, width?: azdata.window.DialogWidth): azdata.window.Wizard {
return extHostModelViewDialog.createWizard(title, name, width);
},
createModelViewDashboard(title: string, options?: azdata.ModelViewDashboardOptions): azdata.window.ModelViewDashboard {
return extHostModelViewDialog.createModelViewDashboard(title, options, extension);

View File

@@ -280,6 +280,7 @@ export interface IModelViewWizardPageDetails {
export interface IModelViewWizardDetails {
title: string;
name?: string;
pages: number[];
currentPage: number;
doneButton: number;