Commit 3e8824c5294360b4a9c83ccf0d3a278131207f1a
1 parent
3b6153ac
UI: Improved dashboard load performance by optimizing widget header template.
Showing
1 changed file
with
4 additions
and
5 deletions
... | ... | @@ -80,9 +80,9 @@ |
80 | 80 | (mousedown)="widgetMouseDown($event, widget)" |
81 | 81 | (click)="widgetClicked($event, widget)" |
82 | 82 | (contextmenu)="openWidgetContextMenu($event, widget)"> |
83 | - <div fxLayout="row" fxLayoutAlign="space-between start"> | |
84 | - <div class="tb-widget-title" fxLayout="column" fxLayoutAlign="center start" [fxShow]="widget.showWidgetTitlePanel"> | |
85 | - <span [fxShow]="widget.showTitle" | |
83 | + <div *ngIf="widgetComponent.widgetContext?.inited" fxLayout="row" fxLayoutAlign="space-between start"> | |
84 | + <div class="tb-widget-title" fxLayout="column" fxLayoutAlign="center start" *ngIf="widget.showWidgetTitlePanel"> | |
85 | + <span *ngIf="widget.showTitle" | |
86 | 86 | [ngClass]="{'single-row': widget.hasTimewindow}" |
87 | 87 | [ngStyle]="widget.titleStyle" |
88 | 88 | [matTooltip]="widget.titleTooltip" |
... | ... | @@ -93,7 +93,6 @@ |
93 | 93 | {{widget.customTranslatedTitle}} |
94 | 94 | </span> |
95 | 95 | <tb-timewindow *ngIf="widget.hasTimewindow" |
96 | - #timewindowComponent | |
97 | 96 | aggregation="{{widget.hasAggregation}}" |
98 | 97 | timezone="true" |
99 | 98 | [isEdit]="isEdit" |
... | ... | @@ -101,7 +100,7 @@ |
101 | 100 | (ngModelChange)="widgetComponent.onTimewindowChanged($event)"> |
102 | 101 | </tb-timewindow> |
103 | 102 | </div> |
104 | - <div [fxShow]="widget.showWidgetActions" | |
103 | + <div *ngIf="widget.showWidgetActions" | |
105 | 104 | class="tb-widget-actions" |
106 | 105 | [ngClass]="{'tb-widget-actions-absolute': !(widget.showWidgetTitlePanel&&(widget.showTitle||widget.hasAggregation))}" |
107 | 106 | fxLayout="row" | ... | ... |