From 8c0f3538b91e33130605c354a1a5830f7dfccd01 Mon Sep 17 00:00:00 2001 From: Debian Date: Mon, 5 Jan 2026 09:23:32 +0000 Subject: [PATCH] Improve deploy script button feedback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Show spinning loader and "Deploying script to {host}..." message while deploying - Show error message in UI when deployment fails (instead of just console.error) - Better visual feedback for both initial deploy and retry scenarios 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- frontend/src/components/DiscoveryResults.jsx | 52 ++++++++++++++------ 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/frontend/src/components/DiscoveryResults.jsx b/frontend/src/components/DiscoveryResults.jsx index 17e49de..039d2e1 100644 --- a/frontend/src/components/DiscoveryResults.jsx +++ b/frontend/src/components/DiscoveryResults.jsx @@ -71,7 +71,11 @@ export default function DiscoveryResults({ scanId, scan, analysis, devMode, onCo const pushMetric = result.push_metric; if (!monitorId || !pushMetric) { - console.error('Missing monitor ID or push metric for deployment'); + const errorMsg = `Missing data for deployment: monitorID=${monitorId}, push_metric=${pushMetric}`; + console.error(errorMsg, result); + setCreateResults(prev => prev.map((r, i) => + i === resultIndex ? { ...r, deployment: { status: 'failed', error: errorMsg } } : r + )); return; } @@ -375,6 +379,14 @@ export default function DiscoveryResults({ scanId, scan, analysis, devMode, onCo Script deployed to {result.deployment.script_path} + ) : deployingScripts[index] ? ( + <> + + + + + Deploying script to {scan.hostname}... + ) : ( <> @@ -383,10 +395,9 @@ export default function DiscoveryResults({ scanId, scan, analysis, devMode, onCo Deployment failed: {result.deployment.error} )} @@ -402,17 +413,28 @@ export default function DiscoveryResults({ scanId, scan, analysis, devMode, onCo {/* Push monitor without deployment info (needs manual deploy) */} {result.type === 'push' && result.status === 'created' && !result.deployment && (
- - - - Script not deployed - + {deployingScripts[index] ? ( + <> + + + + + Deploying script to {scan.hostname}... + + ) : ( + <> + + + + Script not deployed + + + )}
)}