connect dialog telemetry (#15267)

* add connection dialog telemetry

* reset source

* add to correct place
This commit is contained in:
Alan Ren
2021-04-28 14:44:31 -07:00
committed by GitHub
parent 659fa2f78d
commit e42da81005
4 changed files with 27 additions and 5 deletions

View File

@@ -13,6 +13,7 @@ import { ConnectionProfileGroup } from 'sql/platform/connection/common/connectio
import { attachInputBoxStyler } from 'sql/platform/theme/common/styler';
import { ITreeItem } from 'sql/workbench/common/views';
import { CONNECTIONS_SORT_BY_CONFIG_KEY } from 'sql/platform/connection/common/connectionConfig';
import { ConnectionSource } from 'sql/workbench/services/connection/browser/connectionDialogWidget';
import { IConnectionTreeDescriptor, IConnectionTreeService } from 'sql/workbench/services/connection/common/connectionTreeService';
import { AsyncRecentConnectionTreeDataSource } from 'sql/workbench/services/objectExplorer/browser/asyncRecentConnectionTreeDataSource';
import { ServerTreeElement } from 'sql/workbench/services/objectExplorer/browser/asyncServerTree';
@@ -66,7 +67,8 @@ export class ConnectionBrowseTab implements IPanelTab {
export interface SelectedConnectionChangedEventArgs {
connectionProfile: IConnectionProfile,
connect: boolean
connect: boolean,
source: ConnectionSource
}
export class ConnectionBrowserView extends Disposable implements IPanelView {
@@ -247,14 +249,16 @@ export class ConnectionBrowserView extends Disposable implements IPanelView {
this._onSelectedConnectionChanged.fire(
{
connectionProfile: selectedNode.element.payload,
connect: connect
connect: connect,
source: 'azure'
});
}
}
} else if (selectedNode instanceof ConnectionProfile) {
this._onSelectedConnectionChanged.fire({
connectionProfile: selectedNode,
connect: connect
connect: connect,
source: 'savedconnections'
});
}
}