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 @@
  • {{ label_last_output }}:
    -
    {{ last_output }}
    +
    {{ last_output_truncated }}
    + {% if last_output_truncated != last_output %} +
    +
    + +
    + {% endif %}
  • {{ label_last_error_output }}:
    -
    {{ last_error_output }}
    +
    {{ last_error_output_truncated }}
    + {% if last_error_output_truncated != last_error_output %} +
    +
    + +
    + {% endif %} +
  • @@ -320,4 +337,42 @@
    {{ html_history|raw }}
    - \ No newline at end of file + + + + +