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

Function postAPI

web/scripts/ragnar_modern.js:11681–11702  ·  view source on GitHub ↗
(endpoint, data)

Source from the content-addressed store, hash-verified

11679 // Remove pulse animation
11680 statsElements.forEach(id => {
11681 const el = document.getElementById(id);
11682 if (el) el.classList.remove('animate-pulse');
11683 });
11684
11685 if (data) {
11686 // Update status block immediately
11687 updateDashboardStatus(data);
11688 // Only fetch network-specific stats if a specific network is selected;
11689 // otherwise /api/dashboard/quick already has the correct data (instant).
11690 const { network } = getSelectedDashboardNetworkKey();
11691 if (network) {
11692 await refreshDashboardStatsForCurrentSelection({ forceRefresh: true, fallbackData: data });
11693 } else {
11694 updateDashboardStats(data);
11695 }
11696 }
11697
11698 // Load AI insights if configured
11699 await loadAIInsights();
11700 } catch (error) {
11701 console.error('Error loading dashboard data:', error);
11702 // Remove pulse animation on error too
11703 const statsElements = [
11704 'target-count', 'target-total-count', 'target-inactive-count',
11705 'port-count', 'vuln-count', 'cred-count', 'level-count', 'scanned-network-count', 'points-count'

Callers 15

onRusenseTabToggledFunction · 0.70
onTerminalToggledFunction · 0.70
_ndRunTextFunction · 0.70
runMtrFunction · 0.70
runSpeedtestFunction · 0.70
runDnsFunction · 0.70
runPmtuFunction · 0.70
runIperfFunction · 0.70
toggleIperfServerFunction · 0.70
installNetToolFunction · 0.70
runPtpFunction · 0.70
aiAnalyzePcapFunction · 0.70

Calls 2

errorMethod · 0.80
networkAwareFetchFunction · 0.70

Tested by

no test coverage detected