index.html 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. <!DOCTYPE html>
  2. <html lang = "en">
  3. <head>
  4. <meta name = "viewport" content = "width=device-width, initial-scale=1.0">
  5. <meta name = "description" content = "Give safe and simple access to predefined shell commands from a web interface." />
  6. <title>OliveTin</title>
  7. <link rel = "stylesheet" type = "text/css" href = "style.css" />
  8. <link rel = "shortcut icon" type = "image/png" href = "OliveTinLogo.png" />
  9. <link rel = "apple-touch-icon" sizes="57x57" href="OliveTinLogo-57px.png" />
  10. <link rel = "apple-touch-icon" sizes="120x120" href="OliveTinLogo-120px.png" />
  11. <link rel = "apple-touch-icon" sizes="180x180" href="OliveTinLogo-180px.png" />
  12. </head>
  13. <body>
  14. <header>
  15. <button id = "sidebar-toggler-button" aria-label = "Open sidebar navigation" aria-pressed = "false" aria-haspopup = "menu">&#9776;</button>
  16. <h1 id = "page-title">OliveTin</h1>
  17. <nav>
  18. <ul id = "navigation-links">
  19. <li title = "Actions">
  20. <a id = "showActions" href = "#actions">Actions</a>
  21. </li>
  22. </ul>
  23. <ul id = "supplemental-links">
  24. <li title = "Logs">
  25. <a id = "showLogs" href = "#logs">Logs</a>
  26. </li>
  27. </ul>
  28. </nav>
  29. </header>
  30. <main title = "main content">
  31. <section id = "contentLogs" title = "Logs" hidden>
  32. <div class = "toolbar">
  33. <input placeholder = "Search for action name" id = "logSearchBox" />
  34. <button id = "searchLogsClear" title = "Clear search filter" disabled>X</button>
  35. </div>
  36. <table title = "Logs">
  37. <thead>
  38. <tr title = "untitled">
  39. <th>Timestamp</th>
  40. <th>Log</th>
  41. <th>Exit Code</th>
  42. </tr>
  43. </thead>
  44. <tbody id = "logTableBody" />
  45. </table>
  46. </section>
  47. <section id = "contentActions" title = "Actions" hidden >
  48. <fieldset id = "root-group" title = "Actions">
  49. <legend hidden>Actions</legend>
  50. </fieldset>
  51. </section>
  52. <noscript>
  53. <div class = "error">Sorry, JavaScript is required to use OliveTin.</div>
  54. </noscript>
  55. </main>
  56. <footer title = "footer">
  57. <p><img title = "application icon" src = "OliveTinLogo.png" alt = "OliveTin logo" height = "1em" class = "logo" /> OliveTin</p>
  58. <p>
  59. <a href = "https://docs.olivetin.app" target = "_new">Documentation</a> |
  60. <a href = "https://github.com/OliveTin/OliveTin/issues/new/choose" target = "_new">Raise an issue on GitHub</a> |
  61. <span>Version: <span id = "currentVersion">?</span></span> |
  62. <span>Server connection:
  63. <span id = "serverConnectionRest">REST</span>,
  64. <span id = "serverConnectionWebSocket">WebSocket</span>
  65. </span>
  66. </p>
  67. <p>
  68. <a id = "available-version" href = "http://olivetin.app" target = "_blank" hidden>?</a>
  69. </p>
  70. </footer>
  71. <dialog title = "Big Error Message" id = "big-error" class = "error">
  72. </dialog>
  73. <dialog title = "Execution Results" id = "execution-results-popup">
  74. <div class = "action-header">
  75. <span id = "execution-dialog-icon" class = "icon" role = "img"></span>
  76. <h2>
  77. <span id = "execution-dialog-title">?</span>
  78. </h2>
  79. <button id = "execution-dialog-toggle-size" title = "Toggle dialog size">&#128470;</button>
  80. </div>
  81. <div id = "execution-dialog-basics">
  82. <strong>Started: </strong><span id = "execution-dialog-datetime-started">unknown</span>
  83. </div>
  84. <div id = "execution-dialog-details">
  85. <p>
  86. <strong>Finished: </strong><span id = "execution-dialog-datetime-finished">unknown</span>
  87. </p>
  88. <p>
  89. <strong>Exit Code: </strong><span id = "execution-dialog-exit-code">unknown</span>
  90. </p>
  91. <p>
  92. <strong>Status: </strong><span id = "execution-dialog-status">unknown</span>
  93. </p>
  94. </div>
  95. <div id = "execution-dialog-output">
  96. <details>
  97. <summary>Standard Output</summary>
  98. <pre id = "execution-dialog-stdout">?</pre>
  99. </details>
  100. <details>
  101. <summary>Standard Error</summary>
  102. <pre id = "execution-dialog-stderr">?</pre>
  103. </details>
  104. </div>
  105. <form method = "dialog">
  106. <div class = "buttons">
  107. <button name = "Cancel" title = "Close">Close</button>
  108. </div>
  109. </form>
  110. </dialog>
  111. <template id = "tplArgumentForm">
  112. <dialog title = "Arguments" id = "argument-popup">
  113. <form class = "action-arguments">
  114. <div class = "wrapper">
  115. <div class = "action-header">
  116. <span class = "icon" role = "img"></span>
  117. <h2>Argument form</h2>
  118. </div>
  119. <div class = "arguments"></div>
  120. <div class = "buttons">
  121. <input name = "start" type = "submit" value = "Start">
  122. <button name = "cancel" title = "Cancel">Cancel</button>
  123. </div>
  124. </div>
  125. </form>
  126. </dialog>
  127. </template>
  128. <template id = "tplActionButton">
  129. <button>
  130. <span title = "action button icon" class = "icon">&#x1f4a9;</span>
  131. <span class = "title" aria-live = "polite">Untitled Button</span>
  132. </button>
  133. <div class = "action-button-footer" hidden></div>
  134. </template>
  135. <template id = "tplLogRow">
  136. <tr class = "log-row">
  137. <td class = "timestamp">?</td>
  138. <td>
  139. <span role = "img" class = "icon"></span>
  140. <a href = "#" class = "content">?</a>
  141. <details>
  142. <summary>stdout</summary>
  143. <pre class = "stdout">?</pre>
  144. </details>
  145. <details>
  146. <summary>stderr</summary>
  147. <pre class = "stderr">?</pre>
  148. </details>
  149. <div class = "tags"></div>
  150. </td>
  151. <td class = "exit-code">?</td>
  152. </tr>
  153. </template>
  154. <script type = "text/javascript">
  155. const bigErrorDialog = document.getElementById('big-error')
  156. /**
  157. This is the bootstrap code, which relies on very simple, old javascript
  158. to at least display a helpful error message if we can't use OliveTin.
  159. */
  160. window.showBigError = function (type, friendlyType, message, isFatal) {
  161. bigErrorDialog.innerHTML = '<h1>Error ' + friendlyType + '</h1><p>' + message + "</p><p><a href = 'http://docs.olivetin.app/err-" + type + ".html' target = 'blank'/>" + type + " error in OliveTin Documentation</a></p>"
  162. if (isFatal) {
  163. bigErrorDialog.innerHTML += '<p>You will need to refresh your browser to clear this message.</p>'
  164. } else {
  165. bigErrorDialog.innerHTML += '<p>This error message will go away automatically if the problem is solved.</p>'
  166. }
  167. bigErrorDialog.showModal()
  168. console.error('Error ' + type + ': ', message)
  169. }
  170. window.clearBigErrors = function () {
  171. bigErrorDialog.close()
  172. }
  173. </script>
  174. <script type = "text/javascript" nomodule>
  175. showBigError("js-modules-not-supported", "Sorry, your browser does not support JavaScript modules.", null)
  176. </script>
  177. <script type = "module" src = "main.js"></script>
  178. <script src = "lib/iconify-icon-2.0.0.min.js"></script>
  179. </body>
  180. </html>