zenml-nightly 0.73.0.dev20250205__py3-none-any.whl → 0.74.0.dev20250207__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/cli/utils.py +42 -53
- zenml/client.py +6 -2
- zenml/models/__init__.py +4 -2
- zenml/models/v2/base/filter.py +34 -11
- zenml/models/v2/base/scoped.py +4 -4
- zenml/models/v2/core/artifact.py +3 -3
- zenml/models/v2/core/artifact_version.py +22 -5
- zenml/models/v2/core/model.py +13 -3
- zenml/models/v2/core/model_version.py +13 -3
- zenml/models/v2/core/pipeline.py +11 -4
- zenml/models/v2/core/pipeline_run.py +20 -7
- zenml/models/v2/core/run_template.py +13 -3
- zenml/models/v2/core/step_run.py +9 -2
- zenml/pipelines/pipeline_definition.py +28 -12
- zenml/zen_server/dashboard/assets/{404-c8OuXDAT.js → 404-0leSZ7Vv.js} +1 -1
- zenml/zen_server/dashboard/assets/@radix-B7OY3d6N.js +85 -0
- zenml/zen_server/dashboard/assets/{@react-router-B3Z5rLr2.js → @react-router-CiF9laDg.js} +1 -1
- zenml/zen_server/dashboard/assets/@reactflow-DgwdIYyq.js +17 -0
- zenml/zen_server/dashboard/assets/@tanstack-W1pLDzVg.js +22 -0
- zenml/zen_server/dashboard/assets/{AlertDialogDropdownItem-8yPFDxEI.js → AlertDialogDropdownItem-BS4AoVte.js} +1 -1
- zenml/zen_server/dashboard/assets/CodeSnippet-CK2z-88v.js +9 -0
- zenml/zen_server/dashboard/assets/{CollapsibleCard-TiI4lId1.js → CollapsibleCard-BAuAdAje.js} +1 -1
- zenml/zen_server/dashboard/assets/{Commands-BcR2Arie.js → Commands-vjMqENS8.js} +1 -1
- zenml/zen_server/dashboard/assets/{ComponentBadge-BqQNUZgb.js → ComponentBadge-CNIM1NH_.js} +1 -1
- zenml/zen_server/dashboard/assets/{CopyButton-DCiXO3JC.js → CopyButton-BQf5nLgq.js} +1 -1
- zenml/zen_server/dashboard/assets/CsvVizualization-D77lRMYi.js +15 -0
- zenml/zen_server/dashboard/assets/{DeleteAlertDialog-DrPjHtXX.js → DeleteAlertDialog-CcDX1Hm_.js} +1 -1
- zenml/zen_server/dashboard/assets/{DialogItem-BYG7d_M2.js → DialogItem-L8-LNKgK.js} +1 -1
- zenml/zen_server/dashboard/assets/{DisplayDate-CDMUcQHS.js → DisplayDate-CZV8x8pB.js} +1 -1
- zenml/zen_server/dashboard/assets/{EmptyState-BzdlCwp3.js → EmptyState-C8-mkRwm.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-C1zbWr19.js → Error-DPRIglzA.js} +1 -1
- zenml/zen_server/dashboard/assets/{ExecutionStatus-Ct9srgHC.js → ExecutionStatus-DHmX6Vtj.js} +1 -1
- zenml/zen_server/dashboard/assets/{Helpbox-Bm_1Zx9f.js → Helpbox-DWOXAebr.js} +1 -1
- zenml/zen_server/dashboard/assets/{Infobox-OQdkCLSP.js → Infobox-Ls_918eD.js} +1 -1
- zenml/zen_server/dashboard/assets/{InlineAvatar-CQNjKoEQ.js → InlineAvatar-B9O7QxVo.js} +1 -1
- zenml/zen_server/dashboard/assets/{Lock-CYYy18Mm.js → Lock-6WGsAdiw.js} +1 -1
- zenml/zen_server/dashboard/assets/MarkdownVisualization-CPm4B45C.js +14 -0
- zenml/zen_server/dashboard/assets/{NestedCollapsible-DDgd2SGb.js → NestedCollapsible-CyUu7Vrm.js} +1 -1
- zenml/zen_server/dashboard/assets/{NumberBox-Dtp3J6g5.js → NumberBox-CqUodACv.js} +1 -1
- zenml/zen_server/dashboard/assets/{Partials-MD3e95Dk.js → Partials-CP_ZenWO.js} +1 -1
- zenml/zen_server/dashboard/assets/{PasswordChecker-B0nadgh6.js → PasswordChecker-Xh6Egpx9.js} +1 -1
- zenml/zen_server/dashboard/assets/ProBadge-DJCjz8Ox.js +1 -0
- zenml/zen_server/dashboard/assets/{ProCta-W2PEvNow.js → ProCta-BsYjjdUZ.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProviderIcon-DfDUOeAy.js → ProviderIcon-C_XK4oaW.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProviderRadio-B81Elxrc.js → ProviderRadio-C9z7SJnN.js} +1 -1
- zenml/zen_server/dashboard/assets/{RunSelector-DOXgdry5.js → RunSelector-C-YzhiVb.js} +1 -1
- zenml/zen_server/dashboard/assets/{RunsBody-Bnx2fxub.js → RunsBody-CNd_ej8-.js} +1 -1
- zenml/zen_server/dashboard/assets/{SearchField-Yjv-KRW4.js → SearchField-BYL1oNec.js} +1 -1
- zenml/zen_server/dashboard/assets/{SecretTooltip-EKpMlG2f.js → SecretTooltip-CYL2o5Gs.js} +1 -1
- zenml/zen_server/dashboard/assets/{SetPassword-CDLy57PZ.js → SetPassword-BnaLppIC.js} +1 -1
- zenml/zen_server/dashboard/assets/{StackList-DKQaLDo4.js → StackList-6XLpNMwt.js} +1 -1
- zenml/zen_server/dashboard/assets/{Tabs-B5E-o_h6.js → Tabs-BewshUAE.js} +1 -1
- zenml/zen_server/dashboard/assets/{Tick-DSYBiuXU.js → Tick-DHVI3HP0.js} +1 -1
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-HBNOeyoP.js → UpdatePasswordSchemas-CtzucewX.js} +1 -1
- zenml/zen_server/dashboard/assets/{UsageReason-DXtPS5nE.js → UsageReason-Bwhjhrv_.js} +1 -1
- zenml/zen_server/dashboard/assets/{WizardFooter-_1VSMZ_c.js → WizardFooter-CPk11vwc.js} +1 -1
- zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-D0qDLdKB.js → all-pipeline-runs-query-Dh4L44hJ.js} +1 -1
- zenml/zen_server/dashboard/assets/{check-DloQpStc.js → check-BB0dVtdW.js} +1 -1
- zenml/zen_server/dashboard/assets/{check-circle-jNbX5-sR.js → check-circle-ByvKqRS_.js} +1 -1
- zenml/zen_server/dashboard/assets/{chevron-down-6JyMkfjR.js → chevron-down-DAWlSNuH.js} +1 -1
- zenml/zen_server/dashboard/assets/{chevron-right-double-D7ojK9Co.js → chevron-right-double-C5DtVuMS.js} +1 -1
- zenml/zen_server/dashboard/assets/clock-BWL9qBKt.js +1 -0
- zenml/zen_server/dashboard/assets/{code-browser-CUFUIHfp.js → code-browser-C6DP7a-M.js} +1 -1
- zenml/zen_server/dashboard/assets/{copy-C8XQA2Ug.js → copy-DmyMnHSy.js} +1 -1
- zenml/zen_server/dashboard/assets/{create-stack-7JzgAYAm.js → create-stack-BdNm_XEl.js} +1 -1
- zenml/zen_server/dashboard/assets/{delete-run-CUdtYFLl.js → delete-run-CUo7vxbD.js} +1 -1
- zenml/zen_server/dashboard/assets/{docker-BdA9vrnW.js → docker-C2dCztnc.js} +1 -1
- zenml/zen_server/dashboard/assets/{dots-horizontal-otGBOSDJ.js → dots-horizontal-C6QCz7jg.js} +1 -1
- zenml/zen_server/dashboard/assets/{form-schemas-B6PCV3Y4.js → form-schemas-B4cZxcUy.js} +1 -1
- zenml/zen_server/dashboard/assets/{gcp-CFtm4BA7.js → gcp-B1H0QrG5.js} +1 -1
- zenml/zen_server/dashboard/assets/{help-Cc9bBIJH.js → help-CgM5zwtY.js} +1 -1
- zenml/zen_server/dashboard/assets/index-4aOgYud0.js +1 -0
- zenml/zen_server/dashboard/assets/{index-CJ5IfeAl.js → index-6CSA2ij5.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-Ceyzb1yI.js → index-BOeKQ3N4.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-D4yoZ_gH.js → index-Cf1Ph5ra.js} +1 -1
- zenml/zen_server/dashboard/assets/index-D25WcEJJ.js +55 -0
- zenml/zen_server/dashboard/assets/index-apknmtn7.css +1 -0
- zenml/zen_server/dashboard/assets/index.esm-C5jC4e7W.js +1 -0
- zenml/zen_server/dashboard/assets/{key-icon-aH-QIa5R.js → key-icon-DuqxBBkq.js} +1 -1
- zenml/zen_server/dashboard/assets/{kubernetes-B2wmAJ1d.js → kubernetes-Bn54mlK-.js} +1 -1
- zenml/zen_server/dashboard/assets/{layout-BtHBmE4w.js → layout-Cj7MRWSi.js} +1 -1
- zenml/zen_server/dashboard/assets/{link-external-b9AXw_sW.js → link-external-CZxZlXqi.js} +1 -1
- zenml/zen_server/dashboard/assets/{login-mutation-BaeJ7MAg.js → login-mutation-EQPLh5Ne.js} +1 -1
- zenml/zen_server/dashboard/assets/{logs-WMSM52RF.js → logs-DYV_bf7Q.js} +1 -1
- zenml/zen_server/dashboard/assets/{not-found-MGptrNBk.js → not-found-DrxGMGNL.js} +1 -1
- zenml/zen_server/dashboard/assets/{package-C6uypY4h.js → package-MUwoWZFx.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-C37IDa-Q.js → page-9AiMoKly.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-yNh6PQKt.js → page-BF9z97Jf.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-Aeu3v0MQ.js → page-BK6mVOKJ.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-Ox-eC1ik.js → page-BK722dMv.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CbwI6emp.js → page-BNXv13PD.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BmzgDMUV.js +1 -0
- zenml/zen_server/dashboard/assets/{page-Dv5lN2w7.js → page-BrUvz6Ag.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DyAuja95.js → page-Bt_6RgeM.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DKQ3wZgr.js → page-C2IJq-kV.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BhOXn-s9.js → page-C2KxJ-Cc.js} +1 -1
- zenml/zen_server/dashboard/assets/page-C9v0QDj8.js +2 -0
- zenml/zen_server/dashboard/assets/{page-CeNL9JWi.js → page-CHdCb7Xx.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CkPwPmLZ.js → page-CdQ_DdH1.js} +1 -1
- zenml/zen_server/dashboard/assets/page-ChFcVUFX.js +1 -0
- zenml/zen_server/dashboard/assets/{page-BXgXP-Qj.js → page-ChMOMdKd.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BbljjC-k.js → page-ChxtdsVY.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BXrtxEbw.js → page-Cj5NSnW5.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CXPc-HN1.js → page-Cz58X7s5.js} +2 -2
- zenml/zen_server/dashboard/assets/{page-D-KPzeQb.js → page-D-qjN5JP.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-khp8QJ6b.js → page-D1jrbald.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CBiT2Ox9.js → page-DRYjt60M.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BKwwfTNy.js → page-De3oGQ3E.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BaUDR9Ri.js → page-DjO6yHuW.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DzvVg_ZM.js +1 -0
- zenml/zen_server/dashboard/assets/{page-C4JpDeUM.js → page-JZ8WXQfh.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DbW8MfQ4.js → page-VUTBxySs.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CmJU3Gqo.js → page-YhLt4PLe.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CoFVtzhG.js → page-_ijqeiyw.js} +1 -1
- zenml/zen_server/dashboard/assets/page-ezpoc4vG.js +2 -0
- zenml/zen_server/dashboard/assets/{page-CB2_GdBA.js → page-fVsaiQi7.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-Dvbq1BoF.js → page-q2kbm2x8.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BUjw8Tp1.js → page-qw7ivMVQ.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DzrdL2v1.js → page-y8flqx2D.js} +1 -1
- zenml/zen_server/dashboard/assets/{persist-K7AY0ju4.js → persist-CDPcIIlF.js} +1 -1
- zenml/zen_server/dashboard/assets/{persist-DBTFy--v.js → persist-Hxrm9o7f.js} +1 -1
- zenml/zen_server/dashboard/assets/{plus-tf1V2hTJ.js → plus-noRapLU5.js} +1 -1
- zenml/zen_server/dashboard/assets/react-error-boundary.esm-DOkSniBS.js +1 -0
- zenml/zen_server/dashboard/assets/{refresh-BjOeWlEq.js → refresh-Jr_advur.js} +1 -1
- zenml/zen_server/dashboard/assets/{rocket-DjT2cDvG.js → rocket-GOlMupOS.js} +1 -1
- zenml/zen_server/dashboard/assets/{service-BvOYLH5b.js → service-Db_ee3ql.js} +1 -1
- zenml/zen_server/dashboard/assets/sharedSchema-BE8kPXOv.js +14 -0
- zenml/zen_server/dashboard/assets/{stack-detail-query-DMJoxwgv.js → stack-detail-query-B2rvP4uR.js} +1 -1
- zenml/zen_server/dashboard/assets/{tick-circle-BEX_Tp4v.js → tick-circle-DKkiYi_R.js} +1 -1
- zenml/zen_server/dashboard/assets/{trash-arLUMWMS.js → trash-Dm8g1gZ8.js} +1 -1
- zenml/zen_server/dashboard/assets/{update-server-settings-mutation-ATZDNNZk.js → update-server-settings-mutation-Bgnr2Ssw.js} +1 -1
- zenml/zen_server/dashboard/assets/{url-BWJXzuI4.js → url-1R6qfphK.js} +1 -1
- zenml/zen_server/dashboard/assets/{zod-BwEbpOxH.js → zod-C2FdaFLe.js} +1 -1
- zenml/zen_server/dashboard/index.html +8 -8
- zenml/zen_stores/migrations/versions/0.74.0_release.py +23 -0
- zenml/zen_stores/schemas/artifact_schemas.py +31 -4
- zenml/zen_stores/schemas/model_schemas.py +31 -6
- zenml/zen_stores/schemas/pipeline_run_schemas.py +1 -1
- zenml/zen_stores/schemas/pipeline_schemas.py +35 -8
- zenml/zen_stores/schemas/run_template_schemas.py +42 -14
- {zenml_nightly-0.73.0.dev20250205.dist-info → zenml_nightly-0.74.0.dev20250207.dist-info}/METADATA +2 -2
- {zenml_nightly-0.73.0.dev20250205.dist-info → zenml_nightly-0.74.0.dev20250207.dist-info}/RECORD +148 -144
- zenml/zen_server/dashboard/assets/@radix-DeK6qiuw.js +0 -85
- zenml/zen_server/dashboard/assets/@reactflow-6JPoencd.js +0 -17
- zenml/zen_server/dashboard/assets/@tanstack-DT5WLu9C.js +0 -22
- zenml/zen_server/dashboard/assets/CodeSnippet-Qh1ae_DJ.js +0 -9
- zenml/zen_server/dashboard/assets/CsvVizualization-O9cVIaL8.js +0 -15
- zenml/zen_server/dashboard/assets/MarkdownVisualization-ylXaAxev.js +0 -14
- zenml/zen_server/dashboard/assets/ProBadge-D784iVNC.js +0 -1
- zenml/zen_server/dashboard/assets/index-B6U0OkEN.css +0 -1
- zenml/zen_server/dashboard/assets/index-CxO6541P.js +0 -55
- zenml/zen_server/dashboard/assets/index-Uu49AX48.js +0 -1
- zenml/zen_server/dashboard/assets/index.esm-Dy6Z9Ung.js +0 -1
- zenml/zen_server/dashboard/assets/page-BCgEdmhP.js +0 -1
- zenml/zen_server/dashboard/assets/page-DWWhxCoF.js +0 -1
- zenml/zen_server/dashboard/assets/page-I2B4Ocv8.js +0 -1
- zenml/zen_server/dashboard/assets/page-OdjGauvw.js +0 -2
- zenml/zen_server/dashboard/assets/sharedSchema-xJDsJNgJ.js +0 -14
- /zenml/zen_server/dashboard/assets/{@reactflow-C26Olbza.css → @reactflow-Fd0xVSp_.css} +0 -0
- /zenml/zen_server/dashboard/assets/{CodeSnippet-Bbx6fIb6.css → CodeSnippet-CK5CxKct.css} +0 -0
- {zenml_nightly-0.73.0.dev20250205.dist-info → zenml_nightly-0.74.0.dev20250207.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.73.0.dev20250205.dist-info → zenml_nightly-0.74.0.dev20250207.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.73.0.dev20250205.dist-info → zenml_nightly-0.74.0.dev20250207.dist-info}/entry_points.txt +0 -0
@@ -1 +1 @@
|
|
1
|
-
import{r as o,j as e}from"./@radix-
|
1
|
+
import{r as o,j as e}from"./@radix-B7OY3d6N.js";import{z as i,i as v,aj as j,au as y,am as S,j as C,u as k,B as w,S as E}from"./index-D25WcEJJ.js";import{u as F}from"./update-server-settings-mutation-Bgnr2Ssw.js";import{t as q}from"./zod-C2FdaFLe.js";import{c as A}from"./@tanstack-W1pLDzVg.js";import{u as I,C as b}from"./index.esm-C5jC4e7W.js";import"./@react-router-CiF9laDg.js";import"./@reactflow-DgwdIYyq.js";const _=i.object({announcements:i.boolean(),updates:i.boolean()});function K({settings:t}){var h,f;const c=o.useId(),d=o.useId(),{toast:l}=v(),u=A(),{mutate:g}=F({onError:s=>{u.invalidateQueries({queryKey:y()}),S(s)&&l({status:"error",emphasis:"subtle",icon:e.jsx(C,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:s.message,rounded:!0})},onSuccess:()=>{u.invalidateQueries({queryKey:y()}),l({status:"success",emphasis:"subtle",rounded:!0,description:"Settings updated successfully"})}}),{control:m,handleSubmit:p,watch:x}=I({resolver:q(_),defaultValues:{announcements:((h=t.body)==null?void 0:h.display_announcements)??void 0,updates:((f=t.body)==null?void 0:f.display_updates)??void 0}});function N({announcements:s,updates:a}){g({display_announcements:s,display_updates:a})}return o.useEffect(()=>{const s=x(()=>p(N)());return()=>s.unsubscribe()},[p,x]),e.jsx("form",{id:"create-user-form",className:"space-y-5",children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(b,{control:m,name:"announcements",render:({field:{value:s,onChange:a,ref:n}})=>e.jsx(j,{ref:n,checked:s,onCheckedChange:r=>{a(!!r)},id:c})}),e.jsxs("label",{htmlFor:c,className:"text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"Announcements"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Enable Announcements for important ZenML updates, surveys, and feedback opportunities."})]})]}),e.jsx("hr",{}),e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(b,{control:m,name:"updates",render:({field:{value:s,onChange:a,ref:n}})=>e.jsx(j,{ref:n,checked:s,onCheckedChange:r=>{a(!!r)},id:d})}),e.jsxs("label",{htmlFor:d,className:"text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"Updates"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Activate Updates to receive the latest ZenML news and feature releases."})]})]})]})})}function P(){const{data:t}=k({throwOnError:!0});return e.jsxs(w,{className:"flex flex-col gap-5 p-5",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Notifications"}),e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"ZenML comes equipped with default widgets designed to enhance your experience by analyzing usage patterns, gathering your feedback, and ensuring you stay informed about our latest updates and features."})]}),e.jsx("div",{className:"",children:t?e.jsx(K,{settings:t}):e.jsx(E,{className:"h-[250px] w-full"})})]})}export{P as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{j as e}from"./@radix-
|
1
|
+
import{j as e}from"./@radix-B7OY3d6N.js";import{B as o,aA as n}from"./index-D25WcEJJ.js";import{I as r}from"./Infobox-Ls_918eD.js";import{H as a}from"./Helpbox-DWOXAebr.js";import{V as s,g as c}from"./Commands-vjMqENS8.js";import"./@tanstack-W1pLDzVg.js";import"./@react-router-CiF9laDg.js";import"./@reactflow-DgwdIYyq.js";import"./help-CgM5zwtY.js";import"./CodeSnippet-CK2z-88v.js";import"./copy-DmyMnHSy.js";const l=[{command:"zenml code-repository register <NAME> --type=<CODE_REPOSITORY_TYPE] [--CODE_REPOSITORY_OPTIONS]",description:"Register a code repository"},{command:"zenml code-repository register <NAME> --type=custom --source=<CODE_REPOSITORY_SOURCE> [--CODE_REPOSITORY_OPTIONS]",description:"Use a custom repository "},{command:"zenml code-repository list",description:"List your registered code repositories"},{command:"zenml code-repository delete <REPOSITORY_NAME_OR_ID>",description:"Delete a code repository that you have previously registered"}],d="/assets/repos-video-D8kpu60k.svg";function m(){return e.jsx(r,{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:"We are creating a new Repositories experience"}),e.jsx("p",{children:"In the meanwhile you can use the CLI to add and manage your repos."})]})})}function p(){const t="https://zenml.portal.trainn.co/share/koVfVubiXfXLXtVcDAqPyg/embed?autoplay=false";return e.jsxs(o,{className:"flex flex-col-reverse items-stretch overflow-hidden md:flex-row",children:[e.jsxs("div",{className:"w-full p-7 md:w-2/3",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Learn More about Repositories"}),e.jsx("p",{className:"mt-2 text-text-lg text-theme-text-secondary",children:"Get started with ZenML Repositories for streamlined pipeline versioning and faster Docker builds."}),e.jsx(s,{videoLink:t,buttonText:"Watch the Starter Guide (2 min)"})]}),e.jsx("div",{className:"flex w-full items-center justify-center bg-primary-50 lg:w-1/3",children:e.jsx(s,{fallbackImage:e.jsx("img",{src:d,alt:"Purple squares with text indicating a starter guide for secrets",className:"h-full w-full"}),videoLink:t,isButton:!1})})]})}function x(){return e.jsxs("section",{className:"space-y-5 pl-8 pr-5",children:[e.jsx(r,{className:"text-text-md",intent:"neutral",children:"Code repositories enable ZenML to keep track of the code version that you use for your pipeline runs. Additionally, running a pipeline which is tracked in a registered code repository can decrease the time it takes Docker to build images for containerized stack components."}),l.map((t,i)=>e.jsx(e.Fragment,{children:c(t)},i)),e.jsx(a,{text:"Check all the commands and find more about Repositories in our Docs",link:"https://docs.zenml.io/how-to/setting-up-a-project-repository/connect-your-git-repository"})]})}function k(){return e.jsxs(o,{className:"space-y-4 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Repositories"}),e.jsx(m,{}),e.jsx(p,{}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(n,{}),"Administering your Code Repositories"]}),e.jsx(x,{})]})}export{k as default};
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import{r as i,j as e}from"./@radix-
|
1
|
+
import{r as i,j as e}from"./@radix-B7OY3d6N.js";import{b as h,u as D,a as v,S,E as C}from"./SecretTooltip-CYL2o5Gs.js";import{a as f,c as N}from"./@tanstack-W1pLDzVg.js";import{am as b,aD as w,an as E,aE as k,ao as T,I as j,aF as A,aq as K,f as p,D as V,w as O,x as L,S as B,ad as F,ae as q,L as z,o as I,B as Q}from"./index-D25WcEJJ.js";import{C as R}from"./CopyButton-BQf5nLgq.js";import{S as P}from"./key-icon-DuqxBBkq.js";import{S as H}from"./dots-horizontal-C6QCz7jg.js";import{S as M}from"./trash-Dm8g1gZ8.js";import{A as _}from"./AlertDialogDropdownItem-BS4AoVte.js";import{g as $}from"./@react-router-CiF9laDg.js";import"./plus-noRapLU5.js";import"./url-1R6qfphK.js";import"./zod-C2FdaFLe.js";import"./index.esm-C5jC4e7W.js";import"./CodeSnippet-CK2z-88v.js";import"./copy-DmyMnHSy.js";import"./@reactflow-DgwdIYyq.js";function U({secretId:s,keyName:r}){const{data:t,isLoading:a,isError:u}=f({...h.secretDetail(s)}),l=N(),{mutate:o}=D({onError(d){b(d)&&w({status:"error",emphasis:"subtle",description:d.message,rounded:!0})},onSuccess(){l.invalidateQueries({queryKey:["secrets"]}),l.invalidateQueries({queryKey:["secretDetail",s]})}}),[n,m]=i.useState(""),x=()=>{var d;if(t){const g={...(d=t.body)==null?void 0:d.values};delete g[r];const y={name:t.name,scope:"workspace",values:g};o({id:s,body:y})}};function c(d){m(d.target.value)}return a?e.jsx("div",{children:"Loading..."}):u?e.jsx("div",{children:"Error loading secret details"}):e.jsxs(E,{children:[e.jsx(k,{children:e.jsx(T,{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(j,{name:"key",onChange:c,className:"w-full",required:!0,value:n})]}),e.jsxs(A,{className:"gap-[10px]",children:[e.jsx(K,{asChild:!0,children:e.jsx(p,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(p,{intent:"danger",type:"button",onClick:x,disabled:n!=="DELETE",children:"Delete"})]})]})}function G({secretId:s,keyName:r}){const[t,a]=i.useState(!1),[u,l]=i.useState(!1),o=i.useRef(null),n=i.useRef(null);function m(){n.current=o.current}function x(c){if(c===!1){a(!1),setTimeout(()=>{l(c)},200);return}l(c)}return e.jsxs(V,{onOpenChange:a,open:t,children:[e.jsx(O,{ref:o,children:e.jsx(H,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(L,{hidden:u,onCloseAutoFocus:c=>{n.current&&(n.current.focus(),n.current=null,c.preventDefault())},align:"end",sideOffset:7,children:e.jsx(_,{onSelect:m,onOpenChange:x,triggerChildren:"Delete ",icon:e.jsx(M,{}),children:e.jsx(U,{secretId:s,keyName:r})})})]})}const J=({value:s})=>{const[r,t]=i.useState(!1),a=typeof s=="string"?s:"",u="•".repeat(a.length);return e.jsxs("div",{className:"flex items-center gap-2 space-x-2",children:[e.jsx(S,{onClick:()=>t(!r),className:"h-4 w-4 flex-shrink-0"}),e.jsx("span",{children:r?a:u})]})};function W(s,r){return[{id:"key",header:"Key",accessorKey:"key",cell:({row:t})=>{const a=`from zenml.client import Client
|
2
2
|
secret = Client().get_secret("${r}")
|
3
3
|
|
4
4
|
# 'secret.secret_values' will contain a dictionary with all key-value pairs within your secret.
|
5
5
|
secret.secret_values["${t.original.key}"]
|
6
|
-
`;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(P,{className:"h-5 w-5 flex-shrink-0 fill-primary-400"}),e.jsx("div",{className:"flex flex-col",children:e.jsx("div",{className:"flex items-center space-x-1",children:e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:t.original.key}),e.jsx(v,{code:a})]})})})]})}},{id:"value",header:"Value",accessorKey:"value",cell:({row:t})=>e.jsx(J,{value:t.getValue("value")})},{id:"actions",header:"",cell:({row:t})=>e.jsx(G,{secretId:s,keyName:t.original.key})}]}function X({secretId:s}){var o;const[r,t]=i.useState(""),a=f({...h.secretDetail(s)});if(a.isPending)return e.jsx(
|
6
|
+
`;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(P,{className:"h-5 w-5 flex-shrink-0 fill-primary-400"}),e.jsx("div",{className:"flex flex-col",children:e.jsx("div",{className:"flex items-center space-x-1",children:e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:t.original.key}),e.jsx(v,{code:a})]})})})]})}},{id:"value",header:"Value",accessorKey:"value",cell:({row:t})=>e.jsx(J,{value:t.getValue("value")})},{id:"actions",header:"",cell:({row:t})=>e.jsx(G,{secretId:s,keyName:t.original.key})}]}function X({secretId:s}){var o;const[r,t]=i.useState(""),a=f({...h.secretDetail(s)});if(a.isPending)return e.jsx(B,{className:"h-[200px] w-full"});if(a.isError)return e.jsx("div",{children:a.error.message});const l=Object.entries(((o=a.data.body)==null?void 0:o.values)||{}).map(([n,m])=>({key:n,value:m})).filter(n=>n.key.toLowerCase().includes(r.toLowerCase()));return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-2",children:[e.jsx(j,{type:"text",placeholder:"Search Keys...",value:r,onChange:n=>t(n.target.value),inputSize:"md"}),e.jsxs(F,{children:[e.jsx(q,{asChild:!0,children:e.jsx(p,{size:"sm",intent:"primary",children:"Edit Keys"})}),e.jsx(C,{secretId:s,isSecretNameEditable:!1,dialogTitle:"Edit keys"})]})]}),e.jsx("div",{className:"w-full",children:e.jsx(z,{columns:W(s,a.data.name),data:l})})]})}function he(){const{secretId:s}=$(),{setCurrentBreadcrumbData:r}=I(),{data:t}=f({...h.secretDetail(s||"")});return i.useEffect(()=>{t&&r({segment:"secretsDetail",data:{name:t.name,id:t.id}})},[t]),e.jsx(e.Fragment,{children:e.jsxs(Q,{className:"space-y-5 p-5",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:t==null?void 0:t.name}),e.jsxs("div",{className:"group/copybutton flex items-center space-x-1",children:[e.jsx("div",{className:"text-theme-text-secondary",children:s==null?void 0:s.slice(0,8)}),e.jsx(R,{copyText:s})]})]}),e.jsx(X,{secretId:s||""})]})})}export{he as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as x,j as e}from"./@radix-DeK6qiuw.js";import{p as D,q as C,k as E,F as T,ad as K,ae as H,f as h,af as F,ag as P,ah as O,i as U,I as j,ak as A,al as V,am as G,s as J,D as W,w as X,x as Y,r as N,as as Z,z as f,m as ee,L as se,S,o as te,B as ae}from"./index-CxO6541P.js";import{S as re,P as ne}from"./SearchField-Yjv-KRW4.js";import{S as ie,s as ce,E as le,a as oe,b as de}from"./SecretTooltip-EKpMlG2f.js";import{b as I,c as L,a as w}from"./@tanstack-DT5WLu9C.js";import{w as me}from"./index-CJ5IfeAl.js";import{S as ue}from"./plus-tf1V2hTJ.js";import{S as q}from"./trash-arLUMWMS.js";import{t as xe}from"./zod-BwEbpOxH.js";import{u as he,a as pe,C as g}from"./index.esm-Dy6Z9Ung.js";import{S as fe}from"./Lock-CYYy18Mm.js";import{C as v}from"./CopyButton-DCiXO3JC.js";import{D as je}from"./DisplayDate-CDMUcQHS.js";import{I as ge}from"./InlineAvatar-CQNjKoEQ.js";import{c as ye}from"./code-snippets-CqONne41.js";import{L as b,c as Ne}from"./@react-router-B3Z5rLr2.js";import{S as Se}from"./dots-horizontal-otGBOSDJ.js";import{D as k,S as we}from"./DialogItem-BYG7d_M2.js";import"./@reactflow-6JPoencd.js";import"./chevron-right-double-D7ojK9Co.js";import"./url-BWJXzuI4.js";import"./index-Uu49AX48.js";import"./CodeSnippet-Qh1ae_DJ.js";import"./copy-C8XQA2Ug.js";async function ve(s){const t=D(C.secrets.add(s.workspace)),a=await E(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!a.ok){const r=await a.json().then(n=>n.detail).catch(()=>"Failed to create Secret");throw new T({status:a.status,statusText:a.statusText,message:r})}return a.json()}function be(s){return I({mutationFn:async t=>ve(t),...s})}function ke({id:s,workspace:t}){const[a,r]=x.useState(!1);return e.jsxs(K,{open:a,onOpenChange:r,children:[e.jsx(H,{asChild:!0,children:e.jsx(h,{className:"shrink-0",intent:"primary",children:"Add secret"})}),e.jsxs(F,{className:"mx-auto w-[90vw] max-w-[744px]",children:[e.jsx(P,{children:e.jsx(O,{children:"Register New Secret"})}),e.jsx(De,{userId:s,setOpen:r,workspaceId:t.id})]})]})}function De({userId:s,setOpen:t,workspaceId:a}){const{handleSubmit:r,control:n,watch:i,setValue:o,formState:{isValid:u},reset:p}=he({resolver:xe(ce),defaultValues:{secretName:"",keysValues:[{key:"",value:""}]}}),{fields:m,append:_,remove:R}=pe({control:n,name:"keysValues"}),{toast:B}=U(),M=L(),{mutate:Q}=be({onError(c){G(c)&&B({status:"error",emphasis:"subtle",description:c.message,rounded:!0})},onSuccess(){M.invalidateQueries({queryKey:["secrets"]}),t(!1),p()}}),z=c=>{Q({user:s,workspace:a,name:c.secretName,scope:"workspace",values:c.keysValues.reduce((l,d)=>(d.key&&d.value&&(l[d.key]=d.value),l),{})})},$=c=>{z(c)};return e.jsxs(e.Fragment,{children:[e.jsx("form",{id:"create-secret-form",className:"gap-5 p-5",onSubmit:r($),children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("label",{className:"font-inter text-sm text-left font-medium leading-5",children:["Secret Name",e.jsx("span",{className:"ml-1 text-theme-text-error",children:"*"})]}),e.jsx(g,{name:"secretName",control:n,render:({field:c})=>e.jsx(j,{...c,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((c,l)=>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.${l}.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.${l}.value`,control:n,render:({field:d})=>e.jsx(j,{...d,className:"mb-2 w-full pr-10",required:!0,placeholder:"•••••••••",type:i(`keysValues.${l}.showPassword`)?"text":"password"})}),e.jsx("button",{type:"button",onClick:()=>{const d=i(`keysValues.${l}.showPassword`);o(`keysValues.${l}.showPassword`,!d)},className:"absolute inset-y-1 right-0 flex items-center pb-1 pr-3",children:e.jsx(ie,{className:"h-4 w-4 flex-shrink-0"})})]})}),e.jsxs("div",{className:"flex items-center",children:[l===m.length-1&&e.jsx(h,{intent:"primary",emphasis:"subtle",onClick:()=>_({key:"",value:""}),className:"mb-2 flex h-7 w-7 items-center justify-center",children:e.jsx(ue,{className:"flex-shrink-0 fill-primary-600"})}),l!==m.length-1&&e.jsx(h,{intent:"secondary",emphasis:"minimal",onClick:()=>R(l),className:"mb-2 h-7 w-7 items-center justify-center",children:e.jsx(q,{className:"flex-shrink-0 fill-theme-text-secondary"})})]})]},c.id))]})}),e.jsxs(A,{className:"gap-[10px]",children:[e.jsx(V,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{intent:"primary",disabled:!u,type:"submit",form:"create-secret-form",children:"Register Secret"})]})]})}async function Ce(s){const t=D(C.secrets.detail(s)),a=await E(t,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(a.status===404&&J(),!a.ok)throw new T({message:"Error deleting secret",status:a.status,statusText:a.statusText});return a.json()}function Ee(s){return I({mutationFn:async t=>Ce(t),...s})}function Te({secretId:s}){const t=L(),{mutate:a}=Ee({onSuccess(){t.invalidateQueries({queryKey:["secrets"]})}}),[r,n]=x.useState("");function i(){a(s)}function o(u){n(u.target.value)}return e.jsxs(F,{children:[e.jsx(P,{children:e.jsx(O,{children:"Delete secret"})}),e.jsxs("div",{className:"gap-5 p-5",children:[e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Are you sure you want to delete this secret?"}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"This action cannot be undone."}),e.jsx("h3",{className:"font-inter text-sm mb-1 mt-4 text-left font-medium leading-5",children:"Please type DELETE to confirm"}),e.jsx(j,{name:"key",onChange:o,className:"w-full",required:!0,value:r})]}),e.jsxs(A,{className:"gap-[10px]",children:[e.jsx(V,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{intent:"danger",type:"submit",form:"edit-secret-form",onClick:i,disabled:r!=="DELETE",children:"Delete"})]})]})}function Fe({secretId:s}){const[t,a]=x.useState(!1),[r,n]=x.useState(!1),i=x.useRef(null),o=x.useRef(null);function u(){o.current=i.current}function p(m){if(m===!1){a(!1),setTimeout(()=>{n(m)},200);return}n(m)}return e.jsxs(W,{onOpenChange:a,open:t,children:[e.jsx(X,{ref:i,children:e.jsx(Se,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsxs(Y,{hidden:r,onCloseAutoFocus:m=>{o.current&&(o.current.focus(),o.current=null,m.preventDefault())},align:"end",sideOffset:7,children:[e.jsx(k,{onSelect:u,onOpenChange:p,triggerChildren:"Edit ",icon:e.jsx(we,{}),children:e.jsx(le,{secretId:s,isSecretNameEditable:!0,dialogTitle:"Edit secret"})}),e.jsx(k,{onSelect:u,onOpenChange:p,triggerChildren:"Delete ",icon:e.jsx(q,{}),children:e.jsx(Te,{secretId:s})})]})]})}const Pe=[{id:"secret",header:"Secret",accessorFn:s=>s.name,cell:({getValue:s,row:t})=>{const a=ye(t.original.name);return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(fe,{className:"h-5 w-5 flex-shrink-0 fill-primary-400"}),e.jsxs("div",{className:"group/copybutton flex flex-col",children:[e.jsxs("div",{className:"flex flex-row items-center space-x-1",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(b,{className:"text-text-md font-semibold text-theme-text-primary",to:N.settings.secrets.detail(t.original.id),children:t.original.name}),e.jsx(oe,{code:a})]}),e.jsx(v,{copyText:s()})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(b,{to:N.settings.secrets.detail(t.original.id),className:"flex items-center gap-1 text-text-sm text-theme-text-secondary",children:t.original.id.slice(0,8)}),e.jsx(v,{copyText:t.original.id})]})]})]})}},{id:"author",header:"Author",accessorFn:s=>{var t;return(t=s.body)==null?void 0:t.user},cell:({getValue:s})=>{const t=s();return e.jsx(e.Fragment,{children:e.jsx(ge,{username:Z(t)})})}},{id:"created_at",header:"Created At",accessorFn:s=>{var t;return(t=s.body)==null?void 0:t.created},cell:({getValue:s})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(je,{dateString:s()})})},{id:"admin_actions",header:"",accessorFn:s=>String(s.id),cell:({row:s,getValue:t})=>{var r,n,i;const a=t();return(i=(n=(r=s.original.body)==null?void 0:r.user)==null?void 0:n.body)!=null&&i.is_admin?e.jsx(Fe,{secretId:a}):e.jsx("p",{className:"text-sm text-theme-text-secondary",children:"No Actions"})}}],y=1,Oe=f.object({page:f.coerce.number().min(y).optional().default(y).catch(y),name:f.string().optional(),operator:f.enum(["and","or"]).optional()});function Ae(){const[s]=Ne(),{page:t,name:a,operator:r}=Oe.parse({page:s.get("page")||void 0,name:s.get("name")||void 0,operator:s.get("operator")||void 0});return{page:t,name:a,logical_operator:r}}function Ve(){const s=Ae(),{data:t}=w({...de.secretList({...s,sort_by:"desc:created"}),throwOnError:!0}),{data:a}=ee(),r=(a==null?void 0:a.id)||"",{data:n,isLoading:i,isError:o,isSuccess:u}=w({...me.workspaceDetail("default")});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsx(re,{searchParams:s}),i?e.jsx("div",{children:"Loading..."}):o?e.jsx("div",{children:"Error loading workspace details."}):u&&e.jsx(ke,{id:r,workspace:n})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:t?e.jsx(se,{columns:Pe,data:t.items}):e.jsx(S,{className:"h-[250px] w-full"})}),t?t.total_pages>1&&e.jsx(ne,{searchParams:s,paginate:t}):e.jsx(S,{className:"h-[36px] w-[300px]"})]})]})}function ns(){const{setCurrentBreadcrumbData:s}=te();return x.useEffect(()=>{s({segment:"secrets",data:null})},[]),e.jsxs(ae,{className:"space-y-4 p-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Secrets"}),e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:["Configure and manage your pipeline secrets and configurations."," ",e.jsx("a",{target:"_blank",rel:"noreferrer noopener",href:"https://docs.zenml.io/how-to/interact-with-secrets",className:"link text-primary-400",children:"Learn More"})]})]}),e.jsx(Ve,{})]})}export{ns as default};
|
1
|
+
import{r as x,j as e}from"./@radix-B7OY3d6N.js";import{p as D,q as C,k as E,F as T,ad as K,ae as H,f as h,af as F,ag as P,ah as O,i as U,I as j,ak as A,al as V,am as G,s as J,D as W,w as X,x as Y,r as N,as as Z,z as f,m as ee,L as se,S,o as te,B as ae}from"./index-D25WcEJJ.js";import{S as re,P as ne}from"./SearchField-BYL1oNec.js";import{S as ie,s as ce,E as le,a as oe,b as de}from"./SecretTooltip-CYL2o5Gs.js";import{b as I,c as L,a as w}from"./@tanstack-W1pLDzVg.js";import{w as me}from"./index-6CSA2ij5.js";import{S as ue}from"./plus-noRapLU5.js";import{S as q}from"./trash-Dm8g1gZ8.js";import{t as xe}from"./zod-C2FdaFLe.js";import{u as he,a as pe,C as g}from"./index.esm-C5jC4e7W.js";import{S as fe}from"./Lock-6WGsAdiw.js";import{C as v}from"./CopyButton-BQf5nLgq.js";import{D as je}from"./DisplayDate-CZV8x8pB.js";import{I as ge}from"./InlineAvatar-B9O7QxVo.js";import{c as ye}from"./code-snippets-CqONne41.js";import{L as b,c as Ne}from"./@react-router-CiF9laDg.js";import{S as Se}from"./dots-horizontal-C6QCz7jg.js";import{D as k,S as we}from"./DialogItem-L8-LNKgK.js";import"./@reactflow-DgwdIYyq.js";import"./chevron-right-double-C5DtVuMS.js";import"./url-1R6qfphK.js";import"./index-4aOgYud0.js";import"./CodeSnippet-CK2z-88v.js";import"./copy-DmyMnHSy.js";async function ve(s){const t=D(C.secrets.add(s.workspace)),a=await E(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!a.ok){const r=await a.json().then(n=>n.detail).catch(()=>"Failed to create Secret");throw new T({status:a.status,statusText:a.statusText,message:r})}return a.json()}function be(s){return I({mutationFn:async t=>ve(t),...s})}function ke({id:s,workspace:t}){const[a,r]=x.useState(!1);return e.jsxs(K,{open:a,onOpenChange:r,children:[e.jsx(H,{asChild:!0,children:e.jsx(h,{className:"shrink-0",intent:"primary",children:"Add secret"})}),e.jsxs(F,{className:"mx-auto w-[90vw] max-w-[744px]",children:[e.jsx(P,{children:e.jsx(O,{children:"Register New Secret"})}),e.jsx(De,{userId:s,setOpen:r,workspaceId:t.id})]})]})}function De({userId:s,setOpen:t,workspaceId:a}){const{handleSubmit:r,control:n,watch:i,setValue:o,formState:{isValid:u},reset:p}=he({resolver:xe(ce),defaultValues:{secretName:"",keysValues:[{key:"",value:""}]}}),{fields:m,append:_,remove:R}=pe({control:n,name:"keysValues"}),{toast:B}=U(),M=L(),{mutate:Q}=be({onError(c){G(c)&&B({status:"error",emphasis:"subtle",description:c.message,rounded:!0})},onSuccess(){M.invalidateQueries({queryKey:["secrets"]}),t(!1),p()}}),z=c=>{Q({user:s,workspace:a,name:c.secretName,scope:"workspace",values:c.keysValues.reduce((l,d)=>(d.key&&d.value&&(l[d.key]=d.value),l),{})})},$=c=>{z(c)};return e.jsxs(e.Fragment,{children:[e.jsx("form",{id:"create-secret-form",className:"gap-5 p-5",onSubmit:r($),children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("label",{className:"font-inter text-sm text-left font-medium leading-5",children:["Secret Name",e.jsx("span",{className:"ml-1 text-theme-text-error",children:"*"})]}),e.jsx(g,{name:"secretName",control:n,render:({field:c})=>e.jsx(j,{...c,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((c,l)=>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.${l}.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.${l}.value`,control:n,render:({field:d})=>e.jsx(j,{...d,className:"mb-2 w-full pr-10",required:!0,placeholder:"•••••••••",type:i(`keysValues.${l}.showPassword`)?"text":"password"})}),e.jsx("button",{type:"button",onClick:()=>{const d=i(`keysValues.${l}.showPassword`);o(`keysValues.${l}.showPassword`,!d)},className:"absolute inset-y-1 right-0 flex items-center pb-1 pr-3",children:e.jsx(ie,{className:"h-4 w-4 flex-shrink-0"})})]})}),e.jsxs("div",{className:"flex items-center",children:[l===m.length-1&&e.jsx(h,{intent:"primary",emphasis:"subtle",onClick:()=>_({key:"",value:""}),className:"mb-2 flex h-7 w-7 items-center justify-center",children:e.jsx(ue,{className:"flex-shrink-0 fill-primary-600"})}),l!==m.length-1&&e.jsx(h,{intent:"secondary",emphasis:"minimal",onClick:()=>R(l),className:"mb-2 h-7 w-7 items-center justify-center",children:e.jsx(q,{className:"flex-shrink-0 fill-theme-text-secondary"})})]})]},c.id))]})}),e.jsxs(A,{className:"gap-[10px]",children:[e.jsx(V,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{intent:"primary",disabled:!u,type:"submit",form:"create-secret-form",children:"Register Secret"})]})]})}async function Ce(s){const t=D(C.secrets.detail(s)),a=await E(t,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(a.status===404&&J(),!a.ok)throw new T({message:"Error deleting secret",status:a.status,statusText:a.statusText});return a.json()}function Ee(s){return I({mutationFn:async t=>Ce(t),...s})}function Te({secretId:s}){const t=L(),{mutate:a}=Ee({onSuccess(){t.invalidateQueries({queryKey:["secrets"]})}}),[r,n]=x.useState("");function i(){a(s)}function o(u){n(u.target.value)}return e.jsxs(F,{children:[e.jsx(P,{children:e.jsx(O,{children:"Delete secret"})}),e.jsxs("div",{className:"gap-5 p-5",children:[e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Are you sure you want to delete this secret?"}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"This action cannot be undone."}),e.jsx("h3",{className:"font-inter text-sm mb-1 mt-4 text-left font-medium leading-5",children:"Please type DELETE to confirm"}),e.jsx(j,{name:"key",onChange:o,className:"w-full",required:!0,value:r})]}),e.jsxs(A,{className:"gap-[10px]",children:[e.jsx(V,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{intent:"danger",type:"submit",form:"edit-secret-form",onClick:i,disabled:r!=="DELETE",children:"Delete"})]})]})}function Fe({secretId:s}){const[t,a]=x.useState(!1),[r,n]=x.useState(!1),i=x.useRef(null),o=x.useRef(null);function u(){o.current=i.current}function p(m){if(m===!1){a(!1),setTimeout(()=>{n(m)},200);return}n(m)}return e.jsxs(W,{onOpenChange:a,open:t,children:[e.jsx(X,{ref:i,children:e.jsx(Se,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsxs(Y,{hidden:r,onCloseAutoFocus:m=>{o.current&&(o.current.focus(),o.current=null,m.preventDefault())},align:"end",sideOffset:7,children:[e.jsx(k,{onSelect:u,onOpenChange:p,triggerChildren:"Edit ",icon:e.jsx(we,{}),children:e.jsx(le,{secretId:s,isSecretNameEditable:!0,dialogTitle:"Edit secret"})}),e.jsx(k,{onSelect:u,onOpenChange:p,triggerChildren:"Delete ",icon:e.jsx(q,{}),children:e.jsx(Te,{secretId:s})})]})]})}const Pe=[{id:"secret",header:"Secret",accessorFn:s=>s.name,cell:({getValue:s,row:t})=>{const a=ye(t.original.name);return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(fe,{className:"h-5 w-5 flex-shrink-0 fill-primary-400"}),e.jsxs("div",{className:"group/copybutton flex flex-col",children:[e.jsxs("div",{className:"flex flex-row items-center space-x-1",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(b,{className:"text-text-md font-semibold text-theme-text-primary",to:N.settings.secrets.detail(t.original.id),children:t.original.name}),e.jsx(oe,{code:a})]}),e.jsx(v,{copyText:s()})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(b,{to:N.settings.secrets.detail(t.original.id),className:"flex items-center gap-1 text-text-sm text-theme-text-secondary",children:t.original.id.slice(0,8)}),e.jsx(v,{copyText:t.original.id})]})]})]})}},{id:"author",header:"Author",accessorFn:s=>{var t;return(t=s.body)==null?void 0:t.user},cell:({getValue:s})=>{const t=s();return e.jsx(e.Fragment,{children:e.jsx(ge,{username:Z(t)})})}},{id:"created_at",header:"Created At",accessorFn:s=>{var t;return(t=s.body)==null?void 0:t.created},cell:({getValue:s})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(je,{dateString:s()})})},{id:"admin_actions",header:"",accessorFn:s=>String(s.id),cell:({row:s,getValue:t})=>{var r,n,i;const a=t();return(i=(n=(r=s.original.body)==null?void 0:r.user)==null?void 0:n.body)!=null&&i.is_admin?e.jsx(Fe,{secretId:a}):e.jsx("p",{className:"text-sm text-theme-text-secondary",children:"No Actions"})}}],y=1,Oe=f.object({page:f.coerce.number().min(y).optional().default(y).catch(y),name:f.string().optional(),operator:f.enum(["and","or"]).optional()});function Ae(){const[s]=Ne(),{page:t,name:a,operator:r}=Oe.parse({page:s.get("page")||void 0,name:s.get("name")||void 0,operator:s.get("operator")||void 0});return{page:t,name:a,logical_operator:r}}function Ve(){const s=Ae(),{data:t}=w({...de.secretList({...s,sort_by:"desc:created"}),throwOnError:!0}),{data:a}=ee(),r=(a==null?void 0:a.id)||"",{data:n,isLoading:i,isError:o,isSuccess:u}=w({...me.workspaceDetail("default")});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsx(re,{searchParams:s}),i?e.jsx("div",{children:"Loading..."}):o?e.jsx("div",{children:"Error loading workspace details."}):u&&e.jsx(ke,{id:r,workspace:n})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:t?e.jsx(se,{columns:Pe,data:t.items}):e.jsx(S,{className:"h-[250px] w-full"})}),t?t.total_pages>1&&e.jsx(ne,{searchParams:s,paginate:t}):e.jsx(S,{className:"h-[36px] w-[300px]"})]})]})}function ns(){const{setCurrentBreadcrumbData:s}=te();return x.useEffect(()=>{s({segment:"secrets",data:null})},[]),e.jsxs(ae,{className:"space-y-4 p-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Secrets"}),e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:["Configure and manage your pipeline secrets and configurations."," ",e.jsx("a",{target:"_blank",rel:"noreferrer noopener",href:"https://docs.zenml.io/how-to/interact-with-secrets",className:"link text-primary-400",children:"Learn More"})]})]}),e.jsx(Ve,{})]})}export{ns as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as l,j as e}from"./@radix-
|
1
|
+
import{r as l,j as e}from"./@radix-B7OY3d6N.js";import{u as d,S as h,a as j,b as y}from"./form-schemas-B4cZxcUy.js";import{E as w}from"./EmptyState-C8-mkRwm.js";import{A,I as U,P as b,U as P,S as g}from"./UsageReason-Bwhjhrv_.js";import{c as _}from"./@react-router-CiF9laDg.js";import{k as F,F as C,p as k,q as E,h as N,i as H,j as I}from"./index-D25WcEJJ.js";import{b as M}from"./@tanstack-W1pLDzVg.js";import{u as D}from"./login-mutation-EQPLh5Ne.js";import{S as R}from"./SetPassword-BnaLppIC.js";import"./check-circle-ByvKqRS_.js";import"./url-1R6qfphK.js";import"./UpdatePasswordSchemas-CtzucewX.js";import"./zod-C2FdaFLe.js";import"./index.esm-C5jC4e7W.js";import"./gcp-B1H0QrG5.js";import"./kubernetes-Bn54mlK-.js";import"./rocket-GOlMupOS.js";import"./@reactflow-DgwdIYyq.js";import"./PasswordChecker-Xh6Egpx9.js";const S=l.createContext(null);function T({children:t,initialUser:r}){const[a,s]=l.useState(r||{});return e.jsx(S.Provider,{value:{newUser:a,setNewUser:s},children:t})}function p(){const t=l.useContext(S);if(t===null)throw new Error("useActivationContext must be used within an ActivationProvider");return t}function L(){const{setSurveyStep:t}=d(),{setNewUser:r,newUser:a}=p();function s({fullName:n,getUpdates:o,email:u}){r(c=>({...c,...u?{email:u}:{email:null},full_name:n,email_opted_in:o})),t(c=>c+1)}return e.jsx(A,{email:a.email,fullName:a.full_name,submitHandler:s})}async function q({userId:t,body:r}){const a=k(E.users.activate(t)),s=await F(a,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!s.ok){const n=await s.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Failed to update activate user");throw new C({status:s.status,statusText:s.statusText,message:n})}return s.json()}function z(t){return M({mutationFn:async r=>q(r),...t})}function J({userId:t,setUsername:r}){const{newUser:a}=p(),{setAuthState:s}=N(),{setSurveyStep:n}=d(),{mutate:o}=D({onSuccess:()=>{s("true"),n(i=>i+1)}}),{toast:u}=H(),{mutate:c}=z({onSuccess:async i=>{r(i.name),o({username:i.name,password:a.password??void 0})},onError:i=>{i instanceof Error&&u({status:"error",emphasis:"subtle",icon:e.jsx(I,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:i.message,rounded:!0})}});function m({other:i,providers:f,otherVal:x}){const v={infra_providers:i?[...f,x]:f,finished_onboarding_survey:!0};c({userId:t,body:{...a,user_metadata:{...a.user_metadata,...v}}})}return e.jsx(U,{submitHandler:m})}function O(){const{setSurveyStep:t}=d(),{setNewUser:r}=p();function a({newPassword:s}){r(n=>({...n,password:s})),t(n=>n+1)}return e.jsx(R,{submitHandler:a})}function W(){const{setSurveyStep:t}=d(),{setNewUser:r}=p();function a({primaryUse:s}){const n={primary_use:s};r(o=>({...o,user_metadata:{...o.user_metadata,...n}})),t(o=>o+1)}return e.jsx(b,{submitHandler:a})}function Y(){const{setSurveyStep:t}=d(),{setNewUser:r}=p();function a({usageReason:s,comparison_tools:n,otherTool:o,otherToolVal:u}){const c={usage_reason:s,...!!n&&{comparing_tools:o&&u?[...n,u]:n}};r(m=>({...m,user_metadata:{...m.user_metadata,...c}})),t(m=>m+1)}return e.jsx(P,{submitHandler:a})}function Z(){const{surveyStep:t}=d(),[r]=_(),[a,s]=l.useState(""),n=r.get("user"),o=r.get("token");return!n||!o?e.jsx(w,{children:e.jsx("p",{children:"Invalid activation link."})}):e.jsx(e.Fragment,{children:e.jsxs(T,{initialUser:{activation_token:o},children:[e.jsx(h,{stepAmount:6}),t===1&&e.jsx(L,{}),t===2&&e.jsx(O,{}),t===3&&e.jsx(W,{}),t===4&&e.jsx(Y,{}),t===5&&e.jsx(J,{setUsername:s,userId:n}),t===6&&e.jsx(g,{}),t===7&&e.jsx(j,{subHeader:"Your created your ZenML account",username:a})]})})}function lt(){return e.jsx("div",{children:e.jsx(y,{children:e.jsx(Z,{})})})}export{lt as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as d,j as e,aw as N,ax as Q,ay as V,az as B}from"./@radix-DeK6qiuw.js";import{ad as Z,ae as q,af as H,ag as K,ah as G,a7 as x,aK as X,z as l,T as J,E as W,G as Y,X as ee,H as te,I as O,V as se,f as k,aL as re,r as E,i as ae,j as ne,n as ie}from"./index-CxO6541P.js";import{b as m,C as oe,u as ce,F as le}from"./index.esm-Dy6Z9Ung.js";import{c as de}from"./index-D4yoZ_gH.js";import{s as me}from"./url-BWJXzuI4.js";import{h as pe,i as ue,a as he,c as xe}from"./@tanstack-DT5WLu9C.js";import{d as fe}from"./index-Uu49AX48.js";import{R as ge,a as je,u as ke}from"./create-stack-7JzgAYAm.js";import{C as be}from"./CodeSnippet-Qh1ae_DJ.js";import{s as ye}from"./sharedSchema-xJDsJNgJ.js";import{C as R}from"./stack-detail-query-DMJoxwgv.js";import{D as ve}from"./DisplayDate-CDMUcQHS.js";import{I as Ne}from"./InlineAvatar-CQNjKoEQ.js";import{S as we}from"./check-circle-jNbX5-sR.js";import{L as Se,b as Ce}from"./@react-router-B3Z5rLr2.js";import{s as Le}from"./index-Ceyzb1yI.js";import{w as _e}from"./index-CJ5IfeAl.js";import{t as Te}from"./zod-BwEbpOxH.js";import"./@reactflow-6JPoencd.js";import"./copy-C8XQA2Ug.js";import"./layout-BtHBmE4w.js";import"./rocket-DjT2cDvG.js";const U=d.forwardRef(({closeModal:t,type:s,children:r,...n},i)=>e.jsxs(Z,{children:[e.jsx(q,{asChild:!0,children:r}),e.jsxs(H,{className:"max-w-2xl",...n,ref:i,children:[e.jsx(K,{children:e.jsx(G,{children:"Create New "})}),e.jsx("div",{className:"space-y-5 overflow-auto p-7",children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:["Create a new ",x(s)]}),e.jsx(be,{codeClasses:"whitespace-pre-wrap",wrap:!0,code:`zenml ${X(s)} register ${s.toUpperCase()}_NAME --flavor=${s.toUpperCase()}_FLAVOR [--${s.toUpperCase()}_OPTIONS]`})]})})]})]}));U.displayName="UpdateStackDialog";const y=["orchestrator","artifact_store","container_registry","step_operator","model_deployer","feature_store","experiment_tracker","alerter","annotator","data_validator","image_builder","model_registry"],b=l.object({id:l.string().trim().min(1),name:l.string().trim().min(1),logoUrl:l.string().trim().min(1)}),ze=y.reduce((t,s)=>(t[s]=b.nullable(),t),{}),Me=l.object({stackName:ye,components:l.object({...ze,orchestrator:b,artifact_store:b})}),w={helpLink:"https://docs.zenml.io/stack-components/orchestrators",description:"An orchestrator is a special kind of backend that manages the running of each step of the pipeline. Orchestrators administer the actual pipeline runs. By default, ZenML initializes your repository with an orchestrator that runs everything on your local machine."},S={helpLink:"https://docs.zenml.io/stack-components/artifact-stores",description:"The Artifact Store is a central component in any MLOps stack. As the name suggests, it acts as a data persistence layer where artifacts (e.g. datasets, models) ingested or generated by the machine learning pipelines are stored."},C={helpLink:"https://docs.zenml.io/stack-components/container-registries",description:"Container registry is used to store container images that are built to run machine learning pipelines in remote environments. Containerization of the pipeline code creates a portable environment that allows code to run in an isolated manner."},L={description:"Step operators allow you to run individual steps in a custom environment different from the default one used by your active orchestrator.",helpLink:"https://docs.zenml.io/stack-components/step-operators"},_={description:"Model deployers are stack components responsible for online model serving. They are responsible for deploying models to a remote server. Model deployers also act as a registry for models that are served with ZenML.",helpLink:"https://docs.zenml.io/stack-components/model-deployers"},T={description:"ZenML supports connecting to a Redis-backed Feast feature store as a stack component integration.",helpLink:"https://docs.zenml.io/stack-components/feature-stores"},z={description:"Experiment trackers let you track your ML experiments by logging the parameters and allowing you to compare between different runs.",helpLink:"https://docs.zenml.io/stack-components/experiment-trackers"},M={description:"Alerters allow you to send messages to chat services (like Slack, Discord, Mattermost, etc.) from within your pipelines. This is useful to immediately get notified when failures happen, for general monitoring/reporting, and also for building human-in-the-loop ML.",helpLink:"https://docs.zenml.io/stack-components/alerters "},F={description:"Annotators are a stack component that enables the use of data annotation as part of your ZenML stack and pipelines.",helpLink:"https://docs.zenml.io/stack-components/annotators"},I={description:"Data Validators used in ZenML pipelines usually generate data profiles and data quality check reports that are versioned and stored in the Artifact Store and can be retrieved and visualized later.",helpLink:"https://docs.zenml.io/stack-components/data-validators"},D={description:"The image builder is an essential part of most remote MLOps stacks. It is used to build container images such that your machine-learning pipelines and steps can be executed in remote environments.",helpLink:"https://docs.zenml.io/stack-components/image-builders"},A={description:"Model registries are centralized storage solutions for managing and tracking machine learning models across various stages of development and deployment.",helpLink:"https://docs.zenml.io/stack-components/model-registries"};function Fe({type:t}){const{description:s,link:r}=Ie(t);return e.jsx(J,{children:e.jsxs(W,{delayDuration:200,children:[e.jsxs(Y,{children:[e.jsx(ee,{className:"h-4 w-4 shrink-0 fill-theme-text-tertiary"}),e.jsxs("div",{className:"sr-only",children:["Info for ",t]})]}),e.jsxs(te,{align:"start",side:"bottom",className:"flex max-w-xl flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:s}),e.jsx("a",{className:"link mt-2 text-primary-400",target:"_blank",href:r,children:"Learn more"})]})]})})}function Ie(t){switch(t){case"orchestrator":return{description:w.description,link:w.helpLink};case"alerter":return{description:M.description,link:M.helpLink};case"annotator":return{description:F.description,link:F.helpLink};case"artifact_store":return{description:S.description,link:S.helpLink};case"container_registry":return{description:C.description,link:C.helpLink};case"data_validator":return{description:I.description,link:I.helpLink};case"experiment_tracker":return{description:z.description,link:z.helpLink};case"feature_store":return{description:T.description,link:T.helpLink};case"image_builder":return{description:D.description,link:D.helpLink};case"model_deployer":return{description:_.description,link:_.helpLink};case"model_registry":return{description:A.description,link:A.helpLink};case"step_operator":return{description:L.description,link:L.helpLink}}}function De(){return e.jsxs(e.Fragment,{children:[y.map(t=>e.jsx(N,{className:"h-full space-y-5 p-5",value:t,children:e.jsx(Oe,{type:t})},t)),e.jsx(N,{className:"h-full",value:"",children:e.jsx("div",{className:"flex h-full w-full items-center justify-center text-theme-text-tertiary",children:"Select a category to add a new component"})})]})}function Ae({type:t,search:s}){const r=pe({...de.componentListInfinite({sort_by:"desc:updated",type:t,...s?{name:`contains:${s}`}:{}})}),{control:n,watch:i,setValue:c}=m();return r.isError?e.jsx("p",{children:"Error while fetching Components"}):r.isPending?e.jsx("div",{className:"flex w-full flex-1 items-center justify-center",children:e.jsx(se,{})}):e.jsxs("div",{className:"space-y-1",children:[e.jsx("ul",{className:"space-y-1",children:r.data.pages.map(o=>o.items.map(a=>e.jsx("li",{children:e.jsx(oe,{name:`components.${t}.id`,control:n,render:({field:{onChange:g,...j}})=>{var p,u,f,h;return e.jsxs(ge,{className:"justify-between bg-theme-surface-primary font-medium","data-state":i(`components.${t}.id`)===a.id?"selected":"unselected",htmlFor:a.id,children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(je,{...j,id:a.id,type:"radio",value:a.id,onChange:P=>{var v;c(`components.${t}.name`,a.name),c(`components.${t}.logoUrl`,((v=a.body)==null?void 0:v.logo_url)||""),g(P)},checked:i(`components.${t}.id`)===a.id,name:t}),e.jsx("img",{alt:"flavor icon",src:me(((p=a.body)==null?void 0:p.logo_url)||""),width:24,height:24}),e.jsxs("div",{className:"min-w-0 truncate",children:[e.jsx("div",{className:"truncate font-semibold",children:a.name}),e.jsx("div",{className:"truncate text-text-xs text-theme-text-secondary",children:a.id.split("-")[0]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-text-sm",children:[((f=(u=a.body)==null?void 0:u.user)==null?void 0:f.name)&&e.jsx(Ne,{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(ve,{short:!0,dateString:a.body.updated})})]})]})}})},a.id)))}),e.jsx(Re,{type:t}),r.hasNextPage&&e.jsx(k,{onClick:()=>r.fetchNextPage(),type:"button",size:"md",intent:"secondary",emphasis:"subtle",className:"flex w-full items-center justify-center bg-theme-surface-primary",children:e.jsxs("div",{className:"flex items-center gap-1",children:[r.isFetchingNextPage&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Load more"]})})]})}function $e({type:t}){return e.jsxs("section",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(R,{className:"h-5 w-5 fill-primary-400",type:t}),e.jsx("h2",{className:"text-text-lg font-semibold",children:x(t)}),e.jsx(Fe,{type:t})]}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Select a existing ",re(t)," from your server:"]})]})}function Oe({type:t}){const[s,r]=d.useState("");return e.jsxs(e.Fragment,{children:[e.jsx($e,{type:t}),e.jsx(Ee,{search:s,setSearch:r}),e.jsx(Ae,{search:s,type:t})]})}function Ee({setSearch:t,search:s}){const[r,n]=d.useState(s),i=d.useCallback(fe(t,500),[]);d.useEffect(()=>()=>{i.cancel()},[i]);function c(o){n(o),i(o)}return e.jsx(O,{value:r,onChange:o=>c(o.target.value),placeholder:"Search..."})}function Re({type:t}){return e.jsx(U,{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 Ue({type:t}){const{watch:s,formState:{errors:r}}=m(),n=s(`components.${t}`),i=n&&n.id;return e.jsx("div",{"data-error":!i&&r.components&&r.components[t]?"true":"false","data-filled":i?"true":"false",className:"flex h-[110px] flex-col items-center justify-center space-y-2 truncate whitespace-nowrap rounded-md border border-theme-border-moderate bg-theme-surface-secondary py-5 text-center text-text-sm text-theme-text-secondary transition-all duration-150 hover:bg-theme-surface-primary hover:shadow-sm data-[error=true]:border-theme-text-error data-[filled=true]:border-success-400 data-[filled=true]:bg-theme-surface-primary data-[state=active]:bg-theme-surface-primary group-data-[state=active]/trigger:bg-theme-surface-primary group-data-[state=active]/trigger:shadow-md data-[error=false]:data-[filled=false]:group-data-[state=active]/trigger:border-theme-border-bold",children:i?e.jsx(Pe,{type:t}):e.jsx(Qe,{type:t})})}function Pe({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 Qe({type:t}){return e.jsxs(e.Fragment,{children:[e.jsx(R,{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 Ve(){return e.jsxs("div",{className:"flex h-full flex-col justify-between space-y-5",children:[e.jsxs("div",{className:"space-y-5 p-5",children:[e.jsx(qe,{}),e.jsx(Be,{})]}),e.jsx(Ze,{})]})}function Be(){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(Q,{children:e.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-4",children:y.map(r=>e.jsxs("div",{className:"relative",children:[e.jsx(V,{className:"group/trigger w-full",value:r,children:e.jsx(Ue,{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(we,{className:"h-5 w-5 shrink-0 fill-success-400"})})]},r))})})]})}function Ze(){const{formState:{isSubmitting:t}}=m(),s=!!ue();return e.jsxs("div",{className:"flex items-center justify-end space-x-2 border-t border-theme-border-moderate p-5",children:[e.jsx(k,{asChild:!0,intent:"secondary",size:"md",children:e.jsx(Se,{to:E.stacks.create.index,children:"Cancel"})}),e.jsxs(k,{className:"flex items-center gap-1",disabled:t||s,size:"md",children:[(s||t)&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Register Stack"]})]})}function qe(){var r;const{register:t,formState:{errors:s}}=m();return e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-text-sm",htmlFor:"stack-name",children:"Stack Name"}),e.jsx(O,{id:"stack-name",className:`${s.stackName?"border-red-500":""} w-full`,placeholder:"zenml-stack",...t("stackName")}),s.stackName&&e.jsx("p",{className:"text-text-xs text-red-500",children:(r=s.stackName.message)==null?void 0:r.toString()})]})}function He(){const t=he({..._e.workspaceDetail("default")}),{toast:s}=ae(),r=Ce(),n=xe(),i=ke({onSuccess:async()=>{n.invalidateQueries({queryKey:Le.all}),r(E.stacks.overview)},onError:a=>{s({status:"error",emphasis:"subtle",icon:e.jsx(ne,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:a.message,rounded:!0})}});function c(a){var p;const g=Object.entries(a.components).reduce((u,[f,h])=>(h&&(u[f]=[h.id]),u),{}),j={name:a.stackName,components:g};i.mutate({workspaceId:((p=t.data)==null?void 0:p.id)||"",payload:j})}const o=ce({resolver:Te(Me),defaultValues:{components:{alerter:null,orchestrator:{},annotator:null,artifact_store:{},container_registry:null,data_validator:null,experiment_tracker:null,feature_store:null,model_registry:null,image_builder:null,model_deployer:null,step_operator:null},stackName:""}});return{createManualStack:c,form:o}}function ft(){const[t,s]=d.useState(""),{createManualStack:r,form:n}=He();return e.jsx(le,{...n,children:e.jsx(B,{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(Ve,{})}),e.jsx($,{children:e.jsx(De,{})})]})})})}function $({className:t,...s}){return e.jsx("div",{className:ie("w-full overflow-y-auto xl:w-1/2",t),...s})}export{ft as default};
|
1
|
+
import{r as d,j as e,aA as N,aB as Q,aC as B,aD as V}from"./@radix-B7OY3d6N.js";import{ad as Z,ae as q,af as H,ag as G,ah as K,a7 as x,aM as X,z as l,T as J,E as W,G as Y,X as ee,H as te,I as O,V as se,f as k,aN as re,r as E,i as ae,j as ne,n as ie}from"./index-D25WcEJJ.js";import{b as m,C as oe,u as ce,F as le}from"./index.esm-C5jC4e7W.js";import{c as de}from"./index-Cf1Ph5ra.js";import{s as me}from"./url-1R6qfphK.js";import{h as pe,i as ue,a as he,c as xe}from"./@tanstack-W1pLDzVg.js";import{d as fe}from"./index-4aOgYud0.js";import{R as ge,a as je,u as ke}from"./create-stack-BdNm_XEl.js";import{C as be}from"./CodeSnippet-CK2z-88v.js";import{s as ye}from"./sharedSchema-BE8kPXOv.js";import{C as R}from"./stack-detail-query-B2rvP4uR.js";import{D as ve}from"./DisplayDate-CZV8x8pB.js";import{I as Ne}from"./InlineAvatar-B9O7QxVo.js";import{S as we}from"./check-circle-ByvKqRS_.js";import{L as Se,b as Ce}from"./@react-router-CiF9laDg.js";import{s as Le}from"./index-BOeKQ3N4.js";import{w as _e}from"./index-6CSA2ij5.js";import{t as Te}from"./zod-C2FdaFLe.js";import"./@reactflow-DgwdIYyq.js";import"./copy-DmyMnHSy.js";import"./layout-Cj7MRWSi.js";import"./rocket-GOlMupOS.js";const U=d.forwardRef(({closeModal:t,type:s,children:r,...n},i)=>e.jsxs(Z,{children:[e.jsx(q,{asChild:!0,children:r}),e.jsxs(H,{className:"max-w-2xl",...n,ref:i,children:[e.jsx(G,{children:e.jsx(K,{children:"Create New "})}),e.jsx("div",{className:"space-y-5 overflow-auto p-7",children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:["Create a new ",x(s)]}),e.jsx(be,{codeClasses:"whitespace-pre-wrap",wrap:!0,code:`zenml ${X(s)} register ${s.toUpperCase()}_NAME --flavor=${s.toUpperCase()}_FLAVOR [--${s.toUpperCase()}_OPTIONS]`})]})})]})]}));U.displayName="UpdateStackDialog";const y=["orchestrator","artifact_store","container_registry","step_operator","model_deployer","feature_store","experiment_tracker","alerter","annotator","data_validator","image_builder","model_registry"],b=l.object({id:l.string().trim().min(1),name:l.string().trim().min(1),logoUrl:l.string().trim().min(1)}),ze=y.reduce((t,s)=>(t[s]=b.nullable(),t),{}),Me=l.object({stackName:ye,components:l.object({...ze,orchestrator:b,artifact_store:b})}),w={helpLink:"https://docs.zenml.io/stack-components/orchestrators",description:"An orchestrator is a special kind of backend that manages the running of each step of the pipeline. Orchestrators administer the actual pipeline runs. By default, ZenML initializes your repository with an orchestrator that runs everything on your local machine."},S={helpLink:"https://docs.zenml.io/stack-components/artifact-stores",description:"The Artifact Store is a central component in any MLOps stack. As the name suggests, it acts as a data persistence layer where artifacts (e.g. datasets, models) ingested or generated by the machine learning pipelines are stored."},C={helpLink:"https://docs.zenml.io/stack-components/container-registries",description:"Container registry is used to store container images that are built to run machine learning pipelines in remote environments. Containerization of the pipeline code creates a portable environment that allows code to run in an isolated manner."},L={description:"Step operators allow you to run individual steps in a custom environment different from the default one used by your active orchestrator.",helpLink:"https://docs.zenml.io/stack-components/step-operators"},_={description:"Model deployers are stack components responsible for online model serving. They are responsible for deploying models to a remote server. Model deployers also act as a registry for models that are served with ZenML.",helpLink:"https://docs.zenml.io/stack-components/model-deployers"},T={description:"ZenML supports connecting to a Redis-backed Feast feature store as a stack component integration.",helpLink:"https://docs.zenml.io/stack-components/feature-stores"},z={description:"Experiment trackers let you track your ML experiments by logging the parameters and allowing you to compare between different runs.",helpLink:"https://docs.zenml.io/stack-components/experiment-trackers"},M={description:"Alerters allow you to send messages to chat services (like Slack, Discord, Mattermost, etc.) from within your pipelines. This is useful to immediately get notified when failures happen, for general monitoring/reporting, and also for building human-in-the-loop ML.",helpLink:"https://docs.zenml.io/stack-components/alerters "},F={description:"Annotators are a stack component that enables the use of data annotation as part of your ZenML stack and pipelines.",helpLink:"https://docs.zenml.io/stack-components/annotators"},I={description:"Data Validators used in ZenML pipelines usually generate data profiles and data quality check reports that are versioned and stored in the Artifact Store and can be retrieved and visualized later.",helpLink:"https://docs.zenml.io/stack-components/data-validators"},D={description:"The image builder is an essential part of most remote MLOps stacks. It is used to build container images such that your machine-learning pipelines and steps can be executed in remote environments.",helpLink:"https://docs.zenml.io/stack-components/image-builders"},A={description:"Model registries are centralized storage solutions for managing and tracking machine learning models across various stages of development and deployment.",helpLink:"https://docs.zenml.io/stack-components/model-registries"};function Fe({type:t}){const{description:s,link:r}=Ie(t);return e.jsx(J,{children:e.jsxs(W,{delayDuration:200,children:[e.jsxs(Y,{children:[e.jsx(ee,{className:"h-4 w-4 shrink-0 fill-theme-text-tertiary"}),e.jsxs("div",{className:"sr-only",children:["Info for ",t]})]}),e.jsxs(te,{align:"start",side:"bottom",className:"flex max-w-xl flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:s}),e.jsx("a",{className:"link mt-2 text-primary-400",target:"_blank",href:r,children:"Learn more"})]})]})})}function Ie(t){switch(t){case"orchestrator":return{description:w.description,link:w.helpLink};case"alerter":return{description:M.description,link:M.helpLink};case"annotator":return{description:F.description,link:F.helpLink};case"artifact_store":return{description:S.description,link:S.helpLink};case"container_registry":return{description:C.description,link:C.helpLink};case"data_validator":return{description:I.description,link:I.helpLink};case"experiment_tracker":return{description:z.description,link:z.helpLink};case"feature_store":return{description:T.description,link:T.helpLink};case"image_builder":return{description:D.description,link:D.helpLink};case"model_deployer":return{description:_.description,link:_.helpLink};case"model_registry":return{description:A.description,link:A.helpLink};case"step_operator":return{description:L.description,link:L.helpLink}}}function De(){return e.jsxs(e.Fragment,{children:[y.map(t=>e.jsx(N,{className:"h-full space-y-5 p-5",value:t,children:e.jsx(Oe,{type:t})},t)),e.jsx(N,{className:"h-full",value:"",children:e.jsx("div",{className:"flex h-full w-full items-center justify-center text-theme-text-tertiary",children:"Select a category to add a new component"})})]})}function Ae({type:t,search:s}){const r=pe({...de.componentListInfinite({sort_by:"desc:updated",type:t,...s?{name:`contains:${s}`}:{}})}),{control:n,watch:i,setValue:c}=m();return r.isError?e.jsx("p",{children:"Error while fetching Components"}):r.isPending?e.jsx("div",{className:"flex w-full flex-1 items-center justify-center",children:e.jsx(se,{})}):e.jsxs("div",{className:"space-y-1",children:[e.jsx("ul",{className:"space-y-1",children:r.data.pages.map(o=>o.items.map(a=>e.jsx("li",{children:e.jsx(oe,{name:`components.${t}.id`,control:n,render:({field:{onChange:g,...j}})=>{var p,u,f,h;return e.jsxs(ge,{className:"justify-between bg-theme-surface-primary font-medium","data-state":i(`components.${t}.id`)===a.id?"selected":"unselected",htmlFor:a.id,children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(je,{...j,id:a.id,type:"radio",value:a.id,onChange:P=>{var v;c(`components.${t}.name`,a.name),c(`components.${t}.logoUrl`,((v=a.body)==null?void 0:v.logo_url)||""),g(P)},checked:i(`components.${t}.id`)===a.id,name:t}),e.jsx("img",{alt:"flavor icon",src:me(((p=a.body)==null?void 0:p.logo_url)||""),width:24,height:24}),e.jsxs("div",{className:"min-w-0 truncate",children:[e.jsx("div",{className:"truncate font-semibold",children:a.name}),e.jsx("div",{className:"truncate text-text-xs text-theme-text-secondary",children:a.id.split("-")[0]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-text-sm",children:[((f=(u=a.body)==null?void 0:u.user)==null?void 0:f.name)&&e.jsx(Ne,{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(ve,{short:!0,dateString:a.body.updated})})]})]})}})},a.id)))}),e.jsx(Re,{type:t}),r.hasNextPage&&e.jsx(k,{onClick:()=>r.fetchNextPage(),type:"button",size:"md",intent:"secondary",emphasis:"subtle",className:"flex w-full items-center justify-center bg-theme-surface-primary",children:e.jsxs("div",{className:"flex items-center gap-1",children:[r.isFetchingNextPage&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Load more"]})})]})}function $e({type:t}){return e.jsxs("section",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(R,{className:"h-5 w-5 fill-primary-400",type:t}),e.jsx("h2",{className:"text-text-lg font-semibold",children:x(t)}),e.jsx(Fe,{type:t})]}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Select a existing ",re(t)," from your server:"]})]})}function Oe({type:t}){const[s,r]=d.useState("");return e.jsxs(e.Fragment,{children:[e.jsx($e,{type:t}),e.jsx(Ee,{search:s,setSearch:r}),e.jsx(Ae,{search:s,type:t})]})}function Ee({setSearch:t,search:s}){const[r,n]=d.useState(s),i=d.useCallback(fe(t,500),[]);d.useEffect(()=>()=>{i.cancel()},[i]);function c(o){n(o),i(o)}return e.jsx(O,{value:r,onChange:o=>c(o.target.value),placeholder:"Search..."})}function Re({type:t}){return e.jsx(U,{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 Ue({type:t}){const{watch:s,formState:{errors:r}}=m(),n=s(`components.${t}`),i=n&&n.id;return e.jsx("div",{"data-error":!i&&r.components&&r.components[t]?"true":"false","data-filled":i?"true":"false",className:"flex h-[110px] flex-col items-center justify-center space-y-2 truncate whitespace-nowrap rounded-md border border-theme-border-moderate bg-theme-surface-secondary py-5 text-center text-text-sm text-theme-text-secondary transition-all duration-150 hover:bg-theme-surface-primary hover:shadow-sm data-[error=true]:border-theme-text-error data-[filled=true]:border-success-400 data-[filled=true]:bg-theme-surface-primary data-[state=active]:bg-theme-surface-primary group-data-[state=active]/trigger:bg-theme-surface-primary group-data-[state=active]/trigger:shadow-md data-[error=false]:data-[filled=false]:group-data-[state=active]/trigger:border-theme-border-bold",children:i?e.jsx(Pe,{type:t}):e.jsx(Qe,{type:t})})}function Pe({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 Qe({type:t}){return e.jsxs(e.Fragment,{children:[e.jsx(R,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong",type:t}),e.jsx("span",{children:x(t)})]})}function Be(){return e.jsxs("div",{className:"flex h-full flex-col justify-between space-y-5",children:[e.jsxs("div",{className:"space-y-5 p-5",children:[e.jsx(qe,{}),e.jsx(Ve,{})]}),e.jsx(Ze,{})]})}function Ve(){const{watch:t,resetField:s}=m();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-text-lg font-semibold",children:"Add Components"}),e.jsxs("p",{className:"text-theme-text-secondary",children:["All stacks have at minimum an orchestrator and an artifact store."," ",e.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://docs.zenml.io/stack-components/component-guide",className:"link text-primary-400",children:"Learn more"})]})]}),e.jsx(Q,{children:e.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-4",children:y.map(r=>e.jsxs("div",{className:"relative",children:[e.jsx(B,{className:"group/trigger w-full",value:r,children:e.jsx(Ue,{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(we,{className:"h-5 w-5 shrink-0 fill-success-400"})})]},r))})})]})}function Ze(){const{formState:{isSubmitting:t}}=m(),s=!!ue();return e.jsxs("div",{className:"flex items-center justify-end space-x-2 border-t border-theme-border-moderate p-5",children:[e.jsx(k,{asChild:!0,intent:"secondary",size:"md",children:e.jsx(Se,{to:E.stacks.create.index,children:"Cancel"})}),e.jsxs(k,{className:"flex items-center gap-1",disabled:t||s,size:"md",children:[(s||t)&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Register Stack"]})]})}function qe(){var r;const{register:t,formState:{errors:s}}=m();return e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-text-sm",htmlFor:"stack-name",children:"Stack Name"}),e.jsx(O,{id:"stack-name",className:`${s.stackName?"border-red-500":""} w-full`,placeholder:"zenml-stack",...t("stackName")}),s.stackName&&e.jsx("p",{className:"text-text-xs text-red-500",children:(r=s.stackName.message)==null?void 0:r.toString()})]})}function He(){const t=he({..._e.workspaceDetail("default")}),{toast:s}=ae(),r=Ce(),n=xe(),i=ke({onSuccess:async()=>{n.invalidateQueries({queryKey:Le.all}),r(E.stacks.overview)},onError:a=>{s({status:"error",emphasis:"subtle",icon:e.jsx(ne,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:a.message,rounded:!0})}});function c(a){var p;const g=Object.entries(a.components).reduce((u,[f,h])=>(h&&(u[f]=[h.id]),u),{}),j={name:a.stackName,components:g};i.mutate({workspaceId:((p=t.data)==null?void 0:p.id)||"",payload:j})}const o=ce({resolver:Te(Me),defaultValues:{components:{alerter:null,orchestrator:{},annotator:null,artifact_store:{},container_registry:null,data_validator:null,experiment_tracker:null,feature_store:null,model_registry:null,image_builder:null,model_deployer:null,step_operator:null},stackName:""}});return{createManualStack:c,form:o}}function ft(){const[t,s]=d.useState(""),{createManualStack:r,form:n}=He();return e.jsx(le,{...n,children:e.jsx(V,{value:t,onValueChange:s,className:"h-full",children:e.jsxs("form",{onSubmit:n.handleSubmit(r),className:"flex h-[calc(100vh_-_4rem_-_4rem_-_2px)] flex-1 flex-col divide-y divide-theme-border-moderate xl:flex-row-reverse xl:divide-x xl:divide-y-0 xl:divide-x-reverse",children:[e.jsx($,{className:"h-full flex-1 bg-theme-surface-primary",children:e.jsx(Be,{})}),e.jsx($,{children:e.jsx(De,{})})]})})})}function $({className:t,...s}){return e.jsx("div",{className:ie("w-full overflow-y-auto xl:w-1/2",t),...s})}export{ft as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as l,j as e}from"./@radix-DeK6qiuw.js";import{u as m,S as I,C as x,P as f,W as B,L as M}from"./ProviderRadio-B81Elxrc.js";import{p as C,s as A,c as k}from"./persist-DBTFy--v.js";import{I as b}from"./Infobox-OQdkCLSP.js";import{W as v,H as g,B as y,S as N}from"./WizardFooter-_1VSMZ_c.js";import{t as z}from"./zod-BwEbpOxH.js";import{f as u,aE as F,S as P,r as Z,z as _}from"./index-CxO6541P.js";import{u as T,F as L,b as E}from"./index.esm-Dy6Z9Ung.js";import{R as V,a as H,E as O,C as $}from"./Partials-MD3e95Dk.js";import{a as G,d as Q}from"./persist-K7AY0ju4.js";import{S as Y}from"./link-external-b9AXw_sW.js";import{S as q}from"./logs-WMSM52RF.js";import{C as j}from"./CodeSnippet-Qh1ae_DJ.js";import{N as w}from"./NumberBox-Dtp3J6g5.js";import{s as W}from"./index-Ceyzb1yI.js";import{a as D}from"./@tanstack-DT5WLu9C.js";import{b as J}from"./@react-router-B3Z5rLr2.js";import{C as h}from"./ProviderIcon-DfDUOeAy.js";import"./Tick-DSYBiuXU.js";import"./check-DloQpStc.js";import"./@reactflow-6JPoencd.js";import"./package-C6uypY4h.js";import"./ComponentBadge-BqQNUZgb.js";import"./stack-detail-query-DMJoxwgv.js";import"./layout-BtHBmE4w.js";import"./rocket-DjT2cDvG.js";import"./sharedSchema-xJDsJNgJ.js";import"./copy-C8XQA2Ug.js";import"./url-BWJXzuI4.js";import"./gcp-CFtm4BA7.js";const R=l.createContext(null);function K({children:r}){const{setCurrentStep:t}=m(),[i,s]=l.useState({}),[o,c]=l.useState("");return l.useEffect(()=>{const{success:a,data:n}=C();if(a){t(3),s({location:n.location,provider:n.provider,stackName:n.stackName}),c(n.timestamp);return}t(1)},[C]),e.jsx(R.Provider,{value:{data:i,setData:s,timestamp:o,setTimestamp:c},children:r})}function d(){const r=l.useContext(R);if(r===null)throw new Error("useCreateTerraformContext must be used within an CreateTerraformContext");return r}function U(){const{setData:r,data:t,setTimestamp:i}=d(),{setCurrentStep:s}=m(),o=T({resolver:z(G,{async:!0}),defaultValues:{region:t.location||"",stackName:t.stackName||""}});function c(a){const n=new Date().toISOString().slice(0,-1);A({location:a.region,provider:t.provider||"aws",stackName:a.stackName,timestamp:n}),i(n),r(p=>({...p,location:a.region,stackName:a.stackName})),s(p=>p+1)}return e.jsx(L,{...o,children:e.jsxs(v,{children:[e.jsx(g,{children:"Review Stack Configuration"}),e.jsx(y,{children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs(b,{className:"text-text-sm",children:[e.jsx("p",{className:"font-semibold",children:"Important"}),e.jsx("p",{children:"This will create new resources in your account. Ensure you have the necessary permissions and are aware of any potential costs."})]}),e.jsxs("form",{id:"configuration-form",onSubmit:o.handleSubmit(c),className:"space-y-5",children:[e.jsx(V,{provider:t.provider||"aws"}),e.jsx(I,{})]}),e.jsx(H,{provider:t.provider||"aws"}),e.jsx(O,{provider:t.provider||"aws"})]})}),e.jsx(N,{children:e.jsx(X,{})})]})})}function X(){const{formState:{isSubmitting:r}}=E();return e.jsx(u,{disabled:r,form:"configuration-form",size:"md",children:"Next"})}function ee(){return e.jsxs("div",{className:"space-y-5",children:[e.jsx("div",{className:"space-y-1",children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(w,{children:"3"}),e.jsx("span",{className:"text-text-lg font-semibold",children:"Run the following commands"})]})}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Initialize the Terraform configuration."}),e.jsx(j,{code:"terraform init --upgrade"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Run terraform apply to deploy the ZenML stack to Azure."}),e.jsx(j,{code:"terraform apply"})]})]})}function re(){const{data:r,timestamp:t}=d(),{setCurrentStep:i}=m(),s=D({...W.stackDeploymentStack({provider:r.provider,stack_name:r.stackName,date_start:t,terraform:!0}),refetchInterval:5e3,throwOnError:!0});return l.useEffect(()=>{s.data&&(k(),i(o=>o+1))},[s.data]),{fullstackDeployment:s,data:r}}function te(){const{fullstackDeployment:r,data:t}=re();return r.isError?e.jsx("p",{children:"Error fetching Terraform Command"}):r.isPending?e.jsx(P,{className:"h-[200px] w-full"}):e.jsx(ae,{provider:t.provider||"aws",stackName:t.stackName||""})}function se(){return e.jsxs("section",{className:"space-y-5 border-t border-theme-border-moderate pt-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(F,{className:"h-5 w-5 fill-primary-400"}),"Waiting for your Terraform script to finish..."]}),e.jsx("p",{className:"text-theme-text-secondary",children:"We are detecting whether your Terraform script ran through successfully. Once the terraform script has finished successfully, come back to check your brand new stack and components ready."})]}),e.jsx(te,{})]})}function ae({stackName:r,provider:t}){return e.jsxs("div",{className:"relative overflow-hidden rounded-md",children:[e.jsx("div",{className:"absolute z-50 h-full w-full bg-neutral-50/50"}),e.jsx($,{type:t,componentProps:{isLoading:!0,isSuccess:!1,stackName:r}})]})}function oe(){return e.jsxs(v,{children:[e.jsx(g,{children:"Deploy ZenML Stack"}),e.jsx(y,{children:e.jsxs("section",{className:"space-y-5",children:[e.jsx(ne,{}),e.jsx(de,{}),e.jsx(me,{}),e.jsx(ee,{}),e.jsx(se,{})]})}),e.jsxs(N,{displayCancel:!1,children:[e.jsx(pe,{}),e.jsx(ie,{})]})]})}function ie(){return e.jsx(u,{disabled:!0,size:"md",children:"Next"})}function ne(){return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(q,{className:"h-5 w-5 fill-primary-400"}),"Configuration"]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Follow the steps to deploy your Stack."})]})}function ce(r){switch(r){case"aws":return"https://aws.amazon.com/cli/";case"azure":return"https://learn.microsoft.com/en-us/cli/azure/";case"gcp":return"https://cloud.google.com/sdk/gcloud"}}function le(r){switch(r){case"aws":return"AWS";case"gcp":return"gcloud";case"azure":return"Azure"}}function de(){const{data:r}=d();return e.jsx("div",{className:"space-y-5",children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(w,{children:"1"}),e.jsxs("span",{className:"text-text-lg font-semibold",children:["Login locally with the ",le(r.provider||"aws")," CLI"]})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Make sure you are logged in locally with an account with appropriate permissions."}),e.jsx(u,{asChild:!0,className:"w-fit gap-1",intent:"secondary",emphasis:"subtle",size:"md",children:e.jsxs("a",{rel:"noopener noreferrer",target:"_blank",href:ce(r.provider||"aws"),children:[e.jsx("span",{children:"Learn More"}),e.jsx(Y,{className:"h-5 w-5 shrink-0 fill-primary-900"})]})})]})})}function me(){const{data:r}=d();return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(w,{children:"2"}),e.jsx("span",{className:"text-text-lg font-semibold",children:"Create a file with the following configuration"})]}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Create a file named ",e.jsx("code",{className:"font-mono text-primary-400",children:"main.tf"})," in the Cloud Shell and copy and paste the Terraform configuration below into it."]})]}),r.provider==="gcp"&&e.jsxs(b,{intent:"warning",children:["Please replace ",e.jsx("code",{className:"font-mono text-primary-400",children:"project_id"})," in the following Terraform script with your own one."]}),e.jsx(ue,{})]})}function ue(){const{data:r}=d(),t=D({...W.stackDeploymentConfig({provider:r.provider||"aws",terraform:!0,stack_name:r.stackName,location:r.location}),enabled:!!r.stackName});return t.isError?null:t.isPending?e.jsx(P,{className:"h-[200px] w-full"}):e.jsx(j,{fullWidth:!0,highlightCode:!0,codeClasses:"whitespace-pre-wrap word-break-all",wrap:!0,code:t.data.configuration||""})}function pe(){const r=J();function t(){k(),r(Z.stacks.create.index)}return e.jsx(u,{onClick:()=>t(),intent:"secondary",size:"md",children:"Cancel"})}const xe=_.object({provider:Q});function fe(){const{setData:r,data:t}=d(),{setCurrentStep:i}=m(),s=T({resolver:z(xe),defaultValues:{provider:t.provider||void 0}});function o(c){r(a=>({...a,provider:c.provider})),i(a=>a+1)}return e.jsx(L,{...s,children:e.jsxs(v,{children:[e.jsx(g,{children:"New Cloud infrastructure"}),e.jsx(y,{children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-lg font-semibold",children:"Select a Cloud Provider"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Select the cloud provider where your want to create your infrastructure. You will be able to remove the ZenML stack at any time."})]}),e.jsxs("form",{id:"provider-form",onSubmit:s.handleSubmit(o),className:"grid grid-cols-1 gap-3 xl:grid-cols-3",children:[e.jsx(x,{id:"aws-provider",...s.register("provider"),value:"aws",children:e.jsx(f,{icon:e.jsx(h,{provider:"aws",className:"h-6 w-6 shrink-0"}),title:"AWS",subtitle:"Connect your existing S3, ECR, and Sagemaker components to ZenML"})}),e.jsx(x,{id:"gcp-provider",...s.register("provider"),value:"gcp",children:e.jsx(f,{icon:e.jsx(h,{provider:"gcp",className:"h-6 w-6 shrink-0"}),title:"GCP",subtitle:"Link your GCS, Artifact Registry, and Vertex AI components to ZenML"})}),e.jsx(x,{id:"azure-provider",...s.register("provider"),value:"azure",children:e.jsx(f,{icon:e.jsx(h,{provider:"azure",className:"h-6 w-6 shrink-0"}),title:"Azure",subtitle:"Integrate ZenML with your Blob Storage, Container Registry, and Azure ML"})})]})]})}),e.jsx(N,{children:e.jsx(he,{})})]})})}function he(){const{formState:{isValid:r}}=E();return e.jsx(u,{form:"provider-form",disabled:!r,size:"md",children:"Next"})}function je(){const{currentStep:r}=m();if(r===1)return e.jsx(fe,{});if(r===2)return e.jsx(U,{});if(r===3)return e.jsx(oe,{})}const S=["Infrastructure Type","Cloud Provider","Review Configuration","Deploy Stack"];function Ye(){return e.jsx(B,{maxSteps:S.length,initialStep:0,children:e.jsx(K,{children:e.jsxs("section",{className:"layout-container flex flex-col gap-5 py-5 xl:flex-row",children:[e.jsx(M,{entries:S}),e.jsx("div",{className:"w-full overflow-y-hidden",children:e.jsx(je,{})})]})})})}export{Ye as default};
|
1
|
+
import{r as l,j as e}from"./@radix-B7OY3d6N.js";import{u as m,S as I,C as x,P as f,W as B,L as M}from"./ProviderRadio-C9z7SJnN.js";import{p as C,s as A,c as k}from"./persist-Hxrm9o7f.js";import{I as b}from"./Infobox-Ls_918eD.js";import{W as v,H as g,B as y,S as N}from"./WizardFooter-CPk11vwc.js";import{t as z}from"./zod-C2FdaFLe.js";import{f as u,aG as F,S as P,r as Z,z as _}from"./index-D25WcEJJ.js";import{u as T,F as L,b as W}from"./index.esm-C5jC4e7W.js";import{R as V,a as G,E as H,C as O}from"./Partials-CP_ZenWO.js";import{a as $,d as Q}from"./persist-CDPcIIlF.js";import{S as Y}from"./link-external-CZxZlXqi.js";import{S as q}from"./logs-DYV_bf7Q.js";import{C as j}from"./CodeSnippet-CK2z-88v.js";import{N as w}from"./NumberBox-CqUodACv.js";import{s as E}from"./index-BOeKQ3N4.js";import{a as D}from"./@tanstack-W1pLDzVg.js";import{b as J}from"./@react-router-CiF9laDg.js";import{C as h}from"./ProviderIcon-C_XK4oaW.js";import"./Tick-DHVI3HP0.js";import"./check-BB0dVtdW.js";import"./@reactflow-DgwdIYyq.js";import"./package-MUwoWZFx.js";import"./ComponentBadge-CNIM1NH_.js";import"./stack-detail-query-B2rvP4uR.js";import"./layout-Cj7MRWSi.js";import"./rocket-GOlMupOS.js";import"./sharedSchema-BE8kPXOv.js";import"./copy-DmyMnHSy.js";import"./url-1R6qfphK.js";import"./gcp-B1H0QrG5.js";const R=l.createContext(null);function K({children:r}){const{setCurrentStep:t}=m(),[i,s]=l.useState({}),[o,c]=l.useState("");return l.useEffect(()=>{const{success:a,data:n}=C();if(a){t(3),s({location:n.location,provider:n.provider,stackName:n.stackName}),c(n.timestamp);return}t(1)},[C]),e.jsx(R.Provider,{value:{data:i,setData:s,timestamp:o,setTimestamp:c},children:r})}function d(){const r=l.useContext(R);if(r===null)throw new Error("useCreateTerraformContext must be used within an CreateTerraformContext");return r}function U(){const{setData:r,data:t,setTimestamp:i}=d(),{setCurrentStep:s}=m(),o=T({resolver:z($,{async:!0}),defaultValues:{region:t.location||"",stackName:t.stackName||""}});function c(a){const n=new Date().toISOString().slice(0,-1);A({location:a.region,provider:t.provider||"aws",stackName:a.stackName,timestamp:n}),i(n),r(p=>({...p,location:a.region,stackName:a.stackName})),s(p=>p+1)}return e.jsx(L,{...o,children:e.jsxs(v,{children:[e.jsx(g,{children:"Review Stack Configuration"}),e.jsx(y,{children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs(b,{className:"text-text-sm",children:[e.jsx("p",{className:"font-semibold",children:"Important"}),e.jsx("p",{children:"This will create new resources in your account. Ensure you have the necessary permissions and are aware of any potential costs."})]}),e.jsxs("form",{id:"configuration-form",onSubmit:o.handleSubmit(c),className:"space-y-5",children:[e.jsx(V,{provider:t.provider||"aws"}),e.jsx(I,{})]}),e.jsx(G,{provider:t.provider||"aws"}),e.jsx(H,{provider:t.provider||"aws"})]})}),e.jsx(N,{children:e.jsx(X,{})})]})})}function X(){const{formState:{isSubmitting:r}}=W();return e.jsx(u,{disabled:r,form:"configuration-form",size:"md",children:"Next"})}function ee(){return e.jsxs("div",{className:"space-y-5",children:[e.jsx("div",{className:"space-y-1",children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(w,{children:"3"}),e.jsx("span",{className:"text-text-lg font-semibold",children:"Run the following commands"})]})}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Initialize the Terraform configuration."}),e.jsx(j,{code:"terraform init --upgrade"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Run terraform apply to deploy the ZenML stack to Azure."}),e.jsx(j,{code:"terraform apply"})]})]})}function re(){const{data:r,timestamp:t}=d(),{setCurrentStep:i}=m(),s=D({...E.stackDeploymentStack({provider:r.provider,stack_name:r.stackName,date_start:t,terraform:!0}),refetchInterval:5e3,throwOnError:!0});return l.useEffect(()=>{s.data&&(k(),i(o=>o+1))},[s.data]),{fullstackDeployment:s,data:r}}function te(){const{fullstackDeployment:r,data:t}=re();return r.isError?e.jsx("p",{children:"Error fetching Terraform Command"}):r.isPending?e.jsx(P,{className:"h-[200px] w-full"}):e.jsx(ae,{provider:t.provider||"aws",stackName:t.stackName||""})}function se(){return e.jsxs("section",{className:"space-y-5 border-t border-theme-border-moderate pt-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(F,{className:"h-5 w-5 fill-primary-400"}),"Waiting for your Terraform script to finish..."]}),e.jsx("p",{className:"text-theme-text-secondary",children:"We are detecting whether your Terraform script ran through successfully. Once the terraform script has finished successfully, come back to check your brand new stack and components ready."})]}),e.jsx(te,{})]})}function ae({stackName:r,provider:t}){return e.jsxs("div",{className:"relative overflow-hidden rounded-md",children:[e.jsx("div",{className:"absolute z-50 h-full w-full bg-neutral-50/50"}),e.jsx(O,{type:t,componentProps:{isLoading:!0,isSuccess:!1,stackName:r}})]})}function oe(){return e.jsxs(v,{children:[e.jsx(g,{children:"Deploy ZenML Stack"}),e.jsx(y,{children:e.jsxs("section",{className:"space-y-5",children:[e.jsx(ne,{}),e.jsx(de,{}),e.jsx(me,{}),e.jsx(ee,{}),e.jsx(se,{})]})}),e.jsxs(N,{displayCancel:!1,children:[e.jsx(pe,{}),e.jsx(ie,{})]})]})}function ie(){return e.jsx(u,{disabled:!0,size:"md",children:"Next"})}function ne(){return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(q,{className:"h-5 w-5 fill-primary-400"}),"Configuration"]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Follow the steps to deploy your Stack."})]})}function ce(r){switch(r){case"aws":return"https://aws.amazon.com/cli/";case"azure":return"https://learn.microsoft.com/en-us/cli/azure/";case"gcp":return"https://cloud.google.com/sdk/gcloud"}}function le(r){switch(r){case"aws":return"AWS";case"gcp":return"gcloud";case"azure":return"Azure"}}function de(){const{data:r}=d();return e.jsx("div",{className:"space-y-5",children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(w,{children:"1"}),e.jsxs("span",{className:"text-text-lg font-semibold",children:["Login locally with the ",le(r.provider||"aws")," CLI"]})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Make sure you are logged in locally with an account with appropriate permissions."}),e.jsx(u,{asChild:!0,className:"w-fit gap-1",intent:"secondary",emphasis:"subtle",size:"md",children:e.jsxs("a",{rel:"noopener noreferrer",target:"_blank",href:ce(r.provider||"aws"),children:[e.jsx("span",{children:"Learn More"}),e.jsx(Y,{className:"h-5 w-5 shrink-0 fill-primary-900"})]})})]})})}function me(){const{data:r}=d();return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(w,{children:"2"}),e.jsx("span",{className:"text-text-lg font-semibold",children:"Create a file with the following configuration"})]}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Create a file named ",e.jsx("code",{className:"font-mono text-primary-400",children:"main.tf"})," in the Cloud Shell and copy and paste the Terraform configuration below into it."]})]}),r.provider==="gcp"&&e.jsxs(b,{intent:"warning",children:["Please replace ",e.jsx("code",{className:"font-mono text-primary-400",children:"project_id"})," in the following Terraform script with your own one."]}),e.jsx(ue,{})]})}function ue(){const{data:r}=d(),t=D({...E.stackDeploymentConfig({provider:r.provider||"aws",terraform:!0,stack_name:r.stackName,location:r.location}),enabled:!!r.stackName});return t.isError?null:t.isPending?e.jsx(P,{className:"h-[200px] w-full"}):e.jsx(j,{fullWidth:!0,highlightCode:!0,codeClasses:"whitespace-pre-wrap word-break-all",wrap:!0,code:t.data.configuration||""})}function pe(){const r=J();function t(){k(),r(Z.stacks.create.index)}return e.jsx(u,{onClick:()=>t(),intent:"secondary",size:"md",children:"Cancel"})}const xe=_.object({provider:Q});function fe(){const{setData:r,data:t}=d(),{setCurrentStep:i}=m(),s=T({resolver:z(xe),defaultValues:{provider:t.provider||void 0}});function o(c){r(a=>({...a,provider:c.provider})),i(a=>a+1)}return e.jsx(L,{...s,children:e.jsxs(v,{children:[e.jsx(g,{children:"New Cloud infrastructure"}),e.jsx(y,{children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-lg font-semibold",children:"Select a Cloud Provider"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Select the cloud provider where your want to create your infrastructure. You will be able to remove the ZenML stack at any time."})]}),e.jsxs("form",{id:"provider-form",onSubmit:s.handleSubmit(o),className:"grid grid-cols-1 gap-3 xl:grid-cols-3",children:[e.jsx(x,{id:"aws-provider",...s.register("provider"),value:"aws",children:e.jsx(f,{icon:e.jsx(h,{provider:"aws",className:"h-6 w-6 shrink-0"}),title:"AWS",subtitle:"Connect your existing S3, ECR, and Sagemaker components to ZenML"})}),e.jsx(x,{id:"gcp-provider",...s.register("provider"),value:"gcp",children:e.jsx(f,{icon:e.jsx(h,{provider:"gcp",className:"h-6 w-6 shrink-0"}),title:"GCP",subtitle:"Link your GCS, Artifact Registry, and Vertex AI components to ZenML"})}),e.jsx(x,{id:"azure-provider",...s.register("provider"),value:"azure",children:e.jsx(f,{icon:e.jsx(h,{provider:"azure",className:"h-6 w-6 shrink-0"}),title:"Azure",subtitle:"Integrate ZenML with your Blob Storage, Container Registry, and Azure ML"})})]})]})}),e.jsx(N,{children:e.jsx(he,{})})]})})}function he(){const{formState:{isValid:r}}=W();return e.jsx(u,{form:"provider-form",disabled:!r,size:"md",children:"Next"})}function je(){const{currentStep:r}=m();if(r===1)return e.jsx(fe,{});if(r===2)return e.jsx(U,{});if(r===3)return e.jsx(oe,{})}const S=["Infrastructure Type","Cloud Provider","Review Configuration","Deploy Stack"];function Ye(){return e.jsx(B,{maxSteps:S.length,initialStep:0,children:e.jsx(K,{children:e.jsxs("section",{className:"layout-container flex flex-col gap-5 py-5 xl:flex-row",children:[e.jsx(M,{entries:S}),e.jsx("div",{className:"w-full overflow-y-hidden",children:e.jsx(je,{})})]})})})}export{Ye as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{j as e,r as f}from"./@radix-
|
1
|
+
import{j as e,r as f}from"./@radix-B7OY3d6N.js";import{z as d,p as x,q as h,k as j,F as p,B as m,i as N,C as S,f as D,j as C,V as P}from"./index-D25WcEJJ.js";import{c as E}from"./@react-router-CiF9laDg.js";import{E as _}from"./EmptyState-C8-mkRwm.js";import{a as k,b as F}from"./@tanstack-W1pLDzVg.js";import{o as T}from"./url-1R6qfphK.js";import{E as I}from"./Error-DPRIglzA.js";import{t as V}from"./zod-C2FdaFLe.js";import{u as A,C as q}from"./index.esm-C5jC4e7W.js";import{S as z}from"./check-circle-ByvKqRS_.js";import"./@reactflow-DgwdIYyq.js";const B=d.object({device_id:d.string().optional(),user_code:d.string().optional()});function Y(){const[s]=E(),{device_id:t,user_code:i}=B.parse({device_id:s.get("device_id")||void 0,user_code:s.get("user_code")||void 0});return{user_code:i,device_id:t}}const K=d.object({trustDevice:d.boolean()});function L({deviceId:s,queryParams:t}){return["devices",s,t]}async function R({deviceId:s,queryParams:t}){const i=x(h.devices.detail(s)+"?"+T(t)),r=await j(i,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(!r.ok)throw new p({message:"Error while fetching Device details",status:r.status,statusText:r.statusText});return r.json()}function W(s,t){return k({queryKey:L(s),queryFn:async()=>R(s),...t})}function G({device:s}){var t,i,r,a,c,n;return e.jsx(m,{className:"w-full p-5",children:e.jsxs("dl",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("dt",{children:"IP Address"}),e.jsx("dd",{children:(t=s.body)==null?void 0:t.ip_address})]}),((i=s.metadata)==null?void 0:i.city)&&((r=s.metadata)==null?void 0:r.country)&&e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("dt",{children:"Location"}),e.jsxs("dd",{children:[(a=s.metadata)==null?void 0:a.city,", ",(c=s.metadata)==null?void 0:c.country]})]}),e.jsxs("div",{className:"flex min-w-0 items-center justify-between",children:[e.jsx("dt",{children:"Hostname"}),e.jsx("dd",{className:"truncate",children:(n=s.body)==null?void 0:n.hostname})]})]})})}async function H({deviceId:s,payload:t}){const i=x(h.devices.verify(s)),r=await j(i,{method:"PUT",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){const a=await r.json().then(c=>c.detail).catch(()=>["","Failed to verify device."]);throw new p({status:r.status,statusText:r.statusText,message:a[1]||"Failed to verify device."})}return r.json()}function J(s){return F({mutationFn:async t=>H(t),...s})}function M({deviceId:s,user_code:t,setSuccess:i}){const r=f.useId(),{handleSubmit:a,formState:{isValid:c},control:n}=A({resolver:V(K),defaultValues:{trustDevice:!1}}),{toast:l}=N(),{mutate:v,isPending:y}=J({onSuccess:()=>{i(!0)},onError:o=>{o instanceof Error&&l({status:"error",emphasis:"subtle",icon:e.jsx(C,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:o.message,rounded:!0})}});function g(o){v({deviceId:s,payload:{user_code:t,trusted_device:o.trustDevice}})}return e.jsxs("form",{onSubmit:a(g),className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(q,{control:n,name:"trustDevice",render:({field:{onChange:o,value:w}})=>e.jsx(S,{checked:w,onCheckedChange:b=>o(!!b),id:r})}),e.jsxs("label",{htmlFor:r,children:[e.jsx("p",{children:"Trust this device"}),e.jsx("p",{className:"text-theme-text-secondary",children:"We won't ask you again soon on this device."})]})]}),e.jsx(D,{disabled:y||!c,size:"md",className:"flex w-full justify-center",children:"Authorize this device"})]})}function O(){return e.jsxs(m,{className:"flex min-w-[540px] flex-col items-center justify-center space-y-7 px-7 py-9",children:[e.jsx(z,{className:"h-[120px] w-[120px] fill-theme-text-success"}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"You successfully added your device"}),e.jsx("p",{className:"text-theme-text-secondary",children:"You may close this screen and return to your CLI."})]})]})}function ce(){const{device_id:s,user_code:t}=Y(),[i,r]=f.useState(!1),{data:a,isPending:c,isError:n,error:l}=W({deviceId:s,queryParams:{user_code:t}},{enabled:!!s&&!!t});return!s||!t?e.jsx(_,{children:e.jsx("p",{children:"Invalid device verification link."})}):n?e.jsx(u,{children:e.jsx(I,{isAlertCircle:!0,err:l})}):c?e.jsx(u,{children:e.jsx(P,{})}):i?e.jsx(O,{}):e.jsx(u,{children:e.jsxs("div",{className:"w-full space-y-7",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"mb-0.5 text-display-xs font-semibold",children:"Authorize a new device"}),e.jsx("p",{className:"text-theme-text-secondary",children:"You are logging in from a new device."})]}),e.jsx(G,{device:a}),e.jsx(M,{setSuccess:r,deviceId:s,user_code:t})]})})}function u({children:s}){return e.jsx(m,{className:"flex w-full min-w-[540px] flex-col items-center justify-center gap-5 p-7",children:s})}export{ce as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{j as e}from"./@radix-B7OY3d6N.js";import{u as m,S as c,A as x,a as d,g as f,b as u,r,c as v,d as h,m as p,as as g}from"./index-D25WcEJJ.js";import{a as j,h as N,O as b}from"./@react-router-CiF9laDg.js";import{I as w}from"./InlineAvatar-B9O7QxVo.js";import"./@tanstack-W1pLDzVg.js";import"./@reactflow-DgwdIYyq.js";function y({children:s,isActiveOverride:t,...a}){const n=j(),i=t?t(n.pathname):!1;return e.jsx(N,{...a,className:({isActive:l})=>` ${i||l?"bg-primary-50 text-theme-text-brand":"hover:bg-neutral-200"} block rounded-md px-4 py-1 text-text-sm font-semibold `,children:s})}function o({items:s}){return e.jsx("nav",{className:"flex w-full flex-col items-center",children:e.jsx("ul",{className:"flex w-full flex-row flex-wrap items-center gap-1 lg:flex-col lg:items-start",children:s.map(t=>e.jsx("li",{className:"lg:w-full",children:e.jsx(y,{end:!0,to:t.href,isActiveOverride:t.isActiveOverride,children:t.name})},t.name))})})}function S(){var n,i,l;const{data:s,isError:t,isPending:a}=m({throwOnError:!0});return a?e.jsx(c,{className:"h-9 w-full"}):t?null:e.jsxs("div",{className:"flex w-full items-center gap-2 rounded-md border border-theme-border-moderate bg-theme-surface-primary p-2",children:[e.jsxs(x,{size:"md",type:"square",children:[e.jsx(d,{src:f(((n=s.body)==null?void 0:n.server_name)||"default")}),e.jsx(u,{size:"md",children:((i=s.body)==null?void 0:i.server_name[0])||"D"})]}),e.jsx("p",{className:"truncate text-text-sm font-semibold",children:(l=s.body)==null?void 0:l.server_name})]})}function A(){function s(){return[{name:"General",href:r.settings.general},{name:"Members",href:r.settings.members},{name:"API Tokens",href:r.settings.apiTokens},{name:"Repositories",href:r.settings.repositories.overview},{name:"Secrets",href:r.settings.secrets.overview,isActiveOverride:a=>a.startsWith(r.settings.secrets.overview)},{name:"Connectors",href:r.settings.connectors.overview},{name:"Service Accounts",href:r.settings.service_accounts.overview,isActiveOverride:a=>a.startsWith(r.settings.service_accounts.overview)},{name:"Notifications",href:r.settings.notifications}]}const t=s();return e.jsx(o,{items:t})}function I(){function s(){return[{name:"Profile",href:r.settings.profile}]}const t=s();return e.jsx(o,{items:t})}function k(){const{data:s,isPending:t,isError:a}=v();return t?e.jsx(c,{className:"h-[70px] w-full"}):a?null:e.jsxs("div",{className:"rounded-md border border-theme-border-moderate bg-theme-surface-primary p-3",children:[e.jsxs("div",{className:"mb-2 flex items-center",children:[e.jsx(h,{className:"h-4 w-4 fill-theme-text-brand"}),e.jsx("p",{className:"ml-2 text-text-sm font-semibold",children:"Open source"})]}),e.jsxs("p",{className:"mb-1 text-text-sm text-theme-text-tertiary",children:["ZenML v",s.version]}),e.jsxs("p",{className:"text-text-sm text-theme-text-tertiary",children:["UI Version ","v0.30.0"]})]})}function D(){const{data:s}=p();return e.jsxs("div",{className:"layout-container flex flex-col gap-7 pt-5 lg:flex-row lg:px-10",children:[e.jsxs("div",{className:"flex shrink-0 flex-col gap-4 lg:w-[200px]",children:[e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("p",{className:"text-text-xs font-semibold uppercase text-theme-text-tertiary",children:"Server"}),e.jsx(S,{}),e.jsx(A,{})]}),s?e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("p",{className:"text-text-xs font-semibold uppercase text-theme-text-tertiary",children:"Account"}),e.jsx(w,{username:g(s)})]}):e.jsx(c,{className:"h-[70px] w-full"}),e.jsx("div",{className:"flex flex-col gap-4",children:e.jsx(I,{})}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("p",{className:"text-text-xs font-semibold uppercase text-theme-text-tertiary",children:"Version"}),e.jsx(k,{})]})]}),e.jsx("div",{className:"w-full",children:e.jsx(b,{})})]})}export{D as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as i,j as s}from"./@radix-
|
1
|
+
import{r as i,j as s}from"./@radix-B7OY3d6N.js";import{z as t,h as g,i as N,I as c,f as w,j as y,r as b,B as v}from"./index-D25WcEJJ.js";import{u as S}from"./login-mutation-EQPLh5Ne.js";import{t as I}from"./zod-C2FdaFLe.js";import{u as L}from"./index.esm-C5jC4e7W.js";import{b as F,c as P}from"./@react-router-CiF9laDg.js";import"./@tanstack-W1pLDzVg.js";import"./@reactflow-DgwdIYyq.js";const E=t.object({username:t.string().min(1),password:t.string().optional()});function A(){const l=F(),{setAuthState:m}=g(),{toast:u}=N(),a=i.useId(),r=i.useId(),[o]=P(),d=o.get("redirect"),x=o.get("username")??void 0,{register:n,handleSubmit:p,formState:{isValid:h}}=L({resolver:I(E),defaultValues:{username:x}}),f=S({onError:e=>{e instanceof Error&&u({status:"error",emphasis:"subtle",icon:s.jsx(y,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:e.message,rounded:!0})},onSuccess:async()=>{m("true"),l(d||b.home)}});function j(e){f.mutate({username:e.username.trim(),password:e.password})}return s.jsxs("form",{onSubmit:p(j),className:"space-y-5",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:a,className:"text-text-sm",children:"Username"}),s.jsx(c,{...n("username"),id:a,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:r,className:"text-text-sm",children:"Password"}),s.jsx(c,{...n("password"),id:r,type:"password",className:"w-full"})]})]}),s.jsx(w,{disabled:!h,className:"w-full text-center",size:"md",children:s.jsx("span",{className:"w-full",children:"Login"})})]})}function U(){return s.jsxs(v,{className:"flex w-full max-w-[540px] flex-col gap-5 p-7",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("h1",{className:"mb-0.5 text-display-xs font-semibold",children:"Log in to your account"}),s.jsx("p",{className:"text-theme-text-secondary",children:"Please, fill in your details to log in to your ZenML account."})]}),s.jsx(A,{})]})}export{U as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as f,j as e}from"./@radix-
|
1
|
+
import{r as f,j as e}from"./@radix-B7OY3d6N.js";import{S as X,u as y,C as v,P as N,a as $,W as ee,L as te}from"./ProviderRadio-C9z7SJnN.js";import{u,R as se,a as re,E as ae,D as F,G as oe,A as ne,C as O,b as ie,N as ce}from"./Partials-CP_ZenWO.js";import{S as V,B as G,aG as de,f as le,r as T}from"./index-D25WcEJJ.js";import{c as me,b as ue}from"./@react-router-CiF9laDg.js";import{I as Y}from"./Infobox-Ls_918eD.js";import{t as H}from"./zod-C2FdaFLe.js";import{u as Q,F as pe}from"./index.esm-C5jC4e7W.js";import{a as xe,c as q,b as fe,p as he}from"./persist-CDPcIIlF.js";import{C as h}from"./ProviderIcon-C_XK4oaW.js";import{s as J}from"./index-BOeKQ3N4.js";import{a as K}from"./@tanstack-W1pLDzVg.js";import"./Tick-DHVI3HP0.js";import"./check-BB0dVtdW.js";import"./package-MUwoWZFx.js";import"./ComponentBadge-CNIM1NH_.js";import"./stack-detail-query-B2rvP4uR.js";import"./layout-Cj7MRWSi.js";import"./rocket-GOlMupOS.js";import"./logs-DYV_bf7Q.js";import"./CodeSnippet-CK2z-88v.js";import"./copy-DmyMnHSy.js";import"./NumberBox-CqUodACv.js";import"./link-external-CZxZlXqi.js";import"./@reactflow-DgwdIYyq.js";import"./sharedSchema-BE8kPXOv.js";import"./gcp-B1H0QrG5.js";import"./url-1R6qfphK.js";function je(){const{formRef:t,setIsNextButtonDisabled:s,setData:a,data:o}=u(),n=Q({resolver:H(xe),mode:"onChange",defaultValues:{region:o.location,stackName:o.stackName||""}});f.useEffect(()=>{s(!n.formState.isValid)},[n.formState.isValid,s]);function l(r){a(m=>({...m,location:r.region,stackName:r.stackName}))}return e.jsx(j,{title:"Review Stack Configuration",children:e.jsx(pe,{...n,children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs(Y,{className:"text-text-sm",children:[e.jsx("p",{className:"font-semibold",children:"Important"}),e.jsx("p",{children:"This will create new resources in your account. Ensure you have the necessary permissions and are aware of any potential costs."})]}),e.jsxs("form",{onSubmit:n.handleSubmit(l),ref:t,className:"space-y-5",children:[e.jsx(se,{provider:o.provider||"aws"}),e.jsx(X,{})]}),e.jsx(re,{provider:o.provider||"aws"}),e.jsx(ae,{provider:o.provider||"aws"})]})})})}function ve(){const{data:t,timestamp:s,setIsNextButtonDisabled:a}=u(),{setCurrentStep:o}=y(),{isPending:n,isError:l,data:r}=K({...J.stackDeploymentStack({provider:t.provider,stack_name:t.stackName,date_start:s}),refetchInterval:5e3,throwOnError:!0});return f.useEffect(()=>{r&&(q(),o(m=>m+1),a(!1))},[r]),n?e.jsx(V,{className:"h-[200px] w-full"}):l?null:e.jsxs("div",{className:"space-y-5",children:[e.jsx(Ne,{}),e.jsx(ye,{stack:r})]})}function Ne(){const{data:t}=u();return e.jsxs("section",{className:"space-y-5 border-b border-theme-border-moderate pb-5",children:[e.jsxs(G,{className:"flex items-center justify-between gap-4 px-6 py-5",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(h,{provider:t.provider,className:"h-6 w-6 shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-text-lg font-semibold",children:"Deploying the Stack..."}),e.jsx("p",{className:"text-theme-text-secondary",children:"Follow the steps in your Cloud console to finish the setup. You can come back to check once your components are deployed."})]})]}),t.provider==="azure"?e.jsx(F,{children:e.jsx("span",{children:"Deploy in Azure"})}):e.jsx(F,{})]}),t.provider==="gcp"&&e.jsx(oe,{}),t.provider==="azure"&&e.jsx(ne,{})]})}function ye({stack:t}){const s=!!t;return e.jsxs("div",{className:"space-y-5",children:[!s&&e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(de,{className:"h-5 w-5 fill-primary-400"}),"Creating your stack and components..."]}),e.jsx("p",{className:"text-theme-text-secondary",children:"We are creating your stack and stack components based on your configuration. Once you finish the setup, come back to check your brand new stack and components ready."})]}),e.jsx(Se,{isReady:s}),e.jsx(ge,{stack:t})]})}function ge({stack:t}){const s=!!t,{data:a}=u();return e.jsxs("div",{className:"relative overflow-hidden rounded-md",children:[!s&&e.jsx("div",{className:"absolute z-50 h-full w-full bg-neutral-50/50"}),e.jsx(O,{type:a.provider,componentProps:{isLoading:!s,isSuccess:s,stackName:a.stackName}})]})}function Se({isReady:t}){const[s,a]=f.useState(!1);return f.useEffect(()=>{const o=setTimeout(()=>{a(!0)},3e5);return()=>clearTimeout(o)},[]),!s||t?null:e.jsx(Y,{children:"Your stack is taking longer than usual to deploy. Please check your Cloud console, or the stacks list in ZenML."})}function ke(){return e.jsx(j,{title:"Deploy ZenML Stack",children:e.jsx(be,{})})}function be(){const{setIsNextButtonDisabled:t,isLoading:s}=u();return f.useEffect(()=>{t(!0)},[]),s?e.jsx(ve,{}):e.jsx(ie,{})}function we(){const{formRef:t,setIsNextButtonDisabled:s,setData:a,data:o}=u(),{register:n,handleSubmit:l,formState:{isValid:r}}=Q({resolver:H(fe),defaultValues:{provider:o.provider}});f.useEffect(()=>{s(!r)},[r,s]);function m(d){a(c=>({...c,provider:d.provider}))}return e.jsx(j,{title:"New Cloud Infrastructure",children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-lg font-semibold",children:"Select a Cloud Provider"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Select the cloud provider where your want to create your infrastructure and deploy your ZenML models. You will be able to remove the ZenML stack at any time."})]}),e.jsxs("form",{id:"provider-form",onSubmit:l(m),className:"grid grid-cols-1 gap-3 xl:grid-cols-3",ref:t,children:[e.jsx(v,{id:"aws-provider",...n("provider"),value:"aws",children:e.jsx(N,{icon:e.jsx(h,{provider:"aws",className:"h-6 w-6 shrink-0"}),title:"AWS",subtitle:"ZenML stack with S3, ECR, and SageMaker integration"})}),e.jsx(v,{id:"gcp-provider",...n("provider"),value:"gcp",children:e.jsx(N,{icon:e.jsx(h,{provider:"gcp",className:"h-6 w-6 shrink-0"}),title:"GCP",subtitle:"Create ZenML infrastructure using GCS, Artifact Registry, and Vertex AI"})}),e.jsx(v,{id:"azure-provider",...n("provider"),value:"azure",children:e.jsx(N,{icon:e.jsx(h,{provider:"azure",className:"h-6 w-6 shrink-0"}),title:"Azure",subtitle:"Set up ZenML with Azure Storage, Container Registry, and ML services"})})]})]})})}function Ce({provider:t,stackName:s,timestamp:a,isTerraform:o}){var g,S,k,b,w,C,P,D,I,z,L,R,B,E,W,M,_,A;const{isPending:n,isError:l,data:r}=K({...J.stackDeploymentStack({provider:t,stack_name:s,date_start:a,terraform:o}),throwOnError:!0});if(n)return e.jsx(V,{className:"h-[200px] w-full"});if(l)return null;const m=r.stack.name,d=(g=r.stack.metadata)==null?void 0:g.components.orchestrator,c=(S=r.stack.metadata)==null?void 0:S.components.artifact_store,i=(k=r.stack.metadata)==null?void 0:k.components.container_registry,p=(b=r.stack.metadata)==null?void 0:b.components.image_builder,x=(w=r.stack.metadata)==null?void 0:w.components.step_operator,U={orchestrator:{name:((C=d==null?void 0:d[0])==null?void 0:C.name)??"Orchestrator",id:((P=d==null?void 0:d[0])==null?void 0:P.id.split("-")[0])??""},artifactStore:{name:((D=c==null?void 0:c[0])==null?void 0:D.name)??"Artifact Store",id:((I=c==null?void 0:c[0])==null?void 0:I.id.split("-")[0])??""},registry:{name:((z=i==null?void 0:i[0])==null?void 0:z.name)??"Container Registry",id:((L=i==null?void 0:i[0])==null?void 0:L.id.split("-")[0])??""},connector:{name:(R=r.service_connector)==null?void 0:R.name,id:((E=(B=r.service_connector)==null?void 0:B.id)==null?void 0:E.split("-")[0])??""},imageBuilder:{name:((W=p==null?void 0:p[0])==null?void 0:W.name)??"Image Builder",id:((M=p==null?void 0:p[0])==null?void 0:M.id.split("-")[0])??""},operator:{name:((_=x==null?void 0:x[0])==null?void 0:_.name)??"Step Operator",id:((A=x==null?void 0:x[0])==null?void 0:A.id.split("-")[0])??""}};return e.jsx(O,{type:t,componentProps:{components:U,isSuccess:!0,stackName:m}})}function Pe(){const{setIsNextButtonDisabled:t,data:s,timestamp:a}=u();return t(!1),e.jsx(j,{title:"Your Stack",children:e.jsxs("div",{className:"space-y-5",children:[e.jsx("p",{className:"text-theme-text-secondary",children:"Here you can review the created stack and stack components. Now you can start running pipelines using this new configuration."}),e.jsx(Ce,{provider:s.provider||"aws",stackName:s.stackName||"",timestamp:a})]})})}function De(){const{currentStep:t}=y();if(t===1)return e.jsx(we,{});if(t===2)return e.jsx(je,{});if(t===3)return e.jsx(ke,{});if(t===4)return e.jsx(Pe,{})}function Ie(){var c;const[s]=me(),{setCurrentStep:a,currentStep:o}=y(),{formRef:n,isNextButtonDisabled:l}=u(),r=ue(),m=s.get("origin")==="onboarding";async function d(){n.current&&(n.current.requestSubmit(),await new Promise(i=>setTimeout(i,20))),a(i=>i<4?i+1:i),o===4&&(q(),r(m?T.onboarding:T.stacks.overview))}return e.jsx(le,{form:(c=n.current)==null?void 0:c.id,disabled:l,onClick:()=>d(),size:"md",children:o===4?"Finish":"Next"})}function j({children:t,title:s}){return e.jsxs(G,{className:"w-full",children:[e.jsx("div",{className:"border-b border-theme-border-moderate px-5 py-3 text-display-xs font-semibold",children:s}),e.jsx("div",{className:"p-5",children:t}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-theme-border-moderate p-5",children:[e.jsx($,{}),e.jsx(Ie,{})]})]})}const Z=["Infrastructure Type","Cloud Provider","Review Configuration","Deploy Stack"];function at(){const{success:t}=he();return e.jsx(ee,{maxSteps:Z.length,initialStep:t?3:1,children:e.jsx(ce,{children:e.jsxs("section",{className:"layout-container flex flex-col gap-5 p-5 xl:flex-row",children:[e.jsx(te,{entries:Z}),e.jsx("div",{className:"w-full overflow-y-hidden",children:e.jsx(De,{})})]})})})}export{at as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as l,j as e}from"./@radix-DeK6qiuw.js";import{p as S,q as T,k as A,s as M,F as N,i as _,t as B,v as O,f as h,D as F,w as z,x as I,C as Z,y as U,r as f,T as $,E as q,G as H,H as Q,J as V,K as D,z as c,L as G,S as y,B as K,M as J,N as W,O as X,e as Y,P as g,Q as ee,o as se,R as te}from"./index-CxO6541P.js";import{L as j,c as b,b as ae}from"./@react-router-B3Z5rLr2.js";import{S as ne}from"./refresh-BjOeWlEq.js";import{S as re,P as ie}from"./SearchField-Yjv-KRW4.js";import{q as le,b as oe,c as ce,a as de}from"./@tanstack-DT5WLu9C.js";import{o as pe}from"./url-BWJXzuI4.js";import{S as R}from"./trash-arLUMWMS.js";import{D as E,a as L}from"./DeleteAlertDialog-DrPjHtXX.js";import{C as w}from"./CopyButton-DCiXO3JC.js";import{g as me,E as ue,a as he}from"./ExecutionStatus-Ct9srgHC.js";import{S as xe}from"./dots-horizontal-otGBOSDJ.js";import{A as fe}from"./AlertDialogDropdownItem-8yPFDxEI.js";import{R as ge}from"./RunsBody-Bnx2fxub.js";import{R as je}from"./RunSelector-DOXgdry5.js";import{I as Ce}from"./Infobox-OQdkCLSP.js";import"./@reactflow-6JPoencd.js";import"./chevron-right-double-D7ojK9Co.js";import"./index-Uu49AX48.js";import"./zod-BwEbpOxH.js";import"./index.esm-Dy6Z9Ung.js";import"./copy-C8XQA2Ug.js";import"./check-circle-jNbX5-sR.js";import"./all-pipeline-runs-query-D0qDLdKB.js";import"./DisplayDate-CDMUcQHS.js";import"./InlineAvatar-CQNjKoEQ.js";import"./delete-run-CUdtYFLl.js";const be=s=>l.createElement("svg",{viewBox:"0 0 60 60",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("g",{id:"dataflow-02"},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5 7.5C11.1193 7.5 10 8.61929 10 10C10 11.3807 11.1193 12.5 12.5 12.5C13.8807 12.5 15 11.3807 15 10C15 8.61929 13.8807 7.5 12.5 7.5ZM5 10C5 5.85786 8.35787 2.5 12.5 2.5C15.7655 2.5 18.5436 4.58702 19.5732 7.5L40.4268 7.5C41.4564 4.58702 44.2345 2.5 47.5 2.5C51.6421 2.5 55 5.85786 55 10C55 14.1421 51.6421 17.5 47.5 17.5C44.2345 17.5 41.4564 15.413 40.4268 12.5L32.5 12.5V27.5H40.4268C41.4564 24.587 44.2345 22.5 47.5 22.5C51.6421 22.5 55 25.8579 55 30C55 34.1421 51.6421 37.5 47.5 37.5C44.2345 37.5 41.4564 35.413 40.4268 32.5H32.5V38C32.5 40.1415 32.502 41.5972 32.5939 42.7224C32.6834 43.8185 32.8457 44.379 33.045 44.77C33.5243 45.7108 34.2892 46.4757 35.2301 46.955C35.6211 47.1543 36.1816 47.3166 37.2776 47.4061C38.103 47.4736 39.1062 47.4926 40.4275 47.4979C41.4577 44.586 44.2352 42.5 47.5 42.5C51.6421 42.5 55 45.8579 55 50C55 54.1421 51.6421 57.5 47.5 57.5C44.2338 57.5 41.4552 55.4121 40.4261 52.4982C39.0579 52.4929 37.8787 52.4719 36.8704 52.3895C35.4652 52.2747 34.1734 52.0283 32.9601 51.4101C31.0785 50.4513 29.5487 48.9215 28.5899 47.0399C27.9717 45.8266 27.7253 44.5348 27.6105 43.1296C27.4999 41.7766 27.5 40.1157 27.5 38.1032V12.5L19.5732 12.5C18.5436 15.413 15.7655 17.5 12.5 17.5C8.35787 17.5 5 14.1421 5 10ZM47.5 7.5C46.1193 7.5 45 8.61929 45 10C45 11.3807 46.1193 12.5 47.5 12.5C48.8807 12.5 50 11.3807 50 10C50 8.61929 48.8807 7.5 47.5 7.5ZM47.5 27.5C46.1193 27.5 45 28.6193 45 30C45 31.3807 46.1193 32.5 47.5 32.5C48.8807 32.5 50 31.3807 50 30C50 28.6193 48.8807 27.5 47.5 27.5ZM47.5 47.5C46.1193 47.5 45 48.6193 45 50C45 51.3807 46.1193 52.5 47.5 52.5C48.8807 52.5 50 51.3807 50 50C50 48.6193 48.8807 47.5 47.5 47.5Z"})));async function ve({params:s}){const a=S(T.pipelines.all+"?"+pe(s)),t=await A(a,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.status===404&&M(),!t.ok)throw new N({message:"Error while fetching pipelines",status:t.status,statusText:t.statusText});return t.json()}const v={all:["pipelines"],pipelineList:s=>le({queryKey:[...v.all,s],queryFn:async()=>ve({params:s})})};async function Pe({pipelineId:s}){const a=S(T.pipelines.detail(s)),t=await fetch(a,{method:"DELETE",credentials:"include",headers:{"Content-Type":"application/json"}});if(!t.ok){const r=await t.json().then(n=>n.detail).catch(()=>`Failed to delete pipeline ${s}`);throw new N({status:t.status,statusText:t.statusText,message:r})}return t.json()}function ye(s){return oe({mutationFn:Pe,...s})}const k=l.createContext(null);function we({children:s}){const[a,t]=l.useState([]),r=ce(),{toast:n}=_(),i=ye(),o=async d=>{try{const p=d.map(x=>i.mutateAsync({pipelineId:x}));await Promise.all(p),n({description:"Deleted successfully.",status:"success",emphasis:"subtle",rounded:!0}),await r.invalidateQueries({queryKey:v.all}),t([])}catch(p){console.error("Failed to delete some pipelines:",p)}};return e.jsx(k.Provider,{value:{selectedPipelines:a,setSelectedPipelines:t,bulkDeletePipelines:o},children:s})}function u(){const s=l.useContext(k);if(!s)throw new Error("usePipelinesSelectorContext must be used within a PipelinesSelectorProvider");return s}function Se(){const[s,a]=l.useState(!1),{bulkDeletePipelines:t,selectedPipelines:r}=u();async function n(){await t(r),a(!1)}return e.jsxs(B,{open:s,onOpenChange:a,children:[e.jsx(O,{children:e.jsxs(h,{className:"rounded-sharp border-none bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(R,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(E,{title:`Delete Pipeline${r.length>=2?"s":""}`,handleDelete:n,children:e.jsxs(L,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function Te(){const{selectedPipelines:s}=u();return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:`${s==null?void 0:s.length} Pipeline${(s==null?void 0:s.length)>1?"s":""} selected`}),e.jsx(Se,{})]})}function Ne({id:s}){const[a,t]=l.useState(!1),[r,n]=l.useState(!1),i=l.useRef(null),o=l.useRef(null),{bulkDeletePipelines:d}=u();async function p(){await d([s]),P(!1)}function x(){o.current=i.current}function P(m){if(m===!1){n(!1),setTimeout(()=>{t(m)},200);return}t(m)}return e.jsxs(F,{onOpenChange:n,open:r,children:[e.jsx(z,{ref:i,children:e.jsx(xe,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(I,{hidden:a,onCloseAutoFocus:m=>{o.current&&(o.current.focus(),o.current=null,m.preventDefault())},align:"end",sideOffset:7,children:e.jsx(fe,{onSelect:x,open:a,onOpenChange:P,triggerChildren:"Delete",icon:e.jsx(R,{fill:"red"}),children:e.jsx(E,{title:"Delete Pipeline",handleDelete:p,children:e.jsxs(L,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})})]})}const De=({id:s})=>{const{selectedPipelines:a,setSelectedPipelines:t}=u(),r=(n,i)=>{t(o=>n?[...o,i]:o.filter(d=>d!==i))};return e.jsx(Z,{id:s,onCheckedChange:n=>r(n,s),checked:a.includes(s),className:"h-3 w-3"})};function Re(){return[{id:"check",header:"",meta:{width:"1%"},cell:({row:s})=>e.jsx(De,{id:s.original.id})},{id:"name",header:"Pipeline",cell:({row:s})=>{var a,t,r;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(U,{className:`h-5 w-5 ${me((a=s.original.body)==null?void 0:a.latest_run_status)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(j,{to:f.pipelines.namespace(encodeURIComponent(s.original.name)),className:"flex items-center gap-1",children:e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:s.original.name})}),e.jsx($,{children:e.jsxs(q,{children:[e.jsx(H,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(ue,{status:(t=s.original.body)==null?void 0:t.latest_run_status})}),e.jsx(Q,{className:"z-20 capitalize",children:(r=s.original.body)==null?void 0:r.latest_run_status})]})}),e.jsx(w,{copyText:s.original.name})]}),e.jsxs(j,{to:f.pipelines.namespace(encodeURIComponent(s.original.name)),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:s.original.id.split("-")[0]}),e.jsx(w,{copyText:s.original.id})]})]})]})}},{id:"latest-run",header:"Latest Run",accessorFn:s=>{var a,t;return{status:(a=s.body)==null?void 0:a.latest_run_status,runId:(t=s.body)==null?void 0:t.latest_run_id}},cell:({getValue:s})=>{const{runId:a,status:t}=s();return!a||!t?e.jsx("div",{children:"No run"}):e.jsx(j,{to:f.runs.detail(a),children:e.jsxs(V,{emphasis:"subtle",rounded:!1,className:"inline-flex items-center gap-0.5",color:he(t),children:[e.jsx(D,{className:"h-3 w-3 fill-current"}),a==null?void 0:a.split("-")[0]]})})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:s})=>e.jsx(Ne,{id:s.original.id})}]}const C=1,Ee=c.object({page:c.coerce.number().min(C).optional().default(C).catch(C),name:c.string().optional(),operator:c.enum(["and","or"]).optional()});function Le(){const[s]=b(),{page:a,name:t,operator:r}=Ee.parse({page:s.get("page")||void 0,name:s.get("name")||void 0,operator:s.get("operator")||void 0});return{page:a,name:t,logical_operator:r}}function ke(){const s=Le(),{selectedPipelines:a}=u(),{data:t,refetch:r}=de({...v.pipelineList({...s,sort_by:"desc:latest_run"}),throwOnError:!0});return e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[a.length?e.jsx(Te,{}):e.jsx(re,{searchParams:s}),e.jsx("div",{className:"flex justify-between",children:e.jsxs(h,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>r(),children:[e.jsx(ne,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:t?e.jsx(G,{columns:Re(),data:t.items}):e.jsx(y,{className:"h-[500px] w-full"})}),t?t.total_pages>1&&e.jsx(ie,{searchParams:s,paginate:t}):e.jsx(y,{className:"h-[36px] w-[300px]"})]})]})}const Ae=c.object({tab:c.enum(["pipelines","runs","templates"]).optional().default("pipelines").catch("pipelines")});function Me(){const[s]=b(),{tab:a}=Ae.parse({tab:s.get("tab")||void 0});return a}const _e="/assets/templates-1S_8WeSK.webp";function Be(){return e.jsxs("div",{className:"layout-container space-y-5",children:[e.jsx(Oe,{}),e.jsx(ze,{})]})}function Oe(){return e.jsx(Ce,{children:e.jsxs("div",{className:"flex w-full flex-wrap items-center gap-x-2 gap-y-0.5 text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"This is a ZenML Pro feature. "}),e.jsx("p",{children:"Upgrade to ZenML Pro to access the Templates and save settings and run pipelines from the dashboard."})]})})}const Fe=["Run pipelines from the dashboard with Templates","Re-run a pipeline easily from the UI","Model and Artifact Control Plane Dashboard","Managed ZenML server on your VPC or hosted on our servers","Social SSO, RBAC, and User Management","CI/CD/CT, and more!"];function ze(){return e.jsxs(K,{className:"relative overflow-hidden px-7 py-5",children:[e.jsxs("div",{className:"max-w-[450px] space-y-4",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Access Advanced Template Features with ZenML Pro"}),e.jsx("ul",{className:"space-y-2",children:Fe.map((s,a)=>e.jsx("li",{className:"text-text-md text-theme-text-secondary",children:s},a))}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(h,{size:"md",asChild:!0,children:e.jsx("a",{href:"https://cloud.zenml.io/signup",target:"_blank",rel:"noopener noreferrer",children:"Upgrade to ZenML Pro"})}),e.jsx(h,{emphasis:"minimal",size:"md",children:e.jsx("a",{href:"https://www.zenml.io/pro",target:"_blank",rel:"noopener noreferrer",children:"Learn more"})})]})]}),e.jsx("img",{className:"absolute right-0 top-0 hidden translate-x-[30%] scale-75 md:translate-y-[30%] lg:block xl:-translate-y-[5%]",src:_e,alt:"Screenshot of Zenml Pro Templates Feature"})]})}const Ie=[{value:"pipelines",label:"Pipelines",icon:be},{value:"runs",label:"Runs",icon:D},{value:"templates",label:"Templates",icon:ee}];function Ze(){const[s]=b(),a=Me(),t=ae();l.useEffect(()=>{if(!s.get("tab")){const i=new URLSearchParams(s);i.set("tab","pipelines"),t(`?${i.toString()}`,{replace:!0})}},[t,s]);function r(n){const i=new URLSearchParams;i.set("tab",n),t(`?${i.toString()}`)}return e.jsx("div",{className:"p-5",children:e.jsxs(J,{onValueChange:r,value:a,children:[e.jsx(W,{children:Ie.map(n=>e.jsxs(X,{className:"flex items-center gap-2 text-text-md",value:n.value.toLowerCase(),children:[e.jsx(n.icon,{className:`h-5 w-5 ${a===n.value?"fill-primary-400":"fill-theme-text-tertiary"}`}),n.label,n.value==="templates"&&e.jsx(Y,{className:"rounded-sm font-semibold text-primary-500",color:"purple",size:"sm",children:"New"})]},n.value))}),e.jsx(g,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"pipelines",children:e.jsx(we,{children:e.jsx(ke,{})})}),e.jsx(g,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"runs",children:e.jsx(je,{children:e.jsx(ge,{})})}),e.jsx(g,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"templates",children:e.jsx(Be,{})})]})})}function xs(){const{setCurrentBreadcrumbData:s}=se();return l.useEffect(()=>{s({segment:"pipelines",data:null})},[]),e.jsxs("div",{children:[e.jsx(te,{children:e.jsx("h1",{className:"text-display-xs font-semibold",children:"Pipelines"})}),e.jsx(Ze,{})]})}export{xs as default};
|
1
|
+
import{r as l,j as e}from"./@radix-B7OY3d6N.js";import{p as S,q as T,k as A,s as M,F as N,i as _,t as B,v as O,f as h,D as F,w as z,x as I,C as Z,y as U,r as f,T as $,E as q,G as H,H as Q,J as V,K as D,z as c,L as G,S as y,B as K,M as J,N as W,O as X,e as Y,P as g,Q as ee,o as se,R as te}from"./index-D25WcEJJ.js";import{L as j,c as b,b as ae}from"./@react-router-CiF9laDg.js";import{S as ne}from"./refresh-Jr_advur.js";import{S as re,P as ie}from"./SearchField-BYL1oNec.js";import{q as le,b as oe,c as ce,a as de}from"./@tanstack-W1pLDzVg.js";import{o as pe}from"./url-1R6qfphK.js";import{S as R}from"./trash-Dm8g1gZ8.js";import{D as E,a as L}from"./DeleteAlertDialog-CcDX1Hm_.js";import{C as w}from"./CopyButton-BQf5nLgq.js";import{g as me,E as ue,a as he}from"./ExecutionStatus-DHmX6Vtj.js";import{S as xe}from"./dots-horizontal-C6QCz7jg.js";import{A as fe}from"./AlertDialogDropdownItem-BS4AoVte.js";import{R as ge}from"./RunsBody-CNd_ej8-.js";import{R as je}from"./RunSelector-C-YzhiVb.js";import{I as Ce}from"./Infobox-Ls_918eD.js";import"./@reactflow-DgwdIYyq.js";import"./chevron-right-double-C5DtVuMS.js";import"./index-4aOgYud0.js";import"./zod-C2FdaFLe.js";import"./index.esm-C5jC4e7W.js";import"./copy-DmyMnHSy.js";import"./check-circle-ByvKqRS_.js";import"./all-pipeline-runs-query-Dh4L44hJ.js";import"./DisplayDate-CZV8x8pB.js";import"./InlineAvatar-B9O7QxVo.js";import"./delete-run-CUo7vxbD.js";const be=s=>l.createElement("svg",{viewBox:"0 0 60 60",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("g",{id:"dataflow-02"},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5 7.5C11.1193 7.5 10 8.61929 10 10C10 11.3807 11.1193 12.5 12.5 12.5C13.8807 12.5 15 11.3807 15 10C15 8.61929 13.8807 7.5 12.5 7.5ZM5 10C5 5.85786 8.35787 2.5 12.5 2.5C15.7655 2.5 18.5436 4.58702 19.5732 7.5L40.4268 7.5C41.4564 4.58702 44.2345 2.5 47.5 2.5C51.6421 2.5 55 5.85786 55 10C55 14.1421 51.6421 17.5 47.5 17.5C44.2345 17.5 41.4564 15.413 40.4268 12.5L32.5 12.5V27.5H40.4268C41.4564 24.587 44.2345 22.5 47.5 22.5C51.6421 22.5 55 25.8579 55 30C55 34.1421 51.6421 37.5 47.5 37.5C44.2345 37.5 41.4564 35.413 40.4268 32.5H32.5V38C32.5 40.1415 32.502 41.5972 32.5939 42.7224C32.6834 43.8185 32.8457 44.379 33.045 44.77C33.5243 45.7108 34.2892 46.4757 35.2301 46.955C35.6211 47.1543 36.1816 47.3166 37.2776 47.4061C38.103 47.4736 39.1062 47.4926 40.4275 47.4979C41.4577 44.586 44.2352 42.5 47.5 42.5C51.6421 42.5 55 45.8579 55 50C55 54.1421 51.6421 57.5 47.5 57.5C44.2338 57.5 41.4552 55.4121 40.4261 52.4982C39.0579 52.4929 37.8787 52.4719 36.8704 52.3895C35.4652 52.2747 34.1734 52.0283 32.9601 51.4101C31.0785 50.4513 29.5487 48.9215 28.5899 47.0399C27.9717 45.8266 27.7253 44.5348 27.6105 43.1296C27.4999 41.7766 27.5 40.1157 27.5 38.1032V12.5L19.5732 12.5C18.5436 15.413 15.7655 17.5 12.5 17.5C8.35787 17.5 5 14.1421 5 10ZM47.5 7.5C46.1193 7.5 45 8.61929 45 10C45 11.3807 46.1193 12.5 47.5 12.5C48.8807 12.5 50 11.3807 50 10C50 8.61929 48.8807 7.5 47.5 7.5ZM47.5 27.5C46.1193 27.5 45 28.6193 45 30C45 31.3807 46.1193 32.5 47.5 32.5C48.8807 32.5 50 31.3807 50 30C50 28.6193 48.8807 27.5 47.5 27.5ZM47.5 47.5C46.1193 47.5 45 48.6193 45 50C45 51.3807 46.1193 52.5 47.5 52.5C48.8807 52.5 50 51.3807 50 50C50 48.6193 48.8807 47.5 47.5 47.5Z"})));async function ve({params:s}){const a=S(T.pipelines.all+"?"+pe(s)),t=await A(a,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.status===404&&M(),!t.ok)throw new N({message:"Error while fetching pipelines",status:t.status,statusText:t.statusText});return t.json()}const v={all:["pipelines"],pipelineList:s=>le({queryKey:[...v.all,s],queryFn:async()=>ve({params:s})})};async function Pe({pipelineId:s}){const a=S(T.pipelines.detail(s)),t=await fetch(a,{method:"DELETE",credentials:"include",headers:{"Content-Type":"application/json"}});if(!t.ok){const r=await t.json().then(n=>n.detail).catch(()=>`Failed to delete pipeline ${s}`);throw new N({status:t.status,statusText:t.statusText,message:r})}return t.json()}function ye(s){return oe({mutationFn:Pe,...s})}const k=l.createContext(null);function we({children:s}){const[a,t]=l.useState([]),r=ce(),{toast:n}=_(),i=ye(),o=async d=>{try{const p=d.map(x=>i.mutateAsync({pipelineId:x}));await Promise.all(p),n({description:"Deleted successfully.",status:"success",emphasis:"subtle",rounded:!0}),await r.invalidateQueries({queryKey:v.all}),t([])}catch(p){console.error("Failed to delete some pipelines:",p)}};return e.jsx(k.Provider,{value:{selectedPipelines:a,setSelectedPipelines:t,bulkDeletePipelines:o},children:s})}function u(){const s=l.useContext(k);if(!s)throw new Error("usePipelinesSelectorContext must be used within a PipelinesSelectorProvider");return s}function Se(){const[s,a]=l.useState(!1),{bulkDeletePipelines:t,selectedPipelines:r}=u();async function n(){await t(r),a(!1)}return e.jsxs(B,{open:s,onOpenChange:a,children:[e.jsx(O,{children:e.jsxs(h,{className:"rounded-sharp border-none bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(R,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(E,{title:`Delete Pipeline${r.length>=2?"s":""}`,handleDelete:n,children:e.jsxs(L,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function Te(){const{selectedPipelines:s}=u();return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:`${s==null?void 0:s.length} Pipeline${(s==null?void 0:s.length)>1?"s":""} selected`}),e.jsx(Se,{})]})}function Ne({id:s}){const[a,t]=l.useState(!1),[r,n]=l.useState(!1),i=l.useRef(null),o=l.useRef(null),{bulkDeletePipelines:d}=u();async function p(){await d([s]),P(!1)}function x(){o.current=i.current}function P(m){if(m===!1){n(!1),setTimeout(()=>{t(m)},200);return}t(m)}return e.jsxs(F,{onOpenChange:n,open:r,children:[e.jsx(z,{ref:i,children:e.jsx(xe,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(I,{hidden:a,onCloseAutoFocus:m=>{o.current&&(o.current.focus(),o.current=null,m.preventDefault())},align:"end",sideOffset:7,children:e.jsx(fe,{onSelect:x,open:a,onOpenChange:P,triggerChildren:"Delete",icon:e.jsx(R,{fill:"red"}),children:e.jsx(E,{title:"Delete Pipeline",handleDelete:p,children:e.jsxs(L,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})})]})}const De=({id:s})=>{const{selectedPipelines:a,setSelectedPipelines:t}=u(),r=(n,i)=>{t(o=>n?[...o,i]:o.filter(d=>d!==i))};return e.jsx(Z,{id:s,onCheckedChange:n=>r(n,s),checked:a.includes(s),className:"h-3 w-3"})};function Re(){return[{id:"check",header:"",meta:{width:"1%"},cell:({row:s})=>e.jsx(De,{id:s.original.id})},{id:"name",header:"Pipeline",cell:({row:s})=>{var a,t,r;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(U,{className:`h-5 w-5 ${me((a=s.original.body)==null?void 0:a.latest_run_status)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(j,{to:f.pipelines.namespace(encodeURIComponent(s.original.name)),className:"flex items-center gap-1",children:e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:s.original.name})}),e.jsx($,{children:e.jsxs(q,{children:[e.jsx(H,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(ue,{status:(t=s.original.body)==null?void 0:t.latest_run_status})}),e.jsx(Q,{className:"z-20 capitalize",children:(r=s.original.body)==null?void 0:r.latest_run_status})]})}),e.jsx(w,{copyText:s.original.name})]}),e.jsxs(j,{to:f.pipelines.namespace(encodeURIComponent(s.original.name)),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:s.original.id.split("-")[0]}),e.jsx(w,{copyText:s.original.id})]})]})]})}},{id:"latest-run",header:"Latest Run",accessorFn:s=>{var a,t;return{status:(a=s.body)==null?void 0:a.latest_run_status,runId:(t=s.body)==null?void 0:t.latest_run_id}},cell:({getValue:s})=>{const{runId:a,status:t}=s();return!a||!t?e.jsx("div",{children:"No run"}):e.jsx(j,{to:f.runs.detail(a),children:e.jsxs(V,{emphasis:"subtle",rounded:!1,className:"inline-flex items-center gap-0.5",color:he(t),children:[e.jsx(D,{className:"h-3 w-3 fill-current"}),a==null?void 0:a.split("-")[0]]})})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:s})=>e.jsx(Ne,{id:s.original.id})}]}const C=1,Ee=c.object({page:c.coerce.number().min(C).optional().default(C).catch(C),name:c.string().optional(),operator:c.enum(["and","or"]).optional()});function Le(){const[s]=b(),{page:a,name:t,operator:r}=Ee.parse({page:s.get("page")||void 0,name:s.get("name")||void 0,operator:s.get("operator")||void 0});return{page:a,name:t,logical_operator:r}}function ke(){const s=Le(),{selectedPipelines:a}=u(),{data:t,refetch:r}=de({...v.pipelineList({...s,sort_by:"desc:latest_run"}),throwOnError:!0});return e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[a.length?e.jsx(Te,{}):e.jsx(re,{searchParams:s}),e.jsx("div",{className:"flex justify-between",children:e.jsxs(h,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>r(),children:[e.jsx(ne,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:t?e.jsx(G,{columns:Re(),data:t.items}):e.jsx(y,{className:"h-[500px] w-full"})}),t?t.total_pages>1&&e.jsx(ie,{searchParams:s,paginate:t}):e.jsx(y,{className:"h-[36px] w-[300px]"})]})]})}const Ae=c.object({tab:c.enum(["pipelines","runs","templates"]).optional().default("pipelines").catch("pipelines")});function Me(){const[s]=b(),{tab:a}=Ae.parse({tab:s.get("tab")||void 0});return a}const _e="/assets/templates-1S_8WeSK.webp";function Be(){return e.jsxs("div",{className:"layout-container space-y-5",children:[e.jsx(Oe,{}),e.jsx(ze,{})]})}function Oe(){return e.jsx(Ce,{children:e.jsxs("div",{className:"flex w-full flex-wrap items-center gap-x-2 gap-y-0.5 text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"This is a ZenML Pro feature. "}),e.jsx("p",{children:"Upgrade to ZenML Pro to access the Templates and save settings and run pipelines from the dashboard."})]})})}const Fe=["Run pipelines from the dashboard with Templates","Re-run a pipeline easily from the UI","Model and Artifact Control Plane Dashboard","Managed ZenML server on your VPC or hosted on our servers","Social SSO, RBAC, and User Management","CI/CD/CT, and more!"];function ze(){return e.jsxs(K,{className:"relative overflow-hidden px-7 py-5",children:[e.jsxs("div",{className:"max-w-[450px] space-y-4",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Access Advanced Template Features with ZenML Pro"}),e.jsx("ul",{className:"space-y-2",children:Fe.map((s,a)=>e.jsx("li",{className:"text-text-md text-theme-text-secondary",children:s},a))}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(h,{size:"md",asChild:!0,children:e.jsx("a",{href:"https://cloud.zenml.io/signup",target:"_blank",rel:"noopener noreferrer",children:"Upgrade to ZenML Pro"})}),e.jsx(h,{emphasis:"minimal",size:"md",children:e.jsx("a",{href:"https://www.zenml.io/pro",target:"_blank",rel:"noopener noreferrer",children:"Learn more"})})]})]}),e.jsx("img",{className:"absolute right-0 top-0 hidden translate-x-[30%] scale-75 md:translate-y-[30%] lg:block xl:-translate-y-[5%]",src:_e,alt:"Screenshot of Zenml Pro Templates Feature"})]})}const Ie=[{value:"pipelines",label:"Pipelines",icon:be},{value:"runs",label:"Runs",icon:D},{value:"templates",label:"Templates",icon:ee}];function Ze(){const[s]=b(),a=Me(),t=ae();l.useEffect(()=>{if(!s.get("tab")){const i=new URLSearchParams(s);i.set("tab","pipelines"),t(`?${i.toString()}`,{replace:!0})}},[t,s]);function r(n){const i=new URLSearchParams;i.set("tab",n),t(`?${i.toString()}`)}return e.jsx("div",{className:"p-5",children:e.jsxs(J,{onValueChange:r,value:a,children:[e.jsx(W,{children:Ie.map(n=>e.jsxs(X,{className:"flex items-center gap-2 text-text-md",value:n.value.toLowerCase(),children:[e.jsx(n.icon,{className:`h-5 w-5 ${a===n.value?"fill-primary-400":"fill-theme-text-tertiary"}`}),n.label,n.value==="templates"&&e.jsx(Y,{className:"rounded-sm font-semibold text-primary-500",color:"purple",size:"sm",children:"New"})]},n.value))}),e.jsx(g,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"pipelines",children:e.jsx(we,{children:e.jsx(ke,{})})}),e.jsx(g,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"runs",children:e.jsx(je,{children:e.jsx(ge,{})})}),e.jsx(g,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"templates",children:e.jsx(Be,{})})]})})}function xs(){const{setCurrentBreadcrumbData:s}=se();return l.useEffect(()=>{s({segment:"pipelines",data:null})},[]),e.jsxs("div",{children:[e.jsx(te,{children:e.jsx("h1",{className:"text-display-xs font-semibold",children:"Pipelines"})}),e.jsx(Ze,{})]})}export{xs as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{j as e,r as m}from"./@radix-
|
1
|
+
import{j as e,r as m}from"./@radix-B7OY3d6N.js";import{av as g,aw as b,ax as v,ay as y,az as S,B as h,aA as C}from"./index-D25WcEJJ.js";import{I as l}from"./Infobox-Ls_918eD.js";import{V as d,g as p}from"./Commands-vjMqENS8.js";import{H as j}from"./Helpbox-DWOXAebr.js";import{S as w,a as k,b as A}from"./gcp-B1H0QrG5.js";import{S as z}from"./kubernetes-Bn54mlK-.js";import{S as T}from"./docker-C2dCztnc.js";import"./@tanstack-W1pLDzVg.js";import"./@react-router-CiF9laDg.js";import"./@reactflow-DgwdIYyq.js";import"./CodeSnippet-CK2z-88v.js";import"./copy-DmyMnHSy.js";import"./help-CgM5zwtY.js";const N="/assets/connectors-video-C9qY4syJ.svg",s="w-5 h-5",P=[{label:"Kubernetes",value:"kubernetes",icon:e.jsx(z,{className:s})},{label:"GCP",value:"gcp",icon:e.jsx(w,{className:s})},{label:"Docker",value:"docker",icon:e.jsx(T,{className:s})},{label:"Azure",value:"azure",icon:e.jsx(k,{className:s})},{label:"AWS",value:"aws",icon:e.jsx(A,{className:s})}],I={help:{href:"https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/kubernetes-service-connector",text:"Use the complete guide to set up your Kubernetes Service Connector."},prerequisites:i("kubernetes","Kubernetes"),listCommand:a("kubernetes","Kubernetes"),topInfobox:"The ZenML Kubernetes service connector facilitates authenticating and connecting to a Kubernetes cluster. The connector can be used to access to any generic Kubernetes cluster by providing pre-authenticated Kubernetes python clients to Stack Components that are linked to it and also allows configuring the local Kubernetes CLI (i.e. kubectl).",bottomInfobox:"Upon completion of the installation of the required prerequisites and integration, our documentation provides you with a comprehensive list of resource types that can be employed to establish your connector. Please refer to the documentation to explore all available options."},q={help:{text:"Use the complete guide to set up your GCP Service Connector.",href:"https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/gcp-service-connector"},prerequisites:i("gcp","GCP"),listCommand:a("gcp","GCP"),bottomInfobox:"Upon completion of the installation of the required prerequisites and integration, our documentation will guide you with a comprehensive list of all the resource types that can be employed to establish your GCP connector. Please refer to the documentation to explore all available options.",topInfobox:"The ZenML GCP Service Connector facilitates the authentication and access to managed GCP services and resources. These encompass a range of resources, including GCS buckets, GCR container repositories, and GKE clusters. The connector provides support for various authentication methods, including GCP user accounts, service accounts, short-lived OAuth 2.0 tokens, and implicit authentication."},G={help:{text:"Use the complete guide to set up your Docker Service Connector.",href:"https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/docker-service-connector"},listCommand:a("docker","Docker"),topInfobox:"The ZenML Docker Service Connector allows authenticating with a Docker or OCI container registry and managing Docker clients for the registry. This connector provides pre-authenticated python-docker Python clients to Stack Components that are linked to it.",bottomInfobox:"No Python packages are required for this Service Connector. All prerequisites are included in the base ZenML Python package. Docker needs to be installed on environments where container images are built and pushed to the target container registry. Please refer to the documentation to explore all available options."},K={help:{text:"Use the complete guide to set up your Azure Service Connector.",href:"https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/azure-service-connector"},listCommand:a("azure","Azure"),prerequisites:i("azure","Azure"),topInfobox:"The ZenML Azure Service Connector facilitates the authentication and access to managed Azure services and resources. These encompass a range of resources, including blob storage containers, ACR repositories, and AKS clusters.",bottomInfobox:"Upon completion of the installation of the required prerequisites and integration, our documentation will guide you with a comprehensive list of all the resource types that can be employed to establish your Azure connector. Please refer to the documentation to explore all available options."},L={help:{text:"Use the complete guide to set up your AWS Service Connector.",href:"https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/aws-service-connector"},listCommand:a("aws","AWS"),prerequisites:i("aws","AWS"),topInfobox:"The ZenML AWS Service Connector facilitates the authentication and access to managed AWS services and resources. These encompass a range of resources, including S3 buckets, ECR container repositories, and EKS clusters. The connector provides support for various authentication methods, including explicit long-lived AWS secret keys, IAM roles, short-lived STS tokens, and implicit authentication.",bottomInfobox:"Upon completion of the installation of the required prerequisites and integration, our documentation will guide you with a comprehensive list of all the resource types that can be employed to establish your AWS connector. Please refer to the documentation to explore all available options."};function a(t,o){return{command:`zenml service-connector list-types --type ${t}`,description:`List ${o} Connector Types`}}function i(t,o){return[{description:"Install the prerequisites",command:`pip install "zenml[connectors-${t}]"`},{description:`Install the entire ${o} ZenML integration`,command:`zenml integration install ${t}`}]}function M({id:t,selectedType:o,onTypeChange:c}){return e.jsxs(g,{value:o,onValueChange:n=>c(n),children:[e.jsx(b,{id:t,className:"w-[250px] border border-neutral-300 px-2 text-left text-text-md",children:e.jsx(v,{placeholder:"Select Connector Type"})}),e.jsx(y,{className:"",children:P.map(n=>e.jsx(S,{value:n.value,children:e.jsxs("div",{className:"flex items-center gap-1",children:[n.icon,n.label]})},n.value))})]})}function W(){return e.jsx(l,{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:"We are creating a new Connectors experience"}),e.jsx("p",{children:"In the meanwhile you can use the CLI to add and manage your connectors."})]})})}function D(){const t="https://zenml.portal.trainn.co/share/V6magMJZZvMptz1wdnUmPA/embed?autoplay=false";return e.jsxs(h,{className:"flex flex-col-reverse items-stretch overflow-hidden lg:flex-row",children:[e.jsxs("div",{className:"w-full p-7 lg:w-2/3",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Learn More about Connectors"}),e.jsx("p",{className:"mt-2 text-text-lg text-theme-text-secondary",children:"Dive into Service Connector Types for a documented approach to secure authentication and authorization practices."}),e.jsx(d,{videoLink:t,buttonText:"Watch the Starter Guide (2 min)"})]}),e.jsx("div",{className:"flex w-full items-center justify-center bg-primary-50 lg:w-1/3",children:e.jsx(d,{fallbackImage:e.jsx("img",{src:N,alt:"Purple squares with text indicating a starter guide for secrets",className:"h-full w-full"}),videoLink:t,isButton:!1})})]})}function U(){const[t,o]=m.useState("kubernetes");return e.jsxs("section",{className:"space-y-5 pl-8 pr-5",children:[e.jsx(M,{selectedType:t,onTypeChange:o,id:"connector-select"}),Z(t)]})}function r({topInfobox:t,bottomInfobox:o,listCommand:c,prerequisites:n,help:u}){return e.jsxs(e.Fragment,{children:[e.jsx(l,{className:"text-text-md",intent:"neutral",children:t}),p(c),n&&e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"Prerequisites"}),n.map((x,f)=>e.jsx(m.Fragment,{children:p(x)},f))]}),e.jsx(l,{className:"text-text-md",intent:"neutral",children:o}),e.jsx(j,{text:u.text,link:u.href})]})}function Z(t){switch(t){case"kubernetes":return r(I);case"gcp":return r(q);case"docker":return r(G);case"azure":return r(K);case"aws":return r(L)}}function te(){return e.jsxs(h,{className:"space-y-4 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Secrets"}),e.jsx(W,{}),e.jsx(D,{}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(C,{}),"Administering your Connectors"]}),e.jsx(U,{})]})}export{te as default};
|