2
0

commands_public.ut 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. {#
  2. Copyright 2016 t123yh <t123yh@outlook.com>
  3. Copyright 2022 Jo-Philipp Wich <jo@mein.io>
  4. Licensed to the public under the Apache License 2.0.
  5. -#}
  6. {%
  7. include('header', { blank_page: true, css: `
  8. .alert-success {
  9. color: #3c763d;
  10. background-color: #dff0d8;
  11. border-color: #d6e9c6;
  12. }
  13. .alert {
  14. padding: 15px;
  15. margin-bottom: 20px;
  16. border: 1px solid transparent;
  17. border-radius: 4px;
  18. }
  19. .alert-warning {
  20. color: #8a6d3b;
  21. background-color: #fcf8e3;
  22. border-color: #faebcc;
  23. }
  24. ` });
  25. -%}
  26. <div class="alert alert-success" role="alert">
  27. {% if (exitcode == 0): %}
  28. {{ _('Command executed successfully.') }}
  29. {% else %}
  30. {{ sprintf(_('Command exited with status code %d'), exitcode) }}
  31. {% endif %}
  32. </div>
  33. {% if (length(stdout)): %}
  34. <h3>{{ _('Standard Output') }}</h3>
  35. <pre>{{ entityencode(stdout) }}</pre>
  36. {% endif %}
  37. {% if (length(stderr)): %}
  38. <h3>{{ _('Standard Error') }}</h3>
  39. <pre>{{ entityencode(stderr) }}</pre>
  40. {% endif %}
  41. {% include('footer', { blank_page: true }) %}