etwas besser

This commit is contained in:
Aeris 2018-08-22 22:05:49 +02:00
parent 1b618adba5
commit 8b30631719

View File

@ -1,7 +1,15 @@
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
textarea {
width: 500px;
height: 500px;
}
</style>
</head>
@ -66,7 +74,7 @@
var sleep = time => new Promise(resolve => setTimeout(resolve, time))
var poll = (promiseFn, time) => promiseFn().then(
sleep(time).then(() => poll(promiseFn, time)))
poll(() => new Promise(() => fetch("/apps/log").then(res => res.text().then(e => { document.getElementById('logs').innerHTML += e})) ), 1000)
poll(() => new Promise(() => fetch("/apps/log").then(res => res.text().then(e => { document.getElementById('logs').innerHTML = e;})) ), 1000)
let apps = fetch("/apps/list").then(res => res.json().then(generateInput));