mirror of
https://github.com/lumapu/ahoy.git
synced 2025-07-01 16:47:16 +02:00
improved webApi, added /api/setup for compared json (only 1 XHR is needed to get all infos)
This commit is contained in:
parent
b871ed06d2
commit
833e6c4904
4 changed files with 93 additions and 106 deletions
|
@ -261,13 +261,17 @@
|
|||
document.getElementsByName("serIntvl")[0].value = obj["interval"];
|
||||
}
|
||||
|
||||
getAjax("/api/system", parseSys);
|
||||
getAjax("/api/inverter/list", parseIv);
|
||||
getAjax("/api/mqtt", parseMqtt);
|
||||
getAjax("/api/ntp", parseNtp);
|
||||
getAjax("/api/pinout", parsePinout);
|
||||
getAjax("/api/radio", parseRadio);
|
||||
getAjax("/api/serial", parseSerial);
|
||||
function parse(root) {
|
||||
parseSys(root["system"]);
|
||||
parseIv(root["inverter"]);
|
||||
parseMqtt(root["mqtt"]);
|
||||
parseNtp(root["ntp"]);
|
||||
parsePinout(root["pinout"]);
|
||||
parseRadio(root["radio"]);
|
||||
parseSerial(root["serial"]);
|
||||
}
|
||||
|
||||
getAjax("/api/setup", parse);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue