feat(logs): Add loading indicator to download all logs buttons (#7847)

This commit is contained in:
Andras Bacsai
2026-01-02 12:05:14 +01:00
committed by GitHub
5 changed files with 143 additions and 28 deletions

View File

@@ -121,6 +121,25 @@ class Show extends Component
return sanitizeLogsForExport($logs);
}
public function downloadAllLogs(): string
{
$logs = decode_remote_command_output($this->application_deployment_queue, includeAll: true)
->map(function ($line) {
$prefix = '';
if ($line['hidden']) {
$prefix = '[DEBUG] ';
}
if (isset($line['command']) && $line['command']) {
$prefix .= '[CMD]: ';
}
return $line['timestamp'].' '.$prefix.trim($line['line']);
})
->join("\n");
return sanitizeLogsForExport($logs);
}
public function render()
{
return view('livewire.project.application.deployment.show');