diff mbox

[OSSTEST,3/4] html output: ms-flights-summary: Generate link to flight logs directory

Message ID 1487764715-9499-3-git-send-email-ian.jackson@eu.citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ian Jackson Feb. 22, 2017, 11:58 a.m. UTC
Make the flight number be a link to the unpublished flight logs.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 ms-flights-summary | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/ms-flights-summary b/ms-flights-summary
index 78f8675..10ad6e5 100755
--- a/ms-flights-summary
+++ b/ms-flights-summary
@@ -435,6 +435,7 @@  printf("<table border='0' cellspacing='0' rules=all>\n");
 my $first = 1;
 foreach my $f (sort keys %flights) {
     my $fi = $flights{$f};
+    my $furl = "$c{ReportHtmlUnpubBaseUrl}/$f/";
 
     $alt = 0;
 
@@ -442,7 +443,8 @@  foreach my $f (sort keys %flights) {
     print ("    <tr><td>&nbsp;</td></tr>\n") if !$first;
     $first = 0;
     print("<a name=\"$f\"></a>\n");
-    flight_hdr("Flight: $f [$fi->{Branch} $fi->{Intended}]");
+    flight_hdr_raw("Flight: <a href=\"".encode_entities($furl)."\">$f</a>".
+		   encode_entities(" [$fi->{Branch} $fi->{Intended}]"));
     flight_hdr("Common info (active jobs only): $fi->{Info}") if $fi->{Info};
     flight_hdr("Started: ".fmttime($fi->{Started}));
     flight_hdr("Current phase ($fi->{UnqueuedJobs}/$fi->{NrJobs} jobs)".