Track LAN client connection time
This commit is contained in:
+19
-2
@@ -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>`;
|
||||
|
||||
Reference in New Issue
Block a user