From 841bb00655b3eb58e7d76d945e24cfeadfdb11de Mon Sep 17 00:00:00 2001 From: Apekshit Sharma Date: Fri, 12 May 2017 02:25:19 -0700 Subject: [PATCH] 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 --- dev-support/flaky-dashboard-template.html | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/dev-support/flaky-dashboard-template.html b/dev-support/flaky-dashboard-template.html index fff7c8201f5..b980b5d76cc 100644 --- a/dev-support/flaky-dashboard-template.html +++ b/dev-support/flaky-dashboard-template.html @@ -55,22 +55,19 @@

List of Jobs

-{% set counter = 0 %} {% for url in results %} -{% set counter = counter + 1 %} -{{ url |e }} +{{ url |e }}
{% endfor %}

Results

-{% 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 %} - + {{ url |e }}
Go to @@ -108,7 +105,7 @@ {{ failed|length }} / {{ timeout|length }} / {{ hanging|length }} - {% set id = "details_" ~ test ~ "_" ~ counter %} + {% set id = "details_" ~ test ~ "_" ~ url_counter %}