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

@@ -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;