1- import { ChecklistItem } from "@/components/onboarding/ChecklistItem" ;
2- import { CloudProvider , ProviderSelect } from "./ProviderSelect" ;
3- import { HelpBox } from "@/components/fallback-pages/Helpbox" ;
4- import { useState } from "react" ;
5- import { getOnboardingItem } from "@/lib/onboarding" ;
6- import { OnboardingChecklistItemName , OnboardingState } from "@/types/onboarding" ;
7- import { getServiceConnectorStep } from "./ConnectorContent" ;
8- import { getArtifactStoreStep } from "./ArtifactStore" ;
1+ import Plus from "@/assets/icons/plus.svg?react" ;
92import { Codesnippet } from "@/components/CodeSnippet" ;
3+ import { HelpBox } from "@/components/fallback-pages/Helpbox" ;
4+ import { ChecklistItem } from "@/components/onboarding/ChecklistItem" ;
5+ import { } from "@/lib/onboarding" ;
6+ import { routes } from "@/router/routes" ;
7+ import { OnboardingStep } from "@/types/onboarding" ;
8+ import { Button } from "@zenml-io/react-component-library" ;
9+ import { Link } from "react-router-dom" ;
1010
11- type Props = {
12- onboardingState ?: OnboardingState ;
13- active ?: boolean ;
14- } ;
15-
16- export function CreateServiceConnector ( { onboardingState, active } : Props ) {
17- const [ selectedProvider , setSelectedProvider ] = useState < CloudProvider > ( "aws" ) ;
18- const itemName : OnboardingChecklistItemName = "create_service_connector" ;
19- const item = getOnboardingItem ( onboardingState || { } , itemName ) ;
20- return (
21- < ChecklistItem
22- active = { active }
23- completed = { ! ! item }
24- title = "Create a service connector"
25- itemName = { itemName }
26- >
27- < p className = "mb-3" >
28- A service connector grants users of your ZenML tenant the ability to access components like
29- your artifact store{ " " }
30- < LearnMoreLink href = "https://docs.zenml.io/user-guide/production-guide/remote-storage#configuring-permissions-with-your-first-service-connector" />
31- </ p >
32- < div className = "space-y-5" >
33- < div className = "space-y-1" >
34- < label
35- htmlFor = "artifact-store-provider"
36- className = "text-text-sm text-theme-text-secondary"
37- >
38- Select your cloud provider
39- </ label >
40- < ProviderSelect
41- id = "artifact-store-provider"
42- value = { selectedProvider }
43- setValue = { setSelectedProvider }
44- />
45- </ div >
46- { getServiceConnectorStep ( selectedProvider ) }
47- < div >
48- < HelpBox link = "https://docs.zenml.io/user-guide/production-guide/remote-storage#configuring-permissions-with-your-first-service-connector" />
49- </ div >
50- </ div >
51- </ ChecklistItem >
52- ) ;
53- }
54-
55- export function CreateArtifactStore ( { onboardingState, active } : Props ) {
56- const [ selectedProvider , setSelectedProvider ] = useState < CloudProvider > ( "aws" ) ;
57- const itemName : OnboardingChecklistItemName = "create_remote_artifact_store" ;
58- const item = getOnboardingItem ( onboardingState || { } , itemName ) ;
59-
60- return (
61- < ChecklistItem
62- itemName = { itemName }
63- completed = { ! ! item }
64- title = "Create an artifact store"
65- active = { active }
66- >
67- < p className = "mb-3" >
68- Configuring a remote artifact store will version your pipeline's data directly in your cloud
69- provider{ " " }
70- < LearnMoreLink href = "https://docs.zenml.io/user-guide/production-guide/remote-storage" />
71- </ p >
72- < div className = "space-y-5" >
73- < div className = "space-y-1" >
74- < label
75- htmlFor = "artifact-store-provider"
76- className = "text-text-sm text-theme-text-secondary"
77- >
78- Select your cloud provider
79- </ label >
80- < ProviderSelect
81- displayOther
82- id = "artifact-store-provider"
83- value = { selectedProvider }
84- setValue = { setSelectedProvider }
85- />
86- </ div >
87- { getArtifactStoreStep ( selectedProvider ) }
88- < div >
89- < HelpBox link = "https://docs.zenml.io/user-guide/production-guide/remote-storage" />
90- </ div >
91- </ div >
92- </ ChecklistItem >
93- ) ;
94- }
95-
96- export function CreateNewStack ( { onboardingState, active } : Props ) {
97- const itemName : OnboardingChecklistItemName = "create_remote_stack" ;
98- const item = getOnboardingItem ( onboardingState || { } , itemName ) ;
99-
11+ export function CreateNewStack ( { completed, active, hasDownstreamStep } : OnboardingStep ) {
12+ const link =
13+ routes . stacks . create . index + "?" + new URLSearchParams ( { origin : "onboarding" } ) . toString ( ) ;
10014 return (
10115 < ChecklistItem
102- itemName = { itemName }
103- completed = { ! ! item }
16+ hasDownstream = { hasDownstreamStep }
17+ completed = { completed }
10418 title = "Create a new stack"
10519 active = { active }
10620 >
@@ -109,40 +23,33 @@ export function CreateNewStack({ onboardingState, active }: Props) {
10923 < LearnMoreLink href = "https://docs.zenml.io/user-guide/production-guide/understand-stacks" />
11024 </ p >
11125 < div className = "space-y-5" >
112- < div >
113- < p className = "mb-1 text-text-sm text-theme-text-secondary" >
114- Download the quickstart example to your local machine
115- </ p >
116- < Codesnippet
117- codeClasses = "whitespace-pre-wrap"
118- code = "zenml stack register local_with_remote_storage -o default -a cloud_artifact_store"
119- / >
26+ < div className = "space-y-3" >
27+ < p > Connect your Cloud to deploy your ZenML pipelines in a remote stack. </ p >
28+ < Button className = "w-fit" size = "md" asChild >
29+ < Link className = "flex" to = { link } >
30+ < Plus className = "h-5 w-5 shrink-0 fill-white" />
31+ Register a stack
32+ </ Link >
33+ </ Button >
12034 </ div >
12135 < HelpBox link = "https://docs.zenml.io/user-guide/production-guide/understand-stacks" />
12236 </ div >
12337 </ ChecklistItem >
12438 ) ;
12539}
12640
127- export function RunNewPipeline ( { active, onboardingState } : Props ) {
128- const itemName : OnboardingChecklistItemName = "run_remote_pipeline" ;
129- const item = getOnboardingItem ( onboardingState || { } , itemName ) ;
130-
41+ export function RunNewPipeline ( { active, completed, hasDownstreamStep } : OnboardingStep ) {
13142 return (
13243 < ChecklistItem
133- itemName = { itemName }
134- completed = { ! ! item }
44+ hasDownstream = { hasDownstreamStep }
45+ completed = { completed }
13546 title = "Run the pipeline in the new stack"
13647 active = { active }
13748 >
13849 < div className = "space-y-5" >
13950 < div className = "space-y-1" >
14051 < p className = "text-text-sm text-theme-text-secondary" > Set the new stack</ p >
141- < Codesnippet
142- wrap
143- codeClasses = "whitespace-pre-wrap"
144- code = "zenml stack set local_with_remote_storage"
145- />
52+ < Codesnippet wrap codeClasses = "whitespace-pre-wrap" code = "zenml stack set REMOTE_STACK" />
14653 </ div >
14754 < div className = "space-y-1" >
14855 < p className = "text-text-sm text-theme-text-secondary" > Run the pipeline</ p >
0 commit comments