faaso/public/index.html

107 lines
3.5 KiB
HTML
Raw Permalink Normal View History

2024-07-02 22:02:05 +00:00
<!DOCTYPE html>
2024-07-03 23:54:19 +00:00
2024-07-02 14:27:27 +00:00
<head>
2024-07-02 22:02:05 +00:00
<meta charset="utf-8" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@1/css/pico.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.colors.min.css" /> <script src="https://unpkg.com/htmx.org@2.0.0"></script>
2024-07-02 22:02:05 +00:00
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
2024-07-03 23:54:19 +00:00
<body>
2024-07-02 22:02:05 +00:00
<header class="container">
2024-07-03 23:54:19 +00:00
<h1>FaaSO Admin Interface</h1>
</header>
<article>
<nav>
<ul>
<li><strong style="font-size: 200%;">Your Funko Collection</strong></li>
</ul>
<ul>
<li><button id="update-funkos" style="float:right; display:inline;" hx-trigger="load, click, every 60s"
2024-07-03 23:54:19 +00:00
hx-get="funkos/?format=html" hx-target="#funko-list">
Refresh
</button>
</ul>
</nav>
<span id="message"></span>
<table hx-target="#message" class="striped">
<thead>
<tr>
<th>Name</th>
2024-07-04 20:48:22 +00:00
<th>Instances</th>
2024-07-03 18:45:55 +00:00
<th>Actions</th>
</tr>
</thead>
2024-07-02 15:40:47 +00:00
<tbody id="funko-list">
</tbody>
</table>
<div id="terminal" style="resize: vertical; overflow: auto;"></div>
</article>
<script>
2024-07-03 23:54:19 +00:00
update_funkos = function () {
document.getElementById("update-funkos").click()
}
</script>
<article>
<nav>
<ul>
<li><strong style="font-size: 200%;">Your Secrets</strong>
</ul>
<ul>
<li><button id="update-secrets" style="float:right; display:inline;" hx-trigger="load, click, every 60s"
2024-07-03 23:54:19 +00:00
hx-get="secrets/?format=html" hx-target="#secret-list">
Refresh
</button>
<li><button style="float:right; display:inline;" onclick="show_new_secret()">
2024-07-03 23:54:19 +00:00
Add
</button>
</ul>
</nav>
2024-07-03 23:54:19 +00:00
<span id="message"></span>
<table hx-target="#message">
<thead>
<tr>
<th>Funko</th>
<th>Name</th>
<th>Actions</th>
</tr>
</thead>
<tbody id="secret-list">
</tbody>
<dialog id="add-secret">
<article>
<header>
New Secret
</header>
2024-07-03 23:54:19 +00:00
<form hx-post="secrets/">
<input placeholder="funko name" id="new-secret-funko" name="funko">
<input placeholder="secret name" id="new-secret-name" name="name">
<input placeholder="secret value" type="password" id="new-secret-password" name="value">
<fieldset role="group" style="text-align: right;">
<button style="width:9em; display: inline;" type="submit" hx-on:htmx:after-request="hide_new_secret()">CREATE</button>
<button style="width:9em; display: inline;" onclick="hide_new_secret(); close();" aria-label="Close" rel="prev">CLOSE</button>
</fieldset>
2024-07-03 23:54:19 +00:00
</form>
</article>
2024-07-03 23:54:19 +00:00
</dialog>
<script>
update_secrets = function() {
document.getElementById("update-secrets").click()
}
show_new_secret = function() {
document.getElementById('new-secret-funko').value=""
2024-07-04 13:38:15 +00:00
document.getElementById('new-secret-name').value=""
document.getElementById('new-secret-password').value=""
2024-07-03 23:54:19 +00:00
document.getElementById('add-secret').show()
}
hide_new_secret = function() {
document.getElementById('new-secret-funko').value=""
2024-07-04 13:38:15 +00:00
document.getElementById('new-secret-name').value=""
document.getElementById('new-secret-password').value=""
2024-07-03 23:58:02 +00:00
document.getElementById('add-secret').close()
2024-07-04 13:38:15 +00:00
update_secrets()
2024-07-03 23:54:19 +00:00
}
</script>
</article>
2024-07-09 01:02:47 +00:00
</body>