Skip to content

Commit c434bf9

Browse files
georges-armTamarChristinaArm
authored andcommitted
Make the daily report test header href to the graph will all notable machines.
In cases where the same test has shown a delta across multiple machines, it is sometimes useful to have a graph with all of them plotted to help figure out whether the deltas are related. This commit augments the result table per-test header rows with a link to the relevant graph containing all machines in subsequent rows. Change-Id: I4db87b38f866e2c457b466402d624023b6fad578
1 parent 0a5a97f commit c434bf9

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

lnt/server/ui/templates/reporting/daily_report.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,15 @@ <h3>Result Table ({{ field.display_name }})</h3>
138138
{{ result_header()+"\n <tbody>" if not report.for_mail }}
139139
{%- for test,visible_results in field_results -%}
140140
{{ result_header()+"\n <tbody>" if report.for_mail }}
141+
{%- set header_url = '{}/graph?'.format(ts_url) -%}
142+
{%- set header_elems = [] -%}
143+
{%- for machine,day_results in visible_results -%}
144+
{%- set _ = header_elems.append('plot={}.{}.{}'.format(machine.id, test.id, report.ts.get_field_index(field))) -%}
145+
{%- endfor -%}
146+
{%- set header_url = header_url + '&'.join(header_elems) -%}
147+
{%- set header_url = header_url + '&highlight_run={}'.format(report.get_key_run(visible_results[0][0], 0).id) -%}
141148
<tr>
142-
<td style="{{ styles.td }}" colspan="2"> <b>{{test.name}}</b></td>
149+
<td style="{{ styles.td }}" colspan="2"> <b><a href="{{ header_url }}">{{test.name}}</a></b></td>
143150
<td style="{{ styles.td }}" colspan="{{report.num_prior_days_to_include + 1}}">&nbsp;</td>
144151
</tr>
145152
{%- for machine,day_results in visible_results -%}

lnt/server/ui/templates/reporting/daily_report_async.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,15 @@ <h3>Result Table ({{ field.display_name }})</h3>
312312
rt_table.innerHTML = '';
313313
for (const [rt_test_id, rt_value] of Object.entries(results).sort(test_priority_compare)) {
314314
var rt_test_name = rt_value.name;
315+
var header_url = "{{ ts_url }}/graph?"
316+
for (const [machine_id, rt_day_results] of Object.entries(rt_value.results)) {
317+
header_url += 'plot=' + machine_id + '.' + rt_test_id + '.' + field.index + '&';
318+
}
319+
header_url += 'highlight_run=' + KEY_RUNS[Object.entries(rt_value.results)[0][0]];
315320
// make the test header (used for multiple machines)
316321
var rt_header_str = '';
317322
rt_header_str += '<tr>';
318-
rt_header_str += ' <td style="{{ styles.td }}" colspan=2><b>' + rt_test_name + '</b></td>';
323+
rt_header_str += ' <td style="{{ styles.td }}" colspan=2><b><a href="' + header_url + '">' + rt_test_name + '</a></b></td>';
319324
rt_header_str += ' <td style="{{ styles.td }}" colspan="{{report.num_prior_days_to_include + 1}}">&nbsp;</td>';
320325
rt_header_str += '</tr>'
321326
rt_table.insertAdjacentHTML('beforeend', rt_header_str);

0 commit comments

Comments
 (0)