Files
OliveTin/webui.dev/index.html
T

229 lines
7.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" />
<base href = "/" />
</head>
<body>
<header>
<button id = "sidebar-toggler-button" aria-label = "Open sidebar navigation" aria-pressed = "false" aria-haspopup = "menu">&#9776;</button>
<h1 id = "page-title">OliveTin</h1>
<nav hidden>
<ul id = "navigation-links">
<li title = "Actions">
<a id = "showActions">Actions</a>
</li>
</ul>
<ul id = "supplemental-links">
<li title = "Diagnostics">
<a id = "showDiagnostics">Diagnostics</a>
</li>
<li title = "Logs">
<a id = "showLogs">Logs</a>
</li>
</ul>
</nav>
<span id = "username">&nbsp;</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>Action</th>
<th>Tags</th>
<th>Status</th>
</tr>
</thead>
<tbody id = "logTableBody" />
</table>
</section>
<section id = "contentDiagnostics" title = "Diagnostics" hidden>
<div id = "diagnostics" class = "ta-left">
<p><strong>Note:</strong> Diagnostics are only generated on OliveTin startup - they are not updated in real-time or when you refresh this page. They are intended as a "quick reference" to help you.</p>
<p>If you are having problems with OliveTin and want to raise a support request, please don't take a screenshot or copy text from this page, but instead it is highly recommended to include a <a href = "https://docs.olivetin.app/sosreport.html">sosreport</a> which is more detailed, and makes it easier to help you.</p>
<table>
<tbody>
<th colspan = "0">SSH</th>
<tr>
<td>Found Key</td>
<td id = "diagnostics-sshfoundkey">?</td>
</tr>
<tr>
<td>Found Config</td>
<td id = "diagnostics-sshfoundconfig">?</td>
</tbody>
</table>
</div>
</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">
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M3 3h6v2H6.462l4.843 4.843l-1.415 1.414L5 6.367V9H3zm0 18h6v-2H6.376l4.929-4.928l-1.415-1.414L5 17.548V15H3zm12 0h6v-6h-2v2.524l-4.867-4.866l-1.414 1.414L17.647 19H15zm6-18h-6v2h2.562l-4.843 4.843l1.414 1.414L19 6.39V9h2z"/></svg>
</button>
</div>
<div id = "execution-dialog-basics" class = "padded-content-sides">
<strong>Duration: </strong><span id = "execution-dialog-duration">unknown</span>
</div>
<div id = "execution-dialog-details" class = "padded-content-sides">
<p>
<strong>Status: </strong><span id = "execution-dialog-status">unknown</span>
</p>
</div>
<div id = "execution-dialog-xterm"></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">&#x1f4a9;</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 = "javascript:void(0)" class = "content">?</a>
</td>
<td class = "tags"></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>