mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-17 23:20:43 +00:00
fix: remove blocking instant_remote_process and hide button during download
The first click did nothing because instant_remote_process() blocked the Livewire response, preventing UI state updates. The button also remained visible during download, allowing multiple clicks. - Replace blocking instant_remote_process() with async command in queue - Add container cleanup to command queue with error suppression - Hide "Download & Prepare" button when s3DownloadInProgress is true - Button now properly disappears when clicked, preventing double-clicks - No more blocking operations in downloadFromS3() method 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -394,12 +394,9 @@ EOD;
|
||||
// Create download directory on server
|
||||
$commands[] = "mkdir -p {$downloadDir}";
|
||||
|
||||
// Check if container exists and remove it
|
||||
// Check if container exists and remove it (done in the command queue to avoid blocking)
|
||||
$containerName = "s3-restore-{$this->resource->uuid}";
|
||||
$containerExists = instant_remote_process(["docker ps -a -q -f name={$containerName}"], $this->server, false);
|
||||
if (filled($containerExists)) {
|
||||
instant_remote_process(["docker rm -f {$containerName}"], $this->server, false);
|
||||
}
|
||||
$commands[] = "docker rm -f {$containerName} 2>/dev/null || true";
|
||||
|
||||
// Run MinIO client container to download file
|
||||
$commands[] = "docker run -d --name {$containerName} --rm -v {$downloadDir}:{$downloadDir} {$fullImageName} sleep 30";
|
||||
|
||||
Reference in New Issue
Block a user