Track LAN client connection time

This commit is contained in:
seo
2026-07-20 23:29:37 +09:00
parent 7425148af8
commit 2261d3ebe4
4 changed files with 62 additions and 34 deletions
+19 -2
View File
@@ -1346,6 +1346,23 @@
return formatDhms(parseWifiDurationSeconds(value)) || value;
}
function wifiCellValue(row, key) {
const value = row?.[key];
const text = String(value ?? '').trim();
if (row?.band === 'LAN' && (text === '' || text.toUpperCase() === 'N/A')) {
return '-';
}
return text || '-';
}
function wifiConnectedCellValue(row) {
if (row?.band === 'LAN' && wifiCellValue(row, 'connected_time') === '-') {
return '-';
}
return wifiConnectedTime(row?.connected_time);
}
function eventStateText(eventState, activeKey, normalKey, recoveringKey, repeatedKey, seenKey, notSeenKey) {
if (!eventState || eventState.available === false) {
return t('na');
@@ -1415,8 +1432,8 @@
${wifiMetricCell(row, 'signal')}
${wifiMetricCell(row, 'tx_bitrate')}
${wifiMetricCell(row, 'rx_bitrate')}
${td(wifiConnectedTime(row.connected_time))}
${td(row.inactive_time)}
${td(wifiConnectedCellValue(row))}
${td(wifiCellValue(row, 'inactive_time'))}
</tr>
`).join('')
: `<tr><td colspan="9">${escapeHtml(t('noWifiClients'))}</td></tr>`;