]> git.pld-linux.org Git - projects/buildlogs.git/commitdiff
- hilight exceprts from errors
authorElan Ruusamäe <glen@pld-linux.org>
Sat, 7 Sep 2013 16:58:53 +0000 (16:58 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Sat, 7 Sep 2013 16:58:53 +0000 (16:58 +0000)
index.php

index f0df720efa4a070c90146cf1a19bfbe32ca8cce9..044bd40468d7251e035972aafe530fa099908bbb 100644 (file)
--- a/index.php
+++ b/index.php
@@ -366,19 +366,22 @@ function dump_log($tail)
                // highlight errors
                if (preg_match("/errors?:/i", $s)) {
                        $err_count++;
-                       $s = "<span class=error id=error-$err_count>$s</span>";
                        $toc[] = "error $err_count";
+                       $err[] = $s;
+                       $s = "<span class=error id=error-$err_count>$s</span>";
                } elseif (substr($s, 0, 2) == "+ ") {
                        // shell verbose
                        $s = "<span class=verbose>$s</span>";
                } elseif (preg_match("/^Executing\(%(?P<section>\w+)\)/", $s, $m)) {
                        // rpm build section
-                       $s = "<span class=section id={$m['section']}>$s</span>";
                        $toc[] = $m['section'];
+                       $err[] = $s;
+                       $s = "<span class=section id={$m['section']}>$s</span>";
                } elseif (preg_match("/^Processing files: (?P<pkg>(?P<name>.+)-[^-]+-[^-]+)/", $s, $m)) {
                        // processing files
-                       $s = "<span class=section id=files-{$m['name']}>$s</span>";
                        $toc[] = "files ".$m['name'];
+                       $err[] = $s;
+                       $s = "<span class=section id=files-{$m['name']}>$s</span>";
                }
                echo $s;
        }
@@ -389,9 +392,10 @@ function dump_log($tail)
        if (!empty($toc)) {
                echo "<h2>"._("Toc:")."</h2>";
                echo "<ul class=toc>";
-               foreach ($toc as $section) {
+               foreach ($toc as $i => $section) {
                        $id = str_replace(" ", "-", $section);
                        echo "<li><a href=#{$id}>{$section}</a></li>";
+                       echo "<code>{$err[$i]}</code>";
                }
                echo "</ul>";
        }
@@ -480,7 +484,7 @@ function list_archs()
                "alt=\""._("Powered by PLD Linux")."\" border=\"0\" /></a><br />\n" .
             "<small>(c) 2002 ".
             "<a href=\"mailto:feedback@pld-linux.org\">PLD&nbsp;Team</a><br />\n".
-            '$Revision: 1.19 $'.
+            '$Revision: 1.20 $'.
             "</small></div>\n";
 
        # smile ;)
@@ -849,7 +853,7 @@ function welcome()
 <!-- ech... niech strace... -->
 <a href="mailto:feedback@pld-linux.org"><?=_("to us")?></a>. <?=_("Positive opinions are also")?>
 <a href="mailto:feedback@pld-linux.org"><?=_("welcome")?></a> ;)</p>
-<p>Version: $Id: index.php,v 1.19 2012/03/21 11:45:04 glen Exp $</p>
+<p>Version: $Id: index.php,v 1.20 2012/06/22 12:11:12 arekm Exp $</p>
 </td><td width="20%">&nbsp;</td></tr>
 </table>
 <?php
This page took 0.338016 seconds and 4 git commands to generate.