Commit 4c4ec36b5c03b7b5f47a8db0fa085c2a93d265b9

Authored by Igor Kulikov
Committed by GitHub
2 parents 8e279bbb f566bff8

Merge pull request #3882 from vvlladd28/improvement/device-profile/load

UI: Fixed load device-profile details
... ... @@ -15,9 +15,9 @@
15 15 limitations under the License.
16 16
17 17 -->
18   -<mat-tab *ngIf="entity"
19   - label="{{ 'device-profile.transport-configuration' | translate }}" #transportType="matTab">
20   - <div class="mat-padding" [formGroup]="detailsForm">
  18 +<mat-tab *ngIf="entity" #transportType="matTab"
  19 + label="{{ 'device-profile.transport-configuration' | translate }}">
  20 + <div class="mat-padding" [formGroup]="detailsForm" *ngIf="transportType.isActive">
21 21 <mat-form-field class="mat-block">
22 22 <mat-label translate>device-profile.transport-type</mat-label>
23 23 <mat-select formControlName="transportType" required>
... ... @@ -40,19 +40,19 @@
40 40 </div>
41 41 </div>
42 42 </mat-tab>
43   -<mat-tab *ngIf="entity"
  43 +<mat-tab *ngIf="entity" #alarmRules="matTab"
44 44 label="{{'device-profile.alarm-rules-with-count' | translate:
45 45 {count: entity.profileData?.alarms?.length ? entity.profileData.alarms.length : 0}
46   - }}" #alarmRules="matTab">
47   - <div class="mat-padding" [formGroup]="detailsForm">
  46 + }}">
  47 + <div class="mat-padding" [formGroup]="detailsForm" *ngIf="alarmRules.isActive">
48 48 <div formGroupName="profileData">
49 49 <tb-device-profile-alarms formControlName="alarms" [deviceProfileId]="entity.id"></tb-device-profile-alarms>
50 50 </div>
51 51 </div>
52 52 </mat-tab>
53   -<mat-tab *ngIf="entity"
54   - label="{{ 'device-profile.device-provisioning' | translate }}" #deviceProvisioning="matTab">
55   - <div class="mat-padding" [formGroup]="detailsForm">
  53 +<mat-tab *ngIf="entity" #deviceProvisioning="matTab"
  54 + label="{{ 'device-profile.device-provisioning' | translate }}">
  55 + <div class="mat-padding" [formGroup]="detailsForm" *ngIf="deviceProvisioning.isActive">
56 56 <div formGroupName="profileData">
57 57 <tb-device-profile-provision-configuration formControlName="provisionConfiguration">
58 58 </tb-device-profile-provision-configuration>
... ... @@ -70,7 +70,7 @@
70 70 </div>
71 71 </div>
72 72 </mat-tab>
73   -<mat-tab *ngIf="entity && !isEdit"
74   - label="{{ 'audit-log.audit-logs' | translate }}" #auditLogsTab="matTab">
  73 +<mat-tab *ngIf="entity && !isEdit" #auditLogsTab="matTab"
  74 + label="{{ 'audit-log.audit-logs' | translate }}">
75 75 <tb-audit-log-table detailsMode="true" [active]="auditLogsTab.isActive" [auditLogMode]="auditLogModes.ENTITY" [entityId]="entity.id"></tb-audit-log-table>
76 76 </mat-tab>
... ...