forked from Github/frigate
Ability to add, edit, and delete camera groups in the UI (#10296)
* Add dialog for creating new camera group * Support adding of camera groups and dynamically updating the config * Support deleting and edit existing camera groups * Don't show separator if user has no groups * Formatting * fix background
This commit is contained in:
@@ -292,7 +292,7 @@ def config_set():
|
||||
f.close()
|
||||
# Validate the config schema
|
||||
try:
|
||||
FrigateConfig.parse_raw(new_raw_config)
|
||||
config_obj = FrigateConfig.parse_raw(new_raw_config)
|
||||
except Exception:
|
||||
with open(config_file, "w") as f:
|
||||
f.write(old_raw_config)
|
||||
@@ -314,6 +314,13 @@ def config_set():
|
||||
500,
|
||||
)
|
||||
|
||||
json = request.get_json(silent=True) or {}
|
||||
|
||||
if json.get("requires_restart", 1) == 0:
|
||||
current_app.frigate_config = FrigateConfig.runtime_config(
|
||||
config_obj, current_app.plus_api
|
||||
)
|
||||
|
||||
return make_response(
|
||||
jsonify(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user