123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- <html><head>
- <meta charset='utf-8'><meta name='viewport' content='width=device-width,initial-scale=1,user-scalable=no'/>
- <link rel='stylesheet' href='style.css'>
- <title>WiFiThermostat - WTherm-T5WZ</title>
- <script>
- function g(i) { return document.getElementById(i) };
- function sp(i){g(i).type=(g(i).type==='text'?'password':'text');}
- var xhttp, reqTime, reqFin;
- function selectElement(el, val) {
- el.value = val;
- }
-
- function transmit(f) {
- if (!xhttp) {
- reqTime = 0;
- reqFin = false;
- xhttp = new XMLHttpRequest();
- xhttp.timeout = 1000;
- xhttp.overrideMimeType('application/json');
- xhttp.open('POST', 'confDataLog');
- xhttp.send(f ? (new FormData(f)) : '');
- xhttp.onreadystatechange = function () {
- if (xhttp.readyState === XMLHttpRequest.DONE && xhttp.status === 200) {
- var data = JSON.parse(xhttp.responseText);
- selectElement(g('logLevSer'), data.logLevSer);
- selectElement(g('logLevWeb'), data.logLevWeb);
- selectElement(g('logLevMqtt'), data.logLevMqtt);
- xhttp = null;
- reqFin = true;
- }
- else {
- if(!reqFin && reqTime > 10) {
- xhttp = null;
- reqFin = true;
- }
- }
- }
- }
- return false;
- }
- function saveConf() {
- g('frmConf').submit();
- }
- function init() {
- transmit();
- }
- setInterval(function () { ++reqTime; }, 1000);
- </script>
- </head>
- <body onload='init()'>
- <div id='main'>
- <div id='head'>WiFiThermostat - WTherm-T5WZ
- </div><hr>
- <div></div>
- <p><b>Configuration - Logging</b></p>
- <div class='config'>
- <form id='frmConf' action='setConfLog' method='POST'>
- <fieldset>
- <legend>Log Levels</legend>
- <p><b>Serial</b><br>
- <select name='logLevSer' id='logLevSer'>
- <option value="0">Off</option>
- <option value="1">Error</option>
- <option value="2">Warn</option>
- <option value="3">Info</option>
- <option value="4">Debug</option>
- <option value="5">Verbose</option>
- </select></p>
- <p><b>Web-Console</b><br>
- <select name='logLevWeb' id='logLevWeb'>
- <option value="0">Off</option>
- <option value="1">Error</option>
- <option value="2">Warn</option>
- <option value="3">Info</option>
- <option value="4">Debug</option>
- <option value="5">Verbose</option>
- </select></p>
- <p><b>MQTT</b><br>
- <select name='logLevMqtt' id='logLevMqtt'>
- <option value="0">Off</option>
- <option value="1">Error</option>
- <option value="2">Warn</option>
- <option value="3">Info</option>
- <option value="4">Debug</option>
- <option value="5">Verbose</option>
- </select></p>
- <br>
- </fieldset>
- </form>
- <div></div>
- <table style='width:100%'>
- <td style='width:50%'><button onclick='location="conf";' class='bgrey'>Cancel</button></td>
- <td style='width:50%'><button onclick='return saveConf()' class='bred'>Save</button></td>
- </tr></table>
- <div></div>
- </div>
- <div style='text-align:right;font-size:0.7em;color:#AAA;'><hr/><a href='https://git.flokra.at/flo/WiFiThermostat' target='_blank' style='color:#AAA;'>WiFiThermostat</a> v0.6.0 by <a href='https://www.flokra.at/' target='_blank' style='color:#AAA;'>FloKra</a></div>
- </div></body></html>
|