mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 17:22:45 -05:00
Add telemetry for schema compare and sql database projects options dialogs (#19799)
* add more telemetry for schema compare and sql projects options dialogs * cleanup * change to sendActionEvent
This commit is contained in:
@@ -916,7 +916,7 @@ export class PublishDatabaseDialog {
|
||||
const optionsRow = view.modelBuilder.flexContainer().withItems([this.optionsButton], { CSSStyles: { flex: '0 0 auto', 'margin': '6px 0 0 287px' } }).withLayout({ flexFlow: 'row', alignItems: 'center' }).component();
|
||||
|
||||
this.toDispose.push(this.optionsButton.onDidClick(async () => {
|
||||
TelemetryReporter.sendActionEvent(TelemetryViews.SqlProjectPublishDialog, TelemetryActions.publishConfigureOptionsClicked);
|
||||
TelemetryReporter.sendActionEvent(TelemetryViews.SqlProjectPublishDialog, TelemetryActions.publishOptionsOpened);
|
||||
// Create fresh options dialog with default selections each time when creating the 'configure options' button
|
||||
this.publishOptionsDialog = new PublishOptionsDialog(this.deploymentOptions!, this);
|
||||
this.publishOptionsDialog.openDialog();
|
||||
|
||||
@@ -10,6 +10,7 @@ import * as utils from '../common/utils';
|
||||
import type * as azdataType from 'azdata';
|
||||
import { PublishDatabaseDialog } from './publishDatabaseDialog';
|
||||
import { DeployOptionsModel } from '../models/options/deployOptionsModel';
|
||||
import { TelemetryActions, TelemetryReporter, TelemetryViews } from '../common/telemetry';
|
||||
|
||||
export class PublishOptionsDialog {
|
||||
|
||||
@@ -21,6 +22,7 @@ export class PublishOptionsDialog {
|
||||
private optionsTable: azdataType.TableComponent | undefined;
|
||||
public optionsModel: DeployOptionsModel;
|
||||
private optionsFlexBuilder: azdataType.FlexContainer | undefined;
|
||||
private optionsChanged: boolean = false;
|
||||
|
||||
constructor(defaultOptions: mssql.DeploymentOptions, private publish: PublishDatabaseDialog) {
|
||||
this.optionsModel = new DeployOptionsModel(defaultOptions);
|
||||
@@ -85,6 +87,7 @@ export class PublishOptionsDialog {
|
||||
if (checkboxState && checkboxState.row !== undefined) {
|
||||
const label = this.optionsModel.optionsLabels[checkboxState.row];
|
||||
this.optionsModel.optionsLookup[label] = checkboxState.checked;
|
||||
this.optionsChanged = true;
|
||||
}
|
||||
}));
|
||||
|
||||
@@ -137,6 +140,10 @@ export class PublishOptionsDialog {
|
||||
this.optionsModel.setDeploymentOptions();
|
||||
this.publish.setDeploymentOptions(this.optionsModel.deploymentOptions);
|
||||
this.disposeListeners();
|
||||
|
||||
if (this.optionsChanged) {
|
||||
TelemetryReporter.sendActionEvent(TelemetryViews.PublishOptionsDialog, TelemetryActions.optionsChanged);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -159,6 +166,8 @@ export class PublishOptionsDialog {
|
||||
await this.updateOptionsTable();
|
||||
this.optionsFlexBuilder?.removeItem(this.optionsTable!);
|
||||
this.optionsFlexBuilder?.insertItem(this.optionsTable!, 0, { CSSStyles: { 'overflow': 'scroll', 'height': '65vh' } });
|
||||
|
||||
TelemetryReporter.sendActionEvent(TelemetryViews.PublishOptionsDialog, TelemetryActions.resetOptions);
|
||||
}
|
||||
|
||||
private disposeListeners(): void {
|
||||
|
||||
Reference in New Issue
Block a user