Show image for LCP and Element Timings (#3216)

* Show image for LCP and Element Timings

* lint
This commit is contained in:
Peter Hedenskog 2020-12-16 09:02:50 +01:00 committed by GitHub
parent f341c2ce03
commit c4ec014d69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -6,6 +6,7 @@ if browsertime.timings.elementTimings && Object.keys(browsertime.timings.element
th Id
if value.url !== ''
th URL
th Image
th Tag
th Render time
th Load time
@ -17,6 +18,9 @@ if browsertime.timings.elementTimings && Object.keys(browsertime.timings.element
if value.url !== ''
td
a(href=value.url) #{value.url}
td
a(href=value.url)
img.screenshot(src=value.url, alt='LCP', style='width:200px')
td #{value.tagName}
td #{h.time.ms(value.renderTime)}
td #{h.time.ms(value.loadTime)}

View File

@ -10,6 +10,7 @@ if timings.largestContentfulPaint
th Id
if timings.largestContentfulPaint.url !== ''
th URL
th Image
if timings.largestContentfulPaint.tagName
th Tag
th Render time
@ -21,9 +22,10 @@ if timings.largestContentfulPaint
td #{timings.largestContentfulPaint.id}
if timings.largestContentfulPaint.url !== ''
td
a(href=timings.largestContentfulPaint.url) #{timings.largestContentfulPaint.url}
td
a(href=timings.largestContentfulPaint.url)
img.screenshot(src=timings.largestContentfulPaint.url, alt='LCP', style='width:200px')
| #{timings.largestContentfulPaint.url}
if timings.largestContentfulPaint.tagName
td #{timings.largestContentfulPaint.tagName}
td #{h.time.ms(timings.largestContentfulPaint.renderTime)}