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

Function toggleTrafficCapture

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

Source from the content-addressed store, hash-verified

16485 if (btn.getAttribute('data-filter') === status) {
16486 btn.classList.add('ring-2', 'ring-white');
16487 } else {
16488 btn.classList.remove('ring-2', 'ring-white');
16489 }
16490 });
16491
16492 // Re-display with filter
16493 if (attackLogsCache) {
16494 displayAttackLogs(attackLogsCache);
16495 }
16496}
16497
16498async function refreshAttackLogs() {
16499 await loadAttackLogs({ force: true });
16500}
16501
16502function setAttackGroupBy(groupBy) {
16503 currentAttackGroupBy = groupBy;
16504 document.querySelectorAll('.attack-groupby-btn').forEach(btn => {
16505 const isActive = btn.getAttribute('data-groupby') === groupBy;
16506 btn.classList.toggle('bg-Ragnar-600', isActive);
16507 btn.classList.toggle('text-white', isActive);
16508 btn.classList.toggle('text-gray-400', !isActive);
16509 btn.classList.toggle('hover:text-white', !isActive);
16510 });
16511 if (attackLogsCache) displayAttackLogs(attackLogsCache);
16512}
16513
16514function filterAttackByNetwork(network) {
16515 currentAttackNetworkFilter = network;
16516 if (attackLogsCache) displayAttackLogs(attackLogsCache);
16517}
16518
16519function onAttackIPSearch(value) {
16520 currentAttackIPSearch = value.trim().toLowerCase();
16521 if (attackLogsCache) displayAttackLogs(attackLogsCache);
16522}
16523

Callers

nothing calls this directly

Calls 3

errorMethod · 0.80
showNotificationFunction · 0.70

Tested by

no test coverage detected