MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / updateTrafficSummary

Function updateTrafficSummary

web/scripts/ragnar_modern.js:15583–15603  ·  view source on GitHub ↗
(summary)

Source from the content-addressed store, hash-verified

15581 try { localStorage.setItem('mesh_share_seen', String(peerCount)); } catch (e) { /* ignore */ }
15582 _filesFlagSharedNew = false;
15583 } else {
15584 _filesFlagSharedNew = peerCount > (parseInt(raw, 10) || 0);
15585 }
15586 _applyFilesFlag();
15587 })
15588 .catch(() => { /* silent — background check */ });
15589}
15590// Everything currently shared is now "seen" (called when Mesh Share is opened).
15591function markSharedSeen(peerCount) {
15592 try { localStorage.setItem('mesh_share_seen', String(peerCount || 0)); } catch (e) { /* ignore */ }
15593 _filesFlagSharedNew = false;
15594 _applyFilesFlag();
15595}
15596
15597async function restartService() {
15598 if (!confirm('This will restart the Ragnar service. The web interface may be temporarily unavailable. Continue?')) {
15599 return;
15600 }
15601
15602 try {
15603 addConsoleMessage('Restarting Ragnar service...', 'info');
15604 updateElement('service-status', 'Restarting...');
15605 document.getElementById('service-status').className = 'text-sm px-2 py-1 rounded bg-yellow-700 text-yellow-300';
15606

Callers 1

loadTrafficAnalysisDataFunction · 0.70

Calls 3

updateElementFunction · 0.70
formatNumberFunction · 0.70
formatBytesFunction · 0.70

Tested by

no test coverage detected