Skip to content
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

[Bug] fix pagination in jobs route #2655

Merged
merged 1 commit into from
Oct 23, 2023
Merged

[Bug] fix pagination in jobs route #2655

merged 1 commit into from
Oct 23, 2023

Conversation

merobi-hub
Copy link
Collaborator

@merobi-hub merobi-hub commented Oct 21, 2023

Problem

Unlike in the case of datasets, for jobs, page navigation is displayed whether or not there are jobs/pages in the namespace. The page total advances while the total job count remains zero.

Solution

This hides pagination when there are no jobs.

One-line summary: hides job pagination in the case of no jobs.

Checklist

  • You've signed-off your work
  • Your changes are accompanied by tests (if relevant)
  • Your change contains a small diff and is self-contained
  • You've updated any relevant documentation (if relevant)
  • You've included a one-line summary of your change for the CHANGELOG.md (Depending on the change, this may not be necessary).
  • You've versioned your .sql database schema migration according to Flyway's naming convention (if relevant)
  • You've included a header in any source code files (if relevant)

Screenshot from 2023-10-21 18-02-39
Screenshot from 2023-10-21 08-40-33

@boring-cyborg boring-cyborg bot added the web label Oct 21, 2023
@netlify
Copy link

netlify bot commented Oct 21, 2023

Deploy Preview for peppy-sprite-186812 canceled.

Name Link
🔨 Latest commit c6f95f1
🔍 Latest deploy log https://app.netlify.com/sites/peppy-sprite-186812/deploys/65352d4b9b87f9000801bf92

@merobi-hub merobi-hub added the bug Something isn't working label Oct 21, 2023
@merobi-hub merobi-hub changed the title Fix pagination in jobs route [Bug] fix pagination in jobs route Oct 21, 2023
@codecov
Copy link

codecov bot commented Oct 21, 2023

Codecov Report

Merging #2655 (c6f95f1) into main (aa6fc00) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main    #2655   +/-   ##
=========================================
  Coverage     83.35%   83.35%           
  Complexity     1295     1295           
=========================================
  Files           244      244           
  Lines          5948     5948           
  Branches        279      279           
=========================================
  Hits           4958     4958           
  Misses          844      844           
  Partials        146      146           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@phixMe
Copy link
Member

phixMe commented Oct 23, 2023

Is this the same solution we use for datasets? Ideally, there would be a general purpose paging controller, but that is a bit out of scope here.

@merobi-hub
Copy link
Collaborator Author

merobi-hub commented Oct 23, 2023

@phixMe yes, this change refactors code that was basically the same as in datasets. Agree that a general purpose solution would be ideal. This will fix the pagination in the meantime.

Copy link
Member

@phixMe phixMe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @merobi-hub

@merobi-hub merobi-hub merged commit 5c42dfd into main Oct 23, 2023
16 checks passed
@merobi-hub merobi-hub deleted the fix/jobs/pagination branch October 23, 2023 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working web
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants