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.

Prove offline Proxmox node visibility in v6

rcourtman074b04eb767b
diff --git a/docs/release-control/v6/internal/records/known-rc-issue-closure-for-ga-2026-04-21.md b/docs/release-control/v6/internal/records/known-rc-issue-closure-for-ga-2026-04-21.md
index 8bfa65ad61..a1e3cec733 100644
--- a/docs/release-control/v6/internal/records/known-rc-issue-closure-for-ga-2026-04-21.md
+++ b/docs/release-control/v6/internal/records/known-rc-issue-closure-for-ga-2026-04-21.md
@@ -66,7 +66,17 @@
- Result:
- the candidate already supports filtering the workloads slice by status (`All`, `Running`, `Degraded`, `Stopped`), so there is no missing offline-filter blocker to carry into GA.
-7. `#1436` (`Better disk i/o reads for LXC containers`)
+7. `#1433` (`[Bug]: v5.1.28 - Want All Proxmox Nodes Displayed on the DashBoard even if they are not Powered On`)
+ - Covered on the current v6 candidate by explicit proof on the v6 surfaces that own node visibility:
+ - the dashboard overview still counts the offline Proxmox node and surfaces it in `Problem Resources`
+ - the infrastructure inventory still lists the offline Proxmox node instead of dropping it when the node powers off
+ - Verification:
+ - `go test ./internal/api -run 'TestDashboardSummaryKeepsOfflineProxmoxNodeVisible'`
+ - `cd /Volumes/Development/pulse/repos/pulse/tests/integration && PULSE_E2E_SKIP_DOCKER=1 PLAYWRIGHT_BASE_URL=http://127.0.0.1:5173 npm test -- tests/65-offline-proxmox-node-visibility.spec.ts --project=chromium`
+ - Result:
+ - the current v6 candidate does not hide an offline Proxmox node from the product; it remains visible on the canonical dashboard and infrastructure surfaces even though v6 no longer uses the legacy v5 full-node dashboard layout.
+
+8. `#1436` (`Better disk i/o reads for LXC containers`)
- Fixed by merging prefetched LXC `status/current` counters into both container polling paths before rate calculation and reusing the same status snapshot for metadata enrichment.
- Verification:
- `go test ./internal/monitoring -run 'TestMergeContainerRuntimeCounters_PrefersHigherStatusCounters|TestBuildContainerFromClusterResource_UsesContainerStatusCountersForRates|TestBuildContainerFromClusterResource_PreservesProxmoxPool|TestEnrichContainerMetadata_DetectsOCIForStoppedContainer|TestMonitor_EnrichContainerMetadata_Extra'`
diff --git a/internal/api/dashboard_summary_offline_proxmox_node_test.go b/internal/api/dashboard_summary_offline_proxmox_node_test.go
new file mode 100644
index 0000000000..49bc8bd29d
--- /dev/null
+++ b/internal/api/dashboard_summary_offline_proxmox_node_test.go
@@ -0,0 +1,80 @@
+package api
+
+import (
+ "encoding/json"
+ "net/http"
+ "net/http/httptest"
+ "testing"
+ "time"
+
+ "github.com/rcourtman/pulse-go-rewrite/internal/config"
+ "github.com/rcourtman/pulse-go-rewrite/internal/models"
+ unified "github.com/rcourtman/pulse-go-rewrite/internal/unifiedresources"
+)
+
+func TestDashboardSummaryKeepsOfflineProxmoxNodeVisible(t *testing.T) {
+ now := time.Now().UTC()
+
+ h := NewResourceHandlers(&config.Config{DataPath: t.TempDir()})
+ h.SetStateProvider(resourceUnifiedSeedProvider{
+ snapshot: models.StateSnapshot{LastUpdate: now},
+ resources: []unified.Resource{
+ {
+ ID: "offline-pve",
+ Type: unified.ResourceTypeAgent,
+ Name: "PVE Offline",
+ Status: unified.StatusOffline,
+ LastSeen: now,
+ UpdatedAt: now,
+ Sources: []unified.DataSource{unified.SourceProxmox},
+ Canonical: &unified.CanonicalIdentity{
+ DisplayName: "PVE Offline",
+ Hostname: "pve-offline.lab.local",
+ PlatformID: "offline-pve",
+ },
+ Proxmox: &unified.ProxmoxData{
+ SourceID: "offline-pve",
+ NodeName: "pve-offline",
+ Instance: "homelab",
+ ConnectionHealth: "error",
+ PVEVersion: "8.3-1",
+ },
+ },
+ },
+ })
+
+ rec := httptest.NewRecorder()
+ req := httptest.NewRequest(http.MethodGet, "/api/resources/dashboard-summary", nil)
+ h.HandleDashboardSummary(rec, req)
+
+ if rec.Code != http.StatusOK {
+ t.Fatalf("status = %d, body=%s", rec.Code, rec.Body.String())
+ }
+
+ var resp DashboardOverviewSummaryResponse
+ if err := json.NewDecoder(rec.Body).Decode(&resp); err != nil {
+ t.Fatalf("decode response: %v", err)
+ }
+
+ if resp.Health.TotalResources != 1 {
+ t.Fatalf("health.totalResources = %d, want 1", resp.Health.TotalResources)
+ }
+ if resp.Infrastructure.Total != 1 {
+ t.Fatalf("infrastructure.total = %d, want 1", resp.Infrastructure.Total)
+ }
+ if resp.Infrastructure.ByStatus["offline"] != 1 {
+ t.Fatalf("infrastructure.byStatus.offline = %d, want 1", resp.Infrastructure.ByStatus["offline"])
+ }
+ if resp.Infrastructure.ByType["agent"] != 1 {
+ t.Fatalf("infrastructure.byType.agent = %d, want 1", resp.Infrastructure.ByType["agent"])
+ }
+ if len(resp.ProblemResources) != 1 {
+ t.Fatalf("problemResources len = %d, want 1", len(resp.ProblemResources))
+ }
+ if resp.ProblemResources[0].ID != "offline-pve" {
+ t.Fatalf("problemResources[0].id = %q, want offline-pve", resp.ProblemResources[0].ID)
+ }
+ if got := resp.ProblemResources[0].Problems; len(got) != 1 || got[0] != "Offline" {
+ t.Fatalf("problemResources[0].problems = %+v, want [Offline]", got)
+ }
+}
diff --git a/tests/integration/tests/65-offline-proxmox-node-visibility.spec.ts b/tests/integration/tests/65-offline-proxmox-node-visibility.spec.ts
new file mode 100644
index 0000000000..90567b3374
--- /dev/null
+++ b/tests/integration/tests/65-offline-proxmox-node-visibility.spec.ts
@@ -0,0 +1,282 @@
+import fs from 'node:fs';
+import path from 'node:path';
+import { fileURLToPath } from 'node:url';
+import { expect, test as base } from '@playwright/test';
+
+import { createAuthenticatedStorageState } from './helpers';
+
+const __dirname = path.dirname(fileURLToPath(import.meta.url));
+const ARTIFACTS_DIR = path.resolve(__dirname, '..', '..', 'tmp', 'offline-proxmox-node-visibility');
+
+type WorkerFixtures = {
+ authStorageStatePath: string;
+};
+
+const test = base.extend<{}, WorkerFixtures>({
+ storageState: async ({ authStorageStatePath }, use) => {
+ await use(authStorageStatePath);
+ },
+ authStorageStatePath: [async ({ browser }, use, workerInfo) => {
+ const storageStatePath = path.resolve(
+ __dirname,
+ '..',
+ '..',
+ 'tmp',
+ 'playwright-auth',
+ `offline-proxmox-node-${workerInfo.project.name}.json`,
+ );
+ fs.mkdirSync(path.dirname(storageStatePath), { recursive: true });
+ await createAuthenticatedStorageState(browser, storageStatePath);
+ try {
+ await use(storageStatePath);
+ } finally {
+ fs.rmSync(storageStatePath, { force: true });
+ }
+ }, { scope: 'worker' }],
+});
+
+const OFFLINE_RESOURCE = {
+ id: 'offline-pve',
+ type: 'agent',
+ name: 'pve-offline',
+ displayName: 'PVE Offline',
+ platformId: 'offline-pve',
+ platformType: 'proxmox-pve',
+ sourceType: 'api',
+ sources: ['proxmox-pve'],
+ status: 'offline',
+ lastSeen: '2026-04-21T20:00:00Z',
+ canonicalIdentity: {
+ displayName: 'PVE Offline',
+ hostname: 'pve-offline.lab.local',
+ platformId: 'offline-pve',
+ },
+ agent: {
+ hostname: 'pve-offline.lab.local',
+ platform: 'Proxmox VE',
+ uptimeSeconds: 0,
+ memory: { total: 0, used: 0, free: 0, usage: 0 },
+ disks: [],
+ networkInterfaces: [],
+ raid: [],
+ },
+ platformData: {
+ sources: ['proxmox-pve'],
+ proxmox: {
+ instance: 'homelab',
+ nodeName: 'pve-offline',
+ clusterName: 'homelab',
+ connectionHealth: 'error',
+ pveVersion: '8.3-1',
+ kernelVersion: '6.8.12-9-pve',
+ uptime: 0,
+ cpuInfo: {
+ model: 'Intel Xeon',
+ cores: 8,
+ sockets: 1,
+ mhz: '2400',
+ },
+ memory: { total: 0, used: 0, free: 0, usage: 0 },
+ disk: { total: 0, used: 0, free: 0, usage: 0 },
+ loadAverage: [],
+ linkedAgentId: '',
+ },
+ },
+} as const;
+
+const DASHBOARD_SUMMARY_RESPONSE = {
+ health: {
+ totalResources: 1,
+ byStatus: {
+ online: 0,
+ offline: 1,
+ running: 0,
+ stopped: 0,
+ degraded: 0,
+ paused: 0,
+ unknown: 0,
+ },
+ },
+ infrastructure: {
+ total: 1,
+ byStatus: {
+ online: 0,
+ offline: 1,
+ running: 0,
+ stopped: 0,
+ degraded: 0,
+ paused: 0,
+ unknown: 0,
+ },
+ byType: {
+ agent: 1,
+ },
+ topCPU: [],
+ topMemory: [],
+ },
+ workloads: {
+ total: 0,
+ running: 0,
+ stopped: 0,
+ byType: {},
+ },
+ storage: {
+ total: 0,
+ totalCapacity: 0,
+ totalUsed: 0,
+ warningCount: 0,
+ criticalCount: 0,
+ },
+ problemResources: [
+ {
+ id: 'offline-pve',
+ type: 'agent',
+ name: 'PVE Offline',
+ status: 'offline',
+ sources: ['proxmox'],
+ aiSafeSummary: '',
+ canonicalIdentity: {
+ displayName: 'PVE Offline',
+ hostname: 'pve-offline.lab.local',
+ platformId: 'offline-pve',
+ },
+ policy: {
+ sensitivity: 'internal',
+ routing: {
+ scope: 'local-first',
+ },
+ },
+ problems: ['Offline'],
+ worstValue: 200,
+ lastSeen: '2026-04-21T20:00:00Z',
+ },
+ ],
+} as const;
+
+const EMPTY_INFRASTRUCTURE_CHARTS = {
+ nodeData: {},
+ agentData: {},
+ dockerHostData: {},
+ timestamp: Date.now(),
+ stats: {
+ oldestDataTimestamp: 0,
+ range: '1h',
+ rangeSeconds: 3600,
+ pointCounts: {
+ total: 0,
+ nodes: 0,
+ agents: 0,
+ dockerHosts: 0,
+ },
+ },
+} as const;
+
+const EMPTY_STORAGE_SUMMARY_TREND = {
+ capacity: [],
+ stats: {
+ oldestDataTimestamp: 0,
+ range: '24h',
+ rangeSeconds: 86400,
+ pointCounts: {
+ total: 0,
+ storage: 0,
+ },
+ },
+} as const;
+
+const EMPTY_RECOVERY_ROLLUPS = {
+ data: [],
+ meta: {
+ page: 1,
+ limit: 500,
+ total: 0,
+ totalPages: 1,
+ },
+} as const;
+
+test.describe('Offline Proxmox node visibility', () => {
+ test.setTimeout(180_000);
+
+ test('keeps an offline Proxmox node visible on dashboard and infrastructure surfaces', async ({
+ page,
+ }, testInfo) => {
+ test.skip(testInfo.project.name.startsWith('mobile-'), 'Desktop runtime proof');
+ fs.mkdirSync(ARTIFACTS_DIR, { recursive: true });
+
+ await page.addInitScript(() => {
+ localStorage.setItem('pulse_whats_new_v2_shown', 'true');
+ });
+
+ await page.route('**/api/resources**', async (route) => {
+ const requestUrl = new URL(route.request().url());
+
+ if (requestUrl.pathname === '/api/resources/dashboard-summary') {
+ await route.fulfill({
+ status: 200,
+ contentType: 'application/json',
+ body: JSON.stringify(DASHBOARD_SUMMARY_RESPONSE),
+ });
+ return;
+ }
+
+ if (requestUrl.pathname === '/api/resources') {
+ await route.fulfill({
+ status: 200,
+ contentType: 'application/json',
+ body: JSON.stringify({
+ data: [OFFLINE_RESOURCE],
+ meta: {
+ page: 1,
+ limit: 200,
+ total: 1,
+ totalPages: 1,
+ },
+ }),
+ });
+ return;
+ }
+
+ await route.continue();
+ });
+
+ await page.route('**/api/charts/infrastructure**', async (route) => {
+ await route.fulfill({
+ status: 200,
+ contentType: 'application/json',
+ body: JSON.stringify(EMPTY_INFRASTRUCTURE_CHARTS),
+ });
+ });
+
+ await page.route('**/api/charts/storage-summary**', async (route) => {
+ await route.fulfill({
+ status: 200,
+ contentType: 'application/json',
+ body: JSON.stringify(EMPTY_STORAGE_SUMMARY_TREND),
+ });
+ });
+
+ await page.route('**/api/recovery/rollups**', async (route) => {
+ await route.fulfill({
+ status: 200,
+ contentType: 'application/json',
+ body: JSON.stringify(EMPTY_RECOVERY_ROLLUPS),
+ });
+ });
+
+ await page.goto('/dashboard', { waitUntil: 'domcontentloaded' });
+ await expect(page.getByTestId('dashboard-page')).toBeVisible();
+
+ const dashboardProblemTable = page.locator('table').filter({
+ has: page.getByText('PVE Offline', { exact: true }),
+ }).first();
+ await expect(dashboardProblemTable).toContainText('PVE Offline');
+ await expect(dashboardProblemTable).toContainText('Offline');
+
+ await page.goto('/infrastructure?source=proxmox-pve', { waitUntil: 'domcontentloaded' });
+ await expect(page.getByTestId('infrastructure-page')).toBeVisible();
+
+ const infrastructureTable = page.locator('[data-testid="infrastructure-page"] table').first();
+ await expect(infrastructureTable).toContainText('PVE Offline');
+ await expect(infrastructureTable).toContainText('Offline');
+ });
+});