zenml-nightly 0.66.0.dev20240925__py3-none-any.whl → 0.66.0.dev20240926__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/integrations/__init__.py +1 -0
- zenml/integrations/constants.py +1 -0
- zenml/integrations/deepchecks/__init__.py +1 -1
- zenml/integrations/deepchecks/data_validators/deepchecks_data_validator.py +55 -14
- zenml/integrations/deepchecks/validation_checks.py +62 -5
- zenml/integrations/skypilot/orchestrators/skypilot_base_vm_orchestrator.py +38 -26
- zenml/integrations/skypilot_kubernetes/__init__.py +52 -0
- zenml/integrations/skypilot_kubernetes/flavors/__init__.py +26 -0
- zenml/integrations/skypilot_kubernetes/flavors/skypilot_orchestrator_kubernetes_vm_flavor.py +125 -0
- zenml/integrations/skypilot_kubernetes/orchestrators/__init__.py +25 -0
- zenml/integrations/skypilot_kubernetes/orchestrators/skypilot_kubernetes_vm_orchestrator.py +74 -0
- zenml/zen_server/dashboard/assets/{404-iO8vpun1.js → 404-CMnKjD-L.js} +1 -1
- zenml/zen_server/dashboard/assets/{@reactflow-B6kq9fJZ.js → @reactflow-CEC2f0cl.js} +1 -1
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-BqM1UpCD.js +1 -0
- zenml/zen_server/dashboard/assets/{CodeSnippet-DNWdQmbo.js → CodeSnippet-DRy_0J4D.js} +2 -2
- zenml/zen_server/dashboard/assets/{CollapsibleCard-B2OVjWYE.js → CollapsibleCard-lE-75Zob.js} +1 -1
- zenml/zen_server/dashboard/assets/{Commands-DsoaVElZ.js → Commands-CVx2RAoT.js} +1 -1
- zenml/zen_server/dashboard/assets/{CopyButton-BqE_-PHO.js → CopyButton-C_yRGWuP.js} +1 -1
- zenml/zen_server/dashboard/assets/{CsvVizualization-Dyasr2jU.js → CsvVizualization-Dd0P02Iz.js} +1 -1
- zenml/zen_server/dashboard/assets/{DialogItem-Cz1VLRwa.js → DialogItem-BCrc2wIk.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-DorJD_va.js → Error-BuMJbG-M.js} +1 -1
- zenml/zen_server/dashboard/assets/{ExecutionStatus-CIfQTutR.js → ExecutionStatus-fIulMG4w.js} +1 -1
- zenml/zen_server/dashboard/assets/{Helpbox-CmfvtNeq.js → Helpbox-CJAp4kbv.js} +1 -1
- zenml/zen_server/dashboard/assets/Infobox-CC70zvGO.js +1 -0
- zenml/zen_server/dashboard/assets/{InlineAvatar-Ds2ZFHPc.js → InlineAvatar-C3QXdFW1.js} +1 -1
- zenml/zen_server/dashboard/assets/{Partials-DX-8iEa1.js → Partials-Cb8lrNsi.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProviderIcon-BOQJgapd.js → ProviderIcon-C9BuYVSN.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProviderRadio-BsYBw9YA.js → ProviderRadio-GYc9PJtG.js} +1 -1
- zenml/zen_server/dashboard/assets/{SearchField-W3GXpLlI.js → SearchField-BeF1yR7M.js} +1 -1
- zenml/zen_server/dashboard/assets/SecretTooltip-DgVWrPxX.js +1 -0
- zenml/zen_server/dashboard/assets/{SetPassword-B-0a8UCj.js → SetPassword-nAhHddXW.js} +1 -1
- zenml/zen_server/dashboard/assets/{Tick-i1DYsVcX.js → Tick-C5ZVvNRQ.js} +1 -1
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-C6Zb7ASL.js → UpdatePasswordSchemas-7KFsDbKb.js} +1 -1
- zenml/zen_server/dashboard/assets/UsageReason-DL5NL_ZD.js +1 -0
- zenml/zen_server/dashboard/assets/{WizardFooter-BHbO7zOa.js → WizardFooter-CgvFSppz.js} +1 -1
- zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-BBEe6I9-.js → all-pipeline-runs-query-DAPSF_74.js} +1 -1
- zenml/zen_server/dashboard/assets/{cloud-only-BuP4Kt_7.js → cloud-only-CxoNxh86.js} +1 -1
- zenml/zen_server/dashboard/assets/{create-stack-B2x2d4r1.js → create-stack-BfgeXFuV.js} +1 -1
- zenml/zen_server/dashboard/assets/delete-run-OkGmZQ5G.js +1 -0
- zenml/zen_server/dashboard/assets/{form-schemas-Bap0f854.js → form-schemas-C09PrQUJ.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-DFi8BroH.js → index-CLT4K7oC.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-B9wVwe7u.js → index-D0bJjaey.js} +3 -3
- zenml/zen_server/dashboard/assets/index-PcI3Xw77.css +1 -0
- zenml/zen_server/dashboard/assets/{login-mutation-DwxUz8VA.js → login-mutation-CB45FHbP.js} +1 -1
- zenml/zen_server/dashboard/assets/{not-found-D5i9DunU.js → not-found-NtCUfXiV.js} +1 -1
- zenml/zen_server/dashboard/assets/page-AvcQe_oR.js +1 -0
- zenml/zen_server/dashboard/assets/page-B6DccgPa.js +1 -0
- zenml/zen_server/dashboard/assets/{page-xQG6GmFJ.js → page-B7DTiwhv.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CIbehp7V.js → page-B7LduaiG.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CEJWu1YO.js → page-B8WlhDq6.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BitfWsiW.js → page-BIhP9udn.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DE03uZZR.js → page-BLS9bXB8.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DFCK65G9.js → page-BYXn4SXu.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-bimkItOg.js → page-Bfvwt3AB.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-D5F3DJjm.js → page-BipKr1Pt.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BwG4f5qc.js +1 -0
- zenml/zen_server/dashboard/assets/page-C1c_unjg.js +9 -0
- zenml/zen_server/dashboard/assets/{page-DQdwZZ9x.js → page-C25tiRdj.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CIATsAA7.js +1 -0
- zenml/zen_server/dashboard/assets/{page-iwoJnwPv.js → page-CKUVhcYr.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BiF8hLbO.js → page-CXLwze-m.js} +1 -1
- zenml/zen_server/dashboard/assets/page-D7TD0k_A.js +1 -0
- zenml/zen_server/dashboard/assets/{page-CDOQLrPC.js → page-DIlOQjGU.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DGMa3ZQL.js → page-DJ31Huvj.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-J0s8Sq3N.js → page-DOqsdVzG.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DQGCHKrQ.js → page-DUapawuM.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-WCQ659by.js → page-Dd3jZyrf.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CrSdkteO.js → page-DyZzYHWA.js} +2 -2
- zenml/zen_server/dashboard/assets/page-L_xNBh_5.js +3 -0
- zenml/zen_server/dashboard/assets/{page-oS4hqS8M.js → page-VsrKiIdF.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DgM-N9RL.js → page-ioO58ULo.js} +1 -1
- zenml/zen_server/dashboard/assets/page-kalpiPZz.js +6 -0
- zenml/zen_server/dashboard/assets/{persist-xsYgVtR1.js → persist-ChKZVcn3.js} +1 -1
- zenml/zen_server/dashboard/assets/{persist-mEZN_fgH.js → persist-DodaLO0k.js} +1 -1
- zenml/zen_server/dashboard/assets/{sharedSchema-BfZcy7aP.js → sharedSchema-BvRWAv-c.js} +1 -1
- zenml/zen_server/dashboard/assets/{stack-detail-query-CU4egfhp.js → stack-detail-query-C9XwNP1E.js} +1 -1
- zenml/zen_server/dashboard/assets/tick-circle-m-hJG8i9.js +1 -0
- zenml/zen_server/dashboard/assets/{update-server-settings-mutation-DNqmQXDM.js → update-server-settings-mutation-DJDefwqW.js} +1 -1
- zenml/zen_server/dashboard/assets/{url-DwbuKk1b.js → url-DdWrpIhi.js} +1 -1
- zenml/zen_server/dashboard/index.html +4 -4
- zenml/zen_server/dashboard_legacy/asset-manifest.json +4 -4
- zenml/zen_server/dashboard_legacy/index.html +1 -1
- zenml/zen_server/dashboard_legacy/{precache-manifest.290b95d5b43efa3368b3dc63d20c4782.js → precache-manifest.4f9db97de1b48fd5944e8a766c1300fe.js} +4 -4
- zenml/zen_server/dashboard_legacy/service-worker.js +1 -1
- zenml/zen_server/dashboard_legacy/static/js/{main.840d1bf0.chunk.js → main.0fdd4aad.chunk.js} +2 -2
- zenml/zen_server/dashboard_legacy/static/js/{main.840d1bf0.chunk.js.map → main.0fdd4aad.chunk.js.map} +1 -1
- {zenml_nightly-0.66.0.dev20240925.dist-info → zenml_nightly-0.66.0.dev20240926.dist-info}/METADATA +1 -1
- {zenml_nightly-0.66.0.dev20240925.dist-info → zenml_nightly-0.66.0.dev20240926.dist-info}/RECORD +92 -85
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-BXeSvmMY.js +0 -1
- zenml/zen_server/dashboard/assets/EditSecretDialog-Du423_3U.js +0 -1
- zenml/zen_server/dashboard/assets/Infobox-BL9NOS37.js +0 -1
- zenml/zen_server/dashboard/assets/UsageReason-CCnzmwS8.js +0 -1
- zenml/zen_server/dashboard/assets/index-6DYjZgDn.css +0 -1
- zenml/zen_server/dashboard/assets/page-BFuJICXM.js +0 -9
- zenml/zen_server/dashboard/assets/page-CLiRGfWo.js +0 -1
- zenml/zen_server/dashboard/assets/page-CV44mQn9.js +0 -1
- zenml/zen_server/dashboard/assets/page-DI-qTWrm.js +0 -1
- zenml/zen_server/dashboard/assets/page-Dt8VgzbE.js +0 -1
- zenml/zen_server/dashboard/assets/page-oSqx9dkH.js +0 -1
- zenml/zen_server/dashboard/assets/page-p3GqEAUW.js +0 -1
- zenml/zen_server/dashboard/assets/page-qvcUVPE-.js +0 -1
- {zenml_nightly-0.66.0.dev20240925.dist-info → zenml_nightly-0.66.0.dev20240926.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.66.0.dev20240925.dist-info → zenml_nightly-0.66.0.dev20240926.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.66.0.dev20240925.dist-info → zenml_nightly-0.66.0.dev20240926.dist-info}/entry_points.txt +0 -0
@@ -1 +0,0 @@
|
|
1
|
-
import{r as x,j as e}from"./@radix-DnFH_oo1.js";import{l as v,m as D,k as b,F as k,ae as Q,af as $,f as h,ag as C,ah as E,ai as T,i as z,I as j,al as F,am as P,an as K,n as H,D as U,x as G,y as J,aq as W,z as f,ar as X,M as Y,S as w,U as Z,B as ee}from"./index-B9wVwe7u.js";import{S as se,P as te}from"./SearchField-W3GXpLlI.js";import{S as ae,s as re,E as ne,a as ie}from"./EditSecretDialog-Du423_3U.js";import{b as O,c as A,a as N}from"./@tanstack-QbMbTrh5.js";import{w as ce}from"./index-DFi8BroH.js";import{S as le}from"./plus-Bc8eLSDM.js";import{S as V}from"./trash-DUWZWzse.js";import{t as oe}from"./zod-uFd1wBcd.js";import{u as de,a as me,C as g}from"./index.esm-BE1uqCX5.js";import{S as ue}from"./Lock-CmIn0szs.js";import{C as xe}from"./CopyButton-BqE_-PHO.js";import{D as he}from"./DisplayDate-DkCy54Bp.js";import{I as pe}from"./InlineAvatar-Ds2ZFHPc.js";import{S as fe}from"./dots-horizontal-C6K59vUm.js";import{D as S,S as je}from"./DialogItem-Cz1VLRwa.js";import{c as ge,b as ye}from"./@react-router-APVeuk-U.js";import"./@reactflow-B6kq9fJZ.js";import"./chevron-right-double-c9H46Kl8.js";import"./url-DwbuKk1b.js";import"./index-5GJ5ysEZ.js";import"./copy-CaGlDsUy.js";async function we(a){const t=v(D.secrets.add(a.workspace)),s=await b(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!s.ok){const r=await s.json().then(n=>n.detail).catch(()=>"Failed to create Secret");throw new k({status:s.status,statusText:s.statusText,message:r})}return s.json()}function Ne(a){return O({mutationFn:async t=>we(t),...a})}function Se({id:a,workspace:t}){const[s,r]=x.useState(!1);return e.jsxs(Q,{open:s,onOpenChange:r,children:[e.jsx($,{asChild:!0,children:e.jsx(h,{className:"shrink-0",intent:"primary",children:"Add secret"})}),e.jsxs(C,{className:"mx-auto w-[90vw] max-w-[744px]",children:[e.jsx(E,{children:e.jsx(T,{children:"Register New Secret"})}),e.jsx(ve,{userId:a,setOpen:r,workspaceId:t.id})]})]})}function ve({userId:a,setOpen:t,workspaceId:s}){const{handleSubmit:r,control:n,watch:c,setValue:i,formState:{isValid:u},reset:p}=de({resolver:oe(re),defaultValues:{secretName:"",keysValues:[{key:"",value:""}]}}),{fields:m,append:I,remove:q}=me({control:n,name:"keysValues"}),{toast:L}=z(),M=A(),{mutate:R}=Ne({onError(l){K(l)&&L({status:"error",emphasis:"subtle",description:l.message,rounded:!0})},onSuccess(){M.invalidateQueries({queryKey:["secrets"]}),t(!1),p()}}),_=l=>{R({user:a,workspace:s,name:l.secretName,scope:"workspace",values:l.keysValues.reduce((o,d)=>(d.key&&d.value&&(o[d.key]=d.value),o),{})})},B=l=>{_(l)};return e.jsxs(e.Fragment,{children:[e.jsx("form",{id:"create-secret-form",className:"gap-5 p-5",onSubmit:r(B),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,o)=>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.${o}.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.${o}.value`,control:n,render:({field:d})=>e.jsx(j,{...d,className:"mb-2 w-full pr-10",required:!0,placeholder:"•••••••••",type:c(`keysValues.${o}.showPassword`)?"text":"password"})}),e.jsx("div",{onClick:()=>{const d=c(`keysValues.${o}.showPassword`);i(`keysValues.${o}.showPassword`,!d)},className:"absolute inset-y-1 right-0 flex cursor-pointer items-center pb-1 pr-3",children:e.jsx(ae,{className:"h-4 w-4 flex-shrink-0 cursor-pointer"})})]})}),e.jsxs("div",{className:"flex items-center",children:[o===m.length-1&&e.jsx(h,{intent:"primary",emphasis:"subtle",onClick:()=>I({key:"",value:""}),className:"mb-2 flex h-7 w-7 items-center justify-center",children:e.jsx(le,{className:"flex-shrink-0 fill-primary-600"})}),o!==m.length-1&&e.jsx(h,{intent:"secondary",emphasis:"minimal",onClick:()=>q(o),className:"mb-2 h-7 w-7 items-center justify-center",children:e.jsx(V,{className:"flex-shrink-0 fill-theme-text-secondary"})})]})]},l.id))]})}),e.jsxs(F,{className:"gap-[10px]",children:[e.jsx(P,{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(a){const t=v(D.secrets.detail(a)),s=await b(t,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(s.status===404&&H(),!s.ok)throw new k({message:"Error deleting secret",status:s.status,statusText:s.statusText});return s.json()}function be(a){return O({mutationFn:async t=>De(t),...a})}function ke({secretId:a}){const t=A(),{mutate:s}=be({onSuccess(){t.invalidateQueries({queryKey:["secrets"]})}}),[r,n]=x.useState("");function c(){s(a)}function i(u){n(u.target.value)}return e.jsxs(C,{children:[e.jsx(E,{children:e.jsx(T,{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:i,className:"w-full",required:!0,value:r})]}),e.jsxs(F,{className:"gap-[10px]",children:[e.jsx(P,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{intent:"danger",type:"submit",form:"edit-secret-form",onClick:c,disabled:r!=="DELETE",children:"Delete"})]})]})}function Ce({secretId:a}){const[t,s]=x.useState(!1),[r,n]=x.useState(!1),c=x.useRef(null),i=x.useRef(null);function u(){i.current=c.current}function p(m){if(m===!1){s(!1),setTimeout(()=>{n(m)},200);return}n(m)}return e.jsxs(U,{onOpenChange:s,open:t,children:[e.jsx(G,{ref:c,children:e.jsx(fe,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsxs(J,{hidden:r,onCloseAutoFocus:m=>{i.current&&(i.current.focus(),i.current=null,m.preventDefault())},align:"end",sideOffset:7,children:[e.jsx(S,{onSelect:u,onOpenChange:p,triggerChildren:"Edit ",icon:e.jsx(je,{}),children:e.jsx(ne,{secretId:a,isSecretNameEditable:!0,dialogTitle:"Edit secret"})}),e.jsx(S,{onSelect:u,onOpenChange:p,triggerChildren:"Delete ",icon:e.jsx(V,{}),children:e.jsx(ke,{secretId:a})})]})]})}function Ee(a){return[{id:"secret",header:"Secret",accessorFn:t=>t.name,cell:({getValue:t,row:s})=>e.jsxs("div",{className:"flex cursor-pointer items-center space-x-2",children:[e.jsx(ue,{className:"h-4 w-4 flex-shrink-0 cursor-pointer fill-primary-400"}),e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"group/copybutton flex flex-row items-center gap-0.5 space-x-1",children:[e.jsx("span",{className:" text-text-md font-semibold text-theme-text-primary",onClick:()=>a(`/settings/secrets/${s.original.id}`),children:t()}),e.jsx(xe,{copyText:t()})]}),e.jsxs("span",{className:"text-sm text-gray-500",children:[" ",s.original.id.slice(0,8)]})]})]})},{id:"author",header:"Author",accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.user},cell:({getValue:t})=>{const s=t();return e.jsx(e.Fragment,{children:e.jsx(pe,{username:W(s)})})}},{id:"created_at",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(he,{dateString:t()})})},{id:"admin_actions",header:"",accessorFn:t=>String(t.id),cell:({row:t,getValue:s})=>{var n,c,i;const r=s();return(i=(c=(n=t.original.body)==null?void 0:n.user)==null?void 0:c.body)!=null&&i.is_admin?e.jsx(Ce,{secretId:r}):e.jsx("p",{className:"text-sm text-theme-text-secondary",children:"No Actions"})}}]}const y=1,Te=f.object({page:f.coerce.number().min(y).optional().default(y).catch(y),name:f.string().optional(),operator:f.enum(["and","or"]).optional()});function Fe(){const[a]=ge(),{page:t,name:s,operator:r}=Te.parse({page:a.get("page")||void 0,name:a.get("name")||void 0,operator:a.get("operator")||void 0});return{page:t,name:s,logical_operator:r}}function Pe(){const a=ye(),t=Fe(),{data:s}=N({...ie.secretList({...t,sort_by:"desc:created"}),throwOnError:!0}),{data:r}=X(),n=(r==null?void 0:r.id)||"",{data:c,isLoading:i,isError:u,isSuccess:p}=N({...ce.workspaceDetail("default")});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsx(se,{searchParams:t}),i?e.jsx("div",{children:"Loading..."}):u?e.jsx("div",{children:"Error loading workspace details."}):p&&e.jsx(Se,{id:n,workspace:c})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:s?e.jsx(Y,{columns:Ee(a),data:s.items}):e.jsx(w,{className:"h-[250px] w-full"})}),s?s.total_pages>1&&e.jsx(te,{searchParams:t,paginate:s}):e.jsx(w,{className:"h-[36px] w-[300px]"})]})]})}function es(){const{setCurrentBreadcrumbData:a}=Z();return x.useEffect(()=>{a({segment:"secrets",data:null})},[]),e.jsxs(ee,{className:"space-y-4 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Secrets"}),e.jsxs("div",{className:"flex flex-row space-x-2",children:[e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Configure and manage your pipeline secrets and configurations."}),e.jsx("a",{href:"https://docs.zenml.io/how-to/interact-with-secrets",className:"text-text-md text-primary-400",children:"Learn More"})]}),e.jsx(Pe,{})]})}export{es as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as d,j as e,aw as N,ax as B,ay as V,az as Z}from"./@radix-DnFH_oo1.js";import{l as q,m as H,k as G,n as K,F as J,ae as X,af as W,ag as Y,ah as ee,ai as te,a6 as x,aC as se,z as l,T as re,G as ae,H as ne,a0 as oe,J as ie,I as E,Z as ce,f as k,aB as le,r as O,i as de,j as me,X as pe}from"./index-B9wVwe7u.js";import{b as m,C as ue,u as he,F as xe}from"./index.esm-BE1uqCX5.js";import{i as fe,h as ge,j as je,a as ke,c as ye}from"./@tanstack-QbMbTrh5.js";import{o as be,s as ve}from"./url-DwbuKk1b.js";import{d as Ne}from"./index-5GJ5ysEZ.js";import{R as we,a as Se,u as Ce}from"./create-stack-B2x2d4r1.js";import{C as Le}from"./CodeSnippet-DNWdQmbo.js";import{a as _e,C as P,s as Te}from"./sharedSchema-BfZcy7aP.js";import{D as ze}from"./DisplayDate-DkCy54Bp.js";import{I as Fe}from"./InlineAvatar-Ds2ZFHPc.js";import{S as Me}from"./check-circle-DOoS4yhF.js";import{L as Ie,b as Ae}from"./@react-router-APVeuk-U.js";import{w as De}from"./index-DFi8BroH.js";import{t as $e}from"./zod-uFd1wBcd.js";import"./@reactflow-B6kq9fJZ.js";import"./copy-CaGlDsUy.js";import"./stack-detail-query-CU4egfhp.js";import"./layout-Dru15_XR.js";import"./rocket-SESCGQXm.js";async function Ee(t){const s=q(H.components.all)+(t?`?${be(t)}`:""),r=await G(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(r.status===404&&K(),!r.ok){const n=await r.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Error while fetching stack components");throw new J({status:r.status,statusText:r.statusText,message:n})}return r.json()}const R={all:["components"],componentListInfinite:t=>fe({queryKey:[...R.all,t],queryFn:async({pageParam:s})=>Ee({...t,page:s}),getNextPageParam:s=>s.index<s.total_pages?s.index+1:null,initialPageParam:1})},Q=d.forwardRef(({closeModal:t,type:s,children:r,...n},o)=>e.jsxs(X,{children:[e.jsx(W,{asChild:!0,children:r}),e.jsxs(Y,{className:"max-w-2xl",...n,ref:o,children:[e.jsx(ee,{children:e.jsx(te,{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(Le,{codeClasses:"whitespace-pre-wrap",wrap:!0,code:`zenml ${se(s)} register ${s.toUpperCase()}_NAME --flavor=${s.toUpperCase()}_FLAVOR [--${s.toUpperCase()}_OPTIONS]`})]})})]})]}));Q.displayName="UpdateStackDialog";const b=["orchestrator","artifact_store","container_registry","step_operator","model_deployer","feature_store","experiment_tracker","alerter","annotator","data_validator","image_builder","model_registry"],y=l.object({id:l.string().trim().min(1),name:l.string().trim().min(1),logoUrl:l.string().trim().min(1)}),Oe=b.reduce((t,s)=>(t[s]=y.nullable(),t),{}),Pe=l.object({stackName:_e,components:l.object({...Oe,orchestrator:y,artifact_store:y})}),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"},F={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 "},M={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"},A={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"},D={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 Re({type:t}){const{description:s,link:r}=Qe(t);return e.jsx(re,{children:e.jsxs(ae,{delayDuration:200,children:[e.jsxs(ne,{children:[e.jsx(oe,{className:"h-4 w-4 shrink-0 fill-theme-text-tertiary"}),e.jsxs("div",{className:"sr-only",children:["Info for ",t]})]}),e.jsxs(ie,{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 Qe(t){switch(t){case"orchestrator":return{description:w.description,link:w.helpLink};case"alerter":return{description:F.description,link:F.helpLink};case"annotator":return{description:M.description,link:M.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:A.description,link:A.helpLink};case"model_deployer":return{description:_.description,link:_.helpLink};case"model_registry":return{description:D.description,link:D.helpLink};case"step_operator":return{description:L.description,link:L.helpLink}}}function Ue(){return e.jsxs(e.Fragment,{children:[b.map(t=>e.jsx(N,{className:"h-full space-y-5 p-5",value:t,children:e.jsx(Ze,{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 Be({type:t,search:s}){const r=ge({...R.componentListInfinite({sort_by:"desc:updated",type:t,...s?{name:`contains:${s}`}:{}})}),{control:n,watch:o,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(ce,{})}):e.jsxs("div",{className:"space-y-1",children:[e.jsx("ul",{className:"space-y-1",children:r.data.pages.map(i=>i.items.map(a=>e.jsx("li",{children:e.jsx(ue,{name:`components.${t}.id`,control:n,render:({field:{onChange:g,...j}})=>{var p,u,f,h;return e.jsxs(we,{className:"justify-between bg-theme-surface-primary font-medium","data-state":o(`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(Se,{...j,id:a.id,type:"radio",value:a.id,onChange:U=>{var v;c(`components.${t}.name`,a.name),c(`components.${t}.logoUrl`,((v=a.body)==null?void 0:v.logo_url)||""),g(U)},checked:o(`components.${t}.id`)===a.id,name:t}),e.jsx("img",{alt:"flavor icon",src:ve(((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(Fe,{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(ze,{short:!0,dateString:a.body.updated})})]})]})}})},a.id)))}),e.jsx(He,{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 Ve({type:t}){return e.jsxs("section",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(P,{className:"h-5 w-5 fill-primary-400",type:t}),e.jsx("h2",{className:"text-text-lg font-semibold",children:x(t)}),e.jsx(Re,{type:t})]}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Select a existing ",le(t)," from your server:"]})]})}function Ze({type:t}){const[s,r]=d.useState("");return e.jsxs(e.Fragment,{children:[e.jsx(Ve,{type:t}),e.jsx(qe,{search:s,setSearch:r}),e.jsx(Be,{search:s,type:t})]})}function qe({setSearch:t,search:s}){const[r,n]=d.useState(s),o=d.useCallback(Ne(t,500),[]);d.useEffect(()=>()=>{o.cancel()},[o]);function c(i){n(i),o(i)}return e.jsx(E,{value:r,onChange:i=>c(i.target.value),placeholder:"Search..."})}function He({type:t}){return e.jsx(Q,{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 Ge({type:t}){const{watch:s,formState:{errors:r}}=m(),n=s(`components.${t}`),o=n&&n.id;return e.jsx("div",{"data-error":!o&&r.components&&r.components[t]?"true":"false","data-filled":o?"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:o?e.jsx(Ke,{type:t}):e.jsx(Je,{type:t})})}function Ke({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 Je({type:t}){return e.jsxs(e.Fragment,{children:[e.jsx(P,{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 Xe(){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(et,{}),e.jsx(We,{})]}),e.jsx(Ye,{})]})}function We(){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(B,{children:e.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-4",children:b.map(r=>e.jsxs("div",{className:"relative",children:[e.jsx(V,{className:"group/trigger w-full",value:r,children:e.jsx(Ge,{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(Me,{className:"h-5 w-5 shrink-0 fill-success-400"})})]},r))})})]})}function Ye(){const{formState:{isSubmitting:t}}=m(),s=!!je();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(Ie,{to:O.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 et(){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(E,{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 tt(){const t=ke({...De.workspaceDetail("default")}),{toast:s}=de(),r=Ae(),n=ye(),o=Ce({onSuccess:async()=>{n.invalidateQueries({queryKey:Te.all}),r(O.stacks.overview)},onError:a=>{s({status:"error",emphasis:"subtle",icon:e.jsx(me,{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};o.mutate({workspaceId:((p=t.data)==null?void 0:p.id)||"",payload:j})}const i=he({resolver:$e(Pe),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:i}}function vt(){const[t,s]=d.useState(""),{createManualStack:r,form:n}=tt();return e.jsx(xe,{...n,children:e.jsx(Z,{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(Xe,{})}),e.jsx($,{children:e.jsx(Ue,{})})]})})})}function $({className:t,...s}){return e.jsx("div",{className:pe("w-full overflow-y-auto xl:w-1/2",t),...s})}export{vt as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as t,j as e}from"./@radix-DnFH_oo1.js";import{S as I}from"./code-browser-BJYErIjr.js";import{H as x}from"./help-CwN931fX.js";import{B as T,X as B,aH as R,c as V,S,ad as E,r as d,T as a,G as l,H as n,a0 as m,J as c,aI as P}from"./index-B9wVwe7u.js";import{c as z,L as h}from"./@react-router-APVeuk-U.js";import{C as L}from"./ProviderIcon-BOQJgapd.js";import{S as F}from"./layout-Dru15_XR.js";import"./@tanstack-QbMbTrh5.js";import"./@reactflow-B6kq9fJZ.js";import"./gcp-Dj6ntk0L.js";const _=s=>t.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.56811 2C4.57873 2 4.58936 2.00001 4.60001 2.00001H5.40001C5.41065 2.00001 5.42128 2 5.4319 2C5.68429 1.99997 5.93008 1.99994 6.13824 2.01695C6.36683 2.03563 6.63656 2.07969 6.90799 2.21799C7.28431 2.40974 7.59027 2.7157 7.78202 3.09202C7.92032 3.36345 7.96438 3.63318 7.98306 3.86178C7.98669 3.90624 7.98955 3.95241 7.99179 4.00001L16.0082 4.00001C16.0105 3.95241 16.0133 3.90624 16.0169 3.86178C16.0356 3.63318 16.0797 3.36345 16.218 3.09202C16.4097 2.7157 16.7157 2.40974 17.092 2.21799C17.3634 2.07969 17.6332 2.03563 17.8618 2.01695C18.0699 1.99994 18.3157 1.99997 18.5681 2H19.4319C19.6843 1.99997 19.9301 1.99994 20.1382 2.01695C20.3668 2.03563 20.6366 2.07969 20.908 2.21799C21.2843 2.40974 21.5903 2.7157 21.782 3.09202C21.9203 3.36345 21.9644 3.63318 21.9831 3.86178C22.0001 4.06993 22 4.31571 22 4.56809V5.43192C22 5.6843 22.0001 5.93008 21.9831 6.13824C21.9644 6.36683 21.9203 6.63656 21.782 6.90799C21.5903 7.28431 21.2843 7.59027 20.908 7.78202C20.6366 7.92032 20.3668 7.96438 20.1382 7.98306C20.0938 7.98669 20.0476 7.98955 20 7.99179V11C20 11.5523 19.5523 12 19 12C18.4477 12 18 11.5523 18 11V7.99179C17.9524 7.98955 17.9062 7.98669 17.8618 7.98306C17.6332 7.96438 17.3634 7.92032 17.092 7.78202C16.7157 7.59027 16.4097 7.28431 16.218 6.90799C16.0797 6.63656 16.0356 6.36683 16.0169 6.13824C16.0133 6.09377 16.0105 6.0476 16.0082 6.00001L7.99179 6.00001C7.98955 6.0476 7.98669 6.09377 7.98306 6.13824C7.96438 6.36683 7.92032 6.63656 7.78202 6.90799C7.59027 7.28431 7.28431 7.59027 6.90799 7.78202C6.63656 7.92032 6.36683 7.96438 6.13824 7.98306C6.09377 7.98669 6.0476 7.98955 6.00001 7.99179V16.0082C6.0476 16.0105 6.09377 16.0133 6.13824 16.0169C6.36683 16.0356 6.63656 16.0797 6.90799 16.218C7.28431 16.4097 7.59027 16.7157 7.78202 17.092C7.92032 17.3634 7.96438 17.6332 7.98306 17.8618C7.98669 17.9062 7.98955 17.9524 7.99179 18H11C11.5523 18 12 18.4477 12 19C12 19.5523 11.5523 20 11 20H7.99179C7.98955 20.0476 7.98669 20.0938 7.98306 20.1382C7.96438 20.3668 7.92032 20.6366 7.78202 20.908C7.59027 21.2843 7.28431 21.5903 6.90799 21.782C6.63656 21.9203 6.36683 21.9644 6.13824 21.9831C5.93008 22.0001 5.6843 22 5.43192 22H4.56809C4.31571 22 4.06993 22.0001 3.86178 21.9831C3.63318 21.9644 3.36345 21.9203 3.09202 21.782C2.7157 21.5903 2.40974 21.2843 2.21799 20.908C2.07969 20.6366 2.03563 20.3668 2.01695 20.1382C1.99994 19.9301 1.99997 19.6843 2 19.4319V18.5681C1.99997 18.3157 1.99994 18.0699 2.01695 17.8618C2.03563 17.6332 2.07969 17.3634 2.21799 17.092C2.40974 16.7157 2.7157 16.4097 3.09202 16.218C3.36345 16.0797 3.63318 16.0356 3.86178 16.0169C3.90624 16.0133 3.95241 16.0105 4.00001 16.0082V7.99179C3.95241 7.98955 3.90624 7.98669 3.86178 7.98306C3.63318 7.96438 3.36345 7.92032 3.09202 7.78202C2.7157 7.59027 2.40974 7.28431 2.21799 6.90799C2.07969 6.63656 2.03563 6.36683 2.01695 6.13824C1.99994 5.93008 1.99997 5.68429 2 5.4319C2 5.42128 2.00001 5.41065 2.00001 5.40001V4.60001C2.00001 4.58936 2 4.57873 2 4.56811C1.99997 4.31572 1.99994 4.06993 2.01695 3.86178C2.03563 3.63318 2.07969 3.36345 2.21799 3.09202C2.40974 2.7157 2.7157 2.40974 3.09202 2.21799C3.36345 2.07969 3.63318 2.03563 3.86178 2.01695C4.06993 1.99994 4.31572 1.99997 4.56811 2ZM5.40001 6.00001C5.69653 6.00001 5.85879 5.99923 5.97537 5.9897C5.98001 5.98932 5.98441 5.98894 5.98856 5.98856C5.98894 5.98441 5.98932 5.98001 5.9897 5.97537C5.99923 5.85879 6.00001 5.69653 6.00001 5.40001V4.60001C6.00001 4.30348 5.99923 4.14122 5.9897 4.02464C5.98932 4.02 5.98894 4.0156 5.98856 4.01145C5.98441 4.01107 5.98001 4.01069 5.97537 4.01031C5.85879 4.00078 5.69653 4.00001 5.40001 4.00001H4.60001C4.30348 4.00001 4.14122 4.00078 4.02464 4.01031C4.02 4.01069 4.0156 4.01107 4.01145 4.01145C4.01107 4.0156 4.01069 4.02 4.01031 4.02464C4.00078 4.14122 4.00001 4.30348 4.00001 4.60001V5.40001C4.00001 5.69653 4.00078 5.85879 4.01031 5.97537C4.01069 5.98001 4.01107 5.98441 4.01145 5.98856C4.0156 5.98894 4.02 5.98932 4.02464 5.9897C4.14122 5.99923 4.30348 6.00001 4.60001 6.00001H5.40001ZM4.60001 18C4.30348 18 4.14122 18.0008 4.02464 18.0103C4.02 18.0107 4.0156 18.0111 4.01145 18.0115C4.01107 18.0156 4.01069 18.02 4.01031 18.0246C4.00078 18.1412 4.00001 18.3035 4.00001 18.6V19.4C4.00001 19.6965 4.00078 19.8588 4.01031 19.9754C4.01069 19.98 4.01107 19.9844 4.01145 19.9885C4.0156 19.9889 4.02 19.9893 4.02464 19.9897C4.14122 19.9992 4.30348 20 4.60001 20H5.40001C5.69653 20 5.85879 19.9992 5.97537 19.9897C5.98001 19.9893 5.98441 19.9889 5.98856 19.9885C5.98894 19.9844 5.98932 19.98 5.9897 19.9754C5.99923 19.8588 6.00001 19.6965 6.00001 19.4V18.6C6.00001 18.3035 5.99923 18.1412 5.9897 18.0246C5.98932 18.02 5.98894 18.0156 5.98856 18.0115C5.98441 18.0111 5.98001 18.0107 5.97537 18.0103C5.85879 18.0008 5.69653 18 5.40001 18H4.60001ZM18 5.40001C18 5.69653 18.0008 5.85879 18.0103 5.97537C18.0107 5.98001 18.0111 5.98441 18.0115 5.98856C18.0156 5.98894 18.02 5.98932 18.0246 5.9897C18.1412 5.99923 18.3035 6.00001 18.6 6.00001H19.4C19.6965 6.00001 19.8588 5.99923 19.9754 5.9897C19.98 5.98932 19.9844 5.98893 19.9886 5.98855C19.9889 5.9844 19.9893 5.98001 19.9897 5.97537C19.9992 5.85879 20 5.69653 20 5.40001V4.60001C20 4.30348 19.9992 4.14122 19.9897 4.02464C19.9893 4.02 19.9889 4.0156 19.9885 4.01145C19.9844 4.01107 19.98 4.01069 19.9754 4.01031C19.8588 4.00078 19.6965 4.00001 19.4 4.00001H18.6C18.3035 4.00001 18.1412 4.00078 18.0246 4.01031C18.02 4.01069 18.0156 4.01107 18.0115 4.01145C18.0111 4.0156 18.0107 4.02 18.0103 4.02464C18.0008 4.14122 18 4.30348 18 4.60001V5.40001ZM18 14C18.5523 14 19 14.4477 19 15V17H21C21.5523 17 22 17.4477 22 18C22 18.5523 21.5523 19 21 19H19V21C19 21.5523 18.5523 22 18 22C17.4477 22 17 21.5523 17 21V19H15C14.4477 19 14 18.5523 14 18C14 17.4477 14.4477 17 15 17H17V15C17 14.4477 17.4477 14 18 14Z"}));function M(){return e.jsx("div",{className:"group absolute z-20 flex h-full w-full items-center justify-center rounded-md border border-theme-border-moderate bg-white/70",children:e.jsx("div",{className:"hidden rounded-md bg-theme-text-primary px-3 py-2 text-text-xs text-theme-text-negative shadow-lg animate-in fade-in-0 fade-out-0 zoom-in-95 group-hover:block",children:"This option is not available for local deployments"})})}const D=s=>t.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3ZM1 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 12ZM12 5C12.5523 5 13 5.44772 13 6V11.382L16.4472 13.1056C16.9412 13.3526 17.1414 13.9532 16.8944 14.4472C16.6474 14.9412 16.0468 15.1414 15.5528 14.8944L11.5528 12.8944C11.214 12.725 11 12.3788 11 12V6C11 5.44772 11.4477 5 12 5Z"})),U=s=>t.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},t.createElement("path",{d:"M15.1636 8.68344V14.9934L20.644 11.8401V5.52344L15.1636 8.68344Z",fill:"#4040B2"}),t.createElement("path",{d:"M9.08185 5.52344L14.5622 8.68344V14.9934L9.08185 11.8368V5.52344Z",fill:"#5C4EE5"}),t.createElement("path",{d:"M3 2V8.31333L8.48033 11.47V5.15667L3 2ZM9.08183 18.8433L14.5622 22V15.6867L9.08183 12.53V18.8433Z",fill:"#5C4EE5"})),$=s=>t.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.5 4C7.84315 4 6.5 5.34315 6.5 7C6.5 8.65685 7.84315 10 9.5 10C11.1569 10 12.5 8.65685 12.5 7C12.5 5.34315 11.1569 4 9.5 4ZM4.5 7C4.5 4.23858 6.73858 2 9.5 2C12.2614 2 14.5 4.23858 14.5 7C14.5 9.76142 12.2614 12 9.5 12C6.73858 12 4.5 9.76142 4.5 7ZM14.5731 2.91554C14.7803 2.40361 15.3633 2.1566 15.8752 2.36382C17.7058 3.10481 19 4.90006 19 7C19 9.09994 17.7058 10.8952 15.8752 11.6362C15.3633 11.8434 14.7803 11.5964 14.5731 11.0845C14.3658 10.5725 14.6129 9.98953 15.1248 9.7823C16.2261 9.33652 17 8.25744 17 7C17 5.74256 16.2261 4.66348 15.1248 4.2177C14.6129 4.01047 14.3658 3.42748 14.5731 2.91554ZM7.96448 14H11.0355C11.9373 14 12.6647 14 13.2567 14.0404C13.8654 14.0819 14.4037 14.1695 14.9134 14.3806C16.1386 14.8881 17.1119 15.8614 17.6194 17.0866C17.8305 17.5963 17.9181 18.1346 17.9596 18.7433C18 19.3353 18 20.0627 18 20.9645V21C18 21.5523 17.5523 22 17 22C16.4477 22 16 21.5523 16 21C16 20.0544 15.9995 19.3953 15.9643 18.8794C15.9297 18.3725 15.865 18.0773 15.7716 17.8519C15.4672 17.1169 14.8831 16.5328 14.1481 16.2284C13.9227 16.135 13.6275 16.0703 13.1206 16.0357C12.6047 16.0005 11.9456 16 11 16H8C7.05444 16 6.39534 16.0005 5.87945 16.0357C5.37254 16.0703 5.07733 16.135 4.85195 16.2284C4.11687 16.5328 3.53284 17.1169 3.22836 17.8519C3.135 18.0773 3.07033 18.3725 3.03574 18.8794C3.00054 19.3953 3 20.0544 3 21C3 21.5523 2.55229 22 2 22C1.44772 22 1 21.5523 1 21L1 20.9645C0.999993 20.0627 0.999988 19.3353 1.04038 18.7433C1.08191 18.1346 1.16948 17.5963 1.3806 17.0866C1.88807 15.8614 2.86144 14.8881 4.08658 14.3806C4.59628 14.1695 5.13456 14.0819 5.74331 14.0404C6.33531 14 7.06272 14 7.96448 14ZM18.0316 14.8768C18.1692 14.3419 18.7144 14.0199 19.2493 14.1576C21.4056 14.7126 23 16.6688 23 19V21C23 21.5523 22.5523 22 22 22C21.4477 22 21 21.5523 21 21V19C21 17.6035 20.0449 16.4275 18.7507 16.0945C18.2159 15.9568 17.8939 15.4116 18.0316 14.8768Z"}));function C({children:s,className:r,...i}){return e.jsx(T,{...i,className:B("h-full w-full space-y-1 px-6 py-5",r),children:s})}function u({children:s}){return e.jsx(e.Fragment,{children:s})}function j({children:s}){return e.jsx("div",{className:"space-y-0.5",children:s})}function f({children:s}){return e.jsx("div",{className:"flex items-center gap-1",children:s})}function p({children:s}){return e.jsx("h2",{className:"text-text-lg font-semibold",children:s})}function g({children:s}){return e.jsx("p",{className:"text-theme-text-secondary",children:s})}function y({children:s}){return e.jsx("div",{className:"flex w-full flex-wrap items-start justify-between gap-y-1",children:s})}function v({hasTerraform:s=!1}){return e.jsxs("div",{className:"flex items-center gap-2",children:[s&&e.jsx(U,{className:"h-4 w-4 shrink-0"}),e.jsx(L,{className:"h-4 w-4",provider:"aws"}),e.jsx(L,{className:"h-4 w-4",provider:"gcp"}),e.jsx(L,{className:"h-4 w-4",provider:"azure"})]})}function w({min:s}){return e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx(D,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"}),e.jsxs("p",{className:"text-text-xs text-theme-text-tertiary",children:["Estimated time: ",s," mins"]})]})}function N({flexibility:s,children:r}){return e.jsxs("div",{className:"flex w-full items-center gap-0.5 lg:w-1/3",children:[e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx("span",{className:"text-theme-text-secondary",children:"Flexibility"}),r]}),e.jsx(R,{className:"h-1 flex-1 shrink-0 rounded-rounded",value:s})]})}function k({children:s}){return e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-y-1 text-text-xs",children:s})}function b({recommendataion:s}){return e.jsxs("div",{className:"flex items-center gap-0.5 text-text-xs text-theme-text-success",children:[e.jsx($,{className:"h-3 w-3 shrink-0 fill-theme-text-success"}),e.jsxs("p",{children:["Recommended for ",s]})]})}const H="https://docs.zenml.io/how-to/stack-deployment/deploy-a-cloud-stack";function q(){const{isError:s,isPending:r,data:i}=V();if(r)return e.jsx(S,{className:"h-[200px] w-full"});if(s)return e.jsx("div",{children:"Failed to load server info"});const o=E(i.deployment_type||"other");return e.jsxs("section",{className:"w-full space-y-5",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-text-xl font-semibold",children:"Create New Infrastructure"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Use our smart tools to create a new Cloud infrastructure a quick and simplified way."})]}),e.jsxs("div",{className:"grid w-full grid-cols-1 gap-6 md:grid-cols-2",children:[e.jsx(O,{isLocalDeployment:o}),e.jsx(A,{isLocalDeployment:o})]})]})}function O({isLocalDeployment:s}){const[r]=z(),i=d.stacks.create.newInfra+(r.size>=1?`?${r.toString()}`:"");return e.jsxs("div",{className:"relative",children:[s&&e.jsx(M,{}),e.jsx(h,{to:i,children:e.jsxs(C,{children:[e.jsxs(y,{children:[e.jsx(u,{children:e.jsx(I,{className:"h-6 w-6 fill-primary-400"})}),e.jsx(v,{})]}),e.jsxs(j,{children:[e.jsxs(f,{children:[e.jsx(p,{children:"In-browser Experience"}),e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(m,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{align:"start",side:"bottom",className:"z-50 flex max-w-[480px] flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:"Deploy the necessary pieces of infrastructure on your selected cloud provider and get you started on remote stack with a single click."}),e.jsx("a",{className:"link text-primary-400",target:"_blank",href:H,children:"Learn More"})]})]})})]}),e.jsx(g,{children:"Provision cloud infrastructure via browser UI. No local installs needed. Quick setup for cloud resources."})]}),e.jsx(b,{recommendataion:"data scientists"}),e.jsxs(k,{children:[e.jsx(w,{min:"5"}),e.jsx(N,{flexibility:25,children:e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(x,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{className:"z-50 max-w-[480px] bg-theme-surface-primary text-theme-text-primary",children:[e.jsx("strong",{children:"Low flexibility:"})," Best for straightforward setups with minimal customization."]})]})})})]})]})})]})}function A({isLocalDeployment:s}){const[r]=z(),i=d.stacks.create.terraform+(r.size>=1?`?${r.toString()}`:"");return e.jsxs("div",{className:"relative",children:[s&&e.jsx(M,{}),e.jsx(h,{to:i,children:e.jsxs(C,{className:"flex flex-col justify-between space-y-0",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs(y,{children:[e.jsx(u,{children:e.jsx(_,{className:"h-6 w-6 fill-primary-400"})}),e.jsx(v,{hasTerraform:!0})]}),e.jsxs(j,{children:[e.jsxs(f,{children:[e.jsx(p,{children:"Infrastructure-as-code"}),e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(m,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{align:"start",side:"bottom",className:"z-50 flex max-w-[480px] flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:"Infrastructure-as-code (IaC) refers to using a dynamic codebase to provision and manage infrastructure, rather than deferring to manual processes."}),e.jsx("a",{className:"link text-primary-400",target:"_blank",href:H,children:"Learn More"})]})]})})]}),e.jsx(g,{children:"Use Terraform modules to deploy infrastructure and register it back to ZenML."})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(b,{recommendataion:"infrastructure engineers"}),e.jsxs(k,{children:[e.jsx(w,{min:"3"}),e.jsx(N,{flexibility:75,children:e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(x,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{className:"z-50 max-w-[480px] bg-theme-surface-primary text-theme-text-primary",children:[e.jsx("strong",{children:"High flexibility:"})," Offers extensive customization for advanced users or complex setups."]})]})})})]})]})]})})]})}const Z="https://docs.zenml.io/how-to/stack-deployment/deploy-a-cloud-stack";function G(){const{isError:s,isPending:r,data:i}=V();if(r)return e.jsx(S,{className:"h-[200px] w-full"});if(s)return e.jsx("div",{children:"Failed to load server info"});const o=E(i.deployment_type||"other");return e.jsxs("section",{className:"w-full space-y-5",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-text-xl font-semibold",children:"Connect Existing Infrastructure"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Register your stack and components using existing resources that are already provisioned."})]}),e.jsxs("div",{className:"grid w-full grid-cols-1 gap-6 md:grid-cols-2",children:[e.jsx(Q,{isLocalDeployment:o}),e.jsx(J,{})]})]})}function J(){const[s]=z(),r=d.stacks.create.manual+(s.size>=1?`?${s.toString()}`:"");return e.jsx("div",{className:"relative",children:e.jsx(h,{to:r,children:e.jsxs(C,{children:[e.jsxs(y,{children:[e.jsx(u,{children:e.jsx(F,{className:"h-6 w-6 fill-primary-400"})}),e.jsx(v,{})]}),e.jsxs(j,{children:[e.jsxs(f,{children:[e.jsx(p,{children:"Manual Setup"}),e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(m,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{align:"start",side:"bottom",className:"z-50 flex max-w-[480px] flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:"Customize your ML stack by selecting each component individually through the ZenML interface. Choose from a list of pre-configured components or add new ones tailored to your needs."}),e.jsx("a",{className:"link text-primary-400",target:"_blank",href:Z,children:"Learn More"})]})]})})]}),e.jsx(g,{children:"Register stack and components manually using ZenML. Recommended for advanced or custom configurations."})]}),e.jsx(b,{recommendataion:"advanced users"}),e.jsxs(k,{children:[e.jsx(w,{min:"5-10"}),e.jsx(N,{flexibility:100,children:e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(x,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{className:"z-50 max-w-[480px] bg-theme-surface-primary text-theme-text-primary",children:[e.jsx("strong",{children:"Full flexibility:"})," Complete control and customization. For expert users and highly specialized requirements."]})]})})})]})]})})})}function Q({isLocalDeployment:s}){return e.jsxs("div",{className:"relative",children:[s&&e.jsx(M,{}),e.jsx(h,{to:d.stacks.create.existingInfra,children:e.jsxs(C,{children:[e.jsxs(y,{children:[e.jsx(u,{children:e.jsx(P,{className:"h-6 w-6 fill-primary-400"})}),e.jsx(v,{})]}),e.jsxs(j,{children:[e.jsxs(f,{children:[e.jsx(p,{children:"Scan your Cloud"}),e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(m,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{align:"start",side:"bottom",className:"z-50 flex max-w-[480px] flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:"The stack wizard allows you to browse through your existing infrastructure and use it to register a ZenML cloud stack."}),e.jsx("a",{className:"link text-primary-400",target:"_blank",href:Z,children:"Learn More"})]})]})})]}),e.jsx(g,{children:"Input your credentials and scan existing infrastructure on your cloud provider. Best for users with existing resources."})]}),e.jsx(b,{recommendataion:"infrastructure engineers"}),e.jsxs(k,{children:[e.jsx(w,{min:"5"}),e.jsx(N,{flexibility:50,children:e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(x,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{className:"z-50 max-w-[480px] bg-theme-surface-primary text-theme-text-primary",children:[e.jsx("strong",{children:"Medium flexibility:"})," Balances ease-of-use with some customization options."]})]})})})]})]})})]})}function l1(){return e.jsxs("section",{className:"layout-container space-y-5 py-5",children:[e.jsx(q,{}),e.jsx(G,{})]})}export{l1 as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as i,j as e}from"./@radix-DnFH_oo1.js";import{l as R,m as E,k as ne,n as ae,F as k,z as c,o as re,p as le,q as ie,I as oe,s as ce,t as de,f as p,i as F,v as L,w as _,D as M,x as I,y as z,C as B,E as ue,r as x,T as $,G as q,H as U,J as Z,K as T,L as A,M as H,S as y,B as me,N as pe,O as he,P as xe,e as fe,Q as N,R as je,U as ge,V as be}from"./index-B9wVwe7u.js";import{L as f,c as P,b as Ce}from"./@react-router-APVeuk-U.js";import{S as V}from"./refresh-hfgWPeto.js";import{S as G,P as Q}from"./SearchField-W3GXpLlI.js";import{q as ye,b as K,c as J,a as ve}from"./@tanstack-QbMbTrh5.js";import{o as Pe}from"./url-DwbuKk1b.js";import{S as w}from"./trash-DUWZWzse.js";import{t as we}from"./zod-uFd1wBcd.js";import{u as Ne}from"./index.esm-BE1uqCX5.js";import{C as v}from"./CopyButton-BqE_-PHO.js";import{g as W,E as X,a as De}from"./ExecutionStatus-CIfQTutR.js";import{S as Y}from"./dots-horizontal-C6K59vUm.js";import{A as ee}from"./AlertDialogDropdownItem-BXeSvmMY.js";import{u as Se}from"./all-pipeline-runs-query-BBEe6I9-.js";import{D as Te}from"./DisplayDate-DkCy54Bp.js";import{I as Re}from"./InlineAvatar-Ds2ZFHPc.js";import{I as Ee}from"./Infobox-BL9NOS37.js";import"./@reactflow-B6kq9fJZ.js";import"./chevron-right-double-c9H46Kl8.js";import"./index-5GJ5ysEZ.js";import"./copy-CaGlDsUy.js";import"./check-circle-DOoS4yhF.js";const ke=t=>i.createElement("svg",{viewBox:"0 0 60 60",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},i.createElement("g",{id:"dataflow-02"},i.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 Ae({params:t}){const s=R(E.pipelines.all+"?"+Pe(t)),n=await ne(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(n.status===404&&ae(),!n.ok)throw new k({message:"Error while fetching pipelines",status:n.status,statusText:n.statusText});return n.json()}const O={all:["pipelines"],pipelineList:t=>ye({queryKey:[...O.all,t],queryFn:async()=>Ae({params:t})})},Oe=c.object({delete:c.string()}).refine(t=>t.delete==="DELETE",{message:"Please type DELETE to confirm"}),g=i.forwardRef(({handleDelete:t,title:s},n)=>{const{register:a,handleSubmit:r,formState:{isValid:l}}=Ne({resolver:we(Oe),defaultValues:{delete:""}});return e.jsxs(re,{ref:n,children:[e.jsx(le,{children:e.jsx(ie,{children:s})}),e.jsxs("form",{onSubmit:r(()=>t()),id:"delete-form",className:"space-y-5 p-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Are you sure?"}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"This action cannot be undone."})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"mb-0.5 text-text-sm",children:"Please type DELETE to confirm"}),e.jsx(oe,{onPaste:o=>o.preventDefault(),...a("delete"),className:"w-full"})]})]}),e.jsxs(ce,{className:"gap-[10px]",children:[e.jsx(de,{asChild:!0,children:e.jsx(p,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(p,{form:"delete-form",disabled:!l,intent:"danger",type:"submit",children:"Delete"})]})]})});g.displayName="DeleteAlertContent";async function Fe({pipelineId:t}){const s=R(E.pipelines.detail(t)),n=await fetch(s,{method:"DELETE",credentials:"include",headers:{"Content-Type":"application/json"}});if(!n.ok){const a=await n.json().then(r=>r.detail).catch(()=>`Failed to delete pipeline ${t}`);throw new k({status:n.status,statusText:n.statusText,message:a})}return n.json()}function Le(t){return K({mutationFn:Fe,...t})}const te=i.createContext(null);function _e({children:t}){const[s,n]=i.useState([]),a=J(),{toast:r}=F(),l=Le(),o=async d=>{try{const u=d.map(h=>l.mutateAsync({pipelineId:h}));await Promise.all(u),r({description:"Deleted successfully.",status:"success",emphasis:"subtle",rounded:!0}),await a.invalidateQueries({queryKey:O.all}),n([])}catch(u){console.error("Failed to delete some pipelines:",u)}};return e.jsx(te.Provider,{value:{selectedPipelines:s,setSelectedPipelines:n,bulkDeletePipelines:o},children:t})}function b(){const t=i.useContext(te);if(!t)throw new Error("usePipelinesSelectorContext must be used within a PipelinesSelectorProvider");return t}function Me(){const[t,s]=i.useState(!1),{bulkDeletePipelines:n,selectedPipelines:a}=b();async function r(){await n(a),s(!1)}return e.jsxs(L,{open:t,onOpenChange:s,children:[e.jsx(_,{children:e.jsxs(p,{className:"rounded-sharp border-none bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(w,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(g,{title:`Delete Pipeline${a.length>=2?"s":""}`,handleDelete:r})]})}function Ie(){const{selectedPipelines:t}=b();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:`${t==null?void 0:t.length} Pipeline${(t==null?void 0:t.length)>1?"s":""} selected`}),e.jsx(Me,{})]})}function ze({id:t}){const[s,n]=i.useState(!1),[a,r]=i.useState(!1),l=i.useRef(null),o=i.useRef(null),{bulkDeletePipelines:d}=b();async function u(){await d([t]),j(!1)}function h(){o.current=l.current}function j(m){if(m===!1){r(!1),setTimeout(()=>{n(m)},200);return}n(m)}return e.jsxs(M,{onOpenChange:r,open:a,children:[e.jsx(I,{ref:l,children:e.jsx(Y,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(z,{hidden:s,onCloseAutoFocus:m=>{o.current&&(o.current.focus(),o.current=null,m.preventDefault())},align:"end",sideOffset:7,children:e.jsx(ee,{onSelect:h,open:s,onOpenChange:j,triggerChildren:"Delete",icon:e.jsx(w,{fill:"red"}),children:e.jsx(g,{title:"Delete Pipeline",handleDelete:u})})})]})}const Be=({id:t})=>{const{selectedPipelines:s,setSelectedPipelines:n}=b(),a=(r,l)=>{n(o=>r?[...o,l]:o.filter(d=>d!==l))};return e.jsx(B,{id:t,onCheckedChange:r=>a(r,t),checked:s.includes(t),className:"h-3 w-3"})};function $e(){return[{id:"check",header:"",meta:{width:"1%"},cell:({row:t})=>e.jsx(Be,{id:t.original.id})},{id:"name",header:"Pipeline",cell:({row:t})=>{var s,n,a;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(ue,{className:`h-5 w-5 ${W((s=t.original.body)==null?void 0:s.latest_run_status)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(f,{to:x.pipelines.namespace(encodeURIComponent(t.original.name)),className:"flex items-center gap-1",children:e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:t.original.name})}),e.jsx($,{children:e.jsxs(q,{children:[e.jsx(U,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(X,{status:(n=t.original.body)==null?void 0:n.latest_run_status})}),e.jsx(Z,{className:"z-20 capitalize",children:(a=t.original.body)==null?void 0:a.latest_run_status})]})}),e.jsx(v,{copyText:t.original.name})]}),e.jsxs(f,{to:x.pipelines.namespace(encodeURIComponent(t.original.name)),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:t.original.id.split("-")[0]}),e.jsx(v,{copyText:t.original.id})]})]})]})}},{id:"latest-run",header:"Latest Run",accessorFn:t=>{var s,n;return{status:(s=t.body)==null?void 0:s.latest_run_status,runId:(n=t.body)==null?void 0:n.latest_run_id}},cell:({getValue:t})=>{const{runId:s,status:n}=t();return!s||!n?e.jsx("div",{children:"No run"}):e.jsx(f,{to:x.runs.detail(s),children:e.jsxs(T,{emphasis:"subtle",rounded:!1,className:"inline-flex items-center gap-0.5",color:De(n),children:[e.jsx(A,{className:"h-3 w-3 fill-current"}),s==null?void 0:s.split("-")[0]]})})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:t})=>e.jsx(ze,{id:t.original.id})}]}const D=1,qe=c.object({page:c.coerce.number().min(D).optional().default(D).catch(D),name:c.string().optional(),operator:c.enum(["and","or"]).optional()});function Ue(){const[t]=P(),{page:s,name:n,operator:a}=qe.parse({page:t.get("page")||void 0,name:t.get("name")||void 0,operator:t.get("operator")||void 0});return{page:s,name:n,logical_operator:a}}function Ze(){const t=Ue(),{selectedPipelines:s}=b(),{data:n,refetch:a}=ve({...O.pipelineList({...t,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:[s.length?e.jsx(Ie,{}):e.jsx(G,{searchParams:t}),e.jsx("div",{className:"flex justify-between",children:e.jsxs(p,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>a(),children:[e.jsx(V,{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:n?e.jsx(H,{columns:$e(),data:n.items}):e.jsx(y,{className:"h-[500px] w-full"})}),n?n.total_pages>1&&e.jsx(Q,{searchParams:t,paginate:n}):e.jsx(y,{className:"h-[36px] w-[300px]"})]})]})}async function He({runId:t}){const s=R(E.runs.detail(t)),n=await fetch(s,{method:"DELETE",credentials:"include",headers:{"Content-Type":"application/json"}});if(!n.ok){const a=await n.json().then(r=>r.detail).catch(()=>`Failed to delete run ${t}`);throw new k({status:n.status,statusText:n.statusText,message:a})}return n.json()}function Ve(t){return K({mutationFn:He,...t})}const se=i.createContext(null);function Ge({children:t}){const[s,n]=i.useState([]),a=J(),{toast:r}=F(),l=Ve(),o=async d=>{try{const u=d.map(h=>l.mutateAsync({runId:h}));await Promise.all(u),r({description:"Deleted successfully.",status:"success",emphasis:"subtle",rounded:!0}),await a.invalidateQueries({queryKey:["runs"]}),n([])}catch(u){console.error("Failed to delete some runs:",u)}};return e.jsx(se.Provider,{value:{selectedRuns:s,setSelectedRuns:n,bulkDeleteRuns:o},children:t})}function C(){const t=i.useContext(se);if(!t)throw new Error("useRunsSelectorContext must be used within a RunsSelectorProvider");return t}function Qe(){const[t,s]=i.useState(!1),{bulkDeleteRuns:n,selectedRuns:a}=C();async function r(){await n(a),s(!1)}return e.jsxs(L,{open:t,onOpenChange:s,children:[e.jsx(_,{children:e.jsxs(p,{className:"rounded-sharp border-none bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(w,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(g,{title:`Delete Run${a.length>=2?"s":""}`,handleDelete:r})]})}function Ke(){const{selectedRuns:t}=C();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:`${t==null?void 0:t.length} Run${(t==null?void 0:t.length)>1?"s":""} selected`}),e.jsx(Qe,{})]})}function Je({id:t}){const[s,n]=i.useState(!1),[a,r]=i.useState(!1),l=i.useRef(null),o=i.useRef(null),{bulkDeleteRuns:d}=C();async function u(){await d([t]),j(!1)}function h(){o.current=l.current}function j(m){if(m===!1){r(!1),setTimeout(()=>{n(m)},200);return}n(m)}return e.jsxs(M,{onOpenChange:r,open:a,children:[e.jsx(I,{ref:l,children:e.jsx(Y,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(z,{hidden:s,onCloseAutoFocus:m=>{o.current&&(o.current.focus(),o.current=null,m.preventDefault())},align:"end",sideOffset:7,children:e.jsx(ee,{onSelect:h,open:s,onOpenChange:j,triggerChildren:"Delete",icon:e.jsx(w,{fill:"red"}),children:e.jsx(g,{title:"Delete Run",handleDelete:u})})})]})}const We=({id:t})=>{const{selectedRuns:s,setSelectedRuns:n}=C(),a=(r,l)=>{n(o=>r?[...o,l]:o.filter(d=>d!==l))};return e.jsx(B,{id:t,onCheckedChange:r=>a(r,t),checked:s.includes(t),className:"h-3 w-3"})},Xe=[{id:"check",header:"",meta:{width:"1%"},accessorFn:t=>({id:t.id}),cell:({getValue:t})=>{const{id:s}=t();return e.jsx(We,{id:s})}},{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:n,id:a}=t();return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(A,{className:`h-5 w-5 ${W(n)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(f,{to:x.runs.detail(a),className:"flex items-center gap-1",children:e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:s})}),e.jsx($,{children:e.jsxs(q,{children:[e.jsx(U,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(X,{status:n})}),e.jsx(Z,{className:"z-20 capitalize",children:n})]})}),e.jsx(v,{copyText:s})]}),e.jsxs(f,{to:x.runs.detail(a),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:a.split("-")[0]}),e.jsx(v,{copyText:a})]})]})]})}},{id:"pipeline",header:"Pipeline",accessorFn:t=>{var s,n;return(n=(s=t.body)==null?void 0:s.pipeline)==null?void 0:n.name},cell:({getValue:t})=>{const s=t();return s?e.jsx(f,{to:x.pipelines.namespace(s),children:e.jsx(T,{color:"purple",className:"inline-flex items-center gap-0.5 truncate",rounded:!1,emphasis:"subtle",children:s})}):null}},{id:"stack",header:"Stack",accessorFn:t=>{var s,n,a,r;return{name:(n=(s=t.body)==null?void 0:s.stack)==null?void 0:n.name,id:(r=(a=t.body)==null?void 0:a.stack)==null?void 0:r.id}},cell:({getValue:t})=>{const{name:s,id:n}=t();return!s||!n?null:e.jsx(T,{rounded:!1,className:"inline-block",color:"turquoise",emphasis:"subtle",children:s})}},{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(Te,{dateString:s})}},{id:"author",header:"Author",accessorFn:t=>{var s,n,a,r,l;return{name:((a=(n=(s=t.body)==null?void 0:s.user)==null?void 0:n.body)==null?void 0:a.full_name)||((l=(r=t.body)==null?void 0:r.user)==null?void 0:l.name)}},cell:({getValue:t})=>{const{name:s}=t();return e.jsx(Re,{username:s})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:t})=>e.jsx(Je,{id:t.original.id})}],S=1,Ye=c.object({page:c.coerce.number().min(S).optional().default(S).catch(S),name:c.string().optional(),operator:c.enum(["and","or"]).optional(),status:c.enum(["pending","running","completed"]).optional()});function et(){const[t]=P(),{page:s,name:n,operator:a,status:r}=Ye.parse({page:t.get("page")||void 0,name:t.get("name")||void 0,operator:t.get("operator")||void 0,status:t.get("status")||void 0});return{page:s,name:n,logical_operator:a,status:r}}function tt(){const{selectedRuns:t}=C(),s=et(),{data:n,refetch:a}=Se({params:{...s,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:[t.length?e.jsx(Ke,{}):e.jsx(G,{searchParams:s}),e.jsx("div",{className:"flex justify-between",children:e.jsxs(p,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>a(),children:[e.jsx(V,{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:n?e.jsx(H,{columns:Xe,data:n.items}):e.jsx(y,{className:"h-[500px] w-full"})}),n?n.total_pages>1&&e.jsx(Q,{searchParams:s,paginate:n}):e.jsx(y,{className:"h-[36px] w-[300px]"})]})]})}const st=c.object({tab:c.enum(["pipelines","runs","templates"]).optional().default("pipelines").catch("pipelines")});function nt(){const[t]=P(),{tab:s}=st.parse({tab:t.get("tab")||void 0});return s}const at="/assets/templates-1S_8WeSK.webp";function rt(){return e.jsxs("div",{className:"layout-container space-y-5",children:[e.jsx(lt,{}),e.jsx(ot,{})]})}function lt(){return e.jsx(Ee,{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 it=["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 ot(){return e.jsxs(me,{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:it.map((t,s)=>e.jsx("li",{className:"text-text-md text-theme-text-secondary",children:t},s))}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(p,{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(p,{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:at,alt:"Screenshot of Zenml Pro Templates Feature"})]})}const ct=[{value:"pipelines",label:"Pipelines",icon:ke},{value:"runs",label:"Runs",icon:A},{value:"templates",label:"Templates",icon:je}];function dt(){const[t]=P(),s=nt(),n=Ce();i.useEffect(()=>{if(!t.get("tab")){const l=new URLSearchParams(t);l.set("tab","pipelines"),n(`?${l.toString()}`,{replace:!0})}},[n,t]);function a(r){const l=new URLSearchParams;l.set("tab",r),n(`?${l.toString()}`)}return e.jsx("div",{className:"p-5",children:e.jsxs(pe,{onValueChange:a,value:s,children:[e.jsx(he,{children:ct.map(r=>e.jsxs(xe,{className:"flex items-center gap-2 text-text-md",value:r.value.toLowerCase(),children:[e.jsx(r.icon,{className:`h-5 w-5 ${s===r.value?"fill-primary-400":"fill-theme-text-tertiary"}`}),r.label,r.value==="templates"&&e.jsx(fe,{className:"rounded-sm font-semibold text-primary-500",color:"purple",size:"sm",children:"New"})]},r.value))}),e.jsx(N,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"pipelines",children:e.jsx(_e,{children:e.jsx(Ze,{})})}),e.jsx(N,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"runs",children:e.jsx(Ge,{children:e.jsx(tt,{})})}),e.jsx(N,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"templates",children:e.jsx(rt,{})})]})})}function Ft(){const{setCurrentBreadcrumbData:t}=ge();return i.useEffect(()=>{t({segment:"pipelines",data:null})},[]),e.jsxs("div",{children:[e.jsx(be,{children:e.jsx("h1",{className:"text-display-xs font-semibold",children:"Pipelines"})}),e.jsx(dt,{})]})}export{Ft as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as n,j as e}from"./@radix-DnFH_oo1.js";import{a as h,u as y,S as D,E as v}from"./EditSecretDialog-Du423_3U.js";import{a as f,c as S}from"./@tanstack-QbMbTrh5.js";import{an as b,aA as w,o as E,p as N,q as k,I as g,s as T,t as V,f as p,D as L,x as A,y as K,ae as M,af as O,M as H,U as R,B}from"./index-B9wVwe7u.js";import{S as q}from"./dots-horizontal-C6K59vUm.js";import{S as F}from"./trash-DUWZWzse.js";import{A as I}from"./AlertDialogDropdownItem-BXeSvmMY.js";import{g as Q}from"./@react-router-APVeuk-U.js";import"./plus-Bc8eLSDM.js";import"./url-DwbuKk1b.js";import"./zod-uFd1wBcd.js";import"./index.esm-BE1uqCX5.js";import"./@reactflow-B6kq9fJZ.js";const z=s=>n.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.99995 9C7.99995 5.13401 11.134 2 14.9999 2C18.8659 2 21.9999 5.13401 21.9999 9C21.9999 12.866 18.8659 16 14.9999 16C14.6816 16 14.3677 15.9787 14.0597 15.9373C13.8347 15.907 13.6939 15.8883 13.5912 15.8784C13.5729 15.8766 13.5579 15.8753 13.5458 15.8745C13.5428 15.8771 13.5395 15.8801 13.5359 15.8833C13.4825 15.9321 13.4121 16.0021 13.2862 16.128L11.7071 17.7071C11.5195 17.8946 11.2652 18 10.9999 18H9.99995V19C9.99995 19.5523 9.55223 20 8.99995 20H7.99995V21C7.99995 21.5523 7.55223 22 6.99995 22L4.56803 22C4.31565 22 4.06987 22.0001 3.86172 21.9831C3.63312 21.9644 3.36339 21.9203 3.09197 21.782C2.71564 21.5903 2.40968 21.2843 2.21793 20.908C2.07964 20.6366 2.03557 20.3668 2.01689 20.1382C1.99988 19.9301 1.99991 19.6843 1.99994 19.4319L1.99995 17.6627C1.99995 17.6462 1.9999 17.6291 1.99985 17.6117C1.99935 17.4218 1.99871 17.1827 2.05521 16.9473C2.1042 16.7432 2.18501 16.5482 2.29467 16.3692C2.42112 16.1629 2.59067 15.9942 2.72532 15.8603C2.73768 15.848 2.74975 15.836 2.76147 15.8243L7.87197 10.7138C7.99789 10.5878 8.06789 10.5175 8.1166 10.464C8.11984 10.4604 8.1228 10.4572 8.12549 10.4541C8.12461 10.442 8.12336 10.427 8.12159 10.4087C8.11168 10.3061 8.09292 10.1653 8.06267 9.94028C8.02127 9.63227 7.99995 9.31836 7.99995 9ZM7.99995 18V17C7.99995 16.4477 8.44766 16 8.99995 16H10.5857L11.872 14.7138C11.889 14.6967 11.9065 14.6791 11.9244 14.6611C12.1036 14.4807 12.3216 14.2613 12.5701 14.1224C12.8036 13.9919 12.9981 13.9262 13.2628 13.8884C13.4562 13.8607 13.6445 13.8742 13.7834 13.8876C13.928 13.9016 14.1065 13.9256 14.3084 13.9527L14.3262 13.9551C14.5461 13.9847 14.771 14 14.9999 14C17.7614 14 19.9999 11.7614 19.9999 9C19.9999 6.23858 17.7614 4 14.9999 4C12.2385 4 9.99995 6.23858 9.99995 9C9.99995 9.22899 10.0153 9.45388 10.0448 9.67379L10.0472 9.6916C10.0744 9.89344 10.0984 10.072 10.1123 10.2165C10.1258 10.3555 10.1393 10.5438 10.1116 10.7372C10.0737 11.0019 10.008 11.1964 9.87753 11.4298C9.73863 11.6783 9.5192 11.8963 9.33879 12.0756C9.32083 12.0934 9.30326 12.1109 9.28619 12.128L4.17568 17.2385C4.08305 17.3311 4.03699 17.3775 4.00494 17.4126C4.0041 17.4135 4.0033 17.4144 4.00253 17.4153C4.00247 17.4164 4.00241 17.4176 4.00236 17.4189C4.00019 17.4664 3.99995 17.5317 3.99995 17.6627V19.4C3.99995 19.6965 4.00072 19.8588 4.01025 19.9754C4.01063 19.98 4.01101 19.9844 4.01139 19.9885C4.01554 19.9889 4.01994 19.9893 4.02458 19.9897C4.14117 19.9992 4.30342 20 4.59995 20H5.99995V19C5.99995 18.4477 6.44766 18 6.99995 18H7.99995ZM13.9999 7C13.9999 6.44772 14.4477 6 14.9999 6C15.7662 6 16.5357 6.29309 17.1213 6.87868C17.7068 7.46425 17.9999 8.23372 17.9999 8.99991C18 9.5522 17.5523 9.99993 17 9.99994C16.4477 9.99996 16 9.55226 15.9999 8.99997C15.9999 8.74251 15.9025 8.48834 15.7071 8.29289C15.5116 8.09743 15.2574 8 14.9999 8C14.4477 8 13.9999 7.55229 13.9999 7Z"}));function P({secretId:s,keyName:r}){const{data:t,isLoading:a,isError:c}=f({...h.secretDetail(s)}),u=S(),{mutate:l}=y({onError(o){b(o)&&w({status:"error",emphasis:"subtle",description:o.message,rounded:!0})},onSuccess(){u.invalidateQueries({queryKey:["secrets"]}),u.invalidateQueries({queryKey:["secretDetail",s]})}}),[d,x]=n.useState(""),m=()=>{var o;if(t){const C={...(o=t.body)==null?void 0:o.values};delete C[r];const j={name:t.name,scope:"workspace",values:C};l({id:s,body:j})}};function i(o){x(o.target.value)}return a?e.jsx("div",{children:"Loading..."}):c?e.jsx("div",{children:"Error loading secret details"}):e.jsxs(E,{children:[e.jsx(N,{children:e.jsx(k,{children:"Delete Key"})}),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 key?"}),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(g,{name:"key",onChange:i,className:"w-full",required:!0,value:d})]}),e.jsxs(T,{className:"gap-[10px]",children:[e.jsx(V,{asChild:!0,children:e.jsx(p,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(p,{intent:"danger",type:"button",onClick:m,disabled:d!=="DELETE",children:"Delete"})]})]})}function Z({secretId:s,keyName:r}){const[t,a]=n.useState(!1),[c,u]=n.useState(!1),l=n.useRef(null),d=n.useRef(null);function x(){d.current=l.current}function m(i){if(i===!1){a(!1),setTimeout(()=>{u(i)},200);return}u(i)}return e.jsxs(L,{onOpenChange:a,open:t,children:[e.jsx(A,{ref:l,children:e.jsx(q,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(K,{hidden:c,onCloseAutoFocus:i=>{d.current&&(d.current.focus(),d.current=null,i.preventDefault())},align:"end",sideOffset:7,children:e.jsx(I,{onSelect:x,onOpenChange:m,triggerChildren:"Delete ",icon:e.jsx(F,{}),children:e.jsx(P,{secretId:s,keyName:r})})})]})}const U=({value:s})=>{const[r,t]=n.useState(!1),a=typeof s=="string"?s:"",c="•".repeat(a.length);return e.jsxs("div",{className:"flex items-center gap-2 space-x-2",children:[e.jsx(D,{onClick:()=>t(!r),className:"h-4 w-4 flex-shrink-0 cursor-pointer"}),e.jsx("span",{children:r?a:c})]})};function G(s){return[{id:"key",header:"Key",accessorKey:"key",cell:({row:t})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(z,{className:"h-4 w-4 flex-shrink-0 cursor-pointer"}),e.jsx("div",{className:"flex flex-col",children:e.jsx("div",{className:"flex flex-row space-x-1",children:e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:t.getValue("key")})})})]})},{id:"value",header:"Value",accessorKey:"value",cell:({row:t})=>e.jsx(U,{value:t.getValue("value")})},{id:"actions",header:"",cell:({row:t})=>e.jsx(Z,{secretId:s,keyName:t.getValue("key")})}]}function J({secretId:s}){const[r,t]=n.useState(""),{data:a}=f({...h.secretDetail(s)}),c=n.useMemo(()=>{var l;return a?Object.entries(((l=a.body)==null?void 0:l.values)||[]).map(([d,x])=>{var m,i,o,C;return{id:a.id,name:a.name,key:d,value:x,scope:(m=a.body)==null?void 0:m.scope,created:(i=a.body)==null?void 0:i.created,updated:(o=a.body)==null?void 0:o.updated,user:(C=a.body)==null?void 0:C.user}}):[]},[a]),u=n.useMemo(()=>r?c.filter(l=>l.key.toLowerCase().includes(r.toLowerCase())):c,[r,c]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-2",children:[e.jsx(g,{type:"text",placeholder:"Search by key...",value:r,onChange:l=>t(l.target.value),inputSize:"md"}),e.jsxs(M,{children:[e.jsx(O,{asChild:!0,children:e.jsx(p,{size:"sm",intent:"primary",children:"Edit Keys"})}),e.jsx(v,{secretId:s,isSecretNameEditable:!1,dialogTitle:"Edit keys"})]})]}),e.jsx("div",{className:"w-full",children:a&&e.jsx(H,{columns:G(s),data:u})})]})}function oe(){const{secretId:s}=Q(),{setCurrentBreadcrumbData:r}=R(),{data:t}=f({...h.secretDetail(s||"")});return n.useEffect(()=>{t&&r({segment:"secretsDetail",data:{name:t.name,id:t.id}})},[t]),e.jsx(e.Fragment,{children:e.jsxs(B,{className:"space-y-4 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:t==null?void 0:t.name}),e.jsx("span",{className:"text-sm text-gray-500",children:s==null?void 0:s.slice(0,8)}),e.jsx(J,{secretId:s||""})]})})}export{oe as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as o,j as e}from"./@radix-DnFH_oo1.js";import{l as j,m as C,k as y,n as M,F as b,ae as T,af as F,f as h,ag as E,ah as P,ai as U,aj as k,z as m,i as v,I as O,ak as I,al as R,am as _,an as q,j as D,o as H,q as z,ao as Z,t as B,ap as K,D as Q,x as V,y as L,e as w,aq as G,ar as J,S as f,M as $,B as W}from"./index-B9wVwe7u.js";import{S as X,P as Y}from"./SearchField-W3GXpLlI.js";import{a as ee,b as N,c as A}from"./@tanstack-QbMbTrh5.js";import{o as se}from"./url-DwbuKk1b.js";import{C as te}from"./CodeSnippet-DNWdQmbo.js";import{u as ae}from"./index.esm-BE1uqCX5.js";import{D as re}from"./DisplayDate-DkCy54Bp.js";import{I as ne}from"./InlineAvatar-Ds2ZFHPc.js";import{S as ie}from"./dots-horizontal-C6K59vUm.js";import{A as oe}from"./AlertDialogDropdownItem-BXeSvmMY.js";import{c as le}from"./@react-router-APVeuk-U.js";import"./@reactflow-B6kq9fJZ.js";import"./chevron-right-double-c9H46Kl8.js";import"./index-5GJ5ysEZ.js";import"./copy-CaGlDsUy.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(L,{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:G(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 l,j as s}from"./@radix-DnFH_oo1.js";import{ae as D,af as E,f,ag as k,ah as z,ai as M,i as C,as as P,an as b,j as S,I as o,al as A,am as T,z as a,ar as q,B,S as v,A as L,b as Q,aq as R}from"./index-B9wVwe7u.js";import{c as V}from"./@tanstack-QbMbTrh5.js";import{u as F}from"./index.esm-BE1uqCX5.js";import{t as U}from"./zod-uFd1wBcd.js";import{P as Z}from"./PasswordChecker-DE71J_3F.js";import{u as _}from"./UpdatePasswordSchemas-C6Zb7ASL.js";import{D as K}from"./DisplayDate-DkCy54Bp.js";import"./@react-router-APVeuk-U.js";import"./@reactflow-B6kq9fJZ.js";const O=e=>l.createElement("svg",{viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28 5.5C15.5736 5.5 5.5 15.5736 5.5 28C5.5 40.4264 15.5736 50.5 28 50.5C40.4264 50.5 50.5 40.4264 50.5 28C50.5 15.5736 40.4264 5.5 28 5.5ZM0.5 28C0.5 12.8122 12.8122 0.5 28 0.5C43.1878 0.5 55.5 12.8122 55.5 28C55.5 43.1878 43.1878 55.5 28 55.5C12.8122 55.5 0.5 43.1878 0.5 28ZM41.0178 18.7322C41.9941 19.7085 41.9941 21.2915 41.0178 22.2678L26.0178 37.2678C25.0415 38.2441 23.4585 38.2441 22.4822 37.2678L14.9822 29.7678C14.0059 28.7915 14.0059 27.2085 14.9822 26.2322C15.9585 25.2559 17.5415 25.2559 18.5178 26.2322L24.25 31.9645L37.4822 18.7322C38.4585 17.7559 40.0415 17.7559 41.0178 18.7322Z"}));function H(){const[e,t]=l.useState(!1);return s.jsxs(D,{onOpenChange:()=>{t(!1)},children:[s.jsx(E,{asChild:!0,children:s.jsx(f,{size:"md",className:"shrink-0",intent:"primary",emphasis:"subtle",children:"Change Password"})}),s.jsxs(k,{children:[s.jsx(z,{children:s.jsx(M,{children:" Update Credentials"})}),e?s.jsx(J,{}):s.jsx(G,{setSuccess:t})]})]})}function G({setSuccess:e}){var u;const t=l.useId(),n=l.useId(),d=l.useId(),{toast:x}=C(),{mutate:p,isPending:j}=P({onSuccess(){e(!0)},onError(i){b(i)&&x({status:"error",emphasis:"subtle",icon:s.jsx(S,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:i.message,rounded:!0})}}),{register:c,handleSubmit:m,watch:w,formState:{isValid:N,errors:g}}=F({resolver:U(_),mode:"onChange",criteriaMode:"all"});function y(i){p({old_password:i.oldPassword,password:i.newPassword})}const h=(u=g.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(y),children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:t,className:"text-text-sm",children:"Old Password"}),s.jsx(o,{...c("oldPassword"),type:"password",id:t,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:n,className:"text-text-sm",children:"New Password"}),s.jsx(o,{...c("newPassword"),type:"password",id:n,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:d,className:"text-text-sm",children:"Confirm Password"}),s.jsx(o,{...c("confirmPassword"),type:"password",id:d,className:"w-full"})]})]})}),s.jsx(Z,{val:w("newPassword"),errors:h||[]})]}),s.jsxs(A,{className:"gap-[10px]",children:[s.jsx(T,{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 J(){return s.jsxs("div",{className:"space-y-5 p-7 text-center",children:[s.jsx(O,{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,i;const t=V(),{toast:n}=C(),d=l.useId(),x=l.useId(),p=l.useId(),{isPending:j,mutate:c}=P({onError(r){b(r)&&n({status:"error",emphasis:"subtle",icon:s.jsx(S,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:r.message,rounded:!0})},onSuccess:()=>{t.invalidateQueries({queryKey:["current-user"]}),t.invalidateQueries({queryKey:["users"]}),w(),n({status:"success",emphasis:"subtle",rounded:!0,description:"User updated successfully"})}}),{register:m,reset:w,handleSubmit:N,formState:{isValid:g}}=F({resolver:U(W),defaultValues:{email:void 0,fullName:void 0,username:void 0}});function y(r){const I={...r.fullName&&{full_name:r.fullName},...r.username&&{name:r.username},...r.email&&{email:r.email}};c(I)}return s.jsxs("div",{className:"w-full max-w-[600px]",children:[s.jsx("form",{onSubmit:N(y),children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:d,className:"text-text-sm",children:"Full Name"}),s.jsx(o,{placeholder:(h=e.body)==null?void 0:h.full_name,...m("fullName"),id:d,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||!g,size:"md",intent:"primary",children:"Update"})})]})}),s.jsx(H,{}),s.jsxs("p",{className:"mt-5 text-text-sm text-theme-text-secondary",children:["Created on ",s.jsx(K,{dateString:((i=e.body)==null?void 0:i.created)||""})]})]})}function ns(){const{data:e}=q();return s.jsxs(B,{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(v,{className:"h-[350px] w-full"}),e?s.jsx(L,{size:"xxl",className:"ml-5 h-[140px] w-[140px]",type:"rounded",children:s.jsx(Q,{className:"text-display-lg",size:"xxl",children:R(e)[0]})}):s.jsx(v,{className:"h-[140px] w-[140px] rounded-rounded"})]})]})}export{ns as default};
|
{zenml_nightly-0.66.0.dev20240925.dist-info → zenml_nightly-0.66.0.dev20240926.dist-info}/LICENSE
RENAMED
File without changes
|
{zenml_nightly-0.66.0.dev20240925.dist-info → zenml_nightly-0.66.0.dev20240926.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|