zenml-nightly 0.82.0.dev20250514__py3-none-any.whl → 0.82.1.dev20250518__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zenml/VERSION +1 -1
- zenml/zen_server/dashboard/assets/{404-D4aYbspS.js → 404-_AtuLtaX.js} +1 -1
- zenml/zen_server/dashboard/assets/{AlertDialogDropdownItem-CRZjthRL.js → AlertDialogDropdownItem-BG7-Ki1L.js} +1 -1
- zenml/zen_server/dashboard/assets/{CodeSnippet-Di-loaZu.js → CodeSnippet-CvI6D0wx.js} +1 -1
- zenml/zen_server/dashboard/assets/{CollapsibleCard-Dr5zb5T5.js → CollapsibleCard-D20FtrzC.js} +1 -1
- zenml/zen_server/dashboard/assets/{Commands-CD9Y7FOE.js → Commands-DGbAvMDk.js} +1 -1
- zenml/zen_server/dashboard/assets/{ComponentBadge-BgGnzcLu.js → ComponentBadge-DKw7Gndh.js} +1 -1
- zenml/zen_server/dashboard/assets/{ComponentIcon-B_7Y_oV-.js → ComponentIcon-ils7uNAk.js} +1 -1
- zenml/zen_server/dashboard/assets/{CsvVizualization-CDrjL6bW.js → CsvVizualization-DVN541XF.js} +1 -1
- zenml/zen_server/dashboard/assets/{DeleteAlertDialog-9RTDnEx3.js → DeleteAlertDialog-DVvXt-S6.js} +1 -1
- zenml/zen_server/dashboard/assets/{DialogItem-0fWTH7ki.js → DialogItem-BHWf3sIB.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-vBjUYjb-.js → Error-BWaXP0VK.js} +1 -1
- zenml/zen_server/dashboard/assets/{ExecutionStatus-B-ysY113.js → ExecutionStatus-XrvT2r65.js} +1 -1
- zenml/zen_server/dashboard/assets/{Helpbox-Dt3q7NGd.js → Helpbox-iE1xLmiZ.js} +1 -1
- zenml/zen_server/dashboard/assets/{Infobox-Bai0JtFs.js → Infobox-D9k5TFH4.js} +1 -1
- zenml/zen_server/dashboard/assets/{InlineAvatar-Cpj0lVRQ.js → InlineAvatar-Cfz4WSLK.js} +1 -1
- zenml/zen_server/dashboard/assets/{NestedCollapsible-DbhKdWx-.js → NestedCollapsible-Dor-bi98.js} +1 -1
- zenml/zen_server/dashboard/assets/{Partials-BNBtCjuT.js → Partials-DQJFw1yW.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProBadge-3vtouJQf.js → ProBadge-Cp4hb1YT.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProCta-BoTLdAdV.js → ProCta-EYoV9CvK.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProviderIcon-kkODO9tx.js → ProviderIcon-DLo7t1lo.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProviderRadio-26EB5tY-.js → ProviderRadio-BVDA-fAr.js} +1 -1
- zenml/zen_server/dashboard/assets/{RunSelector-j0C_TPVp.js → RunSelector-BLuBYNJt.js} +1 -1
- zenml/zen_server/dashboard/assets/{RunsBody-DexNouV4.js → RunsBody-W4WHf-sq.js} +1 -1
- zenml/zen_server/dashboard/assets/{SearchField-DMCywawn.js → SearchField-D-h6jXyg.js} +1 -1
- zenml/zen_server/dashboard/assets/{SecretTooltip-LLGP7AIC.js → SecretTooltip-CePCL8kd.js} +1 -1
- zenml/zen_server/dashboard/assets/{SetPassword-CBHW-Su8.js → SetPassword-DR-EiLI5.js} +1 -1
- zenml/zen_server/dashboard/assets/{StackList-S-9I1R4n.js → StackList-CgmN5H-i.js} +1 -1
- zenml/zen_server/dashboard/assets/{Tabs-C2ufJX4t.js → Tabs-DxQ8PDOD.js} +1 -1
- zenml/zen_server/dashboard/assets/{Tick-ay3Bgtro.js → Tick-CEsT3HPR.js} +1 -1
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-p3RX0P-Q.js → UpdatePasswordSchemas-DbFEaezI.js} +1 -1
- zenml/zen_server/dashboard/assets/{UsageReason-C8sD2bOU.js → UsageReason-DjI5qMje.js} +1 -1
- zenml/zen_server/dashboard/assets/{Wizard-DIllc07n.js → Wizard-CMI6Ksgz.js} +1 -1
- zenml/zen_server/dashboard/assets/{WizardFooter-dNDpuero.js → WizardFooter-CFBHFZas.js} +1 -1
- zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-BUT1PiTp.js → all-pipeline-runs-query-BGASHYtF.js} +1 -1
- zenml/zen_server/dashboard/assets/{configuration-form-DBZSb0FV.js → configuration-form-BtI2Y4eX.js} +1 -1
- zenml/zen_server/dashboard/assets/{create-stack-BXLyjE58.js → create-stack-BJ6x5rzj.js} +1 -1
- zenml/zen_server/dashboard/assets/{delete-run-DzcYxUnd.js → delete-run-DlSLEl5T.js} +1 -1
- zenml/zen_server/dashboard/assets/{flavor-select-BTEwByv6.js → flavor-select-BnPxvQDN.js} +1 -1
- zenml/zen_server/dashboard/assets/{form-schemas-BJN_25Ua.js → form-schemas-CbvoEUHr.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-wYtmKLnQ.js → index-CFESYpe4.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-D9-ukAem.js → index-CmLcvK2z.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-8uhUi12k.js → index-CrhdX_qG.js} +1 -1
- zenml/zen_server/dashboard/assets/index-CzX3ZYlI.css +1 -0
- zenml/zen_server/dashboard/assets/{index-BygJE88j.js → index-D2iSHVZq.js} +7 -7
- zenml/zen_server/dashboard/assets/{login-mutation-DywLqguW.js → login-mutation-CXc-Klim.js} +1 -1
- zenml/zen_server/dashboard/assets/{not-found-BOoklIG4.js → not-found-olRU3fnu.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-ByXQN8A-.js → page-7keIM1V3.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-4nVakAEl.js → page-B31neFwG.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-xa1EAPcI.js → page-B3zo4KYS.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DfTsntQI.js → page-BN3MHq1a.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BIYqUwTI.js → page-BNgVExjN.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-kzSGEVUs.js → page-BPtvu74G.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-uDGvpa5g.js → page-BTIuG0ki.js} +1 -1
- zenml/zen_server/dashboard/assets/{page--hSXKqyG.js → page-BcQzleH6.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-B3DscprQ.js → page-C05Jw4M2.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BE8jdyaM.js → page-C28a7K8h.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-B1Uq1S1Q.js → page-C9WLk0X-.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-RV8wpZ_4.js → page-CINMx64X.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-8AzB83Py.js → page-CSwZxZMQ.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-D2TtSfnb.js → page-CYrJbk7P.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-EXvws1ss.js → page-Ce0cqLo3.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-2BsNK_sZ.js → page-CgNsEkw-.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-cOEvFs_l.js → page-Ct2FUYuR.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DmteSSj6.js → page-D8G2B3Bu.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DL8a4_lg.js +3 -0
- zenml/zen_server/dashboard/assets/{page-Ccnk_5ji.js → page-DMhYn1cF.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CPLlVRXx.js → page-Dd_Yq-Uf.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-K9yjbnd4.js → page-DfSvqT8g.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-B7Aj2XbV.js → page-Dt6ANUTx.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DHnkTzqs.js → page-DtvTleaT.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-uN0n_DE2.js → page-DwfGTiVs.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-Ci_n_x3a.js → page-JgomSTDc.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DkY7AIhj.js → page-L84ig6HB.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-bUVHi7DE.js → page-Mabsn4QJ.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DP2Ed-2m.js → page-P04L5cm9.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-D-ry_oLs.js → page-PfhAnvq4.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CI4a9CXs.js → page-WdRrlNt_.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-D_5R6E7b.js → page-ZfTtFicG.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-Dt3wHeWX.js → page-cqJDDDeK.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-B0r9dBEU.js → page-k-Wxh9L_.js} +1 -1
- zenml/zen_server/dashboard/assets/page-y-zV4n0c.js +1 -0
- zenml/zen_server/dashboard/assets/{persist-SSTTV5q0.js → persist-D87V82eO.js} +1 -1
- zenml/zen_server/dashboard/assets/{persist-CEeDYHW5.js → persist-UUym702q.js} +1 -1
- zenml/zen_server/dashboard/assets/{service-BRoAA1Kq.js → service-BQ9KIhls.js} +1 -1
- zenml/zen_server/dashboard/assets/{sharedSchema-BACERDat.js → sharedSchema-Bse2agAf.js} +1 -1
- zenml/zen_server/dashboard/assets/{stack-detail-query-ihiJr6nq.js → stack-detail-query-BAcZJrN3.js} +1 -1
- zenml/zen_server/dashboard/assets/{update-server-settings-mutation-CK6COmw9.js → update-server-settings-mutation-DwMM1LJz.js} +1 -1
- zenml/zen_server/dashboard/index.html +3 -3
- zenml/zen_stores/migrations/versions/0.82.1_release.py +23 -0
- {zenml_nightly-0.82.0.dev20250514.dist-info → zenml_nightly-0.82.1.dev20250518.dist-info}/METADATA +2 -2
- {zenml_nightly-0.82.0.dev20250514.dist-info → zenml_nightly-0.82.1.dev20250518.dist-info}/RECORD +95 -94
- zenml/zen_server/dashboard/assets/index-DmTFrHJm.css +0 -1
- zenml/zen_server/dashboard/assets/page-BTzhAVEn.js +0 -1
- zenml/zen_server/dashboard/assets/page-CSQOpvvK.js +0 -3
- {zenml_nightly-0.82.0.dev20250514.dist-info → zenml_nightly-0.82.1.dev20250518.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.82.0.dev20250514.dist-info → zenml_nightly-0.82.1.dev20250518.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.82.0.dev20250514.dist-info → zenml_nightly-0.82.1.dev20250518.dist-info}/entry_points.txt +0 -0
@@ -1 +1 @@
|
|
1
|
-
import{j as e,r as f}from"./@radix-C7hRs6Kx.js";import{z as d,o as x,p as h,q as N,j,F as p,B as m,f as S,C as D,h as C,i as P,_}from"./index-
|
1
|
+
import{j as e,r as f}from"./@radix-C7hRs6Kx.js";import{z as d,o as x,p as h,q as N,j,F as p,B as m,f as S,C as D,h as C,i as P,_}from"./index-D2iSHVZq.js";import{d as E}from"./@react-router-CNP6g_RL.js";import{E as F}from"./EmptyState-M1jafpg6.js";import{a as T,b as k}from"./@tanstack-CSxjHCME.js";import{E as I}from"./Error-BWaXP0VK.js";import{t as A}from"./zod-C0xYeTvL.js";import{u as V,C as q}from"./index.esm-D7jFlf5N.js";import{S as z}from"./check-circle-mvyzYvIW.js";import"./@reactflow-CQi1Z1Wq.js";const B=d.object({device_id:d.string().optional(),user_code:d.string().optional()});function Y(){const[s]=E(),{device_id:t,user_code:i}=B.parse({device_id:s.get("device_id")||void 0,user_code:s.get("user_code")||void 0});return{user_code:i,device_id:t}}const K=d.object({trustDevice:d.boolean()});function L({deviceId:s,queryParams:t}){return["devices",s,t]}async function R({deviceId:s,queryParams:t}){const i=x(h.devices.detail(s)+"?"+N(t)),r=await j(i,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(!r.ok)throw new p({message:"Error while fetching Device details",status:r.status,statusText:r.statusText});return r.json()}function W(s,t){return T({queryKey:L(s),queryFn:async()=>R(s),...t})}function G({device:s}){var t,i,r,a,c,n;return e.jsx(m,{className:"w-full p-5",children:e.jsxs("dl",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("dt",{children:"IP Address"}),e.jsx("dd",{children:(t=s.body)==null?void 0:t.ip_address})]}),((i=s.metadata)==null?void 0:i.city)&&((r=s.metadata)==null?void 0:r.country)&&e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("dt",{children:"Location"}),e.jsxs("dd",{children:[(a=s.metadata)==null?void 0:a.city,", ",(c=s.metadata)==null?void 0:c.country]})]}),e.jsxs("div",{className:"flex min-w-0 items-center justify-between",children:[e.jsx("dt",{children:"Hostname"}),e.jsx("dd",{className:"truncate",children:(n=s.body)==null?void 0:n.hostname})]})]})})}async function H({deviceId:s,payload:t}){const i=x(h.devices.verify(s)),r=await j(i,{method:"PUT",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){const a=await r.json().then(c=>c.detail).catch(()=>["","Failed to verify device."]);throw new p({status:r.status,statusText:r.statusText,message:a[1]||"Failed to verify device."})}return r.json()}function J(s){return k({mutationFn:async t=>H(t),...s})}function M({deviceId:s,user_code:t,setSuccess:i}){const r=f.useId(),{handleSubmit:a,formState:{isValid:c},control:n}=V({resolver:A(K),defaultValues:{trustDevice:!1}}),{toast:l}=S(),{mutate:v,isPending:y}=J({onSuccess:()=>{i(!0)},onError:o=>{o instanceof Error&&l({status:"error",emphasis:"subtle",icon:e.jsx(P,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:o.message,rounded:!0})}});function g(o){v({deviceId:s,payload:{user_code:t,trusted_device:o.trustDevice}})}return e.jsxs("form",{onSubmit:a(g),className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(q,{control:n,name:"trustDevice",render:({field:{onChange:o,value:w}})=>e.jsx(D,{checked:w,onCheckedChange:b=>o(!!b),id:r})}),e.jsxs("label",{htmlFor:r,children:[e.jsx("p",{children:"Trust this device"}),e.jsx("p",{className:"text-theme-text-secondary",children:"We won't ask you again soon on this device."})]})]}),e.jsx(C,{disabled:y||!c,size:"md",className:"flex w-full justify-center",children:"Authorize this device"})]})}function O(){return e.jsxs(m,{className:"flex min-w-[540px] flex-col items-center justify-center space-y-7 px-7 py-9",children:[e.jsx(z,{className:"h-[120px] w-[120px] fill-theme-text-success"}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"You successfully added your device"}),e.jsx("p",{className:"text-theme-text-secondary",children:"You may close this screen and return to your CLI."})]})]})}function ae(){const{device_id:s,user_code:t}=Y(),[i,r]=f.useState(!1),{data:a,isPending:c,isError:n,error:l}=W({deviceId:s,queryParams:{user_code:t}},{enabled:!!s&&!!t});return!s||!t?e.jsx(F,{children:e.jsx("p",{children:"Invalid device verification link."})}):n?e.jsx(u,{children:e.jsx(I,{isAlertCircle:!0,err:l})}):c?e.jsx(u,{children:e.jsx(_,{})}):i?e.jsx(O,{}):e.jsx(u,{children:e.jsxs("div",{className:"w-full space-y-7",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"mb-0.5 text-display-xs font-semibold",children:"Authorize a new device"}),e.jsx("p",{className:"text-theme-text-secondary",children:"You are logging in from a new device."})]}),e.jsx(G,{device:a}),e.jsx(M,{setSuccess:r,deviceId:s,user_code:t})]})})}function u({children:s}){return e.jsx(m,{className:"flex w-full min-w-[540px] flex-col items-center justify-center gap-5 p-7",children:s})}export{ae as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as l,j as e}from"./@radix-C7hRs6Kx.js";import{u as d,S as h,a as j,b as y}from"./form-schemas-
|
1
|
+
import{r as l,j as e}from"./@radix-C7hRs6Kx.js";import{u as d,S as h,a as j,b as y}from"./form-schemas-CbvoEUHr.js";import{E as w}from"./EmptyState-M1jafpg6.js";import{A,I as U,P as b,U as P,S as g}from"./UsageReason-DjI5qMje.js";import{d as _}from"./@react-router-CNP6g_RL.js";import{j as F,o as C,F as E,p as N,e as k,f as H,i as I}from"./index-D2iSHVZq.js";import{b as M}from"./@tanstack-CSxjHCME.js";import{u as D}from"./login-mutation-CXc-Klim.js";import{S as R}from"./SetPassword-DR-EiLI5.js";import"./check-circle-mvyzYvIW.js";import"./UpdatePasswordSchemas-DbFEaezI.js";import"./zod-C0xYeTvL.js";import"./index.esm-D7jFlf5N.js";import"./gcp-CHNvgEss.js";import"./kubernetes-D6OUjwSK.js";import"./rocket-Cf-B-XOR.js";import"./@reactflow-CQi1Z1Wq.js";import"./PasswordChecker-lYTOtNom.js";const S=l.createContext(null);function T({children:t,initialUser:r}){const[a,s]=l.useState(r||{});return e.jsx(S.Provider,{value:{newUser:a,setNewUser:s},children:t})}function p(){const t=l.useContext(S);if(t===null)throw new Error("useActivationContext must be used within an ActivationProvider");return t}function L(){const{setSurveyStep:t}=d(),{setNewUser:r,newUser:a}=p();function s({fullName:n,getUpdates:o,email:u}){r(c=>({...c,...u?{email:u}:{email:null},full_name:n,email_opted_in:o})),t(c=>c+1)}return e.jsx(A,{email:a.email,fullName:a.full_name,submitHandler:s})}async function z({userId:t,body:r}){const a=C(N.users.activate(t)),s=await F(a,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!s.ok){const n=await s.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Failed to update activate user");throw new E({status:s.status,statusText:s.statusText,message:n})}return s.json()}function J(t){return M({mutationFn:async r=>z(r),...t})}function O({userId:t,setUsername:r}){const{newUser:a}=p(),{setAuthState:s}=k(),{setSurveyStep:n}=d(),{mutate:o}=D({onSuccess:()=>{s("true"),n(i=>i+1)}}),{toast:u}=H(),{mutate:c}=J({onSuccess:async i=>{r(i.name),o({username:i.name,password:a.password??void 0})},onError:i=>{i instanceof Error&&u({status:"error",emphasis:"subtle",icon:e.jsx(I,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:i.message,rounded:!0})}});function m({other:i,providers:f,otherVal:x}){const v={infra_providers:i?[...f,x]:f,finished_onboarding_survey:!0};c({userId:t,body:{...a,user_metadata:{...a.user_metadata,...v}}})}return e.jsx(U,{submitHandler:m})}function W(){const{setSurveyStep:t}=d(),{setNewUser:r}=p();function a({newPassword:s}){r(n=>({...n,password:s})),t(n=>n+1)}return e.jsx(R,{submitHandler:a})}function Y(){const{setSurveyStep:t}=d(),{setNewUser:r}=p();function a({primaryUse:s}){const n={primary_use:s};r(o=>({...o,user_metadata:{...o.user_metadata,...n}})),t(o=>o+1)}return e.jsx(b,{submitHandler:a})}function Z(){const{setSurveyStep:t}=d(),{setNewUser:r}=p();function a({usageReason:s,comparison_tools:n,otherTool:o,otherToolVal:u}){const c={usage_reason:s,...!!n&&{comparing_tools:o&&u?[...n,u]:n}};r(m=>({...m,user_metadata:{...m.user_metadata,...c}})),t(m=>m+1)}return e.jsx(P,{submitHandler:a})}function q(){const{surveyStep:t}=d(),[r]=_(),[a,s]=l.useState(""),n=r.get("user"),o=r.get("token");return!n||!o?e.jsx(w,{children:e.jsx("p",{children:"Invalid activation link."})}):e.jsx(e.Fragment,{children:e.jsxs(T,{initialUser:{activation_token:o},children:[e.jsx(h,{stepAmount:6}),t===1&&e.jsx(L,{}),t===2&&e.jsx(W,{}),t===3&&e.jsx(Y,{}),t===4&&e.jsx(Z,{}),t===5&&e.jsx(O,{setUsername:s,userId:n}),t===6&&e.jsx(g,{}),t===7&&e.jsx(j,{subHeader:"Your created your ZenML account",username:a})]})})}function pt(){return e.jsx("div",{children:e.jsx(y,{children:e.jsx(q,{})})})}export{pt as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as c,j as e}from"./@radix-C7hRs6Kx.js";import{S as N}from"./file-text-BdxZdjP_.js";import{h as p,L as b,W as y,be as j,c as h,S as d,ag as g,bf as w,R as S,l as k,bg as L,m as v,a6 as z,aE as R,a8 as C,a9 as _,B as E,bb as f,r as M,aP as D}from"./index-BygJE88j.js";import{S as I}from"./package-D1Mhqeh8.js";import{S as P}from"./help-DyMolRxD.js";import{S as V}from"./plus-COjQg3AG.js";import{C as l}from"./CodeSnippet-Di-loaZu.js";import{H as u}from"./Helpbox-Dt3q7NGd.js";import{S as H}from"./chevron-down-A-rmltmI.js";import{T as Z}from"./Tick-ay3Bgtro.js";import{S as O}from"./chevron-right-double-uNWbJT-C.js";import{g as B}from"./login-command-CkqxPtV3.js";import{L as T}from"./@react-router-CNP6g_RL.js";import"./@tanstack-CSxjHCME.js";import"./@reactflow-CQi1Z1Wq.js";import"./check-DK77doTf.js";const A=s=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.75873 3H17.2413C18.0463 2.99999 18.7107 2.99998 19.2519 3.04419C19.8139 3.09012 20.3307 3.18868 20.816 3.43597C21.5686 3.81947 22.1806 4.43139 22.5641 5.18404C22.8027 5.65238 22.9028 6.14994 22.9508 6.68931C23.0043 6.8527 23.0136 7.02505 22.9819 7.18959C23 7.63971 23 8.16035 23 8.75868V15.2413C23 16.0463 23 16.7106 22.9558 17.2518C22.9099 17.8139 22.8113 18.3306 22.5641 18.816C22.1806 19.5686 21.5686 20.1805 20.816 20.564C20.3307 20.8113 19.8139 20.9099 19.2519 20.9558C18.7107 21 18.0463 21 17.2413 21H6.7587C5.95374 21 5.28939 21 4.7482 20.9558C4.1861 20.9099 3.6694 20.8113 3.18406 20.564C2.43141 20.1805 1.81949 19.5686 1.436 18.816C1.18871 18.3306 1.09014 17.8139 1.04422 17.2518C1 16.7106 1.00001 16.0463 1.00002 15.2413V8.7587C1.00001 8.16037 1.00001 7.63972 1.01816 7.1896C0.986405 7.02505 0.995778 6.85269 1.04924 6.6893C1.09723 6.14993 1.19737 5.65238 1.436 5.18404C1.81949 4.43139 2.43141 3.81947 3.18406 3.43597C3.6694 3.18868 4.1861 3.09012 4.7482 3.04419C5.28939 2.99998 5.95376 2.99999 6.75873 3ZM3.00002 8.92066V15.2C3.00002 16.0566 3.0008 16.6389 3.03758 17.089C3.0734 17.5274 3.13832 17.7516 3.21801 17.908C3.40976 18.2843 3.71572 18.5903 4.09204 18.782C4.24844 18.8617 4.47265 18.9266 4.91106 18.9624C5.36115 18.9992 5.94345 19 6.80002 19H17.2C18.0566 19 18.6389 18.9992 19.089 18.9624C19.5274 18.9266 19.7516 18.8617 19.908 18.782C20.2843 18.5903 20.5903 18.2843 20.782 17.908C20.8617 17.7516 20.9267 17.5274 20.9625 17.089C20.9992 16.6389 21 16.0566 21 15.2V8.92066L14.4086 13.5347C14.3698 13.5618 14.3313 13.5888 14.2932 13.6156C13.7486 13.998 13.2703 14.3338 12.7256 14.4696C12.2492 14.5884 11.7509 14.5884 11.2744 14.4696C10.7297 14.3338 10.2515 13.998 9.70683 13.6156C9.66872 13.5888 9.63029 13.5618 9.59148 13.5347L3.00002 8.92066ZM20.9173 6.53728L13.2616 11.8962C12.5327 12.4065 12.3783 12.495 12.2419 12.529C12.0831 12.5686 11.917 12.5686 11.7582 12.529C11.6218 12.495 11.4673 12.4065 10.7384 11.8962L3.08279 6.53728C3.11852 6.33012 3.165 6.19607 3.21801 6.09202C3.40976 5.7157 3.71572 5.40973 4.09204 5.21799C4.24844 5.1383 4.47265 5.07337 4.91106 5.03755C5.36115 5.00078 5.94345 5 6.80002 5H17.2C18.0566 5 18.6389 5.00078 19.089 5.03755C19.5274 5.07337 19.7516 5.1383 19.908 5.21799C20.2843 5.40973 20.5903 5.7157 20.782 6.09202C20.8351 6.19607 20.8815 6.33012 20.9173 6.53728Z"})),q=s=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.75873 1H14.2413C15.0463 0.999988 15.7107 0.999977 16.2519 1.04419C16.814 1.09012 17.3307 1.18868 17.816 1.43597C18.5686 1.81947 19.1806 2.43139 19.5641 3.18404C19.8113 3.66937 19.9099 4.18608 19.9558 4.74817C20.0001 5.28936 20 5.95372 20 6.75868V10.0176C20.0673 10.0212 20.1323 10.0254 20.1951 10.0306C20.5904 10.0629 20.9836 10.1342 21.362 10.327C21.9265 10.6146 22.3854 11.0735 22.673 11.638C22.8658 12.0164 22.9372 12.4096 22.9695 12.805C23.0001 13.1795 23 13.6343 23 14.1614V16.9463C23 17.3849 23.0001 17.7634 22.9787 18.0767C22.9562 18.4065 22.9067 18.7364 22.7717 19.0623C22.4672 19.7974 21.8832 20.3814 21.1481 20.6859C20.8222 20.8209 20.4922 20.8704 20.1624 20.8929C20.1101 20.8965 20.056 20.8995 20 20.902V22C20 22.3723 19.7932 22.7138 19.4633 22.8862C19.1333 23.0587 18.7349 23.0336 18.4292 22.8211L16.2528 21.3079C15.9176 21.0749 15.8497 21.0324 15.7857 21.0034C15.7118 20.9699 15.6341 20.9455 15.5544 20.9308C15.4852 20.9181 15.4052 20.9143 14.9969 20.9143H13.1615C12.6343 20.9143 12.1796 20.9143 11.805 20.8837C11.4097 20.8514 11.0164 20.7801 10.6381 20.5873C10.0736 20.2997 9.61463 19.8407 9.32701 19.2763C9.13422 18.8979 9.0629 18.5047 9.0306 18.1093C9.01405 17.9068 9.00646 17.6808 9.00297 17.4326L7.61004 18.843C7.41849 19.037 7.23062 19.2272 7.06596 19.3669C6.91972 19.4909 6.61021 19.7413 6.17978 19.7771C5.69995 19.8169 5.23016 19.624 4.9168 19.2585C4.63567 18.9306 4.59142 18.5349 4.57452 18.3439C4.5555 18.1289 4.55554 17.8615 4.55558 17.5889L4.55559 16.0111C4.53636 15.9951 4.49179 15.9682 4.4203 15.9578C2.67169 15.7016 1.2984 14.3283 1.04226 12.5797C0.999782 12.2897 0.999881 11.9625 1.00001 11.5208C1.00002 11.4958 1.00003 11.4703 1.00003 11.4444L1.00003 6.7587C1.00002 5.95373 1.00001 5.28937 1.04422 4.74818C1.09015 4.18608 1.18871 3.66937 1.436 3.18404C1.8195 2.43139 2.43142 1.81947 3.18407 1.43597C3.6694 1.18868 4.18611 1.09012 4.7482 1.04419C5.2894 0.999977 5.95376 0.999988 6.75873 1ZM11 14.9994C11 14.9998 11 15.0003 11 15.0007V16.7143C11 17.2908 11.0008 17.6631 11.024 17.9465C11.0462 18.2181 11.0838 18.3188 11.109 18.3683C11.2049 18.5564 11.3579 18.7094 11.546 18.8053C11.5955 18.8305 11.6962 18.8682 11.9679 18.8904C12.2512 18.9135 12.6235 18.9143 13.2 18.9143H14.9969C15.0181 18.9143 15.0391 18.9143 15.06 18.9143C15.3707 18.914 15.6448 18.9138 15.9169 18.964C16.1561 19.0081 16.3892 19.0811 16.6108 19.1815C16.8628 19.2956 17.0878 19.4523 17.3428 19.6298C17.3598 19.6417 17.3771 19.6537 17.3945 19.6658L18 20.0868V19.9143C18 19.362 18.4477 18.9143 19 18.9143C19.4797 18.9143 19.7893 18.9137 20.0263 18.8976C20.2543 18.882 20.3411 18.8554 20.3827 18.8382C20.6277 18.7367 20.8224 18.542 20.9239 18.297C20.9411 18.2554 20.9678 18.1685 20.9833 17.9405C20.9995 17.7035 21 17.3939 21 16.9143V14.2C21 13.6234 20.9993 13.2512 20.9761 12.9678C20.9539 12.6962 20.9162 12.5955 20.891 12.546C20.7952 12.3578 20.6422 12.2049 20.454 12.109C20.4046 12.0838 20.3039 12.0461 20.0322 12.0239C19.7489 12.0008 19.3766 12 18.8 12H13.2C12.6235 12 12.2512 12.0008 11.9679 12.0239C11.6962 12.0461 11.5955 12.0838 11.546 12.109C11.3579 12.2049 11.2049 12.3578 11.109 12.546C11.0838 12.5955 11.0462 12.6962 11.024 12.9678C11.0008 13.2512 11 13.6234 11 14.2V14.9994ZM9.00003 14.5894L6.55559 17.0644V15.9916C6.55559 14.8142 5.59832 14.109 4.71017 13.9789C3.83586 13.8508 3.14921 13.1642 3.02115 12.2899C3.00269 12.1639 3.00003 11.9959 3.00003 11.4444V6.8C3.00003 5.94342 3.00081 5.36113 3.03758 4.91104C3.0734 4.47262 3.13833 4.24842 3.21802 4.09202C3.40976 3.7157 3.71572 3.40973 4.09205 3.21799C4.24845 3.1383 4.47265 3.07337 4.91107 3.03755C5.36116 3.00078 5.94345 3 6.80003 3H14.2C15.0566 3 15.6389 3.00078 16.089 3.03755C16.5274 3.07337 16.7516 3.1383 16.908 3.21799C17.2843 3.40973 17.5903 3.7157 17.782 4.09202C17.8617 4.24842 17.9267 4.47262 17.9625 4.91104C17.9993 5.36113 18 5.94342 18 6.8V10L13.1615 10C12.6343 9.99998 12.1796 9.99997 11.805 10.0306C11.4097 10.0629 11.0164 10.1342 10.6381 10.327C10.0736 10.6146 9.61463 11.0735 9.32701 11.638C9.13422 12.0164 9.0629 12.4096 9.0306 12.805C9 13.1795 9.00001 13.6343 9.00003 14.1615L9.00003 14.5894Z"}));function F(){const s=[{text:"Send us a message",href:"mailto:cloud@zenml.io",icon:e.jsx(A,{className:"h-5 w-5 fill-neutral-500"})},{text:"Join our Slack Community",href:"https://zenml.io/slack",icon:e.jsx(q,{className:"h-5 w-5 fill-neutral-500"})}];return e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-lg font-semibold",children:"Support"}),e.jsx("ul",{className:"space-y-1",children:s.map((t,n)=>e.jsx("li",{children:e.jsx(p,{size:"md",className:"w-fit px-2 text-theme-text-secondary",intent:"secondary",emphasis:"minimal",asChild:!0,children:e.jsxs("a",{target:"_blank",rel:"noopener noreferrer",className:"flex gap-1",href:t.href,children:[t.icon,e.jsx("div",{children:t.text})]})})},n))})]})}function U(){const s=[{text:"Browse our docs",href:"https://docs.zenml.io",icon:e.jsx(N,{className:"h-5 w-5 fill-neutral-500"})},{text:"Discover projects",href:"https://github.com/zenml-io/zenml-projects",icon:e.jsx(I,{className:"h-5 w-5 fill-neutral-500"})},{text:"Navigate our examples",href:"https://github.com/zenml-io/zenml/tree/main/examples/",icon:e.jsx(b,{className:"h-5 w-5 fill-neutral-500"})},{text:"Read our blog",href:"https://zenml.io/blog",icon:e.jsx(y,{className:"h-5 w-5 fill-neutral-500"})}];return e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"mb-0.5 text-text-lg font-semibold",children:"Resources"}),e.jsx("ul",{className:"space-y-1",children:s.map((t,n)=>e.jsx("li",{children:e.jsx(p,{size:"md",className:"w-fit px-2 text-theme-text-secondary",intent:"secondary",emphasis:"minimal",asChild:!0,children:e.jsxs("a",{rel:"noopener noreferrer",target:"_blank",className:"flex gap-1",href:t.href,children:[t.icon,e.jsx("div",{children:t.text})]})})},n))})]})}function $(){const s=j(),t=h();if(s.isPending||t.isPending)return e.jsx(d,{className:"h-[32px] w-[150px]"});if(s.isError||t.isError)return null;const n=g(t.data.deployment_type||"other"),r=w(s.data,n),a=r.itemsDone,i=r.totalItems;return e.jsxs(S,{rounded:!1,color:"light-purple",className:"text-text-sm font-semibold",children:[a,"/",i," steps completed"]})}function W(){return e.jsxs("div",{className:"space-between flex flex-col flex-wrap items-center gap-1 space-x-5 overflow-x-hidden lg:flex-row",children:[e.jsxs("div",{className:"flex-1 space-y-1 overflow-x-hidden",children:[e.jsxs("h2",{className:"truncate text-display-xs font-semibold",children:["Welcome to ZenML",e.jsx(J,{})]}),e.jsx("p",{className:"truncate text-display-xs text-theme-text-secondary",children:"You can start by following your quick setup."})]}),e.jsx($,{})]})}function J(){const s=k();if(s.isError)return null;if(s.isPending)return e.jsx(d,{className:"h-6 w-[70px]"});const t=L(s.data);return e.jsx(e.Fragment,{children:t?`, ${t}`:""})}function K({className:s,...t}){return e.jsx("div",{className:v("flex h-[28px] w-[28px] shrink-0 items-center justify-center rounded-rounded border-2 border-warning-300 bg-warning-50",s),...t,children:e.jsx(O,{className:"h-3 w-3 fill-warning-300"})})}function m({completed:s,title:t,children:n,hasDownstream:r,active:a=!1}){const[i,o]=c.useState(a);return c.useEffect(()=>{o(a)},[a]),e.jsxs(z,{disabled:!(r||a||s),open:i,onOpenChange:o,children:[e.jsx("div",{className:"flex w-full flex-col gap-3 bg-theme-surface-primary px-5 py-3",children:e.jsxs("div",{className:"flex w-full justify-between gap-2",children:[s?e.jsx(Z,{className:"shrink-0"}):r?e.jsx(K,{}):e.jsx(R,{className:"shrink-0"}),e.jsx(C,{className:"w-full",children:e.jsx(Y,{active:a,skipped:r,title:t,completed:s})}),e.jsx("div",{className:"flex items-center gap-1",children:e.jsx(C,{children:e.jsx(H,{className:` ${i?"":"-rotate-90"} h-5 w-5 shrink-0 rounded-md fill-neutral-500`})})})]})}),n&&e.jsx(_,{className:"border-t border-theme-border-moderate",children:e.jsxs("div",{className:"flex w-full items-center gap-2 bg-theme-surface-primary p-5",children:[e.jsx("div",{className:"w-[28px] shrink-0"}),e.jsx("div",{className:"w-full min-w-0 flex-1",children:n})]})})]})}function Y({completed:s,title:t,skipped:n,active:r}){return e.jsx("div",{className:"flex w-full items-center justify-between gap-2",children:e.jsx("div",{className:"flex w-full items-center",children:e.jsx("div",{className:v("text-text-xl",{"text-theme-text-tertiary line-through decoration-theme-text-tertiary":s||n,"font-semibold":r,"text-theme-text-secondary":!r&&!s}),children:t})})})}function G({completed:s,hasDownstreamStep:t,active:n}){const{data:r}=h({throwOnError:!0});return e.jsx(m,{active:n,hasDownstream:t,completed:s,title:"Install and log in to ZenML (5 min)",children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Install ZenML"}),e.jsx(l,{code:`pip install "zenml==${r?r.version:e.jsx(d,{className:"w-7"})}"`})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Log in to your ZenML Server"}),e.jsx(l,{code:B((r==null?void 0:r.deployment_type)||"other")})]}),e.jsx(u,{link:"https://docs.zenml.io/user-guides/production-guide/deploying-zenml#connecting-to-a-deployed-zenml"})]})})}function Q({active:s,completed:t,hasDownstreamStep:n}){return e.jsx(m,{active:s,hasDownstream:n,completed:t,title:"Run a pipeline (2 min)",children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Download the quickstart example to your local machine"}),e.jsx(l,{code:"git clone --depth 1 https://github.com/zenml-io/zenml.git && cd zenml/examples/quickstart"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Initialize ZenML in the current directory"}),e.jsx(l,{code:"zenml init"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Install the remaining requirements apart from ZenML"}),e.jsx(l,{code:"pip install -r requirements.txt"})]}),e.jsxs("div",{children:[e.jsxs("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:["Run the training pipeline.",e.jsx("br",{}),"Once it is running, your dashboard will show all the details of the associated run, models, and artifacts."]}),e.jsx(l,{code:"python run.py"})]}),e.jsxs(E,{className:"flex w-full flex-wrap items-center justify-between gap-y-1 p-2",children:[e.jsxs("div",{className:"flex items-center gap-[10px]",children:[e.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-sm bg-teal-25",children:e.jsx(P,{className:"h-5 w-5 fill-teal-400"})}),e.jsx("p",{children:"Do you need help?"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("a",{target:"_blank",rel:"noopener noreferrer",className:f({intent:"secondary",emphasis:"subtle",size:"md"}),href:"https://github.com/zenml-io/zenml/blob/main/examples/quickstart/README.md",children:"Open the Readme"}),e.jsx("a",{target:"_blank",rel:"noopener noreferrer",className:f({intent:"primary",emphasis:"subtle",size:"md"}),href:"https://docs.zenml.io/user-guides/starter-guide/create-an-ml-pipeline",children:"Browse our docs"})]})]})]})})}function X({completed:s,active:t,hasDownstreamStep:n}){const r=M.stacks.create.index+"?"+new URLSearchParams({origin:"onboarding"}).toString();return e.jsxs(m,{hasDownstream:n,completed:s,title:"Connect to a remote stack (5 min)",active:t,children:[e.jsxs("p",{className:"mb-3",children:["A stack configures how a pipeline is executed"," ",e.jsx(se,{href:"https://docs.zenml.io/user-guides/production-guide/understand-stacks"})]}),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Connect your Cloud to deploy your ZenML pipelines in a remote stack."}),e.jsx(p,{className:"w-fit",size:"md",asChild:!0,children:e.jsxs(T,{className:"flex",to:r,children:[e.jsx(V,{className:"h-5 w-5 shrink-0 fill-white"}),"Register a remote stack"]})})]}),e.jsx(u,{link:"https://docs.zenml.io/user-guides/production-guide/understand-stacks"})]})]})}function ee({active:s,completed:t,hasDownstreamStep:n}){return e.jsx(m,{hasDownstream:n,completed:t,title:"Run a pipeline in a remote stack (3 min)",active:s,children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Set the new stack"}),e.jsx(l,{wrap:!0,codeClasses:"whitespace-pre-wrap",code:"zenml stack set REMOTE_STACK"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Run the pipeline"}),e.jsx(l,{wrap:!0,codeClasses:"whitespace-pre-wrap",code:"python run.py"})]}),e.jsx("div",{children:e.jsx(u,{link:"https://docs.zenml.io/user-guides/production-guide/understand-stacks"})})]})})}function se({href:s}){return e.jsx("a",{href:s,rel:"noopener noreferrer",target:"_blank",className:"link text-text-sm font-semibold text-theme-text-brand",children:"Learn more"})}function te(){const s=j({refetchInterval:5e3}),t=h();if(s.isPending||t.isPending)return e.jsx(d,{className:"h-[200px] w-full"});if(s.isError||t.isError)return null;const n=g(t.data.deployment_type||"other"),{getItem:r}=w(s.data,n),a=r("device_verified"),i=r("pipeline_run"),o=r("stack_with_remote_artifact_store_created"),x=r("pipeline_run_with_remote_artifact_store");return e.jsxs("ul",{className:"space-y-5",children:[!n&&e.jsx("li",{children:e.jsx(G,{active:a.isActive,completed:a.isCompleted,hasDownstreamStep:a.hasDownStreamStep})}),e.jsx("li",{children:e.jsx(Q,{active:i.isActive,completed:i.isCompleted,hasDownstreamStep:i.hasDownStreamStep})}),e.jsx("li",{children:e.jsx(X,{active:o.isActive,completed:o.isCompleted,hasDownstreamStep:o.hasDownStreamStep})}),e.jsx("li",{children:e.jsx(ee,{active:x.isActive,completed:x.isCompleted,hasDownstreamStep:x.hasDownStreamStep})})]})}function ge(){const{setTourState:s,tourState:{tourActive:t}}=D();return c.useEffect(()=>{t&&s(n=>({...n,run:!0,stepIndex:n.stepIndex}))},[t]),e.jsxs("div",{className:"layout-container grid grid-cols-4 gap-5 py-5",children:[e.jsxs("div",{className:"col-span-4 space-y-5 lg:col-span-3",children:[e.jsx(W,{}),e.jsx(te,{})]}),e.jsxs("div",{className:"col-span-4 space-y-5 lg:col-span-1",children:[e.jsx(F,{}),e.jsx(U,{})]})]})}export{ge as default};
|
1
|
+
import{r as c,j as e}from"./@radix-C7hRs6Kx.js";import{S as N}from"./file-text-BdxZdjP_.js";import{h as p,L as b,W as y,be as j,c as h,S as d,ag as g,bf as w,R as S,l as k,bg as L,m as v,a6 as z,aE as R,a8 as C,a9 as _,B as E,bb as f,r as M,aP as D}from"./index-D2iSHVZq.js";import{S as I}from"./package-D1Mhqeh8.js";import{S as P}from"./help-DyMolRxD.js";import{S as V}from"./plus-COjQg3AG.js";import{C as l}from"./CodeSnippet-CvI6D0wx.js";import{H as u}from"./Helpbox-iE1xLmiZ.js";import{S as H}from"./chevron-down-A-rmltmI.js";import{T as Z}from"./Tick-CEsT3HPR.js";import{S as O}from"./chevron-right-double-uNWbJT-C.js";import{g as B}from"./login-command-CkqxPtV3.js";import{L as T}from"./@react-router-CNP6g_RL.js";import"./@tanstack-CSxjHCME.js";import"./@reactflow-CQi1Z1Wq.js";import"./check-DK77doTf.js";const A=s=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.75873 3H17.2413C18.0463 2.99999 18.7107 2.99998 19.2519 3.04419C19.8139 3.09012 20.3307 3.18868 20.816 3.43597C21.5686 3.81947 22.1806 4.43139 22.5641 5.18404C22.8027 5.65238 22.9028 6.14994 22.9508 6.68931C23.0043 6.8527 23.0136 7.02505 22.9819 7.18959C23 7.63971 23 8.16035 23 8.75868V15.2413C23 16.0463 23 16.7106 22.9558 17.2518C22.9099 17.8139 22.8113 18.3306 22.5641 18.816C22.1806 19.5686 21.5686 20.1805 20.816 20.564C20.3307 20.8113 19.8139 20.9099 19.2519 20.9558C18.7107 21 18.0463 21 17.2413 21H6.7587C5.95374 21 5.28939 21 4.7482 20.9558C4.1861 20.9099 3.6694 20.8113 3.18406 20.564C2.43141 20.1805 1.81949 19.5686 1.436 18.816C1.18871 18.3306 1.09014 17.8139 1.04422 17.2518C1 16.7106 1.00001 16.0463 1.00002 15.2413V8.7587C1.00001 8.16037 1.00001 7.63972 1.01816 7.1896C0.986405 7.02505 0.995778 6.85269 1.04924 6.6893C1.09723 6.14993 1.19737 5.65238 1.436 5.18404C1.81949 4.43139 2.43141 3.81947 3.18406 3.43597C3.6694 3.18868 4.1861 3.09012 4.7482 3.04419C5.28939 2.99998 5.95376 2.99999 6.75873 3ZM3.00002 8.92066V15.2C3.00002 16.0566 3.0008 16.6389 3.03758 17.089C3.0734 17.5274 3.13832 17.7516 3.21801 17.908C3.40976 18.2843 3.71572 18.5903 4.09204 18.782C4.24844 18.8617 4.47265 18.9266 4.91106 18.9624C5.36115 18.9992 5.94345 19 6.80002 19H17.2C18.0566 19 18.6389 18.9992 19.089 18.9624C19.5274 18.9266 19.7516 18.8617 19.908 18.782C20.2843 18.5903 20.5903 18.2843 20.782 17.908C20.8617 17.7516 20.9267 17.5274 20.9625 17.089C20.9992 16.6389 21 16.0566 21 15.2V8.92066L14.4086 13.5347C14.3698 13.5618 14.3313 13.5888 14.2932 13.6156C13.7486 13.998 13.2703 14.3338 12.7256 14.4696C12.2492 14.5884 11.7509 14.5884 11.2744 14.4696C10.7297 14.3338 10.2515 13.998 9.70683 13.6156C9.66872 13.5888 9.63029 13.5618 9.59148 13.5347L3.00002 8.92066ZM20.9173 6.53728L13.2616 11.8962C12.5327 12.4065 12.3783 12.495 12.2419 12.529C12.0831 12.5686 11.917 12.5686 11.7582 12.529C11.6218 12.495 11.4673 12.4065 10.7384 11.8962L3.08279 6.53728C3.11852 6.33012 3.165 6.19607 3.21801 6.09202C3.40976 5.7157 3.71572 5.40973 4.09204 5.21799C4.24844 5.1383 4.47265 5.07337 4.91106 5.03755C5.36115 5.00078 5.94345 5 6.80002 5H17.2C18.0566 5 18.6389 5.00078 19.089 5.03755C19.5274 5.07337 19.7516 5.1383 19.908 5.21799C20.2843 5.40973 20.5903 5.7157 20.782 6.09202C20.8351 6.19607 20.8815 6.33012 20.9173 6.53728Z"})),q=s=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.75873 1H14.2413C15.0463 0.999988 15.7107 0.999977 16.2519 1.04419C16.814 1.09012 17.3307 1.18868 17.816 1.43597C18.5686 1.81947 19.1806 2.43139 19.5641 3.18404C19.8113 3.66937 19.9099 4.18608 19.9558 4.74817C20.0001 5.28936 20 5.95372 20 6.75868V10.0176C20.0673 10.0212 20.1323 10.0254 20.1951 10.0306C20.5904 10.0629 20.9836 10.1342 21.362 10.327C21.9265 10.6146 22.3854 11.0735 22.673 11.638C22.8658 12.0164 22.9372 12.4096 22.9695 12.805C23.0001 13.1795 23 13.6343 23 14.1614V16.9463C23 17.3849 23.0001 17.7634 22.9787 18.0767C22.9562 18.4065 22.9067 18.7364 22.7717 19.0623C22.4672 19.7974 21.8832 20.3814 21.1481 20.6859C20.8222 20.8209 20.4922 20.8704 20.1624 20.8929C20.1101 20.8965 20.056 20.8995 20 20.902V22C20 22.3723 19.7932 22.7138 19.4633 22.8862C19.1333 23.0587 18.7349 23.0336 18.4292 22.8211L16.2528 21.3079C15.9176 21.0749 15.8497 21.0324 15.7857 21.0034C15.7118 20.9699 15.6341 20.9455 15.5544 20.9308C15.4852 20.9181 15.4052 20.9143 14.9969 20.9143H13.1615C12.6343 20.9143 12.1796 20.9143 11.805 20.8837C11.4097 20.8514 11.0164 20.7801 10.6381 20.5873C10.0736 20.2997 9.61463 19.8407 9.32701 19.2763C9.13422 18.8979 9.0629 18.5047 9.0306 18.1093C9.01405 17.9068 9.00646 17.6808 9.00297 17.4326L7.61004 18.843C7.41849 19.037 7.23062 19.2272 7.06596 19.3669C6.91972 19.4909 6.61021 19.7413 6.17978 19.7771C5.69995 19.8169 5.23016 19.624 4.9168 19.2585C4.63567 18.9306 4.59142 18.5349 4.57452 18.3439C4.5555 18.1289 4.55554 17.8615 4.55558 17.5889L4.55559 16.0111C4.53636 15.9951 4.49179 15.9682 4.4203 15.9578C2.67169 15.7016 1.2984 14.3283 1.04226 12.5797C0.999782 12.2897 0.999881 11.9625 1.00001 11.5208C1.00002 11.4958 1.00003 11.4703 1.00003 11.4444L1.00003 6.7587C1.00002 5.95373 1.00001 5.28937 1.04422 4.74818C1.09015 4.18608 1.18871 3.66937 1.436 3.18404C1.8195 2.43139 2.43142 1.81947 3.18407 1.43597C3.6694 1.18868 4.18611 1.09012 4.7482 1.04419C5.2894 0.999977 5.95376 0.999988 6.75873 1ZM11 14.9994C11 14.9998 11 15.0003 11 15.0007V16.7143C11 17.2908 11.0008 17.6631 11.024 17.9465C11.0462 18.2181 11.0838 18.3188 11.109 18.3683C11.2049 18.5564 11.3579 18.7094 11.546 18.8053C11.5955 18.8305 11.6962 18.8682 11.9679 18.8904C12.2512 18.9135 12.6235 18.9143 13.2 18.9143H14.9969C15.0181 18.9143 15.0391 18.9143 15.06 18.9143C15.3707 18.914 15.6448 18.9138 15.9169 18.964C16.1561 19.0081 16.3892 19.0811 16.6108 19.1815C16.8628 19.2956 17.0878 19.4523 17.3428 19.6298C17.3598 19.6417 17.3771 19.6537 17.3945 19.6658L18 20.0868V19.9143C18 19.362 18.4477 18.9143 19 18.9143C19.4797 18.9143 19.7893 18.9137 20.0263 18.8976C20.2543 18.882 20.3411 18.8554 20.3827 18.8382C20.6277 18.7367 20.8224 18.542 20.9239 18.297C20.9411 18.2554 20.9678 18.1685 20.9833 17.9405C20.9995 17.7035 21 17.3939 21 16.9143V14.2C21 13.6234 20.9993 13.2512 20.9761 12.9678C20.9539 12.6962 20.9162 12.5955 20.891 12.546C20.7952 12.3578 20.6422 12.2049 20.454 12.109C20.4046 12.0838 20.3039 12.0461 20.0322 12.0239C19.7489 12.0008 19.3766 12 18.8 12H13.2C12.6235 12 12.2512 12.0008 11.9679 12.0239C11.6962 12.0461 11.5955 12.0838 11.546 12.109C11.3579 12.2049 11.2049 12.3578 11.109 12.546C11.0838 12.5955 11.0462 12.6962 11.024 12.9678C11.0008 13.2512 11 13.6234 11 14.2V14.9994ZM9.00003 14.5894L6.55559 17.0644V15.9916C6.55559 14.8142 5.59832 14.109 4.71017 13.9789C3.83586 13.8508 3.14921 13.1642 3.02115 12.2899C3.00269 12.1639 3.00003 11.9959 3.00003 11.4444V6.8C3.00003 5.94342 3.00081 5.36113 3.03758 4.91104C3.0734 4.47262 3.13833 4.24842 3.21802 4.09202C3.40976 3.7157 3.71572 3.40973 4.09205 3.21799C4.24845 3.1383 4.47265 3.07337 4.91107 3.03755C5.36116 3.00078 5.94345 3 6.80003 3H14.2C15.0566 3 15.6389 3.00078 16.089 3.03755C16.5274 3.07337 16.7516 3.1383 16.908 3.21799C17.2843 3.40973 17.5903 3.7157 17.782 4.09202C17.8617 4.24842 17.9267 4.47262 17.9625 4.91104C17.9993 5.36113 18 5.94342 18 6.8V10L13.1615 10C12.6343 9.99998 12.1796 9.99997 11.805 10.0306C11.4097 10.0629 11.0164 10.1342 10.6381 10.327C10.0736 10.6146 9.61463 11.0735 9.32701 11.638C9.13422 12.0164 9.0629 12.4096 9.0306 12.805C9 13.1795 9.00001 13.6343 9.00003 14.1615L9.00003 14.5894Z"}));function F(){const s=[{text:"Send us a message",href:"mailto:cloud@zenml.io",icon:e.jsx(A,{className:"h-5 w-5 fill-neutral-500"})},{text:"Join our Slack Community",href:"https://zenml.io/slack",icon:e.jsx(q,{className:"h-5 w-5 fill-neutral-500"})}];return e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-lg font-semibold",children:"Support"}),e.jsx("ul",{className:"space-y-1",children:s.map((t,n)=>e.jsx("li",{children:e.jsx(p,{size:"md",className:"w-fit px-2 text-theme-text-secondary",intent:"secondary",emphasis:"minimal",asChild:!0,children:e.jsxs("a",{target:"_blank",rel:"noopener noreferrer",className:"flex gap-1",href:t.href,children:[t.icon,e.jsx("div",{children:t.text})]})})},n))})]})}function U(){const s=[{text:"Browse our docs",href:"https://docs.zenml.io",icon:e.jsx(N,{className:"h-5 w-5 fill-neutral-500"})},{text:"Discover projects",href:"https://github.com/zenml-io/zenml-projects",icon:e.jsx(I,{className:"h-5 w-5 fill-neutral-500"})},{text:"Navigate our examples",href:"https://github.com/zenml-io/zenml/tree/main/examples/",icon:e.jsx(b,{className:"h-5 w-5 fill-neutral-500"})},{text:"Read our blog",href:"https://zenml.io/blog",icon:e.jsx(y,{className:"h-5 w-5 fill-neutral-500"})}];return e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"mb-0.5 text-text-lg font-semibold",children:"Resources"}),e.jsx("ul",{className:"space-y-1",children:s.map((t,n)=>e.jsx("li",{children:e.jsx(p,{size:"md",className:"w-fit px-2 text-theme-text-secondary",intent:"secondary",emphasis:"minimal",asChild:!0,children:e.jsxs("a",{rel:"noopener noreferrer",target:"_blank",className:"flex gap-1",href:t.href,children:[t.icon,e.jsx("div",{children:t.text})]})})},n))})]})}function $(){const s=j(),t=h();if(s.isPending||t.isPending)return e.jsx(d,{className:"h-[32px] w-[150px]"});if(s.isError||t.isError)return null;const n=g(t.data.deployment_type||"other"),r=w(s.data,n),a=r.itemsDone,i=r.totalItems;return e.jsxs(S,{rounded:!1,color:"light-purple",className:"text-text-sm font-semibold",children:[a,"/",i," steps completed"]})}function W(){return e.jsxs("div",{className:"space-between flex flex-col flex-wrap items-center gap-1 space-x-5 overflow-x-hidden lg:flex-row",children:[e.jsxs("div",{className:"flex-1 space-y-1 overflow-x-hidden",children:[e.jsxs("h2",{className:"truncate text-display-xs font-semibold",children:["Welcome to ZenML",e.jsx(J,{})]}),e.jsx("p",{className:"truncate text-display-xs text-theme-text-secondary",children:"You can start by following your quick setup."})]}),e.jsx($,{})]})}function J(){const s=k();if(s.isError)return null;if(s.isPending)return e.jsx(d,{className:"h-6 w-[70px]"});const t=L(s.data);return e.jsx(e.Fragment,{children:t?`, ${t}`:""})}function K({className:s,...t}){return e.jsx("div",{className:v("flex h-[28px] w-[28px] shrink-0 items-center justify-center rounded-rounded border-2 border-warning-300 bg-warning-50",s),...t,children:e.jsx(O,{className:"h-3 w-3 fill-warning-300"})})}function m({completed:s,title:t,children:n,hasDownstream:r,active:a=!1}){const[i,o]=c.useState(a);return c.useEffect(()=>{o(a)},[a]),e.jsxs(z,{disabled:!(r||a||s),open:i,onOpenChange:o,children:[e.jsx("div",{className:"flex w-full flex-col gap-3 bg-theme-surface-primary px-5 py-3",children:e.jsxs("div",{className:"flex w-full justify-between gap-2",children:[s?e.jsx(Z,{className:"shrink-0"}):r?e.jsx(K,{}):e.jsx(R,{className:"shrink-0"}),e.jsx(C,{className:"w-full",children:e.jsx(Y,{active:a,skipped:r,title:t,completed:s})}),e.jsx("div",{className:"flex items-center gap-1",children:e.jsx(C,{children:e.jsx(H,{className:` ${i?"":"-rotate-90"} h-5 w-5 shrink-0 rounded-md fill-neutral-500`})})})]})}),n&&e.jsx(_,{className:"border-t border-theme-border-moderate",children:e.jsxs("div",{className:"flex w-full items-center gap-2 bg-theme-surface-primary p-5",children:[e.jsx("div",{className:"w-[28px] shrink-0"}),e.jsx("div",{className:"w-full min-w-0 flex-1",children:n})]})})]})}function Y({completed:s,title:t,skipped:n,active:r}){return e.jsx("div",{className:"flex w-full items-center justify-between gap-2",children:e.jsx("div",{className:"flex w-full items-center",children:e.jsx("div",{className:v("text-text-xl",{"text-theme-text-tertiary line-through decoration-theme-text-tertiary":s||n,"font-semibold":r,"text-theme-text-secondary":!r&&!s}),children:t})})})}function G({completed:s,hasDownstreamStep:t,active:n}){const{data:r}=h({throwOnError:!0});return e.jsx(m,{active:n,hasDownstream:t,completed:s,title:"Install and log in to ZenML (5 min)",children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Install ZenML"}),e.jsx(l,{code:`pip install "zenml==${r?r.version:e.jsx(d,{className:"w-7"})}"`})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Log in to your ZenML Server"}),e.jsx(l,{code:B((r==null?void 0:r.deployment_type)||"other")})]}),e.jsx(u,{link:"https://docs.zenml.io/user-guides/production-guide/deploying-zenml#connecting-to-a-deployed-zenml"})]})})}function Q({active:s,completed:t,hasDownstreamStep:n}){return e.jsx(m,{active:s,hasDownstream:n,completed:t,title:"Run a pipeline (2 min)",children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Download the quickstart example to your local machine"}),e.jsx(l,{code:"git clone --depth 1 https://github.com/zenml-io/zenml.git && cd zenml/examples/quickstart"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Initialize ZenML in the current directory"}),e.jsx(l,{code:"zenml init"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Install the remaining requirements apart from ZenML"}),e.jsx(l,{code:"pip install -r requirements.txt"})]}),e.jsxs("div",{children:[e.jsxs("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:["Run the training pipeline.",e.jsx("br",{}),"Once it is running, your dashboard will show all the details of the associated run, models, and artifacts."]}),e.jsx(l,{code:"python run.py"})]}),e.jsxs(E,{className:"flex w-full flex-wrap items-center justify-between gap-y-1 p-2",children:[e.jsxs("div",{className:"flex items-center gap-[10px]",children:[e.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-sm bg-teal-25",children:e.jsx(P,{className:"h-5 w-5 fill-teal-400"})}),e.jsx("p",{children:"Do you need help?"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("a",{target:"_blank",rel:"noopener noreferrer",className:f({intent:"secondary",emphasis:"subtle",size:"md"}),href:"https://github.com/zenml-io/zenml/blob/main/examples/quickstart/README.md",children:"Open the Readme"}),e.jsx("a",{target:"_blank",rel:"noopener noreferrer",className:f({intent:"primary",emphasis:"subtle",size:"md"}),href:"https://docs.zenml.io/user-guides/starter-guide/create-an-ml-pipeline",children:"Browse our docs"})]})]})]})})}function X({completed:s,active:t,hasDownstreamStep:n}){const r=M.stacks.create.index+"?"+new URLSearchParams({origin:"onboarding"}).toString();return e.jsxs(m,{hasDownstream:n,completed:s,title:"Connect to a remote stack (5 min)",active:t,children:[e.jsxs("p",{className:"mb-3",children:["A stack configures how a pipeline is executed"," ",e.jsx(se,{href:"https://docs.zenml.io/user-guides/production-guide/understand-stacks"})]}),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Connect your Cloud to deploy your ZenML pipelines in a remote stack."}),e.jsx(p,{className:"w-fit",size:"md",asChild:!0,children:e.jsxs(T,{className:"flex",to:r,children:[e.jsx(V,{className:"h-5 w-5 shrink-0 fill-white"}),"Register a remote stack"]})})]}),e.jsx(u,{link:"https://docs.zenml.io/user-guides/production-guide/understand-stacks"})]})]})}function ee({active:s,completed:t,hasDownstreamStep:n}){return e.jsx(m,{hasDownstream:n,completed:t,title:"Run a pipeline in a remote stack (3 min)",active:s,children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Set the new stack"}),e.jsx(l,{wrap:!0,codeClasses:"whitespace-pre-wrap",code:"zenml stack set REMOTE_STACK"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Run the pipeline"}),e.jsx(l,{wrap:!0,codeClasses:"whitespace-pre-wrap",code:"python run.py"})]}),e.jsx("div",{children:e.jsx(u,{link:"https://docs.zenml.io/user-guides/production-guide/understand-stacks"})})]})})}function se({href:s}){return e.jsx("a",{href:s,rel:"noopener noreferrer",target:"_blank",className:"link text-text-sm font-semibold text-theme-text-brand",children:"Learn more"})}function te(){const s=j({refetchInterval:5e3}),t=h();if(s.isPending||t.isPending)return e.jsx(d,{className:"h-[200px] w-full"});if(s.isError||t.isError)return null;const n=g(t.data.deployment_type||"other"),{getItem:r}=w(s.data,n),a=r("device_verified"),i=r("pipeline_run"),o=r("stack_with_remote_artifact_store_created"),x=r("pipeline_run_with_remote_artifact_store");return e.jsxs("ul",{className:"space-y-5",children:[!n&&e.jsx("li",{children:e.jsx(G,{active:a.isActive,completed:a.isCompleted,hasDownstreamStep:a.hasDownStreamStep})}),e.jsx("li",{children:e.jsx(Q,{active:i.isActive,completed:i.isCompleted,hasDownstreamStep:i.hasDownStreamStep})}),e.jsx("li",{children:e.jsx(X,{active:o.isActive,completed:o.isCompleted,hasDownstreamStep:o.hasDownStreamStep})}),e.jsx("li",{children:e.jsx(ee,{active:x.isActive,completed:x.isCompleted,hasDownstreamStep:x.hasDownStreamStep})})]})}function ge(){const{setTourState:s,tourState:{tourActive:t}}=D();return c.useEffect(()=>{t&&s(n=>({...n,run:!0,stepIndex:n.stepIndex}))},[t]),e.jsxs("div",{className:"layout-container grid grid-cols-4 gap-5 py-5",children:[e.jsxs("div",{className:"col-span-4 space-y-5 lg:col-span-3",children:[e.jsx(W,{}),e.jsx(te,{})]}),e.jsxs("div",{className:"col-span-4 space-y-5 lg:col-span-1",children:[e.jsx(F,{}),e.jsx(U,{})]})]})}export{ge as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as i,j as s}from"./@radix-C7hRs6Kx.js";import{ai as D,aj as k,h as f,ak as z,al as E,am as A,f as b,ax as v,ar as S,i as C,I as o,ap as T,aq as q,z as a,l as B,B as M,S as P,A as Q,b as V}from"./index-
|
1
|
+
import{r as i,j as s}from"./@radix-C7hRs6Kx.js";import{ai as D,aj as k,h as f,ak as z,al as E,am as A,f as b,ax as v,ar as S,i as C,I as o,ap as T,aq as q,z as a,l as B,B as M,S as P,A as Q,b as V}from"./index-D2iSHVZq.js";import{c as _}from"./@tanstack-CSxjHCME.js";import{u as F}from"./index.esm-D7jFlf5N.js";import{S as K}from"./tick-circle-m94Aa6Zt.js";import{t as I}from"./zod-C0xYeTvL.js";import{P as O}from"./PasswordChecker-lYTOtNom.js";import{u as H}from"./UpdatePasswordSchemas-DbFEaezI.js";import{D as R}from"./DisplayDate-CYVBBSgr.js";import"./@react-router-CNP6g_RL.js";import"./@reactflow-CQi1Z1Wq.js";function G(){const[e,l]=i.useState(!1);return s.jsxs(D,{onOpenChange:()=>{l(!1)},children:[s.jsx(k,{asChild:!0,children:s.jsx(f,{size:"md",className:"shrink-0",intent:"primary",emphasis:"subtle",children:"Change Password"})}),s.jsxs(z,{children:[s.jsx(E,{children:s.jsx(A,{children:" Update Credentials"})}),e?s.jsx(L,{}):s.jsx(J,{setSuccess:l})]})]})}function J({setSuccess:e}){var u;const l=i.useId(),d=i.useId(),n=i.useId(),{toast:x}=b(),{mutate:p,isPending:j}=v({onSuccess(){e(!0)},onError(t){S(t)&&x({status:"error",emphasis:"subtle",icon:s.jsx(C,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:t.message,rounded:!0})}}),{register:c,handleSubmit:m,watch:w,formState:{isValid:N,errors:y}}=F({resolver:I(H),mode:"onChange",criteriaMode:"all"});function g(t){p({old_password:t.oldPassword,password:t.newPassword})}const h=(u=y.newPassword)==null?void 0:u.types;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-5 p-7",children:[s.jsx("form",{id:"update-password-form",onSubmit:m(g),children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:l,className:"text-text-sm",children:"Old Password"}),s.jsx(o,{...c("oldPassword"),type:"password",id:l,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:d,className:"text-text-sm",children:"New Password"}),s.jsx(o,{...c("newPassword"),type:"password",id:d,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:n,className:"text-text-sm",children:"Confirm Password"}),s.jsx(o,{...c("confirmPassword"),type:"password",id:n,className:"w-full"})]})]})}),s.jsx(O,{val:w("newPassword"),errors:h||[]})]}),s.jsxs(T,{className:"gap-[10px]",children:[s.jsx(q,{asChild:!0,children:s.jsx(f,{size:"sm",intent:"secondary",children:"Cancel"})}),s.jsx(f,{disabled:!N||j,form:"update-password-form",size:"sm",children:"Update Password"})]})]})}function L(){return s.jsxs("div",{className:"space-y-5 p-7 text-center",children:[s.jsx(K,{className:"mx-auto h-[110px] w-[110px] fill-success-500"}),s.jsx("p",{className:"text-text-lg font-semibold text-theme-text-primary",children:"The password was updated successfully!"})]})}const W=a.object({fullName:a.union([a.string(),a.literal("")]),username:a.union([a.string(),a.literal("")]),email:a.union([a.string().email(),a.literal("")])}).refine(e=>e.fullName!==""||e.username!==""||e.email!=="");function X({user:e}){var h,u,t;const l=_(),{toast:d}=b(),n=i.useId(),x=i.useId(),p=i.useId(),{isPending:j,mutate:c}=v({onError(r){S(r)&&d({status:"error",emphasis:"subtle",icon:s.jsx(C,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:r.message,rounded:!0})},onSuccess:()=>{l.invalidateQueries({queryKey:["current-user"]}),l.invalidateQueries({queryKey:["users"]}),w(),d({status:"success",emphasis:"subtle",rounded:!0,description:"User updated successfully"})}}),{register:m,reset:w,handleSubmit:N,formState:{isValid:y}}=F({resolver:I(W),defaultValues:{email:void 0,fullName:void 0,username:void 0}});function g(r){const U={...r.fullName&&{full_name:r.fullName},...r.username&&{name:r.username},...r.email&&{email:r.email}};c(U)}return s.jsxs("div",{className:"w-full max-w-[600px]",children:[s.jsx("form",{onSubmit:N(g),children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:n,className:"text-text-sm",children:"Full Name"}),s.jsx(o,{placeholder:(h=e.body)==null?void 0:h.full_name,...m("fullName"),id:n,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:x,className:"text-text-sm",children:"Username"}),s.jsx(o,{...m("username"),placeholder:e.name,id:x,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:p,className:"text-text-sm",children:"Email"}),s.jsx(o,{placeholder:((u=e.metadata)==null?void 0:u.email)??void 0,...m("email"),id:p,className:"w-full"})]}),s.jsx("div",{className:"flex justify-end",children:s.jsx(f,{disabled:j||!y,size:"md",intent:"primary",children:"Update"})})]})}),s.jsx(G,{}),s.jsxs("p",{className:"mt-5 text-text-sm text-theme-text-secondary",children:["Created on ",s.jsx(R,{dateString:((t=e.body)==null?void 0:t.created)||""})]})]})}function ds(){const{data:e}=B();return s.jsxs(M,{className:"flex flex-col gap-5 p-5",children:[s.jsx("h1",{className:"text-text-xl font-semibold",children:"Profile"}),s.jsxs("div",{className:"flex justify-between",children:[e?s.jsx(X,{user:e}):s.jsx(P,{className:"h-[350px] w-full"}),e?s.jsx(Q,{size:"xxl",className:"ml-5 h-[140px] w-[140px]",type:"rounded",children:s.jsx(V,{className:"text-display-lg",size:"xxl",children:e.name[0]})}):s.jsx(P,{className:"h-[140px] w-[140px] rounded-rounded"})]})]})}export{ds as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{j as e}from"./@radix-C7hRs6Kx.js";import{u as o,A as i,a as d,g as c,b as x,S as a,c as n,d as m,B as f,r as u}from"./index-
|
1
|
+
import{j as e}from"./@radix-C7hRs6Kx.js";import{u as o,A as i,a as d,g as c,b as x,S as a,c as n,d as m,B as f,r as u}from"./index-D2iSHVZq.js";import{g as h}from"./login-command-CkqxPtV3.js";import{L as p}from"./@react-router-CNP6g_RL.js";import{C as j}from"./CodeSnippet-CvI6D0wx.js";import"./@tanstack-CSxjHCME.js";import"./@reactflow-CQi1Z1Wq.js";const v="/assets/cloud-squares-DeRLMopf.svg";function g(){var r,t,l;const{data:s}=o({throwOnError:!0});return e.jsx("div",{className:"w-full items-center border-b border-theme-border-moderate bg-white py-5",children:e.jsx("div",{className:"layout-container flex flex-col flex-wrap items-center justify-between md:flex-row",children:e.jsxs("div",{className:"flex flex-col items-center gap-5 md:flex-row",children:[s?e.jsxs(i,{size:"xxl",type:"square",children:[e.jsx(d,{alt:"Logo displayed for the server",src:c(((r=s.body)==null?void 0:r.server_name)||"default",64)}),e.jsx(x,{size:"xxl",children:((t=s.body)==null?void 0:t.server_name[0])||"D"})]}):e.jsx(a,{className:"h-[96px] w-[96px]"}),e.jsx("div",{children:e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row",children:[s?e.jsx("h1",{className:"mb-1 text-display-xs font-semibold",children:((l=s.body)==null?void 0:l.server_name)||"default"}):e.jsx(a,{className:"h-full w-8"}),e.jsx("div",{className:"flex flex-row flex-wrap gap-0.5",children:e.jsx(w,{})})]})})]})})})}function w(){const{data:s,isError:r,isPending:t}=n({throwOnError:!0});return r?null:t?e.jsx(a,{className:"w-6"}):e.jsxs("div",{className:"flex h-6 items-center gap-0.5 rounded-md border border-theme-border-moderate px-1 py-0.5 text-text-sm text-theme-text-secondary",children:[e.jsx(m,{className:"h-4 w-4 fill-theme-text-brand"}),s.version]})}function k(){return e.jsxs("div",{children:[e.jsx(g,{}),e.jsx("div",{className:"layout-container space-y-5 py-5",children:e.jsx(b,{})})]})}function b(){const{data:s}=n();return e.jsxs(f,{className:"flex flex-col-reverse overflow-hidden lg:flex-row",children:[e.jsxs("div",{className:"w-full px-7 py-5 lg:w-2/3",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Welcome to ZenML"}),e.jsxs("p",{className:"mt-2 text-text-lg text-theme-text-secondary",children:["You successfully installed ZenML dashboard. ",e.jsx("br",{}),"Now you can get started with your new ZenML server.",e.jsx("br",{}),"To get started"," ",e.jsx(p,{className:"link text-theme-text-brand",to:u.onboarding,children:"checkout the onboarding guide"}),"."]}),e.jsx("hr",{className:"mb-5 mt-5 w-[100px]"}),e.jsxs("div",{className:"",children:[e.jsx("p",{className:"mb-1 text-text-sm",children:"Copy your ZenML server URL"}),e.jsx("div",{className:"",children:e.jsx(j,{codeClasses:"truncate",className:"truncate",code:h((s==null?void 0:s.deployment_type)||"other")})})]})]}),e.jsx("div",{className:"flex w-full items-center justify-center bg-primary-50 lg:w-1/3",children:e.jsx("img",{alt:"illustration of different purple squares",src:v,className:"h-full w-full"})})]})}export{k as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{j as e}from"./@radix-C7hRs6Kx.js";import{B as r,V as n}from"./index-
|
1
|
+
import{j as e}from"./@radix-C7hRs6Kx.js";import{B as r,V as n}from"./index-D2iSHVZq.js";import{P as o}from"./ProBadge-Cp4hb1YT.js";import{P as i,a as l,b as c,c as m,d,e as x}from"./ProCta-EYoV9CvK.js";import{C as f}from"./CodeSnippet-CvI6D0wx.js";import{d as p}from"./@react-router-CNP6g_RL.js";import"./@tanstack-CSxjHCME.js";import"./@reactflow-CQi1Z1Wq.js";import"./check-DK77doTf.js";const u="/assets/acp-DOsXjFc7.webp";function h(){const[a]=p(),t=a.get("artifact");function s(){return t?`zenml artifact list --name='contains:${t}'`:"zenml artifact list"}return e.jsxs(r,{className:"flex flex-wrap justify-between p-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-text-xl font-semibold",children:"Staying Open Source? "}),e.jsx("p",{className:"text-theme-text-secondary",children:"No problem! Use this CLI command to list your artifacts"})]}),e.jsx(f,{code:s()})]})}function A(){return e.jsxs("div",{children:[e.jsxs(n,{className:"flex items-center gap-1",children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"Artifacts"}),e.jsx(o,{})]}),e.jsxs("div",{className:"layout-container space-y-5 py-5",children:[e.jsxs(i,{className:"relative overflow-y-hidden",children:[e.jsxs("div",{className:"w-full max-w-none space-y-5 lg:max-w-[900px]",children:[e.jsx(l,{children:"Advanced Artifact Management Features with ZenML Pro"}),e.jsx(c,{}),e.jsx(m,{features:[{title:"Artifact Control Plane Dashboard",subtitle:"Artifact management and monitoring"},{title:"Enterprise Security",subtitle:"Social SSO, RBAC, and User Management"},{title:"Managed ZenML Server",subtitle:"On your VPC or hosted on our infrastructure"},{title:"Advanced MLOps",subtitle:"CI/CD/CT, Model Control Plane and more"}]}),e.jsx(d,{})]}),e.jsx(x,{className:"absolute translate-x-[30%] translate-y-[15%] scale-[40%]",src:u,alt:"Screenshot of the ZenML Pro Artifact Control Plane"})]}),e.jsx(h,{})]})]})}export{A as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as c,j as e}from"./@radix-C7hRs6Kx.js";import{S as T}from"./plus-COjQg3AG.js";import{S as g}from"./refresh-CM5T3QeU.js";import{S as y,P as N}from"./SearchField-DMCywawn.js";import{L as k,r as x,T as L,E,G as F,H as _,J as p,h as o,M as v,S as m,A as D,b as H,a2 as z,a3 as M,a4 as R,aL as A,D as Q,w as q,x as B,af as I,aH as Z,Z as b,ac as $,K as G,z as h,X as K}from"./index-BygJE88j.js";import{a as S}from"./@tanstack-CSxjHCME.js";import{L as u,c as O,d as U}from"./@react-router-CNP6g_RL.js";import{D as C}from"./DisplayDate-CYVBBSgr.js";import{I as P}from"./InlineAvatar-Cpj0lVRQ.js";import{S as V}from"./CollapsibleCard-Dr5zb5T5.js";import{S as J}from"./Tabs-C2ufJX4t.js";import{u as X}from"./all-pipeline-runs-query-BUT1PiTp.js";import{g as W,E as Y}from"./ExecutionStatus-B-ysY113.js";import{s as ee}from"./index-8uhUi12k.js";import{C as se}from"./ComponentBadge-BgGnzcLu.js";import{S as te}from"./dots-horizontal-BGRJCPCs.js";import"./chevron-right-double-uNWbJT-C.js";import"./index-DR30v9MZ.js";import"./@reactflow-CQi1Z1Wq.js";import"./chevron-down-A-rmltmI.js";import"./ComponentIcon-B_7Y_oV-.js";import"./layout-h3cbx8WZ.js";import"./rocket-Cf-B-XOR.js";import"./NestedCollapsible-DbhKdWx-.js";import"./type-guards-CaeD8wHO.js";import"./CodeSnippet-Di-loaZu.js";import"./check-circle-mvyzYvIW.js";import"./stack-detail-query-ihiJr6nq.js";const ae=t=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 4C14.4477 4 14 3.55228 14 3C14 2.44772 14.4477 2 15 2H21C21.5523 2 22 2.44772 22 3V9C22 9.55228 21.5523 10 21 10C20.4477 10 20 9.55228 20 9V5.41421L14.7071 10.7071C14.3166 11.0976 13.6834 11.0976 13.2929 10.7071C12.9024 10.3166 12.9024 9.68342 13.2929 9.29289L18.5858 4H15ZM10.7071 13.2929C11.0976 13.6834 11.0976 14.3166 10.7071 14.7071L5.41421 20H9C9.55228 20 10 20.4477 10 21C10 21.5523 9.55228 22 9 22H3C2.73478 22 2.48043 21.8946 2.29289 21.7071C2.10536 21.5196 2 21.2652 2 21L2 15C2 14.4477 2.44772 14 3 14C3.55229 14 4 14.4477 4 15L4 18.5858L9.29289 13.2929C9.68342 12.9024 10.3166 12.9024 10.7071 13.2929Z"})),re=[{id:"name",header:"Run",accessorFn:t=>{var s;return{id:t.id,name:t.name,status:(s=t.body)==null?void 0:s.status}},cell:({getValue:t})=>{const{name:s,status:a,id:r}=t();return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(k,{className:`h-5 w-5 ${W(a)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(u,{to:x.runs.detail(r),className:"flex items-center gap-1",children:e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:s})}),e.jsx(L,{children:e.jsxs(E,{children:[e.jsx(F,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(Y,{status:a})}),e.jsx(_,{className:"z-20 capitalize",children:a})]})}),e.jsx(p,{copyText:s})]}),e.jsxs(u,{to:x.runs.detail(r),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:r.split("-")[0]}),e.jsx(p,{copyText:r})]})]})]})}},{id:"created-at",header:"Created at",accessorFn:t=>{var s;return{date:(s=t.body)==null?void 0:s.created}},cell:({getValue:t})=>{const{date:s}=t();return e.jsx("div",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(C,{dateString:s})})}}];function ne({componentId:t}){const[s,a]=c.useState(void 0),[r,n]=c.useState(1),j={name:s,page:r},{data:i,refetch:l}=X({params:{...j,stack_component:t,sort_by:"desc:updated"}});return e.jsx("section",{children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-y-4",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(y,{inMemoryHandler:d=>{n(1),d||a(void 0),a(`contains:${d}`)},searchParams:{}})}),e.jsx("div",{className:"flex items-center justify-between gap-2",children:e.jsxs(o,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>l(),children:[e.jsx(g,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:i?e.jsx(v,{columns:re,data:i.items}):e.jsx(m,{className:"h-[500px] w-full"})}),i?i.total_pages>1&&e.jsx(N,{inMemoryHandler:n,searchParams:{},paginate:i}):e.jsx(m,{className:"h-[36px] w-[300px]"})]})]})})}function ie(){return[{id:"name",header:"Stack",accessorFn:t=>t.name,cell:({row:t})=>{const{name:s,id:a}=t.original;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(D,{type:"square",size:"md",children:e.jsx(H,{size:"md",children:s[0]})}),e.jsxs("div",{children:[e.jsx("div",{className:"flex items-center gap-1",children:e.jsx("h2",{className:"text-text-md font-semibold",children:s})}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:a.split("-")[0]}),e.jsx(p,{copyText:a})]})]})]})}},{id:"author",header:"Author",accessorFn:t=>{var s;return{author:(s=t.body)==null?void 0:s.user}},cell:({getValue:t})=>{const{author:s}=t();return s?e.jsx(P,{username:s.name||"default"}):null}},{id:"created",header:"Created at",accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.created},cell:({getValue:t})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(C,{dateString:t()})})}]}function le({componentId:t}){const[s,a]=c.useState(void 0),[r,n]=c.useState(1),j={name:s,page:r},{refetch:i,data:l}=S(ee.stackList({...j,component_id:t,sort_by:"desc:updated"}));return e.jsx("section",{children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-y-4",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(y,{inMemoryHandler:d=>{n(1),d||a(void 0),a(`contains:${d}`)},searchParams:{}})}),e.jsx("div",{className:"flex items-center justify-between gap-2",children:e.jsxs(o,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>i(),children:[e.jsx(g,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:l?e.jsx(v,{columns:ie(),data:l.items}):e.jsx(m,{className:"h-[500px] w-full"})}),l?l.total_pages>1&&e.jsx(N,{inMemoryHandler:n,searchParams:{},paginate:l}):e.jsx(m,{className:"h-[36px] w-[300px]"})]})]})})}function w({children:t,onOpenChange:s,componentId:a}){return e.jsxs(z,{onOpenChange:s,children:[e.jsx(M,{asChild:!0,children:t}),e.jsxs(R,{className:"w-[1000px] overflow-y-auto",children:[e.jsx(V,{className:"gap-0.5",children:e.jsx(o,{className:"flex aspect-square items-center justify-center p-0",intent:"secondary",asChild:!0,emphasis:"minimal",children:e.jsxs(u,{to:x.components.detail(a),children:[e.jsx(ae,{className:"h-5 w-5 shrink-0 fill-neutral-500"}),e.jsx("span",{className:"sr-only",children:"Expand component detail to page"})]})})}),e.jsxs("div",{className:"@container",children:[e.jsx(A,{isPanel:!0,componentId:a}),e.jsx(J,{isPanel:!0,runsTabContent:e.jsx(ne,{componentId:a}),stacksTabContent:e.jsx(le,{componentId:a}),componentId:a})]})]})]})}function ce({id:t}){const s=O();return e.jsxs(Q,{children:[e.jsx(q,{asChild:!0,children:e.jsx(o,{intent:"secondary",emphasis:"minimal",className:"flex aspect-square items-center justify-center p-0",children:e.jsx(te,{className:"h-4 w-4 shrink-0 fill-theme-text-tertiary"})})}),e.jsx(B,{align:"end",sideOffset:7,children:e.jsxs(I,{onSelect:()=>s(x.components.edit(t)),className:"cursor-pointer space-x-2",children:[e.jsx(Z,{className:"h-3 w-3 fill-neutral-400"}),e.jsx("p",{children:"Edit"})]})})]})}function oe(){return[{id:"name",header:"Component",accessorKey:"name",cell:({row:t})=>{var r;const s=t.original.id,a=t.original.name;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx("img",{width:32,height:32,src:b(((r=t.original.body)==null?void 0:r.logo_url)||""),alt:"Flavor Icon"}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(w,{componentId:s,children:e.jsx("button",{children:e.jsx("h2",{className:"text-text-md font-semibold",children:a})})}),e.jsx(p,{copyText:a})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(w,{componentId:s,children:e.jsx("button",{className:"text-text-xs text-theme-text-secondary",children:s.split("-")[0]})}),e.jsx(p,{copyText:s})]})]})]})}},{id:"type",header:"Component Type",accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.type},cell:({row:t})=>{var a;const s=((a=t.original.body)==null?void 0:a.type)||"orchestrator";return e.jsx(se,{type:s,children:$(s)})}},{id:"flavor",header:"Flavor",accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.flavor_name},cell:({row:t})=>{var a,r;const s=(a=t.original.body)==null?void 0:a.flavor_name;return e.jsxs(G,{rounded:!1,className:"w-fit gap-1 text-theme-text-primary",color:"grey",emphasis:"minimal",children:[e.jsx("img",{width:20,height:20,src:b(((r=t.original.body)==null?void 0:r.logo_url)||""),alt:"Flavor Icon of Component"}),e.jsx("p",{children:s})]})}},{id:"author",header:"Author",accessorFn:t=>{var s,a;return(a=(s=t.body)==null?void 0:s.user)==null?void 0:a.name},cell:({row:t})=>{var a,r;const s=(r=(a=t.original.body)==null?void 0:a.user)==null?void 0:r.name;return s?e.jsx(P,{username:s}):null}},{id:"created",header:"Created at",accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.created},cell:({row:t})=>{var s;return e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(C,{dateString:((s=t.original.body)==null?void 0:s.created)||""})})}},{id:"admin_actions",header:"",cell:({row:t})=>e.jsx(ce,{id:t.original.id})}]}const f=1,me=h.object({page:h.coerce.number().min(f).optional().default(f).catch(f),name:h.string().optional(),operator:h.enum(["and","or"]).optional()});function de(){const[t]=U(),{page:s,name:a,operator:r}=me.parse({page:t.get("page")||void 0,name:t.get("name")||void 0});return{page:s,name:a,logical_operator:r}}function xe(){const t=de(),s=S({...K.componentList({...t,sort_by:"desc:updated"}),throwOnError:!0}),a=oe();if(s.isError)return null;const{data:r,refetch:n}=s;return e.jsx("section",{children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-y-4",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(y,{searchParams:t})}),e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs(o,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>n(),children:[e.jsx(g,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]}),e.jsx(o,{size:"md",asChild:!0,children:e.jsxs(u,{to:x.components.create,children:[e.jsx(T,{className:"h-5 w-5 shrink-0 fill-white"}),e.jsx("span",{children:"New Component"})]})})]})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:r?e.jsx(v,{columns:a,data:r.items}):e.jsx(m,{className:"h-[500px] w-full"})}),r?r.total_pages>1&&e.jsx(N,{searchParams:t,paginate:r}):e.jsx(m,{className:"h-[36px] w-[300px]"})]})]})})}function Be(){return e.jsx(xe,{})}export{Be as default};
|
1
|
+
import{r as c,j as e}from"./@radix-C7hRs6Kx.js";import{S as T}from"./plus-COjQg3AG.js";import{S as g}from"./refresh-CM5T3QeU.js";import{S as y,P as N}from"./SearchField-D-h6jXyg.js";import{L as k,r as x,T as L,E,G as F,H as _,J as p,h as o,M as v,S as m,A as D,b as H,a2 as z,a3 as M,a4 as R,aL as A,D as Q,w as q,x as B,af as I,aH as Z,Z as b,ac as $,K as G,z as h,X as K}from"./index-D2iSHVZq.js";import{a as S}from"./@tanstack-CSxjHCME.js";import{L as u,c as O,d as U}from"./@react-router-CNP6g_RL.js";import{D as C}from"./DisplayDate-CYVBBSgr.js";import{I as P}from"./InlineAvatar-Cfz4WSLK.js";import{S as V}from"./CollapsibleCard-D20FtrzC.js";import{S as J}from"./Tabs-DxQ8PDOD.js";import{u as X}from"./all-pipeline-runs-query-BGASHYtF.js";import{g as W,E as Y}from"./ExecutionStatus-XrvT2r65.js";import{s as ee}from"./index-CrhdX_qG.js";import{C as se}from"./ComponentBadge-DKw7Gndh.js";import{S as te}from"./dots-horizontal-BGRJCPCs.js";import"./chevron-right-double-uNWbJT-C.js";import"./index-DR30v9MZ.js";import"./@reactflow-CQi1Z1Wq.js";import"./chevron-down-A-rmltmI.js";import"./ComponentIcon-ils7uNAk.js";import"./layout-h3cbx8WZ.js";import"./rocket-Cf-B-XOR.js";import"./NestedCollapsible-Dor-bi98.js";import"./type-guards-CaeD8wHO.js";import"./CodeSnippet-CvI6D0wx.js";import"./check-circle-mvyzYvIW.js";import"./stack-detail-query-BAcZJrN3.js";const ae=t=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 4C14.4477 4 14 3.55228 14 3C14 2.44772 14.4477 2 15 2H21C21.5523 2 22 2.44772 22 3V9C22 9.55228 21.5523 10 21 10C20.4477 10 20 9.55228 20 9V5.41421L14.7071 10.7071C14.3166 11.0976 13.6834 11.0976 13.2929 10.7071C12.9024 10.3166 12.9024 9.68342 13.2929 9.29289L18.5858 4H15ZM10.7071 13.2929C11.0976 13.6834 11.0976 14.3166 10.7071 14.7071L5.41421 20H9C9.55228 20 10 20.4477 10 21C10 21.5523 9.55228 22 9 22H3C2.73478 22 2.48043 21.8946 2.29289 21.7071C2.10536 21.5196 2 21.2652 2 21L2 15C2 14.4477 2.44772 14 3 14C3.55229 14 4 14.4477 4 15L4 18.5858L9.29289 13.2929C9.68342 12.9024 10.3166 12.9024 10.7071 13.2929Z"})),re=[{id:"name",header:"Run",accessorFn:t=>{var s;return{id:t.id,name:t.name,status:(s=t.body)==null?void 0:s.status}},cell:({getValue:t})=>{const{name:s,status:a,id:r}=t();return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(k,{className:`h-5 w-5 ${W(a)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(u,{to:x.runs.detail(r),className:"flex items-center gap-1",children:e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:s})}),e.jsx(L,{children:e.jsxs(E,{children:[e.jsx(F,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(Y,{status:a})}),e.jsx(_,{className:"z-20 capitalize",children:a})]})}),e.jsx(p,{copyText:s})]}),e.jsxs(u,{to:x.runs.detail(r),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:r.split("-")[0]}),e.jsx(p,{copyText:r})]})]})]})}},{id:"created-at",header:"Created at",accessorFn:t=>{var s;return{date:(s=t.body)==null?void 0:s.created}},cell:({getValue:t})=>{const{date:s}=t();return e.jsx("div",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(C,{dateString:s})})}}];function ne({componentId:t}){const[s,a]=c.useState(void 0),[r,n]=c.useState(1),j={name:s,page:r},{data:i,refetch:l}=X({params:{...j,stack_component:t,sort_by:"desc:updated"}});return e.jsx("section",{children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-y-4",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(y,{inMemoryHandler:d=>{n(1),d||a(void 0),a(`contains:${d}`)},searchParams:{}})}),e.jsx("div",{className:"flex items-center justify-between gap-2",children:e.jsxs(o,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>l(),children:[e.jsx(g,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:i?e.jsx(v,{columns:re,data:i.items}):e.jsx(m,{className:"h-[500px] w-full"})}),i?i.total_pages>1&&e.jsx(N,{inMemoryHandler:n,searchParams:{},paginate:i}):e.jsx(m,{className:"h-[36px] w-[300px]"})]})]})})}function ie(){return[{id:"name",header:"Stack",accessorFn:t=>t.name,cell:({row:t})=>{const{name:s,id:a}=t.original;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(D,{type:"square",size:"md",children:e.jsx(H,{size:"md",children:s[0]})}),e.jsxs("div",{children:[e.jsx("div",{className:"flex items-center gap-1",children:e.jsx("h2",{className:"text-text-md font-semibold",children:s})}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:a.split("-")[0]}),e.jsx(p,{copyText:a})]})]})]})}},{id:"author",header:"Author",accessorFn:t=>{var s;return{author:(s=t.body)==null?void 0:s.user}},cell:({getValue:t})=>{const{author:s}=t();return s?e.jsx(P,{username:s.name||"default"}):null}},{id:"created",header:"Created at",accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.created},cell:({getValue:t})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(C,{dateString:t()})})}]}function le({componentId:t}){const[s,a]=c.useState(void 0),[r,n]=c.useState(1),j={name:s,page:r},{refetch:i,data:l}=S(ee.stackList({...j,component_id:t,sort_by:"desc:updated"}));return e.jsx("section",{children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-y-4",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(y,{inMemoryHandler:d=>{n(1),d||a(void 0),a(`contains:${d}`)},searchParams:{}})}),e.jsx("div",{className:"flex items-center justify-between gap-2",children:e.jsxs(o,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>i(),children:[e.jsx(g,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:l?e.jsx(v,{columns:ie(),data:l.items}):e.jsx(m,{className:"h-[500px] w-full"})}),l?l.total_pages>1&&e.jsx(N,{inMemoryHandler:n,searchParams:{},paginate:l}):e.jsx(m,{className:"h-[36px] w-[300px]"})]})]})})}function w({children:t,onOpenChange:s,componentId:a}){return e.jsxs(z,{onOpenChange:s,children:[e.jsx(M,{asChild:!0,children:t}),e.jsxs(R,{className:"w-[1000px] overflow-y-auto",children:[e.jsx(V,{className:"gap-0.5",children:e.jsx(o,{className:"flex aspect-square items-center justify-center p-0",intent:"secondary",asChild:!0,emphasis:"minimal",children:e.jsxs(u,{to:x.components.detail(a),children:[e.jsx(ae,{className:"h-5 w-5 shrink-0 fill-neutral-500"}),e.jsx("span",{className:"sr-only",children:"Expand component detail to page"})]})})}),e.jsxs("div",{className:"@container",children:[e.jsx(A,{isPanel:!0,componentId:a}),e.jsx(J,{isPanel:!0,runsTabContent:e.jsx(ne,{componentId:a}),stacksTabContent:e.jsx(le,{componentId:a}),componentId:a})]})]})]})}function ce({id:t}){const s=O();return e.jsxs(Q,{children:[e.jsx(q,{asChild:!0,children:e.jsx(o,{intent:"secondary",emphasis:"minimal",className:"flex aspect-square items-center justify-center p-0",children:e.jsx(te,{className:"h-4 w-4 shrink-0 fill-theme-text-tertiary"})})}),e.jsx(B,{align:"end",sideOffset:7,children:e.jsxs(I,{onSelect:()=>s(x.components.edit(t)),className:"cursor-pointer space-x-2",children:[e.jsx(Z,{className:"h-3 w-3 fill-neutral-400"}),e.jsx("p",{children:"Edit"})]})})]})}function oe(){return[{id:"name",header:"Component",accessorKey:"name",cell:({row:t})=>{var r;const s=t.original.id,a=t.original.name;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx("img",{width:32,height:32,src:b(((r=t.original.body)==null?void 0:r.logo_url)||""),alt:"Flavor Icon"}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(w,{componentId:s,children:e.jsx("button",{children:e.jsx("h2",{className:"text-text-md font-semibold",children:a})})}),e.jsx(p,{copyText:a})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(w,{componentId:s,children:e.jsx("button",{className:"text-text-xs text-theme-text-secondary",children:s.split("-")[0]})}),e.jsx(p,{copyText:s})]})]})]})}},{id:"type",header:"Component Type",accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.type},cell:({row:t})=>{var a;const s=((a=t.original.body)==null?void 0:a.type)||"orchestrator";return e.jsx(se,{type:s,children:$(s)})}},{id:"flavor",header:"Flavor",accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.flavor_name},cell:({row:t})=>{var a,r;const s=(a=t.original.body)==null?void 0:a.flavor_name;return e.jsxs(G,{rounded:!1,className:"w-fit gap-1 text-theme-text-primary",color:"grey",emphasis:"minimal",children:[e.jsx("img",{width:20,height:20,src:b(((r=t.original.body)==null?void 0:r.logo_url)||""),alt:"Flavor Icon of Component"}),e.jsx("p",{children:s})]})}},{id:"author",header:"Author",accessorFn:t=>{var s,a;return(a=(s=t.body)==null?void 0:s.user)==null?void 0:a.name},cell:({row:t})=>{var a,r;const s=(r=(a=t.original.body)==null?void 0:a.user)==null?void 0:r.name;return s?e.jsx(P,{username:s}):null}},{id:"created",header:"Created at",accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.created},cell:({row:t})=>{var s;return e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(C,{dateString:((s=t.original.body)==null?void 0:s.created)||""})})}},{id:"admin_actions",header:"",cell:({row:t})=>e.jsx(ce,{id:t.original.id})}]}const f=1,me=h.object({page:h.coerce.number().min(f).optional().default(f).catch(f),name:h.string().optional(),operator:h.enum(["and","or"]).optional()});function de(){const[t]=U(),{page:s,name:a,operator:r}=me.parse({page:t.get("page")||void 0,name:t.get("name")||void 0});return{page:s,name:a,logical_operator:r}}function xe(){const t=de(),s=S({...K.componentList({...t,sort_by:"desc:updated"}),throwOnError:!0}),a=oe();if(s.isError)return null;const{data:r,refetch:n}=s;return e.jsx("section",{children:e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-y-4",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(y,{searchParams:t})}),e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs(o,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>n(),children:[e.jsx(g,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]}),e.jsx(o,{size:"md",asChild:!0,children:e.jsxs(u,{to:x.components.create,children:[e.jsx(T,{className:"h-5 w-5 shrink-0 fill-white"}),e.jsx("span",{children:"New Component"})]})})]})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:r?e.jsx(v,{columns:a,data:r.items}):e.jsx(m,{className:"h-[500px] w-full"})}),r?r.total_pages>1&&e.jsx(N,{searchParams:t,paginate:r}):e.jsx(m,{className:"h-[36px] w-[300px]"})]})]})})}function Be(){return e.jsx(xe,{})}export{Be as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as l,j as e}from"./@radix-C7hRs6Kx.js";import{o as S,p as T,q as M,j as _,s as k,F as N,f as B,t as O,v as F,h,D as z,w as I,x as Z,C as U,y as $,r as f,T as q,E as H,G as V,H as Q,J as y,K as G,L as D,z as c,M as K,S as w,B as J,N as W,O as X,P as Y,Q as ee,R as se,U as g,n as te,V as ae}from"./index-BygJE88j.js";import{L as j,d as b,c as ne}from"./@react-router-CNP6g_RL.js";import{S as re}from"./refresh-CM5T3QeU.js";import{S as ie,P as le}from"./SearchField-DMCywawn.js";import{q as oe,b as ce,c as de,a as pe}from"./@tanstack-CSxjHCME.js";import{S as R}from"./trash-BWSZ7NRK.js";import{D as E,a as L}from"./DeleteAlertDialog-9RTDnEx3.js";import{g as ue,E as me,a as he}from"./ExecutionStatus-B-ysY113.js";import{S as xe}from"./dots-horizontal-BGRJCPCs.js";import{A as fe}from"./AlertDialogDropdownItem-CRZjthRL.js";import{R as ge}from"./RunsBody-DexNouV4.js";import{R as je}from"./RunSelector-j0C_TPVp.js";import{I as Ce}from"./Infobox-Bai0JtFs.js";import"./@reactflow-CQi1Z1Wq.js";import"./chevron-right-double-uNWbJT-C.js";import"./index-DR30v9MZ.js";import"./zod-C0xYeTvL.js";import"./index.esm-D7jFlf5N.js";import"./check-circle-mvyzYvIW.js";import"./all-pipeline-runs-query-BUT1PiTp.js";import"./DisplayDate-CYVBBSgr.js";import"./InlineAvatar-Cpj0lVRQ.js";import"./delete-run-DzcYxUnd.js";const be=s=>l.createElement("svg",{viewBox:"0 0 60 60",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("g",{id:"dataflow-02"},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5 7.5C11.1193 7.5 10 8.61929 10 10C10 11.3807 11.1193 12.5 12.5 12.5C13.8807 12.5 15 11.3807 15 10C15 8.61929 13.8807 7.5 12.5 7.5ZM5 10C5 5.85786 8.35787 2.5 12.5 2.5C15.7655 2.5 18.5436 4.58702 19.5732 7.5L40.4268 7.5C41.4564 4.58702 44.2345 2.5 47.5 2.5C51.6421 2.5 55 5.85786 55 10C55 14.1421 51.6421 17.5 47.5 17.5C44.2345 17.5 41.4564 15.413 40.4268 12.5L32.5 12.5V27.5H40.4268C41.4564 24.587 44.2345 22.5 47.5 22.5C51.6421 22.5 55 25.8579 55 30C55 34.1421 51.6421 37.5 47.5 37.5C44.2345 37.5 41.4564 35.413 40.4268 32.5H32.5V38C32.5 40.1415 32.502 41.5972 32.5939 42.7224C32.6834 43.8185 32.8457 44.379 33.045 44.77C33.5243 45.7108 34.2892 46.4757 35.2301 46.955C35.6211 47.1543 36.1816 47.3166 37.2776 47.4061C38.103 47.4736 39.1062 47.4926 40.4275 47.4979C41.4577 44.586 44.2352 42.5 47.5 42.5C51.6421 42.5 55 45.8579 55 50C55 54.1421 51.6421 57.5 47.5 57.5C44.2338 57.5 41.4552 55.4121 40.4261 52.4982C39.0579 52.4929 37.8787 52.4719 36.8704 52.3895C35.4652 52.2747 34.1734 52.0283 32.9601 51.4101C31.0785 50.4513 29.5487 48.9215 28.5899 47.0399C27.9717 45.8266 27.7253 44.5348 27.6105 43.1296C27.4999 41.7766 27.5 40.1157 27.5 38.1032V12.5L19.5732 12.5C18.5436 15.413 15.7655 17.5 12.5 17.5C8.35787 17.5 5 14.1421 5 10ZM47.5 7.5C46.1193 7.5 45 8.61929 45 10C45 11.3807 46.1193 12.5 47.5 12.5C48.8807 12.5 50 11.3807 50 10C50 8.61929 48.8807 7.5 47.5 7.5ZM47.5 27.5C46.1193 27.5 45 28.6193 45 30C45 31.3807 46.1193 32.5 47.5 32.5C48.8807 32.5 50 31.3807 50 30C50 28.6193 48.8807 27.5 47.5 27.5ZM47.5 47.5C46.1193 47.5 45 48.6193 45 50C45 51.3807 46.1193 52.5 47.5 52.5C48.8807 52.5 50 51.3807 50 50C50 48.6193 48.8807 47.5 47.5 47.5Z"})));async function ve({params:s}){const a=S(T.pipelines.all+"?"+M(s)),t=await _(a,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.status===404&&k(),!t.ok)throw new N({message:"Error while fetching pipelines",status:t.status,statusText:t.statusText});return t.json()}const v={all:["pipelines"],pipelineList:s=>oe({queryKey:[...v.all,s],queryFn:async()=>ve({params:s})})};async function Pe({pipelineId:s}){const a=S(T.pipelines.detail(s)),t=await fetch(a,{method:"DELETE",credentials:"include",headers:{"Content-Type":"application/json"}});if(!t.ok){const r=await t.json().then(n=>n.detail).catch(()=>`Failed to delete pipeline ${s}`);throw new N({status:t.status,statusText:t.statusText,message:r})}return t.json()}function ye(s){return ce({mutationFn:Pe,...s})}const A=l.createContext(null);function we({children:s}){const[a,t]=l.useState([]),r=de(),{toast:n}=B(),i=ye(),o=async d=>{try{const p=d.map(x=>i.mutateAsync({pipelineId:x}));await Promise.all(p),n({description:"Deleted successfully.",status:"success",emphasis:"subtle",rounded:!0}),await r.invalidateQueries({queryKey:v.all}),t([])}catch(p){console.error("Failed to delete some pipelines:",p)}};return e.jsx(A.Provider,{value:{selectedPipelines:a,setSelectedPipelines:t,bulkDeletePipelines:o},children:s})}function m(){const s=l.useContext(A);if(!s)throw new Error("usePipelinesSelectorContext must be used within a PipelinesSelectorProvider");return s}function Se(){const[s,a]=l.useState(!1),{bulkDeletePipelines:t,selectedPipelines:r}=m();async function n(){await t(r),a(!1)}return e.jsxs(O,{open:s,onOpenChange:a,children:[e.jsx(F,{asChild:!0,children:e.jsxs(h,{className:"rounded-sharp border-y-0 bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(R,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(E,{title:`Delete Pipeline${r.length>=2?"s":""}`,handleDelete:n,children:e.jsxs(L,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function Te(){const{selectedPipelines:s}=m();return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:`${s==null?void 0:s.length} Pipeline${(s==null?void 0:s.length)>1?"s":""} selected`}),e.jsx(Se,{})]})}function Ne({id:s}){const[a,t]=l.useState(!1),[r,n]=l.useState(!1),i=l.useRef(null),o=l.useRef(null),{bulkDeletePipelines:d}=m();async function p(){await d([s]),P(!1)}function x(){o.current=i.current}function P(u){if(u===!1){n(!1),setTimeout(()=>{t(u)},200);return}t(u)}return e.jsxs(z,{onOpenChange:n,open:r,children:[e.jsx(I,{ref:i,children:e.jsx(xe,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(Z,{hidden:a,onCloseAutoFocus:u=>{o.current&&(o.current.focus(),o.current=null,u.preventDefault())},align:"end",sideOffset:7,children:e.jsx(fe,{onSelect:x,open:a,onOpenChange:P,triggerChildren:"Delete",icon:e.jsx(R,{fill:"red"}),children:e.jsx(E,{title:"Delete Pipeline",handleDelete:p,children:e.jsxs(L,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})})]})}const De=({id:s})=>{const{selectedPipelines:a,setSelectedPipelines:t}=m(),r=(n,i)=>{t(o=>n?[...o,i]:o.filter(d=>d!==i))};return e.jsx(U,{id:s,onCheckedChange:n=>r(n,s),checked:a.includes(s),className:"h-3 w-3"})};function Re(){return[{id:"check",header:"",meta:{width:"1%"},cell:({row:s})=>e.jsx(De,{id:s.original.id})},{id:"name",header:"Pipeline",cell:({row:s})=>{var a,t,r;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx($,{className:`h-5 w-5 ${ue((a=s.original.body)==null?void 0:a.latest_run_status)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(j,{to:f.pipelines.namespace(encodeURIComponent(s.original.name)),className:"flex items-center gap-1",children:e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:s.original.name})}),e.jsx(q,{children:e.jsxs(H,{children:[e.jsx(V,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(me,{status:(t=s.original.body)==null?void 0:t.latest_run_status})}),e.jsx(Q,{className:"z-20 capitalize",children:(r=s.original.body)==null?void 0:r.latest_run_status})]})}),e.jsx(y,{copyText:s.original.name})]}),e.jsxs(j,{to:f.pipelines.namespace(encodeURIComponent(s.original.name)),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:s.original.id.split("-")[0]}),e.jsx(y,{copyText:s.original.id})]})]})]})}},{id:"latest-run",header:"Latest Run",accessorFn:s=>{var a,t;return{status:(a=s.body)==null?void 0:a.latest_run_status,runId:(t=s.body)==null?void 0:t.latest_run_id}},cell:({getValue:s})=>{const{runId:a,status:t}=s();return!a||!t?e.jsx("div",{children:"No run"}):e.jsx(j,{to:f.runs.detail(a),children:e.jsxs(G,{emphasis:"subtle",rounded:!1,className:"inline-flex items-center gap-0.5",color:he(t),children:[e.jsx(D,{className:"h-3 w-3 fill-current"}),a==null?void 0:a.split("-")[0]]})})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:s})=>e.jsx(Ne,{id:s.original.id})}]}const C=1,Ee=c.object({page:c.coerce.number().min(C).optional().default(C).catch(C),name:c.string().optional(),operator:c.enum(["and","or"]).optional()});function Le(){const[s]=b(),{page:a,name:t,operator:r}=Ee.parse({page:s.get("page")||void 0,name:s.get("name")||void 0,operator:s.get("operator")||void 0});return{page:a,name:t,logical_operator:r}}function Ae(){const s=Le(),{selectedPipelines:a}=m(),{data:t,refetch:r}=pe({...v.pipelineList({...s,sort_by:"desc:latest_run"}),throwOnError:!0});return e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[a.length?e.jsx(Te,{}):e.jsx(ie,{searchParams:s}),e.jsx("div",{className:"flex justify-between",children:e.jsxs(h,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>r(),children:[e.jsx(re,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:t?e.jsx(K,{columns:Re(),data:t.items}):e.jsx(w,{className:"h-[500px] w-full"})}),t?t.total_pages>1&&e.jsx(le,{searchParams:s,paginate:t}):e.jsx(w,{className:"h-[36px] w-[300px]"})]})]})}const Me=c.object({tab:c.enum(["pipelines","runs","templates"]).optional().default("pipelines").catch("pipelines")});function _e(){const[s]=b(),{tab:a}=Me.parse({tab:s.get("tab")||void 0});return a}const ke="/assets/templates-1S_8WeSK.webp";function Be(){return e.jsxs("div",{className:"layout-container space-y-5",children:[e.jsx(Oe,{}),e.jsx(ze,{})]})}function Oe(){return e.jsx(Ce,{children:e.jsxs("div",{className:"flex w-full flex-wrap items-center gap-x-2 gap-y-0.5 text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"This is a ZenML Pro feature. "}),e.jsx("p",{children:"Upgrade to ZenML Pro to access the Templates and save settings and run pipelines from the dashboard."})]})})}const Fe=["Run pipelines from the dashboard with Templates","Re-run a pipeline easily from the UI","Model and Artifact Control Plane Dashboard","Managed ZenML server on your VPC or hosted on our servers","Social SSO, RBAC, and User Management","CI/CD/CT, and more!"];function ze(){return e.jsxs(J,{className:"relative overflow-hidden px-7 py-5",children:[e.jsxs("div",{className:"max-w-[450px] space-y-4",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Access Advanced Template Features with ZenML Pro"}),e.jsx("ul",{className:"space-y-2",children:Fe.map((s,a)=>e.jsx("li",{className:"text-text-md text-theme-text-secondary",children:s},a))}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(h,{size:"md",asChild:!0,children:e.jsx("a",{href:"https://cloud.zenml.io/signup",target:"_blank",rel:"noopener noreferrer",children:"Upgrade to ZenML Pro"})}),e.jsx(h,{emphasis:"minimal",size:"md",children:e.jsx("a",{href:"https://www.zenml.io/pro",target:"_blank",rel:"noopener noreferrer",children:"Learn more"})})]})]}),e.jsx("img",{className:"absolute right-0 top-0 hidden translate-x-[30%] scale-75 md:translate-y-[30%] lg:block xl:-translate-y-[5%]",src:ke,alt:"Screenshot of Zenml Pro Templates Feature"})]})}const Ie=[{value:"pipelines",label:"Pipelines",icon:be},{value:"runs",label:"Runs",icon:D},{value:"templates",label:"Templates",icon:Y}];function Ze(){const[s]=b(),a=_e(),t=ne();l.useEffect(()=>{if(!s.get("tab")){const i=new URLSearchParams(s);i.set("tab","pipelines"),t(`?${i.toString()}`,{replace:!0})}},[t,s]);function r(n){const i=new URLSearchParams;i.set("tab",n),t(`?${i.toString()}`)}return e.jsx("div",{className:"p-5",children:e.jsxs(W,{onValueChange:r,value:a,children:[e.jsx(X,{children:Ie.map(n=>e.jsxs(ee,{className:"flex items-center gap-2 text-text-md",value:n.value.toLowerCase(),children:[e.jsx(n.icon,{className:`h-5 w-5 ${a===n.value?"fill-primary-400":"fill-theme-text-tertiary"}`}),n.label,n.value==="templates"&&e.jsx(se,{className:"rounded-sm font-semibold text-primary-500",color:"purple",size:"sm",children:"New"})]},n.value))}),e.jsx(g,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"pipelines",children:e.jsx(we,{children:e.jsx(Ae,{})})}),e.jsx(g,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"runs",children:e.jsx(je,{children:e.jsx(ge,{})})}),e.jsx(g,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"templates",children:e.jsx(Be,{})})]})})}function us(){const{setCurrentBreadcrumbData:s}=te();return l.useEffect(()=>{s({segment:"pipelines",data:null})},[]),e.jsxs("div",{children:[e.jsx(ae,{children:e.jsx("h1",{className:"text-display-xs font-semibold",children:"Pipelines"})}),e.jsx(Ze,{})]})}export{us as default};
|
1
|
+
import{r as l,j as e}from"./@radix-C7hRs6Kx.js";import{o as S,p as T,q as M,j as _,s as k,F as N,f as B,t as O,v as F,h,D as z,w as I,x as Z,C as U,y as $,r as f,T as q,E as H,G as V,H as Q,J as y,K as G,L as D,z as c,M as K,S as w,B as J,N as W,O as X,P as Y,Q as ee,R as se,U as g,n as te,V as ae}from"./index-D2iSHVZq.js";import{L as j,d as b,c as ne}from"./@react-router-CNP6g_RL.js";import{S as re}from"./refresh-CM5T3QeU.js";import{S as ie,P as le}from"./SearchField-D-h6jXyg.js";import{q as oe,b as ce,c as de,a as pe}from"./@tanstack-CSxjHCME.js";import{S as R}from"./trash-BWSZ7NRK.js";import{D as E,a as L}from"./DeleteAlertDialog-DVvXt-S6.js";import{g as ue,E as me,a as he}from"./ExecutionStatus-XrvT2r65.js";import{S as xe}from"./dots-horizontal-BGRJCPCs.js";import{A as fe}from"./AlertDialogDropdownItem-BG7-Ki1L.js";import{R as ge}from"./RunsBody-W4WHf-sq.js";import{R as je}from"./RunSelector-BLuBYNJt.js";import{I as Ce}from"./Infobox-D9k5TFH4.js";import"./@reactflow-CQi1Z1Wq.js";import"./chevron-right-double-uNWbJT-C.js";import"./index-DR30v9MZ.js";import"./zod-C0xYeTvL.js";import"./index.esm-D7jFlf5N.js";import"./check-circle-mvyzYvIW.js";import"./all-pipeline-runs-query-BGASHYtF.js";import"./DisplayDate-CYVBBSgr.js";import"./InlineAvatar-Cfz4WSLK.js";import"./delete-run-DlSLEl5T.js";const be=s=>l.createElement("svg",{viewBox:"0 0 60 60",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("g",{id:"dataflow-02"},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5 7.5C11.1193 7.5 10 8.61929 10 10C10 11.3807 11.1193 12.5 12.5 12.5C13.8807 12.5 15 11.3807 15 10C15 8.61929 13.8807 7.5 12.5 7.5ZM5 10C5 5.85786 8.35787 2.5 12.5 2.5C15.7655 2.5 18.5436 4.58702 19.5732 7.5L40.4268 7.5C41.4564 4.58702 44.2345 2.5 47.5 2.5C51.6421 2.5 55 5.85786 55 10C55 14.1421 51.6421 17.5 47.5 17.5C44.2345 17.5 41.4564 15.413 40.4268 12.5L32.5 12.5V27.5H40.4268C41.4564 24.587 44.2345 22.5 47.5 22.5C51.6421 22.5 55 25.8579 55 30C55 34.1421 51.6421 37.5 47.5 37.5C44.2345 37.5 41.4564 35.413 40.4268 32.5H32.5V38C32.5 40.1415 32.502 41.5972 32.5939 42.7224C32.6834 43.8185 32.8457 44.379 33.045 44.77C33.5243 45.7108 34.2892 46.4757 35.2301 46.955C35.6211 47.1543 36.1816 47.3166 37.2776 47.4061C38.103 47.4736 39.1062 47.4926 40.4275 47.4979C41.4577 44.586 44.2352 42.5 47.5 42.5C51.6421 42.5 55 45.8579 55 50C55 54.1421 51.6421 57.5 47.5 57.5C44.2338 57.5 41.4552 55.4121 40.4261 52.4982C39.0579 52.4929 37.8787 52.4719 36.8704 52.3895C35.4652 52.2747 34.1734 52.0283 32.9601 51.4101C31.0785 50.4513 29.5487 48.9215 28.5899 47.0399C27.9717 45.8266 27.7253 44.5348 27.6105 43.1296C27.4999 41.7766 27.5 40.1157 27.5 38.1032V12.5L19.5732 12.5C18.5436 15.413 15.7655 17.5 12.5 17.5C8.35787 17.5 5 14.1421 5 10ZM47.5 7.5C46.1193 7.5 45 8.61929 45 10C45 11.3807 46.1193 12.5 47.5 12.5C48.8807 12.5 50 11.3807 50 10C50 8.61929 48.8807 7.5 47.5 7.5ZM47.5 27.5C46.1193 27.5 45 28.6193 45 30C45 31.3807 46.1193 32.5 47.5 32.5C48.8807 32.5 50 31.3807 50 30C50 28.6193 48.8807 27.5 47.5 27.5ZM47.5 47.5C46.1193 47.5 45 48.6193 45 50C45 51.3807 46.1193 52.5 47.5 52.5C48.8807 52.5 50 51.3807 50 50C50 48.6193 48.8807 47.5 47.5 47.5Z"})));async function ve({params:s}){const a=S(T.pipelines.all+"?"+M(s)),t=await _(a,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.status===404&&k(),!t.ok)throw new N({message:"Error while fetching pipelines",status:t.status,statusText:t.statusText});return t.json()}const v={all:["pipelines"],pipelineList:s=>oe({queryKey:[...v.all,s],queryFn:async()=>ve({params:s})})};async function Pe({pipelineId:s}){const a=S(T.pipelines.detail(s)),t=await fetch(a,{method:"DELETE",credentials:"include",headers:{"Content-Type":"application/json"}});if(!t.ok){const r=await t.json().then(n=>n.detail).catch(()=>`Failed to delete pipeline ${s}`);throw new N({status:t.status,statusText:t.statusText,message:r})}return t.json()}function ye(s){return ce({mutationFn:Pe,...s})}const A=l.createContext(null);function we({children:s}){const[a,t]=l.useState([]),r=de(),{toast:n}=B(),i=ye(),o=async d=>{try{const p=d.map(x=>i.mutateAsync({pipelineId:x}));await Promise.all(p),n({description:"Deleted successfully.",status:"success",emphasis:"subtle",rounded:!0}),await r.invalidateQueries({queryKey:v.all}),t([])}catch(p){console.error("Failed to delete some pipelines:",p)}};return e.jsx(A.Provider,{value:{selectedPipelines:a,setSelectedPipelines:t,bulkDeletePipelines:o},children:s})}function m(){const s=l.useContext(A);if(!s)throw new Error("usePipelinesSelectorContext must be used within a PipelinesSelectorProvider");return s}function Se(){const[s,a]=l.useState(!1),{bulkDeletePipelines:t,selectedPipelines:r}=m();async function n(){await t(r),a(!1)}return e.jsxs(O,{open:s,onOpenChange:a,children:[e.jsx(F,{asChild:!0,children:e.jsxs(h,{className:"rounded-sharp border-y-0 bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(R,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(E,{title:`Delete Pipeline${r.length>=2?"s":""}`,handleDelete:n,children:e.jsxs(L,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function Te(){const{selectedPipelines:s}=m();return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:`${s==null?void 0:s.length} Pipeline${(s==null?void 0:s.length)>1?"s":""} selected`}),e.jsx(Se,{})]})}function Ne({id:s}){const[a,t]=l.useState(!1),[r,n]=l.useState(!1),i=l.useRef(null),o=l.useRef(null),{bulkDeletePipelines:d}=m();async function p(){await d([s]),P(!1)}function x(){o.current=i.current}function P(u){if(u===!1){n(!1),setTimeout(()=>{t(u)},200);return}t(u)}return e.jsxs(z,{onOpenChange:n,open:r,children:[e.jsx(I,{ref:i,children:e.jsx(xe,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(Z,{hidden:a,onCloseAutoFocus:u=>{o.current&&(o.current.focus(),o.current=null,u.preventDefault())},align:"end",sideOffset:7,children:e.jsx(fe,{onSelect:x,open:a,onOpenChange:P,triggerChildren:"Delete",icon:e.jsx(R,{fill:"red"}),children:e.jsx(E,{title:"Delete Pipeline",handleDelete:p,children:e.jsxs(L,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})})]})}const De=({id:s})=>{const{selectedPipelines:a,setSelectedPipelines:t}=m(),r=(n,i)=>{t(o=>n?[...o,i]:o.filter(d=>d!==i))};return e.jsx(U,{id:s,onCheckedChange:n=>r(n,s),checked:a.includes(s),className:"h-3 w-3"})};function Re(){return[{id:"check",header:"",meta:{width:"1%"},cell:({row:s})=>e.jsx(De,{id:s.original.id})},{id:"name",header:"Pipeline",cell:({row:s})=>{var a,t,r;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx($,{className:`h-5 w-5 ${ue((a=s.original.body)==null?void 0:a.latest_run_status)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(j,{to:f.pipelines.namespace(encodeURIComponent(s.original.name)),className:"flex items-center gap-1",children:e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:s.original.name})}),e.jsx(q,{children:e.jsxs(H,{children:[e.jsx(V,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(me,{status:(t=s.original.body)==null?void 0:t.latest_run_status})}),e.jsx(Q,{className:"z-20 capitalize",children:(r=s.original.body)==null?void 0:r.latest_run_status})]})}),e.jsx(y,{copyText:s.original.name})]}),e.jsxs(j,{to:f.pipelines.namespace(encodeURIComponent(s.original.name)),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:s.original.id.split("-")[0]}),e.jsx(y,{copyText:s.original.id})]})]})]})}},{id:"latest-run",header:"Latest Run",accessorFn:s=>{var a,t;return{status:(a=s.body)==null?void 0:a.latest_run_status,runId:(t=s.body)==null?void 0:t.latest_run_id}},cell:({getValue:s})=>{const{runId:a,status:t}=s();return!a||!t?e.jsx("div",{children:"No run"}):e.jsx(j,{to:f.runs.detail(a),children:e.jsxs(G,{emphasis:"subtle",rounded:!1,className:"inline-flex items-center gap-0.5",color:he(t),children:[e.jsx(D,{className:"h-3 w-3 fill-current"}),a==null?void 0:a.split("-")[0]]})})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:s})=>e.jsx(Ne,{id:s.original.id})}]}const C=1,Ee=c.object({page:c.coerce.number().min(C).optional().default(C).catch(C),name:c.string().optional(),operator:c.enum(["and","or"]).optional()});function Le(){const[s]=b(),{page:a,name:t,operator:r}=Ee.parse({page:s.get("page")||void 0,name:s.get("name")||void 0,operator:s.get("operator")||void 0});return{page:a,name:t,logical_operator:r}}function Ae(){const s=Le(),{selectedPipelines:a}=m(),{data:t,refetch:r}=pe({...v.pipelineList({...s,sort_by:"desc:latest_run"}),throwOnError:!0});return e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[a.length?e.jsx(Te,{}):e.jsx(ie,{searchParams:s}),e.jsx("div",{className:"flex justify-between",children:e.jsxs(h,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>r(),children:[e.jsx(re,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:t?e.jsx(K,{columns:Re(),data:t.items}):e.jsx(w,{className:"h-[500px] w-full"})}),t?t.total_pages>1&&e.jsx(le,{searchParams:s,paginate:t}):e.jsx(w,{className:"h-[36px] w-[300px]"})]})]})}const Me=c.object({tab:c.enum(["pipelines","runs","templates"]).optional().default("pipelines").catch("pipelines")});function _e(){const[s]=b(),{tab:a}=Me.parse({tab:s.get("tab")||void 0});return a}const ke="/assets/templates-1S_8WeSK.webp";function Be(){return e.jsxs("div",{className:"layout-container space-y-5",children:[e.jsx(Oe,{}),e.jsx(ze,{})]})}function Oe(){return e.jsx(Ce,{children:e.jsxs("div",{className:"flex w-full flex-wrap items-center gap-x-2 gap-y-0.5 text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"This is a ZenML Pro feature. "}),e.jsx("p",{children:"Upgrade to ZenML Pro to access the Templates and save settings and run pipelines from the dashboard."})]})})}const Fe=["Run pipelines from the dashboard with Templates","Re-run a pipeline easily from the UI","Model and Artifact Control Plane Dashboard","Managed ZenML server on your VPC or hosted on our servers","Social SSO, RBAC, and User Management","CI/CD/CT, and more!"];function ze(){return e.jsxs(J,{className:"relative overflow-hidden px-7 py-5",children:[e.jsxs("div",{className:"max-w-[450px] space-y-4",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Access Advanced Template Features with ZenML Pro"}),e.jsx("ul",{className:"space-y-2",children:Fe.map((s,a)=>e.jsx("li",{className:"text-text-md text-theme-text-secondary",children:s},a))}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(h,{size:"md",asChild:!0,children:e.jsx("a",{href:"https://cloud.zenml.io/signup",target:"_blank",rel:"noopener noreferrer",children:"Upgrade to ZenML Pro"})}),e.jsx(h,{emphasis:"minimal",size:"md",children:e.jsx("a",{href:"https://www.zenml.io/pro",target:"_blank",rel:"noopener noreferrer",children:"Learn more"})})]})]}),e.jsx("img",{className:"absolute right-0 top-0 hidden translate-x-[30%] scale-75 md:translate-y-[30%] lg:block xl:-translate-y-[5%]",src:ke,alt:"Screenshot of Zenml Pro Templates Feature"})]})}const Ie=[{value:"pipelines",label:"Pipelines",icon:be},{value:"runs",label:"Runs",icon:D},{value:"templates",label:"Templates",icon:Y}];function Ze(){const[s]=b(),a=_e(),t=ne();l.useEffect(()=>{if(!s.get("tab")){const i=new URLSearchParams(s);i.set("tab","pipelines"),t(`?${i.toString()}`,{replace:!0})}},[t,s]);function r(n){const i=new URLSearchParams;i.set("tab",n),t(`?${i.toString()}`)}return e.jsx("div",{className:"p-5",children:e.jsxs(W,{onValueChange:r,value:a,children:[e.jsx(X,{children:Ie.map(n=>e.jsxs(ee,{className:"flex items-center gap-2 text-text-md",value:n.value.toLowerCase(),children:[e.jsx(n.icon,{className:`h-5 w-5 ${a===n.value?"fill-primary-400":"fill-theme-text-tertiary"}`}),n.label,n.value==="templates"&&e.jsx(se,{className:"rounded-sm font-semibold text-primary-500",color:"purple",size:"sm",children:"New"})]},n.value))}),e.jsx(g,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"pipelines",children:e.jsx(we,{children:e.jsx(Ae,{})})}),e.jsx(g,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"runs",children:e.jsx(je,{children:e.jsx(ge,{})})}),e.jsx(g,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"templates",children:e.jsx(Be,{})})]})})}function us(){const{setCurrentBreadcrumbData:s}=te();return l.useEffect(()=>{s({segment:"pipelines",data:null})},[]),e.jsxs("div",{children:[e.jsx(ae,{children:e.jsx("h1",{className:"text-display-xs font-semibold",children:"Pipelines"})}),e.jsx(Ze,{})]})}export{us as default};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as u,j as a}from"./@radix-C7hRs6Kx.js";import{u as h,c as w,S as v,a as y,b as k}from"./form-schemas-
|
1
|
+
import{r as u,j as a}from"./@radix-C7hRs6Kx.js";import{u as h,c as w,S as v,a as y,b as k}from"./form-schemas-CbvoEUHr.js";import{S}from"./SetPassword-DR-EiLI5.js";import{I as x,h as j,j as N,o as A,F as C,p as q,e as P,f as z,i as E}from"./index-D2iSHVZq.js";import{u as F}from"./index.esm-D7jFlf5N.js";import{t as M}from"./zod-C0xYeTvL.js";import{b as T}from"./@tanstack-CSxjHCME.js";import{u as U}from"./login-mutation-CXc-Klim.js";import"./check-circle-mvyzYvIW.js";import"./@react-router-CNP6g_RL.js";import"./UpdatePasswordSchemas-DbFEaezI.js";import"./PasswordChecker-lYTOtNom.js";import"./@reactflow-CQi1Z1Wq.js";const g=u.createContext(null);function $({children:e,initialSettings:r}){const[t,s]=u.useState(r||{});return a.jsx(g.Provider,{value:{serverSettings:t,setServerSettings:s},children:e})}function f(){const e=u.useContext(g);if(e===null)throw new Error("useServerActivationContext must be used within an ServerActivationProvider");return e}function I(){const{setSurveyStep:e}=h(),{setServerSettings:r}=f();function t({newPassword:s,username:o}){r(i=>({...i,admin_password:s,admin_username:o})),e(i=>i+1)}return a.jsx(S,{displayUsername:!0,headline:"Create your admin user and password",subHeadine:"Select a username and password for your admin account",submitHandler:t})}const m=e=>{e=1831565813+(e|=0)|0;let r=Math.imul(e^e>>>15,1|e);return r=r+Math.imul(r^r>>>7,61|r)^r,((r^r>>>14)>>>0)/4294967296};class L{constructor(r){this.dictionaries=void 0,this.length=void 0,this.separator=void 0,this.style=void 0,this.seed=void 0;const{length:t,separator:s,dictionaries:o,style:i,seed:l}=r;this.dictionaries=o,this.separator=s,this.length=t,this.style=i,this.seed=l}generate(){if(!this.dictionaries)throw new Error('Cannot find any dictionary. Please provide at least one, or leave the "dictionary" field empty in the config object');if(this.length<=0)throw new Error("Invalid length provided");if(this.length>this.dictionaries.length)throw new Error(`The length cannot be bigger than the number of dictionaries.
|
2
2
|
Length provided: ${this.length}. Number of dictionaries provided: ${this.dictionaries.length}`);let r=this.seed;return this.dictionaries.slice(0,this.length).reduce((t,s)=>{let o;r?(o=(l=>{if(typeof l=="string"){const c=l.split("").map(d=>d.charCodeAt(0)).reduce((d,b)=>d+b,1),n=Math.floor(Number(c));return m(n)}return m(l)})(r),r=4294967296*o):o=Math.random();let i=s[Math.floor(o*s.length)]||"";if(this.style==="lowerCase")i=i.toLowerCase();else if(this.style==="capital"){const[l,...c]=i.split("");i=l.toUpperCase()+c.join("")}else this.style==="upperCase"&&(i=i.toUpperCase());return t?`${t}${this.separator}${i}`:`${i}`},"")}}const p={separator:"_",dictionaries:[]},_=e=>{const r=[...e&&e.dictionaries||p.dictionaries],t={...p,...e,length:e&&e.length||r.length,dictionaries:r};if(!e||!e.dictionaries||!e.dictionaries.length)throw new Error('A "dictionaries" array must be provided. This is a breaking change introduced starting from Unique Name Generator v4. Read more about the breaking change here: https://github.com/andreasonny83/unique-names-generator#migration-guide');return new L(t).generate()};var H=["aardvark","aardwolf","albatross","alligator","alpaca","amphibian","anaconda","angelfish","anglerfish","ant","anteater","antelope","antlion","ape","aphid","armadillo","asp","baboon","badger","bandicoot","barnacle","barracuda","basilisk","bass","bat","bear","beaver","bedbug","bee","beetle","bird","bison","blackbird","boa","boar","bobcat","bobolink","bonobo","booby","bovid","bug","butterfly","buzzard","camel","canid","canidae","capybara","cardinal","caribou","carp","cat","caterpillar","catfish","catshark","cattle","centipede","cephalopod","chameleon","cheetah","chickadee","chicken","chimpanzee","chinchilla","chipmunk","cicada","clam","clownfish","cobra","cockroach","cod","condor","constrictor","coral","cougar","cow","coyote","crab","crane","crawdad","crayfish","cricket","crocodile","crow","cuckoo","damselfly","deer","dingo","dinosaur","dog","dolphin","donkey","dormouse","dove","dragon","dragonfly","duck","eagle","earthworm","earwig","echidna","eel","egret","elephant","elk","emu","ermine","falcon","felidae","ferret","finch","firefly","fish","flamingo","flea","fly","flyingfish","fowl","fox","frog","galliform","gamefowl","gayal","gazelle","gecko","gerbil","gibbon","giraffe","goat","goldfish","goose","gopher","gorilla","grasshopper","grouse","guan","guanaco","guineafowl","gull","guppy","haddock","halibut","hamster","hare","harrier","hawk","hedgehog","heron","herring","hippopotamus","hookworm","hornet","horse","hoverfly","hummingbird","hyena","iguana","impala","jackal","jaguar","jay","jellyfish","junglefowl","kangaroo","kingfisher","kite","kiwi","koala","koi","krill","ladybug","lamprey","landfowl","lark","leech","lemming","lemur","leopard","leopon","limpet","lion","lizard","llama","lobster","locust","loon","louse","lungfish","lynx","macaw","mackerel","magpie","mammal","manatee","mandrill","marlin","marmoset","marmot","marsupial","marten","mastodon","meadowlark","meerkat","mink","minnow","mite","mockingbird","mole","mollusk","mongoose","monkey","moose","mosquito","moth","mouse","mule","muskox","narwhal","newt","nightingale","ocelot","octopus","opossum","orangutan","orca","ostrich","otter","owl","ox","panda","panther","parakeet","parrot","parrotfish","partridge","peacock","peafowl","pelican","penguin","perch","pheasant","pig","pigeon","pike","pinniped","piranha","planarian","platypus","pony","porcupine","porpoise","possum","prawn","primate","ptarmigan","puffin","puma","python","quail","quelea","quokka","rabbit","raccoon","rat","rattlesnake","raven","reindeer","reptile","rhinoceros","roadrunner","rodent","rook","rooster","roundworm","sailfish","salamander","salmon","sawfish","scallop","scorpion","seahorse","shark","sheep","shrew","shrimp","silkworm","silverfish","skink","skunk","sloth","slug","smelt","snail","snake","snipe","sole","sparrow","spider","spoonbill","squid","squirrel","starfish","stingray","stoat","stork","sturgeon","swallow","swan","swift","swordfish","swordtail","tahr","takin","tapir","tarantula","tarsier","termite","tern","thrush","tick","tiger","tiglon","toad","tortoise","toucan","trout","tuna","turkey","turtle","tyrannosaurus","unicorn","urial","vicuna","viper","vole","vulture","wallaby","walrus","warbler","wasp","weasel","whale","whippet","whitefish","wildcat","wildebeest","wildfowl","wolf","wolverine","wombat","woodpecker","worm","wren","xerinae","yak","zebra"],D=["amaranth","amber","amethyst","apricot","aqua","aquamarine","azure","beige","black","blue","blush","bronze","brown","chocolate","coffee","copper","coral","crimson","cyan","emerald","fuchsia","gold","gray","green","harlequin","indigo","ivory","jade","lavender","lime","magenta","maroon","moccasin","olive","orange","peach","pink","plum","purple","red","rose","salmon","sapphire","scarlet","silver","tan","teal","tomato","turquoise","violet","white","yellow"];const R=["booby","swallow"];function V(){return _({dictionaries:[D,H.filter(e=>!R.includes(e))]})}function Y({submitHandler:e}){const r=u.useId(),{handleSubmit:t,register:s,formState:{isValid:o}}=F({resolver:M(w),defaultValues:{serverName:V()}});return a.jsxs("div",{className:"max-w-[570px] space-y-5",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-display-xs font-semibold",children:"Almost there! Select a server name"}),a.jsx("p",{className:"text-theme-text-secondary",children:"This will identify your ZenML server. You can use the generated name or create your own."})]}),a.jsxs("form",{onSubmit:t(e),className:"space-y-5",children:[a.jsx("div",{className:"space-y-2",children:a.jsxs("div",{className:"space-y-0.5",children:[a.jsx("label",{htmlFor:r,className:"text-text-sm",children:"Server Name"}),a.jsx(x,{...s("serverName"),id:r,className:"w-full"})]})}),a.jsx(j,{disabled:!o,className:"w-full text-center",size:"md",children:a.jsx("span",{className:"w-full",children:"Activate your Server"})})]})]})}async function Z(e){const r=A(q.activate),t=await N(r,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const s=await t.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Failed to activate server");throw new C({status:t.status,statusText:t.statusText,message:s})}return t.json()}function B(e){return T({mutationFn:async r=>Z(r),...e})}function G({setUsername:e}){const{serverSettings:r}=f(),{setSurveyStep:t}=h(),{setAuthState:s}=P(),{toast:o}=z(),{mutate:i}=U({onSuccess:()=>{s("true"),t(n=>n+1)}}),{mutate:l}=B({onSuccess:async n=>{e(n.name),i({username:n.name,password:r.admin_password??void 0})},onError:n=>{n instanceof Error&&o({status:"error",emphasis:"subtle",icon:a.jsx(E,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:n.message,rounded:!0})}});function c({serverName:n}){l({...r,server_name:n})}return a.jsx(Y,{submitHandler:c})}function J(){const{surveyStep:e}=h(),[r,t]=u.useState("");return a.jsx(a.Fragment,{children:a.jsxs($,{children:[a.jsx(v,{stepAmount:2}),e===1&&a.jsx(I,{}),e===2&&a.jsx(G,{setUsername:t}),e===3&&a.jsx(y,{subHeader:"Your created your ZenML account",username:r})]})})}function le(){return a.jsx(k,{children:a.jsx(J,{})})}export{le as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as p,j as t}from"./@radix-C7hRs6Kx.js";import{u as F,g as He,S as Ue,C as oe,P as ie,W as Ke,L as Qe}from"./ProviderRadio-26EB5tY-.js";import{W as D,H as O,B as E}from"./Wizard-DIllc07n.js";import{t as q}from"./zod-C0xYeTvL.js";import{z as y,S as Y,Z as Ge,I as ge,h as M,az as Ye,aA as Je,aB as Xe,aC as et,ah as tt,aD as rt,ai as st,ak as nt,am as ot,d as it,_ as at,j as ct,o as lt,F as ut,p as dt,f as Ie,i as ft,A as mt,b as ht,ac as xt,r as pt}from"./index-BygJE88j.js";import{b as v,C as k,u as W,F as $}from"./index.esm-D7jFlf5N.js";import{S as R}from"./WizardFooter-dNDpuero.js";import{C as je,b as yt}from"./ComponentIcon-B_7Y_oV-.js";import{R as H,a as U,s as gt,u as jt}from"./create-stack-BXLyjE58.js";import{f as _t,s as De,g as vt,a as St,D as Ct,b as bt,z as wt}from"./index-D9-ukAem.js";import{a as J,b as Nt,j as Oe,c as Pt}from"./@tanstack-CSxjHCME.js";import{C as L}from"./ProviderIcon-kkODO9tx.js";import{s as Ft}from"./sharedSchema-BACERDat.js";import{S as kt}from"./Lock-DW-0_M0o.js";import{S as zt}from"./dots-horizontal-BGRJCPCs.js";import{T as _e}from"./Tick-ay3Bgtro.js";import{s as Ee}from"./index-8uhUi12k.js";import{C as At}from"./ComponentBadge-BgGnzcLu.js";import{e as It}from"./components-Br2ezRib.js";import{L as Dt}from"./@react-router-CNP6g_RL.js";import"./persist-SSTTV5q0.js";import"./@reactflow-CQi1Z1Wq.js";import"./layout-h3cbx8WZ.js";import"./rocket-Cf-B-XOR.js";import"./plus-COjQg3AG.js";import"./trash-BWSZ7NRK.js";import"./type-guards-CaeD8wHO.js";import"./gcp-CHNvgEss.js";import"./check-DK77doTf.js";import"./stack-detail-query-ihiJr6nq.js";const Me=p.createContext(null);function Ot({children:e}){const[r,s]=p.useState({stackName:null,createdStackId:null,connectorConfig:null,fullstackResources:null,artifactStoreConfig:null,registryConfig:null,orchestratorConfig:null});return t.jsx(Me.Provider,{value:{data:r,setData:s},children:e})}function S(){const e=p.useContext(Me);if(e===null)throw new Error("useExistingInfraContext must be used within an ExistingInfraProvider");return e}const Re=p.createContext(null);function be({children:e,initialSchema:r}){const[s,n]=p.useState(r),[o,a]=p.useState({});return t.jsx(Re.Provider,{value:{schema:s,setSchema:n,defaultValues:o,setDefaultValues:a},children:e})}function X(){const e=p.useContext(Re);if(!e)throw new Error("useSchemaContext must be used within a SchemaProvider");return e}const Et=y.object({resourceId:y.string().min(1),flavor:y.string()});function Mt(){return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(je,{type:"artifact_store",className:"h-5 w-5 fill-primary-400"}),"Select your Artifact Store"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Choose one of the storages for the new Artifact Store."})]})}var Le=Symbol.for("immer-nothing"),we=Symbol.for("immer-draftable"),g=Symbol.for("immer-state");function _(e,...r){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var z=Object.getPrototypeOf;function A(e){return!!e&&!!e[g]}function N(e){var r;return e?Te(e)||Array.isArray(e)||!!e[we]||!!((r=e.constructor)!=null&&r[we])||te(e)||re(e):!1}var Rt=Object.prototype.constructor.toString();function Te(e){if(!e||typeof e!="object")return!1;const r=z(e);if(r===null)return!0;const s=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return s===Object?!0:typeof s=="function"&&Function.toString.call(s)===Rt}function K(e,r){ee(e)===0?Reflect.ownKeys(e).forEach(s=>{r(s,e[s],e)}):e.forEach((s,n)=>r(n,s,e))}function ee(e){const r=e[g];return r?r.type_:Array.isArray(e)?1:te(e)?2:re(e)?3:0}function de(e,r){return ee(e)===2?e.has(r):Object.prototype.hasOwnProperty.call(e,r)}function Be(e,r,s){const n=ee(e);n===2?e.set(r,s):n===3?e.add(s):e[r]=s}function Lt(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}function te(e){return e instanceof Map}function re(e){return e instanceof Set}function w(e){return e.copy_||e.base_}function fe(e,r){if(te(e))return new Map(e);if(re(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const s=Te(e);if(r===!0||r==="class_only"&&!s){const n=Object.getOwnPropertyDescriptors(e);delete n[g];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){const l=o[a],u=n[l];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[l]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[l]})}return Object.create(z(e),n)}else{const n=z(e);if(n!==null&&s)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function ve(e,r=!1){return se(e)||A(e)||!N(e)||(ee(e)>1&&(e.set=e.add=e.clear=e.delete=Tt),Object.freeze(e),r&&Object.entries(e).forEach(([s,n])=>ve(n,!0))),e}function Tt(){_(2)}function se(e){return Object.isFrozen(e)}var Bt={};function P(e){const r=Bt[e];return r||_(0,e),r}var T;function Ve(){return T}function Vt(e,r){return{drafts_:[],parent_:e,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ne(e,r){r&&(P("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=r)}function me(e){he(e),e.drafts_.forEach(qt),e.drafts_=null}function he(e){e===T&&(T=e.parent_)}function Pe(e){return T=Vt(T,e)}function qt(e){const r=e[g];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function Fe(e,r){r.unfinalizedDrafts_=r.drafts_.length;const s=r.drafts_[0];return e!==void 0&&e!==s?(s[g].modified_&&(me(r),_(4)),N(e)&&(e=Q(r,e),r.parent_||G(r,e)),r.patches_&&P("Patches").generateReplacementPatches_(s[g].base_,e,r.patches_,r.inversePatches_)):e=Q(r,s,[]),me(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),e!==Le?e:void 0}function Q(e,r,s){if(se(r))return r;const n=r[g];if(!n)return K(r,(o,a)=>ke(e,n,r,o,a,s)),r;if(n.scope_!==e)return r;if(!n.modified_)return G(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const o=n.copy_;let a=o,l=!1;n.type_===3&&(a=new Set(o),o.clear(),l=!0),K(a,(u,f)=>ke(e,n,o,u,f,s,l)),G(e,o,!1),s&&e.patches_&&P("Patches").generatePatches_(n,s,e.patches_,e.inversePatches_)}return n.copy_}function ke(e,r,s,n,o,a,l){if(A(o)){const u=a&&r&&r.type_!==3&&!de(r.assigned_,n)?a.concat(n):void 0,f=Q(e,o,u);if(Be(s,n,f),A(f))e.canAutoFreeze_=!1;else return}else l&&s.add(o);if(N(o)&&!se(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Q(e,o),(!r||!r.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(s,n)&&G(e,o)}}function G(e,r,s=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ve(r,s)}function Wt(e,r){const s=Array.isArray(e),n={type_:s?1:0,scope_:r?r.scope_:Ve(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,a=Se;s&&(o=[n],a=B);const{revoke:l,proxy:u}=Proxy.revocable(o,a);return n.draft_=u,n.revoke_=l,u}var Se={get(e,r){if(r===g)return e;const s=w(e);if(!de(s,r))return $t(e,s,r);const n=s[r];return e.finalized_||!N(n)?n:n===ae(e.base_,r)?(ce(e),e.copy_[r]=pe(n,e)):n},has(e,r){return r in w(e)},ownKeys(e){return Reflect.ownKeys(w(e))},set(e,r,s){const n=qe(w(e),r);if(n!=null&&n.set)return n.set.call(e.draft_,s),!0;if(!e.modified_){const o=ae(w(e),r),a=o==null?void 0:o[g];if(a&&a.base_===s)return e.copy_[r]=s,e.assigned_[r]=!1,!0;if(Lt(s,o)&&(s!==void 0||de(e.base_,r)))return!0;ce(e),xe(e)}return e.copy_[r]===s&&(s!==void 0||r in e.copy_)||Number.isNaN(s)&&Number.isNaN(e.copy_[r])||(e.copy_[r]=s,e.assigned_[r]=!0),!0},deleteProperty(e,r){return ae(e.base_,r)!==void 0||r in e.base_?(e.assigned_[r]=!1,ce(e),xe(e)):delete e.assigned_[r],e.copy_&&delete e.copy_[r],!0},getOwnPropertyDescriptor(e,r){const s=w(e),n=Reflect.getOwnPropertyDescriptor(s,r);return n&&{writable:!0,configurable:e.type_!==1||r!=="length",enumerable:n.enumerable,value:s[r]}},defineProperty(){_(11)},getPrototypeOf(e){return z(e.base_)},setPrototypeOf(){_(12)}},B={};K(Se,(e,r)=>{B[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});B.deleteProperty=function(e,r){return B.set.call(this,e,r,void 0)};B.set=function(e,r,s){return Se.set.call(this,e[0],r,s,e[0])};function ae(e,r){const s=e[g];return(s?w(s):e)[r]}function $t(e,r,s){var o;const n=qe(r,s);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function qe(e,r){if(!(r in e))return;let s=z(e);for(;s;){const n=Object.getOwnPropertyDescriptor(s,r);if(n)return n;s=z(s)}}function xe(e){e.modified_||(e.modified_=!0,e.parent_&&xe(e.parent_))}function ce(e){e.copy_||(e.copy_=fe(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Zt=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(r,s,n)=>{if(typeof r=="function"&&typeof s!="function"){const a=s;s=r;const l=this;return function(f=a,...d){return l.produce(f,c=>s.call(this,c,...d))}}typeof s!="function"&&_(6),n!==void 0&&typeof n!="function"&&_(7);let o;if(N(r)){const a=Pe(this),l=pe(r,void 0);let u=!0;try{o=s(l),u=!1}finally{u?me(a):he(a)}return Ne(a,n),Fe(o,a)}else if(!r||typeof r!="object"){if(o=s(r),o===void 0&&(o=r),o===Le&&(o=void 0),this.autoFreeze_&&ve(o,!0),n){const a=[],l=[];P("Patches").generateReplacementPatches_(r,o,a,l),n(a,l)}return o}else _(1,r)},this.produceWithPatches=(r,s)=>{if(typeof r=="function")return(l,...u)=>this.produceWithPatches(l,f=>r(f,...u));let n,o;return[this.produce(r,s,(l,u)=>{n=l,o=u}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){N(e)||_(8),A(e)&&(e=Ht(e));const r=Pe(this),s=pe(e,void 0);return s[g].isManual_=!0,he(r),s}finishDraft(e,r){const s=e&&e[g];(!s||!s.isManual_)&&_(9);const{scope_:n}=s;return Ne(n,r),Fe(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,r){let s;for(s=r.length-1;s>=0;s--){const o=r[s];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}s>-1&&(r=r.slice(s+1));const n=P("Patches").applyPatches_;return A(e)?n(e,r):this.produce(e,o=>n(o,r))}};function pe(e,r){const s=te(e)?P("MapSet").proxyMap_(e,r):re(e)?P("MapSet").proxySet_(e,r):Wt(e,r);return(r?r.scope_:Ve()).drafts_.push(s),s}function Ht(e){return A(e)||_(10,e),We(e)}function We(e){if(!N(e)||se(e))return e;const r=e[g];let s;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,s=fe(e,r.scope_.immer_.useStrictShallowCopy_)}else s=fe(e,!0);return K(s,(n,o)=>{Be(s,n,We(o))}),r&&(r.finalized_=!1),s}var j=new Zt,I=j.produce;j.produceWithPatches.bind(j);j.setAutoFreeze.bind(j);j.setUseStrictShallowCopy.bind(j);j.applyPatches.bind(j);j.createDraft.bind(j);j.finishDraft.bind(j);function Ut(){const{data:e,setData:r}=S(),{setCurrentStep:s}=F();if(!e.fullstackResources)return s(2),{handleFormSubmit:()=>{},flattenedInstances:[]};const n=e.fullstackResources.components_resources_info.artifact_store,o=n.flatMap(l=>l.accessible_by_service_connector.map(u=>({...l,value:u})));function a({flavor:l,resourceId:u}){const f=n.find(d=>d.flavor===l);f&&(r(d=>I(d,c=>{c.artifactStoreConfig={flavor:l,configuration:Object.fromEntries(Object.keys(f.required_configuration||{}).map(h=>[h,u])),service_connector_resource_id:u}})),s(d=>d+1))}return{handleFormSubmit:a,flattenedInstances:o}}function V({flavor:e,type:r,width:s=32,height:n=32,...o}){var l;const a=J({..._t.flavorList({name:e,type:r})});return a.isError?null:a.isPending?t.jsx(Y,{style:{height:`${n}px`,width:`${s}px`}}):t.jsx("img",{width:s,height:n,alt:`${e} logo`,...o,src:Ge(((l=a.data.items[0].body)==null?void 0:l.logo_url)??"")})}const Kt="artifact_store";function Qt(){const[e,r]=p.useState(""),{control:s,setValue:n,handleSubmit:o,register:a,watch:l,trigger:u,reset:f}=v(),{flattenedInstances:d,handleFormSubmit:c}=Ut(),h=d.filter(i=>i.value.toLocaleLowerCase().includes(e.toLocaleLowerCase()));return t.jsxs(t.Fragment,{children:[t.jsx(ge,{placeholder:"Search...",onChange:i=>{f(),r(i.target.value)}}),t.jsxs("form",{onSubmit:o(c),id:"artifact-store-form",children:[t.jsx("input",{type:"hidden",...a("flavor")}),t.jsx("ul",{className:"space-y-1",children:h.map(i=>t.jsx("li",{children:t.jsx(k,{name:"resourceId",control:s,render:({field:{onChange:m,...x}})=>t.jsxs(H,{"data-state":l("resourceId")===i.value?"selected":"unselected",htmlFor:i.value,children:[t.jsx(U,{id:i.value,type:"radio",...x,onChange:C=>{n("flavor",i.flavor,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}),m(C.target.value),u()},value:i.value,name:"connector-radio"}),t.jsx(V,{type:Kt,width:24,height:24,flavor:i.flavor})," ",t.jsx("span",{children:i.value})]})})},i.value))})]})]})}function Gt(){const e=W({resolver:q(Et),shouldUnregister:!0});return t.jsx($,{...e,children:t.jsxs(D,{children:[t.jsx(O,{children:"Artifact Store"}),t.jsx(E,{children:t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsx(Mt,{}),t.jsx(Qt,{})]})}),t.jsx(R,{children:t.jsx(Yt,{})})]})})}function Yt(){const e=v();return t.jsx(M,{disabled:!e.formState.isValid,form:"artifact-store-form",size:"md",children:"Next"})}const $e=y.object({authMethod:y.string().min(1),stackName:Ft});function Jt(){var h,i;const{data:e}=S(),{setCurrentStep:r}=F(),{control:s,watch:n,resetField:o}=v(),{setSchema:a,setDefaultValues:l}=X(),u=J({...De.serviceConnectorTypeDetail(((h=e.connectorConfig)==null?void 0:h.type)||"")});if(u.isError)return null;if(u.isPending)return t.jsx(Y,{className:"h-[40px] w-[100px]"});const f=u.data.auth_methods.filter(m=>m.auth_method!=="implicit").map(m=>({name:m.name,auth_method:m.auth_method}));if(!((i=e.connectorConfig)!=null&&i.type)){r(1);return}function d(){var Ce;const m=n("authMethod"),x=(Ce=u.data)==null?void 0:Ce.auth_methods.find(ne=>ne.auth_method===m);if(!x)return;const C=x.config_schema,b=vt(C),Ze=St(C);a($e.merge(b)),l(Ze),Object.keys(b.shape).forEach(ne=>o(ne))}const c=e.connectorConfig.type||"";return t.jsx(k,{control:s,name:"authMethod",render:({field:{onChange:m,ref:x,...C}})=>t.jsxs(Ye,{...C,onValueChange:b=>{m(b),d()},children:[t.jsx(Je,{className:"w-fit border border-neutral-300 text-left text-text-md",children:t.jsx(Xe,{className:"flex items-center gap-2",placeholder:"Select your Auth Method"})}),t.jsx(et,{children:t.jsx(tt,{viewportClassName:"max-h-[300px]",children:f.map(b=>t.jsx(rt,{className:"space-x-2",value:b.auth_method,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(L,{provider:c}),t.jsx("div",{children:b.name})]})},b.auth_method))})})]})})}function Xt(){return t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(yt,{className:"h-5 w-5 fill-primary-400"}),"Select an Authentication Method"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Connect ZenML to your resources for seamless integration of cloud services into your ML pipelines."})]}),t.jsx(Jt,{})]})}function er(){return t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(kt,{className:"h-5 w-5 fill-primary-400"}),"Add your Configuration"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Your credentials are securely stored and encrypted. ZenML uses these credentials to interact with your resources."})]}),t.jsx(tr,{})]})}function tr(){var c,h;const{data:e}=S(),{watch:r}=v(),s=J({...De.serviceConnectorTypeDetail(((c=e.connectorConfig)==null?void 0:c.type)||"")}),n=r("authMethod"),o=(h=s.data)==null?void 0:h.auth_methods.find(i=>i.auth_method===n);if(s.isError)return null;if(s.isPending)return t.jsx(Y,{className:"h-[200px] w-full"});if(!o)return null;const a=o.config_schema,l=a.properties||{},u=a.required||[],f=a.$defs,d=Object.entries(l).sort(([i],[m])=>u.includes(i)&&!u.includes(m)?-1:!u.includes(i)&&u.includes(m)?1:0);return t.jsx("div",{className:"space-y-5",children:d.map(([i,m])=>t.jsx(Ct,{definitions:f,isOptional:bt(i,u),name:i,schema:m},i))})}function rr({open:e,loadingComponents:r}){var n,o;const{data:s}=S();return(n=s.connectorConfig)!=null&&n.type?t.jsx(st,{open:e,children:t.jsxs(nt,{onPointerDownOutside:a=>a.preventDefault(),onEscapeKeyDown:a=>a.preventDefault(),className:"max-w-[600px]",children:[t.jsx("div",{className:"flex items-center justify-between border-b border-theme-border-moderate py-2 pl-5 pr-3",children:t.jsx(ot,{className:"text-text-lg",children:"Connecting and loading your components..."})}),t.jsxs("div",{className:"flex h-[200px] items-center justify-center gap-5 bg-primary-50",children:[t.jsx(it,{className:"h-[60px] w-[60px]"}),t.jsx("div",{className:"flex h-[60px] w-[60px] items-center justify-center",children:t.jsx(zt,{className:"h-5 w-5 fill-theme-text-tertiary"})}),t.jsx(L,{className:"h-[60px] w-[60px]",provider:s.connectorConfig.type})]}),t.jsxs("div",{className:"flex flex-col gap-1 px-7 pb-6 pt-5",children:[t.jsxs("p",{className:"text-theme-text-secondary",children:["We're securely connecting to ",He(((o=s.connectorConfig)==null?void 0:o.type)||"aws")," ","and retrieving your custom components. This process typically takes about 30-60 seconds."]}),t.jsx(sr,{loadingComponents:r})]})]})}):null}function sr({loadingComponents:e}){const[r,s]=p.useState(!0),[n,o]=p.useState(!0);return p.useEffect(()=>{const a=setTimeout(()=>{s(!1)},Math.floor(Math.random()*1e3)+500),l=setTimeout(()=>{o(!1)},1500);return()=>{clearTimeout(a),clearTimeout(l)}},[]),t.jsxs("ul",{className:"mt-3 space-y-3 text-theme-text-secondary",children:[t.jsxs(ue,{children:[t.jsx(le,{loading:r}),"Establishing a secure connection"]}),t.jsxs(ue,{children:[t.jsx(le,{loading:n}),"Authenticating your account"]}),t.jsxs(ue,{children:[t.jsx(le,{loading:e}),"Fetching your existing components"]})]})}function le({loading:e}){return e?t.jsx(at,{className:"h-5 w-5 border-2"}):t.jsx(_e,{className:"h-5 w-5",tickClasses:"w-3 h-3"})}function ue({children:e}){return t.jsx("li",{className:"flex items-center gap-1",children:e})}async function nr({payload:e}){const r=lt(dt.serviceConnectors.fullStackResources),s=await ct(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!s.ok){const n=await s.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Error while fetching service connector type");throw new ut({status:s.status,statusText:s.statusText,message:n})}return s.json()}function or(e){return Nt({...e,mutationFn:async({payload:r})=>nr({payload:r})})}function ir(){const{setCurrentStep:e}=F(),[r,s]=p.useState(!0),{toast:n}=Ie(),{setData:o,data:a}=S(),l=or({onSuccess:async f=>{o(d=>I(d,c=>{c.fullstackResources=f})),s(!1),await gt(200),e(d=>d+1)},onError:f=>{n({status:"error",emphasis:"subtle",description:f.message,rounded:!0})}});return{handleFormSubmit:({authMethod:f,stackName:d,...c})=>{Object.keys(c).forEach(i=>{(c[i]===""||c[i]===null||c[i]===void 0||Array.isArray(c[i])&&c[i].length===0)&&delete c[i]});const h=I(a,i=>{i.stackName=d,i.connectorConfig&&(i.connectorConfig.auth_method=f,i.connectorConfig.configuration={...c})});o(h),h.connectorConfig&&l.mutate({payload:h.connectorConfig})},fullStackResources:l,loadingComponents:r}}function ar(){const{handleSubmit:e,formState:{isSubmitting:r}}=v(),{handleFormSubmit:s,fullStackResources:n,loadingComponents:o}=ir();return t.jsxs("form",{onSubmit:e(s),id:"connect-form",children:[t.jsx(rr,{loadingComponents:o,open:r||n.isPending}),t.jsx(Xt,{}),t.jsx(Ue,{}),t.jsx(er,{})]})}function cr(){const{schema:e,defaultValues:r}=X(),s=W({shouldUnregister:!0,mode:"onChange",resolver:q(e),defaultValues:{stackName:"",authMethod:"",...r}});return t.jsx($,{...s,children:t.jsxs(D,{children:[t.jsx(O,{children:"Connect to your Cloud"}),t.jsx(E,{children:t.jsx(ar,{})}),t.jsx(R,{children:t.jsx(lr,{})})]})})}function lr(){const{formState:{isValid:e,isSubmitting:r}}=v(),s=!!Oe();return t.jsx(M,{className:"justify-center gap-2",disabled:!e||s||r,form:"connect-form",size:"md",children:s||r?"Loading...":"Next"})}function ur(){const{data:e,setData:r}=S(),s=Pt(),{toast:n}=Ie(),{setCurrentStep:o}=F(),{mutate:a}=jt({onError:d=>{d instanceof Error&&n({status:"error",emphasis:"subtle",icon:t.jsx(ft,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:d.message,rounded:!0})},onSuccess:async d=>{r(c=>I(c,h=>{h.createdStackId=d.id})),o(c=>c+1),s.invalidateQueries({queryKey:Ee.all})}});if(!e.fullstackResources)return o(2),{handleFormSubmit:()=>{},flattenedInstances:[]};const l=e.fullstackResources.components_resources_info.container_registry,u=l.flatMap(d=>d.accessible_by_service_connector.map(c=>({...d,value:c})));function f({flavor:d,resourceId:c}){const h=l.find(m=>m.flavor===d);if(!h)return;const i=I(e,m=>{m.registryConfig={flavor:d,configuration:Object.fromEntries(Object.keys(h.required_configuration||{}).map(x=>[x,c])),service_connector_resource_id:c}});r(i),a({workspaceId:"default",payload:{name:i.stackName||Math.random().toString(36).substring(7),service_connectors:i.connectorConfig?[i.connectorConfig]:[],components:{orchestrator:[{...i.orchestratorConfig,service_connector_index:0}],artifact_store:[{...i.artifactStoreConfig,service_connector_index:0}],container_registry:[{...i.registryConfig,service_connector_index:0}]}}})}return{handleFormSubmit:f,flattenedInstances:u}}const dr="container_registry";function fr(){const[e,r]=p.useState(""),{control:s,setValue:n,handleSubmit:o,register:a,watch:l,trigger:u,reset:f}=v(),{flattenedInstances:d,handleFormSubmit:c}=ur(),h=d.filter(i=>i.value.toLocaleLowerCase().includes(e.toLocaleLowerCase()));return t.jsxs(t.Fragment,{children:[t.jsx(ge,{placeholder:"Search...",onChange:i=>{f(),r(i.target.value)}}),t.jsxs("form",{onSubmit:o(c),id:"artifact-store-form",children:[t.jsx("input",{type:"hidden",...a("flavor")}),t.jsx("ul",{className:"space-y-1",children:h.map(i=>t.jsx("li",{children:t.jsx(k,{name:"resourceId",control:s,render:({field:{onChange:m,...x}})=>t.jsxs(H,{"data-state":l("resourceId")===i.value?"selected":"unselected",htmlFor:i.value,children:[t.jsx(U,{id:i.value,type:"radio",...x,onChange:C=>{n("flavor",i.flavor,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}),m(C.target.value),u()},value:i.value,name:"connector-radio"}),t.jsx(V,{width:24,height:24,type:dr,flavor:i.flavor})," ",t.jsx("span",{children:i.value})]})})},i.value))})]})]})}function mr(){return t.jsx("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(je,{type:"container_registry",className:"h-5 w-5 fill-primary-400"}),"Select your Container Registry"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select one of the Container Registries for your new stack"})]})})}const hr=y.object({flavor:y.string().min(1),resourceId:y.string().min(1)});function xr(){const e=W({resolver:q(hr),shouldUnregister:!0});return t.jsx($,{...e,children:t.jsxs(D,{children:[t.jsx(O,{children:"Container Registry"}),t.jsx(E,{children:t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsx(mr,{}),t.jsx(fr,{})]})}),t.jsx(R,{children:t.jsx(pr,{})})]})})}function pr(){const e=v(),r=!!Oe();return t.jsxs(M,{className:"justify-center gap-2",disabled:!e.formState.isValid||r,form:"artifact-store-form",size:"md",children:[r&&t.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),r?"Loading...":"Next"]})}function yr(){var a;const{data:e,setData:r}=S(),{setCurrentStep:s}=F();if(!e.fullstackResources)return s(2),{orchestrators:[],handleFormSubmit:()=>{}};const n=((a=e.fullstackResources.components_resources_info)==null?void 0:a.orchestrator)||[];function o({flavor:l,resourceId:u,...f}){const d=n.find(c=>c.flavor===l);d&&(r(c=>{const h=d!=null&&d.use_resource_value_as_fixed_config?Object.fromEntries(Object.keys(d.required_configuration||{}).map(i=>[i,u])):{...f};return I(c,i=>{i.orchestratorConfig={flavor:l,configuration:h,service_connector_resource_id:u}})}),s(c=>c+1))}return{orchestrators:n,handleFormSubmit:o}}const ye=y.object({flavor:y.string().min(1),resourceId:y.string().min(1)}),Z="kubernetes",ze="orchestrator";function gr(){const{orchestrators:e,handleFormSubmit:r}=yr(),{setSchema:s}=X(),{control:n,watch:o,setValue:a,register:l,reset:u,handleSubmit:f}=v(),d=o("flavor");return t.jsxs("form",{onSubmit:f(r),id:"artifact-store-form",children:[d!==Z&&t.jsx("input",{...l("resourceId"),type:"hidden"}),t.jsx("ul",{className:"space-y-1",children:e.map((c,h)=>t.jsxs("li",{children:[t.jsx(k,{control:n,name:"flavor",render:({field:{onChange:i,...m}})=>t.jsxs(H,{"data-state":d===c.flavor?"selected":"unselected",htmlFor:c.flavor,children:[t.jsx(U,{onChange:x=>{u({flavor:c.flavor}),c.use_resource_value_as_fixed_config===!0&&s(ye),c.use_resource_value_as_fixed_config===!1&&c.required_configuration&&s(ye.merge(wt(c.required_configuration))),c.flavor!==Z&&c.accessible_by_service_connector.length>0&&a("resourceId",c.accessible_by_service_connector[0]),i(x)},...m,id:c.flavor,type:"radio",value:c.flavor,name:"orchestrator-flavor-radio"}),t.jsx(V,{width:24,height:24,type:ze,flavor:c.flavor}),t.jsx("span",{children:c.flavor_display_name})]})}),d===c.flavor&&(c.flavor===Z||c.use_resource_value_as_fixed_config===!1)&&t.jsxs("div",{className:"space-y-3 py-5 pl-8",children:[c.flavor===Z&&t.jsx("ul",{className:"space-y-1",children:c.accessible_by_service_connector.map(i=>t.jsx("li",{children:t.jsx(k,{control:n,name:"resourceId",render:({field:m})=>t.jsxs(H,{"data-state":o("resourceId")===i?"selected":"unselected",htmlFor:i,children:[t.jsx(U,{...m,id:i,type:"radio",value:i,name:"instance-radio"}),t.jsx(V,{type:ze,width:24,height:24,flavor:c.flavor}),t.jsx("span",{children:i})]})})},i))}),c.use_resource_value_as_fixed_config===!1&&c.required_configuration&&Object.keys(c.required_configuration).length>=1&&t.jsx("div",{children:Object.entries(c.required_configuration).map(([i,m])=>t.jsx("div",{children:t.jsx(k,{defaultValue:"",name:i,control:n,render:({field:x})=>t.jsxs("div",{children:[t.jsx("label",{htmlFor:i,className:"text-text-sm",children:m}),t.jsx(ge,{...x,inputSize:"md",required:!0,className:"w-full",id:i})]})})},i))})]})]},h))})]})}function jr(){return t.jsx("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(je,{type:"orchestrator",className:"h-5 w-5 fill-primary-400"}),"Select your Orchestrator"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select one of the connected orchestrators for your new stack"})]})})}function _r(){const{schema:e}=X(),r=W({resolver:q(e),shouldUnregister:!0,defaultValues:{resourceId:""}});return t.jsx($,{...r,children:t.jsxs(D,{children:[t.jsx(O,{children:"Orchestrator"}),t.jsxs(E,{children:[t.jsx(jr,{}),t.jsx(gr,{})]}),t.jsx(R,{children:t.jsx(vr,{})})]})})}function vr(){const e=v();return t.jsx(M,{disabled:!e.formState.isValid,form:"artifact-store-form",size:"md",children:"Next"})}const Sr=y.object({provider:y.string().min(1)});function Cr(){var a;const{setData:e,data:r}=S(),{setCurrentStep:s}=F(),n=W({resolver:q(Sr),defaultValues:{provider:((a=r.connectorConfig)==null?void 0:a.type)||""}});function o(l){e(u=>({...u,connectorConfig:{type:l.provider,auth_method:""}})),s(u=>u+1)}return t.jsx($,{...n,children:t.jsxs(D,{children:[t.jsx(O,{children:"Select Your Existing Cloud Infrastructure"}),t.jsx(E,{children:t.jsxs("div",{className:"space-y-5",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"text-text-lg font-semibold",children:"Select a Cloud Provider"}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select the cloud provider where you have existing infrastructure to connect with ZenML. This will allow you to integrate your current cloud resources with ZenML for model deployment and management."})]}),t.jsxs("form",{id:"provider-form",onSubmit:n.handleSubmit(o),className:"grid grid-cols-1 gap-3 xl:grid-cols-3",children:[t.jsx(oe,{id:"aws-provider",...n.register("provider"),value:"aws",children:t.jsx(ie,{icon:t.jsx(L,{provider:"aws",className:"h-6 w-6 shrink-0"}),title:"AWS",subtitle:"Connect your existing S3, ECR, and Sagemaker components to ZenML"})}),t.jsx(oe,{id:"gcp-provider",...n.register("provider"),value:"gcp",children:t.jsx(ie,{icon:t.jsx(L,{provider:"gcp",className:"h-6 w-6 shrink-0"}),title:"GCP",subtitle:"Link your GCS, Artifact Registry, and Vertex AI components to ZenML"})}),t.jsx(oe,{id:"azure-provider",...n.register("provider"),value:"azure",children:t.jsx(ie,{icon:t.jsx(L,{provider:"azure",className:"h-6 w-6 shrink-0"}),title:"Azure",subtitle:"Integrate ZenML with your Blob Storage, Container Registry, and Azure ML"})})]})]})}),t.jsx(R,{children:t.jsx(br,{})})]})})}function br(){const{formState:{isValid:e}}=v();return t.jsx(M,{form:"provider-form",disabled:!e,size:"md",children:"Next"})}function wr(){var o;const{data:e}=S(),r=J({...Ee.stackDetail(e.createdStackId||""),throwOnError:!0});if(r.isError)return null;if(r.isPending)return t.jsx(Y,{className:"h-[200px] w-full"});const s=r.data,n=It((o=r.data.metadata)==null?void 0:o.components);return t.jsxs(D,{children:[t.jsx(O,{children:"Your stack"}),t.jsx(E,{children:t.jsxs("div",{className:"space-y-5",children:[t.jsx("p",{className:"text-theme-text-secondary",children:"Here you can review the created stack and stack components. Now you can start running pipelines using this new configuration."}),t.jsxs("div",{className:"divide-y divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[t.jsx(Pr,{stack:s}),n.map(a=>t.jsx(Fr,{component:a},a.id))]})]})}),t.jsx(R,{displayCancel:!1,children:t.jsx(Nr,{})})]})}function Nr(){return t.jsx(M,{size:"md",asChild:!0,children:t.jsx(Dt,{to:pt.stacks.overview,children:"Finish"})})}function Pr({stack:e}){return t.jsxs("div",{className:"flex items-center gap-3 bg-theme-surface-secondary p-5 font-semibold",children:[t.jsx(_e,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),t.jsx(mt,{type:"square",size:"lg",children:t.jsx(ht,{size:"lg",children:e.name[0]})}),t.jsxs("div",{children:[t.jsx("p",{className:"text-text-lg",children:e.name}),t.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]})}function Fr({component:e}){var r,s,n,o;return t.jsxs("div",{className:"flex items-center justify-between py-3 pl-9 pr-5",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(_e,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),t.jsx(V,{width:24,height:24,flavor:((r=e.body)==null?void 0:r.flavor_name)||"",type:((s=e.body)==null?void 0:s.type)||"orchestrator"}),t.jsxs("div",{children:[t.jsx("p",{className:"text-text-lg font-semibold",children:e.name}),t.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]}),t.jsx(At,{type:((n=e.body)==null?void 0:n.type)||"alerter",children:xt((o=e.body)==null?void 0:o.type)})]},e.id)}function kr(){const{currentStep:e}=F();if(e===1)return t.jsx(Cr,{});if(e===2)return t.jsx(be,{initialSchema:$e,children:t.jsx(cr,{})});if(e===3)return t.jsx(Gt,{});if(e===4)return t.jsx(be,{initialSchema:ye,children:t.jsx(_r,{})});if(e===5)return t.jsx(xr,{});if(e===6)return t.jsx(wr,{})}const Ae=["Infrastructure Type","Cloud Provider","Connect your Cloud","Artifact Store","Orchestrator","Container Registry"];function as(){return t.jsx(Ke,{maxSteps:Ae.length+1,initialStep:1,children:t.jsx(Ot,{children:t.jsxs("section",{className:"layout-container flex flex-col gap-5 py-5 xl:flex-row",children:[t.jsx(Qe,{entries:Ae}),t.jsx("div",{className:"w-full",children:t.jsx(kr,{})})]})})})}export{as as default};
|
1
|
+
import{r as p,j as t}from"./@radix-C7hRs6Kx.js";import{u as F,g as He,S as Ue,C as oe,P as ie,W as Ke,L as Qe}from"./ProviderRadio-BVDA-fAr.js";import{W as D,H as O,B as E}from"./Wizard-CMI6Ksgz.js";import{t as q}from"./zod-C0xYeTvL.js";import{z as y,S as Y,Z as Ge,I as ge,h as M,az as Ye,aA as Je,aB as Xe,aC as et,ah as tt,aD as rt,ai as st,ak as nt,am as ot,d as it,_ as at,j as ct,o as lt,F as ut,p as dt,f as Ie,i as ft,A as mt,b as ht,ac as xt,r as pt}from"./index-D2iSHVZq.js";import{b as v,C as k,u as W,F as $}from"./index.esm-D7jFlf5N.js";import{S as R}from"./WizardFooter-CFBHFZas.js";import{C as je,b as yt}from"./ComponentIcon-ils7uNAk.js";import{R as H,a as U,s as gt,u as jt}from"./create-stack-BJ6x5rzj.js";import{f as _t,s as De,g as vt,a as St,D as Ct,b as bt,z as wt}from"./index-CmLcvK2z.js";import{a as J,b as Nt,j as Oe,c as Pt}from"./@tanstack-CSxjHCME.js";import{C as L}from"./ProviderIcon-DLo7t1lo.js";import{s as Ft}from"./sharedSchema-Bse2agAf.js";import{S as kt}from"./Lock-DW-0_M0o.js";import{S as zt}from"./dots-horizontal-BGRJCPCs.js";import{T as _e}from"./Tick-CEsT3HPR.js";import{s as Ee}from"./index-CrhdX_qG.js";import{C as At}from"./ComponentBadge-DKw7Gndh.js";import{e as It}from"./components-Br2ezRib.js";import{L as Dt}from"./@react-router-CNP6g_RL.js";import"./persist-D87V82eO.js";import"./@reactflow-CQi1Z1Wq.js";import"./layout-h3cbx8WZ.js";import"./rocket-Cf-B-XOR.js";import"./plus-COjQg3AG.js";import"./trash-BWSZ7NRK.js";import"./type-guards-CaeD8wHO.js";import"./gcp-CHNvgEss.js";import"./check-DK77doTf.js";import"./stack-detail-query-BAcZJrN3.js";const Me=p.createContext(null);function Ot({children:e}){const[r,s]=p.useState({stackName:null,createdStackId:null,connectorConfig:null,fullstackResources:null,artifactStoreConfig:null,registryConfig:null,orchestratorConfig:null});return t.jsx(Me.Provider,{value:{data:r,setData:s},children:e})}function S(){const e=p.useContext(Me);if(e===null)throw new Error("useExistingInfraContext must be used within an ExistingInfraProvider");return e}const Re=p.createContext(null);function be({children:e,initialSchema:r}){const[s,n]=p.useState(r),[o,a]=p.useState({});return t.jsx(Re.Provider,{value:{schema:s,setSchema:n,defaultValues:o,setDefaultValues:a},children:e})}function X(){const e=p.useContext(Re);if(!e)throw new Error("useSchemaContext must be used within a SchemaProvider");return e}const Et=y.object({resourceId:y.string().min(1),flavor:y.string()});function Mt(){return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(je,{type:"artifact_store",className:"h-5 w-5 fill-primary-400"}),"Select your Artifact Store"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Choose one of the storages for the new Artifact Store."})]})}var Le=Symbol.for("immer-nothing"),we=Symbol.for("immer-draftable"),g=Symbol.for("immer-state");function _(e,...r){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var z=Object.getPrototypeOf;function A(e){return!!e&&!!e[g]}function N(e){var r;return e?Te(e)||Array.isArray(e)||!!e[we]||!!((r=e.constructor)!=null&&r[we])||te(e)||re(e):!1}var Rt=Object.prototype.constructor.toString();function Te(e){if(!e||typeof e!="object")return!1;const r=z(e);if(r===null)return!0;const s=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return s===Object?!0:typeof s=="function"&&Function.toString.call(s)===Rt}function K(e,r){ee(e)===0?Reflect.ownKeys(e).forEach(s=>{r(s,e[s],e)}):e.forEach((s,n)=>r(n,s,e))}function ee(e){const r=e[g];return r?r.type_:Array.isArray(e)?1:te(e)?2:re(e)?3:0}function de(e,r){return ee(e)===2?e.has(r):Object.prototype.hasOwnProperty.call(e,r)}function Be(e,r,s){const n=ee(e);n===2?e.set(r,s):n===3?e.add(s):e[r]=s}function Lt(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}function te(e){return e instanceof Map}function re(e){return e instanceof Set}function w(e){return e.copy_||e.base_}function fe(e,r){if(te(e))return new Map(e);if(re(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const s=Te(e);if(r===!0||r==="class_only"&&!s){const n=Object.getOwnPropertyDescriptors(e);delete n[g];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){const l=o[a],u=n[l];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[l]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[l]})}return Object.create(z(e),n)}else{const n=z(e);if(n!==null&&s)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function ve(e,r=!1){return se(e)||A(e)||!N(e)||(ee(e)>1&&(e.set=e.add=e.clear=e.delete=Tt),Object.freeze(e),r&&Object.entries(e).forEach(([s,n])=>ve(n,!0))),e}function Tt(){_(2)}function se(e){return Object.isFrozen(e)}var Bt={};function P(e){const r=Bt[e];return r||_(0,e),r}var T;function Ve(){return T}function Vt(e,r){return{drafts_:[],parent_:e,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ne(e,r){r&&(P("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=r)}function me(e){he(e),e.drafts_.forEach(qt),e.drafts_=null}function he(e){e===T&&(T=e.parent_)}function Pe(e){return T=Vt(T,e)}function qt(e){const r=e[g];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function Fe(e,r){r.unfinalizedDrafts_=r.drafts_.length;const s=r.drafts_[0];return e!==void 0&&e!==s?(s[g].modified_&&(me(r),_(4)),N(e)&&(e=Q(r,e),r.parent_||G(r,e)),r.patches_&&P("Patches").generateReplacementPatches_(s[g].base_,e,r.patches_,r.inversePatches_)):e=Q(r,s,[]),me(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),e!==Le?e:void 0}function Q(e,r,s){if(se(r))return r;const n=r[g];if(!n)return K(r,(o,a)=>ke(e,n,r,o,a,s)),r;if(n.scope_!==e)return r;if(!n.modified_)return G(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const o=n.copy_;let a=o,l=!1;n.type_===3&&(a=new Set(o),o.clear(),l=!0),K(a,(u,f)=>ke(e,n,o,u,f,s,l)),G(e,o,!1),s&&e.patches_&&P("Patches").generatePatches_(n,s,e.patches_,e.inversePatches_)}return n.copy_}function ke(e,r,s,n,o,a,l){if(A(o)){const u=a&&r&&r.type_!==3&&!de(r.assigned_,n)?a.concat(n):void 0,f=Q(e,o,u);if(Be(s,n,f),A(f))e.canAutoFreeze_=!1;else return}else l&&s.add(o);if(N(o)&&!se(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Q(e,o),(!r||!r.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(s,n)&&G(e,o)}}function G(e,r,s=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ve(r,s)}function Wt(e,r){const s=Array.isArray(e),n={type_:s?1:0,scope_:r?r.scope_:Ve(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,a=Se;s&&(o=[n],a=B);const{revoke:l,proxy:u}=Proxy.revocable(o,a);return n.draft_=u,n.revoke_=l,u}var Se={get(e,r){if(r===g)return e;const s=w(e);if(!de(s,r))return $t(e,s,r);const n=s[r];return e.finalized_||!N(n)?n:n===ae(e.base_,r)?(ce(e),e.copy_[r]=pe(n,e)):n},has(e,r){return r in w(e)},ownKeys(e){return Reflect.ownKeys(w(e))},set(e,r,s){const n=qe(w(e),r);if(n!=null&&n.set)return n.set.call(e.draft_,s),!0;if(!e.modified_){const o=ae(w(e),r),a=o==null?void 0:o[g];if(a&&a.base_===s)return e.copy_[r]=s,e.assigned_[r]=!1,!0;if(Lt(s,o)&&(s!==void 0||de(e.base_,r)))return!0;ce(e),xe(e)}return e.copy_[r]===s&&(s!==void 0||r in e.copy_)||Number.isNaN(s)&&Number.isNaN(e.copy_[r])||(e.copy_[r]=s,e.assigned_[r]=!0),!0},deleteProperty(e,r){return ae(e.base_,r)!==void 0||r in e.base_?(e.assigned_[r]=!1,ce(e),xe(e)):delete e.assigned_[r],e.copy_&&delete e.copy_[r],!0},getOwnPropertyDescriptor(e,r){const s=w(e),n=Reflect.getOwnPropertyDescriptor(s,r);return n&&{writable:!0,configurable:e.type_!==1||r!=="length",enumerable:n.enumerable,value:s[r]}},defineProperty(){_(11)},getPrototypeOf(e){return z(e.base_)},setPrototypeOf(){_(12)}},B={};K(Se,(e,r)=>{B[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});B.deleteProperty=function(e,r){return B.set.call(this,e,r,void 0)};B.set=function(e,r,s){return Se.set.call(this,e[0],r,s,e[0])};function ae(e,r){const s=e[g];return(s?w(s):e)[r]}function $t(e,r,s){var o;const n=qe(r,s);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function qe(e,r){if(!(r in e))return;let s=z(e);for(;s;){const n=Object.getOwnPropertyDescriptor(s,r);if(n)return n;s=z(s)}}function xe(e){e.modified_||(e.modified_=!0,e.parent_&&xe(e.parent_))}function ce(e){e.copy_||(e.copy_=fe(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Zt=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(r,s,n)=>{if(typeof r=="function"&&typeof s!="function"){const a=s;s=r;const l=this;return function(f=a,...d){return l.produce(f,c=>s.call(this,c,...d))}}typeof s!="function"&&_(6),n!==void 0&&typeof n!="function"&&_(7);let o;if(N(r)){const a=Pe(this),l=pe(r,void 0);let u=!0;try{o=s(l),u=!1}finally{u?me(a):he(a)}return Ne(a,n),Fe(o,a)}else if(!r||typeof r!="object"){if(o=s(r),o===void 0&&(o=r),o===Le&&(o=void 0),this.autoFreeze_&&ve(o,!0),n){const a=[],l=[];P("Patches").generateReplacementPatches_(r,o,a,l),n(a,l)}return o}else _(1,r)},this.produceWithPatches=(r,s)=>{if(typeof r=="function")return(l,...u)=>this.produceWithPatches(l,f=>r(f,...u));let n,o;return[this.produce(r,s,(l,u)=>{n=l,o=u}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){N(e)||_(8),A(e)&&(e=Ht(e));const r=Pe(this),s=pe(e,void 0);return s[g].isManual_=!0,he(r),s}finishDraft(e,r){const s=e&&e[g];(!s||!s.isManual_)&&_(9);const{scope_:n}=s;return Ne(n,r),Fe(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,r){let s;for(s=r.length-1;s>=0;s--){const o=r[s];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}s>-1&&(r=r.slice(s+1));const n=P("Patches").applyPatches_;return A(e)?n(e,r):this.produce(e,o=>n(o,r))}};function pe(e,r){const s=te(e)?P("MapSet").proxyMap_(e,r):re(e)?P("MapSet").proxySet_(e,r):Wt(e,r);return(r?r.scope_:Ve()).drafts_.push(s),s}function Ht(e){return A(e)||_(10,e),We(e)}function We(e){if(!N(e)||se(e))return e;const r=e[g];let s;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,s=fe(e,r.scope_.immer_.useStrictShallowCopy_)}else s=fe(e,!0);return K(s,(n,o)=>{Be(s,n,We(o))}),r&&(r.finalized_=!1),s}var j=new Zt,I=j.produce;j.produceWithPatches.bind(j);j.setAutoFreeze.bind(j);j.setUseStrictShallowCopy.bind(j);j.applyPatches.bind(j);j.createDraft.bind(j);j.finishDraft.bind(j);function Ut(){const{data:e,setData:r}=S(),{setCurrentStep:s}=F();if(!e.fullstackResources)return s(2),{handleFormSubmit:()=>{},flattenedInstances:[]};const n=e.fullstackResources.components_resources_info.artifact_store,o=n.flatMap(l=>l.accessible_by_service_connector.map(u=>({...l,value:u})));function a({flavor:l,resourceId:u}){const f=n.find(d=>d.flavor===l);f&&(r(d=>I(d,c=>{c.artifactStoreConfig={flavor:l,configuration:Object.fromEntries(Object.keys(f.required_configuration||{}).map(h=>[h,u])),service_connector_resource_id:u}})),s(d=>d+1))}return{handleFormSubmit:a,flattenedInstances:o}}function V({flavor:e,type:r,width:s=32,height:n=32,...o}){var l;const a=J({..._t.flavorList({name:e,type:r})});return a.isError?null:a.isPending?t.jsx(Y,{style:{height:`${n}px`,width:`${s}px`}}):t.jsx("img",{width:s,height:n,alt:`${e} logo`,...o,src:Ge(((l=a.data.items[0].body)==null?void 0:l.logo_url)??"")})}const Kt="artifact_store";function Qt(){const[e,r]=p.useState(""),{control:s,setValue:n,handleSubmit:o,register:a,watch:l,trigger:u,reset:f}=v(),{flattenedInstances:d,handleFormSubmit:c}=Ut(),h=d.filter(i=>i.value.toLocaleLowerCase().includes(e.toLocaleLowerCase()));return t.jsxs(t.Fragment,{children:[t.jsx(ge,{placeholder:"Search...",onChange:i=>{f(),r(i.target.value)}}),t.jsxs("form",{onSubmit:o(c),id:"artifact-store-form",children:[t.jsx("input",{type:"hidden",...a("flavor")}),t.jsx("ul",{className:"space-y-1",children:h.map(i=>t.jsx("li",{children:t.jsx(k,{name:"resourceId",control:s,render:({field:{onChange:m,...x}})=>t.jsxs(H,{"data-state":l("resourceId")===i.value?"selected":"unselected",htmlFor:i.value,children:[t.jsx(U,{id:i.value,type:"radio",...x,onChange:C=>{n("flavor",i.flavor,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}),m(C.target.value),u()},value:i.value,name:"connector-radio"}),t.jsx(V,{type:Kt,width:24,height:24,flavor:i.flavor})," ",t.jsx("span",{children:i.value})]})})},i.value))})]})]})}function Gt(){const e=W({resolver:q(Et),shouldUnregister:!0});return t.jsx($,{...e,children:t.jsxs(D,{children:[t.jsx(O,{children:"Artifact Store"}),t.jsx(E,{children:t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsx(Mt,{}),t.jsx(Qt,{})]})}),t.jsx(R,{children:t.jsx(Yt,{})})]})})}function Yt(){const e=v();return t.jsx(M,{disabled:!e.formState.isValid,form:"artifact-store-form",size:"md",children:"Next"})}const $e=y.object({authMethod:y.string().min(1),stackName:Ft});function Jt(){var h,i;const{data:e}=S(),{setCurrentStep:r}=F(),{control:s,watch:n,resetField:o}=v(),{setSchema:a,setDefaultValues:l}=X(),u=J({...De.serviceConnectorTypeDetail(((h=e.connectorConfig)==null?void 0:h.type)||"")});if(u.isError)return null;if(u.isPending)return t.jsx(Y,{className:"h-[40px] w-[100px]"});const f=u.data.auth_methods.filter(m=>m.auth_method!=="implicit").map(m=>({name:m.name,auth_method:m.auth_method}));if(!((i=e.connectorConfig)!=null&&i.type)){r(1);return}function d(){var Ce;const m=n("authMethod"),x=(Ce=u.data)==null?void 0:Ce.auth_methods.find(ne=>ne.auth_method===m);if(!x)return;const C=x.config_schema,b=vt(C),Ze=St(C);a($e.merge(b)),l(Ze),Object.keys(b.shape).forEach(ne=>o(ne))}const c=e.connectorConfig.type||"";return t.jsx(k,{control:s,name:"authMethod",render:({field:{onChange:m,ref:x,...C}})=>t.jsxs(Ye,{...C,onValueChange:b=>{m(b),d()},children:[t.jsx(Je,{className:"w-fit border border-neutral-300 text-left text-text-md",children:t.jsx(Xe,{className:"flex items-center gap-2",placeholder:"Select your Auth Method"})}),t.jsx(et,{children:t.jsx(tt,{viewportClassName:"max-h-[300px]",children:f.map(b=>t.jsx(rt,{className:"space-x-2",value:b.auth_method,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(L,{provider:c}),t.jsx("div",{children:b.name})]})},b.auth_method))})})]})})}function Xt(){return t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(yt,{className:"h-5 w-5 fill-primary-400"}),"Select an Authentication Method"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Connect ZenML to your resources for seamless integration of cloud services into your ML pipelines."})]}),t.jsx(Jt,{})]})}function er(){return t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(kt,{className:"h-5 w-5 fill-primary-400"}),"Add your Configuration"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Your credentials are securely stored and encrypted. ZenML uses these credentials to interact with your resources."})]}),t.jsx(tr,{})]})}function tr(){var c,h;const{data:e}=S(),{watch:r}=v(),s=J({...De.serviceConnectorTypeDetail(((c=e.connectorConfig)==null?void 0:c.type)||"")}),n=r("authMethod"),o=(h=s.data)==null?void 0:h.auth_methods.find(i=>i.auth_method===n);if(s.isError)return null;if(s.isPending)return t.jsx(Y,{className:"h-[200px] w-full"});if(!o)return null;const a=o.config_schema,l=a.properties||{},u=a.required||[],f=a.$defs,d=Object.entries(l).sort(([i],[m])=>u.includes(i)&&!u.includes(m)?-1:!u.includes(i)&&u.includes(m)?1:0);return t.jsx("div",{className:"space-y-5",children:d.map(([i,m])=>t.jsx(Ct,{definitions:f,isOptional:bt(i,u),name:i,schema:m},i))})}function rr({open:e,loadingComponents:r}){var n,o;const{data:s}=S();return(n=s.connectorConfig)!=null&&n.type?t.jsx(st,{open:e,children:t.jsxs(nt,{onPointerDownOutside:a=>a.preventDefault(),onEscapeKeyDown:a=>a.preventDefault(),className:"max-w-[600px]",children:[t.jsx("div",{className:"flex items-center justify-between border-b border-theme-border-moderate py-2 pl-5 pr-3",children:t.jsx(ot,{className:"text-text-lg",children:"Connecting and loading your components..."})}),t.jsxs("div",{className:"flex h-[200px] items-center justify-center gap-5 bg-primary-50",children:[t.jsx(it,{className:"h-[60px] w-[60px]"}),t.jsx("div",{className:"flex h-[60px] w-[60px] items-center justify-center",children:t.jsx(zt,{className:"h-5 w-5 fill-theme-text-tertiary"})}),t.jsx(L,{className:"h-[60px] w-[60px]",provider:s.connectorConfig.type})]}),t.jsxs("div",{className:"flex flex-col gap-1 px-7 pb-6 pt-5",children:[t.jsxs("p",{className:"text-theme-text-secondary",children:["We're securely connecting to ",He(((o=s.connectorConfig)==null?void 0:o.type)||"aws")," ","and retrieving your custom components. This process typically takes about 30-60 seconds."]}),t.jsx(sr,{loadingComponents:r})]})]})}):null}function sr({loadingComponents:e}){const[r,s]=p.useState(!0),[n,o]=p.useState(!0);return p.useEffect(()=>{const a=setTimeout(()=>{s(!1)},Math.floor(Math.random()*1e3)+500),l=setTimeout(()=>{o(!1)},1500);return()=>{clearTimeout(a),clearTimeout(l)}},[]),t.jsxs("ul",{className:"mt-3 space-y-3 text-theme-text-secondary",children:[t.jsxs(ue,{children:[t.jsx(le,{loading:r}),"Establishing a secure connection"]}),t.jsxs(ue,{children:[t.jsx(le,{loading:n}),"Authenticating your account"]}),t.jsxs(ue,{children:[t.jsx(le,{loading:e}),"Fetching your existing components"]})]})}function le({loading:e}){return e?t.jsx(at,{className:"h-5 w-5 border-2"}):t.jsx(_e,{className:"h-5 w-5",tickClasses:"w-3 h-3"})}function ue({children:e}){return t.jsx("li",{className:"flex items-center gap-1",children:e})}async function nr({payload:e}){const r=lt(dt.serviceConnectors.fullStackResources),s=await ct(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!s.ok){const n=await s.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Error while fetching service connector type");throw new ut({status:s.status,statusText:s.statusText,message:n})}return s.json()}function or(e){return Nt({...e,mutationFn:async({payload:r})=>nr({payload:r})})}function ir(){const{setCurrentStep:e}=F(),[r,s]=p.useState(!0),{toast:n}=Ie(),{setData:o,data:a}=S(),l=or({onSuccess:async f=>{o(d=>I(d,c=>{c.fullstackResources=f})),s(!1),await gt(200),e(d=>d+1)},onError:f=>{n({status:"error",emphasis:"subtle",description:f.message,rounded:!0})}});return{handleFormSubmit:({authMethod:f,stackName:d,...c})=>{Object.keys(c).forEach(i=>{(c[i]===""||c[i]===null||c[i]===void 0||Array.isArray(c[i])&&c[i].length===0)&&delete c[i]});const h=I(a,i=>{i.stackName=d,i.connectorConfig&&(i.connectorConfig.auth_method=f,i.connectorConfig.configuration={...c})});o(h),h.connectorConfig&&l.mutate({payload:h.connectorConfig})},fullStackResources:l,loadingComponents:r}}function ar(){const{handleSubmit:e,formState:{isSubmitting:r}}=v(),{handleFormSubmit:s,fullStackResources:n,loadingComponents:o}=ir();return t.jsxs("form",{onSubmit:e(s),id:"connect-form",children:[t.jsx(rr,{loadingComponents:o,open:r||n.isPending}),t.jsx(Xt,{}),t.jsx(Ue,{}),t.jsx(er,{})]})}function cr(){const{schema:e,defaultValues:r}=X(),s=W({shouldUnregister:!0,mode:"onChange",resolver:q(e),defaultValues:{stackName:"",authMethod:"",...r}});return t.jsx($,{...s,children:t.jsxs(D,{children:[t.jsx(O,{children:"Connect to your Cloud"}),t.jsx(E,{children:t.jsx(ar,{})}),t.jsx(R,{children:t.jsx(lr,{})})]})})}function lr(){const{formState:{isValid:e,isSubmitting:r}}=v(),s=!!Oe();return t.jsx(M,{className:"justify-center gap-2",disabled:!e||s||r,form:"connect-form",size:"md",children:s||r?"Loading...":"Next"})}function ur(){const{data:e,setData:r}=S(),s=Pt(),{toast:n}=Ie(),{setCurrentStep:o}=F(),{mutate:a}=jt({onError:d=>{d instanceof Error&&n({status:"error",emphasis:"subtle",icon:t.jsx(ft,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:d.message,rounded:!0})},onSuccess:async d=>{r(c=>I(c,h=>{h.createdStackId=d.id})),o(c=>c+1),s.invalidateQueries({queryKey:Ee.all})}});if(!e.fullstackResources)return o(2),{handleFormSubmit:()=>{},flattenedInstances:[]};const l=e.fullstackResources.components_resources_info.container_registry,u=l.flatMap(d=>d.accessible_by_service_connector.map(c=>({...d,value:c})));function f({flavor:d,resourceId:c}){const h=l.find(m=>m.flavor===d);if(!h)return;const i=I(e,m=>{m.registryConfig={flavor:d,configuration:Object.fromEntries(Object.keys(h.required_configuration||{}).map(x=>[x,c])),service_connector_resource_id:c}});r(i),a({workspaceId:"default",payload:{name:i.stackName||Math.random().toString(36).substring(7),service_connectors:i.connectorConfig?[i.connectorConfig]:[],components:{orchestrator:[{...i.orchestratorConfig,service_connector_index:0}],artifact_store:[{...i.artifactStoreConfig,service_connector_index:0}],container_registry:[{...i.registryConfig,service_connector_index:0}]}}})}return{handleFormSubmit:f,flattenedInstances:u}}const dr="container_registry";function fr(){const[e,r]=p.useState(""),{control:s,setValue:n,handleSubmit:o,register:a,watch:l,trigger:u,reset:f}=v(),{flattenedInstances:d,handleFormSubmit:c}=ur(),h=d.filter(i=>i.value.toLocaleLowerCase().includes(e.toLocaleLowerCase()));return t.jsxs(t.Fragment,{children:[t.jsx(ge,{placeholder:"Search...",onChange:i=>{f(),r(i.target.value)}}),t.jsxs("form",{onSubmit:o(c),id:"artifact-store-form",children:[t.jsx("input",{type:"hidden",...a("flavor")}),t.jsx("ul",{className:"space-y-1",children:h.map(i=>t.jsx("li",{children:t.jsx(k,{name:"resourceId",control:s,render:({field:{onChange:m,...x}})=>t.jsxs(H,{"data-state":l("resourceId")===i.value?"selected":"unselected",htmlFor:i.value,children:[t.jsx(U,{id:i.value,type:"radio",...x,onChange:C=>{n("flavor",i.flavor,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}),m(C.target.value),u()},value:i.value,name:"connector-radio"}),t.jsx(V,{width:24,height:24,type:dr,flavor:i.flavor})," ",t.jsx("span",{children:i.value})]})})},i.value))})]})]})}function mr(){return t.jsx("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(je,{type:"container_registry",className:"h-5 w-5 fill-primary-400"}),"Select your Container Registry"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select one of the Container Registries for your new stack"})]})})}const hr=y.object({flavor:y.string().min(1),resourceId:y.string().min(1)});function xr(){const e=W({resolver:q(hr),shouldUnregister:!0});return t.jsx($,{...e,children:t.jsxs(D,{children:[t.jsx(O,{children:"Container Registry"}),t.jsx(E,{children:t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsx(mr,{}),t.jsx(fr,{})]})}),t.jsx(R,{children:t.jsx(pr,{})})]})})}function pr(){const e=v(),r=!!Oe();return t.jsxs(M,{className:"justify-center gap-2",disabled:!e.formState.isValid||r,form:"artifact-store-form",size:"md",children:[r&&t.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),r?"Loading...":"Next"]})}function yr(){var a;const{data:e,setData:r}=S(),{setCurrentStep:s}=F();if(!e.fullstackResources)return s(2),{orchestrators:[],handleFormSubmit:()=>{}};const n=((a=e.fullstackResources.components_resources_info)==null?void 0:a.orchestrator)||[];function o({flavor:l,resourceId:u,...f}){const d=n.find(c=>c.flavor===l);d&&(r(c=>{const h=d!=null&&d.use_resource_value_as_fixed_config?Object.fromEntries(Object.keys(d.required_configuration||{}).map(i=>[i,u])):{...f};return I(c,i=>{i.orchestratorConfig={flavor:l,configuration:h,service_connector_resource_id:u}})}),s(c=>c+1))}return{orchestrators:n,handleFormSubmit:o}}const ye=y.object({flavor:y.string().min(1),resourceId:y.string().min(1)}),Z="kubernetes",ze="orchestrator";function gr(){const{orchestrators:e,handleFormSubmit:r}=yr(),{setSchema:s}=X(),{control:n,watch:o,setValue:a,register:l,reset:u,handleSubmit:f}=v(),d=o("flavor");return t.jsxs("form",{onSubmit:f(r),id:"artifact-store-form",children:[d!==Z&&t.jsx("input",{...l("resourceId"),type:"hidden"}),t.jsx("ul",{className:"space-y-1",children:e.map((c,h)=>t.jsxs("li",{children:[t.jsx(k,{control:n,name:"flavor",render:({field:{onChange:i,...m}})=>t.jsxs(H,{"data-state":d===c.flavor?"selected":"unselected",htmlFor:c.flavor,children:[t.jsx(U,{onChange:x=>{u({flavor:c.flavor}),c.use_resource_value_as_fixed_config===!0&&s(ye),c.use_resource_value_as_fixed_config===!1&&c.required_configuration&&s(ye.merge(wt(c.required_configuration))),c.flavor!==Z&&c.accessible_by_service_connector.length>0&&a("resourceId",c.accessible_by_service_connector[0]),i(x)},...m,id:c.flavor,type:"radio",value:c.flavor,name:"orchestrator-flavor-radio"}),t.jsx(V,{width:24,height:24,type:ze,flavor:c.flavor}),t.jsx("span",{children:c.flavor_display_name})]})}),d===c.flavor&&(c.flavor===Z||c.use_resource_value_as_fixed_config===!1)&&t.jsxs("div",{className:"space-y-3 py-5 pl-8",children:[c.flavor===Z&&t.jsx("ul",{className:"space-y-1",children:c.accessible_by_service_connector.map(i=>t.jsx("li",{children:t.jsx(k,{control:n,name:"resourceId",render:({field:m})=>t.jsxs(H,{"data-state":o("resourceId")===i?"selected":"unselected",htmlFor:i,children:[t.jsx(U,{...m,id:i,type:"radio",value:i,name:"instance-radio"}),t.jsx(V,{type:ze,width:24,height:24,flavor:c.flavor}),t.jsx("span",{children:i})]})})},i))}),c.use_resource_value_as_fixed_config===!1&&c.required_configuration&&Object.keys(c.required_configuration).length>=1&&t.jsx("div",{children:Object.entries(c.required_configuration).map(([i,m])=>t.jsx("div",{children:t.jsx(k,{defaultValue:"",name:i,control:n,render:({field:x})=>t.jsxs("div",{children:[t.jsx("label",{htmlFor:i,className:"text-text-sm",children:m}),t.jsx(ge,{...x,inputSize:"md",required:!0,className:"w-full",id:i})]})})},i))})]})]},h))})]})}function jr(){return t.jsx("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(je,{type:"orchestrator",className:"h-5 w-5 fill-primary-400"}),"Select your Orchestrator"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select one of the connected orchestrators for your new stack"})]})})}function _r(){const{schema:e}=X(),r=W({resolver:q(e),shouldUnregister:!0,defaultValues:{resourceId:""}});return t.jsx($,{...r,children:t.jsxs(D,{children:[t.jsx(O,{children:"Orchestrator"}),t.jsxs(E,{children:[t.jsx(jr,{}),t.jsx(gr,{})]}),t.jsx(R,{children:t.jsx(vr,{})})]})})}function vr(){const e=v();return t.jsx(M,{disabled:!e.formState.isValid,form:"artifact-store-form",size:"md",children:"Next"})}const Sr=y.object({provider:y.string().min(1)});function Cr(){var a;const{setData:e,data:r}=S(),{setCurrentStep:s}=F(),n=W({resolver:q(Sr),defaultValues:{provider:((a=r.connectorConfig)==null?void 0:a.type)||""}});function o(l){e(u=>({...u,connectorConfig:{type:l.provider,auth_method:""}})),s(u=>u+1)}return t.jsx($,{...n,children:t.jsxs(D,{children:[t.jsx(O,{children:"Select Your Existing Cloud Infrastructure"}),t.jsx(E,{children:t.jsxs("div",{className:"space-y-5",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"text-text-lg font-semibold",children:"Select a Cloud Provider"}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select the cloud provider where you have existing infrastructure to connect with ZenML. This will allow you to integrate your current cloud resources with ZenML for model deployment and management."})]}),t.jsxs("form",{id:"provider-form",onSubmit:n.handleSubmit(o),className:"grid grid-cols-1 gap-3 xl:grid-cols-3",children:[t.jsx(oe,{id:"aws-provider",...n.register("provider"),value:"aws",children:t.jsx(ie,{icon:t.jsx(L,{provider:"aws",className:"h-6 w-6 shrink-0"}),title:"AWS",subtitle:"Connect your existing S3, ECR, and Sagemaker components to ZenML"})}),t.jsx(oe,{id:"gcp-provider",...n.register("provider"),value:"gcp",children:t.jsx(ie,{icon:t.jsx(L,{provider:"gcp",className:"h-6 w-6 shrink-0"}),title:"GCP",subtitle:"Link your GCS, Artifact Registry, and Vertex AI components to ZenML"})}),t.jsx(oe,{id:"azure-provider",...n.register("provider"),value:"azure",children:t.jsx(ie,{icon:t.jsx(L,{provider:"azure",className:"h-6 w-6 shrink-0"}),title:"Azure",subtitle:"Integrate ZenML with your Blob Storage, Container Registry, and Azure ML"})})]})]})}),t.jsx(R,{children:t.jsx(br,{})})]})})}function br(){const{formState:{isValid:e}}=v();return t.jsx(M,{form:"provider-form",disabled:!e,size:"md",children:"Next"})}function wr(){var o;const{data:e}=S(),r=J({...Ee.stackDetail(e.createdStackId||""),throwOnError:!0});if(r.isError)return null;if(r.isPending)return t.jsx(Y,{className:"h-[200px] w-full"});const s=r.data,n=It((o=r.data.metadata)==null?void 0:o.components);return t.jsxs(D,{children:[t.jsx(O,{children:"Your stack"}),t.jsx(E,{children:t.jsxs("div",{className:"space-y-5",children:[t.jsx("p",{className:"text-theme-text-secondary",children:"Here you can review the created stack and stack components. Now you can start running pipelines using this new configuration."}),t.jsxs("div",{className:"divide-y divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[t.jsx(Pr,{stack:s}),n.map(a=>t.jsx(Fr,{component:a},a.id))]})]})}),t.jsx(R,{displayCancel:!1,children:t.jsx(Nr,{})})]})}function Nr(){return t.jsx(M,{size:"md",asChild:!0,children:t.jsx(Dt,{to:pt.stacks.overview,children:"Finish"})})}function Pr({stack:e}){return t.jsxs("div",{className:"flex items-center gap-3 bg-theme-surface-secondary p-5 font-semibold",children:[t.jsx(_e,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),t.jsx(mt,{type:"square",size:"lg",children:t.jsx(ht,{size:"lg",children:e.name[0]})}),t.jsxs("div",{children:[t.jsx("p",{className:"text-text-lg",children:e.name}),t.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]})}function Fr({component:e}){var r,s,n,o;return t.jsxs("div",{className:"flex items-center justify-between py-3 pl-9 pr-5",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(_e,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),t.jsx(V,{width:24,height:24,flavor:((r=e.body)==null?void 0:r.flavor_name)||"",type:((s=e.body)==null?void 0:s.type)||"orchestrator"}),t.jsxs("div",{children:[t.jsx("p",{className:"text-text-lg font-semibold",children:e.name}),t.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]}),t.jsx(At,{type:((n=e.body)==null?void 0:n.type)||"alerter",children:xt((o=e.body)==null?void 0:o.type)})]},e.id)}function kr(){const{currentStep:e}=F();if(e===1)return t.jsx(Cr,{});if(e===2)return t.jsx(be,{initialSchema:$e,children:t.jsx(cr,{})});if(e===3)return t.jsx(Gt,{});if(e===4)return t.jsx(be,{initialSchema:ye,children:t.jsx(_r,{})});if(e===5)return t.jsx(xr,{});if(e===6)return t.jsx(wr,{})}const Ae=["Infrastructure Type","Cloud Provider","Connect your Cloud","Artifact Store","Orchestrator","Container Registry"];function as(){return t.jsx(Ke,{maxSteps:Ae.length+1,initialStep:1,children:t.jsx(Ot,{children:t.jsxs("section",{className:"layout-container flex flex-col gap-5 py-5 xl:flex-row",children:[t.jsx(Qe,{entries:Ae}),t.jsx("div",{className:"w-full",children:t.jsx(kr,{})})]})})})}export{as as default};
|