diff --git a/front/css/app.css b/front/css/app.css index 74d24be2..ae06bea0 100755 --- a/front/css/app.css +++ b/front/css/app.css @@ -1117,6 +1117,36 @@ input[readonly] { display: inline-grid; } + +/* Basic style for the div elements */ +#settingsPage .setting_overriden_by_env { + position: relative; + /* width: 300px; + height: 200px; */ + background-color: #f3f3f3; + border: 1px solid #ccc; + margin: 20px; + z-index: 10; + } + + /* Style for the overlay */ + #settingsPage .setting_overriden_by_env::after { + content: "Overridden with ENV variable"; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.6); /* semi-transparent black overlay */ + color: white; + display: flex; + align-items: center; + justify-content: center; + font-size: 16px; + font-weight: 700; + z-index: 11; + } + /* ----------------------------------------------------------------- */ /* Devices page */ /* ----------------------------------------------------------------- */ diff --git a/front/plugins/ui_settings/config.json b/front/plugins/ui_settings/config.json index 9133823b..29393efb 100755 --- a/front/plugins/ui_settings/config.json +++ b/front/plugins/ui_settings/config.json @@ -172,7 +172,7 @@ "PGkgY2xhc3M9ImZhIGZhLWxpZ2h0YnVsYiI+PC9pPg==", "PGkgY2xhc3M9ImZhIGZhLXNoaWVsZCI+PC9pPg==", "PGkgY2xhc3M9ImZhIGZhLXdpZmkiPjwvaT4=", - "PGkgY2xhc3M9J2ZhIGZhLWdhbWVwYWQnPjwvaT4" + "PGkgY2xhc3M9ImZhIGZhLWdhbWVwYWQiPjwvaT4=" ], "options": [], "localized": [], diff --git a/front/settings.php b/front/settings.php index 29199093..a307d0ab 100755 --- a/front/settings.php +++ b/front/settings.php @@ -378,6 +378,7 @@ $settingsJSON_DB = json_encode($settings, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX const valIn = set['Value']; const codeName = set['Code_Name']; + const overriddenByEnv = set['OverriddenByEnv'] == 1; const setType = set['Type']; const isMetadata = codeName.includes('__metadata'); // is this isn't a metadata entry, get corresponding metadata object from the dummy setting @@ -416,7 +417,7 @@ $settingsJSON_DB = json_encode($settings, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX
${getString(codeName + '_description', set['Description'])}
-
+
`; // OVERRIDE diff --git a/server/plugin.py b/server/plugin.py index 7c488791..4b03a600 100755 --- a/server/plugin.py +++ b/server/plugin.py @@ -248,7 +248,7 @@ def execute_plugin(db, all_plugins, plugin, pluginsState = plugins_state() ): for line in newLines: columns = line.split("|") - # There have to be 9 or 13 columns + # There have to be 9 or 13 columns if len(columns) not in [9, 13]: mylog('none', [f'[Plugins] Wrong number of input values, must be 9 or 13, got {len(columns)} from: {line}']) continue # Skip lines with incorrect number of columns