mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Various Fixes/Updates (#1549)
* Update FindWindowsSDK.cmake * cmake support libcec without version * Ensure Light-Ids are strings * Fix type - do not have dbus as requried * Fixing #1544 * Cleanup * CleanupFix #1551 * Consistently return instance number with JSON replies (#1504) * hyperion-remote- Fix extracting reply for configGet request * Qt 6.6 - Fix iterator finds * Fix test_image2ledsmap * Ensure window.currentHyperionInstanceName is set, cleanup system/log clipboard report * Address protobuf cmake warning * Update License * Update ChangeLog * Address CodeQL and clang findings
This commit is contained in:
@@ -278,8 +278,9 @@ $(document).ready(function () {
|
||||
if (getStorage('lastSelectedInstance'))
|
||||
removeStorage('lastSelectedInstance')
|
||||
|
||||
currentHyperionInstance = 0;
|
||||
currentHyperionInstanceName = getInstanceNameByIndex(0);
|
||||
window.currentHyperionInstance = 0;
|
||||
window.currentHyperionInstanceName = getInstanceNameByIndex(0);
|
||||
|
||||
requestServerConfig();
|
||||
setTimeout(requestServerInfo, 100)
|
||||
setTimeout(requestTokenInfo, 200)
|
||||
@@ -293,7 +294,7 @@ $(document).ready(function () {
|
||||
$('#btn_hypinstanceswitch').toggle(false)
|
||||
|
||||
// update listing for button
|
||||
updateUiOnInstance(currentHyperionInstance);
|
||||
updateUiOnInstance(window.currentHyperionInstance);
|
||||
updateHyperionInstanceListing();
|
||||
});
|
||||
|
||||
|
@@ -35,7 +35,8 @@ $(document).ready(function () {
|
||||
function infoSummary() {
|
||||
var info = "";
|
||||
|
||||
info += 'Hyperion System Summary Report (' + window.serverConfig.general.name + '), Reported instance: ' + window.currentHyperionInstanceName + '\n';
|
||||
info += 'Hyperion System Summary Report (' + window.serverConfig.general.name + ')\n';
|
||||
info += 'Reported instance: [' + window.currentHyperionInstance + '] - ' + window.currentHyperionInstanceName + '\n';
|
||||
|
||||
info += "\n< ----- System information -------------------- >\n";
|
||||
info += getSystemInfo() + '\n';
|
||||
@@ -43,22 +44,36 @@ $(document).ready(function () {
|
||||
info += "\n< ----- Configured Instances ------------------ >\n";
|
||||
var instances = window.serverInfo.instance;
|
||||
for (var i = 0; i < instances.length; i++) {
|
||||
info += instances[i].instance + ': ' + instances[i].friendly_name + ' Running: ' + instances[i].running + '\n';
|
||||
info += instances[i].instance + ': ' + instances[i].friendly_name + ', Running: ' + instances[i].running + '\n';
|
||||
}
|
||||
|
||||
info += "\n< ----- This instance's priorities ------------ >\n";
|
||||
var prios = window.serverInfo.priorities;
|
||||
for (var i = 0; i < prios.length; i++) {
|
||||
info += prios[i].priority + ': ';
|
||||
if (prios[i].visible) {
|
||||
info += ' VISIBLE!';
|
||||
|
||||
if (prios.length > 0) {
|
||||
|
||||
for (var i = 0; i < prios.length; i++) {
|
||||
|
||||
var prio = prios[i].priority.toString().padStart(3, '0');
|
||||
|
||||
info += prio + ': ';
|
||||
if (prios[i].visible) {
|
||||
info += ' VISIBLE -';
|
||||
}
|
||||
else {
|
||||
info += ' INVISIBLE -';
|
||||
}
|
||||
info += ' (' + prios[i].componentId + ')';
|
||||
if (prios[i].owner) {
|
||||
info += ' (Owner: ' + prios[i].owner + ')';
|
||||
}
|
||||
info += '\n';
|
||||
|
||||
}
|
||||
else {
|
||||
info += ' ';
|
||||
}
|
||||
info += ' (' + prios[i].componentId + ') Owner: ' + prios[i].owner + '\n';
|
||||
} else {
|
||||
info += 'The current priority list is empty!\n';
|
||||
}
|
||||
info += 'priorities_autoselect: ' + window.serverInfo.priorities_autoselect + '\n';
|
||||
info += 'Autoselect: ' + window.serverInfo.priorities_autoselect + '\n';
|
||||
|
||||
info += "\n< ----- This instance components' status ------->\n";
|
||||
var comps = window.serverInfo.components;
|
||||
@@ -67,7 +82,7 @@ $(document).ready(function () {
|
||||
}
|
||||
|
||||
info += "\n< ----- This instance's configuration --------- >\n";
|
||||
info += JSON.stringify(window.serverConfig) + '\n';
|
||||
info += JSON.stringify(window.serverConfig, null, 2) + '\n';
|
||||
|
||||
info += "\n< ----- Current Log --------------------------- >\n";
|
||||
var logMsgs = document.getElementById("logmessages").textContent;
|
||||
@@ -193,18 +208,19 @@ $(document).ready(function () {
|
||||
});
|
||||
|
||||
// toggle fullscreen button in log output
|
||||
$(".fullscreen-btn").mousedown(function(e) {
|
||||
$(".fullscreen-btn").mousedown(function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$(".fullscreen-btn").click(function(e) {
|
||||
$(".fullscreen-btn").click(function (e) {
|
||||
e.preventDefault();
|
||||
$(this).children('i')
|
||||
.toggleClass('fa-expand')
|
||||
.toggleClass('fa-compress');
|
||||
$('#conf_cont').toggle();
|
||||
$('#logmessages').css('max-height', $('#logmessages').css('max-height') !== 'none' ? 'none' : '400px' );
|
||||
$('#logmessages').css('max-height', $('#logmessages').css('max-height') !== 'none' ? 'none' : '400px');
|
||||
});
|
||||
|
||||
removeOverlay();
|
||||
});
|
||||
|
||||
|
@@ -171,6 +171,10 @@ function initLanguageSelection() {
|
||||
}
|
||||
|
||||
function updateUiOnInstance(inst) {
|
||||
|
||||
window.currentHyperionInstance = inst;
|
||||
window.currentHyperionInstanceName = getInstanceNameByIndex(inst);
|
||||
|
||||
$("#active_instance_friendly_name").text(getInstanceNameByIndex(inst));
|
||||
if (window.serverInfo.instance.filter(entry => entry.running).length > 1) {
|
||||
$('#btn_hypinstanceswitch').toggle(true);
|
||||
|
@@ -854,11 +854,17 @@ function checkUserResult(reply, usr) {
|
||||
|
||||
function useGroupId(id) {
|
||||
$('#groupId').val(id);
|
||||
groupLights = hueGroups[id].lights;
|
||||
|
||||
//Ensure ligthIDs are strings
|
||||
groupLights = hueGroups[id].lights.map(num => {
|
||||
return String(num);
|
||||
});
|
||||
|
||||
groupLightsLocations = hueGroups[id].locations;
|
||||
get_hue_lights();
|
||||
}
|
||||
|
||||
|
||||
async function discover_hue_bridges() {
|
||||
$('#wiz_hue_ipstate').html($.i18n('edt_dev_spec_devices_discovery_inprogress'));
|
||||
$('#wiz_hue_discovered').html("")
|
||||
@@ -1016,11 +1022,11 @@ function beginWizardHue() {
|
||||
$('#host').val(host);
|
||||
|
||||
var port = eV("port");
|
||||
if (port > 0) {
|
||||
$('#port').val(port);
|
||||
if (port == 0) {
|
||||
$('#port').val(80);
|
||||
}
|
||||
else {
|
||||
$('#port').val('');
|
||||
$('#port').val(port);
|
||||
}
|
||||
hueIPs.unshift({ host: host, port: port });
|
||||
|
||||
@@ -1037,7 +1043,13 @@ function beginWizardHue() {
|
||||
|
||||
hueIPs = [];
|
||||
hueIPsinc = 0;
|
||||
hueIPs.push({ host: $('#host').val(), port: $('#port').val() });
|
||||
|
||||
var port = $('#port').val();
|
||||
if (isNaN(port) || port < 1 || port > 65535) {
|
||||
port = 80;
|
||||
$('#port').val(80);
|
||||
}
|
||||
hueIPs.push({ host: $('#host').val(), port: port });
|
||||
}
|
||||
else {
|
||||
discover_hue_bridges();
|
||||
|
Reference in New Issue
Block a user