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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
7 additions and
1 deletions
-
ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.html
-
ui-ngx/src/app/modules/home/components/attribute/attribute-table.component.ts
-
ui-ngx/src/app/modules/home/pages/entity-view/entity-view-tabs.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 }}" |
|
|
|
|
|
|
|
@ -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); |
|
|
|
|
|
|
|
@ -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"> |
|
|
|
|