mirror of
https://github.com/lumapu/ahoy.git
synced 2025-07-29 14:17:17 +02:00
improved GUI password handling
fix serial console uptime fix #384 round total values
This commit is contained in:
parent
6a6d522d3b
commit
74f4a114cd
8 changed files with 19 additions and 14 deletions
|
@ -12,7 +12,7 @@
|
|||
<div class="pad">
|
||||
<form action="/login" method="post">
|
||||
<h2>AhoyDTU</h2>
|
||||
<input type="password" name="pwd" value="">
|
||||
<input type="password" name="pwd" value="" autofocus>
|
||||
<input type="submit" name="login" value="login" class="btn">
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -307,6 +307,9 @@
|
|||
function parseSys(obj) {
|
||||
for(var i of [["device", "device_name"], ["ssid", "ssid"]])
|
||||
document.getElementsByName(i[0])[0].value = obj[i[1]];
|
||||
var e = document.getElementsByName("adminpwd")[0];
|
||||
if(!obj["pwd_set"])
|
||||
e.value = "";
|
||||
parseVersion(obj);
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
getAjax("/api" + window.location.pathname, parse);
|
||||
getAjax("/api/html" + window.location.pathname, parse);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
// total
|
||||
if(obj.length > 1) {
|
||||
for(var j = 0; j < root.ch0_fld_names.length; j++) {
|
||||
var val = total[j];
|
||||
var val = Math.round(total[j] * 100) / 100;
|
||||
if(val > 0) {
|
||||
var sub = div(["subgrp"]);
|
||||
sub.appendChild(span(val + " " + span(root["ch0_fld_units"][j], ["unit"]).innerHTML, ["value"]));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue