Browse Source

Lwm2m: front: refactoring <mat-expansion-panel-header>

pull/3980/head
nickAS21 6 years ago
parent
commit
6cfc792156
  1. 35
      ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.html
  2. 34
      ui-ngx/src/app/modules/home/pages/device/lwm2m/security-config.component.html

35
ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.html

@ -60,7 +60,8 @@
<mat-form-field fxFlex> <mat-form-field fxFlex>
<mat-label>{{ 'device-profile.lwm2m.lifetime' | translate }}</mat-label> <mat-label>{{ 'device-profile.lwm2m.lifetime' | translate }}</mat-label>
<input matInput type="number" formControlName="lifetime" required> <input matInput type="number" formControlName="lifetime" required>
<mat-error *ngIf="lwm2mDeviceProfileTransportConfFormGroup.get('lifetime').hasError('required')"> <mat-error
*ngIf="lwm2mDeviceProfileTransportConfFormGroup.get('lifetime').hasError('required')">
{{ 'device-profile.lwm2m.lifetime' | translate }} {{ 'device-profile.lwm2m.lifetime' | translate }}
<strong>{{ 'device-profile.lwm2m.required' | translate }}</strong> <strong>{{ 'device-profile.lwm2m.required' | translate }}</strong>
</mat-error> </mat-error>
@ -102,13 +103,15 @@
class="tb-panel-title">{{ 'device-profile.lwm2m.bootstrap-server' | translate | uppercase }}</div> class="tb-panel-title">{{ 'device-profile.lwm2m.bootstrap-server' | translate | uppercase }}</div>
</mat-panel-title> </mat-panel-title>
</mat-expansion-panel-header> </mat-expansion-panel-header>
<div class="mat-padding"> <ng-template matExpansionPanelContent>
<tb-profile-lwm2m-device-config-server <div class="mat-padding">
[required]="required" <tb-profile-lwm2m-device-config-server
formControlName="bootstrapServer" [required]="required"
[bootstrapServerIs]=true> formControlName="bootstrapServer"
</tb-profile-lwm2m-device-config-server> [bootstrapServerIs]=true>
</div> </tb-profile-lwm2m-device-config-server>
</div>
</ng-template>
</mat-expansion-panel> </mat-expansion-panel>
</mat-accordion> </mat-accordion>
<mat-accordion multi="true" class="mat-body-1"> <mat-accordion multi="true" class="mat-body-1">
@ -118,13 +121,15 @@
<div class="tb-panel-title">{{ 'device-profile.lwm2m.lwm2m-server' | translate | uppercase }}</div> <div class="tb-panel-title">{{ 'device-profile.lwm2m.lwm2m-server' | translate | uppercase }}</div>
</mat-panel-title> </mat-panel-title>
</mat-expansion-panel-header> </mat-expansion-panel-header>
<div class="mat-padding"> <ng-template matExpansionPanelContent>
<tb-profile-lwm2m-device-config-server <div class="mat-padding">
[required]="required" <tb-profile-lwm2m-device-config-server
formControlName="lwm2mServer" [required]="required"
[bootstrapServerIs]=false> formControlName="lwm2mServer"
</tb-profile-lwm2m-device-config-server> [bootstrapServerIs]=false>
</div> </tb-profile-lwm2m-device-config-server>
</div>
</ng-template>
</mat-expansion-panel> </mat-expansion-panel>
</mat-accordion> </mat-accordion>
</div> </div>

34
ui-ngx/src/app/modules/home/pages/device/lwm2m/security-config.component.html

@ -83,13 +83,15 @@
<mat-error *ngIf="lwm2mConfigFormGroup.get('clientKey').hasError('pattern')"> <mat-error *ngIf="lwm2mConfigFormGroup.get('clientKey').hasError('pattern')">
{{ 'device.lwm2m-security-config.client-key' | translate }} {{ 'device.lwm2m-security-config.client-key' | translate }}
<strong>{{ translate.get('device.lwm2m-security-config.pattern_hex_dec', { <strong>{{ translate.get('device.lwm2m-security-config.pattern_hex_dec', {
count: 0 }) | async }}</strong> count: 0
}) | async }}</strong>
</mat-error> </mat-error>
<mat-error *ngIf="(lwm2mConfigFormGroup.get('clientKey').hasError('maxlength') || <mat-error *ngIf="(lwm2mConfigFormGroup.get('clientKey').hasError('maxlength') ||
lwm2mConfigFormGroup.get('clientKey').hasError('minlength'))"> lwm2mConfigFormGroup.get('clientKey').hasError('minlength'))">
{{ 'device.lwm2m-security-config.client-key' | translate }} {{ 'device.lwm2m-security-config.client-key' | translate }}
<strong>{{ translate.get('device.lwm2m-security-config.pattern_hex_dec', { <strong>{{ translate.get('device.lwm2m-security-config.pattern_hex_dec', {
count: lenMaxKeyClient }) | async }}</strong> count: lenMaxKeyClient
}) | async }}</strong>
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
</div> </div>
@ -112,12 +114,14 @@
class="tb-panel-title">{{ 'device.lwm2m-security-config.bootstrap-server' | translate | uppercase }}</div> class="tb-panel-title">{{ 'device.lwm2m-security-config.bootstrap-server' | translate | uppercase }}</div>
</mat-panel-title> </mat-panel-title>
</mat-expansion-panel-header> </mat-expansion-panel-header>
<div class="mat-padding"> <ng-template matExpansionPanelContent>
<tb-security-config-server-lwm2m <div class="mat-padding">
[formControlName]="bootstrapServer" <tb-security-config-server-lwm2m
[serverFormGroup]="bootstrapFormGroup"> [formControlName]="bootstrapServer"
</tb-security-config-server-lwm2m> [serverFormGroup]="bootstrapFormGroup">
</div> </tb-security-config-server-lwm2m>
</div>
</ng-template>
</mat-expansion-panel> </mat-expansion-panel>
</mat-accordion> </mat-accordion>
<mat-accordion multi="true" class="mat-body-1"> <mat-accordion multi="true" class="mat-body-1">
@ -128,12 +132,14 @@
class="tb-panel-title">{{ 'device.lwm2m-security-config.lwm2m-server' | translate | uppercase }}</div> class="tb-panel-title">{{ 'device.lwm2m-security-config.lwm2m-server' | translate | uppercase }}</div>
</mat-panel-title> </mat-panel-title>
</mat-expansion-panel-header> </mat-expansion-panel-header>
<div class="mat-padding"> <ng-template matExpansionPanelContent>
<tb-security-config-server-lwm2m <div class="mat-padding">
[formControlName]="lwm2mServer" <tb-security-config-server-lwm2m
[serverFormGroup]="lwm2mServerFormGroup"> [formControlName]="lwm2mServer"
</tb-security-config-server-lwm2m> [serverFormGroup]="lwm2mServerFormGroup">
</div> </tb-security-config-server-lwm2m>
</div>
</ng-template>
</mat-expansion-panel> </mat-expansion-panel>
</mat-accordion> </mat-accordion>
</div> </div>

Loading…
Cancel
Save