You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2017/05/15 21:16:07 UTC

hbase git commit: HBASE-18044 Fix bug in report-flakies.py where if counter is set outside for loop, it cannot be overwritten inside loop.

Repository: hbase
Updated Branches:
  refs/heads/master 341223d86 -> 841bb0065


HBASE-18044 Fix bug in report-flakies.py where if counter is set outside for loop, it cannot be overwritten inside loop.

http://stackoverflow.com/questions/7537439/how-to-increment-a-variable-on-a-for-loop-in-jinja-template

Change-Id: Ic404d6360fb646e6490d1487374520f9550b76b4


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/841bb006
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/841bb006
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/841bb006

Branch: refs/heads/master
Commit: 841bb00655b3eb58e7d76d945e24cfeadfdb11de
Parents: 341223d
Author: Apekshit Sharma <ap...@apache.org>
Authored: Fri May 12 02:25:19 2017 -0700
Committer: Apekshit Sharma <ap...@apache.org>
Committed: Mon May 15 14:15:57 2017 -0700

----------------------------------------------------------------------
 dev-support/flaky-dashboard-template.html | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/841bb006/dev-support/flaky-dashboard-template.html
----------------------------------------------------------------------
diff --git a/dev-support/flaky-dashboard-template.html b/dev-support/flaky-dashboard-template.html
index fff7c82..b980b5d 100644
--- a/dev-support/flaky-dashboard-template.html
+++ b/dev-support/flaky-dashboard-template.html
@@ -55,22 +55,19 @@
 <br><br>
 <span style="font-size:20px;"><b>List of Jobs</b></span><br>
 <br>
-{% set counter = 0 %}
 {% for url in results %}
-{% set counter = counter + 1 %}
-<a href="#job_{{ counter }}">{{ url |e }}</a>
+<a href="#job_{{ loop.index }}">{{ url |e }}</a>
 <br>
 {% endfor %}
 <br>
 <br>
 <span style="font-size:20px;"><b>Results</b></span><br>
 <br>
-{% set counter = 0 %}
 {% for url in results %}
 {% set result = results[url] %}
+{% set url_counter = loop.index %}
 {# Dedup ids since test names may duplicate across urls #}
-{% set counter = counter + 1 %}
-<span id="job_{{ counter }}" style="font-weight:bold;">
+<span id="job_{{ url_counter }}" style="font-weight:bold;">
     {{ url |e }}<br>
     <a href="{{ url |e }}">
         Go to <img height="16px" src="https://jenkins.io/sites/default/files/jenkins_favicon.ico">
@@ -108,7 +105,7 @@
             {{ failed|length }} / {{ timeout|length }} / {{ hanging|length }}
         </td>
         <td>
-            {% set id = "details_" ~ test ~ "_" ~ counter  %}
+            {% set id = "details_" ~ test ~ "_" ~ url_counter %}
             <button class="show_hide_button" onclick="toggle('{{ id }}')">
                 show/hide</button>
             <br/>