simpledemo.html: Added access point information getters
This commit is contained in:
parent
18789ca7c4
commit
724c763f7f
@ -146,6 +146,14 @@
|
|||||||
<td>WiFi SSID</td>
|
<td>WiFi SSID</td>
|
||||||
<td class='text-end' id="updatedLabel_WIFISSID_table"><span class="placeholder col-4"></span></td>
|
<td class='text-end' id="updatedLabel_WIFISSID_table"><span class="placeholder col-4"></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>AP SSID</td>
|
||||||
|
<td class='text-end' id="updatedLabel_APSSID_table"><span class="placeholder col-4"></span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>AP PSK</td>
|
||||||
|
<td class='text-end' id="updatedLabel_APPSK_table"><span class="placeholder col-4"></span></td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@ -550,6 +558,8 @@
|
|||||||
restoreStateLabel1 = document.getElementById('updatedLabel_RESTORESTATE_table')
|
restoreStateLabel1 = document.getElementById('updatedLabel_RESTORESTATE_table')
|
||||||
restorePlayingStateLabel1 = document.getElementById('updatedLabel_RESTOREPLAYING_table')
|
restorePlayingStateLabel1 = document.getElementById('updatedLabel_RESTOREPLAYING_table')
|
||||||
wifiLabel1 = document.getElementById('updatedLabel_WIFISSID_table');
|
wifiLabel1 = document.getElementById('updatedLabel_WIFISSID_table');
|
||||||
|
apSsidLabel1 = document.getElementById('updatedLabel_APSSID_table');
|
||||||
|
apPskLabel1 = document.getElementById('updatedLabel_APPSK_table');
|
||||||
const playingLabel1 = document.getElementById("updatedLabel_PLAYING_table_top");
|
const playingLabel1 = document.getElementById("updatedLabel_PLAYING_table_top");
|
||||||
const playingLabel2 = document.getElementById("updatedLabel_PLAYING_table_bottom");
|
const playingLabel2 = document.getElementById("updatedLabel_PLAYING_table_bottom");
|
||||||
const rs_plpathLabel1 = document.getElementById("updatedLabel_RS_PLPATH_table_top");
|
const rs_plpathLabel1 = document.getElementById("updatedLabel_RS_PLPATH_table_top");
|
||||||
@ -590,6 +600,7 @@
|
|||||||
restoreStateApiEndpoint = "/api/v1/system/restore_state/get";
|
restoreStateApiEndpoint = "/api/v1/system/restore_state/get";
|
||||||
restorePlayingStateApiEndpoint = "/api/v1/system/restore_playing/get";
|
restorePlayingStateApiEndpoint = "/api/v1/system/restore_playing/get";
|
||||||
wifiApiEndpoint = "/api/v1/system/wifi/get_ssid";
|
wifiApiEndpoint = "/api/v1/system/wifi/get_ssid";
|
||||||
|
apApiEndpoint = "/api/v1/system/wifi/get_ap_creds";
|
||||||
playbackInfoApiEndpoint = "/api/v1/playback/info";
|
playbackInfoApiEndpoint = "/api/v1/playback/info";
|
||||||
volumeApiEndpoint = "/api/v1/volume/get";
|
volumeApiEndpoint = "/api/v1/volume/get";
|
||||||
eqApiEndpoint = "/api/v1/eq/get";
|
eqApiEndpoint = "/api/v1/eq/get";
|
||||||
@ -655,6 +666,19 @@
|
|||||||
wifiRequest.open("GET", apiBase + wifiApiEndpoint, true);
|
wifiRequest.open("GET", apiBase + wifiApiEndpoint, true);
|
||||||
wifiRequest.send();
|
wifiRequest.send();
|
||||||
|
|
||||||
|
/* AP SSID and PSK parser */
|
||||||
|
var apRequest = new XMLHttpRequest();
|
||||||
|
apRequest.onreadystatechange = function() {
|
||||||
|
if (this.readyState == 4 && this.status == 200) {
|
||||||
|
var apSsidString = JSON.parse(this.responseText).ap_ssid;
|
||||||
|
var apPskString = JSON.parse(this.responseText).ap_psk;
|
||||||
|
apSsidLabel1.innerHTML = apSsidString;
|
||||||
|
apPskLabel1.innerHTML = apPskString;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
apRequest.open("GET", apiBase + apApiEndpoint, true);
|
||||||
|
apRequest.send();
|
||||||
|
|
||||||
/* Playback info parser */
|
/* Playback info parser */
|
||||||
var playbackInfoRequest = new XMLHttpRequest();
|
var playbackInfoRequest = new XMLHttpRequest();
|
||||||
playbackInfoRequest.onreadystatechange = function() {
|
playbackInfoRequest.onreadystatechange = function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user