Compare commits

..

2 Commits

3 changed files with 49 additions and 21 deletions

View File

@@ -16,6 +16,7 @@
"@fortawesome/react-fontawesome": "^3.1.0",
"@radix-ui/react-select": "^2.2.6",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-scroll-area": "^1.2.5",
"@radix-ui/react-tabs": "^1.1.3",
"axios": "^1.5.1",
"class-variance-authority": "^0.7.0",

View File

@@ -0,0 +1,24 @@
import * as React from "react";
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
import { cn } from "../../lib/utils";
const ScrollArea = React.forwardRef<
React.ElementRef<typeof ScrollAreaPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>
>(({ className, children, ...props }, ref) => (
<ScrollAreaPrimitive.Root ref={ref} className={cn("relative overflow-hidden", className)} {...props}>
<ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]">
{children}
</ScrollAreaPrimitive.Viewport>
<ScrollAreaPrimitive.Scrollbar
orientation="vertical"
className="flex touch-none select-none p-0.5 transition-colors"
>
<ScrollAreaPrimitive.Thumb className="relative flex-1 rounded-full bg-border" />
</ScrollAreaPrimitive.Scrollbar>
<ScrollAreaPrimitive.Corner />
</ScrollAreaPrimitive.Root>
));
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
export { ScrollArea };

View File

@@ -422,29 +422,32 @@ export function DeploymentDetailPage() {
Deploy Geçmişi
</CardTitle>
</CardHeader>
<CardContent className="space-y-3">
{runs.length === 0 && (
<CardContent className="max-h-[520px] overflow-y-auto pr-2">
{runs.length === 0 ? (
<div className="text-sm text-muted-foreground">Henüz deploy çalıştırılmadı.</div>
)}
{runs.map((run) => (
<div
key={run._id}
className="flex flex-wrap items-center justify-between gap-3 rounded-md border border-border bg-background px-3 py-2 text-sm"
>
<div className="flex items-center gap-3">
<JobStatusBadge status={run.status} />
<span className="text-muted-foreground">
{new Date(run.startedAt).toLocaleString()}
</span>
{run.message && (
<span className="truncate text-foreground/80">· {run.message}</span>
)}
</div>
<div className="text-muted-foreground">
{run.durationMs ? `${Math.round(run.durationMs / 1000)}s` : "-"}
</div>
) : (
<div className="space-y-3">
{runs.map((run) => (
<div
key={run._id}
className="flex flex-wrap items-center justify-between gap-3 rounded-md border border-border bg-background px-3 py-2 text-sm"
>
<div className="flex items-center gap-3">
<JobStatusBadge status={run.status} />
<span className="text-muted-foreground">
{new Date(run.startedAt).toLocaleString()}
</span>
{run.message && (
<span className="truncate text-foreground/80">· {run.message}</span>
)}
</div>
<div className="text-muted-foreground">
{run.durationMs ? `${Math.round(run.durationMs / 1000)}s` : "-"}
</div>
</div>
))}
</div>
))}
)}
</CardContent>
</Card>