mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Cleanup telemetry keys (#14795)
* Add event for connection error * Cleanup telemetry keys * Fix missed keys
This commit is contained in:
@@ -42,7 +42,7 @@ export class BackupService implements IBackupService {
|
|||||||
return new Promise<azdata.BackupResponse>((resolve, reject) => {
|
return new Promise<azdata.BackupResponse>((resolve, reject) => {
|
||||||
const providerResult = this.getProvider(connectionUri);
|
const providerResult = this.getProvider(connectionUri);
|
||||||
if (providerResult) {
|
if (providerResult) {
|
||||||
this._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.BackupCreated)
|
this._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.TelemetryAction.BackupCreated)
|
||||||
.withAdditionalProperties({ providerId: providerResult.providerName })
|
.withAdditionalProperties({ providerId: providerResult.providerName })
|
||||||
.send();
|
.send();
|
||||||
providerResult.provider.backup(connectionUri, backupInfo, taskExecutionMode).then(result => {
|
providerResult.provider.backup(connectionUri, backupInfo, taskExecutionMode).then(result => {
|
||||||
|
|||||||
@@ -3,49 +3,24 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
// Telemetry Event Names
|
export enum ModalDialogName {
|
||||||
|
ErrorMessage = 'ErrorMessage',
|
||||||
export const DatabaseConnected = 'DatabaseConnected';
|
WebView = 'WebView',
|
||||||
export const DatabaseConnectionError = 'DatabaseConnectionError';
|
ConnectionAdvancedProperties = 'ConnectionAdvancedProperties',
|
||||||
export const DatabaseDisconnected = 'DatabaseDisconnected';
|
Connection = 'Connection',
|
||||||
export const DeleteConnection = 'DeleteConnection';
|
Backup = 'Backup',
|
||||||
export const AddServerGroup = 'AddServerGroup';
|
FileBrowser = 'FileBrowser',
|
||||||
export const MoveServerGroup = 'MoveServerGroup';
|
Restore = 'Restore',
|
||||||
export const MoveServerConnection = 'MoveServerConnection';
|
Insights = 'Insights',
|
||||||
export const DeleteServerGroup = 'DeleteServerGroup';
|
Profiler = 'Profiler',
|
||||||
export const BackupCreated = 'BackupCreated';
|
ServerGroups = 'ServerGroups',
|
||||||
export const RestoreRequested = 'RestoreRequested';
|
Accounts = 'Accounts',
|
||||||
export const ChartCreated = 'ChartCreated';
|
FireWallRule = 'FirewallRule',
|
||||||
export const ObjectExplorerExpand = 'ObjectExplorerExpand';
|
AutoOAuth = 'AutoOAuth',
|
||||||
export const RunQuery = 'RunQuery';
|
AddNewDashboardTab = 'AddNewDashboardTab',
|
||||||
export const RunQueryStatement = 'RunQueryStatement';
|
ProfilerFilter = 'ProfilerFilter',
|
||||||
export const RunQueryString = 'RunQueryString';
|
CalloutDialog = 'CalloutDialog'
|
||||||
export const CancelQuery = 'CancelQuery';
|
}
|
||||||
export const NewQuery = 'NewQuery';
|
|
||||||
export const FirewallRuleRequested = 'FirewallRuleCreated';
|
|
||||||
export const DashboardNavigated = 'DashboardNavigated';
|
|
||||||
export const GetDataGridItems = 'GetDataGridItems';
|
|
||||||
export const GetDataGridColumns = 'GetDataGridColumns';
|
|
||||||
|
|
||||||
// Telemetry Properties
|
|
||||||
|
|
||||||
// Modal Dialogs:
|
|
||||||
export const ErrorMessage = 'ErrorMessage';
|
|
||||||
export const WebView = 'WebView';
|
|
||||||
export const ConnectionAdvancedProperties = 'ConnectionAdvancedProperties';
|
|
||||||
export const Connection = 'Connection';
|
|
||||||
export const Backup = 'Backup';
|
|
||||||
export const Restore = 'Restore';
|
|
||||||
export const Insights = 'Insights';
|
|
||||||
export const Profiler = 'Profiler';
|
|
||||||
export const ServerGroups = 'ServerGroups';
|
|
||||||
export const Accounts = 'Accounts';
|
|
||||||
export const FireWallRule = 'FirewallRule';
|
|
||||||
export const AutoOAuth = 'AutoOAuth';
|
|
||||||
export const AddNewDashboardTab = 'AddNewDashboardTab';
|
|
||||||
export const ProfilerFilter = 'ProfilerFilter';
|
|
||||||
export const CalloutDialog = 'CalloutDialog';
|
|
||||||
|
|
||||||
|
|
||||||
export enum TelemetryView {
|
export enum TelemetryView {
|
||||||
Agent = 'Agent',
|
Agent = 'Agent',
|
||||||
@@ -61,20 +36,44 @@ export enum TelemetryView {
|
|||||||
SqlAssessment = 'SqlAssessment'
|
SqlAssessment = 'SqlAssessment'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export enum TelemetryError {
|
||||||
|
DatabaseConnectionError = 'DatabaseConnectionError'
|
||||||
|
}
|
||||||
|
|
||||||
export enum TelemetryAction {
|
export enum TelemetryAction {
|
||||||
|
AddServerGroup = 'AddServerGroup',
|
||||||
adsCommandExecuted = 'adsCommandExecuted',
|
adsCommandExecuted = 'adsCommandExecuted',
|
||||||
Click = 'Click',
|
BackupCreated = 'BackupCreated',
|
||||||
Open = 'Open',
|
DashboardNavigated = 'DashboardNavigated',
|
||||||
ModelViewDashboardOpened = 'ModelViewDashboardOpened',
|
DatabaseConnected = 'DatabaseConnected',
|
||||||
ModalDialogClosed = 'ModalDialogClosed',
|
DatabaseDisconnected = 'DatabaseDisconnected',
|
||||||
ModalDialogOpened = 'ModalDialogOpened',
|
|
||||||
RunAgentJob = 'RunAgentJob',
|
|
||||||
StopAgentJob = 'StopAgentJob',
|
|
||||||
DeleteAgentJob = 'DeleteAgentJob',
|
DeleteAgentJob = 'DeleteAgentJob',
|
||||||
DeleteAgentJobStep = 'DeleteAgentJobStep',
|
DeleteAgentJobStep = 'DeleteAgentJobStep',
|
||||||
DeleteAgentAlert = 'DeleteAgentAlert',
|
DeleteAgentAlert = 'DeleteAgentAlert',
|
||||||
DeleteAgentOperator = 'DeleteAgentOperator',
|
DeleteAgentOperator = 'DeleteAgentOperator',
|
||||||
DeleteAgentProxy = 'DeleteAgentProxy',
|
DeleteAgentProxy = 'DeleteAgentProxy',
|
||||||
|
DeleteConnection = 'DeleteConnection',
|
||||||
|
DeleteServerGroup = 'DeleteServerGroup',
|
||||||
|
CancelQuery = 'CancelQuery',
|
||||||
|
ChartCreated = 'ChartCreated',
|
||||||
|
Click = 'Click',
|
||||||
|
FirewallRuleRequested = 'FirewallRuleCreated',
|
||||||
|
GetDataGridItems = 'GetDataGridItems',
|
||||||
|
GetDataGridColumns = 'GetDataGridColumns',
|
||||||
|
ModelViewDashboardOpened = 'ModelViewDashboardOpened',
|
||||||
|
ModalDialogClosed = 'ModalDialogClosed',
|
||||||
|
ModalDialogOpened = 'ModalDialogOpened',
|
||||||
|
MoveServerConnection = 'MoveServerConnection',
|
||||||
|
MoveServerGroup = 'MoveServerGroup',
|
||||||
|
NewQuery = 'NewQuery',
|
||||||
|
ObjectExplorerExpand = 'ObjectExplorerExpand',
|
||||||
|
Open = 'Open',
|
||||||
|
RestoreRequested = 'RestoreRequested',
|
||||||
|
RunAgentJob = 'RunAgentJob',
|
||||||
|
RunQuery = 'RunQuery',
|
||||||
|
RunQueryStatement = 'RunQueryStatement',
|
||||||
|
RunQueryString = 'RunQueryString',
|
||||||
|
StopAgentJob = 'StopAgentJob',
|
||||||
WizardPagesNavigation = 'WizardPagesNavigation'
|
WizardPagesNavigation = 'WizardPagesNavigation'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -478,14 +478,14 @@ export class MainThreadDataProtocol extends Disposable implements MainThreadData
|
|||||||
providerId: providerId,
|
providerId: providerId,
|
||||||
title: title,
|
title: title,
|
||||||
getDataGridItems(): Thenable<azdata.DataGridItem[]> {
|
getDataGridItems(): Thenable<azdata.DataGridItem[]> {
|
||||||
self._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.GetDataGridItems)
|
self._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.TelemetryAction.GetDataGridItems)
|
||||||
.withAdditionalProperties({
|
.withAdditionalProperties({
|
||||||
provider: providerId
|
provider: providerId
|
||||||
}).send();
|
}).send();
|
||||||
return self._proxy.$getDataGridItems(handle);
|
return self._proxy.$getDataGridItems(handle);
|
||||||
},
|
},
|
||||||
getDataGridColumns(): Thenable<azdata.DataGridColumn[]> {
|
getDataGridColumns(): Thenable<azdata.DataGridColumn[]> {
|
||||||
self._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.GetDataGridColumns)
|
self._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.TelemetryAction.GetDataGridColumns)
|
||||||
.withAdditionalProperties({
|
.withAdditionalProperties({
|
||||||
provider: providerId
|
provider: providerId
|
||||||
}).send();
|
}).send();
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export abstract class CalloutDialog<T> extends Modal {
|
|||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
title,
|
title,
|
||||||
TelemetryKeys.CalloutDialog,
|
TelemetryKeys.ModalDialogName.CalloutDialog,
|
||||||
telemetryService,
|
telemetryService,
|
||||||
layoutService,
|
layoutService,
|
||||||
clipboardService,
|
clipboardService,
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export class BackupDialog extends Modal {
|
|||||||
@ILogService logService: ILogService,
|
@ILogService logService: ILogService,
|
||||||
@ITextResourcePropertiesService textResourcePropertiesService: ITextResourcePropertiesService
|
@ITextResourcePropertiesService textResourcePropertiesService: ITextResourcePropertiesService
|
||||||
) {
|
) {
|
||||||
super('', TelemetryKeys.Backup, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService, { isAngular: true, hasErrors: true });
|
super('', TelemetryKeys.ModalDialogName.Backup, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService, { isAngular: true, hasErrors: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
protected renderBody(container: HTMLElement) {
|
protected renderBody(container: HTMLElement) {
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ export const DashboardModule = (params, selector: string, instantiationService:
|
|||||||
this._router.events.subscribe(e => {
|
this._router.events.subscribe(e => {
|
||||||
if (e instanceof NavigationEnd) {
|
if (e instanceof NavigationEnd) {
|
||||||
this.navigations++;
|
this.navigations++;
|
||||||
this._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.DashboardNavigated)
|
this._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.TelemetryAction.DashboardNavigated)
|
||||||
.withAdditionalProperties({ numberOfNavigations: this.navigations })
|
.withAdditionalProperties({ numberOfNavigations: this.navigations })
|
||||||
.send();
|
.send();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ export abstract class ChartInsight extends Disposable implements IInsightsView {
|
|||||||
this._hasError = true;
|
this._hasError = true;
|
||||||
this._changeRef.detectChanges();
|
this._changeRef.detectChanges();
|
||||||
}
|
}
|
||||||
this._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.ChartCreated)
|
this._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.TelemetryAction.ChartCreated)
|
||||||
.withAdditionalProperties({ type: this.chartType })
|
.withAdditionalProperties({ type: this.chartType })
|
||||||
.send();
|
.send();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export class ImageCalloutDialog extends Modal {
|
|||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
title,
|
title,
|
||||||
TelemetryKeys.CalloutDialog,
|
TelemetryKeys.ModalDialogName.CalloutDialog,
|
||||||
telemetryService,
|
telemetryService,
|
||||||
layoutService,
|
layoutService,
|
||||||
clipboardService,
|
clipboardService,
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export class LinkCalloutDialog extends Modal {
|
|||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
title,
|
title,
|
||||||
TelemetryKeys.CalloutDialog,
|
TelemetryKeys.ModalDialogName.CalloutDialog,
|
||||||
telemetryService,
|
telemetryService,
|
||||||
layoutService,
|
layoutService,
|
||||||
clipboardService,
|
clipboardService,
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export class WebViewDialog extends Modal {
|
|||||||
@IWebviewService private readonly webviewService: IWebviewService,
|
@IWebviewService private readonly webviewService: IWebviewService,
|
||||||
@ITextResourcePropertiesService textResourcePropertiesService: ITextResourcePropertiesService
|
@ITextResourcePropertiesService textResourcePropertiesService: ITextResourcePropertiesService
|
||||||
) {
|
) {
|
||||||
super('', TelemetryKeys.WebView, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService, { dialogStyle: 'normal', hasTitleIcon: true });
|
super('', TelemetryKeys.ModalDialogName.WebView, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService, { dialogStyle: 'normal', hasTitleIcon: true });
|
||||||
this._okLabel = localize('webViewDialog.ok', "OK");
|
this._okLabel = localize('webViewDialog.ok', "OK");
|
||||||
this._closeLabel = localize('webViewDialog.close', "Close");
|
this._closeLabel = localize('webViewDialog.close', "Close");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ export class AccountDialog extends Modal {
|
|||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
localize('linkedAccounts', "Linked accounts"),
|
localize('linkedAccounts', "Linked accounts"),
|
||||||
TelemetryKeys.Accounts,
|
TelemetryKeys.ModalDialogName.Accounts,
|
||||||
telemetryService,
|
telemetryService,
|
||||||
layoutService,
|
layoutService,
|
||||||
clipboardService,
|
clipboardService,
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export class AutoOAuthDialog extends Modal {
|
|||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
'',
|
'',
|
||||||
TelemetryKeys.AutoOAuth,
|
TelemetryKeys.ModalDialogName.AutoOAuth,
|
||||||
telemetryService,
|
telemetryService,
|
||||||
layoutService,
|
layoutService,
|
||||||
clipboardService,
|
clipboardService,
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export class AdvancedPropertiesController {
|
|||||||
public get advancedDialog() {
|
public get advancedDialog() {
|
||||||
if (!this._advancedDialog) {
|
if (!this._advancedDialog) {
|
||||||
this._advancedDialog = this._instantiationService.createInstance(
|
this._advancedDialog = this._instantiationService.createInstance(
|
||||||
OptionsDialog, localize('connectionAdvancedProperties', "Advanced Properties"), TelemetryKeys.ConnectionAdvancedProperties, { hasBackButton: true, cancelLabel: localize('advancedProperties.discard', "Discard") });
|
OptionsDialog, localize('connectionAdvancedProperties', "Advanced Properties"), TelemetryKeys.ModalDialogName.ConnectionAdvancedProperties, { hasBackButton: true, cancelLabel: localize('advancedProperties.discard', "Discard") });
|
||||||
this._advancedDialog.onCloseEvent(() => this._onCloseAdvancedProperties());
|
this._advancedDialog.onCloseEvent(() => this._onCloseAdvancedProperties());
|
||||||
this._advancedDialog.onOk(() => this.handleOnOk());
|
this._advancedDialog.onOk(() => this.handleOnOk());
|
||||||
this._advancedDialog.render();
|
this._advancedDialog.render();
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ export class ConnectionDialogWidget extends Modal {
|
|||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
localize('connection', "Connection"),
|
localize('connection', "Connection"),
|
||||||
TelemetryKeys.Connection,
|
TelemetryKeys.ModalDialogName.Connection,
|
||||||
telemetryService,
|
telemetryService,
|
||||||
layoutService,
|
layoutService,
|
||||||
clipboardService,
|
clipboardService,
|
||||||
|
|||||||
@@ -669,7 +669,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
|||||||
}
|
}
|
||||||
|
|
||||||
public saveProfileGroup(profile: IConnectionProfileGroup): Promise<string> {
|
public saveProfileGroup(profile: IConnectionProfileGroup): Promise<string> {
|
||||||
this._telemetryService.sendActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.AddServerGroup);
|
this._telemetryService.sendActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.TelemetryAction.AddServerGroup);
|
||||||
return this._connectionStore.saveProfileGroup(profile).then(groupId => {
|
return this._connectionStore.saveProfileGroup(profile).then(groupId => {
|
||||||
this._onAddConnectionProfile.fire(undefined);
|
this._onAddConnectionProfile.fire(undefined);
|
||||||
return groupId;
|
return groupId;
|
||||||
@@ -954,7 +954,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
|||||||
connection.extensionTimer.stop();
|
connection.extensionTimer.stop();
|
||||||
|
|
||||||
connection.connectHandler(true);
|
connection.connectHandler(true);
|
||||||
this._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.DatabaseConnected)
|
this._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.TelemetryAction.DatabaseConnected)
|
||||||
.withConnectionInfo(connection.connectionProfile)
|
.withConnectionInfo(connection.connectionProfile)
|
||||||
.withServerInfo(connection.serverInfo)
|
.withServerInfo(connection.serverInfo)
|
||||||
.withAdditionalMeasurements({
|
.withAdditionalMeasurements({
|
||||||
@@ -968,7 +968,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
connection.connectHandler(false, info.errorMessage, info.errorNumber, info.messages);
|
connection.connectHandler(false, info.errorMessage, info.errorNumber, info.messages);
|
||||||
this._telemetryService.createErrorEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.DatabaseConnectionError, info.errorNumber.toString())
|
this._telemetryService.createErrorEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.TelemetryError.DatabaseConnectionError, info.errorNumber.toString())
|
||||||
.withConnectionInfo(connection.connectionProfile)
|
.withConnectionInfo(connection.connectionProfile)
|
||||||
.withAdditionalMeasurements({
|
.withAdditionalMeasurements({
|
||||||
extensionConnectionTimeMs: connection.extensionTimer.elapsed() - connection.serviceTimer.elapsed(),
|
extensionConnectionTimeMs: connection.extensionTimer.elapsed() - connection.serviceTimer.elapsed(),
|
||||||
@@ -996,13 +996,13 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
|||||||
}
|
}
|
||||||
|
|
||||||
public changeGroupIdForConnectionGroup(source: ConnectionProfileGroup, target: ConnectionProfileGroup): Promise<void> {
|
public changeGroupIdForConnectionGroup(source: ConnectionProfileGroup, target: ConnectionProfileGroup): Promise<void> {
|
||||||
this._telemetryService.sendActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.MoveServerConnection);
|
this._telemetryService.sendActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.TelemetryAction.MoveServerConnection);
|
||||||
return this._connectionStore.changeGroupIdForConnectionGroup(source, target);
|
return this._connectionStore.changeGroupIdForConnectionGroup(source, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
public changeGroupIdForConnection(source: ConnectionProfile, targetGroupId: string): Promise<void> {
|
public changeGroupIdForConnection(source: ConnectionProfile, targetGroupId: string): Promise<void> {
|
||||||
let id = Utils.generateUri(source);
|
let id = Utils.generateUri(source);
|
||||||
this._telemetryService.sendActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.MoveServerGroup);
|
this._telemetryService.sendActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.TelemetryAction.MoveServerGroup);
|
||||||
return this._connectionStore.changeGroupIdForConnection(source, targetGroupId).then(result => {
|
return this._connectionStore.changeGroupIdForConnection(source, targetGroupId).then(result => {
|
||||||
this._onAddConnectionProfile.fire(source);
|
this._onAddConnectionProfile.fire(source);
|
||||||
if (id && targetGroupId) {
|
if (id && targetGroupId) {
|
||||||
@@ -1147,7 +1147,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
|||||||
}
|
}
|
||||||
return this.doDisconnect(uri, profile).then(result => {
|
return this.doDisconnect(uri, profile).then(result => {
|
||||||
if (result) {
|
if (result) {
|
||||||
this._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.DatabaseDisconnected)
|
this._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.TelemetryAction.DatabaseDisconnected)
|
||||||
.withConnectionInfo(profile)
|
.withConnectionInfo(profile)
|
||||||
.withServerInfo(info?.serverInfo)
|
.withServerInfo(info?.serverInfo)
|
||||||
.send();
|
.send();
|
||||||
@@ -1264,7 +1264,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
|||||||
* Disconnects a connection before removing from settings.
|
* Disconnects a connection before removing from settings.
|
||||||
*/
|
*/
|
||||||
public deleteConnection(connection: ConnectionProfile): Promise<boolean> {
|
public deleteConnection(connection: ConnectionProfile): Promise<boolean> {
|
||||||
this._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.DeleteConnection)
|
this._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.TelemetryAction.DeleteConnection)
|
||||||
.withAdditionalProperties({
|
.withAdditionalProperties({
|
||||||
provider: connection.providerName
|
provider: connection.providerName
|
||||||
}).send();
|
}).send();
|
||||||
@@ -1297,7 +1297,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
|||||||
* Disconnects a connection before removing from config. If disconnect fails, settings is not modified.
|
* Disconnects a connection before removing from config. If disconnect fails, settings is not modified.
|
||||||
*/
|
*/
|
||||||
public deleteConnectionGroup(group: ConnectionProfileGroup): Promise<boolean> {
|
public deleteConnectionGroup(group: ConnectionProfileGroup): Promise<boolean> {
|
||||||
this._telemetryService.sendActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.DeleteServerGroup);
|
this._telemetryService.sendActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.TelemetryAction.DeleteServerGroup);
|
||||||
// Get all connections for this group
|
// Get all connections for this group
|
||||||
let connections = ConnectionProfileGroup.getConnectionsInGroup(group);
|
let connections = ConnectionProfileGroup.getConnectionsInGroup(group);
|
||||||
|
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ export class NewDashboardTabDialog extends Modal {
|
|||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
localize('newDashboardTab.openDashboardExtensions', "Open dashboard extensions"),
|
localize('newDashboardTab.openDashboardExtensions', "Open dashboard extensions"),
|
||||||
TelemetryKeys.AddNewDashboardTab,
|
TelemetryKeys.ModalDialogName.AddNewDashboardTab,
|
||||||
telemetryService,
|
telemetryService,
|
||||||
layoutService,
|
layoutService,
|
||||||
clipboardService,
|
clipboardService,
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ export class ErrorMessageDialog extends Modal {
|
|||||||
@ILogService logService: ILogService,
|
@ILogService logService: ILogService,
|
||||||
@ITextResourcePropertiesService textResourcePropertiesService: ITextResourcePropertiesService
|
@ITextResourcePropertiesService textResourcePropertiesService: ITextResourcePropertiesService
|
||||||
) {
|
) {
|
||||||
super('', TelemetryKeys.ErrorMessage, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService, { dialogStyle: 'normal', hasTitleIcon: true });
|
super('', TelemetryKeys.ModalDialogName.ErrorMessage, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService, { dialogStyle: 'normal', hasTitleIcon: true });
|
||||||
this._okLabel = localize('errorMessageDialog.ok', "OK");
|
this._okLabel = localize('errorMessageDialog.ok', "OK");
|
||||||
this._closeLabel = localize('errorMessageDialog.close', "Close");
|
this._closeLabel = localize('errorMessageDialog.close', "Close");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ export class FileBrowserDialog extends Modal {
|
|||||||
@ILogService logService: ILogService,
|
@ILogService logService: ILogService,
|
||||||
@ITextResourcePropertiesService textResourcePropertiesService: ITextResourcePropertiesService
|
@ITextResourcePropertiesService textResourcePropertiesService: ITextResourcePropertiesService
|
||||||
) {
|
) {
|
||||||
super(title, TelemetryKeys.Backup, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService, { dialogStyle: 'flyout', hasTitleIcon: false, hasBackButton: true, hasSpinner: true });
|
super(title, TelemetryKeys.ModalDialogName.FileBrowser, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService, { dialogStyle: 'flyout', hasTitleIcon: false, hasBackButton: true, hasSpinner: true });
|
||||||
this._viewModel = this._instantiationService.createInstance(FileBrowserViewModel);
|
this._viewModel = this._instantiationService.createInstance(FileBrowserViewModel);
|
||||||
this._viewModel.onAddFileTree(args => this.handleOnAddFileTree(args.rootNode, args.selectedNode, args.expandedNodes).catch(err => onUnexpectedError(err)));
|
this._viewModel.onAddFileTree(args => this.handleOnAddFileTree(args.rootNode, args.selectedNode, args.expandedNodes).catch(err => onUnexpectedError(err)));
|
||||||
this._viewModel.onPathValidate(args => this.handleOnValidate(args.succeeded, args.message));
|
this._viewModel.onPathValidate(args => this.handleOnValidate(args.succeeded, args.message));
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ export class InsightsDialogView extends Modal {
|
|||||||
@ICapabilitiesService private readonly _capabilitiesService: ICapabilitiesService,
|
@ICapabilitiesService private readonly _capabilitiesService: ICapabilitiesService,
|
||||||
@ITextResourcePropertiesService textResourcePropertiesService: ITextResourcePropertiesService
|
@ITextResourcePropertiesService textResourcePropertiesService: ITextResourcePropertiesService
|
||||||
) {
|
) {
|
||||||
super(nls.localize("InsightsDialogTitle", "Insights"), TelemetryKeys.Insights, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService);
|
super(nls.localize("InsightsDialogTitle", "Insights"), TelemetryKeys.ModalDialogName.Insights, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService);
|
||||||
this._model.onDataChange(e => this.build());
|
this._model.onDataChange(e => this.build());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -357,7 +357,7 @@ export class ObjectExplorerService implements IObjectExplorerService {
|
|||||||
public async expandNode(providerId: string, session: azdata.ObjectExplorerSession, nodePath: string): Promise<azdata.ObjectExplorerExpandInfo> {
|
public async expandNode(providerId: string, session: azdata.ObjectExplorerSession, nodePath: string): Promise<azdata.ObjectExplorerExpandInfo> {
|
||||||
const provider = this._providers[providerId];
|
const provider = this._providers[providerId];
|
||||||
if (provider) {
|
if (provider) {
|
||||||
this._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.ObjectExplorerExpand)
|
this._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.TelemetryAction.ObjectExplorerExpand)
|
||||||
.withAdditionalProperties({
|
.withAdditionalProperties({
|
||||||
refresh: false,
|
refresh: false,
|
||||||
provider: providerId
|
provider: providerId
|
||||||
@@ -494,7 +494,7 @@ export class ObjectExplorerService implements IObjectExplorerService {
|
|||||||
public refreshNode(providerId: string, session: azdata.ObjectExplorerSession, nodePath: string): Promise<azdata.ObjectExplorerExpandInfo | undefined> {
|
public refreshNode(providerId: string, session: azdata.ObjectExplorerSession, nodePath: string): Promise<azdata.ObjectExplorerExpandInfo | undefined> {
|
||||||
let provider = this._providers[providerId];
|
let provider = this._providers[providerId];
|
||||||
if (provider) {
|
if (provider) {
|
||||||
this._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.ObjectExplorerExpand)
|
this._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.TelemetryAction.ObjectExplorerExpand)
|
||||||
.withAdditionalProperties({
|
.withAdditionalProperties({
|
||||||
refresh: true,
|
refresh: true,
|
||||||
provider: providerId
|
provider: providerId
|
||||||
|
|||||||
@@ -307,7 +307,7 @@ export class ProfilerColumnEditorDialog extends Modal {
|
|||||||
@ILogService logService: ILogService,
|
@ILogService logService: ILogService,
|
||||||
@ITextResourcePropertiesService textResourcePropertiesService: ITextResourcePropertiesService
|
@ITextResourcePropertiesService textResourcePropertiesService: ITextResourcePropertiesService
|
||||||
) {
|
) {
|
||||||
super(nls.localize('profilerColumnDialog.profiler', "Profiler"), TelemetryKeys.Profiler, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService);
|
super(nls.localize('profilerColumnDialog.profiler', "Profiler"), TelemetryKeys.ModalDialogName.Profiler, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService);
|
||||||
}
|
}
|
||||||
|
|
||||||
public render(): void {
|
public render(): void {
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ export class ProfilerFilterDialog extends Modal {
|
|||||||
@IProfilerService private profilerService: IProfilerService,
|
@IProfilerService private profilerService: IProfilerService,
|
||||||
@ITextResourcePropertiesService textResourcePropertiesService: ITextResourcePropertiesService
|
@ITextResourcePropertiesService textResourcePropertiesService: ITextResourcePropertiesService
|
||||||
) {
|
) {
|
||||||
super('', TelemetryKeys.ProfilerFilter, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService, { dialogStyle: 'normal', hasTitleIcon: true });
|
super('', TelemetryKeys.ModalDialogName.ProfilerFilter, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService, { dialogStyle: 'normal', hasTitleIcon: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
public open(input: ProfilerInput) {
|
public open(input: ProfilerInput) {
|
||||||
|
|||||||
@@ -215,28 +215,28 @@ export class QueryManagementService implements IQueryManagementService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public cancelQuery(ownerUri: string): Promise<QueryCancelResult> {
|
public cancelQuery(ownerUri: string): Promise<QueryCancelResult> {
|
||||||
this.addTelemetry(TelemetryKeys.CancelQuery, ownerUri);
|
this.addTelemetry(TelemetryKeys.TelemetryAction.CancelQuery, ownerUri);
|
||||||
return this._runAction(ownerUri, (runner) => {
|
return this._runAction(ownerUri, (runner) => {
|
||||||
return runner.cancelQuery(ownerUri);
|
return runner.cancelQuery(ownerUri);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public runQuery(ownerUri: string, range?: IRange, runOptions?: ExecutionPlanOptions): Promise<void> {
|
public runQuery(ownerUri: string, range?: IRange, runOptions?: ExecutionPlanOptions): Promise<void> {
|
||||||
this.addTelemetry(TelemetryKeys.RunQuery, ownerUri, runOptions);
|
this.addTelemetry(TelemetryKeys.TelemetryAction.RunQuery, ownerUri, runOptions);
|
||||||
return this._runAction(ownerUri, (runner) => {
|
return this._runAction(ownerUri, (runner) => {
|
||||||
return runner.runQuery(ownerUri, rangeToSelectionData(range), runOptions);
|
return runner.runQuery(ownerUri, rangeToSelectionData(range), runOptions);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public runQueryStatement(ownerUri: string, line: number, column: number): Promise<void> {
|
public runQueryStatement(ownerUri: string, line: number, column: number): Promise<void> {
|
||||||
this.addTelemetry(TelemetryKeys.RunQueryStatement, ownerUri);
|
this.addTelemetry(TelemetryKeys.TelemetryAction.RunQueryStatement, ownerUri);
|
||||||
return this._runAction(ownerUri, (runner) => {
|
return this._runAction(ownerUri, (runner) => {
|
||||||
return runner.runQueryStatement(ownerUri, line - 1, column - 1); // we are taking in a vscode IRange which is 1 indexed, but our api expected a 0 index
|
return runner.runQueryStatement(ownerUri, line - 1, column - 1); // we are taking in a vscode IRange which is 1 indexed, but our api expected a 0 index
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public runQueryString(ownerUri: string, queryString: string): Promise<void> {
|
public runQueryString(ownerUri: string, queryString: string): Promise<void> {
|
||||||
this.addTelemetry(TelemetryKeys.RunQueryString, ownerUri);
|
this.addTelemetry(TelemetryKeys.TelemetryAction.RunQueryString, ownerUri);
|
||||||
return this._runAction(ownerUri, (runner) => {
|
return this._runAction(ownerUri, (runner) => {
|
||||||
return runner.runQueryString(ownerUri, queryString);
|
return runner.runQueryString(ownerUri, queryString);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ export class FirewallRuleDialog extends Modal {
|
|||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
localize('createNewFirewallRule', "Create new firewall rule"),
|
localize('createNewFirewallRule', "Create new firewall rule"),
|
||||||
TelemetryKeys.FireWallRule,
|
TelemetryKeys.ModalDialogName.FireWallRule,
|
||||||
telemetryService,
|
telemetryService,
|
||||||
layoutService,
|
layoutService,
|
||||||
clipboardService,
|
clipboardService,
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export class ResourceProviderService implements IResourceProviderService {
|
|||||||
return new Promise<azdata.CreateFirewallRuleResponse>((resolve, reject) => {
|
return new Promise<azdata.CreateFirewallRuleResponse>((resolve, reject) => {
|
||||||
const provider = this._providers[resourceProviderId];
|
const provider = this._providers[resourceProviderId];
|
||||||
if (provider) {
|
if (provider) {
|
||||||
this._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.FirewallRuleRequested)
|
this._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.TelemetryAction.FirewallRuleRequested)
|
||||||
.withAdditionalProperties({
|
.withAdditionalProperties({
|
||||||
provider: resourceProviderId
|
provider: resourceProviderId
|
||||||
}).send();
|
}).send();
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ export class RestoreDialog extends Modal {
|
|||||||
@ILogService logService: ILogService,
|
@ILogService logService: ILogService,
|
||||||
@ITextResourcePropertiesService textResourcePropertiesService: ITextResourcePropertiesService
|
@ITextResourcePropertiesService textResourcePropertiesService: ITextResourcePropertiesService
|
||||||
) {
|
) {
|
||||||
super(localize('RestoreDialogTitle', "Restore database"), TelemetryKeys.Restore, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService, { hasErrors: true, width: 'wide', hasSpinner: true });
|
super(localize('RestoreDialogTitle', "Restore database"), TelemetryKeys.ModalDialogName.Restore, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService, { hasErrors: true, width: 'wide', hasSpinner: true });
|
||||||
|
|
||||||
// view model
|
// view model
|
||||||
this.viewModel = new RestoreViewModel(optionsMetadata);
|
this.viewModel = new RestoreViewModel(optionsMetadata);
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ export class RestoreService implements IRestoreService {
|
|||||||
return new Promise<azdata.RestoreResponse>((resolve, reject) => {
|
return new Promise<azdata.RestoreResponse>((resolve, reject) => {
|
||||||
const providerResult = this.getProvider(connectionUri);
|
const providerResult = this.getProvider(connectionUri);
|
||||||
if (providerResult) {
|
if (providerResult) {
|
||||||
this._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.RestoreRequested)
|
this._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Shell, TelemetryKeys.TelemetryAction.RestoreRequested)
|
||||||
.withAdditionalProperties({
|
.withAdditionalProperties({
|
||||||
provider: providerResult.providerName
|
provider: providerResult.providerName
|
||||||
}).send();
|
}).send();
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ export class ServerGroupDialog extends Modal {
|
|||||||
@ILogService logService: ILogService,
|
@ILogService logService: ILogService,
|
||||||
@ITextResourcePropertiesService textResourcePropertiesService: ITextResourcePropertiesService
|
@ITextResourcePropertiesService textResourcePropertiesService: ITextResourcePropertiesService
|
||||||
) {
|
) {
|
||||||
super(localize('ServerGroupsDialogTitle', "Server Groups"), TelemetryKeys.ServerGroups, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService);
|
super(localize('ServerGroupsDialogTitle', "Server Groups"), TelemetryKeys.ModalDialogName.ServerGroups, telemetryService, layoutService, clipboardService, themeService, logService, textResourcePropertiesService, contextKeyService);
|
||||||
}
|
}
|
||||||
|
|
||||||
public render() {
|
public render() {
|
||||||
|
|||||||
Reference in New Issue
Block a user