[tools] testbot/web: The main page deals with jobs so rename the $Item parameter.
Francois Gouget
fgouget at codeweavers.com
Wed Mar 30 12:04:13 CDT 2022
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
testbot/web/index.pl | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/testbot/web/index.pl b/testbot/web/index.pl
index 1f362fc32..94421536d 100644
--- a/testbot/web/index.pl
+++ b/testbot/web/index.pl
@@ -91,27 +91,27 @@ sub GenerateHeaderCell($$$)
sub GetDisplayValue($$$)
{
- my ($self, $Item, $PropertyDescriptor) = @_;
+ my ($self, $Job, $PropertyDescriptor) = @_;
if ($PropertyDescriptor->GetName() eq "User" &&
- defined($Item->Patch) &&
- $Item->User->GetKey() eq GetBatchUser()->GetKey() &&
- defined($Item->Patch->FromName))
+ defined($Job->Patch) &&
+ $Job->User->GetKey() eq GetBatchUser()->GetKey() &&
+ defined($Job->Patch->FromName))
{
- return $Item->Patch->FromName;
+ return $Job->Patch->FromName;
}
- return $self->SUPER::GetDisplayValue($Item, $PropertyDescriptor);
+ return $self->SUPER::GetDisplayValue($Job, $PropertyDescriptor);
}
sub GenerateDataCell($$$$)
{
- my ($self, $Item, $PropertyDescriptor, $DetailsPage) = @_;
+ my ($self, $Job, $PropertyDescriptor, $DetailsPage) = @_;
my $PropertyName = $PropertyDescriptor->GetName();
if ($PropertyName eq "Status")
{
- my $EscapedKey = uri_escape($Item->GetKey());
+ my $EscapedKey = uri_escape($Job->GetKey());
print "<td id='job$EscapedKey'><a href='/JobDetails.pl?Key=$EscapedKey'>";
my %HTMLChunks = ("queued" => "<span class='queued'>queued</span>",
@@ -122,11 +122,11 @@ sub GenerateDataCell($$$$)
"boterror" => "<span class='boterror'>TestBot error</span>",
"canceled" => "<span class='canceled'>canceled</span>",
);
- my $Status = $Item->Status;
+ my $Status = $Job->Status;
my $HTMLStatus = $HTMLChunks{$Status} || $Status;
if ($Status eq "completed" || $Status eq "running" || $Status eq "boterror" || $Status eq "canceled")
{
- my $JobInfo = $self->{JobsInfo}->{$Item->Id};
+ my $JobInfo = $self->{JobsInfo}->{$Job->Id};
my $FailuresPrefix;
if ($Status eq "completed")
@@ -170,15 +170,15 @@ sub GenerateDataCell($$$$)
}
elsif ($PropertyName eq "Ended")
{
- if (defined $Item->Ended)
+ if (defined $Job->Ended)
{
- my $Duration = $Item->Ended - $Item->Submitted;
- my $TagId = "E". $Item->Id;
+ my $Duration = $Job->Ended - $Job->Submitted;
+ my $TagId = "E". $Job->Id;
print "<td><a id='$TagId' class='title' title='",
- strftime("%Y-%m-%d %H:%M:%S", localtime($Item->Ended)),
+ strftime("%Y-%m-%d %H:%M:%S", localtime($Job->Ended)),
"'>", DurationToString($Duration), "</a>\n";
print "<script type='text/javascript'><!--\n";
- print " ShowDateTime(", $Item->Ended, ",'$TagId');\n";
+ print " ShowDateTime(", $Job->Ended, ",'$TagId');\n";
print "--></script>\n";
print "</td>\n";
}
@@ -189,7 +189,7 @@ sub GenerateDataCell($$$$)
}
else
{
- $self->SUPER::GenerateDataCell($Item, $PropertyDescriptor, $DetailsPage);
+ $self->SUPER::GenerateDataCell($Job, $PropertyDescriptor, $DetailsPage);
}
}
--
2.30.2
More information about the wine-devel
mailing list