faaso/public/index.html

92 lines
2.9 KiB
HTML
Raw 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" />
2024-07-02 15:40:47 +00:00
<link rel="stylesheet" href="https://matcha.mizu.sh/matcha.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>
<main class=container>
2024-07-03 23:54:19 +00:00
<h2>Your Funko Collection
<button id="update-funkos" style="float:right; display:inline;" hx-trigger="load, click, every 60s"
hx-get="funkos/?format=html" hx-target="#funko-list">
Refresh
</button>
</h2>
<span id="message"></span>
<table hx-target="#message">
<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>
</main>
<script>
2024-07-03 23:54:19 +00:00
update_funkos = function () {
document.getElementById("update-funkos").click()
}
</script>
2024-07-03 23:54:19 +00:00
<main class=container>
<h2>
Your Secrets
<button id="update-secrets" style="float:right; display:inline;" hx-trigger="load, click, every 60s"
hx-get="secrets/?format=html" hx-target="#secret-list">
Refresh
</button>
<button style="float:right; display:inline;" onclick="show_new_secret()">
Add
</button>
</h2>
<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">
<topic>New Secret</topic>
<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">
2024-07-04 13:38:15 +00:00
<button type="submit" hx-on:htmx:after-request="hide_new_secret()">CREATE</button>
2024-07-03 23:54:19 +00:00
</form>
2024-07-04 13:38:15 +00:00
<button onclick="hide_new_secret(); close();">CLOSE</button>
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>
</main>
2024-07-09 01:02:47 +00:00
</body>