Skip to content

Commit

Permalink
Merge pull request #2510 from WPO-Foundation/advcomp
Browse files Browse the repository at this point in the history
Advanced Visual Comparison with current test id
  • Loading branch information
tkadlec authored Nov 3, 2022
2 parents 395945f + 48ffc95 commit 81a6654
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions www/video/filmstrip_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@
echo "</form>"; ?>


<?php
$exampleId = (!empty($tests[0])) ? $tests[0]['id'] : '110606_MJ_RZEY';
?>
<div id="advanced" style="display:none;">
<h3>Advanced Visual Comparison Configuration</h3>
<p>There are additional customizations that can be done by modifying the <b>tests</b> parameter in the comparison URL directly.</p>
Expand All @@ -203,11 +206,11 @@
<div class="scrollableTable">
<table class="pretty">
<tbody>
<tr><th>Custom label</th><td>-l:&lt;label&gt;</td><td>110606_MJ_RZEY-l:Original</td></tr>
<tr><th>Specific run</th><td>-r:&lt;run&gt;</td><td>110606_MJ_RZEY-r:3</td></tr>
<tr><th>Repeat view</th><td>-c:1</td><td>110606_MJ_RZEY-c:1</td></tr>
<tr><th>Specific step</th><td>-s:3</td><td>110606_MJ_RZEY-s:3</td></tr>
<tr><th>Specific End Time</th><td>-e:&lt;seconds&gt;</td><td>110606_MJ_RZEY-e:1.1</td></tr>
<tr><th>Custom label</th><td>-l:&lt;label&gt;</td><td><?php echo $exampleId; ?>-l:Original</td></tr>
<tr><th>Specific run</th><td>-r:&lt;run&gt;</td><td><?php echo $exampleId; ?>-r:3</td></tr>
<tr><th>Repeat view</th><td>-c:1</td><td><?php echo $exampleId; ?>-c:1</td></tr>
<tr><th>Specific step</th><td>-s:3</td><td><?php echo $exampleId; ?>-s:3</td></tr>
<tr><th>Specific End Time</th><td>-e:&lt;seconds&gt;</td><td><?php echo $exampleId; ?>-e:1.1</td></tr>
</tbody>
</table>
</div>
Expand All @@ -216,13 +219,13 @@
<p>Examples:</p>
<ul>
<li><b>Customizing labels:</b>
https://www.webpagetest.org/video/compare.php?tests=110606_MJ_RZEY-l:Original,110606_AE_RZN5-l:No+JS</li>
https://www.webpagetest.org/video/compare.php?tests=<?php echo $exampleId; ?>-l:Original,<?php echo $exampleId; ?>-l:No+JS</li>
<li><b>Compare First vs. Repeat view:</b>
https://www.webpagetest.org/video/compare.php?tests=110606_MJ_RZEY, 110606_MJ_RZEY-c:1</li>
https://www.webpagetest.org/video/compare.php?tests=<?php echo $exampleId; ?>,<?php echo $exampleId; ?>-c:1</li>
<li><b>Second step of first run vs. Second step of second run:</b>
https://www.webpagetest.org/video/compare.php?tests=110606_MJ_RZEY-r:1-s:2,110606_MJ_RZEY-r:2-s:2</li>
https://www.webpagetest.org/video/compare.php?tests=<?php echo $exampleId; ?>-r:1-s:2,<?php echo $exampleId; ?>-r:2-s:2</li>
<li><b>White background with black text:</b>
https://www.webpagetest.org/video/compare.php?tests=110606_MJ_RZEY, 110606_MJ_RZEY-c:1&bg=ffffff&text=000000</li>
https://www.webpagetest.org/video/compare.php?tests=<?php echo $exampleId; ?>,<?php echo $exampleId; ?>-c:1&bg=ffffff&text=000000</li>
</ul>
<input id="advanced-ok" type=button class="simplemodal-close pill" value="OK">
</div>
Expand Down

0 comments on commit 81a6654

Please sign in to comment.