<html><head><script>functionsubmitData(){constvalue=Number(document.getElementById("userInput").value)fetch("/db/write/EXAMPLE?timeformat=ms",{method:"POST",headers:{"Content-Type":"text/csv"},body:'webapp,'+Date.now()+","+value}).then(function(rsp){returnrsp.json()}).then(function(obj){document.getElementById("rspInput").innerHTML='<li> success:'+obj.success+", reason:"+obj.reason})}</script><linkhref="https://unpkg.com/gridjs/dist/theme/mermaid.min.css"rel="stylesheet"/><scriptsrc="https://unpkg.com/gridjs/dist/gridjs.umd.js"></script><script>vargrid=null;functiongridData(){constquery=`select * from EXAMPLE where name = 'webapp' order by time desc`;fetch(`/db/query?timeformat=Default&tz=local&q=`+query).then(function(rsp){returnrsp.json()}).then(function(obj){if(grid==null){grid=newgridjs.Grid({columns:obj.data.columns,data:obj.data.rows,width:"800px",pagination:{limit:5,summary:false}})grid.render(document.getElementById("rspGrid"))}else{grid.updateConfig({data:obj.data.rows,}).forceRender();}})}</script></head><body><h4> Input data </h4><form><inputid="userInput"><ahref="#"onClick="submitData()">Submit</a></form><divid="rspInput"></div><h4> Grid </h4><ahref="#"onClick="gridData()">Refresh</a><divid="rspGrid"></div></body></html>