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

Function updateBluetoothStatus

web/scripts/ragnar_modern.js:9657–9714  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

9655 updateElement('scanned-network-count', scannedNetworks);
9656 scaleStatNumber('scanned-network-count', scannedNetworks);
9657 updateElement('dashboard-scanned-network-count', scannedNetworks);
9658 scaleStatNumber('dashboard-scanned-network-count', scannedNetworks);
9659 updateElement('points-count', points);
9660
9661 const activeSummary = totalTargets > 0 ? `${activeTargets}/${totalTargets} active` : `${activeTargets} active`;
9662 const newSummary = newTargets > 0 ? `${newTargets} new` : 'No new targets';
9663 const lostSummary = lostTargets > 0 ? `${lostTargets} lost` : 'No targets lost';
9664
9665 updateElement('active-target-summary', activeSummary);
9666 updateElement('new-target-summary', newSummary);
9667 updateElement('lost-target-summary', lostSummary);
9668 updateElement('last-sync-display', buildLastSyncDisplay(stats));
9669}
9670
9671async function loadNetworkData() {
9672 try {
9673 // Use the new stable network data endpoint
9674 await loadStableNetworkData();
9675
9676 // Update the status detection info banner with current config
9677 updateNetworkStatusBanner();
9678 } catch (error) {
9679 console.error('Error loading network data:', error);
9680 addConsoleMessage('Failed to load network data', 'error');
9681 }
9682}
9683
9684async function loadNetworkData() {
9685 try {
9686 // Use the new stable network data endpoint
9687 await loadStableNetworkData();
9688
9689 // Update the status detection info banner with current config
9690 updateNetworkStatusBanner();
9691 } catch (error) {
9692 console.error('Error loading network data:', error);
9693 addConsoleMessage('Failed to load network data', 'error');
9694 }
9695}
9696
9697// ============================================================================
9698// ALL SCANNED NETWORKS TAB (PR 3)
9699// ============================================================================
9700
9701async function loadAllNetworksData() {
9702 const container = document.getElementById('networks-list-container');
9703 if (!container) return;
9704
9705 container.innerHTML = `
9706 <div class="text-center text-gray-400 py-12">
9707 <svg class="w-8 h-8 inline animate-spin mb-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
9708 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"></path>
9709 </svg>
9710 <p>Loading AP Archive…</p>
9711 </div>`;
9712
9713 try {
9714 const data = await fetchAPI('/api/networks/all');

Callers 1

refreshBluetoothStatusFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected