sitespeed.io/lib/plugins/html/templates/budget.pug

31 lines
946 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

extends ./layout.pug
include _tableMixins
mixin row(budget)
each results, urlOrAlias in budget
each result in results
tr
td
if (urlOrAlias && urlOrAlias.startsWith('http'))
a(href=urlOrAlias)= urlOrAlias
else
a(href=aliasToUrl[urlOrAlias])= urlOrAlias
p #{aliasToUrl[urlOrAlias]}
td #{result.metric} with value #{result.friendlyValue || result.value} limit #{result.limitType} #{result.friendlyLimit || result.limit}
block content
h2 The budget
p The result of the performance budget. We got #{totalFailing} failing and #{totalWorking} working.
h3 Failing budgets [#{totalFailing}]
if totalFailing > 0
table
+rowHeading(['url', 'result'])
+row(budget.failing)
h3 Working budgets [#{totalWorking}]
if totalWorking > 0
table
+rowHeading(['url', 'result'])
+row(budget.working)