FE: add 'Wait for settings reload' option to UI settings

This commit is contained in:
Jokob @NetAlertX
2026-06-21 01:08:56 +00:00
parent e879892a04
commit f52e303c19
3 changed files with 28 additions and 11 deletions

View File

@@ -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."
}
]
}
]
}

View File

@@ -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 = []

View File

@@ -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: