-
Notifications
You must be signed in to change notification settings - Fork 6
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
Refactor loadModelRuns to the store as a global action #503
Conversation
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.
This makes sense to me, and it works without any issues. I'll defer to @BryonLewis for approval since this is a clientside-only change
await ApiService.getObservationImages(id, data); | ||
// Notify the ModelRunList that downloading is happening | ||
if (imageDownloadingModelRunId.value) { | ||
emit('image-download', imageDownloadingModelRunId.value); | ||
} | ||
refreshModelRunDownloadingStatuses(); |
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.
I assume this was autoformatted. I'll file an issue to investigate why the linting step didn't flag this the first time around
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.
I think the linting step isn't performing as intended when I run npm run lint:fix
, but I haven't looked into it yet.
- Rename loadModelRuns to queryModelRuns - Rename checkDownloading to refreshModelRunDownloadingStatuses
6c3c887
to
962407c
Compare
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.
Thanks Again this was extremely helpful.
loadModelRuns
is now part of the store asqueryModelRuns
and updates store state.queryModelRuns
manages pagination state through "firstPage" and "nextPage" requests (see ModelRunList.vue for usage).checkDownloading
is now part of the store asrefreshModelRunDownloadingStatuses
. Additionally, it has been fixed to properly update the downloading statuses of all loaded pagination pages.state.downloadCheck
have been replaced with calls torefreshModelRunDownloadingStatuses
.