Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/app/overview/pipelines-grid/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ function PipelinesGrid({ pipelines }: Props) {
isDone={apiPipelines.some((p) => p.name === pipeline.directory)}
pipelineName={pipeline.directory}
displayName={pipeline.name}
deployable={pipeline.deployable ?? false}
/>
</li>
))}
Expand Down
4 changes: 3 additions & 1 deletion src/app/overview/pipelines-grid/pipeline-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ type Props = {
displayName: string;
pipelineName: string;
isDone: boolean;
deployable: boolean;
};

export function PipelineItem({ displayName, pipelineName, isDone }: Props) {
export function PipelineItem({ displayName, pipelineName, isDone, deployable }: Props) {
const [open, setOpen] = useState(false);
const content = useGithubPipelineContent(pipelineName, {
refetchOnWindowFocus: false,
Expand All @@ -36,6 +37,7 @@ export function PipelineItem({ displayName, pipelineName, isDone }: Props) {
pipelineContent={content.data}
open={open}
onOpenChange={setOpen}
deployable={deployable}
>
<Box className="space-y-5 p-5 text-start transition-shadow duration-200 hover:shadow-sm">
{isDone ? <Tick /> : <ProgressOutstanding />}
Expand Down
12 changes: 11 additions & 1 deletion src/app/overview/pipelines-grid/pipeline-sheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type Props = {
isDone: boolean;
name: string;
displayName: string;
deployable: boolean;
};

export function GithubPipelineSheet({
Expand All @@ -38,7 +39,8 @@ export function GithubPipelineSheet({
open,
name,
displayName,
isDone
isDone,
deployable
}: PropsWithChildren<Props>) {
return (
<Sheet open={open} onOpenChange={onOpenChange}>
Expand Down Expand Up @@ -69,6 +71,14 @@ export function GithubPipelineSheet({
<p className="mb-1 text-text-sm text-theme-text-secondary">Run the pipeline.</p>
<Codesnippet code={`python ${name}.py`} />
</div>
{deployable && (
<div>
<p className="mb-1 text-text-sm text-theme-text-secondary">
Deploy the pipeline.
</p>
<Codesnippet code={`zenml pipeline deploy ${name}.${name}`} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Cahllagerfeld actually it will always be run.name because run is the name of the file we ask them to create right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just double checked, a bit above we're telling the user to create a file ${name}.py, so they can have the pipelines next to each other, and don't need to overwrite the file when they run a new one

</div>
)}
<HelpBox link="https://docs.zenml.io/user-guides/starter-guide/create-an-ml-pipeline" />
</Box>
) : (
Expand Down
6 changes: 5 additions & 1 deletion src/components/sheet/resizable-sheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ export const ResizableSheetContent = forwardRef<
<SheetClose className="absolute inset-0 hover:cursor-default" />
</Panel>
<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" />
<Panel className="!overflow-y-auto bg-theme-surface-primary" minSize={25} defaultSize={50}>
<Panel
className="!overflow-y-auto bg-theme-surface-secondary"
minSize={25}
defaultSize={50}
>
{children}
</Panel>
</PanelGroup>
Expand Down
3 changes: 2 additions & 1 deletion src/data/github/pipelines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { z } from "zod";
const githubPipelineOrderEntrySchema = z.object({
index: z.number(),
directory: z.string(),
name: z.string()
name: z.string(),
deployable: z.boolean()
});

const githubPipelinesOrderSchema = z.object({
Expand Down