Skip to content

Commit

Permalink
Print link to diff in netlink html.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluhm committed May 21, 2024
1 parent ece18fb commit 53306d9
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions netlink-html.pl
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ sub html_hier_test_head {
} elsif ($hier eq "iface" && $dv->{ifdmesg}) {
my $ifdmesg = encode_entities($dv->{ifdmesg}{$name});
$title = " title=\"$ifdmesg\"";
} elsif ($hier eq "patch" && $hv->{diff}) {
my $link = uri_escape($hv->{diff}, "^A-Za-z0-9\-\._~/");
$name = "<a href=\"../$link\">$name</a>";
}
print $html " <th class=\"hier\"$title>$name</th>\n";
}
Expand All @@ -178,16 +181,19 @@ sub html_hier_test_head_utilization {
my $te = $hier eq "date" ? "th" : "td";
print $html " <tr>\n";
print $html " <th></th>", "<td></td>" x (@TESTKEYS-1), "\n";
foreach my $hvi (@hiers) {
foreach my $hv (@hiers) {
my $title = "";
my $name = $hvi->{$hier} || "";
my $name = $hv->{$hier} || "";
if ($hier =~ /date$/) {
my $time = encode_entities($name);
$title = " title=\"$time\"";
$name =~ s/T.*//;
} elsif ($hier eq "iface" && $dv->{ifdmesg}) {
my $ifdmesg = encode_entities($dv->{ifdmesg}{$name});
$title = " title=\"$ifdmesg\"";
} elsif ($hier eq "patch" && $hv->{diff}) {
my $link = uri_escape($hv->{diff}, "^A-Za-z0-9\-\._~/");
$name = "<a href=\"../$link\">$name</a>";
}
print $html " <$te class=\"hier $hier\"$title>$name</$te>\n";
}
Expand Down Expand Up @@ -664,11 +670,14 @@ sub parse_result_files {
$dv->{dmesg} ||= $dmesg if -f $dmesg;
(my $dmesgboot = $version) =~ s,version,dmesg-boot,;
$dv->{dmesgboot} ||= $dmesgboot if -f $dmesgboot;
(my $diff = $version) =~ s,/version-,/diff-,;
$dv->{diff} ||= $diff if -s $diff;

%$dv = (parse_version_file($version), %$dv);
}
if ($file->{patch}) {
foreach my $diff (sort glob("$date/$file->{patch}/diff-*.txt")) {
$hiers{diff} ||= $diff if -s $diff;
}
}
$dv->{build} = ($dv->{location} =~ /^deraadt@\w+.openbsd.org:/) ?
"snapshot" : "custom";
if ($dv->{dmesgboot}) {
Expand Down

0 comments on commit 53306d9

Please sign in to comment.