Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ It is designed for teams that want more than "a newer tag exists". The app keeps

## Main UI areas

- **Dashboard**: summary view of the current inventory
- **Dashboard**: what needs attention: containers with updates, advisories in running containers, own base runtime warnings and the last scans
- **Observed Images**: repositories and tags discovered from Docker Hub account data
- **Runtime Containers**: live workload inventory with update and vulnerability state
- **Docker Instances**: configured engines plus usage history
Expand Down
3 changes: 2 additions & 1 deletion docs/UNIT_TESTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ MSTest with **NSubstitute** (`Substitute.For<T>()`) for collaborators that cross
- `TestOptionsMonitor<T>` with `ListenerRegistration` (`Data/`) — the options monitor of a reloadable configuration; `Reload` replaces `CurrentValue` and calls the `OnChange` listeners
- `TestDevelopmentConfiguration` (`Data/`) — the development configuration files
- `SaveChangesFailingDbContext` (`Data/`) — a database whose save fails
- `SetRecordingDbContext` (`Data/`) — a database that records which entity sets the code asks for
- `GatedSaveChangesDbContext` (`Data/`, created by `SqliteTestDatabase.CreateGatedSaveChangesDbContext`) — a database whose first save of an added vulnerability finding signals `SaveEntered` and waits for `ReleaseSave` before touching the database
- `ScanLockObserver` (`Helper/`) — a scan lock registry observer: `WaitUntilWaitingAsync` yields until a second reference of a key exists or the run's task has completed
- `SqliteTestDatabase` (`Data/` of both test projects) — the PostgreSQL database, as SQLite
Expand Down Expand Up @@ -307,7 +308,7 @@ await using (testContext)
var component = testContext.Render<DashboardPage>();
var markup = component.Markup;

