Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Give a Docker network row one dot for what is on it

rcourtmanbb627673c130
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index ed42532121..7f41e00a69 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -5557,7 +5557,10 @@ amber in all three. That mapper also owns the restart verdict
(`dockerContainerRestartAttentionLabel`): a running container past five
restarts is warning in its dot, the sort, the phone State words, the Restarts
column and the drawer's lifted Restarts row alike, never a green dot beside an
-amber or red count. "Worth checking" renders through
+amber or red count. Docker State words read in their row dot's colour through
+`dockerStateTextToneClass` (`DockerNativeTableShared.tsx`) with no second dot;
+the Docker Networks row's single name-cell dot carries its attached-container
+verdict the same way. "Worth checking" renders through
`DrawerExceptionList.tsx` directly under the alerts line, above the charts:
one compact label/value line per lifted row with the shared
`detailValueToneClass` tone, not a card per section. A guest memory reading
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index d465fad8f5..f64659e685 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -1871,9 +1871,15 @@ container inventory table. Its Attention filter is the rows' verdict (the
`mapDockerContainerStatus` dot), while Running and Other are Docker's run
state, so an unhealthy or crash-looping container that still runs matches
Running and Attention both; the sections stay one per row, Attention first.
-The network's State counts every Attention row ("3 need attention", the dot
-taking the worst). A phone row leaves Subnets and Driver, header and cell
-together, to the expansion's Network details.
+The network's State counts every Attention row ("3 need attention"). A
+network has no health of its own (the adapter reports it online unless its
+host is lost), so its row carries one dot, in the name cell: the network's
+own status when that is worse, otherwise amber while anything attached needs
+attention (degraded, not down; each container keeps its own severity in the
+expansion), otherwise green. The State words take that tone without a second
+dot, and the table's Healthy / Degraded / Offline chips filter by the same
+verdict. A phone row leaves Subnets and Driver, header and cell together, to
+the expansion's Network details.
2. `frontend-modern/src/components/Infrastructure/resourceDetailMappers.ts` shared with `performance-and-scalability`: resource detail mappers are both a canonical unified-resource consumer surface and a fleet-scale performance hot-path boundary.
12. `frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx` shared with `storage-recovery`: Proxmox backup server table rows are both a storage/recovery backup-health surface and a unified-resource platform-table consumer boundary.
diff --git a/frontend-modern/browser-tests/proxmox-docker-rows.cjs b/frontend-modern/browser-tests/proxmox-docker-rows.cjs
index f877bec061..0ea33858e8 100644
--- a/frontend-modern/browser-tests/proxmox-docker-rows.cjs
+++ b/frontend-modern/browser-tests/proxmox-docker-rows.cjs
@@ -535,6 +535,15 @@ const observations = (mode) => [
const state = networkRow.getByText('3 need attention', { exact: true });
const fit = await state.evaluate((e) => ({ scroll: e.scrollWidth, client: e.clientWidth }));
assert.ok(fit.scroll <= fit.client, JSON.stringify(fit));
+ // One dot per row, in the name cell: amber, the network degraded by what
+ // is on it (old: a green "Online" dot beside a red one). Each container
+ // keeps its own severity in the expansion.
+ const dots = networkRow.locator('[title="3 need attention"]');
+ assert.equal(await dots.count(), 2); // the dot and the State words' hover
+ const dotColour = await dots.first().evaluate((el) => getComputedStyle(el).backgroundColor);
+ const [r, g, b] = dotColour.match(/\d+/g).map(Number);
+ assert.ok(r > 200 && g > 120 && b < 80, dotColour);
+ assert.equal(await networkRow.locator('[title="Online"]').count(), 0);
await networkRow.click();
const detail = table.locator('[data-docker-network-detail-row="edge-net"]');
await detail.getByText('edge-loop', { exact: true }).waitFor();
diff --git a/frontend-modern/browser-verification/a083fe5419d72ee4.json b/frontend-modern/browser-verification/a083fe5419d72ee4.json
new file mode 100644
index 0000000000..fbbf4498c6
--- /dev/null
+++ b/frontend-modern/browser-verification/a083fe5419d72ee4.json
@@ -0,0 +1,40 @@
+{
+ "version": 1,
+ "base_sha": "ac18c1d9583f0a5a69e9cd6c516834ec44cd120b",
+ "verified_at": "2026-10-14T16:20:08Z",
+ "result": "passed",
+ "changed_paths": [
+ "frontend-modern/src/features/docker/DockerContainersTable.tsx",
+ "frontend-modern/src/features/docker/DockerNativeTableShared.tsx",
+ "frontend-modern/src/features/docker/DockerNetworksTable.tsx"
+ ],
+ "content_sha256": {
+ "frontend-modern/src/features/docker/DockerContainersTable.tsx": "ea2c5b255fa32e6c2a6717f428fe62844f0ec226dba99fa755e2806b4427b931",
+ "frontend-modern/src/features/docker/DockerNativeTableShared.tsx": "c6344a728276fa3220b1e3a2fb1863718c916a67d8e31fcf60af0de80be14cd2",
+ "frontend-modern/src/features/docker/DockerNetworksTable.tsx": "ae619e365009d5164978fc3abfe663b1b3ca5d717711820cbe0635756a2844db"
+ },
+ "routes": [
+ "browser-tests/proxmox-docker-rows.html Networks and Containers views (production DockerNetworksTable and DockerContainersTable over REST-mapped rows, Chromium and WebKit via Playwright 1.56.1 on pulse-dev)"
+ ],
+ "viewports": [
+ {
+ "width": 1440,
+ "height": 900
+ },
+ {
+ "width": 390,
+ "height": 844
+ }
+ ],
+ "states": [
+ "network with an unhealthy container on it: one amber name dot titled \"3 need attention\" (old: green \"Online\" dot plus a red State dot)",
+ "State words \"3 need attention\" amber, no second dot",
+ "attached containers keep their own red and amber dots in the expansion",
+ "containers table State words and Restarts tones unchanged after the shared tone helper",
+ "reviewed by Sol from desktop screenshots"
+ ],
+ "interactions": [
+ "network row expand",
+ "attached-container status chips"
+ ]
+}
diff --git a/frontend-modern/src/features/docker/DockerContainersTable.tsx b/frontend-modern/src/features/docker/DockerContainersTable.tsx
index 601d26a2b5..3e6a38695a 100644
--- a/frontend-modern/src/features/docker/DockerContainersTable.tsx
+++ b/frontend-modern/src/features/docker/DockerContainersTable.tsx
@@ -66,6 +66,7 @@ import {
dockerHostName,
dockerJoinValues,
dockerResourceName,
+ dockerStateTextToneClass,
dockerTextValue,
type DockerNativeTableProps,
} from './DockerNativeTableShared';
@@ -97,7 +98,6 @@ import { DockerImageReferenceText } from './DockerImageReferenceText';
import {
getDockerContainerStatePresentation,
getDockerContainerUptimeSeconds,
- type DockerContainerStateTone,
} from './dockerContainerStatePresentation';
type DockerNetwork = NonNullable<NonNullable<Resource['docker']>['networks']>[number];
@@ -183,15 +183,6 @@ const isContainerRunning = (resource: Resource): boolean =>
(asTrimmedString(resource.docker?.containerState || resource.status) ?? '').toLowerCase() ===
'running';
-// Problems take the row's danger or warning tone, as the TrueNAS State cells
-// do; a stopped container reads muted and a running one plainly.
-const DOCKER_CONTAINER_STATE_TONE_CLASS: Record<DockerContainerStateTone | 'none', string> = {
- danger: 'font-medium text-red-600 dark:text-red-300',
- warning: 'font-medium text-amber-700 dark:text-amber-300',
- muted: 'text-muted',
- none: '',
-};
-
const updateStatusLabel = (resource: Resource): string => {
const update = resource.docker?.updateStatus;
if (!update) return '—';
@@ -505,7 +496,7 @@ export const DockerContainersTable: Component<DockerContainersTableProps> = (pro
const state = () => stateFor(resource);
const stateWords = () => (
<span
- class={`block max-w-full truncate ${DOCKER_CONTAINER_STATE_TONE_CLASS[state().tone ?? 'none']}`}
+ class={`block max-w-full truncate ${dockerStateTextToneClass(state().tone)}`}
title={state().title}
data-docker-container-state={state().tone ?? 'ok'}
>
@@ -629,7 +620,7 @@ export const DockerContainersTable: Component<DockerContainersTableProps> = (pro
<span
class={`tabular-nums ${
dockerContainerRestartAttentionLabel(resource)
- ? DOCKER_CONTAINER_STATE_TONE_CLASS.warning
+ ? dockerStateTextToneClass('warning')
: ''
}`}
title={dockerContainerRestartCountTitle(resource.docker?.restartCount ?? 0)}
diff --git a/frontend-modern/src/features/docker/DockerNativeTableShared.tsx b/frontend-modern/src/features/docker/DockerNativeTableShared.tsx
index 8ff38b23e7..3488dd0a78 100644
--- a/frontend-modern/src/features/docker/DockerNativeTableShared.tsx
+++ b/frontend-modern/src/features/docker/DockerNativeTableShared.tsx
@@ -2,7 +2,11 @@ import { For, Show, type Component, type JSX } from 'solid-js';
import { StatusDot } from '@/components/shared/StatusDot';
import { TableCell } from '@/components/shared/Table';
import { ResourceNameWithWebInterfaceLink } from '@/components/shared/WebInterfaceLink';
-import { getSimpleStatusIndicator, type StatusIndicator } from '@/utils/status';
+import {
+ getSimpleStatusIndicator,
+ type StatusIndicator,
+ type StatusIndicatorVariant,
+} from '@/utils/status';
import { asTrimmedString } from '@/utils/stringUtils';
import {
PlatformTableNumberValue,
@@ -63,6 +67,15 @@ export const dockerHostName = (resource: Resource): string =>
export const dockerResourceName = (resource: Resource): string =>
asTrimmedString(resource.name) || asTrimmedString(resource.displayName) || resource.id;
+// State words read in their row dot's colour, without a second dot: red for
+// a problem, amber for a warning, muted for stopped or unused.
+export const dockerStateTextToneClass = (variant: StatusIndicatorVariant | null): string => {
+ if (variant === 'danger') return 'font-medium text-red-600 dark:text-red-300';
+ if (variant === 'warning') return 'font-medium text-amber-700 dark:text-amber-300';
+ if (variant === 'muted') return 'text-muted';
+ return '';
+};
+
export const DockerResourceNameCell: Component<{
resource: Resource;
// When set, the row pulls its StatusDot variant and tooltip text from a
diff --git a/frontend-modern/src/features/docker/DockerNetworksTable.tsx b/frontend-modern/src/features/docker/DockerNetworksTable.tsx
index bb065e167c..66ec7a38f5 100644
--- a/frontend-modern/src/features/docker/DockerNetworksTable.tsx
+++ b/frontend-modern/src/features/docker/DockerNetworksTable.tsx
@@ -23,12 +23,13 @@ import {
createPlatformResourceDetailState,
getPlatformResourceDetailRowClass,
} from '@/features/platformPage/PlatformResourceDetailTableRow';
-import type { StatusIndicator } from '@/utils/status';
+import { getSimpleStatusIndicator, type StatusIndicator } from '@/utils/status';
import {
DockerResourceNameCell,
dockerHostName,
dockerJoinValues,
dockerResourceName,
+ dockerStateTextToneClass,
dockerTextValue,
type DockerNativeTableProps,
} from './DockerNativeTableShared';
@@ -36,7 +37,6 @@ import {
buildDockerNetworkAttachmentRows,
dockerContainerRunState,
dockerResourceSearchHaystack,
- filterDockerResources,
type DockerNetworkAttachmentRow,
type DockerResourceStatusFilter,
} from './dockerPageModel';
@@ -181,11 +181,13 @@ const attachmentSummary = (rows: readonly DockerNetworkAttachmentRow[]): string
const attachmentAttention = (rows: readonly DockerNetworkAttachmentRow[]): StatusIndicator => {
if (rows.length === 0) return { variant: 'muted', label: 'Unused' };
- // Counts every row the Attention filter holds; the dot takes the worst.
+ // Counts every row the Attention filter holds. The network itself is
+ // degraded, not down, while something on it needs a look, so this reads
+ // amber; each container's own dot in the expansion keeps its severity.
const attention = rows.filter((row) => attachmentGroupKey(row) === 'attention');
if (attention.length > 0) {
return {
- variant: attention.some((row) => row.status.variant === 'danger') ? 'danger' : 'warning',
+ variant: 'warning',
label: `${attention.length} ${attention.length === 1 ? 'needs' : 'need'} attention`,
};
}
@@ -196,6 +198,33 @@ const attachmentAttention = (rows: readonly DockerNetworkAttachmentRow[]): Statu
return { variant: 'muted', label: attachmentCountLabel(rows.length) };
};
+const NETWORK_DOT_RANK: Record<StatusIndicator['variant'], number> = {
+ danger: 0,
+ warning: 1,
+ info: 2,
+ muted: 3,
+ success: 4,
+};
+
+// A network has no health of its own: Docker reports it or the host is lost.
+// Its row dot says whether anything on it needs a look, unless the network's
+// own status is worse (its host stopped reporting). The health filter reads
+// the same verdict, so an amber row sits under Degraded, never Healthy.
+const networkRowIndicator = (resource: Resource, attention: StatusIndicator): StatusIndicator => {
+ const own = getSimpleStatusIndicator(resource.status);
+ const attachedProblem = attention.variant === 'danger' || attention.variant === 'warning';
+ return attachedProblem && NETWORK_DOT_RANK[attention.variant] < NETWORK_DOT_RANK[own.variant]
+ ? attention
+ : own;
+};
+
+const networkRowHealth = (indicator: StatusIndicator): DockerResourceStatusFilter | 'unknown' => {
+ if (indicator.variant === 'success') return 'online';
+ if (indicator.variant === 'warning') return 'degraded';
+ if (indicator.variant === 'danger') return 'offline';
+ return 'unknown';
+};
+
const networkDetailRows = (resource: Resource) => [
['Driver', dockerTextValue(resource.docker?.driver)],
['Scope', dockerTextValue(resource.docker?.scope)],
@@ -416,7 +445,11 @@ export const DockerNetworksTable: Component<DockerNetworksTableProps> = (props)
status: DockerResourceStatusFilter,
): Resource[] => {
const needle = search.trim().toLowerCase();
- return filterDockerResources(resources, '', status).filter((resource) => {
+ return resources.filter((resource) => {
+ if (status !== 'all') {
+ const attention = attachmentAttention(networkAttachments(resource));
+ if (networkRowHealth(networkRowIndicator(resource, attention)) !== status) return false;
+ }
if (!needle) return true;
if (dockerResourceSearchHaystack(resource).includes(needle)) return true;
return networkAttachments(resource).some((row) => row.searchText.includes(needle));
@@ -544,6 +577,7 @@ export const DockerNetworksTable: Component<DockerNetworksTableProps> = (props)
>
<DockerResourceNameCell
resource={resource}
+ indicator={networkRowIndicator(resource, attention())}
detailToggle={
<PlatformResourceDetailToggleButton
expanded={isExpanded()}
@@ -566,16 +600,13 @@ export const DockerNetworksTable: Component<DockerNetworksTableProps> = (props)
<TableCell
class={`${getPlatformTableCellClassForKind('text')} text-base-content`}
>
- <span class="inline-flex max-w-full items-center gap-1.5 truncate">
- <StatusDot
- size="sm"
- variant={attention().variant}
- title={attention().label}
- ariaHidden
- />
- <span class="truncate" title={attention().label}>
- {attention().label}
- </span>
+ <span
+ class={`block max-w-full truncate ${dockerStateTextToneClass(
+ attention().variant,
+ )}`}
+ title={attention().label}
+ >
+ {attention().label}
</span>
</TableCell>
<Show when={showSubnet()}>
diff --git a/frontend-modern/src/features/docker/__tests__/DockerNativeTables.test.tsx b/frontend-modern/src/features/docker/__tests__/DockerNativeTables.test.tsx
index d7c84a24bb..1b1b975be5 100644
--- a/frontend-modern/src/features/docker/__tests__/DockerNativeTables.test.tsx
+++ b/frontend-modern/src/features/docker/__tests__/DockerNativeTables.test.tsx
@@ -1779,6 +1779,18 @@ describe('Docker native tables', () => {
// The network's state counts every container the Attention filter holds,
// the restarting warning as well as the unhealthy one.
expect(screen.getAllByText('2 need attention').length).toBeGreaterThan(0);
+ // One dot per row: the name's dot carries that verdict, not the network's
+ // always-online status, and the State words have no second dot.
+ const networkCells = document
+ .querySelector('[data-docker-network-row="network-dense"]')!
+ .querySelectorAll('td');
+ expect(networkCells[0].querySelector('[title="2 need attention"]')).not.toBeNull();
+ expect(networkCells[0].querySelector('[title="Online"]')).toBeNull();
+ expect(networkCells[2].querySelectorAll('[title]')).toHaveLength(1);
+ // The health filter reads the same verdict: degraded, not healthy, and not
+ // offline, since the network itself is up.
+ expect(screen.getByRole('button', { name: /^Degraded, 1$/ })).toBeInTheDocument();
+ expect(screen.queryByRole('button', { name: /^Healthy, 1$/ })).toBeNull();
fireEvent.click(document.querySelector('[data-docker-network-row="network-dense"]')!);