mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-06-20 22:30:11 -04:00
FE: add 'Wait for settings reload' option to UI settings
This commit is contained in:
@@ -704,6 +704,34 @@
|
||||
"string": "Based on which value should the network topology view be ordered."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "WAIT_FOR_SETTINGS",
|
||||
"type": {
|
||||
"dataType": "boolean",
|
||||
"elements": [
|
||||
{
|
||||
"elementType": "input",
|
||||
"elementOptions": [{ "type": "checkbox" }],
|
||||
"transformers": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"default_value": false,
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Wait for settings reload"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "When enabled, the UI blocks after saving settings until the backend finishes reloading. When disabled (default), the UI returns immediately for most changes and only waits when plugin configuration changes."
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ SCAN_SUBNETS = ["192.168.1.0/24 --interface=eth1", "192.168.1.0/24 --interface=e
|
||||
LOG_LEVEL = "verbose"
|
||||
TIMEZONE = "Europe/Berlin"
|
||||
UI_LANG = "English (en_us)"
|
||||
UI_WAIT_FOR_SETTINGS = False
|
||||
UI_PRESENCE = ["online", "offline", "archived"]
|
||||
UI_MY_DEVICES = ["online", "offline", "archived", "new", "down"]
|
||||
UI_NOT_RANDOM_MAC = []
|
||||
|
||||
@@ -452,16 +452,6 @@ def importConfigs(pm, db, all_plugins):
|
||||
"UI",
|
||||
)
|
||||
|
||||
conf.UI_WAIT_FOR_SETTINGS = ccd(
|
||||
"UI_WAIT_FOR_SETTINGS",
|
||||
False,
|
||||
c_d,
|
||||
"Wait for settings reload",
|
||||
'{"dataType":"boolean", "elements": [{"elementType" : "checkbox", "elementOptions" : [] ,"transformers": []}]}',
|
||||
"[]",
|
||||
"UI",
|
||||
)
|
||||
|
||||
# Init timezone in case it changed and handle invalid values
|
||||
try:
|
||||
if conf.TIMEZONE not in all_timezones:
|
||||
|
||||
Reference in New Issue
Block a user