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

Function onNetDiagDisplayToggled

web/scripts/ragnar_modern.js:2176–2188  ·  view source on GitHub ↗
(cb)

Source from the content-addressed store, hash-verified

2174 const c = (_wifiState.data && _wifiState.data.changes) || {};
2175 const chips = [];
2176 (c.new_aps || []).forEach(a =>
2177 chips.push(`<span class="px-2 py-1 rounded bg-emerald-600/20 text-emerald-300 border border-emerald-700/50" title="${a.bssid}">+ new: ${a.ssid || '<hidden>'} <span class="opacity-60">${a.band}G ch${a.channel} ${a.signal}dBm</span></span>`));
2178 (c.gone_aps || []).forEach(a =>
2179 chips.push(`<span class="px-2 py-1 rounded bg-slate-700/40 text-slate-400 border border-slate-600/50" title="${a.bssid}">- gone: ${a.ssid || '<hidden>'}</span>`));
2180 (c.weakened || []).forEach(a =>
2181 chips.push(`<span class="px-2 py-1 rounded bg-amber-600/20 text-amber-300 border border-amber-700/50" title="${a.bssid} — ${a.drop}dB below its peak ${a.rssi_max}dBm">▼ weakened: ${a.ssid || '<hidden>'} <span class="opacity-60">${a.signal}dBm (−${a.drop})</span></span>`));
2182 el.innerHTML = chips.length
2183 ? `<span class="text-gray-500 self-center mr-1">Since last scan:</span>${chips.join('')}`
2184 : '';
2185}
2186
2187function wifiSetApView(v) {
2188 _wifiState.apView = v;
2189 document.getElementById('wifi-view-aps').classList.toggle('bg-Ragnar-600', v === 'aps');
2190 document.getElementById('wifi-view-aps').classList.toggle('text-white', v === 'aps');
2191 document.getElementById('wifi-view-nets').classList.toggle('bg-Ragnar-600', v === 'nets');

Callers

nothing calls this directly

Calls 2

postAPIFunction · 0.70
addConsoleMessageFunction · 0.70

Tested by

no test coverage detected