diff --git a/lib/plugins/html/templates/url/index.pug b/lib/plugins/html/templates/url/index.pug index 6b3818864..078dcc945 100644 --- a/lib/plugins/html/templates/url/index.pug +++ b/lib/plugins/html/templates/url/index.pug @@ -68,13 +68,31 @@ block content tr td RUM Speed Index: td #{d.browsertime.pageSummary.statistics.timings.rumSpeedIndex.median} + if !d.browsertime && d.webpagetest + tr + td Render (first view): + td #{d.webpagetest.pageSummary.data.median.firstView.render} + tr + td Speed Index (first view): + td #{d.webpagetest.pageSummary.data.median.firstView.SpeedIndex} + tr + td Visual Complete 85% (first view): + td #{d.webpagetest.pageSummary.data.median.firstView.visualComplete85} + tr + td Last Visual Change (first view): + td #{d.webpagetest.pageSummary.data.median.firstView.lastVisualChange} + tr + td Requests: + td #{d.webpagetest.pageSummary.data.median.firstView.requestsFull} .one-half.column if d.browsertime && d.browsertime.pageSummary && d.browsertime.pageSummary.screenshots - var width = options.mobile ? 150 : '100%'; a(href='data/screenshots/0.png') - img.screenshot(src='data/screenshots/0.png', width=width, alt='Screenshot of run 0') - + img.screenshot(src='data/screenshots/0.png', width=width, alt='Screenshot of run 1') + else if !d.browsertime && d.webpagetest + a(href='data/screenshots/0.png') + img.screenshot(src='data/screenshots/wpt-1-firstView.png', alt='Screenshot of run 1') include ./summaryBox.pug if d.browsertime && d.browsertime.har diff --git a/lib/plugins/html/templates/url/run.pug b/lib/plugins/html/templates/url/run.pug index eee997320..5ac2c559b 100644 --- a/lib/plugins/html/templates/url/run.pug +++ b/lib/plugins/html/templates/url/run.pug @@ -70,13 +70,34 @@ block content tr td RUM Speed Index: td #{d.browsertime.run.timings.rumSpeedIndex} + if !d.browsertime && d.webpagetest + tr + td Render (first view): + td #{d.webpagetest.run.firstView.render} + tr + td Speed Index (first view): + td #{d.webpagetest.run.firstView.SpeedIndex} + tr + td Visual Complete 85% (first view): + td #{d.webpagetest.run.firstView.visualComplete85} + tr + td Last Visual Change (first view): + td #{d.webpagetest.run.firstView.lastVisualChange} + tr + td Requests: + td #{d.webpagetest.run.firstView.requestsFull} .one-half.column //- No good way to detect if we have screenshots or not right now for a run - - screenshotName = 'data/screenshots/' + runIndex + '.png' - - var width = options.mobile ? 150 : '100%'; - a(href=screenshotName) - img.screenshot(src=screenshotName, width=width, alt='Screenshot') + if d.browsertime + - screenshotName = 'data/screenshots/' + runIndex + '.png' + - var width = options.mobile ? 150 : '100%'; + a(href=screenshotName) + img.screenshot(src=screenshotName, width=width, alt='Screenshot') + else if !d.browsertime && d.webpagetest + - screenshotName = 'data/screenshots/wpt-' + (Number(runIndex)+1) + '-firstView.png' + a(href=screenshotName) + img.screenshot(src=screenshotName, alt='Screenshot') if d.browsertime && d.browsertime.run && d.browsertime.run.har include ./waterfall/index.pug