()
| 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 | |
| 16498 | async function refreshAttackLogs() { |
| 16499 | await loadAttackLogs({ force: true }); |
| 16500 | } |
| 16501 | |
| 16502 | function 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 | |
| 16514 | function filterAttackByNetwork(network) { |
| 16515 | currentAttackNetworkFilter = network; |
| 16516 | if (attackLogsCache) displayAttackLogs(attackLogsCache); |
| 16517 | } |
| 16518 | |
| 16519 | function onAttackIPSearch(value) { |
| 16520 | currentAttackIPSearch = value.trim().toLowerCase(); |
| 16521 | if (attackLogsCache) displayAttackLogs(attackLogsCache); |
| 16522 | } |
| 16523 |
nothing calls this directly
no test coverage detected