Commit 3e8824c5294360b4a9c83ccf0d3a278131207f1a

Authored by Igor Kulikov
1 parent 3b6153ac

UI: Improved dashboard load performance by optimizing widget header template.

@@ -80,9 +80,9 @@ @@ -80,9 +80,9 @@
80 (mousedown)="widgetMouseDown($event, widget)" 80 (mousedown)="widgetMouseDown($event, widget)"
81 (click)="widgetClicked($event, widget)" 81 (click)="widgetClicked($event, widget)"
82 (contextmenu)="openWidgetContextMenu($event, widget)"> 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 [ngClass]="{'single-row': widget.hasTimewindow}" 86 [ngClass]="{'single-row': widget.hasTimewindow}"
87 [ngStyle]="widget.titleStyle" 87 [ngStyle]="widget.titleStyle"
88 [matTooltip]="widget.titleTooltip" 88 [matTooltip]="widget.titleTooltip"
@@ -93,7 +93,6 @@ @@ -93,7 +93,6 @@
93 {{widget.customTranslatedTitle}} 93 {{widget.customTranslatedTitle}}
94 </span> 94 </span>
95 <tb-timewindow *ngIf="widget.hasTimewindow" 95 <tb-timewindow *ngIf="widget.hasTimewindow"
96 - #timewindowComponent  
97 aggregation="{{widget.hasAggregation}}" 96 aggregation="{{widget.hasAggregation}}"
98 timezone="true" 97 timezone="true"
99 [isEdit]="isEdit" 98 [isEdit]="isEdit"
@@ -101,7 +100,7 @@ @@ -101,7 +100,7 @@
101 (ngModelChange)="widgetComponent.onTimewindowChanged($event)"> 100 (ngModelChange)="widgetComponent.onTimewindowChanged($event)">
102 </tb-timewindow> 101 </tb-timewindow>
103 </div> 102 </div>
104 - <div [fxShow]="widget.showWidgetActions" 103 + <div *ngIf="widget.showWidgetActions"
105 class="tb-widget-actions" 104 class="tb-widget-actions"
106 [ngClass]="{'tb-widget-actions-absolute': !(widget.showWidgetTitlePanel&&(widget.showTitle||widget.hasAggregation))}" 105 [ngClass]="{'tb-widget-actions-absolute': !(widget.showWidgetTitlePanel&&(widget.showTitle||widget.hasAggregation))}"
107 fxLayout="row" 106 fxLayout="row"