zenml-nightly 0.68.1.dev20241106__py3-none-any.whl → 0.70.0.dev20241116__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- README.md +1 -1
- RELEASE_NOTES.md +77 -0
- zenml/VERSION +1 -1
- zenml/__init__.py +2 -0
- zenml/artifacts/external_artifact.py +2 -1
- zenml/artifacts/utils.py +138 -79
- zenml/cli/base.py +4 -4
- zenml/cli/model.py +1 -6
- zenml/cli/stack.py +1 -0
- zenml/client.py +29 -74
- zenml/config/server_config.py +17 -1
- zenml/constants.py +2 -7
- zenml/data_validators/base_data_validator.py +2 -2
- zenml/enums.py +20 -4
- zenml/exceptions.py +4 -0
- zenml/integrations/aws/orchestrators/sagemaker_orchestrator.py +20 -18
- zenml/integrations/azure/orchestrators/azureml_orchestrator.py +1 -1
- zenml/integrations/deepchecks/data_validators/deepchecks_data_validator.py +1 -1
- zenml/integrations/evidently/__init__.py +1 -1
- zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +1 -1
- zenml/integrations/lightning/orchestrators/lightning_orchestrator.py +29 -9
- zenml/integrations/tensorboard/visualizers/tensorboard_visualizer.py +60 -54
- zenml/integrations/vllm/services/vllm_deployment.py +16 -7
- zenml/metadata/lazy_load.py +20 -7
- zenml/model/model.py +17 -64
- zenml/model/utils.py +5 -0
- zenml/models/__init__.py +0 -12
- zenml/models/v2/base/filter.py +121 -8
- zenml/models/v2/core/artifact_version.py +42 -7
- zenml/models/v2/core/model_version.py +26 -5
- zenml/models/v2/core/pipeline_run.py +25 -6
- zenml/models/v2/core/run_metadata.py +2 -217
- zenml/models/v2/core/step_run.py +62 -24
- zenml/orchestrators/base_orchestrator.py +12 -1
- zenml/orchestrators/input_utils.py +44 -19
- zenml/orchestrators/step_launcher.py +4 -3
- zenml/orchestrators/step_run_utils.py +19 -15
- zenml/orchestrators/step_runner.py +21 -13
- zenml/orchestrators/utils.py +45 -26
- zenml/stack_deployments/aws_stack_deployment.py +23 -6
- zenml/stack_deployments/azure_stack_deployment.py +28 -5
- zenml/stack_deployments/gcp_stack_deployment.py +25 -8
- zenml/stack_deployments/stack_deployment.py +3 -5
- zenml/steps/base_step.py +1 -1
- zenml/steps/entrypoint_function_utils.py +3 -5
- zenml/steps/step_context.py +3 -2
- zenml/steps/utils.py +13 -2
- zenml/utils/metadata_utils.py +335 -0
- zenml/zen_server/auth.py +221 -3
- zenml/zen_server/cache.py +208 -0
- zenml/zen_server/dashboard/assets/{404-DT4QRUqN.js → 404-NVXKFp-x.js} +1 -1
- zenml/zen_server/dashboard/assets/{@radix-DP6vWzyx.js → @radix-DeK6qiuw.js} +1 -1
- zenml/zen_server/dashboard/assets/{@react-router-BMhZulnd.js → @react-router-B3Z5rLr2.js} +1 -1
- zenml/zen_server/dashboard/assets/{@reactflow-8U9qNlMR.js → @reactflow-CK0KJUen.js} +2 -2
- zenml/zen_server/dashboard/assets/{@tanstack-BUCbhJyH.js → @tanstack-DT5WLu9C.js} +1 -1
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-DezXKmDf.js +1 -0
- zenml/zen_server/dashboard/assets/{CodeSnippet-CqybNv0k.js → CodeSnippet-JzR8CEtw.js} +2 -2
- zenml/zen_server/dashboard/assets/{CollapsibleCard-0r_8G2Lj.js → CollapsibleCard-DQW_ktMO.js} +1 -1
- zenml/zen_server/dashboard/assets/{Commands-BDjgBQKi.js → Commands-DL2kwkRd.js} +1 -1
- zenml/zen_server/dashboard/assets/ComponentBadge-D_g62Wv8.js +1 -0
- zenml/zen_server/dashboard/assets/{CopyButton-C745BrKi.js → CopyButton-LNcWaa14.js} +1 -1
- zenml/zen_server/dashboard/assets/{CsvVizualization-PpAq0CeZ.js → CsvVizualization-DknpE5ej.js} +5 -5
- zenml/zen_server/dashboard/assets/{DialogItem-DcVCZEew.js → DialogItem-Bxf8FuAT.js} +1 -1
- zenml/zen_server/dashboard/assets/{DisplayDate-BeXgUG_C.js → DisplayDate-CDMUcQHS.js} +1 -1
- zenml/zen_server/dashboard/assets/{EmptyState-DeK7H4pr.js → EmptyState-BzdlCwp3.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-BMlzibXj.js → Error-DYflYyps.js} +1 -1
- zenml/zen_server/dashboard/assets/ExecutionStatus-C7zyIQKZ.js +1 -0
- zenml/zen_server/dashboard/assets/{Helpbox-BLf40fLV.js → Helpbox-oYSGpLqd.js} +1 -1
- zenml/zen_server/dashboard/assets/{Infobox-BwisKifi.js → Infobox-Cx4xGoXR.js} +1 -1
- zenml/zen_server/dashboard/assets/{InlineAvatar-jEgodSgX.js → InlineAvatar-DiGOWNKF.js} +1 -1
- zenml/zen_server/dashboard/assets/{Lock-3lLt1ih0.js → Lock-CYYy18Mm.js} +1 -1
- zenml/zen_server/dashboard/assets/{MarkdownVisualization-8O9kTr-2.js → MarkdownVisualization-ylXaAxev.js} +1 -1
- zenml/zen_server/dashboard/assets/NestedCollapsible-DYbgyKxK.js +1 -0
- zenml/zen_server/dashboard/assets/{NumberBox-T9eELfLZ.js → NumberBox-Dtp3J6g5.js} +1 -1
- zenml/zen_server/dashboard/assets/Partials-03iZf8-N.js +1 -0
- zenml/zen_server/dashboard/assets/{PasswordChecker-CW0kqY0W.js → PasswordChecker-B0nadgh6.js} +1 -1
- zenml/zen_server/dashboard/assets/ProBadge-D_EB8HNo.js +1 -0
- zenml/zen_server/dashboard/assets/ProCta-DqNS4v3x.js +1 -0
- zenml/zen_server/dashboard/assets/ProviderIcon-Bki2aw8w.js +1 -0
- zenml/zen_server/dashboard/assets/{ProviderRadio-BROY1700.js → ProviderRadio-8f43sPD4.js} +1 -1
- zenml/zen_server/dashboard/assets/RunSelector-DkPiIiNr.js +1 -0
- zenml/zen_server/dashboard/assets/RunsBody-07YEO7qI.js +1 -0
- zenml/zen_server/dashboard/assets/SearchField-lp1KgU4e.js +1 -0
- zenml/zen_server/dashboard/assets/{SecretTooltip-C_qByGWB.js → SecretTooltip-CgnbyeOx.js} +1 -1
- zenml/zen_server/dashboard/assets/{SetPassword-7pRB00El.js → SetPassword-CpP418A2.js} +1 -1
- zenml/zen_server/dashboard/assets/StackList-WvuKQusZ.js +1 -0
- zenml/zen_server/dashboard/assets/Tabs-BktHkCJJ.js +1 -0
- zenml/zen_server/dashboard/assets/Tick-BlMoIlJT.js +1 -0
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-DckMEkFf.js → UpdatePasswordSchemas-Sc0A0pP-.js} +1 -1
- zenml/zen_server/dashboard/assets/{UsageReason-DVceN14P.js → UsageReason-YYduL4fj.js} +1 -1
- zenml/zen_server/dashboard/assets/{WizardFooter-CW0Cvd70.js → WizardFooter-dgmizSJC.js} +1 -1
- zenml/zen_server/dashboard/assets/all-pipeline-runs-query-D-c2G6lV.js +1 -0
- zenml/zen_server/dashboard/assets/check-DloQpStc.js +1 -0
- zenml/zen_server/dashboard/assets/{check-circle-Dwxliy1Z.js → check-circle-jNbX5-sR.js} +1 -1
- zenml/zen_server/dashboard/assets/{chevron-down-8wLBS5pQ.js → chevron-down-6JyMkfjR.js} +1 -1
- zenml/zen_server/dashboard/assets/{chevron-right-double-DoD8iXWM.js → chevron-right-double-D7ojK9Co.js} +1 -1
- zenml/zen_server/dashboard/assets/{code-browser-CZUQs3Wa.js → code-browser-CUFUIHfp.js} +1 -1
- zenml/zen_server/dashboard/assets/{copy-CaSMXwiU.js → copy-C8XQA2Ug.js} +1 -1
- zenml/zen_server/dashboard/assets/create-stack-DM_JPgef.js +1 -0
- zenml/zen_server/dashboard/assets/delete-run-CJdh1P_h.js +1 -0
- zenml/zen_server/dashboard/assets/{docker-BFNgg-z3.js → docker-BdA9vrnW.js} +1 -1
- zenml/zen_server/dashboard/assets/{dots-horizontal-DK5Duzx4.js → dots-horizontal-otGBOSDJ.js} +1 -1
- zenml/zen_server/dashboard/assets/{form-schemas-1AyOCx90.js → form-schemas-K6FYKjwa.js} +1 -1
- zenml/zen_server/dashboard/assets/{gcp-7M2Yf3ZK.js → gcp-CFtm4BA7.js} +1 -1
- zenml/zen_server/dashboard/assets/{help-Dam461dC.js → help-Cc9bBIJH.js} +1 -1
- zenml/zen_server/dashboard/assets/index-B1mVPYxf.js +1 -0
- zenml/zen_server/dashboard/assets/index-BAkC7FXi.js +1 -0
- zenml/zen_server/dashboard/assets/{index-QQb7wQEC.js → index-CCOPpudF.js} +8 -8
- zenml/zen_server/dashboard/assets/index-CEV4Cvaf.js +1 -0
- zenml/zen_server/dashboard/assets/index-DlGvJQPn.css +1 -0
- zenml/zen_server/dashboard/assets/{index-BVJ8n2-j.js → index-Uu49AX48.js} +1 -1
- zenml/zen_server/dashboard/assets/{index.esm-cuVep_NJ.js → index.esm-Dy6Z9Ung.js} +1 -1
- zenml/zen_server/dashboard/assets/{kubernetes--g7r02Zu.js → kubernetes-B2wmAJ1d.js} +1 -1
- zenml/zen_server/dashboard/assets/{layout-DCSYN7-C.js → layout-BtHBmE4w.js} +1 -1
- zenml/zen_server/dashboard/assets/{link-external-CBEk6kEG.js → link-external-b9AXw_sW.js} +1 -1
- zenml/zen_server/dashboard/assets/{login-mutation-DTcAFP1l.js → login-mutation-hf-lK87O.js} +1 -1
- zenml/zen_server/dashboard/assets/{logs-D5bdJGur.js → logs-WMSM52RF.js} +1 -1
- zenml/zen_server/dashboard/assets/{not-found-Cc-JkRH2.js → not-found-BGirLjU-.js} +1 -1
- zenml/zen_server/dashboard/assets/{package-Cs35Szwh.js → package-C6uypY4h.js} +1 -1
- zenml/zen_server/dashboard/assets/page-0JE_-Ec1.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DH_Z7iW1.js → page-6m6yHHlE.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BDigxVpo.js +1 -0
- zenml/zen_server/dashboard/assets/page-BR68V0V1.js +1 -0
- zenml/zen_server/dashboard/assets/page-BRLpxOt0.js +1 -0
- zenml/zen_server/dashboard/assets/{page-BQQKaabe.js → page-BU7huvKw.js} +3 -3
- zenml/zen_server/dashboard/assets/page-BvqLv2Ky.js +1 -0
- zenml/zen_server/dashboard/assets/page-C00YAkaB.js +1 -0
- zenml/zen_server/dashboard/assets/{page-N4qoPHKb.js → page-CD-DcWoy.js} +1 -1
- zenml/zen_server/dashboard/assets/page-COXXJj1k.js +1 -0
- zenml/zen_server/dashboard/assets/page-CbpvrsDL.js +1 -0
- zenml/zen_server/dashboard/assets/page-CdMWnQak.js +1 -0
- zenml/zen_server/dashboard/assets/{page-ClUVkl-O.js → page-CjGdWY13.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CwxrFarU.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DLixvR-7.js → page-D01JhjQB.js} +1 -1
- zenml/zen_server/dashboard/assets/page-D6uU2ax4.js +1 -0
- zenml/zen_server/dashboard/assets/page-D7S3aCbF.js +1 -0
- zenml/zen_server/dashboard/assets/{page-9yplj5JT.js → page-DLC-bNBP.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DXSTpqRD.js +1 -0
- zenml/zen_server/dashboard/assets/{page-DzpVUZ8f.js → page-DakHVWXF.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DIOXwhiD.js → page-Df-Fw0aq.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-B-y2XKIc.js → page-DfbXf_8s.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DjRJCGb3.js +1 -0
- zenml/zen_server/dashboard/assets/{page-C0N5q3l7.js → page-Djikxq_S.js} +1 -1
- zenml/zen_server/dashboard/assets/page-Dnovpa0i.js +3 -0
- zenml/zen_server/dashboard/assets/page-Dot3LPmL.js +1 -0
- zenml/zen_server/dashboard/assets/page-Vcxara9U.js +1 -0
- zenml/zen_server/dashboard/assets/page-Xynx4btY.js +14 -0
- zenml/zen_server/dashboard/assets/page-YpKAqVSa.js +1 -0
- zenml/zen_server/dashboard/assets/page-yYC9OI-E.js +1 -0
- zenml/zen_server/dashboard/assets/{persist-DNb5cdrU.js → persist-Coz7ZWvz.js} +1 -1
- zenml/zen_server/dashboard/assets/{persist-CP0JmYZ4.js → persist-GjC8PZoC.js} +1 -1
- zenml/zen_server/dashboard/assets/{plus-C9IxgN2M.js → plus-tf1V2hTJ.js} +1 -1
- zenml/zen_server/dashboard/assets/{refresh-BVu22P_C.js → refresh-BjOeWlEq.js} +1 -1
- zenml/zen_server/dashboard/assets/{rocket-CONEmRmB.js → rocket-DjT2cDvG.js} +1 -1
- zenml/zen_server/dashboard/assets/sharedSchema-CQb14VSr.js +14 -0
- zenml/zen_server/dashboard/assets/stack-detail-query-OPEW-cDJ.js +1 -0
- zenml/zen_server/dashboard/assets/{tick-circle-CM1ZScbQ.js → tick-circle-BEX_Tp4v.js} +1 -1
- zenml/zen_server/dashboard/assets/{trash-DkJHMOg7.js → trash-arLUMWMS.js} +1 -1
- zenml/zen_server/dashboard/assets/{update-server-settings-mutation-DsU8cNVl.js → update-server-settings-mutation-LwuQfHYn.js} +1 -1
- zenml/zen_server/dashboard/assets/upgrade-form-CwRHBuXB.webp +0 -0
- zenml/zen_server/dashboard/assets/url-CkvKAnwF.js +1 -0
- zenml/zen_server/dashboard/assets/{zod-D89GC_vc.js → zod-BwEbpOxH.js} +1 -1
- zenml/zen_server/dashboard/index.html +7 -7
- zenml/zen_server/deploy/helm/Chart.yaml +1 -1
- zenml/zen_server/deploy/helm/README.md +2 -2
- zenml/zen_server/exceptions.py +2 -0
- zenml/zen_server/jwt.py +30 -13
- zenml/zen_server/rbac/endpoint_utils.py +43 -1
- zenml/zen_server/rbac/utils.py +0 -2
- zenml/zen_server/routers/artifact_version_endpoints.py +27 -1
- zenml/zen_server/routers/auth_endpoints.py +134 -102
- zenml/zen_server/routers/logs_endpoints.py +66 -0
- zenml/zen_server/routers/workspaces_endpoints.py +3 -4
- zenml/zen_server/template_execution/utils.py +14 -16
- zenml/zen_server/utils.py +27 -0
- zenml/zen_server/zen_server_api.py +6 -3
- zenml/zen_stores/migrations/versions/0.70.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/1cb6477f72d6_move_artifact_save_type.py +99 -0
- zenml/zen_stores/migrations/versions/904464ea4041_add_pipeline_model_run_unique_constraints.py +192 -0
- zenml/zen_stores/migrations/versions/b557b2871693_update_step_run_input_types.py +33 -0
- zenml/zen_stores/rest_zen_store.py +68 -64
- zenml/zen_stores/schemas/artifact_schemas.py +8 -1
- zenml/zen_stores/schemas/model_schemas.py +27 -3
- zenml/zen_stores/schemas/pipeline_run_schemas.py +6 -1
- zenml/zen_stores/schemas/pipeline_schemas.py +8 -2
- zenml/zen_stores/schemas/run_metadata_schemas.py +1 -48
- zenml/zen_stores/schemas/step_run_schemas.py +18 -10
- zenml/zen_stores/sql_zen_store.py +283 -219
- zenml/zen_stores/zen_store_interface.py +15 -42
- {zenml_nightly-0.68.1.dev20241106.dist-info → zenml_nightly-0.70.0.dev20241116.dist-info}/METADATA +2 -2
- {zenml_nightly-0.68.1.dev20241106.dist-info → zenml_nightly-0.70.0.dev20241116.dist-info}/RECORD +194 -179
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-C6N2rGrB.js +0 -1
- zenml/zen_server/dashboard/assets/ComponentBadge-DUiEYJHu.js +0 -1
- zenml/zen_server/dashboard/assets/ComponentFallbackDialog-BFoH5K4V.js +0 -1
- zenml/zen_server/dashboard/assets/ComponentIcon-CAIoUis2.js +0 -1
- zenml/zen_server/dashboard/assets/Partials-YPBB3V4q.js +0 -1
- zenml/zen_server/dashboard/assets/ProviderIcon-Bb3Xha5A.js +0 -1
- zenml/zen_server/dashboard/assets/RunSelector-DCiL3M1c.js +0 -1
- zenml/zen_server/dashboard/assets/SearchField-DfUiGFVd.js +0 -1
- zenml/zen_server/dashboard/assets/Tick-CykQFPj2.js +0 -1
- zenml/zen_server/dashboard/assets/cloud-only-B-s_HMDm.js +0 -1
- zenml/zen_server/dashboard/assets/codespaces-BitYDX9d.gif +0 -0
- zenml/zen_server/dashboard/assets/create-stack-CEmaPZ4c.js +0 -1
- zenml/zen_server/dashboard/assets/delete-run-D-LKbGyz.js +0 -1
- zenml/zen_server/dashboard/assets/index-Bpmj40BI.js +0 -1
- zenml/zen_server/dashboard/assets/index-CbU4Ln_E.css +0 -1
- zenml/zen_server/dashboard/assets/index-DKPhqP2B.js +0 -1
- zenml/zen_server/dashboard/assets/page-BBpOxVcY.js +0 -1
- zenml/zen_server/dashboard/assets/page-BRInM1Lg.js +0 -1
- zenml/zen_server/dashboard/assets/page-BjjlMk7s.js +0 -1
- zenml/zen_server/dashboard/assets/page-Bvd7YH2A.js +0 -1
- zenml/zen_server/dashboard/assets/page-CT3Nep8W.js +0 -1
- zenml/zen_server/dashboard/assets/page-C_f47pBf.js +0 -1
- zenml/zen_server/dashboard/assets/page-Cmv8C_yM.js +0 -3
- zenml/zen_server/dashboard/assets/page-CyN2bdWG.js +0 -1
- zenml/zen_server/dashboard/assets/page-CzzXH4fs.js +0 -1
- zenml/zen_server/dashboard/assets/page-DTlGjgnG.js +0 -1
- zenml/zen_server/dashboard/assets/page-Dbpl86h0.js +0 -1
- zenml/zen_server/dashboard/assets/page-Ddgy6kDS.js +0 -1
- zenml/zen_server/dashboard/assets/page-DtCAfBLy.js +0 -9
- zenml/zen_server/dashboard/assets/page-Dx16z7nA.js +0 -1
- zenml/zen_server/dashboard/assets/page-McUyYbo1.js +0 -1
- zenml/zen_server/dashboard/assets/page-T1P3RyAR.js +0 -1
- zenml/zen_server/dashboard/assets/page-bKaULTGG.js +0 -1
- zenml/zen_server/dashboard/assets/page-sbXUJy9t.js +0 -1
- zenml/zen_server/dashboard/assets/sharedSchema-TMLu-nYQ.js +0 -14
- zenml/zen_server/dashboard/assets/stack-detail-query-xmYxSsUY.js +0 -1
- zenml/zen_server/dashboard/assets/url-D5le3J4q.js +0 -1
- zenml/zen_server/routers/run_metadata_endpoints.py +0 -96
- {zenml_nightly-0.68.1.dev20241106.dist-info → zenml_nightly-0.70.0.dev20241116.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.68.1.dev20241106.dist-info → zenml_nightly-0.70.0.dev20241116.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.68.1.dev20241106.dist-info → zenml_nightly-0.70.0.dev20241116.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
import{r as l,j as e}from"./@radix-DeK6qiuw.js";import{u as c,S as x,a as y,b as v}from"./form-schemas-K6FYKjwa.js";import{A as j,I as U,P as h,U as b,S as _}from"./UsageReason-YYduL4fj.js";import{i as g,au as C,aS as P,j as w,m as A,S as E}from"./index-CCOPpudF.js";import{c as F}from"./@tanstack-DT5WLu9C.js";import"./check-circle-jNbX5-sR.js";import"./url-CkvKAnwF.js";import"./@react-router-B3Z5rLr2.js";import"./UpdatePasswordSchemas-Sc0A0pP-.js";import"./zod-BwEbpOxH.js";import"./index.esm-Dy6Z9Ung.js";import"./gcp-CFtm4BA7.js";import"./kubernetes-B2wmAJ1d.js";import"./rocket-DjT2cDvG.js";import"./@reactflow-CK0KJUen.js";const S=l.createContext(null);function H({children:t,initialUser:a}){const[n,r]=l.useState(a||{});return e.jsx(S.Provider,{value:{user:n,setUser:r},children:t})}function d(){const t=l.useContext(S);if(t===null)throw new Error("useSurveyUserContext must be used within an SurveyUserProvider");return t}function D({user:t}){var u,i;const{setSurveyStep:a}=c(),{setUser:n}=d();function r({fullName:s,getUpdates:m,email:o}){n(p=>({...p,...o?{email:o}:{email:null},full_name:s,email_opted_in:m})),a(2)}return e.jsx(j,{email:(u=t.metadata)==null?void 0:u.email,fullName:(i=t.body)==null?void 0:i.full_name,submitHandler:r})}function I(){const{user:t}=d(),{setSurveyStep:a}=c(),{toast:n}=g(),r=F(),{mutate:u}=C({onSuccess:async()=>{await r.invalidateQueries({queryKey:P()}),a(s=>s+1)},onError:s=>{s instanceof Error&&n({status:"error",emphasis:"subtle",icon:e.jsx(w,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:s.message,rounded:!0})}});function i({other:s,providers:m,otherVal:o}){const f={infra_providers:s?[...m,o]:m,finished_onboarding_survey:!0};u({...t,user_metadata:{...t.user_metadata,...f}})}return e.jsx(U,{submitHandler:i})}function R({user:t}){const{setSurveyStep:a}=c(),{setUser:n}=d();function r({primaryUse:u}){const i={primary_use:u};n(s=>({...s,user_metadata:{...s.user_metadata,...i}})),a(3)}return e.jsx(h,{user:t,submitHandler:r})}function k(){const{setSurveyStep:t}=c(),{setUser:a}=d();function n({usageReason:r,comparison_tools:u,otherTool:i,otherToolVal:s}){const m={usage_reason:r,...!!u&&{comparing_tools:i&&s?[...u,s]:u}};a(o=>({...o,user_metadata:{...o.user_metadata,...m}})),t(o=>o+1)}return e.jsx(b,{submitHandler:n})}function M(){const{data:t,isPending:a,isError:n}=A({throwOnError:!0}),{surveyStep:r}=c();return n?null:a?e.jsx(E,{className:"h-[300px]"}):e.jsx(e.Fragment,{children:e.jsxs(H,{children:[e.jsx(x,{stepAmount:5}),r===1&&e.jsx(D,{user:t}),r===2&&e.jsx(R,{user:t}),r===3&&e.jsx(k,{}),r===4&&e.jsx(I,{}),r===5&&e.jsx(_,{}),r===6&&e.jsx(y,{subHeader:"Your ZenML account is now updated",displayBody:!1,username:t.name})]})})}function $(){return e.jsx("div",{children:e.jsx(v,{children:e.jsx(M,{})})})}export{$ as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{j as e,r as f}from"./@radix-
|
1
|
+
import{j as e,r as f}from"./@radix-DeK6qiuw.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-CCOPpudF.js";import{c as E}from"./@react-router-B3Z5rLr2.js";import{E as _}from"./EmptyState-BzdlCwp3.js";import{a as k,b as F}from"./@tanstack-DT5WLu9C.js";import{o as T}from"./url-CkvKAnwF.js";import{E as I}from"./Error-DYflYyps.js";import{t as V}from"./zod-BwEbpOxH.js";import{u as A,C as q}from"./index.esm-Dy6Z9Ung.js";import{S as z}from"./check-circle-jNbX5-sR.js";import"./@reactflow-CK0KJUen.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};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as i,j as s}from"./@radix-
|
1
|
+
import{r as i,j as s}from"./@radix-DeK6qiuw.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-CCOPpudF.js";import{u as S}from"./login-mutation-hf-lK87O.js";import{t as I}from"./zod-BwEbpOxH.js";import{u as L}from"./index.esm-Dy6Z9Ung.js";import{b as F,c as P}from"./@react-router-B3Z5rLr2.js";import"./@tanstack-DT5WLu9C.js";import"./@reactflow-CK0KJUen.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{j as e,r as m}from"./@radix-
|
1
|
+
import{j as e,r as m}from"./@radix-DeK6qiuw.js";import{aw as f,ax as b,ay as v,az as y,aA as S,B as h,aB as C}from"./index-CCOPpudF.js";import{I as l}from"./Infobox-Cx4xGoXR.js";import{V as d,g as p}from"./Commands-DL2kwkRd.js";import{H as j}from"./Helpbox-oYSGpLqd.js";import{S as w,a as k,b as A}from"./gcp-CFtm4BA7.js";import{S as z}from"./kubernetes-B2wmAJ1d.js";import{S as T}from"./docker-BdA9vrnW.js";import"./@tanstack-DT5WLu9C.js";import"./@react-router-B3Z5rLr2.js";import"./@reactflow-CK0KJUen.js";import"./CodeSnippet-JzR8CEtw.js";import"./copy-C8XQA2Ug.js";import"./help-Cc9bBIJH.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/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/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/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/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/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(f,{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,g)=>e.jsx(m.Fragment,{children:p(x)},g))]}),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};
|
@@ -0,0 +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{ae as Z,af as q,ag as H,ah as G,ai as K,a8 as x,aL 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,aM as re,r as E,i as ae,j as ne,n as ie}from"./index-CCOPpudF.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-B1mVPYxf.js";import{s as me}from"./url-CkvKAnwF.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-DM_JPgef.js";import{C as be}from"./CodeSnippet-JzR8CEtw.js";import{s as ye}from"./sharedSchema-CQb14VSr.js";import{C as R}from"./stack-detail-query-OPEW-cDJ.js";import{D as ve}from"./DisplayDate-CDMUcQHS.js";import{I as Ne}from"./InlineAvatar-DiGOWNKF.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-CEV4Cvaf.js";import{w as _e}from"./index-BAkC7FXi.js";import{t as Te}from"./zod-BwEbpOxH.js";import"./@reactflow-CK0KJUen.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(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 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 +1 @@
|
|
1
|
-
import{r as o,j as e}from"./@radix-
|
1
|
+
import{r as o,j as e}from"./@radix-DeK6qiuw.js";import{z as i,i as v,ak as j,av as y,an as S,j as k,u as C,B as w,S as E}from"./index-CCOPpudF.js";import{u as F}from"./update-server-settings-mutation-LwuQfHYn.js";import{t as q}from"./zod-BwEbpOxH.js";import{c as A}from"./@tanstack-DT5WLu9C.js";import{u as I,C as b}from"./index.esm-Dy6Z9Ung.js";import"./@react-router-B3Z5rLr2.js";import"./@reactflow-CK0KJUen.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(k,{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}=C({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};
|
@@ -0,0 +1,3 @@
|
|
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,ae as K,af as H,f as h,ag as F,ah as P,ai as O,i as U,I as j,al as A,am as V,an as G,s as J,D as W,w as X,x as Y,r as N,at as Z,z as f,m as ee,L as se,S as w,o as te,B as ae}from"./index-CCOPpudF.js";import{S as re,P as ne}from"./SearchField-lp1KgU4e.js";import{S as ie,s as le,E as ce,a as oe,b as de}from"./SecretTooltip-CgnbyeOx.js";import{b as I,c as L,a as S}from"./@tanstack-DT5WLu9C.js";import{w as me}from"./index-BAkC7FXi.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-LNcWaa14.js";import{D as je}from"./DisplayDate-CDMUcQHS.js";import{I as ge}from"./InlineAvatar-DiGOWNKF.js";import{L as b,c as ye}from"./@react-router-B3Z5rLr2.js";import{S as Ne}from"./dots-horizontal-otGBOSDJ.js";import{D as k,S as we}from"./DialogItem-Bxf8FuAT.js";import"./@reactflow-CK0KJUen.js";import"./chevron-right-double-D7ojK9Co.js";import"./url-CkvKAnwF.js";import"./index-Uu49AX48.js";import"./CodeSnippet-JzR8CEtw.js";import"./copy-C8XQA2Ug.js";async function Se(s){const t=D(C.secrets.add(s.workspace)),a=await E(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!a.ok){const r=await a.json().then(n=>n.detail).catch(()=>"Failed to create Secret");throw new T({status:a.status,statusText:a.statusText,message:r})}return a.json()}function ve(s){return I({mutationFn:async t=>Se(t),...s})}function be({id:s,workspace:t}){const[a,r]=x.useState(!1);return e.jsxs(K,{open:a,onOpenChange:r,children:[e.jsx(H,{asChild:!0,children:e.jsx(h,{className:"shrink-0",intent:"primary",children:"Add secret"})}),e.jsxs(F,{className:"mx-auto w-[90vw] max-w-[744px]",children:[e.jsx(P,{children:e.jsx(O,{children:"Register New Secret"})}),e.jsx(ke,{userId:s,setOpen:r,workspaceId:t.id})]})]})}function ke({userId:s,setOpen:t,workspaceId:a}){const{handleSubmit:r,control:n,watch:i,setValue:o,formState:{isValid:u},reset:p}=he({resolver:xe(le),defaultValues:{secretName:"",keysValues:[{key:"",value:""}]}}),{fields:m,append:_,remove:R}=pe({control:n,name:"keysValues"}),{toast:z}=U(),B=L(),{mutate:M}=ve({onError(l){G(l)&&z({status:"error",emphasis:"subtle",description:l.message,rounded:!0})},onSuccess(){B.invalidateQueries({queryKey:["secrets"]}),t(!1),p()}}),Q=l=>{M({user:s,workspace:a,name:l.secretName,scope:"workspace",values:l.keysValues.reduce((c,d)=>(d.key&&d.value&&(c[d.key]=d.value),c),{})})},$=l=>{Q(l)};return e.jsxs(e.Fragment,{children:[e.jsx("form",{id:"create-secret-form",className:"gap-5 p-5",onSubmit:r($),children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("label",{className:"font-inter text-sm text-left font-medium leading-5",children:["Secret Name",e.jsx("span",{className:"ml-1 text-theme-text-error",children:"*"})]}),e.jsx(g,{name:"secretName",control:n,render:({field:l})=>e.jsx(j,{...l,className:"mb-3 w-full",required:!0})})]}),e.jsxs("div",{className:"mt-10",children:[e.jsx("div",{children:e.jsx("h1",{className:"font-inter text-lg text-left font-semibold ",children:"Keys"})}),e.jsxs("div",{className:"mt-5 flex flex-row ",children:[e.jsx("div",{className:"flex-grow",children:e.jsx("label",{className:"font-inter text-sm text-left font-medium",children:"Key"})}),e.jsx("div",{className:"flex-grow pr-12",children:e.jsx("label",{className:"font-inter text-sm text-left font-medium",children:"Value"})})]})]}),m.map((l,c)=>e.jsxs("div",{className:"flex flex-row items-center space-x-1 ",children:[e.jsx("div",{className:"relative flex-grow ",children:e.jsx(g,{name:`keysValues.${c}.key`,control:n,render:({field:d})=>e.jsx(j,{...d,className:"mb-2 w-full",required:!0,placeholder:"key"})})}),e.jsx("div",{className:"relative flex-grow",children:e.jsxs("div",{className:"relative",children:[e.jsx(g,{name:`keysValues.${c}.value`,control:n,render:({field:d})=>e.jsx(j,{...d,className:"mb-2 w-full pr-10",required:!0,placeholder:"•••••••••",type:i(`keysValues.${c}.showPassword`)?"text":"password"})}),e.jsx("button",{type:"button",onClick:()=>{const d=i(`keysValues.${c}.showPassword`);o(`keysValues.${c}.showPassword`,!d)},className:"absolute inset-y-1 right-0 flex items-center pb-1 pr-3",children:e.jsx(ie,{className:"h-4 w-4 flex-shrink-0"})})]})}),e.jsxs("div",{className:"flex items-center",children:[c===m.length-1&&e.jsx(h,{intent:"primary",emphasis:"subtle",onClick:()=>_({key:"",value:""}),className:"mb-2 flex h-7 w-7 items-center justify-center",children:e.jsx(ue,{className:"flex-shrink-0 fill-primary-600"})}),c!==m.length-1&&e.jsx(h,{intent:"secondary",emphasis:"minimal",onClick:()=>R(c),className:"mb-2 h-7 w-7 items-center justify-center",children:e.jsx(q,{className:"flex-shrink-0 fill-theme-text-secondary"})})]})]},l.id))]})}),e.jsxs(A,{className:"gap-[10px]",children:[e.jsx(V,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{intent:"primary",disabled:!u,type:"submit",form:"create-secret-form",children:"Register Secret"})]})]})}async function De(s){const t=D(C.secrets.detail(s)),a=await E(t,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(a.status===404&&J(),!a.ok)throw new T({message:"Error deleting secret",status:a.status,statusText:a.statusText});return a.json()}function Ce(s){return I({mutationFn:async t=>De(t),...s})}function Ee({secretId:s}){const t=L(),{mutate:a}=Ce({onSuccess(){t.invalidateQueries({queryKey:["secrets"]})}}),[r,n]=x.useState("");function i(){a(s)}function o(u){n(u.target.value)}return e.jsxs(F,{children:[e.jsx(P,{children:e.jsx(O,{children:"Delete secret"})}),e.jsxs("div",{className:"gap-5 p-5",children:[e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Are you sure you want to delete this secret?"}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"This action cannot be undone."}),e.jsx("h3",{className:"font-inter text-sm mb-1 mt-4 text-left font-medium leading-5",children:"Please type DELETE to confirm"}),e.jsx(j,{name:"key",onChange:o,className:"w-full",required:!0,value:r})]}),e.jsxs(A,{className:"gap-[10px]",children:[e.jsx(V,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{intent:"danger",type:"submit",form:"edit-secret-form",onClick:i,disabled:r!=="DELETE",children:"Delete"})]})]})}function Te({secretId:s}){const[t,a]=x.useState(!1),[r,n]=x.useState(!1),i=x.useRef(null),o=x.useRef(null);function u(){o.current=i.current}function p(m){if(m===!1){a(!1),setTimeout(()=>{n(m)},200);return}n(m)}return e.jsxs(W,{onOpenChange:a,open:t,children:[e.jsx(X,{ref:i,children:e.jsx(Ne,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsxs(Y,{hidden:r,onCloseAutoFocus:m=>{o.current&&(o.current.focus(),o.current=null,m.preventDefault())},align:"end",sideOffset:7,children:[e.jsx(k,{onSelect:u,onOpenChange:p,triggerChildren:"Edit ",icon:e.jsx(we,{}),children:e.jsx(ce,{secretId:s,isSecretNameEditable:!0,dialogTitle:"Edit secret"})}),e.jsx(k,{onSelect:u,onOpenChange:p,triggerChildren:"Delete ",icon:e.jsx(q,{}),children:e.jsx(Ee,{secretId:s})})]})]})}const Fe=[{id:"secret",header:"Secret",accessorFn:s=>s.name,cell:({getValue:s,row:t})=>{const a=`from zenml.client import Client
|
2
|
+
secret = Client().get_secret("${t.original.name}")
|
3
|
+
`;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(fe,{className:"h-5 w-5 flex-shrink-0 fill-primary-400"}),e.jsxs("div",{className:"group/copybutton flex flex-col",children:[e.jsxs("div",{className:"flex flex-row items-center space-x-1",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(b,{className:"text-text-md font-semibold text-theme-text-primary",to:N.settings.secrets.detail(t.original.id),children:t.original.name}),e.jsx(oe,{code:a})]}),e.jsx(v,{copyText:s()})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(b,{to:N.settings.secrets.detail(t.original.id),className:"flex items-center gap-1 text-text-sm text-theme-text-secondary",children:t.original.id.slice(0,8)}),e.jsx(v,{copyText:t.original.id})]})]})]})}},{id:"author",header:"Author",accessorFn:s=>{var t;return(t=s.body)==null?void 0:t.user},cell:({getValue:s})=>{const t=s();return e.jsx(e.Fragment,{children:e.jsx(ge,{username:Z(t)})})}},{id:"created_at",header:"Created At",accessorFn:s=>{var t;return(t=s.body)==null?void 0:t.created},cell:({getValue:s})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(je,{dateString:s()})})},{id:"admin_actions",header:"",accessorFn:s=>String(s.id),cell:({row:s,getValue:t})=>{var r,n,i;const a=t();return(i=(n=(r=s.original.body)==null?void 0:r.user)==null?void 0:n.body)!=null&&i.is_admin?e.jsx(Te,{secretId:a}):e.jsx("p",{className:"text-sm text-theme-text-secondary",children:"No Actions"})}}],y=1,Pe=f.object({page:f.coerce.number().min(y).optional().default(y).catch(y),name:f.string().optional(),operator:f.enum(["and","or"]).optional()});function Oe(){const[s]=ye(),{page:t,name:a,operator:r}=Pe.parse({page:s.get("page")||void 0,name:s.get("name")||void 0,operator:s.get("operator")||void 0});return{page:t,name:a,logical_operator:r}}function Ae(){const s=Oe(),{data:t}=S({...de.secretList({...s,sort_by:"desc:created"}),throwOnError:!0}),{data:a}=ee(),r=(a==null?void 0:a.id)||"",{data:n,isLoading:i,isError:o,isSuccess:u}=S({...me.workspaceDetail("default")});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsx(re,{searchParams:s}),i?e.jsx("div",{children:"Loading..."}):o?e.jsx("div",{children:"Error loading workspace details."}):u&&e.jsx(be,{id:r,workspace:n})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:t?e.jsx(se,{columns:Fe,data:t.items}):e.jsx(w,{className:"h-[250px] w-full"})}),t?t.total_pages>1&&e.jsx(ne,{searchParams:s,paginate:t}):e.jsx(w,{className:"h-[36px] w-[300px]"})]})]})}function as(){const{setCurrentBreadcrumbData:s}=te();return x.useEffect(()=>{s({segment:"secrets",data:null})},[]),e.jsxs(ae,{className:"space-y-4 p-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Secrets"}),e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:["Configure and manage your pipeline secrets and configurations."," ",e.jsx("a",{target:"_blank",rel:"noreferrer noopener",href:"https://docs.zenml.io/how-to/interact-with-secrets",className:"link text-primary-400",children:"Learn More"})]})]}),e.jsx(Ae,{})]})}export{as as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{j as e,r as f}from"./@radix-DeK6qiuw.js";import{R as j,y as g,z as i,K as b,r as c,T as y,E as N,G as v,H as P,J as p,f as R,L as S,S as u,o as T}from"./index-CCOPpudF.js";import{c as k,L as l,g as h}from"./@react-router-B3Z5rLr2.js";import{S as C}from"./refresh-BjOeWlEq.js";import{u as _}from"./all-pipeline-runs-query-D-c2G6lV.js";import{S as E,P as w}from"./SearchField-lp1KgU4e.js";import{C as x}from"./CopyButton-LNcWaa14.js";import{D}from"./DisplayDate-CDMUcQHS.js";import{g as F,E as A}from"./ExecutionStatus-C7zyIQKZ.js";import{I as B}from"./InlineAvatar-DiGOWNKF.js";import{a as I,b as z,u as L,c as G,R as H}from"./RunSelector-DkPiIiNr.js";import"./@tanstack-DT5WLu9C.js";import"./@reactflow-CK0KJUen.js";import"./url-CkvKAnwF.js";import"./dots-horizontal-otGBOSDJ.js";import"./chevron-right-double-D7ojK9Co.js";import"./index-Uu49AX48.js";import"./copy-C8XQA2Ug.js";import"./check-circle-jNbX5-sR.js";import"./trash-arLUMWMS.js";import"./delete-run-CJdh1P_h.js";import"./zod-BwEbpOxH.js";import"./index.esm-Dy6Z9Ung.js";import"./AlertDialogDropdownItem-DezXKmDf.js";function U({namespace:s}){return e.jsx(j,{children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(g,{className:"h-5 w-5 fill-neutral-400"}),e.jsx("h1",{className:"text-display-xs font-semibold",children:decodeURIComponent(s)})]})})}const d=1,q=i.object({page:i.coerce.number().min(d).optional().default(d).catch(d),name:i.string().optional(),operator:i.enum(["and","or"]).optional()});function J(){const[s]=k(),{page:a,name:t,operator:r}=q.parse({page:s.get("page")||void 0,name:s.get("name")||void 0});return{page:a,name:t,logical_operator:r}}function K(){return[{id:"check",header:"",meta:{width:"1%"},accessorFn:s=>({id:s.id}),cell:({getValue:s})=>{const{id:a}=s();return e.jsx(I,{id:a})}},{id:"run",header:"Run",accessorFn:s=>{var a;return{name:s.name,id:s.id,status:(a=s.body)==null?void 0:a.status}},cell:({getValue:s})=>{const{name:a,status:t,id:r}=s();return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(b,{className:`h-5 w-5 shrink-0 ${F(t)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(l,{to:c.runs.detail(r),className:"flex items-center gap-1",children:e.jsx("h2",{className:"text-text-md font-semibold",children:a})}),e.jsx(y,{children:e.jsxs(N,{children:[e.jsx(v,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(A,{status:t})}),e.jsx(P,{className:"z-20 capitalize",children:t})]})}),e.jsx(x,{copyText:a})]}),e.jsxs(l,{to:c.runs.detail(r),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:r.split("-")[0]}),e.jsx(x,{copyText:r})]})]})]})}},{id:"stack",header:"Stack",accessorFn:s=>{var a,t,r,n;return{name:(t=(a=s.body)==null?void 0:a.stack)==null?void 0:t.name,id:(n=(r=s.body)==null?void 0:r.stack)==null?void 0:n.id}},cell:({getValue:s})=>{const{name:a,id:t}=s();return!a||!t?null:e.jsx(l,{to:c.stacks.overview,children:e.jsx(p,{rounded:!1,className:"inline-block",color:"turquoise",emphasis:"subtle",children:a})})}},{id:"repository",header:"Repository",accessorFn:s=>{var a,t,r,n,o,m;return{name:(r=(t=(a=s.body)==null?void 0:a.code_reference)==null?void 0:t.body)==null?void 0:r.code_repository.name,id:(m=(o=(n=s.body)==null?void 0:n.code_reference)==null?void 0:o.body)==null?void 0:m.code_repository.id}},cell:({getValue:s})=>{const{name:a,id:t}=s();return!a||!t?null:e.jsx("div",{children:e.jsx(p,{rounded:!1,className:"inline-block",color:"grey",emphasis:"subtle",children:a})})}},{id:"created",header:"Created at",accessorFn:s=>{var a;return(a=s.body)==null?void 0:a.created},cell:({getValue:s})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(D,{dateString:s()})})},{id:"author",header:"Author",accessorFn:s=>{var a;return{author:(a=s.body)==null?void 0:a.user}},cell:({getValue:s})=>{const{author:a}=s();return e.jsx(B,{username:a.name})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:s})=>e.jsx(z,{id:s.original.id})}]}function O(){const{namespace:s}=h(),a=J(),t=K(),{selectedRuns:r}=L(),{data:n,refetch:o}=_({params:{pipeline_name:decodeURIComponent(s),...a,sort_by:"desc:updated"}},{throwOnError:!0});return e.jsxs("div",{className:"flex flex-col gap-5 p-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[r.length?e.jsx(G,{}):e.jsx(E,{searchParams:a}),e.jsxs(R,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>o(),children:[e.jsx(C,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:n?e.jsx(S,{columns:t,data:n.items}):e.jsx(u,{className:"h-[500px] w-full"})}),n?n.total_pages>1&&e.jsx(w,{searchParams:a,paginate:n}):e.jsx(u,{className:"h-[36px] w-[300px]"})]})]})}function fe(){const{namespace:s}=h(),{setCurrentBreadcrumbData:a}=T();return f.useEffect(()=>{s&&a({segment:"pipeline_detail",data:{name:s}})},[s]),e.jsx("div",{children:e.jsxs(H,{children:[e.jsx(U,{namespace:s}),e.jsx(O,{})]})})}export{fe as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as i,j as s}from"./@radix-DeK6qiuw.js";import{ae as D,af as k,f,ag as z,ah as E,ai as A,i as b,au as v,an as S,j as C,I as o,al as T,am as q,z as a,m as B,B as M,S as P,A as Q,b as V,at as _}from"./index-CCOPpudF.js";import{c as K}from"./@tanstack-DT5WLu9C.js";import{u as F}from"./index.esm-Dy6Z9Ung.js";import{S as O}from"./tick-circle-BEX_Tp4v.js";import{t as U}from"./zod-BwEbpOxH.js";import{P as H}from"./PasswordChecker-B0nadgh6.js";import{u as R}from"./UpdatePasswordSchemas-Sc0A0pP-.js";import{D as G}from"./DisplayDate-CDMUcQHS.js";import"./@react-router-B3Z5rLr2.js";import"./@reactflow-CK0KJUen.js";function J(){const[e,l]=i.useState(!1);return s.jsxs(D,{onOpenChange:()=>{l(!1)},children:[s.jsx(k,{asChild:!0,children:s.jsx(f,{size:"md",className:"shrink-0",intent:"primary",emphasis:"subtle",children:"Change Password"})}),s.jsxs(z,{children:[s.jsx(E,{children:s.jsx(A,{children:" Update Credentials"})}),e?s.jsx(W,{}):s.jsx(L,{setSuccess:l})]})]})}function L({setSuccess:e}){var u;const l=i.useId(),d=i.useId(),n=i.useId(),{toast:x}=b(),{mutate:p,isPending:j}=v({onSuccess(){e(!0)},onError(t){S(t)&&x({status:"error",emphasis:"subtle",icon:s.jsx(C,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:t.message,rounded:!0})}}),{register:c,handleSubmit:m,watch:w,formState:{isValid:N,errors:y}}=F({resolver:U(R),mode:"onChange",criteriaMode:"all"});function g(t){p({old_password:t.oldPassword,password:t.newPassword})}const h=(u=y.newPassword)==null?void 0:u.types;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-5 p-7",children:[s.jsx("form",{id:"update-password-form",onSubmit:m(g),children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:l,className:"text-text-sm",children:"Old Password"}),s.jsx(o,{...c("oldPassword"),type:"password",id:l,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:d,className:"text-text-sm",children:"New Password"}),s.jsx(o,{...c("newPassword"),type:"password",id:d,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:n,className:"text-text-sm",children:"Confirm Password"}),s.jsx(o,{...c("confirmPassword"),type:"password",id:n,className:"w-full"})]})]})}),s.jsx(H,{val:w("newPassword"),errors:h||[]})]}),s.jsxs(T,{className:"gap-[10px]",children:[s.jsx(q,{asChild:!0,children:s.jsx(f,{size:"sm",intent:"secondary",children:"Cancel"})}),s.jsx(f,{disabled:!N||j,form:"update-password-form",size:"sm",children:"Update Password"})]})]})}function W(){return s.jsxs("div",{className:"space-y-5 p-7 text-center",children:[s.jsx(O,{className:"mx-auto h-[110px] w-[110px] fill-success-500"}),s.jsx("p",{className:"text-text-lg font-semibold text-theme-text-primary",children:"The password was updated successfully!"})]})}const X=a.object({fullName:a.union([a.string(),a.literal("")]),username:a.union([a.string(),a.literal("")]),email:a.union([a.string().email(),a.literal("")])}).refine(e=>e.fullName!==""||e.username!==""||e.email!=="");function Y({user:e}){var h,u,t;const l=K(),{toast:d}=b(),n=i.useId(),x=i.useId(),p=i.useId(),{isPending:j,mutate:c}=v({onError(r){S(r)&&d({status:"error",emphasis:"subtle",icon:s.jsx(C,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:r.message,rounded:!0})},onSuccess:()=>{l.invalidateQueries({queryKey:["current-user"]}),l.invalidateQueries({queryKey:["users"]}),w(),d({status:"success",emphasis:"subtle",rounded:!0,description:"User updated successfully"})}}),{register:m,reset:w,handleSubmit:N,formState:{isValid:y}}=F({resolver:U(X),defaultValues:{email:void 0,fullName:void 0,username:void 0}});function g(r){const I={...r.fullName&&{full_name:r.fullName},...r.username&&{name:r.username},...r.email&&{email:r.email}};c(I)}return s.jsxs("div",{className:"w-full max-w-[600px]",children:[s.jsx("form",{onSubmit:N(g),children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:n,className:"text-text-sm",children:"Full Name"}),s.jsx(o,{placeholder:(h=e.body)==null?void 0:h.full_name,...m("fullName"),id:n,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:x,className:"text-text-sm",children:"Username"}),s.jsx(o,{...m("username"),placeholder:e.name,id:x,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:p,className:"text-text-sm",children:"Email"}),s.jsx(o,{placeholder:((u=e.metadata)==null?void 0:u.email)??void 0,...m("email"),id:p,className:"w-full"})]}),s.jsx("div",{className:"flex justify-end",children:s.jsx(f,{disabled:j||!y,size:"md",intent:"primary",children:"Update"})})]})}),s.jsx(J,{}),s.jsxs("p",{className:"mt-5 text-text-sm text-theme-text-secondary",children:["Created on ",s.jsx(G,{dateString:((t=e.body)==null?void 0:t.created)||""})]})]})}function ns(){const{data:e}=B();return s.jsxs(M,{className:"flex flex-col gap-5 p-5",children:[s.jsx("h1",{className:"text-text-xl font-semibold",children:"Profile"}),s.jsxs("div",{className:"flex justify-between",children:[e?s.jsx(Y,{user:e}):s.jsx(P,{className:"h-[350px] w-full"}),e?s.jsx(Q,{size:"xxl",className:"ml-5 h-[140px] w-[140px]",type:"rounded",children:s.jsx(V,{className:"text-display-lg",size:"xxl",children:_(e)[0]})}):s.jsx(P,{className:"h-[140px] w-[140px] rounded-rounded"})]})]})}export{ns as default};
|