Commit b3e90244c2772f01c251b44551599d55e20bff82

Authored by Igor Kulikov
1 parent 15d7970b

Fixed time pagelink for table

... ... @@ -51,7 +51,7 @@ import { EntityTypeTranslation } from '@shared/models/entity-type.models';
51 51 import { DialogService } from '@core/services/dialog.service';
52 52 import { AddEntityDialogComponent } from './add-entity-dialog.component';
53 53 import { AddEntityDialogData, EntityAction } from '@home/models/entity/entity-component.models';
54   -import { historyInterval, Timewindow } from '@shared/models/time/time.models';
  54 +import { historyInterval, HistoryWindowType, Timewindow } from '@shared/models/time/time.models';
55 55 import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
56 56 import { TbAnchorComponent } from '@shared/components/tb-anchor.component';
57 57 import { isDefined, isUndefined } from '@core/utils';
... ... @@ -218,7 +218,7 @@ export class EntitiesTableComponent extends PageComponent implements AfterViewIn
218 218 this.pageLink.sortOrder.direction = Direction[this.sort.direction.toUpperCase()];
219 219 if (this.entitiesTableConfig.useTimePageLink) {
220 220 const timePageLink = this.pageLink as TimePageLink;
221   - if (this.timewindow.history.timewindowMs) {
  221 + if (this.timewindow.history.historyType === HistoryWindowType.LAST_INTERVAL) {
222 222 const currentTime = Date.now();
223 223 timePageLink.startTime = currentTime - this.timewindow.history.timewindowMs;
224 224 timePageLink.endTime = currentTime;
... ...