mirror of
https://github.com/OliveTin/OliveTin
synced 2026-08-31 15:05:37 +00:00
* feature: Live command output WIP * cicd: Fix live command output build errors * feature: Live command output WIP, remove stdout/stderr split * feature: Live command output * Restore output im stepExecAfter, rename so to ost for OutputStreamer * Update executor.go * feature: Remove output from log message, bad for long messages, binary output, and security * feature: Live command output WIP
212 lines
6.7 KiB
HTML
212 lines
6.7 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html lang = "en">
|
|
<head>
|
|
<meta charset = "UTF-8" />
|
|
<meta name = "viewport" content = "width=device-width, initial-scale=1.0" />
|
|
<meta name = "description" content = "Give safe and simple access to predefined shell commands from a web interface." />
|
|
|
|
<title>OliveTin</title>
|
|
|
|
<link rel = "stylesheet" type = "text/css" href = "style.css" />
|
|
<link rel = "stylesheet" type = "text/css" href = "theme.css" />
|
|
<link rel = "stylesheet" href = "node_modules/@xterm/xterm/css/xterm.css" />
|
|
|
|
<link rel = "shortcut icon" type = "image/png" href = "OliveTinLogo.png" />
|
|
|
|
<link rel = "apple-touch-icon" sizes="57x57" href="OliveTinLogo-57px.png" />
|
|
<link rel = "apple-touch-icon" sizes="120x120" href="OliveTinLogo-120px.png" />
|
|
<link rel = "apple-touch-icon" sizes="180x180" href="OliveTinLogo-180px.png" />
|
|
</head>
|
|
|
|
<body>
|
|
<header>
|
|
<button id = "sidebar-toggler-button" aria-label = "Open sidebar navigation" aria-pressed = "false" aria-haspopup = "menu">☰</button>
|
|
|
|
<h1 id = "page-title">OliveTin</h1>
|
|
|
|
<nav>
|
|
<ul id = "navigation-links">
|
|
<li title = "Actions">
|
|
<a id = "showActions" href = "#Actions">Actions</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<ul id = "supplemental-links">
|
|
<li title = "Logs">
|
|
<a id = "showLogs" href = "#Logs">Logs</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
|
|
<span id = "username"> </span>
|
|
</header>
|
|
|
|
<main title = "main content">
|
|
<section id = "contentLogs" title = "Logs" hidden>
|
|
<div class = "toolbar">
|
|
<input placeholder = "Search for action name" id = "logSearchBox" />
|
|
<button id = "searchLogsClear" title = "Clear search filter" disabled>X</button>
|
|
</div>
|
|
<table title = "Logs">
|
|
<thead>
|
|
<tr title = "untitled">
|
|
<th>Timestamp</th>
|
|
<th>Log</th>
|
|
<th>Exit Code</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id = "logTableBody" />
|
|
</table>
|
|
</section>
|
|
|
|
<section id = "contentActions" title = "Actions" hidden >
|
|
<fieldset id = "root-group" title = "Actions">
|
|
<legend hidden>Actions</legend>
|
|
</fieldset>
|
|
</section>
|
|
|
|
<noscript>
|
|
<div class = "error">Sorry, JavaScript is required to use OliveTin.</div>
|
|
</noscript>
|
|
</main>
|
|
|
|
<footer title = "footer">
|
|
<p><img title = "application icon" src = "OliveTinLogo.png" alt = "OliveTin logo" height = "1em" class = "logo" /> OliveTin</p>
|
|
<p>
|
|
<a href = "https://docs.olivetin.app" target = "_new">Documentation</a> |
|
|
<a href = "https://github.com/OliveTin/OliveTin/issues/new/choose" target = "_new">Raise an issue on GitHub</a> |
|
|
<span>Version: <span id = "currentVersion">?</span></span> |
|
|
<span>Server connection:
|
|
<span id = "serverConnectionRest">REST</span>,
|
|
<span id = "serverConnectionWebSocket">WebSocket</span>
|
|
</span>
|
|
</p>
|
|
<p>
|
|
<a id = "available-version" href = "http://olivetin.app" target = "_blank" hidden>?</a>
|
|
</p>
|
|
</footer>
|
|
|
|
<dialog title = "Big Error Message" id = "big-error" class = "error padded-content">
|
|
|
|
</dialog>
|
|
|
|
<dialog title = "Execution Results" id = "execution-results-popup">
|
|
<div class = "action-header padded-content">
|
|
<span id = "execution-dialog-icon" class = "icon" role = "img"></span>
|
|
|
|
<h2>
|
|
<span id = "execution-dialog-title">?</span>
|
|
</h2>
|
|
|
|
<button id = "execution-dialog-toggle-size" title = "Toggle dialog size">🗖</button>
|
|
</div>
|
|
<div id = "execution-dialog-basics" class = "padded-content">
|
|
<strong>Started: </strong><span id = "execution-dialog-datetime-started">unknown</span>
|
|
</div>
|
|
<div id = "execution-dialog-details" class = "padded-content">
|
|
<p>
|
|
<strong>Finished: </strong><span id = "execution-dialog-datetime-finished">unknown</span>
|
|
</p>
|
|
<p>
|
|
<strong>Exit Code: </strong><span id = "execution-dialog-exit-code">unknown</span>
|
|
</p>
|
|
<p>
|
|
<strong>Status: </strong><span id = "execution-dialog-status">unknown</span>
|
|
</p>
|
|
</div>
|
|
|
|
<div id = "execution-dialog-output">
|
|
<details id = "execution-dialog-output-details">
|
|
<summary class = "padded-content">Output</summary>
|
|
<div id = "execution-dialog-xterm" />
|
|
</details>
|
|
</div>
|
|
|
|
<div class = "buttons padded-content">
|
|
<button name = "kill" title = "Kill" id = "execution-dialog-kill-action">Kill</button>
|
|
|
|
<form method = "dialog">
|
|
<button name = "Cancel" title = "Close">Close</button>
|
|
</form>
|
|
</div>
|
|
</dialog>
|
|
|
|
<template id = "tplArgumentForm">
|
|
<dialog title = "Arguments" id = "argument-popup">
|
|
<form class = "action-arguments padded-content">
|
|
<div class = "wrapper">
|
|
<div class = "action-header">
|
|
<span class = "icon" role = "img"></span>
|
|
<h2>Argument form</h2>
|
|
</div>
|
|
|
|
<div class = "arguments"></div>
|
|
|
|
<div class = "buttons">
|
|
<input name = "start" type = "submit" value = "Start">
|
|
<button name = "cancel" title = "Cancel">Cancel</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</dialog>
|
|
</template>
|
|
|
|
<template id = "tplActionButton">
|
|
<button>
|
|
<span title = "action button icon" class = "icon">💩</span>
|
|
<span class = "title" aria-live = "polite">Untitled Button</span>
|
|
</button>
|
|
|
|
<div class = "action-button-footer" hidden></div>
|
|
</template>
|
|
|
|
<template id = "tplLogRow">
|
|
<tr class = "log-row">
|
|
<td class = "timestamp">?</td>
|
|
<td>
|
|
<span role = "img" class = "icon"></span>
|
|
<a href = "#" class = "content">?</a>
|
|
|
|
<div class = "tags"></div>
|
|
</td>
|
|
<td class = "exit-code">?</td>
|
|
</tr>
|
|
</template>
|
|
|
|
<script type = "text/javascript">
|
|
const bigErrorDialog = document.getElementById('big-error')
|
|
|
|
/**
|
|
This is the bootstrap code, which relies on very simple, old javascript
|
|
to at least display a helpful error message if we can't use OliveTin.
|
|
*/
|
|
window.showBigError = function (type, friendlyType, message, isFatal) {
|
|
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>"
|
|
|
|
if (isFatal) {
|
|
bigErrorDialog.innerHTML += '<p>You will need to refresh your browser to clear this message.</p>'
|
|
} else {
|
|
bigErrorDialog.innerHTML += '<p>This error message will go away automatically if the problem is solved.</p>'
|
|
}
|
|
|
|
bigErrorDialog.showModal()
|
|
|
|
console.error('Error ' + type + ': ', message)
|
|
}
|
|
|
|
window.clearBigErrors = function () {
|
|
bigErrorDialog.close()
|
|
}
|
|
</script>
|
|
|
|
<script type = "text/javascript" nomodule>
|
|
showBigError("js-modules-not-supported", "Sorry, your browser does not support JavaScript modules.", null)
|
|
</script>
|
|
|
|
<script type = "module" src = "main.js"></script>
|
|
|
|
<script src = "lib/iconify-icon-2.0.0.min.js"></script>
|
|
</body>
|
|
</html>
|