webui: use partial status polling

This commit is contained in:
2026-06-07 19:13:39 -06:00
parent 512a1aa302
commit e7965f4b99
2 changed files with 31 additions and 3 deletions
+11
View File
@@ -300,3 +300,14 @@ def test_status_endpoint_supports_field_selection_and_cache_headers():
assert 'server.header("If-Modified-Since")' in source
assert 'server.send(304)' in source
assert 'server.collectHeaders(statusCacheHeaders, 2)' in source
def test_embedded_webui_uses_partial_status_for_overview_polling():
source = firmware_source()
assert 'const STATUS_FIELDS_OVERVIEW="battery,temps,relays,vehicle,network,alarms,system";' in source
assert 'function statusUrl()' in source
assert 'api("/status?fields="+STATUS_FIELDS_OVERVIEW)' in source
assert 'fetch(statusUrl(),{cache:"no-store"})' in source
assert 'function mergeStatus(previous,next)' in source
assert 'api("/status?fields=config")' in source