Skip to content

Commit

Permalink
Fixed issue with restoring system config file.
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinMueller2003 committed Mar 14, 2024
1 parent e683e7b commit 9e14e54
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions html/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,6 @@ $(function () {

//TODO: This should pull a configuration from the stick and not the web interface as web data could be invalid
$('#backupconfig').on("click", (function () {
ExtractNetworkConfigFromHtmlPage();
ExtractChannelConfigFromHtmlPage(Input_Config.channels, "input");
ExtractChannelConfigFromHtmlPage(Output_Config.channels, "output");
System_Config.device.id = $('#config #device #id').val();
System_Config.device.blanktime = $('#config #device #blanktime').val();

let TotalConfig = JSON.stringify({ 'system': System_Config, 'input': Input_Config, 'output': Output_Config });

Expand Down Expand Up @@ -339,7 +334,7 @@ function ProcessLocalConfig(data) {
// console.info(data);
let ParsedLocalConfig = JSON.parse(data);

ServerAccess.callFunction(SendConfigFileToServer, "config", {'system': ParsedLocalConfig});
ServerAccess.callFunction(SendConfigFileToServer, "config", {'system': ParsedLocalConfig.system});
ServerAccess.callFunction(SendConfigFileToServer, "output_config", {'output_config': ParsedLocalConfig.output});
ServerAccess.callFunction(SendConfigFileToServer, "input_config", {'input_config': ParsedLocalConfig.input});

Expand Down Expand Up @@ -405,6 +400,7 @@ function ProcessWindowChange(NextWindow) {
}

else if (NextWindow === "#admin") {
RcfResponse = RequestConfigFile("config.json");
RcfResponse = RequestConfigFile("output_config.json");
RcfResponse = RequestConfigFile("input_config.json");
}
Expand Down

0 comments on commit 9e14e54

Please sign in to comment.