summaryrefslogtreecommitdiff
path: root/modules/up_log/index.html
diff options
context:
space:
mode:
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>