opendatahub-io / odh-dashboard

Dashboard for ODH
Apache License 2.0
28 stars 160 forks source link

Project list view: Fetch notebooks for projects only on row render #3267

Closed jeff-phillips-18 closed 1 week ago

jeff-phillips-18 commented 1 week ago

Fixes RHOAIENG-13605

Description

Do not fetch notebooks for all projects in the project list view. Show the view immediately rather than waiting on load and fetch the notebooks for the project when the project row is rendered.

How Has This Been Tested?

Tested locally, the projects list view now shows data immediately. Test on a cluster with lots of projects, navigate to Data science projects, verify the list is shown as loaded immediately but the workbench counts are populated as they are loaded.

Test Impact

No current test impact.

Screen shot

projects-list-loading

Request review criteria:

Self checklist (all need to be checked):

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 84.97%. Comparing base (a0d40fd) to head (d121dd0). Report is 8 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/opendatahub-io/odh-dashboard/pull/3267/graphs/tree.svg?width=650&height=150&src=pr&token=UQM7NLQUXJ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opendatahub-io)](https://app.codecov.io/gh/opendatahub-io/odh-dashboard/pull/3267?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opendatahub-io) ```diff @@ Coverage Diff @@ ## main #3267 +/- ## ======================================= Coverage 84.96% 84.97% ======================================= Files 1302 1302 Lines 29101 29091 -10 Branches 7828 7828 ======================================= - Hits 24727 24720 -7 + Misses 4374 4371 -3 ``` | [Files with missing lines](https://app.codecov.io/gh/opendatahub-io/odh-dashboard/pull/3267?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opendatahub-io) | Coverage Δ | | |---|---|---| | [...ages/projects/screens/projects/ProjectListView.tsx](https://app.codecov.io/gh/opendatahub-io/odh-dashboard/pull/3267?src=pr&el=tree&filepath=frontend%2Fsrc%2Fpages%2Fprojects%2Fscreens%2Fprojects%2FProjectListView.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opendatahub-io#diff-ZnJvbnRlbmQvc3JjL3BhZ2VzL3Byb2plY3RzL3NjcmVlbnMvcHJvamVjdHMvUHJvamVjdExpc3RWaWV3LnRzeA==) | `72.72% <ø> (-2.28%)` | :arrow_down: | | [...ages/projects/screens/projects/ProjectTableRow.tsx](https://app.codecov.io/gh/opendatahub-io/odh-dashboard/pull/3267?src=pr&el=tree&filepath=frontend%2Fsrc%2Fpages%2Fprojects%2Fscreens%2Fprojects%2FProjectTableRow.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opendatahub-io#diff-ZnJvbnRlbmQvc3JjL3BhZ2VzL3Byb2plY3RzL3NjcmVlbnMvcHJvamVjdHMvUHJvamVjdFRhYmxlUm93LnRzeA==) | `92.00% <100.00%> (+0.33%)` | :arrow_up: | | [frontend/src/utilities/useWatchNotebooks.tsx](https://app.codecov.io/gh/opendatahub-io/odh-dashboard/pull/3267?src=pr&el=tree&filepath=frontend%2Fsrc%2Futilities%2FuseWatchNotebooks.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opendatahub-io#diff-ZnJvbnRlbmQvc3JjL3V0aWxpdGllcy91c2VXYXRjaE5vdGVib29rcy50c3g=) | `100.00% <100.00%> (ø)` | | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/opendatahub-io/odh-dashboard/pull/3267/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opendatahub-io) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/opendatahub-io/odh-dashboard/pull/3267?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opendatahub-io). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opendatahub-io) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/opendatahub-io/odh-dashboard/pull/3267?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opendatahub-io). Last update [a0d40fd...d121dd0](https://app.codecov.io/gh/opendatahub-io/odh-dashboard/pull/3267?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opendatahub-io). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opendatahub-io).
christianvogt commented 1 week ago

/lgtm /approve

openshift-ci[bot] commented 1 week ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christianvogt

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[frontend/OWNERS](https://github.com/opendatahub-io/odh-dashboard/blob/main/frontend/OWNERS)~~ [christianvogt] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment