Browse Source

webui: new format for the scan

dev
Maxim Prokhorov 3 years ago
parent
commit
7226a7d37f
23 changed files with 21135 additions and 21066 deletions
  1. BIN
      code/espurna/data/index.all.html.gz
  2. BIN
      code/espurna/data/index.curtain.html.gz
  3. BIN
      code/espurna/data/index.garland.html.gz
  4. BIN
      code/espurna/data/index.light.html.gz
  5. BIN
      code/espurna/data/index.lightfox.html.gz
  6. BIN
      code/espurna/data/index.rfbridge.html.gz
  7. BIN
      code/espurna/data/index.rfm69.html.gz
  8. BIN
      code/espurna/data/index.sensor.html.gz
  9. BIN
      code/espurna/data/index.small.html.gz
  10. BIN
      code/espurna/data/index.thermostat.html.gz
  11. +2299
    -2295
      code/espurna/static/index.all.html.gz.h
  12. +1574
    -1570
      code/espurna/static/index.curtain.html.gz.h
  13. +1549
    -1544
      code/espurna/static/index.garland.html.gz.h
  14. +2773
    -2768
      code/espurna/static/index.light.html.gz.h
  15. +2223
    -2218
      code/espurna/static/index.lightfox.html.gz.h
  16. +1589
    -1584
      code/espurna/static/index.rfbridge.html.gz.h
  17. +3054
    -3050
      code/espurna/static/index.rfm69.html.gz.h
  18. +2278
    -2273
      code/espurna/static/index.sensor.html.gz.h
  19. +2192
    -2187
      code/espurna/static/index.small.html.gz.h
  20. +1572
    -1567
      code/espurna/static/index.thermostat.html.gz.h
  21. +4
    -3
      code/espurna/wifi.cpp
  22. +17
    -4
      code/html/custom.js
  23. +11
    -3
      code/html/index.html

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


+ 4
- 3
code/espurna/wifi.cpp View File

@ -1898,13 +1898,14 @@ void onScan(uint32_t client_id) {
wifi::SsidInfo result(*found);
wsPost(client_id, [result](JsonObject& root) {
JsonArray& scan = root.createNestedArray("scanResult");
scan.add(result.ssid());
auto& info = result.info();
scan.add(wifi::debug::mac(info.bssid()));
scan.add(wifi::debug::authmode(info.authmode()));
scan.add(info.rssi());
scan.add(info.authmode());
scan.add(info.channel());
scan.add(wifi::debug::mac(info.bssid()));
scan.add(result.ssid());
});
},
[client_id](wifi::ScanError error) {


+ 17
- 4
code/html/custom.js View File

@ -790,7 +790,7 @@ function doToggle(id, value) {
}
function doScan() {
$("#scanResult").html("");
$("#scanResult > tbody").html("");
$("div.scan.loading").show();
$("#button-wifi-scan").attr("disabled", true);
sendAction("scan", {});
@ -1008,6 +1008,20 @@ function addNetwork(network) {
}
function scanResult(values) {
$("div.scan.loading").hide();
$("#button-wifi-scan").attr("disabled", false);
let table = document.getElementById("scanResult");
table.style.display = "table";
let row = table.tBodies[0].insertRow();
for (let value of values) {
let cell = row.insertCell();
cell.appendChild(document.createTextNode(value));
}
}
// -----------------------------------------------------------------------------
// Relays scheduler
// -----------------------------------------------------------------------------
@ -1850,9 +1864,8 @@ function processData(data) {
}
if ("scanResult" === key) {
$("div.scan.loading").hide();
$("#button-wifi-scan").attr("disabled", false);
$("#scanResult").show();
scanResult(value);
return;
}
// -----------------------------------------------------------------------------


+ 11
- 3
code/html/index.html View File

@ -873,9 +873,17 @@
</div>
</div>
<div class="pure-g">
<span class="pure-u-1 terminal" id="scanResult" name="scanResult"></span>
</div>
<table class="pure-table" id="scanResult">
<thead>
<th>BSSID</th>
<th>AUTH</th>
<th>RSSI</th>
<th>Channel</th>
<th>SSID</th>
</thead>
<tbody>
</tbody>
</table>
<legend>Networks</legend>


Loading…
Cancel
Save