-
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
base: main
Are you sure you want to change the base?
Changes from all commits
bcbb3a4
4722b78
bcbb087
c8dea63
c1005b0
bf8a281
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 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. Not sure. A stack trace can generally be summarized using the last line as that one is already quite informative. Warnings are far less obvious and vary greatly between frameworks: I guess that is why we rely on the presence of any Would it make sense to have an 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. That's the existing contract we offer to the user already though - we will pass on the last non-empty line of stderr. It is then up to the algorithm developer to do their best with that. I think we should do that filtering using the existing 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.
I noticed that in spot checks. Quite annoying. |
||
<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 %} |
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.
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.
Okay, could you add the badge and stderr filtering?