-
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
Redirect Root Route for Datagov Harvest Admin #141
base: main
Are you sure you want to change the base?
Conversation
e7798e1
to
3e64623
Compare
3e64623
to
f6b9d6b
Compare
f6b9d6b
to
a23beed
Compare
a23beed
to
49bed0c
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.
LGTM, my comments are just bossy quibbles, nice work.
app/routes.py
Outdated
# TODO: wire in paginated jobs htmx refresh ui & route | ||
jobs = db.pget_harvest_jobs( | ||
paginate=False, facets=f"harvest_source_id = '{source.id}'" | ||
) | ||
next_job = "N/A" | ||
if len(jobs): |
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.
comment (non-blocking): I think that the most idiomatic version of this might be if jobs:
, or maybe if len(jobs) > 0
, but it's also fine as-is.
app/routes.py
Outdated
# TODO: wire in paginated jobs htmx refresh ui & route | ||
jobs = db.pget_harvest_jobs( | ||
paginate=False, facets=f"harvest_source_id = '{source.id}'" | ||
) | ||
next_job = "N/A" | ||
if len(jobs): | ||
last_job = jobs[len(jobs) - 1] |
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.
comment (non-blocking): More idioms, negative indexes count from the end so last_job = jobs[-1]
works the same as what you have here.
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 this looks good! Thanks for fixing the broken test cases!
409f89f
to
b054910
Compare
b054910
to
2445239
Compare
2445239
to
1d44144
Compare
1d44144
to
fb1e624
Compare
redirects to all orgs page on load; udpates harvest source page with feedback changes; updates fixtures to have better jobs data; fixes broken tests; lint
cleans up metrics route code; fixes issue with pagination numbers in pagination module; makes pagination per_page count a kwarg; removes sort functionality from tables as it breaks with htmx updates and is not super useful
calculates count using new count decorator
fb1e624
to
f46b266
Compare
2aa3287
to
33d598c
Compare
Pull Request
Related to:
About
Also:
PR TASKS