diff --git a/app/Livewire/Project/Application/Deployment/Show.php b/app/Livewire/Project/Application/Deployment/Show.php
index 8c0ee1a3f..b0f5df0c8 100644
--- a/app/Livewire/Project/Application/Deployment/Show.php
+++ b/app/Livewire/Project/Application/Deployment/Show.php
@@ -117,6 +117,19 @@ public function getLogLinesProperty()
});
}
+ public function copyLogs(): string
+ {
+ $logs = decode_remote_command_output($this->application_deployment_queue)
+ ->map(function ($line) {
+ return $line['timestamp'].' '.
+ (isset($line['command']) && $line['command'] ? '[CMD]: ' : '').
+ trim($line['line']);
+ })
+ ->join("\n");
+
+ return sanitizeLogsForExport($logs);
+ }
+
public function render()
{
return view('livewire.project.application.deployment.show');
diff --git a/resources/views/livewire/project/application/deployment/show.blade.php b/resources/views/livewire/project/application/deployment/show.blade.php
index 5f37786f5..7379dbbe8 100644
--- a/resources/views/livewire/project/application/deployment/show.blade.php
+++ b/resources/views/livewire/project/application/deployment/show.blade.php
@@ -222,6 +222,21 @@ class="absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-6
+
-
+