diff --git a/ui-ngx/src/app/shared/components/time/timewindow-panel.component.html b/ui-ngx/src/app/shared/components/time/timewindow-panel.component.html index 6a596807a3..7aa8cf9db8 100644 --- a/ui-ngx/src/app/shared/components/time/timewindow-panel.component.html +++ b/ui-ngx/src/app/shared/components/time/timewindow-panel.component.html @@ -20,13 +20,12 @@ (selectedTabChange)="onTimewindowTypeChange()" [(selectedIndex)]="timewindow.selectedTab">
-
+
+ [ngClass]="{'align-end': realtimeTypeSelectionAvailable, 'align-center': !realtimeTypeSelectionAvailable }">
{{ 'timewindow.time-range' | translate }}
- + @@ -61,24 +60,18 @@
-
-
{{ 'timezone.timezone' | translate }}
- - -
-
+
+ [ngClass]="{'align-end': historyTypeSelectionAvailable, 'align-center': !historyTypeSelectionAvailable }">
{{ 'timewindow.time-range' | translate }}
- + @@ -122,12 +115,6 @@
-
-
{{ 'timezone.timezone' | translate }}
- - -
@@ -196,6 +183,13 @@ + +
+
{{ 'timezone.timezone' | translate }}
+ + +
+
, @@ -138,6 +143,12 @@ export class TimewindowPanelComponent extends PageComponent implements OnInit { value: this.realtimeTypes.INTERVAL }); } + + this.realtimeTypeSelectionAvailable = this.realtimeTimewindowOptions.length > 1; + this.historyTypeSelectionAvailable = this.historyTimewindowOptions.length > 1; + this.realtimeIntervalSelectionAvailable = this.isEdit || !(this.timewindow.hideInterval || + (this.timewindow.hideLastInterval && this.timewindow.hideQuickInterval)); + this.historyIntervalSelectionAvailable = this.isEdit || !this.timewindow.hideInterval; } ngOnInit(): void {