[PATCH] testbot: Show the VM configuration details when submitting a job.
Francois Gouget
fgouget at codeweavers.com
Mon Feb 26 19:44:33 CST 2018
The VMs are now shown in a table and their short description can be
expanded to show the full configuration. This can help select the right
set of VMs for the tests.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
testbot/web/Submit.pl | 40 +++++++++++++++++++++++-----------------
testbot/web/WineTestBot.css | 13 +++++++++++++
2 files changed, 36 insertions(+), 17 deletions(-)
diff --git a/testbot/web/Submit.pl b/testbot/web/Submit.pl
index 0e9aef347..875384ea3 100644
--- a/testbot/web/Submit.pl
+++ b/testbot/web/Submit.pl
@@ -230,7 +230,12 @@ sub GenerateFields($)
{
print "<div><input type='hidden' name='ShowAll' value='1'></div>\n";
}
-
+ print "<div class='CollectionBlock'><table>\n";
+ print "<thead><tr><th class='Record'></th>\n";
+ print "<th class='Record'>VM Name</th>\n";
+ print "<th class='Record'>Description</th>\n";
+ print "</th><tbody>\n";
+
my $VMs = CreateVMs();
if ($self->{FileType} eq "exe64" || $self->{FileType} eq "dll64")
{
@@ -249,36 +254,37 @@ sub GenerateFields($)
{
$VMs->AddFilter("Role", ["base"]);
}
+ my $Even = 1;
my $SortedKeys = $VMs->SortKeysBySortOrder($VMs->GetKeys());
foreach my $VMKey (@$SortedKeys)
{
my $VM = $VMs->GetItem($VMKey);
my $FieldName = "vm_" . $self->CGI->escapeHTML($VMKey);
- print "<div class='ItemProperty'><label>",
- $self->CGI->escapeHTML($VM->Name);
- if ($VM->Description)
- {
- print " (", $self->CGI->escapeHTML($VM->Description), ")";
- }
- my $Checked = 1;
- if ($VM->Status eq 'offline')
- {
- print " [offline]";
- $Checked = undef;
- }
- elsif ($VM->Status eq 'maintenance')
+ print "<tr class='", ($Even ? "even" : "odd"),
+ "'><td><input name='$FieldName' type='checkbox'";
+ $Even = !$Even;
+ my ($Checked, $Status) = (1, "");
+ if ($VM->Status =~ /^(offline|maintenance)$/)
{
- print " [maintenance]";
+ $Status = " [". $VM->Status ."]";
$Checked = undef;
}
- print "</label><div class='ItemValue'><input type='checkbox' name='$FieldName'";
if ($Checked and
($self->GetParam("Page") == 1 || $self->GetParam($FieldName)))
{
print " checked='checked'";
}
- print "/></div></div>\n";
+ print "/></td>\n";
+
+ print "<td>", $self->CGI->escapeHTML($VM->Name), "</td>\n";
+ print "<td><details><summary>",
+ $self->CGI->escapeHTML($VM->Description || $VM->Name),
+ "$Status</summary>",
+ $self->CGI->escapeHTML($VM->Details || "No details!"),
+ "</details></td>";
+ print "</tr>\n";
}
+ print "</tbody></table>\n";
}
else
{
diff --git a/testbot/web/WineTestBot.css b/testbot/web/WineTestBot.css
index 2ccce2469..ebc622e34 100644
--- a/testbot/web/WineTestBot.css
+++ b/testbot/web/WineTestBot.css
@@ -317,6 +317,19 @@ h2
padding-bottom: 0.1em;
}
+details
+{
+ font-style: italic;
+ color: #505050;
+}
+
+summary
+{
+ font-style: normal;
+ color: black;
+}
+
+
pre
{
margin: 0;
--
2.16.1
More information about the wine-devel
mailing list