mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-17 21:20:29 +00:00
feat: Add copy logs button to deployment and runtime logs
Add copy-to-clipboard functionality for both deployment logs and runtime container logs with success notification. Fixed event dispatch to use Livewire.dispatch() for proper toast notification handling. Reorganized copy and download buttons to appear consecutively in runtime logs toolbar. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -117,6 +117,19 @@ class Show extends Component
|
||||
});
|
||||
}
|
||||
|
||||
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');
|
||||
|
||||
Reference in New Issue
Block a user