mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
migrate std::string to qstring + add sysinfo via json (#412)
* std::string -> qstring part 1 * more string migration * more string migration ... * ... * more qstring mogrations add sysinfo via json * remove unneccessary includes * integrate sysinfo into webui
This commit is contained in:
@@ -105,4 +105,4 @@ $(document).ready( function() {
|
||||
createHintH("intro", $.i18n('dashboard_label_intro'), "dash_intro");
|
||||
|
||||
removeOverlay();
|
||||
});
|
||||
});
|
||||
|
@@ -6,11 +6,14 @@ $(document).ready( function() {
|
||||
initWebSocket();
|
||||
|
||||
$(hyperion).on("cmd-serverinfo",function(event){
|
||||
// get sysinfo only once
|
||||
if ( typeof(sysInfo.info) == "undefined" )
|
||||
requestSysInfo();
|
||||
|
||||
serverInfo = event.response;
|
||||
currentVersion = serverInfo.info.hyperion[0].version;
|
||||
$(hyperion).trigger("ready");
|
||||
|
||||
if (serverInfo.info.hyperion[0].config_modified)
|
||||
if (serverInfo.info.hyperion.config_modified)
|
||||
$("#hyperion_reload_notify").fadeIn("fast");
|
||||
else
|
||||
$("#hyperion_reload_notify").fadeOut("fast");
|
||||
@@ -22,7 +25,7 @@ $(document).ready( function() {
|
||||
loggingStreamActive = false;
|
||||
}
|
||||
|
||||
if (!serverInfo.info.hyperion[0].config_writeable)
|
||||
if (!serverInfo.info.hyperion.config_writeable)
|
||||
{
|
||||
showInfoDialog('uilock',$.i18n('InfoDialog_nowrite_title'),$.i18n('InfoDialog_nowrite_text'));
|
||||
$('#wrapper').toggle(false);
|
||||
@@ -37,6 +40,11 @@ $(document).ready( function() {
|
||||
|
||||
}); // end cmd-serverinfo
|
||||
|
||||
$(hyperion).one("cmd-sysinfo", function(event) {
|
||||
sysInfo = event.response;
|
||||
currentVersion = sysInfo.info.hyperion.version;
|
||||
});
|
||||
|
||||
$(hyperion).one("cmd-config-getschema", function(event) {
|
||||
serverSchema = event.response.result;
|
||||
requestServerConfig();
|
||||
|
@@ -3,12 +3,13 @@
|
||||
var webPrio = 1;
|
||||
var webOrigin = "Web Configuration";
|
||||
var showOptHelp;
|
||||
var currentVersion;
|
||||
var currentVersion = "";
|
||||
var latestVersion;
|
||||
var serverInfo = {};
|
||||
var parsedUpdateJSON = {};
|
||||
var serverSchema = {};
|
||||
var serverConfig = {};
|
||||
var sysInfo = {};
|
||||
var schema;
|
||||
var jsonPort = 19444;
|
||||
var websocket = null;
|
||||
@@ -76,7 +77,6 @@ function initWebSocket()
|
||||
|
||||
websocket.onopen = function (event) {
|
||||
$(hyperion).trigger({type:"open"});
|
||||
|
||||
$(hyperion).on("cmd-serverinfo", function(event) {
|
||||
watchdog = 0;
|
||||
});
|
||||
@@ -171,6 +171,11 @@ function requestServerInfo()
|
||||
sendToHyperion("serverinfo");
|
||||
}
|
||||
|
||||
function requestSysInfo()
|
||||
{
|
||||
sendToHyperion("sysinfo");
|
||||
}
|
||||
|
||||
function requestServerConfigSchema()
|
||||
{
|
||||
sendToHyperion("config","getschema");
|
||||
|
Reference in New Issue
Block a user