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

Function fetchScanLogs

web/scripts/ragnar_modern.js:19241–19266  ·  view source on GitHub ↗
(scanId)

Source from the content-addressed store, hash-verified

19239 try {
19240 let data;
19241 if (action === 'start') {
19242 data = await startOrchestrator();
19243 } else {
19244 data = await stopOrchestrator();
19245 }
19246
19247 // Use the actual server-reported state instead of assuming success
19248 const actualEnabled = data && data.success ? Boolean(data.automation_enabled) : !targetStateEnabled;
19249 updateAutomationToggleButton(actualEnabled, { force: true });
19250
19251 refreshDashboard().catch(() => {/* best effort */});
19252 } catch (error) {
19253 console.error('Automation toggle failed:', error);
19254 addConsoleMessage('Failed to toggle automation', 'error');
19255 updateAutomationToggleButton(!targetStateEnabled, { force: true });
19256 } finally {
19257 button.dataset.busy = 'false';
19258 button.disabled = false;
19259 button.classList.remove('opacity-70');
19260
19261 if (button.dataset.pendingState) {
19262 const pendingEnabled = button.dataset.pendingState === 'enabled';
19263 delete button.dataset.pendingState;
19264 updateAutomationToggleButton(pendingEnabled, { force: true });
19265 }
19266 }
19267}
19268
19269function updateElement(id, value) {

Callers 2

toggleAdvVulnScanLogsFunction · 0.70
startAdvVulnPollingFunction · 0.70

Calls 4

setMethod · 0.80
errorMethod · 0.80
renderLogEntriesFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected