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

Function stopOrchestrator

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

Source from the content-addressed store, hash-verified

11357 const customStatusEl = document.getElementById('custom-deep-scan-status');
11358 const updateCustomStatus = customStatusEl && customStatusEl.dataset.currentIp === ip;
11359
11360 switch (type) {
11361 case 'deep_scan_started':
11362 addConsoleMessage(`🔍 ${message}`, 'info');
11363 if (button) {
11364 button.classList.remove('bg-purple-600', 'hover:bg-purple-700');
11365 button.classList.add('bg-blue-600', 'cursor-wait');
11366 button.disabled = true;
11367 button.textContent = 'Scan started';
11368 button.dataset.scanStatus = 'scanning';
11369 // Save the updated state
11370 saveDeepScanButtonState(ip);
11371 }
11372 if (updateCustomStatus && message) {
11373 customStatusEl.textContent = message;
11374 }
11375 break;
11376
11377 case 'deep_scan_progress':
11378 // Update button with short progress messages
11379 if (button) {
11380 const event = data.event;
11381 if (event === 'scanning') {
11382 button.textContent = 'Scanning...';
11383 } else if (event === 'hostname') {
11384 // Extract short hostname (max 20 chars already in message)
11385 button.textContent = message;
11386 } else if (event === 'port_found') {
11387 const port = data.port;
11388 const service = data.service;
11389 button.textContent = `Port ${port} found`;
11390 }
11391 button.dataset.scanStatus = 'scanning';
11392 // Save the updated state
11393 saveDeepScanButtonState(ip);
11394 }
11395 if (updateCustomStatus && message) {
11396 customStatusEl.textContent = message;
11397 }
11398 break;
11399
11400 case 'deep_scan_completed':
11401 const portCount = data.open_ports ? data.open_ports.length : 0;
11402 const duration = data.scan_duration ? data.scan_duration.toFixed(2) : 'unknown';
11403 addConsoleMessage(`✅ Deep scan of ${ip} complete: ${portCount} ports found in ${duration}s`, 'success');
11404
11405 // Show detailed port information

Callers 1

handleAutomationToggleFunction · 0.70

Calls 4

addMethod · 0.80
addConsoleMessageFunction · 0.70
postAPIFunction · 0.70
updateElementFunction · 0.70

Tested by

no test coverage detected