Browse Source

Fixed Delete strategy panel cut off when opened from last telemetry row (#16340)

* Fixed Delete strategy panel cut off when opened from last telemetry row

* Additional fixes

* License headers fix
pull/16361/head
Maksym Tsymbarov 2 months ago
committed by GitHub
parent
commit
d0ad396769
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 8
      ui-ngx/src/app/modules/home/components/attribute/delete-timeseries-panel.component.scss
  2. 10
      ui-ngx/src/app/modules/home/components/attribute/delete-timeseries-panel.component.ts

8
ui-ngx/src/app/modules/home/components/attribute/delete-timeseries-panel.component.scss

@ -1,9 +1,13 @@
// SPDX-FileCopyrightText: Copyright The ThingsBoard Authors
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc.
// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1
@import '../../../../../scss/constants';
:host {
width: 100%;
max-height: 90vh;
display: flex;
flex-direction: column;
.mat-toolbar {
background: none;
@ -14,6 +18,8 @@
flex-direction: column;
gap: 16px;
padding-top: 4px;
overflow: auto;
flex: 1;
}
.tb-select-interval {

10
ui-ngx/src/app/modules/home/components/attribute/delete-timeseries-panel.component.ts

@ -1,6 +1,7 @@
// SPDX-FileCopyrightText: Copyright The ThingsBoard Authors
// SPDX-License-Identifier: Apache-2.0
import { Component, InjectionToken, OnDestroy, OnInit } from '@angular/core';
// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc.
// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1
import { Component, ElementRef, InjectionToken, OnDestroy, OnInit } from '@angular/core';
import { OverlayRef } from '@angular/cdk/overlay';
import {
TimeseriesDeleteStrategy,
@ -37,10 +38,14 @@ export class DeleteTimeseriesPanelComponent implements OnInit, OnDestroy {
private destroy$ = new Subject<void>();
private resizeObserver = new ResizeObserver(() => this.overlayRef.updatePosition());
constructor(private overlayRef: OverlayRef,
private elementRef: ElementRef<HTMLElement>,
private fb: FormBuilder) { }
ngOnInit(): void {
this.resizeObserver.observe(this.elementRef.nativeElement);
const today = new Date();
this.deleteTimeseriesFormGroup = this.fb.group({
strategy: [TimeseriesDeleteStrategy.DELETE_ALL_DATA],
@ -72,6 +77,7 @@ export class DeleteTimeseriesPanelComponent implements OnInit, OnDestroy {
}
ngOnDestroy(): void {
this.resizeObserver.disconnect();
this.destroy$.next();
this.destroy$.complete();
}

Loading…
Cancel
Save