(data)
| 11942 | </div> |
| 11943 | ${a.message ? `<p class="text-gray-300">${escapeHtml(a.message)}</p>` : ''} |
| 11944 | </div>`).join(''); |
| 11945 | } else { |
| 11946 | attacksEl.innerHTML = '<p class="text-gray-500 text-sm">No attack history</p>'; |
| 11947 | } |
| 11948 | |
| 11949 | // Vuln summary |
| 11950 | const vulnSection = document.getElementById('hdp-vuln-section'); |
| 11951 | const vulnEl = document.getElementById('hdp-vuln'); |
| 11952 | if (data.vuln_summary) { |
| 11953 | vulnEl.textContent = data.vuln_summary; |
| 11954 | vulnSection.classList.remove('hidden'); |
| 11955 | } else { |
| 11956 | vulnSection.classList.add('hidden'); |
| 11957 | } |
| 11958 | } |
| 11959 | |
| 11960 | function updateHostCountDisplay() { |
| 11961 | const tableBody = document.getElementById('network-hosts-table'); |
| 11962 | const hostCount = document.getElementById('host-count'); |
| 11963 | if (!tableBody || !hostCount) { |
| 11964 | return; |
| 11965 | } |
| 11966 | |
| 11967 | const totalHosts = tableBody.querySelectorAll('tr[data-ip]').length; |
| 11968 | hostCount.textContent = `${totalHosts} host${totalHosts !== 1 ? 's' : ''}`; |
| 11969 | } |
| 11970 | |
| 11971 | function updateHostInTable(hostData) { |
| 11972 | const tableBody = document.getElementById('network-hosts-table'); |
| 11973 | if (!tableBody) { |
| 11974 | return; |
| 11975 | } |
| 11976 | |
| 11977 | const normalized = normalizeHostRecord(hostData); |
| 11978 | if (!normalized) { |
| 11979 | return; |
| 11980 | } |
| 11981 | |
| 11982 | const noDataRow = tableBody.querySelector('td[colspan="8"]'); |
| 11983 | if (noDataRow) { |
| 11984 | noDataRow.parentElement.remove(); |
| 11985 | } |
| 11986 | |
| 11987 | const selector = `tr[data-ip="${escapeSelector(normalized.ip)}"]`; |
| 11988 | let row = tableBody.querySelector(selector); |
| 11989 | |
| 11990 | // Save deep scan button state before updating row |
| 11991 | if (row) { |
| 11992 | saveDeepScanButtonState(normalized.ip); |
| 11993 | } |
| 11994 | |
| 11995 | if (!row) { |
| 11996 | row = document.createElement('tr'); |
| 11997 | row.setAttribute('data-ip', normalized.ip); |
| 11998 | row.className = 'border-b border-slate-700 hover:bg-slate-700/50 transition-colors'; |
| 11999 | tableBody.appendChild(row); |
| 12000 | } |
| 12001 |
no outgoing calls
no test coverage detected