(serverMatrix)
| 10892 | |
| 10893 | function updateScanProgress() { |
| 10894 | const progressText = document.getElementById('scan-progress-text'); |
| 10895 | const progressBar = document.getElementById('scan-progress-bar'); |
| 10896 | const currentTarget = document.getElementById('current-scan-target'); |
| 10897 | |
| 10898 | const percentage = currentScanState.totalHosts > 0 ? |
| 10899 | (currentScanState.scannedHosts / currentScanState.totalHosts) * 100 : 0; |
| 10900 | |
| 10901 | if (progressText) { |
| 10902 | progressText.textContent = `${currentScanState.scannedHosts}/${currentScanState.totalHosts} hosts`; |
| 10903 | } |
| 10904 | |
| 10905 | if (progressBar) { |
| 10906 | progressBar.style.width = `${percentage}%`; |
| 10907 | } |
| 10908 | |
| 10909 | if (currentTarget) { |
| 10910 | currentTarget.textContent = currentScanState.currentTarget ? |
| 10911 | `Currently scanning: ${currentScanState.currentTarget}` : ''; |
| 10912 | } |
| 10913 | } |
| 10914 | |
| 10915 | function escapeSelector(value) { |
| 10916 | if (window.CSS && typeof CSS.escape === 'function') { |
| 10917 | return CSS.escape(value); |
| 10918 | } |
no test coverage detected