profiler improvements (#3151)

* profiler improvements

* fix for issue 3114
This commit is contained in:
Alan Ren
2018-11-07 11:25:24 -08:00
committed by GitHub
parent e2bd6c06ec
commit d9ba4d9130
22 changed files with 129 additions and 116 deletions

View File

@@ -23,7 +23,7 @@
.carbon-taskbar.monaco-toolbar .monaco-action-bar.animated .actions-container {
justify-content: flex-start;
padding-left: 15px;
padding: 5px 5px 5px 15px;
flex-wrap: wrap;
}

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="-2 -2 16 16" enable-background="new -2 -2 16 16"><polygon fill="#424242" points="9,0 4.5,9 3,6 0,6 3,12 6,12 12,0"/></svg>

After

Width:  |  Height:  |  Size: 194 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="-2 -2 16 16" enable-background="new -2 -2 16 16"><polygon fill="#C5C5C5" points="9,0 4.5,9 3,6 0,6 3,12 6,12 12,0"/></svg>

After

Width:  |  Height:  |  Size: 194 B

View File

@@ -227,6 +227,51 @@
background: url('unpin.svg') center center no-repeat;
}
.vs .sql.icon.pause {
background-image: url('pause.svg')
}
.vs-dark .sql.icon.pause,
.hc-black .sql.icon.pause {
background-image: url('pause_inverse.svg')
}
.vs .sql.icon.continue {
background-image: url('continue.svg')
}
.vs-dark .sql.icon.continue,
.hc-black .sql.icon.continue {
background-image: url('continue_inverse.svg')
}
.vs .sql.icon.checked {
background-image: url('check.svg')
}
.vs-dark .sql.icon.checked,
.hc-black .sql.icon.checked {
background-image: url('check_inverse.svg')
}
.vs .sql.icon.start {
background-image: url('start.svg')
}
.vs-dark .sql.icon.start,
.hc-black .sql.icon.start {
background-image: url('start_inverse.svg')
}
.vs .sql.icon.stop {
background-image: url('stop.svg')
}
.vs-dark .sql.icon.stop,
.hc-black .sql.icon.stop {
background-image: url('stop_inverse.svg')
}
.small {
width: 16px;
height: 16px;

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs><style>.icon-canvas-transparent,.icon-vs-out{fill:#f6f6f6;}.icon-canvas-transparent{opacity:0;}.icon-vs-action-blue{fill:#00539c;}</style></defs><title>continue</title><g id="canvas"><path class="icon-canvas-transparent" d="M16,0V16H0V0Z"/></g><g id="outline" style="display: none;"><path class="icon-vs-out" d="M15.64,8l-7.8,6H2V2H7.84Z"/></g><g id="iconBg"><path class="icon-vs-action-blue" d="M3,3H5V13H3ZM7.5,3V13L14,8Z"/></g></svg>

After

Width:  |  Height:  |  Size: 502 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs><style>.icon-canvas-transparent,.icon-vs-out{fill:#252526;}.icon-canvas-transparent{opacity:0;}.icon-vs-action-blue{fill:#75beff;}</style></defs><title>continue</title><g id="canvas"><path class="icon-canvas-transparent" d="M16,0V16H0V0Z"/></g><g id="outline" style="display: none;"><path class="icon-vs-out" d="M15.64,8l-7.8,6H2V2H7.84Z"/></g><g id="iconBg"><path class="icon-vs-action-blue" d="M3,3H5V13H3ZM7.5,3V13L14,8Z"/></g></svg>

After

Width:  |  Height:  |  Size: 502 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs><style>.icon-canvas-transparent,.icon-vs-out{fill:#f6f6f6;}.icon-canvas-transparent{opacity:0;}.icon-vs-action-blue{fill:#00539c;}</style></defs><title>pause</title><g id="canvas"><path class="icon-canvas-transparent" d="M16,0V16H0V0Z"/></g><g id="outline" style="display: none;"><path class="icon-vs-out" d="M13,2V14H8.5V2ZM3,14H7.5V2H3Z"/></g><g id="iconBg"><path class="icon-vs-action-blue" d="M4,3H6.5V13H4ZM9.5,3V13H12V3Z"/></g></svg>

After

Width:  |  Height:  |  Size: 505 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs><style>.icon-canvas-transparent,.icon-vs-out{fill:#252526;}.icon-canvas-transparent{opacity:0;}.icon-vs-action-blue{fill:#75beff;}</style></defs><title>pause</title><g id="canvas"><path class="icon-canvas-transparent" d="M16,0V16H0V0Z"/></g><g id="outline" style="display: none;"><path class="icon-vs-out" d="M13,2V14H8.5V2ZM3,14H7.5V2H3Z"/></g><g id="iconBg"><path class="icon-vs-action-blue" d="M4,3H6.5V13H4ZM9.5,3V13H12V3Z"/></g></svg>

After

Width:  |  Height:  |  Size: 505 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs><style>.icon-canvas-transparent,.icon-vs-out{fill:#f6f6f6;}.icon-canvas-transparent{opacity:0;}.icon-vs-action-green{fill:#388a34;}</style></defs><title>continue</title><g id="canvas"><path class="icon-canvas-transparent" d="M16,0V16H0V0Z"/></g><g id="outline" style="display: none;"><path class="icon-vs-out" d="M14.334,8,3.667,16H3V0h.667Z"/></g><g id="iconBg"><path class="icon-vs-action-green" d="M4,1.5v13L12.667,8,4,1.5Z"/></g></svg>

After

Width:  |  Height:  |  Size: 505 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs><style>.icon-canvas-transparent,.icon-vs-out{fill:#252526;}.icon-canvas-transparent{opacity:0;}.icon-vs-action-green{fill:#89d185;}</style></defs><title>continue</title><g id="canvas"><path class="icon-canvas-transparent" d="M16,0V16H0V0Z"/></g><g id="outline" style="display: none;"><path class="icon-vs-out" d="M14.334,8,3.667,16H3V0h.667Z"/></g><g id="iconBg"><path class="icon-vs-action-green" d="M4,1.5v13L12.667,8,4,1.5Z"/></g></svg>

After

Width:  |  Height:  |  Size: 505 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs><style>.icon-canvas-transparent,.icon-vs-out{fill:#f6f6f6;}.icon-canvas-transparent{opacity:0;}.icon-vs-action-red{fill:#a1260d;}</style></defs><title>stop</title><g id="canvas"><path class="icon-canvas-transparent" d="M16,0V16H0V0Z"/></g><g id="outline" style="display: none;"><path class="icon-vs-out" d="M14,2V14H2V2Z"/></g><g id="iconBg"><path class="icon-vs-action-red" d="M13,3V13H3V3Z"/></g></svg>

After

Width:  |  Height:  |  Size: 470 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs><style>.icon-canvas-transparent,.icon-vs-out{fill:#252526;}.icon-canvas-transparent{opacity:0;}.icon-vs-action-red{fill:#f48771;}</style></defs><title>stop</title><g id="canvas"><path class="icon-canvas-transparent" d="M16,0V16H0V0Z"/></g><g id="outline" style="display: none;"><path class="icon-vs-out" d="M14,2V14H2V2Z"/></g><g id="iconBg"><path class="icon-vs-action-red" d="M13,3V13H3V3Z"/></g></svg>

After

Width:  |  Height:  |  Size: 470 B

View File

@@ -24,7 +24,6 @@ import { TreeNode } from 'sql/parts/objectExplorer/common/treeNode';
import { NodeType } from 'sql/parts/objectExplorer/common/nodeType';
import { ConnectionProfileGroup } from 'sql/parts/connection/common/connectionProfileGroup';
import { ConnectionProfile } from 'sql/parts/connection/common/connectionProfile';
import { NewProfilerAction } from 'sql/parts/profiler/contrib/profilerActions';
import { TreeUpdateUtils } from 'sql/parts/objectExplorer/viewlet/treeUpdateUtils';
import { IConnectionManagementService } from 'sql/parts/connection/common/connectionManagement';
import { MenuId, IMenuService } from 'vs/platform/actions/common/actions';

View File

@@ -10,7 +10,6 @@ import { IProfilerController } from 'sql/parts/profiler/editor/controller/interf
import { ProfilerInput } from 'sql/parts/profiler/editor/profilerInput';
import { BaseActionContext } from 'sql/workbench/common/actions';
import { Task } from 'sql/platform/tasks/common/tasks';
import { ObjectExplorerActionsContext } from 'sql/parts/objectExplorer/viewlet/objectExplorerActions';
import { ConnectionProfile } from 'sql/parts/connection/common/connectionProfile';
import { IConnectionManagementService, IConnectionCompletionOptions, ConnectionType } from 'sql/parts/connection/common/connectionManagement';
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
@@ -25,8 +24,11 @@ import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiati
import { INotificationService } from 'vs/platform/notification/common/notification';
export class ProfilerConnect extends Action {
private static readonly ConnectText = nls.localize('profilerAction.connect', 'Connect');
private static readonly DisconnectText = nls.localize('profilerAction.disconnect', 'Disconnect');
public static ID = 'profiler.connect';
public static LABEL = nls.localize('profiler.connect', "Connect");
public static LABEL = ProfilerConnect.ConnectText;
private _connected: boolean = false;
@@ -59,7 +61,7 @@ export class ProfilerConnect extends Action {
public set connected(value: boolean) {
this._connected = value;
this._setClass(value ? 'disconnect' : 'connect');
this._setLabel(value ? nls.localize('profilerAction.disconnect', 'Disconnect') : nls.localize('profilerAction.connect', "Connect"));
this._setLabel(value ? ProfilerConnect.DisconnectText : ProfilerConnect.ConnectText);
}
public get connected(): boolean {
@@ -75,7 +77,7 @@ export class ProfilerStart extends Action {
id: string, label: string,
@IProfilerService private _profilerService: IProfilerService
) {
super(id, label, 'start');
super(id, label, 'sql start');
}
public run(input: ProfilerInput): TPromise<boolean> {
@@ -86,7 +88,7 @@ export class ProfilerStart extends Action {
export class ProfilerCreate extends Action {
public static ID = 'profiler.create';
public static LABEL = nls.localize('create', "Create");
public static LABEL = nls.localize('create', "New Session");
constructor(
id: string, label: string,
@@ -105,8 +107,13 @@ export class ProfilerCreate extends Action {
}
export class ProfilerPause extends Action {
private static readonly PauseText = nls.localize('profilerAction.pauseCapture', 'Pause');
private static readonly ResumeText = nls.localize('profilerAction.resumeCapture', 'Resume');
private static readonly PauseCssClass = 'sql pause';
private static readonly ResumeCssClass = 'sql continue';
public static ID = 'profiler.pause';
public static LABEL = nls.localize('profiler.capture', "Pause Capture");
public static LABEL = ProfilerPause.PauseText;
private _paused: boolean = false;
@@ -114,7 +121,7 @@ export class ProfilerPause extends Action {
id: string, label: string,
@IProfilerService private _profilerService: IProfilerService
) {
super(id, label, 'stop');
super(id, label, ProfilerPause.PauseCssClass);
}
public run(input: ProfilerInput): TPromise<boolean> {
@@ -127,8 +134,8 @@ export class ProfilerPause extends Action {
public set paused(value: boolean) {
this._paused = value;
this._setClass(value ? 'start' : 'stop');
this._setLabel(value ? nls.localize('profilerAction.resumeCapture', "Resume Capture") : nls.localize('profilerAction.pauseCapture', "Pause Capture"));
this._setClass(value ? ProfilerPause.ResumeCssClass : ProfilerPause.PauseCssClass);
this._setLabel(value ? ProfilerPause.ResumeText : ProfilerPause.PauseText);
}
public get paused(): boolean {
@@ -144,7 +151,7 @@ export class ProfilerStop extends Action {
id: string, label: string,
@IProfilerService private _profilerService: IProfilerService
) {
super(id, label, 'stop');
super(id, label, 'sql stop');
}
public run(input: ProfilerInput): TPromise<boolean> {
@@ -167,16 +174,21 @@ export class ProfilerClear extends Action {
}
export class ProfilerAutoScroll extends Action {
private static readonly AutoScrollOnText = nls.localize('profilerAction.autoscrollOn', 'Auto Scroll: On');
private static readonly AutoScrollOffText = nls.localize('profilerAction.autoscrollOff', 'Auto Scroll: Off');
private static readonly CheckedCssClass = 'sql checked';
public static ID = 'profiler.autoscroll';
public static LABEL = nls.localize('profiler.autoscrollOn', "Auto Scroll: On");
public static LABEL = ProfilerAutoScroll.AutoScrollOnText;
constructor(id: string, label: string) {
super(id, label);
super(id, label, ProfilerAutoScroll.CheckedCssClass);
}
run(input: ProfilerInput): TPromise<boolean> {
this.checked = !this.checked;
this._setLabel(this.checked ? nls.localize('profilerAction.autoscrollOn', "Auto Scroll: On") : nls.localize('profilerAction.autoscrollOff', "Auto Scroll: Off"));
this._setLabel(this.checked ? ProfilerAutoScroll.AutoScrollOnText : ProfilerAutoScroll.AutoScrollOffText);
this._setClass(this.checked ? ProfilerAutoScroll.CheckedCssClass : '');
input.state.change({ autoscroll: this.checked });
return TPromise.as(true);
}
@@ -256,7 +268,7 @@ export class ProfilerFindPrevious implements IEditorAction {
export class NewProfilerAction extends Task {
public static readonly ID = 'profiler.newProfiler';
public static readonly LABEL = nls.localize('profilerAction.newProfiler', 'New Profiler');
public static readonly LABEL = nls.localize('profilerAction.newProfiler', 'Launch Profiler');
public static readonly ICON = 'profile';
private _connectionProfile: ConnectionProfile;

View File

@@ -1,52 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { ProfilerInput } from 'sql/parts/profiler/editor/profilerInput';
import { TPromise } from 'vs/base/common/winjs.base';
import { Action } from 'vs/base/common/actions';
import * as nls from 'vs/nls';
import { IEditorService, ACTIVE_GROUP } from 'vs/workbench/services/editor/common/editorService';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IConnectionManagementService } from 'sql/parts/connection/common/connectionManagement';
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
export class GlobalNewProfilerAction extends Action {
public static ID = 'explorer.newProfiler';
public static LABEL = nls.localize('profilerWorkbenchAction.newProfiler', "New Profiler");
constructor(
id: string, label: string,
@IEditorService private _editorService: IEditorService,
@IInstantiationService private _instantiationService: IInstantiationService,
@IConnectionManagementService private _connectionService: IConnectionManagementService
) {
super(id, label);
}
run(context?: any): TPromise<boolean> {
// TODO: for test-only, grab the first MSSQL active connection for the profiler session
// TODO: when finishing the feature the connection should come from the launch context
let connectionProfile: IConnectionProfile;
if (context && context.connectionProfile) {
connectionProfile = context.connectionProfile;
} else {
let activeConnections = this._connectionService.getActiveConnections();
if (activeConnections) {
for (let i = 0; i < activeConnections.length; ++i) {
if (activeConnections[i].providerName === 'MSSQL') {
connectionProfile = activeConnections[i];
break;
}
}
}
}
let profilerInput = this._instantiationService.createInstance(ProfilerInput, connectionProfile);
return this._editorService.openEditor(profilerInput, { pinned: true }, ACTIVE_GROUP).then(() => TPromise.as(true));
}
}

View File

@@ -122,7 +122,6 @@ export class ProfilerEditor extends BaseEditor {
private _viewTemplates: Array<IProfilerViewTemplate>;
private _sessionSelector: SelectBox;
private _sessionsList: Array<string>;
private _connectionInfoText: HTMLElement;
// Actions
private _connectAction: Actions.ProfilerConnect;
@@ -211,6 +210,7 @@ export class ProfilerEditor extends BaseEditor {
this._viewTemplates = this._profilerService.getViewTemplates();
this._viewTemplateSelector = new SelectBox(this._viewTemplates.map(i => i.name), 'Standard View', this._contextViewService);
this._viewTemplateSelector.setAriaLabel(nls.localize('profiler.viewSelectAccessibleName', 'Select View'));
this._register(this._viewTemplateSelector.onDidSelect(e => {
if (this.input) {
this.input.viewTemplate = this._viewTemplates.find(i => i.name === e.selected);
@@ -223,6 +223,7 @@ export class ProfilerEditor extends BaseEditor {
this._sessionsList = [''];
this._sessionSelector = new SelectBox(this._sessionsList, '', this._contextViewService);
this._sessionSelector.setAriaLabel(nls.localize('profiler.sessionSelectAccessibleName', 'Select Session'));
this._register(this._sessionSelector.onDidSelect(e => {
if (this.input) {
this.input.sessionName = e.selected;
@@ -233,32 +234,36 @@ export class ProfilerEditor extends BaseEditor {
sessionsContainer.style.paddingRight = '5px';
this._sessionSelector.render(sessionsContainer);
this._connectionInfoText = document.createElement('div');
this._connectionInfoText.style.paddingRight = '5px';
this._connectionInfoText.innerText = '';
this._connectionInfoText.style.textAlign = 'center';
this._connectionInfoText.style.display = 'flex';
this._connectionInfoText.style.alignItems = 'center';
this._register(attachSelectBoxStyler(this._viewTemplateSelector, this.themeService));
this._register(attachSelectBoxStyler(this._sessionSelector, this.themeService));
this._actionBar.setContent([
{ action: this._startAction },
{ action: this._stopAction },
{ element: sessionsContainer },
{ action: this._createAction },
{ element: Taskbar.createTaskbarSeparator() },
{ element: this._createTextElement(nls.localize('profiler.sessionSelectLabel', 'Select Session:')) },
{ element: sessionsContainer },
{ action: this._startAction },
{ action: this._stopAction },
{ action: this._pauseAction },
{ action: this._autoscrollAction },
{ action: this._instantiationService.createInstance(Actions.ProfilerClear, Actions.ProfilerClear.ID, Actions.ProfilerClear.LABEL) },
{ element: Taskbar.createTaskbarSeparator() },
{ element: this._createTextElement(nls.localize('profiler.viewSelectLabel', 'Select View:')) },
{ element: viewTemplateContainer },
{ element: Taskbar.createTaskbarSeparator() },
{ element: this._connectionInfoText }
{ action: this._autoscrollAction },
{ action: this._instantiationService.createInstance(Actions.ProfilerClear, Actions.ProfilerClear.ID, Actions.ProfilerClear.LABEL) }
]);
}
private _createTextElement(text: string): HTMLDivElement {
let textElement = document.createElement('div');
textElement.style.paddingRight = '10px';
textElement.innerText = text;
textElement.style.textAlign = 'center';
textElement.style.display = 'flex';
textElement.style.alignItems = 'center';
return textElement;
}
private _createProfilerTable(): HTMLElement {
let profilerTableContainer = document.createElement('div');
profilerTableContainer.className = 'profiler-table monaco-editor';
@@ -417,7 +422,6 @@ export class ProfilerEditor extends BaseEditor {
autoscroll: true,
isPanelCollapsed: true
});
this._connectionInfoText.innerText = input.connectionName;
this._profilerTableEditor.updateState();
this._splitView.layout();
this._profilerTableEditor.focus();
@@ -529,6 +533,11 @@ export class ProfilerEditor extends BaseEditor {
if ((this.input.sessionName === undefined || this.input.sessionName === '') && this._sessionsList.length > 0) {
this.input.sessionName = this._sessionsList[0];
}
if (this.input.sessionName) {
this._sessionSelector.selectWithOptionName(this.input.sessionName);
}
});
}
}

View File

@@ -41,7 +41,7 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
public onColumnsChanged: Event<Slick.Column<Slick.SlickData>[]> = this._onColumnsChanged.event;
constructor(
private _connection: IConnectionProfile,
public connection: IConnectionProfile,
@IInstantiationService private _instantiationService: IInstantiationService,
@IProfilerService private _profilerService: IProfilerService,
@INotificationService private _notificationService: INotificationService,
@@ -58,7 +58,7 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
autoscroll: true
});
this._profilerService.registerSession(generateUuid(), _connection, this).then((id) => {
this._profilerService.registerSession(generateUuid(), connection, this).then((id) => {
this._id = id;
this.state.change({ isConnected: true });
});
@@ -92,7 +92,7 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
}
public get providerType(): string {
return this._connection ? this._connection.providerName : undefined;
return this.connection ? this.connection.providerName : undefined;
}
public set viewTemplate(template: IProfilerViewTemplate) {
@@ -137,10 +137,10 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
public getName(): string {
let name: string = nls.localize('profilerInput.profiler', 'Profiler');
if (!this._connection) {
if (!this.connection) {
return name;
}
name += ': ' + this._connection.serverName.substring(0, 20);
name += ': ' + this.connection.serverName.substring(0, 20);
return name;
}
@@ -182,11 +182,11 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
}
public get connectionName(): string {
if (!types.isUndefinedOrNull(this._connection)) {
if (this._connection.databaseName) {
return `${this._connection.serverName} ${this._connection.databaseName}`;
if (!types.isUndefinedOrNull(this.connection)) {
if (this.connection.databaseName) {
return `${this.connection.serverName} ${this.connection.databaseName}`;
} else {
return `${this._connection.serverName}`;
return `${this.connection.serverName}`;
}
}
else {
@@ -203,7 +203,7 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
}
public onSessionStopped(notification: sqlops.ProfilerSessionStoppedParams) {
this._notificationService.error(nls.localize("profiler.sessionStopped", "XEvent Profiler Session stopped unexpectedly on the server {0}.", this._connection.serverName));
this._notificationService.error(nls.localize("profiler.sessionStopped", "XEvent Profiler Session stopped unexpectedly on the server {0}.", this.connection.serverName));
this.state.change({
isStopped: true,
@@ -244,7 +244,7 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
public onMoreRows(eventMessage: sqlops.ProfilerSessionEvents) {
if (eventMessage.eventsLost) {
this._notificationService.warn(nls.localize("profiler.eventsLost", "The XEvent Profiler session for {0} has lost events.", this._connection.serverName));
this._notificationService.warn(nls.localize("profiler.eventsLost", "The XEvent Profiler session for {0} has lost events.", this.connection.serverName));
}
for (let i: number = 0; i < eventMessage.events.length && i < 500; ++i) {

View File

@@ -28,6 +28,7 @@ import { IObjectExplorerService } from 'sql/parts/objectExplorer/common/objectEx
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { QueryInput } from 'sql/parts/query/common/queryInput';
import { DashboardInput } from 'sql/parts/dashboard/dashboardInput';
import { ProfilerInput } from 'sql/parts/profiler/editor/profilerInput';
// map for the version of SQL Server (default is 140)
const scriptCompatibilityOptionMap = {
@@ -400,6 +401,9 @@ export function getCurrentGlobalConnection(objectExplorerService: IObjectExplore
if (activeInput instanceof QueryInput || activeInput instanceof EditDataInput || activeInput instanceof DashboardInput) {
connection = connectionManagementService.getConnectionProfile(activeInput.uri);
}
else if (activeInput instanceof ProfilerInput) {
connection = activeInput.connection;
}
}
return connection;