-
Notifications
You must be signed in to change notification settings - Fork 52
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
Fix small issues on Joblist #3767
Open
chrisvanrun
wants to merge
6
commits into
main
Choose a base branch
from
3436-job-list-page-a-bit-broken
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bcbb3a4
Wrap results in a modal
chrisvanrun 4722b78
Move error to modal in status column
chrisvanrun bcbb087
Fix curly linter errors
chrisvanrun c8dea63
Isolate curly linter error
chrisvanrun c1005b0
Make warnings and errors more similar in visual appearance
chrisvanrun bf8a281
Minor aria fixes
chrisvanrun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 90 additions & 7 deletions
97
app/grandchallenge/algorithms/templates/algorithms/job_status_detail.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,90 @@ | ||
<span class="badge badge-{{ object.status_context }}" {% if not object.finished %}hx-get="{{ object.status_url }}" hx-trigger="load delay:30s" hx-swap="outerHTML"{% endif %}> | ||
{% if object.animate %} | ||
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span> | ||
{% endif %} | ||
{{ object.get_status_display }}{% if object.status == object.SUCCESS and object.stderr %}, | ||
with warnings{% endif %} | ||
</span> | ||
{% if object.status == object.SUCCESS and object.stderr %} | ||
<div> | ||
<div class="modal" | ||
id="warningInfoModal-{{ object.pk }}" | ||
tabindex="-1" | ||
role="dialog" | ||
aria-hidden="true" | ||
> | ||
<div class="modal-dialog modal-dialog-centered modal-lg" role="document"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h5 class="modal-title"> | ||
Warnings on stderr | ||
</h5> | ||
<button type="button" class="close" data-dismiss="modal" | ||
aria-label="Close"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
</div> | ||
<div class="text-left modal-body"> | ||
{{ object.stderr }} | ||
</div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will dump the entirety of |
||
<div class="modal-footer"> | ||
<a class="btn btn-primary" href="{{ object.get_absolute_url }}"> | ||
<i class="fa fa-info-circle mr-1"></i>View Result Details | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<a href="#warningInfoModal-{{ object.pk }}" | ||
data-toggle="modal" | ||
data-target="#warningInfoModal-{{ object.pk }}" | ||
class="badge badge-{{ object.status_context }}" | ||
title="Click to see the warnings" | ||
> | ||
<i class="fa fa-fw fa-eye" aria-hidden="true"></i> | ||
{{ object.get_status_display }}, with warnings | ||
</a> | ||
</div> | ||
{% elif object.status == object.FAILURE and object.error_message %} | ||
<div> | ||
<div class="modal" | ||
id="errorInfoModal-{{ object.pk }}" | ||
tabindex="-1" | ||
role="dialog" | ||
aria-hidden="true" | ||
> | ||
<div class="modal-dialog modal-dialog-centered modal-lg" role="document"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h5 class="modal-title"> | ||
Error Message | ||
</h5> | ||
<button type="button" class="close" data-dismiss="modal" | ||
aria-label="Close"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
</div> | ||
<div class="text-left modal-body"> | ||
{{ object.error_message }} | ||
</div> | ||
<div class="modal-footer"> | ||
<a class="btn btn-primary" href="{{ object.get_absolute_url }}"> | ||
<i class="fa fa-info-circle mr-1"></i>View Result Details | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<a href="#errorInfoModal-{{ object.pk }}" | ||
data-toggle="modal" | ||
data-target="#errorInfoModal-{{ object.pk }}" | ||
class="badge badge-{{ object.status_context }}" | ||
title="Click to see the error message" | ||
> | ||
<i class="fa fa-fw fa-eye" aria-hidden="true"></i> | ||
{{ object.get_status_display }}, with errors | ||
</a> | ||
</div> | ||
{% else %} | ||
<span class="badge badge-{{ object.status_context }}"> | ||
{% if object.animate %} | ||
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span> | ||
{% endif %} | ||
{{ object.get_status_display }} | ||
</span> | ||
{% endif %} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Should we show a link to the result even if the
rendered_result_text
is empty? For algorithms that do not implement the legacy"results-json-file"
this is just an empty string so the results column is empty: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.
Shall we hide the Result column if there is no rendered text? I think I had that implemented at one point but it got reversed. Maybe because it wasn't implemented correctly at the time.
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.
That had problems as some jobs had rendered text, some didn't, so the column would hide and unhide when crossing pages, and sometimes it would be invisible when it should have been visible (#3524). A query over all jobs to determine its visibility would have needed to be done which means does any job have the right output and is the rendered text returning something for that job. Too expensive for algorithms with lots of jobs.
I think the best way forward here is to link to the detail page again if it is empty for a particular job. We can have another pitch/issue to decide whether to remove the rendered results text now as this is legacy stuff and users should have moved to specific outputs. What do you think?
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 like the idea of having the badge always show up: for now. I think an argument can be made that we should remove this small part of the feature since we don't actively suggest people to use it anymore.