Browse Source

fixes

pull/8337/head
Maksym Dudnik 3 years ago
parent
commit
73fac5be70
  1. 2
      ui-ngx/src/app/shared/components/device/gateway-connectors.component.html
  2. 5
      ui-ngx/src/app/shared/components/device/gateway-connectors.component.ts

2
ui-ngx/src/app/shared/components/device/gateway-connectors.component.html

@ -50,7 +50,7 @@
<ng-container matColumnDef="type"> <ng-container matColumnDef="type">
<mat-header-cell *matHeaderCellDef mat-sort-header style="width: 30%"> Type</mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header style="width: 30%"> Type</mat-header-cell>
<mat-cell *matCellDef="let attribute" style="text-transform: uppercase"> <mat-cell *matCellDef="let attribute" style="text-transform: uppercase">
{{ gatewayConnectorDefaultTypes.get(attribute.value.type) }} {{ returnType(attribute) }}
</mat-cell> </mat-cell>
</ng-container> </ng-container>
<ng-container matColumnDef="actions" stickyEnd> <ng-container matColumnDef="actions" stickyEnd>

5
ui-ngx/src/app/shared/components/device/gateway-connectors.component.ts

@ -303,6 +303,11 @@ export class GatewayConnectorComponent extends PageComponent implements AfterVie
})); }));
} }
returnType (attribute) {
const value = typeof attribute.value === 'string' ? JSON.parse(attribute.value): attribute.value;
return this.gatewayConnectorDefaultTypes.get(value.type)
}
deleteConnector(attribute: AttributeData, $event: Event): void { deleteConnector(attribute: AttributeData, $event: Event): void {
if ($event) { if ($event) {
$event.stopPropagation(); $event.stopPropagation();

Loading…
Cancel
Save