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.

Hide Proxmox Replication tab when no replication signals exist

rcourtman2315d83304b1
diff --git a/frontend-modern/src/features/proxmox/__tests__/proxmoxPageModel.test.ts b/frontend-modern/src/features/proxmox/__tests__/proxmoxPageModel.test.ts
index c2f3d6c90f..ff9f8664a3 100644
--- a/frontend-modern/src/features/proxmox/__tests__/proxmoxPageModel.test.ts
+++ b/frontend-modern/src/features/proxmox/__tests__/proxmoxPageModel.test.ts
@@ -130,7 +130,7 @@ describe('proxmoxPageModel', () => {
]);
});
- it('keeps Replication available for a PVE estate without recent replication events', () => {
+ it('hides Replication for a PVE estate without replication signals', () => {
const model = buildProxmoxPageModel([
makeResource({
id: 'pve-node-1',
@@ -148,10 +148,7 @@ describe('proxmoxPageModel', () => {
}),
]);
- expect(buildVisibleProxmoxTabSpecs(model).map((tab) => tab.id)).toEqual([
- 'overview',
- 'replication',
- ]);
+ expect(buildVisibleProxmoxTabSpecs(model).map((tab) => tab.id)).toEqual(['overview']);
});
it('resolves Proxmox suite scope from canonical platform hints', () => {
diff --git a/frontend-modern/src/features/proxmox/proxmoxPageModel.ts b/frontend-modern/src/features/proxmox/proxmoxPageModel.ts
index 2050bc5d79..a67cdfc711 100644
--- a/frontend-modern/src/features/proxmox/proxmoxPageModel.ts
+++ b/frontend-modern/src/features/proxmox/proxmoxPageModel.ts
@@ -373,12 +373,11 @@ export function buildProxmoxPageModel(resources: Resource[]): ProxmoxPageModel {
export function buildVisibleProxmoxTabSpecs(model: ProxmoxPageModel): ProxmoxTabSpec[] {
const visible = new Set<ProxmoxPageTabId>(['overview']);
- const hasPveEstate = model.pveNodes.length > 0 || model.guests.length > 0;
if (model.storage.length > 0 || model.physicalDisks.length > 0) {
visible.add('storage');
}
- if (hasPveEstate || model.replicationChanges.length > 0) {
+ if (model.replicationChanges.length > 0) {
visible.add('replication');
}
if (model.resources.some(hasBackupSignal) || model.pbs.length > 0) {