Update UI to use new constraint_run table
Now that we have a constraint_run table via https://github.com/NASA-AMMOS/aerie/pull/1013, we need to update the UI to use it! The 'run constraint' button and status indicator should use the new table to show status.
- The
constraint_runnow contains the simulation dataset ID, so we can show the constraint run for the simulation we are looking at (if it exists). - It also has a status that tells us if the constraint definition itself is out of date with respect to the constraint run we are viewing. We need some new way to display it.
@cohansen is this still needed?
@cohansen is this still needed?
It depends on how we want the UI to work in respect to the caching. Right now we pull from the cache if there's data available but the user doesn't have any visibility to us doing to, to them it looks like the constraints were run normally.
I think we need to decide if we want to show something about cache data being available in the constraint checking dropdown otherwise we can close this ticket.
It depends on how we want the UI to work in respect to the caching
Building off of what Cody said, I think this is somewhat related to #862 and #677. Our current behavior is that the constraints menu bar shows no icon at first, and then switches to a green check when constraints have been run (even if there were violations)
A similar behavior occurs in the side panel. Note that the constraint has a little green check mark even though constraints haven't been checked yet.
Where this current ticket would come into play is if, on plan load, we want to display the results of checking constraints without the user having to click the "check constraints" button.
EDIT: Another interaction to consider is what should happen when someone else runs constraints, we may want to propagate that information to everyone who's looking at the plan 🤔