[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 15/15] sg-run-job: Logfiles: Suppress links to 0-length files



These are not really helpful.  Making them not be links makes them
easier to skip by eye.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
v2: New patch.
---
 sg-report-flight | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sg-report-flight b/sg-report-flight
index f7150a0..fd8a68b 100755
--- a/sg-report-flight
+++ b/sg-report-flight
@@ -1042,15 +1042,19 @@ END
             or $dent eq '..' or $dent eq '.' or $issteplog{$dent};
         stat("$htmldir/$job/$dent") or die "$dent $!";
        printf H "<tr><td>%s</td>", show_abs_time((stat _)[9]);
+       my $nolink = 0;
        if (-f _) {
            my $size = (stat _)[7];
            printf H "<td align=\"right\">&nbsp;%s</td>", $size;
+           $nolink = !$size;
        } else {
            print H "<td align=\"right\">dir</td>";
        }
        print H "<td>";
-        print H "<a href=\"".encode_entities(uri_escape($dent))."\">".
-            encode_entities($dent).(-d _ ? "/" : "")."</a>\n";
+        print H "<a href=\"".encode_entities(uri_escape($dent))."\">"
+           unless $nolink;
+       print H encode_entities($dent).(-d _ ? "/" : "");
+       print H "</a>" unless $nolink;
         if ($dent eq 'build') {
             print H " (outputs from build)";
         }
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.