Skip to content
Snippets Groups Projects
Commit e863d5b9 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[experiments] Uncollapse block contents if they have an error report

parent 4b3a4d91
No related branches found
No related tags found
1 merge request!194Scheduler
......@@ -193,11 +193,12 @@
{% for block in blocks %}
{% with xpcore.blocks|getkey:block.name as core_block %}
{% with block.get_status_display as block_status %}
{% with block.error_report as error_report %}
<div id="{{ block.name }}" data-beat-block-name="{{ block.name }}" data-beat-status="{{ block.get_status_display|lower }}" class="panel panel-default may-update{% if block.analyzer %} analyzer{% endif %}">
<div class="panel-heading" role="tab" id="heading-{{ block.name }}">
<h4 class="panel-title">
<a{% if block_status != 'Failed' %} class="collapsed"{% endif %} role="button" data-toggle="collapse" data-parent="#{{ block.name }}" href="#collapse-{{ block.name }}" aria-expanded="{% if block_status == 'Failed' %}true{% else %}false{% endif %}" aria-controls="collapse-{{ block.name }}">
<a{% if not error_report %} class="collapsed"{% endif %} role="button" data-toggle="collapse" data-parent="#{{ block.name }}" href="#collapse-{{ block.name }}" aria-expanded="{% if error_report %}true{% else %}false{% endif %}" aria-controls="collapse-{{ block.name }}">
<i data-toggle="tooltip" data-placement="bottom" title="{{ block_status }}"
{% if block_status == 'Not cached' %}
class="icon-scheduled fa fa-play"
......@@ -217,7 +218,7 @@
</a>
</h4>
</div>{# panel heading #}
<div id="collapse-{{ block.name }}" class="panel-collapse collapse{% if block_status == 'Failed' %} in{% endif %}" role="tabpanel" aria-labelledby="heading-{{ block.name }}">
<div id="collapse-{{ block.name }}" class="panel-collapse collapse{% if error_report %} in{% endif %}" role="tabpanel" aria-labelledby="heading-{{ block.name }}">
<div class="panel-body">
<ul>
<li>Algorithm: <a href="{{ block.algorithm.get_absolute_url }}">{{ block.algorithm.fullname }}</a></li>
......@@ -254,9 +255,9 @@
</ul>
</li>
{% endif %}
{% if block.error_report %}
{% if error_report %}
<li>Captured Errors (on user code):
<pre class="console-output">{{ block.error_report }}</pre>
<pre class="console-output">{{ error_report }}</pre>
</li>
{% endif %}
{% if block.stdout %}
......@@ -275,6 +276,7 @@
</div>{# panel #}
{% endwith %}
{% endwith %}
{% endwith %}
{% endfor %}
</div>{# panel group #}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment