mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 01:25:36 -05:00
Adding Dacpac extension telemetry and core wizard/page telemetry updates(#13859)
* Dacpac telmetry code changes * Removed added spaces * Generate deployScript accessibility changed back to public * code review suggessions updates * dacpac extension tests fixes * Updated time and filesize methods allowing general return values * Telemetry code updates * Dacpac Telemetry potential data loss capture and PII error excluded * Dacpac telemetry code updates for comments * Wizard pages navigation telemetry event capture moved to the core * DacpacTelemetry code updates * Extension wizard cancel telemetry for data loss * Dacpac telemetry pagename and small code updates * final Dacpac telemetry code updates...
This commit is contained in:
committed by
GitHub
parent
07d798c949
commit
0316d9ac57
@@ -3,6 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys';
|
||||
import 'vs/css!./media/dialogModal';
|
||||
import { Modal, IModalOptions } from 'sql/workbench/browser/modal/modal';
|
||||
import { Wizard, DialogButton, WizardPage } from 'sql/workbench/services/dialog/common/dialogTypes';
|
||||
@@ -49,14 +50,14 @@ export class WizardModal extends Modal {
|
||||
options: IModalOptions,
|
||||
@ILayoutService layoutService: ILayoutService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IAdsTelemetryService telemetryService: IAdsTelemetryService,
|
||||
@IAdsTelemetryService private _telemetryEventService: IAdsTelemetryService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IInstantiationService private _instantiationService: IInstantiationService,
|
||||
@IClipboardService clipboardService: IClipboardService,
|
||||
@ILogService logService: ILogService,
|
||||
@ITextResourcePropertiesService textResourcePropertiesService: ITextResourcePropertiesService
|
||||
) {
|
||||
super(_wizard.title, _wizard.name, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService, options);
|
||||
super(_wizard.title, _wizard.name, _telemetryEventService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService, options);
|
||||
this._useDefaultMessageBoxLocation = false;
|
||||
}
|
||||
|
||||
@@ -175,6 +176,7 @@ export class WizardModal extends Modal {
|
||||
|
||||
public async showPage(index: number, validate: boolean = true, focus: boolean = false, readHeader: boolean = true): Promise<void> {
|
||||
let pageToShow = this._wizard.pages[index];
|
||||
const prevPageIndex = this._wizard.currentPage;
|
||||
if (!pageToShow) {
|
||||
this.done(validate).catch(err => onUnexpectedError(err));
|
||||
return;
|
||||
@@ -209,6 +211,15 @@ export class WizardModal extends Modal {
|
||||
this._doneButton.enabled = this._wizard.doneButton.enabled && pageToShow.valid;
|
||||
}
|
||||
});
|
||||
|
||||
if (index !== prevPageIndex) {
|
||||
this._telemetryEventService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.WizardPagesNavigation)
|
||||
.withAdditionalProperties({
|
||||
wizardName: this._wizard.name,
|
||||
pageNavigationFrom: this._wizard.pages[prevPageIndex].pageName ?? prevPageIndex,
|
||||
pageNavigationTo: this._wizard.pages[index].pageName ?? index
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
private setButtonsForPage(index: number) {
|
||||
@@ -268,9 +279,10 @@ export class WizardModal extends Modal {
|
||||
}
|
||||
|
||||
public cancel(): void {
|
||||
const currentPage = this._wizard.pages[this._wizard.currentPage];
|
||||
this._onCancel.fire();
|
||||
this.dispose();
|
||||
this.hide('cancel');
|
||||
this.hide('cancel', currentPage.pageName ?? this._wizard.currentPage.toString());
|
||||
}
|
||||
|
||||
private async validateNavigation(newPage: number): Promise<boolean> {
|
||||
|
||||
@@ -157,7 +157,7 @@ export class WizardPage extends DialogTab {
|
||||
private _onUpdate: Emitter<void> = new Emitter<void>();
|
||||
public readonly onUpdate: Event<void> = this._onUpdate.event;
|
||||
|
||||
constructor(public title: string, content?: string) {
|
||||
constructor(public title: string, content?: string, public pageName?: string) {
|
||||
super(title, content);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user