index.html 7.8 KB

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