index.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <!DOCTYPE html>
  2. <html lang = "en">
  3. <head>
  4. <meta charset = "UTF-8" />
  5. <meta name = "viewport" content = "width=device-width, initial-scale=1.0" />
  6. <meta name = "description" content = "Give safe and simple access to predefined shell commands from a web interface." />
  7. <title>OliveTin</title>
  8. <link rel = "stylesheet" type = "text/css" href = "/theme.css" />
  9. <link rel = "stylesheet" href = "node_modules/@xterm/xterm/css/xterm.css" />
  10. <link rel = "shortcut icon" type = "image/png" href = "OliveTinLogo.png" />
  11. <link rel = "apple-touch-icon" sizes="57x57" href="OliveTinLogo-57px.png" />
  12. <link rel = "apple-touch-icon" sizes="120x120" href="OliveTinLogo-120px.png" />
  13. <link rel = "apple-touch-icon" sizes="180x180" href="OliveTinLogo-180px.png" />
  14. <base href = "/" />
  15. </head>
  16. <body>
  17. <slot id = "app" />
  18. <main title = "main content">
  19. <section id = "contentActions" title = "Actions" class = "transparent" hidden >
  20. <fieldset id = "root-group" title = "Actions">
  21. <legend hidden>Actions</legend>
  22. </fieldset>
  23. </section>
  24. <noscript>
  25. <div class = "error">Sorry, JavaScript is required to use OliveTin.</div>
  26. </noscript>
  27. </main>
  28. <dialog title = "Big Error Message" id = "big-error" class = "error padded-content">
  29. </dialog>
  30. <dialog title = "Execution Results" id = "execution-results-popup">
  31. <div class = "action-header padded-content">
  32. <span id = "execution-dialog-icon" class = "icon" role = "img"></span>
  33. <h2>
  34. <span id = "execution-dialog-title">?</span>
  35. </h2>
  36. <button id = "execution-dialog-toggle-size" title = "Toggle dialog size">
  37. <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M3 3h6v2H6.462l4.843 4.843l-1.415 1.414L5 6.367V9H3zm0 18h6v-2H6.376l4.929-4.928l-1.415-1.414L5 17.548V15H3zm12 0h6v-6h-2v2.524l-4.867-4.866l-1.414 1.414L17.647 19H15zm6-18h-6v2h2.562l-4.843 4.843l1.414 1.414L19 6.39V9h2z"/></svg>
  38. </button>
  39. </div>
  40. <div id = "execution-dialog-basics" class = "padded-content-sides">
  41. <strong>Duration: </strong><span id = "execution-dialog-duration">unknown</span>
  42. </div>
  43. <div id = "execution-dialog-details" class = "padded-content-sides">
  44. <p>
  45. <strong>Status: </strong><span id = "execution-dialog-status">unknown</span>
  46. </p>
  47. </div>
  48. <div id = "execution-dialog-xterm"></div>
  49. <div id = "execution-dialog-output-html" class = "padded-content"></div>
  50. <div class = "buttons padded-content">
  51. <button name = "rerun" title = "Rerun" id = "execution-dialog-rerun-action">Rerun</button>
  52. <button name = "kill" title = "Kill" id = "execution-dialog-kill-action">Kill</button>
  53. <form method = "dialog">
  54. <button name = "Cancel" title = "Close">Close</button>
  55. </form>
  56. </div>
  57. </dialog>
  58. <template id = "tplArgumentForm">
  59. <dialog title = "Arguments" id = "argument-popup">
  60. <form class = "action-arguments padded-content">
  61. <div class = "wrapper">
  62. <div class = "action-header">
  63. <span class = "icon" role = "img"></span>
  64. <h2>Argument form</h2>
  65. </div>
  66. <div class = "arguments"></div>
  67. <div class = "buttons">
  68. <button name = "start" type = "submit">Start</button>
  69. <button name = "cancel" title = "Cancel" type = "button">Cancel</button>
  70. </div>
  71. </div>
  72. </form>
  73. </dialog>
  74. </template>
  75. <template id = "tplActionButton">
  76. <button>
  77. <span title = "action button icon" class = "icon">&#x1f4a9;</span>
  78. <span class = "title" aria-live = "polite">Untitled Button</span>
  79. </button>
  80. <div class = "action-button-footer" hidden></div>
  81. </template>
  82. <template id = "tplLogRow">
  83. <tr class = "log-row">
  84. <td class = "timestamp">?</td>
  85. <td>
  86. <span role = "img" class = "icon"></span>
  87. <a href = "javascript:void(0)" class = "content">?</a>
  88. </td>
  89. <td class = "tags"></td>
  90. <td class = "exit-code">?</td>
  91. </tr>
  92. </template>
  93. <script type = "text/javascript">
  94. const bigErrorDialog = document.getElementById('big-error')
  95. /**
  96. This is the bootstrap code, which relies on very simple, old javascript
  97. to at least display a helpful error message if we can't use OliveTin.
  98. */
  99. window.showBigError = function (type, friendlyType, message, isFatal) {
  100. console.error('Error ' + type + ': ', message)
  101. return;
  102. bigErrorDialog.innerHTML = '<h1>Error ' + friendlyType + '</h1><p>' + message + "</p><p><a href = 'http://docs.olivetin.app/troubleshooting/err-" + type + ".html' target = 'blank'/>" + type + " error in OliveTin Documentation</a></p>"
  103. if (isFatal) {
  104. bigErrorDialog.innerHTML += '<p>You will need to refresh your browser to clear this message.</p>'
  105. } else {
  106. bigErrorDialog.innerHTML += '<p>This error message will go away automatically if the problem is solved.</p>'
  107. }
  108. bigErrorDialog.showModal()
  109. console.error('Error ' + type + ': ', message)
  110. }
  111. window.clearBigErrors = function () {
  112. bigErrorDialog.close()
  113. }
  114. </script>
  115. <script type = "text/javascript" nomodule>
  116. showBigError("js-modules-not-supported", "Sorry, your browser does not support JavaScript modules.", null)
  117. </script>
  118. <script type = "module" src = "main.js"></script>
  119. <script src = "lib/iconify-icon-2.0.0.min.js"></script>
  120. </body>
  121. </html>