mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
fix clipping issue (#10020)
* fix clipping issue * remove hardcoded height
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import 'vs/css!./dashboardGridContainer';
|
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 { CommonServiceInterface } from 'sql/workbench/services/bootstrap/browser/commonServiceInterface.service';
|
||||||
import { TabConfig, WidgetConfig } from 'sql/workbench/contrib/dashboard/browser/core/dashboardWidget';
|
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<DashboardWidgetWrapper>;
|
@ViewChildren(DashboardWidgetWrapper) private _widgets: QueryList<DashboardWidgetWrapper>;
|
||||||
@ViewChildren(WebviewContent) private _webViews: QueryList<WebviewContent>;
|
@ViewChildren(WebviewContent) private _webViews: QueryList<WebviewContent>;
|
||||||
@ContentChild(ScrollableDirective) private _scrollable: ScrollableDirective;
|
@ViewChild(ScrollableDirective) private _scrollable: ScrollableDirective;
|
||||||
constructor(
|
constructor(
|
||||||
@Inject(forwardRef(() => CommonServiceInterface)) protected dashboardService: CommonServiceInterface,
|
@Inject(forwardRef(() => CommonServiceInterface)) protected dashboardService: CommonServiceInterface,
|
||||||
@Inject(forwardRef(() => ElementRef)) protected _el: ElementRef,
|
@Inject(forwardRef(() => ElementRef)) protected _el: ElementRef,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
import 'vs/css!./dashboardHomeContainer';
|
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 { DashboardWidgetContainer } from 'sql/workbench/contrib/dashboard/browser/containers/dashboardWidgetContainer.component';
|
||||||
import { WidgetConfig } from 'sql/workbench/contrib/dashboard/browser/core/dashboardWidget';
|
import { WidgetConfig } from 'sql/workbench/contrib/dashboard/browser/core/dashboardWidget';
|
||||||
@@ -44,7 +44,7 @@ export class DashboardHomeContainer extends DashboardWidgetContainer {
|
|||||||
@Input() private properties: WidgetConfig;
|
@Input() private properties: WidgetConfig;
|
||||||
@ViewChild('propertiesClass') private _propertiesClass: DashboardWidgetWrapper;
|
@ViewChild('propertiesClass') private _propertiesClass: DashboardWidgetWrapper;
|
||||||
@ViewChild('propertiesContainer') private _propertiesContainer: ElementRef;
|
@ViewChild('propertiesContainer') private _propertiesContainer: ElementRef;
|
||||||
@ContentChild(ScrollableDirective) private _scrollable: ScrollableDirective;
|
@ViewChild(ScrollableDirective) private _scrollable: ScrollableDirective;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@Inject(forwardRef(() => ChangeDetectorRef)) _cd: ChangeDetectorRef,
|
@Inject(forwardRef(() => ChangeDetectorRef)) _cd: ChangeDetectorRef,
|
||||||
|
|||||||
@@ -8,11 +8,12 @@
|
|||||||
[actions]="panelActions">
|
[actions]="panelActions">
|
||||||
<div #toolbar [style.display]="showToolbar ? 'block': 'none'" class="editor-toolbar">
|
<div #toolbar [style.display]="showToolbar ? 'block': 'none'" class="editor-toolbar">
|
||||||
</div>
|
</div>
|
||||||
|
<div [style.height]="getContentAreaHeight()">
|
||||||
<tab [visibilityType]="'visibility'" *ngFor="let tab of tabs" [title]="tab.title" class="fullsize"
|
<tab [visibilityType]="'visibility'" *ngFor="let tab of tabs" [title]="tab.title" class="fullsize"
|
||||||
[identifier]="tab.id" [canClose]="tab.canClose" [actions]="tab.actions" [type]="tab.type" [iconClass]="tab.iconClass">
|
[identifier]="tab.id" [canClose]="tab.canClose" [actions]="tab.actions" [type]="tab.type"
|
||||||
|
[iconClass]="tab.iconClass">
|
||||||
<ng-template>
|
<ng-template>
|
||||||
<dashboard-home-container *ngIf="tab.id === 'homeTab'; else not_home" [properties]="propertiesWidget"
|
<dashboard-home-container *ngIf="tab.id === 'homeTab'; else not_home" [properties]="propertiesWidget" [tab]="tab">
|
||||||
[tab]="tab">
|
|
||||||
</dashboard-home-container>
|
</dashboard-home-container>
|
||||||
<ng-template #not_home>
|
<ng-template #not_home>
|
||||||
<dashboard-webview-container *ngIf="getContentType(tab) === 'webview-container'" [tab]="tab">
|
<dashboard-webview-container *ngIf="getContentType(tab) === 'webview-container'" [tab]="tab">
|
||||||
@@ -32,4 +33,5 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</tab>
|
</tab>
|
||||||
|
</div>
|
||||||
</panel>
|
</panel>
|
||||||
|
|||||||
@@ -553,4 +553,8 @@ export abstract class DashboardPage extends AngularDisposable implements IConfig
|
|||||||
const border = theme.getColor(DASHBOARD_BORDER);
|
const border = theme.getColor(DASHBOARD_BORDER);
|
||||||
this.toolbarContainer.nativeElement.style.borderBottomColor = border.toString();
|
this.toolbarContainer.nativeElement.style.borderBottomColor = border.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getContentAreaHeight() {
|
||||||
|
return this.showToolbar ? `calc(100% - ${(<HTMLElement>this.toolbarContainer.nativeElement).clientHeight}px)` : '100%';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user