<%+cbi/valueheader%>
<textarea id="logview.list" class="cbi-input-textarea" style="width: 100%" rows="20" readonly="readonly"></textarea>

<script type="text/javascript">
    const LOG_URL = '<%=luci.dispatcher.build_url("admin", "network", "netspeedtest","realtime_log")%>';

    XHR.poll(1, LOG_URL, null, (x, d) => {
        let logview = document.getElementById("logview.list");
        if (!d.running) {
            XHR.halt();
        }
        logview.value = d.log;
        logview.scrollTop = logview.scrollHeight;
    });
</script>
<%+cbi/valuefooter%>
