From efc9a974b1966664595ab0f3f686275f3a1697d8 Mon Sep 17 00:00:00 2001 From: jokob-sk Date: Tue, 8 Oct 2024 08:52:24 +1100 Subject: [PATCH] Settings - UI component changes #826 --- docs/PERFORMANCE.md | 4 ++-- docs/README.md | 1 + front/plugins/avahi_scan/config.json | 2 +- front/plugins/notification_processing/config.json | 2 +- front/plugins/sync/config.json | 2 +- front/plugins/ui_settings/config.json | 8 ++++---- server/initialise.py | 4 ++-- 7 files changed, 12 insertions(+), 11 deletions(-) diff --git a/docs/PERFORMANCE.md b/docs/PERFORMANCE.md index c82ad553..1d3fa241 100755 --- a/docs/PERFORMANCE.md +++ b/docs/PERFORMANCE.md @@ -1,6 +1,6 @@ # Performance tips -The application runs regular maintenance a DB cleanup tasks. If these tasks fail, you might encounter performance issues. +The application runs regular maintenance and DB cleanup tasks. If these tasks fail, you might encounter performance issues. Most performance issues are caused by a big database or large log files. Enabling unnecessary plugins will also lead to performance degradation. @@ -9,7 +9,7 @@ You can always check the size of your database and database tables under the Mai ![Db size check](/docs/img/PERFORMANCE/db_size_check.png) > [!NOTE] -> For around 100 devices the database should be approximately `50MB` and none of the entries (rows) should exceed the value of `10 000` on a healthy system. +> For around 100 devices the database should be approximately `50MB` and none of the entries (rows) should exceed the value of `10 000` on a healthy system. These numbers will depend on your network activity and settings. ## Maintenance plugins diff --git a/docs/README.md b/docs/README.md index cdd6e9ea..92a10d57 100755 --- a/docs/README.md +++ b/docs/README.md @@ -43,6 +43,7 @@ There is also an in-app Help / FAQ section that should be answering frequently a - [Invalid JSON errors debug help](/docs/DEBUG_INVALID_JSON.md) - [Troubleshooting Plugins](/docs/DEBUG_PLUGINS.md) - [File Permissions](/docs/FILE_PERMISSIONS.md) +- [Performance tips](/docs/PERFORMANCE.md) #### 🔝 Popular/Suggested diff --git a/front/plugins/avahi_scan/config.json b/front/plugins/avahi_scan/config.json index b45d7f1f..21091ecc 100755 --- a/front/plugins/avahi_scan/config.json +++ b/front/plugins/avahi_scan/config.json @@ -70,7 +70,7 @@ "description": [ { "language_code": "en_us", - "string": "When the plugin should be executed. If enabled this will execute the scan until there are no (unknown) or (name not found) devices. Setting this to on_new_device or a daily schedule is recommended.

