@@ -78,66 +78,68 @@ <h2 class="accordion-header">
7878 </ div >
7979 </ div >
8080 </ div >
81- < div class ="accordion-item p-3 px-4 rounded-4 border border-1 ">
82- < h2 class ="accordion-header ">
83- < button class ="accordion-button fw-bold shadow-none bg-transparent text-body "
84- type ="button "
85- data-bs-toggle ="collapse "
86- data-bs-target ="#{{ experiment_slug }}-{{ metric_info.slug }}-weekly-collapse "
87- aria-expanded ="true "
88- aria-controls ="{{ experiment_slug }}-{{ metric_info.slug }}-weekly-collapse ">
89- Weekly breakdown
90- </ button >
91- </ h2 >
92- {% with weekly_metric_data=all_weekly_metric_data|dict_get:metric_info.slug %}
93- < div class ="accordion-collapse collapse show "
94- id ="{{ experiment_slug }}-{{ metric_info.slug }}-weekly-collapse ">
95- < div class ="accordion-body d-flex ">
96- < div class ="col-2 ">
97- < p class ="text-muted mb-0 invisible " aria-hidden ="true "> Metrics</ p >
98- < p class ="fs-5 mb-3 invisible " aria-hidden ="true "> Baseline</ p >
99- {% with reference_branch_weekly=weekly_metric_data|dict_get:reference_branch %}
100- {% for week in experiment.get_weekly_dates %}
101- < div class ="{% if forloop.last %}mb-4{% endif %} mb-3 d-flex text-center rounded-4 w-100 text-start position-relative d-flex flex-column align-items-center justify-content-center "
102- style ="height: 100px ">
103- < small class ="text-muted "> Week {{ forloop.counter }}</ small >
104- < p class ="mb-0 "> {{ week.0|date:"M j" }} - {{ week.1|date:"M j" }}</ p >
105- </ div >
106- {% endfor %}
107- {% endwith %}
108- </ div >
109- < div class ="col position-relative w-25 ">
110- < div class ="row flex-row flex-nowrap overflow-auto mx-2 pb-3 {% if branch_data|length > 3 %}mx-4{% endif %} ">
111- {% if branch_data|length > 3 %}
112- < div class ="branch-fade branch-fade-left "> </ div >
113- < div class ="branch-fade branch-fade-right "> </ div >
114- {% endif %}
115- {% for branch in branch_data %}
116- < div class ="{% if branch.slug == selected_reference_branch %}col-2{% elif branch_data|length > 3 %}col-4{% else %}col{% endif %} d-flex flex-column align-items-center ">
117- < p class ="text-muted mb-0 text-truncate "> {{ branch.name }}</ p >
118- {% if branch.slug == selected_reference_branch %}
119- < p class ="fs-5 mb-3 "> Baseline</ p >
120- {% else %}
121- < p class ="fs-5 "> {{ branch.name }}</ p >
122- {% endif %}
123- < div class ="d-flex flex-column gap-3 w-100 ">
124- {% for curr_branch_slug, branch_weekly_metric_data in weekly_metric_data.items %}
125- {% if curr_branch_slug == branch.slug %}
126- {% for weekly_data_point in branch_weekly_metric_data %}
127- {% include "common/metric_card.html" with slug=branch.slug reference_branch=selected_reference_branch absolute_lower=weekly_data_point.0.lower absolute_upper=weekly_data_point.0.upper significance=weekly_data_point.1.significance percentage=weekly_data_point.1.avg_rel_change %}
81+ {% with weekly_metric_data=all_weekly_metric_data|dict_get:metric_info.slug %}
82+ {% if weekly_metric_data %}
83+ < div class ="accordion-item p-3 px-4 rounded-4 border border-1 ">
84+ < h2 class ="accordion-header ">
85+ < button class ="accordion-button fw-bold shadow-none bg-transparent text-body "
86+ type ="button "
87+ data-bs-toggle ="collapse "
88+ data-bs-target ="#{{ experiment_slug }}-{{ metric_info.slug }}-weekly-collapse "
89+ aria-expanded ="true "
90+ aria-controls ="{{ experiment_slug }}-{{ metric_info.slug }}-weekly-collapse ">
91+ Weekly breakdown
92+ </ button >
93+ </ h2 >
94+ < div class ="accordion-collapse collapse show "
95+ id ="{{ experiment_slug }}-{{ metric_info.slug }}-weekly-collapse ">
96+ < div class ="accordion-body d-flex ">
97+ < div class ="col-2 ">
98+ < p class ="text-muted mb-0 invisible " aria-hidden ="true "> Metrics</ p >
99+ < p class ="fs-5 mb-3 invisible " aria-hidden ="true "> Baseline</ p >
100+ {% with reference_branch_weekly=weekly_metric_data|dict_get:reference_branch %}
101+ {% for week in experiment.get_weekly_dates %}
102+ < div class ="{% if forloop.last %}mb-4{% endif %} mb-3 d-flex text-center rounded-4 w-100 text-start position-relative d-flex flex-column align-items-center justify-content-center "
103+ style ="height: 100px ">
104+ < small class ="text-muted "> Week {{ forloop.counter }}</ small >
105+ < p class ="mb-0 "> {{ week.0|date:"M j" }} - {{ week.1|date:"M j" }}</ p >
106+ </ div >
107+ {% endfor %}
108+ {% endwith %}
109+ </ div >
110+ < div class ="col position-relative w-25 ">
111+ < div class ="row flex-row flex-nowrap overflow-auto mx-2 pb-3 {% if branch_data|length > 3 %}mx-4{% endif %} ">
112+ {% if branch_data|length > 3 %}
113+ < div class ="branch-fade branch-fade-left "> </ div >
114+ < div class ="branch-fade branch-fade-right "> </ div >
115+ {% endif %}
116+ {% for branch in branch_data %}
117+ < div class ="{% if branch.slug == selected_reference_branch %}col-2{% elif branch_data|length > 3 %}col-4{% else %}col{% endif %} d-flex flex-column align-items-center ">
118+ < p class ="text-muted mb-0 text-truncate "> {{ branch.name }}</ p >
119+ {% if branch.slug == selected_reference_branch %}
120+ < p class ="fs-5 mb-3 "> Baseline</ p >
121+ {% else %}
122+ < p class ="fs-5 "> {{ branch.name }}</ p >
123+ {% endif %}
124+ < div class ="d-flex flex-column gap-3 w-100 ">
125+ {% for curr_branch_slug, branch_weekly_metric_data in weekly_metric_data.items %}
126+ {% if curr_branch_slug == branch.slug %}
127+ {% for weekly_data_point in branch_weekly_metric_data %}
128+ {% include "common/metric_card.html" with slug=branch.slug reference_branch=selected_reference_branch absolute_lower=weekly_data_point.0.lower absolute_upper=weekly_data_point.0.upper significance=weekly_data_point.1.significance percentage=weekly_data_point.1.avg_rel_change %}
128129
129- {% endfor %}
130- {% endif %}
131- {% endfor %}
130+ {% endfor %}
131+ {% endif %}
132+ {% endfor %}
133+ </ div >
132134 </ div >
133- </ div >
134- {% endfor %}
135+ {% endfor %}
136+ </ div >
135137 </ div >
136138 </ div >
137139 </ div >
138140 </ div >
139- {% endwith %}
140- </ div >
141+ {% endif %}
142+ {% endwith %}
141143 </ div >
142144 </ div >
143145 </ div >
0 commit comments