feat(lan): 사이드바 LAN 행에 오류 카운터 초기화 버튼

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
kimandClaude Sonnet 5.5 committed 2026-11-22 20:56:04 +09:00
1 parent 2d06f526a3
commit 4fe68231cc
2 files changed
+10

No files matched your search

+1
View File
@@ -212,6 +212,7 @@
<span style="font-size:11px;font-weight:700;color:var(--muted);width:32px;flex-shrink:0">LAN</span> <span style="font-size:11px;font-weight:700;color:var(--muted);width:32px;flex-shrink:0">LAN</span>
<span id="sb-lan-dot" style="width:8px;height:8px;border-radius:50%;background:var(--muted);flex-shrink:0"></span> <span id="sb-lan-dot" style="width:8px;height:8px;border-radius:50%;background:var(--muted);flex-shrink:0"></span>
<span id="sb-lan-text" style="font-size:11px;font-weight:700;font-family:'IBM Plex Mono',monospace;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis">--</span> <span id="sb-lan-text" style="font-size:11px;font-weight:700;font-family:'IBM Plex Mono',monospace;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis">--</span>
<button id="sb-lan-reset" type="button" title="랜 오류 카운터·이벤트 초기화" onclick="resetLanStatus()" style="margin-left:auto;flex-shrink:0;font-size:10px;padding:1px 6px;border:1px solid var(--border);border-radius:4px;background:transparent;color:var(--muted);cursor:pointer">초기화</button>
</div> </div>
</div> </div>
</div> </div>
+9
View File
@@ -1167,6 +1167,15 @@ function renderLanStatus(lan) {
row.title = [...nics, gw, wan, sm, ...(evs.length ? ['— 최근 이벤트 —', ...evs] : [])].filter(Boolean).join('\n'); row.title = [...nics, gw, wan, sm, ...(evs.length ? ['— 최근 이벤트 —', ...evs] : [])].filter(Boolean).join('\n');
} }
async function resetLanStatus() {
if (!confirm('랜 오류 카운터와 이벤트 기록을 초기화할까요?\n(이전 기록은 파일로 백업돼요)')) return;
try {
await api('/api/lan-status/reset', { method: 'POST' });
loadSystemStats();
} catch (e) { alert('초기화 실패: ' + (e.message || e)); }
}
window.resetLanStatus = resetLanStatus;
let systemStatsFetchInFlight = false; let systemStatsFetchInFlight = false;
async function loadSystemStats() { async function loadSystemStats() {
if (systemStatsFetchInFlight) return; if (systemStatsFetchInFlight) return;