Merge branch 'rc' into features/add_tooltip_option_to_show_stack_mode_total_value_on_timeseries_chart_widgets

This commit is contained in:
Paolo Cristiani 2025-07-01 21:02:30 +02:00 committed by GitHub
commit 50e3d9d62f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 20 additions and 4 deletions

View File

@ -340,6 +340,7 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit,
public onDataUpdated() { public onDataUpdated() {
this.alarmsDatasource.updateAlarms(); this.alarmsDatasource.updateAlarms();
this.clearCache(); this.clearCache();
this.ctx.detectChanges();
} }
public onEditModeChanged() { public onEditModeChanged() {

View File

@ -19,7 +19,7 @@
<div class="tb-bar-chart-overlay" [style]="overlayStyle"></div> <div class="tb-bar-chart-overlay" [style]="overlayStyle"></div>
@if (widgetComponent.dashboardWidget.showWidgetTitlePanel) { @if (widgetComponent.dashboardWidget.showWidgetTitlePanel) {
<div class="tb-widget-title-row flex justify-between"> <div class="tb-widget-title-row flex justify-between">
<ng-container *ngTemplateOutlet="widgetComponent.widgetTitlePanel"></ng-container> <ng-container *ngTemplateOutlet="widgetTitlePanel || widgetComponent.widgetTitlePanel"></ng-container>
<ng-container *ngTemplateOutlet="widgetComponent.widgetHeaderActionsPanel"></ng-container> <ng-container *ngTemplateOutlet="widgetComponent.widgetHeaderActionsPanel"></ng-container>
</div> </div>
} @else { } @else {

View File

@ -58,6 +58,9 @@ export class BarChartWithLabelsWidgetComponent implements OnInit, OnDestroy, Aft
@Input() @Input()
ctx: WidgetContext; ctx: WidgetContext;
@Input()
widgetTitlePanel: TemplateRef<any>;
showLegend: boolean; showLegend: boolean;
legendClass: string; legendClass: string;

View File

@ -19,7 +19,7 @@
<div class="tb-range-chart-overlay" [style]="overlayStyle"></div> <div class="tb-range-chart-overlay" [style]="overlayStyle"></div>
@if (widgetComponent.dashboardWidget.showWidgetTitlePanel) { @if (widgetComponent.dashboardWidget.showWidgetTitlePanel) {
<div class="tb-widget-title-row flex justify-between"> <div class="tb-widget-title-row flex justify-between">
<ng-container *ngTemplateOutlet="widgetComponent.widgetTitlePanel"></ng-container> <ng-container *ngTemplateOutlet="widgetTitlePanel || widgetComponent.widgetTitlePanel"></ng-container>
<ng-container *ngTemplateOutlet="widgetComponent.widgetHeaderActionsPanel"></ng-container> <ng-container *ngTemplateOutlet="widgetComponent.widgetHeaderActionsPanel"></ng-container>
</div> </div>
} @else { } @else {

View File

@ -23,6 +23,7 @@ import {
OnDestroy, OnDestroy,
OnInit, OnInit,
Renderer2, Renderer2,
TemplateRef,
ViewChild, ViewChild,
ViewEncapsulation ViewEncapsulation
} from '@angular/core'; } from '@angular/core';
@ -68,6 +69,9 @@ export class RangeChartWidgetComponent implements OnInit, OnDestroy, AfterViewIn
@Input() @Input()
ctx: WidgetContext; ctx: WidgetContext;
@Input()
widgetTitlePanel: TemplateRef<any>;
showLegend: boolean; showLegend: boolean;
legendClass: string; legendClass: string;

View File

@ -19,7 +19,7 @@
<div class="tb-time-series-chart-overlay" [style]="overlayStyle"></div> <div class="tb-time-series-chart-overlay" [style]="overlayStyle"></div>
@if (widgetComponent.dashboardWidget.showWidgetTitlePanel) { @if (widgetComponent.dashboardWidget.showWidgetTitlePanel) {
<div class="tb-widget-title-row flex justify-between"> <div class="tb-widget-title-row flex justify-between">
<ng-container *ngTemplateOutlet="widgetComponent.widgetTitlePanel"></ng-container> <ng-container *ngTemplateOutlet="widgetTitlePanel || widgetComponent.widgetTitlePanel"></ng-container>
<ng-container *ngTemplateOutlet="widgetComponent.widgetHeaderActionsPanel"></ng-container> <ng-container *ngTemplateOutlet="widgetComponent.widgetHeaderActionsPanel"></ng-container>
</div> </div>
} @else { } @else {

View File

@ -61,6 +61,9 @@ export class TimeSeriesChartWidgetComponent implements OnInit, OnDestroy, AfterV
@Input() @Input()
ctx: WidgetContext; ctx: WidgetContext;
@Input()
widgetTitlePanel: TemplateRef<any>;
horizontalLegendPosition = false; horizontalLegendPosition = false;
showLegend: boolean; showLegend: boolean;

View File

@ -275,6 +275,7 @@ export class EntitiesTableWidgetComponent extends PageComponent implements OnIni
public onDataUpdated() { public onDataUpdated() {
this.entityDatasource.dataUpdated(); this.entityDatasource.dataUpdated();
this.clearCache(); this.clearCache();
this.ctx.detectChanges();
} }
public onEditModeChanged() { public onEditModeChanged() {

View File

@ -19,7 +19,7 @@
<div class="tb-map-overlay" [style]="overlayStyle"></div> <div class="tb-map-overlay" [style]="overlayStyle"></div>
@if (widgetComponent.dashboardWidget.showWidgetTitlePanel) { @if (widgetComponent.dashboardWidget.showWidgetTitlePanel) {
<div class="tb-widget-title-row flex justify-between"> <div class="tb-widget-title-row flex justify-between">
<ng-container *ngTemplateOutlet="widgetComponent.widgetTitlePanel"></ng-container> <ng-container *ngTemplateOutlet="widgetTitlePanel || widgetComponent.widgetTitlePanel"></ng-container>
<ng-container *ngTemplateOutlet="widgetComponent.widgetHeaderActionsPanel"></ng-container> <ng-container *ngTemplateOutlet="widgetComponent.widgetHeaderActionsPanel"></ng-container>
</div> </div>
} @else { } @else {

View File

@ -21,6 +21,7 @@ import {
Input, Input,
OnDestroy, OnDestroy,
OnInit, OnInit,
TemplateRef,
ViewChild, ViewChild,
ViewEncapsulation ViewEncapsulation
} from '@angular/core'; } from '@angular/core';
@ -54,6 +55,9 @@ export class MapWidgetComponent implements OnInit, OnDestroy {
@Input() @Input()
ctx: WidgetContext; ctx: WidgetContext;
@Input()
widgetTitlePanel: TemplateRef<any>;
backgroundStyle$: Observable<ComponentStyle>; backgroundStyle$: Observable<ComponentStyle>;
overlayStyle: ComponentStyle = {}; overlayStyle: ComponentStyle = {};
padding: string; padding: string;