From 47b3b0c708d2070599875efe948a6a1de6d45893 Mon Sep 17 00:00:00 2001 From: jomjol <30766535+jomjol@users.noreply.github.com> Date: Sat, 26 Nov 2022 07:29:16 +0100 Subject: [PATCH] Update readconfigparam.js --- sd-card/html/readconfigparam.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sd-card/html/readconfigparam.js b/sd-card/html/readconfigparam.js index 9323c45e..45f8b0f0 100644 --- a/sd-card/html/readconfigparam.js +++ b/sd-card/html/readconfigparam.js @@ -307,6 +307,22 @@ function ParseConfig() { param["DataLogging"]["DataLogRetentionInDays"]["value1"] = "3"; } + if (category["DataLogging"]["enabled"] == false) + category["DataLogging"]["enabled"] = true + + if (param["DataLogging"]["DataLogActive"]["enabled"] == false && param["DataLogging"]["DataLogActive"]["value1"] == "") + { + param["DataLogging"]["DataLogActive"]["found"] = true; + param["DataLogging"]["DataLogActive"]["enabled"] = true; + param["DataLogging"]["DataLogActive"]["value1"] = "true"; + } + + if (param["DataLogging"]["DataLogRetentionInDays"]["enabled"] == false && param["DataLogging"]["DataLogRetentionInDays"]["value1"] == "") + { + param["DataLogging"]["DataLogRetentionInDays"]["found"] = true; + param["DataLogging"]["DataLogRetentionInDays"]["enabled"] = true; + param["DataLogging"]["DataLogRetentionInDays"]["value1"] = "3"; + } }