|
20 | 20 | <!-- Name Column --> |
21 | 21 | <ng-container matColumnDef="name"> |
22 | 22 | <th mat-sort-header="name" *matHeaderCellDef mat-header-cell> |
23 | | - {{ "APPLICATION-TABLE.NAME" | translate }} |
| 23 | + <div [ngClass]="this.sort.active === 'name' ? 'column-title-color' : 'column-title-color-inactive'"> |
| 24 | + {{ "APPLICATION-TABLE.NAME" | translate }} |
| 25 | + </div> |
| 26 | + <app-table-sort-icon [sortDirection]="getSortDirection('name')" /> |
24 | 27 | </th> |
25 | 28 | <td mat-cell *matCellDef="let iotDevice"> |
26 | 29 | <a [routerLink]="['../iot-device', iotDevice.id]" routerLinkActive="active" class="device-link">{{ |
|
31 | 34 |
|
32 | 35 | <!-- Technology Column --> |
33 | 36 | <ng-container matColumnDef="type"> |
34 | | - <th mat-header-cell *matHeaderCellDef mat-sort-header>{{ "IOT-TABLE.NETWORK-TECHNOLOGY" | translate }}</th> |
| 37 | + <th mat-header-cell *matHeaderCellDef mat-sort-header> |
| 38 | + <div [ngClass]="this.sort.active === 'type' ? 'column-title-color' : 'column-title-color-inactive'"> |
| 39 | + {{ "IOT-TABLE.NETWORK-TECHNOLOGY" | translate }} |
| 40 | + </div> |
| 41 | + <app-table-sort-icon [sortDirection]="getSortDirection('type')" /> |
| 42 | + </th> |
35 | 43 | <td mat-cell *matCellDef="let iotDevice">{{ "IOT-DEVICE-TYPES." + iotDevice.type | translate }}</td> |
36 | 44 | </ng-container> |
37 | 45 |
|
38 | 46 | <ng-container matColumnDef="commentOnLocation"> |
39 | | - <th mat-header-cell *matHeaderCellDef mat-sort-header>{{ "GATEWAY.PLACEMENT-LABEL" | translate }}</th> |
| 47 | + <th mat-header-cell *matHeaderCellDef mat-sort-header> |
| 48 | + <div |
| 49 | + [ngClass]="this.sort.active === 'commentOnLocation' ? 'column-title-color' : 'column-title-color-inactive'" |
| 50 | + > |
| 51 | + {{ "GATEWAY.PLACEMENT-LABEL" | translate }} |
| 52 | + </div> |
| 53 | + <app-table-sort-icon [sortDirection]="getSortDirection('commentOnLocation')" /> |
| 54 | + </th> |
40 | 55 | <td mat-cell *matCellDef="let iotDevice"> |
41 | 56 | {{ iotDevice.commentOnLocation ? truncateText(iotDevice.commentOnLocation) : "-" }} |
42 | 57 | </td> |
43 | 58 | </ng-container> |
44 | 59 |
|
45 | 60 | <ng-container matColumnDef="deviceModel"> |
46 | | - <th mat-header-cell *matHeaderCellDef mat-sort-header>{{ "IOTDEVICE.DEVICEMODEL" | translate }}</th> |
| 61 | + <th mat-header-cell *matHeaderCellDef mat-sort-header> |
| 62 | + <div [ngClass]="this.sort.active === 'deviceModel' ? 'column-title-color' : 'column-title-color-inactive'"> |
| 63 | + {{ "IOTDEVICE.DEVICEMODEL" | translate }} |
| 64 | + </div> |
| 65 | + <app-table-sort-icon [sortDirection]="getSortDirection('deviceModel')" /> |
| 66 | + </th> |
47 | 67 | <td mat-cell *matCellDef="let iotDevice">{{ iotDevice.deviceModel?.body?.name ?? "-" }}</td> |
48 | 68 | </ng-container> |
49 | 69 |
|
50 | 70 | <ng-container matColumnDef="deviceProfileName"> |
51 | | - <th mat-header-cell *matHeaderCellDef mat-sort-header>{{ "IOTDEVICE.LORA.DEVICEPROFILE" | translate }}</th> |
| 71 | + <th mat-header-cell *matHeaderCellDef mat-sort-header> |
| 72 | + <div |
| 73 | + [ngClass]="this.sort.active === 'deviceProfileName' ? 'column-title-color' : 'column-title-color-inactive'" |
| 74 | + > |
| 75 | + {{ "IOTDEVICE.LORA.DEVICEPROFILE" | translate }} |
| 76 | + </div> |
| 77 | + <app-table-sort-icon [sortDirection]="getSortDirection('deviceProfileName')" /> |
| 78 | + </th> |
52 | 79 | <td mat-cell *matCellDef="let iotDevice">{{ iotDevice.deviceProfileName ?? "-" }}</td> |
53 | 80 | </ng-container> |
54 | 81 |
|
55 | 82 | <ng-container matColumnDef="deviceEUI"> |
56 | | - <th mat-header-cell *matHeaderCellDef mat-sort-header>{{ "IOT-TABLE.DEV-EUI" | translate }}</th> |
| 83 | + <th mat-header-cell *matHeaderCellDef mat-sort-header> |
| 84 | + <div [ngClass]="this.sort.active === 'deviceEUI' ? 'column-title-color' : 'column-title-color-inactive'"> |
| 85 | + {{ "IOT-TABLE.DEV-EUI" | translate }} |
| 86 | + </div> |
| 87 | + <app-table-sort-icon [sortDirection]="getSortDirection('deviceEUI')" /> |
| 88 | + </th> |
57 | 89 | <td mat-cell *matCellDef="let iotDevice">{{ iotDevice.deviceEUI ?? "-" }}</td> |
58 | 90 | </ng-container> |
59 | 91 |
|
60 | 92 | <ng-container matColumnDef="OTAAapplicationKey"> |
61 | | - <th mat-header-cell *matHeaderCellDef mat-sort-header>{{ "IOT-TABLE.APP-KEY" | translate }}</th> |
| 93 | + <th mat-header-cell *matHeaderCellDef mat-sort-header> |
| 94 | + <div |
| 95 | + [ngClass]="this.sort.active === 'OTAAapplicationKey' ? 'column-title-color' : 'column-title-color-inactive'" |
| 96 | + > |
| 97 | + {{ "IOT-TABLE.APP-KEY" | translate }} |
| 98 | + </div> |
| 99 | + <app-table-sort-icon [sortDirection]="getSortDirection('OTAAapplicationKey')" /> |
| 100 | + </th> |
62 | 101 | <td mat-cell *matCellDef="let iotDevice">{{ iotDevice.OTAAapplicationKey ?? "-" }}</td> |
63 | 102 | </ng-container> |
64 | 103 |
|
65 | 104 | <!-- RSSI column --> |
66 | 105 | <ng-container matColumnDef="rssi"> |
67 | 106 | <th *matHeaderCellDef mat-header-cell mat-sort-header="rssi"> |
68 | | - {{ "IOT-TABLE.RSSI" | translate }} |
| 107 | + <div [ngClass]="this.sort.active === 'rssi' ? 'column-title-color' : 'column-title-color-inactive'"> |
| 108 | + {{ "IOT-TABLE.RSSI" | translate }} |
| 109 | + </div> |
| 110 | + <app-table-sort-icon [sortDirection]="getSortDirection('rssi')" /> |
69 | 111 | </th> |
70 | 112 | <td mat-cell *matCellDef="let iotDevice"> |
71 | 113 | <ng-container *ngIf="iotDevice.type === 'LORAWAN' || iotDevice.type === 'SIGFOX'; else notSupported"> |
|
79 | 121 | <!-- SNR column --> |
80 | 122 | <ng-container matColumnDef="snr"> |
81 | 123 | <th *matHeaderCellDef mat-header-cell mat-sort-header="snr"> |
82 | | - {{ "IOT-TABLE.SNR" | translate }} |
| 124 | + <div [ngClass]="this.sort.active === 'snr' ? 'column-title-color' : 'column-title-color-inactive'"> |
| 125 | + {{ "IOT-TABLE.SNR" | translate }} |
| 126 | + </div> |
| 127 | + <app-table-sort-icon [sortDirection]="getSortDirection('snr')" /> |
83 | 128 | </th> |
84 | 129 | <td mat-cell *matCellDef="let iotDevice"> |
85 | 130 | <ng-container *ngIf="iotDevice.type === 'LORAWAN' || iotDevice.type === 'SIGFOX'; else notSupported"> |
|
92 | 137 |
|
93 | 138 | <ng-container matColumnDef="dataTargets"> |
94 | 139 | <th mat-header-cell *matHeaderCellDef mat-sort-header> |
95 | | - {{ "APPLICATION-TABLE.DATA-TARGETS" | translate }} |
| 140 | + <div [ngClass]="this.sort.active === 'dataTargets' ? 'column-title-color' : 'column-title-color-inactive'"> |
| 141 | + {{ "APPLICATION-TABLE.DATA-TARGETS" | translate }} |
| 142 | + </div> |
| 143 | + <app-table-sort-icon [sortDirection]="getSortDirection('dataTargets')" /> |
96 | 144 | </th> |
97 | 145 | <td mat-cell *matCellDef="let iotDevice">{{ iotDevice.connections?.length ?? 0 }}</td> |
98 | 146 | </ng-container> |
|
118 | 166 | <!-- Active Column --> |
119 | 167 | <ng-container matColumnDef="active"> |
120 | 168 | <th mat-header-cell *matHeaderCellDef mat-sort-header="active"> |
121 | | - {{ "IOT-TABLE.ACTIVE" | translate }} |
| 169 | + <div [ngClass]="this.sort.active === 'active' ? 'column-title-color' : 'column-title-color-inactive'"> |
| 170 | + {{ "IOT-TABLE.ACTIVE" | translate }} |
| 171 | + </div> |
| 172 | + <app-table-sort-icon [sortDirection]="getSortDirection('active')" /> |
122 | 173 | </th> |
123 | 174 | <td mat-cell *matCellDef="let iotDevice">{{ lastActive(iotDevice) }}</td> |
124 | 175 | </ng-container> |
|
142 | 193 | >{{ "IOTDEVICE-TABLE-ROW.EDIT" | translate }} |
143 | 194 | </a> |
144 | 195 | </li> |
145 | | - <li class="dropdown-item" *ngIf="iotDevice.type!==deviceTypes.SIGFOX"> |
| 196 | + <li class="dropdown-item" *ngIf="iotDevice.type !== deviceTypes.SIGFOX"> |
146 | 197 | <a (click)="onOpenChangeApplicationDialog(iotDevice.id)" routerLinkActive="active">{{ |
147 | 198 | "IOTDEVICE.CHANGE-APPLICATION.TITLE" | translate |
148 | 199 | }}</a> |
|
0 commit comments