Skip to content

Commit

Permalink
Merge pull request #415 from WebPageTest/bulk-fix
Browse files Browse the repository at this point in the history
Loads of clean up on bulk page
  • Loading branch information
tkadlec authored Jun 1, 2022
2 parents 536ae19 + a315e35 commit 8c9a2b4
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 27 deletions.
2 changes: 1 addition & 1 deletion www/common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ if (!$privateInstall) {

// constants
define('VER_WEBPAGETEST', '21.07'); // webpagetest version
define('VER_CSS', '173.55'); // version of the sitewide css file
define('VER_CSS', '173.56'); // version of the sitewide css file
define('VER_JS', 41); // version of the sitewide javascript file
define('VER_JS_TEST', 47); // version of the javascript specific to the test pages
define('VER_JS_RUNNING', 1); // version of the javascript specific to the test running status page
Expand Down
16 changes: 13 additions & 3 deletions www/pagestyle2.css
Original file line number Diff line number Diff line change
Expand Up @@ -4566,15 +4566,16 @@ form[name=filterLog] .history_filter input[type=text] {

.history-controls {
border-bottom: 1px solid #ddd;
padding-left: 1.875em;
padding-left: 0;
padding-top: .5em;
padding-bottom: .5em;
}

#CompareBtn {
#CompareBtn,
#runningHeader #CompareBtn {
position: relative;
background: #fff url('/images/icon-compare.svg') 1em center no-repeat;
border-radius: 2em;
border-radius: 4px;
border: 1px solid #ddd;
padding: .6em 1.5em .6em 1.8em;
margin: .5em 0;
Expand Down Expand Up @@ -6205,10 +6206,15 @@ th.header {
padding: 1em;
line-height: 1.4;
background: #fafafa;
clear: both;
}

#runningHeader form {
float: right;
margin-bottom: 1em;
}
#runningHeader.runningHeaderBatch form[name=compare]{
float: none;
}

#runningHeader input[type="submit"] {
Expand Down Expand Up @@ -6526,12 +6532,16 @@ th.header {
}
}

.runningHeaderBatch form[name=compare]{
width: 100%;
}
.batchResults {
margin-left: auto;
margin-right: auto;
background-color: #fff;
border-collapse: collapse;
border: 0px white solid;
width: 100%;
}

.batchResults th,
Expand Down
62 changes: 39 additions & 23 deletions www/resultBatch.inc
Original file line number Diff line number Diff line change
Expand Up @@ -130,40 +130,47 @@ else
</style>
</style>
</head>
<body>
<body class="common">
<?php
$tab = 'Test Result';
include 'header.inc';
?>
<div id="result">
<div id="download">
<div id="testinfo">
<?php
if( $test['test']['batch'] )
{
echo "Tested From: $location<br>";
}
else if ( $test['test']['batch_locations'] )
{
echo 'Tested Url: ' . $test['testinfo']['url'] . '<br>';
}
echo GetTestInfoHtml();
?>
</div>
</div>
<div class="cleared"></div>

<?php
if ($complete)
{
echo "<div id='result' class='results_body'>";
if (strlen($test['testinfo']['label']))
{
$label = $test['testinfo']['label'];
echo "<h2>$label<br><span class=\"small\">(You can bookmark this page to come back or share the results with others)</span></h2>";
}
echo "<h3 class='hed_sub'>Full test results <em>(Based on Median Run by Speed Index)</em></h3>";
}
else
{
echo '<h2>Please wait while the testing is performed<br><span class="small">This page will automatically update until the test is complete</span></h2>';
?>
<h1>Testing...</h1>
<div id="runningHeader" class="box runningHeaderBatch">
<form action="/cancelTest.php" method="get">
<input type="hidden" name="test" value="<?php echo $id;?>">
<input type="submit" value="Cancel Test"/>
</form>
<p class="runningDetails">
<?php
if( $test['test']['batch'] )
{
echo "Tested From: $location<br>";
}
else if ( $test['test']['batch_locations'] )
{
echo 'Tested Url: ' . $test['testinfo']['url'] . '<br>';
}
echo GetTestInfoHtml();
?>
</p>
<?php
}

if( count($tests['variations']) )
Expand Down Expand Up @@ -203,7 +210,8 @@ else
echo "<br>Download Combined Raw: <a href=\"/result/$id/{$id}_bulk_page_data.csv\">Page Data</a> - <a href=\"/result/$id/{$id}_bulk_requests.csv\">Object Data</a>";
else
echo "<br>Download Combined Raw: <a href=\"/csv.php?test=$id\">Page Data</a> - <a href=\"/csv.php?test=$id&requests=1\">Object Data</a>";
echo "<br><br><a href=\"/aggregate.php?test=$id\">Download Aggregate Statistics</a>";
echo "<br><br><p><a href=\"/aggregate.php?test=$id\">Download Aggregate Statistics</a></p>";
echo "</div><!-- .box -->";
}
else
{
Expand Down Expand Up @@ -244,10 +252,14 @@ function DisplayTests(&$tests)
if ($videoCaptured) {
echo "<form name=\"compare\" method=\"get\" action=\"/video/compare.php\">";
}
echo '<br><table class="batchResults" border="1" cellpadding="10" cellspacing="0">
echo '<br><table class="pretty" border="1" cellpadding="10" cellspacing="0">
<tr>';
if ($videoCaptured) {
echo '<th><input style="font-size: 90%; padding: 2px;" id="CompareBtn" type="submit" value="Compare"></th>';
?>
<div class="history-controls">
<input id="CompareBtn" type="submit" value="Compare Selected Tests">
</div>
<?php
}
echo '<th>Test</th>
<th>Median load time<br>(First view)</th>';
Expand Down Expand Up @@ -285,10 +297,14 @@ function DisplayTestsWithVariations(&$tests)
if ($videoCaptured) {
echo "<form name=\"compare\" method=\"get\" action=\"/video/compare.php\">";
}
echo '<br><table class="batchResults" border="1" cellpadding="10" cellspacing="0">
echo '<br><table class="pretty" border="1" cellpadding="10" cellspacing="0">
<tr>';
if ($videoCaptured) {
echo '<th><input style="font-size: 90%; padding: 2px;" id="CompareBtn" type="submit" value="Compare"></th>';
?>
<div class="history-controls">
<input id="CompareBtn" type="submit" value="Compare Selected Tests">
</div>
<?php
}
echo '<th>Test</th>
<th>Median load time<br>(First view)</th>';
Expand Down

0 comments on commit 8c9a2b4

Please sign in to comment.