Add alias name on budget page. (#3572)

https://github.com/sitespeedio/sitespeed.io/issues/3571
This commit is contained in:
Peter Hedenskog 2022-02-20 13:42:53 +01:00 committed by GitHub
parent 3c0447fe00
commit bdc399e68a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -165,7 +165,8 @@ class HTMLBuilder {
pageDescription: 'The list of failing and working performance budgets.',
budget,
totalFailing,
totalWorking
totalWorking,
alias: options.urlsMetaData
};
}

View File

@ -6,8 +6,9 @@ mixin row(budget)
each result in results
tr
td
a(href=url)= url
td #{result.metric} with value #{result.friendlyValue || result.value} limit #{result.limitType} #{result.friendlyLimit || result.limit}
a(href=url)= alias[url] ? alias[url].urlAlias : url
p #{alias[url] ? url : ''}
td #{result.metric} with value #{result.friendlyValue || result.value} limit #{result.limitType} #{result.friendlyLimit || result.limit}
block content
h2 The budget