Add multipleRequests to network problems list

This commit is contained in:
Gaël Métais
2014-09-22 15:52:10 +02:00
parent b2ea3515a5
commit db7d07af7a
2 changed files with 6 additions and 2 deletions
+5 -2
View File
@@ -6,7 +6,7 @@
<link rel="stylesheet" type="text/css" href="/public/styles/main.css">
<link rel="stylesheet" type="text/css" href="/public/styles/results.css">
<script src="/bower_components/angular/angular.min.js"></script>
<script src="/bower_components/ngModal/dist/ng-modal.min.js"></script>
<script src="/bower_components/ngModal/dist/ng-modal.js"></script>
<script src="/public/scripts/app.js"></script>
<script src="/public/scripts/resultsCtrl.js"></script>
<script src="/public/scripts/showOffenders.js"></script>
@@ -121,7 +121,6 @@
</li>
<li ng-if="phantomasResults.metrics.consoleMessages">
Console messages: <b>{{phantomasResults.metrics.consoleMessages}}</b>
<show-offenders modal-title="Console messages" metric-name="consoleMessages" phantomas-results="phantomasResults"></show-offenders>
</li>
<li ng-if="phantomasResults.metrics.globalVariables">
Global variables: <b>{{phantomasResults.metrics.globalVariables}}</b>
@@ -256,6 +255,10 @@
Connections closed: <b>{{phantomasResults.metrics.closedConnections}}</b>
<show-offenders modal-title="Connections closed" metric-name="closedConnections" phantomas-results="phantomasResults"></show-offenders>
</li>
<li ng-if="phantomasResults.metrics.multipleRequests">
Duplicated requests: <b>{{phantomasResults.metrics.multipleRequests}}</b>
<show-offenders modal-title="Static assets requested more than once" metric-name="multipleRequests" phantomas-results="phantomasResults"></show-offenders>
</li>
<li ng-if="phantomasResults.metrics.cachingDisabled">
Caching disabled: <b>{{phantomasResults.metrics.cachingDisabled}}</b>
<show-offenders modal-title="Caching disabled" metric-name="cachingDisabled" phantomas-results="phantomasResults"></show-offenders>
+1
View File
@@ -378,6 +378,7 @@ app.controller('ResultsCtrl', function ($scope) {
var note = 'A';
var score = $scope.phantomasResults.metrics.notFound * 25 +
$scope.phantomasResults.metrics.closedConnections * 10 +
$scope.phantomasResults.metrics.multipleRequests * 10 +
$scope.phantomasResults.metrics.cachingDisabled * 2 +
$scope.phantomasResults.metrics.cachingNotSpecified +
$scope.phantomasResults.metrics.cachingTooShort / 2 +