From 542842d0128f78c516c21113b991a7a59e510bf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Tr=C3=A1vn=C3=ADk?= Date: Mon, 22 Dec 2025 14:17:19 +0100 Subject: [PATCH] feat: enhance snapshot filtering by including backup schedule names and volumes --- app/client/modules/repositories/tabs/snapshots.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/client/modules/repositories/tabs/snapshots.tsx b/app/client/modules/repositories/tabs/snapshots.tsx index 6632c853..7b841b45 100644 --- a/app/client/modules/repositories/tabs/snapshots.tsx +++ b/app/client/modules/repositories/tabs/snapshots.tsx @@ -28,9 +28,16 @@ export const RepositorySnapshotsTabContent = ({ repository }: Props) => { const filteredSnapshots = data.filter((snapshot: Snapshot) => { if (!searchQuery) return true; const searchLower = searchQuery.toLowerCase(); + + // Find the backup schedule for this snapshot + const backupIds = snapshot.tags.map(Number).filter((tag) => !Number.isNaN(tag)); + const backup = schedules.data?.find((b) => backupIds.includes(b.id)); + return ( snapshot.short_id.toLowerCase().includes(searchLower) || - snapshot.paths.some((path) => path.toLowerCase().includes(searchLower)) + snapshot.paths.some((path) => path.toLowerCase().includes(searchLower)) || + backup?.name.toLowerCase().includes(searchLower) || + backup?.volume.name.toLowerCase().includes(searchLower) ); });