mirror of https://github.com/jeelabs/esp-link.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
3.1 KiB
73 lines
3.1 KiB
<div id="main">
|
|
<div class="header">
|
|
<h1>Wifi Configuration</h1>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<div class="pure-g">
|
|
<div class="pure-u-12-24"><div class="card">
|
|
<h1>Wifi State</h1>
|
|
<div id="wifi-spinner" class="spinner spinner-small"></div>
|
|
<table id="wifi-table" class="pure-table pure-table-horizontal" hidden><tbody>
|
|
<tr><td>WiFi mode</td><td id="wifi-mode"></td></tr>
|
|
<tr><td>Configured network</td><td id="wifi-ssid"></td></tr>
|
|
<tr><td>Wifi status</td><td id="wifi-status"></td></tr>
|
|
<tr><td>Wifi address</td><td id="wifi-ip"></td></tr>
|
|
<tr><td>Wifi rssi</td><td id="wifi-rssi"></td></tr>
|
|
<tr><td>Wifi phy</td><td id="wifi-phy"></td></tr>
|
|
<tr><td>Wifi MAC</td><td id="wifi-mac"></td></tr>
|
|
<tr><td colspan="2" id="wifi-warn"></td></tr>
|
|
</tbody> </table>
|
|
</div></div>
|
|
<div class="pure-u-12-24"><div class="card">
|
|
<h1>Wifi Association</h1>
|
|
<p id="reconnect" style="color: #600" hidden></p>
|
|
<form action="#" id="wifiform" class="pure-form pure-form-stacked">
|
|
<legend>To connect to a WiFi network, please select one of the detected networks,
|
|
enter the password, and hit the connect button...</legend>
|
|
<label>Network SSID</label>
|
|
<div id="aps">Scanning... <div class="spinner spinner-small"></div></div>
|
|
<label>WiFi password, if applicable:</label>
|
|
<input id="wifi-passwd" type="password" name="passwd" placeholder="password">
|
|
<button id="connect-button" type="submit" class="pure-button button-primary">Connect!</button>
|
|
</form>
|
|
</div></div>
|
|
</div>
|
|
<div class="pure-g">
|
|
<div class="pure-u-12-24"><div class="card">
|
|
<h1>Special Settings</h1>
|
|
<form action="#" id="specform" class="pure-form pure-form-stacked">
|
|
<legend>Special settings, use with care! If the Static IP field is empty
|
|
then DHCP will be used, else DHCP will be off.</legend>
|
|
<label>Hostname used when requesting DHCP lease</label>
|
|
<input id="wifi-hostname" type="text" name="hostname">
|
|
<label>Static IP address, blank to use DHCP</label>
|
|
<input id="wifi-staticip" type="text" name="staticip">
|
|
<label>Netmask (for static IP)</label>
|
|
<input id="wifi-netmask" type="text" name="netmask">
|
|
<label>Gateway (for static IP)</label>
|
|
<input id="wifi-gateway" type="text" name="gateway">
|
|
<button id="special-button" type="submit" class="pure-button button-primary">Change!</button>
|
|
</form>
|
|
</div></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
console.log("before wifi.js");
|
|
</script>
|
|
<script src="wifi.js"></script>
|
|
<script type="text/javascript">
|
|
console.log("wifi html");
|
|
onLoad(function() {
|
|
console.log("wifi html onload");
|
|
getWifiInfo();
|
|
$("#wifiform").onsubmit = changeWifiAp;
|
|
$("#specform").onsubmit = changeSpecial;
|
|
console.log("scanning in 500ms");
|
|
scanTimeout = window.setTimeout(scanAPs, 500);
|
|
});
|
|
</script>
|
|
</body></html>
|
|
|