feat: full screen logs

fix: logs are in order now
This commit is contained in:
Andras Bacsai
2023-11-01 13:47:40 +01:00
parent f56d373ed2
commit 1175d68ab5
3 changed files with 24 additions and 6 deletions

View File

@@ -33,9 +33,11 @@ class GetLogs extends Component
if ($refresh) {
$this->outputs = '';
}
Process::run($sshCommand, function (string $type, string $output) {
$this->doSomethingWithThisChunkOfOutput($output);
});
$command = Process::run($sshCommand);
$output = $command->output();
$error = $command->errorOutput();
$this->doSomethingWithThisChunkOfOutput($output);
$this->doSomethingWithThisChunkOfOutput($error);
}
}
public function render()