mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-14 12:08:36 -05:00
Remove typings and replace missing methods with vscodes (#8217)
* remove typings and replace missing methods with vscodes * fix strict-null-checks * fix tests
This commit is contained in:
@@ -23,6 +23,7 @@ import { URI } from 'vs/base/common/uri';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import { FilterData } from 'sql/workbench/services/profiler/browser/profilerFilter';
|
||||
import { uriPrefixes } from 'sql/platform/connection/common/utils';
|
||||
import { find } from 'vs/base/common/arrays';
|
||||
|
||||
export class ProfilerInput extends EditorInput implements IProfilerSession {
|
||||
|
||||
@@ -69,7 +70,7 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
|
||||
let ret = new Array<number>();
|
||||
for (let i = 0; i < this._columns.length; i++) {
|
||||
let colVal = val[this._columns[i]];
|
||||
if (colVal && colVal.toLocaleLowerCase().includes(exp.toLocaleLowerCase())) {
|
||||
if (colVal && colVal.toLocaleLowerCase().indexOf(exp.toLocaleLowerCase()) > -1) {
|
||||
ret.push(i);
|
||||
}
|
||||
}
|
||||
@@ -213,11 +214,11 @@ export class ProfilerInput extends EditorInput implements IProfilerSession {
|
||||
this._notificationService.error(nls.localize("profiler.sessionCreationError", "Error while starting new session"));
|
||||
} else {
|
||||
this._sessionName = params.sessionName;
|
||||
let sessionTemplate = this._profilerService.getSessionTemplates().find((template) => {
|
||||
let sessionTemplate = find(this._profilerService.getSessionTemplates(), (template) => {
|
||||
return template.name === params.templateName;
|
||||
});
|
||||
if (!types.isUndefinedOrNull(sessionTemplate)) {
|
||||
let newView = this._profilerService.getViewTemplates().find((view) => {
|
||||
let newView = find(this._profilerService.getViewTemplates(), (view) => {
|
||||
return view.name === sessionTemplate.defaultView;
|
||||
});
|
||||
if (!types.isUndefinedOrNull(newView)) {
|
||||
|
||||
Reference in New Issue
Block a user