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

Function refreshAIInsights

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

Source from the content-addressed store, hash-verified

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
15383async 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 }

Callers

nothing calls this directly

Calls 4

errorMethod · 0.80
networkAwareFetchFunction · 0.70
loadAIInsightsFunction · 0.70
showNotificationFunction · 0.70

Tested by

no test coverage detected