From 12c848d3cdc83b627c7c8fb27d18e9702fab402e Mon Sep 17 00:00:00 2001 From: jokob-sk Date: Mon, 28 Oct 2024 07:56:38 +1100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8Settins=20time=20logging=20+=20Saving?= =?UTF-8?q?=20Location=20issue=20#862?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/css/app.css | 12 +++++++++++- front/php/templates/footer.php | 1 + front/plugins.php | 2 +- front/plugins/README.md | 3 +-- front/plugins/newdev_template/config.json | 2 +- front/settings.php | 2 ++ server/initialise.py | 8 ++++++-- 7 files changed, 23 insertions(+), 7 deletions(-) diff --git a/front/css/app.css b/front/css/app.css index f0d29e47..917b8746 100755 --- a/front/css/app.css +++ b/front/css/app.css @@ -1446,7 +1446,17 @@ input[readonly] { .plugin-content #tabs-content-location { margin: 0px; - padding-top: 0; + /* padding-top: 0; */ +} + +.integrations-plugins .content +{ + display: table; +} + +.plugin-content .tab-content +{ + padding-top: 10px; } .plugins-description diff --git a/front/php/templates/footer.php b/front/php/templates/footer.php index 164cf748..3105f7c0 100755 --- a/front/php/templates/footer.php +++ b/front/php/templates/footer.php @@ -31,6 +31,7 @@ | Docs | | + | | | © | : diff --git a/front/plugins.php b/front/plugins.php index 77569e04..7a7107f3 100755 --- a/front/plugins.php +++ b/front/plugins.php @@ -5,7 +5,7 @@ ?> -
+
diff --git a/front/plugins/README.md b/front/plugins/README.md index acb5648d..3153ed3b 100755 --- a/front/plugins/README.md +++ b/front/plugins/README.md @@ -1,6 +1,6 @@ # 🔌 Plugins -NetAlertX supports additional plugins to extend its functionality, each with its own settings and options. Plugins can be loaded via the General -> `LOADED_PLUGINS` setting by using Ctrl + Click. For custom plugin development, refer to the [Plugin development guide](/docs/PLUGINS_DEV.md). +NetAlertX supports additional plugins to extend its functionality, each with its own settings and options. Plugins can be loaded via the General -> `LOADED_PLUGINS` setting. For custom plugin development, refer to the [Plugin development guide](/docs/PLUGINS_DEV.md). >[!NOTE] > Please check this [Plugins debugging guide](https://github.com/jokob-sk/NetAlertX/blob/main/docs/DEBUG_PLUGINS.md) and the corresponding Plugin documentation in the below table if you are facing issues. @@ -16,7 +16,6 @@ NetAlertX supports additional plugins to extend its functionality, each with its 4. Fine-tune [Notifications](/docs/NOTIFICATIONS.md) 5. [Backup your setup](/docs/BACKUPS.md) 6. Contribute and [Create custom plugins](/docs/PLUGINS_DEV.md) -7. Consider [donating](https://github.com/jokob-sk/NetAlertX?tab=readme-ov-file#-sponsors) to keep me going ## 📑 Available Plugins diff --git a/front/plugins/newdev_template/config.json b/front/plugins/newdev_template/config.json index 40502fa0..c7832d6e 100755 --- a/front/plugins/newdev_template/config.json +++ b/front/plugins/newdev_template/config.json @@ -863,7 +863,7 @@ { "name": "value", "type": "sql", - "value": "SELECT DISTINCT '' as id, '❌None' as name UNION SELECT dev_Location as id, dev_Location as name FROM (SELECT dev_Location FROM Devices where dev_Location not in (null, 'null', '') UNION SELECT 'Bathroom' UNION SELECT 'Bedroom' UNION SELECT 'Dining room' UNION SELECT 'Hall' UNION SELECT 'Kitchen' UNION SELECT 'Laundry' UNION SELECT 'Living room' UNION SELECT 'Study' UNION SELECT 'Attic' UNION SELECT 'Basement' UNION SELECT 'Garage' UNION SELECT 'Back yard' UNION SELECT 'Garden' UNION SELECT 'Terrace') AS all_devices ORDER BY id; " + "value": "SELECT DISTINCT '' AS id, '❌None' AS name UNION SELECT dev_Location AS id, dev_Location AS name FROM Devices WHERE dev_Location NOT IN ('', 'null') AND dev_Location IS NOT NULL UNION SELECT 'Bathroom' AS id, 'Bathroom' AS name UNION SELECT 'Bedroom', 'Bedroom' UNION SELECT 'Dining room', 'Dining room' UNION SELECT 'Hall', 'Hall' UNION SELECT 'Kitchen', 'Kitchen' UNION SELECT 'Laundry', 'Laundry' UNION SELECT 'Living room', 'Living room' UNION SELECT 'Study', 'Study' UNION SELECT 'Attic', 'Attic' UNION SELECT 'Basement', 'Basement' UNION SELECT 'Garage', 'Garage' UNION SELECT 'Back yard', 'Back yard' UNION SELECT 'Garden', 'Garden' UNION SELECT 'Terrace', 'Terrace' ORDER BY id;" } ], "localized": ["name", "description"], diff --git a/front/settings.php b/front/settings.php index 6d9767a7..484764da 100755 --- a/front/settings.php +++ b/front/settings.php @@ -800,6 +800,8 @@ $settingsJSON_DB = json_encode($settings, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX // Reloads the current page // setTimeout("clearCache()", 5000); + write_notification(`[Settings] Settings saved by the user`, 'info') + clearCache() } else{ // something went wrong diff --git a/server/initialise.py b/server/initialise.py index 20fd1c3a..9c583ea3 100755 --- a/server/initialise.py +++ b/server/initialise.py @@ -370,8 +370,12 @@ def importConfigs (db, all_plugins): conf.lastImportedConfFile = os.path.getmtime(config_file) updateState("Config imported", conf.lastImportedConfFile, conf.lastImportedConfFile, False) - - mylog('minimal', '[Config] Imported new config') + + msg = '[Config] Imported new settings config' + mylog('minimal', msg) + + # front end app log loggging + write_notification(msg, 'info', timeNowTZ()) return all_plugins