From f24f576b72dbb6ea9d9fe419fc8a159825e47f2c Mon Sep 17 00:00:00 2001 From: Madeline MacDonald Date: Mon, 16 Jul 2018 17:20:13 -0700 Subject: [PATCH] Profiler display fixes (#1949) * Fixing details tab, window resizing, and having profiler options in object explorer * Fixing displaying connection names * spacing * Removing unnecessary code --- .../parts/profiler/editor/controller/profilerTableEditor.ts | 1 + src/sql/parts/profiler/editor/profilerEditor.ts | 2 ++ src/sql/parts/profiler/editor/profilerInput.ts | 6 +++++- src/sql/parts/profiler/service/interfaces.ts | 1 - 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/sql/parts/profiler/editor/controller/profilerTableEditor.ts b/src/sql/parts/profiler/editor/controller/profilerTableEditor.ts index 9a8990d4bf..fafdbd86bc 100644 --- a/src/sql/parts/profiler/editor/controller/profilerTableEditor.ts +++ b/src/sql/parts/profiler/editor/controller/profilerTableEditor.ts @@ -166,6 +166,7 @@ export class ProfilerTableEditor extends BaseEditor implements IProfilerControll public layout(dimension: Dimension): void { this._currentDimensions = dimension; this._profilerTable.layout(dimension); + this._profilerTable.autosizeColumns(); this._onDidChangeConfiguration.fire({ layoutInfo: true }); } diff --git a/src/sql/parts/profiler/editor/profilerEditor.ts b/src/sql/parts/profiler/editor/profilerEditor.ts index 204a6c822d..43fd5d6f18 100644 --- a/src/sql/parts/profiler/editor/profilerEditor.ts +++ b/src/sql/parts/profiler/editor/profilerEditor.ts @@ -50,6 +50,7 @@ class BasicView extends View { private _previousSize: number; private _collapsed: boolean; public headerSize: number; + constructor( initialSize: number, private _element: HTMLElement, @@ -58,6 +59,7 @@ class BasicView extends View { opts: IViewOptions ) { super(initialSize, opts); + this._previousSize = initialSize; } render(container: HTMLElement, orientation: Orientation): void { diff --git a/src/sql/parts/profiler/editor/profilerInput.ts b/src/sql/parts/profiler/editor/profilerInput.ts index df14d31129..a8f5c91338 100644 --- a/src/sql/parts/profiler/editor/profilerInput.ts +++ b/src/sql/parts/profiler/editor/profilerInput.ts @@ -151,7 +151,11 @@ export class ProfilerInput extends EditorInput implements IProfilerSession { public get connectionName(): string { if (this._connection !== null) { - return `${ this._connection.serverName } ${ this._connection.databaseName }`; + if (this._connection.databaseName) { + return `${ this._connection.serverName } ${ this._connection.databaseName }`; + } else { + return `${ this._connection.serverName }`; + } } else { return nls.localize('profilerInput.notConnected', "Not connected"); diff --git a/src/sql/parts/profiler/service/interfaces.ts b/src/sql/parts/profiler/service/interfaces.ts index 31e1f97f13..f12b76d581 100644 --- a/src/sql/parts/profiler/service/interfaces.ts +++ b/src/sql/parts/profiler/service/interfaces.ts @@ -98,7 +98,6 @@ export interface IProfilerSettings { export interface IColumnViewTemplate { name: string; - width: string; eventsMapped: Array; }