22 lines
475 B
Smarty
22 lines
475 B
Smarty
{{template "base/base.html" .}}
|
|
{{define "meta"}}
|
|
{{end}}
|
|
{{define "extrajs"}}
|
|
<script>
|
|
var logs = document.getElementById("log")
|
|
var ws = new WebSocket("{{.hostWS}}");
|
|
ws.onopen = function(evt) {
|
|
}
|
|
ws.onclose = function(evt) {
|
|
ws = null;
|
|
}
|
|
ws.onmessage = function(evt) {
|
|
log.innerHTML = evt.data + "\n" + logs.innerHTML;
|
|
}
|
|
</script>
|
|
{{end}}
|
|
{{define "body"}}
|
|
<textarea id="log" readonly="readonly" rows="20" style="width: 100%;">
|
|
</textarea>
|
|
{{end}}
|