zenml-nightly 0.83.1.dev20250710__py3-none-any.whl → 0.84.0.dev20250712__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/artifact_stores/base_artifact_store.py +51 -23
- zenml/artifacts/utils.py +3 -1
- zenml/cli/pipeline.py +13 -2
- zenml/constants.py +4 -0
- zenml/container_registries/base_container_registry.py +17 -5
- zenml/enums.py +9 -0
- zenml/integrations/aws/flavors/sagemaker_orchestrator_flavor.py +150 -117
- zenml/integrations/aws/flavors/sagemaker_step_operator_flavor.py +43 -42
- zenml/integrations/aws/orchestrators/sagemaker_orchestrator.py +16 -7
- zenml/integrations/azure/orchestrators/azureml_orchestrator.py +18 -12
- zenml/integrations/bentoml/flavors/bentoml_model_deployer_flavor.py +7 -1
- zenml/integrations/databricks/flavors/databricks_orchestrator_flavor.py +58 -23
- zenml/integrations/feast/flavors/feast_feature_store_flavor.py +18 -5
- zenml/integrations/gcp/flavors/vertex_experiment_tracker_flavor.py +10 -42
- zenml/integrations/gcp/flavors/vertex_orchestrator_flavor.py +99 -92
- zenml/integrations/gcp/google_credentials_mixin.py +13 -8
- zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +18 -9
- zenml/integrations/huggingface/__init__.py +1 -1
- zenml/integrations/hyperai/flavors/hyperai_orchestrator_flavor.py +28 -30
- zenml/integrations/kaniko/flavors/kaniko_image_builder_flavor.py +56 -40
- zenml/integrations/kubeflow/flavors/kubeflow_orchestrator_flavor.py +59 -48
- zenml/integrations/kubernetes/flavors/kubernetes_orchestrator_flavor.py +159 -121
- zenml/integrations/kubernetes/flavors/kubernetes_step_operator_flavor.py +48 -33
- zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator.py +182 -1
- zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator_entrypoint.py +7 -3
- zenml/integrations/lightning/flavors/lightning_orchestrator_flavor.py +41 -25
- zenml/integrations/mlflow/flavors/mlflow_experiment_tracker_flavor.py +51 -44
- zenml/integrations/mlflow/flavors/mlflow_model_deployer_flavor.py +9 -4
- zenml/integrations/neptune/flavors/neptune_experiment_tracker_flavor.py +13 -12
- zenml/integrations/s3/flavors/s3_artifact_store_flavor.py +32 -7
- zenml/integrations/vllm/flavors/vllm_model_deployer_flavor.py +7 -1
- zenml/integrations/wandb/flavors/wandb_experiment_tracker_flavor.py +34 -25
- zenml/integrations/whylogs/flavors/whylogs_data_validator_flavor.py +14 -11
- zenml/logging/step_logging.py +8 -7
- zenml/models/v2/core/logs.py +2 -1
- zenml/models/v2/core/pipeline_run.py +0 -59
- zenml/orchestrators/base_orchestrator.py +7 -1
- zenml/pipelines/build_utils.py +2 -1
- zenml/stack/authentication_mixin.py +6 -5
- zenml/stack/flavor.py +5 -1
- zenml/utils/code_utils.py +2 -1
- zenml/utils/docker_utils.py +22 -0
- zenml/utils/io_utils.py +18 -0
- zenml/utils/pipeline_docker_image_builder.py +4 -1
- zenml/utils/run_utils.py +101 -8
- zenml/zen_server/dashboard/assets/{404-B5eko6XL.js → 404-B5cfnwZ1.js} +1 -1
- zenml/zen_server/dashboard/assets/{@radix-Cdvw4jJ8.js → @radix-C_LirfyT.js} +1 -1
- zenml/zen_server/dashboard/assets/{@react-router-DeDfXbUF.js → @react-router-BSsrkPOd.js} +1 -1
- zenml/zen_server/dashboard/assets/{@reactflow-B_iCtR7X.js → @reactflow-D9hglKLF.js} +2 -2
- zenml/zen_server/dashboard/assets/{@tanstack-5gTMR7G2.js → @tanstack-C0SeHZng.js} +1 -1
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-druRNuO2.js +1 -0
- zenml/zen_server/dashboard/assets/ButtonGroup-SF2DlzHV.js +1 -0
- zenml/zen_server/dashboard/assets/{CodeSnippet-Ctplhzdc.js → CodeSnippet-D8iBqOVv.js} +1 -1
- zenml/zen_server/dashboard/assets/CollapsibleCard-D0-pQi1n.js +1 -0
- zenml/zen_server/dashboard/assets/{ComponentBadge-Cnecw3qz.js → ComponentBadge-mw2Ja_ON.js} +1 -1
- zenml/zen_server/dashboard/assets/ComponentIcon-BXgpt-jw.js +1 -0
- zenml/zen_server/dashboard/assets/{DeleteAlertDialog-DEI0YDzP.js → DeleteAlertDialog-BbyFVnVI.js} +1 -1
- zenml/zen_server/dashboard/assets/DialogItem-DeME0oSt.js +1 -0
- zenml/zen_server/dashboard/assets/{DisplayDate-8RESqe5H.js → DisplayDate-v3KW7oez.js} +1 -1
- zenml/zen_server/dashboard/assets/{EmptyState-CjrgDtVk.js → EmptyState-DG0m-CGv.js} +1 -1
- zenml/zen_server/dashboard/assets/Error-DcVLcrLs.js +1 -0
- zenml/zen_server/dashboard/assets/ExecutionStatus-C4tlFnlh.js +1 -0
- zenml/zen_server/dashboard/assets/{Helpbox-DtUG2Bf_.js → Helpbox-C-RGHz3S.js} +1 -1
- zenml/zen_server/dashboard/assets/{Infobox-CSBRrM6r.js → Infobox-DFCWPbMb.js} +1 -1
- zenml/zen_server/dashboard/assets/{LeftSideMenu-DPsCCK3z.js → LeftSideMenu-Czev0KCA.js} +1 -1
- zenml/zen_server/dashboard/assets/{Lock-CrIAdQo6.js → Lock-CRP5J_su.js} +1 -1
- zenml/zen_server/dashboard/assets/NestedCollapsible-CN9scBUn.js +1 -0
- zenml/zen_server/dashboard/assets/{NumberBox-DtCv7jh3.js → NumberBox-CoQjQYDJ.js} +1 -1
- zenml/zen_server/dashboard/assets/{Pagination-CWnEpSpN.js → Pagination-CcDD5yHh.js} +1 -1
- zenml/zen_server/dashboard/assets/Partials-DlMzfKgs.js +1 -0
- zenml/zen_server/dashboard/assets/{PasswordChecker-B88WjuCe.js → PasswordChecker-BZwoeQIm.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProCta-CNyp04C8.js → ProCta-CU2ycJDo.js} +1 -1
- zenml/zen_server/dashboard/assets/ProviderIcon-BMAn9Jld.js +1 -0
- zenml/zen_server/dashboard/assets/ProviderRadio-D_q9tE3G.js +1 -0
- zenml/zen_server/dashboard/assets/RunsBody-BToytB8e.js +1 -0
- zenml/zen_server/dashboard/assets/{SearchField-BtUi6cYl.js → SearchField-D_0-uAPj.js} +1 -1
- zenml/zen_server/dashboard/assets/SecretTooltip-BcWMKb9f.js +1 -0
- zenml/zen_server/dashboard/assets/{SetPassword-BmbgL_ed.js → SetPassword-CaKVSqAL.js} +1 -1
- zenml/zen_server/dashboard/assets/{SheetHeader-DkH7aG9K.js → SheetHeader-7vwlsY_i.js} +1 -1
- zenml/zen_server/dashboard/assets/StackComponentList-s7eSfm8o.js +1 -0
- zenml/zen_server/dashboard/assets/StackList-Dt0FrIkM.js +1 -0
- zenml/zen_server/dashboard/assets/Tabs-B27AHUfo.js +1 -0
- zenml/zen_server/dashboard/assets/Tick-DDeDgTuT.js +1 -0
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-D_DCETSO.js → UpdatePasswordSchemas-Da5RndbV.js} +1 -1
- zenml/zen_server/dashboard/assets/{Wizard-BHvY75u_.js → Wizard-8aJzxUjb.js} +1 -1
- zenml/zen_server/dashboard/assets/WizardFooter-Bt7_UE14.js +1 -0
- zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-DpKw9WL9.js → all-pipeline-runs-query-gorNNEaT.js} +1 -1
- zenml/zen_server/dashboard/assets/{arrow-left-MRXv5pAH.js → arrow-left-hcj2H8HY.js} +1 -1
- zenml/zen_server/dashboard/assets/bar-chart-square-check-9siI9icm.js +1 -0
- zenml/zen_server/dashboard/assets/{bulk-delete-CzYA--cC.js → bulk-delete-B5RTlnD_.js} +1 -1
- zenml/zen_server/dashboard/assets/{check-B9QMTa3f.js → check-D1bHMJkL.js} +1 -1
- zenml/zen_server/dashboard/assets/{check-circle-C4tYvbtw.js → check-circle-mnEgPhPF.js} +1 -1
- zenml/zen_server/dashboard/assets/{chevron-down-jbbQh82s.js → chevron-down-Z3nUe-0U.js} +1 -1
- zenml/zen_server/dashboard/assets/{chevron-right-double-Dgp_gEsp.js → chevron-right-double-CbRQKN4Q.js} +1 -1
- zenml/zen_server/dashboard/assets/{clock-B_mTG8PH.js → clock-BMjHXT3f.js} +1 -1
- zenml/zen_server/dashboard/assets/{code-browser-CiD8qkBx.js → code-browser-DftoiCIg.js} +1 -1
- zenml/zen_server/dashboard/assets/configuration-form-Yz8m0QIG.js +1 -0
- zenml/zen_server/dashboard/assets/constants-DeV48DuZ.js +1 -0
- zenml/zen_server/dashboard/assets/{create-stack-BpZrmKDu.js → create-stack-BruqH_6X.js} +1 -1
- zenml/zen_server/dashboard/assets/credit-card-CH1BHrXY.js +1 -0
- zenml/zen_server/dashboard/assets/dataflow-2-qHjWt7zp.js +1 -0
- zenml/zen_server/dashboard/assets/{delete-run-BkyDsKQc.js → delete-run-ibBtciMR.js} +1 -1
- zenml/zen_server/dashboard/assets/{expand-full-BPiXpch2.js → expand-full-CD4fFvM-.js} +1 -1
- zenml/zen_server/dashboard/assets/{eye-CbVlAYty.js → eye-CLNgIh_K.js} +1 -1
- zenml/zen_server/dashboard/assets/{file-text-Cd8wVfq5.js → file-text-CltVhgwZ.js} +1 -1
- zenml/zen_server/dashboard/assets/form-6aSt3tIl.js +1 -0
- zenml/zen_server/dashboard/assets/form-schemas-B9XgTS1V.js +1 -0
- zenml/zen_server/dashboard/assets/gradient_bg-BH8t8fi6.webp +0 -0
- zenml/zen_server/dashboard/assets/{help-Co6aedki.js → help-B0CvBhCm.js} +1 -1
- zenml/zen_server/dashboard/assets/icon-hDriJUXY.js +1 -0
- zenml/zen_server/dashboard/assets/{index-eoDB_1XX.js → index-B7CRNU8l.js} +1 -1
- zenml/zen_server/dashboard/assets/index-BQWlHo1Y.js +1 -0
- zenml/zen_server/dashboard/assets/{index-DWpiv-Ft.js → index-BRhKF2z-.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-BgEfQ3_G.js → index-BacoJBEQ.js} +11 -11
- zenml/zen_server/dashboard/assets/{index-BBt0LDtR.js → index-dCcVgFNl.js} +1 -1
- zenml/zen_server/dashboard/assets/index-eggipFZS.css +1 -0
- zenml/zen_server/dashboard/assets/index-mA8kL088.js +14 -0
- zenml/zen_server/dashboard/assets/{index.es-C1gfATPn.js → index.es-DcVFDpJU.js} +1 -1
- zenml/zen_server/dashboard/assets/{index.esm-DhJo3mA6.js → index.esm-COnaHLSh.js} +1 -1
- zenml/zen_server/dashboard/assets/{info-QkbQz4QU.js → info-CyMih3vQ.js} +1 -1
- zenml/zen_server/dashboard/assets/{key-icon-C07HKw8z.js → key-icon-HOx2gazv.js} +1 -1
- zenml/zen_server/dashboard/assets/{layout-DBbfEFBe.js → layout-C5dgIReC.js} +1 -1
- zenml/zen_server/dashboard/assets/layout-CFLL6-CM.js +1 -0
- zenml/zen_server/dashboard/assets/{login-mutation-C1hvP_cX.js → login-mutation-CidpsqyH.js} +1 -1
- zenml/zen_server/dashboard/assets/{logs-CQKlJjo0.js → logs-DoLoTEfj.js} +1 -1
- zenml/zen_server/dashboard/assets/mail-C160gvB0.js +1 -0
- zenml/zen_server/dashboard/assets/message-chat-square-DLz6XmPS.js +1 -0
- zenml/zen_server/dashboard/assets/{package-miExReQl.js → package-BhYXGPxF.js} +1 -1
- zenml/zen_server/dashboard/assets/page-6huxSHEu.js +1 -0
- zenml/zen_server/dashboard/assets/page-7CJ4Wq3O.js +1 -0
- zenml/zen_server/dashboard/assets/page-8U20Tu_8.js +1 -0
- zenml/zen_server/dashboard/assets/{page-4zc4xPv2.js → page-BByayrO-.js} +2 -2
- zenml/zen_server/dashboard/assets/page-BCRXJXC9.js +1 -0
- zenml/zen_server/dashboard/assets/page-BK59rZvf.js +1 -0
- zenml/zen_server/dashboard/assets/page-BMpXak4U.js +1 -0
- zenml/zen_server/dashboard/assets/page-BTDi81N3.js +1 -0
- zenml/zen_server/dashboard/assets/{page-D-tJ_Y0a.js → page-BX67x4iL.js} +1 -1
- zenml/zen_server/dashboard/assets/page-Bjmcdg64.js +1 -0
- zenml/zen_server/dashboard/assets/page-BsAn8p4m.js +1 -0
- zenml/zen_server/dashboard/assets/{page-C2i-C7jv.js → page-BwjPRuaY.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CDtSVkNc.js +1 -0
- zenml/zen_server/dashboard/assets/page-CEDU0L2T.js +1 -0
- zenml/zen_server/dashboard/assets/page-COJK90rG.js +1 -0
- zenml/zen_server/dashboard/assets/page-CY0LPcAJ.js +1 -0
- zenml/zen_server/dashboard/assets/page-C_XMn4GU.js +1 -0
- zenml/zen_server/dashboard/assets/page-Cb3KGsPK.js +22 -0
- zenml/zen_server/dashboard/assets/page-Cc8owYXQ.js +1 -0
- zenml/zen_server/dashboard/assets/{page-C3JfJxuR.js → page-CeGBDh1Q.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CiGOVsj3.js +1 -0
- zenml/zen_server/dashboard/assets/page-CmLSFMkW.js +1 -0
- zenml/zen_server/dashboard/assets/page-CnfCptXq.js +1 -0
- zenml/zen_server/dashboard/assets/page-CvllZMBF.js +1 -0
- zenml/zen_server/dashboard/assets/page-CxzglV3-.js +1 -0
- zenml/zen_server/dashboard/assets/{page-rVhXI5ZO.js → page-D6cvOG8w.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BxeZrG_t.js → page-DDWW21kl.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DiHZK-1w.js → page-DF4FVxxW.js} +2 -2
- zenml/zen_server/dashboard/assets/page-DSZfclXt.js +1 -0
- zenml/zen_server/dashboard/assets/page-DVLez4R1.js +1 -0
- zenml/zen_server/dashboard/assets/page-DcXrWWWh.js +1 -0
- zenml/zen_server/dashboard/assets/page-Dg7-H_9i.js +1 -0
- zenml/zen_server/dashboard/assets/{page-BPQ66vR-.js → page-DgldL5UB.js} +2 -2
- zenml/zen_server/dashboard/assets/page-Dw7XuiSo.js +18 -0
- zenml/zen_server/dashboard/assets/{page-DOCOmmKn.js → page-FQxi1Otg.js} +1 -1
- zenml/zen_server/dashboard/assets/page-XrmOHHg7.js +1 -0
- zenml/zen_server/dashboard/assets/page-YdWnx9MX.js +1 -0
- zenml/zen_server/dashboard/assets/page-oRm7D4TC.js +1 -0
- zenml/zen_server/dashboard/assets/{page-uxjMX8Iq.js → page-q41JNDWO.js} +1 -1
- zenml/zen_server/dashboard/assets/page-x2GXC8sI.js +1 -0
- zenml/zen_server/dashboard/assets/page-z2FXP4GY.js +1 -0
- zenml/zen_server/dashboard/assets/{persist-CFPbMcJX.js → persist-BKKcL1Kp.js} +1 -1
- zenml/zen_server/dashboard/assets/{persist-BsdEtCkd.js → persist-DxiyfAax.js} +1 -1
- zenml/zen_server/dashboard/assets/{pipeline-CSUlkd50.js → pipeline-BJ8liDnl.js} +1 -1
- zenml/zen_server/dashboard/assets/{plus-Cl0_rCVF.js → plus-cI8zD2xh.js} +1 -1
- zenml/zen_server/dashboard/assets/primary-role-CPGHymjN.js +1 -0
- zenml/zen_server/dashboard/assets/{react-error-boundary.esm-7_MuhCay.js → react-error-boundary.esm-DoXxY4pT.js} +1 -1
- zenml/zen_server/dashboard/assets/{refresh-BcTM09NW.js → refresh-3EF2R7ja.js} +1 -1
- zenml/zen_server/dashboard/assets/{resource-tyes-list-79FqS3LY.js → resource-tyes-list-B5rkZcbc.js} +1 -1
- zenml/zen_server/dashboard/assets/resource-type-tooltip-E97WGqfk.js +1 -0
- zenml/zen_server/dashboard/assets/service-B9aVzfAF.js +2 -0
- zenml/zen_server/dashboard/assets/service-connectors-DL2-k_E2.js +1 -0
- zenml/zen_server/dashboard/assets/{sharedSchema-C_HkejsG.js → sharedSchema-DyUO09BR.js} +1 -1
- zenml/zen_server/dashboard/assets/slash-circle-D2Lb2FyR.js +1 -0
- zenml/zen_server/dashboard/assets/stack-detail-query-Bc4QKlWg.js +1 -0
- zenml/zen_server/dashboard/assets/{terminal-XFL_4QN-.js → terminal-BObrvDlO.js} +1 -1
- zenml/zen_server/dashboard/assets/{terminal-square-XFL_4QN-.js → terminal-square-BObrvDlO.js} +1 -1
- zenml/zen_server/dashboard/assets/{transform-CeZdrxDZ.js → transform-DFpKTKgF.js} +1 -1
- zenml/zen_server/dashboard/assets/{trash-DP6Tpp_E.js → trash-HKxXWbSG.js} +1 -1
- zenml/zen_server/dashboard/assets/{update-current-user-mutation-Ca-Lmwuj.js → update-current-user-mutation-DSyUyHVj.js} +1 -1
- zenml/zen_server/dashboard/assets/update-server-settings-mutation-CdM-Sdds.js +1 -0
- zenml/zen_server/dashboard/assets/{zod-XdS2h1ws.js → zod-DgEcN9jD.js} +1 -1
- zenml/zen_server/dashboard/index.html +7 -7
- zenml/zen_server/deploy/daemon/daemon_zen_server.py +4 -0
- zenml/zen_server/deploy/docker/docker_zen_server.py +2 -0
- zenml/zen_server/routers/runs_endpoints.py +20 -28
- zenml/zen_stores/migrations/versions/0.84.0_release.py +23 -0
- zenml/zen_stores/sql_zen_store.py +9 -3
- {zenml_nightly-0.83.1.dev20250710.dist-info → zenml_nightly-0.84.0.dev20250712.dist-info}/METADATA +9 -22
- {zenml_nightly-0.83.1.dev20250710.dist-info → zenml_nightly-0.84.0.dev20250712.dist-info}/RECORD +202 -195
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-DsOmO1FH.js +0 -1
- zenml/zen_server/dashboard/assets/ButtonGroup-4sPZDv70.js +0 -1
- zenml/zen_server/dashboard/assets/CollapsibleCard-CBKenz9f.js +0 -1
- zenml/zen_server/dashboard/assets/ComponentIcon-CMiVW-O6.js +0 -1
- zenml/zen_server/dashboard/assets/DialogItem-CRCDpYU6.js +0 -1
- zenml/zen_server/dashboard/assets/Error-BG6f_WRd.js +0 -1
- zenml/zen_server/dashboard/assets/ExecutionStatus-BuhNAE9w.js +0 -1
- zenml/zen_server/dashboard/assets/NestedCollapsible-CMuDIJlp.js +0 -1
- zenml/zen_server/dashboard/assets/Partials-CfHD6OH5.js +0 -1
- zenml/zen_server/dashboard/assets/ProviderIcon-DHejyg7C.js +0 -1
- zenml/zen_server/dashboard/assets/ProviderRadio-tGtie8Gc.js +0 -1
- zenml/zen_server/dashboard/assets/RunsBody-mYwMcWWj.js +0 -1
- zenml/zen_server/dashboard/assets/SecretTooltip-B5u1UsQ9.js +0 -1
- zenml/zen_server/dashboard/assets/StackComponentList-Bi8BKqCu.js +0 -1
- zenml/zen_server/dashboard/assets/StackList-Cvxapo0p.js +0 -1
- zenml/zen_server/dashboard/assets/StackName-CFSZL8ec.js +0 -1
- zenml/zen_server/dashboard/assets/Tabs-D4dv48ry.js +0 -1
- zenml/zen_server/dashboard/assets/Tick-Qquvr4P3.js +0 -1
- zenml/zen_server/dashboard/assets/UsageReason-DhiUV1bu.js +0 -1
- zenml/zen_server/dashboard/assets/WizardFooter-FQm8y-jP.js +0 -1
- zenml/zen_server/dashboard/assets/configuration-form-DSoMMiPE.js +0 -1
- zenml/zen_server/dashboard/assets/constants-DTfsIqHy.js +0 -1
- zenml/zen_server/dashboard/assets/flyte-Cj-xy_8I.svg +0 -10
- zenml/zen_server/dashboard/assets/form-BgtamtJm.js +0 -1
- zenml/zen_server/dashboard/assets/form-schemas-dyDkAxXP.js +0 -1
- zenml/zen_server/dashboard/assets/gcp-B1I3Qvcx.js +0 -1
- zenml/zen_server/dashboard/assets/index-BfNISy0X.css +0 -1
- zenml/zen_server/dashboard/assets/layout-o1x87a3q.js +0 -1
- zenml/zen_server/dashboard/assets/metaflow-weOkWNyT.svg +0 -10
- zenml/zen_server/dashboard/assets/page-4xUZpMN0.js +0 -31
- zenml/zen_server/dashboard/assets/page-B0104V6C.js +0 -1
- zenml/zen_server/dashboard/assets/page-BNJsjvof.js +0 -1
- zenml/zen_server/dashboard/assets/page-BQgSZ2nH.js +0 -1
- zenml/zen_server/dashboard/assets/page-BXl2ZX6J.js +0 -1
- zenml/zen_server/dashboard/assets/page-C2A-2Cj_.js +0 -1
- zenml/zen_server/dashboard/assets/page-CESEqC2L.js +0 -1
- zenml/zen_server/dashboard/assets/page-CF8cTZ7l.js +0 -1
- zenml/zen_server/dashboard/assets/page-CKjsimVu.js +0 -1
- zenml/zen_server/dashboard/assets/page-COLzBwff.js +0 -1
- zenml/zen_server/dashboard/assets/page-COifg5fa.js +0 -1
- zenml/zen_server/dashboard/assets/page-CQeJuA8T.js +0 -1
- zenml/zen_server/dashboard/assets/page-CcjWEjre.js +0 -1
- zenml/zen_server/dashboard/assets/page-CefGLeWy.js +0 -1
- zenml/zen_server/dashboard/assets/page-CfxpV3j4.js +0 -1
- zenml/zen_server/dashboard/assets/page-ClcUzawe.js +0 -1
- zenml/zen_server/dashboard/assets/page-Ct_LB3zo.js +0 -1
- zenml/zen_server/dashboard/assets/page-D-ZWUMYY.js +0 -1
- zenml/zen_server/dashboard/assets/page-DHrvih9u.js +0 -1
- zenml/zen_server/dashboard/assets/page-DMhaHZDw.js +0 -1
- zenml/zen_server/dashboard/assets/page-DcQmxKLp.js +0 -1
- zenml/zen_server/dashboard/assets/page-Dh4GRWw5.js +0 -1
- zenml/zen_server/dashboard/assets/page-Dn7ZNapg.js +0 -1
- zenml/zen_server/dashboard/assets/page-Dy4vSQY7.js +0 -1
- zenml/zen_server/dashboard/assets/page-QrvWQwZb.js +0 -1
- zenml/zen_server/dashboard/assets/page-RF3Fup0q.js +0 -40
- zenml/zen_server/dashboard/assets/page-WuvCrN47.js +0 -1
- zenml/zen_server/dashboard/assets/page-_WnHBI1F.js +0 -1
- zenml/zen_server/dashboard/assets/page-ghjVNgVE.js +0 -1
- zenml/zen_server/dashboard/assets/page-iDsDiDXw.js +0 -1
- zenml/zen_server/dashboard/assets/resource-type-tooltip-BL9ZTRKi.js +0 -1
- zenml/zen_server/dashboard/assets/service-connectors-Q8h7-_rG.js +0 -1
- zenml/zen_server/dashboard/assets/service-k-9Vsb30.js +0 -2
- zenml/zen_server/dashboard/assets/stack-detail-query-CNmVZ0Bo.js +0 -1
- zenml/zen_server/dashboard/assets/type-guards-CNgPYg8l.js +0 -1
- zenml/zen_server/dashboard/assets/update-server-settings-mutation-Bwe3gUt4.js +0 -1
- {zenml_nightly-0.83.1.dev20250710.dist-info → zenml_nightly-0.84.0.dev20250712.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.83.1.dev20250710.dist-info → zenml_nightly-0.84.0.dev20250712.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.83.1.dev20250710.dist-info → zenml_nightly-0.84.0.dev20250712.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
import{r as C}from"./@radix-C_LirfyT.js";const l=e=>C.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.75873 1H14.2413C15.0463 0.999988 15.7107 0.999977 16.2519 1.04419C16.814 1.09012 17.3307 1.18868 17.816 1.43597C18.5686 1.81947 19.1806 2.43139 19.5641 3.18404C19.8113 3.66937 19.9099 4.18608 19.9558 4.74817C20.0001 5.28936 20 5.95372 20 6.75868V10.0176C20.0673 10.0212 20.1323 10.0254 20.1951 10.0306C20.5904 10.0629 20.9836 10.1342 21.362 10.327C21.9265 10.6146 22.3854 11.0735 22.673 11.638C22.8658 12.0164 22.9372 12.4096 22.9695 12.805C23.0001 13.1795 23 13.6343 23 14.1614V16.9463C23 17.3849 23.0001 17.7634 22.9787 18.0767C22.9562 18.4065 22.9067 18.7364 22.7717 19.0623C22.4672 19.7974 21.8832 20.3814 21.1481 20.6859C20.8222 20.8209 20.4922 20.8704 20.1624 20.8929C20.1101 20.8965 20.056 20.8995 20 20.902V22C20 22.3723 19.7932 22.7138 19.4633 22.8862C19.1333 23.0587 18.7349 23.0336 18.4292 22.8211L16.2528 21.3079C15.9176 21.0749 15.8497 21.0324 15.7857 21.0034C15.7118 20.9699 15.6341 20.9455 15.5544 20.9308C15.4852 20.9181 15.4052 20.9143 14.9969 20.9143H13.1615C12.6343 20.9143 12.1796 20.9143 11.805 20.8837C11.4097 20.8514 11.0164 20.7801 10.6381 20.5873C10.0736 20.2997 9.61463 19.8407 9.32701 19.2763C9.13422 18.8979 9.0629 18.5047 9.0306 18.1093C9.01405 17.9068 9.00646 17.6808 9.00297 17.4326L7.61004 18.843C7.41849 19.037 7.23062 19.2272 7.06596 19.3669C6.91972 19.4909 6.61021 19.7413 6.17978 19.7771C5.69995 19.8169 5.23016 19.624 4.9168 19.2585C4.63567 18.9306 4.59142 18.5349 4.57452 18.3439C4.5555 18.1289 4.55554 17.8615 4.55558 17.5889L4.55559 16.0111C4.53636 15.9951 4.49179 15.9682 4.4203 15.9578C2.67169 15.7016 1.2984 14.3283 1.04226 12.5797C0.999782 12.2897 0.999881 11.9625 1.00001 11.5208C1.00002 11.4958 1.00003 11.4703 1.00003 11.4444L1.00003 6.7587C1.00002 5.95373 1.00001 5.28937 1.04422 4.74818C1.09015 4.18608 1.18871 3.66937 1.436 3.18404C1.8195 2.43139 2.43142 1.81947 3.18407 1.43597C3.6694 1.18868 4.18611 1.09012 4.7482 1.04419C5.2894 0.999977 5.95376 0.999988 6.75873 1ZM11 14.9994C11 14.9998 11 15.0003 11 15.0007V16.7143C11 17.2908 11.0008 17.6631 11.024 17.9465C11.0462 18.2181 11.0838 18.3188 11.109 18.3683C11.2049 18.5564 11.3579 18.7094 11.546 18.8053C11.5955 18.8305 11.6962 18.8682 11.9679 18.8904C12.2512 18.9135 12.6235 18.9143 13.2 18.9143H14.9969C15.0181 18.9143 15.0391 18.9143 15.06 18.9143C15.3707 18.914 15.6448 18.9138 15.9169 18.964C16.1561 19.0081 16.3892 19.0811 16.6108 19.1815C16.8628 19.2956 17.0878 19.4523 17.3428 19.6298C17.3598 19.6417 17.3771 19.6537 17.3945 19.6658L18 20.0868V19.9143C18 19.362 18.4477 18.9143 19 18.9143C19.4797 18.9143 19.7893 18.9137 20.0263 18.8976C20.2543 18.882 20.3411 18.8554 20.3827 18.8382C20.6277 18.7367 20.8224 18.542 20.9239 18.297C20.9411 18.2554 20.9678 18.1685 20.9833 17.9405C20.9995 17.7035 21 17.3939 21 16.9143V14.2C21 13.6234 20.9993 13.2512 20.9761 12.9678C20.9539 12.6962 20.9162 12.5955 20.891 12.546C20.7952 12.3578 20.6422 12.2049 20.454 12.109C20.4046 12.0838 20.3039 12.0461 20.0322 12.0239C19.7489 12.0008 19.3766 12 18.8 12H13.2C12.6235 12 12.2512 12.0008 11.9679 12.0239C11.6962 12.0461 11.5955 12.0838 11.546 12.109C11.3579 12.2049 11.2049 12.3578 11.109 12.546C11.0838 12.5955 11.0462 12.6962 11.024 12.9678C11.0008 13.2512 11 13.6234 11 14.2V14.9994ZM9.00003 14.5894L6.55559 17.0644V15.9916C6.55559 14.8142 5.59832 14.109 4.71017 13.9789C3.83586 13.8508 3.14921 13.1642 3.02115 12.2899C3.00269 12.1639 3.00003 11.9959 3.00003 11.4444V6.8C3.00003 5.94342 3.00081 5.36113 3.03758 4.91104C3.0734 4.47262 3.13833 4.24842 3.21802 4.09202C3.40976 3.7157 3.71572 3.40973 4.09205 3.21799C4.24845 3.1383 4.47265 3.07337 4.91107 3.03755C5.36116 3.00078 5.94345 3 6.80003 3H14.2C15.0566 3 15.6389 3.00078 16.089 3.03755C16.5274 3.07337 16.7516 3.1383 16.908 3.21799C17.2843 3.40973 17.5903 3.7157 17.782 4.09202C17.8617 4.24842 17.9267 4.47262 17.9625 4.91104C17.9993 5.36113 18 5.94342 18 6.8V10L13.1615 10C12.6343 9.99998 12.1796 9.99997 11.805 10.0306C11.4097 10.0629 11.0164 10.1342 10.6381 10.327C10.0736 10.6146 9.61463 11.0735 9.32701 11.638C9.13422 12.0164 9.0629 12.4096 9.0306 12.805C9 13.1795 9.00001 13.6343 9.00003 14.1615L9.00003 14.5894Z"}));export{l as S};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as C}from"./@radix-
|
1
|
+
import{r as C}from"./@radix-C_LirfyT.js";const l=e=>C.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.5971 1.18505C11.8629 1.13038 12.1371 1.13038 12.4029 1.18505C12.7102 1.24824 12.9848 1.40207 13.2032 1.52436C13.2235 1.53575 13.2433 1.54687 13.2627 1.55761L20.6627 5.66872C20.6831 5.68009 20.7042 5.6917 20.7258 5.70359C20.9569 5.8309 21.2476 5.99097 21.4707 6.23315C21.6637 6.44253 21.8097 6.6907 21.899 6.96105C22.0024 7.27375 22.0011 7.60553 22.0002 7.8694C22.0001 7.89406 22 7.91813 22 7.94153V16.0586C22 16.082 22.0001 16.1061 22.0002 16.1308C22.0011 16.3946 22.0024 16.7264 21.899 17.0391C21.8097 17.3095 21.6637 17.5576 21.4707 17.767C21.2476 18.0092 20.9569 18.1693 20.7258 18.2966C20.7042 18.3085 20.6831 18.3201 20.6627 18.3314L13.2627 22.4426C13.2433 22.4533 13.2235 22.4644 13.2032 22.4758C12.9848 22.5981 12.7102 22.7519 12.4029 22.8151C12.1371 22.8698 11.8629 22.8698 11.5971 22.8151C11.2898 22.7519 11.0152 22.5981 10.7968 22.4758C10.7765 22.4644 10.7567 22.4533 10.7373 22.4426L3.33733 18.3314C3.31688 18.3201 3.2958 18.3085 3.2742 18.2966C3.04307 18.1693 2.75245 18.0092 2.52927 17.767C2.33632 17.5576 2.1903 17.3095 2.10097 17.0391C1.99765 16.7264 1.99886 16.3946 1.99982 16.1308C1.99991 16.1061 2 16.082 2 16.0586V7.94153C2 7.91813 1.99991 7.89406 1.99982 7.8694C1.99886 7.60553 1.99765 7.27375 2.10097 6.96105C2.1903 6.6907 2.33632 6.44253 2.52927 6.23315C2.75244 5.99097 3.04306 5.8309 3.27419 5.7036C3.29579 5.6917 3.31687 5.68009 3.33733 5.66872L10.7373 1.55761C10.7567 1.54687 10.7765 1.53575 10.7968 1.52436C11.0152 1.40207 11.2898 1.24824 11.5971 1.18505ZM12 3.14907L11.9952 3.15136C11.9375 3.1792 11.8602 3.22173 11.7086 3.30592L5.05914 7.00008L12 10.8561L18.9408 7.00006L12.2914 3.30592C12.1398 3.22173 12.0625 3.1792 12.0048 3.15136L12 3.14907ZM20 8.69955V16.0586C20 16.2416 19.9996 16.3353 19.9955 16.4031C19.9954 16.4051 19.9951 16.4088 19.9951 16.4088C19.9951 16.4088 19.992 16.4108 19.9903 16.4119C19.933 16.4484 19.8513 16.4943 19.6914 16.5831L13 20.3006L13 12.5885L20 8.69955ZM11 12.5885L4 8.69959V16.0586C4 16.2416 4.00042 16.3353 4.0045 16.4031C4.00462 16.4051 4.00487 16.4088 4.00487 16.4088C4.00487 16.4088 4.00802 16.4108 4.0097 16.4119C4.067 16.4484 4.14866 16.4943 4.30862 16.5831L11 20.3006L11 12.5885Z"}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.62585 4.01444C6.89406 3.53166 7.50286 3.35771 7.98565 3.62593L16.9856 8.62593C17.4684 8.89414 17.6424 9.50294 17.3742 9.98573C17.1059 10.4685 16.4971 10.6425 16.0144 10.3742L7.01436 5.37424C6.53158 5.10603 6.35763 4.49722 6.62585 4.01444Z"}));export{l as S};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{j as t}from"./@radix-C_LirfyT.js";import{C as o,S as r}from"./StackComponentList-s7eSfm8o.js";import"./plus-cI8zD2xh.js";import"./refresh-3EF2R7ja.js";import"./Pagination-CcDD5yHh.js";import"./index-BacoJBEQ.js";import"./@tanstack-C0SeHZng.js";import"./@react-router-BSsrkPOd.js";import"./@reactflow-D9hglKLF.js";import"./chevron-right-double-CbRQKN4Q.js";import"./SearchField-D_0-uAPj.js";import"./index-BRhKF2z-.js";import"./DisplayDate-v3KW7oez.js";import"./expand-full-CD4fFvM-.js";import"./SheetHeader-7vwlsY_i.js";import"./Tabs-B27AHUfo.js";import"./terminal-BObrvDlO.js";import"./chevron-down-Z3nUe-0U.js";import"./transform-DFpKTKgF.js";import"./NestedCollapsible-CN9scBUn.js";import"./eye-CLNgIh_K.js";import"./CollapsibleCard-D0-pQi1n.js";import"./check-circle-mnEgPhPF.js";import"./CodeSnippet-D8iBqOVv.js";import"./all-pipeline-runs-query-gorNNEaT.js";import"./ExecutionStatus-C4tlFnlh.js";import"./help-B0CvBhCm.js";import"./index-dCcVgFNl.js";import"./stack-detail-query-Bc4QKlWg.js";import"./ComponentBadge-mw2Ja_ON.js";import"./ComponentIcon-BXgpt-jw.js";import"./bar-chart-square-check-9siI9icm.js";import"./layout-C5dgIReC.js";import"./trash-HKxXWbSG.js";import"./DeleteAlertDialog-BbyFVnVI.js";import"./zod-DgEcN9jD.js";import"./index.esm-COnaHLSh.js";import"./Infobox-DFCWPbMb.js";import"./info-CyMih3vQ.js";import"./bulk-delete-B5RTlnD_.js";function O(){return t.jsx("div",{className:"pt-5",children:t.jsx(o,{children:t.jsx(r,{})})})}export{O as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{j as e,r as f}from"./@radix-C_LirfyT.js";import{z as d,y as x,E as h,X as b,v as j,F as p,j as m,s as S,N as D,B as E,t as P,ac as C}from"./index-BacoJBEQ.js";import{f as _}from"./@react-router-BSsrkPOd.js";import{E as F}from"./EmptyState-DG0m-CGv.js";import{b as T,c as k}from"./@tanstack-C0SeHZng.js";import{E as I}from"./Error-DcVLcrLs.js";import{t as A}from"./zod-DgEcN9jD.js";import{u as V,C as z}from"./index.esm-COnaHLSh.js";import{S as q}from"./check-circle-mnEgPhPF.js";import"./@reactflow-D9hglKLF.js";const B=d.object({device_id:d.string().optional(),user_code:d.string().optional()});function Y(){const[s]=_(),{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)+"?"+b(t)),r=await j(i,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(!r.ok)throw new p({message:"Error while fetching Device details",status:r.status,statusText:r.statusText});return r.json()}function W(s,t){return T({queryKey:L(s),queryFn:async()=>R(s),...t})}function G({device:s}){var t,i,r,a,c,n;return e.jsx(m,{className:"w-full p-5",children:e.jsxs("dl",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("dt",{children:"IP Address"}),e.jsx("dd",{children:(t=s.body)==null?void 0:t.ip_address})]}),((i=s.metadata)==null?void 0:i.city)&&((r=s.metadata)==null?void 0:r.country)&&e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("dt",{children:"Location"}),e.jsxs("dd",{children:[(a=s.metadata)==null?void 0:a.city,", ",(c=s.metadata)==null?void 0:c.country]})]}),e.jsxs("div",{className:"flex min-w-0 items-center justify-between",children:[e.jsx("dt",{children:"Hostname"}),e.jsx("dd",{className:"truncate",children:(n=s.body)==null?void 0:n.hostname})]})]})})}async function H({deviceId:s,payload:t}){const i=x(h.devices.verify(s)),r=await j(i,{method:"PUT",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){const a=await r.json().then(c=>c.detail).catch(()=>["","Failed to verify device."]);throw new p({status:r.status,statusText:r.statusText,message:a[1]||"Failed to verify device."})}return r.json()}function J(s){return k({mutationFn:async t=>H(t),...s})}function M({deviceId:s,user_code:t,setSuccess:i}){const r=f.useId(),{handleSubmit:a,formState:{isValid:c},control:n}=V({resolver:A(K),defaultValues:{trustDevice:!1}}),{toast:l}=S(),{mutate:v,isPending:y}=J({onSuccess:()=>{i(!0)},onError:o=>{o instanceof Error&&l({status:"error",emphasis:"subtle",icon:e.jsx(P,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:o.message,rounded:!0})}});function g(o){v({deviceId:s,payload:{user_code:t,trusted_device:o.trustDevice}})}return e.jsxs("form",{onSubmit:a(g),className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(z,{control:n,name:"trustDevice",render:({field:{onChange:o,value:w}})=>e.jsx(D,{checked:w,onCheckedChange:N=>o(!!N),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(E,{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(q,{className:"h-[120px] w-[120px] fill-theme-text-success"}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"You successfully added your device"}),e.jsx("p",{className:"text-theme-text-secondary",children:"You may close this screen and return to your CLI."})]})]})}function ae(){const{device_id:s,user_code:t}=Y(),[i,r]=f.useState(!1),{data:a,isPending:c,isError:n,error:l}=W({deviceId:s,queryParams:{user_code:t}},{enabled:!!s&&!!t});return!s||!t?e.jsx(F,{children:e.jsx("p",{children:"Invalid device verification link."})}):n?e.jsx(u,{children:e.jsx(I,{isAlertCircle:!0,err:l})}):c?e.jsx(u,{children:e.jsx(C,{})}):i?e.jsx(O,{}):e.jsx(u,{children:e.jsxs("div",{className:"w-full space-y-7",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"mb-0.5 text-display-xs font-semibold",children:"Authorize a new device"}),e.jsx("p",{className:"text-theme-text-secondary",children:"You are logging in from a new device."})]}),e.jsx(G,{device:a}),e.jsx(M,{setSuccess:r,deviceId:s,user_code:t})]})})}function u({children:s}){return e.jsx(m,{className:"flex w-full min-w-[540px] flex-col items-center justify-center gap-5 p-7",children:s})}export{ae as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as c,j as e}from"./@radix-C_LirfyT.js";import{u as l,S as x,a as y,b as f}from"./form-schemas-B9XgTS1V.js";import{A as h,a as v,P as j,S as _}from"./primary-role-CPGHymjN.js";import{s as C,t as b,be as g,u as U,d as P}from"./index-BacoJBEQ.js";import{u as w}from"./update-current-user-mutation-DSyUyHVj.js";import{h as A}from"./@tanstack-C0SeHZng.js";import"./check-circle-mnEgPhPF.js";import"./@react-router-BSsrkPOd.js";import"./UpdatePasswordSchemas-Da5RndbV.js";import"./zod-DgEcN9jD.js";import"./index.esm-COnaHLSh.js";import"./bar-chart-square-check-9siI9icm.js";import"./dataflow-2-qHjWt7zp.js";import"./credit-card-CH1BHrXY.js";import"./eye-CLNgIh_K.js";import"./file-text-CltVhgwZ.js";import"./layout-C5dgIReC.js";import"./message-chat-square-DLz6XmPS.js";import"./slash-circle-D2Lb2FyR.js";import"./transform-DFpKTKgF.js";import"./@reactflow-D9hglKLF.js";const d=c.createContext(null);function E({children:t,initialUser:s}){const[n,r]=c.useState(s||{});return e.jsx(d.Provider,{value:{user:n,setUser:r},children:t})}function p(){const t=c.useContext(d);if(t===null)throw new Error("useSurveyUserContext must be used within an SurveyUserProvider");return t}function k({user:t}){var o,u;const{setSurveyStep:s}=l(),{setUser:n}=p();function r({fullName:a,getUpdates:m,email:i}){n(S=>({...S,...i?{email:i}:{email:null},full_name:a,email_opted_in:m})),s(2)}return e.jsx(h,{email:(o=t.metadata)==null?void 0:o.email,fullName:(u=t.body)==null?void 0:u.full_name,submitHandler:r})}function D(){const{user:t}=p(),{setSurveyStep:s}=l(),{toast:n}=C(),r=A(),{mutate:o}=w({onSuccess:async()=>{await r.invalidateQueries({queryKey:g()}),s(a=>a+1)},onError:a=>{a instanceof Error&&n({status:"error",emphasis:"subtle",icon:e.jsx(b,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:a.message,rounded:!0})}});function u({biggestChallenge:a,aiTypes:m}){const i={ai_types_working_with:m,biggest_ai_challenges:a,finished_onboarding_survey:!0};o({...t,user_metadata:{...t.user_metadata,...i}})}return e.jsx(v,{submitHandler:u})}function F({user:t}){const{setSurveyStep:s}=l(),{setUser:n}=p();function r({primaryRole:o,otherVal:u}){const m={primary_role:o==="other"?u:o};n(i=>({...i,user_metadata:{...i.user_metadata,...m}})),s(3)}return e.jsx(j,{user:t,submitHandler:r})}function H(){const{data:t,isPending:s,isError:n}=U({throwOnError:!0}),{surveyStep:r}=l();return n?null:s?e.jsx(P,{className:"h-[300px]"}):e.jsx(e.Fragment,{children:e.jsxs(E,{children:[e.jsx(x,{stepAmount:4}),r===1&&e.jsx(k,{user:t}),r===2&&e.jsx(F,{user:t}),r===3&&e.jsx(D,{}),r===4&&e.jsx(_,{}),r===5&&e.jsx(y,{subHeader:"Your ZenML account is now updated",displayBody:!1,username:t.name})]})})}function te(){return e.jsx("div",{children:e.jsx(f,{children:e.jsx(H,{})})})}export{te as default};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as v,j as o}from"./@radix-
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,s=String(t);if(n===0)return s;var r=s.match(/(.*?)([0-9]+)(.*)/),e=r?r[1]:"",a=r?r[3]:"",i=r?r[2]:s,c=i.length>=n?i:(Ie(Array(n)).map(function(){return"0"}).join("")+i).slice(n*-1);return"".concat(e).concat(c).concat(a)}var F={daysInHours:!1,zeroPadTime:2};function Me(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=n.now,r=s===void 0?Date.now:s,e=n.precision,a=e===void 0?0:e,i=n.controlled,c=n.offsetTime,u=c===void 0?0:c,m=n.overtime,h;typeof t=="string"?h=new Date(t).getTime():t instanceof Date?h=t.getTime():h=t,i||(h+=u);var p=i?h:h-r(),f=Math.min(20,Math.max(0,a)),d=Math.round(parseFloat(((m?p:Math.max(0,p))/1e3).toFixed(f))*1e3),y=Math.abs(d)/1e3;return{total:d,days:Math.floor(y/(3600*24)),hours:Math.floor(y/3600%24),minutes:Math.floor(y/60%60),seconds:Math.floor(y%60),milliseconds:Number((y%1*1e3).toFixed()),completed:d<=0}}function ze(t,n){var s=t.days,r=t.hours,e=t.minutes,a=t.seconds,i=Object.assign(Object.assign({},F),n),c=i.daysInHours,u=i.zeroPadTime,m=i.zeroPadDays,h=m===void 0?u:m,p=Math.min(2,u),f=c?T(r+s*24,u):T(r,p);return{days:c?"":T(s,h),hours:f,minutes:T(e,p),seconds:T(a,p)}}var H=function(t){$(s,t);var n=U(s);function s(){var r;return M(this,s),r=n.apply(this,arguments),r.state={count:r.props.count||3},r.startCountdown=function(){r.interval=window.setInterval(function(){var e=r.state.count-1;e===0?(r.stopCountdown(),r.props.onComplete&&r.props.onComplete()):r.setState(function(a){return{count:a.count-1}})},1e3)},r.stopCountdown=function(){clearInterval(r.interval)},r.addTime=function(e){r.stopCountdown(),r.setState(function(a){return{count:a.count+e}},r.startCountdown)},r}return z(s,[{key:"componentDidMount",value:function(){this.startCountdown()}},{key:"componentWillUnmount",value:function(){clearInterval(this.interval)}},{key:"render",value:function(){return this.props.children?v.cloneElement(this.props.children,{count:this.state.count}):null}}]),s}(v.Component);H.propTypes={count:l.number,children:l.element,onComplete:l.func};var C=function(t){$(s,t);var n=U(s);function s(r){var e;if(M(this,s),e=n.call(this,r),e.mounted=!1,e.initialTimestamp=e.calcOffsetStartTimestamp(),e.offsetStartTimestamp=e.props.autoStart?0:e.initialTimestamp,e.offsetTime=0,e.legacyMode=!1,e.legacyCountdownRef=null,e.tick=function(){var i=e.calcTimeDelta(),c=i.completed&&!e.props.overtime?void 0:e.props.onTick;e.setTimeDeltaState(i,void 0,c)},e.setLegacyCountdownRef=function(i){e.legacyCountdownRef=i},e.start=function(){if(!e.isStarted()){var i=e.offsetStartTimestamp;e.offsetStartTimestamp=0,e.offsetTime+=i?e.calcOffsetStartTimestamp()-i:0;var c=e.calcTimeDelta();e.setTimeDeltaState(c,"STARTED",e.props.onStart),!e.props.controlled&&(!c.completed||e.props.overtime)&&(e.clearTimer(),e.interval=window.setInterval(e.tick,e.props.intervalDelay))}},e.pause=function(){e.isPaused()||(e.clearTimer(),e.offsetStartTimestamp=e.calcOffsetStartTimestamp(),e.setTimeDeltaState(e.state.timeDelta,"PAUSED",e.props.onPause))},e.stop=function(){e.isStopped()||(e.clearTimer(),e.offsetStartTimestamp=e.calcOffsetStartTimestamp(),e.offsetTime=e.offsetStartTimestamp-e.initialTimestamp,e.setTimeDeltaState(e.calcTimeDelta(),"STOPPED",e.props.onStop))},e.isStarted=function(){return e.isStatus("STARTED")},e.isPaused=function(){return e.isStatus("PAUSED")},e.isStopped=function(){return e.isStatus("STOPPED")},e.isCompleted=function(){return e.isStatus("COMPLETED")},r.date){var a=e.calcTimeDelta();e.state={timeDelta:a,status:a.completed?"COMPLETED":"STOPPED"}}else e.legacyMode=!0;return e}return z(s,[{key:"componentDidMount",value:function(){this.legacyMode||(this.mounted=!0,this.props.onMount&&this.props.onMount(this.calcTimeDelta()),this.props.autoStart&&this.start())}},{key:"componentDidUpdate",value:function(e){this.legacyMode||this.props.date!==e.date&&(this.initialTimestamp=this.calcOffsetStartTimestamp(),this.offsetStartTimestamp=this.initialTimestamp,this.offsetTime=0,this.setTimeDeltaState(this.calcTimeDelta()))}},{key:"componentWillUnmount",value:function(){this.legacyMode||(this.mounted=!1,this.clearTimer())}},{key:"calcTimeDelta",value:function(){var e=this.props,a=e.date,i=e.now,c=e.precision,u=e.controlled,m=e.overtime;return Me(a,{now:i,precision:c,controlled:u,offsetTime:this.offsetTime,overtime:m})}},{key:"calcOffsetStartTimestamp",value:function(){return Date.now()}},{key:"addTime",value:function(e){this.legacyCountdownRef.addTime(e)}},{key:"clearTimer",value:function(){window.clearInterval(this.interval)}},{key:"isStatus",value:function(e){return this.state.status===e}},{key:"setTimeDeltaState",value:function(e,a,i){var c=this;if(this.mounted){var u=e.completed&&!this.state.timeDelta.completed,m=e.completed&&a==="STARTED";u&&!this.props.overtime&&this.clearTimer();var h=function(){i&&i(c.state.timeDelta),c.props.onComplete&&(u||m)&&c.props.onComplete(e,m)};return this.setState(function(p){var f=a||p.status;return e.completed&&!c.props.overtime?f="COMPLETED":!a&&f==="COMPLETED"&&(f="STOPPED"),{timeDelta:e,status:f}},h)}}},{key:"getApi",value:function(){return this.api=this.api||{start:this.start,pause:this.pause,stop:this.stop,isStarted:this.isStarted,isPaused:this.isPaused,isStopped:this.isStopped,isCompleted:this.isCompleted}}},{key:"getRenderProps",value:function(){var e=this.props,a=e.daysInHours,i=e.zeroPadTime,c=e.zeroPadDays,u=this.state.timeDelta;return Object.assign(Object.assign({},u),{api:this.getApi(),props:this.props,formatted:ze(u,{daysInHours:a,zeroPadTime:i,zeroPadDays:c})})}},{key:"render",value:function(){if(this.legacyMode){var e=this.props,a=e.count,i=e.children,c=e.onComplete;return v.createElement(H,{ref:this.setLegacyCountdownRef,count:a,onComplete:c},i)}var u=this.props,m=u.className,h=u.overtime,p=u.children,f=u.renderer,d=this.getRenderProps();if(f)return f(d);if(p&&this.state.timeDelta.completed&&!h)return v.cloneElement(p,{countdown:d});var y=d.formatted,O=y.days,L=y.hours,W=y.minutes,q=y.seconds;return v.createElement("span",{className:m},d.total<0?"-":"",O,O?":":"",L,":",W,":",q)}}]),s}(v.Component);C.defaultProps=Object.assign(Object.assign({},F),{controlled:!1,intervalDelay:1e3,precision:0,autoStart:!0});C.propTypes={date:l.oneOfType([l.instanceOf(Date),l.string,l.number]),daysInHours:l.bool,zeroPadTime:l.number,zeroPadDays:l.number,controlled:l.bool,intervalDelay:l.number,precision:l.number,autoStart:l.bool,overtime:l.bool,className:l.string,children:l.element,renderer:l.func,now:l.func,onMount:l.func,onStart:l.func,onPause:l.func,onStop:l.func,onTick:l.func,onComplete:l.func};function $e({token:t,open:n,setOpen:s}){return o.jsx(Y,{open:n,onOpenChange:s,children:o.jsxs(K,{className:"max-w-[700px]",children:[o.jsx(Q,{children:o.jsx(X,{children:"API Token Created Successfully"})}),o.jsxs("div",{className:"space-y-3 overflow-hidden px-7 py-5",children:[o.jsx(Ue,{}),o.jsx(Fe,{}),o.jsx(He,{token:t}),o.jsx(ve,{fallbackRender:()=>null,children:o.jsx(We,{token:t})}),o.jsx("div",{role:"separator","aria-hidden":"true",className:"h-[1px] bg-theme-border-moderate"}),o.jsx(qe,{token:t}),o.jsx(Be,{}),o.jsx("div",{role:"separator","aria-hidden":"true",className:"h-[1px] bg-theme-border-moderate"}),o.jsx(Ve,{})]})]})})}function Ue(){return o.jsxs("section",{children:[o.jsx("p",{className:"font-semibold",children:"Here is your new API Token"}),o.jsx("p",{className:"text-theme-text-secondary",children:"This token provides temporary access to your ZenML Server"})]})}function Fe(){return o.jsx(he,{children:"Important: This token expires in 1 hour and cannot be retrieved later. Please, copy it now."})}function He({token:t}){const[n,s]=v.useState(!1);function r(e){navigator.clipboard&&(navigator.clipboard.writeText(e),s(!0),setTimeout(()=>{s(!1)},2e3))}return o.jsxs("section",{className:"flex items-center gap-5 py-5",children:[o.jsx("code",{className:"block overflow-x-auto whitespace-nowrap font-sans text-display-xs",children:t}),n?o.jsxs("div",{className:"flex h-7 items-center",children:[o.jsx(ye,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"}),o.jsx("p",{className:"sr-only",children:"copied successfully"})]}):o.jsxs(D,{onClick:()=>r(t),size:"md",intent:"secondary",className:"flex items-center gap-1",emphasis:"subtle",children:[o.jsx(ee,{className:"size-4 shrink-0 fill-inherit"}),"Copy"]})]})}const Le=({days:t,hours:n,minutes:s,seconds:r,completed:e})=>{if(e)return o.jsx("span",{className:"font-semibold text-theme-text-error",children:"Expired"});const a=c=>String(c).padStart(2,"0"),i=[];return t>0&&i.push(`${t}`),(t>0||n>0)&&i.push(`${a(n)}`),(t>0||n>0||s>0)&&i.push(`${a(s)}`),i.push(`${a(r)}`),o.jsx("span",{className:"font-semibold",children:i.join(":")})};function We({token:t}){if(!t)return null;const n=je(t);return n.exp?o.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3 rounded-sm border border-theme-border-moderate bg-theme-surface-tertiary py-1 text-center",children:[o.jsx(fe,{className:"size-5 shrink-0 fill-theme-text-secondary"}),o.jsxs("div",{children:["Expires in:"," ",o.jsx(C,{daysInHours:!0,renderer:Le,zeroPadTime:2,date:new Date(n.exp*1e3)})]})]}):null}function qe({token:t}){const n=`${window.location.origin}/api/v1/current-user`;return o.jsxs("section",{className:"space-y-1",children:[o.jsx("div",{className:"font-semibold",children:"Using your API Token"}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("p",{className:"text-theme-text-secondary",children:"To use the API token to run queries against the Server API, you can run the following commands:"}),o.jsx(I,{code:Ze(t,n)}),o.jsx(I,{code:Ge(t,n)})]})]})}function Be(){const t=`${window.location.origin}/docs`;return o.jsxs("section",{className:"space-y-2",children:[o.jsx("p",{className:"font-semibold",children:"API Documentation"}),o.jsx("p",{className:"text-theme-text-secondary",children:"Access our OpenAPI dashboard for comprehensive documentation on all available REST API endpoints:"}),o.jsx(D,{asChild:!0,size:"md",intent:"secondary",className:"flex w-fit items-center gap-1",emphasis:"subtle",children:o.jsxs("a",{target:"_blank",rel:"noopener noreferrer",href:t,children:[o.jsx("span",{children:"Open the documentation"}),o.jsx(te,{className:"size-5 shrink-0 fill-inherit"})]})})]})}function Ve(){return o.jsxs("p",{children:["For long-term programmatic access, consider"," ",o.jsx(Te,{className:"link text-theme-text-brand",to:re.settings.service_accounts.overview,children:"setting up a service account instead."})]})}function Ze(t,n){return`curl -H "Authorization: Bearer ${t}" "${encodeURI(n)}"`}function Ge(t,n){return`wget -qO- --header="Authorization: Bearer ${t}" "${encodeURI(n)}"`}function Je({size:t}){return o.jsx("div",{className:"flex flex-wrap items-center justify-end gap-2",children:o.jsx(ne,{children:o.jsxs(oe,{children:[o.jsx(se,{className:"z-10",children:o.jsx("div",{className:R(ae({size:t}),"pointer-events-none bg-primary-50"),children:"Create new token"})}),o.jsx(ie,{children:"API-Tokens are not available for local deployments"})]})})})}const k=v.forwardRef(({className:t,onClick:n,...s},r)=>{const{toast:e}=ce(),[a,i]=v.useState(""),[c,u]=v.useState(!1),m=le(),{mutate:h,isPending:p}=ge({onError:d=>{de(d)&&e({title:"Error",emphasis:"subtle",rounded:!0,status:"error",description:d.message}),console.log(d)},onSuccess:d=>{i(d),u(!0)}});function f(d){u(d),d||i("")}return m.isPending?o.jsx(ue,{className:"h-7 w-10"}):m.isError?null:pe(m.data.auth_scheme||"other")?o.jsx(Je,{size:s.size}):o.jsxs(o.Fragment,{children:[o.jsxs(D,{disabled:p,ref:r,...s,onClick:()=>h({params:{token_type:"generic"}}),className:R(t),children:[p&&o.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"}),"Create new token"]}),o.jsx($e,{open:c,setOpen:f,token:a})]})});k.displayName="CreateTokenButton";function ct(){return o.jsxs(N,{className:"flex flex-col gap-5 p-5",children:[o.jsx("h1",{className:"text-text-xl font-semibold",children:"API Tokens"}),o.jsx("div",{className:"flex items-center justify-end",children:o.jsx(k,{size:"sm"})}),o.jsxs(N,{className:"flex w-full flex-col items-center justify-center space-y-5 p-9 text-center",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx("h2",{className:"text-display-xs font-semibold",children:"Create a new API Token"}),o.jsx("p",{className:"text-text-xl text-theme-text-secondary",children:"Generate a temporary access key for quick, secure automation tasks in your Tenant. An API Token is temporary (max. 1 hour) and won't be stored anywhere."})]}),o.jsx(k,{size:"md"})]})]})}export{ct as default};
|
1
|
+
import{r as v,j as o}from"./@radix-C_LirfyT.js";import{X as B,v as V,y as Z,F as G,E as J,aA as Q,aC as X,aD as Y,D as K,B as D,l as ee,b4 as te,r as re,O as ne,Q as oe,R as se,c as R,b5 as ae,U as ie,s as ce,x as le,d as ue,b6 as pe,aI as de,j as N}from"./index-BacoJBEQ.js";import{c as me}from"./@tanstack-C0SeHZng.js";import{S as fe}from"./clock-BMjHXT3f.js";import{C as I}from"./CodeSnippet-D8iBqOVv.js";import{I as he}from"./Infobox-DFCWPbMb.js";import{T as ye}from"./Tick-DDeDgTuT.js";import{E as ve}from"./react-error-boundary.esm-DoXxY4pT.js";import{L as Te}from"./@react-router-BSsrkPOd.js";import"./@reactflow-D9hglKLF.js";import"./info-CyMih3vQ.js";import"./check-D1bHMJkL.js";async function xe({params:t}){const n=B(t).toString(),s=Z(J.apiToken+(n?`?${n}`:"")),r=await V(s,{credentials:"include",headers:{"Content-Type":"application/json"}});if(!r.ok){const e=await r.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>"Error while creating API Token");throw new G({status:r.status,statusText:r.statusText,message:e})}return r.json()}function ge(t){return me({mutationFn:async n=>xe(n),...t})}class x extends Error{}x.prototype.name="InvalidTokenError";function be(t){return decodeURIComponent(atob(t).replace(/(.)/g,(n,s)=>{let r=s.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function Se(t){let n=t.replace(/-/g,"+").replace(/_/g,"/");switch(n.length%4){case 0:break;case 2:n+="==";break;case 3:n+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return be(n)}catch{return atob(n)}}function je(t,n){if(typeof t!="string")throw new x("Invalid token specified: must be a string");n||(n={});const s=n.header===!0?0:1,r=t.split(".")[s];if(typeof r!="string")throw new x(`Invalid token specified: missing part #${s+1}`);let e;try{e=Se(r)}catch(a){throw new x(`Invalid token specified: invalid base64 for part #${s+1} (${a.message})`)}try{return JSON.parse(e)}catch(a){throw new x(`Invalid token specified: invalid json for part #${s+1} (${a.message})`)}}var b={exports:{}},S,_;function we(){if(_)return S;_=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return S=t,S}var j,E;function Pe(){if(E)return j;E=1;var t=we();function n(){}function s(){}return s.resetWarningCache=n,j=function(){function r(i,c,u,m,h,p){if(p!==t){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function e(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:e,element:r,elementType:r,instanceOf:e,node:r,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:s,resetWarningCache:n};return a.PropTypes=a,a},j}var A;function ke(){return A||(A=1,b.exports=Pe()()),b.exports}var l=ke();function M(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function De(t,n){for(var s=0;s<n.length;s++){var r=n[s];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function z(t,n,s){return n&&De(t.prototype,n),t}function $(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&w(t,n)}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},g(t)}function w(t,n){return w=Object.setPrototypeOf||function(r,e){return r.__proto__=e,r},w(t,n)}function Ce(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Oe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ne(t,n){return n&&(typeof n=="object"||typeof n=="function")?n:Oe(t)}function U(t){var n=Ce();return function(){var r=g(t),e;if(n){var a=g(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return Ne(this,e)}}function Ie(t){return _e(t)||Ee(t)||Ae(t)||Re()}function _e(t){if(Array.isArray(t))return P(t)}function Ee(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function Ae(t,n){if(t){if(typeof t=="string")return P(t,n);var s=Object.prototype.toString.call(t).slice(8,-1);if(s==="Object"&&t.constructor&&(s=t.constructor.name),s==="Map"||s==="Set")return Array.from(t);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return P(t,n)}}function P(t,n){(n==null||n>t.length)&&(n=t.length);for(var s=0,r=new Array(n);s<n;s++)r[s]=t[s];return r}function Re(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,s=String(t);if(n===0)return s;var r=s.match(/(.*?)([0-9]+)(.*)/),e=r?r[1]:"",a=r?r[3]:"",i=r?r[2]:s,c=i.length>=n?i:(Ie(Array(n)).map(function(){return"0"}).join("")+i).slice(n*-1);return"".concat(e).concat(c).concat(a)}var F={daysInHours:!1,zeroPadTime:2};function Me(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=n.now,r=s===void 0?Date.now:s,e=n.precision,a=e===void 0?0:e,i=n.controlled,c=n.offsetTime,u=c===void 0?0:c,m=n.overtime,h;typeof t=="string"?h=new Date(t).getTime():t instanceof Date?h=t.getTime():h=t,i||(h+=u);var p=i?h:h-r(),f=Math.min(20,Math.max(0,a)),d=Math.round(parseFloat(((m?p:Math.max(0,p))/1e3).toFixed(f))*1e3),y=Math.abs(d)/1e3;return{total:d,days:Math.floor(y/(3600*24)),hours:Math.floor(y/3600%24),minutes:Math.floor(y/60%60),seconds:Math.floor(y%60),milliseconds:Number((y%1*1e3).toFixed()),completed:d<=0}}function ze(t,n){var s=t.days,r=t.hours,e=t.minutes,a=t.seconds,i=Object.assign(Object.assign({},F),n),c=i.daysInHours,u=i.zeroPadTime,m=i.zeroPadDays,h=m===void 0?u:m,p=Math.min(2,u),f=c?T(r+s*24,u):T(r,p);return{days:c?"":T(s,h),hours:f,minutes:T(e,p),seconds:T(a,p)}}var H=function(t){$(s,t);var n=U(s);function s(){var r;return M(this,s),r=n.apply(this,arguments),r.state={count:r.props.count||3},r.startCountdown=function(){r.interval=window.setInterval(function(){var e=r.state.count-1;e===0?(r.stopCountdown(),r.props.onComplete&&r.props.onComplete()):r.setState(function(a){return{count:a.count-1}})},1e3)},r.stopCountdown=function(){clearInterval(r.interval)},r.addTime=function(e){r.stopCountdown(),r.setState(function(a){return{count:a.count+e}},r.startCountdown)},r}return z(s,[{key:"componentDidMount",value:function(){this.startCountdown()}},{key:"componentWillUnmount",value:function(){clearInterval(this.interval)}},{key:"render",value:function(){return this.props.children?v.cloneElement(this.props.children,{count:this.state.count}):null}}]),s}(v.Component);H.propTypes={count:l.number,children:l.element,onComplete:l.func};var C=function(t){$(s,t);var n=U(s);function s(r){var e;if(M(this,s),e=n.call(this,r),e.mounted=!1,e.initialTimestamp=e.calcOffsetStartTimestamp(),e.offsetStartTimestamp=e.props.autoStart?0:e.initialTimestamp,e.offsetTime=0,e.legacyMode=!1,e.legacyCountdownRef=null,e.tick=function(){var i=e.calcTimeDelta(),c=i.completed&&!e.props.overtime?void 0:e.props.onTick;e.setTimeDeltaState(i,void 0,c)},e.setLegacyCountdownRef=function(i){e.legacyCountdownRef=i},e.start=function(){if(!e.isStarted()){var i=e.offsetStartTimestamp;e.offsetStartTimestamp=0,e.offsetTime+=i?e.calcOffsetStartTimestamp()-i:0;var c=e.calcTimeDelta();e.setTimeDeltaState(c,"STARTED",e.props.onStart),!e.props.controlled&&(!c.completed||e.props.overtime)&&(e.clearTimer(),e.interval=window.setInterval(e.tick,e.props.intervalDelay))}},e.pause=function(){e.isPaused()||(e.clearTimer(),e.offsetStartTimestamp=e.calcOffsetStartTimestamp(),e.setTimeDeltaState(e.state.timeDelta,"PAUSED",e.props.onPause))},e.stop=function(){e.isStopped()||(e.clearTimer(),e.offsetStartTimestamp=e.calcOffsetStartTimestamp(),e.offsetTime=e.offsetStartTimestamp-e.initialTimestamp,e.setTimeDeltaState(e.calcTimeDelta(),"STOPPED",e.props.onStop))},e.isStarted=function(){return e.isStatus("STARTED")},e.isPaused=function(){return e.isStatus("PAUSED")},e.isStopped=function(){return e.isStatus("STOPPED")},e.isCompleted=function(){return e.isStatus("COMPLETED")},r.date){var a=e.calcTimeDelta();e.state={timeDelta:a,status:a.completed?"COMPLETED":"STOPPED"}}else e.legacyMode=!0;return e}return z(s,[{key:"componentDidMount",value:function(){this.legacyMode||(this.mounted=!0,this.props.onMount&&this.props.onMount(this.calcTimeDelta()),this.props.autoStart&&this.start())}},{key:"componentDidUpdate",value:function(e){this.legacyMode||this.props.date!==e.date&&(this.initialTimestamp=this.calcOffsetStartTimestamp(),this.offsetStartTimestamp=this.initialTimestamp,this.offsetTime=0,this.setTimeDeltaState(this.calcTimeDelta()))}},{key:"componentWillUnmount",value:function(){this.legacyMode||(this.mounted=!1,this.clearTimer())}},{key:"calcTimeDelta",value:function(){var e=this.props,a=e.date,i=e.now,c=e.precision,u=e.controlled,m=e.overtime;return Me(a,{now:i,precision:c,controlled:u,offsetTime:this.offsetTime,overtime:m})}},{key:"calcOffsetStartTimestamp",value:function(){return Date.now()}},{key:"addTime",value:function(e){this.legacyCountdownRef.addTime(e)}},{key:"clearTimer",value:function(){window.clearInterval(this.interval)}},{key:"isStatus",value:function(e){return this.state.status===e}},{key:"setTimeDeltaState",value:function(e,a,i){var c=this;if(this.mounted){var u=e.completed&&!this.state.timeDelta.completed,m=e.completed&&a==="STARTED";u&&!this.props.overtime&&this.clearTimer();var h=function(){i&&i(c.state.timeDelta),c.props.onComplete&&(u||m)&&c.props.onComplete(e,m)};return this.setState(function(p){var f=a||p.status;return e.completed&&!c.props.overtime?f="COMPLETED":!a&&f==="COMPLETED"&&(f="STOPPED"),{timeDelta:e,status:f}},h)}}},{key:"getApi",value:function(){return this.api=this.api||{start:this.start,pause:this.pause,stop:this.stop,isStarted:this.isStarted,isPaused:this.isPaused,isStopped:this.isStopped,isCompleted:this.isCompleted}}},{key:"getRenderProps",value:function(){var e=this.props,a=e.daysInHours,i=e.zeroPadTime,c=e.zeroPadDays,u=this.state.timeDelta;return Object.assign(Object.assign({},u),{api:this.getApi(),props:this.props,formatted:ze(u,{daysInHours:a,zeroPadTime:i,zeroPadDays:c})})}},{key:"render",value:function(){if(this.legacyMode){var e=this.props,a=e.count,i=e.children,c=e.onComplete;return v.createElement(H,{ref:this.setLegacyCountdownRef,count:a,onComplete:c},i)}var u=this.props,m=u.className,h=u.overtime,p=u.children,f=u.renderer,d=this.getRenderProps();if(f)return f(d);if(p&&this.state.timeDelta.completed&&!h)return v.cloneElement(p,{countdown:d});var y=d.formatted,O=y.days,L=y.hours,W=y.minutes,q=y.seconds;return v.createElement("span",{className:m},d.total<0?"-":"",O,O?":":"",L,":",W,":",q)}}]),s}(v.Component);C.defaultProps=Object.assign(Object.assign({},F),{controlled:!1,intervalDelay:1e3,precision:0,autoStart:!0});C.propTypes={date:l.oneOfType([l.instanceOf(Date),l.string,l.number]),daysInHours:l.bool,zeroPadTime:l.number,zeroPadDays:l.number,controlled:l.bool,intervalDelay:l.number,precision:l.number,autoStart:l.bool,overtime:l.bool,className:l.string,children:l.element,renderer:l.func,now:l.func,onMount:l.func,onStart:l.func,onPause:l.func,onStop:l.func,onTick:l.func,onComplete:l.func};function $e({token:t,open:n,setOpen:s}){return o.jsx(Q,{open:n,onOpenChange:s,children:o.jsxs(X,{className:"max-w-[700px]",children:[o.jsx(Y,{children:o.jsx(K,{children:"API Token Created Successfully"})}),o.jsxs("div",{className:"space-y-3 overflow-hidden px-7 py-5",children:[o.jsx(Ue,{}),o.jsx(Fe,{}),o.jsx(He,{token:t}),o.jsx(ve,{fallbackRender:()=>null,children:o.jsx(We,{token:t})}),o.jsx("div",{role:"separator","aria-hidden":"true",className:"h-[1px] bg-theme-border-moderate"}),o.jsx(qe,{token:t}),o.jsx(Be,{}),o.jsx("div",{role:"separator","aria-hidden":"true",className:"h-[1px] bg-theme-border-moderate"}),o.jsx(Ve,{})]})]})})}function Ue(){return o.jsxs("section",{children:[o.jsx("p",{className:"font-semibold",children:"Here is your new API Token"}),o.jsx("p",{className:"text-theme-text-secondary",children:"This token provides temporary access to your ZenML Server"})]})}function Fe(){return o.jsx(he,{children:"Important: This token expires in 1 hour and cannot be retrieved later. Please, copy it now."})}function He({token:t}){const[n,s]=v.useState(!1);function r(e){navigator.clipboard&&(navigator.clipboard.writeText(e),s(!0),setTimeout(()=>{s(!1)},2e3))}return o.jsxs("section",{className:"flex items-center gap-5 py-5",children:[o.jsx("code",{className:"block overflow-x-auto whitespace-nowrap font-sans text-display-xs",children:t}),n?o.jsxs("div",{className:"flex h-7 items-center",children:[o.jsx(ye,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"}),o.jsx("p",{className:"sr-only",children:"copied successfully"})]}):o.jsxs(D,{onClick:()=>r(t),size:"md",intent:"secondary",className:"flex items-center gap-1",emphasis:"subtle",children:[o.jsx(ee,{className:"size-4 shrink-0 fill-inherit"}),"Copy"]})]})}const Le=({days:t,hours:n,minutes:s,seconds:r,completed:e})=>{if(e)return o.jsx("span",{className:"font-semibold text-theme-text-error",children:"Expired"});const a=c=>String(c).padStart(2,"0"),i=[];return t>0&&i.push(`${t}`),(t>0||n>0)&&i.push(`${a(n)}`),(t>0||n>0||s>0)&&i.push(`${a(s)}`),i.push(`${a(r)}`),o.jsx("span",{className:"font-semibold",children:i.join(":")})};function We({token:t}){if(!t)return null;const n=je(t);return n.exp?o.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3 rounded-sm border border-theme-border-moderate bg-theme-surface-tertiary py-1 text-center",children:[o.jsx(fe,{className:"size-5 shrink-0 fill-theme-text-secondary"}),o.jsxs("div",{children:["Expires in:"," ",o.jsx(C,{daysInHours:!0,renderer:Le,zeroPadTime:2,date:new Date(n.exp*1e3)})]})]}):null}function qe({token:t}){const n=`${window.location.origin}/api/v1/current-user`;return o.jsxs("section",{className:"space-y-1",children:[o.jsx("div",{className:"font-semibold",children:"Using your API Token"}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("p",{className:"text-theme-text-secondary",children:"To use the API token to run queries against the Server API, you can run the following commands:"}),o.jsx(I,{code:Ze(t,n)}),o.jsx(I,{code:Ge(t,n)})]})]})}function Be(){const t=`${window.location.origin}/docs`;return o.jsxs("section",{className:"space-y-2",children:[o.jsx("p",{className:"font-semibold",children:"API Documentation"}),o.jsx("p",{className:"text-theme-text-secondary",children:"Access our OpenAPI dashboard for comprehensive documentation on all available REST API endpoints:"}),o.jsx(D,{asChild:!0,size:"md",intent:"secondary",className:"flex w-fit items-center gap-1",emphasis:"subtle",children:o.jsxs("a",{target:"_blank",rel:"noopener noreferrer",href:t,children:[o.jsx("span",{children:"Open the documentation"}),o.jsx(te,{className:"size-5 shrink-0 fill-inherit"})]})})]})}function Ve(){return o.jsxs("p",{children:["For long-term programmatic access, consider"," ",o.jsx(Te,{className:"link text-theme-text-brand",to:re.settings.service_accounts.overview,children:"setting up a service account instead."})]})}function Ze(t,n){return`curl -H "Authorization: Bearer ${t}" "${encodeURI(n)}"`}function Ge(t,n){return`wget -qO- --header="Authorization: Bearer ${t}" "${encodeURI(n)}"`}function Je({size:t}){return o.jsx("div",{className:"flex flex-wrap items-center justify-end gap-2",children:o.jsx(ne,{children:o.jsxs(oe,{children:[o.jsx(se,{className:"z-10",children:o.jsx("div",{className:R(ae({size:t}),"pointer-events-none bg-primary-50"),children:"Create new token"})}),o.jsx(ie,{children:"API-Tokens are not available for local deployments"})]})})})}const k=v.forwardRef(({className:t,onClick:n,...s},r)=>{const{toast:e}=ce(),[a,i]=v.useState(""),[c,u]=v.useState(!1),m=le(),{mutate:h,isPending:p}=ge({onError:d=>{de(d)&&e({title:"Error",emphasis:"subtle",rounded:!0,status:"error",description:d.message}),console.log(d)},onSuccess:d=>{i(d),u(!0)}});function f(d){u(d),d||i("")}return m.isPending?o.jsx(ue,{className:"h-7 w-10"}):m.isError?null:pe(m.data.auth_scheme||"other")?o.jsx(Je,{size:s.size}):o.jsxs(o.Fragment,{children:[o.jsxs(D,{disabled:p,ref:r,...s,onClick:()=>h({params:{token_type:"generic"}}),className:R(t),children:[p&&o.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"}),"Create new token"]}),o.jsx($e,{open:c,setOpen:f,token:a})]})});k.displayName="CreateTokenButton";function ct(){return o.jsxs(N,{className:"flex flex-col gap-5 p-5",children:[o.jsx("h1",{className:"text-text-xl font-semibold",children:"API Tokens"}),o.jsx("div",{className:"flex items-center justify-end",children:o.jsx(k,{size:"sm"})}),o.jsxs(N,{className:"flex w-full flex-col items-center justify-center space-y-5 p-9 text-center",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx("h2",{className:"text-display-xs font-semibold",children:"Create a new API Token"}),o.jsx("p",{className:"text-text-xl text-theme-text-secondary",children:"Generate a temporary access key for quick, secure automation tasks in your Tenant. An API Token is temporary (max. 1 hour) and won't be stored anywhere."})]}),o.jsx(k,{size:"md"})]})]})}export{ct as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as u,j as r}from"./@radix-C_LirfyT.js";import{B as f,F as x,W as h}from"./Wizard-8aJzxUjb.js";import{a1 as j,d as C,B as a,r as m}from"./index-BacoJBEQ.js";import{c as b,a as p,L as v}from"./@react-router-BSsrkPOd.js";import{b as g}from"./@tanstack-C0SeHZng.js";import{C as E}from"./configuration-form-Yz8m0QIG.js";import"./@reactflow-D9hglKLF.js";import"./index-B7CRNU8l.js";import"./form-6aSt3tIl.js";import"./plus-cI8zD2xh.js";import"./trash-HKxXWbSG.js";import"./index.esm-COnaHLSh.js";import"./info-CyMih3vQ.js";import"./zod-DgEcN9jD.js";import"./transform-DFpKTKgF.js";import"./check-D1bHMJkL.js";import"./CodeSnippet-D8iBqOVv.js";import"./file-text-CltVhgwZ.js";import"./terminal-square-BObrvDlO.js";import"./ComponentIcon-BXgpt-jw.js";import"./bar-chart-square-check-9siI9icm.js";import"./layout-C5dgIReC.js";function y(){var s,i;const e=b(),{componentId:t}=p(),o=g({...j.componentDetail(t),throwOnError:!0});function d(l){e(m.components.detail(l))}const c=u.useId();if(o.isPending)return r.jsx(C,{className:"h-[300px] w-full"});if(o.isError)return r.jsx("div",{children:"Error"});const n=(i=(s=o.data.resources)==null?void 0:s.flavor)==null?void 0:i.id;return n?r.jsx(r.Fragment,{children:r.jsx(f,{className:"p-0",children:r.jsx(E,{component:o.data,flavorId:n,formId:c,isCreate:!1,successHandler:d,FooterComponent:N})})}):r.jsx("div",{children:"No flavor found"})}function N({formId:e,isPending:t}){const o=p();return r.jsxs(x,{children:[r.jsx(a,{asChild:!0,intent:"secondary",size:"md",children:r.jsx(v,{to:m.components.detail(o.componentId),children:"Cancel"})}),r.jsxs(a,{size:"md",disabled:t,type:"submit",form:e,children:[t&&r.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"}),"Update Component"]})]})}function T(){return r.jsx("section",{className:"layout-container mt-5 pb-5",children:r.jsx(h,{children:r.jsx(y,{})})})}export{T as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{j as e,r as u}from"./@radix-C_LirfyT.js";import{v as p,y as f,F as y,E as j,aA as g,aC as v,ac as N,B as l,ax as m,aW as d,aV as b,d as w,C,n as k,o as S,p as D,t as E}from"./index-BacoJBEQ.js";import{S as P}from"./chevron-down-Z3nUe-0U.js";import{I as _}from"./Infobox-DFCWPbMb.js";import{c as F,b as R}from"./@tanstack-C0SeHZng.js";import{a as T}from"./@react-router-BSsrkPOd.js";import{F as V}from"./icon-hDriJUXY.js";import"./@reactflow-D9hglKLF.js";import"./info-CyMih3vQ.js";async function z({connectorId:s}){const t=f(j.serviceConnectors.verifyExisting(s)),n=await p(t,{method:"PUT",headers:{"Content-Type":"application/json"}});if(!n.ok){const r=await n.json().then(i=>Array.isArray(i.detail)?i.detail[1]:i.detail).catch(()=>"Failed to verify connector");throw new y({status:n.status,statusText:n.statusText,message:r})}return n.json()}function O(s){return F({...s,mutationFn:async({connectorId:t})=>z({connectorId:t})})}const A="/assets/connectivity-4UKGMYnr.webp";function B({open:s,isLoading:t,isError:n,onClose:r,onSuccess:i,data:c}){const a=!!(c!=null&&c.error),o=(c==null?void 0:c.error)??void 0;return e.jsx(g,{open:s,children:e.jsx(v,{onPointerDownOutside:x=>t?x.preventDefault():r==null?void 0:r(),onEscapeKeyDown:x=>t?x.preventDefault():r==null?void 0:r(),className:"max-w-[540px] p-8",children:e.jsxs("div",{className:"flex w-full flex-col items-center justify-center space-y-5",children:[t&&!c&&e.jsx(I,{onClose:r}),!t&&!n&&!a&&e.jsx(Q,{onSuccess:i}),!t&&(n||a)&&e.jsx(W,{error:o,onClose:r})]})})})}function I({onClose:s}){return e.jsxs(e.Fragment,{children:[e.jsx(N,{}),e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"Verifying your service connector"}),e.jsxs("p",{className:"text-text-lg text-theme-text-secondary",children:["Please wait while we check your connection ",e.jsx("br",{}),"This may take up to a minute."]})]}),e.jsx(l,{size:"md",emphasis:"subtle",onClick:s,intent:"secondary",className:"mt-4",children:"Cancel"})]})}function Q({onSuccess:s}){return e.jsxs(e.Fragment,{children:[e.jsx(m,{width:180,height:180,className:"fill-theme-text-success"}),e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"Connection verified successfully!"}),e.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"Ready to show your available resources"})]}),e.jsx(l,{size:"md",onClick:s,className:"mt-4",children:"Display Resources"})]})}function W({onClose:s,error:t}){return e.jsxs(e.Fragment,{children:[e.jsx("img",{src:A,alt:"Connectivity",width:180,height:180}),e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"We couldn't verify your connection"}),t&&e.jsx("p",{className:"max-h-[250px] overflow-auto rounded-md border border-theme-border-moderate bg-theme-surface-secondary p-1 text-left font-mono",children:t}),e.jsx("p",{className:"text-text-lg text-theme-text-secondary",children:"Please try again to list your resources"})]}),e.jsx(l,{size:"md",emphasis:"subtle",onClick:s,intent:"secondary",className:"mt-4",children:"Close"})]})}function h({children:s}){const{setResources:t}=d(),{connectorId:n}=T(),r=R({...b.serviceConnectorDetail(n),throwOnError:!0}),[i,c]=u.useState(!1),a=O();if(r.isPending)return e.jsx(w,{className:"h-7 w-[150px]"});if(r.isError)return null;const o=()=>{c(!1)};return e.jsxs(e.Fragment,{children:[e.jsx(B,{data:a.data,open:i,isLoading:a.isPending,isError:a.isError,onClose:o,onSuccess:()=>{a.data&&(t(a.data),c(!1))}}),e.jsxs(l,{disabled:a.isPending&&i,onClick:()=>{c(!0),a.mutate({connectorId:n})},className:"gap-1",size:"md",children:[e.jsx(m,{width:24,height:24,className:"size-5 shrink-0 fill-white"}),s]})]})}function K(){var n;const{resources:s}=d();if(!s)return null;const t=s.connector_type;return!t||typeof t=="string"?null:e.jsxs("div",{className:"space-y-5",children:[e.jsx("div",{className:"flex justify-end",children:e.jsx(h,{children:e.jsx("span",{children:"Reverify now"})})}),(n=s.resources)==null?void 0:n.map(r=>{var i,c;return e.jsx(M,{title:(i=t.resource_types.find(a=>a.resource_type===r.resource_type))==null?void 0:i.name,logoUrl:((c=t.resource_types.find(a=>a.resource_type===r.resource_type))==null?void 0:c.logo_url)??void 0,resource:r},r.resource_type)})]})}function M({resource:s,title:t,logoUrl:n}){const[r,i]=u.useState(!0),c=s.error,a=s.resource_ids??[];return e.jsxs(C,{open:r,onOpenChange:i,children:[e.jsx(k,{className:"flex items-center gap-[10px]",children:e.jsxs(S,{className:"flex w-full items-center gap-[10px] text-text-lg",children:[e.jsx(P,{className:` ${r?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),t||s.resource_type]})}),e.jsx(D,{className:"space-y-5 border-t border-theme-border-moderate bg-theme-surface-primary",children:c?e.jsx("div",{className:"p-5",children:e.jsx(_,{intent:"error",children:c})}):e.jsx("ul",{className:"divide-y divide-theme-border-moderate",children:a.map(o=>e.jsxs("li",{className:"flex items-center space-x-2 py-3 pl-8",children:[!!n&&e.jsx("img",{width:24,height:24,src:n,alt:t,className:"size-5 shrink-0"}),e.jsx("span",{children:o})]},o))})})]})}function U(){return e.jsx("div",{className:"p-9",children:e.jsxs("div",{className:"flex flex-col items-center space-y-5",children:[e.jsx(V,{icon:e.jsx(E,{className:"h-[36px] w-[36px] fill-primary-400"})}),e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"Please verify your service connector"}),e.jsxs("p",{className:"text-text-lg text-theme-text-secondary",children:["We'll check your connection and load available resources.",e.jsx("br",{}),"This may take up to a minute."]})]}),e.jsx(h,{children:e.jsx("span",{children:"Verify now"})})]})})}function ee(){const{resources:s}=d();return s===null?e.jsx(U,{}):e.jsx(K,{})}export{ee as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as l,j as e}from"./@radix-C_LirfyT.js";import{v as C,y as b,F as y,E as D,aA as M,aB as F,B as h,aC as T,aD as E,D as P,aE as U,s as v,I as O,aF as k,aG as I,aH as H,aI as _,t as N,z as u,aJ as R,aK as z,aL as B,aM as q,aN as K,J as V,K as L,L as Z,M as G,a0 as J,am as j,aO as Q,u as W,d as f,W as $,j as X}from"./index-BacoJBEQ.js";import{S as Y}from"./SearchField-D_0-uAPj.js";import{C as ee}from"./CodeSnippet-D8iBqOVv.js";import{c as w,h as A}from"./@tanstack-C0SeHZng.js";import{u as se}from"./index.esm-COnaHLSh.js";import{D as ae}from"./DisplayDate-v3KW7oez.js";import{S as te}from"./slash-circle-D2Lb2FyR.js";import{A as re}from"./AlertDialogDropdownItem-druRNuO2.js";import{f as ne}from"./@react-router-BSsrkPOd.js";import{P as ie}from"./Pagination-CcDD5yHh.js";import"./@reactflow-D9hglKLF.js";import"./index-BRhKF2z-.js";import"./chevron-right-double-CbRQKN4Q.js";const oe=t=>l.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...t},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 4C8.06703 4 6.50002 5.567 6.50002 7.5C6.50002 9.433 8.06703 11 10 11C11.933 11 13.5 9.433 13.5 7.5C13.5 5.567 11.933 4 10 4ZM4.50002 7.5C4.50002 4.46243 6.96246 2 10 2C13.0376 2 15.5 4.46243 15.5 7.5C15.5 10.5376 13.0376 13 10 13C6.96246 13 4.50002 10.5376 4.50002 7.5ZM19 14C19.5523 14 20 14.4477 20 15V17H22C22.5523 17 23 17.4477 23 18C23 18.5523 22.5523 19 22 19H20V21C20 21.5523 19.5523 22 19 22C18.4477 22 18 21.5523 18 21V19H16C15.4477 19 15 18.5523 15 18C15 17.4477 15.4477 17 16 17H18V15C18 14.4477 18.4477 14 19 14ZM7.32629 14.5C7.38335 14.5 7.44125 14.5 7.50003 14.5H12C12.5523 14.5 13 14.9477 13 15.5C13 16.0523 12.5523 16.5 12 16.5H7.50003C6.03171 16.5 5.51923 16.5109 5.12917 16.6292C4.17036 16.92 3.42005 17.6703 3.1292 18.6291C3.01088 19.0192 3.00002 19.5317 3.00002 21C3.00002 21.5523 2.55231 22 2.00002 22C1.44774 22 1.00002 21.5523 1.00002 21C1.00002 20.9412 1 20.8833 0.99998 20.8263C0.999526 19.599 0.999216 18.761 1.21532 18.0486C1.70007 16.4506 2.95059 15.2 4.54859 14.7153C5.261 14.4992 6.09902 14.4995 7.32629 14.5Z"}));async function le(t){const s=b(D.users.all),a=await C(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){const r=await a.json().then(n=>n.detail).catch(()=>"Failed to create User");throw new y({status:a.status,statusText:a.statusText,message:r})}return a.json()}function ce(t){return w({mutationFn:async s=>le(s),...t})}function de(){const[t,s]=l.useState(!1),[a,r]=l.useState(null);return e.jsxs(M,{open:t,onOpenChange:n=>{s(n),r(null)},children:[e.jsx(F,{asChild:!0,children:e.jsx(h,{className:"shrink-0",intent:"primary",children:"Add Member"})}),e.jsxs(T,{className:"",children:[e.jsx(E,{children:e.jsx(P,{children:" Add a New Member"})}),a?e.jsx(ue,{name:a.name,token:U(a)}):e.jsx(me,{setSuccessMember:r})]})]})}u.object({username:u.string(),isAdmin:u.boolean()});function me({setSuccessMember:t}){const{toast:s}=v(),a=A(),{mutate:r,isPending:n}=ce({onError(d){_(d)&&s({status:"error",emphasis:"subtle",icon:e.jsx(N,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:d.message,rounded:!0})},onSuccess(d){t(d),a.invalidateQueries({queryKey:["users"]})}}),c=l.useId(),o=l.useId(),{register:i,handleSubmit:x,watch:p,setValue:m}=se();function S(d){r({is_admin:d.isAdmin,name:d.username})}return e.jsxs(e.Fragment,{children:[e.jsx("form",{id:"create-user-form",onSubmit:x(S),className:"space-y-5 p-7",children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:c,className:"text-text-sm",children:"Username"}),e.jsx(O,{...i("username"),id:c,className:"w-full"})]}),e.jsxs("div",{className:"flex gap-5",children:[e.jsx("label",{htmlFor:o,className:"text-text-md",children:"Add user as an Admin"}),e.jsx(k,{onCheckedChange:d=>m("isAdmin",!!d),...i("isAdmin",{value:!1}),id:o})]})]})}),e.jsxs(I,{className:"gap-[10px]",children:[e.jsx(H,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{disabled:!p("username")||n,form:"create-user-form",size:"sm",children:"Generate Token"})]})]})}function ue({token:t,name:s}){return e.jsxs("div",{className:"space-y-5 overflow-hidden p-7 text-center",children:[e.jsx(oe,{className:"m-auto mb-5 h-[110px] w-[110px] fill-success-500"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-lg font-semibold text-theme-text-primary",children:`The user ${s} was created successfully!`}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Share the invitation link with the user to complete the registration."})]}),e.jsx(ee,{className:"mx-auto",code:t})]})}async function he(t){const s=b(D.users.detail(t)),a=await C(s,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(!a.ok){const r=await a.json().then(n=>n.detail).catch(()=>"Failed to delete User");throw new y({status:a.status,statusText:a.statusText,message:r})}return a.json()}function xe(t){return w({mutationFn:async s=>he(s),...t})}function pe({userId:t,name:s}){const{toast:a}=v(),r=A(),{isPending:n,mutate:c}=xe({onSuccess(){r.invalidateQueries({queryKey:["users"]})},onError:i=>{i instanceof Error&&a({status:"error",emphasis:"subtle",icon:e.jsx(N,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:i.message,rounded:!0})}});function o(){c(t)}return e.jsxs(R,{className:"p-0",children:[e.jsx(z,{className:"py-2 pl-5 pr-3 text-text-lg font-semibold",children:"Delete Member"}),e.jsx("div",{className:"border-y border-theme-border-moderate px-5 py-5",children:e.jsxs(B,{children:["Deleting ",e.jsx("strong",{children:s})," cannot be undone."]})}),e.jsxs("div",{className:"flex justify-end gap-3 px-5 py-3",children:[e.jsx(q,{asChild:!0,children:e.jsx(h,{intent:"secondary",children:"Cancel"})}),e.jsx(K,{asChild:!0,children:e.jsx(h,{onClick:o,disabled:n,intent:"danger",children:"Delete"})})]})]})}function fe({userId:t,name:s}){const[a,r]=l.useState(!1),[n,c]=l.useState(!1),o=l.useRef(null),i=l.useRef(null);function x(){i.current=o.current}function p(m){if(m===!1){c(!1),setTimeout(()=>{r(m)},200);return}r(m)}return e.jsxs(V,{onOpenChange:c,open:n,children:[e.jsx(L,{ref:o,children:e.jsx(Z,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(G,{hidden:a,onCloseAutoFocus:m=>{i.current&&(i.current.focus(),i.current=null,m.preventDefault())},align:"end",sideOffset:7,children:e.jsx(re,{onSelect:x,onOpenChange:p,triggerChildren:"Remove Member",icon:e.jsx(te,{fill:"red"}),children:e.jsx(pe,{name:s,userId:t})})})]})}function ge({isAdmin:t}){return[{id:"name",accessorFn:s=>{var a;return{name:s.name,is_admin:!!((a=s.body)!=null&&a.is_admin)}},cell:({getValue:s})=>{const{name:a,is_admin:r}=s();return e.jsxs("div",{className:"flex",children:[e.jsx(J,{username:a}),r&&e.jsx("div",{children:e.jsx(j,{className:"ml-2 capitalize",size:"xs",color:"purple",children:"Admin"})})]})},header:"User"},{accessorKey:"status",header:"Status",accessorFn:s=>{var a;return{status:(a=s.body)==null?void 0:a.active}},cell:({getValue:s})=>{const{status:a}=s();return e.jsx(j,{className:"capitalize",color:a?"green":"grey",children:a?"Active":"Inactive"})}},{id:"created",header:"Created",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(ae,{dateString:s()})})},...t?[{id:"actions",header:"",accessorFn:s=>({id:s.id,name:s.name}),meta:{width:"5%"},cell:({getValue:s})=>{const{id:a,name:r}=s();return e.jsx(fe,{name:r,userId:a})}}]:[]]}const g=1,je=u.object({page:u.coerce.number().min(g).optional().default(g).catch(g),name:u.string().optional(),operator:u.enum(["and","or"]).optional()});function Ce(){const[t]=ne(),{page:s,name:a,operator:r}=je.parse({page:t.get("page")||void 0,name:t.get("name")||void 0,operator:t.get("operator")||void 0});return{page:s,name:a,logical_operator:r}}function be(){var o,i;const t=Ce(),{data:s,isError:a}=Q({params:{...t,sort_by:"desc:created"}},{throwOnError:!0}),{data:r,isPending:n,isError:c}=W();return a||c?null:n?e.jsx(f,{className:"h-[350px]"}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsx(Y,{searchParams:t}),((o=r.body)==null?void 0:o.is_admin)&&e.jsx(de,{})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:s?e.jsx($,{columns:ge({isAdmin:(i=r.body)==null?void 0:i.is_admin}),data:s.items}):e.jsx(f,{className:"h-[250px] w-full"})}),s?s.total_pages>1&&e.jsx(ie,{searchParams:t,paginate:s}):e.jsx(f,{className:"h-[36px] w-[300px]"})]})]})}function ke(){return e.jsxs(X,{className:"flex flex-col gap-4 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Members"}),e.jsx(be,{})]})}export{ke as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as c,j as e}from"./@radix-C_LirfyT.js";import{c as N,u as R}from"./bulk-delete-B5RTlnD_.js";import{p as D}from"./index-BQWlHo1Y.js";import{y as k,F as A,E as _,G as E,H as O,B as C,J as I,K as F,L as B,M as L,N as f,r as p,O as z,Q as $,R as M,U as H,V as g,T as U,z as d,W as G,d as j}from"./index-BacoJBEQ.js";import{c as Q,b as q}from"./@tanstack-C0SeHZng.js";import{S as K}from"./refresh-3EF2R7ja.js";import{P as J}from"./Pagination-CcDD5yHh.js";import{S as V}from"./SearchField-D_0-uAPj.js";import{S as P}from"./trash-HKxXWbSG.js";import{D as S,a as v}from"./DeleteAlertDialog-BbyFVnVI.js";import{S as W}from"./pipeline-BJ8liDnl.js";import{S as X}from"./terminal-BObrvDlO.js";import{g as Y,E as Z,a as ee}from"./ExecutionStatus-C4tlFnlh.js";import{L as m,f as te}from"./@react-router-BSsrkPOd.js";import{A as se}from"./AlertDialogDropdownItem-druRNuO2.js";import"./@reactflow-D9hglKLF.js";import"./chevron-right-double-CbRQKN4Q.js";import"./index-BRhKF2z-.js";import"./zod-DgEcN9jD.js";import"./index.esm-COnaHLSh.js";import"./check-circle-mnEgPhPF.js";import"./help-B0CvBhCm.js";async function ne({pipelineId:t}){const s=k(_.pipelines.detail(t)),n=await fetch(s,{method:"DELETE",credentials:"include",headers:{"Content-Type":"application/json"}});if(!n.ok){const a=await n.json().then(r=>r.detail).catch(()=>`Failed to delete pipeline ${t}`);throw new A({status:n.status,statusText:n.statusText,message:a})}return n.json()}function ae(t){return Q({mutationFn:ne,...t})}const{ContextProvider:re,useContext:u}=N();function w(){const{setRowSelection:t}=u(),{mutateAsync:s}=ae();async function n(a){await s({pipelineId:a})}return R({deleteFn:n,queryKeyToInvalidate:D.all,setRowSelection:t})}function ie(){const[t,s]=c.useState(!1),{selectedRowCount:n,selectedRowIDs:a}=u(),{bulkDelete:r}=w();async function i(){await r(a),s(!1)}return e.jsxs(E,{open:t,onOpenChange:s,children:[e.jsx(O,{asChild:!0,children:e.jsxs(C,{className:"rounded-sharp border-y-0 bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(P,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(S,{title:`Delete Pipeline${n>=2?"s":""}`,handleDelete:i,children:e.jsxs(v,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function oe(){const{selectedRowCount:t}=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:`${t} Pipeline${t>1?"s":""} selected`}),e.jsx(ie,{})]})}function le({id:t}){const[s,n]=c.useState(!1),[a,r]=c.useState(!1),i=c.useRef(null),o=c.useRef(null),{bulkDelete:y}=w();async function b(){await y([t]),x(!1)}function T(){o.current=i.current}function x(l){if(l===!1){r(!1),setTimeout(()=>{n(l)},200);return}n(l)}return e.jsxs(I,{onOpenChange:r,open:a,children:[e.jsx(F,{ref:i,children:e.jsx(B,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(L,{hidden:s,onCloseAutoFocus:l=>{o.current&&(o.current.focus(),o.current=null,l.preventDefault())},align:"end",sideOffset:7,children:e.jsx(se,{onSelect:T,open:s,onOpenChange:x,triggerChildren:"Delete",icon:e.jsx(P,{fill:"red"}),children:e.jsx(S,{title:"Delete Pipeline",handleDelete:b,children:e.jsxs(v,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})})]})}function ce(){return[{id:"select",meta:{width:"1%"},header:({table:t})=>e.jsx(f,{id:"check-all",checked:t.getIsAllRowsSelected(),onCheckedChange:s=>t.toggleAllRowsSelected(s==="indeterminate"?!0:s)}),cell:({row:t})=>e.jsx(f,{id:`check-${t.id}`,checked:t.getIsSelected(),onCheckedChange:t.getToggleSelectedHandler()})},{id:"name",header:"Pipeline",cell:({row:t})=>{var s,n,a;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(W,{className:`h-5 w-5 ${Y((s=t.original.resources)==null?void 0:s.latest_run_status)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(m,{to:p.projects.pipelines.namespace(encodeURIComponent(t.original.name)),className:"flex items-center gap-1",children:e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:t.original.name})}),e.jsx(z,{children:e.jsxs($,{children:[e.jsx(M,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(Z,{status:(n=t.original.resources)==null?void 0:n.latest_run_status})}),e.jsx(H,{className:"z-20 capitalize",children:(a=t.original.resources)==null?void 0:a.latest_run_status})]})}),e.jsx(g,{copyText:t.original.name})]}),e.jsxs(m,{to:p.projects.pipelines.namespace(encodeURIComponent(t.original.name)),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:t.original.id.split("-")[0]}),e.jsx(g,{copyText:t.original.id})]})]})]})}},{id:"latest-run",header:"Latest Run",accessorFn:t=>{var s,n;return{status:(s=t.resources)==null?void 0:s.latest_run_status,runId:(n=t.resources)==null?void 0:n.latest_run_id}},cell:({getValue:t})=>{const{runId:s,status:n}=t();return!s||!n?e.jsx("div",{children:"No run"}):e.jsx(m,{to:p.projects.runs.detail(s),children:e.jsxs(U,{emphasis:"subtle",rounded:!1,className:"inline-flex items-center gap-0.5",color:ee(n),children:[e.jsx(X,{className:"h-3 w-3 fill-current"}),s==null?void 0:s.split("-")[0]]})})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:t})=>e.jsx(le,{id:t.original.id})}]}const h=1,de=d.object({page:d.coerce.number().min(h).optional().default(h).catch(h),name:d.string().optional(),operator:d.enum(["and","or"]).optional()});function ue(){const[t]=te(),{page:s,name:n,operator:a}=de.parse({page:t.get("page")||void 0,name:t.get("name")||void 0,operator:t.get("operator")||void 0});return{page:s,name:n,logical_operator:a}}function pe(){const t=ue(),{selectedRowCount:s,rowSelection:n,setRowSelection:a}=u(),{data:r,refetch:i}=q({...D.pipelineList({...t,sort_by:"desc:latest_run"}),throwOnError:!0});return e.jsxs("div",{className:"flex flex-col gap-5 pt-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[s?e.jsx(oe,{}):e.jsx(V,{searchParams:t}),e.jsx("div",{className:"flex justify-between",children:e.jsxs(C,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>i(),children:[e.jsx(K,{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:r?e.jsx(G,{rowSelection:n,onRowSelectionChange:a,getRowId:o=>o.id,columns:ce(),data:r.items}):e.jsx(j,{className:"h-[500px] w-full"})}),r?r.total_pages>1&&e.jsx(J,{searchParams:t,paginate:r}):e.jsx(j,{className:"h-[36px] w-[300px]"})]})]})}function Ie(){return e.jsx(re,{children:e.jsx(pe,{})})}export{Ie as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{j as e,r}from"./@radix-
|
1
|
+
import{j as e,r}from"./@radix-C_LirfyT.js";import{P as o,a as n,b as l,c as i,d as m,e as c}from"./ProCta-CU2ycJDo.js";import{j as d,bv as u}from"./index-BacoJBEQ.js";import{C as x}from"./CodeSnippet-D8iBqOVv.js";import{f as p}from"./@react-router-BSsrkPOd.js";import"./check-D1bHMJkL.js";import"./@tanstack-C0SeHZng.js";import"./@reactflow-D9hglKLF.js";const f="/assets/mcp-Cb1aMeoq.webp";function h(){const[a]=p(),t=a.get("model");function s(){return t?`zenml model list --name='contains:${t}'`:"zenml model list"}return e.jsxs(d,{className:"flex flex-wrap justify-between p-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-text-xl font-semibold",children:"Staying Open Source? "}),e.jsx("p",{className:"text-theme-text-secondary",children:"No problem! Use this CLI command to list your models"})]}),e.jsx(x,{code:s()})]})}function v(){const{setTourState:a,tourState:{tourActive:t}}=u();return r.useEffect(()=>{t&&a(s=>({...s,run:!0,stepIndex:s.stepIndex}))},[t]),e.jsx("div",{children:e.jsxs("div",{className:"layout-container space-y-5 py-5",children:[e.jsxs(o,{className:"relative overflow-y-hidden",children:[e.jsxs("div",{className:"w-full max-w-none space-y-5 lg:max-w-[900px]",children:[e.jsx(n,{children:"Access Advanced Model Management Features with ZenML Pro"}),e.jsx(l,{}),e.jsx(i,{features:[{title:"Model Control Plane Dashboard",subtitle:"Centralized model management and monitoring"},{title:"Enterprise Security",subtitle:"Social SSO, RBAC, and User Management"},{title:"Managed ZenML Server",subtitle:"On your VPC or hosted on our infrastructure"},{title:"Advanced MLOps",subtitle:"CI/CD/CT, Artifact Control Plane and more"}]}),e.jsx(m,{})]}),e.jsx(c,{className:"absolute translate-x-[30%] translate-y-[15%] scale-[40%]",src:f,alt:"Screenshot of the ZenML Pro Artifact Control Plane"})]}),e.jsx(h,{})]})})}export{v as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as l,j as e}from"./@radix-C_LirfyT.js";import{u as m,S as x,a as v,b as j}from"./form-schemas-B9XgTS1V.js";import{E as y}from"./EmptyState-DG0m-CGv.js";import{A as w,a as A,P as g,S as P}from"./primary-role-CPGHymjN.js";import{f as _}from"./@react-router-BSsrkPOd.js";import{v as b,y as U,F as C,E,q as F,s as k,t as N}from"./index-BacoJBEQ.js";import{c as M}from"./@tanstack-C0SeHZng.js";import{u as D}from"./login-mutation-CidpsqyH.js";import{S as H}from"./SetPassword-CaKVSqAL.js";import"./check-circle-mnEgPhPF.js";import"./UpdatePasswordSchemas-Da5RndbV.js";import"./zod-DgEcN9jD.js";import"./index.esm-COnaHLSh.js";import"./bar-chart-square-check-9siI9icm.js";import"./dataflow-2-qHjWt7zp.js";import"./credit-card-CH1BHrXY.js";import"./eye-CLNgIh_K.js";import"./file-text-CltVhgwZ.js";import"./layout-C5dgIReC.js";import"./message-chat-square-DLz6XmPS.js";import"./slash-circle-D2Lb2FyR.js";import"./transform-DFpKTKgF.js";import"./@reactflow-D9hglKLF.js";import"./PasswordChecker-BZwoeQIm.js";const d=l.createContext(null);function T({children:t,initialUser:r}){const[a,s]=l.useState(r||{});return e.jsx(d.Provider,{value:{newUser:a,setNewUser:s},children:t})}function p(){const t=l.useContext(d);if(t===null)throw new Error("useActivationContext must be used within an ActivationProvider");return t}function I(){const{setSurveyStep:t}=m(),{setNewUser:r,newUser:a}=p();function s({fullName:n,getUpdates:o,email:i}){r(c=>({...c,...i?{email:i}:{email:null},full_name:n,email_opted_in:o})),t(c=>c+1)}return e.jsx(w,{email:a.email,fullName:a.full_name,submitHandler:s})}async function L({userId:t,body:r}){const a=U(E.users.activate(t)),s=await b(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 R(t){return M({mutationFn:async r=>L(r),...t})}function q({userId:t,setUsername:r}){const{newUser:a}=p(),{setAuthState:s}=F(),{setSurveyStep:n}=m(),{mutate:o}=D({onSuccess:()=>{s("true"),n(u=>u+1)}}),{toast:i}=k(),{mutate:c}=R({onSuccess:async u=>{r(u.name),o({username:u.name,password:a.password??void 0})},onError:u=>{u instanceof Error&&i({status:"error",emphasis:"subtle",icon:e.jsx(N,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:u.message,rounded:!0})}});function f({aiTypes:u,biggestChallenge:S}){const h={ai_types_working_with:u,biggest_ai_challenges:S,finished_onboarding_survey:!0};c({userId:t,body:{...a,user_metadata:{...a.user_metadata,...h}}})}return e.jsx(A,{submitHandler:f})}function z(){const{setSurveyStep:t}=m(),{setNewUser:r}=p();function a({newPassword:s}){r(n=>({...n,password:s})),t(n=>n+1)}return e.jsx(H,{submitHandler:a})}function J(){const{setSurveyStep:t}=m(),{setNewUser:r}=p();function a({primaryRole:s,otherVal:n}){const o={primary_role:s==="other"?n:s};r(i=>({...i,user_metadata:{...i.user_metadata,...o}})),t(i=>i+1)}return e.jsx(g,{submitHandler:a})}function O(){const{surveyStep:t}=m(),[r]=_(),[a,s]=l.useState(""),n=r.get("user"),o=r.get("token");return!n||!o?e.jsx(y,{children:e.jsx("p",{children:"Invalid activation link."})}):e.jsx(e.Fragment,{children:e.jsxs(T,{initialUser:{activation_token:o},children:[e.jsx(x,{stepAmount:5}),t===1&&e.jsx(I,{}),t===2&&e.jsx(z,{}),t===3&&e.jsx(J,{}),t===4&&e.jsx(q,{setUsername:s,userId:n}),t===5&&e.jsx(P,{}),t===6&&e.jsx(v,{subHeader:"Your created your ZenML account",username:a})]})})}function ft(){return e.jsx("div",{children:e.jsx(j,{children:e.jsx(O,{})})})}export{ft as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{j as e,r as l}from"./@radix-C_LirfyT.js";import{c as k,L as S,f as z}from"./@react-router-BSsrkPOd.js";import{S as y}from"./check-circle-mnEgPhPF.js";import{S as L,a as M,c as C,B as m,T as E,r as P,b as V,u as B,d as o,g as Z,A as G,e as I,z as d,f as O,h as F,i as D,j as f,k as R,P as w,D as H,l as T,m as J,C as Q,n as Y,o as g,p as K}from"./index-BacoJBEQ.js";import{S as X}from"./file-text-CltVhgwZ.js";import{S as q}from"./mail-C160gvB0.js";import{S as W}from"./chevron-down-Z3nUe-0U.js";import{b as p}from"./@tanstack-C0SeHZng.js";import{p as N}from"./index-BQWlHo1Y.js";import{T as v}from"./Tick-DDeDgTuT.js";import{S as U,M as $,a as _}from"./index-mA8kL088.js";import{C as j}from"./CodeSnippet-D8iBqOVv.js";import{H as ee}from"./Helpbox-C-RGHz3S.js";import{F as se}from"./icon-hDriJUXY.js";import{S as te}from"./SheetHeader-7vwlsY_i.js";import"./@reactflow-D9hglKLF.js";import"./check-D1bHMJkL.js";import"./help-B0CvBhCm.js";import"./chevron-right-double-CbRQKN4Q.js";function re(){const s=k();return e.jsxs("div",{className:"flex w-full items-center justify-between gap-2 rounded-md border border-success-300 bg-success-50 px-4 py-3 text-success-900",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(y,{className:"size-5 shrink-0 fill-current"}),e.jsx("p",{className:"font-semibold",children:"Great job! You've mastered the ZenML basics."}),e.jsx("p",{className:"text-text-sm",children:"Time to level up with production workflows."})]}),e.jsxs("button",{onClick:()=>s(window.location.pathname),children:[e.jsx("span",{className:"sr-only",children:"Close"}),e.jsx(L,{className:"size-5 fill-current"})]})]})}const ne=[{icon:e.jsx(q,{className:"size-5 shrink-0 fill-warning-500"}),backgroundColor:"bg-warning-50",title:"Send us a message",href:"mailto:cloud@zenml.io"},{icon:e.jsx(X,{className:"size-5 shrink-0 fill-blue-400"}),backgroundColor:"bg-blue-25",title:"Browse our docs",href:"https://docs.zenml.io"},{icon:e.jsx(M,{className:"size-5 shrink-0 fill-primary-400"}),backgroundColor:"bg-primary-25",title:"Read our blog",href:"https://zenml.io/blog"}];function ae(){return e.jsxs("section",{className:"space-y-5",children:[e.jsx("h2",{className:"text-text-lg font-semibold",children:"Support Resources"}),e.jsx("ul",{className:"grid grid-cols-2 gap-3 xl:grid-cols-3",children:ne.map((s,t)=>e.jsx("li",{children:e.jsx(ie,{...s})},t))})]})}function ie({icon:s,backgroundColor:t,title:r,href:a}){return e.jsxs("a",{href:a,target:"_blank",rel:"noreferrer noopener",className:"flex items-center gap-3 overflow-hidden rounded-md border border-theme-border-moderate bg-theme-surface-primary p-1 transition-shadow duration-200 hover:shadow-sm",children:[e.jsx("div",{className:C("flex aspect-square size-8 items-center justify-center rounded-md",t),children:s}),e.jsx("div",{className:"space-y-0.5",children:e.jsx("span",{className:"font-semibold",children:r})})]})}const le=[{title:"ZenCoder",description:"Your own MLOps Engineer",href:"https://github.com/zenml-io/zenml-projects/tree/main/zencoder",tag:"LLM",image:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/projects/1.jpg",alt:"ZenCoder"}},{title:"Night Watch",description:"AI Database Summaries While You Sleep",href:"https://github.com/zenml-io/zenml-projects/tree/main/nightwatch-ai",tag:"Text Summarization",image:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/projects/2.jpg",alt:"Night Watch"}},{title:"Magic Photobooth",description:"A personalized AI image generation product that can create your avatars from a selfie.",href:"https://github.com/zenml-io/zenml-projects/tree/main/magic-photobooth",tag:"Image Generation",image:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/projects/3.jpg",alt:"Magic Photobooth"}},{title:"GameSense",description:"The LLM That Understands Gamers",href:"https://github.com/zenml-io/zenml-projects/tree/main/gamesense",tag:"LLM",image:{src:"https://public-flavor-logos.s3.eu-central-1.amazonaws.com/projects/4.jpg",alt:"GameSense"}}];function oe(){return e.jsxs("section",{className:"space-y-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-text-lg font-semibold",children:"Start with a project template"}),e.jsx(m,{className:"bg-theme-surface-primary",intent:"secondary",emphasis:"subtle",asChild:!0,children:e.jsx("a",{target:"_blank",rel:"noreferrer noopener",href:"https://docs.zenml.io/user-guides",children:"See more"})})]}),e.jsx("ul",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-4",children:le.map((s,t)=>e.jsx("li",{children:e.jsx(ce,{...s})},t))})]})}function ce({title:s,description:t,href:r,tag:a,image:n}){return e.jsxs("a",{href:r,target:"_blank",rel:"noreferrer noopener",className:"block overflow-hidden rounded-md border border-theme-border-moderate transition-shadow duration-200 hover:shadow-sm",children:[e.jsx("img",{className:"h-[110px] w-full object-cover",src:n.src,alt:n.alt}),e.jsxs("div",{className:"flex h-[150px] flex-col justify-between bg-theme-surface-primary p-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-text-lg font-semibold",children:s}),e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:t})]}),e.jsx(E,{emphasis:"subtle",rounded:!1,size:"xs",className:"w-fit",color:"purple",children:a})]})]})}const de=s=>l.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 1C8.55229 1 9 1.44772 9 2V3H15V2C15 1.44772 15.4477 1 16 1C16.5523 1 17 1.44772 17 2V3.00163C17.4755 3.00489 17.891 3.01471 18.2518 3.04419C18.8139 3.09012 19.3306 3.18868 19.816 3.43597C20.5686 3.81947 21.1805 4.43139 21.564 5.18404C21.8113 5.66937 21.9099 6.18608 21.9558 6.74817C22 7.28936 22 7.95372 22 8.75868V17.2413C22 18.0463 22 18.7106 21.9558 19.2518C21.9099 19.8139 21.8113 20.3306 21.564 20.816C21.1805 21.5686 20.5686 22.1805 19.816 22.564C19.3306 22.8113 18.8139 22.9099 18.2518 22.9558C17.7106 23 17.0463 23 16.2413 23H7.75868C6.95372 23 6.28936 23 5.74817 22.9558C5.18608 22.9099 4.66937 22.8113 4.18404 22.564C3.43139 22.1805 2.81947 21.5686 2.43597 20.816C2.18868 20.3306 2.09012 19.8139 2.04419 19.2518C1.99998 18.7106 1.99999 18.0463 2 17.2413V8.7587C1.99999 7.95373 1.99998 7.28937 2.04419 6.74817C2.09012 6.18608 2.18868 5.66937 2.43597 5.18404C2.81947 4.43139 3.43139 3.81947 4.18404 3.43597C4.66937 3.18868 5.18608 3.09012 5.74818 3.04419C6.10898 3.01471 6.52454 3.00489 7 3.00163V2C7 1.44772 7.44772 1 8 1ZM7 5.00176C6.55447 5.00489 6.20463 5.01356 5.91104 5.03755C5.47262 5.07337 5.24842 5.1383 5.09202 5.21799C4.7157 5.40973 4.40973 5.71569 4.21799 6.09202C4.1383 6.24842 4.07337 6.47262 4.03755 6.91104C4.00078 7.36113 4 7.94342 4 8.8V9H20V8.8C20 7.94342 19.9992 7.36113 19.9624 6.91104C19.9266 6.47262 19.8617 6.24842 19.782 6.09202C19.5903 5.7157 19.2843 5.40973 18.908 5.21799C18.7516 5.1383 18.5274 5.07337 18.089 5.03755C17.7954 5.01356 17.4455 5.00489 17 5.00176V6C17 6.55228 16.5523 7 16 7C15.4477 7 15 6.55228 15 6V5H9V6C9 6.55228 8.55229 7 8 7C7.44772 7 7 6.55228 7 6V5.00176ZM20 11H4V17.2C4 18.0566 4.00078 18.6389 4.03755 19.089C4.07337 19.5274 4.1383 19.7516 4.21799 19.908C4.40973 20.2843 4.7157 20.5903 5.09202 20.782C5.24842 20.8617 5.47262 20.9266 5.91104 20.9624C6.36113 20.9992 6.94342 21 7.8 21H16.2C17.0566 21 17.6389 20.9992 18.089 20.9624C18.5274 20.9266 18.7516 20.8617 18.908 20.782C19.2843 20.5903 19.5903 20.2843 19.782 19.908C19.8617 19.7516 19.9266 19.5274 19.9624 19.089C19.9992 18.6389 20 18.0566 20 17.2V11Z"})),me=s=>l.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("path",{d:"M6.20195 14.6383C6.20195 15.7947 5.25733 16.7393 4.10098 16.7393C2.94463 16.7393 2 15.7947 2 14.6383C2 13.482 2.94463 12.5374 4.10098 12.5374H6.20195V14.6383Z",fill:"#E01E5A"}),l.createElement("path",{d:"M7.26056 14.6383C7.26056 13.482 8.20518 12.5374 9.36154 12.5374C10.5179 12.5374 11.4625 13.482 11.4625 14.6383V19.8989C11.4625 21.0553 10.5179 21.9999 9.36154 21.9999C8.20518 21.9999 7.26056 21.0553 7.26056 19.8989V14.6383Z",fill:"#E01E5A"}),l.createElement("path",{d:"M9.36154 6.20195C8.20518 6.20195 7.26056 5.25733 7.26056 4.10098C7.26056 2.94463 8.20518 2 9.36154 2C10.5179 2 11.4625 2.94463 11.4625 4.10098V6.20195H9.36154Z",fill:"#36C5F0"}),l.createElement("path",{d:"M9.36156 7.26062C10.5179 7.26062 11.4625 8.20525 11.4625 9.3616C11.4625 10.5179 10.5179 11.4626 9.36156 11.4626H4.10098C2.94463 11.4626 2 10.5179 2 9.3616C2 8.20525 2.94463 7.26062 4.10098 7.26062H9.36156Z",fill:"#36C5F0"}),l.createElement("path",{d:"M17.798 9.3616C17.798 8.20525 18.7426 7.26062 19.8989 7.26062C21.0553 7.26062 21.9999 8.20525 21.9999 9.3616C21.9999 10.5179 21.0553 11.4626 19.8989 11.4626H17.798V9.3616Z",fill:"#2EB67D"}),l.createElement("path",{d:"M16.7394 9.36156C16.7394 10.5179 15.7948 11.4625 14.6385 11.4625C13.4821 11.4625 12.5375 10.5179 12.5375 9.36156V4.10098C12.5375 2.94463 13.4821 2 14.6385 2C15.7948 2 16.7394 2.94463 16.7394 4.10098V9.36156Z",fill:"#2EB67D"}),l.createElement("path",{d:"M14.6384 17.7981C15.7947 17.7981 16.7394 18.7427 16.7394 19.8991C16.7394 21.0554 15.7947 22 14.6384 22C13.482 22 12.5374 21.0554 12.5374 19.8991V17.7981H14.6384Z",fill:"#ECB22E"}),l.createElement("path",{d:"M14.6385 16.7393C13.4821 16.7393 12.5375 15.7947 12.5375 14.6383C12.5375 13.482 13.4821 12.5374 14.6385 12.5374H19.899C21.0554 12.5374 22 13.482 22 14.6383C22 15.7947 21.0554 16.7393 19.899 16.7393H14.6385Z",fill:"#ECB22E"}));function pe(){return e.jsxs("section",{className:"space-y-5",children:[e.jsx("h2",{className:"text-text-xl font-semibold",children:"Your next steps with ZenML"}),e.jsxs("ul",{className:"grid grid-cols-1 gap-3 md:grid-cols-3",children:[e.jsx(x,{href:P.stacks.create.index,icon:e.jsx(V,{className:"size-5 shrink-0 fill-primary-400"}),backgroundColor:"bg-primary-25",title:"Add your stack",description:"Connect cloud infrastructure and ML tools to your workspace."}),e.jsx(x,{href:"https://zenml.io/slack",icon:e.jsx(me,{className:"size-5 shrink-0"}),backgroundColor:"bg-neutral-100",title:"Join our Community",description:"Join our Slack community with thousands of members like you."}),e.jsx(x,{href:"https://zenml.io/book-your-demo",icon:e.jsx(de,{className:"size-5 shrink-0 fill-success-400"}),backgroundColor:"bg-success-50",title:"Try ZenML Pro",description:"Book a demo and discover advanced features with our managed solution."})]})]})}function x({href:s,icon:t,backgroundColor:r,title:a,description:n}){const i=s.startsWith("http://")||s.startsWith("https://"),c=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:C("flex aspect-square size-8 items-center justify-center rounded-md",r),children:t}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("h3",{className:"text-text-lg font-semibold",children:a}),e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:n})]})]}),h="space-y-5 rounded-md border border-theme-border-moderate bg-theme-surface-primary p-5 transition-shadow duration-200 hover:shadow-sm";return i?e.jsx("a",{className:h,href:s,target:"_blank",rel:"noopener noreferrer",children:c}):e.jsx(S,{className:h,to:s,children:c})}function he(){const s=B();if(s.isPending)return e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(o,{className:"size-9 shrink-0 rounded-rounded"}),e.jsx(o,{className:"h-6 w-[200px]"})]});if(s.isError)return e.jsx("div",{children:"Error loading user"});const t=Z(s.data);return e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(G,{size:"xl",children:e.jsx(I,{size:"xl",children:(t==null?void 0:t.charAt(0))||"U"})}),e.jsxs("span",{className:"text-display-xs font-semibold",children:["Welcome back",t?`, ${t}`:""]})]})}const ue=d.object({index:d.number(),directory:d.string(),name:d.string()}),xe=d.object({pipelineOrder:d.array(ue)});async function fe(){const s=await fetch("https://raw.githubusercontent.com/zenml-io/vscode-tutorial-extension/HEAD/pipelines/metadata.json");if(!s.ok)throw new Error("Failed to fetch pipelines from Github");const t=await s.json();return xe.parse(t)}function ge(s){return p({queryKey:["github","vscode-tutorial-extension","pipelines"],queryFn:async()=>fe(),...s})}async function je(s){const t=`https://raw.githubusercontent.com/zenml-io/vscode-tutorial-extension/HEAD/pipelines/${s}/${s}.py`,r=await fetch(t);if(!r.ok)throw new Error("Failed to fetch pipeline content");return await r.text()}function be(s,t){return p({queryKey:["github","vscode-tutorial-extension","pipeline-content",s],queryFn:async()=>je(s),...t})}async function ye(s){const t=`https://raw.githubusercontent.com/zenml-io/vscode-tutorial-extension/HEAD/pipelines/${s}/summary.md`,r=await fetch(t);if(!r.ok)throw new Error("Failed to fetch pipeline summary");return await r.text()}function Ce(s,t){return p({queryKey:["github","vscode-tutorial-extension","pipeline-summary",s],queryFn:async()=>ye(s),...t})}function we({children:s,onOpenChange:t,pipelineContent:r,open:a,name:n,displayName:i}){return e.jsxs(O,{open:a,onOpenChange:t,children:[e.jsx(F,{className:"w-full",children:s}),e.jsxs(D,{"aria-describedby":void 0,className:"w-[1000px] overflow-y-auto",children:[e.jsx(te,{}),e.jsx(ve,{displayName:i,pipelineContent:r,isDone:!1,name:n}),e.jsx("div",{className:"p-5",children:r?e.jsxs(f,{className:"space-y-5 p-5",children:[e.jsx(Ae,{pipelineName:n}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:["Create a"," ",e.jsxs("code",{className:"rounded-sm bg-primary-25 px-[4px] py-[2px] text-theme-text-brand",children:[n,".py"]})," ","file that defines your workflow using our Python SDK:"]}),e.jsx(j,{className:"w-full max-w-full",code:r,highlightCode:!0})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Run the pipeline."}),e.jsx(j,{code:`python ${n}.py`})]}),e.jsx(ee,{link:"https://docs.zenml.io/user-guides/starter-guide/create-an-ml-pipeline"})]}):e.jsx(Ne,{})})]})]})}function Ne(){return e.jsxs("div",{className:"flex flex-col items-center justify-center space-y-5 text-center",children:[e.jsx(se,{icon:e.jsx(_,{className:"h-[36px] w-[36px] fill-primary-400"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"We couldn't fetch the pipeline data"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Please try again later or check the code in our GitHub Repo."})]}),e.jsx(m,{size:"md",asChild:!0,className:"mx-auto w-fit",children:e.jsx("a",{href:"https://github.com/zenml-io/vscode-tutorial-extension/tree/develop/pipelines",target:"_blank",rel:"noreferrer",children:"Open in Github"})})]})}function ve({isDone:s,name:t,pipelineContent:r,displayName:a}){const{copied:n,copyToClipboard:i}=R();function c(){if(!r)return;const h=new Blob([r],{type:"text/x-python"}),A=URL.createObjectURL(h),u=document.createElement("a");u.href=A,u.download=`${t}.py`,u.click()}return e.jsxs("section",{className:"flex items-center justify-between border-b border-theme-border-moderate bg-theme-surface-primary p-5",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[s?e.jsx(v,{}):e.jsx(w,{}),e.jsx(H,{className:"text-display-xs font-semibold",children:a})]}),r&&e.jsxs("div",{className:"flex items-center",children:[e.jsxs(m,{intent:"secondary",emphasis:"minimal",onClick:c,className:"flex aspect-square size-7 shrink-0 items-center justify-center p-0",children:[e.jsx(U,{className:"size-5 shrink-0 fill-theme-text-secondary"}),e.jsx("span",{className:"sr-only",children:"Download Pipeline"})]}),e.jsx(m,{intent:"secondary",emphasis:"minimal",className:"flex aspect-square size-7 shrink-0 items-center justify-center p-0",onClick:()=>i(r),children:n?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sr-only",children:"Copied"}),e.jsx(y,{className:"size-5 shrink-0 fill-theme-text-secondary"})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sr-only",children:"Copy Pipeline"}),e.jsx(T,{className:"size-5 shrink-0 fill-theme-text-secondary"})]})})]})]})}function Ae({pipelineName:s}){const t=Ce(s);return t.isPending?e.jsx(o,{className:"h-[60px] w-full"}):t.isError?null:e.jsx($,{className:"prose max-w-none rounded-md border border-primary-50 bg-primary-25 px-5 py-3 text-text-sm prose-pre:bg-primary-50",children:t.data})}function ke({displayName:s,pipelineName:t,isDone:r}){const[a,n]=l.useState(!1),i=be(t,{refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchInterval:!1,refetchIntervalInBackground:!1});return i.isPending?e.jsx(o,{className:"h-[130px] w-full"}):e.jsx(we,{displayName:s,isDone:r,name:t,pipelineContent:i.data,open:a,onOpenChange:n,children:e.jsxs(f,{className:"space-y-5 p-5 text-start transition-shadow duration-200 hover:shadow-sm",children:[r?e.jsx(v,{}):e.jsx(w,{}),e.jsx("p",{className:"text-text-lg font-semibold",children:s})]})})}function Se({githubPipelines:s}){const t=p({...N.pipelineList({name:`oneof:${JSON.stringify(s)}`})});if(t.isPending)return e.jsx(o,{className:"h-1 w-full"});if(t.isError)return null;const r=t.data.items.length,a=r/s.length*100;return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"whitespace-nowrap text-text-sm",children:[r,"/",s.length]}),e.jsx(J,{className:"h-1 w-full rounded-rounded",value:a})]})}const ze="data:image/webp;base64,UklGRgQJAABXRUJQVlA4IPgIAABQWACdASqQAZABPpFInUslszMiphQ4umASCWlu4XPeABnZ1sRmTst3gH8f/ue/qFD5Zf8DR4ZRZrXkuJhVV/fbvk2FlVX99u+TYWVVf3275NhZVV/fbvk2FlVX99u+TYWVVf327yj0hVV/fbvk2FlVXB8rqz8ZAbLzfAk3/k8T0Lf5IBLXfSQpCS0Kl4X+Hkmtce6xqRaGzms02QLDekSBxjBhxh4BVV/fbvkuajlslP+MhKMsp1LpZMgtdksxsckXnrMroyDyWhUtpVdX/vpDfvNzZkea6w5Y7/wk769arImplc9HWXpTiS0Kl3mDzAO/k0Ne5OYr0o4N1Q1ZJ09vOGENA9A3XTnYzabR2fIiLHUAhB7wt2VmbrM5JCQ2tsB8DgWudqlYYJNRqpoJ/7dgzr5MR10PmuhBVV/bixn655V+aQOuR0rhUeTr0f71OoXAdDER0e+3fJex1brst9AKujLB69CGB+vdm/+UbCHUKZOkX1/fbvORvs9EAoemLvfqw0y41l1h3n+xCypB5JrzPpSR7G4vOLrYoVPBIHucKwTw1lSBaEo2eH+N3S/SuwJ3RMUqlqB2XdHyGOmwsqphM0f28io7/cA0GmbUJdFglVwLB8KIz1oJmR8vN1X99unNTRwICZyrKOdA3qzWJuXSWdMAVLsLC4K15vdAYgC3S7++3fJbq088mhifDqJQYE5TVtNHLLKBSN33xNmbBrYwS21lEtPj7pZu/clVIkhSEl1LOgBcEw6to+BbEDG+ZdH+iBgcrNlTNX0BZEeHjHGiJdu+TYWWEn9t8IkMrQGRyEqCI4eYXYM0g0mUk5sSPOivMlicpsqQeS0Kl4XgWjpbgiMwFKd6q/nJ/R//6a4Yiv1zUKl4aypB5LQzkmpPi5upPJaFS8NZUg8loVLw1lSDyWhUvDWVIPJaFS8NZUg8loVLw1lSDyWhUu8gAP70Mh1qAAJrmd1sURJkmf92uXIiKcUxBLVXTxTv5MgLCAQJP2VtcqV7tobpKpsz4HDaLgibwXubbtPM0xVZfOeJ7VerKrlFECxQC3wNJx7bsLpkh5+pUtmOhP31xOzwDxJK6CQyt93jawMKsFlj3WFsFsm+81rNvO/jpN66D8DRiyn9fdMfKAhRib771s2MNAhTE/AZLdtJbVHIpJZ8ioGz68vdI3eXQivIwtaI6dDTTrTGQ0m6YtwDXeLYsYst1xrchGJL0KgKkmvJ08oDriAteIiMDN72oTW6FYZyE8FQrxlF4P/BptzwiGzaktIuQILGXEIRCDvsGIcNpjIx+A01V8dc9H/r7xpAunH2aunqu0kSknsW/ZNACOp37KechgGh+gzUNfAzu4+qj90nInkYRY/BJvfFWdl3gypIjh56BHAkrsMfP0o9iYzp7YDP+S0iUw/fwNw7BE2ervIP5TSx9e5oBZRvGFH8JBcoh8E0gJALs5JIqDxDIj1g6kzuvO3scBvqJzeDGy2gil0CT7otwrtJTQfeiw4qUiglfyavwAr/lXPGQ2diV+dlDn1Lz63xYBvmHm/IcSYTTL2uRYXeJshVRxodT0Yg6efl2vTZtJVFgiwngz5xhHvLF8DxOkJDvpqH3NgJvbARoPOkbIY+VjYLAKdDIj0syGfG6ADO1MtWI0hNkuSbw/+SxQcaVjdKcKI0awCzwwgMd96Vz6omBaHJwjRFbQRueglxWeUsa3JiUhGiHugimdqaGy+vTnLyva5dlI42Q9pZ3bOBvtSI9rH06FvNdteEIEssonX4MZeOEnesLwUQlJX+FeqDD/gAaTYkEz8pTYSYbLaf5Wtl9T07jbLnIeB1qbg0tUnnHp7bSHtZqOPj7Or52GeRzz/b1+7+JBeyy4nlNzTS8LGt2bUgABPAknQ++149Vodlhw9KEm4O2t6k7CqTZRt9F2e13EVMqY08fX/Nge+S55sgbXSujILz+998ycQEI/dzwrKKakDalQx3n2t+VrGSHUYxVXAVhmKbDLzeUOuQEKHnFBVk9j4+I1mFle0SXNSMVOtlpaaXRUypqindfXXsAO9CjYvB/FQKWj+WKg2+fkOO0ACrZ+9frgGhrBi8ppzyiF2akM7Hlm7vnBMgu5MJTgU4iNBZr4IwGk9guPvhOff/ujj3C1f6Gl75nWyGIERGm9YjYyGcWeLQIVz1oRdbRkmuMFfH80OA44c3AoeBBO70btvU0P1h0Zzf9rgWK1JZAWkcs6kw6Zb9U8UUOYph/FRh+twMVObOXjnF91URdOK6Y19gERERTuiBxArKnLRgShJO4Y+723BeGVAAxL9bw7UXYguFOIpyB3NeoMyK8YOc040jGUsSQGQRivdf2Vediua3b8OfQFZiOaAupiKfAYBAiae9jO2T9ZNiwXw+gPtKryLT2bTOi9hzA6LbjmP51g/hoB7IpYlyMvfokmY1rWbYCgsIPgTrfVuG5dS5P1rWBIXZGrWst1VEszLMQZMcCVvwR0EL+gTxcSaghUHPwFZHdynwB4ZkEP9r1YkIzMoYTDneRZGAHz4mdyJ4WYd/pEiOW+qU1uHT0U/Uv9CypG3nruUINkgCOW8a9GPK7AjgW9MRNuh9JlHrlJkGPSeoUYEDX9tVin6iIVlbJhn5NvwpgxnswpJG72LQkXUds75I2SsAUi6M9q6I8E8gtMSA7IS4JAA674KhD3KgRtFYkFVWY+1ZODifU3OdAm0Bh2HRK8vmdZlH9spfv4Fn3DTxefI84WaW9glJRNFC2enXs/Auhbu3Aza8Qv+xZLT+57CbiuNYhZHwmxB4MDrHZEDcIfChcouhZlhznkQe8gwmkq2VCZ0RkGSW5uDU900Fq7xQflf+vKVy0FWguyMx7obLKm1IBd5Pt1cQfMjNOl7VIinxsY4xrD7zKkDBXrSC+JB3QKGTv6TIon1NCRQGAKAdILPSKwuexSRXUrbkqNjbmAPGqoF57Z+ytF+WZM0ryLKIFcRNbIKMgNTsBvNHlragf/C99hkXrnowDEVjfqmxpgBxvRLKi+GJIQcxODqyDE2mBLICgSpdbDKcrPJotOz5jXdOIV8DgAAAAAAA",Le="data:image/webp;base64,UklGRvgMAABXRUJQVlA4IOwMAABwXACdASqQAZABPpFIoUulpKOho9SIwLASCWVu4W++Zhmmx9/mNgO7f+ZHPG75ePP7J0sh4/Tj370P+iT9TewF/Cv4f+tPWy8wX+r9KX1If+Lfu+hs9Yj+Lf93KH1G9uBLM9ievhvOxVeSt/LUe2TGea73j7oUWHtM9pntM9pntM9pntM9pntM9pntM9pntM9pntM9pntM9pntM9pntM9nFD2GLT69n9+ZfzL+ZfzL519D3i+ua8dvapeeACCxGZKfuMnoaGbQzaGbQzXdaL/mMzz73Ev4HkwAku7yBmJiRth7TPaZ6Bmp7+ja/AI8pYdbXc/Wk/sz9WYSd+Up873upo1Bys7Bj/bDZt6M46zj0ykd8RKEcw9Qxc428nJCWVgdrTw4TeVQMO61ZyfivSrL+9AlvhVY2w9t8OTsZSSj2/6kCA3DGA60kDwgtuY7XirpevbwikHcHGJxGlLtb/NvatFuMvteDVdny3JvXuQmGZWNNiRk5ucxeGFGMAWv5oDjeorRg9izbuVErBHSebZZfBMACu3NvCfbH0sbo6+/szjubQfTJF5c02dho7d2c39Ch+/oy2xFZ1pYOvPGrVntM1lntR2O2BrHy75AmgqO2ifcDOzg3YzBl5vXf4Qp+MTjGpS47euL03+MB5PqB5ra7+6C6QVgSXxeeY0fwSdP3rCLsgxYeOTkHQEaDpNsFXlegxH3y3EHGHuBPiTEzMkHi+zUl+ZYOkltlXjv/kEMw2FoZ0BwoO/PFv6Je1ICwxeBkrXYLqcxYwM5F6wjFARgrxgXG3AdybM34uynhLqcQF4ySnr1hGJ4xPGKXjPwWNKykyQp7gSZ5W5mQvvWEYnjE8YpeM/CPnLj91E70mUgJhLN4sccaq0JE8YnjE8YpeO/2isdE/ZhC1QE9ur/+KGZujQZ0FMtpjbD2me0z2nWiS/G8lMnEM2hm0M2hm0M2lw/vzL+ZfzL+ZfzL+ZfzL+ZfzL+ZfzL+ZfzL+CAAP7z9YAAAAAAAAAaPWzbdpXttkMTuQtbGXsOgv3jDqlo6qPidzg80OgIchR/HVEwLj1R63Z3UWAEkg9eO201YiDE7sQUeK0KRKIev8LeginSOD4mIDGAQN39YRp1u2oNwS3aHlPStQ6sNUXjTI/eLNZMfYGDvh8oy2pF9K9JY2/PFnMSVFNx+nYHuz6xkBbg8+Afg4Oj0wosPPeoNpZxRXvLLJi22ODEB1J2m75bLXeuDQBVess539EzuCHElHAGBylH/F6Wl+vrwLEDNDtlEBobXjRlbQPRnIuZJlFKXe6Ke9qFRbMZzs4+5SNGqPxdpld/d2BEJjnpu+vMX5jJZlEM1W05EdyK+WmglQJFdkO9pPLlmLzoOWN6iJazJnYd5b//yd5V/zEq4cXHt1+g5To4BI5WuXBtQ/JUelsO+YD1dYK+OfTbuLPIwwLhXB/5zLdoVRoK13lCimewtoqsHcE7rmEP1Eh5PSfgtcj2iz14fILcpjvwcTKkUyj/Cp2g945r0/xQeiESAoT6LPnyjC1UMUnudlD1hy6+W1mUBDR7fggqH5bRpeLhSnkEjA9pZlsKOz2FCuL9Wy+vpSHDV8Ca1kEAELCmsg1koXXF98ZaEZoyAAgVGp4BcZGUsGnL6uXL7SZz5T6mfD50fqRl9Eop/EyLbl3KA4b6PRMqPjSLA2kkeg20AXJoryfFOqf+DvCE8ff0sWJQhXFnWxSPfly++Ne2PpwPw1xQeST1LyuC0tTttE4C8BDLoywSw+vWs3FDoJoj686gPKOpJkZy0XNl5o60IO+V9x6YLFfsdMJUYj+kQmBndoYfywIQsO0qc0mKH/1BAYS6sjWbhtTx1wKl5VYmGp0fmE/8JChjlv07kmoBFQP/BXlGgvnB0cP9a86g5q5DHMqy1ASAwao/t0HKR5OUhyaH6Fa2KZXHXDMYkUZxBDkry4ewRdtLwZxElIJ5/1Arye8FT3g7+dzPloHhjM160xSd9RFWjr2Ql9a6kc4wNyqvIdxHXnCSSE+4lzsMJtf4iKF4dN8e3DeDQ+wjTZIvy3pKGjGcApcwnhAvIAONb0wgraWr3H6ChAu2myznK6qiZ+RDWkknM8H8YXm7GdKQxWwdlPXJBmNR9ZP6spQWKPatAmnK3ct/XbMX3f2AHjpQosPLey4Xp739RdKCz8Ba6e0PDk2vlq2/bfQSsuEIupiY9rhVu1CntfgrqFMb5iY3V8CuSaJ97ag5tGwgsbcTCyngV4WDaRcfd7MFhLHCUSmptcmkH/+KS5NqFGWdqNvldEo66yAu38Ou/aGsZT4MyP39dbXcfi0G5NIoqJ38fEM8+PRJIokQYEreULIJkJD5+crCw7D6U38AnbZQk2gBC/QFIGLC/D3RjSEZCJZ80P8N4YXOMko5HO3I8YN9MpoqFHWsLkyEqvSVo7n+AW3xy6QajMpdfeTLR6LLTqmKkSqUsNVmxAOVw+wK2hBY/VNZRk+nfBWTAGY5nRlRyKrU3d+BX/Prfk4r+/tVHr5jjwS8N3ivGLKYVC3NLq2IeT0kp/Ifj1lPyABDap6J9b30JseLKSYBYHMsXYXKEPEGoR9s38yNmq74xZGZXEoVeBnXnjUwqHpaARvoYI3dNzN70ABOo05ZVixLLvinAhsAqTR2SC9AW8s/skmQIf0O0VQbbiIyydeP1OZ1vtbXfAGZh4EoazC4A55sHBrwUb49L1AB53e/32/B5JzBHl30S7p2p79OHoIVyquESjQsMzrsDCRtiLKRH+mniIJABYUkJSB/gyp+1AePGA7TMgcQ7VQBiEgOwqhAMAZQGJUGjN8UPIKvqSH1AcdhoRsd+E++De+2ROrzyFf9H6G5GrML22fLFyh25wkPkD+zkViFv+gIRn0voyTO9rmk2Ye8WRvv5jd4wGIRKz0OGoktvjNtNaDACswSqORkYQZ9fM1KR45MIvJsk4r+ej2X1elMoPQ2sTuSqrQ2wd8gu/dq7v0PPR9yHDNlsGcXNisMzu0iKsh5T3TLt5a0u4xtPPVi0kFA7ZI+t5PDLra2lAT/Dcu0IOB2aHBLNeUkIj976d6u+zCEzSmvzhY7r+Z7/v0H1yUYJnXFjbHgCOzRjzTdiczTU+4WIyaGPi1AgTrFmzRAWZgqtGUhbp3MY8256OVSuzGjUH/zubDaA0uxjFlPO3TjhVpFHwZM8x4QoVfOesa7L7RWOUvU86eCGT+TeuIEDIkWy51zoRZtAGWgn0AVSsGB3yokXIQEcZgyCPaBUnN/fNCtUDV7/D/79s3bWx2Lu64PYoZPmXlUET7AKBdlgffZmsqFiqL+kAbqiHyD29ZXnMwGQodUsSSioM8v0RJLiN7cQ4h3F2xAzMtd4bHkEtFrc5bPuikN+Ol8J/2M+2t/ZYSjtpFWkgabkioE/KG/wwZoqhJ80RGfwAXWkInV4gqVdUzWYImFMVLVjfzUTCRVNk4NSNXsmyCQ44FkxvbOuG9C/F8lYnTNoFHU0aEnDhQgam2gbwTOSwo3HT1paoD/VaK5gcvh7JL9AFdkSUccOx2yGMejrt5ynKxaTRymh8sUtujlvAAaysKiTooPteDH6NlK/WeYPAgQ0X8Kw7TQ/2wGZn8b7rdWdw4kR3/zC8mj27g9LRiJKHtNJRJHpOFRq4q+SmFxvZiZocoL/rFnAWWO+dEBUFQbHXob7WxBEEn77YXtJEwW8s1exN9LqIzdjCMEbDHgjzLzW3BTLGWbz1H6dn1bGmHxIQ5CH1Fjzniun9t4fJB1QJkagcdpk/U5vQmXCUuA/SeXki0j5S8937VvRjp01ZB6WUENROUPWCJimLqZGap2N7J0FaoFmc1tA36ldXgt7jnypT5AtpDkgVuDVCJo6POVpoIndMOjEs5I9B64OVaoAFwTE1y/jyqdYfGDlV88Nw73xWTHjyFVIv0G/FTgzNwY8jAKtXMwMy8TZPbt9pQxitVswOiERPFS0lm77i6Nx1t2tQRdauXWiCGQACQoqAhc+9jOKzpZJaFbsd50PSGtbYIGQ4uUqmEyof6jQteIZtsinKtalLGYs9NDFa/9FaneQMLQFjGgLxL8K/yX70cdN3/nAZf5nx+IqCeEjOFDslD61gTt4eGqdAXfDKqhSbVKxyxS/1WhRddozvR2SKAACUlS1GPCM9grqml/au8VPgZSJciIyKTYGVkL+dF+PizZFdwjBxOcLxXIvtFqQz2jMJM8c0uXPVSlM+lDWVnIJwmPgIdf0FljRDYeF6Vu8NbOsZhKAV/FUsCzEiCQN+RPDzM/oDKcTvw8g7oJN8RtjdMvsoOXyvOYxyIerTduraiFR46RvrQCwlidy55I4ACvBOEdlDLkZSs3+jpcgqjXFsDGzthcprFfqmI3aLu/v946hzNX7HywQPoMDG0oOAAAAAAAAAAAAA==";function Me(){const s=ge({refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchInterval:!1,refetchIntervalInBackground:!1}),[t,r]=l.useState(!0);if(s.isPending)return e.jsx(o,{className:"h-[400px] w-full"});if(s.isError)return null;const a=s.data.pipelineOrder.sort((i,c)=>i.index-c.index),n=a.map(i=>i.directory);return e.jsxs(Q,{open:t,onOpenChange:r,children:[e.jsx(Y,{className:"flex items-center gap-[10px] p-0",children:e.jsxs("div",{className:"flex w-full flex-col items-center justify-between gap-5 p-5 lg:flex-row",children:[e.jsxs(g,{className:"flex-1 space-y-5",children:[e.jsxs("div",{className:"flex flex-col items-start",children:[e.jsx("p",{className:"text-text-xl font-semibold",children:"Learn the core concepts of ZenML"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Click on a pipeline and follow the instructions to run it locally or run the tutorials with our VSCode Extension."})]}),e.jsx(Se,{githubPipelines:n})]}),e.jsx(Pe,{}),e.jsx(g,{children:e.jsx(W,{className:` ${t?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`})})]})}),e.jsx(K,{className:"border-t border-theme-border-moderate bg-theme-surface-primary p-5",children:e.jsx(Ee,{pipelines:a})})]})}function Ee({pipelines:s}){const t=s.map(n=>n.directory),r=p({...N.pipelineList({name:`oneof:${JSON.stringify(t)}`}),refetchInterval:3e4});if(r.isPending)return e.jsx("ul",{className:"grid grid-cols-1 gap-3 md:grid-cols-3 xl:grid-cols-5",children:Array.from({length:s.length}).map((n,i)=>e.jsx("li",{children:e.jsx(o,{className:"h-[130px] w-full"})},i))});if(r.isError)return e.jsx("p",{children:"Error loading pipelines"});const a=r.data.items;return e.jsx("ul",{className:"grid grid-cols-1 gap-3 md:grid-cols-3 xl:grid-cols-5",children:s.map(n=>e.jsx("li",{children:e.jsx(ke,{isDone:a.some(i=>i.name===n.directory),pipelineName:n.directory,displayName:n.name})},n.index))})}const b="zenml-io.zenml-tutorial";function Pe(){return e.jsxs(f,{className:"flex items-center justify-between gap-5 p-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-text-lg font-semibold",children:"Install the extension"}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Available for VsCode or Cursor"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(m,{intent:"secondary",emphasis:"minimal",className:"aspect-square size-8 shrink-0 overflow-hidden border border-theme-border-moderate bg-theme-surface-primary p-0",asChild:!0,children:e.jsx("a",{href:`vscode:extension/${b}`,children:e.jsx("img",{src:Le,alt:"VsCode",className:"h-full w-full"})})}),e.jsx(m,{intent:"secondary",emphasis:"minimal",className:"aspect-square size-8 shrink-0 overflow-hidden bg-theme-surface-primary p-0",asChild:!0,children:e.jsx("a",{href:`cursor:extension/${b}`,children:e.jsx("img",{src:ze,alt:"Cursor",className:"h-full w-full"})})})]})]})}function $e(){const[s]=z(),t=s.get("success")==="true";return e.jsxs("div",{className:"layout-container space-y-8 py-5",children:[t&&e.jsx(re,{}),e.jsx(he,{}),e.jsx(Me,{}),e.jsx(pe,{}),e.jsx(oe,{}),e.jsx(ae,{})]})}export{$e as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as p,j as e}from"./@radix-Cdvw4jJ8.js";import{f as D,i as C,n as $,F as k,j as E,au as T,av as P,aw as F,I as j,az as O,aA as A,B as u,D as K,l as H,m as G,p as U,b2 as J,r as S,v,G as W,z as f,e as X,g as N,as as Y,at as Z,a as ee,aB as se,x as te,b as ae}from"./index-BgEfQ3_G.js";import{P as re}from"./Pagination-CWnEpSpN.js";import{S as ne}from"./SearchField-BtUi6cYl.js";import{E as ie,S as le,s as ce,a as oe}from"./SecretTooltip-B5u1UsQ9.js";import{c as V,h as q,b as me}from"./@tanstack-5gTMR7G2.js";import{S as de}from"./Lock-CrIAdQo6.js";import{D as ue}from"./DisplayDate-8RESqe5H.js";import{c as xe}from"./code-snippets-CqONne41.js";import{L as w,f as he}from"./@react-router-DeDfXbUF.js";import{S as I}from"./trash-DP6Tpp_E.js";import{D as b}from"./DialogItem-CRCDpYU6.js";import{S as pe}from"./eye-CbVlAYty.js";import{S as L}from"./plus-Cl0_rCVF.js";import{t as fe}from"./zod-XdS2h1ws.js";import{u as je,b as ge,C as g}from"./index.esm-DhJo3mA6.js";import"./@reactflow-B_iCtR7X.js";import"./chevron-right-double-Dgp_gEsp.js";import"./index-DWpiv-Ft.js";import"./CodeSnippet-Ctplhzdc.js";import"./info-QkbQz4QU.js";async function ye(t){const s=C(E.secrets.detail(t)),a=await D(s,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(a.status===404&&$(),!a.ok)throw new k({message:"Error deleting secret",status:a.status,statusText:a.statusText});return a.json()}function Ne(t){return V({mutationFn:async s=>ye(s),...t})}function Se({secretId:t}){const s=q(),{mutate:a}=Ne({onSuccess(){s.invalidateQueries({queryKey:["secrets"]})}}),[r,n]=p.useState("");function o(){a(t)}function m(x){n(x.target.value)}return e.jsxs(T,{children:[e.jsx(P,{children:e.jsx(F,{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:m,className:"w-full",required:!0,value:r})]}),e.jsxs(O,{className:"gap-[10px]",children:[e.jsx(A,{asChild:!0,children:e.jsx(u,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(u,{intent:"danger",type:"submit",form:"edit-secret-form",onClick:o,disabled:r!=="DELETE",children:"Delete"})]})]})}function ve({secretId:t}){const[s,a]=p.useState(!1),[r,n]=p.useState(!1),o=p.useRef(null),m=p.useRef(null);function x(){m.current=o.current}function h(d){if(d===!1){a(!1),setTimeout(()=>{n(d)},200);return}n(d)}return e.jsxs(K,{onOpenChange:a,open:s,children:[e.jsx(H,{ref:o,children:e.jsx(G,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsxs(U,{hidden:r,onCloseAutoFocus:d=>{m.current&&(m.current.focus(),m.current=null,d.preventDefault())},align:"end",sideOffset:7,children:[e.jsx(b,{onSelect:x,onOpenChange:h,triggerChildren:"Edit ",icon:e.jsx(J,{}),children:e.jsx(ie,{secretId:t,isSecretNameEditable:!0,dialogTitle:"Edit secret"})}),e.jsx(b,{onSelect:x,onOpenChange:h,triggerChildren:"Delete ",icon:e.jsx(I,{}),children:e.jsx(Se,{secretId:t})})]})]})}const we=[{id:"secret",header:"Secret",accessorFn:t=>t.name,cell:({getValue:t,row:s})=>{const a=xe(s.original.name);return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(de,{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(w,{className:"text-text-md font-semibold text-theme-text-primary",to:S.settings.secrets.detail(s.original.id),children:s.original.name}),e.jsx(le,{code:a})]}),e.jsx(v,{copyText:t()})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(w,{to:S.settings.secrets.detail(s.original.id),className:"flex items-center gap-1 text-text-sm text-theme-text-secondary",children:s.original.id.slice(0,8)}),e.jsx(v,{copyText:s.original.id})]})]})]})}},{id:"author",header:"Author",accessorFn:t=>{var s,a;return(a=(s=t.resources)==null?void 0:s.user)==null?void 0:a.name},cell:({getValue:t})=>{const s=t();return s?e.jsx(W,{username:s}):null}},{id:"created_at",header:"Created At",accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.created},cell:({getValue:t})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(ue,{dateString:t()})})},{id:"admin_actions",header:"",accessorFn:t=>String(t.id),cell:({row:t,getValue:s})=>{var r,n,o;const a=s();return(o=(n=(r=t.original.resources)==null?void 0:r.user)==null?void 0:n.body)!=null&&o.is_admin?e.jsx(ve,{secretId:a}):e.jsx("p",{className:"text-sm text-theme-text-secondary",children:"No Actions"})}}],y=1,be=f.object({page:f.coerce.number().min(y).optional().default(y).catch(y),name:f.string().optional(),operator:f.enum(["and","or"]).optional()});function De(){const[t]=he(),{page:s,name:a,operator:r}=be.parse({page:t.get("page")||void 0,name:t.get("name")||void 0,operator:t.get("operator")||void 0});return{page:s,name:a,logical_operator:r}}async function Ce(t){const s=C(E.secrets.all),a=await D(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){const r=await a.json().then(n=>n.detail).catch(()=>"Failed to create Secret");throw new k({status:a.status,statusText:a.statusText,message:r})}return a.json()}function ke(t){return V({mutationFn:async s=>Ce(s),...t})}function Ee(){const[t,s]=p.useState(!1),a=X();if(a.isPending)return e.jsx(N,{className:"h-7 w-full"});if(a.isError)return e.jsx("div",{children:"Error loading user"});const r=a.data.id;return e.jsxs(Y,{open:t,onOpenChange:s,children:[e.jsx(Z,{asChild:!0,children:e.jsxs(u,{size:"md",className:"shrink-0",intent:"primary",children:[e.jsx(L,{className:"h-5 w-5 shrink-0 fill-white"}),e.jsx("span",{children:"New Secret"})]})}),e.jsxs(T,{className:"mx-auto w-[90vw] max-w-[744px]",children:[e.jsx(P,{children:e.jsx(F,{children:"Register New Secret"})}),e.jsx(Te,{userId:r,setOpen:s})]})]})}function Te({userId:t,setOpen:s}){const{handleSubmit:a,control:r,watch:n,setValue:o,formState:{isValid:m},reset:x}=je({resolver:fe(ce),defaultValues:{secretName:"",keysValues:[{key:"",value:""}]}}),{fields:h,append:d,remove:_}=ge({control:r,name:"keysValues"}),{toast:z}=ee(),R=q(),{mutate:M}=ke({onError(i){se(i)&&z({status:"error",emphasis:"subtle",description:i.message,rounded:!0})},onSuccess(){R.invalidateQueries({queryKey:["secrets"]}),s(!1),x()}}),Q=i=>{M({user:t,name:i.secretName,values:i.keysValues.reduce((l,c)=>(c.key&&c.value&&(l[c.key]=c.value),l),{})})},B=i=>{Q(i)};return e.jsxs(e.Fragment,{children:[e.jsx("form",{id:"create-secret-form",className:"gap-5 p-5",onSubmit:a(B),children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("label",{className:"font-inter text-sm text-left font-medium leading-5",children:["Secret Name",e.jsx("span",{className:"ml-1 text-theme-text-error",children:"*"})]}),e.jsx(g,{name:"secretName",control:r,render:({field:i})=>e.jsx(j,{...i,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"})})]})]}),h.map((i,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:r,render:({field:c})=>e.jsx(j,{...c,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:r,render:({field:c})=>e.jsx(j,{...c,className:"mb-2 w-full pr-10",required:!0,placeholder:"•••••••••",type:n(`keysValues.${l}.showPassword`)?"text":"password"})}),e.jsx("button",{type:"button",onClick:()=>{const c=n(`keysValues.${l}.showPassword`);o(`keysValues.${l}.showPassword`,!c)},className:"absolute inset-y-1 right-0 flex items-center pb-1 pr-3",children:e.jsx(pe,{className:"h-4 w-4 flex-shrink-0"})})]})}),e.jsxs("div",{className:"flex items-center",children:[l===h.length-1&&e.jsx(u,{intent:"primary",emphasis:"subtle",onClick:()=>d({key:"",value:""}),className:"mb-2 flex h-7 w-7 items-center justify-center",children:e.jsx(L,{className:"flex-shrink-0 fill-primary-600"})}),l!==h.length-1&&e.jsx(u,{intent:"secondary",emphasis:"minimal",onClick:()=>_(l),className:"mb-2 h-7 w-7 items-center justify-center",children:e.jsx(I,{className:"flex-shrink-0 fill-theme-text-secondary"})})]})]},i.id))]})}),e.jsxs(O,{className:"gap-[10px]",children:[e.jsx(A,{asChild:!0,children:e.jsx(u,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(u,{intent:"primary",disabled:!m,type:"submit",form:"create-secret-form",children:"Register Secret"})]})]})}function Pe(){const t=De(),{data:s}=me({...oe.secretList({...t,sort_by:"desc:created"}),throwOnError:!0});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsx(ne,{searchParams:t}),e.jsx(Ee,{})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:s?e.jsx(te,{columns:we,data:s.items}):e.jsx(N,{className:"h-[250px] w-full"})}),s?s.total_pages>1&&e.jsx(re,{searchParams:t,paginate:s}):e.jsx(N,{className:"h-[36px] w-[300px]"})]})]})}function Ye(){return 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(Pe,{})]})}export{Ye as default};
|
1
|
+
import{r as p,j as e}from"./@radix-C_LirfyT.js";import{v as D,y as C,Y as K,F as k,E,aC as T,aD as P,D as F,I as j,aG as O,aH as V,B as u,J as $,K as H,L as G,M as J,b7 as U,r as S,V as v,a0 as W,z as f,u as Y,d as N,aA as X,aB as Z,s as ee,aI as se,W as te,j as ae}from"./index-BacoJBEQ.js";import{P as re}from"./Pagination-CcDD5yHh.js";import{S as ne}from"./SearchField-D_0-uAPj.js";import{E as ie,S as le,s as ce,a as oe}from"./SecretTooltip-BcWMKb9f.js";import{c as A,h as I,b as me}from"./@tanstack-C0SeHZng.js";import{S as de}from"./Lock-CRP5J_su.js";import{D as ue}from"./DisplayDate-v3KW7oez.js";import{c as xe}from"./code-snippets-CqONne41.js";import{L as w,f as he}from"./@react-router-BSsrkPOd.js";import{S as L}from"./trash-HKxXWbSG.js";import{D as b}from"./DialogItem-DeME0oSt.js";import{S as pe}from"./eye-CLNgIh_K.js";import{S as q}from"./plus-cI8zD2xh.js";import{t as fe}from"./zod-DgEcN9jD.js";import{u as je,b as ge,C as g}from"./index.esm-COnaHLSh.js";import"./@reactflow-D9hglKLF.js";import"./chevron-right-double-CbRQKN4Q.js";import"./index-BRhKF2z-.js";import"./CodeSnippet-D8iBqOVv.js";import"./info-CyMih3vQ.js";async function ye(t){const s=C(E.secrets.detail(t)),a=await D(s,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(a.status===404&&K(),!a.ok)throw new k({message:"Error deleting secret",status:a.status,statusText:a.statusText});return a.json()}function Ne(t){return A({mutationFn:async s=>ye(s),...t})}function Se({secretId:t}){const s=I(),{mutate:a}=Ne({onSuccess(){s.invalidateQueries({queryKey:["secrets"]})}}),[r,n]=p.useState("");function o(){a(t)}function m(x){n(x.target.value)}return e.jsxs(T,{children:[e.jsx(P,{children:e.jsx(F,{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:m,className:"w-full",required:!0,value:r})]}),e.jsxs(O,{className:"gap-[10px]",children:[e.jsx(V,{asChild:!0,children:e.jsx(u,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(u,{intent:"danger",type:"submit",form:"edit-secret-form",onClick:o,disabled:r!=="DELETE",children:"Delete"})]})]})}function ve({secretId:t}){const[s,a]=p.useState(!1),[r,n]=p.useState(!1),o=p.useRef(null),m=p.useRef(null);function x(){m.current=o.current}function h(d){if(d===!1){a(!1),setTimeout(()=>{n(d)},200);return}n(d)}return e.jsxs($,{onOpenChange:a,open:s,children:[e.jsx(H,{ref:o,children:e.jsx(G,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsxs(J,{hidden:r,onCloseAutoFocus:d=>{m.current&&(m.current.focus(),m.current=null,d.preventDefault())},align:"end",sideOffset:7,children:[e.jsx(b,{onSelect:x,onOpenChange:h,triggerChildren:"Edit ",icon:e.jsx(U,{}),children:e.jsx(ie,{secretId:t,isSecretNameEditable:!0,dialogTitle:"Edit secret"})}),e.jsx(b,{onSelect:x,onOpenChange:h,triggerChildren:"Delete ",icon:e.jsx(L,{}),children:e.jsx(Se,{secretId:t})})]})]})}const we=[{id:"secret",header:"Secret",accessorFn:t=>t.name,cell:({getValue:t,row:s})=>{const a=xe(s.original.name);return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(de,{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(w,{className:"text-text-md font-semibold text-theme-text-primary",to:S.settings.secrets.detail(s.original.id),children:s.original.name}),e.jsx(le,{code:a})]}),e.jsx(v,{copyText:t()})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(w,{to:S.settings.secrets.detail(s.original.id),className:"flex items-center gap-1 text-text-sm text-theme-text-secondary",children:s.original.id.slice(0,8)}),e.jsx(v,{copyText:s.original.id})]})]})]})}},{id:"author",header:"Author",accessorFn:t=>{var s,a;return(a=(s=t.resources)==null?void 0:s.user)==null?void 0:a.name},cell:({getValue:t})=>{const s=t();return s?e.jsx(W,{username:s}):null}},{id:"created_at",header:"Created At",accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.created},cell:({getValue:t})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(ue,{dateString:t()})})},{id:"admin_actions",header:"",accessorFn:t=>String(t.id),cell:({row:t,getValue:s})=>{var r,n,o;const a=s();return(o=(n=(r=t.original.resources)==null?void 0:r.user)==null?void 0:n.body)!=null&&o.is_admin?e.jsx(ve,{secretId:a}):e.jsx("p",{className:"text-sm text-theme-text-secondary",children:"No Actions"})}}],y=1,be=f.object({page:f.coerce.number().min(y).optional().default(y).catch(y),name:f.string().optional(),operator:f.enum(["and","or"]).optional()});function De(){const[t]=he(),{page:s,name:a,operator:r}=be.parse({page:t.get("page")||void 0,name:t.get("name")||void 0,operator:t.get("operator")||void 0});return{page:s,name:a,logical_operator:r}}async function Ce(t){const s=C(E.secrets.all),a=await D(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){const r=await a.json().then(n=>n.detail).catch(()=>"Failed to create Secret");throw new k({status:a.status,statusText:a.statusText,message:r})}return a.json()}function ke(t){return A({mutationFn:async s=>Ce(s),...t})}function Ee(){const[t,s]=p.useState(!1),a=Y();if(a.isPending)return e.jsx(N,{className:"h-7 w-full"});if(a.isError)return e.jsx("div",{children:"Error loading user"});const r=a.data.id;return e.jsxs(X,{open:t,onOpenChange:s,children:[e.jsx(Z,{asChild:!0,children:e.jsxs(u,{size:"md",className:"shrink-0",intent:"primary",children:[e.jsx(q,{className:"h-5 w-5 shrink-0 fill-white"}),e.jsx("span",{children:"New Secret"})]})}),e.jsxs(T,{className:"mx-auto w-[90vw] max-w-[744px]",children:[e.jsx(P,{children:e.jsx(F,{children:"Register New Secret"})}),e.jsx(Te,{userId:r,setOpen:s})]})]})}function Te({userId:t,setOpen:s}){const{handleSubmit:a,control:r,watch:n,setValue:o,formState:{isValid:m},reset:x}=je({resolver:fe(ce),defaultValues:{secretName:"",keysValues:[{key:"",value:""}]}}),{fields:h,append:d,remove:_}=ge({control:r,name:"keysValues"}),{toast:M}=ee(),R=I(),{mutate:z}=ke({onError(i){se(i)&&M({status:"error",emphasis:"subtle",description:i.message,rounded:!0})},onSuccess(){R.invalidateQueries({queryKey:["secrets"]}),s(!1),x()}}),Q=i=>{z({user:t,name:i.secretName,values:i.keysValues.reduce((l,c)=>(c.key&&c.value&&(l[c.key]=c.value),l),{})})},B=i=>{Q(i)};return e.jsxs(e.Fragment,{children:[e.jsx("form",{id:"create-secret-form",className:"gap-5 p-5",onSubmit:a(B),children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("label",{className:"font-inter text-sm text-left font-medium leading-5",children:["Secret Name",e.jsx("span",{className:"ml-1 text-theme-text-error",children:"*"})]}),e.jsx(g,{name:"secretName",control:r,render:({field:i})=>e.jsx(j,{...i,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"})})]})]}),h.map((i,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:r,render:({field:c})=>e.jsx(j,{...c,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:r,render:({field:c})=>e.jsx(j,{...c,className:"mb-2 w-full pr-10",required:!0,placeholder:"•••••••••",type:n(`keysValues.${l}.showPassword`)?"text":"password"})}),e.jsx("button",{type:"button",onClick:()=>{const c=n(`keysValues.${l}.showPassword`);o(`keysValues.${l}.showPassword`,!c)},className:"absolute inset-y-1 right-0 flex items-center pb-1 pr-3",children:e.jsx(pe,{className:"h-4 w-4 flex-shrink-0"})})]})}),e.jsxs("div",{className:"flex items-center",children:[l===h.length-1&&e.jsx(u,{intent:"primary",emphasis:"subtle",onClick:()=>d({key:"",value:""}),className:"mb-2 flex h-7 w-7 items-center justify-center",children:e.jsx(q,{className:"flex-shrink-0 fill-primary-600"})}),l!==h.length-1&&e.jsx(u,{intent:"secondary",emphasis:"minimal",onClick:()=>_(l),className:"mb-2 h-7 w-7 items-center justify-center",children:e.jsx(L,{className:"flex-shrink-0 fill-theme-text-secondary"})})]})]},i.id))]})}),e.jsxs(O,{className:"gap-[10px]",children:[e.jsx(V,{asChild:!0,children:e.jsx(u,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(u,{intent:"primary",disabled:!m,type:"submit",form:"create-secret-form",children:"Register Secret"})]})]})}function Pe(){const t=De(),{data:s}=me({...oe.secretList({...t,sort_by:"desc:created"}),throwOnError:!0});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsx(ne,{searchParams:t}),e.jsx(Ee,{})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:s?e.jsx(te,{columns:we,data:s.items}):e.jsx(N,{className:"h-[250px] w-full"})}),s?s.total_pages>1&&e.jsx(re,{searchParams:t,paginate:s}):e.jsx(N,{className:"h-[36px] w-[300px]"})]})]})}function Xe(){return 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(Pe,{})]})}export{Xe as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as p,j as t}from"./@radix-C_LirfyT.js";import{u as F,W as Ze,L as Ue}from"./LeftSideMenu-Czev0KCA.js";import{W as D,H as O,B as E}from"./Wizard-8aJzxUjb.js";import{t as q}from"./zod-DgEcN9jD.js";import{z as y,d as Y,a5 as Ke,I as ge,B as M,aV as Ie,a_ as Qe,a$ as Ge,b0 as Ye,b1 as Je,az as Xe,b2 as et,aA as tt,aC as rt,D as st,aT as nt,L as ot,ac as it,v as at,y as ct,F as lt,E as ut,s as De,t as dt,A as ft,e as mt,at as ht,r as xt}from"./index-BacoJBEQ.js";import{a as v,C as k,u as W,F as $}from"./index.esm-COnaHLSh.js";import{S as R}from"./WizardFooter-Bt7_UE14.js";import{C as je}from"./ComponentIcon-BXgpt-jw.js";import{R as Z,a as U,s as pt,u as yt}from"./create-stack-BruqH_6X.js";import{f as gt}from"./index-B7CRNU8l.js";import{b as J,c as jt,k as Oe,h as _t}from"./@tanstack-C0SeHZng.js";import{g as vt,S as St,C as oe,P as ie}from"./ProviderRadio-D_q9tE3G.js";import{S as Ct}from"./transform-DFpKTKgF.js";import{C as L}from"./ProviderIcon-BMAn9Jld.js";import{g as bt,a as wt,D as Nt,b as Pt,z as Ft}from"./form-6aSt3tIl.js";import{s as kt}from"./sharedSchema-DyUO09BR.js";import{S as zt}from"./Lock-CRP5J_su.js";import{T as _e}from"./Tick-DDeDgTuT.js";import{s as Ee}from"./index-dCcVgFNl.js";import{C as At}from"./ComponentBadge-mw2Ja_ON.js";import{e as It}from"./components-Br2ezRib.js";import{L as Dt}from"./@react-router-BSsrkPOd.js";import"./@reactflow-D9hglKLF.js";import"./bar-chart-square-check-9siI9icm.js";import"./layout-C5dgIReC.js";import"./persist-DxiyfAax.js";import"./plus-cI8zD2xh.js";import"./trash-HKxXWbSG.js";import"./info-CyMih3vQ.js";import"./index.es-DcVFDpJU.js";import"./check-D1bHMJkL.js";import"./stack-detail-query-Bc4QKlWg.js";const Me=p.createContext(null);function Ot({children:e}){const[r,s]=p.useState({stackName:null,createdStackId:null,connectorConfig:null,fullstackResources:null,artifactStoreConfig:null,registryConfig:null,orchestratorConfig:null});return t.jsx(Me.Provider,{value:{data:r,setData:s},children:e})}function S(){const e=p.useContext(Me);if(e===null)throw new Error("useExistingInfraContext must be used within an ExistingInfraProvider");return e}const Re=p.createContext(null);function be({children:e,initialSchema:r}){const[s,n]=p.useState(r),[o,a]=p.useState({});return t.jsx(Re.Provider,{value:{schema:s,setSchema:n,defaultValues:o,setDefaultValues:a},children:e})}function X(){const e=p.useContext(Re);if(!e)throw new Error("useSchemaContext must be used within a SchemaProvider");return e}const Et=y.object({resourceId:y.string().min(1),flavor:y.string()});function Mt(){return t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(je,{type:"artifact_store",className:"h-5 w-5 fill-primary-400"}),"Select your Artifact Store"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Choose one of the storages for the new Artifact Store."})]})}var Le=Symbol.for("immer-nothing"),we=Symbol.for("immer-draftable"),g=Symbol.for("immer-state");function _(e,...r){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var z=Object.getPrototypeOf;function A(e){return!!e&&!!e[g]}function N(e){var r;return e?Te(e)||Array.isArray(e)||!!e[we]||!!((r=e.constructor)!=null&&r[we])||te(e)||re(e):!1}var Rt=Object.prototype.constructor.toString();function Te(e){if(!e||typeof e!="object")return!1;const r=z(e);if(r===null)return!0;const s=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return s===Object?!0:typeof s=="function"&&Function.toString.call(s)===Rt}function K(e,r){ee(e)===0?Reflect.ownKeys(e).forEach(s=>{r(s,e[s],e)}):e.forEach((s,n)=>r(n,s,e))}function ee(e){const r=e[g];return r?r.type_:Array.isArray(e)?1:te(e)?2:re(e)?3:0}function de(e,r){return ee(e)===2?e.has(r):Object.prototype.hasOwnProperty.call(e,r)}function Be(e,r,s){const n=ee(e);n===2?e.set(r,s):n===3?e.add(s):e[r]=s}function Lt(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}function te(e){return e instanceof Map}function re(e){return e instanceof Set}function w(e){return e.copy_||e.base_}function fe(e,r){if(te(e))return new Map(e);if(re(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const s=Te(e);if(r===!0||r==="class_only"&&!s){const n=Object.getOwnPropertyDescriptors(e);delete n[g];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){const l=o[a],u=n[l];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[l]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[l]})}return Object.create(z(e),n)}else{const n=z(e);if(n!==null&&s)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function ve(e,r=!1){return se(e)||A(e)||!N(e)||(ee(e)>1&&(e.set=e.add=e.clear=e.delete=Tt),Object.freeze(e),r&&Object.entries(e).forEach(([s,n])=>ve(n,!0))),e}function Tt(){_(2)}function se(e){return Object.isFrozen(e)}var Bt={};function P(e){const r=Bt[e];return r||_(0,e),r}var T;function Ve(){return T}function Vt(e,r){return{drafts_:[],parent_:e,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ne(e,r){r&&(P("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=r)}function me(e){he(e),e.drafts_.forEach(qt),e.drafts_=null}function he(e){e===T&&(T=e.parent_)}function Pe(e){return T=Vt(T,e)}function qt(e){const r=e[g];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function Fe(e,r){r.unfinalizedDrafts_=r.drafts_.length;const s=r.drafts_[0];return e!==void 0&&e!==s?(s[g].modified_&&(me(r),_(4)),N(e)&&(e=Q(r,e),r.parent_||G(r,e)),r.patches_&&P("Patches").generateReplacementPatches_(s[g].base_,e,r.patches_,r.inversePatches_)):e=Q(r,s,[]),me(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),e!==Le?e:void 0}function Q(e,r,s){if(se(r))return r;const n=r[g];if(!n)return K(r,(o,a)=>ke(e,n,r,o,a,s)),r;if(n.scope_!==e)return r;if(!n.modified_)return G(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const o=n.copy_;let a=o,l=!1;n.type_===3&&(a=new Set(o),o.clear(),l=!0),K(a,(u,f)=>ke(e,n,o,u,f,s,l)),G(e,o,!1),s&&e.patches_&&P("Patches").generatePatches_(n,s,e.patches_,e.inversePatches_)}return n.copy_}function ke(e,r,s,n,o,a,l){if(A(o)){const u=a&&r&&r.type_!==3&&!de(r.assigned_,n)?a.concat(n):void 0,f=Q(e,o,u);if(Be(s,n,f),A(f))e.canAutoFreeze_=!1;else return}else l&&s.add(o);if(N(o)&&!se(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Q(e,o),(!r||!r.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(s,n)&&G(e,o)}}function G(e,r,s=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ve(r,s)}function Wt(e,r){const s=Array.isArray(e),n={type_:s?1:0,scope_:r?r.scope_:Ve(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,a=Se;s&&(o=[n],a=B);const{revoke:l,proxy:u}=Proxy.revocable(o,a);return n.draft_=u,n.revoke_=l,u}var Se={get(e,r){if(r===g)return e;const s=w(e);if(!de(s,r))return $t(e,s,r);const n=s[r];return e.finalized_||!N(n)?n:n===ae(e.base_,r)?(ce(e),e.copy_[r]=pe(n,e)):n},has(e,r){return r in w(e)},ownKeys(e){return Reflect.ownKeys(w(e))},set(e,r,s){const n=qe(w(e),r);if(n!=null&&n.set)return n.set.call(e.draft_,s),!0;if(!e.modified_){const o=ae(w(e),r),a=o==null?void 0:o[g];if(a&&a.base_===s)return e.copy_[r]=s,e.assigned_[r]=!1,!0;if(Lt(s,o)&&(s!==void 0||de(e.base_,r)))return!0;ce(e),xe(e)}return e.copy_[r]===s&&(s!==void 0||r in e.copy_)||Number.isNaN(s)&&Number.isNaN(e.copy_[r])||(e.copy_[r]=s,e.assigned_[r]=!0),!0},deleteProperty(e,r){return ae(e.base_,r)!==void 0||r in e.base_?(e.assigned_[r]=!1,ce(e),xe(e)):delete e.assigned_[r],e.copy_&&delete e.copy_[r],!0},getOwnPropertyDescriptor(e,r){const s=w(e),n=Reflect.getOwnPropertyDescriptor(s,r);return n&&{writable:!0,configurable:e.type_!==1||r!=="length",enumerable:n.enumerable,value:s[r]}},defineProperty(){_(11)},getPrototypeOf(e){return z(e.base_)},setPrototypeOf(){_(12)}},B={};K(Se,(e,r)=>{B[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});B.deleteProperty=function(e,r){return B.set.call(this,e,r,void 0)};B.set=function(e,r,s){return Se.set.call(this,e[0],r,s,e[0])};function ae(e,r){const s=e[g];return(s?w(s):e)[r]}function $t(e,r,s){var o;const n=qe(r,s);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function qe(e,r){if(!(r in e))return;let s=z(e);for(;s;){const n=Object.getOwnPropertyDescriptor(s,r);if(n)return n;s=z(s)}}function xe(e){e.modified_||(e.modified_=!0,e.parent_&&xe(e.parent_))}function ce(e){e.copy_||(e.copy_=fe(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ht=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(r,s,n)=>{if(typeof r=="function"&&typeof s!="function"){const a=s;s=r;const l=this;return function(f=a,...d){return l.produce(f,c=>s.call(this,c,...d))}}typeof s!="function"&&_(6),n!==void 0&&typeof n!="function"&&_(7);let o;if(N(r)){const a=Pe(this),l=pe(r,void 0);let u=!0;try{o=s(l),u=!1}finally{u?me(a):he(a)}return Ne(a,n),Fe(o,a)}else if(!r||typeof r!="object"){if(o=s(r),o===void 0&&(o=r),o===Le&&(o=void 0),this.autoFreeze_&&ve(o,!0),n){const a=[],l=[];P("Patches").generateReplacementPatches_(r,o,a,l),n(a,l)}return o}else _(1,r)},this.produceWithPatches=(r,s)=>{if(typeof r=="function")return(l,...u)=>this.produceWithPatches(l,f=>r(f,...u));let n,o;return[this.produce(r,s,(l,u)=>{n=l,o=u}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){N(e)||_(8),A(e)&&(e=Zt(e));const r=Pe(this),s=pe(e,void 0);return s[g].isManual_=!0,he(r),s}finishDraft(e,r){const s=e&&e[g];(!s||!s.isManual_)&&_(9);const{scope_:n}=s;return Ne(n,r),Fe(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,r){let s;for(s=r.length-1;s>=0;s--){const o=r[s];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}s>-1&&(r=r.slice(s+1));const n=P("Patches").applyPatches_;return A(e)?n(e,r):this.produce(e,o=>n(o,r))}};function pe(e,r){const s=te(e)?P("MapSet").proxyMap_(e,r):re(e)?P("MapSet").proxySet_(e,r):Wt(e,r);return(r?r.scope_:Ve()).drafts_.push(s),s}function Zt(e){return A(e)||_(10,e),We(e)}function We(e){if(!N(e)||se(e))return e;const r=e[g];let s;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,s=fe(e,r.scope_.immer_.useStrictShallowCopy_)}else s=fe(e,!0);return K(s,(n,o)=>{Be(s,n,We(o))}),r&&(r.finalized_=!1),s}var j=new Ht,I=j.produce;j.produceWithPatches.bind(j);j.setAutoFreeze.bind(j);j.setUseStrictShallowCopy.bind(j);j.applyPatches.bind(j);j.createDraft.bind(j);j.finishDraft.bind(j);function Ut(){const{data:e,setData:r}=S(),{setCurrentStep:s}=F();if(!e.fullstackResources)return s(2),{handleFormSubmit:()=>{},flattenedInstances:[]};const n=e.fullstackResources.components_resources_info.artifact_store,o=n.flatMap(l=>l.accessible_by_service_connector.map(u=>({...l,value:u})));function a({flavor:l,resourceId:u}){const f=n.find(d=>d.flavor===l);f&&(r(d=>I(d,c=>{c.artifactStoreConfig={flavor:l,configuration:Object.fromEntries(Object.keys(f.required_configuration||{}).map(h=>[h,u])),service_connector_resource_id:u}})),s(d=>d+1))}return{handleFormSubmit:a,flattenedInstances:o}}function V({flavor:e,type:r,width:s=32,height:n=32,...o}){var l;const a=J({...gt.flavorList({name:e,type:r})});return a.isError?null:a.isPending?t.jsx(Y,{style:{height:`${n}px`,width:`${s}px`}}):t.jsx("img",{width:s,height:n,alt:`${e} logo`,...o,src:Ke(((l=a.data.items[0].body)==null?void 0:l.logo_url)??"")})}const Kt="artifact_store";function Qt(){const[e,r]=p.useState(""),{control:s,setValue:n,handleSubmit:o,register:a,watch:l,trigger:u,reset:f}=v(),{flattenedInstances:d,handleFormSubmit:c}=Ut(),h=d.filter(i=>i.value.toLocaleLowerCase().includes(e.toLocaleLowerCase()));return t.jsxs(t.Fragment,{children:[t.jsx(ge,{placeholder:"Search...",onChange:i=>{f(),r(i.target.value)}}),t.jsxs("form",{onSubmit:o(c),id:"artifact-store-form",children:[t.jsx("input",{type:"hidden",...a("flavor")}),t.jsx("ul",{className:"space-y-1",children:h.map(i=>t.jsx("li",{children:t.jsx(k,{name:"resourceId",control:s,render:({field:{onChange:m,...x}})=>t.jsxs(Z,{"data-state":l("resourceId")===i.value?"selected":"unselected",htmlFor:i.value,children:[t.jsx(U,{id:i.value,type:"radio",...x,onChange:C=>{n("flavor",i.flavor,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}),m(C.target.value),u()},value:i.value,name:"connector-radio"}),t.jsx(V,{type:Kt,width:24,height:24,flavor:i.flavor})," ",t.jsx("span",{children:i.value})]})})},i.value))})]})]})}function Gt(){const e=W({resolver:q(Et),shouldUnregister:!0});return t.jsx($,{...e,children:t.jsxs(D,{children:[t.jsx(O,{children:"Artifact Store"}),t.jsx(E,{children:t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsx(Mt,{}),t.jsx(Qt,{})]})}),t.jsx(R,{children:t.jsx(Yt,{})})]})})}function Yt(){const e=v();return t.jsx(M,{disabled:!e.formState.isValid,form:"artifact-store-form",size:"md",children:"Next"})}const $e=y.object({authMethod:y.string().min(1),stackName:kt});function Jt(){var h,i;const{data:e}=S(),{setCurrentStep:r}=F(),{control:s,watch:n,resetField:o}=v(),{setSchema:a,setDefaultValues:l}=X(),u=J({...Ie.serviceConnectorTypeDetail(((h=e.connectorConfig)==null?void 0:h.type)||"")});if(u.isError)return null;if(u.isPending)return t.jsx(Y,{className:"h-[40px] w-[100px]"});const f=u.data.auth_methods.filter(m=>m.auth_method!=="implicit").map(m=>({name:m.name,auth_method:m.auth_method}));if(!((i=e.connectorConfig)!=null&&i.type)){r(1);return}function d(){var Ce;const m=n("authMethod"),x=(Ce=u.data)==null?void 0:Ce.auth_methods.find(ne=>ne.auth_method===m);if(!x)return;const C=x.config_schema,b=bt(C),He=wt(C);a($e.merge(b)),l(He),Object.keys(b.shape).forEach(ne=>o(ne))}const c=e.connectorConfig.type||"";return t.jsx(k,{control:s,name:"authMethod",render:({field:{onChange:m,ref:x,...C}})=>t.jsxs(Qe,{...C,onValueChange:b=>{m(b),d()},children:[t.jsx(Ge,{className:"w-fit border border-neutral-300 text-left text-text-md",children:t.jsx(Ye,{className:"flex items-center gap-2",placeholder:"Select your Auth Method"})}),t.jsx(Je,{children:t.jsx(Xe,{viewportClassName:"max-h-[300px]",children:f.map(b=>t.jsx(et,{className:"space-x-2",value:b.auth_method,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(L,{provider:c}),t.jsx("div",{children:b.name})]})},b.auth_method))})})]})})}function Xt(){return t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(Ct,{className:"h-5 w-5 fill-primary-400"}),"Select an Authentication Method"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Connect ZenML to your resources for seamless integration of cloud services into your ML pipelines."})]}),t.jsx(Jt,{})]})}function er(){return t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(zt,{className:"h-5 w-5 fill-primary-400"}),"Add your Configuration"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Your credentials are securely stored and encrypted. ZenML uses these credentials to interact with your resources."})]}),t.jsx(tr,{})]})}function tr(){var c,h;const{data:e}=S(),{watch:r}=v(),s=J({...Ie.serviceConnectorTypeDetail(((c=e.connectorConfig)==null?void 0:c.type)||"")}),n=r("authMethod"),o=(h=s.data)==null?void 0:h.auth_methods.find(i=>i.auth_method===n);if(s.isError)return null;if(s.isPending)return t.jsx(Y,{className:"h-[200px] w-full"});if(!o)return null;const a=o.config_schema,l=a.properties||{},u=a.required||[],f=a.$defs,d=Object.entries(l).sort(([i],[m])=>u.includes(i)&&!u.includes(m)?-1:!u.includes(i)&&u.includes(m)?1:0);return t.jsx("div",{className:"space-y-5",children:d.map(([i,m])=>t.jsx(Nt,{definitions:f,isOptional:Pt(i,u),name:i,schema:m},i))})}function rr({open:e,loadingComponents:r}){var n,o;const{data:s}=S();return(n=s.connectorConfig)!=null&&n.type?t.jsx(tt,{open:e,children:t.jsxs(rt,{onPointerDownOutside:a=>a.preventDefault(),onEscapeKeyDown:a=>a.preventDefault(),className:"max-w-[600px]",children:[t.jsx("div",{className:"flex items-center justify-between border-b border-theme-border-moderate py-2 pl-5 pr-3",children:t.jsx(st,{className:"text-text-lg",children:"Connecting and loading your components..."})}),t.jsxs("div",{className:"flex h-[200px] items-center justify-center gap-5 bg-primary-50",children:[t.jsx(nt,{className:"h-[60px] w-[60px]"}),t.jsx("div",{className:"flex h-[60px] w-[60px] items-center justify-center",children:t.jsx(ot,{className:"h-5 w-5 fill-theme-text-tertiary"})}),t.jsx(L,{className:"h-[60px] w-[60px]",provider:s.connectorConfig.type})]}),t.jsxs("div",{className:"flex flex-col gap-1 px-7 pb-6 pt-5",children:[t.jsxs("p",{className:"text-theme-text-secondary",children:["We're securely connecting to ",vt(((o=s.connectorConfig)==null?void 0:o.type)||"aws")," ","and retrieving your custom components. This process typically takes about 30-60 seconds."]}),t.jsx(sr,{loadingComponents:r})]})]})}):null}function sr({loadingComponents:e}){const[r,s]=p.useState(!0),[n,o]=p.useState(!0);return p.useEffect(()=>{const a=setTimeout(()=>{s(!1)},Math.floor(Math.random()*1e3)+500),l=setTimeout(()=>{o(!1)},1500);return()=>{clearTimeout(a),clearTimeout(l)}},[]),t.jsxs("ul",{className:"mt-3 space-y-3 text-theme-text-secondary",children:[t.jsxs(ue,{children:[t.jsx(le,{loading:r}),"Establishing a secure connection"]}),t.jsxs(ue,{children:[t.jsx(le,{loading:n}),"Authenticating your account"]}),t.jsxs(ue,{children:[t.jsx(le,{loading:e}),"Fetching your existing components"]})]})}function le({loading:e}){return e?t.jsx(it,{className:"h-5 w-5 border-2"}):t.jsx(_e,{className:"h-5 w-5",tickClasses:"w-3 h-3"})}function ue({children:e}){return t.jsx("li",{className:"flex items-center gap-1",children:e})}async function nr({payload:e}){const r=ct(ut.serviceConnectors.fullStackResources),s=await at(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!s.ok){const n=await s.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Error while fetching service connector type");throw new lt({status:s.status,statusText:s.statusText,message:n})}return s.json()}function or(e){return jt({...e,mutationFn:async({payload:r})=>nr({payload:r})})}function ir(){const{setCurrentStep:e}=F(),[r,s]=p.useState(!0),{toast:n}=De(),{setData:o,data:a}=S(),l=or({onSuccess:async f=>{o(d=>I(d,c=>{c.fullstackResources=f})),s(!1),await pt(200),e(d=>d+1)},onError:f=>{n({status:"error",emphasis:"subtle",description:f.message,rounded:!0})}});return{handleFormSubmit:({authMethod:f,stackName:d,...c})=>{Object.keys(c).forEach(i=>{(c[i]===""||c[i]===null||c[i]===void 0||Array.isArray(c[i])&&c[i].length===0)&&delete c[i]});const h=I(a,i=>{i.stackName=d,i.connectorConfig&&(i.connectorConfig.auth_method=f,i.connectorConfig.configuration={...c})});o(h),h.connectorConfig&&l.mutate({payload:h.connectorConfig})},fullStackResources:l,loadingComponents:r}}function ar(){const{handleSubmit:e,formState:{isSubmitting:r}}=v(),{handleFormSubmit:s,fullStackResources:n,loadingComponents:o}=ir();return t.jsxs("form",{onSubmit:e(s),id:"connect-form",children:[t.jsx(rr,{loadingComponents:o,open:r||n.isPending}),t.jsx(Xt,{}),t.jsx(St,{}),t.jsx(er,{})]})}function cr(){const{schema:e,defaultValues:r}=X(),s=W({shouldUnregister:!0,mode:"onChange",resolver:q(e),defaultValues:{stackName:"",authMethod:"",...r}});return t.jsx($,{...s,children:t.jsxs(D,{children:[t.jsx(O,{children:"Connect to your Cloud"}),t.jsx(E,{children:t.jsx(ar,{})}),t.jsx(R,{children:t.jsx(lr,{})})]})})}function lr(){const{formState:{isValid:e,isSubmitting:r}}=v(),s=!!Oe();return t.jsx(M,{className:"justify-center gap-2",disabled:!e||s||r,form:"connect-form",size:"md",children:s||r?"Loading...":"Next"})}function ur(){const{data:e,setData:r}=S(),s=_t(),{toast:n}=De(),{setCurrentStep:o}=F(),{mutate:a}=yt({onError:d=>{d instanceof Error&&n({status:"error",emphasis:"subtle",icon:t.jsx(dt,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:d.message,rounded:!0})},onSuccess:async d=>{r(c=>I(c,h=>{h.createdStackId=d.id})),o(c=>c+1),s.invalidateQueries({queryKey:Ee.all})}});if(!e.fullstackResources)return o(2),{handleFormSubmit:()=>{},flattenedInstances:[]};const l=e.fullstackResources.components_resources_info.container_registry,u=l.flatMap(d=>d.accessible_by_service_connector.map(c=>({...d,value:c})));function f({flavor:d,resourceId:c}){const h=l.find(m=>m.flavor===d);if(!h)return;const i=I(e,m=>{m.registryConfig={flavor:d,configuration:Object.fromEntries(Object.keys(h.required_configuration||{}).map(x=>[x,c])),service_connector_resource_id:c}});r(i),a({payload:{name:i.stackName||Math.random().toString(36).substring(7),service_connectors:i.connectorConfig?[i.connectorConfig]:[],components:{orchestrator:[{...i.orchestratorConfig,service_connector_index:0}],artifact_store:[{...i.artifactStoreConfig,service_connector_index:0}],container_registry:[{...i.registryConfig,service_connector_index:0}]}}})}return{handleFormSubmit:f,flattenedInstances:u}}const dr="container_registry";function fr(){const[e,r]=p.useState(""),{control:s,setValue:n,handleSubmit:o,register:a,watch:l,trigger:u,reset:f}=v(),{flattenedInstances:d,handleFormSubmit:c}=ur(),h=d.filter(i=>i.value.toLocaleLowerCase().includes(e.toLocaleLowerCase()));return t.jsxs(t.Fragment,{children:[t.jsx(ge,{placeholder:"Search...",onChange:i=>{f(),r(i.target.value)}}),t.jsxs("form",{onSubmit:o(c),id:"artifact-store-form",children:[t.jsx("input",{type:"hidden",...a("flavor")}),t.jsx("ul",{className:"space-y-1",children:h.map(i=>t.jsx("li",{children:t.jsx(k,{name:"resourceId",control:s,render:({field:{onChange:m,...x}})=>t.jsxs(Z,{"data-state":l("resourceId")===i.value?"selected":"unselected",htmlFor:i.value,children:[t.jsx(U,{id:i.value,type:"radio",...x,onChange:C=>{n("flavor",i.flavor,{shouldValidate:!0,shouldDirty:!0,shouldTouch:!0}),m(C.target.value),u()},value:i.value,name:"connector-radio"}),t.jsx(V,{width:24,height:24,type:dr,flavor:i.flavor})," ",t.jsx("span",{children:i.value})]})})},i.value))})]})]})}function mr(){return t.jsx("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(je,{type:"container_registry",className:"h-5 w-5 fill-primary-400"}),"Select your Container Registry"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select one of the Container Registries for your new stack"})]})})}const hr=y.object({flavor:y.string().min(1),resourceId:y.string().min(1)});function xr(){const e=W({resolver:q(hr),shouldUnregister:!0});return t.jsx($,{...e,children:t.jsxs(D,{children:[t.jsx(O,{children:"Container Registry"}),t.jsx(E,{children:t.jsxs("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:[t.jsx(mr,{}),t.jsx(fr,{})]})}),t.jsx(R,{children:t.jsx(pr,{})})]})})}function pr(){const e=v(),r=!!Oe();return t.jsxs(M,{className:"justify-center gap-2",disabled:!e.formState.isValid||r,form:"artifact-store-form",size:"md",children:[r&&t.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),r?"Loading...":"Next"]})}function yr(){var a;const{data:e,setData:r}=S(),{setCurrentStep:s}=F();if(!e.fullstackResources)return s(2),{orchestrators:[],handleFormSubmit:()=>{}};const n=((a=e.fullstackResources.components_resources_info)==null?void 0:a.orchestrator)||[];function o({flavor:l,resourceId:u,...f}){const d=n.find(c=>c.flavor===l);d&&(r(c=>{const h=d!=null&&d.use_resource_value_as_fixed_config?Object.fromEntries(Object.keys(d.required_configuration||{}).map(i=>[i,u])):{...f};return I(c,i=>{i.orchestratorConfig={flavor:l,configuration:h,service_connector_resource_id:u}})}),s(c=>c+1))}return{orchestrators:n,handleFormSubmit:o}}const ye=y.object({flavor:y.string().min(1),resourceId:y.string().min(1)}),H="kubernetes",ze="orchestrator";function gr(){const{orchestrators:e,handleFormSubmit:r}=yr(),{setSchema:s}=X(),{control:n,watch:o,setValue:a,register:l,reset:u,handleSubmit:f}=v(),d=o("flavor");return t.jsxs("form",{onSubmit:f(r),id:"artifact-store-form",children:[d!==H&&t.jsx("input",{...l("resourceId"),type:"hidden"}),t.jsx("ul",{className:"space-y-1",children:e.map((c,h)=>t.jsxs("li",{children:[t.jsx(k,{control:n,name:"flavor",render:({field:{onChange:i,...m}})=>t.jsxs(Z,{"data-state":d===c.flavor?"selected":"unselected",htmlFor:c.flavor,children:[t.jsx(U,{onChange:x=>{u({flavor:c.flavor}),c.use_resource_value_as_fixed_config===!0&&s(ye),c.use_resource_value_as_fixed_config===!1&&c.required_configuration&&s(ye.merge(Ft(c.required_configuration))),c.flavor!==H&&c.accessible_by_service_connector.length>0&&a("resourceId",c.accessible_by_service_connector[0]),i(x)},...m,id:c.flavor,type:"radio",value:c.flavor,name:"orchestrator-flavor-radio"}),t.jsx(V,{width:24,height:24,type:ze,flavor:c.flavor}),t.jsx("span",{children:c.flavor_display_name})]})}),d===c.flavor&&(c.flavor===H||c.use_resource_value_as_fixed_config===!1)&&t.jsxs("div",{className:"space-y-3 py-5 pl-8",children:[c.flavor===H&&t.jsx("ul",{className:"space-y-1",children:c.accessible_by_service_connector.map(i=>t.jsx("li",{children:t.jsx(k,{control:n,name:"resourceId",render:({field:m})=>t.jsxs(Z,{"data-state":o("resourceId")===i?"selected":"unselected",htmlFor:i,children:[t.jsx(U,{...m,id:i,type:"radio",value:i,name:"instance-radio"}),t.jsx(V,{type:ze,width:24,height:24,flavor:c.flavor}),t.jsx("span",{children:i})]})})},i))}),c.use_resource_value_as_fixed_config===!1&&c.required_configuration&&Object.keys(c.required_configuration).length>=1&&t.jsx("div",{children:Object.entries(c.required_configuration).map(([i,m])=>t.jsx("div",{children:t.jsx(k,{defaultValue:"",name:i,control:n,render:({field:x})=>t.jsxs("div",{children:[t.jsx("label",{htmlFor:i,className:"text-text-sm",children:m}),t.jsx(ge,{...x,inputSize:"md",required:!0,className:"w-full",id:i})]})})},i))})]})]},h))})]})}function jr(){return t.jsx("section",{className:"space-y-5 py-5 first:pt-0 last:pb-0",children:t.jsxs("div",{className:"space-y-1",children:[t.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[t.jsx(je,{type:"orchestrator",className:"h-5 w-5 fill-primary-400"}),"Select your Orchestrator"]}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select one of the connected orchestrators for your new stack"})]})})}function _r(){const{schema:e}=X(),r=W({resolver:q(e),shouldUnregister:!0,defaultValues:{resourceId:""}});return t.jsx($,{...r,children:t.jsxs(D,{children:[t.jsx(O,{children:"Orchestrator"}),t.jsxs(E,{children:[t.jsx(jr,{}),t.jsx(gr,{})]}),t.jsx(R,{children:t.jsx(vr,{})})]})})}function vr(){const e=v();return t.jsx(M,{disabled:!e.formState.isValid,form:"artifact-store-form",size:"md",children:"Next"})}const Sr=y.object({provider:y.string().min(1)});function Cr(){var a;const{setData:e,data:r}=S(),{setCurrentStep:s}=F(),n=W({resolver:q(Sr),defaultValues:{provider:((a=r.connectorConfig)==null?void 0:a.type)||""}});function o(l){e(u=>({...u,connectorConfig:{type:l.provider,auth_method:""}})),s(u=>u+1)}return t.jsx($,{...n,children:t.jsxs(D,{children:[t.jsx(O,{children:"Select Your Existing Cloud Infrastructure"}),t.jsx(E,{children:t.jsxs("div",{className:"space-y-5",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"text-text-lg font-semibold",children:"Select a Cloud Provider"}),t.jsx("p",{className:"text-theme-text-secondary",children:"Select the cloud provider where you have existing infrastructure to connect with ZenML. This will allow you to integrate your current cloud resources with ZenML for model deployment and management."})]}),t.jsxs("form",{id:"provider-form",onSubmit:n.handleSubmit(o),className:"grid grid-cols-1 gap-3 xl:grid-cols-3",children:[t.jsx(oe,{id:"aws-provider",...n.register("provider"),value:"aws",children:t.jsx(ie,{icon:t.jsx(L,{provider:"aws",className:"h-6 w-6 shrink-0"}),title:"AWS",subtitle:"Connect your existing S3, ECR, and Sagemaker components to ZenML"})}),t.jsx(oe,{id:"gcp-provider",...n.register("provider"),value:"gcp",children:t.jsx(ie,{icon:t.jsx(L,{provider:"gcp",className:"h-6 w-6 shrink-0"}),title:"GCP",subtitle:"Link your GCS, Artifact Registry, and Vertex AI components to ZenML"})}),t.jsx(oe,{id:"azure-provider",...n.register("provider"),value:"azure",children:t.jsx(ie,{icon:t.jsx(L,{provider:"azure",className:"h-6 w-6 shrink-0"}),title:"Azure",subtitle:"Integrate ZenML with your Blob Storage, Container Registry, and Azure ML"})})]})]})}),t.jsx(R,{children:t.jsx(br,{})})]})})}function br(){const{formState:{isValid:e}}=v();return t.jsx(M,{form:"provider-form",disabled:!e,size:"md",children:"Next"})}function wr(){var o;const{data:e}=S(),r=J({...Ee.stackDetail(e.createdStackId||""),throwOnError:!0});if(r.isError)return null;if(r.isPending)return t.jsx(Y,{className:"h-[200px] w-full"});const s=r.data,n=It((o=r.data.metadata)==null?void 0:o.components);return t.jsxs(D,{children:[t.jsx(O,{children:"Your stack"}),t.jsx(E,{children:t.jsxs("div",{className:"space-y-5",children:[t.jsx("p",{className:"text-theme-text-secondary",children:"Here you can review the created stack and stack components. Now you can start running pipelines using this new configuration."}),t.jsxs("div",{className:"divide-y divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[t.jsx(Pr,{stack:s}),n.map(a=>t.jsx(Fr,{component:a},a.id))]})]})}),t.jsx(R,{displayCancel:!1,children:t.jsx(Nr,{})})]})}function Nr(){return t.jsx(M,{size:"md",asChild:!0,children:t.jsx(Dt,{to:xt.stacks.overview,children:"Finish"})})}function Pr({stack:e}){return t.jsxs("div",{className:"flex items-center gap-3 bg-theme-surface-secondary p-5 font-semibold",children:[t.jsx(_e,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),t.jsx(ft,{type:"square",size:"lg",children:t.jsx(mt,{size:"lg",children:e.name[0]})}),t.jsxs("div",{children:[t.jsx("p",{className:"text-text-lg",children:e.name}),t.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]})}function Fr({component:e}){var r,s,n,o;return t.jsxs("div",{className:"flex items-center justify-between py-3 pl-9 pr-5",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(_e,{className:"h-5 w-5",tickClasses:"w-3 h-3"}),t.jsx(V,{width:24,height:24,flavor:((r=e.body)==null?void 0:r.flavor_name)||"",type:((s=e.body)==null?void 0:s.type)||"orchestrator"}),t.jsxs("div",{children:[t.jsx("p",{className:"text-text-lg font-semibold",children:e.name}),t.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.id.split("-")[0]})]})]}),t.jsx(At,{type:((n=e.body)==null?void 0:n.type)||"alerter",children:ht((o=e.body)==null?void 0:o.type)})]},e.id)}function kr(){const{currentStep:e}=F();if(e===1)return t.jsx(Cr,{});if(e===2)return t.jsx(be,{initialSchema:$e,children:t.jsx(cr,{})});if(e===3)return t.jsx(Gt,{});if(e===4)return t.jsx(be,{initialSchema:ye,children:t.jsx(_r,{})});if(e===5)return t.jsx(xr,{});if(e===6)return t.jsx(wr,{})}const Ae=["Infrastructure Type","Cloud Provider","Connect your Cloud","Artifact Store","Orchestrator","Container Registry"];function ls(){return t.jsx(Ze,{maxSteps:Ae.length+1,initialStep:1,children:t.jsx(Ot,{children:t.jsxs("section",{className:"layout-container flex flex-col gap-5 py-5 xl:flex-row",children:[t.jsx(Ue,{entries:Ae}),t.jsx("div",{className:"w-full",children:t.jsx(kr,{})})]})})})}export{ls as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{j as o}from"./@radix-C_LirfyT.js";import{C as r,S as m}from"./StackComponentList-s7eSfm8o.js";import{a as i}from"./@react-router-BSsrkPOd.js";import"./plus-cI8zD2xh.js";import"./refresh-3EF2R7ja.js";import"./Pagination-CcDD5yHh.js";import"./index-BacoJBEQ.js";import"./@tanstack-C0SeHZng.js";import"./@reactflow-D9hglKLF.js";import"./chevron-right-double-CbRQKN4Q.js";import"./SearchField-D_0-uAPj.js";import"./index-BRhKF2z-.js";import"./DisplayDate-v3KW7oez.js";import"./expand-full-CD4fFvM-.js";import"./SheetHeader-7vwlsY_i.js";import"./Tabs-B27AHUfo.js";import"./terminal-BObrvDlO.js";import"./chevron-down-Z3nUe-0U.js";import"./transform-DFpKTKgF.js";import"./NestedCollapsible-CN9scBUn.js";import"./eye-CLNgIh_K.js";import"./CollapsibleCard-D0-pQi1n.js";import"./check-circle-mnEgPhPF.js";import"./CodeSnippet-D8iBqOVv.js";import"./all-pipeline-runs-query-gorNNEaT.js";import"./ExecutionStatus-C4tlFnlh.js";import"./help-B0CvBhCm.js";import"./index-dCcVgFNl.js";import"./stack-detail-query-Bc4QKlWg.js";import"./ComponentBadge-mw2Ja_ON.js";import"./ComponentIcon-BXgpt-jw.js";import"./bar-chart-square-check-9siI9icm.js";import"./layout-C5dgIReC.js";import"./trash-HKxXWbSG.js";import"./DeleteAlertDialog-BbyFVnVI.js";import"./zod-DgEcN9jD.js";import"./index.esm-COnaHLSh.js";import"./Infobox-DFCWPbMb.js";import"./info-CyMih3vQ.js";import"./bulk-delete-B5RTlnD_.js";function O(){const{connectorId:t}=i();return o.jsx(r,{children:o.jsx(m,{fixedQueryParams:{connector_id:t},displayCreateComponent:!1})})}export{O as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as i,j as s}from"./@radix-C_LirfyT.js";import{aA as D,aB as k,B as f,aC as z,aD as E,D as A,ax as T,s as v,aI as b,t as C,I as o,aG as B,aH as q,z as a,u as M,j as Q,d as P,A as V,e as _}from"./index-BacoJBEQ.js";import{u as S}from"./update-current-user-mutation-DSyUyHVj.js";import{h as H}from"./@tanstack-C0SeHZng.js";import{u as F}from"./index.esm-COnaHLSh.js";import{t as I}from"./zod-DgEcN9jD.js";import{P as K}from"./PasswordChecker-BZwoeQIm.js";import{u as O}from"./UpdatePasswordSchemas-Da5RndbV.js";import{D as G}from"./DisplayDate-v3KW7oez.js";import"./@react-router-BSsrkPOd.js";import"./@reactflow-D9hglKLF.js";function R(){const[e,l]=i.useState(!1);return s.jsxs(D,{onOpenChange:()=>{l(!1)},children:[s.jsx(k,{asChild:!0,children:s.jsx(f,{size:"md",className:"shrink-0",intent:"primary",emphasis:"subtle",children:"Change Password"})}),s.jsxs(z,{children:[s.jsx(E,{children:s.jsx(A,{children:" Update Credentials"})}),e?s.jsx(L,{}):s.jsx(J,{setSuccess:l})]})]})}function J({setSuccess:e}){var u;const l=i.useId(),d=i.useId(),n=i.useId(),{toast:x}=v(),{mutate:p,isPending:j}=S({onSuccess(){e(!0)},onError(t){b(t)&&x({status:"error",emphasis:"subtle",icon:s.jsx(C,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:t.message,rounded:!0})}}),{register:c,handleSubmit:m,watch:w,formState:{isValid:N,errors:y}}=F({resolver:I(O),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(K,{val:w("newPassword"),errors:h||[]})]}),s.jsxs(B,{className:"gap-[10px]",children:[s.jsx(q,{asChild:!0,children:s.jsx(f,{size:"sm",intent:"secondary",children:"Cancel"})}),s.jsx(f,{disabled:!N||j,form:"update-password-form",size:"sm",children:"Update Password"})]})]})}function L(){return s.jsxs("div",{className:"space-y-5 p-7 text-center",children:[s.jsx(T,{className:"mx-auto h-[110px] w-[110px] fill-success-500"}),s.jsx("p",{className:"text-text-lg font-semibold text-theme-text-primary",children:"The password was updated successfully!"})]})}const W=a.object({fullName:a.union([a.string(),a.literal("")]),username:a.union([a.string(),a.literal("")]),email:a.union([a.string().email(),a.literal("")])}).refine(e=>e.fullName!==""||e.username!==""||e.email!=="");function X({user:e}){var h,u,t;const l=H(),{toast:d}=v(),n=i.useId(),x=i.useId(),p=i.useId(),{isPending:j,mutate:c}=S({onError(r){b(r)&&d({status:"error",emphasis:"subtle",icon:s.jsx(C,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:r.message,rounded:!0})},onSuccess:()=>{l.invalidateQueries({queryKey:["current-user"]}),l.invalidateQueries({queryKey:["users"]}),w(),d({status:"success",emphasis:"subtle",rounded:!0,description:"User updated successfully"})}}),{register:m,reset:w,handleSubmit:N,formState:{isValid:y}}=F({resolver:I(W),defaultValues:{email:void 0,fullName:void 0,username:void 0}});function g(r){const U={...r.fullName&&{full_name:r.fullName},...r.username&&{name:r.username},...r.email&&{email:r.email}};c(U)}return s.jsxs("div",{className:"w-full max-w-[600px]",children:[s.jsx("form",{onSubmit:N(g),children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:n,className:"text-text-sm",children:"Full Name"}),s.jsx(o,{placeholder:(h=e.body)==null?void 0:h.full_name,...m("fullName"),id:n,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:x,className:"text-text-sm",children:"Username"}),s.jsx(o,{...m("username"),placeholder:e.name,id:x,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:p,className:"text-text-sm",children:"Email"}),s.jsx(o,{placeholder:((u=e.metadata)==null?void 0:u.email)??void 0,...m("email"),id:p,className:"w-full"})]}),s.jsx("div",{className:"flex justify-end",children:s.jsx(f,{disabled:j||!y,size:"md",intent:"primary",children:"Update"})})]})}),s.jsx(R,{}),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 ds(){const{data:e}=M();return s.jsxs(Q,{className:"flex flex-col gap-5 p-5",children:[s.jsx("h1",{className:"text-text-xl font-semibold",children:"Profile"}),s.jsxs("div",{className:"flex justify-between",children:[e?s.jsx(X,{user:e}):s.jsx(P,{className:"h-[350px] w-full"}),e?s.jsx(V,{size:"xxl",className:"ml-5 h-[140px] w-[140px]",type:"rounded",children:s.jsx(_,{className:"text-display-lg",size:"xxl",children:e.name[0]})}):s.jsx(P,{className:"h-[140px] w-[140px] rounded-rounded"})]})]})}export{ds as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as i,j as s}from"./@radix-C_LirfyT.js";import{z as t,q as g,s as N,I as c,B as w,r as v,t as y,j as b}from"./index-BacoJBEQ.js";import{u as S}from"./login-mutation-CidpsqyH.js";import{t as I}from"./zod-DgEcN9jD.js";import{u as L}from"./index.esm-COnaHLSh.js";import{c as F,f as P}from"./@react-router-BSsrkPOd.js";import"./@tanstack-C0SeHZng.js";import"./@reactflow-D9hglKLF.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:f}}=L({resolver:I(E),defaultValues:{username:x}}),h=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||v.projects.overview)}});function j(e){h.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:!f,className:"w-full text-center",size:"md",children:s.jsx("span",{className:"w-full",children:"Login"})})]})}function T(){return s.jsxs(b,{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{T as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as m,j as e}from"./@radix-C_LirfyT.js";import{v as S,y as D,F as C,E as w,aA as Q,aB as $,B as h,aC as _,aD as J,D as V,s as O,I as k,N as g,aG as G,aH as U,aI as A,G as P,H as Y,Y as W,aJ as Z,b8 as X,aK as ee,b9 as te,aM as se,aF as ne,J as ae,K as re,L as ce,M as ie,r as T,j as I,W as oe,d as F}from"./index-BacoJBEQ.js";import{P as le}from"./Pagination-CcDD5yHh.js";import{S as ue}from"./SearchField-D_0-uAPj.js";import{s as f,c as de,A as me,u as xe,a as R,b as he}from"./service-B9aVzfAF.js";import{c as b,h as N,b as pe}from"./@tanstack-C0SeHZng.js";import{t as fe}from"./zod-DgEcN9jD.js";import{u as je,F as ye,a as ve,C as v}from"./index.esm-COnaHLSh.js";import{S as q}from"./trash-HKxXWbSG.js";import{D as E,a as H}from"./DeleteAlertDialog-BbyFVnVI.js";import{c as ge,u as Ae}from"./bulk-delete-B5RTlnD_.js";import{S as Se}from"./Lock-CRP5J_su.js";import{L as K}from"./@react-router-BSsrkPOd.js";import{A as De}from"./AlertDialogDropdownItem-druRNuO2.js";import"./@reactflow-D9hglKLF.js";import"./chevron-right-double-CbRQKN4Q.js";import"./index-BRhKF2z-.js";import"./CodeSnippet-D8iBqOVv.js";import"./Infobox-DFCWPbMb.js";import"./info-CyMih3vQ.js";import"./Tick-DDeDgTuT.js";import"./check-D1bHMJkL.js";async function Ce({body:t}){const s=D(w.serviceAccounts.all),n=await S(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const r=await n.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>"Failed to create service account");throw new C({status:n.status,statusText:n.statusText,message:r})}return n.json()}function we(t){return b({...t,mutationFn:async s=>Ce({body:s})})}function M({isFallback:t}){const[s,n]=m.useState(!1),[r,a]=m.useState(""),i=N(),u=je({resolver:fe(de),defaultValues:{name:"",description:"",createDefault:!1}}),l=!!r&&u.watch("createDefault");function d(){return l?e.jsx(me,{value:r}):e.jsx(be,{isFallback:t,setApiKeyValue:a,setOpen:n})}return e.jsx(ye,{...u,children:e.jsxs(Q,{open:s,onOpenChange:o=>{t&&!o&&i.invalidateQueries({queryKey:f.serviceAccountsKey()}),n(o),a(""),u.reset()},children:[e.jsx($,{asChild:!0,children:e.jsx(h,{className:"shrink-0",size:"sm",intent:"primary",children:"Add service account"})}),e.jsxs(_,{"data-success":l,className:"mx-auto overflow-x-auto transition-none data-[success=true]:max-w-[800px]",children:[e.jsx(J,{children:e.jsx(V,{children:"Add service account"})}),d()]})]})})}function be({setApiKeyValue:t,setOpen:s,isFallback:n}){const{watch:r,handleSubmit:a,control:i,formState:{isValid:u}}=ve(),{toast:l}=O(),d=N(),{mutate:o}=we({onError(c){A(c)&&l({status:"error",emphasis:"subtle",description:c.message,rounded:!0})},async onSuccess(c){if(l({description:"The service account has been added successfully.",status:"success",emphasis:"subtle",rounded:!0}),r("createDefault")){x(c.id);return}d.invalidateQueries({queryKey:f.serviceAccountsKey()}),s(!1)}}),{mutate:p}=xe({onSuccess(c){var y;n||d.invalidateQueries({queryKey:f.serviceAccountsKey()}),t(((y=c.body)==null?void 0:y.key)||"")},onError(c){A(c)&&l({status:"error",emphasis:"subtle",description:c.message,rounded:!0})}}),x=c=>{p({serviceAccountId:c,body:{name:"default",description:"Default api key"}})},B=c=>{o({name:c.name,description:c.description,active:!0})};return e.jsxs(e.Fragment,{children:[e.jsxs("form",{id:"create-secret-form",className:"space-y-5 p-7",onSubmit:a(B),children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{className:"font-inter text-sm text-left font-medium leading-5",children:"Name:"}),e.jsx(v,{name:"name",control:i,render:({field:c})=>e.jsx(k,{...c,className:"w-full",required:!0,placeholder:"Add name"})})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{className:"font-inter text-sm text-left font-medium leading-5",children:"Description:"}),e.jsx(v,{name:"description",control:i,render:({field:c})=>e.jsx(k,{...c,className:"w-full",placeholder:"Add description"})})]}),e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(v,{control:i,name:"createDefault",render:({field:{onChange:c,value:y}})=>e.jsx(g,{checked:y,id:"default-key",onCheckedChange:L=>c(!!L)})}),e.jsx("label",{htmlFor:"default-key",children:"Create a default API Key"})]}),e.jsx("p",{className:"pl-[30px] text-text-xs text-theme-text-secondary",children:"This will include a default API Key for your service account."})]})]}),e.jsxs(G,{className:"gap-[10px]",children:[e.jsx(U,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{intent:"primary",size:"sm",disabled:!u,type:"submit",form:"create-secret-form",children:"Add service account"})]})]})}async function Ne(t){const s=D(w.serviceAccounts.detail(t)),n=await S(s,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(!n.ok){const r=await n.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>`Failed to delete service account ${t}`);throw new C({status:n.status,statusText:n.statusText,message:r})}return n.json()}function ke(t){return b({...t,mutationFn:async s=>{await Ne(s)}})}const{ContextProvider:Te,useContext:j}=ge();function z(){const{setRowSelection:t}=j(),{mutateAsync:s}=ke();async function n(r){await s(r)}return Ae({deleteFn:n,queryKeyToInvalidate:f.serviceAccountsKey(),setRowSelection:t})}function Fe(){const[t,s]=m.useState(!1),{selectedRowCount:n,selectedRowIDs:r}=j(),{bulkDelete:a}=z();async function i(){await a(r),s(!1)}return e.jsxs(P,{open:t,onOpenChange:s,children:[e.jsx(Y,{asChild:!0,children:e.jsxs(h,{className:"rounded-sharp border-y-0 bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(q,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(E,{title:`Delete Service Account${n>=2?"s":""}`,handleDelete:i,children:e.jsxs(H,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function Ke(){const{selectedRowCount:t}=j();return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:`${t} Service Account${t>1?"s":""} selected`}),e.jsx(Fe,{})]})}async function Oe({body:t,serviceAccountId:s}){const n=D(w.serviceAccounts.detail(s)),r=await S(n,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(r.status===404&&W(),!r.ok){const a=await r.json().then(i=>Array.isArray(i.detail)?i.detail[1]:i.detail).catch(()=>`Failed to update service account ${s}`);throw new C({status:r.status,statusText:r.statusText,message:a})}return r.json()}function Pe(t){return b({...t,mutationFn:async({serviceAccountId:s,body:n})=>Oe({serviceAccountId:s,body:n})})}function Ie({isActive:t,serviceAccountId:s}){const{toast:n}=O(),r=N(),[a,i]=m.useState(!1),{mutate:u}=Pe({onError(o){A(o)&&n({status:"error",emphasis:"subtle",description:o.message,rounded:!0})},onSuccess(){r.invalidateQueries({queryKey:f.serviceAccountsKey()})}});function l(o){o?d(o):i(!0)}async function d(o){u({serviceAccountId:s,body:{active:o}})}return e.jsxs(e.Fragment,{children:[e.jsx(P,{open:a,onOpenChange:i,children:e.jsxs(Z,{children:[e.jsx(X,{children:e.jsx(ee,{children:"Deactivate Service Account"})}),e.jsxs("div",{className:"p-5 text-text-md text-theme-text-secondary",children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"You won't be able to use any API keys of this service account to authenticate with the server anymore."})]}),e.jsxs(te,{className:"gap-[10px]",children:[e.jsx(se,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{onClick:()=>d(!1).then(o=>i(!1)),intent:"primary",type:"button",children:"Deactivate"})]})]})}),e.jsx(ne,{checked:t,onCheckedChange:l})]})}function Re({serviceAccountId:t}){const[s,n]=m.useState(!1),[r,a]=m.useState(!1),{bulkDelete:i}=z(),u=m.useRef(null),l=m.useRef(null);function d(){l.current=u.current}async function o(){await i([t]),p(!1)}function p(x){if(x===!1){n(!1),setTimeout(()=>{a(x)},200);return}a(x)}return e.jsxs(ae,{onOpenChange:n,open:s,children:[e.jsx(re,{ref:u,children:e.jsx(ce,{className:"h-5 w-5 fill-theme-text-secondary"})}),e.jsx(ie,{hidden:r,onCloseAutoFocus:x=>{l.current&&(l.current.focus(),l.current=null,x.preventDefault())},align:"end",sideOffset:7,children:e.jsx(De,{onSelect:d,open:r,onOpenChange:p,triggerChildren:"Delete",icon:e.jsx(q,{fill:"red"}),children:e.jsx(E,{title:"Delete Service Account",handleDelete:o,children:e.jsxs(H,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})})]})}function qe(){return[{id:"select",meta:{width:"1%"},header:({table:t})=>e.jsx(g,{id:"check-all",checked:t.getIsAllRowsSelected(),onCheckedChange:s=>t.toggleAllRowsSelected(s==="indeterminate"?!0:s)}),cell:({row:t})=>e.jsx(g,{id:`check-${t.id}`,checked:t.getIsSelected(),onCheckedChange:t.getToggleSelectedHandler()})},{id:"service-account",header:"Service Account",accessorFn:t=>t.name,cell:({row:t})=>{var s;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Se,{className:"h-5 w-5 flex-shrink-0 fill-primary-400"}),e.jsxs("div",{className:"group/copybutton flex flex-col",children:[e.jsx("div",{className:"flex flex-row items-center space-x-1",children:e.jsx("div",{className:"flex items-center space-x-1",children:e.jsx(K,{className:"text-text-md font-semibold text-theme-text-primary",to:T.settings.service_accounts.detail(t.original.id),children:t.original.name})})}),e.jsx("div",{className:"flex items-center gap-1",children:e.jsx(K,{className:"flex items-center gap-1 text-text-sm text-theme-text-secondary",to:T.settings.service_accounts.detail(t.original.id),children:(s=t.original.metadata)==null?void 0:s.description})})]})]})}},{id:"active",header:"Active",accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.active},cell:({row:t})=>{var s;return e.jsx(Ie,{isActive:!!((s=t.original.body)!=null&&s.active),serviceAccountId:t.original.id})}},{id:"actions",meta:{width:"5%"},header:"",cell:({row:t})=>e.jsx("div",{className:"flex items-center justify-end",children:e.jsx(Re,{serviceAccountId:t.original.id})})}]}function Ee(){return e.jsxs(I,{className:"flex flex-col items-center justify-center space-y-4 p-9",children:[e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold text-theme-text-primary",children:"There are no service accounts yet."}),e.jsx("p",{className:"text-theme-text-secondary",children:"Create your first one now to automate your processes securely with ZenML."})]}),e.jsx(M,{isFallback:!0})]})}function He(){const t=R(),{rowSelection:s,setRowSelection:n}=j(),r=m.useMemo(()=>qe(),[]),{data:a}=pe({...he.serviceAccountList({...t,sort_by:"desc:created",hydrate:!0})});return a&&a.items.length<1&&!t.name?e.jsx(Ee,{}):e.jsxs(e.Fragment,{children:[e.jsx(Me,{}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:a?e.jsx(oe,{getRowId:i=>i.id,rowSelection:s,onRowSelectionChange:n,columns:r,data:a.items}):e.jsx(F,{className:"h-[500px] w-full"})}),a?a.total_pages>1&&e.jsx(le,{searchParams:t,paginate:a}):e.jsx(F,{className:"h-[36px] w-[300px]"})]})]})}function Me(){const t=R(),{selectedRowCount:s}=j();return e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[s?e.jsx(Ke,{}):e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(ue,{searchParams:t})}),e.jsx(M,{isFallback:!1})]})}function lt(){return e.jsxs(I,{className:"space-y-4 p-5",children:[e.jsx(ze,{}),e.jsx(Te,{children:e.jsx(He,{})})]})}function ze(){return e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Service Accounts"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Configure automated access for background tasks and integrations."}),e.jsx("a",{target:"_blank",rel:"noreferrer noopener",href:"https://docs.zenml.io/how-to/project-setup-and-management/connecting-to-zenml/connect-with-a-service-account",className:"link text-text-sm text-primary-400",children:"Learn More"})]})]})}export{lt as default};
|