Browse Source

Changed approach

pull/15362/head
Maksym Tsymbarov 2 months ago
parent
commit
3d97078ae2
  1. 8
      ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.ts
  2. 1
      ui-ngx/src/app/modules/home/pages/entity-view/entity-view-tabs.component.html

8
ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.ts

@ -90,6 +90,7 @@ import { Filters } from '@shared/models/query/query.models';
import { hidePageSizePixelValue } from '@shared/models/constants';
import { DeleteTimeseriesPanelComponent } from '@home/components/attribute/delete-timeseries-panel.component';
import { FormBuilder } from '@angular/forms';
import { coerceBoolean } from '@shared/decorators/coercion';
@Component({
selector: 'tb-attribute-table',
@ -121,7 +122,6 @@ export class AttributeTableComponent extends PageComponent implements AfterViewI
activeValue = false;
dirtyValue = false;
entityIdValue: EntityId;
entityType = EntityType;
attributeScopeSelectionReadonly = false;
@ -144,9 +144,9 @@ export class AttributeTableComponent extends PageComponent implements AfterViewI
return this.disableAttributeScopeSelectionValue;
}
get disableAddTelemetry(): boolean {
return this.defaultAttributeScope === this.latestTelemetryTypes.LATEST_TELEMETRY && this.entityType.ENTITY_VIEW === this.entityIdValue.entityType;
}
@Input()
@coerceBoolean()
disableAddTelemetry: boolean;
@Input()
set disableAttributeScopeSelection(value: boolean) {

1
ui-ngx/src/app/modules/home/pages/entity-view/entity-view-tabs.component.html

@ -27,6 +27,7 @@
label="{{ 'attribute.latest-telemetry' | translate }}" #telemetryTab="matTab">
<tb-attribute-table [defaultAttributeScope]="latestTelemetryTypes.LATEST_TELEMETRY"
disableAttributeScopeSelection
disableAddTelemetry
[active]="telemetryTab.isActive"
[entityId]="entity.id"
[entityName]="entity.name">

Loading…
Cancel
Save