Browse Source

Add telnet link to Web UI, fix mDNS hostname

rfm69
Xose Pérez 6 years ago
parent
commit
f37b15cab8
6 changed files with 2710 additions and 2701 deletions
  1. BIN
      code/espurna/data/index.html.gz
  2. +1
    -1
      code/espurna/mdns.ino
  3. +2701
    -2698
      code/espurna/static/index.html.gz.h
  4. +1
    -1
      code/espurna/wifi.ino
  5. +6
    -0
      code/html/custom.js
  6. +1
    -1
      code/html/index.html

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


+ 1
- 1
code/espurna/mdns.ino View File

@ -28,7 +28,7 @@ void _mdnsFindMQTT() {
#endif #endif
void _mdnsServerStart() { void _mdnsServerStart() {
if (MDNS.begin(WiFi.getMode() == WIFI_AP ? APP_NAME : (char *) WiFi.hostname().c_str())) {
if (MDNS.begin((char *) getSetting("hostname").c_str())) {
DEBUG_MSG_P(PSTR("[MDNS] OK\n")); DEBUG_MSG_P(PSTR("[MDNS] OK\n"));
} else { } else {
DEBUG_MSG_P(PSTR("[MDNS] FAIL\n")); DEBUG_MSG_P(PSTR("[MDNS] FAIL\n"));


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


+ 1
- 1
code/espurna/wifi.ino View File

@ -417,7 +417,7 @@ void wifiStatus() {
DEBUG_MSG_P(PSTR("[WIFI] GW %s\n"), WiFi.gatewayIP().toString().c_str()); DEBUG_MSG_P(PSTR("[WIFI] GW %s\n"), WiFi.gatewayIP().toString().c_str());
DEBUG_MSG_P(PSTR("[WIFI] DNS %s\n"), WiFi.dnsIP().toString().c_str()); DEBUG_MSG_P(PSTR("[WIFI] DNS %s\n"), WiFi.dnsIP().toString().c_str());
DEBUG_MSG_P(PSTR("[WIFI] MASK %s\n"), WiFi.subnetMask().toString().c_str()); DEBUG_MSG_P(PSTR("[WIFI] MASK %s\n"), WiFi.subnetMask().toString().c_str());
DEBUG_MSG_P(PSTR("[WIFI] HOST %s\n"), WiFi.hostname().c_str());
DEBUG_MSG_P(PSTR("[WIFI] HOST http://%s.local\n"), WiFi.hostname().c_str());
DEBUG_MSG_P(PSTR("[WIFI] BSSID %02X:%02X:%02X:%02X:%02X:%02X\n"), DEBUG_MSG_P(PSTR("[WIFI] BSSID %02X:%02X:%02X:%02X:%02X:%02X\n"),
bssid[0], bssid[1], bssid[2], bssid[3], bssid[4], bssid[5], bssid[6] bssid[0], bssid[1], bssid[2], bssid[3], bssid[4], bssid[5], bssid[6]
); );


+ 6
- 0
code/html/custom.js View File

@ -1229,6 +1229,12 @@ function processData(data) {
return; return;
} }
if ("deviceip" === key) {
var a_href = $("span[name='" + key + "']").parent();
a_href.attr("href", "http://" + value);
a_href.next().attr("href", "telnet://" + value);
}
if ("now" === key) { if ("now" === key) {
now = value; now = value;
return; return;


+ 1
- 1
code/html/index.html View File

@ -242,7 +242,7 @@
<div class="pure-u-11-24"><span class="right" name="rssi"></span></div> <div class="pure-u-11-24"><span class="right" name="rssi"></span></div>
<div class="pure-u-1-2">IP</div> <div class="pure-u-1-2">IP</div>
<div class="pure-u-11-24"><span class="right" name="deviceip"></span></div>
<div class="pure-u-11-24"><a href=""><span class="right" name="deviceip"></span></a> (<a href=""><span class="right">telnet</span></a>)</div>
<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>


Loading…
Cancel
Save