r1849 - people/goneri/update-pkg-games

Gonéri Le Bouder goneri-guest at costa.debian.org
Sun Oct 15 16:36:53 UTC 2006


Author: goneri-guest
Date: 2006-10-15 16:36:53 +0000 (Sun, 15 Oct 2006)
New Revision: 1849

Modified:
   people/goneri/update-pkg-games/refresh.pl
Log:
do not use list any more to show bugs
better colors


Modified: people/goneri/update-pkg-games/refresh.pl
===================================================================
--- people/goneri/update-pkg-games/refresh.pl	2006-10-15 16:12:42 UTC (rev 1848)
+++ people/goneri/update-pkg-games/refresh.pl	2006-10-15 16:36:53 UTC (rev 1849)
@@ -4,6 +4,10 @@
 use warnings;
 use strict;
 
+my $green = "#6be053";
+my $yellow = "#f7e583";
+my $red = "#e74a4a";
+
 use LWP::Simple;
 
 sub showBugs {
@@ -30,13 +34,14 @@
 	
 	if ($in) {
 	s/\ bugs//;
-	$str .= $_;
+	s/<.+?>//g;
+	$str .= $_."<br>";
 	}
 }
 	return "" unless $str;
-	$ret = "<ul align=\"center\">$str</ul>";
+#	$ret = "<ul align=\"center\">$str</ul>";
 
-	$ret = "<a href=\"http://bugs.debian.org/src:$pkg\">".$ret."</a>";
+	$ret = "<a href=\"http://bugs.debian.org/src:$pkg\">".$str."</a>";
 
 	$ret;
 }
@@ -106,23 +111,23 @@
 	my $ur = (exists $uploadrequest->{$pkg} && $uploadrequest->{$pkg})?'Yes':'';
 
 	print "<tr><th>$pkgtarget</th><th>$lastcheck</th><th ";
-	$color = "red";
-	$color = "yellow" if ($status eq "unknow");
-	$color = "green" if ($status eq "success");
+	$color = $red;
+	$color = $yellow if ($status eq "unknow");
+	$color = $green if ($status eq "success");
 	print "bgcolor=".$color;
 	print "><a href=\"log/$pkg/build.log\">$status</a></th><th ";
-	print "bgcolor=".($ur !~ /^$/?"red":"green");
+	print "bgcolor=".($ur !~ /^$/?$red:$green);
 	print ">$ur</th><th ";
-	print "bgcolor=".($lintian !~ /^$/?"red":"green");
+	print "bgcolor=".($lintian !~ /^$/?$red:$green);
 	print ">$lintian</th><th ";
-	print "bgcolor=".($linda !~ /^$/?"red":"green");
-	print ">$linda</th><th ";
-	$color = "green";
-	$color = "yellow" if ($bugs =~ /[a-z]/);
-	$color = "red" if ($bugs =~ /(serious|critic|grave)/);
+	print "bgcolor=".($linda !~ /^$/?$red:$green);
+	print ">$linda</th><th align=\"left\" ";
+	$color = $green;
+	$color = $yellow if ($bugs =~ /[a-z]/);
+	$color = $red if ($bugs =~ /(serious|critic|grave)/);
 	print "bgcolor=".$color;
 	print ">".$bugs."</th><th ";
-	print "bgcolor=".($pkggamespolicy !~ /^$/?"red":"green");
+	print "bgcolor=".($pkggamespolicy !~ /^$/?$red:$green);
 	print ">".$pkggamespolicy."</th>";
 
 	print "</tr>\n";




More information about the Pkg-games-commits mailing list