Implement object lifecycle pane (#13550)

* Object lifecycle pane

* fix thumbnails and annotation offset math

* snapshot endpoint height and format, yaml types, bugfixes

* clean up for new type

* use get_image_from_recording in recordings snapshot api

* make height optional
This commit is contained in:
Josh Hawkins
2024-09-04 08:46:49 -05:00
committed by GitHub
parent e80322dab7
commit ddf9163c47
18 changed files with 1407 additions and 251 deletions

View File

@@ -1,5 +1,6 @@
"""Utilities for builtin types manipulation."""
import ast
import copy
import datetime
import logging
@@ -210,10 +211,16 @@ def update_yaml_from_url(file_path, url):
if len(new_value_list) > 1:
update_yaml_file(file_path, key_path, new_value_list)
else:
value = str(new_value_list[0])
if value.isnumeric():
value = int(value)
value = new_value_list[0]
if "," in value:
# Skip conversion if we're a mask or zone string
update_yaml_file(file_path, key_path, value)
else:
try:
value = ast.literal_eval(value)
except (ValueError, SyntaxError):
pass
update_yaml_file(file_path, key_path, value)
update_yaml_file(file_path, key_path, value)