buildlogs: index.php - highlight errors
glen
glen at pld-linux.org
Wed Feb 8 14:25:13 CET 2012
Author: glen Date: Wed Feb 8 13:25:13 2012 GMT
Module: buildlogs Tag: HEAD
---- Log message:
- highlight errors
---- Files affected:
buildlogs:
index.php (1.14 -> 1.15)
---- Diffs:
================================================================
Index: buildlogs/index.php
diff -u buildlogs/index.php:1.14 buildlogs/index.php:1.15
--- buildlogs/index.php:1.14 Mon May 24 09:09:49 2010
+++ buildlogs/index.php Wed Feb 8 14:25:08 2012
@@ -88,17 +88,21 @@
<style type="text/css"><!--
A { text-decoration: none; }
A:hover { text-decoration: underline; }
-H1 { font-family: arial,helvetica,sans-serif;
- font-size: 20pt;
+H1 { font-family: arial,helvetica,sans-serif;
+ font-size: 20pt;
font-weight: bold;}
-H2 { font-family: arial,helvetica,sans-serif;
- font-size: 18pt;
+H2 { font-family: arial,helvetica,sans-serif;
+ font-size: 18pt;
font-weight: bold;}
-BODY,TD { font-family: arial,helvetica,sans-serif;
+BODY,TD { font-family: arial,helvetica,sans-serif;
font-size: 13pt; }
-TH { font-family: arial,helvetica,sans-serif;
- font-size: 13pt;
+TH { font-family: arial,helvetica,sans-serif;
+ font-size: 13pt;
font-weight: bold; }
+/* error lines from build logs */
+.error {
+ background-color: #b00;
+}
//-->
</style>
</head>
@@ -293,21 +297,21 @@
return "<a href=\"$h\">$c</a>";
}
- one_item(_("Status"), ($ok == 1 ?
- "<font color=\"green\"><b>"._("OK")."</b></font>" :
+ one_item(_("Status"), ($ok == 1 ?
+ "<font color=\"green\"><b>"._("OK")."</b></font>" :
"<font color=\"red\"><b>"._("Failed")."</b></a>"));
- one_item(_("Source URL"),
- href("ftp://$buildlogs_server/$f",
+ one_item(_("Source URL"),
+ href("ftp://$buildlogs_server/$f",
"ftp://$buildlogs_server/$f"));
$big_url = "$url?dist=$dist&arch=$arch&ok=$ok&ns=$ns&cnt=$cnt";
$bu = "$big_url&off=$off";
- one_item(_("text/plain URL"),
+ one_item(_("text/plain URL"),
href("$bu&name=$name_url&id=$id&action=text",
_("View!")));
if ($tail) {
- one_item(_("full text"),
+ one_item(_("full text"),
href("$bu&name=$name_url&id=$id",
_("View!")));
}
@@ -319,7 +323,7 @@
}
one_item("Date", date("Y/m/d H:i:s", filemtime("$root_directory/$f")));
/*
- echo "<tr><td>Here:</td><td>" .
+ echo "<tr><td>Here:</td><td>" .
"<a href=\"$url?idx=$idx&ok=$ok&id=$id\">".
"http://" . getenv("SERVER_NAME") .
getenv("SCRIPT_NAME") . "?idx=$idx&ok=$ok&id=$id</a>" .
@@ -350,6 +354,10 @@
$s = trim($s);
}
$s = htmlspecialchars($s);
+ // highlight errors
+ if (strstr($s, "error")) {
+ $s = "<span class=error>$s</span>";
+ }
echo $s;
}
end_pre();
@@ -362,7 +370,7 @@
[<a href="<?php echo $bu; ?>"><?=_("Back to list of logs")?></a>]
</td>
<td align=right>
- [<a href="<?php echo "$bu&action=qa"
+ [<a href="<?php echo "$bu&action=qa"
?>"><?=_("View rpm -qa of builder")?></a>]
</td>
</tr>
@@ -383,7 +391,7 @@
return;
echo "# src : ftp://$buildlogs_server/$f\n";
- echo "# date : " .
+ echo "# date : " .
date("Y/m/d H:i:s", filemtime("$root_directory/$f")) . "\n";
if (preg_match("/\.bz2$/", $f)) {
@@ -441,10 +449,10 @@
$pow = array("vim", "php", "brain", "power", "electricity",
"coffee", "ufo", "penguin", "GNOME", "ELF", "DWARF",
"voodoo magic", "Linux", "x-files", "X", "foobar",
- "/dev/null", "/dev/zero", "/dev/drzewo",
+ "/dev/null", "/dev/zero", "/dev/drzewo",
"Leppe'", "matrix", "Neo", "PDP-11",
"Ken", "GNU antilope", "PDP-7", "ITS", "Multics",
- "foobarbaz", "ed", "Joe", "Unix conspiracy",
+ "foobarbaz", "ed", "Joe", "Unix conspiracy",
"overclock", "The Right Thing",
"The Bad Thing", "Star Treck", "NSA", "NASA",
"achelon", "VAX", "Real Programmer",
@@ -524,7 +532,7 @@
$f = get_qa();
if ($plain) {
- header("Content-type: text/plain");
+ header("Content-type: text/plain");
echo _("# rpm -qa of")." $dist/$arch\n";
} else {
echo "<h1>"._("rpm -qa of")." $a</h1>";
@@ -686,7 +694,7 @@
break;
}
$query .= " LIMIT $cnt OFFSET $off ";
-
+
try {
$dbh = new PDO("$database");
} catch (PDOException $e) {
@@ -804,7 +812,7 @@
<p><?=_("Welcome to PLD Build Logs WWW interface.")?></p><p>
<?=_("Feel free to email bug reports, complaints and feature requests ")?>
<!-- ech... niech strace... -->
-<a href="mailto:feedback at pld-linux.org"><?=_("to us")?></a>. <?=_("Positive opinions are also")?>
+<a href="mailto:feedback at pld-linux.org"><?=_("to us")?></a>. <?=_("Positive opinions are also")?>
<a href="mailto:feedback at pld-linux.org"><?=_("welcome")?></a> ;)</p>
<p>Version: $Id$</p>
</td><td width="20%"> </td></tr>
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/buildlogs/index.php?r1=1.14&r2=1.15&f=u
More information about the pld-cvs-commit
mailing list