Miscellaneous fixes (#24528)

* revert disable save buttons when there are no changes in config editor

* pass migrated config to each step in the config migration chain

* use 150 as the default max when typing a min speed in the search filter

* fix preview export outpoint to be relative to the start of the preview file

* don't crash on invalid trusted proxy entries or non-ip forwarded hops

* translate the camera count badge in the roles table

* run every batch through the lpr recognition model

* log rejected motion and notification mqtt payloads

* log invalid addresses in x-forwarded-for

* add test

* remove unused autotracked_object_region

* remove unreachable autotracker setup call in camera maintenance

* apply onvif retry limit when initialization fails

* fix reindex progress overcounting when there are fewer events than a batch

* match the register device button aria label to its text

* reset the add profile form on cancel

* ignore case when filtering search suggestions

* tweak comment
This commit is contained in:
Josh Hawkins
2026-10-01 07:19:31 -06:00
committed by GitHub
parent 16eac66463
commit 24a236a152
16 changed files with 83 additions and 35 deletions
+25
View File
@@ -257,6 +257,31 @@ class TestMigrateConfigFile(unittest.TestCase):
self.assertEqual(migrated["models"][0]["devices"], ["openvino:GPU"])
self.assertNotIn("detectors", migrated)
def test_top_level_changes_survive_later_steps(self):
# 0.16 adds detect and 0.17 splits genai, both at the top level
migrated = self._migrate(
"mqtt:\n"
" enabled: false\n"
"genai:\n"
" provider: ollama\n"
" model: llava\n"
" prompt: describe it\n"
"cameras: {}\n"
"version: 0.15-1\n"
)
self.assertEqual(migrated["version"], CURRENT_CONFIG_VERSION)
self.assertTrue(migrated["detect"]["enabled"])
self.assertEqual(migrated["objects"]["genai"], {"prompt": "describe it"})
self.assertEqual(
migrated["genai"]["default"],
{
"provider": "ollama",
"model": "llava",
"roles": ["descriptions", "chat"],
},
)
def test_a_migrated_config_is_left_alone(self):
migrated = self._migrate(
"mqtt:\n"