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-09 23:37:43 +00:00
|
|
|
<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">
|
2024-07-03 01:20:12 +00:00
|
|
|
</head>
|
2024-07-03 23:54:19 +00:00
|
|
|
|
2024-07-03 01:20:12 +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>
|
2024-07-03 01:20:12 +00:00
|
|
|
</header>
|
2024-07-09 23:37:43 +00:00
|
|
|
<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>
|
2024-07-09 23:37:43 +00:00
|
|
|
</ul>
|
|
|
|
</nav>
|
2024-07-03 01:20:12 +00:00
|
|
|
<span id="message"></span>
|
2024-07-09 23:37:43 +00:00
|
|
|
<table hx-target="#message" class="striped">
|
2024-07-03 01:20:12 +00:00
|
|
|
<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>
|
2024-07-03 01:20:12 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
2024-07-02 15:40:47 +00:00
|
|
|
<tbody id="funko-list">
|
|
|
|
</tbody>
|
2024-07-03 01:20:12 +00:00
|
|
|
</table>
|
2024-07-04 17:44:16 +00:00
|
|
|
<div id="terminal" style="resize: vertical; overflow: auto;"></div>
|
2024-07-09 23:37:43 +00:00
|
|
|
</article>
|
2024-07-03 01:20:12 +00:00
|
|
|
<script>
|
2024-07-03 23:54:19 +00:00
|
|
|
update_funkos = function () {
|
2024-07-03 01:20:12 +00:00
|
|
|
document.getElementById("update-funkos").click()
|
|
|
|
}
|
|
|
|
</script>
|
2024-07-09 23:37:43 +00:00
|
|
|
<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>
|
2024-07-09 23:37:43 +00:00
|
|
|
<li><button style="float:right; display:inline;" onclick="show_new_secret()">
|
2024-07-03 23:54:19 +00:00
|
|
|
Add
|
|
|
|
</button>
|
2024-07-09 23:37:43 +00:00
|
|
|
</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">
|
2024-07-09 23:37:43 +00:00
|
|
|
<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">
|
2024-07-09 23:37:43 +00:00
|
|
|
<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>
|
2024-07-09 23:37:43 +00:00
|
|
|
</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>
|
2024-07-09 23:37:43 +00:00
|
|
|
</article>
|
2024-07-09 01:02:47 +00:00
|
|
|
</body>
|