네트워크 이력 인터페이스별 섹션 분리

This commit is contained in:
seo
2026-07-25 22:39:04 +09:00
parent 9cd5160f03
commit 824538c85c
4 changed files with 74 additions and 26 deletions
+29 -14
View File
@@ -161,10 +161,13 @@
rp1Temp: 'RP1 Temp',
cpuWatt: 'CPU Watt',
networkHistory: 'Network History',
wanDownloadPackets: 'WAN Download / RX Packets',
wanUploadPackets: 'WAN Upload / TX Packets',
bridgeDownloadPackets: 'Bridge Download / RX Packets',
bridgeUploadPackets: 'Bridge Upload / TX Packets',
wanHistory: 'WAN History',
bridgeHistory: 'Bridge History',
lanHistory: 'LAN History',
wifi24History: '2.4G WiFi History',
wifi5History: '5G WiFi History',
downloadRxPackets: 'Download / RX Packets',
uploadTxPackets: 'Upload / TX Packets',
downloadLine: 'Download',
uploadLine: 'Upload',
rxPacketsLine: 'RX Packets',
@@ -365,10 +368,13 @@
rp1Temp: 'RP1 온도',
cpuWatt: 'CPU 전력',
networkHistory: '네트워크 이력',
wanDownloadPackets: 'WAN 다운로드 / RX 패킷',
wanUploadPackets: 'WAN 업로드 / TX 패킷',
bridgeDownloadPackets: '브릿지 다운로드 / RX 패킷',
bridgeUploadPackets: '브릿지 업로드 / TX 패킷',
wanHistory: 'WAN 이력',
bridgeHistory: '브릿지 이력',
lanHistory: 'LAN 이력',
wifi24History: '2.4G WiFi 이력',
wifi5History: '5G WiFi 이력',
downloadRxPackets: '다운로드 / RX 패킷',
uploadTxPackets: '업로드 / TX 패킷',
downloadLine: '다운로드',
uploadLine: '업로드',
rxPacketsLine: 'RX 패킷',
@@ -2559,7 +2565,7 @@
padding: 8,
callbacks: {
label: item => {
const suffix = item.dataset.yAxisID === 'speed' ? ' Mbit/s' : ' pps';
const suffix = item.dataset.yAxisID === 'speed' ? ' MB/s' : ' pps';
return `${item.dataset.label}: ${formatChartNumber(item.parsed.y, suffix)}`;
},
},
@@ -2586,7 +2592,7 @@
ticks: {
color: speedColor,
maxTicksLimit: 4,
callback: value => formatChartNumber(value, ' Mbit/s'),
callback: value => formatChartNumber(value, ' MB/s'),
},
grid: { color: 'rgba(255,255,255,.045)', drawTicks: false },
border: { display: false },
@@ -2682,10 +2688,19 @@
const wanIface = String(data.network?.default_interface || 'eth0');
const wanRows = networkRowsForIface(networkRows, wanIface);
const bridgeRows = networkRowsForIface(networkRows, 'br0');
networkChart('netWanRxChart', wanRows, 'rx_mbps', t('downloadLine'), 'rx_pps', t('rxPacketsLine'), '#0ea5e9');
networkChart('netWanTxChart', wanRows, 'tx_mbps', t('uploadLine'), 'tx_pps', t('txPacketsLine'), '#22c55e');
networkChart('netBridgeRxChart', bridgeRows, 'rx_mbps', t('downloadLine'), 'rx_pps', t('rxPacketsLine'), '#0ea5e9');
networkChart('netBridgeTxChart', bridgeRows, 'tx_mbps', t('uploadLine'), 'tx_pps', t('txPacketsLine'), '#22c55e');
const lanRows = networkRowsForIface(networkRows, 'eth1');
const wifi24Rows = networkRowsForIface(networkRows, 'wlan0');
const wifi5Rows = networkRowsForIface(networkRows, 'wlan1');
networkChart('netWanRxChart', wanRows, 'rx_mbytes', t('downloadLine'), 'rx_pps', t('rxPacketsLine'), '#0ea5e9');
networkChart('netWanTxChart', wanRows, 'tx_mbytes', t('uploadLine'), 'tx_pps', t('txPacketsLine'), '#22c55e');
networkChart('netBridgeRxChart', bridgeRows, 'rx_mbytes', t('downloadLine'), 'rx_pps', t('rxPacketsLine'), '#0ea5e9');
networkChart('netBridgeTxChart', bridgeRows, 'tx_mbytes', t('uploadLine'), 'tx_pps', t('txPacketsLine'), '#22c55e');
networkChart('netLanRxChart', lanRows, 'rx_mbytes', t('downloadLine'), 'rx_pps', t('rxPacketsLine'), '#0ea5e9');
networkChart('netLanTxChart', lanRows, 'tx_mbytes', t('uploadLine'), 'tx_pps', t('txPacketsLine'), '#22c55e');
networkChart('netWifi24RxChart', wifi24Rows, 'rx_mbytes', t('downloadLine'), 'rx_pps', t('rxPacketsLine'), '#0ea5e9');
networkChart('netWifi24TxChart', wifi24Rows, 'tx_mbytes', t('uploadLine'), 'tx_pps', t('txPacketsLine'), '#22c55e');
networkChart('netWifi5RxChart', wifi5Rows, 'rx_mbytes', t('downloadLine'), 'rx_pps', t('rxPacketsLine'), '#0ea5e9');
networkChart('netWifi5TxChart', wifi5Rows, 'tx_mbytes', t('uploadLine'), 'tx_pps', t('txPacketsLine'), '#22c55e');
}
function resizeChartsSoon() {