Unverified Commit 36af38b3 authored by boklm's avatar boklm
Browse files

index pages: add titles

parent c3794c8b
...@@ -153,8 +153,9 @@ sub make_reports_index { ...@@ -153,8 +153,9 @@ sub make_reports_index {
@{$reports_by_type{$type}}; @{$reports_by_type{$type}};
@s = @s[0..19] if @s > 20; @s = @s[0..19] if @s > 20;
load_reports_for_index(\%pre_reports_index, @s); load_reports_for_index(\%pre_reports_index, @s);
my $title = "Last 10 reports";
$template->process("reports_index_$type.html", $template->process("reports_index_$type.html",
{ %$vars, reports_list => \@s }, "index-$type.html") { %$vars, reports_list => \@s, title => $title }, "index-$type.html")
|| exit_error "Template Error:\n" . $template->error; || exit_error "Template Error:\n" . $template->error;
} }
foreach my $type ($changed_report ? @changed_type : keys %reports_by_tag) { foreach my $type ($changed_report ? @changed_type : keys %reports_by_tag) {
...@@ -163,8 +164,10 @@ sub make_reports_index { ...@@ -163,8 +164,10 @@ sub make_reports_index {
my @s = sort { $summaries{$b}->{time} <=> $summaries{$a}->{time} } my @s = sort { $summaries{$b}->{time} <=> $summaries{$a}->{time} }
@{$reports_by_tag{$type}->{$tag}}; @{$reports_by_tag{$type}->{$tag}};
load_reports_for_index(\%pre_reports_index, @s); load_reports_for_index(\%pre_reports_index, @s);
my $title = "Reports for $tag";
$template->process("reports_index_$type.html", $template->process("reports_index_$type.html",
{ %$vars, reports_list => \@s }, "index-$type-$tag.html") { %$vars, reports_list => \@s, title => $title, },
"index-$type-$tag.html")
|| exit_error "Template Error:\n" . $template->error; || exit_error "Template Error:\n" . $template->error;
} }
} }
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</style> </style>
</head> </head>
<body> <body>
<h1>Tests Reports</h1> <h1>[% title %]</h1>
<table> <table>
<tr> <tr>
<th>Name</th> <th>Name</th>
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
[% INCLUDE togglecontent.js %] [% INCLUDE togglecontent.js %]
</head> </head>
<body> <body>
<h1>Tor Browser Unit Test Reports</h1> <h1>Tor Browser Unit Test Reports: [% title %]</h1>
[% FOREACH report IN reports_list %] [% FOREACH report IN reports_list %]
[% [%
SET tbbfiles = reports.$report.tbbfiles; SET tbbfiles = reports.$report.tbbfiles;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment