Browse Source

Merge pull request #15362 from mtsymbarov-del/fix/disable-add-telemetry-for-entity-views

Hidden "Add Telemetry" button for Entity view
pull/15384/head
Vladyslav Prykhodko 2 months ago
committed by GitHub
parent
commit
e4e3df7ae9
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.html
  2. 5
      ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.ts
  3. 1
      ui-ngx/src/app/modules/home/pages/entity-view/entity-view-tabs.component.html

2
ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.html

@ -34,7 +34,7 @@
</div>
<span class="flex-1"></span>
<button mat-icon-button
*ngIf="attributeScope !== attributeScopeTypes.CLIENT_SCOPE"
*ngIf="attributeScope !== attributeScopeTypes.CLIENT_SCOPE && !disableAddTelemetry"
[disabled]="isLoading$ | async"
(click)="addAttribute($event)"
matTooltip="{{ 'action.add' | translate }}"

5
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',
@ -143,6 +144,10 @@ export class AttributeTableComponent extends PageComponent implements AfterViewI
return this.disableAttributeScopeSelectionValue;
}
@Input()
@coerceBoolean()
disableAddTelemetry: boolean;
@Input()
set disableAttributeScopeSelection(value: boolean) {
this.disableAttributeScopeSelectionValue = coerceBooleanProperty(value);

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