Browse Source

Hided alarms count on no alarms

pull/12950/head
mpetrov 1 year ago
parent
commit
52ea3712bc
  1. 6
      ui-ngx/src/app/modules/home/pages/device-profile/device-profile-tabs.component.html

6
ui-ngx/src/app/modules/home/pages/device-profile/device-profile-tabs.component.html

@ -45,9 +45,9 @@
<tb-calculated-fields-table [active]="calculatedFieldsTab.isActive" [entityId]="entity.id" [entityName]="entity.name"/>
</mat-tab>
<mat-tab *ngIf="entity" #alarmRules="matTab"
label="{{'device-profile.alarm-rules-with-count' | translate:
{count: this.detailsForm.get('profileData.alarms').value?.length ? this.detailsForm.get('profileData.alarms').value.length : 0}
}}">
label="{{ this.detailsForm.get('profileData.alarms').value?.length
? ('device-profile.alarm-rules-with-count' | translate: { count: this.detailsForm.get('profileData.alarms').value.length })
: 'device-profile.alarm-rules' | translate }}">
<div class="mat-padding" [formGroup]="detailsForm" *ngIf="alarmRules.isActive">
<div formGroupName="profileData">
<tb-device-profile-alarms formControlName="alarms" [deviceProfileId]="entity.id"></tb-device-profile-alarms>

Loading…
Cancel
Save