Skip to content

Commit

Permalink
html: fix missing <tr> on by-packages index
Browse files Browse the repository at this point in the history
Presentation of packages/components that have multiple advisories is
corrupted, due to missing <tr> parent elements.  Data cells for
multiple advisories are appearing in a single row.  Add missing <tr>
elements.
  • Loading branch information
frasertweedale committed Jul 30, 2024
1 parent 7c37427 commit bdaf454
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions code/hsec-tools/src/Security/Advisories/Generate/HTML.hs
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,13 @@ listByPackages advisories =
let sortedAdvisories =
sortOn (Down . advisoryId . fst) perPackageAdvisory
forM_ sortedAdvisories $ \(advisory, package) -> do
td_ [class_ "advisory-id"] $ a_ [href_ $ advisoryLink $ advisoryId advisory] $ toHtml (Advisories.printHsecId $ advisoryId advisory)
td_ [class_ "advisory-introduced"] $ toHtml $ introduced package
td_ [class_ "advisory-fixed"] $ maybe (return ()) toHtml $ fixed package
td_ [class_ "advisory-summary"] $ toHtml $ advisorySummary advisory
tr_ $ do
td_ [class_ "advisory-id"] $
a_ [href_ $ advisoryLink $ advisoryId advisory] $
toHtml (Advisories.printHsecId $ advisoryId advisory)
td_ [class_ "advisory-introduced"] $ toHtml $ introduced package
td_ [class_ "advisory-fixed"] $ maybe (return ()) toHtml $ fixed package
td_ [class_ "advisory-summary"] $ toHtml $ advisorySummary advisory

indexDescription :: Html ()
indexDescription =
Expand Down

0 comments on commit bdaf454

Please sign in to comment.