Browse Source

Add SDK and Core version to web UI

rfm69
Xose Pérez 6 years ago
parent
commit
24d0bdd0e8
5 changed files with 2705 additions and 2694 deletions
  1. BIN
      code/espurna/data/index.html.gz
  2. +2675
    -2674
      code/espurna/static/index.html.gz.h
  3. +1
    -0
      code/espurna/utils.ino
  4. +2
    -0
      code/espurna/ws.ino
  5. +27
    -20
      code/html/index.html

BIN
code/espurna/data/index.html.gz View File


+ 2675
- 2674
code/espurna/static/index.html.gz.h
File diff suppressed because it is too large
View File


+ 1
- 0
code/espurna/utils.ino View File

@ -40,6 +40,7 @@ String getCoreVersion() {
version = String(ARDUINO_ESP8266_RELEASE); version = String(ARDUINO_ESP8266_RELEASE);
} }
#endif #endif
version.replace("_", ".");
return version; return version;
} }


+ 2
- 0
code/espurna/ws.ino View File

@ -267,6 +267,8 @@ void _wsOnStart(JsonObject& root) {
root["deviceip"] = getIP(); root["deviceip"] = getIP();
root["sketch_size"] = ESP.getSketchSize(); root["sketch_size"] = ESP.getSketchSize();
root["free_size"] = ESP.getFreeSketchSpace(); root["free_size"] = ESP.getFreeSketchSpace();
root["sdk"] = ESP.getSdkVersion();
root["core"] = getCoreVersion();
_wsUpdate(root); _wsUpdate(root);


+ 27
- 20
code/html/index.html View File

@ -194,6 +194,15 @@
<div class="pure-u-1-2">Chip ID</div> <div class="pure-u-1-2">Chip ID</div>
<div class="pure-u-11-24"><span class="right" name="chipid"></span></div> <div class="pure-u-11-24"><span class="right" name="chipid"></span></div>
<div class="pure-u-1-2">Wifi MAC</div>
<div class="pure-u-11-24"><span class="right" name="mac"></span></div>
<div class="pure-u-1-2">SDK version</div>
<div class="pure-u-11-24"><span class="right" name="sdk"></span></div>
<div class="pure-u-1-2">Core version</div>
<div class="pure-u-11-24"><span class="right" name="core"></span></div>
<div class="pure-u-1-2">Firmware name</div> <div class="pure-u-1-2">Firmware name</div>
<div class="pure-u-11-24"><span class="right" name="app_name"></span></div> <div class="pure-u-11-24"><span class="right" name="app_name"></span></div>
@ -203,28 +212,16 @@
<div class="pure-u-1-2">Firmware build</div> <div class="pure-u-1-2">Firmware build</div>
<div class="pure-u-11-24"><span class="right" name="app_build"></span></div> <div class="pure-u-11-24"><span class="right" name="app_build"></span></div>
<div class="pure-u-1-2">Current time</div>
<div class="pure-u-11-24"><span class="right" name="now"></span></div>
<div class="pure-u-1-2">Uptime</div>
<div class="pure-u-11-24"><span class="right" name="uptime"></span></div>
<div class="pure-u-1-2">Load average</div>
<div class="pure-u-11-24"><span class="right" name="loadaverage"></span><span>%</span></div>
<div class="pure-u-1-2">VCC</div>
<div class="pure-u-11-24"><span class="right" name="vcc"></span><span>mV</span></div>
<div class="pure-u-1-2">Firmware size</div>
<div class="pure-u-11-24"><span class="right" name="sketch_size" post=" bytes"></span></div>
<div class="pure-u-1-2">MQTT Status</div>
<div class="pure-u-11-24"><span class="right" name="mqttStatus">NOT AVAILABLE</span></div>
<div class="pure-u-1-2">Free space</div>
<div class="pure-u-11-24"><span class="right" name="free_size" post=" bytes"></span></div>
</div> </div>
<div class="pure-u-1 pure-u-lg-11-24 state"> <div class="pure-u-1 pure-u-lg-11-24 state">
<div class="pure-u-1-2">Wifi MAC</div>
<div class="pure-u-11-24"><span class="right" name="mac"></span></div>
<div class="pure-u-1-2">Network</div> <div class="pure-u-1-2">Network</div>
<div class="pure-u-11-24"><span class="right" name="network"></span></div> <div class="pure-u-11-24"><span class="right" name="network"></span></div>
@ -243,17 +240,27 @@
<div class="pure-u-1-2">Free heap</div> <div class="pure-u-1-2">Free heap</div>
<div class="pure-u-11-24"><span class="right" name="heap" post=" bytes"></span></div> <div class="pure-u-11-24"><span class="right" name="heap" post=" bytes"></span></div>
<div class="pure-u-1-2">Firmware size</div>
<div class="pure-u-11-24"><span class="right" name="sketch_size" post=" bytes"></span></div>
<div class="pure-u-1-2">Load average</div>
<div class="pure-u-11-24"><span class="right" name="loadaverage"></span><span>%</span></div>
<div class="pure-u-1-2">Free space</div>
<div class="pure-u-11-24"><span class="right" name="free_size" post=" bytes"></span></div>
<div class="pure-u-1-2">VCC</div>
<div class="pure-u-11-24"><span class="right" name="vcc"></span><span>mV</span></div>
<div class="pure-u-1-2">MQTT Status</div>
<div class="pure-u-11-24"><span class="right" name="mqttStatus">NOT AVAILABLE</span></div>
<div class="pure-u-1-2">NTP Status</div> <div class="pure-u-1-2">NTP Status</div>
<div class="pure-u-11-24"><span class="right" name="ntpStatus">NOT AVAILABLE</span></div> <div class="pure-u-11-24"><span class="right" name="ntpStatus">NOT AVAILABLE</span></div>
<div class="pure-u-1-2">Current time</div>
<div class="pure-u-11-24"><span class="right" name="now"></span></div>
<div class="pure-u-1-2">Uptime</div>
<div class="pure-u-11-24"><span class="right" name="uptime"></span></div>
<div class="pure-u-1-2">Last update</div> <div class="pure-u-1-2">Last update</div>
<div class="pure-u-11-24"><span class="right" name="ago">?</span><span> seconds ago</span></div> <div class="pure-u-11-24"><span class="right" name="ago">?</span><span> seconds ago</span></div>
</div> </div>
</fieldset> </fieldset>


Loading…
Cancel
Save