-
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
5ef0198
commit b3bcc27
Showing
6 changed files
with
93 additions
and
6 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
24 changes: 24 additions & 0 deletions
24
ui-v2/src/components/deployments/deployment-work-pool-link.tsx
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,24 @@ | ||
import { Icon } from "@/components/ui/icons"; | ||
import { Link } from "@tanstack/react-router"; | ||
|
||
type DeploymentWorkPoolLinkProps = { | ||
workPoolName: string; | ||
}; | ||
|
||
export const DeploymentWorkPoolLink = ({ | ||
workPoolName, | ||
}: DeploymentWorkPoolLinkProps) => { | ||
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> | ||
); | ||
}; |
38 changes: 38 additions & 0 deletions
38
ui-v2/src/components/deployments/deployment-work-queue-link.tsx
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 DeploymentWorkQueueLinkProps = { | ||
workPoolName: string; | ||
workQueueName: string; | ||
}; | ||
|
||
export const DeploymentWorkQueueLink = ({ | ||
workPoolName, | ||
workQueueName, | ||
}: DeploymentWorkQueueLinkProps) => { | ||
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
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