added new script
This commit is contained in:
parent
5dd60d0250
commit
cc5056896c
|
@ -128,4 +128,4 @@ await HandleIncomingConnections(CancellationToken);
|
|||
|
||||
_listener.Close();
|
||||
|
||||
Context.LogInformation("Script done");
|
||||
Context.LogInformation("Script done");
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Script example</title>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" action="shutdown">
|
||||
<input type="submit" value="Shutdown">
|
||||
</form>
|
||||
<p></p>
|
||||
<img id="img" src="" alt="Trulli" width="500" height="333">
|
||||
<p id="eventDetails"></p>
|
||||
<script>
|
||||
setInterval(() => fetch('http://localhost:8000/doors')
|
||||
.then(response => response.json())
|
||||
.then(r => {
|
||||
document.getElementById("img").src = r.Path;
|
||||
document.getElementById("eventDetails").innerText = r.Name;
|
||||
}), 1000)
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue