Skip to content

[UI] Flat refresh 7/9: Vulnerabilities page with a severity bar and without row rails #457

Description

@LarsLaskowski

Part of #450. Depends on #451 (tokens) and #452 (shared components).

Problem

The Vulnerabilities page (/vulnerabilities, Components/Pages/Vulnerabilities.razor) lists the active advisories in a table with a colored rail on the left edge of every row (dug-rail-critical, dug-rail-high, …) in addition to the severity chip in the row — the same information twice, in a style the refresh drops. The page gives no overview of how the advisories are distributed over the severities; a user has to page through the table or filter four times. The button that expands a row has no accessible name. The page header has an eyebrow label, and the section repeats the page description.

Target

Vulnerabilities

Sample data; the list is shortened, advisory identifiers are placeholders. The first row is expanded. The header navigation is part of #454.

Scope

1. Page header

PageHeader (#452) with the title Vulnerabilities and the description Active advisories across all images, with the images and running containers each one affects.

2. Panel header

One SectionPanel whose header holds two groups that wrap below each other on narrow screens:

  • Left: the title Active advisories followed by a middle dot and the number of active advisories in muted text (Active advisories · 31). With a filter that hides advisories the number reads 4 of 31. Under it the SeverityBar ([UI] Flat refresh 2/9: shared components for status, severity, page header, panel and tables #452), at most 360 px wide, with its legend. The bar shows the distribution of all active advisories by their severity, independent of the filter; an advisory of a severity other than the four counts as low.
  • Right: the filter field and the severity select, each with its label above (13 px, medium weight) and at least 44 px high. Filter: label Filter, placeholder Advisory, title or package, 260 px wide, clearable, filtering while typing as today. Severity: label Severity, 150 px wide, options All, Critical, High, Medium, Low.

The description under the section title is removed.

3. Table

Flush in the panel, in the table style of #452, rows vertically centered with 8 px vertical padding.

Column Content
(no head) The expand button: 44 × 44 px, no border, a chevron pointing down (collapsed) or up (expanded), aria-expanded, and aria-label Show affected images or Hide affected images.
Advisory The advisory identifier, semibold; a link in --dug-link that opens in a new tab with rel="noopener noreferrer" only when the reference is an absolute http or https address, as today. Below it the title (13 px, muted) when there is one.
Severity The severity as a StatusChip in its severity tone; below it CVSS 9.8 (13 px, muted, one decimal) when a score exists.
Package The affected packages joined with a comma, or —.
Fixed version The fixed versions joined with a comma, or —.
Affected images Count, tabular figures.
Running containers Count, tabular figures.
  • The rails on the left row edge are removed: RowClassFunc, GetSeverityRailClass and the .dug-rail-* rules in app.css including those of the mobile card layout. No other page uses them.
  • An expanded row and its detail share the background --dug-surface-subtle. The detail is indented to the start of the Advisory column and shows the label Affected images (13 px, muted) and one image reference per line: a link in --dug-link to the image's detail page when the image is an observed image, plain text otherwise — as today.
  • Without a matching advisory the table shows No advisories match the current filter.

4. Pager

At the bottom of the panel, right-aligned, separated from the table by a --dug-border line: Rows per page with a select (25, 50, 100), the range (1–25 of 31) and two icon buttons for the previous and the next page (44 × 44 px, 1 px border, aria-label Previous page / Next page; a disabled button uses a muted icon). It is shown only when more than 25 advisories match, as today.

5. Narrow screens and loading

6. Cleanup

The page no longer has its own GetSeverityColor; it uses StatusChip and the formatter of #452.

Behavior that must not change

  • Which advisories are listed, their order (severity, CVSS score, number of affected images), the filter rules (advisory identifier, title or package, ignoring case; severity), 25 rows per page with the sizes 25, 50 and 100, and the rule for linking an advisory (Web UI, Pages and routes).
  • A row expands to its affected images.
  • Persistent component state of the page.

Out of scope

  • A deep link that opens the page with a filter set.
  • Sorting by clicking a column head.

Affected files

  • src/DockerUpdateGuard/Components/Pages/Vulnerabilities.razor(.cs)
  • src/DockerUpdateGuard/wwwroot/app.css (.dug-rail-*, pager and filter styles)
  • docs/areas/web-ui.md: the Vulnerabilities row of Pages and routes (the severity overview)

Tests

  • Existing tests that follow: VulnerabilitiesTests (asserts the class dug-rail-critical), VulnerabilitiesPersistentStateTests.
  • New: the count in the title without and with a filter; the bar's distribution for a mixed list and its independence of the filter; the expand button's label and aria-expanded in both states; the detail with linked and unlinked images; no rail class on any row; the pager shown above 25 matches and hidden otherwise; the empty-filter text.

Proposed acceptance criteria

  1. The page shows one header and one panel; the panel header shows the advisory count, the severity bar with legend, the filter and the severity select.
  2. The count reads {matching} of {all} when a filter hides advisories, and the bar always shows all active advisories.
  3. No row carries a severity rail, and app.css contains no .dug-rail-* rule.
  4. The expand button has an accessible name and state; an expanded row shows its affected images with today's linking rule on the subtle background.
  5. Filter, severity select, paging and the order of the advisories behave as before.
  6. The pager is shown only above 25 matches and its buttons are labelled.
  7. The page has no horizontal overflow at 390, 768 and 1280 px.
  8. docs/areas/web-ui.md mentions the severity overview of the page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions