index.html 5.5 KB

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