Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/lib/WineTestBot/Activity.pm | 17 ++++++++++++++++- testbot/web/Activity.pl | 8 +++++++- testbot/web/WineTestBot.css | 1 + 3 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/testbot/lib/WineTestBot/Activity.pm b/testbot/lib/WineTestBot/Activity.pm index dcc58956..38cd556a 100644 --- a/testbot/lib/WineTestBot/Activity.pm +++ b/testbot/lib/WineTestBot/Activity.pm @@ -51,6 +51,7 @@ describing the TestBot activity. The structure is as follows: end => <EndTimestamp>, runnable => <RunnableTasksCount>, queued => <QueuedTasksCount>, + engine => <StartOrStop>, statusvms => { <VMName1> => { vm => <VMObject>, @@ -102,6 +103,20 @@ sub GetActivity($) { ($Group->{runnable}, $Group->{queued}) = split / /, $Record->Value; } + elsif ($Record->Type eq "engine" and $Record->Name =~ /^(?:start|stop)$/) + { + $Group->{engine} = $Record->Name; + foreach my $VM (@{$VMs->GetItems()}) + { + my $StatusVMs = ( $Group->{statusvms} ||= {} ); + my $VMStatus = ( $StatusVMs->{$VM->Name} ||= {} ); + $VMStatus->{vmstatus} = $VMStatus; + weaken($VMStatus->{vmstatus}); # avoid memory cycles + $VMStatus->{start} = $Group->{start}; + $VMStatus->{status} = "engine"; + $VMStatus->{rows} = 1; + } + } elsif ($Record->Type eq "vmstatus") { # Ignore retired / deleted VMs @@ -165,7 +180,7 @@ sub GetActivity($) { $LastVMStatus->{end} = $VMStatus->{start} if ($LastVMStatus); } - elsif ($LastVMStatus) + elsif ($LastVMStatus and $LastVMStatus->{status} ne "engine") { $VMStatus = $StatusVMs->{$VM->Name} = $LastVMStatus; $LastStatusVMs{$VM->Name}->{$VM->Name} = {merged => 1, vmstatus => $VMStatus}; diff --git a/testbot/web/Activity.pl b/testbot/web/Activity.pl index 677272f4..35843533 100644 --- a/testbot/web/Activity.pl +++ b/testbot/web/Activity.pl @@ -139,6 +139,12 @@ EOF next if (!$Group->{statusvms});
print "<tr><td>", _GetHtmlTime($Group->{start}), "</td>"; + if ($Group->{engine}) + { + print "<td class='Record RecordEngine'>$Group->{engine}</td>\n"; + print "<td colspan='", scalar(@SortedVMs), "'><hr></td>\n"; + next; + } if ($Group->{runnable} or $Group->{queued}) { print "<td class='Record'>", ($Group->{runnable} || 0), " / ", ($Group->{queued} || 0), "</td>"; @@ -229,7 +235,7 @@ sub GenerateFooter($) print "<span class='Record-running'>running</span> a task (in which case it links to it),<br>\n"; print "<span class='Record-dirty'>dirty</span> while the server is powering off the VM after a task or while it assesses its state on startup.</p>\n";
- print "<p>If no time is indicated then the VM remained in that state for less than 2 seconds. The tasks column indicates the number of runnable / queued tasks before that scheduling round.</p>\n"; + print "<p>If no time is indicated then the VM remained in that state for less than 2 seconds. The tasks column indicates the number of runnable / queued tasks before that scheduling round. A long horizontal bar indicates the TestBot server was restarted. </p>\n";
print "<p>The VM could also be <span class='Record-offline'>offline</span> due to a temporary issue,<br>\n"; print "or until the administrator can look at it for <span class='Record-maintenance'>maintenance</span>,<br>\n"; diff --git a/testbot/web/WineTestBot.css b/testbot/web/WineTestBot.css index 8c03a914..80de5668 100644 --- a/testbot/web/WineTestBot.css +++ b/testbot/web/WineTestBot.css @@ -344,6 +344,7 @@ a.title { color:white; text-decoration: none; }
th.Record { text-align: center; } td.Record { text-align: center; } +.RecordEngine { font-style: italic; color: #601919; } .RecordHost { font-size: smaller; } .RecordJob { font-size: smaller; } .RecordDuration { }