Skip to content

Commit

Permalink
feat: add code path (#642)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cahllagerfeld authored Aug 5, 2024
1 parent 16dffc9 commit 9e795cb
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 13 deletions.
33 changes: 21 additions & 12 deletions src/components/steps/step-sheet/DetailsTab.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
import Github from "@/assets/icons/github.svg?react";
import Pipelines from "@/assets/icons/pipeline.svg?react";
import { CopyButton } from "@/components/CopyButton";
import { InlineAvatar } from "@/components/InlineAvatar";
import { useCodeRepository } from "@/data/code-repositories/code-repositories-detail-query";
import { usePipelineRun } from "@/data/pipeline-runs/pipeline-run-detail-query";
import { KeyValue } from "../../KeyValue";
import { Badge, Skeleton, Tag } from "@zenml-io/react-component-library";
import { DisplayDate } from "../../DisplayDate";
import { CollapsibleCard } from "../../CollapsibleCard";
import { ExecutionStatusIcon, getExecutionStatusTagColor } from "../../ExecutionStatus";
import { useStepDetail } from "@/data/steps/step-detail-query";
import Pipelines from "@/assets/icons/pipeline.svg?react";
import { calculateTimeDifference } from "@/lib/dates";
import { ErrorFallback } from "../../Error";
import Github from "@/assets/icons/github.svg?react";
import { CopyButton } from "@/components/CopyButton";
import { transformToEllipsis } from "@/lib/strings";
import { useCodeRepository } from "@/data/code-repositories/code-repositories-detail-query";
import { InlineAvatar } from "@/components/InlineAvatar";
import { Link } from "react-router-dom";
import { routes } from "@/router/routes";
import { Badge, Skeleton, Tag } from "@zenml-io/react-component-library";
import { Link } from "react-router-dom";
import { Codesnippet } from "../../CodeSnippet";
import { CollapsibleCard } from "../../CollapsibleCard";
import { DisplayDate } from "../../DisplayDate";
import { ErrorFallback } from "../../Error";
import { ExecutionStatusIcon, getExecutionStatusTagColor } from "../../ExecutionStatus";
import { Key, KeyValue, Value } from "../../KeyValue";

type Props = {
stepId: string;
Expand Down Expand Up @@ -211,6 +212,14 @@ export function StepDetailsTab({ stepId, runId }: Props) {
}
/>
)}
<Key className={pipelineRunData.metadata?.code_path ? "col-span-3" : ""}>Code Path</Key>
<Value className={pipelineRunData.metadata?.code_path ? "col-span-3 h-auto" : ""}>
{pipelineRunData.metadata?.code_path ? (
<Codesnippet code={pipelineRunData.metadata.code_path} />
) : (
"Not available"
)}
</Value>
</>
) : (
<Skeleton className="h-6 w-full" />
Expand Down
13 changes: 12 additions & 1 deletion src/types/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6186,6 +6186,8 @@ export type components = {
schedule?: string | null;
/** The code reference associated with the deployment. */
code_reference?: components["schemas"]["CodeReferenceRequest"] | null;
/** Optional path where the code is stored in the artifact store. */
code_path?: string | null;
/**
* Template
* @description Template used for the deployment.
Expand Down Expand Up @@ -6265,6 +6267,8 @@ export type components = {
pipeline_version_hash?: string | null;
/** The pipeline spec of the deployment. */
pipeline_spec?: components["schemas"]["PipelineSpec-Output"] | null;
/** Optional path where the code is stored in the artifact store. */
code_path?: string | null;
/** The pipeline associated with the deployment. */
pipeline?: components["schemas"]["PipelineResponse"] | null;
/** The stack associated with the deployment. */
Expand Down Expand Up @@ -6365,6 +6369,8 @@ export type components = {
PipelineResponseMetadata: {
/** The workspace of this resource. */
workspace: components["schemas"]["WorkspaceResponse"];
/** The description of the pipeline. */
description?: string | null;
};
/**
* PipelineResponseResources
Expand Down Expand Up @@ -6527,6 +6533,8 @@ export type components = {
};
/** The orchestrator run ID. */
orchestrator_run_id?: string | null;
/** Optional path where the code is stored in the artifact store. */
code_path?: string | null;
/**
* Template Id
* @description Template used for the pipeline run.
Expand Down Expand Up @@ -8064,6 +8072,7 @@ export type components = {
| "internal"
| "distribution_package"
| "code_repository"
| "notebook"
| "unknown";
/**
* StackComponentType
Expand Down Expand Up @@ -8093,7 +8102,9 @@ export type components = {
/** A textual description for the cloud provider console URL. */
deployment_url_text: string;
/** Configuration for the stack deployment that the user must manually configure into the cloud provider console. */
configuration: string | null;
configuration?: string | null;
/** Instructions for deploying the stack. */
instructions?: string | null;
};
/**
* StackDeploymentInfo
Expand Down

0 comments on commit 9e795cb

Please sign in to comment.