index.html 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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. <div class = "toolbar">
  31. <input placeholder = "Search for action name" id = "logSearchBox" />
  32. <button id = "searchLogsClear" title = "Clear search filter" disabled>X</button>
  33. </div>
  34. <table title = "Logs">
  35. <thead>
  36. <tr title = "untitled">
  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:
  60. <span id = "serverConnectionRest">REST</span>,
  61. <span id = "serverConnectionWebSocket">WebSocket</span>
  62. </span>
  63. </p>
  64. <p>
  65. <a id = "available-version" href = "http://olivetin.app" target = "_blank" hidden>?</a>
  66. </p>
  67. </footer>
  68. <dialog title = "Execution Results" id = "execution-results-popup">
  69. <div class = "action-header">
  70. <span class = "icon" role = "icon"></span>
  71. <h2>Log:
  72. <span class = "title">?</span>
  73. </h2>
  74. </div>
  75. <p>
  76. <strong>Started: </strong><span class = "datetimeStarted">unknown</span>.
  77. <strong>Finished: </strong><span class = "datetimeFinished">unknown</span>
  78. </p>
  79. <p>
  80. <strong>Exit Code: </strong><span class = "exitCode">unknown</span>
  81. </p>
  82. <p>
  83. <strong>Status: </strong><span class = "status">unknown</span>
  84. </p>
  85. <details>
  86. <summary>stdout</summary>
  87. <pre class = "stdout">
  88. ?
  89. </pre>
  90. </details>
  91. <details>
  92. <summary>stderr</summary>
  93. <pre class = "stderr">
  94. ?
  95. </pre>
  96. </details>
  97. <form method = "dialog">
  98. <button name = "cancel">Close</button>
  99. </form>
  100. </dialog>
  101. <template id = "tplArgumentForm">
  102. <dialog title = "Arguments" id = "argument-popup">
  103. <form class = "action-arguments">
  104. <div class = "wrapper">
  105. <div class = "action-header">
  106. <span class = "icon" role = "icon"></span>
  107. <h2>Argument form</h2>
  108. </div>
  109. <div class = "arguments"></div>
  110. <div class = "buttons">
  111. <input name = "start" type = "submit" value = "Start">
  112. <button name = "cancel">Cancel</button>
  113. </div>
  114. </div>
  115. </form>
  116. </button>
  117. </template>
  118. <template id = "tplActionButton">
  119. <button>
  120. <span role = "icon" title = "action button icon" class = "icon">&#x1f4a9;</span>
  121. <span role = "title" class = "title">Untitled Button</span>
  122. </button>
  123. <div class = "action-button-footer">
  124. </div>
  125. </template>
  126. <template id = "tplLogRow">
  127. <tr class = "log-row">
  128. <td class = "timestamp">?</td>
  129. <td>
  130. <span class = "icon" role = "icon"></span>
  131. <span class = "content">?</span>
  132. <details>
  133. <summary>stdout</summary>
  134. <pre class = "stdout">
  135. ?
  136. </pre>
  137. </details>
  138. <details>
  139. <summary>stderr</summary>
  140. <pre class = "stderr">
  141. ?
  142. </pre>
  143. </details>
  144. <div class = "tags"></div>
  145. </td>
  146. <td class = "exit-code">?</td>
  147. </tr>
  148. </template>
  149. <script type = "text/javascript">
  150. /**
  151. This is the bootstrap code, which relies on very simple, old javascript
  152. to at least display a helpful error message if we can't use OliveTin.
  153. */
  154. function showBigError (type, friendlyType, message) {
  155. clearBigErrors(type)
  156. console.error('Error ' + type + ': ', message)
  157. const domErr = document.createElement('div')
  158. domErr.classList.add('error')
  159. domErr.classList.add(type)
  160. 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>"
  161. document.body.prepend(domErr)
  162. }
  163. function clearBigErrors(additionalClass) {
  164. let selector = 'div.error'
  165. if (additionalClass != null) {
  166. selector += '.' + additionalClass
  167. }
  168. for (const oldError of document.querySelectorAll(selector).values()) {
  169. window.old = oldError;
  170. oldError.remove();
  171. }
  172. }
  173. </script>
  174. <script type = "text/javascript" nomodule>
  175. showBigError("js-modules-not-supported", "Sorry, your browser does not support JavaScript modules.", null)
  176. </script>
  177. <script type = "module" src = "main.js"></script>
  178. </body>
  179. </html>