chore: small improvements

This commit is contained in:
Nicolas Meienberger
2025-11-10 21:03:37 +01:00
parent bf33b15b3e
commit d31fa8d464
3 changed files with 2 additions and 16 deletions

View File

@@ -30,7 +30,7 @@ export const RepositoryInfoTabContent = ({ repository }: Props) => {
</div> </div>
<div> <div>
<div className="text-sm font-medium text-muted-foreground">Created At</div> <div className="text-sm font-medium text-muted-foreground">Created At</div>
<p className="mt-1 text-sm">{new Date(repository.createdAt).toLocaleString()}</p> <p className="mt-1 text-sm">{new Date(repository.createdAt * 1000).toLocaleString()}</p>
</div> </div>
<div> <div>
<div className="text-sm font-medium text-muted-foreground">Last Checked</div> <div className="text-sm font-medium text-muted-foreground">Last Checked</div>

View File

@@ -2,7 +2,6 @@ import { useQuery } from "@tanstack/react-query";
import { Database } from "lucide-react"; import { Database } from "lucide-react";
import { useState } from "react"; import { useState } from "react";
import { listSnapshotsOptions } from "~/api-client/@tanstack/react-query.gen"; import { listSnapshotsOptions } from "~/api-client/@tanstack/react-query.gen";
import { ByteSize } from "~/components/bytes-size";
import { SnapshotsTable } from "~/components/snapshots-table"; import { SnapshotsTable } from "~/components/snapshots-table";
import { Button } from "~/components/ui/button"; import { Button } from "~/components/ui/button";
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "~/components/ui/card"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "~/components/ui/card";
@@ -33,7 +32,7 @@ export const RepositorySnapshotsTabContent = ({ repository }: Props) => {
); );
}); });
const hasNoFilteredSnapshots = !filteredSnapshots?.length && !data.length; const hasNoFilteredSnapshots = !filteredSnapshots?.length;
if (repository.status === "error") { if (repository.status === "error") {
return ( return (
@@ -143,18 +142,6 @@ export const RepositorySnapshotsTabContent = ({ repository }: Props) => {
? "No snapshots match filters." ? "No snapshots match filters."
: `Showing ${filteredSnapshots.length} of ${data.length}`} : `Showing ${filteredSnapshots.length} of ${data.length}`}
</span> </span>
{!hasNoFilteredSnapshots && (
<span>
Total size:&nbsp;
<span className="text-strong-accent font-medium">
<ByteSize
bytes={filteredSnapshots.reduce((sum, s) => sum + s.size, 0)}
base={1024}
maximumFractionDigits={1}
/>
</span>
</span>
)}
</div> </div>
</Card> </Card>
); );

View File

@@ -99,7 +99,6 @@ export type AppType = typeof app;
process.on("SIGTERM", async () => { process.on("SIGTERM", async () => {
logger.info("SIGTERM received, starting graceful shutdown..."); logger.info("SIGTERM received, starting graceful shutdown...");
await shutdown(); await shutdown();
process.exit(0); process.exit(0);
}); });