DHCP 클라이언트 MAC 표기 정리

This commit is contained in:
seo
2026-07-26 00:49:51 +09:00
parent f2b34ebc7a
commit 6f0d6d3c07
+28 -10
View File
@@ -191,6 +191,13 @@
band: 'Band', band: 'Band',
hostname: 'Hostname', hostname: 'Hostname',
signal: 'Signal', signal: 'Signal',
signalBest: 'Best',
signalExcellent: 'Excellent',
signalGood: 'Good',
signalFine: 'Fine',
signalNormal: 'Normal',
signalWeak: 'Weak',
signalBad: 'Very weak',
txRate: 'TX Rate', txRate: 'TX Rate',
rxRate: 'RX Rate', rxRate: 'RX Rate',
connected: 'Connected', connected: 'Connected',
@@ -401,6 +408,13 @@
band: '대역', band: '대역',
hostname: '호스트명', hostname: '호스트명',
signal: '신호', signal: '신호',
signalBest: '최상',
signalExcellent: '매우 좋음',
signalGood: '좋음',
signalFine: '양호',
signalNormal: '보통',
signalWeak: '약함',
signalBad: '매우 약함',
txRate: '송신 속도', txRate: '송신 속도',
rxRate: '수신 속도', rxRate: '수신 속도',
connected: '연결 시간', connected: '연결 시간',
@@ -1557,6 +1571,10 @@
return escapeHtml(v).replaceAll("'", '''); return escapeHtml(v).replaceAll("'", ''');
} }
function formatMac(value) {
return String(value || '').toUpperCase();
}
function wifiValueTitle(row, key) { function wifiValueTitle(row, key) {
const source = row?.[`${key}_source`]; const source = row?.[`${key}_source`];
if (!source || source === 'iw' || source === 'lease') return ''; if (!source || source === 'iw' || source === 'lease') return '';
@@ -1605,13 +1623,13 @@
function signalQuality(dbm) { function signalQuality(dbm) {
if (dbm === null || !Number.isFinite(dbm)) return 'unknown'; if (dbm === null || !Number.isFinite(dbm)) return 'unknown';
if (dbm >= -45) return { className: 'best', label: '최상' }; if (dbm >= -45) return { className: 'best', label: t('signalBest') };
if (dbm >= -55) return { className: 'excellent', label: '매우 좋음' }; if (dbm >= -55) return { className: 'excellent', label: t('signalExcellent') };
if (dbm >= -65) return { className: 'good', label: '좋음' }; if (dbm >= -65) return { className: 'good', label: t('signalGood') };
if (dbm >= -72) return { className: 'fine', label: '양호' }; if (dbm >= -72) return { className: 'fine', label: t('signalFine') };
if (dbm >= -80) return { className: 'normal', label: '보통' }; if (dbm >= -80) return { className: 'normal', label: t('signalNormal') };
if (dbm >= -88) return { className: 'weak', label: '약함' }; if (dbm >= -88) return { className: 'weak', label: t('signalWeak') };
return { className: 'bad', label: '매우 약함' }; return { className: 'bad', label: t('signalBad') };
} }
function signalDbmText(dbm, raw = '') { function signalDbmText(dbm, raw = '') {
@@ -1633,7 +1651,7 @@
async function editWifiHostname(mac, currentName) { async function editWifiHostname(mac, currentName) {
if (!mac) return; if (!mac) return;
const value = await window.customPrompt(`${t('wifiAliasPrompt')}\n${mac}`, { const value = await window.customPrompt(`${t('wifiAliasPrompt')}\n${formatMac(mac)}`, {
title: t('wifiAliasTitle'), title: t('wifiAliasTitle'),
defaultValue: currentName || '', defaultValue: currentName || '',
okText: t('dialogOk'), okText: t('dialogOk'),
@@ -1656,7 +1674,7 @@
async function wakeLanDevice(mac, hostname = '') { async function wakeLanDevice(mac, hostname = '') {
if (!mac) return; if (!mac) return;
const confirmed = await window.customConfirm(t('wolConfirm', { hostname, mac }), { const confirmed = await window.customConfirm(t('wolConfirm', { hostname, mac: formatMac(mac) }), {
title: t('wolConfirmTitle'), title: t('wolConfirmTitle'),
okText: t('dialogOk'), okText: t('dialogOk'),
cancelText: t('dialogCancel'), cancelText: t('dialogCancel'),
@@ -1840,7 +1858,7 @@
${wifiBandCell(row)} ${wifiBandCell(row)}
${wifiHostCell(row)} ${wifiHostCell(row)}
${td(row.ip)} ${td(row.ip)}
${td(row.mac)} ${td(formatMac(row.mac))}
${wifiMetricCell(row, 'signal')} ${wifiMetricCell(row, 'signal')}
${wifiRateCells(row)} ${wifiRateCells(row)}
${td(wifiConnectedCellValue(row))} ${td(wifiConnectedCellValue(row))}