profiler extension bug fixes (#3490)

This commit is contained in:
Alan Ren
2018-12-06 09:58:33 -08:00
committed by GitHub
parent 1ca36ee29c
commit 4bf8836c0a
5 changed files with 7 additions and 6 deletions

View File

@@ -9,7 +9,7 @@ import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiati
import * as nls from 'vs/nls';
import { IJSONSchema } from 'vs/base/common/jsonSchema';
import { IEditorService, ACTIVE_GROUP } from 'vs/workbench/services/editor/common/editorService';
import { IConnectionManagementService, IConnectionDialogService} from 'sql/parts/connection/common/connectionManagement';
import { IConnectionManagementService, IConnectionDialogService } from 'sql/parts/connection/common/connectionManagement';
import { IObjectExplorerService } from '../../objectExplorer/common/objectExplorerService';
import { ProfilerInput } from 'sql/parts/profiler/editor/profilerInput';
import { TPromise } from 'vs/base/common/winjs.base';
@@ -55,10 +55,10 @@ CommandsRegistry.registerCommand({
let promise;
if (connectionProfile) {
promise = connectionService.connectIfNotConnected(connectionProfile);
promise = connectionService.connectIfNotConnected(connectionProfile, 'connection', true);
} else {
// if still no luck, we will open the Connection dialog and let user connect to a server
promise = connectionDialogService.openDialogAndWait(connectionService, { connectionType: 1, providers: [mssqlProviderName] }).then((profile) => {
promise = connectionDialogService.openDialogAndWait(connectionService, { connectionType: 0, showDashboard: false, providers: [mssqlProviderName] }).then((profile) => {
connectionProfile = profile as ConnectionProfile;
});
}

View File

@@ -308,8 +308,6 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
// ----- Public
public focusFindInput(): void {
this._findInput.select();
// Edge browser requires focus() in addition to select()
this._findInput.focus();
}

View File

@@ -218,6 +218,7 @@ export class ProfilerTableEditor extends BaseEditor implements IProfilerControll
if (p) {
this._profilerTable.setActiveCell(p.row, p.col);
this._updateFinderMatchState();
this._finder.focusFindInput();
}
});
} else {

View File

@@ -557,6 +557,7 @@ export class ProfilerEditor extends BaseEditor {
}
public focus() {
this._profilerEditorContextKey.set(true);
super.focus();
let savedViewState = this._savedTableViewStates.get(this.input);
if (savedViewState) {

View File

@@ -66,7 +66,8 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
let searchFn = (val: { [x: string]: string }, exp: string): Array<number> => {
let ret = new Array<number>();
for (let i = 0; i < this._columns.length; i++) {
if (val[this._columns[i]].includes(exp)) {
let colVal = val[this._columns[i]];
if (colVal && colVal.toLocaleLowerCase().includes(exp.toLocaleLowerCase())) {
ret.push(i);
}
}