summaryrefslogtreecommitdiff
path: root/modules/up_log/index.html
diff options
context:
space:
mode:
authorTom Smeding <t.j.smeding@uu.nl>2025-07-31 13:30:11 +0200
committerTom Smeding <t.j.smeding@uu.nl>2025-07-31 13:30:11 +0200
commite6cd47ba5233dce8af2aacde02ca1533a25493be (patch)
tree1178df3ca96d3b241a87e808c6be4ff98fefd873 /modules/up_log/index.html
parent8b3c8795cffe922bfc5ab5962dce19b4804abd68 (diff)
up_log: Expose log data via webpageHEADmaster
Diffstat (limited to 'modules/up_log/index.html')
-rw-r--r--modules/up_log/index.html37
1 files changed, 37 insertions, 0 deletions
diff --git a/modules/up_log/index.html b/modules/up_log/index.html
new file mode 100644
index 0000000..d8371d9
--- /dev/null
+++ b/modules/up_log/index.html
@@ -0,0 +1,37 @@
+<!doctype html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Uplog</title>
+<style>
+#log {
+ border: 1px gray solid;
+}
+</style>
+<script>
+function get() {
+ var xhr = new XMLHttpRequest();
+ xhr.open("GET", location.href + "/log/" + document.getElementById("count").value);
+ xhr.responseType = "text";
+ xhr.onreadystatechange = function() {
+ if (xhr.readyState == 4) {
+ if (xhr.status == 200) {
+ document.getElementById("log").innerHTML = "";
+ document.getElementById("log").appendChild(document.createTextNode(xhr.responseText));
+ } else {
+ alert(xhr.responseText);
+ }
+ }
+ };
+ xhr.send();
+}
+</script>
+</head>
+<body>
+Count: <input type="number" id="count" value="100" min="1" onchange="get()">
+<input type="button" onclick="get()" value="Get">
+<br>
+<pre id="log"></pre>
+<script>get();</script>
+</body>
+</html>