mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-01-27 12:50:49 +03:00
UI change of the update mechanism
This commit is contained in:
@@ -1 +1 @@
|
||||
[{"C:\\Users\\sle11\\Documents\\VSCode\\squeezelite-esp32\\components\\wifi-manager\\webapp\\src\\js\\test.js":"1","C:\\Users\\sle11\\Documents\\VSCode\\squeezelite-esp32\\components\\wifi-manager\\webapp\\src\\js\\custom.js":"2"},{"size":4775,"mtime":1608244817341,"results":"3","hashOfConfig":"4"},{"size":67665,"mtime":1616681036934,"results":"5","hashOfConfig":"4"},{"filePath":"6","messages":"7","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"8"},"1lj4yrw",{"filePath":"9","messages":"10","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\sle11\\Documents\\VSCode\\squeezelite-esp32\\components\\wifi-manager\\webapp\\src\\js\\test.js",[],[],"C:\\Users\\sle11\\Documents\\VSCode\\squeezelite-esp32\\components\\wifi-manager\\webapp\\src\\js\\custom.js",[]]
|
||||
[{"C:\\Users\\sle11\\Documents\\VSCode\\squeezelite-esp32\\components\\wifi-manager\\webapp\\src\\js\\test.js":"1","C:\\Users\\sle11\\Documents\\VSCode\\squeezelite-esp32\\components\\wifi-manager\\webapp\\src\\js\\custom.js":"2"},{"size":4775,"mtime":1608244817341,"results":"3","hashOfConfig":"4"},{"size":57729,"mtime":1618063084495,"results":"5","hashOfConfig":"4"},{"filePath":"6","messages":"7","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"8"},"1lj4yrw",{"filePath":"9","messages":"10","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\sle11\\Documents\\VSCode\\squeezelite-esp32\\components\\wifi-manager\\webapp\\src\\js\\test.js",[],[],"C:\\Users\\sle11\\Documents\\VSCode\\squeezelite-esp32\\components\\wifi-manager\\webapp\\src\\js\\custom.js",[]]
|
||||
@@ -16,6 +16,8 @@
|
||||
"netmask": "255.255.255.0",
|
||||
"gw": "192.168.10.1",
|
||||
"lms_cport": 9090,
|
||||
"lms_port": 9000,
|
||||
"lms_ip": "127.0.0.1"
|
||||
"lms_port": 9100,
|
||||
"lms_ip": "127.0.0.1",
|
||||
"mock_plugin_has_proxy": "x",
|
||||
"platform_name": "SqueezeAmp"
|
||||
}
|
||||
@@ -157,6 +157,10 @@
|
||||
<button type="button" id='start-flash' data-toggle="modal" data-target="#uCnfrm"
|
||||
class="btn btn-warning btn-sm" style="display: none;">Flash Firmware</button>
|
||||
</div>
|
||||
|
||||
<div class="col-auto">
|
||||
<button class="btn-warning ota_element" type="submit" onclick="handleReboot('recovery');" >Recovery</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -171,7 +175,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Flash URL <span id="selectedFWURL"></span> to device?</p>
|
||||
<p>Flash URL <span id="selectedFWURL" class="text-break"></span> to device?</p>
|
||||
</div>
|
||||
<div class="modal-footer ">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
|
||||
@@ -181,7 +185,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card text-white mb-3">
|
||||
<div class="card text-white mb-3 recovery_element" style="display: none;">
|
||||
<div class="card-header">Local Firmware Upload</div>
|
||||
<div class="card-body">
|
||||
<div id="uploaddiv" class="recovery_element form-group row">
|
||||
@@ -374,12 +378,10 @@
|
||||
<span class="sr-only">Connecting...</span></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer connecting-success connecting-status">
|
||||
<button type="button" class="btn btn-warning" data-toggle="modal" data-dismiss="modal"
|
||||
data-target="#WiFiDisconnectConfirm">Disconnect</button>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<div class="modal-footer connecting-success connecting-status justify-content-between" style=""><button type="button"
|
||||
class="btn btn-primary" data-dismiss="modal">Ok</button><button type="button" class="btn btn-danger"
|
||||
data-toggle="modal" data-dismiss="modal" data-target="#WiFiDisconnectConfirm">Disconnect</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -499,8 +501,8 @@
|
||||
<footer>
|
||||
<div class="fixed-bottom d-flex justify-content-between border-top border-dark p-3 bg-primary">
|
||||
<span class="text-center" id="foot-fw"></span><button class="btn-warning ota_element " id="reboot_nav"
|
||||
type="submit" onclick="handleReboot(false);" style="display: none;">Reboot</button>
|
||||
<button class="btn-warning recovery_element" id="reboot_ota_nav" type="submit" onclick="handleReboot(true);"
|
||||
type="submit" onclick="handleReboot('reboot');" style="display: none;">Reboot</button>
|
||||
<button class="btn-warning recovery_element" id="reboot_ota_nav" type="submit" onclick="handleReboot('reboot_ota');"
|
||||
style="display: none;">Exit Recovery</button><span class="text-center" id="foot-wifi"></span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ Object.assign(Date.prototype, {
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
const nvsTypes = {
|
||||
NVS_TYPE_U8: 0x01,
|
||||
|
||||
@@ -108,326 +109,152 @@ const taskStates = {
|
||||
};
|
||||
const flash_status_codes = {
|
||||
NONE : 0,
|
||||
DOWNLOADING_FILE: 1,
|
||||
REBOOT_TO_RECOVERY: 2,
|
||||
CHECK_FOR_UPLOAD: 3,
|
||||
UPLOADING: 4,
|
||||
SET_FWURL: 5,
|
||||
FLASHING: 6,
|
||||
DOWNLOADING_COMPLETE: 7,
|
||||
DONE: 7
|
||||
};
|
||||
let flash_state=flash_status_codes.FLASH_NONE;
|
||||
let flash_ota_dsc='';
|
||||
let flash_ota_pct=0;
|
||||
function isFlashExecuting(){
|
||||
return flash_ota_dsc!='' || flash_ota_pct>0;
|
||||
let older_recovery=false;
|
||||
function isFlashExecuting(data){
|
||||
return data.ota_dsc!='' || data.ota_pct>0;
|
||||
}
|
||||
function post_config(data){
|
||||
let confPayload={
|
||||
timestamp: Date.now(),
|
||||
config : data
|
||||
};
|
||||
$.ajax({
|
||||
url: '/config.json',
|
||||
dataType: 'text',
|
||||
method: 'POST',
|
||||
cache: false,
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
data: JSON.stringify(confPayload),
|
||||
error: handleExceptionResponse,
|
||||
});
|
||||
}
|
||||
function process_ota_event(data){
|
||||
if(data.ota_dsc){
|
||||
flash_ota_dsc=data.ota_dsc;
|
||||
}
|
||||
if(data.ota_pct){
|
||||
flash_ota_pct=data.ota_pct;
|
||||
}
|
||||
if(isFlashExecuting(data)){
|
||||
flash_state=flash_status_codes.FLASHING;
|
||||
}
|
||||
if(flash_state==flash_status_codes.FLASHING){
|
||||
if(flash_ota_pct ==100){
|
||||
// we were processing OTA, and we've reached 100%
|
||||
flash_state=flash_status_codes.DONE;
|
||||
}
|
||||
else if(flash_ota_pct<0 && older_recovery){
|
||||
// we were processing OTA on an older recovery and we missed the
|
||||
// end of flashing.
|
||||
console.log('End of flashing from older recovery');
|
||||
if(data.ota_dsc==''){
|
||||
flash_ota_dsc = 'OTA Process Completed';
|
||||
}
|
||||
flash_state=flash_status_codes.DONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
// function z(){
|
||||
|
||||
// const data = {
|
||||
// timestamp: Date.now(),
|
||||
// };
|
||||
// if (blockFlashButton) {
|
||||
// return;
|
||||
// }
|
||||
// blockFlashButton = true;
|
||||
// const url = $('#fw-url-input').val();
|
||||
// data.config = {
|
||||
// fwurl: {
|
||||
// value: url,
|
||||
// type: 33,
|
||||
// },
|
||||
// };
|
||||
|
||||
// $.ajax({
|
||||
// url: '/config.json',
|
||||
// dataType: 'text',
|
||||
// method: 'POST',
|
||||
// cache: false,
|
||||
// contentType: 'application/json; charset=utf-8',
|
||||
// data: JSON.stringify(data),
|
||||
// error: handleExceptionResponse,
|
||||
// });
|
||||
// }
|
||||
const flash_events={
|
||||
START_OTA : function(data) {
|
||||
if (flash_state == flash_status_codes.NONE) {
|
||||
START_OTA : function() {
|
||||
if (flash_state == flash_status_codes.NONE || flash_state == undefined) {
|
||||
console.log('Starting OTA process');
|
||||
flash_state=flash_status_codes.DOWNLOADING_FILE;
|
||||
// 1. Create a new XMLHttpRequest object
|
||||
let xhr = new XMLHttpRequest();
|
||||
|
||||
// 2. Configure it: GET-request for the URL /article/.../load
|
||||
xhr.open('GET', data.url);
|
||||
xhr.responseType = "blob";
|
||||
// 4. This will be called after the response is received
|
||||
xhr.onload = function() {
|
||||
if (xhr.status != 200) { // analyze HTTP status of the response
|
||||
console.log(`Error ${xhr.status}: ${xhr.statusText}`); // e.g. 404: Not Found
|
||||
} else { // show the result
|
||||
console.log(`Done, got ${xhr.response.length} bytes`); // response is the server response
|
||||
}
|
||||
};
|
||||
flash_state=flash_status_codes.REBOOT_TO_RECOVERY;
|
||||
if(!recovery){
|
||||
flash_ota_dsc = 'Starting recovery mode...';
|
||||
// Reboot system to recovery mode
|
||||
const data = {
|
||||
timestamp: Date.now(),
|
||||
};
|
||||
|
||||
xhr.onprogress = function(event) {
|
||||
if (event.lengthComputable) {
|
||||
console.log(`Received ${event.loaded} of ${event.total} bytes`);
|
||||
} else {
|
||||
console.log(`Received ${event.loaded} bytes`); // no Content-Length
|
||||
}
|
||||
$.ajax({
|
||||
url: '/recovery.json',
|
||||
dataType: 'text',
|
||||
method: 'POST',
|
||||
cache: false,
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
data: JSON.stringify(data),
|
||||
error: handleExceptionResponse,
|
||||
complete: function(response) {
|
||||
console.log(response.responseText);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
xhr.onerror = function() {
|
||||
console.log("Request failed");
|
||||
};
|
||||
xhr.send();
|
||||
}
|
||||
else {
|
||||
console.warn('Unexpected status while starting flashing');
|
||||
}
|
||||
|
||||
},
|
||||
FOUND_RECOVERY: function(data) {
|
||||
console.log(JSON.stringify(data));
|
||||
switch (flash_state) {
|
||||
case flash_status_codes.NONE:
|
||||
console.log('Current Flash state is NONE');
|
||||
break;
|
||||
case flash_status_codes.DOWNLOADING_FILE:
|
||||
console.log('DOWNLOADING_FILE');
|
||||
break;
|
||||
case flash_status_codes.DOWNLOADING_COMPLETE:
|
||||
console.log('DOWNLOADING_COMPLETE');
|
||||
break;
|
||||
case flash_status_codes.REBOOT_TO_RECOVERY:
|
||||
console.log('REBOOT_TO_RECOVERY');
|
||||
break;
|
||||
case flash_status_codes.CHECK_FOR_UPLOAD:
|
||||
console.log('CHECK_FOR_UPLOAD');
|
||||
break;
|
||||
case flash_status_codes.UPLOADING:
|
||||
console.log('UPLOADING');
|
||||
break;
|
||||
case flash_status_codes.SET_FWURL:
|
||||
console.log('SET_FWURL');
|
||||
break;
|
||||
case flash_status_codes.FLASHING:
|
||||
console.log('FLASHING');
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
if(flash_state == flash_status_codes.REBOOT_TO_RECOVERY){
|
||||
flash_ota_dsc = 'Recovery mode found. Flashing device.';
|
||||
flash_state= flash_status_codes.SET_FWURL;
|
||||
let confData= { fwurl: {
|
||||
value: $('#fw-url-input').val(),
|
||||
type: 33,
|
||||
}
|
||||
};
|
||||
post_config(confData);
|
||||
}
|
||||
},
|
||||
UPLOAD_YES: function(data) {
|
||||
console.log(JSON.stringify(data));
|
||||
switch (flash_state) {
|
||||
case flash_status_codes.NONE:
|
||||
|
||||
console.log('Current Flash state is NONE');
|
||||
break;
|
||||
case flash_status_codes.DOWNLOADING_FILE:
|
||||
console.log('DOWNLOADING_FILE');
|
||||
break;
|
||||
case flash_status_codes.DOWNLOADING_COMPLETE:
|
||||
console.log('DOWNLOADING_COMPLETE');
|
||||
break;
|
||||
case flash_status_codes.REBOOT_TO_RECOVERY:
|
||||
console.log('REBOOT_TO_RECOVERY');
|
||||
break;
|
||||
case flash_status_codes.CHECK_FOR_UPLOAD:
|
||||
console.log('CHECK_FOR_UPLOAD');
|
||||
break;
|
||||
case flash_status_codes.UPLOADING:
|
||||
console.log('UPLOADING');
|
||||
break;
|
||||
case flash_status_codes.SET_FWURL:
|
||||
console.log('SET_FWURL');
|
||||
break;
|
||||
case flash_status_codes.FLASHING:
|
||||
console.log('FLASHING');
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
PROCESS_OTA_STATUS: function(data){
|
||||
if(data.ota_pct>0){
|
||||
older_recovery = true;
|
||||
}
|
||||
if(flash_state == flash_status_codes.REBOOT_TO_RECOVERY){
|
||||
data.event = flash_events.FOUND_RECOVERY;
|
||||
handle_flash_state(data);
|
||||
}
|
||||
else if(flash_state==flash_status_codes.DONE && !recovery){
|
||||
flash_state=flash_status_codes.NONE;
|
||||
$('#rTable tr.release').removeClass('table-success table-warning');
|
||||
$('#fw-url-input').val('');
|
||||
$('#otadiv').modal('hide');
|
||||
}
|
||||
|
||||
else {
|
||||
process_ota_event(data);
|
||||
}
|
||||
|
||||
},
|
||||
UPLOAD_NO: function(data) {
|
||||
console.log(JSON.stringify(data));
|
||||
|
||||
switch (flash_state) {
|
||||
case flash_status_codes.NONE:
|
||||
|
||||
console.log('Current Flash state is NONE');
|
||||
break;
|
||||
case flash_status_codes.DOWNLOADING_FILE:
|
||||
console.log('DOWNLOADING_FILE');
|
||||
break;
|
||||
case flash_status_codes.DOWNLOADING_COMPLETE:
|
||||
console.log('DOWNLOADING_COMPLETE');
|
||||
break;
|
||||
case flash_status_codes.REBOOT_TO_RECOVERY:
|
||||
console.log('REBOOT_TO_RECOVERY');
|
||||
break;
|
||||
case flash_status_codes.CHECK_FOR_UPLOAD:
|
||||
console.log('CHECK_FOR_UPLOAD');
|
||||
break;
|
||||
case flash_status_codes.UPLOADING:
|
||||
console.log('UPLOADING');
|
||||
break;
|
||||
case flash_status_codes.SET_FWURL:
|
||||
console.log('SET_FWURL');
|
||||
break;
|
||||
case flash_status_codes.FLASHING:
|
||||
console.log('FLASHING');
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
},
|
||||
DOWNLOAD_COMPLETE: function(data) {
|
||||
console.log(JSON.stringify(data));
|
||||
|
||||
switch (flash_state) {
|
||||
case flash_status_codes.NONE:
|
||||
|
||||
console.log('Current Flash state is NONE');
|
||||
break;
|
||||
case flash_status_codes.DOWNLOADING_FILE:
|
||||
console.log('DOWNLOADING_FILE');
|
||||
break;
|
||||
case flash_status_codes.DOWNLOADING_COMPLETE:
|
||||
console.log('DOWNLOADING_COMPLETE');
|
||||
break;
|
||||
case flash_status_codes.REBOOT_TO_RECOVERY:
|
||||
console.log('REBOOT_TO_RECOVERY');
|
||||
break;
|
||||
case flash_status_codes.CHECK_FOR_UPLOAD:
|
||||
console.log('CHECK_FOR_UPLOAD');
|
||||
break;
|
||||
case flash_status_codes.UPLOADING:
|
||||
console.log('UPLOADING');
|
||||
break;
|
||||
case flash_status_codes.SET_FWURL:
|
||||
console.log('SET_FWURL');
|
||||
break;
|
||||
case flash_status_codes.FLASHING:
|
||||
console.log('FLASHING');
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
},
|
||||
MESSAGES: function(data) {
|
||||
console.log(JSON.stringify(data));
|
||||
if(data.ota_dsc){
|
||||
flash_ota_dsc=data.ota_dsc;
|
||||
}
|
||||
if(data.ota_pct){
|
||||
flash_ota_pct=data.ota_pct;
|
||||
}
|
||||
switch (flash_state) {
|
||||
case flash_status_codes.NONE:
|
||||
|
||||
console.log('Current Flash state is NONE');
|
||||
break;
|
||||
case flash_status_codes.DOWNLOADING_FILE:
|
||||
console.log('DOWNLOADING_FILE');
|
||||
break;
|
||||
case flash_status_codes.DOWNLOADING_COMPLETE:
|
||||
console.log('DOWNLOADING_COMPLETE');
|
||||
break;
|
||||
case flash_status_codes.REBOOT_TO_RECOVERY:
|
||||
console.log('REBOOT_TO_RECOVERY');
|
||||
break;
|
||||
case flash_status_codes.CHECK_FOR_UPLOAD:
|
||||
console.log('CHECK_FOR_UPLOAD');
|
||||
break;
|
||||
case flash_status_codes.UPLOADING:
|
||||
console.log('UPLOADING');
|
||||
break;
|
||||
case flash_status_codes.SET_FWURL:
|
||||
console.log('SET_FWURL');
|
||||
break;
|
||||
case flash_status_codes.FLASHING:
|
||||
console.log('FLASHING');
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
},
|
||||
STATUS: function(data) {
|
||||
console.log(JSON.stringify(data));
|
||||
|
||||
if(data.ota_dsc){
|
||||
flash_ota_dsc=data.ota_dsc;
|
||||
}
|
||||
if(data.ota_pct){
|
||||
flash_ota_pct=data.ota_pct;
|
||||
}
|
||||
switch (flash_state) {
|
||||
case flash_status_codes.NONE:
|
||||
|
||||
console.log('Current Flash state is NONE');
|
||||
break;
|
||||
case flash_status_codes.DOWNLOADING_FILE:
|
||||
console.log('DOWNLOADING_FILE');
|
||||
break;
|
||||
case flash_status_codes.DOWNLOADING_COMPLETE:
|
||||
console.log('DOWNLOADING_COMPLETE');
|
||||
break;
|
||||
case flash_status_codes.REBOOT_TO_RECOVERY:
|
||||
console.log('REBOOT_TO_RECOVERY');
|
||||
break;
|
||||
case flash_status_codes.CHECK_FOR_UPLOAD:
|
||||
console.log('CHECK_FOR_UPLOAD');
|
||||
break;
|
||||
case flash_status_codes.UPLOADING:
|
||||
console.log('UPLOADING');
|
||||
break;
|
||||
case flash_status_codes.SET_FWURL:
|
||||
console.log('SET_FWURL');
|
||||
break;
|
||||
case flash_status_codes.FLASHING:
|
||||
console.log('FLASHING');
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
PROCESS_OTA: function(data) {
|
||||
process_ota_event(data);
|
||||
}
|
||||
};
|
||||
window.hideSurrounding = function(obj){
|
||||
$(obj).parent().parent().hide();
|
||||
}
|
||||
|
||||
|
||||
function handle_flash_state(data) {
|
||||
if(isFlashExecuting()) {
|
||||
flash_state= flash_status_codes.FLASHING;
|
||||
}
|
||||
if(data.event) {
|
||||
data.event(data);
|
||||
}
|
||||
else {
|
||||
console.error('Unexpected error while processing handle_flash_state');
|
||||
return;
|
||||
}
|
||||
|
||||
if(flash_state && flash_state >flash_status_codes.NONE && flash_ota_pct>=0) {
|
||||
|
||||
if(flash_state!=flash_status_codes.NONE){
|
||||
$('#otadiv').modal();
|
||||
if (flash_ota_pct !== 0) {
|
||||
$('.progress-bar')
|
||||
.css('width', flash_ota_pct + '%')
|
||||
.attr('aria-valuenow', flash_ota_pct);
|
||||
$('.progress-bar').html(flash_ota_pct + '%');
|
||||
.attr('aria-valuenow', flash_ota_pct)
|
||||
.text(flash_ota_pct+'%')
|
||||
$('.progress-bar').html((flash_state==flash_status_codes.DONE?100:flash_ota_pct) + '%');
|
||||
}
|
||||
if (flash_ota_dsc !== '') {
|
||||
$('span#flash-status').html(flash_ota_dsc);
|
||||
if ((data.type ?? '') === 'MESSAGING_ERROR' || flash_ota_pct > 95) {
|
||||
//blockFlashButton = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -438,12 +265,12 @@ function handle_flash_state(data) {
|
||||
window.hFlash = function(){
|
||||
handle_flash_state({ event: flash_events.START_OTA, url: $('#fw-url-input').val() });
|
||||
}
|
||||
window.handleReboot = function(ota){
|
||||
if(ota){
|
||||
$('#reboot_ota_nav').removeClass('active'); delayReboot(500,'', true);
|
||||
window.handleReboot = function(link){
|
||||
if(link=='reboot_ota'){
|
||||
$('#reboot_ota_nav').removeClass('active'); delayReboot(500,'', 'reboot_ota');
|
||||
}
|
||||
else {
|
||||
$('#reboot_nav').removeClass('active'); delayReboot(500,'', false);
|
||||
$('#reboot_nav').removeClass('active'); delayReboot(500,'',link);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -547,10 +374,12 @@ var output = '';
|
||||
let hostName = '';
|
||||
let versionName='Squeezelite-ESP32';
|
||||
let project_name=versionName;
|
||||
let platform_name=versionName;
|
||||
let btSinkNamesOptSel='#cfg-audio-bt_source-sink_name';
|
||||
let ConnectedToSSID={};
|
||||
let ConnectingToSSID={};
|
||||
let lmsBaseUrl;
|
||||
let prevLMSIP='';
|
||||
const ConnectingToActions = {
|
||||
'CONN' : 0,'MAN' : 1,'STS' : 2,
|
||||
}
|
||||
@@ -573,14 +402,6 @@ Promise.prototype.delay = function(duration) {
|
||||
}
|
||||
);
|
||||
};
|
||||
// function stopCheckStatusInterval() {
|
||||
// if (checkStatusInterval != null) {
|
||||
// clearTimeout(checkStatusInterval);
|
||||
// checkStatusInterval = null;
|
||||
// }
|
||||
// StatusIntervalActive = false;
|
||||
// }
|
||||
|
||||
|
||||
function startCheckStatusInterval() {
|
||||
StatusIntervalActive = true;
|
||||
@@ -676,8 +497,8 @@ function onChooseFile(event, onLoadFileHandler) {
|
||||
fr.readAsText(file);
|
||||
input.value = '';
|
||||
}
|
||||
function delayReboot(duration, cmdname, ota = false) {
|
||||
const url = ota ? '/reboot_ota.json' : '/reboot.json';
|
||||
function delayReboot(duration, cmdname, ota = 'reboot') {
|
||||
const url = '/'+ota+'.json';
|
||||
$('tbody#tasks').empty();
|
||||
$('#tasks_sect').css('visibility', 'collapse');
|
||||
Promise.resolve({ cmdname: cmdname, url: url })
|
||||
@@ -839,11 +660,8 @@ $(document).ready(function() {
|
||||
});
|
||||
$('.upSrch').on('input', function() {
|
||||
const val = this.value;
|
||||
|
||||
if(val.length==0) {
|
||||
$("#rTable tr").removeClass(this.id+'_hide');
|
||||
}
|
||||
else {
|
||||
$("#rTable tr").removeClass(this.id+'_hide');
|
||||
if(val.length>0) {
|
||||
$(`#rTable td:nth-child(${$(this).parent().index()+1})`).filter(function(){
|
||||
return !$(this).text().toUpperCase().includes(val.toUpperCase());
|
||||
}).parent().addClass(this.id+'_hide');
|
||||
@@ -907,24 +725,6 @@ $(document).ready(function() {
|
||||
}
|
||||
});
|
||||
|
||||
// $('#cancel').on('click', function() {
|
||||
// selectedSSID = '';
|
||||
// $('#connect').slideUp('fast', function() {});
|
||||
// $('#connect_manual').slideUp('fast', function() {});
|
||||
// $('#wifi').slideDown('fast', function() {});
|
||||
// });
|
||||
|
||||
// $('#manual_cancel').on('click', function() {
|
||||
// selectedSSID = '';
|
||||
// $('#connect').slideUp('fast', function() {});
|
||||
// $('#connect_manual').slideUp('fast', function() {});
|
||||
// $('#wifi').slideDown('fast', function() {});
|
||||
// });
|
||||
|
||||
// $('#ok-details').on('click', function() {
|
||||
// $('#connect-details').slideUp('fast', function() {});
|
||||
// $('#wifi').slideDown('fast', function() {});
|
||||
// });
|
||||
|
||||
$('#ok-credits').on('click', function() {
|
||||
$('#credits').slideUp('fast', function() {});
|
||||
@@ -937,39 +737,6 @@ $(document).ready(function() {
|
||||
$('#credits').slideDown('fast', function() {});
|
||||
});
|
||||
|
||||
// $('#disconnect').on('click', function() {
|
||||
// $('#connect-details-wrap').addClass('blur');
|
||||
// $('#diag-disconnect').slideDown('fast', function() {});
|
||||
// });
|
||||
|
||||
// $('#no-disconnect').on('click', function() {
|
||||
// $('#diag-disconnect').slideUp('fast', function() {});
|
||||
// $('#connect-details-wrap').removeClass('blur');
|
||||
// });
|
||||
|
||||
// $('#yes-disconnect').on('click', function() {
|
||||
// stopCheckStatusInterval();
|
||||
// selectedSSID = '';
|
||||
|
||||
// $('#diag-disconnect').slideUp('fast', function() {});
|
||||
// $('#connect-details-wrap').removeClass('blur');
|
||||
|
||||
// $.ajax({
|
||||
// url: '/connect.json',
|
||||
// dataType: 'text',
|
||||
// method: 'DELETE',
|
||||
// cache: false,
|
||||
// contentType: 'application/json; charset=utf-8',
|
||||
// data: JSON.stringify({
|
||||
// timestamp: Date.now(),
|
||||
// }),
|
||||
// });
|
||||
|
||||
// startCheckStatusInterval();
|
||||
|
||||
// $('#connect-details').slideUp('fast', function() {});
|
||||
// $('#wifi').slideDown('fast', function() {});
|
||||
// });
|
||||
$('input#show-commands').on('click', function() {
|
||||
this.checked = this.checked ? 1 : 0;
|
||||
if (this.checked) {
|
||||
@@ -1008,24 +775,7 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
$('#save-nvs').on('click', function() {
|
||||
const headers = {};
|
||||
const data = {
|
||||
timestamp: Date.now(),
|
||||
};
|
||||
const config = getConfigJson(false);
|
||||
data.config = config;
|
||||
$.ajax({
|
||||
url: '/config.json',
|
||||
dataType: 'text',
|
||||
method: 'POST',
|
||||
cache: false,
|
||||
headers: headers,
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
data: JSON.stringify(data),
|
||||
error: handleExceptionResponse,
|
||||
});
|
||||
console.log('sent config JSON with headers:', JSON.stringify(headers));
|
||||
console.log('sent config JSON with data:', JSON.stringify(data));
|
||||
post_config(getConfigJson(false));
|
||||
});
|
||||
$('#fwUpload').on('click', function() {
|
||||
const uploadPath = '/flash.json';
|
||||
@@ -1062,35 +812,7 @@ $(document).ready(function() {
|
||||
xhttp.send(file);
|
||||
}
|
||||
});
|
||||
// $('#flash').on('click', function() {
|
||||
// const data = {
|
||||
// timestamp: Date.now(),
|
||||
// };
|
||||
// if (blockFlashButton) {
|
||||
// return;
|
||||
// }
|
||||
// blockFlashButton = true;
|
||||
// const url = $('#fwurl').val();
|
||||
// data.config = {
|
||||
// fwurl: {
|
||||
// value: url,
|
||||
// type: 33,
|
||||
// },
|
||||
// };
|
||||
|
||||
// $.ajax({
|
||||
// url: '/config.json',
|
||||
// dataType: 'text',
|
||||
// method: 'POST',
|
||||
// cache: false,
|
||||
// contentType: 'application/json; charset=utf-8',
|
||||
// data: JSON.stringify(data),
|
||||
// error: handleExceptionResponse,
|
||||
// });
|
||||
// enableStatusTimer = true;
|
||||
// });
|
||||
|
||||
$('[name=output-tmpl]').on('click', function() {
|
||||
$('[name=output-tmpl]').on('click', function() {
|
||||
handleTemplateTypeRadio(this.id);
|
||||
});
|
||||
|
||||
@@ -1152,11 +874,19 @@ $(document).ready(function() {
|
||||
});
|
||||
}
|
||||
$('#searchfw').css('display', 'inline');
|
||||
if($('.upf').filter(function(){ return $(this).text().toUpperCase()===project_name.toUpperCase()}).length>0){
|
||||
if(platform_name!=='' && $('.upf').filter(function(){ return $(this).text().toUpperCase()===platform_name.toUpperCase()}).length>0){
|
||||
$('#splf').val(platform_name).trigger('input');
|
||||
}
|
||||
else if($('.upf').filter(function(){ return $(this).text().toUpperCase()===project_name.toUpperCase()}).length>0){
|
||||
$('#splf').val(project_name).trigger('input');
|
||||
}
|
||||
|
||||
$('#rTable tr.release').on('click', function() {
|
||||
$('#fw-url-input').val(this.attributes['fwurl'].value);
|
||||
var url=this.attributes['fwurl'].value;
|
||||
if (lmsBaseUrl) {
|
||||
url = url.replace(/.*\/download\//, lmsBaseUrl + '/plugins/SqueezeESP32/firmware/');
|
||||
}
|
||||
$('#fw-url-input').val(url);
|
||||
$('#start-flash').show();
|
||||
$('#rTable tr.release').removeClass('table-success table-warning');
|
||||
$(this).addClass('table-success table-warning');
|
||||
@@ -1252,55 +982,6 @@ $(document).ready(function() {
|
||||
});
|
||||
});
|
||||
|
||||
// $('input#searchinput').on('input', function() {
|
||||
// const s = $('input#searchinput').val();
|
||||
// const re = new RegExp(s, 'gi');
|
||||
// if (s.length === 0) {
|
||||
// $('tr.release').removeClass('hide');
|
||||
// } else if (s.length < 3) {
|
||||
// $('tr.release').addClass('hide');
|
||||
// } else {
|
||||
// $('tr.release').addClass('hide');
|
||||
// $('tr.release').each(function() {
|
||||
// $(this)
|
||||
// .find('td')
|
||||
// .each(function() {
|
||||
// if (
|
||||
// $(this)
|
||||
// .html()
|
||||
// .match(re)
|
||||
// ) {
|
||||
// $(this)
|
||||
// .parent()
|
||||
// .removeClass('hide');
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
|
||||
// $('#fwbranch').on('change', function() {
|
||||
// const branch = this.value;
|
||||
// const re = new RegExp('^' + branch + '$', 'gi');
|
||||
// $('tr.release').addClass('hide');
|
||||
// $('tr.release').each(function() {
|
||||
// $(this)
|
||||
// .find('td')
|
||||
// .each(function() {
|
||||
// console.log($(this).html());
|
||||
// if (
|
||||
// $(this)
|
||||
// .html()
|
||||
// .match(re)
|
||||
// ) {
|
||||
// $(this)
|
||||
// .parent()
|
||||
// .removeClass('hide');
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
// });
|
||||
|
||||
$('#updateAP').on('click', function() {
|
||||
refreshAP();
|
||||
console.log('refresh AP');
|
||||
@@ -1333,55 +1014,6 @@ window.setURL = function(button) {
|
||||
$('#fwurl').val(url);
|
||||
}
|
||||
|
||||
// function performConnect(conntype) {
|
||||
// // stop the status refresh. This prevents a race condition where a status
|
||||
// // request would be refreshed with wrong ip info from a previous connection
|
||||
// // and the request would automatically shows as succesful.
|
||||
// stopCheckStatusInterval();
|
||||
|
||||
// // stop refreshing wifi list
|
||||
|
||||
// let pwd;
|
||||
// let dhcpname;
|
||||
// if (conntype === 'manual') {
|
||||
// // Grab the manual SSID and PWD
|
||||
// selectedSSID = $('#manual_ssid').val();
|
||||
// pwd = $('#manual_pwd').val();
|
||||
// dhcpname = $('#dhcp-name2').val();
|
||||
// } else {
|
||||
// pwd = $('#pwd').val();
|
||||
// dhcpname = $('#dhcp-name1').val();
|
||||
// }
|
||||
|
||||
// // reset connection
|
||||
// $('#connect-success').hide();
|
||||
// $('#connect-fail').hide();
|
||||
|
||||
// $('#ok-connect').prop('disabled', true);
|
||||
// $('#ssid-wait').text(selectedSSID);
|
||||
// $('#connect').slideUp('fast', function() {});
|
||||
// $('#connect_manual').slideUp('fast', function() {});
|
||||
|
||||
// $.ajax({
|
||||
// url: '/connect.json',
|
||||
// dataType: 'text',
|
||||
// method: 'POST',
|
||||
// cache: false,
|
||||
|
||||
// // headers: { 'X-Custom-ssid': selectedSSID, 'X-Custom-pwd': pwd, 'X-Custom-host_name': dhcpname },
|
||||
// contentType: 'application/json; charset=utf-8',
|
||||
// data: JSON.stringify({
|
||||
// timestamp: Date.now(),
|
||||
// ssid: selectedSSID,
|
||||
// pwd: pwd,
|
||||
// host_name: dhcpname,
|
||||
// }),
|
||||
// error: handleExceptionResponse,
|
||||
// });
|
||||
|
||||
// // now we can re-set the intervals regardless of result
|
||||
// startCheckStatusInterval();
|
||||
// }
|
||||
|
||||
function rssiToIcon(rssi) {
|
||||
if (rssi >= -55) {
|
||||
@@ -1501,7 +1133,7 @@ function getBTSinkOpt(name){
|
||||
return $(`${btSinkNamesOptSel} option:contains('${name}')`);
|
||||
}
|
||||
function getMessages() {
|
||||
$.getJSON('/messages.json?1', async function(data) {
|
||||
$.getJSON('/messages.json', async function(data) {
|
||||
for (const msg of data) {
|
||||
const msgAge = msg.current_time - msg.sent_time;
|
||||
var msgTime = new Date();
|
||||
@@ -1510,10 +1142,9 @@ function getMessages() {
|
||||
case 'MESSAGING_CLASS_OTA':
|
||||
var otaData = JSON.parse(msg.message);
|
||||
handle_flash_state({
|
||||
ota_pct: (otaData.ota_pct ?? 0),
|
||||
ota_pct: (otaData.ota_pct ?? -1),
|
||||
ota_dsc: (otaData.ota_dsc ??''),
|
||||
type: msg.type,
|
||||
event: flash_events.MESSAGES
|
||||
event: flash_events.PROCESS_OTA
|
||||
});
|
||||
break;
|
||||
case 'MESSAGING_CLASS_STATS':
|
||||
@@ -1753,10 +1384,17 @@ function checkStatus() {
|
||||
handleRecoveryMode(data);
|
||||
handleWifiStatus(data);
|
||||
handlebtstate(data);
|
||||
handle_flash_state(data);
|
||||
handle_flash_state({
|
||||
ota_pct: (data.ota_pct ?? -1),
|
||||
ota_dsc: (data.ota_dsc ??''),
|
||||
event: flash_events.PROCESS_OTA_STATUS
|
||||
});
|
||||
if (data.project_name && data.project_name !== '') {
|
||||
project_name = data.project_name;
|
||||
}
|
||||
if(data.platform_name && data.platform_name!==''){
|
||||
platform_name = data.platform_name;
|
||||
}
|
||||
if (data.version && data.version !== '') {
|
||||
versionName=data.version;
|
||||
$("#navtitle").html(`${project_name}${recovery?'<br>[recovery]':''}`);
|
||||
@@ -1771,10 +1409,13 @@ function checkStatus() {
|
||||
$('#battery').hide();
|
||||
}
|
||||
|
||||
if (typeof lmsBaseUrl == "undefined" && data.lms_ip && data.lms_port) {
|
||||
if (typeof lmsBaseUrl == "undefined" || data.lms_ip != prevLMSIP && data.lms_ip && data.lms_port) {
|
||||
const baseUrl = 'http://' + data.lms_ip + ':' + data.lms_port;
|
||||
prevLMSIP=data.lms_ip;
|
||||
$.ajax({
|
||||
url: baseUrl + '/plugins/SqueezeESP32/firmware/-99',
|
||||
dataType: 'text',
|
||||
cache: false,
|
||||
error: function() {
|
||||
// define the value, so we don't check it any more.
|
||||
lmsBaseUrl = '';
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<% } %>
|
||||
</div>
|
||||
<div id="allIcons"></div>
|
||||
|
||||
<div class="card border-primary mb-3">
|
||||
<div class="card-header">Status Variables</div>
|
||||
<div class="card-body">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
target_add_binary_data( __idf_wifi-manager ./webapp/webpack/dist/favicon-32x32.png BINARY)
|
||||
target_add_binary_data( __idf_wifi-manager ./webapp/webpack/dist/index.html.gz BINARY)
|
||||
target_add_binary_data( __idf_wifi-manager ./webapp/webpack/dist/js/index.0b6890.bundle.js.gz BINARY)
|
||||
target_add_binary_data( __idf_wifi-manager ./webapp/webpack/dist/js/node-modules.0b6890.bundle.js.gz BINARY)
|
||||
target_add_binary_data( __idf_wifi-manager ./webapp/webpack/dist/js/runtime.0b6890.bundle.js.gz BINARY)
|
||||
target_add_binary_data( __idf_wifi-manager ./webapp/webpack/dist/js/index.5b6fcc.bundle.js.gz BINARY)
|
||||
target_add_binary_data( __idf_wifi-manager ./webapp/webpack/dist/js/node-modules.5b6fcc.bundle.js.gz BINARY)
|
||||
target_add_binary_data( __idf_wifi-manager ./webapp/webpack/dist/js/runtime.5b6fcc.bundle.js.gz BINARY)
|
||||
|
||||
@@ -4,58 +4,31 @@ extern const uint8_t _favicon_32x32_png_start[] asm("_binary_favicon_32x32_png_s
|
||||
extern const uint8_t _favicon_32x32_png_end[] asm("_binary_favicon_32x32_png_end");
|
||||
extern const uint8_t _index_html_gz_start[] asm("_binary_index_html_gz_start");
|
||||
extern const uint8_t _index_html_gz_end[] asm("_binary_index_html_gz_end");
|
||||
<<<<<<< HEAD
|
||||
extern const uint8_t _index_31a52e_bundle_js_gz_start[] asm("_binary_index_31a52e_bundle_js_gz_start");
|
||||
extern const uint8_t _index_31a52e_bundle_js_gz_end[] asm("_binary_index_31a52e_bundle_js_gz_end");
|
||||
extern const uint8_t _node_modules_31a52e_bundle_js_gz_start[] asm("_binary_node_modules_31a52e_bundle_js_gz_start");
|
||||
extern const uint8_t _node_modules_31a52e_bundle_js_gz_end[] asm("_binary_node_modules_31a52e_bundle_js_gz_end");
|
||||
extern const uint8_t _runtime_31a52e_bundle_js_gz_start[] asm("_binary_runtime_31a52e_bundle_js_gz_start");
|
||||
extern const uint8_t _runtime_31a52e_bundle_js_gz_end[] asm("_binary_runtime_31a52e_bundle_js_gz_end");
|
||||
extern const uint8_t _index_5b6fcc_bundle_js_gz_start[] asm("_binary_index_5b6fcc_bundle_js_gz_start");
|
||||
extern const uint8_t _index_5b6fcc_bundle_js_gz_end[] asm("_binary_index_5b6fcc_bundle_js_gz_end");
|
||||
extern const uint8_t _node_modules_5b6fcc_bundle_js_gz_start[] asm("_binary_node_modules_5b6fcc_bundle_js_gz_start");
|
||||
extern const uint8_t _node_modules_5b6fcc_bundle_js_gz_end[] asm("_binary_node_modules_5b6fcc_bundle_js_gz_end");
|
||||
extern const uint8_t _runtime_5b6fcc_bundle_js_gz_start[] asm("_binary_runtime_5b6fcc_bundle_js_gz_start");
|
||||
extern const uint8_t _runtime_5b6fcc_bundle_js_gz_end[] asm("_binary_runtime_5b6fcc_bundle_js_gz_end");
|
||||
const char * resource_lookups[] = {
|
||||
"/dist/favicon-32x32.png",
|
||||
"/dist/index.html.gz",
|
||||
"/js/index.31a52e.bundle.js.gz",
|
||||
"/js/node-modules.31a52e.bundle.js.gz",
|
||||
"/js/runtime.31a52e.bundle.js.gz",
|
||||
=======
|
||||
extern const uint8_t _index_0b6890_bundle_js_gz_start[] asm("_binary_index_0b6890_bundle_js_gz_start");
|
||||
extern const uint8_t _index_0b6890_bundle_js_gz_end[] asm("_binary_index_0b6890_bundle_js_gz_end");
|
||||
extern const uint8_t _node_modules_0b6890_bundle_js_gz_start[] asm("_binary_node_modules_0b6890_bundle_js_gz_start");
|
||||
extern const uint8_t _node_modules_0b6890_bundle_js_gz_end[] asm("_binary_node_modules_0b6890_bundle_js_gz_end");
|
||||
extern const uint8_t _runtime_0b6890_bundle_js_gz_start[] asm("_binary_runtime_0b6890_bundle_js_gz_start");
|
||||
extern const uint8_t _runtime_0b6890_bundle_js_gz_end[] asm("_binary_runtime_0b6890_bundle_js_gz_end");
|
||||
const char * resource_lookups[] = {
|
||||
"/dist/favicon-32x32.png",
|
||||
"/dist/index.html.gz",
|
||||
"/js/index.0b6890.bundle.js.gz",
|
||||
"/js/node-modules.0b6890.bundle.js.gz",
|
||||
"/js/runtime.0b6890.bundle.js.gz",
|
||||
>>>>>>> master-cmake
|
||||
"/js/index.5b6fcc.bundle.js.gz",
|
||||
"/js/node-modules.5b6fcc.bundle.js.gz",
|
||||
"/js/runtime.5b6fcc.bundle.js.gz",
|
||||
""
|
||||
};
|
||||
const uint8_t * resource_map_start[] = {
|
||||
_favicon_32x32_png_start,
|
||||
_index_html_gz_start,
|
||||
<<<<<<< HEAD
|
||||
_index_31a52e_bundle_js_gz_start,
|
||||
_node_modules_31a52e_bundle_js_gz_start,
|
||||
_runtime_31a52e_bundle_js_gz_start
|
||||
=======
|
||||
_index_0b6890_bundle_js_gz_start,
|
||||
_node_modules_0b6890_bundle_js_gz_start,
|
||||
_runtime_0b6890_bundle_js_gz_start
|
||||
>>>>>>> master-cmake
|
||||
_index_5b6fcc_bundle_js_gz_start,
|
||||
_node_modules_5b6fcc_bundle_js_gz_start,
|
||||
_runtime_5b6fcc_bundle_js_gz_start
|
||||
};
|
||||
const uint8_t * resource_map_end[] = {
|
||||
_favicon_32x32_png_end,
|
||||
_index_html_gz_end,
|
||||
<<<<<<< HEAD
|
||||
_index_31a52e_bundle_js_gz_end,
|
||||
_node_modules_31a52e_bundle_js_gz_end,
|
||||
_runtime_31a52e_bundle_js_gz_end
|
||||
=======
|
||||
_index_0b6890_bundle_js_gz_end,
|
||||
_node_modules_0b6890_bundle_js_gz_end,
|
||||
_runtime_0b6890_bundle_js_gz_end
|
||||
>>>>>>> master-cmake
|
||||
_index_5b6fcc_bundle_js_gz_end,
|
||||
_node_modules_5b6fcc_bundle_js_gz_end,
|
||||
_runtime_5b6fcc_bundle_js_gz_end
|
||||
};
|
||||
|
||||
@@ -1,27 +1,26 @@
|
||||
/***********************************
|
||||
webpack_headers
|
||||
<<<<<<< HEAD
|
||||
Hash: 31a52ecfe661f5a02717
|
||||
Hash: 5b6fcca7137c495bebc9
|
||||
Version: webpack 4.44.2
|
||||
Time: 6575ms
|
||||
Built at: 2021-03-23 17 h 59 min 55 s
|
||||
Time: 8665ms
|
||||
Built at: 2021-04-10 09 h 58 min 36 s
|
||||
Asset Size Chunks Chunk Names
|
||||
./js/index.31a52e.bundle.js 227 KiB 0 [emitted] [immutable] index
|
||||
./js/index.31a52e.bundle.js.br 30.9 KiB [emitted]
|
||||
./js/index.31a52e.bundle.js.gz 39.9 KiB [emitted]
|
||||
./js/node-modules.31a52e.bundle.js 265 KiB 1 [emitted] [immutable] [big] node-modules
|
||||
./js/node-modules.31a52e.bundle.js.br 76.2 KiB [emitted]
|
||||
./js/node-modules.31a52e.bundle.js.gz 88.6 KiB [emitted]
|
||||
./js/runtime.31a52e.bundle.js 1.46 KiB 2 [emitted] [immutable] runtime
|
||||
./js/runtime.31a52e.bundle.js.br 644 bytes [emitted]
|
||||
./js/runtime.31a52e.bundle.js.gz 722 bytes [emitted]
|
||||
./js/index.5b6fcc.bundle.js 229 KiB 0 [emitted] [immutable] index
|
||||
./js/index.5b6fcc.bundle.js.br 31.3 KiB [emitted]
|
||||
./js/index.5b6fcc.bundle.js.gz 40.6 KiB [emitted]
|
||||
./js/node-modules.5b6fcc.bundle.js 265 KiB 1 [emitted] [immutable] [big] node-modules
|
||||
./js/node-modules.5b6fcc.bundle.js.br 76.2 KiB [emitted]
|
||||
./js/node-modules.5b6fcc.bundle.js.gz 88.6 KiB [emitted]
|
||||
./js/runtime.5b6fcc.bundle.js 1.46 KiB 2 [emitted] [immutable] runtime
|
||||
./js/runtime.5b6fcc.bundle.js.br 644 bytes [emitted]
|
||||
./js/runtime.5b6fcc.bundle.js.gz 722 bytes [emitted]
|
||||
favicon-32x32.png 578 bytes [emitted]
|
||||
index.html 21.5 KiB [emitted]
|
||||
index.html.br 4.72 KiB [emitted]
|
||||
index.html.gz 5.73 KiB [emitted]
|
||||
index.html 21.7 KiB [emitted]
|
||||
index.html.br 4.78 KiB [emitted]
|
||||
index.html.gz 5.78 KiB [emitted]
|
||||
sprite.svg 4.4 KiB [emitted]
|
||||
sprite.svg.br 912 bytes [emitted]
|
||||
Entrypoint index [big] = ./js/runtime.31a52e.bundle.js ./js/node-modules.31a52e.bundle.js ./js/index.31a52e.bundle.js
|
||||
Entrypoint index [big] = ./js/runtime.5b6fcc.bundle.js ./js/node-modules.5b6fcc.bundle.js ./js/index.5b6fcc.bundle.js
|
||||
[6] ./node_modules/bootstrap/dist/js/bootstrap-exposed.js 437 bytes {1} [built]
|
||||
[11] ./src/sass/main.scss 1.55 KiB {0} [built]
|
||||
[16] ./node_modules/remixicon/icons/Device/signal-wifi-fill.svg 340 bytes {1} [built]
|
||||
@@ -36,73 +35,22 @@ Entrypoint index [big] = ./js/runtime.31a52e.bundle.js ./js/node-modules.31a52e.
|
||||
[25] ./node_modules/remixicon/icons/Device/device-recover-fill.svg 346 bytes {1} [built]
|
||||
[26] ./node_modules/remixicon/icons/Device/bluetooth-fill.svg 336 bytes {1} [built]
|
||||
[27] ./node_modules/remixicon/icons/Device/bluetooth-connect-fill.svg 352 bytes {1} [built]
|
||||
[37] ./src/index.ts + 1 modules 59.9 KiB {0} [built]
|
||||
[37] ./src/index.ts + 1 modules 58.4 KiB {0} [built]
|
||||
| ./src/index.ts 1.36 KiB [built]
|
||||
| ./src/js/custom.js 58.4 KiB [built]
|
||||
=======
|
||||
Hash: 0b6890f4337e767921f7
|
||||
Version: webpack 4.46.0
|
||||
Time: 273269ms
|
||||
Built at: 2021-04-03 1:28:56
|
||||
Asset Size Chunks Chunk Names
|
||||
./js/index.0b6890.bundle.js 231 KiB 0 [emitted] [immutable] index
|
||||
./js/index.0b6890.bundle.js.br 31.5 KiB [emitted]
|
||||
./js/index.0b6890.bundle.js.gz 41.1 KiB [emitted]
|
||||
./js/node-modules.0b6890.bundle.js 266 KiB 1 [emitted] [immutable] [big] node-modules
|
||||
./js/node-modules.0b6890.bundle.js.br 76.3 KiB [emitted]
|
||||
./js/node-modules.0b6890.bundle.js.gz 88.7 KiB [emitted]
|
||||
./js/runtime.0b6890.bundle.js 1.46 KiB 2 [emitted] [immutable] runtime
|
||||
./js/runtime.0b6890.bundle.js.br 644 bytes [emitted]
|
||||
./js/runtime.0b6890.bundle.js.gz 722 bytes [emitted]
|
||||
favicon-32x32.png 634 bytes [emitted]
|
||||
index.html 19.5 KiB [emitted]
|
||||
index.html.br 4.48 KiB [emitted]
|
||||
index.html.gz 5.46 KiB [emitted]
|
||||
sprite.svg 4.4 KiB [emitted]
|
||||
sprite.svg.br 912 bytes [emitted]
|
||||
Entrypoint index [big] = ./js/runtime.0b6890.bundle.js ./js/node-modules.0b6890.bundle.js ./js/index.0b6890.bundle.js
|
||||
[6] ./node_modules/bootstrap/dist/js/bootstrap-exposed.js 437 bytes {1} [built]
|
||||
[11] ./src/sass/main.scss 1.55 KiB {0} [built]
|
||||
[16] ./node_modules/remixicon/icons/Device/signal-wifi-fill.svg 323 bytes {1} [built]
|
||||
[17] ./node_modules/remixicon/icons/Device/signal-wifi-3-fill.svg 327 bytes {1} [built]
|
||||
[18] ./node_modules/remixicon/icons/Device/signal-wifi-2-fill.svg 327 bytes {1} [built]
|
||||
[19] ./node_modules/remixicon/icons/Device/signal-wifi-1-fill.svg 327 bytes {1} [built]
|
||||
[20] ./node_modules/remixicon/icons/Device/signal-wifi-line.svg 323 bytes {1} [built]
|
||||
[21] ./node_modules/remixicon/icons/Device/battery-line.svg 315 bytes {1} [built]
|
||||
[22] ./node_modules/remixicon/icons/Device/battery-low-line.svg 323 bytes {1} [built]
|
||||
[23] ./node_modules/remixicon/icons/Device/battery-fill.svg 315 bytes {1} [built]
|
||||
[24] ./node_modules/remixicon/icons/Media/headphone-fill.svg 318 bytes {1} [built]
|
||||
[25] ./node_modules/remixicon/icons/Device/device-recover-fill.svg 329 bytes {1} [built]
|
||||
[26] ./node_modules/remixicon/icons/Device/bluetooth-fill.svg 319 bytes {1} [built]
|
||||
[27] ./node_modules/remixicon/icons/Device/bluetooth-connect-fill.svg 335 bytes {1} [built]
|
||||
[37] ./src/index.ts + 1 modules 53.3 KiB {0} [built]
|
||||
| ./src/index.ts 1.36 KiB [built]
|
||||
| ./src/js/custom.js 51.8 KiB [built]
|
||||
>>>>>>> master-cmake
|
||||
| ./src/js/custom.js 57 KiB [built]
|
||||
+ 23 hidden modules
|
||||
|
||||
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
|
||||
This can impact web performance.
|
||||
Assets:
|
||||
<<<<<<< HEAD
|
||||
./js/node-modules.31a52e.bundle.js (265 KiB)
|
||||
./js/node-modules.5b6fcc.bundle.js (265 KiB)
|
||||
|
||||
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
|
||||
Entrypoints:
|
||||
index (494 KiB)
|
||||
./js/runtime.31a52e.bundle.js
|
||||
./js/node-modules.31a52e.bundle.js
|
||||
./js/index.31a52e.bundle.js
|
||||
=======
|
||||
./js/node-modules.0b6890.bundle.js (266 KiB)
|
||||
|
||||
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
|
||||
Entrypoints:
|
||||
index (499 KiB)
|
||||
./js/runtime.0b6890.bundle.js
|
||||
./js/node-modules.0b6890.bundle.js
|
||||
./js/index.0b6890.bundle.js
|
||||
>>>>>>> master-cmake
|
||||
index (496 KiB)
|
||||
./js/runtime.5b6fcc.bundle.js
|
||||
./js/node-modules.5b6fcc.bundle.js
|
||||
./js/index.5b6fcc.bundle.js
|
||||
|
||||
|
||||
WARNING in webpack performance recommendations:
|
||||
@@ -110,15 +58,10 @@ You can limit the size of your bundles by using import() or require.ensure to la
|
||||
For more info visit https://webpack.js.org/guides/code-splitting/
|
||||
Child html-webpack-plugin for "index.html":
|
||||
Asset Size Chunks Chunk Names
|
||||
index.html 558 KiB 0
|
||||
index.html 559 KiB 0
|
||||
Entrypoint undefined = index.html
|
||||
<<<<<<< HEAD
|
||||
[0] ./node_modules/html-webpack-plugin/lib/loader.js!./src/index.ejs 23.7 KiB {0} [built]
|
||||
[0] ./node_modules/html-webpack-plugin/lib/loader.js!./src/index.ejs 23.9 KiB {0} [built]
|
||||
[1] ./node_modules/lodash/lodash.js 530 KiB {0} [built]
|
||||
=======
|
||||
[0] ./node_modules/html-webpack-plugin/lib/loader.js!./src/index.ejs 20.3 KiB {0} [built]
|
||||
[1] ./node_modules/lodash/lodash.js 531 KiB {0} [built]
|
||||
>>>>>>> master-cmake
|
||||
[2] (webpack)/buildin/global.js 472 bytes {0} [built]
|
||||
[3] (webpack)/buildin/module.js 497 bytes {0} [built]
|
||||
***********************************/
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 634 B After Width: | Height: | Size: 578 B |
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
|
||||
!function(e){function r(r){for(var n,l,f=r[0],i=r[1],a=r[2],c=0,s=[];c<f.length;c++)l=f[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,f=1;f<t.length;f++){var i=t[f];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={2:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="";var f=window.webpackJsonp=window.webpackJsonp||[],i=f.push.bind(f);f.push=r,f=f.slice();for(var a=0;a<f.length;a++)r(f[a]);var p=i;t()}([]);
|
||||
Binary file not shown.
Binary file not shown.
@@ -15,6 +15,7 @@ const data = {
|
||||
messages: require("../mock/messages.json"),
|
||||
messagequeue: require("../mock/messages.json"),
|
||||
message_queue_sequence: [],
|
||||
message_queue_sequence_post_empty: null,
|
||||
commands: require("../mock/commands.json"),
|
||||
scan: require("../mock/scan.json"),
|
||||
ap: require("../mock/ap.json"),
|
||||
@@ -124,10 +125,20 @@ module.exports = merge(common, {
|
||||
app.get('/scan.json', function(req, res) { res.json( data.scan ); });
|
||||
app.get('/config.json', function(req, res) { res.json( data.config ); });
|
||||
app.get('/status.json', function(req, res) { res.json( data.status ); });
|
||||
app.get('/plugins/SqueezeESP32/firmware/-99', function(req, res) {
|
||||
let has_proxy= data.status.mock_plugin_has_proxy ?? 'n';
|
||||
const statusCode='xy'.includes((has_proxy).toLowerCase())?200:500;
|
||||
console.log(`Checking if plugin has proxy enabled with option mock_plugin_has_proxy = ${data.status.mock_plugin_has_proxy}. Returning status ${statusCode} `);
|
||||
res.status(statusCode ).json();
|
||||
});
|
||||
app.get('/messages.json', function(req, res) {
|
||||
if(data.message_queue_sequence.length>0){
|
||||
data.messagequeue.push(data.message_queue_sequence.shift());
|
||||
}
|
||||
else if (data.message_queue_sequence_post_empty){
|
||||
data.message_queue_sequence_post_empty();
|
||||
data.message_queue_sequence_post_empty = null;
|
||||
}
|
||||
res.json( data.messagequeue ) ;
|
||||
data.messagequeue=[];
|
||||
});
|
||||
@@ -157,7 +168,7 @@ module.exports = merge(common, {
|
||||
});
|
||||
app.post('/config.json', function(req, res) {
|
||||
var fwurl='';
|
||||
console.log(req.body);
|
||||
console.log(`Processing config.json with request body: ${req.body}`);
|
||||
console.log(data.config);
|
||||
for (const property in req.body.config) {
|
||||
console.log(`${property}: ${req.body.config[property].value}`);
|
||||
@@ -177,16 +188,24 @@ module.exports = merge(common, {
|
||||
|
||||
}
|
||||
res.json( {} );
|
||||
if(fwurl!==''){
|
||||
data.status.recovery=1;
|
||||
requeueMessages();
|
||||
if(fwurl!=='' ){
|
||||
if(data.status.recovery!=1) {
|
||||
// we're not yet in recovery. Simulate reboot to recovery
|
||||
data.status.recovery=1;
|
||||
requeueMessages();
|
||||
}
|
||||
if(fwurl.toLowerCase().includes('fail')){
|
||||
console.log(`queuing ${data.messages_ota_fail.length} ota messages `);
|
||||
data.message_queue_sequence.push(...data.messages_ota_fail);
|
||||
|
||||
}
|
||||
else {
|
||||
console.log(`queuing ${data.messages_ota.length} ota messages `);
|
||||
data.message_queue_sequence.push(...data.messages_ota);
|
||||
data.message_queue_sequence_post_empty = function(){
|
||||
data.status.recovery=0;
|
||||
requeueMessages();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user