|
134 | 134 | margin: 15px 0; |
135 | 135 | border-left: 5px solid #d32f2f; |
136 | 136 | } |
| 137 | + |
| 138 | + .security-field { |
| 139 | + text-align: center; |
| 140 | + font-weight: bold; |
| 141 | + } |
| 142 | + |
| 143 | + .security-enabled { |
| 144 | + color: #28a745; |
| 145 | + font-size: 14px; |
| 146 | + } |
| 147 | + |
| 148 | + .security-disabled { |
| 149 | + color: #dc3545; |
| 150 | + font-size: 14px; |
| 151 | + } |
| 152 | + |
| 153 | + .security-unknown { |
| 154 | + color: #6c757d; |
| 155 | + font-size: 14px; |
| 156 | + } |
137 | 157 | </style> |
138 | 158 | </head> |
139 | 159 | <body> |
|
178 | 198 | </div> |
179 | 199 |
|
180 | 200 | <script> |
| 201 | + // Function to format security field values |
| 202 | + function formatSecurityField(value) { |
| 203 | + if (value === null || value === undefined || value === '') { |
| 204 | + return '<span class="security-unknown">?</span>'; |
| 205 | + } else if (value === '1') { |
| 206 | + return '<span class="security-enabled">✓</span>'; |
| 207 | + } else if (value === '0') { |
| 208 | + return '<span class="security-disabled">✗</span>'; |
| 209 | + } else { |
| 210 | + return '<span class="security-unknown">?</span>'; |
| 211 | + } |
| 212 | + } |
| 213 | + |
181 | 214 | // Handle scroll indicator visibility |
182 | 215 | function updateScrollIndicator() { |
183 | 216 | const container = document.querySelector('.table-container'); |
|
252 | 285 | <th>Memory</th> |
253 | 286 | <th>Manufacturer</th> |
254 | 287 | <th>Secure</th> |
| 288 | + <th>JTAG Locked</th> |
| 289 | + <th>EEPROM WP</th> |
| 290 | + <th>Pubkey Prog.</th> |
| 291 | + <th>Signed Boot</th> |
255 | 292 | </tr> |
256 | 293 | </thead> |
257 | 294 | <tbody> |
|
276 | 313 | <td>${device.memory || ''}</td> |
277 | 314 | <td>${device.manufacturer || ''}</td> |
278 | 315 | <td>${device.secure || ''}</td> |
| 316 | + <td class="security-field">${formatSecurityField(device.jtag_locked)}</td> |
| 317 | + <td class="security-field">${formatSecurityField(device.eeprom_write_protected)}</td> |
| 318 | + <td class="security-field">${formatSecurityField(device.pubkey_programmed)}</td> |
| 319 | + <td class="security-field">${formatSecurityField(device.signed_boot_enabled)}</td> |
279 | 320 | </tr> |
280 | 321 | `; |
281 | 322 | }); |
282 | 323 | } else { |
283 | 324 | tableHtml += ` |
284 | 325 | <tr> |
285 | | - <td colspan="15" class="no-devices">No manufacturing data available</td> |
| 326 | + <td colspan="19" class="no-devices">No manufacturing data available</td> |
286 | 327 | </tr> |
287 | 328 | `; |
288 | 329 | } |
|
333 | 374 | rows.forEach(row => { |
334 | 375 | const rowData = []; |
335 | 376 | row.querySelectorAll('td').forEach(cell => { |
336 | | - rowData.push('"' + (cell.innerText || '') + '"'); |
| 377 | + // For security fields, extract the symbol and convert to readable text |
| 378 | + let cellText = cell.innerText || ''; |
| 379 | + if (cell.classList.contains('security-field')) { |
| 380 | + const span = cell.querySelector('span'); |
| 381 | + if (span) { |
| 382 | + const symbol = span.innerText; |
| 383 | + if (symbol === '✓') cellText = 'Yes'; |
| 384 | + else if (symbol === '✗') cellText = 'No'; |
| 385 | + else if (symbol === '?') cellText = 'Unknown'; |
| 386 | + } |
| 387 | + } |
| 388 | + rowData.push('"' + cellText + '"'); |
337 | 389 | }); |
338 | 390 | if (rowData.length > 1) { // Skip empty rows |
339 | 391 | csvContent += rowData.join(',') + '\r\n'; |
|
0 commit comments