aboutsummaryrefslogtreecommitdiff
path: root/views/admin
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2025-02-02 20:57:31 +0200
committerSyndamia <kamen@syndamia.com>2025-02-02 20:57:31 +0200
commitcea80fb8fafa21f3e8078be720826da2e4642719 (patch)
treef0c0d3d52ab5bd54718f9c9984cd13424e8e1586 /views/admin
parente152b791f45b02c20b00e248f1502bc144e8a9a8 (diff)
downloadnowayforward_human-cea80fb8fafa21f3e8078be720826da2e4642719.tar
nowayforward_human-cea80fb8fafa21f3e8078be720826da2e4642719.tar.gz
nowayforward_human-cea80fb8fafa21f3e8078be720826da2e4642719.zip
feat: Async and queued page archival
Diffstat (limited to 'views/admin')
-rw-r--r--views/admin/index.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/views/admin/index.php b/views/admin/index.php
index 750a246..e633d32 100644
--- a/views/admin/index.php
+++ b/views/admin/index.php
@@ -35,6 +35,24 @@
<input type="submit" value="Delete">
</form>
+ <h2>Archive queue</h2>
+
+ <button id="manual-start">Start worker manually</button>
+ <script type="text/javascript">
+ document.getElementById('manual-start').onclick = function() {
+ var request = new XMLHttpRequest();
+ request.onreadystatechange = function() {
+ if (request.readyState < 4) return;
+
+ console.log(request.responseText);
+ }
+ request.open("POST", "/archive/create", true);
+ request.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
+ request.withCredentials = true;
+ request.send('async=true&url=localhost&manual=true');
+ }
+ </script>
+
<?php else: ?>
<h2>Permission denied, you're not an admin!</h2>