use mSendInterval for showIndex and index.html

This commit is contained in:
Stefan Thieme 2022-06-01 23:46:38 +02:00
parent a9d4418bc0
commit 9e5105a98b
3 changed files with 7 additions and 4 deletions

View file

@ -5,9 +5,9 @@
<link rel="stylesheet" type="text/css" href="style.css"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript">
window.setInterval("getAjax('/uptime', 'uptime')", 1000);
window.setInterval("getAjax('/time', 'time')", 1000);
window.setInterval("getAjax('/cmdstat', 'cmds')", 2000);
window.setInterval("getAjax('/uptime', 'uptime')", {JS_TS});
window.setInterval("getAjax('/time', 'time')", {JS_TS});
window.setInterval("getAjax('/cmdstat', 'cmds')", {JS_TS});
function getAjax(url, resid) {
var http = null;
@ -37,6 +37,7 @@
<p><span class="des">Uptime: </span><span id="uptime"></span></p>
<p><span class="des">Time: </span><span id="time"></span></p>
<p><span class="des">Statistics: </span><pre id="cmds"></pre></p>
<p>Every {TS}seconds the values are updated</p>
<div id="note">
This project was started from <a href="https://www.mikrocontroller.net/topic/525778" target="_blank">this discussion. (Mikrocontroller.net)</a><br/>