Skip to content

Commit

Permalink
job output iporved
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitexus committed Jan 15, 2025
1 parent 14c71af commit 95f31b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/job.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
$apps = new Application($appInfo['app_id']);
$instanceName = $appInfo['app_name'];

$errorTerminal = new \Ease\Html\DivTag(nl2br(str_replace('background-color: black; ', '', (new \SensioLabs\AnsiConverter\AnsiToHtmlConverter())->convert((string) $jobber->getDataValue('stderr')))), ['style' => 'background: #8B0000; font-family: monospace;']);
$stdTerminal = new \Ease\Html\DivTag(nl2br(str_replace('background-color: black; ', '', (new \SensioLabs\AnsiConverter\AnsiToHtmlConverter())->convert((string) $jobber->getDataValue('stdout')))), ['style' => 'background: #000000; font-family: monospace;']);
$errorTerminal = new \Ease\Html\DivTag(nl2br(str_replace('background-color: black; ', '', (new \SensioLabs\AnsiConverter\AnsiToHtmlConverter())->convert((string) $jobber->getDataValue('stderr')))), ['style' => 'background: #ffb3b3; font-family: monospace;']);
$stdTerminal = new \Ease\Html\DivTag(nl2br(str_replace('background-color: black; ', '', (new \SensioLabs\AnsiConverter\AnsiToHtmlConverter())->convert((string) $jobber->getDataValue('stdout')))), ['style' => 'background: #808080; font-family: monospace;']);

$outputTabs = new \Ease\TWB4\Tabs();
$outputTabs->addTab(_('Output'), [$stdTerminal, \strlen($jobber->getOutput()) ? new \Ease\TWB4\LinkButton('joboutput.php?id='.$jobID.'&mode=std', _('Download'), 'secondary btn-block') : _('No output')]);
Expand Down
2 changes: 1 addition & 1 deletion src/joboutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: '.mb_strlen($output));
echo $output;
echo stripslashes($output);

0 comments on commit 95f31b2

Please sign in to comment.