-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UI v2] feat: Updates deployment details page to have associated work…
… pools and work queues links
- Loading branch information
1 parent
ed6cc9f
commit 241ddab
Showing
6 changed files
with
92 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Icon } from "@/components/ui/icons"; | ||
import { Link } from "@tanstack/react-router"; | ||
|
||
type WorkPoolLinkProps = { | ||
workPoolName: string; | ||
}; | ||
|
||
export const WorkPoolLink = ({ workPoolName }: WorkPoolLinkProps) => { | ||
return ( | ||
<div className="flex items-center gap-1 text-xs"> | ||
Work Pool | ||
<Link | ||
to="/work-pools/work-pool/$workPoolName" | ||
params={{ workPoolName }} | ||
className="flex items-center gap-1" | ||
> | ||
<Icon id="Cpu" className="size-4" /> | ||
{workPoolName} | ||
</Link> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { buildWorkQueueDetailsQuery } from "@/api/work-queues"; | ||
import { Icon } from "@/components/ui/icons"; | ||
import { StatusIcon } from "@/components/ui/status-badge"; | ||
import { useQuery } from "@tanstack/react-query"; | ||
import { Link } from "@tanstack/react-router"; | ||
|
||
type WorkQueueLinkProps = { | ||
workPoolName: string; | ||
workQueueName: string; | ||
}; | ||
|
||
export const WorkQueueLink = ({ | ||
workPoolName, | ||
workQueueName, | ||
}: WorkQueueLinkProps) => { | ||
const { data: workQueue } = useQuery( | ||
buildWorkQueueDetailsQuery(workPoolName, workQueueName), | ||
); | ||
|
||
if (workQueue) { | ||
return ( | ||
<div className="flex items-center gap-1 text-xs"> | ||
Work Queue | ||
<Link | ||
to="/work-pools/work-pool/$workPoolName/queue/$workQueueName" | ||
params={{ workPoolName, workQueueName }} | ||
className="flex items-center gap-1" | ||
> | ||
<Icon id="Cpu" className="size-4" /> | ||
{workQueueName} | ||
</Link> | ||
{workQueue.status && <StatusIcon status={workQueue.status} />} | ||
</div> | ||
); | ||
} | ||
|
||
return null; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters