zenml-nightly 0.75.0.dev20250317__py3-none-any.whl → 0.80.0.dev20250321__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/__init__.py +3 -1
- zenml/artifacts/artifact_config.py +2 -2
- zenml/artifacts/utils.py +4 -8
- zenml/cli/__init__.py +6 -6
- zenml/cli/base.py +2 -2
- zenml/cli/login.py +2 -2
- zenml/cli/server.py +6 -4
- zenml/cli/utils.py +3 -3
- zenml/client.py +9 -9
- zenml/config/compiler.py +1 -1
- zenml/config/server_config.py +1 -1
- zenml/constants.py +2 -1
- zenml/enums.py +12 -0
- zenml/integrations/airflow/__init__.py +0 -2
- zenml/integrations/argilla/__init__.py +0 -1
- zenml/integrations/aws/__init__.py +0 -3
- zenml/integrations/azure/__init__.py +0 -2
- zenml/integrations/azure/service_connectors/azure_service_connector.py +1 -1
- zenml/integrations/bentoml/__init__.py +0 -2
- zenml/integrations/bentoml/services/bentoml_container_deployment.py +2 -2
- zenml/integrations/bentoml/services/bentoml_local_deployment.py +1 -1
- zenml/integrations/bentoml/steps/bentoml_deployer.py +1 -1
- zenml/integrations/bitbucket/__init__.py +0 -2
- zenml/integrations/comet/__init__.py +0 -2
- zenml/integrations/databricks/__init__.py +0 -2
- zenml/integrations/databricks/services/databricks_deployment.py +3 -1
- zenml/integrations/deepchecks/__init__.py +0 -2
- zenml/integrations/discord/__init__.py +0 -2
- zenml/integrations/evidently/__init__.py +0 -2
- zenml/integrations/facets/__init__.py +0 -2
- zenml/integrations/feast/__init__.py +0 -2
- zenml/integrations/gcp/__init__.py +0 -3
- zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +5 -0
- zenml/integrations/github/__init__.py +0 -2
- zenml/integrations/github/code_repositories/github_code_repository.py +10 -3
- zenml/integrations/gitlab/__init__.py +0 -1
- zenml/integrations/gitlab/code_repositories/gitlab_code_repository.py +5 -2
- zenml/integrations/great_expectations/__init__.py +0 -3
- zenml/integrations/huggingface/__init__.py +0 -1
- zenml/integrations/huggingface/services/huggingface_deployment.py +3 -1
- zenml/integrations/hyperai/__init__.py +0 -2
- zenml/integrations/kaniko/__init__.py +0 -2
- zenml/integrations/kubeflow/__init__.py +0 -1
- zenml/integrations/kubeflow/orchestrators/kubeflow_orchestrator.py +6 -0
- zenml/integrations/kubernetes/__init__.py +0 -2
- zenml/integrations/kubernetes/flavors/kubernetes_orchestrator_flavor.py +4 -0
- zenml/integrations/kubernetes/orchestrators/kube_utils.py +89 -1
- zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator.py +82 -48
- zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator_entrypoint.py +44 -10
- zenml/integrations/kubernetes/orchestrators/manifest_utils.py +45 -1
- zenml/integrations/kubernetes/pod_settings.py +52 -0
- zenml/integrations/label_studio/__init__.py +0 -2
- zenml/integrations/langchain/__init__.py +0 -2
- zenml/integrations/lightgbm/__init__.py +0 -1
- zenml/integrations/lightning/__init__.py +0 -2
- zenml/integrations/mlflow/__init__.py +1 -3
- zenml/integrations/mlflow/services/mlflow_deployment.py +1 -1
- zenml/integrations/modal/__init__.py +0 -1
- zenml/integrations/neptune/__init__.py +0 -2
- zenml/integrations/neural_prophet/__init__.py +0 -2
- zenml/integrations/numpy/__init__.py +0 -2
- zenml/integrations/openai/__init__.py +0 -1
- zenml/integrations/pandas/__init__.py +0 -2
- zenml/integrations/pigeon/__init__.py +0 -1
- zenml/integrations/pillow/__init__.py +0 -3
- zenml/integrations/polars/__init__.py +0 -2
- zenml/integrations/prodigy/__init__.py +0 -1
- zenml/integrations/pycaret/__init__.py +0 -2
- zenml/integrations/pytorch/__init__.py +0 -1
- zenml/integrations/pytorch_lightning/__init__.py +0 -2
- zenml/integrations/s3/__init__.py +0 -2
- zenml/integrations/scipy/__init__.py +0 -2
- zenml/integrations/seldon/__init__.py +0 -2
- zenml/integrations/seldon/services/seldon_deployment.py +3 -2
- zenml/integrations/sklearn/__init__.py +1 -1
- zenml/integrations/skypilot/orchestrators/skypilot_base_vm_orchestrator.py +43 -18
- zenml/integrations/skypilot_aws/__init__.py +1 -3
- zenml/integrations/skypilot_azure/__init__.py +1 -2
- zenml/integrations/skypilot_gcp/__init__.py +1 -3
- zenml/integrations/skypilot_kubernetes/__init__.py +1 -3
- zenml/integrations/skypilot_lambda/__init__.py +1 -3
- zenml/integrations/slack/__init__.py +0 -1
- zenml/integrations/spark/__init__.py +0 -1
- zenml/integrations/tekton/__init__.py +0 -1
- zenml/integrations/tekton/orchestrators/tekton_orchestrator.py +5 -0
- zenml/integrations/tensorboard/__init__.py +0 -2
- zenml/integrations/tensorboard/services/tensorboard_service.py +1 -1
- zenml/integrations/tensorflow/__init__.py +0 -2
- zenml/integrations/vllm/__init__.py +0 -1
- zenml/integrations/vllm/services/vllm_deployment.py +1 -1
- zenml/integrations/wandb/__init__.py +0 -1
- zenml/integrations/whylogs/__init__.py +0 -1
- zenml/integrations/xgboost/__init__.py +0 -2
- zenml/login/credentials.py +1 -1
- zenml/login/pro/utils.py +1 -0
- zenml/materializers/__init__.py +1 -0
- zenml/model_deployers/base_model_deployer.py +1 -1
- zenml/models/__init__.py +4 -0
- zenml/models/v2/base/filter.py +162 -54
- zenml/models/v2/base/scoped.py +132 -0
- zenml/models/v2/core/artifact_version.py +12 -33
- zenml/models/v2/core/model_version.py +12 -50
- zenml/models/v2/core/pipeline_run.py +12 -32
- zenml/models/v2/core/service.py +2 -2
- zenml/models/v2/core/step_run.py +15 -32
- zenml/{services/service_type.py → models/v2/misc/service.py} +1 -1
- zenml/orchestrators/step_run_utils.py +1 -1
- zenml/orchestrators/utils.py +1 -1
- zenml/services/__init__.py +3 -5
- zenml/services/container/container_service.py +2 -1
- zenml/services/local/local_service.py +2 -1
- zenml/services/service.py +3 -2
- zenml/services/service_endpoint.py +2 -1
- zenml/services/service_monitor.py +1 -1
- zenml/services/service_status.py +1 -12
- zenml/steps/entrypoint_function_utils.py +1 -1
- zenml/utils/dashboard_utils.py +73 -8
- zenml/utils/server_utils.py +52 -0
- zenml/zen_server/dashboard/assets/{404-BbAvjc7Z.js → 404-2I8egBQu.js} +1 -1
- zenml/zen_server/dashboard/assets/@reactflow-BHoFKFSZ.js +17 -0
- zenml/zen_server/dashboard/assets/{AlertDialogDropdownItem-XL2NfFgP.js → AlertDialogDropdownItem-D7KZcPFw.js} +1 -1
- zenml/zen_server/dashboard/assets/CodeSnippet-DUkCnBpQ.js +9 -0
- zenml/zen_server/dashboard/assets/{CollapsibleCard-Djtd_ocf.js → CollapsibleCard-B5-5Plnd.js} +1 -1
- zenml/zen_server/dashboard/assets/{Commands-V-hH_IKQ.js → Commands-CbOMmarC.js} +1 -1
- zenml/zen_server/dashboard/assets/{ComponentBadge-CVN2FsiW.js → ComponentBadge-FrujKBC6.js} +1 -1
- zenml/zen_server/dashboard/assets/ComponentIcon-Dx5fBrDX.js +1 -0
- zenml/zen_server/dashboard/assets/{CsvVizualization-CWaQcWIN.js → CsvVizualization-B8E3p9we.js} +1 -1
- zenml/zen_server/dashboard/assets/{DeleteAlertDialog-CTLRrcFM.js → DeleteAlertDialog-BgTZbbAt.js} +1 -1
- zenml/zen_server/dashboard/assets/{DialogItem-ST291Hsl.js → DialogItem-CNWLiJcc.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-CIBjAdSc.js → Error-BkUP4Luv.js} +1 -1
- zenml/zen_server/dashboard/assets/ExecutionStatus-CD8Vj7sp.js +1 -0
- zenml/zen_server/dashboard/assets/{Helpbox-cwQNH06F.js → Helpbox-DIx6mDOH.js} +1 -1
- zenml/zen_server/dashboard/assets/{Infobox-DYKoAVhW.js → Infobox-BHEdNmME.js} +1 -1
- zenml/zen_server/dashboard/assets/{InlineAvatar-Bk4QLPTU.js → InlineAvatar-Bin9UPKJ.js} +1 -1
- zenml/zen_server/dashboard/assets/{NestedCollapsible-CE4OF670.js → NestedCollapsible-Da-k0Mff.js} +1 -1
- zenml/zen_server/dashboard/assets/{Partials-cL1-u_sT.js → Partials-TNaYjHsV.js} +1 -1
- zenml/zen_server/dashboard/assets/ProBadge-BfPp-B97.js +1 -0
- zenml/zen_server/dashboard/assets/{ProCta-DtUutIul.js → ProCta-7_FtpX3I.js} +1 -1
- zenml/zen_server/dashboard/assets/ProviderIcon-CxeziA5a.js +1 -0
- zenml/zen_server/dashboard/assets/{ProviderRadio-C4bltH6-.js → ProviderRadio-DPmZHff_.js} +1 -1
- zenml/zen_server/dashboard/assets/RunSelector-BVKB4Z8F.js +1 -0
- zenml/zen_server/dashboard/assets/{RunsBody-D2VoO-cR.js → RunsBody-Cj4sIqQB.js} +1 -1
- zenml/zen_server/dashboard/assets/{SearchField-DfNxVtjV.js → SearchField-DjAOZic5.js} +1 -1
- zenml/zen_server/dashboard/assets/SecretTooltip-mMAAP4dM.js +1 -0
- zenml/zen_server/dashboard/assets/{SetPassword-CWl2mwz8.js → SetPassword-B0o5kSJU.js} +1 -1
- zenml/zen_server/dashboard/assets/{StackList-C8KNd00o.js → StackList-5UB8LoEq.js} +1 -1
- zenml/zen_server/dashboard/assets/{Tabs-BEWDPvPV.js → Tabs-AuhCyzle.js} +1 -1
- zenml/zen_server/dashboard/assets/Tick-CHW0jc8Y.js +1 -0
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-DCuCj7NK.js → UpdatePasswordSchemas-Bauivjf-.js} +1 -1
- zenml/zen_server/dashboard/assets/{UsageReason-CwUrEwEz.js → UsageReason-Dr5ca5M4.js} +1 -1
- zenml/zen_server/dashboard/assets/{Wizard-CynnoHg4.js → Wizard-XEp9rGmf.js} +1 -1
- zenml/zen_server/dashboard/assets/{WizardFooter-B2bYs89C.js → WizardFooter-BtL1Gi1k.js} +1 -1
- zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-B509kMlL.js → all-pipeline-runs-query-COvsm3bC.js} +1 -1
- zenml/zen_server/dashboard/assets/configuration-form-BJUCr0wl.js +1 -0
- zenml/zen_server/dashboard/assets/{create-stack-BjWXz5nx.js → create-stack-B2c98UlP.js} +1 -1
- zenml/zen_server/dashboard/assets/{delete-run-CzPWbsBy.js → delete-run-Do3XyF4W.js} +1 -1
- zenml/zen_server/dashboard/assets/flavor-select-D8CranSY.js +1 -0
- zenml/zen_server/dashboard/assets/{form-schemas-B6u3P_a4.js → form-schemas-Bm-dTV3L.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-BCKg1Y5r.css → index-6mLFgFwe.css} +1 -1
- zenml/zen_server/dashboard/assets/{index-Bjeu4_0O.js → index-CzhJC6pc.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-CaRx22lH.js → index-D-n6tspq.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-DWoLoYDY.js → index-DPjvk73v.js} +8 -8
- zenml/zen_server/dashboard/assets/{index-Dba8yULY.js → index-eIIP-0dQ.js} +1 -1
- zenml/zen_server/dashboard/assets/login-mutation-D6uiKsKk.js +1 -0
- zenml/zen_server/dashboard/assets/{not-found-DGQ8rm7B.js → not-found-DFrksY0r.js} +1 -1
- zenml/zen_server/dashboard/assets/page-B-uHUFcm.js +1 -0
- zenml/zen_server/dashboard/assets/page-B0Llmzo_.js +1 -0
- zenml/zen_server/dashboard/assets/page-B150LbzG.js +1 -0
- zenml/zen_server/dashboard/assets/{page-CfeQbejg.js → page-B1Un9vAU.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CxrLV30P.js → page-B80TE04v.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BIseZTJt.js +2 -0
- zenml/zen_server/dashboard/assets/{page-C5xq6rqE.js → page-BJ15SGwt.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-B6msmF1h.js → page-BJrZsPSh.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BMZaECzB.js +1 -0
- zenml/zen_server/dashboard/assets/{page-D1upvSPi.js → page-BTvnIFGR.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DLw1Apss.js → page-BXh1mF-D.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BZUxCBoD.js +1 -0
- zenml/zen_server/dashboard/assets/page-BeFiRx31.js +1 -0
- zenml/zen_server/dashboard/assets/{page-C89bN6VV.js → page-BnUwQBeg.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-k-UXKVnV.js → page-BqQ6y8Hb.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BwAFqFCf.js +1 -0
- zenml/zen_server/dashboard/assets/page-BzlVs5tC.js +1 -0
- zenml/zen_server/dashboard/assets/{page-C3BbJ-5n.js → page-C11vPVkH.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-AnG2ilmi.js → page-CAKBSE9f.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CPe9nQSo.js +1 -0
- zenml/zen_server/dashboard/assets/page-D0Zt2-7X.js +1 -0
- zenml/zen_server/dashboard/assets/page-D2F0Rvak.js +1 -0
- zenml/zen_server/dashboard/assets/{page-2EzZ5aWS.js → page-D5GZlpKq.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CxoG4zme.js → page-DBNBYSwq.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DDvwWgKP.js +6 -0
- zenml/zen_server/dashboard/assets/page-DF9q7ySu.js +1 -0
- zenml/zen_server/dashboard/assets/page-DOzFoJuo.js +1 -0
- zenml/zen_server/dashboard/assets/page-DaHH2ZEF.js +1 -0
- zenml/zen_server/dashboard/assets/{page-B9ELcPAy.js → page-Dd-0y3SU.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-Dy6HYsJr.js → page-DhNnHHmX.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CZ_3LB0U.js → page-DkJfgcDi.js} +1 -1
- zenml/zen_server/dashboard/assets/page-EhqRFAZc.js +1 -0
- zenml/zen_server/dashboard/assets/{page-nHAZvd76.js → page-NIWnUdVg.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DazwBcbq.js → page-kYlFrH53.js} +1 -1
- zenml/zen_server/dashboard/assets/page-ygCPGHAV.js +1 -0
- zenml/zen_server/dashboard/assets/{persist-BglceT_t.js → persist-C5RlwSq6.js} +1 -1
- zenml/zen_server/dashboard/assets/{persist-CMkLV2Cs.js → persist-DHGuHP2H.js} +1 -1
- zenml/zen_server/dashboard/assets/{service-DNKY_ZYd.js → service-Do7yitqe.js} +1 -1
- zenml/zen_server/dashboard/assets/{sharedSchema-BOmQa793.js → sharedSchema-i_9Y4WcA.js} +1 -1
- zenml/zen_server/dashboard/assets/stack-detail-query-omCumL7U.js +1 -0
- zenml/zen_server/dashboard/assets/update-server-settings-mutation-B4eE33z-.js +1 -0
- zenml/zen_server/dashboard/index.html +4 -4
- zenml/zen_server/deploy/daemon/daemon_zen_server.py +1 -1
- zenml/zen_server/deploy/deployment.py +1 -2
- zenml/zen_server/deploy/docker/docker_zen_server.py +1 -1
- zenml/zen_server/rbac/endpoint_utils.py +1 -2
- zenml/zen_server/routers/projects_endpoints.py +14 -3
- zenml/zen_server/utils.py +2 -86
- zenml/zen_stores/migrations/versions/0.80.0_release.py +23 -0
- zenml/zen_stores/schemas/artifact_visualization_schemas.py +1 -1
- zenml/zen_stores/schemas/model_schemas.py +1 -1
- zenml/zen_stores/schemas/service_schemas.py +1 -1
- zenml/zen_stores/schemas/step_run_schemas.py +1 -1
- zenml/zen_stores/schemas/trigger_schemas.py +1 -1
- zenml/zen_stores/sql_zen_store.py +5 -0
- {zenml_nightly-0.75.0.dev20250317.dist-info → zenml_nightly-0.80.0.dev20250321.dist-info}/METADATA +7 -8
- {zenml_nightly-0.75.0.dev20250317.dist-info → zenml_nightly-0.80.0.dev20250321.dist-info}/RECORD +226 -225
- zenml/zen_server/dashboard/assets/@reactflow-DMaYqp8l.js +0 -17
- zenml/zen_server/dashboard/assets/CodeSnippet-D8ptwPjg.js +0 -9
- zenml/zen_server/dashboard/assets/ComponentIcon-gpMJ2Y2e.js +0 -1
- zenml/zen_server/dashboard/assets/ExecutionStatus-DHiK3Am-.js +0 -1
- zenml/zen_server/dashboard/assets/ProBadge-ypma7R8i.js +0 -1
- zenml/zen_server/dashboard/assets/ProviderIcon-DKN3Gdcg.js +0 -1
- zenml/zen_server/dashboard/assets/RunSelector-CYmRHGdm.js +0 -1
- zenml/zen_server/dashboard/assets/SecretTooltip-CHPWF0bu.js +0 -1
- zenml/zen_server/dashboard/assets/Tick-DgU4udUn.js +0 -1
- zenml/zen_server/dashboard/assets/configuration-form-BEwWCxqY.js +0 -1
- zenml/zen_server/dashboard/assets/flavor-select-C1pyy8gq.js +0 -1
- zenml/zen_server/dashboard/assets/login-mutation-7WFxPe10.js +0 -1
- zenml/zen_server/dashboard/assets/page-BKN4SYXY.js +0 -1
- zenml/zen_server/dashboard/assets/page-BNrOW_3T.js +0 -2
- zenml/zen_server/dashboard/assets/page-BX6ZrAVH.js +0 -1
- zenml/zen_server/dashboard/assets/page-BnOdORy3.js +0 -1
- zenml/zen_server/dashboard/assets/page-BtkfcEI7.js +0 -1
- zenml/zen_server/dashboard/assets/page-Bz_grLBY.js +0 -1
- zenml/zen_server/dashboard/assets/page-CCEwuGU4.js +0 -1
- zenml/zen_server/dashboard/assets/page-COAGXWJu.js +0 -1
- zenml/zen_server/dashboard/assets/page-CaibMa0l.js +0 -1
- zenml/zen_server/dashboard/assets/page-CskoTYOC.js +0 -1
- zenml/zen_server/dashboard/assets/page-Cyoe7AtN.js +0 -1
- zenml/zen_server/dashboard/assets/page-D03wm5f1.js +0 -1
- zenml/zen_server/dashboard/assets/page-D8UimvyP.js +0 -1
- zenml/zen_server/dashboard/assets/page-DEnmFyzi.js +0 -1
- zenml/zen_server/dashboard/assets/page-TiOZeeo0.js +0 -1
- zenml/zen_server/dashboard/assets/page-cveasWUr.js +0 -6
- zenml/zen_server/dashboard/assets/page-iTvxfhgZ.js +0 -1
- zenml/zen_server/dashboard/assets/page-niRD8Hqz.js +0 -1
- zenml/zen_server/dashboard/assets/stack-detail-query-CI_YMUx6.js +0 -1
- zenml/zen_server/dashboard/assets/transform-DKsRLKTv.js +0 -1
- zenml/zen_server/dashboard/assets/update-server-settings-mutation-CNYCc-FU.js +0 -1
- {zenml_nightly-0.75.0.dev20250317.dist-info → zenml_nightly-0.80.0.dev20250321.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.75.0.dev20250317.dist-info → zenml_nightly-0.80.0.dev20250321.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.75.0.dev20250317.dist-info → zenml_nightly-0.80.0.dev20250321.dist-info}/entry_points.txt +0 -0
@@ -1 +1 @@
|
|
1
|
-
import{j as e,r as j}from"./@radix-AvWw-1nd.js";import{W as f,
|
1
|
+
import{j as e,r as j}from"./@radix-AvWw-1nd.js";import{W as f,E as g,z as o,M as b,r as c,T as y,G as N,H as v,J as P,K as p,L as u,h as R,N as S,S as x,n as T}from"./index-DPjvk73v.js";import{d as k,L as l,b as h}from"./@react-router-BUo5vhN4.js";import{S as C}from"./refresh-CupyU1Vs.js";import{u as _}from"./all-pipeline-runs-query-COvsm3bC.js";import{S as E,P as w}from"./SearchField-DjAOZic5.js";import{D}from"./DisplayDate-C5Aw-Yca.js";import{g as F,E as A}from"./ExecutionStatus-CD8Vj7sp.js";import{I as B}from"./InlineAvatar-Bin9UPKJ.js";import{a as I,b as z,u as L,c as G,R as H}from"./RunSelector-BVKB4Z8F.js";import"./@tanstack-CcI3lvwB.js";import"./@reactflow-BHoFKFSZ.js";import"./chevron-right-double-zKz7rAaU.js";import"./index-BVVKxTWC.js";import"./check-circle-DyCCYTA0.js";import"./trash-B_JgTgqd.js";import"./DeleteAlertDialog-BgTZbbAt.js";import"./zod-CRNUMWWg.js";import"./index.esm-cf-8NBxV.js";import"./AlertDialogDropdownItem-D7KZcPFw.js";import"./delete-run-Do3XyF4W.js";function U({namespace:s}){return e.jsx(f,{children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(g,{className:"h-5 w-5 fill-neutral-400"}),e.jsx("h1",{className:"text-display-xs font-semibold",children:decodeURIComponent(s)})]})})}const d=1,q=o.object({page:o.coerce.number().min(d).optional().default(d).catch(d),name:o.string().optional(),operator:o.enum(["and","or"]).optional()});function J(){const[s]=k(),{page:a,name:t,operator:r}=q.parse({page:s.get("page")||void 0,name:s.get("name")||void 0});return{page:a,name:t,logical_operator:r}}function K(){return[{id:"check",header:"",meta:{width:"1%"},accessorFn:s=>({id:s.id}),cell:({getValue:s})=>{const{id:a}=s();return e.jsx(I,{id:a})}},{id:"run",header:"Run",accessorFn:s=>{var a;return{name:s.name,id:s.id,status:(a=s.body)==null?void 0:a.status}},cell:({getValue:s})=>{const{name:a,status:t,id:r}=s();return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(b,{className:`h-5 w-5 shrink-0 ${F(t)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(l,{to:c.runs.detail(r),className:"flex items-center gap-1",children:e.jsx("h2",{className:"text-text-md font-semibold",children:a})}),e.jsx(y,{children:e.jsxs(N,{children:[e.jsx(v,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(A,{status:t})}),e.jsx(P,{className:"z-20 capitalize",children:t})]})}),e.jsx(p,{copyText:a})]}),e.jsxs(l,{to:c.runs.detail(r),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:r.split("-")[0]}),e.jsx(p,{copyText:r})]})]})]})}},{id:"stack",header:"Stack",accessorFn:s=>{var a,t,r,n;return{name:(t=(a=s.body)==null?void 0:a.stack)==null?void 0:t.name,id:(n=(r=s.body)==null?void 0:r.stack)==null?void 0:n.id}},cell:({getValue:s})=>{const{name:a,id:t}=s();return!a||!t?null:e.jsx(l,{to:c.stacks.overview,children:e.jsx(u,{rounded:!1,className:"inline-block",color:"turquoise",emphasis:"subtle",children:a})})}},{id:"repository",header:"Repository",accessorFn:s=>{var a,t,r,n,i,m;return{name:(r=(t=(a=s.body)==null?void 0:a.code_reference)==null?void 0:t.body)==null?void 0:r.code_repository.name,id:(m=(i=(n=s.body)==null?void 0:n.code_reference)==null?void 0:i.body)==null?void 0:m.code_repository.id}},cell:({getValue:s})=>{const{name:a,id:t}=s();return!a||!t?null:e.jsx("div",{children:e.jsx(u,{rounded:!1,className:"inline-block",color:"grey",emphasis:"subtle",children:a})})}},{id:"created",header:"Created at",accessorFn:s=>{var a;return(a=s.body)==null?void 0:a.created},cell:({getValue:s})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(D,{dateString:s()})})},{id:"author",header:"Author",accessorFn:s=>{var a;return{author:(a=s.body)==null?void 0:a.user}},cell:({getValue:s})=>{const{author:a}=s();return e.jsx(B,{username:a.name})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:s})=>e.jsx(z,{id:s.original.id})}]}function M(){const{namespace:s}=h(),a=J(),t=K(),{selectedRuns:r}=L(),{data:n,refetch:i}=_({params:{pipeline_name:decodeURIComponent(s),...a,sort_by:"desc:updated"}},{throwOnError:!0});return e.jsxs("div",{className:"flex flex-col gap-5 p-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[r.length?e.jsx(G,{}):e.jsx(E,{searchParams:a}),e.jsxs(R,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>i(),children:[e.jsx(C,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:n?e.jsx(S,{columns:t,data:n.items}):e.jsx(x,{className:"h-[500px] w-full"})}),n?n.total_pages>1&&e.jsx(w,{searchParams:a,paginate:n}):e.jsx(x,{className:"h-[36px] w-[300px]"})]})]})}function ue(){const{namespace:s}=h(),{setCurrentBreadcrumbData:a}=T();return j.useEffect(()=>{s&&a({segment:"pipeline_detail",data:{name:s}})},[s]),e.jsx("div",{children:e.jsxs(H,{children:[e.jsx(U,{namespace:s}),e.jsx(M,{})]})})}export{ue as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as i,j as e}from"./@radix-AvWw-1nd.js";import{z as o,
|
1
|
+
import{r as i,j as e}from"./@radix-AvWw-1nd.js";import{z as o,f as y,j as g,k as N,c as b,l as v,S,I as u,h as p,m as w,r as k,n as F}from"./index-DPjvk73v.js";import{T as C,P}from"./ProCta-7_FtpX3I.js";import{t as U}from"./zod-CRNUMWWg.js";import{b as E}from"./@tanstack-CcI3lvwB.js";import{u as M}from"./index.esm-cf-8NBxV.js";import{S as L}from"./check-circle-DyCCYTA0.js";import{L as z}from"./@react-router-BUo5vhN4.js";import"./@reactflow-BHoFKFSZ.js";import"./check-DZ0KAh3W.js";const h=i.createContext(null);function B({children:s}){const[t,a]=i.useState(!1);return e.jsx(h.Provider,{value:{setSubmitSuccess:a,submitSuccess:t},children:s})}function f(){const s=i.useContext(h);if(s===null)throw new Error("useUpgradeContext must be used within an UpgradeProvider");return s}const T=o.object({name:o.string().min(1),company:o.string().min(1),email:o.string().email()});function I(){const{setSubmitSuccess:s}=f(),{toast:t}=y(),a=M({resolver:U(T),defaultValues:{company:"",email:"",name:""}}),n=E({mutationFn:Z,onSuccess:()=>s(!0),onError:r=>{t({emphasis:"subtle",status:"error",rounded:!0,description:r.message})}});async function c(r,l,m){n.mutate({...r,userId:l,isDebug:m})}return{form:a,submitFormMutation:n,handleSubmitForm:c}}async function Z({company:s,email:t,isDebug:a,name:n,userId:c}){return g(N,{method:"POST",credentials:"omit",headers:{"Content-Type":"application/json"},body:JSON.stringify([{debug:a,event:"Upgrade initiated",type:"track",user_id:c,properties:{company:s,email:t,name:n}}])})}function _(){return e.jsxs("div",{className:"space-y-5",children:[e.jsx(D,{}),e.jsx(R,{})]})}function D(){return e.jsxs("div",{className:"flex flex-col items-center space-y-0.5",children:[e.jsx("h1",{className:"text-center text-display-xs font-semibold",children:"Upgrade to ZenML Pro on your own VPC"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Direct self-deployment, no sales calls"})]})}function R(){const s=b(),t=v(),{form:a,handleSubmitForm:n,submitFormMutation:c}=I(),{register:r,handleSubmit:l,formState:{isValid:m,isSubmitting:d}}=a,{isPending:x}=c;return s.isPending||t.isPending?e.jsx(S,{className:"h-[250px] w-full"}):s.isError||t.isError?e.jsx("p",{children:"Something went wrong...."}):e.jsxs("div",{className:"space-y-5",children:[e.jsxs("form",{onSubmit:l(j=>n(j,t.data.id,!!s.data.debug)),className:"space-y-5",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:"name",className:"text-text-sm",children:"Your Name"}),e.jsx(u,{...r("name"),id:"name",className:"w-full"})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:"company",className:"text-text-sm",children:"Company"}),e.jsx(u,{...r("company"),id:"company",className:"w-full"})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:"email",className:"text-text-sm",children:"Email address"}),e.jsx(u,{...r("email"),id:"email",className:"w-full"})]}),e.jsxs(p,{size:"md",className:"w-full justify-center",disabled:d||x||!m,type:"submit",children:[(x||d)&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Continue"]})]}),e.jsxs("p",{className:"text-center text-text-xs text-theme-text-secondary",children:["By submitting the form you accept our"," ",e.jsx("a",{className:"link",href:"https://www.zenml.io/cloud-terms-and-privacy",target:"_blank",rel:"noopener noreferrer",children:"terms of use"})," ","and"," ",e.jsx("a",{href:"https://www.zenml.io/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"link",children:"privacy policy"}),"."]})]})}function V(){return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"As easy as following the steps"}),e.jsx("p",{className:"text-theme-text-secondary",children:"From sign-up to deployment in minutes"})]}),e.jsx(Y,{})]})}const W=["Fill out your details","Receive comprehensive ZenML Pro documentation","Deploy ZenML Pro and upgrade your tenant","Get a free 14-day trial license"];function Y(){return e.jsx("ol",{className:"space-y-3",children:W.map((s,t)=>e.jsxs("li",{className:"flex items-center space-x-1",children:[e.jsx(q,{children:t+1}),e.jsx("span",{children:s})]},t))})}function q({className:s,...t}){return e.jsx("div",{...t,className:w("flex h-4 w-4 shrink-0 items-center justify-center rounded-rounded bg-warning-400 text-text-xs text-theme-text-negative")})}function G(){return e.jsxs("section",{className:"flex w-full flex-col-reverse items-center justify-end gap-5 lg:flex-row lg:gap-[100px] xl:pl-[200px] 2xl:pl-[300px]",children:[e.jsx(V,{}),e.jsx(_,{})]})}const H="/assets/upgrade-form-CwRHBuXB.webp",O=["Comprehensive documentation to get started","Your 14-day trial license key","Step-by-step deployment instructions"];function A(){return e.jsxs("section",{className:"flex h-full w-full flex-col items-center justify-center space-y-5",children:[e.jsx(L,{className:"h-[120px] w-[120px] fill-theme-text-success"}),e.jsxs("div",{className:"space-y-7",children:[e.jsxs("div",{className:"max-w-[500px] space-y-2 text-center",children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"You're on your way to ZenML Pro!"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Thank you for choosing to upgrade to ZenML Pro. We've received your request and you'll receive an email with:"}),e.jsx("ul",{className:"mx-auto w-fit space-y-3",children:O.map((s,t)=>e.jsxs("li",{className:"flex items-center gap-1",children:[e.jsx(C,{}),e.jsx("span",{children:s})]},t))}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Meanwhile, you can ask your questions in our"," ",e.jsx("a",{className:"link",href:"https://zenml.io/slack",target:"_blank",rel:"noopener noreferrer",children:"Slack channel"})," ","or"," ",e.jsx("a",{className:"link",href:"https://docs.zenml.io",target:"_blank",rel:"noopener noreferrer",children:"check our documentation."})]})]}),e.jsx(p,{size:"md",className:"mx-auto",children:e.jsx(z,{to:k.home,children:"Go to Dashboard"})})]})]})}function J(){const{submitSuccess:s}=f();return e.jsxs(P,{className:"relative min-h-[620px]",children:[e.jsx("img",{src:H,className:"absolute hidden -translate-x-3/4 -rotate-[5deg] scale-75 xl:block 2xl:-translate-x-[60%]"}),s===!1&&e.jsx(G,{}),s===!0&&e.jsx(A,{})]})}function ce(){const{setCurrentBreadcrumbData:s}=F();return i.useEffect(()=>{s({segment:"upgrade",data:null})},[]),e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx("div",{className:"layout-container",children:e.jsx(B,{children:e.jsx(J,{})})})})}export{ce as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as f,j as e}from"./@radix-AvWw-1nd.js";import{S as X,u as y,C as v,P as N,a as $,W as ee,L as te}from"./ProviderRadio-DPmZHff_.js";import{u,R as se,a as re,E as ae,D as F,G as oe,A as ne,C as O,b as ie,N as ce}from"./Partials-TNaYjHsV.js";import{S as V,B as Y,aQ as de,h as le,r as T}from"./index-DPjvk73v.js";import{d as me,a as ue}from"./@react-router-BUo5vhN4.js";import{I as G}from"./Infobox-BHEdNmME.js";import{t as Q}from"./zod-CRNUMWWg.js";import{u as H,F as pe}from"./index.esm-cf-8NBxV.js";import{a as xe,c as q,b as fe,p as he}from"./persist-DHGuHP2H.js";import{C as h}from"./ProviderIcon-CxeziA5a.js";import{s as J}from"./index-D-n6tspq.js";import{a as K}from"./@tanstack-CcI3lvwB.js";import"./Tick-CHW0jc8Y.js";import"./check-DZ0KAh3W.js";import"./package-BOms6B-A.js";import"./ComponentBadge-FrujKBC6.js";import"./ComponentIcon-Dx5fBrDX.js";import"./layout-3_rgDUxf.js";import"./rocket-k68ONPDS.js";import"./logs-D6_diV2k.js";import"./CodeSnippet-DUkCnBpQ.js";import"./NumberBox-BvBJYxCu.js";import"./link-external-BYm_zH_8.js";import"./@reactflow-BHoFKFSZ.js";import"./sharedSchema-i_9Y4WcA.js";import"./gcp-0u4le6mC.js";import"./stack-detail-query-omCumL7U.js";function je(){const{formRef:t,setIsNextButtonDisabled:s,setData:a,data:o}=u(),n=H({resolver:Q(xe),mode:"onChange",defaultValues:{region:o.location,stackName:o.stackName||""}});f.useEffect(()=>{s(!n.formState.isValid)},[n.formState.isValid,s]);function l(r){a(m=>({...m,location:r.region,stackName:r.stackName}))}return e.jsx(j,{title:"Review Stack Configuration",children:e.jsx(pe,{...n,children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs(G,{className:"text-text-sm",children:[e.jsx("p",{className:"font-semibold",children:"Important"}),e.jsx("p",{children:"This will create new resources in your account. Ensure you have the necessary permissions and are aware of any potential costs."})]}),e.jsxs("form",{onSubmit:n.handleSubmit(l),ref:t,className:"space-y-5",children:[e.jsx(se,{provider:o.provider||"aws"}),e.jsx(X,{})]}),e.jsx(re,{provider:o.provider||"aws"}),e.jsx(ae,{provider:o.provider||"aws"})]})})})}function ve(){const{data:t,timestamp:s,setIsNextButtonDisabled:a}=u(),{setCurrentStep:o}=y(),{isPending:n,isError:l,data:r}=K({...J.stackDeploymentStack({provider:t.provider,stack_name:t.stackName,date_start:s}),refetchInterval:5e3,throwOnError:!0});return f.useEffect(()=>{r&&(q(),o(m=>m+1),a(!1))},[r]),n?e.jsx(V,{className:"h-[200px] w-full"}):l?null:e.jsxs("div",{className:"space-y-5",children:[e.jsx(Ne,{}),e.jsx(ye,{stack:r})]})}function Ne(){const{data:t}=u();return e.jsxs("section",{className:"space-y-5 border-b border-theme-border-moderate pb-5",children:[e.jsxs(Y,{className:"flex items-center justify-between gap-4 px-6 py-5",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(h,{provider:t.provider,className:"h-6 w-6 shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-text-lg font-semibold",children:"Deploying the Stack..."}),e.jsx("p",{className:"text-theme-text-secondary",children:"Follow the steps in your Cloud console to finish the setup. You can come back to check once your components are deployed."})]})]}),t.provider==="azure"?e.jsx(F,{children:e.jsx("span",{children:"Deploy in Azure"})}):e.jsx(F,{})]}),t.provider==="gcp"&&e.jsx(oe,{}),t.provider==="azure"&&e.jsx(ne,{})]})}function ye({stack:t}){const s=!!t;return e.jsxs("div",{className:"space-y-5",children:[!s&&e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(de,{className:"h-5 w-5 fill-primary-400"}),"Creating your stack and components..."]}),e.jsx("p",{className:"text-theme-text-secondary",children:"We are creating your stack and stack components based on your configuration. Once you finish the setup, come back to check your brand new stack and components ready."})]}),e.jsx(Se,{isReady:s}),e.jsx(ge,{stack:t})]})}function ge({stack:t}){const s=!!t,{data:a}=u();return e.jsxs("div",{className:"relative overflow-hidden rounded-md",children:[!s&&e.jsx("div",{className:"absolute z-50 h-full w-full bg-neutral-50/50"}),e.jsx(O,{type:a.provider,componentProps:{isLoading:!s,isSuccess:s,stackName:a.stackName}})]})}function Se({isReady:t}){const[s,a]=f.useState(!1);return f.useEffect(()=>{const o=setTimeout(()=>{a(!0)},3e5);return()=>clearTimeout(o)},[]),!s||t?null:e.jsx(G,{children:"Your stack is taking longer than usual to deploy. Please check your Cloud console, or the stacks list in ZenML."})}function ke(){return e.jsx(j,{title:"Deploy ZenML Stack",children:e.jsx(be,{})})}function be(){const{setIsNextButtonDisabled:t,isLoading:s}=u();return f.useEffect(()=>{t(!0)},[]),s?e.jsx(ve,{}):e.jsx(ie,{})}function we(){const{formRef:t,setIsNextButtonDisabled:s,setData:a,data:o}=u(),{register:n,handleSubmit:l,formState:{isValid:r}}=H({resolver:Q(fe),defaultValues:{provider:o.provider}});f.useEffect(()=>{s(!r)},[r,s]);function m(d){a(c=>({...c,provider:d.provider}))}return e.jsx(j,{title:"New Cloud Infrastructure",children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-lg font-semibold",children:"Select a Cloud Provider"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Select the cloud provider where your want to create your infrastructure and deploy your ZenML models. You will be able to remove the ZenML stack at any time."})]}),e.jsxs("form",{id:"provider-form",onSubmit:l(m),className:"grid grid-cols-1 gap-3 xl:grid-cols-3",ref:t,children:[e.jsx(v,{id:"aws-provider",...n("provider"),value:"aws",children:e.jsx(N,{icon:e.jsx(h,{provider:"aws",className:"h-6 w-6 shrink-0"}),title:"AWS",subtitle:"ZenML stack with S3, ECR, and SageMaker integration"})}),e.jsx(v,{id:"gcp-provider",...n("provider"),value:"gcp",children:e.jsx(N,{icon:e.jsx(h,{provider:"gcp",className:"h-6 w-6 shrink-0"}),title:"GCP",subtitle:"Create ZenML infrastructure using GCS, Artifact Registry, and Vertex AI"})}),e.jsx(v,{id:"azure-provider",...n("provider"),value:"azure",children:e.jsx(N,{icon:e.jsx(h,{provider:"azure",className:"h-6 w-6 shrink-0"}),title:"Azure",subtitle:"Set up ZenML with Azure Storage, Container Registry, and ML services"})})]})]})})}function Ce({provider:t,stackName:s,timestamp:a,isTerraform:o}){var g,S,k,b,w,C,P,D,I,z,L,R,B,E,W,M,_,A;const{isPending:n,isError:l,data:r}=K({...J.stackDeploymentStack({provider:t,stack_name:s,date_start:a,terraform:o}),throwOnError:!0});if(n)return e.jsx(V,{className:"h-[200px] w-full"});if(l)return null;const m=r.stack.name,d=(g=r.stack.metadata)==null?void 0:g.components.orchestrator,c=(S=r.stack.metadata)==null?void 0:S.components.artifact_store,i=(k=r.stack.metadata)==null?void 0:k.components.container_registry,p=(b=r.stack.metadata)==null?void 0:b.components.image_builder,x=(w=r.stack.metadata)==null?void 0:w.components.step_operator,U={orchestrator:{name:((C=d==null?void 0:d[0])==null?void 0:C.name)??"Orchestrator",id:((P=d==null?void 0:d[0])==null?void 0:P.id.split("-")[0])??""},artifactStore:{name:((D=c==null?void 0:c[0])==null?void 0:D.name)??"Artifact Store",id:((I=c==null?void 0:c[0])==null?void 0:I.id.split("-")[0])??""},registry:{name:((z=i==null?void 0:i[0])==null?void 0:z.name)??"Container Registry",id:((L=i==null?void 0:i[0])==null?void 0:L.id.split("-")[0])??""},connector:{name:(R=r.service_connector)==null?void 0:R.name,id:((E=(B=r.service_connector)==null?void 0:B.id)==null?void 0:E.split("-")[0])??""},imageBuilder:{name:((W=p==null?void 0:p[0])==null?void 0:W.name)??"Image Builder",id:((M=p==null?void 0:p[0])==null?void 0:M.id.split("-")[0])??""},operator:{name:((_=x==null?void 0:x[0])==null?void 0:_.name)??"Step Operator",id:((A=x==null?void 0:x[0])==null?void 0:A.id.split("-")[0])??""}};return e.jsx(O,{type:t,componentProps:{components:U,isSuccess:!0,stackName:m}})}function Pe(){const{setIsNextButtonDisabled:t,data:s,timestamp:a}=u();return t(!1),e.jsx(j,{title:"Your Stack",children:e.jsxs("div",{className:"space-y-5",children:[e.jsx("p",{className:"text-theme-text-secondary",children:"Here you can review the created stack and stack components. Now you can start running pipelines using this new configuration."}),e.jsx(Ce,{provider:s.provider||"aws",stackName:s.stackName||"",timestamp:a})]})})}function De(){const{currentStep:t}=y();if(t===1)return e.jsx(we,{});if(t===2)return e.jsx(je,{});if(t===3)return e.jsx(ke,{});if(t===4)return e.jsx(Pe,{})}function Ie(){var c;const[s]=me(),{setCurrentStep:a,currentStep:o}=y(),{formRef:n,isNextButtonDisabled:l}=u(),r=ue(),m=s.get("origin")==="onboarding";async function d(){n.current&&(n.current.requestSubmit(),await new Promise(i=>setTimeout(i,20))),a(i=>i<4?i+1:i),o===4&&(q(),r(m?T.onboarding:T.stacks.overview))}return e.jsx(le,{form:(c=n.current)==null?void 0:c.id,disabled:l,onClick:()=>d(),size:"md",children:o===4?"Finish":"Next"})}function j({children:t,title:s}){return e.jsxs(Y,{className:"w-full",children:[e.jsx("div",{className:"border-b border-theme-border-moderate px-5 py-3 text-display-xs font-semibold",children:s}),e.jsx("div",{className:"p-5",children:t}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-theme-border-moderate p-5",children:[e.jsx($,{}),e.jsx(Ie,{})]})]})}const Z=["Infrastructure Type","Cloud Provider","Review Configuration","Deploy Stack"];function rt(){const{success:t}=he();return e.jsx(ee,{maxSteps:Z.length,initialStep:t?3:1,children:e.jsx(ce,{children:e.jsxs("section",{className:"layout-container flex flex-col gap-5 p-5 xl:flex-row",children:[e.jsx(te,{entries:Z}),e.jsx("div",{className:"w-full overflow-y-hidden",children:e.jsx(De,{})})]})})})}export{rt as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as p,j as t}from"./@radix-AvWw-1nd.js";import{u as F,g as Ze,S as Ue,C as oe,P as ie,W as Ke,L as Qe}from"./ProviderRadio-DPmZHff_.js";import{W as D,H as O,B as E}from"./Wizard-XEp9rGmf.js";import{t as q}from"./zod-CRNUMWWg.js";import{z as y,S as Y,_ as Ge,I as ge,h as M,aC as Ye,aD as Je,aE as Xe,aF as et,aj as tt,aG as rt,ak as st,am as nt,ao as ot,d as it,x as at,a0 as ct,j as lt,F as ut,o as dt,p as ft,f as Ie,i as mt,r as ht,A as xt,b as pt,ae as yt}from"./index-DPjvk73v.js";import{b as v,C as k,u as W,F as $}from"./index.esm-cf-8NBxV.js";import{S as R}from"./WizardFooter-BtL1Gi1k.js";import{C as je,b as gt}from"./ComponentIcon-Dx5fBrDX.js";import{R as Z,a as U,s as jt,u as _t}from"./create-stack-B2c98UlP.js";import{f as vt,s as De,g as St,a as Ct,D as bt,b as wt,z as Nt}from"./index-CzhJC6pc.js";import{a as J,b as Pt,j as Oe,c as Ft}from"./@tanstack-CcI3lvwB.js";import{C as L}from"./ProviderIcon-CxeziA5a.js";import{s as kt}from"./sharedSchema-i_9Y4WcA.js";import{S as zt}from"./Lock-tO9Z41I9.js";import{T as _e}from"./Tick-CHW0jc8Y.js";import{s as Ee}from"./index-D-n6tspq.js";import{C as At}from"./ComponentBadge-FrujKBC6.js";import{e as It}from"./components-Br2ezRib.js";import{L as Dt}from"./@react-router-BUo5vhN4.js";import"./persist-DHGuHP2H.js";import"./@reactflow-BHoFKFSZ.js";import"./layout-3_rgDUxf.js";import"./rocket-k68ONPDS.js";import"./plus-CoKtHiA9.js";import"./trash-B_JgTgqd.js";import"./type-guards-CaeD8wHO.js";import"./gcp-0u4le6mC.js";import"./check-DZ0KAh3W.js";import"./stack-detail-query-omCumL7U.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({...vt.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:Ge(((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({...De.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=St(C),He=Ct(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(Ye,{...C,onValueChange:b=>{m(b),d()},children:[t.jsx(Je,{className:"w-fit border border-neutral-300 text-left text-text-md",children:t.jsx(Xe,{className:"flex items-center gap-2",placeholder:"Select your Auth Method"})}),t.jsx(et,{children:t.jsx(tt,{viewportClassName:"max-h-[300px]",children:f.map(b=>t.jsx(rt,{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(gt,{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({...De.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(bt,{definitions:f,isOptional:wt(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(st,{open:e,children:t.jsxs(nt,{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(ot,{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(it,{className:"h-[60px] w-[60px]"}),t.jsx("div",{className:"flex h-[60px] w-[60px] items-center justify-center",children:t.jsx(at,{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 ",Ze(((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(ct,{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=dt(ft.serviceConnectors.fullStackResources),s=await lt(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 ut({status:s.status,statusText:s.statusText,message:n})}return s.json()}function or(e){return Pt({...e,mutationFn:async({payload:r})=>nr({payload:r})})}function ir(){const{setCurrentStep:e}=F(),[r,s]=p.useState(!0),{toast:n}=Ie(),{setData:o,data:a}=S(),l=or({onSuccess:async f=>{o(d=>I(d,c=>{c.fullstackResources=f})),s(!1),await jt(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(Ue,{}),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=Ft(),{toast:n}=Ie(),{setCurrentStep:o}=F(),{mutate:a}=_t({onError:d=>{d instanceof Error&&n({status:"error",emphasis:"subtle",icon:t.jsx(mt,{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({workspaceId:"default",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(Nt(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:ht.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(xt,{type:"square",size:"lg",children:t.jsx(pt,{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:yt((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 is(){return t.jsx(Ke,{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(Qe,{entries:Ae}),t.jsx("div",{className:"w-full",children:t.jsx(kr,{})})]})})})}export{is as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as i,j as s}from"./@radix-AvWw-1nd.js";import{z as t,
|
1
|
+
import{r as i,j as s}from"./@radix-AvWw-1nd.js";import{z as t,e as j,f as N,I as l,h as w,i as y,r as b,B as v}from"./index-DPjvk73v.js";import{u as S}from"./login-mutation-D6uiKsKk.js";import{t as I}from"./zod-CRNUMWWg.js";import{u as L}from"./index.esm-cf-8NBxV.js";import{a as F,d as P}from"./@react-router-BUo5vhN4.js";import"./@tanstack-CcI3lvwB.js";import"./@reactflow-BHoFKFSZ.js";const E=t.object({username:t.string().min(1),password:t.string().optional()});function A(){const c=F(),{setAuthState:m}=j(),{toast:u}=N(),a=i.useId(),r=i.useId(),[o]=P(),d=o.get("redirect"),x=o.get("username")??void 0,{register:n,handleSubmit:p,formState:{isValid:h}}=L({resolver:I(E),defaultValues:{username:x}}),f=S({onError:e=>{e instanceof Error&&u({status:"error",emphasis:"subtle",icon:s.jsx(y,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:e.message,rounded:!0})},onSuccess:async()=>{m("true"),c(d||b.home)}});function g(e){f.mutate({username:e.username.trim(),password:e.password})}return s.jsxs("form",{onSubmit:p(g),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(l,{...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(l,{...n("password"),id:r,type:"password",className:"w-full"})]})]}),s.jsx(w,{disabled:!h,className:"w-full text-center",size:"md",children:s.jsx("span",{className:"w-full",children:"Login"})})]})}function U(){return s.jsxs(v,{className:"flex w-full max-w-[540px] flex-col gap-5 p-7",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("h1",{className:"mb-0.5 text-display-xs font-semibold",children:"Log in to your account"}),s.jsx("p",{className:"text-theme-text-secondary",children:"Please, fill in your details to log in to your ZenML account."})]}),s.jsx(A,{})]})}export{U as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as S,j as e}from"./@radix-AvWw-1nd.js";import{z as i,
|
1
|
+
import{r as S,j as e}from"./@radix-AvWw-1nd.js";import{z as i,f as v,u as g,S as j,I as N,h as y,at as b,i as w,aB as E,B as F}from"./index-DPjvk73v.js";import{u as B}from"./update-server-settings-mutation-B4eE33z-.js";import{t as I}from"./zod-CRNUMWWg.js";import{c as P}from"./@tanstack-CcI3lvwB.js";import{u as G}from"./index.esm-cf-8NBxV.js";import"./@react-router-BUo5vhN4.js";import"./@reactflow-BHoFKFSZ.js";const k=i.object({serverName:i.string().min(1)});function q(){var a;const r=S.useId(),{toast:t}=v(),n=P(),{isError:o,isPending:l,data:m}=g({throwOnError:!0}),{mutate:c,isPending:u}=B({onError(s){b(s)&&t({status:"error",emphasis:"subtle",icon:e.jsx(w,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:s.message,rounded:!0})},onSuccess:async()=>{await n.invalidateQueries({queryKey:E()}),t({status:"success",emphasis:"subtle",rounded:!0,description:"Server Settings updated successfully"}),p()}}),{handleSubmit:d,register:x,reset:p,formState:{isValid:f}}=G({resolver:I(k)});function h(s){c({server_name:s.serverName})}return o?null:l?e.jsx(j,{className:"h-[150px] max-w-[600px]"}):e.jsx("div",{className:"w-full max-w-[600px]",children:e.jsxs("form",{className:"space-y-2",onSubmit:d(h),children:[e.jsx("div",{className:"space-y-2",children:e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:r,className:"text-text-sm",children:"Server Name"}),e.jsx(N,{placeholder:(a=m.body)==null?void 0:a.server_name,...x("serverName"),id:r,className:"w-full"})]})}),e.jsx("div",{className:"flex justify-end",children:e.jsx(y,{disabled:u||!f,size:"md",intent:"primary",children:"Update"})})]})})}function O(){return e.jsxs(F,{className:"flex flex-col gap-5 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"General"}),e.jsx(q,{})]})}export{O as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{j as e,r as f}from"./@radix-AvWw-1nd.js";import{z as d,o as x,p as h,q as N,j,F as p,B as m,f as S,C as D,h as C,i as P,a0 as E}from"./index-DPjvk73v.js";import{d as _}from"./@react-router-BUo5vhN4.js";import{E as F}from"./EmptyState-DpbfQBDE.js";import{a as T,b as k}from"./@tanstack-CcI3lvwB.js";import{E as I}from"./Error-BkUP4Luv.js";import{t as A}from"./zod-CRNUMWWg.js";import{u as V,C as q}from"./index.esm-cf-8NBxV.js";import{S as z}from"./check-circle-DyCCYTA0.js";import"./@reactflow-BHoFKFSZ.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)+"?"+N(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(q,{control:n,name:"trustDevice",render:({field:{onChange:o,value:w}})=>e.jsx(D,{checked:w,onCheckedChange:b=>o(!!b),id:r})}),e.jsxs("label",{htmlFor:r,children:[e.jsx("p",{children:"Trust this device"}),e.jsx("p",{className:"text-theme-text-secondary",children:"We won't ask you again soon on this device."})]})]}),e.jsx(C,{disabled:y||!c,size:"md",className:"flex w-full justify-center",children:"Authorize this device"})]})}function O(){return e.jsxs(m,{className:"flex min-w-[540px] flex-col items-center justify-center space-y-7 px-7 py-9",children:[e.jsx(z,{className:"h-[120px] w-[120px] fill-theme-text-success"}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"You successfully added your device"}),e.jsx("p",{className:"text-theme-text-secondary",children:"You may close this screen and return to your CLI."})]})]})}function 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(E,{})}):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{j as e}from"./@radix-AvWw-1nd.js";import{u as o,A as i,a as d,g as c,b as x,S as a,c as n,d as m,B as f,r as u}from"./index-DPjvk73v.js";import{g as h}from"./login-command-CkqxPtV3.js";import{L as p}from"./@react-router-BUo5vhN4.js";import{C as j}from"./CodeSnippet-DUkCnBpQ.js";import"./@tanstack-CcI3lvwB.js";import"./@reactflow-BHoFKFSZ.js";const v="/assets/cloud-squares-DeRLMopf.svg";function g(){var r,t,l;const{data:s}=o({throwOnError:!0});return e.jsx("div",{className:"w-full items-center border-b border-theme-border-moderate bg-white py-5",children:e.jsx("div",{className:"layout-container flex flex-col flex-wrap items-center justify-between md:flex-row",children:e.jsxs("div",{className:"flex flex-col items-center gap-5 md:flex-row",children:[s?e.jsxs(i,{size:"xxl",type:"square",children:[e.jsx(d,{alt:"Logo displayed for the server",src:c(((r=s.body)==null?void 0:r.server_name)||"default",64)}),e.jsx(x,{size:"xxl",children:((t=s.body)==null?void 0:t.server_name[0])||"D"})]}):e.jsx(a,{className:"h-[96px] w-[96px]"}),e.jsx("div",{children:e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row",children:[s?e.jsx("h1",{className:"mb-1 text-display-xs font-semibold",children:((l=s.body)==null?void 0:l.server_name)||"default"}):e.jsx(a,{className:"h-full w-8"}),e.jsx("div",{className:"flex flex-row flex-wrap gap-0.5",children:e.jsx(w,{})})]})})]})})})}function w(){const{data:s,isError:r,isPending:t}=n({throwOnError:!0});return r?null:t?e.jsx(a,{className:"w-6"}):e.jsxs("div",{className:"flex h-6 items-center gap-0.5 rounded-md border border-theme-border-moderate px-1 py-0.5 text-text-sm text-theme-text-secondary",children:[e.jsx(m,{className:"h-4 w-4 fill-theme-text-brand"}),s.version]})}function k(){return e.jsxs("div",{children:[e.jsx(g,{}),e.jsx("div",{className:"layout-container space-y-5 py-5",children:e.jsx(b,{})})]})}function b(){const{data:s}=n();return e.jsxs(f,{className:"flex flex-col-reverse overflow-hidden lg:flex-row",children:[e.jsxs("div",{className:"w-full px-7 py-5 lg:w-2/3",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Welcome to ZenML"}),e.jsxs("p",{className:"mt-2 text-text-lg text-theme-text-secondary",children:["You successfully installed ZenML dashboard. ",e.jsx("br",{}),"Now you can get started with your new ZenML server.",e.jsx("br",{}),"To get started"," ",e.jsx(p,{className:"link text-theme-text-brand",to:u.onboarding,children:"checkout the onboarding guide"}),"."]}),e.jsx("hr",{className:"mb-5 mt-5 w-[100px]"}),e.jsxs("div",{className:"",children:[e.jsx("p",{className:"mb-1 text-text-sm",children:"Copy your ZenML server URL"}),e.jsx("div",{className:"",children:e.jsx(j,{codeClasses:"truncate",className:"truncate",code:h((s==null?void 0:s.deployment_type)||"other")})})]})]}),e.jsx("div",{className:"flex w-full items-center justify-center bg-primary-50 lg:w-1/3",children:e.jsx("img",{alt:"illustration of different purple squares",src:v,className:"h-full w-full"})})]})}export{k as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as x,j as e}from"./@radix-AvWw-1nd.js";import{o as D,p as C,j as E,F as T,ak as $,al as H,h,am as F,an as P,ao as O,f as U,I as j,ar as A,as as V,at as G,s as J,D as W,w as X,x as Y,y as Z,aK as ee,r as N,K as w,az as se,z as f,l as te,N as ae,S,n as re,B as ne}from"./index-DPjvk73v.js";import{S as ie,P as le}from"./SearchField-DjAOZic5.js";import{S as ce,s as oe,E as de,a as me,b as ue}from"./SecretTooltip-mMAAP4dM.js";import{b as I,c as L,a as v}from"./@tanstack-CcI3lvwB.js";import{w as xe}from"./index-eIIP-0dQ.js";import{S as he}from"./plus-CoKtHiA9.js";import{S as q}from"./trash-B_JgTgqd.js";import{t as pe}from"./zod-CRNUMWWg.js";import{u as fe,a as je,C as g}from"./index.esm-cf-8NBxV.js";import{S as ge}from"./Lock-tO9Z41I9.js";import{D as ye}from"./DisplayDate-C5Aw-Yca.js";import{I as Ne}from"./InlineAvatar-Bin9UPKJ.js";import{c as we}from"./code-snippets-CqONne41.js";import{L as b,d as Se}from"./@react-router-BUo5vhN4.js";import{D as k}from"./DialogItem-CNWLiJcc.js";import"./@reactflow-BHoFKFSZ.js";import"./chevron-right-double-zKz7rAaU.js";import"./index-BVVKxTWC.js";import"./CodeSnippet-DUkCnBpQ.js";async function ve(s){const t=D(C.secrets.add(s.workspace)),a=await E(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!a.ok){const r=await a.json().then(n=>n.detail).catch(()=>"Failed to create Secret");throw new T({status:a.status,statusText:a.statusText,message:r})}return a.json()}function be(s){return I({mutationFn:async t=>ve(t),...s})}function ke({id:s,workspace:t}){const[a,r]=x.useState(!1);return e.jsxs($,{open:a,onOpenChange:r,children:[e.jsx(H,{asChild:!0,children:e.jsx(h,{className:"shrink-0",intent:"primary",children:"Add secret"})}),e.jsxs(F,{className:"mx-auto w-[90vw] max-w-[744px]",children:[e.jsx(P,{children:e.jsx(O,{children:"Register New Secret"})}),e.jsx(De,{userId:s,setOpen:r,workspaceId:t.id})]})]})}function De({userId:s,setOpen:t,workspaceId:a}){const{handleSubmit:r,control:n,watch:i,setValue:o,formState:{isValid:u},reset:p}=fe({resolver:pe(oe),defaultValues:{secretName:"",keysValues:[{key:"",value:""}]}}),{fields:m,append:_,remove:R}=je({control:n,name:"keysValues"}),{toast:z}=U(),B=L(),{mutate:K}=be({onError(l){G(l)&&z({status:"error",emphasis:"subtle",description:l.message,rounded:!0})},onSuccess(){B.invalidateQueries({queryKey:["secrets"]}),t(!1),p()}}),M=l=>{K({user:s,workspace:a,name:l.secretName,scope:"workspace",values:l.keysValues.reduce((c,d)=>(d.key&&d.value&&(c[d.key]=d.value),c),{})})},Q=l=>{M(l)};return e.jsxs(e.Fragment,{children:[e.jsx("form",{id:"create-secret-form",className:"gap-5 p-5",onSubmit:r(Q),children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("label",{className:"font-inter text-sm text-left font-medium leading-5",children:["Secret Name",e.jsx("span",{className:"ml-1 text-theme-text-error",children:"*"})]}),e.jsx(g,{name:"secretName",control:n,render:({field:l})=>e.jsx(j,{...l,className:"mb-3 w-full",required:!0})})]}),e.jsxs("div",{className:"mt-10",children:[e.jsx("div",{children:e.jsx("h1",{className:"font-inter text-lg text-left font-semibold ",children:"Keys"})}),e.jsxs("div",{className:"mt-5 flex flex-row ",children:[e.jsx("div",{className:"flex-grow",children:e.jsx("label",{className:"font-inter text-sm text-left font-medium",children:"Key"})}),e.jsx("div",{className:"flex-grow pr-12",children:e.jsx("label",{className:"font-inter text-sm text-left font-medium",children:"Value"})})]})]}),m.map((l,c)=>e.jsxs("div",{className:"flex flex-row items-center space-x-1 ",children:[e.jsx("div",{className:"relative flex-grow ",children:e.jsx(g,{name:`keysValues.${c}.key`,control:n,render:({field:d})=>e.jsx(j,{...d,className:"mb-2 w-full",required:!0,placeholder:"key"})})}),e.jsx("div",{className:"relative flex-grow",children:e.jsxs("div",{className:"relative",children:[e.jsx(g,{name:`keysValues.${c}.value`,control:n,render:({field:d})=>e.jsx(j,{...d,className:"mb-2 w-full pr-10",required:!0,placeholder:"•••••••••",type:i(`keysValues.${c}.showPassword`)?"text":"password"})}),e.jsx("button",{type:"button",onClick:()=>{const d=i(`keysValues.${c}.showPassword`);o(`keysValues.${c}.showPassword`,!d)},className:"absolute inset-y-1 right-0 flex items-center pb-1 pr-3",children:e.jsx(ce,{className:"h-4 w-4 flex-shrink-0"})})]})}),e.jsxs("div",{className:"flex items-center",children:[c===m.length-1&&e.jsx(h,{intent:"primary",emphasis:"subtle",onClick:()=>_({key:"",value:""}),className:"mb-2 flex h-7 w-7 items-center justify-center",children:e.jsx(he,{className:"flex-shrink-0 fill-primary-600"})}),c!==m.length-1&&e.jsx(h,{intent:"secondary",emphasis:"minimal",onClick:()=>R(c),className:"mb-2 h-7 w-7 items-center justify-center",children:e.jsx(q,{className:"flex-shrink-0 fill-theme-text-secondary"})})]})]},l.id))]})}),e.jsxs(A,{className:"gap-[10px]",children:[e.jsx(V,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{intent:"primary",disabled:!u,type:"submit",form:"create-secret-form",children:"Register Secret"})]})]})}async function Ce(s){const t=D(C.secrets.detail(s)),a=await E(t,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(a.status===404&&J(),!a.ok)throw new T({message:"Error deleting secret",status:a.status,statusText:a.statusText});return a.json()}function Ee(s){return I({mutationFn:async t=>Ce(t),...s})}function Te({secretId:s}){const t=L(),{mutate:a}=Ee({onSuccess(){t.invalidateQueries({queryKey:["secrets"]})}}),[r,n]=x.useState("");function i(){a(s)}function o(u){n(u.target.value)}return e.jsxs(F,{children:[e.jsx(P,{children:e.jsx(O,{children:"Delete secret"})}),e.jsxs("div",{className:"gap-5 p-5",children:[e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Are you sure you want to delete this secret?"}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"This action cannot be undone."}),e.jsx("h3",{className:"font-inter text-sm mb-1 mt-4 text-left font-medium leading-5",children:"Please type DELETE to confirm"}),e.jsx(j,{name:"key",onChange:o,className:"w-full",required:!0,value:r})]}),e.jsxs(A,{className:"gap-[10px]",children:[e.jsx(V,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{intent:"danger",type:"submit",form:"edit-secret-form",onClick:i,disabled:r!=="DELETE",children:"Delete"})]})]})}function Fe({secretId:s}){const[t,a]=x.useState(!1),[r,n]=x.useState(!1),i=x.useRef(null),o=x.useRef(null);function u(){o.current=i.current}function p(m){if(m===!1){a(!1),setTimeout(()=>{n(m)},200);return}n(m)}return e.jsxs(W,{onOpenChange:a,open:t,children:[e.jsx(X,{ref:i,children:e.jsx(Y,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsxs(Z,{hidden:r,onCloseAutoFocus:m=>{o.current&&(o.current.focus(),o.current=null,m.preventDefault())},align:"end",sideOffset:7,children:[e.jsx(k,{onSelect:u,onOpenChange:p,triggerChildren:"Edit ",icon:e.jsx(ee,{}),children:e.jsx(de,{secretId:s,isSecretNameEditable:!0,dialogTitle:"Edit secret"})}),e.jsx(k,{onSelect:u,onOpenChange:p,triggerChildren:"Delete ",icon:e.jsx(q,{}),children:e.jsx(Te,{secretId:s})})]})]})}const Pe=[{id:"secret",header:"Secret",accessorFn:s=>s.name,cell:({getValue:s,row:t})=>{const a=we(t.original.name);return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(ge,{className:"h-5 w-5 flex-shrink-0 fill-primary-400"}),e.jsxs("div",{className:"group/copybutton flex flex-col",children:[e.jsxs("div",{className:"flex flex-row items-center space-x-1",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(b,{className:"text-text-md font-semibold text-theme-text-primary",to:N.settings.secrets.detail(t.original.id),children:t.original.name}),e.jsx(me,{code:a})]}),e.jsx(w,{copyText:s()})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(b,{to:N.settings.secrets.detail(t.original.id),className:"flex items-center gap-1 text-text-sm text-theme-text-secondary",children:t.original.id.slice(0,8)}),e.jsx(w,{copyText:t.original.id})]})]})]})}},{id:"author",header:"Author",accessorFn:s=>{var t;return(t=s.body)==null?void 0:t.user},cell:({getValue:s})=>{const t=s();return e.jsx(e.Fragment,{children:e.jsx(Ne,{username:se(t)})})}},{id:"created_at",header:"Created At",accessorFn:s=>{var t;return(t=s.body)==null?void 0:t.created},cell:({getValue:s})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(ye,{dateString:s()})})},{id:"admin_actions",header:"",accessorFn:s=>String(s.id),cell:({row:s,getValue:t})=>{var r,n,i;const a=t();return(i=(n=(r=s.original.body)==null?void 0:r.user)==null?void 0:n.body)!=null&&i.is_admin?e.jsx(Fe,{secretId:a}):e.jsx("p",{className:"text-sm text-theme-text-secondary",children:"No Actions"})}}],y=1,Oe=f.object({page:f.coerce.number().min(y).optional().default(y).catch(y),name:f.string().optional(),operator:f.enum(["and","or"]).optional()});function Ae(){const[s]=Se(),{page:t,name:a,operator:r}=Oe.parse({page:s.get("page")||void 0,name:s.get("name")||void 0,operator:s.get("operator")||void 0});return{page:t,name:a,logical_operator:r}}function Ve(){const s=Ae(),{data:t}=v({...ue.secretList({...s,sort_by:"desc:created"}),throwOnError:!0}),{data:a}=te(),r=(a==null?void 0:a.id)||"",{data:n,isLoading:i,isError:o,isSuccess:u}=v({...xe.workspaceDetail("default")});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsx(ie,{searchParams:s}),i?e.jsx("div",{children:"Loading..."}):o?e.jsx("div",{children:"Error loading workspace details."}):u&&e.jsx(ke,{id:r,workspace:n})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:t?e.jsx(ae,{columns:Pe,data:t.items}):e.jsx(S,{className:"h-[250px] w-full"})}),t?t.total_pages>1&&e.jsx(le,{searchParams:s,paginate:t}):e.jsx(S,{className:"h-[36px] w-[300px]"})]})]})}function ss(){const{setCurrentBreadcrumbData:s}=re();return x.useEffect(()=>{s({segment:"secrets",data:null})},[]),e.jsxs(ne,{className:"space-y-4 p-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Secrets"}),e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:["Configure and manage your pipeline secrets and configurations."," ",e.jsx("a",{target:"_blank",rel:"noreferrer noopener",href:"https://docs.zenml.io/how-to/interact-with-secrets",className:"link text-primary-400",children:"Learn More"})]})]}),e.jsx(Ve,{})]})}export{ss as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{j as e,r as m}from"./@radix-AvWw-1nd.js";import{aC as g,aD as b,aE as v,aF as y,aG as S,B as h,aH as C}from"./index-
|
1
|
+
import{j as e,r as m}from"./@radix-AvWw-1nd.js";import{aC as g,aD as b,aE as v,aF as y,aG as S,B as h,aH as C}from"./index-DPjvk73v.js";import{I as l}from"./Infobox-BHEdNmME.js";import{V as d,g as p}from"./Commands-CbOMmarC.js";import{H as j}from"./Helpbox-DIx6mDOH.js";import{S as w,a as k,b as A}from"./gcp-0u4le6mC.js";import{S as z}from"./kubernetes-eA-Y6gE7.js";import{S as T}from"./docker-B3Sqzd8J.js";import"./@tanstack-CcI3lvwB.js";import"./@react-router-BUo5vhN4.js";import"./@reactflow-BHoFKFSZ.js";import"./CodeSnippet-DUkCnBpQ.js";import"./help-CfT0tY2I.js";const N="/assets/connectors-video-C9qY4syJ.svg",s="w-5 h-5",P=[{label:"Kubernetes",value:"kubernetes",icon:e.jsx(z,{className:s})},{label:"GCP",value:"gcp",icon:e.jsx(w,{className:s})},{label:"Docker",value:"docker",icon:e.jsx(T,{className:s})},{label:"Azure",value:"azure",icon:e.jsx(k,{className:s})},{label:"AWS",value:"aws",icon:e.jsx(A,{className:s})}],I={help:{href:"https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/kubernetes-service-connector",text:"Use the complete guide to set up your Kubernetes Service Connector."},prerequisites:i("kubernetes","Kubernetes"),listCommand:a("kubernetes","Kubernetes"),topInfobox:"The ZenML Kubernetes service connector facilitates authenticating and connecting to a Kubernetes cluster. The connector can be used to access to any generic Kubernetes cluster by providing pre-authenticated Kubernetes python clients to Stack Components that are linked to it and also allows configuring the local Kubernetes CLI (i.e. kubectl).",bottomInfobox:"Upon completion of the installation of the required prerequisites and integration, our documentation provides you with a comprehensive list of resource types that can be employed to establish your connector. Please refer to the documentation to explore all available options."},q={help:{text:"Use the complete guide to set up your GCP Service Connector.",href:"https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/gcp-service-connector"},prerequisites:i("gcp","GCP"),listCommand:a("gcp","GCP"),bottomInfobox:"Upon completion of the installation of the required prerequisites and integration, our documentation will guide you with a comprehensive list of all the resource types that can be employed to establish your GCP connector. Please refer to the documentation to explore all available options.",topInfobox:"The ZenML GCP Service Connector facilitates the authentication and access to managed GCP services and resources. These encompass a range of resources, including GCS buckets, GCR container repositories, and GKE clusters. The connector provides support for various authentication methods, including GCP user accounts, service accounts, short-lived OAuth 2.0 tokens, and implicit authentication."},G={help:{text:"Use the complete guide to set up your Docker Service Connector.",href:"https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/docker-service-connector"},listCommand:a("docker","Docker"),topInfobox:"The ZenML Docker Service Connector allows authenticating with a Docker or OCI container registry and managing Docker clients for the registry. This connector provides pre-authenticated python-docker Python clients to Stack Components that are linked to it.",bottomInfobox:"No Python packages are required for this Service Connector. All prerequisites are included in the base ZenML Python package. Docker needs to be installed on environments where container images are built and pushed to the target container registry. Please refer to the documentation to explore all available options."},K={help:{text:"Use the complete guide to set up your Azure Service Connector.",href:"https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/azure-service-connector"},listCommand:a("azure","Azure"),prerequisites:i("azure","Azure"),topInfobox:"The ZenML Azure Service Connector facilitates the authentication and access to managed Azure services and resources. These encompass a range of resources, including blob storage containers, ACR repositories, and AKS clusters.",bottomInfobox:"Upon completion of the installation of the required prerequisites and integration, our documentation will guide you with a comprehensive list of all the resource types that can be employed to establish your Azure connector. Please refer to the documentation to explore all available options."},L={help:{text:"Use the complete guide to set up your AWS Service Connector.",href:"https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/aws-service-connector"},listCommand:a("aws","AWS"),prerequisites:i("aws","AWS"),topInfobox:"The ZenML AWS Service Connector facilitates the authentication and access to managed AWS services and resources. These encompass a range of resources, including S3 buckets, ECR container repositories, and EKS clusters. The connector provides support for various authentication methods, including explicit long-lived AWS secret keys, IAM roles, short-lived STS tokens, and implicit authentication.",bottomInfobox:"Upon completion of the installation of the required prerequisites and integration, our documentation will guide you with a comprehensive list of all the resource types that can be employed to establish your AWS connector. Please refer to the documentation to explore all available options."};function a(t,o){return{command:`zenml service-connector list-types --type ${t}`,description:`List ${o} Connector Types`}}function i(t,o){return[{description:"Install the prerequisites",command:`pip install "zenml[connectors-${t}]"`},{description:`Install the entire ${o} ZenML integration`,command:`zenml integration install ${t}`}]}function M({id:t,selectedType:o,onTypeChange:c}){return e.jsxs(g,{value:o,onValueChange:n=>c(n),children:[e.jsx(b,{id:t,className:"w-[250px] border border-neutral-300 px-2 text-left text-text-md",children:e.jsx(v,{placeholder:"Select Connector Type"})}),e.jsx(y,{className:"",children:P.map(n=>e.jsx(S,{value:n.value,children:e.jsxs("div",{className:"flex items-center gap-1",children:[n.icon,n.label]})},n.value))})]})}function D(){return e.jsx(l,{children:e.jsxs("div",{className:"flex w-full flex-wrap items-center gap-x-2 gap-y-0.5 text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"We are creating a new Connectors experience"}),e.jsx("p",{children:"In the meanwhile you can use the CLI to add and manage your connectors."})]})})}function W(){const t="https://zenml.portal.trainn.co/share/V6magMJZZvMptz1wdnUmPA/embed?autoplay=false";return e.jsxs(h,{className:"flex flex-col-reverse items-stretch overflow-hidden lg:flex-row",children:[e.jsxs("div",{className:"w-full p-7 lg:w-2/3",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Learn More about Connectors"}),e.jsx("p",{className:"mt-2 text-text-lg text-theme-text-secondary",children:"Dive into Service Connector Types for a documented approach to secure authentication and authorization practices."}),e.jsx(d,{videoLink:t,buttonText:"Watch the Starter Guide (2 min)"})]}),e.jsx("div",{className:"flex w-full items-center justify-center bg-primary-50 lg:w-1/3",children:e.jsx(d,{fallbackImage:e.jsx("img",{src:N,alt:"Purple squares with text indicating a starter guide for secrets",className:"h-full w-full"}),videoLink:t,isButton:!1})})]})}function U(){const[t,o]=m.useState("kubernetes");return e.jsxs("section",{className:"space-y-5 pl-8 pr-5",children:[e.jsx(M,{selectedType:t,onTypeChange:o,id:"connector-select"}),Z(t)]})}function r({topInfobox:t,bottomInfobox:o,listCommand:c,prerequisites:n,help:u}){return e.jsxs(e.Fragment,{children:[e.jsx(l,{className:"text-text-md",intent:"neutral",children:t}),p(c),n&&e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"Prerequisites"}),n.map((x,f)=>e.jsx(m.Fragment,{children:p(x)},f))]}),e.jsx(l,{className:"text-text-md",intent:"neutral",children:o}),e.jsx(j,{text:u.text,link:u.href})]})}function Z(t){switch(t){case"kubernetes":return r(I);case"gcp":return r(q);case"docker":return r(G);case"azure":return r(K);case"aws":return r(L)}}function ee(){return e.jsxs(h,{className:"space-y-4 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Secrets"}),e.jsx(D,{}),e.jsx(W,{}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(C,{}),"Administering your Connectors"]}),e.jsx(U,{})]})}export{ee as default};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as u,j as a}from"./@radix-AvWw-1nd.js";import{u as h,c as w,S as v,a as y,b as k}from"./form-schemas-
|
1
|
+
import{r as u,j as a}from"./@radix-AvWw-1nd.js";import{u as h,c as w,S as v,a as y,b as k}from"./form-schemas-Bm-dTV3L.js";import{S}from"./SetPassword-B0o5kSJU.js";import{I as x,h as j,j as N,F as A,o as C,p as q,e as P,f as z,i as E}from"./index-DPjvk73v.js";import{u as F}from"./index.esm-cf-8NBxV.js";import{t as M}from"./zod-CRNUMWWg.js";import{b as T}from"./@tanstack-CcI3lvwB.js";import{u as U}from"./login-mutation-D6uiKsKk.js";import"./check-circle-DyCCYTA0.js";import"./@react-router-BUo5vhN4.js";import"./UpdatePasswordSchemas-Bauivjf-.js";import"./PasswordChecker-B4Uw6BJZ.js";import"./@reactflow-BHoFKFSZ.js";const g=u.createContext(null);function $({children:e,initialSettings:r}){const[t,s]=u.useState(r||{});return a.jsx(g.Provider,{value:{serverSettings:t,setServerSettings:s},children:e})}function f(){const e=u.useContext(g);if(e===null)throw new Error("useServerActivationContext must be used within an ServerActivationProvider");return e}function I(){const{setSurveyStep:e}=h(),{setServerSettings:r}=f();function t({newPassword:s,username:o}){r(i=>({...i,admin_password:s,admin_username:o})),e(i=>i+1)}return a.jsx(S,{displayUsername:!0,headline:"Create your admin user and password",subHeadine:"Select a username and password for your admin account",submitHandler:t})}const m=e=>{e=1831565813+(e|=0)|0;let r=Math.imul(e^e>>>15,1|e);return r=r+Math.imul(r^r>>>7,61|r)^r,((r^r>>>14)>>>0)/4294967296};class L{constructor(r){this.dictionaries=void 0,this.length=void 0,this.separator=void 0,this.style=void 0,this.seed=void 0;const{length:t,separator:s,dictionaries:o,style:i,seed:l}=r;this.dictionaries=o,this.separator=s,this.length=t,this.style=i,this.seed=l}generate(){if(!this.dictionaries)throw new Error('Cannot find any dictionary. Please provide at least one, or leave the "dictionary" field empty in the config object');if(this.length<=0)throw new Error("Invalid length provided");if(this.length>this.dictionaries.length)throw new Error(`The length cannot be bigger than the number of dictionaries.
|
2
2
|
Length provided: ${this.length}. Number of dictionaries provided: ${this.dictionaries.length}`);let r=this.seed;return this.dictionaries.slice(0,this.length).reduce((t,s)=>{let o;r?(o=(l=>{if(typeof l=="string"){const c=l.split("").map(d=>d.charCodeAt(0)).reduce((d,b)=>d+b,1),n=Math.floor(Number(c));return m(n)}return m(l)})(r),r=4294967296*o):o=Math.random();let i=s[Math.floor(o*s.length)]||"";if(this.style==="lowerCase")i=i.toLowerCase();else if(this.style==="capital"){const[l,...c]=i.split("");i=l.toUpperCase()+c.join("")}else this.style==="upperCase"&&(i=i.toUpperCase());return t?`${t}${this.separator}${i}`:`${i}`},"")}}const p={separator:"_",dictionaries:[]},_=e=>{const r=[...e&&e.dictionaries||p.dictionaries],t={...p,...e,length:e&&e.length||r.length,dictionaries:r};if(!e||!e.dictionaries||!e.dictionaries.length)throw new Error('A "dictionaries" array must be provided. This is a breaking change introduced starting from Unique Name Generator v4. Read more about the breaking change here: https://github.com/andreasonny83/unique-names-generator#migration-guide');return new L(t).generate()};var H=["aardvark","aardwolf","albatross","alligator","alpaca","amphibian","anaconda","angelfish","anglerfish","ant","anteater","antelope","antlion","ape","aphid","armadillo","asp","baboon","badger","bandicoot","barnacle","barracuda","basilisk","bass","bat","bear","beaver","bedbug","bee","beetle","bird","bison","blackbird","boa","boar","bobcat","bobolink","bonobo","booby","bovid","bug","butterfly","buzzard","camel","canid","canidae","capybara","cardinal","caribou","carp","cat","caterpillar","catfish","catshark","cattle","centipede","cephalopod","chameleon","cheetah","chickadee","chicken","chimpanzee","chinchilla","chipmunk","cicada","clam","clownfish","cobra","cockroach","cod","condor","constrictor","coral","cougar","cow","coyote","crab","crane","crawdad","crayfish","cricket","crocodile","crow","cuckoo","damselfly","deer","dingo","dinosaur","dog","dolphin","donkey","dormouse","dove","dragon","dragonfly","duck","eagle","earthworm","earwig","echidna","eel","egret","elephant","elk","emu","ermine","falcon","felidae","ferret","finch","firefly","fish","flamingo","flea","fly","flyingfish","fowl","fox","frog","galliform","gamefowl","gayal","gazelle","gecko","gerbil","gibbon","giraffe","goat","goldfish","goose","gopher","gorilla","grasshopper","grouse","guan","guanaco","guineafowl","gull","guppy","haddock","halibut","hamster","hare","harrier","hawk","hedgehog","heron","herring","hippopotamus","hookworm","hornet","horse","hoverfly","hummingbird","hyena","iguana","impala","jackal","jaguar","jay","jellyfish","junglefowl","kangaroo","kingfisher","kite","kiwi","koala","koi","krill","ladybug","lamprey","landfowl","lark","leech","lemming","lemur","leopard","leopon","limpet","lion","lizard","llama","lobster","locust","loon","louse","lungfish","lynx","macaw","mackerel","magpie","mammal","manatee","mandrill","marlin","marmoset","marmot","marsupial","marten","mastodon","meadowlark","meerkat","mink","minnow","mite","mockingbird","mole","mollusk","mongoose","monkey","moose","mosquito","moth","mouse","mule","muskox","narwhal","newt","nightingale","ocelot","octopus","opossum","orangutan","orca","ostrich","otter","owl","ox","panda","panther","parakeet","parrot","parrotfish","partridge","peacock","peafowl","pelican","penguin","perch","pheasant","pig","pigeon","pike","pinniped","piranha","planarian","platypus","pony","porcupine","porpoise","possum","prawn","primate","ptarmigan","puffin","puma","python","quail","quelea","quokka","rabbit","raccoon","rat","rattlesnake","raven","reindeer","reptile","rhinoceros","roadrunner","rodent","rook","rooster","roundworm","sailfish","salamander","salmon","sawfish","scallop","scorpion","seahorse","shark","sheep","shrew","shrimp","silkworm","silverfish","skink","skunk","sloth","slug","smelt","snail","snake","snipe","sole","sparrow","spider","spoonbill","squid","squirrel","starfish","stingray","stoat","stork","sturgeon","swallow","swan","swift","swordfish","swordtail","tahr","takin","tapir","tarantula","tarsier","termite","tern","thrush","tick","tiger","tiglon","toad","tortoise","toucan","trout","tuna","turkey","turtle","tyrannosaurus","unicorn","urial","vicuna","viper","vole","vulture","wallaby","walrus","warbler","wasp","weasel","whale","whippet","whitefish","wildcat","wildebeest","wildfowl","wolf","wolverine","wombat","woodpecker","worm","wren","xerinae","yak","zebra"],D=["amaranth","amber","amethyst","apricot","aqua","aquamarine","azure","beige","black","blue","blush","bronze","brown","chocolate","coffee","copper","coral","crimson","cyan","emerald","fuchsia","gold","gray","green","harlequin","indigo","ivory","jade","lavender","lime","magenta","maroon","moccasin","olive","orange","peach","pink","plum","purple","red","rose","salmon","sapphire","scarlet","silver","tan","teal","tomato","turquoise","violet","white","yellow"];const R=["booby","swallow"];function V(){return _({dictionaries:[D,H.filter(e=>!R.includes(e))]})}function Y({submitHandler:e}){const r=u.useId(),{handleSubmit:t,register:s,formState:{isValid:o}}=F({resolver:M(w),defaultValues:{serverName:V()}});return a.jsxs("div",{className:"max-w-[570px] space-y-5",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-display-xs font-semibold",children:"Almost there! Select a server name"}),a.jsx("p",{className:"text-theme-text-secondary",children:"This will identify your ZenML server. You can use the generated name or create your own."})]}),a.jsxs("form",{onSubmit:t(e),className:"space-y-5",children:[a.jsx("div",{className:"space-y-2",children:a.jsxs("div",{className:"space-y-0.5",children:[a.jsx("label",{htmlFor:r,className:"text-text-sm",children:"Server Name"}),a.jsx(x,{...s("serverName"),id:r,className:"w-full"})]})}),a.jsx(j,{disabled:!o,className:"w-full text-center",size:"md",children:a.jsx("span",{className:"w-full",children:"Activate your Server"})})]})]})}async function Z(e){const r=C(q.activate),t=await N(r,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const s=await t.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Failed to activate server");throw new A({status:t.status,statusText:t.statusText,message:s})}return t.json()}function B(e){return T({mutationFn:async r=>Z(r),...e})}function G({setUsername:e}){const{serverSettings:r}=f(),{setSurveyStep:t}=h(),{setAuthState:s}=P(),{toast:o}=z(),{mutate:i}=U({onSuccess:()=>{s("true"),t(n=>n+1)}}),{mutate:l}=B({onSuccess:async n=>{e(n.name),i({username:n.name,password:r.admin_password??void 0})},onError:n=>{n instanceof Error&&o({status:"error",emphasis:"subtle",icon:a.jsx(E,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:n.message,rounded:!0})}});function c({serverName:n}){l({...r,server_name:n})}return a.jsx(Y,{submitHandler:c})}function J(){const{surveyStep:e}=h(),[r,t]=u.useState("");return a.jsx(a.Fragment,{children:a.jsxs($,{children:[a.jsx(v,{stepAmount:2}),e===1&&a.jsx(I,{}),e===2&&a.jsx(G,{setUsername:t}),e===3&&a.jsx(y,{subHeader:"Your created your ZenML account",username:r})]})})}function le(){return a.jsx(k,{children:a.jsx(J,{})})}export{le as default};
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import{r as l,j as e}from"./@radix-AvWw-1nd.js";import{b as p,u as D,a as v,S,E as C}from"./SecretTooltip-mMAAP4dM.js";import{a as f,c as N}from"./@tanstack-CcI3lvwB.js";import{at as b,aL as w,au as k,aM as E,av as T,I as j,aN as K,ax as A,h,D as V,w as O,x as L,y as B,S as z,ak as F,al as I,N as Q,n as R,B as q,K as M}from"./index-DPjvk73v.js";import{S as P}from"./key-icon-CjwWwoOU.js";import{S as H}from"./trash-B_JgTgqd.js";import{A as _}from"./AlertDialogDropdownItem-D7KZcPFw.js";import{b as $}from"./@react-router-BUo5vhN4.js";import"./plus-CoKtHiA9.js";import"./zod-CRNUMWWg.js";import"./index.esm-cf-8NBxV.js";import"./CodeSnippet-DUkCnBpQ.js";import"./@reactflow-BHoFKFSZ.js";function U({secretId:s,keyName:r}){const{data:t,isLoading:a,isError:u}=f({...p.secretDetail(s)}),i=N(),{mutate:c}=D({onError(d){b(d)&&w({status:"error",emphasis:"subtle",description:d.message,rounded:!0})},onSuccess(){i.invalidateQueries({queryKey:["secrets"]}),i.invalidateQueries({queryKey:["secretDetail",s]})}}),[n,m]=l.useState(""),x=()=>{var d;if(t){const g={...(d=t.body)==null?void 0:d.values};delete g[r];const y={name:t.name,scope:"workspace",values:g};c({id:s,body:y})}};function o(d){m(d.target.value)}return a?e.jsx("div",{children:"Loading..."}):u?e.jsx("div",{children:"Error loading secret details"}):e.jsxs(k,{children:[e.jsx(E,{children:e.jsx(T,{children:"Delete Key"})}),e.jsxs("div",{className:"gap-5 p-5",children:[e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Are you sure you want to delete this key?"}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"This action cannot be undone."}),e.jsx("h3",{className:"font-inter text-sm mb-1 mt-4 text-left font-medium leading-5",children:"Please type DELETE to confirm"}),e.jsx(j,{name:"key",onChange:o,className:"w-full",required:!0,value:n})]}),e.jsxs(K,{className:"gap-[10px]",children:[e.jsx(A,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{intent:"danger",type:"button",onClick:x,disabled:n!=="DELETE",children:"Delete"})]})]})}function G({secretId:s,keyName:r}){const[t,a]=l.useState(!1),[u,i]=l.useState(!1),c=l.useRef(null),n=l.useRef(null);function m(){n.current=c.current}function x(o){if(o===!1){a(!1),setTimeout(()=>{i(o)},200);return}i(o)}return e.jsxs(V,{onOpenChange:a,open:t,children:[e.jsx(O,{ref:c,children:e.jsx(L,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(B,{hidden:u,onCloseAutoFocus:o=>{n.current&&(n.current.focus(),n.current=null,o.preventDefault())},align:"end",sideOffset:7,children:e.jsx(_,{onSelect:m,onOpenChange:x,triggerChildren:"Delete ",icon:e.jsx(H,{}),children:e.jsx(U,{secretId:s,keyName:r})})})]})}const J=({value:s})=>{const[r,t]=l.useState(!1),a=typeof s=="string"?s:"",u="•".repeat(a.length);return e.jsxs("div",{className:"flex items-center gap-2 space-x-2",children:[e.jsx(S,{onClick:()=>t(!r),className:"h-4 w-4 flex-shrink-0"}),e.jsx("span",{children:r?a:u})]})};function W(s,r){return[{id:"key",header:"Key",accessorKey:"key",cell:({row:t})=>{const a=`from zenml.client import Client
|
2
|
+
secret = Client().get_secret("${r}")
|
3
|
+
|
4
|
+
# 'secret.secret_values' will contain a dictionary with all key-value pairs within your secret.
|
5
|
+
secret.secret_values["${t.original.key}"]
|
6
|
+
`;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(P,{className:"h-5 w-5 flex-shrink-0 fill-primary-400"}),e.jsx("div",{className:"flex flex-col",children:e.jsx("div",{className:"flex items-center space-x-1",children:e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:t.original.key}),e.jsx(v,{code:a})]})})})]})}},{id:"value",header:"Value",accessorKey:"value",cell:({row:t})=>e.jsx(J,{value:t.getValue("value")})},{id:"actions",header:"",cell:({row:t})=>e.jsx(G,{secretId:s,keyName:t.original.key})}]}function X({secretId:s}){var c;const[r,t]=l.useState(""),a=f({...p.secretDetail(s)});if(a.isPending)return e.jsx(z,{className:"h-[200px] w-full"});if(a.isError)return e.jsx("div",{children:a.error.message});const i=Object.entries(((c=a.data.body)==null?void 0:c.values)||{}).map(([n,m])=>({key:n,value:m})).filter(n=>n.key.toLowerCase().includes(r.toLowerCase()));return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-2",children:[e.jsx(j,{type:"text",placeholder:"Search Keys...",value:r,onChange:n=>t(n.target.value),inputSize:"md"}),e.jsxs(F,{children:[e.jsx(I,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"primary",children:"Edit Keys"})}),e.jsx(C,{secretId:s,isSecretNameEditable:!1,dialogTitle:"Edit keys"})]})]}),e.jsx("div",{className:"w-full",children:e.jsx(Q,{columns:W(s,a.data.name),data:i})})]})}function ue(){const{secretId:s}=$(),{setCurrentBreadcrumbData:r}=R(),{data:t}=f({...p.secretDetail(s||"")});return l.useEffect(()=>{t&&r({segment:"secretsDetail",data:{name:t.name,id:t.id}})},[t]),e.jsx(e.Fragment,{children:e.jsxs(q,{className:"space-y-5 p-5",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:t==null?void 0:t.name}),e.jsxs("div",{className:"group/copybutton flex items-center space-x-1",children:[e.jsx("div",{className:"text-theme-text-secondary",children:s==null?void 0:s.slice(0,8)}),e.jsx(M,{copyText:s})]})]}),e.jsx(X,{secretId:s||""})]})})}export{ue as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as u,j as r}from"./@radix-AvWw-1nd.js";import{B as f,F as x,W as h}from"./Wizard-XEp9rGmf.js";import{Y as j,S as C,h as a,r as m}from"./index-DPjvk73v.js";import{a as b,b as p,L as v}from"./@react-router-BUo5vhN4.js";import{a as g}from"./@tanstack-CcI3lvwB.js";import{C as E}from"./configuration-form-BJUCr0wl.js";import"./@reactflow-BHoFKFSZ.js";import"./index-CzhJC6pc.js";import"./plus-CoKtHiA9.js";import"./trash-B_JgTgqd.js";import"./index.esm-cf-8NBxV.js";import"./type-guards-CaeD8wHO.js";import"./index-eIIP-0dQ.js";import"./zod-CRNUMWWg.js";import"./ComponentIcon-Dx5fBrDX.js";import"./layout-3_rgDUxf.js";import"./rocket-k68ONPDS.js";import"./check-DZ0KAh3W.js";import"./CodeSnippet-DUkCnBpQ.js";import"./file-text-CgxVzNph.js";import"./terminal-square-URAPn9DB.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 K(){return r.jsx("section",{className:"layout-container mt-5 pb-5",children:r.jsx(h,{children:r.jsx(y,{})})})}export{K as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as l,j as e}from"./@radix-AvWw-1nd.js";import{o as T,p as N,q as M,j as _,s as k,F as S,f as B,t as O,v as F,h,D as z,w as I,x as Z,y as U,C as $,E as q,r as f,T as H,G as V,H as Q,J as G,K as y,L as K,M as D,z as c,N as W,S as w,B as J,O as X,P as Y,Q as ee,R as se,U as g,V as te,n as ae,W as ne}from"./index-DPjvk73v.js";import{L as j,d as b,a as re}from"./@react-router-BUo5vhN4.js";import{S as ie}from"./refresh-CupyU1Vs.js";import{S as le,P as oe}from"./SearchField-DjAOZic5.js";import{q as ce,b as de,c as pe,a as ue}from"./@tanstack-CcI3lvwB.js";import{S as R}from"./trash-B_JgTgqd.js";import{D as E,a as L}from"./DeleteAlertDialog-BgTZbbAt.js";import{g as me,E as he,a as xe}from"./ExecutionStatus-CD8Vj7sp.js";import{A as fe}from"./AlertDialogDropdownItem-D7KZcPFw.js";import{R as ge}from"./RunsBody-Cj4sIqQB.js";import{R as je}from"./RunSelector-BVKB4Z8F.js";import{I as Ce}from"./Infobox-BHEdNmME.js";import"./@reactflow-BHoFKFSZ.js";import"./chevron-right-double-zKz7rAaU.js";import"./index-BVVKxTWC.js";import"./zod-CRNUMWWg.js";import"./index.esm-cf-8NBxV.js";import"./check-circle-DyCCYTA0.js";import"./all-pipeline-runs-query-COvsm3bC.js";import"./DisplayDate-C5Aw-Yca.js";import"./InlineAvatar-Bin9UPKJ.js";import"./delete-run-Do3XyF4W.js";const be=s=>l.createElement("svg",{viewBox:"0 0 60 60",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("g",{id:"dataflow-02"},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5 7.5C11.1193 7.5 10 8.61929 10 10C10 11.3807 11.1193 12.5 12.5 12.5C13.8807 12.5 15 11.3807 15 10C15 8.61929 13.8807 7.5 12.5 7.5ZM5 10C5 5.85786 8.35787 2.5 12.5 2.5C15.7655 2.5 18.5436 4.58702 19.5732 7.5L40.4268 7.5C41.4564 4.58702 44.2345 2.5 47.5 2.5C51.6421 2.5 55 5.85786 55 10C55 14.1421 51.6421 17.5 47.5 17.5C44.2345 17.5 41.4564 15.413 40.4268 12.5L32.5 12.5V27.5H40.4268C41.4564 24.587 44.2345 22.5 47.5 22.5C51.6421 22.5 55 25.8579 55 30C55 34.1421 51.6421 37.5 47.5 37.5C44.2345 37.5 41.4564 35.413 40.4268 32.5H32.5V38C32.5 40.1415 32.502 41.5972 32.5939 42.7224C32.6834 43.8185 32.8457 44.379 33.045 44.77C33.5243 45.7108 34.2892 46.4757 35.2301 46.955C35.6211 47.1543 36.1816 47.3166 37.2776 47.4061C38.103 47.4736 39.1062 47.4926 40.4275 47.4979C41.4577 44.586 44.2352 42.5 47.5 42.5C51.6421 42.5 55 45.8579 55 50C55 54.1421 51.6421 57.5 47.5 57.5C44.2338 57.5 41.4552 55.4121 40.4261 52.4982C39.0579 52.4929 37.8787 52.4719 36.8704 52.3895C35.4652 52.2747 34.1734 52.0283 32.9601 51.4101C31.0785 50.4513 29.5487 48.9215 28.5899 47.0399C27.9717 45.8266 27.7253 44.5348 27.6105 43.1296C27.4999 41.7766 27.5 40.1157 27.5 38.1032V12.5L19.5732 12.5C18.5436 15.413 15.7655 17.5 12.5 17.5C8.35787 17.5 5 14.1421 5 10ZM47.5 7.5C46.1193 7.5 45 8.61929 45 10C45 11.3807 46.1193 12.5 47.5 12.5C48.8807 12.5 50 11.3807 50 10C50 8.61929 48.8807 7.5 47.5 7.5ZM47.5 27.5C46.1193 27.5 45 28.6193 45 30C45 31.3807 46.1193 32.5 47.5 32.5C48.8807 32.5 50 31.3807 50 30C50 28.6193 48.8807 27.5 47.5 27.5ZM47.5 47.5C46.1193 47.5 45 48.6193 45 50C45 51.3807 46.1193 52.5 47.5 52.5C48.8807 52.5 50 51.3807 50 50C50 48.6193 48.8807 47.5 47.5 47.5Z"})));async function ve({params:s}){const a=T(N.pipelines.all+"?"+M(s)),t=await _(a,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.status===404&&k(),!t.ok)throw new S({message:"Error while fetching pipelines",status:t.status,statusText:t.statusText});return t.json()}const v={all:["pipelines"],pipelineList:s=>ce({queryKey:[...v.all,s],queryFn:async()=>ve({params:s})})};async function Pe({pipelineId:s}){const a=T(N.pipelines.detail(s)),t=await fetch(a,{method:"DELETE",credentials:"include",headers:{"Content-Type":"application/json"}});if(!t.ok){const r=await t.json().then(n=>n.detail).catch(()=>`Failed to delete pipeline ${s}`);throw new S({status:t.status,statusText:t.statusText,message:r})}return t.json()}function ye(s){return de({mutationFn:Pe,...s})}const A=l.createContext(null);function we({children:s}){const[a,t]=l.useState([]),r=pe(),{toast:n}=B(),i=ye(),o=async d=>{try{const p=d.map(x=>i.mutateAsync({pipelineId:x}));await Promise.all(p),n({description:"Deleted successfully.",status:"success",emphasis:"subtle",rounded:!0}),await r.invalidateQueries({queryKey:v.all}),t([])}catch(p){console.error("Failed to delete some pipelines:",p)}};return e.jsx(A.Provider,{value:{selectedPipelines:a,setSelectedPipelines:t,bulkDeletePipelines:o},children:s})}function m(){const s=l.useContext(A);if(!s)throw new Error("usePipelinesSelectorContext must be used within a PipelinesSelectorProvider");return s}function Te(){const[s,a]=l.useState(!1),{bulkDeletePipelines:t,selectedPipelines:r}=m();async function n(){await t(r),a(!1)}return e.jsxs(O,{open:s,onOpenChange:a,children:[e.jsx(F,{children:e.jsxs(h,{className:"rounded-sharp border-none bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(R,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(E,{title:`Delete Pipeline${r.length>=2?"s":""}`,handleDelete:n,children:e.jsxs(L,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function Ne(){const{selectedPipelines:s}=m();return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:`${s==null?void 0:s.length} Pipeline${(s==null?void 0:s.length)>1?"s":""} selected`}),e.jsx(Te,{})]})}function Se({id:s}){const[a,t]=l.useState(!1),[r,n]=l.useState(!1),i=l.useRef(null),o=l.useRef(null),{bulkDeletePipelines:d}=m();async function p(){await d([s]),P(!1)}function x(){o.current=i.current}function P(u){if(u===!1){n(!1),setTimeout(()=>{t(u)},200);return}t(u)}return e.jsxs(z,{onOpenChange:n,open:r,children:[e.jsx(I,{ref:i,children:e.jsx(Z,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(U,{hidden:a,onCloseAutoFocus:u=>{o.current&&(o.current.focus(),o.current=null,u.preventDefault())},align:"end",sideOffset:7,children:e.jsx(fe,{onSelect:x,open:a,onOpenChange:P,triggerChildren:"Delete",icon:e.jsx(R,{fill:"red"}),children:e.jsx(E,{title:"Delete Pipeline",handleDelete:p,children:e.jsxs(L,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})})]})}const De=({id:s})=>{const{selectedPipelines:a,setSelectedPipelines:t}=m(),r=(n,i)=>{t(o=>n?[...o,i]:o.filter(d=>d!==i))};return e.jsx($,{id:s,onCheckedChange:n=>r(n,s),checked:a.includes(s),className:"h-3 w-3"})};function Re(){return[{id:"check",header:"",meta:{width:"1%"},cell:({row:s})=>e.jsx(De,{id:s.original.id})},{id:"name",header:"Pipeline",cell:({row:s})=>{var a,t,r;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(q,{className:`h-5 w-5 ${me((a=s.original.body)==null?void 0:a.latest_run_status)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(j,{to:f.pipelines.namespace(encodeURIComponent(s.original.name)),className:"flex items-center gap-1",children:e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:s.original.name})}),e.jsx(H,{children:e.jsxs(V,{children:[e.jsx(Q,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(he,{status:(t=s.original.body)==null?void 0:t.latest_run_status})}),e.jsx(G,{className:"z-20 capitalize",children:(r=s.original.body)==null?void 0:r.latest_run_status})]})}),e.jsx(y,{copyText:s.original.name})]}),e.jsxs(j,{to:f.pipelines.namespace(encodeURIComponent(s.original.name)),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:s.original.id.split("-")[0]}),e.jsx(y,{copyText:s.original.id})]})]})]})}},{id:"latest-run",header:"Latest Run",accessorFn:s=>{var a,t;return{status:(a=s.body)==null?void 0:a.latest_run_status,runId:(t=s.body)==null?void 0:t.latest_run_id}},cell:({getValue:s})=>{const{runId:a,status:t}=s();return!a||!t?e.jsx("div",{children:"No run"}):e.jsx(j,{to:f.runs.detail(a),children:e.jsxs(K,{emphasis:"subtle",rounded:!1,className:"inline-flex items-center gap-0.5",color:xe(t),children:[e.jsx(D,{className:"h-3 w-3 fill-current"}),a==null?void 0:a.split("-")[0]]})})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:s})=>e.jsx(Se,{id:s.original.id})}]}const C=1,Ee=c.object({page:c.coerce.number().min(C).optional().default(C).catch(C),name:c.string().optional(),operator:c.enum(["and","or"]).optional()});function Le(){const[s]=b(),{page:a,name:t,operator:r}=Ee.parse({page:s.get("page")||void 0,name:s.get("name")||void 0,operator:s.get("operator")||void 0});return{page:a,name:t,logical_operator:r}}function Ae(){const s=Le(),{selectedPipelines:a}=m(),{data:t,refetch:r}=ue({...v.pipelineList({...s,sort_by:"desc:latest_run"}),throwOnError:!0});return e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[a.length?e.jsx(Ne,{}):e.jsx(le,{searchParams:s}),e.jsx("div",{className:"flex justify-between",children:e.jsxs(h,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>r(),children:[e.jsx(ie,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:t?e.jsx(W,{columns:Re(),data:t.items}):e.jsx(w,{className:"h-[500px] w-full"})}),t?t.total_pages>1&&e.jsx(oe,{searchParams:s,paginate:t}):e.jsx(w,{className:"h-[36px] w-[300px]"})]})]})}const Me=c.object({tab:c.enum(["pipelines","runs","templates"]).optional().default("pipelines").catch("pipelines")});function _e(){const[s]=b(),{tab:a}=Me.parse({tab:s.get("tab")||void 0});return a}const ke="/assets/templates-1S_8WeSK.webp";function Be(){return e.jsxs("div",{className:"layout-container space-y-5",children:[e.jsx(Oe,{}),e.jsx(ze,{})]})}function Oe(){return e.jsx(Ce,{children:e.jsxs("div",{className:"flex w-full flex-wrap items-center gap-x-2 gap-y-0.5 text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"This is a ZenML Pro feature. "}),e.jsx("p",{children:"Upgrade to ZenML Pro to access the Templates and save settings and run pipelines from the dashboard."})]})})}const Fe=["Run pipelines from the dashboard with Templates","Re-run a pipeline easily from the UI","Model and Artifact Control Plane Dashboard","Managed ZenML server on your VPC or hosted on our servers","Social SSO, RBAC, and User Management","CI/CD/CT, and more!"];function ze(){return e.jsxs(J,{className:"relative overflow-hidden px-7 py-5",children:[e.jsxs("div",{className:"max-w-[450px] space-y-4",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Access Advanced Template Features with ZenML Pro"}),e.jsx("ul",{className:"space-y-2",children:Fe.map((s,a)=>e.jsx("li",{className:"text-text-md text-theme-text-secondary",children:s},a))}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(h,{size:"md",asChild:!0,children:e.jsx("a",{href:"https://cloud.zenml.io/signup",target:"_blank",rel:"noopener noreferrer",children:"Upgrade to ZenML Pro"})}),e.jsx(h,{emphasis:"minimal",size:"md",children:e.jsx("a",{href:"https://www.zenml.io/pro",target:"_blank",rel:"noopener noreferrer",children:"Learn more"})})]})]}),e.jsx("img",{className:"absolute right-0 top-0 hidden translate-x-[30%] scale-75 md:translate-y-[30%] lg:block xl:-translate-y-[5%]",src:ke,alt:"Screenshot of Zenml Pro Templates Feature"})]})}const Ie=[{value:"pipelines",label:"Pipelines",icon:be},{value:"runs",label:"Runs",icon:D},{value:"templates",label:"Templates",icon:te}];function Ze(){const[s]=b(),a=_e(),t=re();l.useEffect(()=>{if(!s.get("tab")){const i=new URLSearchParams(s);i.set("tab","pipelines"),t(`?${i.toString()}`,{replace:!0})}},[t,s]);function r(n){const i=new URLSearchParams;i.set("tab",n),t(`?${i.toString()}`)}return e.jsx("div",{className:"p-5",children:e.jsxs(X,{onValueChange:r,value:a,children:[e.jsx(Y,{children:Ie.map(n=>e.jsxs(ee,{className:"flex items-center gap-2 text-text-md",value:n.value.toLowerCase(),children:[e.jsx(n.icon,{className:`h-5 w-5 ${a===n.value?"fill-primary-400":"fill-theme-text-tertiary"}`}),n.label,n.value==="templates"&&e.jsx(se,{className:"rounded-sm font-semibold text-primary-500",color:"purple",size:"sm",children:"New"})]},n.value))}),e.jsx(g,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"pipelines",children:e.jsx(we,{children:e.jsx(Ae,{})})}),e.jsx(g,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"runs",children:e.jsx(je,{children:e.jsx(ge,{})})}),e.jsx(g,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"templates",children:e.jsx(Be,{})})]})})}function ps(){const{setCurrentBreadcrumbData:s}=ae();return l.useEffect(()=>{s({segment:"pipelines",data:null})},[]),e.jsxs("div",{children:[e.jsx(ne,{children:e.jsx("h1",{className:"text-display-xs font-semibold",children:"Pipelines"})}),e.jsx(Ze,{})]})}export{ps as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as o,j as e}from"./@radix-AvWw-1nd.js";import{o as j,p as C,q as M,j as y,s as T,F as b,ak as F,al as E,h,am as P,an as U,ao as k,ap as O,z as m,f as v,I,aq as R,ar as _,as as q,at as H,i as D,au as z,av as Z,aw as B,ax as K,ay as Q,D as V,w as L,x as G,y as J,R as w,az as $,l as W,S as f,N as X,B as Y}from"./index-DPjvk73v.js";import{S as ee,P as se}from"./SearchField-DjAOZic5.js";import{a as te,b as N,c as A}from"./@tanstack-CcI3lvwB.js";import{C as ae}from"./CodeSnippet-DUkCnBpQ.js";import{u as re}from"./index.esm-cf-8NBxV.js";import{D as ne}from"./DisplayDate-C5Aw-Yca.js";import{I as ie}from"./InlineAvatar-Bin9UPKJ.js";import{A as oe}from"./AlertDialogDropdownItem-D7KZcPFw.js";import{d as le}from"./@react-router-BUo5vhN4.js";import"./@reactflow-BHoFKFSZ.js";import"./chevron-right-double-zKz7rAaU.js";import"./index-BVVKxTWC.js";function ce({params:a}){return["users",a]}async function de({params:a}){const s=j(C.users.all+"?"+M(a)),t=await y(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.status===404&&T(),!t.ok)throw new b({message:"Error while fetching users",status:t.status,statusText:t.statusText});return t.json()}function ue(a,s){return te({queryKey:ce(a),queryFn:()=>de(a),...s})}const me=a=>o.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...a},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 4C8.06703 4 6.50002 5.567 6.50002 7.5C6.50002 9.433 8.06703 11 10 11C11.933 11 13.5 9.433 13.5 7.5C13.5 5.567 11.933 4 10 4ZM4.50002 7.5C4.50002 4.46243 6.96246 2 10 2C13.0376 2 15.5 4.46243 15.5 7.5C15.5 10.5376 13.0376 13 10 13C6.96246 13 4.50002 10.5376 4.50002 7.5ZM19 14C19.5523 14 20 14.4477 20 15V17H22C22.5523 17 23 17.4477 23 18C23 18.5523 22.5523 19 22 19H20V21C20 21.5523 19.5523 22 19 22C18.4477 22 18 21.5523 18 21V19H16C15.4477 19 15 18.5523 15 18C15 17.4477 15.4477 17 16 17H18V15C18 14.4477 18.4477 14 19 14ZM7.32629 14.5C7.38335 14.5 7.44125 14.5 7.50003 14.5H12C12.5523 14.5 13 14.9477 13 15.5C13 16.0523 12.5523 16.5 12 16.5H7.50003C6.03171 16.5 5.51923 16.5109 5.12917 16.6292C4.17036 16.92 3.42005 17.6703 3.1292 18.6291C3.01088 19.0192 3.00002 19.5317 3.00002 21C3.00002 21.5523 2.55231 22 2.00002 22C1.44774 22 1.00002 21.5523 1.00002 21C1.00002 20.9412 1 20.8833 0.99998 20.8263C0.999526 19.599 0.999216 18.761 1.21532 18.0486C1.70007 16.4506 2.95059 15.2 4.54859 14.7153C5.261 14.4992 6.09902 14.4995 7.32629 14.5Z"}));async function he(a){const s=j(C.users.all),t=await y(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!t.ok){const r=await t.json().then(n=>n.detail).catch(()=>"Failed to create User");throw new b({status:t.status,statusText:t.statusText,message:r})}return t.json()}function xe(a){return N({mutationFn:async s=>he(s),...a})}function pe(){const[a,s]=o.useState(!1),[t,r]=o.useState(null);return e.jsxs(F,{open:a,onOpenChange:n=>{s(n),r(null)},children:[e.jsx(E,{asChild:!0,children:e.jsx(h,{className:"shrink-0",intent:"primary",children:"Add Member"})}),e.jsxs(P,{className:"",children:[e.jsx(U,{children:e.jsx(k,{children:" Add a New Member"})}),t?e.jsx(ge,{name:t.name,token:O(t)}):e.jsx(fe,{setSuccessMember:r})]})]})}m.object({username:m.string(),isAdmin:m.boolean()});function fe({setSuccessMember:a}){const{toast:s}=v(),t=A(),{mutate:r,isPending:n}=xe({onError(d){H(d)&&s({status:"error",emphasis:"subtle",icon:e.jsx(D,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:d.message,rounded:!0})},onSuccess(d){a(d),t.invalidateQueries({queryKey:["users"]})}}),c=o.useId(),l=o.useId(),{register:i,handleSubmit:x,watch:p,setValue:u}=re();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(I,{...i("username"),id:c,className:"w-full"})]}),e.jsxs("div",{className:"flex gap-5",children:[e.jsx("label",{htmlFor:l,className:"text-text-md",children:"Add user as an Admin"}),e.jsx(R,{onCheckedChange:d=>u("isAdmin",!!d),...i("isAdmin",{value:!1}),id:l})]})]})}),e.jsxs(_,{className:"gap-[10px]",children:[e.jsx(q,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{disabled:!p("username")||n,form:"create-user-form",size:"sm",children:"Generate Token"})]})]})}function ge({token:a,name:s}){return e.jsxs("div",{className:"space-y-5 overflow-hidden p-7 text-center",children:[e.jsx(me,{className:"m-auto mb-5 h-[110px] w-[110px] fill-success-500"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-lg font-semibold text-theme-text-primary",children:`The user ${s} was created successfully!`}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Share the invitation link with the user to complete the registration."})]}),e.jsx(ae,{className:"mx-auto",code:a})]})}const je=a=>o.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...a},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.9681 6.38231C3.73647 7.92199 3 9.87499 3 12C3 16.9706 7.02944 21 12 21C14.125 21 16.078 20.2635 17.6177 19.0319L4.9681 6.38231ZM6.38231 4.9681L19.0319 17.6177C20.2635 16.078 21 14.125 21 12C21 7.02944 16.9706 3 12 3C9.87499 3 7.92199 3.73647 6.38231 4.9681ZM1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12Z"}));async function Ce(a){const s=j(C.users.detail(a)),t=await y(s,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(!t.ok){const r=await t.json().then(n=>n.detail).catch(()=>"Failed to delete User");throw new b({status:t.status,statusText:t.statusText,message:r})}return t.json()}function ye(a){return N({mutationFn:async s=>Ce(s),...a})}function be({userId:a,name:s}){const{toast:t}=v(),r=A(),{isPending:n,mutate:c}=ye({onSuccess(){r.invalidateQueries({queryKey:["users"]})},onError:i=>{i instanceof Error&&t({status:"error",emphasis:"subtle",icon:e.jsx(D,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:i.message,rounded:!0})}});function l(){c(a)}return e.jsxs(z,{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(K,{asChild:!0,children:e.jsx(h,{intent:"secondary",children:"Cancel"})}),e.jsx(Q,{asChild:!0,children:e.jsx(h,{onClick:l,disabled:n,intent:"danger",children:"Delete"})})]})]})}function we({userId:a,name:s}){const[t,r]=o.useState(!1),[n,c]=o.useState(!1),l=o.useRef(null),i=o.useRef(null);function x(){i.current=l.current}function p(u){if(u===!1){c(!1),setTimeout(()=>{r(u)},200);return}r(u)}return e.jsxs(V,{onOpenChange:c,open:n,children:[e.jsx(L,{ref:l,children:e.jsx(G,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(J,{hidden:t,onCloseAutoFocus:u=>{i.current&&(i.current.focus(),i.current=null,u.preventDefault())},align:"end",sideOffset:7,children:e.jsx(oe,{onSelect:x,onOpenChange:p,triggerChildren:"Remove Member",icon:e.jsx(je,{fill:"red"}),children:e.jsx(be,{name:s,userId:a})})})]})}function ve({isAdmin:a}){return[{id:"name",accessorFn:s=>{var t;return{name:s.name,is_admin:!!((t=s.body)!=null&&t.is_admin)}},cell:({getValue:s})=>{const{name:t,is_admin:r}=s();return e.jsxs("div",{className:"flex",children:[e.jsx(ie,{username:t}),r&&e.jsx("div",{children:e.jsx(w,{className:"ml-2 capitalize",size:"xs",color:"purple",children:"Admin"})})]})},header:"User"},{accessorKey:"status",header:"Status",accessorFn:s=>{var t;return{status:(t=s.body)==null?void 0:t.active}},cell:({getValue:s})=>{const{status:t}=s();return e.jsx(w,{className:"capitalize",color:t?"green":"grey",children:t?"Active":"Inactive"})}},{id:"created",header:"Created",accessorFn:s=>{var t;return(t=s.body)==null?void 0:t.created},cell:({getValue:s})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(ne,{dateString:s()})})},...a?[{id:"actions",header:"",accessorFn:s=>({id:s.id,name:$(s)}),meta:{width:"5%"},cell:({getValue:s})=>{const{id:t,name:r}=s();return e.jsx(we,{name:r,userId:t})}}]:[]]}const g=1,De=m.object({page:m.coerce.number().min(g).optional().default(g).catch(g),name:m.string().optional(),operator:m.enum(["and","or"]).optional()});function Ne(){const[a]=le(),{page:s,name:t,operator:r}=De.parse({page:a.get("page")||void 0,name:a.get("name")||void 0,operator:a.get("operator")||void 0});return{page:s,name:t,logical_operator:r}}function Ae(){var l,i;const a=Ne(),{data:s,isError:t}=ue({params:{...a,sort_by:"desc:created"}},{throwOnError:!0}),{data:r,isPending:n,isError:c}=W();return t||c?null:n?e.jsx(f,{className:"h-[350px]"}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsx(ee,{searchParams:a}),((l=r.body)==null?void 0:l.is_admin)&&e.jsx(pe,{})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:s?e.jsx(X,{columns:ve({isAdmin:(i=r.body)==null?void 0:i.is_admin}),data:s.items}):e.jsx(f,{className:"h-[250px] w-full"})}),s?s.total_pages>1&&e.jsx(se,{searchParams:a,paginate:s}):e.jsx(f,{className:"h-[36px] w-[300px]"})]})]})}function He(){return e.jsxs(Y,{className:"flex flex-col gap-4 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Members"}),e.jsx(Ae,{})]})}export{He as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{j as e}from"./@radix-AvWw-1nd.js";import{B as o,aH as n}from"./index-
|
1
|
+
import{j as e}from"./@radix-AvWw-1nd.js";import{B as o,aH as n}from"./index-DPjvk73v.js";import{I as r}from"./Infobox-BHEdNmME.js";import{H as a}from"./Helpbox-DIx6mDOH.js";import{V as s,g as c}from"./Commands-CbOMmarC.js";import"./@tanstack-CcI3lvwB.js";import"./@react-router-BUo5vhN4.js";import"./@reactflow-BHoFKFSZ.js";import"./help-CfT0tY2I.js";import"./CodeSnippet-DUkCnBpQ.js";const l=[{command:"zenml code-repository register <NAME> --type=<CODE_REPOSITORY_TYPE] [--CODE_REPOSITORY_OPTIONS]",description:"Register a code repository"},{command:"zenml code-repository register <NAME> --type=custom --source=<CODE_REPOSITORY_SOURCE> [--CODE_REPOSITORY_OPTIONS]",description:"Use a custom repository "},{command:"zenml code-repository list",description:"List your registered code repositories"},{command:"zenml code-repository delete <REPOSITORY_NAME_OR_ID>",description:"Delete a code repository that you have previously registered"}],d="/assets/repos-video-D8kpu60k.svg";function m(){return e.jsx(r,{children:e.jsxs("div",{className:"flex w-full flex-wrap items-center gap-x-2 gap-y-0.5 text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"We are creating a new Repositories experience"}),e.jsx("p",{children:"In the meanwhile you can use the CLI to add and manage your repos."})]})})}function p(){const t="https://zenml.portal.trainn.co/share/koVfVubiXfXLXtVcDAqPyg/embed?autoplay=false";return e.jsxs(o,{className:"flex flex-col-reverse items-stretch overflow-hidden md:flex-row",children:[e.jsxs("div",{className:"w-full p-7 md:w-2/3",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Learn More about Repositories"}),e.jsx("p",{className:"mt-2 text-text-lg text-theme-text-secondary",children:"Get started with ZenML Repositories for streamlined pipeline versioning and faster Docker builds."}),e.jsx(s,{videoLink:t,buttonText:"Watch the Starter Guide (2 min)"})]}),e.jsx("div",{className:"flex w-full items-center justify-center bg-primary-50 lg:w-1/3",children:e.jsx(s,{fallbackImage:e.jsx("img",{src:d,alt:"Purple squares with text indicating a starter guide for secrets",className:"h-full w-full"}),videoLink:t,isButton:!1})})]})}function x(){return e.jsxs("section",{className:"space-y-5 pl-8 pr-5",children:[e.jsx(r,{className:"text-text-md",intent:"neutral",children:"Code repositories enable ZenML to keep track of the code version that you use for your pipeline runs. Additionally, running a pipeline which is tracked in a registered code repository can decrease the time it takes Docker to build images for containerized stack components."}),l.map((t,i)=>e.jsx(e.Fragment,{children:c(t)},i)),e.jsx(a,{text:"Check all the commands and find more about Repositories in our Docs",link:"https://docs.zenml.io/how-to/setting-up-a-project-repository/connect-your-git-repository"})]})}function E(){return e.jsxs(o,{className:"space-y-4 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Repositories"}),e.jsx(m,{}),e.jsx(p,{}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(n,{}),"Administering your Code Repositories"]}),e.jsx(x,{})]})}export{E as default};
|