Skip to content

Commit

Permalink
static/frontend: display affected packages with vuln
Browse files Browse the repository at this point in the history
Modify the vuln/list page to display the packages affected by a vuln.

Fixes golang/go#52685

Change-Id: Iebf14ad8759fe90c92f15e2f61dff0c168a0d523
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/408676
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
  • Loading branch information
jba committed May 31, 2022
1 parent e0862a6 commit 82bfa03
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions static/frontend/vuln/vuln.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@
{{end}}

{{define "vuln-details"}}
{{/* . is osv.Entry */}}
<div class="Vuln-details">
<ul class="Vuln-detailsMetadata">
{{if .Aliases}}
<li class="go-textSubtle Vuln-alias">
{{range $i, $v := .Aliases}}{{if ne $i 0}},{{end}}{{$v}}{{end}}
</li>
{{end}}
<li class="go-textSubtle">Affects:
{{range $i, $v := .Affected}}{{if ne $i 0}}, {{end}}{{$v.Package.Name}}{{end}}
</li>
<li class="go-textSubtle">Published: {{.Published.Format "Jan 02, 2006"}}</li>
{{if ne .Published .Modified}}
<li class="go-textSubtle">Modified: {{.Modified.Format "Jan 02, 2006"}}</li>
Expand Down

0 comments on commit 82bfa03

Please sign in to comment.