index.html 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  5. <title>OliveTin</title>
  6. <link rel = "stylesheet" type = "text/css" href = "style.css" />
  7. <link rel = "shortcut icon" type = "image/png" href = "OliveTinLogo.png" />
  8. <link rel = "apple-touch-icon" sizes="57x57" href="OliveTinLogo-57px.png" />
  9. <link rel = "apple-touch-icon" sizes="120x120" href="OliveTinLogo-120px.png" />
  10. <link rel = "apple-touch-icon" sizes="180x180" href="OliveTinLogo-180px.png" />
  11. </head>
  12. <body>
  13. <main title = "main content">
  14. <div id = "perma-widget" hidden>
  15. <div id = "sidebar-toggle-wrapper">
  16. <label for = "sidebar-toggler" id = "sidebar-toggler-button" title = "Toggle sidebar" tabindex = "0">&#9776;</label>
  17. </div>
  18. <h1 id = "page-title">OliveTin</h1>
  19. </div>
  20. <div id = "content-sidebar">
  21. <input type = "checkbox" id = "sidebar-toggler" hidden checked />
  22. <aside>
  23. <ul>
  24. <li>Foo</li>
  25. <li>Bar</li>
  26. </ul>
  27. </aside>
  28. </div>
  29. <fieldset id = "section-switcher" title = "Sections">
  30. <button id = "showActions">Actions</button>
  31. <button id = "showLogs">Logs</button>
  32. </fieldset>
  33. <section id = "contentLogs" title = "Logs" hidden>
  34. <table title = "Logs">
  35. <thead>
  36. <tr>
  37. <th>Timestamp</th>
  38. <th>Log</th>
  39. <th>Exit Code</th>
  40. </tr>
  41. </thead>
  42. <tbody id = "logTableBody" />
  43. </table>
  44. </section>
  45. <section id = "contentActions" title = "Actions" hidden >
  46. <fieldset id = "root-group" title = "Dashboard of buttons">
  47. </fieldset>
  48. </section>
  49. <noscript>
  50. <div class = "error">Sorry, JavaScript is required to use OliveTin.</div>
  51. </noscript>
  52. </main>
  53. <footer title = "footer">
  54. <p><img title = "application icon" src = "OliveTinLogo.png" alt = "OliveTin logo" height = "1em" class = "logo" /> OliveTin</p>
  55. <p>
  56. <a href = "https://docs.olivetin.app" target = "_new">Documentation</a> |
  57. <a href = "https://github.com/OliveTin/OliveTin/issues/new/choose" target = "_new">Raise an issue on GitHub</a> |
  58. <span>Version: <span id = "currentVersion">?</span></span> |
  59. <span>Server connection: <span id = "serverConnection">?</span></span>
  60. </p>
  61. <p>
  62. <a id = "available-version" href = "http://olivetin.app" target = "_blank" hidden>?</a>
  63. </p>
  64. </footer>
  65. <dialog id = "executionResults">
  66. <div class = "action-header">
  67. <span class = "icon" role = "icon"></span>
  68. <h2>Log:
  69. <span class = "title">?</span>
  70. </h2>
  71. </div>
  72. <p>
  73. <strong>Started: </strong><span class = "datetimeStarted">unknown</span>.
  74. <strong>Finished: </strong><span class = "datetimeFinished">unknown</span>
  75. </p>
  76. <p>
  77. <strong>Exit Code: </strong><span class = "exitCode">unknown</span>
  78. </p>
  79. <p>
  80. <strong>Status: </strong><span class = "status">unknown</span>
  81. </p>
  82. <details>
  83. <summary>stdout</summary>
  84. <pre class = "stdout">
  85. ?
  86. </pre>
  87. </details>
  88. <details>
  89. <summary>stderr</summary>
  90. <pre class = "stderr">
  91. ?
  92. </pre>
  93. </details>
  94. <form method = "dialog">
  95. <button name = "cancel">Close</button>
  96. </form>
  97. </dialog>
  98. <template id = "tplArgumentForm">
  99. <dialog>
  100. <form class = "action-arguments">
  101. <div class = "wrapper">
  102. <div class = "action-header">
  103. <span class = "icon" role = "icon"></span>
  104. <h2>Argument form</h2>
  105. </div>
  106. <div class = "arguments"></div>
  107. <div class = "buttons">
  108. <input name = "start" type = "submit" value = "Start">
  109. <button name = "cancel">Cancel</button>
  110. </div>
  111. </div>
  112. </form>
  113. </button>
  114. </template>
  115. <template id = "tplActionButton">
  116. <div>
  117. <button>
  118. <span role = "icon" title = "button icon" class = "icon">&#x1f4a9;</span>
  119. <span role = "title" class = "title">Untitled Button</span>
  120. </button>
  121. <div class = "executions">
  122. </div>
  123. </div>
  124. </template>
  125. <template id = "tplLogRow">
  126. <tr class = "log-row">
  127. <td class = "timestamp">?</td>
  128. <td>
  129. <span class = "icon" role = "icon"></span>
  130. <span class = "content">?</span>
  131. <details>
  132. <summary>stdout</summary>
  133. <pre class = "stdout">
  134. ?
  135. </pre>
  136. </details>
  137. <details>
  138. <summary>stderr</summary>
  139. <pre class = "stderr">
  140. ?
  141. </pre>
  142. </details>
  143. <div class = "tags"></div>
  144. </td>
  145. <td class = "exit-code">?</td>
  146. </tr>
  147. </template>
  148. <script type = "text/javascript">
  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. function showBigError (type, friendlyType, message) {
  154. for (const oldError of document.querySelectorAll('div.error').values()) {
  155. window.old = oldError;
  156. oldError.remove();
  157. }
  158. console.error('Error ' + type + ': ', message)
  159. const domErr = document.createElement('div')
  160. domErr.classList.add('error')
  161. domErr.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. document.getElementById('root-group').appendChild(domErr)
  163. }
  164. </script>
  165. <script type = "text/javascript" nomodule>
  166. showBigError("js-modules-not-supported", "Sorry, your browser does not support JavaScript modules.", null)
  167. </script>
  168. <script type = "module" src = "main.js"></script>
  169. <script type = "module" src = "js/websocket.js"></script>
  170. </body>
  171. </html>