File tree Expand file tree Collapse file tree 3 files changed +740
-48
lines changed
components/runs/detail-tabs/Overview Expand file tree Collapse file tree 3 files changed +740
-48
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import {
2727} from "@zenml-io/react-component-library" ;
2828import { useEffect , useState } from "react" ;
2929import { useNavigate , useSearchParams } from "react-router-dom" ;
30+ import { DeploymentTag } from "./deployment-tag" ;
3031
3132type Props = {
3233 runId : string ;
@@ -57,6 +58,7 @@ export function Details({ runId }: Props) {
5758 const executionMode = data . metadata ?. config . execution_mode ;
5859
5960 const sourceSnapshot = data . resources ?. source_snapshot ;
61+ const deploymentId = data . metadata ?. trigger_info ?. deployment_id ;
6062 const schedule = data . resources ?. schedule ;
6163
6264 return (
@@ -128,6 +130,11 @@ export function Details({ runId }: Props) {
128130 )
129131 }
130132 />
133+
134+ < KeyValue
135+ label = "Deployment"
136+ value = { deploymentId ? < DeploymentTag deploymentId = { deploymentId } /> : "Not available" }
137+ />
131138 < Key > Execution Mode</ Key >
132139 < Value > { executionMode ? snakeCaseToTitleCase ( executionMode ) : "Not available" } </ Value >
133140 < Key >
Original file line number Diff line number Diff line change 1+ import { DeploymentStatusTag } from "@/components/deployments/deployment-status-tag" ;
2+ import { deploymentQueries } from "@/data/deployments" ;
3+ import { routes } from "@/router/routes" ;
4+ import { useQuery } from "@tanstack/react-query" ;
5+ import { Skeleton } from "@zenml-io/react-component-library" ;
6+ import { Link } from "react-router-dom" ;
7+
8+ type Props = {
9+ deploymentId : string ;
10+ } ;
11+
12+ export function DeploymentTag ( { deploymentId } : Props ) {
13+ const deploymentQuery = useQuery ( deploymentQueries . detail ( deploymentId ) ) ;
14+
15+ if ( deploymentQuery . isPending ) return < Skeleton className = "h-6 w-[100px]" /> ;
16+ if ( deploymentQuery . isError ) return "Not available" ;
17+
18+ const deployment = deploymentQuery . data ;
19+
20+ return (
21+ < Link to = { routes . projects . deployments . detail . overview ( deploymentId ) } >
22+ < DeploymentStatusTag size = "sm" status = { deployment . body ?. status ?? undefined } />
23+ </ Link >
24+ ) ;
25+ }
You can’t perform that action at this time.
0 commit comments