mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
move write config from json api to http post (#363)
* implement config save over http post instead of json * remove json set config finish config write thrugh http post * remove debug code and add failure messages
This commit is contained in:
@@ -219,6 +219,8 @@
|
||||
"InfoDialog_nowrite_foottext" : "Die Webkonfiguration wird automatisch wieder freigegeben, sobald das Problem behoben wurde!",
|
||||
"infoDialog_wizrgb_title" : "Erfolg!",
|
||||
"infoDialog_wizrgb_text" : "Deine RGB Byte Reihenfolge ist bereits richtig eingestellt.",
|
||||
"infoDialog_writeconf_error_title" : "Fehler",
|
||||
"infoDialog_writeconf_error_text" : "Das speichern der Konfiguration ist fehlgeschlagen.",
|
||||
"wiz_rgb_title" : "RGB Byte Reihenfolge Assistent",
|
||||
"wiz_rgb_intro1" : "Dieser Assisent wird dir dabei helfen die richtige Byte Reihenfolge für deine leds zu finden. Klicke auf Fortfahren um zu beginnen.",
|
||||
"wiz_rgb_intro2" : "Wann benötigt man diesen Assistenten? Zur Erstkonfiguration oder wenn deine LEDs zb rot leuchten sollten, sie aber blau oder grün sind.",
|
||||
|
@@ -219,6 +219,8 @@
|
||||
"InfoDialog_nowrite_foottext" : "The WebUI will be unlocked automatically after you solved the problem!",
|
||||
"infoDialog_wizrgb_title" : "Success",
|
||||
"infoDialog_wizrgb_text" : "Your RGB Byte Order is already well adjusted.",
|
||||
"infoDialog_writeconf_error_title" : "Error",
|
||||
"infoDialog_writeconf_error_text" : "Saving your configuration failed.",
|
||||
"wiz_rgb_title" : "RGB Byte Order Wizard",
|
||||
"wiz_rgb_intro1" : "This wizard will guide you through the finding process of the correct color order for your leds. Click on continue to begin.",
|
||||
"wiz_rgb_intro2" : "When do you need this wizard? Example: You set the color red, but you get green or blue. You could also use it for first configuration.",
|
||||
|
@@ -300,7 +300,7 @@
|
||||
<script src="/js/content_index.js"></script>
|
||||
<script src="/js/localStorage.js"></script>
|
||||
<script src="/js/wizard.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@@ -32,7 +32,7 @@ function initRestart()
|
||||
|
||||
function cron()
|
||||
{
|
||||
if ( watchdog > 2)
|
||||
if ( watchdog > 2 )
|
||||
{
|
||||
var interval_id = window.setInterval("", 9999); // Get a reference to the last
|
||||
for (var i = 1; i < interval_id; i++)
|
||||
@@ -229,8 +229,15 @@ function requestWriteConfig(config)
|
||||
complete_config[i] = val;
|
||||
});
|
||||
|
||||
var config_str = JSON.stringify(complete_config);
|
||||
sendToHyperion("config","setconfig", '"config":'+config_str);
|
||||
var config_str = encode_utf8(JSON.stringify(complete_config));
|
||||
|
||||
$.post( "/cgi/cfg_set", { cfg: config_str })
|
||||
.done(function( data ) {
|
||||
$("html, body").animate({ scrollTop: 0 }, "slow");
|
||||
})
|
||||
.fail(function() {
|
||||
showInfoDialog('error', $.i18n('infoDialog_writeconf_error_title'), $.i18n('infoDialog_writeconf_error_text'));
|
||||
});
|
||||
}
|
||||
|
||||
function requestWriteEffect(effectName,effectPy,effectArgs)
|
||||
|
Reference in New Issue
Block a user