Ensure consistency in button severity between workflow and task runs (#939)
This commit is contained in:
@@ -17,7 +17,7 @@ import { Textarea } from "@/components/ui/textarea";
|
|||||||
import { toast } from "@/components/ui/use-toast";
|
import { toast } from "@/components/ui/use-toast";
|
||||||
import { useCredentialGetter } from "@/hooks/useCredentialGetter";
|
import { useCredentialGetter } from "@/hooks/useCredentialGetter";
|
||||||
import { cn } from "@/util/utils";
|
import { cn } from "@/util/utils";
|
||||||
import { CopyIcon, ReloadIcon } from "@radix-ui/react-icons";
|
import { CopyIcon, PlayIcon, ReloadIcon } from "@radix-ui/react-icons";
|
||||||
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
||||||
import { Link, NavLink, Outlet, useParams } from "react-router-dom";
|
import { Link, NavLink, Outlet, useParams } from "react-router-dom";
|
||||||
import { TaskInfo } from "./TaskInfo";
|
import { TaskInfo } from "./TaskInfo";
|
||||||
@@ -129,7 +129,7 @@ function TaskDetails() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="secondary"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (!task) {
|
if (!task) {
|
||||||
return;
|
return;
|
||||||
@@ -154,7 +154,7 @@ function TaskDetails() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<CopyIcon className="mr-2 h-4 w-4" />
|
<CopyIcon className="mr-2 h-4 w-4" />
|
||||||
Copy as cURL
|
Copy cURL
|
||||||
</Button>
|
</Button>
|
||||||
{taskIsRunningOrQueued && (
|
{taskIsRunningOrQueued && (
|
||||||
<Dialog>
|
<Dialog>
|
||||||
@@ -189,8 +189,11 @@ function TaskDetails() {
|
|||||||
</Dialog>
|
</Dialog>
|
||||||
)}
|
)}
|
||||||
{taskHasTerminalState && (
|
{taskHasTerminalState && (
|
||||||
<Button variant="secondary" asChild>
|
<Button asChild>
|
||||||
<Link to={`/create/retry/${task.task_id}`}>Rerun Task</Link>
|
<Link to={`/create/retry/${task.task_id}`}>
|
||||||
|
<PlayIcon className="mr-2 h-4 w-4" />
|
||||||
|
Rerun
|
||||||
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -286,12 +286,12 @@ function WorkflowRun() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<CopyIcon className="mr-2 h-4 w-4" />
|
<CopyIcon className="mr-2 h-4 w-4" />
|
||||||
Copy as cURL
|
Copy cURL
|
||||||
</Button>
|
</Button>
|
||||||
<Button asChild variant="secondary">
|
<Button asChild variant="secondary">
|
||||||
<Link to={`/workflows/${workflowPermanentId}/edit`}>
|
<Link to={`/workflows/${workflowPermanentId}/edit`}>
|
||||||
<Pencil2Icon className="mr-2 h-4 w-4" />
|
<Pencil2Icon className="mr-2 h-4 w-4" />
|
||||||
Edit Workflow
|
Edit
|
||||||
</Link>
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
<Button asChild>
|
<Button asChild>
|
||||||
@@ -302,7 +302,7 @@ function WorkflowRun() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<PlayIcon className="mr-2 h-4 w-4" />
|
<PlayIcon className="mr-2 h-4 w-4" />
|
||||||
Rerun Workflow
|
Rerun
|
||||||
</Link>
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user