Commit e38212808153eca4eb6169daf01ed690a2aade2c
1 parent
934020d1
UI: LwmM2M device provife change style ID parameters
Showing
11 changed files
with
22 additions
and
13 deletions
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | [selectable]="!disabled" | 22 | [selectable]="!disabled" |
23 | [removable]="!disabled" | 23 | [removable]="!disabled" |
24 | (removed)="remove(objectLwm2m)"> | 24 | (removed)="remove(objectLwm2m)"> |
25 | - {{objectLwm2m.name}} <{{objectLwm2m.keyId}}> | 25 | + {{objectLwm2m.name}} #{{objectLwm2m.keyId}} |
26 | <mat-icon matChipRemove *ngIf="!disabled">close</mat-icon> | 26 | <mat-icon matChipRemove *ngIf="!disabled">close</mat-icon> |
27 | </mat-chip> | 27 | </mat-chip> |
28 | <input matInput type="text" placeholder="{{ !disabled ? ('device-profile.lwm2m.object-list' | translate) : '' }}" | 28 | <input matInput type="text" placeholder="{{ !disabled ? ('device-profile.lwm2m.object-list' | translate) : '' }}" |
@@ -24,9 +24,9 @@ | @@ -24,9 +24,9 @@ | ||
24 | [expanded]="isExpend" | 24 | [expanded]="isExpend" |
25 | [disabled]="isExpend"> | 25 | [disabled]="isExpend"> |
26 | <mat-expansion-panel-header> | 26 | <mat-expansion-panel-header> |
27 | - <mat-panel-title class="tb-panel-title-height" fxLayout="row"> | 27 | + <mat-panel-title class="tb-panel" fxLayout="row"> |
28 | <div fxFlex="30" fxLayoutAlign="start center"> | 28 | <div fxFlex="30" fxLayoutAlign="start center"> |
29 | - {{ 'device-profile.lwm2m.instance' | translate }} <<b>{{instances.get('id').value}}</b>> | 29 | + <span class="tb-panel-title">{{ 'device-profile.lwm2m.instance' | translate }}</span> #{{instances.get('id').value}} |
30 | </div> | 30 | </div> |
31 | <div fxLayoutAlign="center center" fxFlex="10"> | 31 | <div fxLayoutAlign="center center" fxFlex="10"> |
32 | <mat-checkbox color="warn" | 32 | <mat-checkbox color="warn" |
@@ -14,8 +14,12 @@ | @@ -14,8 +14,12 @@ | ||
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | :host{ | 16 | :host{ |
17 | - .tb-panel-title-height { | 17 | + .tb-panel { |
18 | min-height: 42px; | 18 | min-height: 42px; |
19 | + | ||
20 | + .tb-panel-title { | ||
21 | + font-weight: 500; | ||
22 | + } | ||
19 | } | 23 | } |
20 | 24 | ||
21 | .instance-row { | 25 | .instance-row { |
@@ -211,7 +211,7 @@ export class Lwm2mObserveAttrTelemetryInstancesComponent implements ControlValue | @@ -211,7 +211,7 @@ export class Lwm2mObserveAttrTelemetryInstancesComponent implements ControlValue | ||
211 | } | 211 | } |
212 | 212 | ||
213 | getNameInstance(instance: Instance): string { | 213 | getNameInstance(instance: Instance): string { |
214 | - return `${this.translate.instant('device-profile.lwm2m.instance')} <${instance.id}>`; | 214 | + return `${this.translate.instant('device-profile.lwm2m.instance')} #${instance.id}`; |
215 | } | 215 | } |
216 | 216 | ||
217 | disableObserveInstance = (instance: AbstractControl): boolean => { | 217 | disableObserveInstance = (instance: AbstractControl): boolean => { |
@@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
38 | *ngFor="let resourceLwM2M of resourcesFormArray.controls; let $index = index; trackBy: trackByParams"> | 38 | *ngFor="let resourceLwM2M of resourcesFormArray.controls; let $index = index; trackBy: trackByParams"> |
39 | <div [formGroupName]="$index" fxLayout="row" fxLayoutAlign="start center" class="resource-list"> | 39 | <div [formGroupName]="$index" fxLayout="row" fxLayoutAlign="start center" class="resource-list"> |
40 | <div class="resource-name" fxFlex="30"> | 40 | <div class="resource-name" fxFlex="30"> |
41 | - <<b>{{resourceLwM2M.get('id').value}}</b>> <b>{{resourceLwM2M.get('name').value}}</b> | 41 | + #{{resourceLwM2M.get('id').value}} <span class="name">{{resourceLwM2M.get('name').value}}</span> |
42 | </div> | 42 | </div> |
43 | <div fxFlex="10" fxLayoutAlign="center center"> | 43 | <div fxFlex="10" fxLayoutAlign="center center"> |
44 | <mat-checkbox formControlName="attribute" color="warn"> | 44 | <mat-checkbox formControlName="attribute" color="warn"> |
@@ -18,6 +18,10 @@ | @@ -18,6 +18,10 @@ | ||
18 | white-space: nowrap; | 18 | white-space: nowrap; |
19 | overflow: hidden; | 19 | overflow: hidden; |
20 | text-overflow: ellipsis; | 20 | text-overflow: ellipsis; |
21 | + | ||
22 | + .name { | ||
23 | + font-weight: 500; | ||
24 | + } | ||
21 | } | 25 | } |
22 | 26 | ||
23 | .checkbox-column-title { | 27 | .checkbox-column-title { |
@@ -105,6 +105,8 @@ export class Lwm2mObserveAttrTelemetryResourcesComponent implements ControlValue | @@ -105,6 +105,8 @@ export class Lwm2mObserveAttrTelemetryResourcesComponent implements ControlValue | ||
105 | this.resourcesFormGroup.disable({emitEvent: false}); | 105 | this.resourcesFormGroup.disable({emitEvent: false}); |
106 | } else { | 106 | } else { |
107 | this.resourcesFormArray.controls.forEach(resource => { | 107 | this.resourcesFormArray.controls.forEach(resource => { |
108 | + resource.get('id').enable({emitEvent: false}); | ||
109 | + resource.get('name').enable({emitEvent: false}); | ||
108 | resource.get('keyName').enable({emitEvent: false}); | 110 | resource.get('keyName').enable({emitEvent: false}); |
109 | resource.get('attribute').enable({emitEvent: false}); | 111 | resource.get('attribute').enable({emitEvent: false}); |
110 | resource.get('telemetry').enable({onlySelf: true}); | 112 | resource.get('telemetry').enable({onlySelf: true}); |
@@ -124,7 +126,7 @@ export class Lwm2mObserveAttrTelemetryResourcesComponent implements ControlValue | @@ -124,7 +126,7 @@ export class Lwm2mObserveAttrTelemetryResourcesComponent implements ControlValue | ||
124 | } | 126 | } |
125 | 127 | ||
126 | getNameResourceLwm2m(resourceLwM2M: ResourceLwM2M): string { | 128 | getNameResourceLwm2m(resourceLwM2M: ResourceLwM2M): string { |
127 | - return `<${resourceLwM2M.id}> ${resourceLwM2M.name}`; | 129 | + return `#${resourceLwM2M.id} ${resourceLwM2M.name}`; |
128 | } | 130 | } |
129 | 131 | ||
130 | private updatedResources(resources: ResourceLwM2M[]): void { | 132 | private updatedResources(resources: ResourceLwM2M[]): void { |
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | [formGroupName]="$index"> | 22 | [formGroupName]="$index"> |
23 | <mat-expansion-panel-header > | 23 | <mat-expansion-panel-header > |
24 | <mat-panel-title fxLayoutAlign="start center" > | 24 | <mat-panel-title fxLayoutAlign="start center" > |
25 | - <b><i>{{ objectLwM2M.get('name').value}}</i></b> <{{ objectLwM2M.get('id').value}}> | 25 | + <span class="tb-panel-title">{{ objectLwM2M.get('name').value}}</span> #{{ objectLwM2M.get('keyId').value}} |
26 | <span fxFlex></span> | 26 | <span fxFlex></span> |
27 | <tb-profile-lwm2m-attributes | 27 | <tb-profile-lwm2m-attributes |
28 | formControlName="attributes" | 28 | formControlName="attributes" |
@@ -264,6 +264,6 @@ export class Lwm2mObserveAttrTelemetryComponent implements ControlValueAccessor, | @@ -264,6 +264,6 @@ export class Lwm2mObserveAttrTelemetryComponent implements ControlValueAccessor, | ||
264 | } | 264 | } |
265 | 265 | ||
266 | getNameObject = (objectLwM2M: ObjectLwM2M): string => { | 266 | getNameObject = (objectLwM2M: ObjectLwM2M): string => { |
267 | - return `${objectLwM2M.name} <${objectLwM2M.id}>`; | 267 | + return `${objectLwM2M.name} #${objectLwM2M.keyId}`; |
268 | } | 268 | } |
269 | } | 269 | } |
@@ -1233,7 +1233,7 @@ | @@ -1233,7 +1233,7 @@ | ||
1233 | "instances-input": "Input Instance Id value", | 1233 | "instances-input": "Input Instance Id value", |
1234 | "instances-input-holder": "Input Instance number...", | 1234 | "instances-input-holder": "Input Instance number...", |
1235 | "instance": "Instance", | 1235 | "instance": "Instance", |
1236 | - "resource-label": "<id> Resource name", | 1236 | + "resource-label": "#ID Resource name", |
1237 | "observe-label": "Observe", | 1237 | "observe-label": "Observe", |
1238 | "attribute-label": "Attribute", | 1238 | "attribute-label": "Attribute", |
1239 | "telemetry-label": "Telemetry", | 1239 | "telemetry-label": "Telemetry", |