Skip to content

Commit f52e303

Browse files
committed
FE: add 'Wait for settings reload' option to UI settings
1 parent e879892 commit f52e303

3 files changed

Lines changed: 28 additions & 11 deletions

File tree

front/plugins/ui_settings/config.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,34 @@
704704
"string": "Based on which value should the network topology view be ordered."
705705
}
706706
]
707+
},
708+
{
709+
"function": "WAIT_FOR_SETTINGS",
710+
"type": {
711+
"dataType": "boolean",
712+
"elements": [
713+
{
714+
"elementType": "input",
715+
"elementOptions": [{ "type": "checkbox" }],
716+
"transformers": []
717+
}
718+
]
719+
},
720+
"default_value": false,
721+
"options": [],
722+
"localized": ["name", "description"],
723+
"name": [
724+
{
725+
"language_code": "en_us",
726+
"string": "Wait for settings reload"
727+
}
728+
],
729+
"description": [
730+
{
731+
"language_code": "en_us",
732+
"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."
733+
}
734+
]
707735
}
708736
]
709737
}

server/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
LOG_LEVEL = "verbose"
3333
TIMEZONE = "Europe/Berlin"
3434
UI_LANG = "English (en_us)"
35-
UI_WAIT_FOR_SETTINGS = False
3635
UI_PRESENCE = ["online", "offline", "archived"]
3736
UI_MY_DEVICES = ["online", "offline", "archived", "new", "down"]
3837
UI_NOT_RANDOM_MAC = []

server/initialise.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -452,16 +452,6 @@ def importConfigs(pm, db, all_plugins):
452452
"UI",
453453
)
454454

455-
conf.UI_WAIT_FOR_SETTINGS = ccd(
456-
"UI_WAIT_FOR_SETTINGS",
457-
False,
458-
c_d,
459-
"Wait for settings reload",
460-
'{"dataType":"boolean", "elements": [{"elementType" : "checkbox", "elementOptions" : [] ,"transformers": []}]}',
461-
"[]",
462-
"UI",
463-
)
464-
465455
# Init timezone in case it changed and handle invalid values
466456
try:
467457
if conf.TIMEZONE not in all_timezones:

0 commit comments

Comments
 (0)