Skip to content

Commit

Permalink
testresult: Include the revision version in the id attribute
Browse files Browse the repository at this point in the history
For this ID to be unique, we need to include the revision number,
otherwise, if we have several revisions with test results, the id will
collide and there's no way to know which panel should be opened.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
  • Loading branch information
Damien Lespiau committed Dec 4, 2015
1 parent 3e2d909 commit 1160883
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions patchwork/templates/patchwork/test-result.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="panel panel-default">
{% if test_result.summary %}
<div class="panel-heading small-panel-heading cursor-pointer" role="tab" data-toggle="collapse" href="#collapse-{{ forloop.counter }}" aria-expanded="false" aria-controls="collapse-{{ forloop.counter }}" id="heading-{{ forloop.counter }}">
<div class="panel-heading small-panel-heading cursor-pointer" role="tab" data-toggle="collapse" href="#collapse-{{ revision.version }}-{{ forloop.counter }}" aria-expanded="false" aria-controls="collapse-{{ revision.version}}-{{ forloop.counter }}" id="heading-{{ forloop.counter }}">
{% else %}
<div class="panel-heading small-panel-heading" role="tab" id="heading-{{ forloop.counter }}">
{% endif %}
Expand All @@ -16,7 +16,7 @@
{% endif %}
</div>
{% if test_result.summary %}
<div id="collapse-{{ forloop.counter }}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-{{ forloop.counter}}">
<div id="collapse-{{ revision.version }}-{{ forloop.counter }}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-{{ forloop.counter}}">
<pre class="panel-body test-result">
{{ test_result.summary }}</pre>
</div>
Expand Down

0 comments on commit 1160883

Please sign in to comment.