From 64e0b0d9588baae9f91e2db62c4d50c860d1326a Mon Sep 17 00:00:00 2001 From: Peter Hedenskog Date: Tue, 2 Oct 2012 22:23:06 +0200 Subject: [PATCH] added popovers and changed where the js is located --- report/js/bootstrap.min.js | 4 +- report/velocity/footer.vm | 20 --------- report/velocity/header.vm | 4 ++ report/velocity/page.vm | 4 +- report/velocity/pages.vm | 21 +++++++++- report/velocity/summary.vm | 85 ++++++++++++++++++++++++++------------ 6 files changed, 87 insertions(+), 51 deletions(-) diff --git a/report/js/bootstrap.min.js b/report/js/bootstrap.min.js index ebc914899..9c680463e 100755 --- a/report/js/bootstrap.min.js +++ b/report/js/bootstrap.min.js @@ -1,7 +1,7 @@ /** * Bootstrap.js by @fat & @mdo -* plugins: bootstrap-transition.js, bootstrap-modal.js, bootstrap-tooltip.js +* plugins: bootstrap-transition.js, bootstrap-modal.js, bootstrap-tooltip.js, bootstrap-popover.js * Copyright 2012 Twitter, Inc. * http://www.apache.org/licenses/LICENSE-2.0.txt */ -!function(a){a(function(){a.support.transition=function(){var a=function(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},c;for(c in b)if(a.style[c]!==undefined)return b[c]}();return a&&{end:a}}()})}(window.jQuery),!function(a){var b=function(b,c){this.options=c,this.$element=a(b).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this,c=a.Event("show");this.$element.trigger(c);if(this.isShown||c.isDefaultPrevented())return;a("body").addClass("modal-open"),this.isShown=!0,this.escape(),this.backdrop(function(){var c=a.support.transition&&b.$element.hasClass("fade");b.$element.parent().length||b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in").attr("aria-hidden",!1).focus(),b.enforceFocus(),c?b.$element.one(a.support.transition.end,function(){b.$element.trigger("shown")}):b.$element.trigger("shown")})},hide:function(b){b&&b.preventDefault();var c=this;b=a.Event("hide"),this.$element.trigger(b);if(!this.isShown||b.isDefaultPrevented())return;this.isShown=!1,a("body").removeClass("modal-open"),this.escape(),a(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),a.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var b=this;a(document).on("focusin.modal",function(a){b.$element[0]!==a.target&&!b.$element.has(a.target).length&&b.$element.focus()})},escape:function(){var a=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(b){b.which==27&&a.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),b.hideModal()},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),b.hideModal()})},hideModal:function(a){this.$element.hide().trigger("hidden"),this.backdrop()},removeBackdrop:function(){this.$backdrop.remove(),this.$backdrop=null},backdrop:function(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a(' - #parse("report/velocity/footer.vm") \ No newline at end of file + #parse("report/velocity/footer.vm") + + + + + + diff --git a/report/velocity/summary.vm b/report/velocity/summary.vm index 9c8ba253d..86e3cb00d 100644 --- a/report/velocity/summary.vm +++ b/report/velocity/summary.vm @@ -2,6 +2,22 @@ #parse("report/velocity/header.vm") #parse("report/velocity/macros.vm") #parse("report/velocity/summary.logic.vm") + +#set($scoreText = "Over 90 is good, between 80-90 is not so good, and below 80 is bad, really bad.") +#set($requestText = "Below 25 is good, between 25-50 is something you should look into and above 50 is bad.") +#set($pageWeightText = "Below 1 mb is ok (but really to large for mobile), between 1-1.5 mb is something you should investigate & heavier is bad.") +#set($documentWeightText = "Below 10 kb is good (gzipped), between 10-15 is ok (but can be better) and above is bad.A small document is good for mobile.") +#set($nrOfJsText = "Two or less is good, up to 4 means you should look into it and more than 4 means you need to fix it.") +#set($nrOfCssText = "One is good, more than five is really bad.") +#set($nrOfCssImageText = "Two is good, above four is bad.") +#set($nrOfImagesText = "25 or less images is OK, below 40 is ok, and above is bad.") +#set($nrOfRequestPrimedText = "Text 2 requests is good, else if not 90% of the request are cached, it is bad") +#set($spofText = "0 pages is good, everyhing else is bad.") +#set($jsSyncInHeadText = "0 is good, 1 or more is bad and not OK.") +#set($spofPerPageText = "Everything above 0 is bad!") + + +
@@ -16,14 +32,14 @@
Score (avg) -
$scoreAverage
+
Number of requests (avg) -
$requestAverage
+
@@ -32,25 +48,25 @@
Total page weight (avg) -
$pageWeightAverage
+
Document page weight (avg) -
$totalDocumentWeightAverage
+
JS (avg) -
$jsAverage
+
CSS (avg) -
$cssAverage
+
@@ -60,40 +76,40 @@
CSS images (avg) -
$cssImageAverage
+
Images (avg) -
$imageAverage
+
Requests primed cache (avg) -
$requestPrimedAverage
+
Pages with SPOF -
$totalSpofPages
+
-
- JS loaded sync in head (avg) -
$totalJsSyncInHeadAverage
+
+ JS loaded sync in head (avg) +
-
+
SPOF per page -
$totalSpofAverage
+
@@ -117,42 +133,46 @@
  • Sitespeed score (modified and enhanced Yslow rules): - Over 90 is good, between 80-90 is not so good, and below 80 is bad, really bad. + $scoreText
  • The number of requests: - Below 25 is good, between 25-50 is something you should look into and above 50 is bad. + $requestText
  • The weight of a page: - Below 1 mb is ok (but really to large for mobile), between 1-1.5 mb is something you should investigate & heavier is bad. + $pageWeightText
  • The document weight: - Below 10 kb is good (gzipped), between 10-15 is ok (but can be better) and above is bad.A small document is good for mobile. + $documentWeightText
  • The number of javascripts: - Two or less is good, up to 4 means you should look into it and more than 4 means you need to fix it. + $nrOfJsText
  • The number of stylesheets: - One is good, more than five is really bad. + $nrOfCssText
  • The number of stylesheet images: - Two is good, above four is bad. + $nrOfCssImageText +
  • +
  • + The number of images: + $nrOfImagesText
  • - The number of requests for a primed cache: - 2 requests is good, else if not 90% of the request are cached, it is bad + The number of requests for a primed cache: + $nrOfRequestPrimedText
  • The number of pages with the possibility of frontend single point of failure: - 0 pages is good, everyhing else is bad. + $spofText
  • Average number of javascripts loaded synchronously inside of the head tag: - 0 is good, 1 or more is bad and not OK. + $jsSyncInHeadText
@@ -161,4 +181,15 @@
-#parse("report/velocity/footer.vm") \ No newline at end of file +#parse("report/velocity/footer.vm") + + + + + \ No newline at end of file