index.html 6.7 KB

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