index.html 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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 = "style.css" />
  9. <link rel = "stylesheet" type = "text/css" href = "theme.css" />
  10. <link rel = "stylesheet" href = "node_modules/@xterm/xterm/css/xterm.css" />
  11. <link rel = "shortcut icon" type = "image/png" href = "OliveTinLogo.png" />
  12. <link rel = "apple-touch-icon" sizes="57x57" href="OliveTinLogo-57px.png" />
  13. <link rel = "apple-touch-icon" sizes="120x120" href="OliveTinLogo-120px.png" />
  14. <link rel = "apple-touch-icon" sizes="180x180" href="OliveTinLogo-180px.png" />
  15. </head>
  16. <body>
  17. <header>
  18. <button id = "sidebar-toggler-button" aria-label = "Open sidebar navigation" aria-pressed = "false" aria-haspopup = "menu">&#9776;</button>
  19. <h1 id = "page-title">OliveTin</h1>
  20. <nav>
  21. <ul id = "navigation-links">
  22. <li title = "Actions">
  23. <a id = "showActions" href = "#Actions">Actions</a>
  24. </li>
  25. </ul>
  26. <ul id = "supplemental-links">
  27. <li title = "Diagnostics">
  28. <a id = "showDiagnostics" href = "#Diagnostics">Diagnostics</a>
  29. </li>
  30. <li title = "Logs">
  31. <a id = "showLogs" href = "#Logs">Logs</a>
  32. </li>
  33. </ul>
  34. </nav>
  35. <span id = "username">&nbsp;</span>
  36. </header>
  37. <main title = "main content">
  38. <section id = "contentLogs" title = "Logs" hidden>
  39. <div class = "toolbar">
  40. <input placeholder = "Search for action name" id = "logSearchBox" />
  41. <button id = "searchLogsClear" title = "Clear search filter" disabled>X</button>
  42. </div>
  43. <table title = "Logs">
  44. <thead>
  45. <tr title = "untitled">
  46. <th>Timestamp</th>
  47. <th>Log</th>
  48. <th>Exit Code</th>
  49. </tr>
  50. </thead>
  51. <tbody id = "logTableBody" />
  52. </table>
  53. </section>
  54. <section id = "contentDiagnostics" title = "Diagnostics" hidden>
  55. <h2>Diagnostics</h2>
  56. <div id = "diagnostics" class = "ta-left">
  57. <p><strong>Note:</strong> Diagnostics are only generated on OliveTin startup - they are not updated in real-time or when you refresh this page. They are intended as a "quick reference" to help you.</p>
  58. <p>If you are having problems with OliveTin and want to raise a support request, please don't take a screenshot or copy text from this page, but instead it is highly recommended to include a <a href = "https://docs.olivetin.app/sosreport.html">sosreport</a> which is more detailed, and makes it easier to help you.</p>
  59. <table>
  60. <tbody>
  61. <th colspan = "0">SSH</th>
  62. <tr>
  63. <td>Found Key</td>
  64. <td id = "diagnostics-sshfoundkey">?</td>
  65. </tr>
  66. <tr>
  67. <td>Found Config</td>
  68. <td id = "diagnostics-sshfoundconfig">?</td>
  69. </tbody>
  70. </table>
  71. </div>
  72. </section>
  73. <section id = "contentActions" title = "Actions" hidden >
  74. <fieldset id = "root-group" title = "Actions">
  75. <legend hidden>Actions</legend>
  76. </fieldset>
  77. </section>
  78. <noscript>
  79. <div class = "error">Sorry, JavaScript is required to use OliveTin.</div>
  80. </noscript>
  81. </main>
  82. <footer title = "footer">
  83. <p><img title = "application icon" src = "OliveTinLogo.png" alt = "OliveTin logo" height = "1em" class = "logo" /> OliveTin</p>
  84. <p>
  85. <a href = "https://docs.olivetin.app" target = "_new">Documentation</a> |
  86. <a href = "https://github.com/OliveTin/OliveTin/issues/new/choose" target = "_new">Raise an issue on GitHub</a> |
  87. <span>Version: <span id = "currentVersion">?</span></span> |
  88. <span>Server connection:
  89. <span id = "serverConnectionRest">REST</span>,
  90. <span id = "serverConnectionWebSocket">WebSocket</span>
  91. </span>
  92. </p>
  93. <p>
  94. <a id = "available-version" href = "http://olivetin.app" target = "_blank" hidden>?</a>
  95. </p>
  96. </footer>
  97. <dialog title = "Big Error Message" id = "big-error" class = "error padded-content">
  98. </dialog>
  99. <dialog title = "Execution Results" id = "execution-results-popup">
  100. <div class = "action-header padded-content">
  101. <span id = "execution-dialog-icon" class = "icon" role = "img"></span>
  102. <h2>
  103. <span id = "execution-dialog-title">?</span>
  104. </h2>
  105. <button id = "execution-dialog-toggle-size" title = "Toggle dialog size">&#128470;</button>
  106. </div>
  107. <div id = "execution-dialog-basics" class = "padded-content">
  108. <strong>Started: </strong><span id = "execution-dialog-datetime-started">unknown</span>
  109. </div>
  110. <div id = "execution-dialog-details" class = "padded-content">
  111. <p>
  112. <strong>Finished: </strong><span id = "execution-dialog-datetime-finished">unknown</span>
  113. </p>
  114. <p>
  115. <strong>Exit Code: </strong><span id = "execution-dialog-exit-code">unknown</span>
  116. </p>
  117. <p>
  118. <strong>Status: </strong><span id = "execution-dialog-status">unknown</span>
  119. </p>
  120. </div>
  121. <div id = "execution-dialog-output">
  122. <details id = "execution-dialog-output-details">
  123. <summary class = "padded-content">Output</summary>
  124. <div id = "execution-dialog-xterm" />
  125. </details>
  126. </div>
  127. <div class = "buttons padded-content">
  128. <button name = "kill" title = "Kill" id = "execution-dialog-kill-action">Kill</button>
  129. <form method = "dialog">
  130. <button name = "Cancel" title = "Close">Close</button>
  131. </form>
  132. </div>
  133. </dialog>
  134. <template id = "tplArgumentForm">
  135. <dialog title = "Arguments" id = "argument-popup">
  136. <form class = "action-arguments padded-content">
  137. <div class = "wrapper">
  138. <div class = "action-header">
  139. <span class = "icon" role = "img"></span>
  140. <h2>Argument form</h2>
  141. </div>
  142. <div class = "arguments"></div>
  143. <div class = "buttons">
  144. <input name = "start" type = "submit" value = "Start">
  145. <button name = "cancel" title = "Cancel">Cancel</button>
  146. </div>
  147. </div>
  148. </form>
  149. </dialog>
  150. </template>
  151. <template id = "tplActionButton">
  152. <button>
  153. <span title = "action button icon" class = "icon">&#x1f4a9;</span>
  154. <span class = "title" aria-live = "polite">Untitled Button</span>
  155. </button>
  156. <div class = "action-button-footer" hidden></div>
  157. </template>
  158. <template id = "tplLogRow">
  159. <tr class = "log-row">
  160. <td class = "timestamp">?</td>
  161. <td>
  162. <span role = "img" class = "icon"></span>
  163. <a href = "#" class = "content">?</a>
  164. <div class = "tags"></div>
  165. </td>
  166. <td class = "exit-code">?</td>
  167. </tr>
  168. </template>
  169. <script type = "text/javascript">
  170. const bigErrorDialog = document.getElementById('big-error')
  171. /**
  172. This is the bootstrap code, which relies on very simple, old javascript
  173. to at least display a helpful error message if we can't use OliveTin.
  174. */
  175. window.showBigError = function (type, friendlyType, message, isFatal) {
  176. 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>"
  177. if (isFatal) {
  178. bigErrorDialog.innerHTML += '<p>You will need to refresh your browser to clear this message.</p>'
  179. } else {
  180. bigErrorDialog.innerHTML += '<p>This error message will go away automatically if the problem is solved.</p>'
  181. }
  182. bigErrorDialog.showModal()
  183. console.error('Error ' + type + ': ', message)
  184. }
  185. window.clearBigErrors = function () {
  186. bigErrorDialog.close()
  187. }
  188. </script>
  189. <script type = "text/javascript" nomodule>
  190. showBigError("js-modules-not-supported", "Sorry, your browser does not support JavaScript modules.", null)
  191. </script>
  192. <script type = "module" src = "main.js"></script>
  193. <script src = "lib/iconify-icon-2.0.0.min.js"></script>
  194. </body>
  195. </html>