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

Function fetchAPI

web/scripts/ragnar_modern.js:11664–11679  ·  view source on GitHub ↗
(endpoint, options = {})

Source from the content-addressed store, hash-verified

11662 // OPTIMIZATION: Reduce dashboard refresh frequency (was 15s, now 20s)
11663 // Background sync runs every 15s, so 20s refresh is sufficient
11664 autoRefreshIntervals.dashboard = setInterval(() => {
11665 if (currentTab === 'dashboard') {
11666 loadDashboardData();
11667 }
11668 }, 20000); // Every 20 seconds when on dashboard (reduced from 15s)
11669
11670 // Set up periodic update checking
11671 autoRefreshIntervals.updates = setInterval(() => {
11672 checkForUpdatesQuiet();
11673 }, 300000); // Every 5 minutes
11674
11675 // OPTIMIZATION: Defer initial update check (was 5s, now 30s)
11676 // Not critical for initial dashboard load
11677 setTimeout(() => {
11678 checkForUpdatesQuiet();
11679 }, 30000); // Check 30 seconds after page load (deferred from 5s)
11680
11681 // Flag the Files nav when a file has been sent to this unit's Inbox.
11682 autoRefreshIntervals.filesFlag = setInterval(refreshFilesFlag, 20000); // every 20s

Callers 15

loadCredentialsFunction · 0.70
syncRusenseTabFromServerFunction · 0.70
syncTerminalFromServerFunction · 0.70
populateMtrSourcesFunction · 0.70
runCaptivePortalFunction · 0.70
loadLldpFunction · 0.70
runArpScanFunction · 0.70
runFlowsFunction · 0.70
loadNetworkIdentityFunction · 0.70
loadInterfacesFunction · 0.70
detectIspFunction · 0.70

Calls 2

errorMethod · 0.80
networkAwareFetchFunction · 0.70

Tested by

no test coverage detected