html output: ReportHtmlUnpubBaseUrl: New config variable
PATCH 2/4 html output: ms-flights-summary: Break out flight_hdr_raw
In reply to Ian JacksonWill will want this in a moment. For now, no functional change.
--- ms-flights-summary | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
ms-flights-summary +6 -2
@@ -272,11 +272,15 @@ sub cols_hdr() { printf("</tr>\n"); } -sub flight_hdr($) { - my $text = encode_entities(shift); +sub flight_hdr_raw($) { + my ($text) = @_; printf(" <tr><td colspan=%d><b>$text</b></td></tr>\n", scalar @cols); } +sub flight_hdr($) { + flight_hdr_raw(encode_entities(shift)); +} + sub cell($;$$$) { my ($text,$colourattr,$fontattr,$tag) = @_; $text //= '';
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 4/4 html output: ms-flights-summary: Generate link to job logs directory
In reply to Ian JacksonMake each job name in the detailed tables be a link to the (unpublished) logs for that job.
--- ms-flights-summary | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
ms-flights-summary +6 -1
@@ -315,7 +315,12 @@ sub do_one_job($$$$) { $tag = "b" if $info->{Anon} && currently_running($info); - cell(encode_entities($job), undef, undef, $tag); + my $jobcell = encode_entities($job); + if ($fl) { + my $jurl = "$c{ReportHtmlUnpubBaseUrl}/$fl/$job/"; + $jobcell = "<a href=\"".encode_entities($jurl)."\">".$jobcell."</a>"; + } + cell($jobcell, undef, undef, $tag); # Anonymous/rogue jobs may not have a flight or status if ($fl && $status) {
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 1/4 html output: ReportHtmlUnpubBaseUrl: New config variable
This allows us to generate private urls for unpublished flights. This will be useful for links from the ongoing flights summary - since, naturally, none of those logs are published yet.
The URLs will be of more limited use; the exact usefulness will depend on the deployment.
If no separate Unpub url is specified, simply use the Pub one.
--- Osstest.pm | 2 ++ production-config | 1 + 2 files changed, 3 insertions(+)
Osstest.pm +2 -0
@@ -237,6 +237,8 @@ sub readglobalconfig () { $c{WebspaceCommon} ||= 'osstest/'; $c{WebspaceLog} ||= '/var/log/apache2/access.log'; + $c{ReportHtmlUnpubBaseUrl} ||= $c{ReportHtmlPubBaseUrl}; + $c{OverlayLocal} ||= "overlay-local"; $c{GuestDebianSuite} ||= $c{DebianSuite};
production-config +1 -0
@@ -54,6 +54,7 @@ HttpProxy http://cache:3128/ PubBaseUrl http://logs.test-lab.xenproject.org/osstest ReportHtmlPubBaseUrl="$c{PubBaseUrl}/logs" ResultsHtmlPubBaseUrl="$c{PubBaseUrl}/results" +ReportHtmlUnpubBaseUrl="http://osstest/~osstest/pub/logs/" Publish osstest@www:/var/www/osstest GlobalLockDir /home/osstest/testing.git
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 3/4 html output: ms-flights-summary: Generate link to flight logs directory
Make the flight number be a link to the unpublished flight logs.
--- ms-flights-summary | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
ms-flights-summary +3 -1
@@ -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> </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)".
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel