commands_public.htm 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <%#
  2. Copyright 2016 t123yh <t123yh@outlook.com>
  3. Licensed to the public under the Apache License 2.0.
  4. -%>
  5. <% css = [[
  6. .alert-success {
  7. color: #3c763d;
  8. background-color: #dff0d8;
  9. border-color: #d6e9c6;
  10. }
  11. .alert {
  12. padding: 15px;
  13. margin-bottom: 20px;
  14. border: 1px solid transparent;
  15. border-radius: 4px;
  16. }
  17. .alert-warning {
  18. color: #8a6d3b;
  19. background-color: #fcf8e3;
  20. border-color: #faebcc;
  21. }
  22. ]] -%>
  23. <%+header%>
  24. <% if exitcode == 0 then %>
  25. <div class="alert alert-success" role="alert"> <%:Command executed successfully.%> </div>
  26. <% else %>
  27. <div class="alert alert-warning" role="alert"> <%:Command exited with status code %> <%= exitcode %> </div>
  28. <% end %>
  29. <% if stdout ~= "" then %>
  30. <h3><%:Standard Output%></h3>
  31. <pre><%= stdout %></pre>
  32. <% end %>
  33. <% if stderr ~= "" then %>
  34. <h3><%:Standard Error%></h3>
  35. <pre><%= stderr %></pre>
  36. <% end %>
  37. <script>
  38. <%# Display top bar on mobile devices -%>
  39. document.getElementsByClassName('brand')[0].style.setProperty("display", "block", "important");
  40. </script>
  41. <%+footer%>