mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Fix: WebUI port switch reconnect
The WebUI will get now the new port for next reconnect It was necessary to add the Access-Control-Allow-Origin header with a wildcard for file serving
This commit is contained in:
@@ -1,29 +1,32 @@
|
||||
$(document).ready( function() {
|
||||
performTranslation();
|
||||
|
||||
|
||||
var conf_editor = null;
|
||||
|
||||
|
||||
$('#conf_cont').append(createOptPanel('fa-wrench', $.i18n("edt_conf_webc_heading_title"), 'editor_container', 'btn_submit'));
|
||||
if(window.showOptHelp)
|
||||
{
|
||||
$('#conf_cont').append(createHelpTable(window.schema.webConfig.properties, $.i18n("edt_conf_webc_heading_title")));
|
||||
}
|
||||
|
||||
|
||||
conf_editor = createJsonEditor('editor_container', {
|
||||
webConfig : window.schema.webConfig
|
||||
}, true, true);
|
||||
|
||||
conf_editor.on('change',function() {
|
||||
conf_editor.validate().length ? $('#btn_submit').attr('disabled', true) : $('#btn_submit').attr('disabled', false);
|
||||
});
|
||||
});
|
||||
|
||||
$('#btn_submit').off().on('click',function() {
|
||||
requestWriteConfig(conf_editor.getValue());
|
||||
// store the last webui port for correct reconnect url (connection_lost.html)
|
||||
var val = conf_editor.getValue();
|
||||
window.fastReconnect = true;
|
||||
window.jsonPort = val.webConfig.port;
|
||||
requestWriteConfig(val);
|
||||
});
|
||||
|
||||
if(window.showOptHelp)
|
||||
createHint("intro", $.i18n('conf_webconfig_label_intro'), "editor_container");
|
||||
|
||||
|
||||
removeOverlay();
|
||||
});
|
||||
|
||||
|
@@ -14,7 +14,7 @@ window.serverSchema = {};
|
||||
window.serverConfig = {};
|
||||
window.schema = {};
|
||||
window.sysInfo = {};
|
||||
window.jsonPort = 19444;
|
||||
window.jsonPort = 8090;
|
||||
window.websocket = null;
|
||||
window.hyperion = {};
|
||||
window.wsTan = 1;
|
||||
|
Reference in New Issue
Block a user