diff --git a/src/sql/workbench/contrib/dashboard/browser/containers/dashboardGridContainer.component.ts b/src/sql/workbench/contrib/dashboard/browser/containers/dashboardGridContainer.component.ts index df8429e785..e19977a57e 100644 --- a/src/sql/workbench/contrib/dashboard/browser/containers/dashboardGridContainer.component.ts +++ b/src/sql/workbench/contrib/dashboard/browser/containers/dashboardGridContainer.component.ts @@ -5,7 +5,7 @@ import 'vs/css!./dashboardGridContainer'; -import { Component, Inject, Input, forwardRef, ElementRef, ViewChildren, QueryList, OnDestroy, ChangeDetectorRef, ContentChild } from '@angular/core'; +import { Component, Inject, Input, forwardRef, ElementRef, ViewChildren, QueryList, OnDestroy, ChangeDetectorRef, ViewChild } from '@angular/core'; import { CommonServiceInterface } from 'sql/workbench/services/bootstrap/browser/commonServiceInterface.service'; import { TabConfig, WidgetConfig } from 'sql/workbench/contrib/dashboard/browser/core/dashboardWidget'; @@ -206,7 +206,7 @@ export class DashboardGridContainer extends DashboardTab implements OnDestroy { @ViewChildren(DashboardWidgetWrapper) private _widgets: QueryList; @ViewChildren(WebviewContent) private _webViews: QueryList; - @ContentChild(ScrollableDirective) private _scrollable: ScrollableDirective; + @ViewChild(ScrollableDirective) private _scrollable: ScrollableDirective; constructor( @Inject(forwardRef(() => CommonServiceInterface)) protected dashboardService: CommonServiceInterface, @Inject(forwardRef(() => ElementRef)) protected _el: ElementRef, diff --git a/src/sql/workbench/contrib/dashboard/browser/containers/dashboardHomeContainer.component.ts b/src/sql/workbench/contrib/dashboard/browser/containers/dashboardHomeContainer.component.ts index df6b13f920..87a8b512ca 100644 --- a/src/sql/workbench/contrib/dashboard/browser/containers/dashboardHomeContainer.component.ts +++ b/src/sql/workbench/contrib/dashboard/browser/containers/dashboardHomeContainer.component.ts @@ -5,7 +5,7 @@ import 'vs/css!./dashboardHomeContainer'; -import { Component, forwardRef, Input, ChangeDetectorRef, Inject, ViewChild, ContentChild, ElementRef } from '@angular/core'; +import { Component, forwardRef, Input, ChangeDetectorRef, Inject, ViewChild, ElementRef } from '@angular/core'; import { DashboardWidgetContainer } from 'sql/workbench/contrib/dashboard/browser/containers/dashboardWidgetContainer.component'; import { WidgetConfig } from 'sql/workbench/contrib/dashboard/browser/core/dashboardWidget'; @@ -44,7 +44,7 @@ export class DashboardHomeContainer extends DashboardWidgetContainer { @Input() private properties: WidgetConfig; @ViewChild('propertiesClass') private _propertiesClass: DashboardWidgetWrapper; @ViewChild('propertiesContainer') private _propertiesContainer: ElementRef; - @ContentChild(ScrollableDirective) private _scrollable: ScrollableDirective; + @ViewChild(ScrollableDirective) private _scrollable: ScrollableDirective; constructor( @Inject(forwardRef(() => ChangeDetectorRef)) _cd: ChangeDetectorRef, diff --git a/src/sql/workbench/contrib/dashboard/browser/core/dashboardPage.component.html b/src/sql/workbench/contrib/dashboard/browser/core/dashboardPage.component.html index 4b4ae5a31e..f634db9934 100644 --- a/src/sql/workbench/contrib/dashboard/browser/core/dashboardPage.component.html +++ b/src/sql/workbench/contrib/dashboard/browser/core/dashboardPage.component.html @@ -8,28 +8,30 @@ [actions]="panelActions">
- - - - - - - - - - - - - - - - - - - +
+ + + + + + + + + + + + + + + + + + + + - - + +
diff --git a/src/sql/workbench/contrib/dashboard/browser/core/dashboardPage.component.ts b/src/sql/workbench/contrib/dashboard/browser/core/dashboardPage.component.ts index 64a4a9e975..5b68bf5242 100644 --- a/src/sql/workbench/contrib/dashboard/browser/core/dashboardPage.component.ts +++ b/src/sql/workbench/contrib/dashboard/browser/core/dashboardPage.component.ts @@ -553,4 +553,8 @@ export abstract class DashboardPage extends AngularDisposable implements IConfig const border = theme.getColor(DASHBOARD_BORDER); this.toolbarContainer.nativeElement.style.borderBottomColor = border.toString(); } + + public getContentAreaHeight() { + return this.showToolbar ? `calc(100% - ${(this.toolbarContainer.nativeElement).clientHeight}px)` : '100%'; + } }