소스 검색

Remove the 'All Metrics' tab

Gaël Métais 10 년 전
부모
커밋
d279959042

+ 0 - 5
app/node_controllers/resultsController.js

@@ -21,10 +21,6 @@ var resultsController = function(req, res, googleAnalyticsId) {
             fs.readFile('./app/node_views/results.html', {encoding: 'utf8'}, callback);
         },
 
-        phantomasMetadata: function(callback) {
-            fs.readFile('./node_modules/phantomas/lib/metadata/metadata.json', {encoding: 'utf8'}, callback);
-        },
-
         phantomasResults: function(callback) {
             fs.readFile(phantomasResultsPath, {encoding: 'utf8'}, callback);
         }
@@ -40,7 +36,6 @@ var resultsController = function(req, res, googleAnalyticsId) {
         phantomasResults = phantomasResults.replace(/<\/script>/g, '\\u003c/script>');
 
         var html = results.htmlTemplate;
-        html = strReplace(html, '%%METADATA%%', results.phantomasMetadata);
         html = strReplace(html, '%%RESULTS%%', phantomasResults);
         html = strReplace(html, '%%GA_ID%%', googleAnalyticsId);
 

+ 0 - 31
app/node_views/results.html

@@ -23,7 +23,6 @@
             <a class="menuItem back" href="/"><div class="icon-back"></div><span>New test<span></a>
             <div class="menuItem" ng-if="!phantomasResults.error" ng-class="{active: view == 'summary'}" ng-click="setView('summary')"><div class="icon-summary"></div><span>Summary</span></div>
             <div class="menuItem" ng-if="!phantomasResults.error" ng-class="{active: view == 'execution'}" ng-click="setView('execution')"><div class="icon-spaghetti"></div><span>JS Timeline</span></div>
-            <div class="menuItem" ng-if="!phantomasResults.error" ng-class="{active: view == 'metrics'}" ng-click="setView('metrics')"><div class="icon-metrics"></div><span>All Metrics</span></div>
         </div>
 
         <div ng-if="phantomasResults.error">
@@ -854,34 +853,6 @@
                 </div>
             </div>
         </div>
-
-        <div ng-show="view == 'metrics' && !phantomasResults.error" class="metrics">
-            <h2>Metrics from Phantomas report</h2>
-            <p><a href="https://github.com/macbre/phantomas" target="_blank">Phantomas</a> is a web performance metrics collector. You can find here the (almost) entire list of metrics from Phantomas.</p>
-            
-            <div ng-repeat="(moduleName, module) in metricsModule">
-                <h4>{{moduleName}}</h4>
-                <div ng-repeat="(metricName, metric) in module" ng-if="phantomasResults.metrics[metricName] >= 0" class="module" id="metric_{{metricName}}">
-                    <div class="value">
-                        {{metricName}}: {{phantomasResults.metrics[metricName] | number: 0}}
-                        <span ng-if="metric.unit == 'ms' || metric.unit == 'bytes' || metric.unit == '%'">{{metric.unit}}</span>
-                    </div>
-                    <div class="legend">
-                        {{metric.desc}}
-                        <span ng-if="metric.unreliable">(unreliable)</span>
-                    </div>
-                    <div ng-if="phantomasResults.offenders[metricName]" class="offenders">
-                        <div ng-if="!metric.showingOffenders" ng-click="metric.showingOffenders = true">Show offenders</div>
-                        <div ng-if="metric.showingOffenders" ng-click="metric.showingOffenders = false">Hide offenders</div>
-                        <ul ng-if="metric.showingOffenders">
-                            <li ng-repeat="offender in phantomasResults.offenders[metricName] track by $index">
-                                {{offender}}
-                            </li>
-                        </ul>
-                    </div>
-                </div>
-            </div>
-        </div>
     </div>
 
     <div class="footer">
@@ -892,8 +863,6 @@
 
         var _phantomas_results = %%RESULTS%%;
 
-        var _phantomas_metadata = %%METADATA%%;
-
         var GA_ID = '%%GA_ID%%';
         if (GA_ID.length > 0 && window.location.host === 'yellowlab.tools') {
             (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

BIN
app/public/fonts/icons.woff


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
app/public/fonts/svg-icons/drawer3.svg


+ 0 - 14
app/public/scripts/resultsCtrl.js

@@ -3,7 +3,6 @@ var app = angular.module('Results', []);
 app.controller('ResultsCtrl', function ($scope) {
     // Grab results from nodeJS served page
     $scope.phantomasResults = window._phantomas_results;
-    $scope.phantomasMetadata = window._phantomas_metadata.metrics;
 
     $scope.view = 'summary';
 
@@ -20,7 +19,6 @@ app.controller('ResultsCtrl', function ($scope) {
 
         initSummaryView();
         initJSTimelineView();
-        initMetricsView();
 
     }
 
@@ -173,18 +171,6 @@ app.controller('ResultsCtrl', function ($scope) {
         $scope.timelineMax = Math.max.apply(Math, $scope.timeline);
     }
 
-    function initMetricsView() {
-        // Get the Phantomas modules from metadata
-        $scope.metricsModule = {};
-        for (var metricName in $scope.phantomasMetadata) {
-            var metric = $scope.phantomasMetadata[metricName];
-            if (!$scope.metricsModule[metric.module]) {
-                $scope.metricsModule[metric.module] = {};
-            }
-            $scope.metricsModule[metric.module][metricName] = metric;
-        }
-    }
-
 
     function getDomComplexityScore() {
         var note = 'A';

+ 14 - 17
app/public/styles/less/icons.less

@@ -1,27 +1,24 @@
-@arrow-left3-font-family: "fontsmith-icons";
-@arrow-left3-value: "\e007";
-@arrow-left3: '"fontsmith-icons"' '"\\e007"';
-@list-font-family: "fontsmith-icons";
-@list-value: "\e002";
-@list: '"fontsmith-icons"' '"\\e002"';
-@warning-font-family: "fontsmith-icons";
-@warning-value: "\e000";
-@warning: '"fontsmith-icons"' '"\\e000"';
 @eye-font-family: "fontsmith-icons";
 @eye-value: "\e004";
 @eye: '"fontsmith-icons"' '"\\e004"';
-@question-font-family: "fontsmith-icons";
-@question-value: "\e001";
-@question: '"fontsmith-icons"' '"\\e001"';
 @lab-font-family: "fontsmith-icons";
 @lab-value: "\e003";
 @lab: '"fontsmith-icons"' '"\\e003"';
 @bars-font-family: "fontsmith-icons";
-@bars-value: "\e006";
-@bars: '"fontsmith-icons"' '"\\e006"';
-@drawer3-font-family: "fontsmith-icons";
-@drawer3-value: "\e005";
-@drawer3: '"fontsmith-icons"' '"\\e005"';
+@bars-value: "\e005";
+@bars: '"fontsmith-icons"' '"\\e005"';
+@warning-font-family: "fontsmith-icons";
+@warning-value: "\e000";
+@warning: '"fontsmith-icons"' '"\\e000"';
+@arrow-left3-font-family: "fontsmith-icons";
+@arrow-left3-value: "\e006";
+@arrow-left3: '"fontsmith-icons"' '"\\e006"';
+@question-font-family: "fontsmith-icons";
+@question-value: "\e001";
+@question: '"fontsmith-icons"' '"\\e001"';
+@list-font-family: "fontsmith-icons";
+@list-value: "\e002";
+@list: '"fontsmith-icons"' '"\\e002"';
 
 .icon-font-family(@char) {
   font-family: ~`@{char}[0]`;

+ 0 - 3
app/public/styles/less/main.less

@@ -65,9 +65,6 @@ h1 span {
 .icon-spaghetti {
     .icon(@bars);
 }
-.icon-metrics {
-    .icon(@drawer3);
-}
 .icon-eye {
     .icon(@eye);
 }

+ 1 - 14
app/public/styles/main.css

@@ -95,7 +95,7 @@ h1 span {
   -webkit-font-smoothing: antialiased;
 }
 .icon-back:before {
-  content: "\e007";
+  content: "\e006";
 }
 .icon-summary {
   font-family: "fontsmith-icons";
@@ -121,19 +121,6 @@ h1 span {
   -webkit-font-smoothing: antialiased;
 }
 .icon-spaghetti:before {
-  content: "\e006";
-}
-.icon-metrics {
-  font-family: "fontsmith-icons";
-  speak: none;
-  font-style: normal;
-  font-weight: normal;
-  font-variant: normal;
-  text-transform: none;
-  line-height: 1;
-  -webkit-font-smoothing: antialiased;
-}
-.icon-metrics:before {
   content: "\e005";
 }
 .icon-eye {

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.