diff --git a/front/js/pialert_common.js b/front/js/pialert_common.js
index 380738d2..313f8f29 100755
--- a/front/js/pialert_common.js
+++ b/front/js/pialert_common.js
@@ -300,6 +300,13 @@ function showMessage (textMessage="") {
// -----------------------------------------------------------------------------
// General utilities
// -----------------------------------------------------------------------------
+
+// check if JSON object
+function isJsonObject(value) {
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
+}
+
+
// remove unnecessary lines from the result
function sanitize(data)
{
diff --git a/front/php/templates/language/en_us.json b/front/php/templates/language/en_us.json
index b6587ca9..6ab01bc5 100755
--- a/front/php/templates/language/en_us.json
+++ b/front/php/templates/language/en_us.json
@@ -421,6 +421,8 @@
"settings_old" : "The settings in the DB (shown on this page) are outdated. This is probably caused by a running scan. The settings were saved in the pialert.conf file, but the background process didn not have time to import it yet to the DB. You can wait until the settings get refreshed so you do not overwrite your old values. Feel free to save your settings either way if you don not mind losing the settings between the last save and now. There are also backup files created if you need to compare your settings later.",
"settings_imported" : "Last time settings were imported from the pialert.conf file:",
"settings_expand_all" : "Expand all",
+ "Setting_Override" : "Override default",
+ "Setting_Override_Description" : "TBD",
"General_display_name" : "General",
"General_icon" : "",
"ENABLE_ARPSCAN_name" : "Enable ARP scan",
diff --git a/front/plugins/known_template/config.json b/front/plugins/known_template/config.json
index 0afb80dd..f83ad0f6 100755
--- a/front/plugins/known_template/config.json
+++ b/front/plugins/known_template/config.json
@@ -171,7 +171,7 @@
"type": "text.template",
"maxLength": 50,
"default_value": "(unknown)",
- "value": {
+ "override_value": {
"value":"(unknown)",
"override": true
},
diff --git a/front/settings.php b/front/settings.php
index 5eb7fb1d..1cca1579 100755
--- a/front/settings.php
+++ b/front/settings.php
@@ -173,66 +173,111 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
// go thru all settings and collect settings per settings group
settingsData.forEach((set) => {
+ let val = set['Value'];
+ const codeName = set['Code_Name'];
+ const setType = set['Type'].toLowerCase();
+ const isMetadata = codeName.includes('__metadata');
+ // is this isn't a metadata entry, get corresponding metadata object from the dummy setting
+ const setObj = isMetadata ? {} : JSON.parse(getSetting(`${codeName}__metadata`));
+
+ // constructing final HTML for the setting
setHtml = ""
if(set["Group"] == group)
{
- // hide metadata by default by assigning it a special class
- const isMetadata = set['Code_Name'].includes('__metadata');
+ // hide metadata by default by assigning it a special class
isMetadata ? metadataClass = 'metadata' : metadataClass = '';
isMetadata ? infoIcon = '' : infoIcon = `
` ;
+ // NAME & DESCRIPTION columns
setHtml += `
-