Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link to task diagnostics in block card #1463

Merged
merged 1 commit into from
Jan 2, 2025
Merged
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
22 changes: 16 additions & 6 deletions skyvern-frontend/src/routes/workflows/workflowRun/BlockCard.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { CubeIcon } from "@radix-ui/react-icons";
import { ExternalLinkIcon } from "@radix-ui/react-icons";
import { WorkflowRunBlock } from "../types/workflowRunTypes";
import { cn } from "@/util/utils";
import { WorkflowBlockIcon } from "../editor/nodes/WorkflowBlockIcon";
import { workflowBlockTitle } from "../editor/nodes/types";
import { Button } from "@/components/ui/button";
import { Link } from "react-router-dom";

type Props = {
active: boolean;
Expand All @@ -21,18 +23,26 @@ function BlockCard({ block, onClick, active }: Props) {
)}
onClick={onClick}
>
<div className="flex justify-between">
<div className="flex items-center justify-between">
<div className="flex gap-3">
<WorkflowBlockIcon
workflowBlockType={block.block_type}
className="size-6"
/>
<span>{workflowBlockTitle[block.block_type]}</span>
</div>
<div className="flex items-center gap-1 rounded bg-slate-elevation5 px-2 py-1">
<CubeIcon className="size-4" />
<span className="text-xs">Block</span>
</div>
{block.task_id && (
<Button
title="Go to task diagnostics"
asChild
size="icon"
className="size-8 bg-slate-800 text-primary hover:bg-slate-700"
>
<Link to={`/tasks/${block.task_id}/diagnostics`}>
<ExternalLinkIcon />
</Link>
</Button>
)}
</div>
</div>
);
Expand Down
Loading