diff --git a/src/psm/Module/Server/Controller/ServerController.php b/src/psm/Module/Server/Controller/ServerController.php index 974bf201..b1a2f5dc 100644 --- a/src/psm/Module/Server/Controller/ServerController.php +++ b/src/psm/Module/Server/Controller/ServerController.php @@ -453,6 +453,18 @@ class ServerController extends AbstractServerController { 'label' => $server_available['label'], ); } + + $tpl_data['last_output_truncated'] = $tpl_data['last_output']; + $tpl_data['last_error_output_truncated'] = $tpl_data['last_error_output']; + + if (strlen($tpl_data['last_output']) > 255) { + $tpl_data['last_output_truncated'] = substr($tpl_data['last_output'], 0, 255) . '...'; + } + + if (strlen($tpl_data['last_error_output']) > 255) { + $tpl_data['last_error_output_truncated'] = substr($tpl_data['last_error_output'], 0, 255) . '...'; + } + return $this->twig->render('module/server/server/view.tpl.html', $tpl_data); } diff --git a/src/templates/default/module/server/server/view.tpl.html b/src/templates/default/module/server/server/view.tpl.html index fc56dec6..ff8783a6 100644 --- a/src/templates/default/module/server/server/view.tpl.html +++ b/src/templates/default/module/server/server/view.tpl.html @@ -233,13 +233,30 @@