Skip to content
Open
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
19 changes: 18 additions & 1 deletion app/client/components/snapshots-table.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from "react";
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { Calendar, Clock, Database, HardDrive, Tag, Trash2, X } from "lucide-react";
import { Calendar, Clock, Database, FolderOpen, HardDrive, Monitor, Tag, Trash2, X } from "lucide-react";
import { toast } from "sonner";
import { ByteSize } from "~/client/components/bytes-size";
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "~/client/components/ui/table";
Expand Down Expand Up @@ -145,6 +145,7 @@ export const SnapshotsTable = ({ snapshots, repositoryId, backups, listSnapshots
</TableHead>
<TableHead className="uppercase">Snapshot ID</TableHead>
<TableHead className="uppercase">Schedule</TableHead>
<TableHead className="uppercase">Source</TableHead>
<TableHead className="uppercase">Date & Time</TableHead>
<TableHead className="uppercase">Size</TableHead>
<TableHead className="uppercase hidden md:table-cell text-right">Duration</TableHead>
Expand Down Expand Up @@ -198,6 +199,22 @@ export const SnapshotsTable = ({ snapshots, repositoryId, backups, listSnapshots
</span>
</div>
</TableCell>
<TableCell>
<div className="flex flex-col gap-2">
{snapshot.hostname && (
<div className="flex items-center gap-2">
<Monitor className="h-4 w-4 text-muted-foreground" />
<span className="text-sm">{snapshot.hostname ?? "-"}</span>
</div>
)}
{snapshot.paths.map((path) => (
<div key={path} className="flex items-center gap-2 text-muted-foreground min-w-0">
<FolderOpen className="h-3 w-3 text-muted-foreground" />
<span className="text-sm font-mono truncate max-w-sm" title={path}>{path}</span>
</div>
))}
</div>
</TableCell>
<TableCell>
<div className="flex items-center gap-2">
<Calendar className="h-4 w-4 text-muted-foreground" />
Expand Down
3 changes: 2 additions & 1 deletion app/client/modules/repositories/tabs/snapshots.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export const RepositorySnapshotsTabContent = ({ repository, initialSnapshots, in
return (
snapshot.short_id.toLowerCase().includes(searchLower) ||
snapshot.paths.some((path) => path.toLowerCase().includes(searchLower)) ||
snapshot.hostname?.toLowerCase().includes(searchLower) ||
backup?.name?.toLowerCase().includes(searchLower) ||
backup?.volume?.name?.toLowerCase().includes(searchLower)
);
Expand Down Expand Up @@ -161,7 +162,7 @@ export const RepositorySnapshotsTabContent = ({ repository, initialSnapshots, in
<Table className="border-t">
<TableBody>
<TableRow>
<TableCell colSpan={5} className="text-center py-12">
<TableCell colSpan={6} className="text-center py-12">
<div className="flex flex-col items-center gap-3">
<p className="text-muted-foreground">No snapshots match your search.</p>
<Button onClick={() => setSearchQuery("")} variant="outline" size="sm">
Expand Down
1 change: 1 addition & 0 deletions app/server/modules/repositories/repositories.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export const repositoriesController = new Hono()
short_id: snapshot.short_id,
duration,
paths: snapshot.paths,
hostname: snapshot.hostname,
tags: snapshot.tags ?? [],
size: summary?.total_bytes_processed ?? 0,
time: new Date(snapshot.time).getTime(),
Expand Down
Loading