-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
task: persist simulation states in the UI #1653
Conversation
packages/client/hmi-client/src/components/widgets/tera-progress-bar.vue
Outdated
Show resolved
Hide resolved
There might be some confusion here:
|
Just to clarify this PR a bit - it was initially an initiative to add intermediate results. Since the BE isn't prepared yet the added changes are just a refactor around polling as well as persisting simulation results in the UI. |
I do believe we should use SSE for the this, as multiple window/user could look at this. |
I discussed with @mwdchang a little earlier today - I'm looking into this PR this file specifically and how it can be used for the intermediate results here |
But just an FYI this PR is not for the intermediate results but instead the persisting of simulation jobs. Intermediate results will follow |
packages/client/hmi-client/src/components/widgets/tera-progress-bar.vue
Outdated
Show resolved
Hide resolved
packages/client/hmi-client/src/services/models/simulation-service.ts
Outdated
Show resolved
Hide resolved
Two things
|
|
I've also stopped the poller when unmounting the component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All those node having the same progress-bar and code is in big need of refactoring.
Why not leveraging the tera-worflow-node.vue
packages/client/hmi-client/src/components/workflow/tera-progress-bar.vue
Outdated
Show resolved
Hide resolved
packages/client/hmi-client/src/components/workflow/tera-simulate-ciemss-node.vue
Outdated
Show resolved
Hide resolved
@YohannParis I agree that this is in need of a refactor here, but I think we would need a new component to encapsulate all of the simulation/calibration/ensemble nodes since a lot of the code is shared between those components only. Workflow nodes such as model & dataset do not need this progress/polling functionality within them so Im not sure it would make sense to put it on the Do you think I should include this refactor as a part of this PR? I'm a little worried of doing too much in this PR alone. (Persisting simulation status + Intermediate results + refactor of simulation/calibration/ensemble nodes) |
@YohannParis @blanchco Let's leave progress-bar refactor for another time, arguably it might have been introduced a tad too early 😄
|
packages/client/hmi-client/src/services/models/simulation-service.ts
Outdated
Show resolved
Hide resolved
Didn't test all the cases, but looks fine in general, thanks |
Co-authored-by: Cole Blanchard <cblanchard@Coles-MacBook-Pro.local>
Description
As @mwdchang mentioned this polling will be changed for an event sourcing architecture - will be looking into websockets.
Screen.Recording.2023-08-08.at.9.49.11.AM.mov
Screen.Recording.2023-08-08.at.9.50.48.AM.mov
References #(issue)
#1634