Skip to content

Commit 36e31a2

Browse files
feat: adjust overview pipelines (#914)
1 parent a8d1652 commit 36e31a2

File tree

5 files changed

+22
-4
lines changed

5 files changed

+22
-4
lines changed

src/app/overview/pipelines-grid/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ function PipelinesGrid({ pipelines }: Props) {
102102
isDone={apiPipelines.some((p) => p.name === pipeline.directory)}
103103
pipelineName={pipeline.directory}
104104
displayName={pipeline.name}
105+
deployable={pipeline.deployable ?? false}
105106
/>
106107
</li>
107108
))}

src/app/overview/pipelines-grid/pipeline-item.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ type Props = {
1212
displayName: string;
1313
pipelineName: string;
1414
isDone: boolean;
15+
deployable: boolean;
1516
};
1617

17-
export function PipelineItem({ displayName, pipelineName, isDone }: Props) {
18+
export function PipelineItem({ displayName, pipelineName, isDone, deployable }: Props) {
1819
const [open, setOpen] = useState(false);
1920
const content = useGithubPipelineContent(pipelineName, {
2021
refetchOnWindowFocus: false,
@@ -36,6 +37,7 @@ export function PipelineItem({ displayName, pipelineName, isDone }: Props) {
3637
pipelineContent={content.data}
3738
open={open}
3839
onOpenChange={setOpen}
40+
deployable={deployable}
3941
>
4042
<Box className="space-y-5 p-5 text-start transition-shadow duration-200 hover:shadow-sm">
4143
{isDone ? <Tick /> : <ProgressOutstanding />}

src/app/overview/pipelines-grid/pipeline-sheet.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ type Props = {
2929
isDone: boolean;
3030
name: string;
3131
displayName: string;
32+
deployable: boolean;
3233
};
3334

3435
export function GithubPipelineSheet({
@@ -38,7 +39,8 @@ export function GithubPipelineSheet({
3839
open,
3940
name,
4041
displayName,
41-
isDone
42+
isDone,
43+
deployable
4244
}: PropsWithChildren<Props>) {
4345
return (
4446
<Sheet open={open} onOpenChange={onOpenChange}>
@@ -69,6 +71,14 @@ export function GithubPipelineSheet({
6971
<p className="mb-1 text-text-sm text-theme-text-secondary">Run the pipeline.</p>
7072
<Codesnippet code={`python ${name}.py`} />
7173
</div>
74+
{deployable && (
75+
<div>
76+
<p className="mb-1 text-text-sm text-theme-text-secondary">
77+
Deploy the pipeline.
78+
</p>
79+
<Codesnippet code={`zenml pipeline deploy ${name}.${name}`} />
80+
</div>
81+
)}
7282
<HelpBox link="https://docs.zenml.io/user-guides/starter-guide/create-an-ml-pipeline" />
7383
</Box>
7484
) : (

src/components/sheet/resizable-sheet.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ export const ResizableSheetContent = forwardRef<
2525
<SheetClose className="absolute inset-0 hover:cursor-default" />
2626
</Panel>
2727
<PanelResizeHandle className="w-[1px] bg-theme-border-moderate transition-colors duration-200 data-[resize-handle-state=drag]:bg-theme-border-bold data-[resize-handle-state=hover]:bg-theme-border-bold" />
28-
<Panel className="!overflow-y-auto bg-theme-surface-primary" minSize={25} defaultSize={50}>
28+
<Panel
29+
className="!overflow-y-auto bg-theme-surface-secondary"
30+
minSize={25}
31+
defaultSize={50}
32+
>
2933
{children}
3034
</Panel>
3135
</PanelGroup>

src/data/github/pipelines.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import { z } from "zod";
44
const githubPipelineOrderEntrySchema = z.object({
55
index: z.number(),
66
directory: z.string(),
7-
name: z.string()
7+
name: z.string(),
8+
deployable: z.boolean()
89
});
910

1011
const githubPipelinesOrderSchema = z.object({

0 commit comments

Comments
 (0)