Automations UI polish: edit action and batch job stats#2299
Draft
Flix6x wants to merge 2 commits into
Draft
Conversation
- The automations page gets an Edit action (name and cron string), using the existing PATCH endpoint. - The list endpoint now includes per-automation job stats, computed in a single pass over the relevant job caches, instead of the UI firing one detail request per automation on page load; the Details modal loads its contents lazily, when first opened. Part of #2288 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rbix8k1JfeUWNXEmHEZVpX
Documentation build overview
34 files changed ·
|
…s-ui-polish # Conflicts: # flexmeasures/data/services/automations.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow-ups on the automations UI (stacked on #2297):
GET /assets/<id>/automationsnow includes per-automationjob_stats, computed in a single pass over the relevant job caches (deduped cache refs across all the asset's automations, jobs grouped by their trigger's automation id). The UI fills the Jobs column from the list response instead of firing one detail request per automation on page load, and the Details modal loads its contents lazily when first opened. This resolves the O(automations × sensors × jobs) Redis fanout flagged in the Automations - first roundtrip for forecasts #2290 review.redis_connection_err, like the jobs endpoint.How to test
Open
/assets/<id>/automationsas an account admin: the Jobs column fills immediately from one request; Edit lets you rename/re-schedule.Tests:
pytest flexmeasures/api/v3_0/tests/test_automations_api.py flexmeasures/cli/tests/test_automations.py flexmeasures/ui/tests/test_asset_crud.py🤖 Generated with Claude Code
https://claude.ai/code/session_01Rbix8k1JfeUWNXEmHEZVpX