Skip to content

Commit 9e795cb

Browse files
feat: add code path (#642)
1 parent 16dffc9 commit 9e795cb

File tree

2 files changed

+33
-13
lines changed

2 files changed

+33
-13
lines changed

src/components/steps/step-sheet/DetailsTab.tsx

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1+
import Github from "@/assets/icons/github.svg?react";
2+
import Pipelines from "@/assets/icons/pipeline.svg?react";
3+
import { CopyButton } from "@/components/CopyButton";
4+
import { InlineAvatar } from "@/components/InlineAvatar";
5+
import { useCodeRepository } from "@/data/code-repositories/code-repositories-detail-query";
16
import { usePipelineRun } from "@/data/pipeline-runs/pipeline-run-detail-query";
2-
import { KeyValue } from "../../KeyValue";
3-
import { Badge, Skeleton, Tag } from "@zenml-io/react-component-library";
4-
import { DisplayDate } from "../../DisplayDate";
5-
import { CollapsibleCard } from "../../CollapsibleCard";
6-
import { ExecutionStatusIcon, getExecutionStatusTagColor } from "../../ExecutionStatus";
77
import { useStepDetail } from "@/data/steps/step-detail-query";
8-
import Pipelines from "@/assets/icons/pipeline.svg?react";
98
import { calculateTimeDifference } from "@/lib/dates";
10-
import { ErrorFallback } from "../../Error";
11-
import Github from "@/assets/icons/github.svg?react";
12-
import { CopyButton } from "@/components/CopyButton";
139
import { transformToEllipsis } from "@/lib/strings";
14-
import { useCodeRepository } from "@/data/code-repositories/code-repositories-detail-query";
15-
import { InlineAvatar } from "@/components/InlineAvatar";
16-
import { Link } from "react-router-dom";
1710
import { routes } from "@/router/routes";
11+
import { Badge, Skeleton, Tag } from "@zenml-io/react-component-library";
12+
import { Link } from "react-router-dom";
13+
import { Codesnippet } from "../../CodeSnippet";
14+
import { CollapsibleCard } from "../../CollapsibleCard";
15+
import { DisplayDate } from "../../DisplayDate";
16+
import { ErrorFallback } from "../../Error";
17+
import { ExecutionStatusIcon, getExecutionStatusTagColor } from "../../ExecutionStatus";
18+
import { Key, KeyValue, Value } from "../../KeyValue";
1819

1920
type Props = {
2021
stepId: string;
@@ -211,6 +212,14 @@ export function StepDetailsTab({ stepId, runId }: Props) {
211212
}
212213
/>
213214
)}
215+
<Key className={pipelineRunData.metadata?.code_path ? "col-span-3" : ""}>Code Path</Key>
216+
<Value className={pipelineRunData.metadata?.code_path ? "col-span-3 h-auto" : ""}>
217+
{pipelineRunData.metadata?.code_path ? (
218+
<Codesnippet code={pipelineRunData.metadata.code_path} />
219+
) : (
220+
"Not available"
221+
)}
222+
</Value>
214223
</>
215224
) : (
216225
<Skeleton className="h-6 w-full" />

src/types/core.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6186,6 +6186,8 @@ export type components = {
61866186
schedule?: string | null;
61876187
/** The code reference associated with the deployment. */
61886188
code_reference?: components["schemas"]["CodeReferenceRequest"] | null;
6189+
/** Optional path where the code is stored in the artifact store. */
6190+
code_path?: string | null;
61896191
/**
61906192
* Template
61916193
* @description Template used for the deployment.
@@ -6265,6 +6267,8 @@ export type components = {
62656267
pipeline_version_hash?: string | null;
62666268
/** The pipeline spec of the deployment. */
62676269
pipeline_spec?: components["schemas"]["PipelineSpec-Output"] | null;
6270+
/** Optional path where the code is stored in the artifact store. */
6271+
code_path?: string | null;
62686272
/** The pipeline associated with the deployment. */
62696273
pipeline?: components["schemas"]["PipelineResponse"] | null;
62706274
/** The stack associated with the deployment. */
@@ -6365,6 +6369,8 @@ export type components = {
63656369
PipelineResponseMetadata: {
63666370
/** The workspace of this resource. */
63676371
workspace: components["schemas"]["WorkspaceResponse"];
6372+
/** The description of the pipeline. */
6373+
description?: string | null;
63686374
};
63696375
/**
63706376
* PipelineResponseResources
@@ -6527,6 +6533,8 @@ export type components = {
65276533
};
65286534
/** The orchestrator run ID. */
65296535
orchestrator_run_id?: string | null;
6536+
/** Optional path where the code is stored in the artifact store. */
6537+
code_path?: string | null;
65306538
/**
65316539
* Template Id
65326540
* @description Template used for the pipeline run.
@@ -8064,6 +8072,7 @@ export type components = {
80648072
| "internal"
80658073
| "distribution_package"
80668074
| "code_repository"
8075+
| "notebook"
80678076
| "unknown";
80688077
/**
80698078
* StackComponentType
@@ -8093,7 +8102,9 @@ export type components = {
80938102
/** A textual description for the cloud provider console URL. */
80948103
deployment_url_text: string;
80958104
/** Configuration for the stack deployment that the user must manually configure into the cloud provider console. */
8096-
configuration: string | null;
8105+
configuration?: string | null;
8106+
/** Instructions for deploying the stack. */
8107+
instructions?: string | null;
80978108
};
80988109
/**
80998110
* StackDeploymentInfo

0 commit comments

Comments
 (0)