(scanId)
| 19368 | } |
| 19369 | } |
| 19370 | |
| 19371 | async function handleAutomationToggle() { |
| 19372 | const button = document.getElementById('automation-toggle-btn'); |
| 19373 | if (!button || button.dataset.busy === 'true') { |
| 19374 | return; |
| 19375 | } |
| 19376 | |
| 19377 | const action = button.dataset.action || 'stop'; |
| 19378 | const targetStateEnabled = action === 'start'; |
| 19379 | button.dataset.busy = 'true'; |
| 19380 | button.disabled = true; |
| 19381 | button.classList.add('opacity-70'); |
| 19382 | button.textContent = action === 'start' ? 'Enabling...' : 'Disabling...'; |
| 19383 | |
| 19384 | try { |
| 19385 | let data; |
| 19386 | if (action === 'start') { |
| 19387 | data = await startOrchestrator(); |
| 19388 | } else { |
| 19389 | data = await stopOrchestrator(); |
| 19390 | } |
| 19391 |
nothing calls this directly
no test coverage detected