Assert.Contains("Observed Images", markup, "The Observed Images metric tile must render");
Assert.Contains("Observed Images", markup, "The Observed Images inventory cell must render");
}
```

Expand Down
53 changes: 50 additions & 3 deletions docs/areas/web-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ to read the state the other areas compute and to start manual scans; it computes
- Timestamps are shown in UTC as `yyyy-MM-dd HH:mm UTC`, the same for every browser and independent of the time zone and
culture of the server process. The resource chart labels are UTC too: the first and the last label read
`MM-dd HH:mm UTC`, the visible labels between them `HH:mm`.
- The scan status chips of the dashboard, scan history, observed image, My Images, runtime container and image detail
- The scan status chips of the scan history, observed image, My Images, runtime container and image detail
pages share one color mapping: `Succeeded` green, `Partial` and `Pending` orange, `Failed` red, `Running` blue; any
other value, such as `NotSet` or `NotScanned`, stays neutral. The chip text is the status name.
- While a page loads its data it shows placeholder skeletons; a list without data shows an explanatory empty state. A
Expand Down Expand Up @@ -74,7 +74,7 @@ to read the state the other areas compute and to start manual scans; it computes

| Route | Page | Shows |
| --- | --- | --- |
| `/` | Dashboard | Counts of my images, manual observed images, Docker instances, runtime containers and shared base images; active update findings; active derived-runtime warnings of own images; active vulnerability findings of currently running containers with a per-severity breakdown; a configuration hint for vulnerability scanning; the 10 most recent scan runs (observed image scans, runtime container scans and vulnerability refreshes, [Scan runs](scan-engine.md#scan-runs)) |
| `/` | Dashboard | What needs attention: a headline sentence with the counts, the containers with an available update, the advisories of running containers, the own images with a base runtime warning, the last 10 scans and a strip of inventory counts; a configuration hint for vulnerability scanning (see [Dashboard](#dashboard)) |
| `/my-images` | My Images | Images discovered from the configured Docker Hub account, with latest scan status and message, number of running containers, derived-runtime hint and vulnerability status |
| `/my-images/{id}` | My Image details | One observed image: reference, latest scan, derived-runtime hint, running containers, base image chain, update findings with tag candidates, and — when there are any — vulnerability findings and its 20 most recent scan runs |
| `/observed-images` | Observed Images | The registration form and the manually registered images with latest scan, active update findings, derived-runtime hint and vulnerability status |
Expand Down Expand Up @@ -172,6 +172,51 @@ to read the state the other areas compute and to start manual scans; it computes
- Scheduled background runs do not send this signal: their results become visible when a page is opened or
navigated to again (the top bar also refreshes on every navigation). No page polls the server.

### Dashboard

The page `/` opens with the headline sentence `{updates}, {runtime warnings} and {vulnerabilities} need attention.`:
only the parts with a count above 0 appear, joined with `, ` and ` and `, and `needs` stands for a single part of count
1. The parts are colored (updates and runtime warnings orange, vulnerabilities red), the rest of the sentence is not;
with no count at all the headline reads `Everything is up to date.`. Below it the sub line
`{n} protected assets on {m} Docker instances · last activity {time}` sums manual observed images, own images and current
containers, and shows the start of the newest recorded scan run in UTC (`no scans yet` without one); a single asset or
instance uses the singular. The vulnerability configuration hint follows.

Each count is the number of the entries it counts, not of findings:

| Panel | Counts | Listed | Order | Footer |
| ----- | ------ | ------ | ----- | ------ |
| Updates available | Current containers with the update state `Update available` | 5 | Container name, instance name, container id | `{n} more in Runtime Containers`, else `Open Runtime Containers` |
| Vulnerabilities | Distinct active advisories that affect at least one current container; the severity bar counts the same advisories | 4 | Severity, CVSS score (none last), affected containers, advisory id | `{n} more in Vulnerabilities`, else `Open Vulnerabilities` |
| Own base runtime warnings | Own images (source Discovery) with a base runtime alert | 5 | Name | `{n} more in My Images` when more exist, else none |
| Last 10 scans | The ten newest scan runs | 10 | Newest first | `Open scan history` |

A panel without an entry shows no count and its empty text (`No updates available.`, `No vulnerabilities in running
containers.` without the bar, `No runtime warnings.`). The *Own base runtime warnings* panel is hidden when no Docker Hub
account is configured and no warning exists. An update row shows the container name, the instance name, and the current
tag (with the resolved version of an alias such as `latest (1.25.3)`) followed by `→` and the available tag when one is
known; it opens the container's detail page. A vulnerability row shows the affected packages (the advisory id when it
names none, which a screen reader announces with the row anyway), the severity chip and `Fixed in {versions}` or `No fix
available`, then `{n} running containers`; the severity, score, packages and fixed versions come from all active
findings of the advisory, as the Vulnerabilities page shows them, and a row opens `/vulnerabilities`. A warning row shows
the image name and the alert summary and opens the image's detail page. Texts from Docker, registries and scanners are
shown as text.

With no update, no runtime warning and no vulnerability the three panels give way to one `Nothing to do` panel with
`No updates available, no own base runtime warnings and no vulnerabilities in running containers.`, followed by *Last 10
scans*, both over the full width. Otherwise the panels stand in three columns and stack in the order Updates available,
Vulnerabilities, Own base runtime warnings, Last 10 scans on a narrow screen.

*Last 10 scans* draws one segment per run, colored by status, with the tooltip `{type} · {target} · {status} · {start}`
(the target and its separator left out when the run has none). The strip is announced as an image named by the counts
(`8 succeeded, 1 partial, 1 failed`); below it the same counts above 0 stand in the order succeeded, running, pending,
partial, failed joined with ` · `, the failed count emphasized. When one of the runs is `Failed` or `Partial` and has an
error message, a line `{target} · {message}` names the newest such run, the message as stored. Without a run the panel
shows `No scans have been recorded yet.` and no strip. The inventory strip below shows `My Images` (only with a Docker
Hub account), `Observed Images`, `Runtime Containers`, `Docker Instances` and `Base Images` (only above 0), each with its
figure and a link to its page. While the data loads, skeletons in the shape of the headline, three panels and the strip
stand in.

### Vulnerability configuration hint

The dashboard shows at most one hint about vulnerability scanning:
Expand Down Expand Up @@ -199,7 +244,7 @@ never their values.
- Text and status labels keep a contrast of at least 4.5:1 against their background in both themes; filled
buttons and MudBlazor status chips of the dark theme draw their label in the dark page color; the shared
status chips take theirs from the tone's chip color pair.
- Text is set in Inter; page titles, entity names, the figures of the dashboard's metric cards and the product name
- Text is set in Inter; page titles, entity names, the figures of the dashboard's inventory strip and the product name
are set in Space Grotesk. Both fonts and the styles are served by the application itself; the browser loads
nothing from another host for them, and until a font has loaded the text shows in a fallback font.

Expand Down Expand Up @@ -294,6 +339,8 @@ never their values.

- [0079](../decisions/0079-statuses-map-to-tones-in-one-mapping-beside-the-chip-colors-of-unconverted-pages.md) — Statuses
map to tones in one mapping, beside the chip colors of unconverted pages.
- [0080](../decisions/0080-the-dashboard-counts-the-containers-advisories-and-own-images-it-lists.md) — The dashboard
counts the containers, advisories and own images it lists.

## Not here

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 0080: The dashboard counts the containers, advisories and own images it lists

- **Status:** Accepted
- **Date:** 2026-11-29
- **Area:** Web UI
- **Source:** Issue #453
- **Supersedes:** —

## Context

The dashboard of the flat refresh (#450) lists concrete items under a headline sentence: running containers with an
available update, advisories that affect running containers, and own images with a base runtime alert. Until now it
showed counts of findings: every active update finding (of all types, also of images no container runs), the active
vulnerability findings of running containers (one advisory counted once per image version), and the active
derived-runtime findings of own images. A finding count beside a list of other things cannot agree with the list's
length or with its "N more" link. The issue left the choice to the spec.

## Options considered

1. **Count what is listed (chosen)** — the headline, the panel count and the "more" figure are one number per list;
update findings of images no container runs and findings of image versions no container runs no longer appear on
the dashboard, only on Observed Images, My Images and Vulnerabilities.
2. **Keep the finding counts and give each list a second figure for its length** — nothing disappears from the
dashboard, but every panel shows two numbers that differ for reasons the user cannot see there, and the headline
names neither.

## Decision

The dashboard's counts are the number of running containers in the update state *Update available*, the number of
distinct active advisories affecting at least one running container, and the number of own images with a base
runtime alert; its lists show the first entries of the same sets, with the values the Runtime Containers,
Vulnerabilities and My Images pages compute for them. The rules are stated in [Web UI](../areas/web-ui.md).

## Consequences

The headline can read *Everything is up to date.* while an observed image no container runs has an update finding;
the all-clear text therefore speaks of available updates, not of update findings. An advisory row shows the severity,
packages and fixed versions of all its active findings, as the Vulnerabilities page does, also when some come from
image versions no container runs. Showing findings of non-running images on the dashboard again needs a list of its
own, not a change of these counts.
1 change: 1 addition & 0 deletions docs/decisions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,5 @@ once in the [area document](../areas/README.md) of the record's area, and the re
| [0077](0077-the-dark-theme-tokens-apply-to-the-whole-document-while-the-layout-is-dark.md) | The dark theme's tokens apply to the whole document while the layout is dark | Accepted | 2026-11-28 |
| [0078](0078-mudblazor-elevation-shadows-are-switched-off-in-the-theme.md) | MudBlazor elevation shadows are switched off in the theme | Accepted | 2026-11-28 |
| [0079](0079-statuses-map-to-tones-in-one-mapping-beside-the-chip-colors-of-unconverted-pages.md) | Statuses map to tones in one mapping, beside the chip colors of unconverted pages | Accepted | 2026-11-28 |
| [0080](0080-the-dashboard-counts-the-containers-advisories-and-own-images-it-lists.md) | The dashboard counts the containers, advisories and own images it lists | Accepted | 2026-11-29 |
<!-- project:end index -->
10 changes: 10 additions & 0 deletions src/DockerUpdateGuard/Components/Common/DashboardSkeleton.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div class="dug-dashboard-skeleton">
<MudSkeleton Class="dug-dashboard-skeleton__headline" Width="60%" Height="40px" />
<div class="dug-dashboard__columns">
@for (var index = 0; index < 3; index++)
{
<MudSkeleton Class="dug-dashboard-skeleton__panel" SkeletonType="SkeletonType.Rectangle" Height="220px" Animation="Animation.Wave" />
}
</div>
<MudSkeleton Class="dug-dashboard-skeleton__strip" SkeletonType="SkeletonType.Rectangle" Height="64px" Animation="Animation.Wave" />
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace DockerUpdateGuard.Components.Common;

/// <summary>
/// Skeleton placeholder that mirrors the dashboard while data is loading
/// </summary>
public sealed partial class DashboardSkeleton;

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions src/DockerUpdateGuard/Components/Common/PageHeaderSkeleton.razor

This file was deleted.

This file was deleted.

Loading