()
| 15373 | } else { |
| 15374 | addConsoleMessage(`Reset failed: ${data.error || 'Unknown error'}`, 'error'); |
| 15375 | } |
| 15376 | |
| 15377 | } catch (error) { |
| 15378 | console.error('Error resetting vulnerabilities:', error); |
| 15379 | addConsoleMessage('Failed to reset vulnerabilities', 'error'); |
| 15380 | } |
| 15381 | } |
| 15382 | |
| 15383 | async function resetThreatIntelligence() { |
| 15384 | if (!confirm('⚠️ Reset Threat Intelligence?\n\nThis will permanently delete:\n• All threat intelligence findings\n• Enriched threat data\n• Threat cache\n\nThis action cannot be undone. Continue?')) { |
| 15385 | return; |
| 15386 | } |
| 15387 | |
| 15388 | try { |
| 15389 | addConsoleMessage('Resetting threat intelligence...', 'warning'); |
| 15390 | |
| 15391 | const data = await postAPI('/api/data/reset-threat-intel', {}); |
| 15392 | |
| 15393 | if (data.success) { |
| 15394 | addConsoleMessage('Threat intelligence data reset successfully', 'success'); |
| 15395 | |
| 15396 | // Refresh threat intel tab if active |
| 15397 | if (currentTab === 'threat-intel') { |
| 15398 | setTimeout(() => { |
| 15399 | refreshCurrentTab(); |
| 15400 | }, 500); |
| 15401 | } |
| 15402 | } else { |
| 15403 | addConsoleMessage(`Reset failed: ${data.error || 'Unknown error'}`, 'error'); |
| 15404 | } |
nothing calls this directly
no test coverage detected