Depends on the SCAN_SUBNETS setting." + "string": "When the plugin should be executed. If enabled this will execute the scan until there are no (unknown) or (name not found) devices. Setting this to on_new_device or a daily schedule is recommended." } ] }, diff --git a/front/plugins/notification_processing/config.json b/front/plugins/notification_processing/config.json index c9533156..42ac8a0c 100755 --- a/front/plugins/notification_processing/config.json +++ b/front/plugins/notification_processing/config.json @@ -34,7 +34,7 @@ "elements": [ { "elementType": "select", - "elementOptions": [{ "multiple": "true" }], + "elementOptions": [{ "multiple": "true", "ordeable": "true" }], "transformers": [] } ] diff --git a/front/plugins/sync/config.json b/front/plugins/sync/config.json index a5092923..89cb63e2 100755 --- a/front/plugins/sync/config.json +++ b/front/plugins/sync/config.json @@ -321,7 +321,7 @@ "elements": [ { "elementType": "select", - "elementOptions": [{ "multiple": "true" }], + "elementOptions": [{ "multiple": "true", "ordeable": "true" }], "transformers": [] } ] diff --git a/front/plugins/ui_settings/config.json b/front/plugins/ui_settings/config.json index ec09fceb..6f32e476 100755 --- a/front/plugins/ui_settings/config.json +++ b/front/plugins/ui_settings/config.json @@ -220,7 +220,7 @@ "elements": [ { "elementType": "select", - "elementOptions": [{ "multiple": "true" }], + "elementOptions": [{ "multiple": "true", "ordeable": "true" }], "transformers": [] } ] @@ -247,7 +247,7 @@ "elements": [ { "elementType": "select", - "elementOptions": [{ "multiple": "true" }], + "elementOptions": [{ "multiple": "true", "ordeable": "true" }], "transformers": [] } ] @@ -274,7 +274,7 @@ "elements": [ { "elementType": "select", - "elementOptions": [{ "multiple": "true" }], + "elementOptions": [{ "multiple": "true", "ordeable": "true" }], "transformers": [] } ] @@ -394,7 +394,7 @@ "elements": [ { "elementType": "select", - "elementOptions": [{ "multiple": "true" }], + "elementOptions": [{ "multiple": "true", "ordeable": "true" }], "transformers": [] } ] diff --git a/server/initialise.py b/server/initialise.py index fdf8e3ed..b9ca951a 100755 --- a/server/initialise.py +++ b/server/initialise.py @@ -137,7 +137,7 @@ def importConfigs (db, all_plugins): # ---------------------------------------- # ccd(key, default, config_dir, name, inputtype, options, group, events=[], desc = "", regex = "", setJsonMetadata = {}, overrideTemplate = {}) - conf.LOADED_PLUGINS = ccd('LOADED_PLUGINS', [] , c_d, 'Loaded plugins', '{"dataType":"array", "elements": [{"elementType" : "select", "elementOptions" : [{"multiple":"true"}] ,"transformers": []}]}', '[]', 'General') + conf.LOADED_PLUGINS = ccd('LOADED_PLUGINS', [] , c_d, 'Loaded plugins', '{"dataType":"array", "elements": [{"elementType" : "select", "elementOptions" : [{"multiple":"true", "ordeable": "true"}] ,"transformers": []}]}', '[]', 'General') conf.SCAN_SUBNETS = ccd('SCAN_SUBNETS', ['192.168.1.0/24 --interface=eth1', '192.168.1.0/24 --interface=eth0'] , c_d, 'Subnets to scan', '{"dataType": "array","elements": [{"elementType": "input","elementOptions": [{"placeholder": "192.168.1.0/24 --interface=eth1"},{"suffix": "_in"},{"cssClasses": "col-sm-10"},{"prefillValue": "null"}],"transformers": []},{"elementType": "button","elementOptions": [{"sourceSuffixes": ["_in"]},{"separator": ""},{"cssClasses": "col-xs-12"},{"onClick": "addList(this, false)"},{"getStringKey": "Gen_Add"}],"transformers": []},{"elementType": "select","elementHasInputValue": 1,"elementOptions": [{"multiple": "true"},{"readonly": "true"},{"editable": "true"}],"transformers": []},{"elementType": "button","elementOptions": [{"sourceSuffixes": []},{"separator": ""},{"cssClasses": "col-xs-6"},{"onClick": "removeAllOptions(this)"},{"getStringKey": "Gen_Remove_All"}],"transformers": []},{"elementType": "button","elementOptions": [{"sourceSuffixes": []},{"separator": ""},{"cssClasses": "col-xs-6"},{"onClick": "removeFromList(this)"},{"getStringKey": "Gen_Remove_Last"}],"transformers": []}]}', '[]', 'General') conf.LOG_LEVEL = ccd('LOG_LEVEL', 'verbose' , c_d, 'Log verboseness', '{"dataType":"string", "elements": [{"elementType" : "select", "elementOptions" : [] ,"transformers": []}]}', "['none', 'minimal', 'verbose', 'debug', 'trace']", 'General') conf.TIMEZONE = ccd('TIMEZONE', 'Europe/Berlin' , c_d, 'Time zone', '{"dataType":"string", "elements": [{"elementType" : "input", "elementOptions" : [] ,"transformers": []}]}', '[]', 'General') @@ -289,7 +289,7 @@ def importConfigs (db, all_plugins): loaded_plugins_prefixes.append(pref) # save the newly discovered plugins as options and default values - conf.LOADED_PLUGINS = ccd('LOADED_PLUGINS', loaded_plugins_prefixes , c_d, 'Loaded plugins', '{"dataType":"array", "elements": [{"elementType" : "select", "elementOptions" : [{"multiple":"true"}] ,"transformers": []}]}', str(sorted(all_plugins_prefixes)), 'General') + conf.LOADED_PLUGINS = ccd('LOADED_PLUGINS', loaded_plugins_prefixes , c_d, '_KEEP_', '_KEEP_', str(sorted(all_plugins_prefixes)), 'General') mylog('none', ['[Config] Number of Plugins to load: ', len(loaded_plugins_prefixes)]) mylog('none', ['[Config] Plugins to load: ', loaded_plugins_prefixes])