Francois Gouget : testbot/web: Simplify the JobDetails page's GenerateDataView().
Alexandre Julliard
julliard at winehq.org
Tue May 3 15:18:32 CDT 2022
Module: tools
Branch: master
Commit: 0e31c0977818610a195b44353286fd8f638191c6
URL: https://source.winehq.org/git/tools.git/?a=commit;h=0e31c0977818610a195b44353286fd8f638191c6
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Tue May 3 19:39:38 2022 +0200
testbot/web: Simplify the JobDetails page's GenerateDataView().
Undefined values don't need any special formatting so let the default
implementation deal with them.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/web/JobDetails.pl | 35 ++++++++++++-----------------------
1 file changed, 12 insertions(+), 23 deletions(-)
diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl
index 748153f..b0ef2a7 100644
--- a/testbot/web/JobDetails.pl
+++ b/testbot/web/JobDetails.pl
@@ -91,11 +91,11 @@ sub GenerateDataView($$$)
my $PropertyName = $Col->{Descriptor}->GetName();
if ($PropertyName eq "VM")
{
- print "<a href='#k", $StepTask->GetKey(), "'>";
- print $self->escapeHTML($StepTask->VM->Name);
- print "</a>";
+ print "<a href='#k", $StepTask->GetKey(), "'>",
+ $self->escapeHTML($StepTask->VM->Name), "</a>";
+ return;
}
- elsif ($PropertyName eq "FileName")
+ if ($PropertyName eq "FileName")
{
my $FileName = $StepTask->GetFullFileName();
if ($FileName and -r $FileName)
@@ -105,12 +105,9 @@ sub GenerateDataView($$$)
print "<a href='", $self->escapeHTML($URI), "'>",
$self->escapeHTML($StepTask->FileName), "</a>";
}
- else
- {
- $self->SUPER::GenerateDataView($Row, $Col);
- }
+ return;
}
- elsif ($PropertyName eq "CmdLineArg")
+ if ($PropertyName eq "CmdLineArg")
{
my $Args = $self->escapeHTML($StepTask->CmdLineArg);
if ($Args eq "" or $StepTask->VM->Type eq "wine")
@@ -127,23 +124,15 @@ sub GenerateDataView($$$)
}
}
print $Args;
+ return;
}
- elsif ($PropertyName eq "Ended")
- {
- if (defined $StepTask->Ended)
- {
- my $Duration = $StepTask->Ended - $StepTask->Started;
- GenerateTipDateTime($StepTask->Ended, DurationToString($Duration));
- }
- else
- {
- print " ";
- }
- }
- else
+ if ($PropertyName eq "Ended" and defined $StepTask->Ended)
{
- $self->SUPER::GenerateDataView($Row, $Col);
+ my $Duration = $StepTask->Ended - $StepTask->Started;
+ GenerateTipDateTime($StepTask->Ended, DurationToString($Duration));
+ return;
}
+ $self->SUPER::GenerateDataView($Row, $Col);
}
More information about the wine-cvs
mailing list