mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
* JSONeditor: Disable watchers when updating selections dynamically * Refactor - Load last instance config when loading UI page * LED Devices - Notify getproperties watchers for configured hostname * Remove unused variable * Fix #1314 - Additional classic & matrix configuration items were not saved
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
var instNameInit = false
|
||||
|
||||
$(document).ready(function () {
|
||||
var darkModeOverwrite = getStorage("darkModeOverwrite", true);
|
||||
|
||||
@@ -27,8 +25,6 @@ $(document).ready(function () {
|
||||
// comps
|
||||
window.comps = event.response.info.components
|
||||
|
||||
$(window.hyperion).trigger("ready");
|
||||
|
||||
window.comps.forEach(function (obj) {
|
||||
if (obj.name == "ALL") {
|
||||
if (obj.enabled)
|
||||
@@ -44,12 +40,6 @@ $(document).ready(function () {
|
||||
$('#btn_hypinstanceswitch').toggle(true)
|
||||
else
|
||||
$('#btn_hypinstanceswitch').toggle(false)
|
||||
// update listing at button
|
||||
updateHyperionInstanceListing()
|
||||
if (!instNameInit) {
|
||||
window.currentHyperionInstanceName = getInstanceNameByIndex(0);
|
||||
instNameInit = true;
|
||||
}
|
||||
|
||||
updateSessions();
|
||||
}); // end cmd-serverinfo
|
||||
@@ -112,11 +102,9 @@ $(document).ready(function () {
|
||||
|
||||
$(window.hyperion).one("cmd-authorize-getTokenList", function (event) {
|
||||
tokenList = event.response.info;
|
||||
requestServerInfo();
|
||||
});
|
||||
|
||||
$(window.hyperion).on("cmd-sysinfo", function (event) {
|
||||
requestServerInfo();
|
||||
window.sysInfo = event.response.info;
|
||||
|
||||
window.currentVersion = window.sysInfo.hyperion.version;
|
||||
@@ -126,16 +114,22 @@ $(document).ready(function () {
|
||||
|
||||
$(window.hyperion).one("cmd-config-getschema", function (event) {
|
||||
window.serverSchema = event.response.info;
|
||||
requestServerConfig();
|
||||
window.schema = window.serverSchema.properties;
|
||||
|
||||
requestTokenInfo();
|
||||
requestGetPendingTokenRequests();
|
||||
|
||||
window.schema = window.serverSchema.properties;
|
||||
//Switch to last selected instance and load related config
|
||||
var lastSelectedInstance = getStorage('lastSelectedInstance', false);
|
||||
if (!window.serverInfo.instance[lastSelectedInstance]) {
|
||||
lastSelectedInstance = 0;
|
||||
}
|
||||
instanceSwitch(lastSelectedInstance);
|
||||
|
||||
});
|
||||
|
||||
$(window.hyperion).on("cmd-config-getconfig", function (event) {
|
||||
window.serverConfig = event.response.info;
|
||||
requestSysInfo();
|
||||
|
||||
window.showOptHelp = window.serverConfig.general.showOptHelp;
|
||||
});
|
||||
@@ -163,6 +157,8 @@ $(document).ready(function () {
|
||||
if (event.response.hasOwnProperty('info'))
|
||||
setStorage("loginToken", event.response.info.token, true);
|
||||
|
||||
requestSysInfo();
|
||||
requestServerInfo();
|
||||
requestServerConfigSchema();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user