Francois Gouget : testbot/web: Link the Patches page to the corresponding job details pages.

Alexandre Julliard julliard at winehq.org
Thu Oct 25 13:29:48 CDT 2012


Module: tools
Branch: master
Commit: 894854ea0711fe9646fb048cda83bbda2a7f512b
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=894854ea0711fe9646fb048cda83bbda2a7f512b

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Thu Oct 25 19:14:01 2012 +0200

testbot/web: Link the Patches page to the corresponding job details pages.

---

 testbot/web/PatchesList.pl |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/testbot/web/PatchesList.pl b/testbot/web/PatchesList.pl
index 0936019..4e3437a 100644
--- a/testbot/web/PatchesList.pl
+++ b/testbot/web/PatchesList.pl
@@ -20,6 +20,7 @@ use strict;
 
 package PatchesListPage;
 
+use URI::Escape;
 use ObjectModel::PropertyDescriptor;
 use ObjectModel::CGI::CollectionPage;
 use WineTestBot::Patches;
@@ -78,6 +79,25 @@ sub GeneratePage
   $self->SUPER::GeneratePage(@_);
 }
 
+sub GenerateDataCell
+{
+  my $self = shift;
+  my ($CollectionBlock, $Item, $PropertyDescriptor, $DetailsPage) = @_;
+
+  my $PropertyName = $PropertyDescriptor->GetName();
+  if ($PropertyName eq "Disposition" and $Item->Disposition =~ /job ([0-9]+)$/)
+  {
+    my $JobId = $1;
+    my $URI = "/JobDetails.pl?Key=" . uri_escape($JobId);
+    print "<td><a href='" . $self->escapeHTML($URI) . "'>" .
+          "Job " . $self->escapeHTML($JobId) . "</a></td>\n";
+  }
+  else
+  {
+    $self->SUPER::GenerateDataCell(@_);
+  }
+}
+
 package main;
 
 my $Request = shift;




More information about the wine-cvs mailing list