-
Notifications
You must be signed in to change notification settings - Fork 717
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
171 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
$category = "Quick"; | ||
$pageData = $testStepResult->getRawResults(); | ||
$needCDN = array(); | ||
if (isset($pageData['score_cdn']) ) { | ||
foreach ($requests as $index => &$request) { | ||
if (isset($request['score_cdn']) && $request['score_cdn'] >= 0 && $request['score_cdn'] < 100) { | ||
$key = $request['host'] . ' ' . $index; | ||
$proto = 'http://'; | ||
if ($request['is_secure']) { | ||
$proto = 'https://'; | ||
} | ||
$value = $proto . $request['host'] . $request['url']; | ||
$needCDN[$key] = $value; | ||
} | ||
} | ||
ksort($needCDN); | ||
} | ||
|
||
|
||
if (count($needCDN) > 0) { | ||
$assessment[$category]["opportunities"][] = array( | ||
"title" => count($needCDN) . " file" . (count($needCDN) > 1 ? "s were" : " is") . " hosted without using a CDN.", | ||
"desc" => "A Content Delivery Network (CDN) distributes a website's files throughout the world, reducing request latency. These files do not use a CDN:", | ||
"examples" => $needCDN, | ||
"good" => false | ||
); | ||
} else { | ||
$assessment[$category]["opportunities"][] = array( | ||
"title" => 'This site uses a CDN for delivering its files.', | ||
"desc" => "A Content Delivery Network (CDN) distributes a website's files throughout the world, reducing request latency.", | ||
"examples" => array(), | ||
"good" => true | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<title>WebPageTest JSON</title> | ||
<link rel="stylesheet" type="text/css" href="/assets/css/vendor/prism-1.29.0.css"> | ||
<script src="/assets/js/vendor/prism-1.29.0.js" async></script> | ||
<style> | ||
pre { | ||
background: none !important; | ||
padding: 1em; | ||
margin: .5em 0; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<pre><code class="language-js">{{ $json }}</code></pre> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<details class="details_custommetrics"> | ||
<summary>Custom Metrics Data</summary> | ||
<dl class="glossary"> | ||
@foreach ($data['custom'] as $metric) | ||
@if (array_key_exists($metric, $data)) | ||
<dt>{{ $metric }}</dt> | ||
<dd class="scrollableLine"> | ||
@if (!is_string($data[$metric]) && !is_numeric($data[$metric])) | ||
{{ json_encode($data[$metric]) }} | ||
@else | ||
{{ $data[$metric] }} | ||
@endif | ||
</dd> | ||
@endif | ||
@endforeach | ||
</dl> | ||
</details> |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...esources/views/partials/details.blade.php → ...ews/partials/lighthouse/details.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.