8000 prod <- master by scottjehl · Pull Request #1703 · catchpoint/WebPageTest · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

prod <- master #1703

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jan 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion www/common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ if (!$privateInstall) {

// constants
define('VER_WEBPAGETEST', '21.07'); // webpagetest version
define('VER_CSS', 163); // version of the sitewide css file
define('VER_CSS', 164); // version of the sitewide css file
define('VER_JS', 40); // 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
21 changes: 3 additions & 18 deletions www/details.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
$page_keywords = array('Performance Test','Details','WebPageTest','Website Speed Test','Page Speed');
$page_description = "Website performance test details$testLabel";

function createForm($formName, $btnText, $callback, $id, $owner, $secret, $siteKey) {
function createForm($formName, $btnText, $id, $owner, $secret) {
echo "<form name='$formName' id='$formName' action='/runtest.php?test=$id' method='POST' enctype='multipart/form-data'>";
echo "\n<input type=\"hidden\" name=\"resubmit\" value=\"$id\">\n";
echo '<input type="hidden" name="vo" value="' . htmlspecialchars($owner) . "\">\n";
Expand All @@ -47,11 +47,7 @@ function createForm($formName, $btnText, $callback, $id, $owner, $secret, $siteK
$hmac = sha1($hashStr);
echo "<input type=\"hidden\" name=\"vh\" value=\"$hmac\">\n";
}
if (strlen($siteKey)) {
echo "<button data-sitekey=\"$siteKey\" data-callback='$callback' class=\"g-recaptcha\">$btnText</button>";
} else {
echo "<input type=\"submit\" value=\"$btnText\">";
}
echo "<input type=\"submit\" value=\"$btnText\">";
echo "\n</form>\n";
}

Expand Down Expand Up @@ -278,22 +274,11 @@ function createForm($formName, $btnText, $callback, $id, $owner, $secret, $siteK
&& ($isOwner || !$test['testinfo']['sensitive'])
&& (!isset($test['testinfo']['type']) || !strlen($test['testinfo']['type'])) )
{
$siteKey = GetSetting("recaptcha_site_key", "");
if (!isset($uid) && !isset($user) && !isset($USER_EMAIL) && strlen($siteKey)) {
?>
<script>
function onRecaptchaSubmitExperiment(token) {
document.getElementById("experimentForm").submit();
}
</script>
<?php
}

// load the secret key (if there is one)
$secret = GetServerSecret();
if (!isset($secret))
$secret = '';
createForm('experimentForm', 'Run Experiment', 'onRecaptchaSubmitExperiment', $id, $owner, $secret, $siteKey);
createForm('experimentForm', 'Run Experiment', $id, $owner, $secret);
}
?>
</div>
Expand Down
2 changes: 1 addition & 1 deletion www/graph_page_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function drawChart(chart_metric) {
function signifString(pValue) {
if (pValue === null) {
return "";
} else if (pValue < 0.05) {
} else if (pValue < 0.05 && pValue != 0.000) {
return "TRUE";
} else {
return "FALSE";
Expand Down
6 changes: 3 additions & 3 deletions www/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
$selected = '';
if ($name == $_COOKIE['testProfile'] || (!$_COOKIE['testProfile'] && $pIndex == 0))
$selected = 'checked';
echo "<label class=\"test_preset_profile test_preset_profile-$name\"><input type=\"radio\" name=\"profile\" aria-labeledby=\"tt-$name\" value=\"$name\" $selected><span>{$profile['label']}</span><span role=\"tooltip\" id=\"tt-$name\" class=\"test_preset_profile_tt\">{$profile['description']}</span></label>";
echo "<label class=\"test_preset_profile test_preset_profile-$name\"><input type=\"radio\" name=\"profile\" aria-labelledby=\"tt-$name\" value=\"$name\" $selected><span>{$profile['label']}</span><span role=\"tooltip\" id=\"tt-$name\" class=\"test_preset_profile_tt\">{$profile['description']}</span></label>";
$pIndex++;
}
}
Expand Down Expand Up @@ -831,7 +831,7 @@
<div id="spof" class="test_subbox ui-tabs-hide">
<p>
Simulate failure of specified domains. This is done by re-routing all requests for
the domains to <a href="http://blog.patrickmeenan.com/2011/10/testing-for-frontend-spof.html" target="_blank" rel="noopener">blackhole.webpagetest.org</a> which will silently drop all requests.
the domains to <a href="https://blog.patrickmeenan.com/2011/10/testing-for-frontend-spof.html" target="_blank" rel="noopener">blackhole.webpagetest.org</a> which will silently drop all requests.
</p>
<p>
<label for="spof_hosts" class="full_width">
Expand Down Expand Up @@ -1023,4 +1023,4 @@ function ShowBulk() {
return true;
return false;
}
?>
?>
26 changes: 2 additions & 24 deletions www/lighthouse_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,6 @@
</head>
<body class="home">
<?php
$siteKey = GetSetting("recaptcha_site_key", "");
if (!isset($uid) && !isset($user) && !isset($USER_EMAIL) && strlen($siteKey)) {
echo "<script src=\"https://www.google.com/recaptcha/api.js\" async defer></script>\n";
?>
<script>
function onRecaptchaSubmit(token) {
var form = document.getElementById("urlEntry");
if (ValidateInput(form)) {
form.submit();
} else {
grecaptcha.reset();
}
}
</script>
<?php
}
include 'header.inc';
if (!$headless) {
?>
Expand Down Expand Up @@ -125,14 +109,8 @@ function onRecaptchaSubmit(token) {
</div>
</div>
<div>
<?php
if (strlen($siteKey)) {
echo "<button data-sitekey=\"$siteKey\" data-callback='onRecaptchaSubmit' class=\"g-recaptcha start_test\">Start Test &#8594;</button>";
} else {
echo '<input type="submit" name="submit" value="Start Test &#8594;" class="start_test">';
}
?>
</div>
<input type="submit" name="submit" value="Start Test &#8594;" class="start_test">
</div>
</li>

</ul>
Expand Down
21 changes: 21 additions & 0 deletions www/pagestyle2.css
Original file line number Diff line number Diff line change
Expand Up @@ -4431,6 +4431,27 @@ th.header {
max-width: 100%;
padding-bottom: .8em;
}
/* overflow shadows */
.scrollableTable,
.results-filmstrip-container,
div.waterfall-container,
div.overflow-container,
.breakdownFrame_item > div,
#videoDiv {
background: linear-gradient(90deg,#fff 33%,rgba(255,255,255,0)),linear-gradient(90deg,rgba(255,255,255,0),#fff 66%) 0 100%,radial-gradient(farthest-side at 0 50%,rgb(106 106 106 / 40%),transparent),radial-gradient(farthest-side at 100% 50%,rgba(106 106 106 / 40%),transparent) 0 100%;
background-repeat: no-repeat;
background-size: 50px 100%,50px 100%,10px 100%,10px 100%;
background-position: 0 0,100%,0 0,100%;
background-attachment: local,local,scroll,scroll;
}
.scrollableTable table,
.results-filmstrip-container img,
div.waterfall-container img,
div.overflow-container > *,
.breakdownFrame_item > div > *,
#videoDiv > * {
mix-blend-mode: multiply
}

.scrollableTable th,
.scrollableTable td {
Expand Down
15 changes: 0 additions & 15 deletions www/runtest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1247,21 +1247,6 @@ function ValidateKey(&$test, &$error, $key = null)

if( $hmac != $test['vh'] || $elapsed > 86400 ) {
$error = 'Your test request could not be validated (this can happen if you leave the browser window open for over a day before submitting a test). Please try submitting it again.';
} else {
// if recaptcha is enabled, verify the response
$secret = GetSetting("recaptcha_secret_key", "");
if (!isset($uid) && !isset($user) && !isset($USER_EMAIL) && strlen($secret)) {
$passed = false;
if (isset($_REQUEST['g-recaptcha-response'])) {
$captcha_url = "https://www.google.com/recaptcha/api/siteverify?secret=" . urlencode($secret) . "&response=" . urlencode($_REQUEST['g-recaptcha-response']);
$response = json_decode(http_fetch($captcha_url), true);
if (isset($response["success"]) && $response["success"])
$passed = true;
}
if (!$passed) {
$error = "Failed recaptcha validation. Please go back and try submitting your test again";
}
}
}
} elseif( isset($key) || (isset($test['key']) && strlen($test['key'])) ){
if( isset($test['key']) && strlen($test['key']) && !isset($key) )
Expand Down
11 changes: 0 additions & 11 deletions www/testinfo_command-bar.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,6 @@
&& ($isOwner || !$test['testinfo']['sensitive'])
&& (!isset($test['testinfo']['type']) || !strlen($test['testinfo']['type'])) )
{
$siteKey = GetSetting("recaptcha_site_key", "");
if (!isset($uid) && !isset($user) && !isset($USER_EMAIL) && strlen($siteKey)) {
echo "<script src=\"https://www.google.com/recaptcha/api.js\" async defer></script>\n";
?>
<script>
function onRecaptchaSubmit(token) {
document.getElementById("urlEntry").submit();
}
</script>
<?php
}
// load the secret key (if there is one)
$secret = GetServerSecret();
if (!isset($secret))
Expand Down
2 changes: 1 addition & 1 deletion www/tips_data/user_timing.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
If you instrument your pages to measure the user experience points that you care about most you will get MUCH more actionable results and can measure the performance from your actual users in the field.<br><br><a href="http://blog.patrickmeenan.com/2013/07/measuring-performance-of-user-experience.html" target="_blank">More details are available here</a>.
If you instrument your pages to measure the user experience points that you care about most you will get MUCH more actionable results and can measure the performance from your actual users in the field.<br><br><a href="https://blog.patrickmeenan.com/2013/07/measuring-performance-of-user-experience.html" target="_blank">More details are available here</a>.
24 changes: 1 addition & 23 deletions www/traceroute.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,6 @@
</head>
<body class="home">
<?php
$siteKey = GetSetting("recaptcha_site_key", "");
if (!isset($uid) && !isset($user) && !isset($USER_EMAIL) && strlen($siteKey)) {
echo "<script src=\"https://www.google.com/recaptcha/api.js\" async defer></script>\n";
?>
<script>
function onRecaptchaSubmit(token) {
var form = document.getElementById("urlEntry");
if (ValidateInput(form)) {
form.submit();
} else {
grecaptcha.reset();
}
}
</script>
<?php
}
$tab = 'Home';
include 'header.inc';
?>
Expand Down Expand Up @@ -155,13 +139,7 @@ function onRecaptchaSubmit(token) {

</div>
<div>
<?php
if (strlen($siteKey)) {
echo "<button data-sitekey=\"$siteKey\" data-callback='onRecaptchaSubmit' class=\"g-recaptcha start_test\">Start Test &#8594;</button>";
} else {
echo '<input type="submit" name="submit" value="Start Test &#8594;" class="start_test">';
}
?>
<input type="submit" name="submit" value="Start Test &#8594;" class="start_test">
</div>
</li>

Expand Down
24 changes: 1 addition & 23 deletions www/video/index.php
FEED
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,6 @@
</head>
<body class="home">
<?php
$siteKey = GetSetting("recaptcha_site_key", "");
if (!isset($uid) && !isset($user) && !isset($USER_EMAIL) && strlen($siteKey)) {
echo "<script src=\"https://www.google.com/recaptcha/api.js\" async defer></script>\n";
?>
<script>
function onRecaptchaSubmit(token) {
var form = document.getElementById("urlEntry");
if (ValidateInput(form)) {
form.submit();
} else {
grecaptcha.reset();
}
}
</script>
<?php
}
$tab = 'Home';
include 'header.inc';
?>
Expand Down Expand Up @@ -127,13 +111,7 @@ function onRecaptchaSubmit(token) {

</div>
<div>
<?php
if (strlen($siteKey)) {
echo "<button data-sitekey=\"$siteKey\" data-callback='onRecaptchaSubmit' class=\"g-recaptcha start_test\">Start Test &#8594;</button>";
} else {
echo '<input type="submit" name="submit" value="Start Test &#8594;" class="start_test">';
}
?>
<input type="submit" name="submit" value="Start Test &#8594;" class="start_test">
</div>


Expand Down
26 changes: 2 additions & 24 deletions www/webvitals.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,6 @@
</head>
<body class="home">
<?php
$siteKey = GetSetting("recaptcha_site_key", "");
if (!isset($uid) && !isset($user) && !isset($USER_EMAIL) && strlen($siteKey)) {
echo "<script src=\"https://www.google.com/recaptcha/api.js\" async defer></script>\n";
?>
<script>
function onRecaptchaSubmit(token) {
var form = document.getElementById("urlEntry");
if (ValidateInput(form)) {
form.submit();
} else {
grecaptcha.reset();
}
}
</script>
<?php
}
$tab = 'Home';
include 'header.inc';
if (!$headless) {
Expand Down Expand Up @@ -122,14 +106,8 @@ function onRecaptchaSubmit(token) {
<div class="fieldrow" id="description"></div>
</div>
<div>
<?php
if (strlen($siteKey)) {
echo "<button data-sitekey=\"$siteKey\" data-callback='onRecaptchaSubmit' class=\"g-recaptcha start_test\">Start Test &#8594;</button>";
} else {
echo '<input type="submit" name="submit" value="Start Test &#8594;" class="start_test">';
}
?>
</div>
<input type="submit" name="submit" value="Start Test &#8594;" class="start_test">
</div>
</li>
</ul>
</div>
Expand Down
0