Francois Gouget : testbot/web: Show the job start / end dates as tooltips on the job details page.
Alexandre Julliard
julliard at winehq.org
Tue Apr 26 15:31:17 CDT 2022
Module: tools
Branch: master
Commit: 7f0f497a6570e014cb7d7c0275c7c916f7929b93
URL: https://source.winehq.org/git/tools.git/?a=commit;h=7f0f497a6570e014cb7d7c0275c7c916f7929b93
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Tue Apr 26 19:32:29 2022 +0200
testbot/web: Show the job start / end dates as tooltips on the job details page.
This also delegates the timestamp formatting to ValueFormatter.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/web/JobDetails.pl | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl
index 591a47e..33a9525 100644
--- a/testbot/web/JobDetails.pl
+++ b/testbot/web/JobDetails.pl
@@ -26,7 +26,8 @@ use ObjectModel::CGI::CollectionBlock;
our @ISA = qw(ObjectModel::CGI::CollectionBlock);
use URI::Escape;
-use POSIX qw(strftime);
+
+use ObjectModel::CGI::ValueFormatter;
use WineTestBot::Utils;
use WineTestBot::Missions;
@@ -50,6 +51,7 @@ sub DisplayProperty($$)
my $PropertyName = $PropertyDescriptor->GetName();
return $PropertyName =~ /^(?:Id|PreviousNo|Type|FileType|Missions)$/ ? "" :
+ $PropertyName eq "Started" ? ("ro", "timetipdate") :
$self->SUPER::DisplayProperty($PropertyDescriptor);
}
@@ -67,9 +69,13 @@ sub GenerateHeaderView($$$)
{
print "Arguments / <span class='MissionHeader'>Missions</span>";
}
+ elsif ($PropertyName eq "Started")
+ {
+ print "<a class='title' title='Start Date'>Start</a>";
+ }
elsif ($PropertyName eq "Ended")
{
- print "<a class='title' title='Execution ended'>Time</a>";
+ print "<a class='title' title='End Time'>Time</a>";
}
else
{
@@ -129,13 +135,7 @@ sub GenerateDataView($$$)
if (defined $StepTask->Ended)
{
my $Duration = $StepTask->Ended - $StepTask->Started;
- my $TagId = "E". $StepTask->Id;
- print "<a id='$TagId' class='title' title='",
- strftime("%Y-%m-%d %H:%M:%S", localtime($StepTask->Ended)),
- "'>", DurationToString($Duration), "</a>\n";
- print "<script type='text/javascript'><!--\n";
- print " ShowDateTime(", $StepTask->Ended, ",'$TagId');\n";
- print "--></script>";
+ GenerateTipDateTime($StepTask->Ended, DurationToString($Duration));
}
else
{
More information about the wine-cvs
mailing list