Commit e38212808153eca4eb6169daf01ed690a2aade2c

Authored by Vladyslav_Prykhodko
1 parent 934020d1

UI: LwmM2M device provife change style ID parameters

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