mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-31 01:36:11 +02:00
insert board type on footer + fix footer
This commit is contained in:
parent
56cfffbcd8
commit
51be5061ea
4 changed files with 21 additions and 7 deletions
5
src/.gitignore
vendored
Normal file
5
src/.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
.pio
|
||||
.vscode/.browse.c_cpp.db*
|
||||
.vscode/c_cpp_properties.json
|
||||
.vscode/launch.json
|
||||
.vscode/ipch
|
|
@ -27,6 +27,10 @@ function parseVersion(obj) {
|
|||
);
|
||||
}
|
||||
|
||||
function parseESP(obj) {
|
||||
document.getElementById("esp_type").innerHTML="Board: " + obj["esp_type"];
|
||||
}
|
||||
|
||||
function setHide(id, hide) {
|
||||
var elm = document.getElementById(id);
|
||||
if(hide) {
|
||||
|
|
|
@ -73,8 +73,11 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="right">
|
||||
<span id="version"></span><br/><br/>
|
||||
<a href="https://creativecommons.org/licenses/by-nc-sa/3.0/de" target="_blank" >CC BY-NC-SA 3.0</a>
|
||||
<ul>
|
||||
<li><span id="version"></span></li>
|
||||
<li><span id="esp_type"></span></li>
|
||||
<li><a href="https://creativecommons.org/licenses/by-nc-sa/3.0/de" target="_blank" >CC BY-NC-SA 3.0</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
@ -101,8 +104,10 @@
|
|||
function parseSys(obj) {
|
||||
// Disclaimer
|
||||
//if(obj["disclaimer"] == false) sessionStorage.setItem("gDisclaimer", promptFunction());
|
||||
if(true == exeOnce)
|
||||
if(exeOnce){
|
||||
parseVersion(obj);
|
||||
parseESP(obj);
|
||||
}
|
||||
document.getElementById("wifi_rssi").innerHTML = obj["wifi_rssi"];
|
||||
|
||||
var date = new Date(obj["ts_now"] * 1000);
|
||||
|
@ -128,7 +133,7 @@
|
|||
dSpan.appendChild(span("", ["span"], "apiResult"));
|
||||
e.addEventListener("click", setTime);
|
||||
}
|
||||
|
||||
|
||||
if(!obj["ts_sun_upd"]) {
|
||||
var e = document.getElementById("sun");
|
||||
if(null != e)
|
||||
|
@ -185,14 +190,14 @@
|
|||
|
||||
function parse(obj) {
|
||||
if(null != obj) {
|
||||
if(true == exeOnce)
|
||||
if(exeOnce)
|
||||
parseMenu(obj["menu"]);
|
||||
parseSys(obj["system"]);
|
||||
parseStat(obj["statistics"]);
|
||||
parseIv(obj["inverter"]);
|
||||
parseWarnInfo(obj["warnings"], obj["infos"]);
|
||||
document.getElementById("refresh").innerHTML = obj["refresh_interval"];
|
||||
if(true == exeOnce) {
|
||||
if(exeOnce) {
|
||||
window.setInterval("getAjax('/api/index', parse)", obj["refresh_interval"] * 1000);
|
||||
exeOnce = false;
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ span.seperator {
|
|||
|
||||
#footer .right {
|
||||
color: #bbb;
|
||||
margin: 23px 25px;
|
||||
margin: 6px 25px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue