zenml-nightly 0.68.1.dev20241112__py3-none-any.whl → 0.70.0.dev20241114__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.
- README.md +1 -1
- RELEASE_NOTES.md +77 -0
- zenml/VERSION +1 -1
- zenml/__init__.py +2 -0
- zenml/artifacts/utils.py +5 -1
- zenml/client.py +6 -1
- zenml/config/server_config.py +17 -1
- zenml/constants.py +1 -7
- zenml/enums.py +8 -0
- zenml/model/utils.py +5 -0
- zenml/models/v2/base/filter.py +121 -8
- zenml/models/v2/core/artifact_version.py +23 -0
- zenml/models/v2/core/model_version.py +23 -0
- zenml/models/v2/core/pipeline_run.py +22 -1
- zenml/models/v2/core/step_run.py +22 -0
- zenml/orchestrators/base_orchestrator.py +12 -1
- zenml/orchestrators/step_launcher.py +2 -1
- zenml/orchestrators/utils.py +45 -26
- zenml/steps/utils.py +5 -0
- zenml/utils/metadata_utils.py +335 -0
- zenml/zen_server/auth.py +221 -3
- zenml/zen_server/cache.py +208 -0
- zenml/zen_server/dashboard/assets/{404-DT4QRUqN.js → 404-NVXKFp-x.js} +1 -1
- zenml/zen_server/dashboard/assets/{@radix-DP6vWzyx.js → @radix-DeK6qiuw.js} +1 -1
- zenml/zen_server/dashboard/assets/{@react-router-BMhZulnd.js → @react-router-B3Z5rLr2.js} +1 -1
- zenml/zen_server/dashboard/assets/{@reactflow-8U9qNlMR.js → @reactflow-CK0KJUen.js} +2 -2
- zenml/zen_server/dashboard/assets/{@tanstack-BUCbhJyH.js → @tanstack-DT5WLu9C.js} +1 -1
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-DezXKmDf.js +1 -0
- zenml/zen_server/dashboard/assets/{CodeSnippet-CqybNv0k.js → CodeSnippet-JzR8CEtw.js} +2 -2
- zenml/zen_server/dashboard/assets/{CollapsibleCard-0r_8G2Lj.js → CollapsibleCard-DQW_ktMO.js} +1 -1
- zenml/zen_server/dashboard/assets/{Commands-BDjgBQKi.js → Commands-DL2kwkRd.js} +1 -1
- zenml/zen_server/dashboard/assets/ComponentBadge-D_g62Wv8.js +1 -0
- zenml/zen_server/dashboard/assets/{CopyButton-C745BrKi.js → CopyButton-LNcWaa14.js} +1 -1
- zenml/zen_server/dashboard/assets/{CsvVizualization-PpAq0CeZ.js → CsvVizualization-DknpE5ej.js} +5 -5
- zenml/zen_server/dashboard/assets/{DialogItem-DcVCZEew.js → DialogItem-Bxf8FuAT.js} +1 -1
- zenml/zen_server/dashboard/assets/{DisplayDate-BeXgUG_C.js → DisplayDate-CDMUcQHS.js} +1 -1
- zenml/zen_server/dashboard/assets/{EmptyState-DeK7H4pr.js → EmptyState-BzdlCwp3.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-BMlzibXj.js → Error-DYflYyps.js} +1 -1
- zenml/zen_server/dashboard/assets/ExecutionStatus-C7zyIQKZ.js +1 -0
- zenml/zen_server/dashboard/assets/{Helpbox-BLf40fLV.js → Helpbox-oYSGpLqd.js} +1 -1
- zenml/zen_server/dashboard/assets/{Infobox-BwisKifi.js → Infobox-Cx4xGoXR.js} +1 -1
- zenml/zen_server/dashboard/assets/{InlineAvatar-jEgodSgX.js → InlineAvatar-DiGOWNKF.js} +1 -1
- zenml/zen_server/dashboard/assets/{Lock-3lLt1ih0.js → Lock-CYYy18Mm.js} +1 -1
- zenml/zen_server/dashboard/assets/{MarkdownVisualization-8O9kTr-2.js → MarkdownVisualization-ylXaAxev.js} +1 -1
- zenml/zen_server/dashboard/assets/NestedCollapsible-DYbgyKxK.js +1 -0
- zenml/zen_server/dashboard/assets/{NumberBox-T9eELfLZ.js → NumberBox-Dtp3J6g5.js} +1 -1
- zenml/zen_server/dashboard/assets/Partials-03iZf8-N.js +1 -0
- zenml/zen_server/dashboard/assets/{PasswordChecker-CW0kqY0W.js → PasswordChecker-B0nadgh6.js} +1 -1
- zenml/zen_server/dashboard/assets/ProBadge-D_EB8HNo.js +1 -0
- zenml/zen_server/dashboard/assets/ProCta-DqNS4v3x.js +1 -0
- zenml/zen_server/dashboard/assets/ProviderIcon-Bki2aw8w.js +1 -0
- zenml/zen_server/dashboard/assets/{ProviderRadio-BROY1700.js → ProviderRadio-8f43sPD4.js} +1 -1
- zenml/zen_server/dashboard/assets/RunSelector-DkPiIiNr.js +1 -0
- zenml/zen_server/dashboard/assets/RunsBody-07YEO7qI.js +1 -0
- zenml/zen_server/dashboard/assets/SearchField-lp1KgU4e.js +1 -0
- zenml/zen_server/dashboard/assets/{SecretTooltip-C_qByGWB.js → SecretTooltip-CgnbyeOx.js} +1 -1
- zenml/zen_server/dashboard/assets/{SetPassword-7pRB00El.js → SetPassword-CpP418A2.js} +1 -1
- zenml/zen_server/dashboard/assets/StackList-WvuKQusZ.js +1 -0
- zenml/zen_server/dashboard/assets/Tabs-BktHkCJJ.js +1 -0
- zenml/zen_server/dashboard/assets/Tick-BlMoIlJT.js +1 -0
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-DckMEkFf.js → UpdatePasswordSchemas-Sc0A0pP-.js} +1 -1
- zenml/zen_server/dashboard/assets/{UsageReason-DVceN14P.js → UsageReason-YYduL4fj.js} +1 -1
- zenml/zen_server/dashboard/assets/{WizardFooter-CW0Cvd70.js → WizardFooter-dgmizSJC.js} +1 -1
- zenml/zen_server/dashboard/assets/all-pipeline-runs-query-D-c2G6lV.js +1 -0
- zenml/zen_server/dashboard/assets/check-DloQpStc.js +1 -0
- zenml/zen_server/dashboard/assets/{check-circle-Dwxliy1Z.js → check-circle-jNbX5-sR.js} +1 -1
- zenml/zen_server/dashboard/assets/{chevron-down-8wLBS5pQ.js → chevron-down-6JyMkfjR.js} +1 -1
- zenml/zen_server/dashboard/assets/{chevron-right-double-DoD8iXWM.js → chevron-right-double-D7ojK9Co.js} +1 -1
- zenml/zen_server/dashboard/assets/{code-browser-CZUQs3Wa.js → code-browser-CUFUIHfp.js} +1 -1
- zenml/zen_server/dashboard/assets/{copy-CaSMXwiU.js → copy-C8XQA2Ug.js} +1 -1
- zenml/zen_server/dashboard/assets/create-stack-DM_JPgef.js +1 -0
- zenml/zen_server/dashboard/assets/delete-run-CJdh1P_h.js +1 -0
- zenml/zen_server/dashboard/assets/{docker-BFNgg-z3.js → docker-BdA9vrnW.js} +1 -1
- zenml/zen_server/dashboard/assets/{dots-horizontal-DK5Duzx4.js → dots-horizontal-otGBOSDJ.js} +1 -1
- zenml/zen_server/dashboard/assets/{form-schemas-1AyOCx90.js → form-schemas-K6FYKjwa.js} +1 -1
- zenml/zen_server/dashboard/assets/{gcp-7M2Yf3ZK.js → gcp-CFtm4BA7.js} +1 -1
- zenml/zen_server/dashboard/assets/{help-Dam461dC.js → help-Cc9bBIJH.js} +1 -1
- zenml/zen_server/dashboard/assets/index-B1mVPYxf.js +1 -0
- zenml/zen_server/dashboard/assets/index-BAkC7FXi.js +1 -0
- zenml/zen_server/dashboard/assets/{index-QQb7wQEC.js → index-CCOPpudF.js} +8 -8
- zenml/zen_server/dashboard/assets/index-CEV4Cvaf.js +1 -0
- zenml/zen_server/dashboard/assets/index-DlGvJQPn.css +1 -0
- zenml/zen_server/dashboard/assets/{index-BVJ8n2-j.js → index-Uu49AX48.js} +1 -1
- zenml/zen_server/dashboard/assets/{index.esm-cuVep_NJ.js → index.esm-Dy6Z9Ung.js} +1 -1
- zenml/zen_server/dashboard/assets/{kubernetes--g7r02Zu.js → kubernetes-B2wmAJ1d.js} +1 -1
- zenml/zen_server/dashboard/assets/{layout-DCSYN7-C.js → layout-BtHBmE4w.js} +1 -1
- zenml/zen_server/dashboard/assets/{link-external-CBEk6kEG.js → link-external-b9AXw_sW.js} +1 -1
- zenml/zen_server/dashboard/assets/{login-mutation-DTcAFP1l.js → login-mutation-hf-lK87O.js} +1 -1
- zenml/zen_server/dashboard/assets/{logs-D5bdJGur.js → logs-WMSM52RF.js} +1 -1
- zenml/zen_server/dashboard/assets/{not-found-Cc-JkRH2.js → not-found-BGirLjU-.js} +1 -1
- zenml/zen_server/dashboard/assets/{package-Cs35Szwh.js → package-C6uypY4h.js} +1 -1
- zenml/zen_server/dashboard/assets/page-0JE_-Ec1.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DH_Z7iW1.js → page-6m6yHHlE.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BDigxVpo.js +1 -0
- zenml/zen_server/dashboard/assets/page-BR68V0V1.js +1 -0
- zenml/zen_server/dashboard/assets/page-BRLpxOt0.js +1 -0
- zenml/zen_server/dashboard/assets/{page-BQQKaabe.js → page-BU7huvKw.js} +3 -3
- zenml/zen_server/dashboard/assets/page-BvqLv2Ky.js +1 -0
- zenml/zen_server/dashboard/assets/page-C00YAkaB.js +1 -0
- zenml/zen_server/dashboard/assets/{page-N4qoPHKb.js → page-CD-DcWoy.js} +1 -1
- zenml/zen_server/dashboard/assets/page-COXXJj1k.js +1 -0
- zenml/zen_server/dashboard/assets/page-CbpvrsDL.js +1 -0
- zenml/zen_server/dashboard/assets/page-CdMWnQak.js +1 -0
- zenml/zen_server/dashboard/assets/{page-ClUVkl-O.js → page-CjGdWY13.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CwxrFarU.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DLixvR-7.js → page-D01JhjQB.js} +1 -1
- zenml/zen_server/dashboard/assets/page-D6uU2ax4.js +1 -0
- zenml/zen_server/dashboard/assets/page-D7S3aCbF.js +1 -0
- zenml/zen_server/dashboard/assets/{page-9yplj5JT.js → page-DLC-bNBP.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DXSTpqRD.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DzpVUZ8f.js → page-DakHVWXF.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DIOXwhiD.js → page-Df-Fw0aq.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-B-y2XKIc.js → page-DfbXf_8s.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DjRJCGb3.js +1 -0
- zenml/zen_server/dashboard/assets/{page-C0N5q3l7.js → page-Djikxq_S.js} +1 -1
- zenml/zen_server/dashboard/assets/page-Dnovpa0i.js +3 -0
- zenml/zen_server/dashboard/assets/page-Dot3LPmL.js +1 -0
- zenml/zen_server/dashboard/assets/page-Vcxara9U.js +1 -0
- zenml/zen_server/dashboard/assets/page-Xynx4btY.js +14 -0
- zenml/zen_server/dashboard/assets/page-YpKAqVSa.js +1 -0
- zenml/zen_server/dashboard/assets/page-yYC9OI-E.js +1 -0
- zenml/zen_server/dashboard/assets/{persist-DNb5cdrU.js → persist-Coz7ZWvz.js} +1 -1
- zenml/zen_server/dashboard/assets/{persist-CP0JmYZ4.js → persist-GjC8PZoC.js} +1 -1
- zenml/zen_server/dashboard/assets/{plus-C9IxgN2M.js → plus-tf1V2hTJ.js} +1 -1
- zenml/zen_server/dashboard/assets/{refresh-BVu22P_C.js → refresh-BjOeWlEq.js} +1 -1
- zenml/zen_server/dashboard/assets/{rocket-CONEmRmB.js → rocket-DjT2cDvG.js} +1 -1
- zenml/zen_server/dashboard/assets/sharedSchema-CQb14VSr.js +14 -0
- zenml/zen_server/dashboard/assets/stack-detail-query-OPEW-cDJ.js +1 -0
- zenml/zen_server/dashboard/assets/{tick-circle-CM1ZScbQ.js → tick-circle-BEX_Tp4v.js} +1 -1
- zenml/zen_server/dashboard/assets/{trash-DkJHMOg7.js → trash-arLUMWMS.js} +1 -1
- zenml/zen_server/dashboard/assets/{update-server-settings-mutation-DsU8cNVl.js → update-server-settings-mutation-LwuQfHYn.js} +1 -1
- zenml/zen_server/dashboard/assets/upgrade-form-CwRHBuXB.webp +0 -0
- zenml/zen_server/dashboard/assets/url-CkvKAnwF.js +1 -0
- zenml/zen_server/dashboard/assets/{zod-D89GC_vc.js → zod-BwEbpOxH.js} +1 -1
- zenml/zen_server/dashboard/index.html +7 -7
- zenml/zen_server/deploy/helm/Chart.yaml +1 -1
- zenml/zen_server/deploy/helm/README.md +2 -2
- zenml/zen_server/jwt.py +30 -13
- zenml/zen_server/routers/auth_endpoints.py +134 -102
- zenml/zen_server/template_execution/utils.py +14 -16
- zenml/zen_server/utils.py +27 -0
- zenml/zen_server/zen_server_api.py +4 -1
- zenml/zen_stores/migrations/versions/0.70.0_release.py +23 -0
- zenml/zen_stores/rest_zen_store.py +13 -10
- {zenml_nightly-0.68.1.dev20241112.dist-info → zenml_nightly-0.70.0.dev20241114.dist-info}/METADATA +2 -2
- {zenml_nightly-0.68.1.dev20241112.dist-info → zenml_nightly-0.70.0.dev20241114.dist-info}/RECORD +149 -137
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-C6N2rGrB.js +0 -1
- zenml/zen_server/dashboard/assets/ComponentBadge-DUiEYJHu.js +0 -1
- zenml/zen_server/dashboard/assets/ComponentFallbackDialog-BFoH5K4V.js +0 -1
- zenml/zen_server/dashboard/assets/ComponentIcon-CAIoUis2.js +0 -1
- zenml/zen_server/dashboard/assets/Partials-YPBB3V4q.js +0 -1
- zenml/zen_server/dashboard/assets/ProviderIcon-Bb3Xha5A.js +0 -1
- zenml/zen_server/dashboard/assets/RunSelector-DCiL3M1c.js +0 -1
- zenml/zen_server/dashboard/assets/SearchField-DfUiGFVd.js +0 -1
- zenml/zen_server/dashboard/assets/Tick-CykQFPj2.js +0 -1
- zenml/zen_server/dashboard/assets/cloud-only-B-s_HMDm.js +0 -1
- zenml/zen_server/dashboard/assets/codespaces-BitYDX9d.gif +0 -0
- zenml/zen_server/dashboard/assets/create-stack-CEmaPZ4c.js +0 -1
- zenml/zen_server/dashboard/assets/delete-run-D-LKbGyz.js +0 -1
- zenml/zen_server/dashboard/assets/index-Bpmj40BI.js +0 -1
- zenml/zen_server/dashboard/assets/index-CbU4Ln_E.css +0 -1
- zenml/zen_server/dashboard/assets/index-DKPhqP2B.js +0 -1
- zenml/zen_server/dashboard/assets/page-BBpOxVcY.js +0 -1
- zenml/zen_server/dashboard/assets/page-BRInM1Lg.js +0 -1
- zenml/zen_server/dashboard/assets/page-BjjlMk7s.js +0 -1
- zenml/zen_server/dashboard/assets/page-Bvd7YH2A.js +0 -1
- zenml/zen_server/dashboard/assets/page-CT3Nep8W.js +0 -1
- zenml/zen_server/dashboard/assets/page-C_f47pBf.js +0 -1
- zenml/zen_server/dashboard/assets/page-Cmv8C_yM.js +0 -3
- zenml/zen_server/dashboard/assets/page-CyN2bdWG.js +0 -1
- zenml/zen_server/dashboard/assets/page-CzzXH4fs.js +0 -1
- zenml/zen_server/dashboard/assets/page-DTlGjgnG.js +0 -1
- zenml/zen_server/dashboard/assets/page-Dbpl86h0.js +0 -1
- zenml/zen_server/dashboard/assets/page-Ddgy6kDS.js +0 -1
- zenml/zen_server/dashboard/assets/page-DtCAfBLy.js +0 -9
- zenml/zen_server/dashboard/assets/page-Dx16z7nA.js +0 -1
- zenml/zen_server/dashboard/assets/page-McUyYbo1.js +0 -1
- zenml/zen_server/dashboard/assets/page-T1P3RyAR.js +0 -1
- zenml/zen_server/dashboard/assets/page-bKaULTGG.js +0 -1
- zenml/zen_server/dashboard/assets/page-sbXUJy9t.js +0 -1
- zenml/zen_server/dashboard/assets/sharedSchema-TMLu-nYQ.js +0 -14
- zenml/zen_server/dashboard/assets/stack-detail-query-xmYxSsUY.js +0 -1
- zenml/zen_server/dashboard/assets/url-D5le3J4q.js +0 -1
- {zenml_nightly-0.68.1.dev20241112.dist-info → zenml_nightly-0.70.0.dev20241114.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.68.1.dev20241112.dist-info → zenml_nightly-0.70.0.dev20241114.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.68.1.dev20241112.dist-info → zenml_nightly-0.70.0.dev20241114.dist-info}/entry_points.txt +0 -0
@@ -1,3 +0,0 @@
|
|
1
|
-
import{r as x,j as e}from"./@radix-DP6vWzyx.js";import{l as D,m as C,k as E,F as T,a7 as K,a8 as H,f as h,a9 as F,aa as P,ab as O,i as G,I as j,aq as A,ar as V,as as U,n as J,D as W,q as X,s as Y,r as N,av as Z,z as f,aw as ee,G as se,S as w,N as te,B as ae}from"./index-QQb7wQEC.js";import{S as re,P as ne}from"./SearchField-DfUiGFVd.js";import{S as ie,s as le,E as ce,a as oe,b as de}from"./SecretTooltip-C_qByGWB.js";import{b as I,c as q,a as S}from"./@tanstack-BUCbhJyH.js";import{w as me}from"./index-DKPhqP2B.js";import{S as ue}from"./plus-C9IxgN2M.js";import{S as L}from"./trash-DkJHMOg7.js";import{t as xe}from"./zod-D89GC_vc.js";import{u as he,a as pe,C as g}from"./index.esm-cuVep_NJ.js";import{S as fe}from"./Lock-3lLt1ih0.js";import{C as v}from"./CopyButton-C745BrKi.js";import{D as je}from"./DisplayDate-BeXgUG_C.js";import{I as ge}from"./InlineAvatar-jEgodSgX.js";import{L as b,c as ye}from"./@react-router-BMhZulnd.js";import{S as Ne}from"./dots-horizontal-DK5Duzx4.js";import{D as k,S as we}from"./DialogItem-DcVCZEew.js";import"./@reactflow-8U9qNlMR.js";import"./chevron-right-double-DoD8iXWM.js";import"./url-D5le3J4q.js";import"./index-BVJ8n2-j.js";import"./CodeSnippet-CqybNv0k.js";import"./copy-CaSMXwiU.js";async function Se(s){const t=D(C.secrets.add(s.workspace)),a=await E(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!a.ok){const r=await a.json().then(n=>n.detail).catch(()=>"Failed to create Secret");throw new T({status:a.status,statusText:a.statusText,message:r})}return a.json()}function ve(s){return I({mutationFn:async t=>Se(t),...s})}function be({id:s,workspace:t}){const[a,r]=x.useState(!1);return e.jsxs(K,{open:a,onOpenChange:r,children:[e.jsx(H,{asChild:!0,children:e.jsx(h,{className:"shrink-0",intent:"primary",children:"Add secret"})}),e.jsxs(F,{className:"mx-auto w-[90vw] max-w-[744px]",children:[e.jsx(P,{children:e.jsx(O,{children:"Register New Secret"})}),e.jsx(ke,{userId:s,setOpen:r,workspaceId:t.id})]})]})}function ke({userId:s,setOpen:t,workspaceId:a}){const{handleSubmit:r,control:n,watch:i,setValue:o,formState:{isValid:u},reset:p}=he({resolver:xe(le),defaultValues:{secretName:"",keysValues:[{key:"",value:""}]}}),{fields:m,append:_,remove:R}=pe({control:n,name:"keysValues"}),{toast:z}=G(),B=q(),{mutate:M}=ve({onError(l){U(l)&&z({status:"error",emphasis:"subtle",description:l.message,rounded:!0})},onSuccess(){B.invalidateQueries({queryKey:["secrets"]}),t(!1),p()}}),Q=l=>{M({user:s,workspace:a,name:l.secretName,scope:"workspace",values:l.keysValues.reduce((c,d)=>(d.key&&d.value&&(c[d.key]=d.value),c),{})})},$=l=>{Q(l)};return e.jsxs(e.Fragment,{children:[e.jsx("form",{id:"create-secret-form",className:"gap-5 p-5",onSubmit:r($),children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("label",{className:"font-inter text-sm text-left font-medium leading-5",children:["Secret Name",e.jsx("span",{className:"ml-1 text-theme-text-error",children:"*"})]}),e.jsx(g,{name:"secretName",control:n,render:({field:l})=>e.jsx(j,{...l,className:"mb-3 w-full",required:!0})})]}),e.jsxs("div",{className:"mt-10",children:[e.jsx("div",{children:e.jsx("h1",{className:"font-inter text-lg text-left font-semibold ",children:"Keys"})}),e.jsxs("div",{className:"mt-5 flex flex-row ",children:[e.jsx("div",{className:"flex-grow",children:e.jsx("label",{className:"font-inter text-sm text-left font-medium",children:"Key"})}),e.jsx("div",{className:"flex-grow pr-12",children:e.jsx("label",{className:"font-inter text-sm text-left font-medium",children:"Value"})})]})]}),m.map((l,c)=>e.jsxs("div",{className:"flex flex-row items-center space-x-1 ",children:[e.jsx("div",{className:"relative flex-grow ",children:e.jsx(g,{name:`keysValues.${c}.key`,control:n,render:({field:d})=>e.jsx(j,{...d,className:"mb-2 w-full",required:!0,placeholder:"key"})})}),e.jsx("div",{className:"relative flex-grow",children:e.jsxs("div",{className:"relative",children:[e.jsx(g,{name:`keysValues.${c}.value`,control:n,render:({field:d})=>e.jsx(j,{...d,className:"mb-2 w-full pr-10",required:!0,placeholder:"•••••••••",type:i(`keysValues.${c}.showPassword`)?"text":"password"})}),e.jsx("button",{type:"button",onClick:()=>{const d=i(`keysValues.${c}.showPassword`);o(`keysValues.${c}.showPassword`,!d)},className:"absolute inset-y-1 right-0 flex items-center pb-1 pr-3",children:e.jsx(ie,{className:"h-4 w-4 flex-shrink-0"})})]})}),e.jsxs("div",{className:"flex items-center",children:[c===m.length-1&&e.jsx(h,{intent:"primary",emphasis:"subtle",onClick:()=>_({key:"",value:""}),className:"mb-2 flex h-7 w-7 items-center justify-center",children:e.jsx(ue,{className:"flex-shrink-0 fill-primary-600"})}),c!==m.length-1&&e.jsx(h,{intent:"secondary",emphasis:"minimal",onClick:()=>R(c),className:"mb-2 h-7 w-7 items-center justify-center",children:e.jsx(L,{className:"flex-shrink-0 fill-theme-text-secondary"})})]})]},l.id))]})}),e.jsxs(A,{className:"gap-[10px]",children:[e.jsx(V,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{intent:"primary",disabled:!u,type:"submit",form:"create-secret-form",children:"Register Secret"})]})]})}async function De(s){const t=D(C.secrets.detail(s)),a=await E(t,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(a.status===404&&J(),!a.ok)throw new T({message:"Error deleting secret",status:a.status,statusText:a.statusText});return a.json()}function Ce(s){return I({mutationFn:async t=>De(t),...s})}function Ee({secretId:s}){const t=q(),{mutate:a}=Ce({onSuccess(){t.invalidateQueries({queryKey:["secrets"]})}}),[r,n]=x.useState("");function i(){a(s)}function o(u){n(u.target.value)}return e.jsxs(F,{children:[e.jsx(P,{children:e.jsx(O,{children:"Delete secret"})}),e.jsxs("div",{className:"gap-5 p-5",children:[e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Are you sure you want to delete this secret?"}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"This action cannot be undone."}),e.jsx("h3",{className:"font-inter text-sm mb-1 mt-4 text-left font-medium leading-5",children:"Please type DELETE to confirm"}),e.jsx(j,{name:"key",onChange:o,className:"w-full",required:!0,value:r})]}),e.jsxs(A,{className:"gap-[10px]",children:[e.jsx(V,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{intent:"danger",type:"submit",form:"edit-secret-form",onClick:i,disabled:r!=="DELETE",children:"Delete"})]})]})}function Te({secretId:s}){const[t,a]=x.useState(!1),[r,n]=x.useState(!1),i=x.useRef(null),o=x.useRef(null);function u(){o.current=i.current}function p(m){if(m===!1){a(!1),setTimeout(()=>{n(m)},200);return}n(m)}return e.jsxs(W,{onOpenChange:a,open:t,children:[e.jsx(X,{ref:i,children:e.jsx(Ne,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsxs(Y,{hidden:r,onCloseAutoFocus:m=>{o.current&&(o.current.focus(),o.current=null,m.preventDefault())},align:"end",sideOffset:7,children:[e.jsx(k,{onSelect:u,onOpenChange:p,triggerChildren:"Edit ",icon:e.jsx(we,{}),children:e.jsx(ce,{secretId:s,isSecretNameEditable:!0,dialogTitle:"Edit secret"})}),e.jsx(k,{onSelect:u,onOpenChange:p,triggerChildren:"Delete ",icon:e.jsx(L,{}),children:e.jsx(Ee,{secretId:s})})]})]})}const Fe=[{id:"secret",header:"Secret",accessorFn:s=>s.name,cell:({getValue:s,row:t})=>{const a=`from zenml.client import Client
|
2
|
-
secret = Client().get_secret(${t.original.name})
|
3
|
-
`;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(fe,{className:"h-5 w-5 flex-shrink-0 fill-primary-400"}),e.jsxs("div",{className:"group/copybutton flex flex-col",children:[e.jsxs("div",{className:"flex flex-row items-center space-x-1",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(b,{className:"text-text-md font-semibold text-theme-text-primary",to:N.settings.secrets.detail(t.original.id),children:t.original.name}),e.jsx(oe,{code:a})]}),e.jsx(v,{copyText:s()})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(b,{to:N.settings.secrets.detail(t.original.id),className:"flex items-center gap-1 text-text-sm text-theme-text-secondary",children:t.original.id.slice(0,8)}),e.jsx(v,{copyText:t.original.id})]})]})]})}},{id:"author",header:"Author",accessorFn:s=>{var t;return(t=s.body)==null?void 0:t.user},cell:({getValue:s})=>{const t=s();return e.jsx(e.Fragment,{children:e.jsx(ge,{username:Z(t)})})}},{id:"created_at",header:"Created At",accessorFn:s=>{var t;return(t=s.body)==null?void 0:t.created},cell:({getValue:s})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(je,{dateString:s()})})},{id:"admin_actions",header:"",accessorFn:s=>String(s.id),cell:({row:s,getValue:t})=>{var r,n,i;const a=t();return(i=(n=(r=s.original.body)==null?void 0:r.user)==null?void 0:n.body)!=null&&i.is_admin?e.jsx(Te,{secretId:a}):e.jsx("p",{className:"text-sm text-theme-text-secondary",children:"No Actions"})}}],y=1,Pe=f.object({page:f.coerce.number().min(y).optional().default(y).catch(y),name:f.string().optional(),operator:f.enum(["and","or"]).optional()});function Oe(){const[s]=ye(),{page:t,name:a,operator:r}=Pe.parse({page:s.get("page")||void 0,name:s.get("name")||void 0,operator:s.get("operator")||void 0});return{page:t,name:a,logical_operator:r}}function Ae(){const s=Oe(),{data:t}=S({...de.secretList({...s,sort_by:"desc:created"}),throwOnError:!0}),{data:a}=ee(),r=(a==null?void 0:a.id)||"",{data:n,isLoading:i,isError:o,isSuccess:u}=S({...me.workspaceDetail("default")});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsx(re,{searchParams:s}),i?e.jsx("div",{children:"Loading..."}):o?e.jsx("div",{children:"Error loading workspace details."}):u&&e.jsx(be,{id:r,workspace:n})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:t?e.jsx(se,{columns:Fe,data:t.items}):e.jsx(w,{className:"h-[250px] w-full"})}),t?t.total_pages>1&&e.jsx(ne,{searchParams:s,paginate:t}):e.jsx(w,{className:"h-[36px] w-[300px]"})]})]})}function as(){const{setCurrentBreadcrumbData:s}=te();return x.useEffect(()=>{s({segment:"secrets",data:null})},[]),e.jsxs(ae,{className:"space-y-4 p-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Secrets"}),e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:["Configure and manage your pipeline secrets and configurations."," ",e.jsx("a",{target:"_blank",rel:"noreferrer noopener",href:"https://docs.zenml.io/how-to/interact-with-secrets",className:"link text-primary-400",children:"Learn More"})]})]}),e.jsx(Ae,{})]})}export{as as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as o,j as e}from"./@radix-DP6vWzyx.js";import{l as j,m as C,k as y,n as M,F as b,a7 as T,a8 as F,f as h,a9 as E,aa as P,ab as U,ao as k,z as m,i as v,I as O,ap as I,aq as R,ar as _,as as q,j as D,aj as H,al as z,at as Z,an as B,au as K,D as Q,q as V,s as G,e as w,av as L,aw as J,S as f,G as $,B as W}from"./index-QQb7wQEC.js";import{S as X,P as Y}from"./SearchField-DfUiGFVd.js";import{a as ee,b as N,c as A}from"./@tanstack-BUCbhJyH.js";import{o as se}from"./url-D5le3J4q.js";import{C as te}from"./CodeSnippet-CqybNv0k.js";import{u as ae}from"./index.esm-cuVep_NJ.js";import{D as re}from"./DisplayDate-BeXgUG_C.js";import{I as ne}from"./InlineAvatar-jEgodSgX.js";import{S as ie}from"./dots-horizontal-DK5Duzx4.js";import{A as oe}from"./AlertDialogDropdownItem-C6N2rGrB.js";import{c as le}from"./@react-router-BMhZulnd.js";import"./@reactflow-8U9qNlMR.js";import"./chevron-right-double-DoD8iXWM.js";import"./index-BVJ8n2-j.js";import"./copy-CaSMXwiU.js";function ce({params:a}){return["users",a]}async function de({params:a}){const s=j(C.users.all+"?"+se(a)),t=await y(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.status===404&&M(),!t.ok)throw new b({message:"Error while fetching users",status:t.status,statusText:t.statusText});return t.json()}function ue(a,s){return ee({queryKey:ce(a),queryFn:()=>de(a),...s})}const me=a=>o.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...a},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 4C8.06703 4 6.50002 5.567 6.50002 7.5C6.50002 9.433 8.06703 11 10 11C11.933 11 13.5 9.433 13.5 7.5C13.5 5.567 11.933 4 10 4ZM4.50002 7.5C4.50002 4.46243 6.96246 2 10 2C13.0376 2 15.5 4.46243 15.5 7.5C15.5 10.5376 13.0376 13 10 13C6.96246 13 4.50002 10.5376 4.50002 7.5ZM19 14C19.5523 14 20 14.4477 20 15V17H22C22.5523 17 23 17.4477 23 18C23 18.5523 22.5523 19 22 19H20V21C20 21.5523 19.5523 22 19 22C18.4477 22 18 21.5523 18 21V19H16C15.4477 19 15 18.5523 15 18C15 17.4477 15.4477 17 16 17H18V15C18 14.4477 18.4477 14 19 14ZM7.32629 14.5C7.38335 14.5 7.44125 14.5 7.50003 14.5H12C12.5523 14.5 13 14.9477 13 15.5C13 16.0523 12.5523 16.5 12 16.5H7.50003C6.03171 16.5 5.51923 16.5109 5.12917 16.6292C4.17036 16.92 3.42005 17.6703 3.1292 18.6291C3.01088 19.0192 3.00002 19.5317 3.00002 21C3.00002 21.5523 2.55231 22 2.00002 22C1.44774 22 1.00002 21.5523 1.00002 21C1.00002 20.9412 1 20.8833 0.99998 20.8263C0.999526 19.599 0.999216 18.761 1.21532 18.0486C1.70007 16.4506 2.95059 15.2 4.54859 14.7153C5.261 14.4992 6.09902 14.4995 7.32629 14.5Z"}));async function he(a){const s=j(C.users.all),t=await y(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!t.ok){const r=await t.json().then(n=>n.detail).catch(()=>"Failed to create User");throw new b({status:t.status,statusText:t.statusText,message:r})}return t.json()}function xe(a){return N({mutationFn:async s=>he(s),...a})}function pe(){const[a,s]=o.useState(!1),[t,r]=o.useState(null);return e.jsxs(T,{open:a,onOpenChange:n=>{s(n),r(null)},children:[e.jsx(F,{asChild:!0,children:e.jsx(h,{className:"shrink-0",intent:"primary",children:"Add Member"})}),e.jsxs(E,{className:"",children:[e.jsx(P,{children:e.jsx(U,{children:" Add a New Member"})}),t?e.jsx(ge,{name:t.name,token:k(t)}):e.jsx(fe,{setSuccessMember:r})]})]})}m.object({username:m.string(),isAdmin:m.boolean()});function fe({setSuccessMember:a}){const{toast:s}=v(),t=A(),{mutate:r,isPending:n}=xe({onError(d){q(d)&&s({status:"error",emphasis:"subtle",icon:e.jsx(D,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:d.message,rounded:!0})},onSuccess(d){a(d),t.invalidateQueries({queryKey:["users"]})}}),c=o.useId(),l=o.useId(),{register:i,handleSubmit:x,watch:p,setValue:u}=ae();function S(d){r({is_admin:d.isAdmin,name:d.username})}return e.jsxs(e.Fragment,{children:[e.jsx("form",{id:"create-user-form",onSubmit:x(S),className:"space-y-5 p-7",children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:c,className:"text-text-sm",children:"Username"}),e.jsx(O,{...i("username"),id:c,className:"w-full"})]}),e.jsxs("div",{className:"flex gap-5",children:[e.jsx("label",{htmlFor:l,className:"text-text-md",children:"Add user as an Admin"}),e.jsx(I,{onCheckedChange:d=>u("isAdmin",!!d),...i("isAdmin",{value:!1}),id:l})]})]})}),e.jsxs(R,{className:"gap-[10px]",children:[e.jsx(_,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{disabled:!p("username")||n,form:"create-user-form",size:"sm",children:"Generate Token"})]})]})}function ge({token:a,name:s}){return e.jsxs("div",{className:"space-y-5 overflow-hidden p-7 text-center",children:[e.jsx(me,{className:"m-auto mb-5 h-[110px] w-[110px] fill-success-500"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-lg font-semibold text-theme-text-primary",children:`The user ${s} was created successfully!`}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Share the invitation link with the user to complete the registration."})]}),e.jsx(te,{className:"mx-auto",code:a})]})}const je=a=>o.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...a},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.9681 6.38231C3.73647 7.92199 3 9.87499 3 12C3 16.9706 7.02944 21 12 21C14.125 21 16.078 20.2635 17.6177 19.0319L4.9681 6.38231ZM6.38231 4.9681L19.0319 17.6177C20.2635 16.078 21 14.125 21 12C21 7.02944 16.9706 3 12 3C9.87499 3 7.92199 3.73647 6.38231 4.9681ZM1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12Z"}));async function Ce(a){const s=j(C.users.detail(a)),t=await y(s,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(!t.ok){const r=await t.json().then(n=>n.detail).catch(()=>"Failed to delete User");throw new b({status:t.status,statusText:t.statusText,message:r})}return t.json()}function ye(a){return N({mutationFn:async s=>Ce(s),...a})}function be({userId:a,name:s}){const{toast:t}=v(),r=A(),{isPending:n,mutate:c}=ye({onSuccess(){r.invalidateQueries({queryKey:["users"]})},onError:i=>{i instanceof Error&&t({status:"error",emphasis:"subtle",icon:e.jsx(D,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:i.message,rounded:!0})}});function l(){c(a)}return e.jsxs(H,{className:"p-0",children:[e.jsx(z,{className:"py-2 pl-5 pr-3 text-text-lg font-semibold",children:"Delete Member"}),e.jsx("div",{className:"border-y border-theme-border-moderate px-5 py-5",children:e.jsxs(Z,{children:["Deleting ",e.jsx("strong",{children:s})," cannot be undone."]})}),e.jsxs("div",{className:"flex justify-end gap-3 px-5 py-3",children:[e.jsx(B,{asChild:!0,children:e.jsx(h,{intent:"secondary",children:"Cancel"})}),e.jsx(K,{asChild:!0,children:e.jsx(h,{onClick:l,disabled:n,intent:"danger",children:"Delete"})})]})]})}function we({userId:a,name:s}){const[t,r]=o.useState(!1),[n,c]=o.useState(!1),l=o.useRef(null),i=o.useRef(null);function x(){i.current=l.current}function p(u){if(u===!1){c(!1),setTimeout(()=>{r(u)},200);return}r(u)}return e.jsxs(Q,{onOpenChange:c,open:n,children:[e.jsx(V,{ref:l,children:e.jsx(ie,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(G,{hidden:t,onCloseAutoFocus:u=>{i.current&&(i.current.focus(),i.current=null,u.preventDefault())},align:"end",sideOffset:7,children:e.jsx(oe,{onSelect:x,onOpenChange:p,triggerChildren:"Remove Member",icon:e.jsx(je,{fill:"red"}),children:e.jsx(be,{name:s,userId:a})})})]})}function ve({isAdmin:a}){return[{id:"name",accessorFn:s=>{var t;return{name:s.name,is_admin:!!((t=s.body)!=null&&t.is_admin)}},cell:({getValue:s})=>{const{name:t,is_admin:r}=s();return e.jsxs("div",{className:"flex",children:[e.jsx(ne,{username:t}),r&&e.jsx("div",{children:e.jsx(w,{className:"ml-2 capitalize",size:"xs",color:"purple",children:"Admin"})})]})},header:"User"},{accessorKey:"status",header:"Status",accessorFn:s=>{var t;return{status:(t=s.body)==null?void 0:t.active}},cell:({getValue:s})=>{const{status:t}=s();return e.jsx(w,{className:"capitalize",color:t?"green":"grey",children:t?"Active":"Inactive"})}},{id:"created",header:"Created",accessorFn:s=>{var t;return(t=s.body)==null?void 0:t.created},cell:({getValue:s})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(re,{dateString:s()})})},...a?[{id:"actions",header:"",accessorFn:s=>({id:s.id,name:L(s)}),meta:{width:"5%"},cell:({getValue:s})=>{const{id:t,name:r}=s();return e.jsx(we,{name:r,userId:t})}}]:[]]}const g=1,De=m.object({page:m.coerce.number().min(g).optional().default(g).catch(g),name:m.string().optional(),operator:m.enum(["and","or"]).optional()});function Ne(){const[a]=le(),{page:s,name:t,operator:r}=De.parse({page:a.get("page")||void 0,name:a.get("name")||void 0,operator:a.get("operator")||void 0});return{page:s,name:t,logical_operator:r}}function Ae(){var l,i;const a=Ne(),{data:s,isError:t}=ue({params:{...a,sort_by:"desc:created"}},{throwOnError:!0}),{data:r,isPending:n,isError:c}=J();return t||c?null:n?e.jsx(f,{className:"h-[350px]"}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsx(X,{searchParams:a}),((l=r.body)==null?void 0:l.is_admin)&&e.jsx(pe,{})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:s?e.jsx($,{columns:ve({isAdmin:(i=r.body)==null?void 0:i.is_admin}),data:s.items}):e.jsx(f,{className:"h-[250px] w-full"})}),s?s.total_pages>1&&e.jsx(Y,{searchParams:a,paginate:s}):e.jsx(f,{className:"h-[36px] w-[300px]"})]})]})}function Be(){return e.jsxs(W,{className:"flex flex-col gap-4 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Members"}),e.jsx(Ae,{})]})}export{Be as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as i,j as e}from"./@radix-DP6vWzyx.js";import{f as p,E as N,O as y,aT as j,c as C,S as d,ah as g,aU as w,e as b,aw as S,av as k,Q as v,a0 as L,aE as z,a2 as u,a3 as M,B as H,aQ as f,r as E,aG as R}from"./index-QQb7wQEC.js";import{S as V}from"./package-Cs35Szwh.js";import{S as Z}from"./help-Dam461dC.js";import{S as _}from"./plus-C9IxgN2M.js";import{C as c}from"./CodeSnippet-CqybNv0k.js";import{H as h}from"./Helpbox-BLf40fLV.js";import{S as D}from"./chevron-down-8wLBS5pQ.js";import{T as I}from"./Tick-CykQFPj2.js";import{S as P}from"./chevron-right-double-DoD8iXWM.js";import{L as O}from"./@react-router-BMhZulnd.js";import"./@tanstack-BUCbhJyH.js";import"./@reactflow-8U9qNlMR.js";import"./copy-CaSMXwiU.js";const B=s=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.7587 1L14 1C14.2652 1 14.5196 1.10536 14.7071 1.29289L20.7071 7.29289C20.8946 7.48043 21 7.73478 21 8V17.2413C21 18.0463 21 18.7106 20.9558 19.2518C20.9099 19.8139 20.8113 20.3306 20.564 20.816C20.1805 21.5686 19.5686 22.1805 18.816 22.564C18.3306 22.8113 17.8139 22.9099 17.2518 22.9558C16.7106 23 16.0463 23 15.2413 23H8.75868C7.95372 23 7.28936 23 6.74817 22.9558C6.18608 22.9099 5.66937 22.8113 5.18404 22.564C4.43139 22.1805 3.81947 21.5686 3.43597 20.816C3.18868 20.3306 3.09012 19.8139 3.04419 19.2518C2.99998 18.7106 2.99999 18.0463 3 17.2413V6.7587C2.99999 5.95373 2.99998 5.28937 3.04419 4.74817C3.09012 4.18608 3.18868 3.66937 3.43597 3.18404C3.81947 2.43139 4.43139 1.81947 5.18404 1.43597C5.66937 1.18868 6.18608 1.09012 6.74817 1.04419C7.28937 0.999977 7.95373 0.999988 8.7587 1ZM6.91104 3.03755C6.47262 3.07337 6.24842 3.1383 6.09202 3.21799C5.7157 3.40973 5.40973 3.7157 5.21799 4.09202C5.1383 4.24842 5.07337 4.47262 5.03755 4.91104C5.00078 5.36113 5 5.94342 5 6.8V17.2C5 18.0566 5.00078 18.6389 5.03755 19.089C5.07337 19.5274 5.1383 19.7516 5.21799 19.908C5.40973 20.2843 5.7157 20.5903 6.09202 20.782C6.24842 20.8617 6.47262 20.9266 6.91104 20.9624C7.36113 20.9992 7.94342 21 8.8 21H15.2C16.0566 21 16.6389 20.9992 17.089 20.9624C17.5274 20.9266 17.7516 20.8617 17.908 20.782C18.2843 20.5903 18.5903 20.2843 18.782 19.908C18.8617 19.7516 18.9266 19.5274 18.9624 19.089C18.9992 18.6389 19 18.0566 19 17.2V9.00007L15.5681 9.00007C15.3157 9.0001 15.0699 9.00013 14.8618 8.98313C14.6332 8.96445 14.3634 8.92038 14.092 8.78208C13.7157 8.59034 13.4097 8.28438 13.218 7.90805C13.0797 7.63663 13.0356 7.3669 13.0169 7.1383C12.9999 6.93014 13 6.68434 13 6.43195L13 3H8.8C7.94342 3 7.36113 3.00078 6.91104 3.03755ZM15 4.41421L17.5859 7.00007H15.6C15.3035 7.00007 15.1412 6.99929 15.0246 6.98977C15.02 6.98939 15.0156 6.98901 15.0114 6.98862C15.0111 6.98447 15.0107 6.98008 15.0103 6.97544C15.0008 6.85885 15 6.6966 15 6.40007V4.41421ZM7 9C7 8.44772 7.44772 8 8 8H10C10.5523 8 11 8.44772 11 9C11 9.55229 10.5523 10 10 10H8C7.44772 10 7 9.55229 7 9ZM7 13C7 12.4477 7.44772 12 8 12H16C16.5523 12 17 12.4477 17 13C17 13.5523 16.5523 14 16 14H8C7.44772 14 7 13.5523 7 13ZM7 17C7 16.4477 7.44772 16 8 16H16C16.5523 16 17 16.4477 17 17C17 17.5523 16.5523 18 16 18H8C7.44772 18 7 17.5523 7 17Z"})),T=s=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},i.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"})),A=s=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},i.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 q(){const s=[{text:"Send us a message",href:"mailto:cloud@zenml.io",icon:e.jsx(T,{className:"h-5 w-5 fill-neutral-500"})},{text:"Join our Slack Community",href:"https://zenml.io/slack",icon:e.jsx(A,{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(B,{className:"h-5 w-5 fill-neutral-500"})},{text:"Discover projects",href:"https://github.com/zenml-io/zenml-projects",icon:e.jsx(V,{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(N,{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 F(){const s=j(),t=C();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,l=r.totalItems;return e.jsxs(b,{rounded:!1,color:"light-purple",className:"text-text-sm font-semibold",children:[a,"/",l," steps completed"]})}function $(){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(Q,{})]}),e.jsx("p",{className:"truncate text-display-xs text-theme-text-secondary",children:"You can start by following your quick setup."})]}),e.jsx(F,{})]})}function Q(){const s=S();if(s.isError)return null;if(s.isPending)return e.jsx(d,{className:"h-6 w-[70px]"});const t=k(s.data);return e.jsx(e.Fragment,{children:t?`, ${t}`:""})}function G({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(P,{className:"h-3 w-3 fill-warning-300"})})}function m({completed:s,title:t,children:n,hasDownstream:r,active:a=!1}){const[l,o]=i.useState(a);return i.useEffect(()=>{o(a)},[a]),e.jsxs(L,{disabled:!(r||a||s),open:l,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(I,{className:"shrink-0"}):r?e.jsx(G,{}):e.jsx(z,{className:"shrink-0"}),e.jsx(u,{className:"w-full",children:e.jsx(J,{active:a,skipped:r,title:t,completed:s})}),e.jsx("div",{className:"flex items-center gap-1",children:e.jsx(u,{children:e.jsx(D,{className:` ${l?"":"-rotate-90"} h-5 w-5 shrink-0 rounded-md fill-neutral-500`})})})]})}),n&&e.jsx(M,{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 J({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 K({completed:s,hasDownstreamStep:t,active:n}){const{data:r}=C({throwOnError:!0});return e.jsx(m,{active:n,hasDownstream:t,completed:s,title:"Install and Connect 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(c,{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:"Login to your ZenML Server"}),e.jsx(c,{code:`zenml connect --url ${window.location.origin}`})]}),e.jsx(h,{link:"https://docs.zenml.io/user-guide/production-guide/deploying-zenml#connecting-to-a-deployed-zenml"})]})})}function W({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(c,{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(c,{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(c,{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(c,{code:"python run.py"})]}),e.jsxs(H,{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(Z,{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-guide/starter-guide/create-an-ml-pipeline",children:"Browse our docs"})]})]})]})})}function Y({completed:s,active:t,hasDownstreamStep:n}){const r=E.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(e1,{href:"https://docs.zenml.io/user-guide/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(O,{className:"flex",to:r,children:[e.jsx(_,{className:"h-5 w-5 shrink-0 fill-white"}),"Register a stack"]})})]}),e.jsx(h,{link:"https://docs.zenml.io/user-guide/production-guide/understand-stacks"})]})]})}function X({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(c,{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(c,{wrap:!0,codeClasses:"whitespace-pre-wrap",code:"python run.py"})]}),e.jsx("div",{children:e.jsx(h,{link:"https://docs.zenml.io/user-guide/production-guide/understand-stacks"})})]})})}function e1({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 s1(){const s=j({refetchInterval:5e3}),t=C();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"),l=r("pipeline_run"),o=r("stack_with_remote_orchestrator_created"),x=r("pipeline_run_with_remote_orchestrator");return e.jsxs("ul",{className:"space-y-5",children:[!n&&e.jsx("li",{children:e.jsx(K,{active:a.isActive,completed:a.isCompleted,hasDownstreamStep:a.hasDownStreamStep})}),e.jsx("li",{children:e.jsx(W,{active:l.isActive,completed:l.isCompleted,hasDownstreamStep:l.hasDownStreamStep})}),e.jsx("li",{children:e.jsx(Y,{active:o.isActive,completed:o.isCompleted,hasDownstreamStep:o.hasDownStreamStep})}),e.jsx("li",{children:e.jsx(X,{active:x.isActive,completed:x.isCompleted,hasDownstreamStep:x.hasDownStreamStep})})]})}function u1(){const{setTourState:s,tourState:{tourActive:t}}=R();return i.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($,{}),e.jsx(s1,{})]}),e.jsxs("div",{className:"col-span-4 space-y-5 lg:col-span-1",children:[e.jsx(q,{}),e.jsx(U,{})]})]})}export{u1 as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as d,j as e,aw as N,ax as P,ay as B,az as V}from"./@radix-DP6vWzyx.js";import{a7 as Z,a8 as q,a9 as H,aa as K,ab as W,ac as x,ae as G,z as l,T as J,v as X,w as Y,W as ee,x as te,I as O,U as se,f as k,ad as re,r as R,i as ae,j as ne,Q as ie}from"./index-QQb7wQEC.js";import{b as m,C as oe,u as ce,F as le}from"./index.esm-cuVep_NJ.js";import{c as de}from"./index-Bpmj40BI.js";import{s as me}from"./url-D5le3J4q.js";import{h as pe,i as ue,a as he,c as xe}from"./@tanstack-BUCbhJyH.js";import{d as fe}from"./index-BVJ8n2-j.js";import{R as ge,a as je,u as ke}from"./create-stack-CEmaPZ4c.js";import{C as be}from"./CodeSnippet-CqybNv0k.js";import{a as ye,s as ve}from"./sharedSchema-TMLu-nYQ.js";import{C as U}from"./ComponentIcon-CAIoUis2.js";import{D as Ne}from"./DisplayDate-BeXgUG_C.js";import{I as we}from"./InlineAvatar-jEgodSgX.js";import{S as Se}from"./check-circle-Dwxliy1Z.js";import{L as Ce,b as Le}from"./@react-router-BMhZulnd.js";import{w as _e}from"./index-DKPhqP2B.js";import{t as Te}from"./zod-D89GC_vc.js";import"./@reactflow-8U9qNlMR.js";import"./copy-CaSMXwiU.js";import"./stack-detail-query-xmYxSsUY.js";import"./layout-DCSYN7-C.js";import"./rocket-CONEmRmB.js";const E=d.forwardRef(({closeModal:t,type:s,children:r,...n},i)=>e.jsxs(Z,{children:[e.jsx(q,{asChild:!0,children:r}),e.jsxs(H,{className:"max-w-2xl",...n,ref:i,children:[e.jsx(K,{children:e.jsx(W,{children:"Create New "})}),e.jsx("div",{className:"space-y-5 overflow-auto p-7",children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:["Create a new ",x(s)]}),e.jsx(be,{codeClasses:"whitespace-pre-wrap",wrap:!0,code:`zenml ${G(s)} register ${s.toUpperCase()}_NAME --flavor=${s.toUpperCase()}_FLAVOR [--${s.toUpperCase()}_OPTIONS]`})]})})]})]}));E.displayName="UpdateStackDialog";const y=["orchestrator","artifact_store","container_registry","step_operator","model_deployer","feature_store","experiment_tracker","alerter","annotator","data_validator","image_builder","model_registry"],b=l.object({id:l.string().trim().min(1),name:l.string().trim().min(1),logoUrl:l.string().trim().min(1)}),ze=y.reduce((t,s)=>(t[s]=b.nullable(),t),{}),Me=l.object({stackName:ye,components:l.object({...ze,orchestrator:b,artifact_store:b})}),w={helpLink:"https://docs.zenml.io/stack-components/orchestrators",description:"An orchestrator is a special kind of backend that manages the running of each step of the pipeline. Orchestrators administer the actual pipeline runs. By default, ZenML initializes your repository with an orchestrator that runs everything on your local machine."},S={helpLink:"https://docs.zenml.io/stack-components/artifact-stores",description:"The Artifact Store is a central component in any MLOps stack. As the name suggests, it acts as a data persistence layer where artifacts (e.g. datasets, models) ingested or generated by the machine learning pipelines are stored."},C={helpLink:"https://docs.zenml.io/stack-components/container-registries",description:"Container registry is used to store container images that are built to run machine learning pipelines in remote environments. Containerization of the pipeline code creates a portable environment that allows code to run in an isolated manner."},L={description:"Step operators allow you to run individual steps in a custom environment different from the default one used by your active orchestrator.",helpLink:"https://docs.zenml.io/stack-components/step-operators"},_={description:"Model deployers are stack components responsible for online model serving. They are responsible for deploying models to a remote server. Model deployers also act as a registry for models that are served with ZenML.",helpLink:"https://docs.zenml.io/stack-components/model-deployers"},T={description:"ZenML supports connecting to a Redis-backed Feast feature store as a stack component integration.",helpLink:"https://docs.zenml.io/stack-components/feature-stores"},z={description:"Experiment trackers let you track your ML experiments by logging the parameters and allowing you to compare between different runs.",helpLink:"https://docs.zenml.io/stack-components/experiment-trackers"},M={description:"Alerters allow you to send messages to chat services (like Slack, Discord, Mattermost, etc.) from within your pipelines. This is useful to immediately get notified when failures happen, for general monitoring/reporting, and also for building human-in-the-loop ML.",helpLink:"https://docs.zenml.io/stack-components/alerters "},F={description:"Annotators are a stack component that enables the use of data annotation as part of your ZenML stack and pipelines.",helpLink:"https://docs.zenml.io/stack-components/annotators"},I={description:"Data Validators used in ZenML pipelines usually generate data profiles and data quality check reports that are versioned and stored in the Artifact Store and can be retrieved and visualized later.",helpLink:"https://docs.zenml.io/stack-components/data-validators"},D={description:"The image builder is an essential part of most remote MLOps stacks. It is used to build container images such that your machine-learning pipelines and steps can be executed in remote environments.",helpLink:"https://docs.zenml.io/stack-components/image-builders"},A={description:"Model registries are centralized storage solutions for managing and tracking machine learning models across various stages of development and deployment.",helpLink:"https://docs.zenml.io/stack-components/model-registries"};function Fe({type:t}){const{description:s,link:r}=Ie(t);return e.jsx(J,{children:e.jsxs(X,{delayDuration:200,children:[e.jsxs(Y,{children:[e.jsx(ee,{className:"h-4 w-4 shrink-0 fill-theme-text-tertiary"}),e.jsxs("div",{className:"sr-only",children:["Info for ",t]})]}),e.jsxs(te,{align:"start",side:"bottom",className:"flex max-w-xl flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:s}),e.jsx("a",{className:"link mt-2 text-primary-400",target:"_blank",href:r,children:"Learn more"})]})]})})}function Ie(t){switch(t){case"orchestrator":return{description:w.description,link:w.helpLink};case"alerter":return{description:M.description,link:M.helpLink};case"annotator":return{description:F.description,link:F.helpLink};case"artifact_store":return{description:S.description,link:S.helpLink};case"container_registry":return{description:C.description,link:C.helpLink};case"data_validator":return{description:I.description,link:I.helpLink};case"experiment_tracker":return{description:z.description,link:z.helpLink};case"feature_store":return{description:T.description,link:T.helpLink};case"image_builder":return{description:D.description,link:D.helpLink};case"model_deployer":return{description:_.description,link:_.helpLink};case"model_registry":return{description:A.description,link:A.helpLink};case"step_operator":return{description:L.description,link:L.helpLink}}}function De(){return e.jsxs(e.Fragment,{children:[y.map(t=>e.jsx(N,{className:"h-full space-y-5 p-5",value:t,children:e.jsx(Oe,{type:t})},t)),e.jsx(N,{className:"h-full",value:"",children:e.jsx("div",{className:"flex h-full w-full items-center justify-center text-theme-text-tertiary",children:"Select a category to add a new component"})})]})}function Ae({type:t,search:s}){const r=pe({...de.componentListInfinite({sort_by:"desc:updated",type:t,...s?{name:`contains:${s}`}:{}})}),{control:n,watch:i,setValue:c}=m();return r.isError?e.jsx("p",{children:"Error while fetching Components"}):r.isPending?e.jsx("div",{className:"flex w-full flex-1 items-center justify-center",children:e.jsx(se,{})}):e.jsxs("div",{className:"space-y-1",children:[e.jsx("ul",{className:"space-y-1",children:r.data.pages.map(o=>o.items.map(a=>e.jsx("li",{children:e.jsx(oe,{name:`components.${t}.id`,control:n,render:({field:{onChange:g,...j}})=>{var p,u,f,h;return e.jsxs(ge,{className:"justify-between bg-theme-surface-primary font-medium","data-state":i(`components.${t}.id`)===a.id?"selected":"unselected",htmlFor:a.id,children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(je,{...j,id:a.id,type:"radio",value:a.id,onChange:Q=>{var v;c(`components.${t}.name`,a.name),c(`components.${t}.logoUrl`,((v=a.body)==null?void 0:v.logo_url)||""),g(Q)},checked:i(`components.${t}.id`)===a.id,name:t}),e.jsx("img",{alt:"flavor icon",src:me(((p=a.body)==null?void 0:p.logo_url)||""),width:24,height:24}),e.jsxs("div",{className:"min-w-0 truncate",children:[e.jsx("div",{className:"truncate font-semibold",children:a.name}),e.jsx("div",{className:"truncate text-text-xs text-theme-text-secondary",children:a.id.split("-")[0]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-text-sm",children:[((f=(u=a.body)==null?void 0:u.user)==null?void 0:f.name)&&e.jsx(we,{username:a.body.user.name}),((h=a.body)==null?void 0:h.updated)&&e.jsx("div",{className:"whitespace-nowrap text-theme-text-secondary",children:e.jsx(Ne,{short:!0,dateString:a.body.updated})})]})]})}})},a.id)))}),e.jsx(Ue,{type:t}),r.hasNextPage&&e.jsx(k,{onClick:()=>r.fetchNextPage(),type:"button",size:"md",intent:"secondary",emphasis:"subtle",className:"flex w-full items-center justify-center bg-theme-surface-primary",children:e.jsxs("div",{className:"flex items-center gap-1",children:[r.isFetchingNextPage&&e.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"}),"Load more"]})})]})}function $e({type:t}){return e.jsxs("section",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(U,{className:"h-5 w-5 fill-primary-400",type:t}),e.jsx("h2",{className:"text-text-lg font-semibold",children:x(t)}),e.jsx(Fe,{type:t})]}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Select a existing ",re(t)," from your server:"]})]})}function Oe({type:t}){const[s,r]=d.useState("");return e.jsxs(e.Fragment,{children:[e.jsx($e,{type:t}),e.jsx(Re,{search:s,setSearch:r}),e.jsx(Ae,{search:s,type:t})]})}function Re({setSearch:t,search:s}){const[r,n]=d.useState(s),i=d.useCallback(fe(t,500),[]);d.useEffect(()=>()=>{i.cancel()},[i]);function c(o){n(o),i(o)}return e.jsx(O,{value:r,onChange:o=>c(o.target.value),placeholder:"Search..."})}function Ue({type:t}){return e.jsx(E,{type:t,children:e.jsxs("button",{className:"w-full rounded-md border border-dashed border-neutral-300 bg-theme-surface-tertiary py-5 text-theme-text-secondary",children:["New ",x(t)]})})}function Ee({type:t}){const{watch:s,formState:{errors:r}}=m(),n=s(`components.${t}`),i=n&&n.id;return e.jsx("div",{"data-error":!i&&r.components&&r.components[t]?"true":"false","data-filled":i?"true":"false",className:"flex h-[110px] flex-col items-center justify-center space-y-2 truncate whitespace-nowrap rounded-md border border-theme-border-moderate bg-theme-surface-secondary py-5 text-center text-text-sm text-theme-text-secondary transition-all duration-150 hover:bg-theme-surface-primary hover:shadow-sm data-[error=true]:border-theme-text-error data-[filled=true]:border-success-400 data-[filled=true]:bg-theme-surface-primary data-[state=active]:bg-theme-surface-primary group-data-[state=active]/trigger:bg-theme-surface-primary group-data-[state=active]/trigger:shadow-md data-[error=false]:data-[filled=false]:group-data-[state=active]/trigger:border-theme-border-bold",children:i?e.jsx(Qe,{type:t}):e.jsx(Pe,{type:t})})}function Qe({type:t}){const{watch:s}=m(),r=s(`components.${t}`);return r&&r.id?e.jsxs("div",{className:"flex flex-col items-center gap-2 text-text-sm",children:[e.jsx("img",{width:24,height:24,src:r.logoUrl,alt:`Icon of ${r.name}`}),e.jsxs("div",{className:"space-y-0.25",children:[e.jsx("div",{className:"text-theme-text-primary",children:r.name}),e.jsx("div",{className:"text-text-xs text-theme-text-tertiary",children:x(t)})]})]}):null}function Pe({type:t}){return e.jsxs(e.Fragment,{children:[e.jsx(U,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong",type:t}),e.jsx("span",{children:x(t)})]})}function Be(){return e.jsxs("div",{className:"flex h-full flex-col justify-between space-y-5",children:[e.jsxs("div",{className:"space-y-5 p-5",children:[e.jsx(qe,{}),e.jsx(Ve,{})]}),e.jsx(Ze,{})]})}function Ve(){const{watch:t,resetField:s}=m();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-text-lg font-semibold",children:"Add Components"}),e.jsxs("p",{className:"text-theme-text-secondary",children:["All stacks have at minimum an orchestrator and an artifact store."," ",e.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://docs.zenml.io/stack-components/component-guide",className:"link text-primary-400",children:"Learn more"})]})]}),e.jsx(P,{children:e.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-4",children:y.map(r=>e.jsxs("div",{className:"relative",children:[e.jsx(B,{className:"group/trigger w-full",value:r,children:e.jsx(Ee,{type:r})}),t(`components.${r}.id`)&&e.jsx("button",{type:"button",onClick:n=>{n.preventDefault(),s(`components.${r}`)},className:"absolute right-[-12px] top-[-12px] flex aspect-square h-[28px] w-[28px] items-center justify-center rounded-rounded bg-theme-surface-primary",children:e.jsx(Se,{className:"h-5 w-5 shrink-0 fill-success-400"})})]},r))})})]})}function Ze(){const{formState:{isSubmitting:t}}=m(),s=!!ue();return e.jsxs("div",{className:"flex items-center justify-end space-x-2 border-t border-theme-border-moderate p-5",children:[e.jsx(k,{asChild:!0,intent:"secondary",size:"md",children:e.jsx(Ce,{to:R.stacks.create.index,children:"Cancel"})}),e.jsxs(k,{className:"flex items-center gap-1",disabled:t||s,size:"md",children:[(s||t)&&e.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"}),"Register Stack"]})]})}function qe(){var r;const{register:t,formState:{errors:s}}=m();return e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-text-sm",htmlFor:"stack-name",children:"Stack Name"}),e.jsx(O,{id:"stack-name",className:`${s.stackName?"border-red-500":""} w-full`,placeholder:"zenml-stack",...t("stackName")}),s.stackName&&e.jsx("p",{className:"text-text-xs text-red-500",children:(r=s.stackName.message)==null?void 0:r.toString()})]})}function He(){const t=he({..._e.workspaceDetail("default")}),{toast:s}=ae(),r=Le(),n=xe(),i=ke({onSuccess:async()=>{n.invalidateQueries({queryKey:ve.all}),r(R.stacks.overview)},onError:a=>{s({status:"error",emphasis:"subtle",icon:e.jsx(ne,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:a.message,rounded:!0})}});function c(a){var p;const g=Object.entries(a.components).reduce((u,[f,h])=>(h&&(u[f]=[h.id]),u),{}),j={name:a.stackName,components:g};i.mutate({workspaceId:((p=t.data)==null?void 0:p.id)||"",payload:j})}const o=ce({resolver:Te(Me),defaultValues:{components:{alerter:null,orchestrator:{},annotator:null,artifact_store:{},container_registry:null,data_validator:null,experiment_tracker:null,feature_store:null,model_registry:null,image_builder:null,model_deployer:null,step_operator:null},stackName:""}});return{createManualStack:c,form:o}}function ft(){const[t,s]=d.useState(""),{createManualStack:r,form:n}=He();return e.jsx(le,{...n,children:e.jsx(V,{value:t,onValueChange:s,className:"h-full",children:e.jsxs("form",{onSubmit:n.handleSubmit(r),className:"flex h-[calc(100vh_-_4rem_-_4rem_-_2px)] flex-1 flex-col divide-y divide-theme-border-moderate xl:flex-row-reverse xl:divide-x xl:divide-y-0 xl:divide-x-reverse",children:[e.jsx($,{className:"h-full flex-1 bg-theme-surface-primary",children:e.jsx(Be,{})}),e.jsx($,{children:e.jsx(De,{})})]})})})}function $({className:t,...s}){return e.jsx("div",{className:ie("w-full overflow-y-auto xl:w-1/2",t),...s})}export{ft as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as l,j as e}from"./@radix-DP6vWzyx.js";import{l as D,m as R,k as G,n as H,F as k,i as V,o as K,p as Q,f as x,D as J,q as W,s as X,C as Y,t as ee,r as d,T as _,v as A,w as E,x as L,y as N,E as w,z as o,G as F,S as j,B as se,H as te,J as ae,K as ne,e as re,L as v,M as ie,N as le,P as oe}from"./index-QQb7wQEC.js";import{L as m,c as b,b as ce}from"./@react-router-BMhZulnd.js";import{S as M}from"./refresh-BVu22P_C.js";import{S as B,P as O}from"./SearchField-DfUiGFVd.js";import{q as de,b as me,c as pe,a as ue}from"./@tanstack-BUCbhJyH.js";import{o as he}from"./url-D5le3J4q.js";import{S as z}from"./trash-DkJHMOg7.js";import{D as I,a as Z,g as $,E as U,b as xe}from"./delete-run-D-LKbGyz.js";import{C as g}from"./CopyButton-C745BrKi.js";import{S as fe}from"./dots-horizontal-DK5Duzx4.js";import{A as je}from"./AlertDialogDropdownItem-C6N2rGrB.js";import{R as ge,a as be,u as Ce,b as ve,c as ye,d as Pe}from"./RunSelector-DCiL3M1c.js";import{D as Ne}from"./DisplayDate-BeXgUG_C.js";import{I as we}from"./InlineAvatar-jEgodSgX.js";import{I as Se}from"./Infobox-BwisKifi.js";import"./@reactflow-8U9qNlMR.js";import"./chevron-right-double-DoD8iXWM.js";import"./index-BVJ8n2-j.js";import"./zod-D89GC_vc.js";import"./index.esm-cuVep_NJ.js";import"./check-circle-Dwxliy1Z.js";import"./copy-CaSMXwiU.js";const Te=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 De({params:s}){const t=D(R.pipelines.all+"?"+he(s)),a=await G(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(a.status===404&&H(),!a.ok)throw new k({message:"Error while fetching pipelines",status:a.status,statusText:a.statusText});return a.json()}const S={all:["pipelines"],pipelineList:s=>de({queryKey:[...S.all,s],queryFn:async()=>De({params:s})})};async function Re({pipelineId:s}){const t=D(R.pipelines.detail(s)),a=await fetch(t,{method:"DELETE",credentials:"include",headers:{"Content-Type":"application/json"}});if(!a.ok){const n=await a.json().then(r=>r.detail).catch(()=>`Failed to delete pipeline ${s}`);throw new k({status:a.status,statusText:a.statusText,message:n})}return a.json()}function ke(s){return me({mutationFn:Re,...s})}const q=l.createContext(null);function _e({children:s}){const[t,a]=l.useState([]),n=pe(),{toast:r}=V(),i=ke(),c=async p=>{try{const u=p.map(C=>i.mutateAsync({pipelineId:C}));await Promise.all(u),r({description:"Deleted successfully.",status:"success",emphasis:"subtle",rounded:!0}),await n.invalidateQueries({queryKey:S.all}),a([])}catch(u){console.error("Failed to delete some pipelines:",u)}};return e.jsx(q.Provider,{value:{selectedPipelines:t,setSelectedPipelines:a,bulkDeletePipelines:c},children:s})}function f(){const s=l.useContext(q);if(!s)throw new Error("usePipelinesSelectorContext must be used within a PipelinesSelectorProvider");return s}function Ae(){const[s,t]=l.useState(!1),{bulkDeletePipelines:a,selectedPipelines:n}=f();async function r(){await a(n),t(!1)}return e.jsxs(K,{open:s,onOpenChange:t,children:[e.jsx(Q,{children:e.jsxs(x,{className:"rounded-sharp border-none bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(z,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(I,{title:`Delete Pipeline${n.length>=2?"s":""}`,handleDelete:r,children:e.jsxs(Z,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function Ee(){const{selectedPipelines:s}=f();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(Ae,{})]})}function Le({id:s}){const[t,a]=l.useState(!1),[n,r]=l.useState(!1),i=l.useRef(null),c=l.useRef(null),{bulkDeletePipelines:p}=f();async function u(){await p([s]),T(!1)}function C(){c.current=i.current}function T(h){if(h===!1){r(!1),setTimeout(()=>{a(h)},200);return}a(h)}return e.jsxs(J,{onOpenChange:r,open:n,children:[e.jsx(W,{ref:i,children:e.jsx(fe,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(X,{hidden:t,onCloseAutoFocus:h=>{c.current&&(c.current.focus(),c.current=null,h.preventDefault())},align:"end",sideOffset:7,children:e.jsx(je,{onSelect:C,open:t,onOpenChange:T,triggerChildren:"Delete",icon:e.jsx(z,{fill:"red"}),children:e.jsx(I,{title:"Delete Pipeline",handleDelete:u,children:e.jsxs(Z,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})})]})}const Fe=({id:s})=>{const{selectedPipelines:t,setSelectedPipelines:a}=f(),n=(r,i)=>{a(c=>r?[...c,i]:c.filter(p=>p!==i))};return e.jsx(Y,{id:s,onCheckedChange:r=>n(r,s),checked:t.includes(s),className:"h-3 w-3"})};function Me(){return[{id:"check",header:"",meta:{width:"1%"},cell:({row:s})=>e.jsx(Fe,{id:s.original.id})},{id:"name",header:"Pipeline",cell:({row:s})=>{var t,a,n;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(ee,{className:`h-5 w-5 ${$((t=s.original.body)==null?void 0:t.latest_run_status)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(m,{to:d.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(_,{children:e.jsxs(A,{children:[e.jsx(E,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(U,{status:(a=s.original.body)==null?void 0:a.latest_run_status})}),e.jsx(L,{className:"z-20 capitalize",children:(n=s.original.body)==null?void 0:n.latest_run_status})]})}),e.jsx(g,{copyText:s.original.name})]}),e.jsxs(m,{to:d.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(g,{copyText:s.original.id})]})]})]})}},{id:"latest-run",header:"Latest Run",accessorFn:s=>{var t,a;return{status:(t=s.body)==null?void 0:t.latest_run_status,runId:(a=s.body)==null?void 0:a.latest_run_id}},cell:({getValue:s})=>{const{runId:t,status:a}=s();return!t||!a?e.jsx("div",{children:"No run"}):e.jsx(m,{to:d.runs.detail(t),children:e.jsxs(N,{emphasis:"subtle",rounded:!1,className:"inline-flex items-center gap-0.5",color:xe(a),children:[e.jsx(w,{className:"h-3 w-3 fill-current"}),t==null?void 0:t.split("-")[0]]})})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:s})=>e.jsx(Le,{id:s.original.id})}]}const y=1,Be=o.object({page:o.coerce.number().min(y).optional().default(y).catch(y),name:o.string().optional(),operator:o.enum(["and","or"]).optional()});function Oe(){const[s]=b(),{page:t,name:a,operator:n}=Be.parse({page:s.get("page")||void 0,name:s.get("name")||void 0,operator:s.get("operator")||void 0});return{page:t,name:a,logical_operator:n}}function ze(){const s=Oe(),{selectedPipelines:t}=f(),{data:a,refetch:n}=ue({...S.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:[t.length?e.jsx(Ee,{}):e.jsx(B,{searchParams:s}),e.jsx("div",{className:"flex justify-between",children:e.jsxs(x,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>n(),children:[e.jsx(M,{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:a?e.jsx(F,{columns:Me(),data:a.items}):e.jsx(j,{className:"h-[500px] w-full"})}),a?a.total_pages>1&&e.jsx(O,{searchParams:s,paginate:a}):e.jsx(j,{className:"h-[36px] w-[300px]"})]})]})}const Ie=[{id:"check",header:"",meta:{width:"1%"},accessorFn:s=>({id:s.id}),cell:({getValue:s})=>{const{id:t}=s();return e.jsx(ge,{id:t})}},{id:"name",header:"Run",accessorFn:s=>{var t;return{id:s.id,name:s.name,status:(t=s.body)==null?void 0:t.status}},cell:({getValue:s})=>{const{name:t,status:a,id:n}=s();return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(w,{className:`h-5 w-5 ${$(a)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(m,{to:d.runs.detail(n),className:"flex items-center gap-1",children:e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:t})}),e.jsx(_,{children:e.jsxs(A,{children:[e.jsx(E,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(U,{status:a})}),e.jsx(L,{className:"z-20 capitalize",children:a})]})}),e.jsx(g,{copyText:t})]}),e.jsxs(m,{to:d.runs.detail(n),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:n.split("-")[0]}),e.jsx(g,{copyText:n})]})]})]})}},{id:"pipeline",header:"Pipeline",accessorFn:s=>{var t,a;return(a=(t=s.body)==null?void 0:t.pipeline)==null?void 0:a.name},cell:({getValue:s})=>{const t=s();return t?e.jsx(m,{to:d.pipelines.namespace(t),children:e.jsx(N,{color:"purple",className:"inline-flex items-center gap-0.5 truncate",rounded:!1,emphasis:"subtle",children:t})}):null}},{id:"stack",header:"Stack",accessorFn:s=>{var t,a,n,r;return{name:(a=(t=s.body)==null?void 0:t.stack)==null?void 0:a.name,id:(r=(n=s.body)==null?void 0:n.stack)==null?void 0:r.id}},cell:({getValue:s})=>{const{name:t,id:a}=s();return!t||!a?null:e.jsx(N,{rounded:!1,className:"inline-block",color:"turquoise",emphasis:"subtle",children:t})}},{id:"created-at",header:"Created at",accessorFn:s=>{var t;return{date:(t=s.body)==null?void 0:t.created}},cell:({getValue:s})=>{const{date:t}=s();return e.jsx(Ne,{dateString:t})}},{id:"author",header:"Author",accessorFn:s=>{var t,a,n,r,i;return{name:((n=(a=(t=s.body)==null?void 0:t.user)==null?void 0:a.body)==null?void 0:n.full_name)||((i=(r=s.body)==null?void 0:r.user)==null?void 0:i.name)}},cell:({getValue:s})=>{const{name:t}=s();return e.jsx(we,{username:t})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:s})=>e.jsx(be,{id:s.original.id})}],P=1,Ze=o.object({page:o.coerce.number().min(P).optional().default(P).catch(P),name:o.string().optional(),operator:o.enum(["and","or"]).optional(),status:o.enum(["pending","running","completed"]).optional()});function $e(){const[s]=b(),{page:t,name:a,operator:n,status:r}=Ze.parse({page:s.get("page")||void 0,name:s.get("name")||void 0,operator:s.get("operator")||void 0,status:s.get("status")||void 0});return{page:t,name:a,logical_operator:n,status:r}}function Ue(){const{selectedRuns:s}=Ce(),t=$e(),{data:a,refetch:n}=ve({params:{...t,sort_by:"desc:updated"}});return e.jsxs("div",{className:"mt-5 flex flex-col gap-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[s.length?e.jsx(ye,{}):e.jsx(B,{searchParams:t}),e.jsx("div",{className:"flex justify-between",children:e.jsxs(x,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>n(),children:[e.jsx(M,{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:a?e.jsx(F,{columns:Ie,data:a.items}):e.jsx(j,{className:"h-[500px] w-full"})}),a?a.total_pages>1&&e.jsx(O,{searchParams:t,paginate:a}):e.jsx(j,{className:"h-[36px] w-[300px]"})]})]})}const qe=o.object({tab:o.enum(["pipelines","runs","templates"]).optional().default("pipelines").catch("pipelines")});function Ge(){const[s]=b(),{tab:t}=qe.parse({tab:s.get("tab")||void 0});return t}const He="/assets/templates-1S_8WeSK.webp";function Ve(){return e.jsxs("div",{className:"layout-container space-y-5",children:[e.jsx(Ke,{}),e.jsx(Je,{})]})}function Ke(){return e.jsx(Se,{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 Qe=["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 Je(){return e.jsxs(se,{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:Qe.map((s,t)=>e.jsx("li",{className:"text-text-md text-theme-text-secondary",children:s},t))}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(x,{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(x,{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:He,alt:"Screenshot of Zenml Pro Templates Feature"})]})}const We=[{value:"pipelines",label:"Pipelines",icon:Te},{value:"runs",label:"Runs",icon:w},{value:"templates",label:"Templates",icon:ie}];function Xe(){const[s]=b(),t=Ge(),a=ce();l.useEffect(()=>{if(!s.get("tab")){const i=new URLSearchParams(s);i.set("tab","pipelines"),a(`?${i.toString()}`,{replace:!0})}},[a,s]);function n(r){const i=new URLSearchParams;i.set("tab",r),a(`?${i.toString()}`)}return e.jsx("div",{className:"p-5",children:e.jsxs(te,{onValueChange:n,value:t,children:[e.jsx(ae,{children:We.map(r=>e.jsxs(ne,{className:"flex items-center gap-2 text-text-md",value:r.value.toLowerCase(),children:[e.jsx(r.icon,{className:`h-5 w-5 ${t===r.value?"fill-primary-400":"fill-theme-text-tertiary"}`}),r.label,r.value==="templates"&&e.jsx(re,{className:"rounded-sm font-semibold text-primary-500",color:"purple",size:"sm",children:"New"})]},r.value))}),e.jsx(v,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"pipelines",children:e.jsx(_e,{children:e.jsx(ze,{})})}),e.jsx(v,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"runs",children:e.jsx(Pe,{children:e.jsx(Ue,{})})}),e.jsx(v,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"templates",children:e.jsx(Ve,{})})]})})}function ys(){const{setCurrentBreadcrumbData:s}=le();return l.useEffect(()=>{s({segment:"pipelines",data:null})},[]),e.jsxs("div",{children:[e.jsx(oe,{children:e.jsx("h1",{className:"text-display-xs font-semibold",children:"Pipelines"})}),e.jsx(Xe,{})]})}export{ys as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as l,j as e}from"./@radix-DP6vWzyx.js";import{u as c,S as x,a as y,b as v}from"./form-schemas-1AyOCx90.js";import{A as j,I as U,P as h,U as b,S as _}from"./UsageReason-DVceN14P.js";import{i as g,ax as C,aS as P,j as w,aw as A,S as E}from"./index-QQb7wQEC.js";import{c as F}from"./@tanstack-BUCbhJyH.js";import"./check-circle-Dwxliy1Z.js";import"./url-D5le3J4q.js";import"./@react-router-BMhZulnd.js";import"./UpdatePasswordSchemas-DckMEkFf.js";import"./zod-D89GC_vc.js";import"./index.esm-cuVep_NJ.js";import"./gcp-7M2Yf3ZK.js";import"./kubernetes--g7r02Zu.js";import"./rocket-CONEmRmB.js";import"./@reactflow-8U9qNlMR.js";const S=l.createContext(null);function H({children:t,initialUser:a}){const[n,r]=l.useState(a||{});return e.jsx(S.Provider,{value:{user:n,setUser:r},children:t})}function d(){const t=l.useContext(S);if(t===null)throw new Error("useSurveyUserContext must be used within an SurveyUserProvider");return t}function D({user:t}){var u,i;const{setSurveyStep:a}=c(),{setUser:n}=d();function r({fullName:s,getUpdates:m,email:o}){n(p=>({...p,...o?{email:o}:{email:null},full_name:s,email_opted_in:m})),a(2)}return e.jsx(j,{email:(u=t.metadata)==null?void 0:u.email,fullName:(i=t.body)==null?void 0:i.full_name,submitHandler:r})}function I(){const{user:t}=d(),{setSurveyStep:a}=c(),{toast:n}=g(),r=F(),{mutate:u}=C({onSuccess:async()=>{await r.invalidateQueries({queryKey:P()}),a(s=>s+1)},onError:s=>{s instanceof Error&&n({status:"error",emphasis:"subtle",icon:e.jsx(w,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:s.message,rounded:!0})}});function i({other:s,providers:m,otherVal:o}){const f={infra_providers:s?[...m,o]:m,finished_onboarding_survey:!0};u({...t,user_metadata:{...t.user_metadata,...f}})}return e.jsx(U,{submitHandler:i})}function R({user:t}){const{setSurveyStep:a}=c(),{setUser:n}=d();function r({primaryUse:u}){const i={primary_use:u};n(s=>({...s,user_metadata:{...s.user_metadata,...i}})),a(3)}return e.jsx(h,{user:t,submitHandler:r})}function k(){const{setSurveyStep:t}=c(),{setUser:a}=d();function n({usageReason:r,comparison_tools:u,otherTool:i,otherToolVal:s}){const m={usage_reason:r,...!!u&&{comparing_tools:i&&s?[...u,s]:u}};a(o=>({...o,user_metadata:{...o.user_metadata,...m}})),t(o=>o+1)}return e.jsx(b,{submitHandler:n})}function M(){const{data:t,isPending:a,isError:n}=A({throwOnError:!0}),{surveyStep:r}=c();return n?null:a?e.jsx(E,{className:"h-[300px]"}):e.jsx(e.Fragment,{children:e.jsxs(H,{children:[e.jsx(x,{stepAmount:5}),r===1&&e.jsx(D,{user:t}),r===2&&e.jsx(R,{user:t}),r===3&&e.jsx(k,{}),r===4&&e.jsx(I,{}),r===5&&e.jsx(_,{}),r===6&&e.jsx(y,{subHeader:"Your ZenML account is now updated",displayBody:!1,username:t.name})]})})}function $(){return e.jsx("div",{children:e.jsx(v,{children:e.jsx(M,{})})})}export{$ as default};
|