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

Function loadWardrivingData

web/scripts/ragnar_modern.js:17161–17191  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17159 _filesFlagSharedNew = peerCount > (parseInt(raw, 10) || 0);
17160 }
17161 _applyFilesFlag();
17162 })
17163 .catch(() => { /* silent — background check */ });
17164}
17165// Everything currently shared is now "seen" (called when Mesh Share is opened).
17166function markSharedSeen(peerCount) {
17167 try { localStorage.setItem('mesh_share_seen', String(peerCount || 0)); } catch (e) { /* ignore */ }
17168 _filesFlagSharedNew = false;
17169 _applyFilesFlag();
17170}
17171
17172async function restartService() {
17173 if (!confirm('This will restart the Ragnar service. The web interface may be temporarily unavailable. Continue?')) {
17174 return;
17175 }
17176
17177 try {
17178 addConsoleMessage('Restarting Ragnar service...', 'info');
17179 updateElement('service-status', 'Restarting...');
17180 document.getElementById('service-status').className = 'text-sm px-2 py-1 rounded bg-yellow-700 text-yellow-300';
17181
17182 const data = await postAPI('/api/system/restart-service', {});
17183
17184 if (data.success) {
17185 addConsoleMessage('Service restart initiated', 'success');
17186 addConsoleMessage('Service will be back online shortly...', 'info');
17187
17188 // Update status after delay
17189 setTimeout(() => {
17190 updateElement('service-status', 'Running');
17191 document.getElementById('service-status').className = 'text-sm px-2 py-1 rounded bg-green-700 text-green-300';
17192 addConsoleMessage('Service restart completed', 'success');
17193 }, 10000); // 10 seconds delay
17194 } else {

Callers 3

loadTabDataFunction · 0.70
importWigleCsvFunction · 0.70
toggleWardrivingFunction · 0.70

Calls 6

errorMethod · 0.80
updateWardrivingUIFunction · 0.70
renderWardrivingSessionsFunction · 0.70
loadHuginnConfigFunction · 0.70

Tested by

no test coverage detected