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.
Files changed (259) hide show
  1. zenml/VERSION +1 -1
  2. zenml/__init__.py +3 -1
  3. zenml/artifacts/artifact_config.py +2 -2
  4. zenml/artifacts/utils.py +4 -8
  5. zenml/cli/__init__.py +6 -6
  6. zenml/cli/base.py +2 -2
  7. zenml/cli/login.py +2 -2
  8. zenml/cli/server.py +6 -4
  9. zenml/cli/utils.py +3 -3
  10. zenml/client.py +9 -9
  11. zenml/config/compiler.py +1 -1
  12. zenml/config/server_config.py +1 -1
  13. zenml/constants.py +2 -1
  14. zenml/enums.py +12 -0
  15. zenml/integrations/airflow/__init__.py +0 -2
  16. zenml/integrations/argilla/__init__.py +0 -1
  17. zenml/integrations/aws/__init__.py +0 -3
  18. zenml/integrations/azure/__init__.py +0 -2
  19. zenml/integrations/azure/service_connectors/azure_service_connector.py +1 -1
  20. zenml/integrations/bentoml/__init__.py +0 -2
  21. zenml/integrations/bentoml/services/bentoml_container_deployment.py +2 -2
  22. zenml/integrations/bentoml/services/bentoml_local_deployment.py +1 -1
  23. zenml/integrations/bentoml/steps/bentoml_deployer.py +1 -1
  24. zenml/integrations/bitbucket/__init__.py +0 -2
  25. zenml/integrations/comet/__init__.py +0 -2
  26. zenml/integrations/databricks/__init__.py +0 -2
  27. zenml/integrations/databricks/services/databricks_deployment.py +3 -1
  28. zenml/integrations/deepchecks/__init__.py +0 -2
  29. zenml/integrations/discord/__init__.py +0 -2
  30. zenml/integrations/evidently/__init__.py +0 -2
  31. zenml/integrations/facets/__init__.py +0 -2
  32. zenml/integrations/feast/__init__.py +0 -2
  33. zenml/integrations/gcp/__init__.py +0 -3
  34. zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +5 -0
  35. zenml/integrations/github/__init__.py +0 -2
  36. zenml/integrations/github/code_repositories/github_code_repository.py +10 -3
  37. zenml/integrations/gitlab/__init__.py +0 -1
  38. zenml/integrations/gitlab/code_repositories/gitlab_code_repository.py +5 -2
  39. zenml/integrations/great_expectations/__init__.py +0 -3
  40. zenml/integrations/huggingface/__init__.py +0 -1
  41. zenml/integrations/huggingface/services/huggingface_deployment.py +3 -1
  42. zenml/integrations/hyperai/__init__.py +0 -2
  43. zenml/integrations/kaniko/__init__.py +0 -2
  44. zenml/integrations/kubeflow/__init__.py +0 -1
  45. zenml/integrations/kubeflow/orchestrators/kubeflow_orchestrator.py +6 -0
  46. zenml/integrations/kubernetes/__init__.py +0 -2
  47. zenml/integrations/kubernetes/flavors/kubernetes_orchestrator_flavor.py +4 -0
  48. zenml/integrations/kubernetes/orchestrators/kube_utils.py +89 -1
  49. zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator.py +82 -48
  50. zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator_entrypoint.py +44 -10
  51. zenml/integrations/kubernetes/orchestrators/manifest_utils.py +45 -1
  52. zenml/integrations/kubernetes/pod_settings.py +52 -0
  53. zenml/integrations/label_studio/__init__.py +0 -2
  54. zenml/integrations/langchain/__init__.py +0 -2
  55. zenml/integrations/lightgbm/__init__.py +0 -1
  56. zenml/integrations/lightning/__init__.py +0 -2
  57. zenml/integrations/mlflow/__init__.py +1 -3
  58. zenml/integrations/mlflow/services/mlflow_deployment.py +1 -1
  59. zenml/integrations/modal/__init__.py +0 -1
  60. zenml/integrations/neptune/__init__.py +0 -2
  61. zenml/integrations/neural_prophet/__init__.py +0 -2
  62. zenml/integrations/numpy/__init__.py +0 -2
  63. zenml/integrations/openai/__init__.py +0 -1
  64. zenml/integrations/pandas/__init__.py +0 -2
  65. zenml/integrations/pigeon/__init__.py +0 -1
  66. zenml/integrations/pillow/__init__.py +0 -3
  67. zenml/integrations/polars/__init__.py +0 -2
  68. zenml/integrations/prodigy/__init__.py +0 -1
  69. zenml/integrations/pycaret/__init__.py +0 -2
  70. zenml/integrations/pytorch/__init__.py +0 -1
  71. zenml/integrations/pytorch_lightning/__init__.py +0 -2
  72. zenml/integrations/s3/__init__.py +0 -2
  73. zenml/integrations/scipy/__init__.py +0 -2
  74. zenml/integrations/seldon/__init__.py +0 -2
  75. zenml/integrations/seldon/services/seldon_deployment.py +3 -2
  76. zenml/integrations/sklearn/__init__.py +1 -1
  77. zenml/integrations/skypilot/orchestrators/skypilot_base_vm_orchestrator.py +43 -18
  78. zenml/integrations/skypilot_aws/__init__.py +1 -3
  79. zenml/integrations/skypilot_azure/__init__.py +1 -2
  80. zenml/integrations/skypilot_gcp/__init__.py +1 -3
  81. zenml/integrations/skypilot_kubernetes/__init__.py +1 -3
  82. zenml/integrations/skypilot_lambda/__init__.py +1 -3
  83. zenml/integrations/slack/__init__.py +0 -1
  84. zenml/integrations/spark/__init__.py +0 -1
  85. zenml/integrations/tekton/__init__.py +0 -1
  86. zenml/integrations/tekton/orchestrators/tekton_orchestrator.py +5 -0
  87. zenml/integrations/tensorboard/__init__.py +0 -2
  88. zenml/integrations/tensorboard/services/tensorboard_service.py +1 -1
  89. zenml/integrations/tensorflow/__init__.py +0 -2
  90. zenml/integrations/vllm/__init__.py +0 -1
  91. zenml/integrations/vllm/services/vllm_deployment.py +1 -1
  92. zenml/integrations/wandb/__init__.py +0 -1
  93. zenml/integrations/whylogs/__init__.py +0 -1
  94. zenml/integrations/xgboost/__init__.py +0 -2
  95. zenml/login/credentials.py +1 -1
  96. zenml/login/pro/utils.py +1 -0
  97. zenml/materializers/__init__.py +1 -0
  98. zenml/model_deployers/base_model_deployer.py +1 -1
  99. zenml/models/__init__.py +4 -0
  100. zenml/models/v2/base/filter.py +162 -54
  101. zenml/models/v2/base/scoped.py +132 -0
  102. zenml/models/v2/core/artifact_version.py +12 -33
  103. zenml/models/v2/core/model_version.py +12 -50
  104. zenml/models/v2/core/pipeline_run.py +12 -32
  105. zenml/models/v2/core/service.py +2 -2
  106. zenml/models/v2/core/step_run.py +15 -32
  107. zenml/{services/service_type.py → models/v2/misc/service.py} +1 -1
  108. zenml/orchestrators/step_run_utils.py +1 -1
  109. zenml/orchestrators/utils.py +1 -1
  110. zenml/services/__init__.py +3 -5
  111. zenml/services/container/container_service.py +2 -1
  112. zenml/services/local/local_service.py +2 -1
  113. zenml/services/service.py +3 -2
  114. zenml/services/service_endpoint.py +2 -1
  115. zenml/services/service_monitor.py +1 -1
  116. zenml/services/service_status.py +1 -12
  117. zenml/steps/entrypoint_function_utils.py +1 -1
  118. zenml/utils/dashboard_utils.py +73 -8
  119. zenml/utils/server_utils.py +52 -0
  120. zenml/zen_server/dashboard/assets/{404-BbAvjc7Z.js → 404-2I8egBQu.js} +1 -1
  121. zenml/zen_server/dashboard/assets/@reactflow-BHoFKFSZ.js +17 -0
  122. zenml/zen_server/dashboard/assets/{AlertDialogDropdownItem-XL2NfFgP.js → AlertDialogDropdownItem-D7KZcPFw.js} +1 -1
  123. zenml/zen_server/dashboard/assets/CodeSnippet-DUkCnBpQ.js +9 -0
  124. zenml/zen_server/dashboard/assets/{CollapsibleCard-Djtd_ocf.js → CollapsibleCard-B5-5Plnd.js} +1 -1
  125. zenml/zen_server/dashboard/assets/{Commands-V-hH_IKQ.js → Commands-CbOMmarC.js} +1 -1
  126. zenml/zen_server/dashboard/assets/{ComponentBadge-CVN2FsiW.js → ComponentBadge-FrujKBC6.js} +1 -1
  127. zenml/zen_server/dashboard/assets/ComponentIcon-Dx5fBrDX.js +1 -0
  128. zenml/zen_server/dashboard/assets/{CsvVizualization-CWaQcWIN.js → CsvVizualization-B8E3p9we.js} +1 -1
  129. zenml/zen_server/dashboard/assets/{DeleteAlertDialog-CTLRrcFM.js → DeleteAlertDialog-BgTZbbAt.js} +1 -1
  130. zenml/zen_server/dashboard/assets/{DialogItem-ST291Hsl.js → DialogItem-CNWLiJcc.js} +1 -1
  131. zenml/zen_server/dashboard/assets/{Error-CIBjAdSc.js → Error-BkUP4Luv.js} +1 -1
  132. zenml/zen_server/dashboard/assets/ExecutionStatus-CD8Vj7sp.js +1 -0
  133. zenml/zen_server/dashboard/assets/{Helpbox-cwQNH06F.js → Helpbox-DIx6mDOH.js} +1 -1
  134. zenml/zen_server/dashboard/assets/{Infobox-DYKoAVhW.js → Infobox-BHEdNmME.js} +1 -1
  135. zenml/zen_server/dashboard/assets/{InlineAvatar-Bk4QLPTU.js → InlineAvatar-Bin9UPKJ.js} +1 -1
  136. zenml/zen_server/dashboard/assets/{NestedCollapsible-CE4OF670.js → NestedCollapsible-Da-k0Mff.js} +1 -1
  137. zenml/zen_server/dashboard/assets/{Partials-cL1-u_sT.js → Partials-TNaYjHsV.js} +1 -1
  138. zenml/zen_server/dashboard/assets/ProBadge-BfPp-B97.js +1 -0
  139. zenml/zen_server/dashboard/assets/{ProCta-DtUutIul.js → ProCta-7_FtpX3I.js} +1 -1
  140. zenml/zen_server/dashboard/assets/ProviderIcon-CxeziA5a.js +1 -0
  141. zenml/zen_server/dashboard/assets/{ProviderRadio-C4bltH6-.js → ProviderRadio-DPmZHff_.js} +1 -1
  142. zenml/zen_server/dashboard/assets/RunSelector-BVKB4Z8F.js +1 -0
  143. zenml/zen_server/dashboard/assets/{RunsBody-D2VoO-cR.js → RunsBody-Cj4sIqQB.js} +1 -1
  144. zenml/zen_server/dashboard/assets/{SearchField-DfNxVtjV.js → SearchField-DjAOZic5.js} +1 -1
  145. zenml/zen_server/dashboard/assets/SecretTooltip-mMAAP4dM.js +1 -0
  146. zenml/zen_server/dashboard/assets/{SetPassword-CWl2mwz8.js → SetPassword-B0o5kSJU.js} +1 -1
  147. zenml/zen_server/dashboard/assets/{StackList-C8KNd00o.js → StackList-5UB8LoEq.js} +1 -1
  148. zenml/zen_server/dashboard/assets/{Tabs-BEWDPvPV.js → Tabs-AuhCyzle.js} +1 -1
  149. zenml/zen_server/dashboard/assets/Tick-CHW0jc8Y.js +1 -0
  150. zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-DCuCj7NK.js → UpdatePasswordSchemas-Bauivjf-.js} +1 -1
  151. zenml/zen_server/dashboard/assets/{UsageReason-CwUrEwEz.js → UsageReason-Dr5ca5M4.js} +1 -1
  152. zenml/zen_server/dashboard/assets/{Wizard-CynnoHg4.js → Wizard-XEp9rGmf.js} +1 -1
  153. zenml/zen_server/dashboard/assets/{WizardFooter-B2bYs89C.js → WizardFooter-BtL1Gi1k.js} +1 -1
  154. zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-B509kMlL.js → all-pipeline-runs-query-COvsm3bC.js} +1 -1
  155. zenml/zen_server/dashboard/assets/configuration-form-BJUCr0wl.js +1 -0
  156. zenml/zen_server/dashboard/assets/{create-stack-BjWXz5nx.js → create-stack-B2c98UlP.js} +1 -1
  157. zenml/zen_server/dashboard/assets/{delete-run-CzPWbsBy.js → delete-run-Do3XyF4W.js} +1 -1
  158. zenml/zen_server/dashboard/assets/flavor-select-D8CranSY.js +1 -0
  159. zenml/zen_server/dashboard/assets/{form-schemas-B6u3P_a4.js → form-schemas-Bm-dTV3L.js} +1 -1
  160. zenml/zen_server/dashboard/assets/{index-BCKg1Y5r.css → index-6mLFgFwe.css} +1 -1
  161. zenml/zen_server/dashboard/assets/{index-Bjeu4_0O.js → index-CzhJC6pc.js} +1 -1
  162. zenml/zen_server/dashboard/assets/{index-CaRx22lH.js → index-D-n6tspq.js} +1 -1
  163. zenml/zen_server/dashboard/assets/{index-DWoLoYDY.js → index-DPjvk73v.js} +8 -8
  164. zenml/zen_server/dashboard/assets/{index-Dba8yULY.js → index-eIIP-0dQ.js} +1 -1
  165. zenml/zen_server/dashboard/assets/login-mutation-D6uiKsKk.js +1 -0
  166. zenml/zen_server/dashboard/assets/{not-found-DGQ8rm7B.js → not-found-DFrksY0r.js} +1 -1
  167. zenml/zen_server/dashboard/assets/page-B-uHUFcm.js +1 -0
  168. zenml/zen_server/dashboard/assets/page-B0Llmzo_.js +1 -0
  169. zenml/zen_server/dashboard/assets/page-B150LbzG.js +1 -0
  170. zenml/zen_server/dashboard/assets/{page-CfeQbejg.js → page-B1Un9vAU.js} +1 -1
  171. zenml/zen_server/dashboard/assets/{page-CxrLV30P.js → page-B80TE04v.js} +1 -1
  172. zenml/zen_server/dashboard/assets/page-BIseZTJt.js +2 -0
  173. zenml/zen_server/dashboard/assets/{page-C5xq6rqE.js → page-BJ15SGwt.js} +1 -1
  174. zenml/zen_server/dashboard/assets/{page-B6msmF1h.js → page-BJrZsPSh.js} +1 -1
  175. zenml/zen_server/dashboard/assets/page-BMZaECzB.js +1 -0
  176. zenml/zen_server/dashboard/assets/{page-D1upvSPi.js → page-BTvnIFGR.js} +1 -1
  177. zenml/zen_server/dashboard/assets/{page-DLw1Apss.js → page-BXh1mF-D.js} +1 -1
  178. zenml/zen_server/dashboard/assets/page-BZUxCBoD.js +1 -0
  179. zenml/zen_server/dashboard/assets/page-BeFiRx31.js +1 -0
  180. zenml/zen_server/dashboard/assets/{page-C89bN6VV.js → page-BnUwQBeg.js} +1 -1
  181. zenml/zen_server/dashboard/assets/{page-k-UXKVnV.js → page-BqQ6y8Hb.js} +1 -1
  182. zenml/zen_server/dashboard/assets/page-BwAFqFCf.js +1 -0
  183. zenml/zen_server/dashboard/assets/page-BzlVs5tC.js +1 -0
  184. zenml/zen_server/dashboard/assets/{page-C3BbJ-5n.js → page-C11vPVkH.js} +1 -1
  185. zenml/zen_server/dashboard/assets/{page-AnG2ilmi.js → page-CAKBSE9f.js} +1 -1
  186. zenml/zen_server/dashboard/assets/page-CPe9nQSo.js +1 -0
  187. zenml/zen_server/dashboard/assets/page-D0Zt2-7X.js +1 -0
  188. zenml/zen_server/dashboard/assets/page-D2F0Rvak.js +1 -0
  189. zenml/zen_server/dashboard/assets/{page-2EzZ5aWS.js → page-D5GZlpKq.js} +1 -1
  190. zenml/zen_server/dashboard/assets/{page-CxoG4zme.js → page-DBNBYSwq.js} +1 -1
  191. zenml/zen_server/dashboard/assets/page-DDvwWgKP.js +6 -0
  192. zenml/zen_server/dashboard/assets/page-DF9q7ySu.js +1 -0
  193. zenml/zen_server/dashboard/assets/page-DOzFoJuo.js +1 -0
  194. zenml/zen_server/dashboard/assets/page-DaHH2ZEF.js +1 -0
  195. zenml/zen_server/dashboard/assets/{page-B9ELcPAy.js → page-Dd-0y3SU.js} +1 -1
  196. zenml/zen_server/dashboard/assets/{page-Dy6HYsJr.js → page-DhNnHHmX.js} +1 -1
  197. zenml/zen_server/dashboard/assets/{page-CZ_3LB0U.js → page-DkJfgcDi.js} +1 -1
  198. zenml/zen_server/dashboard/assets/page-EhqRFAZc.js +1 -0
  199. zenml/zen_server/dashboard/assets/{page-nHAZvd76.js → page-NIWnUdVg.js} +1 -1
  200. zenml/zen_server/dashboard/assets/{page-DazwBcbq.js → page-kYlFrH53.js} +1 -1
  201. zenml/zen_server/dashboard/assets/page-ygCPGHAV.js +1 -0
  202. zenml/zen_server/dashboard/assets/{persist-BglceT_t.js → persist-C5RlwSq6.js} +1 -1
  203. zenml/zen_server/dashboard/assets/{persist-CMkLV2Cs.js → persist-DHGuHP2H.js} +1 -1
  204. zenml/zen_server/dashboard/assets/{service-DNKY_ZYd.js → service-Do7yitqe.js} +1 -1
  205. zenml/zen_server/dashboard/assets/{sharedSchema-BOmQa793.js → sharedSchema-i_9Y4WcA.js} +1 -1
  206. zenml/zen_server/dashboard/assets/stack-detail-query-omCumL7U.js +1 -0
  207. zenml/zen_server/dashboard/assets/update-server-settings-mutation-B4eE33z-.js +1 -0
  208. zenml/zen_server/dashboard/index.html +4 -4
  209. zenml/zen_server/deploy/daemon/daemon_zen_server.py +1 -1
  210. zenml/zen_server/deploy/deployment.py +1 -2
  211. zenml/zen_server/deploy/docker/docker_zen_server.py +1 -1
  212. zenml/zen_server/rbac/endpoint_utils.py +1 -2
  213. zenml/zen_server/routers/projects_endpoints.py +14 -3
  214. zenml/zen_server/utils.py +2 -86
  215. zenml/zen_stores/migrations/versions/0.80.0_release.py +23 -0
  216. zenml/zen_stores/schemas/artifact_visualization_schemas.py +1 -1
  217. zenml/zen_stores/schemas/model_schemas.py +1 -1
  218. zenml/zen_stores/schemas/service_schemas.py +1 -1
  219. zenml/zen_stores/schemas/step_run_schemas.py +1 -1
  220. zenml/zen_stores/schemas/trigger_schemas.py +1 -1
  221. zenml/zen_stores/sql_zen_store.py +5 -0
  222. {zenml_nightly-0.75.0.dev20250317.dist-info → zenml_nightly-0.80.0.dev20250321.dist-info}/METADATA +7 -8
  223. {zenml_nightly-0.75.0.dev20250317.dist-info → zenml_nightly-0.80.0.dev20250321.dist-info}/RECORD +226 -225
  224. zenml/zen_server/dashboard/assets/@reactflow-DMaYqp8l.js +0 -17
  225. zenml/zen_server/dashboard/assets/CodeSnippet-D8ptwPjg.js +0 -9
  226. zenml/zen_server/dashboard/assets/ComponentIcon-gpMJ2Y2e.js +0 -1
  227. zenml/zen_server/dashboard/assets/ExecutionStatus-DHiK3Am-.js +0 -1
  228. zenml/zen_server/dashboard/assets/ProBadge-ypma7R8i.js +0 -1
  229. zenml/zen_server/dashboard/assets/ProviderIcon-DKN3Gdcg.js +0 -1
  230. zenml/zen_server/dashboard/assets/RunSelector-CYmRHGdm.js +0 -1
  231. zenml/zen_server/dashboard/assets/SecretTooltip-CHPWF0bu.js +0 -1
  232. zenml/zen_server/dashboard/assets/Tick-DgU4udUn.js +0 -1
  233. zenml/zen_server/dashboard/assets/configuration-form-BEwWCxqY.js +0 -1
  234. zenml/zen_server/dashboard/assets/flavor-select-C1pyy8gq.js +0 -1
  235. zenml/zen_server/dashboard/assets/login-mutation-7WFxPe10.js +0 -1
  236. zenml/zen_server/dashboard/assets/page-BKN4SYXY.js +0 -1
  237. zenml/zen_server/dashboard/assets/page-BNrOW_3T.js +0 -2
  238. zenml/zen_server/dashboard/assets/page-BX6ZrAVH.js +0 -1
  239. zenml/zen_server/dashboard/assets/page-BnOdORy3.js +0 -1
  240. zenml/zen_server/dashboard/assets/page-BtkfcEI7.js +0 -1
  241. zenml/zen_server/dashboard/assets/page-Bz_grLBY.js +0 -1
  242. zenml/zen_server/dashboard/assets/page-CCEwuGU4.js +0 -1
  243. zenml/zen_server/dashboard/assets/page-COAGXWJu.js +0 -1
  244. zenml/zen_server/dashboard/assets/page-CaibMa0l.js +0 -1
  245. zenml/zen_server/dashboard/assets/page-CskoTYOC.js +0 -1
  246. zenml/zen_server/dashboard/assets/page-Cyoe7AtN.js +0 -1
  247. zenml/zen_server/dashboard/assets/page-D03wm5f1.js +0 -1
  248. zenml/zen_server/dashboard/assets/page-D8UimvyP.js +0 -1
  249. zenml/zen_server/dashboard/assets/page-DEnmFyzi.js +0 -1
  250. zenml/zen_server/dashboard/assets/page-TiOZeeo0.js +0 -1
  251. zenml/zen_server/dashboard/assets/page-cveasWUr.js +0 -6
  252. zenml/zen_server/dashboard/assets/page-iTvxfhgZ.js +0 -1
  253. zenml/zen_server/dashboard/assets/page-niRD8Hqz.js +0 -1
  254. zenml/zen_server/dashboard/assets/stack-detail-query-CI_YMUx6.js +0 -1
  255. zenml/zen_server/dashboard/assets/transform-DKsRLKTv.js +0 -1
  256. zenml/zen_server/dashboard/assets/update-server-settings-mutation-CNYCc-FU.js +0 -1
  257. {zenml_nightly-0.75.0.dev20250317.dist-info → zenml_nightly-0.80.0.dev20250321.dist-info}/LICENSE +0 -0
  258. {zenml_nightly-0.75.0.dev20250317.dist-info → zenml_nightly-0.80.0.dev20250321.dist-info}/WHEEL +0 -0
  259. {zenml_nightly-0.75.0.dev20250317.dist-info → zenml_nightly-0.80.0.dev20250321.dist-info}/entry_points.txt +0 -0
@@ -1 +0,0 @@
1
- import{r as m,j as e}from"./@radix-AvWw-1nd.js";import{k as S,F as D,p as b,q as C,i as w,at as y,v as O,w as H,f as h,t as $,au as R,aM as V,av as J,aN as U,ax as G,aq as Y,D as Z,x as W,y as X,C as ee,E as K,r as k,ak as te,al as se,am as ne,an as re,ao as ce,I as F,ar as ae,as as ie,B as q,o as oe,O as le,S as T}from"./index-DWoLoYDY.js";import{P as ue,S as de}from"./SearchField-DfNxVtjV.js";import{s as f,c as me,A as xe,u as he,a as E,b as pe}from"./service-DNKY_ZYd.js";import{b as N,c as g,a as fe}from"./@tanstack-CcI3lvwB.js";import{S as I}from"./trash-B_JgTgqd.js";import{D as M,a as Q}from"./DeleteAlertDialog-CTLRrcFM.js";import{S as ve}from"./Lock-tO9Z41I9.js";import{L as P}from"./@react-router-BUo5vhN4.js";import{A as je}from"./AlertDialogDropdownItem-XL2NfFgP.js";import{t as ye}from"./zod-CRNUMWWg.js";import{u as ge,F as Ae,b as Se,C as A}from"./index.esm-cf-8NBxV.js";import"./@reactflow-DMaYqp8l.js";import"./chevron-right-double-zKz7rAaU.js";import"./index-BVVKxTWC.js";import"./CodeSnippet-D8ptwPjg.js";import"./Infobox-DYKoAVhW.js";import"./Tick-DgU4udUn.js";import"./check-DZ0KAh3W.js";async function De(t){const s=b(C.serviceAccounts.detail(t)),r=await S(s,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(!r.ok){const n=await r.json().then(c=>Array.isArray(c.detail)?c.detail[1]:c.detail).catch(()=>`Failed to delete service account ${t}`);throw new D({status:r.status,statusText:r.statusText,message:n})}return r.json()}function be(t){return N({...t,mutationFn:async s=>{await De(s)}})}const z=m.createContext(null);function Ce({children:t}){const[s,r]=m.useState([]),n=g(),{toast:c}=w(),a=be(),u=async o=>{try{const d=o.map(l=>a.mutateAsync(l));await Promise.all(d),c({description:"Deleted successfully.",status:"success",emphasis:"subtle",rounded:!0}),n.invalidateQueries({queryKey:f.serviceAccountsKey()}),r([])}catch(d){y(d)&&c({status:"error",emphasis:"subtle",description:d.message,rounded:!0}),console.error("Failed to delete some pipelines:",d)}};return e.jsx(z.Provider,{value:{selectedServiceAccounts:s,setSelectedServiceAccounts:r,bulkDeleteServiceAccounts:u},children:t})}function v(){const t=m.useContext(z);if(!t)throw new Error("useServiceAccountSelectorContext must be used within a ServiceAccountsSelectorProvider");return t}function we(){const[t,s]=m.useState(!1),{bulkDeleteServiceAccounts:r,selectedServiceAccounts:n}=v();async function c(){await r(n),s(!1)}return e.jsxs(O,{open:t,onOpenChange:s,children:[e.jsx(H,{asChild:!0,children:e.jsxs(h,{className:"rounded-sharp border-none bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(I,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(M,{title:`Delete Service Account${n.length>=2?"s":""}`,handleDelete:c,children:e.jsxs(Q,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function Ne(){const{selectedServiceAccounts:t}=v();return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:`${t==null?void 0:t.length} Service Account${(t==null?void 0:t.length)>1?"s":""} selected`}),e.jsx(we,{})]})}async function ke({body:t,serviceAccountId:s}){const r=b(C.serviceAccounts.detail(s)),n=await S(r,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(n.status===404&&$(),!n.ok){const c=await n.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>`Failed to update service account ${s}`);throw new D({status:n.status,statusText:n.statusText,message:c})}return n.json()}function Fe(t){return N({...t,mutationFn:async({serviceAccountId:s,body:r})=>ke({serviceAccountId:s,body:r})})}function Te({isActive:t,serviceAccountId:s}){const{toast:r}=w(),n=g(),[c,a]=m.useState(!1),{mutate:u}=Fe({onError(l){y(l)&&r({status:"error",emphasis:"subtle",description:l.message,rounded:!0})},onSuccess(){n.invalidateQueries({queryKey:f.serviceAccountsKey()})}});function o(l){l?d(l):a(!0)}async function d(l){u({serviceAccountId:s,body:{active:l}})}return e.jsxs(e.Fragment,{children:[e.jsx(O,{open:c,onOpenChange:a,children:e.jsxs(R,{children:[e.jsx(V,{children:e.jsx(J,{children:"Deactivate Service Account"})}),e.jsxs("div",{className:"p-5 text-text-md text-theme-text-secondary",children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"You won't be able to use any API keys of this service account to authenticate with the server anymore."})]}),e.jsxs(U,{className:"gap-[10px]",children:[e.jsx(G,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{onClick:()=>d(!1).then(l=>a(!1)),intent:"primary",type:"button",children:"Deactivate"})]})]})}),e.jsx(Y,{checked:t,onCheckedChange:o})]})}function Pe({serviceAccountId:t}){const[s,r]=m.useState(!1),[n,c]=m.useState(!1),{bulkDeleteServiceAccounts:a}=v(),u=m.useRef(null),o=m.useRef(null);function d(){o.current=u.current}async function l(){await a([t]),p(!1)}function p(x){if(x===!1){r(!1),setTimeout(()=>{c(x)},200);return}c(x)}return e.jsxs(Z,{onOpenChange:r,open:s,children:[e.jsx(W,{ref:u,children:e.jsx(X,{className:"h-5 w-5 fill-theme-text-secondary"})}),e.jsx(ee,{hidden:n,onCloseAutoFocus:x=>{o.current&&(o.current.focus(),o.current=null,x.preventDefault())},align:"end",sideOffset:7,children:e.jsx(je,{onSelect:d,open:n,onOpenChange:p,triggerChildren:"Delete",icon:e.jsx(I,{fill:"red"}),children:e.jsx(M,{title:"Delete Service Account",handleDelete:l,children:e.jsxs(Q,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})})]})}const Oe=({id:t})=>{const{selectedServiceAccounts:s,setSelectedServiceAccounts:r}=v(),n=(c,a)=>{r(u=>c?[...u,a]:u.filter(o=>o!==a))};return e.jsx(K,{id:t,onCheckedChange:c=>n(c,t),checked:s.includes(t),className:"h-3 w-3"})};function Ke(){return[{id:"check",header:"",meta:{width:"1%"},accessorFn:t=>t.id,cell:({row:t})=>e.jsx(Oe,{id:t.original.id})},{id:"service-account",header:"Service Account",accessorFn:t=>t.name,cell:({row:t})=>{var s;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(ve,{className:"h-5 w-5 flex-shrink-0 fill-primary-400"}),e.jsxs("div",{className:"group/copybutton flex flex-col",children:[e.jsx("div",{className:"flex flex-row items-center space-x-1",children:e.jsx("div",{className:"flex items-center space-x-1",children:e.jsx(P,{className:"text-text-md font-semibold text-theme-text-primary",to:k.settings.service_accounts.detail(t.original.id),children:t.original.name})})}),e.jsx("div",{className:"flex items-center gap-1",children:e.jsx(P,{className:"flex items-center gap-1 text-text-sm text-theme-text-secondary",to:k.settings.service_accounts.detail(t.original.id),children:(s=t.original.metadata)==null?void 0:s.description})})]})]})}},{id:"active",header:"Active",accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.active},cell:({row:t})=>{var s;return e.jsx(Te,{isActive:!!((s=t.original.body)!=null&&s.active),serviceAccountId:t.original.id})}},{id:"actions",meta:{width:"5%"},header:"",cell:({row:t})=>e.jsx("div",{className:"flex items-center justify-end",children:e.jsx(Pe,{serviceAccountId:t.original.id})})}]}async function qe({body:t}){const s=b(C.serviceAccounts.all),r=await S(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){const n=await r.json().then(c=>Array.isArray(c.detail)?c.detail[1]:c.detail).catch(()=>"Failed to create service account");throw new D({status:r.status,statusText:r.statusText,message:n})}return r.json()}function Ee(t){return N({...t,mutationFn:async s=>qe({body:s})})}function B({isFallback:t}){const[s,r]=m.useState(!1),[n,c]=m.useState(""),a=g(),u=ge({resolver:ye(me),defaultValues:{name:"",description:"",createDefault:!1}}),o=!!n&&u.watch("createDefault");function d(){return o?e.jsx(xe,{value:n}):e.jsx(Ie,{isFallback:t,setApiKeyValue:c,setOpen:r})}return e.jsx(Ae,{...u,children:e.jsxs(te,{open:s,onOpenChange:l=>{t&&!l&&a.invalidateQueries({queryKey:f.serviceAccountsKey()}),r(l),c(""),u.reset()},children:[e.jsx(se,{asChild:!0,children:e.jsx(h,{className:"shrink-0",size:"sm",intent:"primary",children:"Add service account"})}),e.jsxs(ne,{"data-success":o,className:"mx-auto overflow-x-auto transition-none data-[success=true]:max-w-[800px]",children:[e.jsx(re,{children:e.jsx(ce,{children:"Add service account"})}),d()]})]})})}function Ie({setApiKeyValue:t,setOpen:s,isFallback:r}){const{watch:n,handleSubmit:c,control:a,formState:{isValid:u}}=Se(),{toast:o}=w(),d=g(),{mutate:l}=Ee({onError(i){y(i)&&o({status:"error",emphasis:"subtle",description:i.message,rounded:!0})},async onSuccess(i){if(o({description:"The service account has been added successfully.",status:"success",emphasis:"subtle",rounded:!0}),n("createDefault")){x(i.id);return}d.invalidateQueries({queryKey:f.serviceAccountsKey()}),s(!1)}}),{mutate:p}=he({onSuccess(i){var j;r||d.invalidateQueries({queryKey:f.serviceAccountsKey()}),t(((j=i.body)==null?void 0:j.key)||"")},onError(i){y(i)&&o({status:"error",emphasis:"subtle",description:i.message,rounded:!0})}}),x=i=>{p({serviceAccountId:i,body:{name:"default",description:"Default api key"}})},L=i=>{l({name:i.name,description:i.description,active:!0})};return e.jsxs(e.Fragment,{children:[e.jsxs("form",{id:"create-secret-form",className:"space-y-5 p-7",onSubmit:c(L),children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{className:"font-inter text-sm text-left font-medium leading-5",children:"Name:"}),e.jsx(A,{name:"name",control:a,render:({field:i})=>e.jsx(F,{...i,className:"w-full",required:!0,placeholder:"Add name"})})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{className:"font-inter text-sm text-left font-medium leading-5",children:"Description:"}),e.jsx(A,{name:"description",control:a,render:({field:i})=>e.jsx(F,{...i,className:"w-full",placeholder:"Add description"})})]}),e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(A,{control:a,name:"createDefault",render:({field:{onChange:i,value:j}})=>e.jsx(K,{checked:j,id:"default-key",onCheckedChange:_=>i(!!_)})}),e.jsx("label",{htmlFor:"default-key",children:"Create a default API Key"})]}),e.jsx("p",{className:"pl-[30px] text-text-xs text-theme-text-secondary",children:"This will include a default API Key for your service account."})]})]}),e.jsxs(ae,{className:"gap-[10px]",children:[e.jsx(ie,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{intent:"primary",size:"sm",disabled:!u,type:"submit",form:"create-secret-form",children:"Add service account"})]})]})}function Me(){return e.jsxs(q,{className:"flex flex-col items-center justify-center space-y-4 p-9",children:[e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold text-theme-text-primary",children:"There are no service accounts yet."}),e.jsx("p",{className:"text-theme-text-secondary",children:"Create your first one now to automate your processes securely with ZenML."})]}),e.jsx(B,{isFallback:!0})]})}function Qe(){const{setCurrentBreadcrumbData:t}=oe(),s=E();m.useEffect(()=>{t({segment:"service_accounts",data:null})},[]);const r=m.useMemo(()=>Ke(),[]),{data:n}=fe({...pe.serviceAccountList({...s,sort_by:"desc:created",hydrate:!0})});return n&&n.items.length<1&&!s.name?e.jsx(Me,{}):e.jsxs(Ce,{children:[e.jsx(ze,{}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:n?e.jsx(le,{columns:r,data:n.items}):e.jsx(T,{className:"h-[500px] w-full"})}),n?n.total_pages>1&&e.jsx(ue,{searchParams:s,paginate:n}):e.jsx(T,{className:"h-[36px] w-[300px]"})]})]})}function ze(){const t=E(),{selectedServiceAccounts:s}=v();return e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[s.length?e.jsx(Ne,{}):e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(de,{searchParams:t})}),e.jsx(B,{isFallback:!1})]})}function at(){return e.jsxs(q,{className:"space-y-4 p-5",children:[e.jsx(Be,{}),e.jsx(Qe,{})]})}function Be(){return e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Service Accounts"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"Configure automated access for background tasks and integrations."}),e.jsx("a",{target:"_blank",rel:"noreferrer noopener",href:"https://docs.zenml.io/how-to/project-setup-and-management/connecting-to-zenml/connect-with-a-service-account",className:"link text-text-sm text-primary-400",children:"Learn More"})]})]})}export{at as default};
@@ -1 +0,0 @@
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-C4bltH6-.js";import{W as D,H as O,B as E}from"./Wizard-CynnoHg4.js";import{t as q}from"./zod-CRNUMWWg.js";import{z as y,S as Y,_ as Ge,I as ge,f 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,y as at,a0 as ct,k as lt,F as ut,p as dt,q as ft,i as Ie,j as mt,r as ht,A as xt,b as pt,ae as yt}from"./index-DWoLoYDY.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-B2bYs89C.js";import{C as je}from"./ComponentIcon-gpMJ2Y2e.js";import{R as Z,a as U,s as gt,u as jt}from"./create-stack-BjWXz5nx.js";import{f as _t,s as De,g as vt,a as St,D as Ct,b as bt,z as wt}from"./index-Bjeu4_0O.js";import{a as J,b as Nt,j as Oe,c as Pt}from"./@tanstack-CcI3lvwB.js";import{S as Ft}from"./transform-DKsRLKTv.js";import{C as L}from"./ProviderIcon-DKN3Gdcg.js";import{s as kt}from"./sharedSchema-BOmQa793.js";import{S as zt}from"./Lock-tO9Z41I9.js";import{T as _e}from"./Tick-DgU4udUn.js";import{s as Ee}from"./index-CaRx22lH.js";import{C as At}from"./ComponentBadge-CVN2FsiW.js";import{e as It}from"./components-Br2ezRib.js";import{L as Dt}from"./@react-router-BUo5vhN4.js";import"./persist-CMkLV2Cs.js";import"./@reactflow-DMaYqp8l.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-CI_YMUx6.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({..._t.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=vt(C),He=St(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(Ft,{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(Ct,{definitions:f,isOptional:bt(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 Nt({...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 gt(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=Pt(),{toast:n}=Ie(),{setCurrentStep:o}=F(),{mutate:a}=jt({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(wt(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 as(){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{as as default};
@@ -1 +0,0 @@
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-C4bltH6-.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-cL1-u_sT.js";import{S as V,B as Y,aQ as de,f as le,r as T}from"./index-DWoLoYDY.js";import{d as me,a as ue}from"./@react-router-BUo5vhN4.js";import{I as G}from"./Infobox-DYKoAVhW.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-CMkLV2Cs.js";import{C as h}from"./ProviderIcon-DKN3Gdcg.js";import{s as J}from"./index-CaRx22lH.js";import{a as K}from"./@tanstack-CcI3lvwB.js";import"./Tick-DgU4udUn.js";import"./check-DZ0KAh3W.js";import"./package-BOms6B-A.js";import"./ComponentBadge-CVN2FsiW.js";import"./ComponentIcon-gpMJ2Y2e.js";import"./layout-3_rgDUxf.js";import"./rocket-k68ONPDS.js";import"./transform-DKsRLKTv.js";import"./logs-D6_diV2k.js";import"./CodeSnippet-D8ptwPjg.js";import"./NumberBox-BvBJYxCu.js";import"./link-external-BYm_zH_8.js";import"./@reactflow-DMaYqp8l.js";import"./sharedSchema-BOmQa793.js";import"./gcp-0u4le6mC.js";import"./stack-detail-query-CI_YMUx6.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 at(){const{success:t}=he();return e.jsx(ee,{maxSteps:Z.length,initialStep:t?3:1,children:e.jsx(ce,{children:e.jsxs("section",{className:"layout-container flex flex-col gap-5 p-5 xl:flex-row",children:[e.jsx(te,{entries:Z}),e.jsx("div",{className:"w-full overflow-y-hidden",children:e.jsx(De,{})})]})})})}export{at as default};
@@ -1 +0,0 @@
1
- import{r as o,j as e}from"./@radix-AvWw-1nd.js";import{p as j,q as C,s as M,k as y,t as T,F as b,ak as F,al as E,f as h,am as P,an as U,ao as k,ap as O,z as m,i as v,I,aq as R,ar as _,as as q,at as H,j as D,au as z,av as Z,aw as B,ax as K,ay as Q,D as V,x as L,y as G,C as J,e as w,az as $,m as W,S as f,O as X,B as Y}from"./index-DWoLoYDY.js";import{S as ee,P as se}from"./SearchField-DfNxVtjV.js";import{a as te,b as N,c as A}from"./@tanstack-CcI3lvwB.js";import{C as ae}from"./CodeSnippet-D8ptwPjg.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-Bk4QLPTU.js";import{A as oe}from"./AlertDialogDropdownItem-XL2NfFgP.js";import{d as le}from"./@react-router-BUo5vhN4.js";import"./@reactflow-DMaYqp8l.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 +0,0 @@
1
- import{j as e,r as f}from"./@radix-AvWw-1nd.js";import{z as d,p as x,q as h,s as N,k as j,F as p,B as m,i as S,E as D,f as E,j as P,a0 as C}from"./index-DWoLoYDY.js";import{d as _}from"./@react-router-BUo5vhN4.js";import{E as k}from"./EmptyState-DpbfQBDE.js";import{a as F,b as T}from"./@tanstack-CcI3lvwB.js";import{E as I}from"./Error-CIBjAdSc.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-DMaYqp8l.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 F({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 T({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(E,{disabled:y||!c,size:"md",className:"flex w-full justify-center",children:"Authorize this device"})]})}function O(){return e.jsxs(m,{className:"flex min-w-[540px] flex-col items-center justify-center space-y-7 px-7 py-9",children:[e.jsx(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(k,{children:e.jsx("p",{children:"Invalid device verification link."})}):n?e.jsx(u,{children:e.jsx(I,{isAlertCircle:!0,err:l})}):c?e.jsx(u,{children:e.jsx(C,{})}):i?e.jsx(O,{}):e.jsx(u,{children:e.jsxs("div",{className:"w-full space-y-7",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"mb-0.5 text-display-xs font-semibold",children:"Authorize a new device"}),e.jsx("p",{className:"text-theme-text-secondary",children:"You are logging in from a new device."})]}),e.jsx(G,{device:a}),e.jsx(M,{setSuccess:r,deviceId:s,user_code:t})]})})}function u({children:s}){return e.jsx(m,{className:"flex w-full min-w-[540px] flex-col items-center justify-center gap-5 p-7",children:s})}export{ae as default};
@@ -1 +0,0 @@
1
- import{j as e,r as d,aG as N,aH as P,aI as U,aJ as V}from"./@radix-AvWw-1nd.js";import{T as q,H as Z,J as G,a2 as J,K,an as O,ao as E,ae as p,aj as X,f,ar as Y,as as W,ak as ee,al as te,am as se,I as R,Y as re,a0 as ae,_ as ne,aX as ie,r as Q,z as x,i as oe,j as ce,n as le}from"./index-DWoLoYDY.js";import{b as u,C as de,u as me,F as pe}from"./index.esm-cf-8NBxV.js";import{C as B}from"./ComponentIcon-gpMJ2Y2e.js";import{D as ue}from"./DisplayDate-C5Aw-Yca.js";import{I as he}from"./InlineAvatar-Bk4QLPTU.js";import{h as xe,j as fe,a as ge,c as je}from"./@tanstack-CcI3lvwB.js";import{d as ke}from"./index-BVVKxTWC.js";import{s as be,R as ve,a as ye,u as Ne}from"./create-stack-BjWXz5nx.js";import{S as Se}from"./flavor-select-C1pyy8gq.js";import{S as we}from"./arrow-left-B2hyhFky.js";import{C as Ce}from"./configuration-form-BEwWCxqY.js";import{s as v}from"./constants-DP3ZEnXH.js";import{S as Le}from"./check-circle-DyCCYTA0.js";import{L as _e,a as Te}from"./@react-router-BUo5vhN4.js";import{s as Fe}from"./index-CaRx22lH.js";import{w as ze}from"./index-Dba8yULY.js";import{t as Ie}from"./zod-CRNUMWWg.js";import{s as Me}from"./sharedSchema-BOmQa793.js";import"./@reactflow-DMaYqp8l.js";import"./layout-3_rgDUxf.js";import"./rocket-k68ONPDS.js";import"./transform-DKsRLKTv.js";import"./index-Bjeu4_0O.js";import"./plus-CoKtHiA9.js";import"./trash-B_JgTgqd.js";import"./type-guards-CaeD8wHO.js";import"./check-DZ0KAh3W.js";import"./CodeSnippet-D8ptwPjg.js";import"./file-text-CgxVzNph.js";import"./terminal-square-URAPn9DB.js";import"./stack-detail-query-CI_YMUx6.js";const S={helpLink:"https://docs.zenml.io/stack-components/orchestrators",description:"An orchestrator is a special kind of backend that manages the running of each step of the pipeline. Orchestrators administer the actual pipeline runs. By default, ZenML initializes your repository with an orchestrator that runs everything on your local machine."},w={helpLink:"https://docs.zenml.io/stack-components/artifact-stores",description:"The Artifact Store is a central component in any MLOps stack. As the name suggests, it acts as a data persistence layer where artifacts (e.g. datasets, models) ingested or generated by the machine learning pipelines are stored."},C={helpLink:"https://docs.zenml.io/stack-components/container-registries",description:"Container registry is used to store container images that are built to run machine learning pipelines in remote environments. Containerization of the pipeline code creates a portable environment that allows code to run in an isolated manner."},L={description:"Step operators allow you to run individual steps in a custom environment different from the default one used by your active orchestrator.",helpLink:"https://docs.zenml.io/stack-components/step-operators"},_={description:"Model deployers are stack components responsible for online model serving. They are responsible for deploying models to a remote server. Model deployers also act as a registry for models that are served with ZenML.",helpLink:"https://docs.zenml.io/stack-components/model-deployers"},T={description:"ZenML supports connecting to a Redis-backed Feast feature store as a stack component integration.",helpLink:"https://docs.zenml.io/stack-components/feature-stores"},F={description:"Experiment trackers let you track your ML experiments by logging the parameters and allowing you to compare between different runs.",helpLink:"https://docs.zenml.io/stack-components/experiment-trackers"},z={description:"Alerters allow you to send messages to chat services (like Slack, Discord, Mattermost, etc.) from within your pipelines. This is useful to immediately get notified when failures happen, for general monitoring/reporting, and also for building human-in-the-loop ML.",helpLink:"https://docs.zenml.io/stack-components/alerters "},I={description:"Annotators are a stack component that enables the use of data annotation as part of your ZenML stack and pipelines.",helpLink:"https://docs.zenml.io/stack-components/annotators"},M={description:"Data Validators used in ZenML pipelines usually generate data profiles and data quality check reports that are versioned and stored in the Artifact Store and can be retrieved and visualized later.",helpLink:"https://docs.zenml.io/stack-components/data-validators"},D={description:"The image builder is an essential part of most remote MLOps stacks. It is used to build container images such that your machine-learning pipelines and steps can be executed in remote environments.",helpLink:"https://docs.zenml.io/stack-components/image-builders"},A={description:"Model registries are centralized storage solutions for managing and tracking machine learning models across various stages of development and deployment.",helpLink:"https://docs.zenml.io/stack-components/model-registries"};function De({type:t}){const{description:s,link:r}=Ae(t);return e.jsx(q,{children:e.jsxs(Z,{delayDuration:200,children:[e.jsxs(G,{children:[e.jsx(J,{className:"h-4 w-4 shrink-0 fill-theme-text-tertiary"}),e.jsxs("div",{className:"sr-only",children:["Info for ",t]})]}),e.jsxs(K,{align:"start",side:"bottom",className:"flex max-w-xl flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:s}),e.jsx("a",{className:"link mt-2 text-primary-400",target:"_blank",href:r,children:"Learn more"})]})]})})}function Ae(t){switch(t){case"orchestrator":return{description:S.description,link:S.helpLink};case"alerter":return{description:z.description,link:z.helpLink};case"annotator":return{description:I.description,link:I.helpLink};case"artifact_store":return{description:w.description,link:w.helpLink};case"container_registry":return{description:C.description,link:C.helpLink};case"data_validator":return{description:M.description,link:M.helpLink};case"experiment_tracker":return{description:F.description,link:F.helpLink};case"feature_store":return{description:T.description,link:T.helpLink};case"image_builder":return{description:D.description,link:D.helpLink};case"model_deployer":return{description:_.description,link:_.helpLink};case"model_registry":return{description:A.description,link:A.helpLink};case"step_operator":return{description:L.description,link:L.helpLink}}}function $e({type:t,setSelectedFlavor:s}){return e.jsxs(e.Fragment,{children:[e.jsx(O,{children:e.jsxs(E,{children:["Select ",p(t)," Flavor"]})}),e.jsx(X,{viewportClassName:"max-h-[70vh]",children:e.jsx("div",{className:"p-5",children:e.jsx(Se,{setSelectedFlavor:s,type:t})})})]})}function Oe({name:t,id:s,backHandler:r,type:n,successHandler:i}){const o=d.useId();return e.jsxs(e.Fragment,{children:[e.jsx(O,{className:"w-full",children:e.jsxs("div",{className:"flex w-0 flex-1 items-center gap-2",children:[e.jsxs(f,{intent:"secondary",emphasis:"subtle",className:"flex aspect-square size-6 items-center justify-center",onClick:()=>r(),children:[e.jsx(we,{className:"size-5 shrink-0"}),e.jsx("span",{className:"sr-only",children:"Go step back"})]}),e.jsxs(E,{className:"truncate",children:["Configure your ",p(t)," ",p(n)]})]})}),e.jsx(Ce,{useMaxHeight:!0,flavorId:s,formId:o,successHandler:i,FooterComponent:Ee})]})}function Ee({formId:t,isPending:s}){return e.jsx(Y,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{asChild:!0,children:e.jsx(f,{size:"md",intent:"secondary",children:"Cancel"})}),e.jsxs(f,{size:"md",disabled:s,type:"submit",form:t,children:[s&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Register Component"]})]})})}function Re({type:t}){const[s,r]=d.useState(!1),[n,i]=d.useState(0),[o,l]=d.useState(null);async function a(c){r(c),await be(100),c||(i(0),l(null))}function g(c){var m;l({id:c.id,name:c.name,logoUrl:((m=c.body)==null?void 0:m.logo_url)??void 0}),i(h=>h+1)}function j(){i(0),l(null)}return e.jsxs(ee,{open:s,onOpenChange:c=>a(c),children:[e.jsx(te,{asChild:!0,children:e.jsxs("button",{className:"w-full rounded-md border border-dashed border-neutral-300 bg-theme-surface-tertiary py-5 text-theme-text-secondary",children:["New ",p(t)]})}),e.jsxs(se,{className:"w-full sm:max-w-[640px] md:max-w-3xl xl:max-w-[1080px]",children:[n===0&&e.jsx($e,{setSelectedFlavor:g,type:t}),n===1&&!!o&&e.jsx(Oe,{successHandler:()=>a(!1),backHandler:j,...o,type:t})]})]})}function Qe(){return e.jsxs(e.Fragment,{children:[v.map(t=>e.jsx(N,{className:"h-full space-y-5 p-5",value:t,children:e.jsx(Pe,{type:t})},t)),e.jsx(N,{className:"h-full",value:"",children:e.jsx("div",{className:"flex h-full w-full items-center justify-center text-theme-text-tertiary",children:"Select a category to add a new component"})})]})}function Be({type:t,search:s}){const r=xe({...re.componentListInfinite({sort_by:"desc:updated",type:t,...s?{name:`contains:${s}`}:{}})}),{control:n,watch:i,setValue:o}=u();return r.isError?e.jsx("p",{children:"Error while fetching Components"}):r.isPending?e.jsx("div",{className:"flex w-full flex-1 items-center justify-center",children:e.jsx(ae,{})}):e.jsxs("div",{className:"space-y-1",children:[e.jsx("ul",{className:"space-y-1",children:r.data.pages.map(l=>l.items.map(a=>e.jsx("li",{children:e.jsx(de,{name:`components.${t}.id`,control:n,render:({field:{onChange:g,...j}})=>{var c,m,h,k;return e.jsxs(ve,{className:"justify-between bg-theme-surface-primary font-medium","data-state":i(`components.${t}.id`)===a.id?"selected":"unselected",htmlFor:a.id,children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(ye,{...j,id:a.id,type:"radio",value:a.id,onChange:H=>{var y;o(`components.${t}.name`,a.name),o(`components.${t}.logoUrl`,((y=a.body)==null?void 0:y.logo_url)||""),g(H)},checked:i(`components.${t}.id`)===a.id,name:t}),e.jsx("img",{alt:"flavor icon",src:ne(((c=a.body)==null?void 0:c.logo_url)||""),width:24,height:24}),e.jsxs("div",{className:"min-w-0 truncate",children:[e.jsx("div",{className:"truncate font-semibold",children:a.name}),e.jsx("div",{className:"truncate text-text-xs text-theme-text-secondary",children:a.id.split("-")[0]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-text-sm",children:[((h=(m=a.body)==null?void 0:m.user)==null?void 0:h.name)&&e.jsx(he,{username:a.body.user.name}),((k=a.body)==null?void 0:k.updated)&&e.jsx("div",{className:"whitespace-nowrap text-theme-text-secondary",children:e.jsx(ue,{short:!0,dateString:a.body.updated})})]})]})}})},a.id)))}),e.jsx(Re,{type:t}),r.hasNextPage&&e.jsx(f,{onClick:()=>r.fetchNextPage(),type:"button",size:"md",intent:"secondary",emphasis:"subtle",className:"flex w-full items-center justify-center bg-theme-surface-primary",children:e.jsxs("div",{className:"flex items-center gap-1",children:[r.isFetchingNextPage&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Load more"]})})]})}function He({type:t}){return e.jsxs("section",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(B,{className:"h-5 w-5 fill-primary-400",type:t}),e.jsx("h2",{className:"text-text-lg font-semibold",children:p(t)}),e.jsx(De,{type:t})]}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Select a existing ",ie(t)," from your server:"]})]})}function Pe({type:t}){const[s,r]=d.useState(""),{watch:n,setValue:i}=u(),o=n(`components.${t}`);return d.useEffect(()=>{o&&!o.id&&i(`components.${t}`,null)},[o,i,t]),e.jsxs(e.Fragment,{children:[e.jsx(He,{type:t}),e.jsx(Ue,{search:s,setSearch:r}),e.jsx(Be,{search:s,type:t})]})}function Ue({setSearch:t,search:s}){const[r,n]=d.useState(s),i=d.useCallback(ke(t,500),[]);d.useEffect(()=>()=>{i.cancel()},[i]);function o(l){n(l),i(l)}return e.jsx(R,{value:r,onChange:l=>o(l.target.value),placeholder:"Search..."})}function Ve({type:t}){const{watch:s,formState:{errors:r}}=u(),n=s(`components.${t}`),i=n&&n.id;return e.jsx("div",{"data-error":!i&&r.components&&r.components[t]?"true":"false","data-filled":i?"true":"false",className:"flex h-[110px] flex-col items-center justify-center space-y-2 truncate whitespace-nowrap rounded-md border border-theme-border-moderate bg-theme-surface-secondary py-5 text-center text-text-sm text-theme-text-secondary transition-all duration-150 hover:bg-theme-surface-primary hover:shadow-sm data-[error=true]:border-theme-text-error data-[filled=true]:border-success-400 data-[filled=true]:bg-theme-surface-primary data-[state=active]:bg-theme-surface-primary group-data-[state=active]/trigger:bg-theme-surface-primary group-data-[state=active]/trigger:shadow-md data-[error=false]:data-[filled=false]:group-data-[state=active]/trigger:border-theme-border-bold",children:i?e.jsx(qe,{type:t}):e.jsx(Ze,{type:t})})}function qe({type:t}){const{watch:s}=u(),r=s(`components.${t}`);return r&&r.id?e.jsxs("div",{className:"flex flex-col items-center gap-2 text-text-sm",children:[e.jsx("img",{width:24,height:24,src:r.logoUrl,alt:`Icon of ${r.name}`}),e.jsxs("div",{className:"space-y-0.25",children:[e.jsx("div",{className:"text-theme-text-primary",children:r.name}),e.jsx("div",{className:"text-text-xs text-theme-text-tertiary",children:p(t)})]})]}):null}function Ze({type:t}){return e.jsxs(e.Fragment,{children:[e.jsx(B,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong",type:t}),e.jsx("span",{children:p(t)})]})}function Ge(){return e.jsxs("div",{className:"flex h-full flex-col justify-between space-y-5",children:[e.jsxs("div",{className:"space-y-5 p-5",children:[e.jsx(Xe,{}),e.jsx(Je,{})]}),e.jsx(Ke,{})]})}function Je(){const{watch:t,resetField:s}=u();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-text-lg font-semibold",children:"Add Components"}),e.jsxs("p",{className:"text-theme-text-secondary",children:["All stacks have at minimum an orchestrator and an artifact store."," ",e.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://docs.zenml.io/stack-components/component-guide",className:"link text-primary-400",children:"Learn more"})]})]}),e.jsx(P,{children:e.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-4",children:v.map(r=>e.jsxs("div",{className:"relative",children:[e.jsx(U,{className:"group/trigger w-full",value:r,children:e.jsx(Ve,{type:r})}),t(`components.${r}.id`)&&e.jsx("button",{type:"button",onClick:n=>{n.preventDefault(),s(`components.${r}`)},className:"absolute right-[-12px] top-[-12px] flex aspect-square h-[28px] w-[28px] items-center justify-center rounded-rounded bg-theme-surface-primary",children:e.jsx(Le,{className:"h-5 w-5 shrink-0 fill-success-400"})})]},r))})})]})}function Ke(){const{formState:{isSubmitting:t}}=u(),s=!!fe();return e.jsxs("div",{className:"flex items-center justify-end space-x-2 border-t border-theme-border-moderate p-5",children:[e.jsx(f,{asChild:!0,intent:"secondary",size:"md",children:e.jsx(_e,{to:Q.stacks.create.index,children:"Cancel"})}),e.jsxs(f,{className:"flex items-center gap-1",disabled:t||s,size:"md",children:[(s||t)&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Register Stack"]})]})}function Xe(){var r;const{register:t,formState:{errors:s}}=u();return e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-text-sm",htmlFor:"stack-name",children:"Stack Name"}),e.jsx(R,{id:"stack-name",className:`${s.stackName?"border-red-500":""} w-full`,placeholder:"zenml-stack",...t("stackName")}),s.stackName&&e.jsx("p",{className:"text-text-xs text-red-500",children:(r=s.stackName.message)==null?void 0:r.toString()})]})}const b=x.object({id:x.string().trim().min(1),name:x.string().trim().min(1),logoUrl:x.string().trim().min(1)}),Ye=v.reduce((t,s)=>(t[s]=b.nullable(),t),{}),We=x.object({stackName:Me,components:x.object({...Ye,orchestrator:b,artifact_store:b})});function et(){const t=ge({...ze.workspaceDetail("default")}),{toast:s}=oe(),r=Te(),n=je(),i=Ne({onSuccess:async()=>{n.invalidateQueries({queryKey:Fe.all}),r(Q.stacks.overview)},onError:a=>{s({status:"error",emphasis:"subtle",icon:e.jsx(ce,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:a.message,rounded:!0})}});function o(a){var c;const g=Object.entries(a.components).reduce((m,[h,k])=>(k&&(m[h]=[k.id]),m),{}),j={name:a.stackName,components:g};i.mutate({workspaceId:((c=t.data)==null?void 0:c.id)||"",payload:j})}const l=me({resolver:Ie(We),defaultValues:{components:{alerter:null,orchestrator:{},annotator:null,artifact_store:{},container_registry:null,data_validator:null,experiment_tracker:null,feature_store:null,model_registry:null,image_builder:null,model_deployer:null,step_operator:null},stackName:""}});return{createManualStack:o,form:l}}function Mt(){const[t,s]=d.useState(""),{createManualStack:r,form:n}=et();return e.jsx(pe,{...n,children:e.jsx(V,{value:t,onValueChange:s,className:"h-full",children:e.jsxs("form",{onSubmit:n.handleSubmit(r),className:"flex h-[calc(100vh_-_4rem_-_4rem_-_2px)] flex-1 flex-col divide-y divide-theme-border-moderate xl:flex-row-reverse xl:divide-x xl:divide-y-0 xl:divide-x-reverse",children:[e.jsx($,{className:"h-full flex-1 bg-theme-surface-primary",children:e.jsx(Ge,{})}),e.jsx($,{children:e.jsx(Qe,{})})]})})})}function $({className:t,...s}){return e.jsx("div",{className:le("w-full overflow-y-auto xl:w-1/2",t),...s})}export{Mt as default};
@@ -1 +0,0 @@
1
- import{r as x,j as e}from"./@radix-AvWw-1nd.js";import{p as D,q as C,k as E,F as T,ak as $,al as H,f as h,am as F,an as P,ao as O,i as U,I as j,ar as A,as as V,at as G,t as J,D as W,x as X,y as Y,C as Z,aK as ee,r as N,L as S,az as se,z as f,m as te,O as ae,S as w,o as re,B as ne}from"./index-DWoLoYDY.js";import{S as ie,P as le}from"./SearchField-DfNxVtjV.js";import{S as ce,s as oe,E as de,a as me,b as ue}from"./SecretTooltip-CHPWF0bu.js";import{b as I,c as L,a as v}from"./@tanstack-CcI3lvwB.js";import{w as xe}from"./index-Dba8yULY.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-Bk4QLPTU.js";import{c as Se}from"./code-snippets-CqONne41.js";import{L as b,d as we}from"./@react-router-BUo5vhN4.js";import{D as k}from"./DialogItem-ST291Hsl.js";import"./@reactflow-DMaYqp8l.js";import"./chevron-right-double-zKz7rAaU.js";import"./index-BVVKxTWC.js";import"./CodeSnippet-D8ptwPjg.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:M}=be({onError(l){G(l)&&z({status:"error",emphasis:"subtle",description:l.message,rounded:!0})},onSuccess(){B.invalidateQueries({queryKey:["secrets"]}),t(!1),p()}}),Q=l=>{M({user:s,workspace:a,name:l.secretName,scope:"workspace",values:l.keysValues.reduce((c,d)=>(d.key&&d.value&&(c[d.key]=d.value),c),{})})},K=l=>{Q(l)};return e.jsxs(e.Fragment,{children:[e.jsx("form",{id:"create-secret-form",className:"gap-5 p-5",onSubmit:r(K),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=Se(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(S,{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(S,{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]=we(),{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(w,{className:"h-[250px] w-full"})}),t?t.total_pages>1&&e.jsx(le,{searchParams:s,paginate:t}):e.jsx(w,{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 +0,0 @@
1
- import{j as e}from"./@radix-AvWw-1nd.js";import{S as o}from"./link-external-BYm_zH_8.js";import{u as c,A as d,a as x,g as m,b as u,S as a,c as n,d as f,B as i,r as h,e as p,f as j}from"./index-DWoLoYDY.js";import{g}from"./login-command-CkqxPtV3.js";import{L as v}from"./@react-router-BUo5vhN4.js";import{C as w}from"./CodeSnippet-D8ptwPjg.js";import"./@tanstack-CcI3lvwB.js";import"./@reactflow-DMaYqp8l.js";const b="/assets/cloud-squares-DeRLMopf.svg";function N(){var r,t,l;const{data:s}=c({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(d,{size:"xxl",type:"square",children:[e.jsx(x,{alt:"Logo displayed for the server",src:m(((r=s.body)==null?void 0:r.server_name)||"default",64)}),e.jsx(u,{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(y,{})})]})})]})})})}function y(){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(f,{className:"h-4 w-4 fill-theme-text-brand"}),s.version]})}function I(){return e.jsxs("div",{children:[e.jsx(N,{}),e.jsxs("div",{className:"layout-container space-y-5 py-5",children:[e.jsx(L,{}),e.jsx(k,{})]})]})}function L(){const{data:s}=n();return e.jsxs(i,{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(v,{className:"link text-theme-text-brand",to:h.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(w,{codeClasses:"truncate",className:"truncate",code:g((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:b,className:"h-full w-full"})})]})}function k(){return e.jsxs(i,{className:"flex flex-col items-center justify-between gap-3 overflow-hidden px-7 py-5 md:flex-row md:flex-wrap",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(p,{className:"text-text-xs font-semibold",color:"green",children:"NEW"}),e.jsx("h2",{className:"text-text-xl font-semibold",children:"VS Code Quickstart with ZenML"})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Get started quickly with ZenML using GitHub Codespaces! You can run our quickstart guide in a pre-configured environment."})]}),e.jsx(j,{size:"sm",className:"w-fit",emphasis:"subtle",asChild:!0,children:e.jsxs("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/zenml-io/zenml",children:["Visit our GitHub repo ",e.jsx(o,{className:"h-5 w-5 shrink-0"})]})})]})}export{I as default};
@@ -1,6 +0,0 @@
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-CHPWF0bu.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 A,ax as K,f as h,D as O,x as V,y as L,C as B,S as z,ak as F,al as I,O as Q,o as R,B as q,L as M}from"./index-DWoLoYDY.js";import{S as P}from"./key-icon-CjwWwoOU.js";import{S as H}from"./trash-B_JgTgqd.js";import{A as _}from"./AlertDialogDropdownItem-XL2NfFgP.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-D8ptwPjg.js";import"./@reactflow-DMaYqp8l.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(A,{className:"gap-[10px]",children:[e.jsx(K,{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(O,{onOpenChange:a,open:t,children:[e.jsx(V,{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};
@@ -1 +0,0 @@
1
- import{r as i,j as e}from"./@radix-AvWw-1nd.js";import{S as o,f as n,r as c,aS as d}from"./index-DWoLoYDY.js";import{S as h}from"./StackList-C8KNd00o.js";import{p as m,c as j}from"./persist-CMkLV2Cs.js";import{p as l,c as k}from"./persist-BglceT_t.js";import{I as p}from"./Infobox-DYKoAVhW.js";import{s as u}from"./index-CaRx22lH.js";import{a as f}from"./@tanstack-CcI3lvwB.js";import{L as x}from"./@react-router-BUo5vhN4.js";import"./@reactflow-DMaYqp8l.js";import"./plus-CoKtHiA9.js";import"./refresh-CupyU1Vs.js";import"./SearchField-DfNxVtjV.js";import"./chevron-right-double-zKz7rAaU.js";import"./index-BVVKxTWC.js";import"./DisplayDate-C5Aw-Yca.js";import"./InlineAvatar-Bk4QLPTU.js";import"./CodeSnippet-D8ptwPjg.js";import"./CollapsibleCard-Djtd_ocf.js";import"./chevron-down-A3PXOshS.js";import"./components-Br2ezRib.js";import"./NumberBox-BvBJYxCu.js";import"./ComponentBadge-CVN2FsiW.js";import"./ComponentIcon-gpMJ2Y2e.js";import"./layout-3_rgDUxf.js";import"./rocket-k68ONPDS.js";import"./transform-DKsRLKTv.js";import"./trash-B_JgTgqd.js";import"./DialogItem-ST291Hsl.js";import"./AlertDialogDropdownItem-XL2NfFgP.js";import"./sharedSchema-BOmQa793.js";import"./stack-detail-query-CI_YMUx6.js";function S({setHasResumeableStack:a}){const{success:t,data:s}=m(),r=f({...u.stackDeploymentStack({provider:(s==null?void 0:s.provider)||"aws",stack_name:(s==null?void 0:s.stackName)||"",date_start:s==null?void 0:s.timestamp}),enabled:t,throwOnError:!0});return i.useEffect(()=>{r.data&&(j(),a(!1))},[r.data]),!t||r.isError?null:r.isPending?e.jsx(o,{className:"h-[70px] w-full"}):e.jsx(p,{className:"w-full",children:e.jsxs("section",{className:"flex flex-wrap items-center justify-between gap-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{className:"font-semibold",children:"You have a Stack provision incomplete"}),e.jsx("p",{className:"text-text-sm",children:"Return to the setup and finish the configuration on your cloud provider"})]}),e.jsx("div",{children:e.jsx(n,{className:"w-fit bg-theme-surface-primary",intent:"primary",emphasis:"subtle",asChild:!0,children:e.jsx(x,{to:c.stacks.create.newInfra,children:e.jsx("span",{children:"Review Stack"})})})})]})})}function w({setHasResumeableTerraform:a}){const{success:t,data:s}=l(),r=f({...u.stackDeploymentStack({provider:(s==null?void 0:s.provider)||"aws",stack_name:(s==null?void 0:s.stackName)||"",date_start:s==null?void 0:s.timestamp}),enabled:t,throwOnError:!0});return i.useEffect(()=>{r.data&&(k(),a(!1))},[r.data]),!t||r.isError?null:r.isPending?e.jsx(o,{className:"h-[70px] w-full"}):e.jsx(p,{className:"w-full",children:e.jsxs("section",{className:"flex flex-wrap items-center justify-between gap-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{className:"font-semibold",children:"You have a Terraform Stack provision incomplete"}),e.jsx("p",{className:"text-text-sm",children:"Return to the setup and finish the configuration on your cloud provider"})]}),e.jsx("div",{children:e.jsx(n,{className:"w-fit bg-theme-surface-primary",intent:"primary",emphasis:"subtle",asChild:!0,children:e.jsx(x,{to:c.stacks.create.terraform,children:e.jsx("span",{children:"Review Stack"})})})})]})})}function v(){const[a,t]=i.useState(m().success),[s,r]=i.useState(l().success);return e.jsxs("div",{className:"space-y-5",children:[a&&e.jsx(S,{setHasResumeableStack:t}),s&&e.jsx(w,{setHasResumeableTerraform:r})]})}function ee(){const{setTourState:a,tourState:{tourActive:t}}=d();return i.useEffect(()=>{t&&a(s=>({...s,run:!0,stepIndex:s.stepIndex}))},[t]),e.jsxs("div",{className:"space-y-5",children:[e.jsx(v,{}),e.jsx(h,{})]})}export{ee as default};
@@ -1 +0,0 @@
1
- import{r as l,j as e}from"./@radix-AvWw-1nd.js";import{u as m,S as I,C as x,P as f,W as B,L as M}from"./ProviderRadio-C4bltH6-.js";import{p as C,s as A,c as k}from"./persist-BglceT_t.js";import{I as b}from"./Infobox-DYKoAVhW.js";import{W as v,H as g,B as y}from"./Wizard-CynnoHg4.js";import{t as z}from"./zod-CRNUMWWg.js";import{f as u,aQ as F,S as P,r as Z,z as _}from"./index-DWoLoYDY.js";import{u as T,F as L,b as W}from"./index.esm-cf-8NBxV.js";import{S as N}from"./WizardFooter-B2bYs89C.js";import{R as V,a as H,E as O,C as Q}from"./Partials-cL1-u_sT.js";import{a as $,d as G}from"./persist-CMkLV2Cs.js";import{S as Y}from"./link-external-BYm_zH_8.js";import{S as q}from"./logs-D6_diV2k.js";import{C as j}from"./CodeSnippet-D8ptwPjg.js";import{N as w}from"./NumberBox-BvBJYxCu.js";import{s as E}from"./index-CaRx22lH.js";import{a as D}from"./@tanstack-CcI3lvwB.js";import{a as J}from"./@react-router-BUo5vhN4.js";import{C as h}from"./ProviderIcon-DKN3Gdcg.js";import"./Tick-DgU4udUn.js";import"./check-DZ0KAh3W.js";import"./@reactflow-DMaYqp8l.js";import"./package-BOms6B-A.js";import"./ComponentBadge-CVN2FsiW.js";import"./ComponentIcon-gpMJ2Y2e.js";import"./layout-3_rgDUxf.js";import"./rocket-k68ONPDS.js";import"./transform-DKsRLKTv.js";import"./sharedSchema-BOmQa793.js";import"./stack-detail-query-CI_YMUx6.js";import"./gcp-0u4le6mC.js";const R=l.createContext(null);function K({children:r}){const{setCurrentStep:t}=m(),[i,s]=l.useState({}),[o,c]=l.useState("");return l.useEffect(()=>{const{success:a,data:n}=C();if(a){t(3),s({location:n.location,provider:n.provider,stackName:n.stackName}),c(n.timestamp);return}t(1)},[C]),e.jsx(R.Provider,{value:{data:i,setData:s,timestamp:o,setTimestamp:c},children:r})}function d(){const r=l.useContext(R);if(r===null)throw new Error("useCreateTerraformContext must be used within an CreateTerraformContext");return r}function U(){const{setData:r,data:t,setTimestamp:i}=d(),{setCurrentStep:s}=m(),o=T({resolver:z($,{async:!0}),defaultValues:{region:t.location||"",stackName:t.stackName||""}});function c(a){const n=new Date().toISOString().slice(0,-1);A({location:a.region,provider:t.provider||"aws",stackName:a.stackName,timestamp:n}),i(n),r(p=>({...p,location:a.region,stackName:a.stackName})),s(p=>p+1)}return e.jsx(L,{...o,children:e.jsxs(v,{children:[e.jsx(g,{children:"Review Stack Configuration"}),e.jsx(y,{children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs(b,{className:"text-text-sm",children:[e.jsx("p",{className:"font-semibold",children:"Important"}),e.jsx("p",{children:"This will create new resources in your account. Ensure you have the necessary permissions and are aware of any potential costs."})]}),e.jsxs("form",{id:"configuration-form",onSubmit:o.handleSubmit(c),className:"space-y-5",children:[e.jsx(V,{provider:t.provider||"aws"}),e.jsx(I,{})]}),e.jsx(H,{provider:t.provider||"aws"}),e.jsx(O,{provider:t.provider||"aws"})]})}),e.jsx(N,{children:e.jsx(X,{})})]})})}function X(){const{formState:{isSubmitting:r}}=W();return e.jsx(u,{disabled:r,form:"configuration-form",size:"md",children:"Next"})}function ee(){return e.jsxs("div",{className:"space-y-5",children:[e.jsx("div",{className:"space-y-1",children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(w,{children:"3"}),e.jsx("span",{className:"text-text-lg font-semibold",children:"Run the following commands"})]})}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Initialize the Terraform configuration."}),e.jsx(j,{code:"terraform init --upgrade"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-text-sm text-theme-text-secondary",children:"Run terraform apply to deploy the ZenML stack to Azure."}),e.jsx(j,{code:"terraform apply"})]})]})}function re(){const{data:r,timestamp:t}=d(),{setCurrentStep:i}=m(),s=D({...E.stackDeploymentStack({provider:r.provider,stack_name:r.stackName,date_start:t,terraform:!0}),refetchInterval:5e3,throwOnError:!0});return l.useEffect(()=>{s.data&&(k(),i(o=>o+1))},[s.data]),{fullstackDeployment:s,data:r}}function te(){const{fullstackDeployment:r,data:t}=re();return r.isError?e.jsx("p",{children:"Error fetching Terraform Command"}):r.isPending?e.jsx(P,{className:"h-[200px] w-full"}):e.jsx(ae,{provider:t.provider||"aws",stackName:t.stackName||""})}function se(){return e.jsxs("section",{className:"space-y-5 border-t border-theme-border-moderate pt-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(F,{className:"h-5 w-5 fill-primary-400"}),"Waiting for your Terraform script to finish..."]}),e.jsx("p",{className:"text-theme-text-secondary",children:"We are detecting whether your Terraform script ran through successfully. Once the terraform script has finished successfully, come back to check your brand new stack and components ready."})]}),e.jsx(te,{})]})}function ae({stackName:r,provider:t}){return e.jsxs("div",{className:"relative overflow-hidden rounded-md",children:[e.jsx("div",{className:"absolute z-50 h-full w-full bg-neutral-50/50"}),e.jsx(Q,{type:t,componentProps:{isLoading:!0,isSuccess:!1,stackName:r}})]})}function oe(){return e.jsxs(v,{children:[e.jsx(g,{children:"Deploy ZenML Stack"}),e.jsx(y,{children:e.jsxs("section",{className:"space-y-5",children:[e.jsx(ne,{}),e.jsx(de,{}),e.jsx(me,{}),e.jsx(ee,{}),e.jsx(se,{})]})}),e.jsxs(N,{displayCancel:!1,children:[e.jsx(pe,{}),e.jsx(ie,{})]})]})}function ie(){return e.jsx(u,{disabled:!0,size:"md",children:"Next"})}function ne(){return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"flex items-center gap-1 text-text-lg font-semibold",children:[e.jsx(q,{className:"h-5 w-5 fill-primary-400"}),"Configuration"]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Follow the steps to deploy your Stack."})]})}function ce(r){switch(r){case"aws":return"https://aws.amazon.com/cli/";case"azure":return"https://learn.microsoft.com/en-us/cli/azure/";case"gcp":return"https://cloud.google.com/sdk/gcloud"}}function le(r){switch(r){case"aws":return"AWS";case"gcp":return"gcloud";case"azure":return"Azure"}}function de(){const{data:r}=d();return e.jsx("div",{className:"space-y-5",children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(w,{children:"1"}),e.jsxs("span",{className:"text-text-lg font-semibold",children:["Login locally with the ",le(r.provider||"aws")," CLI"]})]}),e.jsx("p",{className:"text-theme-text-secondary",children:"Make sure you are logged in locally with an account with appropriate permissions."}),e.jsx(u,{asChild:!0,className:"w-fit gap-1",intent:"secondary",emphasis:"subtle",size:"md",children:e.jsxs("a",{rel:"noopener noreferrer",target:"_blank",href:ce(r.provider||"aws"),children:[e.jsx("span",{children:"Learn More"}),e.jsx(Y,{className:"h-5 w-5 shrink-0 fill-primary-900"})]})})]})})}function me(){const{data:r}=d();return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(w,{children:"2"}),e.jsx("span",{className:"text-text-lg font-semibold",children:"Create a file with the following configuration"})]}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Create a file named ",e.jsx("code",{className:"font-mono text-primary-400",children:"main.tf"})," in the Cloud Shell and copy and paste the Terraform configuration below into it."]})]}),r.provider==="gcp"&&e.jsxs(b,{intent:"warning",children:["Please replace ",e.jsx("code",{className:"font-mono text-primary-400",children:"project_id"})," in the following Terraform script with your own one."]}),e.jsx(ue,{})]})}function ue(){const{data:r}=d(),t=D({...E.stackDeploymentConfig({provider:r.provider||"aws",terraform:!0,stack_name:r.stackName,location:r.location}),enabled:!!r.stackName});return t.isError?null:t.isPending?e.jsx(P,{className:"h-[200px] w-full"}):e.jsx(j,{fullWidth:!0,highlightCode:!0,codeClasses:"whitespace-pre-wrap word-break-all",wrap:!0,code:t.data.configuration||""})}function pe(){const r=J();function t(){k(),r(Z.stacks.create.index)}return e.jsx(u,{onClick:()=>t(),intent:"secondary",size:"md",children:"Cancel"})}const xe=_.object({provider:G});function fe(){const{setData:r,data:t}=d(),{setCurrentStep:i}=m(),s=T({resolver:z(xe),defaultValues:{provider:t.provider||void 0}});function o(c){r(a=>({...a,provider:c.provider})),i(a=>a+1)}return e.jsx(L,{...s,children:e.jsxs(v,{children:[e.jsx(g,{children:"New Cloud infrastructure"}),e.jsx(y,{children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-lg font-semibold",children:"Select a Cloud Provider"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Select the cloud provider where your want to create your infrastructure. You will be able to remove the ZenML stack at any time."})]}),e.jsxs("form",{id:"provider-form",onSubmit:s.handleSubmit(o),className:"grid grid-cols-1 gap-3 xl:grid-cols-3",children:[e.jsx(x,{id:"aws-provider",...s.register("provider"),value:"aws",children:e.jsx(f,{icon:e.jsx(h,{provider:"aws",className:"h-6 w-6 shrink-0"}),title:"AWS",subtitle:"Connect your existing S3, ECR, and Sagemaker components to ZenML"})}),e.jsx(x,{id:"gcp-provider",...s.register("provider"),value:"gcp",children:e.jsx(f,{icon:e.jsx(h,{provider:"gcp",className:"h-6 w-6 shrink-0"}),title:"GCP",subtitle:"Link your GCS, Artifact Registry, and Vertex AI components to ZenML"})}),e.jsx(x,{id:"azure-provider",...s.register("provider"),value:"azure",children:e.jsx(f,{icon:e.jsx(h,{provider:"azure",className:"h-6 w-6 shrink-0"}),title:"Azure",subtitle:"Integrate ZenML with your Blob Storage, Container Registry, and Azure ML"})})]})]})}),e.jsx(N,{children:e.jsx(he,{})})]})})}function he(){const{formState:{isValid:r}}=W();return e.jsx(u,{form:"provider-form",disabled:!r,size:"md",children:"Next"})}function je(){const{currentStep:r}=m();if(r===1)return e.jsx(fe,{});if(r===2)return e.jsx(U,{});if(r===3)return e.jsx(oe,{})}const S=["Infrastructure Type","Cloud Provider","Review Configuration","Deploy Stack"];function qe(){return e.jsx(B,{maxSteps:S.length,initialStep:0,children:e.jsx(K,{children:e.jsxs("section",{className:"layout-container flex flex-col gap-5 py-5 xl:flex-row",children:[e.jsx(M,{entries:S}),e.jsx("div",{className:"w-full overflow-y-hidden",children:e.jsx(je,{})})]})})})}export{qe as default};
@@ -1 +0,0 @@
1
- import{k as a,t as r,F as n,p as o,q as u}from"./index-DWoLoYDY.js";import{a as i}from"./@tanstack-CcI3lvwB.js";function c({stackId:t}){return["stacks",t]}async function f({stackId:t}){const s=o(u.stacks.detail(t)),e=await a(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(e.status===404&&r(),!e.ok)throw new n({message:`Error while fetching stack ${t}`,status:e.status,statusText:e.statusText});return e.json()}function y(t,s){return i({queryKey:c(t),queryFn:()=>f(t),...s})}export{f,y as u};
@@ -1 +0,0 @@
1
- import{r as C}from"./@radix-AvWw-1nd.js";const H=e=>C.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.56811 2C4.57873 2 4.58936 2.00001 4.60001 2.00001H5.40001C5.41065 2.00001 5.42128 2 5.4319 2C5.68429 1.99997 5.93008 1.99994 6.13824 2.01695C6.36683 2.03563 6.63656 2.07969 6.90799 2.21799C7.28431 2.40974 7.59027 2.7157 7.78202 3.09202C7.92032 3.36345 7.96438 3.63318 7.98306 3.86178C7.98669 3.90624 7.98955 3.95241 7.99179 4.00001L16.0082 4.00001C16.0105 3.95241 16.0133 3.90624 16.0169 3.86178C16.0356 3.63318 16.0797 3.36345 16.218 3.09202C16.4097 2.7157 16.7157 2.40974 17.092 2.21799C17.3634 2.07969 17.6332 2.03563 17.8618 2.01695C18.0699 1.99994 18.3157 1.99997 18.5681 2H19.4319C19.6843 1.99997 19.9301 1.99994 20.1382 2.01695C20.3668 2.03563 20.6366 2.07969 20.908 2.21799C21.2843 2.40974 21.5903 2.7157 21.782 3.09202C21.9203 3.36345 21.9644 3.63318 21.9831 3.86178C22.0001 4.06993 22 4.31571 22 4.56809V5.43192C22 5.6843 22.0001 5.93008 21.9831 6.13824C21.9644 6.36683 21.9203 6.63656 21.782 6.90799C21.5903 7.28431 21.2843 7.59027 20.908 7.78202C20.6366 7.92032 20.3668 7.96438 20.1382 7.98306C20.0938 7.98669 20.0476 7.98955 20 7.99179V16.0082C20.0476 16.0105 20.0938 16.0133 20.1382 16.0169C20.3668 16.0356 20.6366 16.0797 20.908 16.218C21.2843 16.4097 21.5903 16.7157 21.782 17.092C21.9203 17.3634 21.9644 17.6332 21.9831 17.8618C22.0001 18.0699 22 18.3157 22 18.5681V19.4319C22 19.6843 22.0001 19.9301 21.9831 20.1382C21.9644 20.3668 21.9203 20.6366 21.782 20.908C21.5903 21.2843 21.2843 21.5903 20.908 21.782C20.6366 21.9203 20.3668 21.9644 20.1382 21.9831C19.9301 22.0001 19.6843 22 19.4319 22H18.5681C18.3157 22 18.0699 22.0001 17.8618 21.9831C17.6332 21.9644 17.3634 21.9203 17.092 21.782C16.7157 21.5903 16.4097 21.2843 16.218 20.908C16.0797 20.6366 16.0356 20.3668 16.0169 20.1382C16.0133 20.0938 16.0105 20.0476 16.0082 20H7.99179C7.98955 20.0476 7.98669 20.0938 7.98306 20.1382C7.96438 20.3668 7.92032 20.6366 7.78202 20.908C7.59027 21.2843 7.28431 21.5903 6.90799 21.782C6.63656 21.9203 6.36683 21.9644 6.13824 21.9831C5.93008 22.0001 5.6843 22 5.43192 22H4.56809C4.31571 22 4.06993 22.0001 3.86178 21.9831C3.63318 21.9644 3.36345 21.9203 3.09202 21.782C2.7157 21.5903 2.40974 21.2843 2.21799 20.908C2.07969 20.6366 2.03563 20.3668 2.01695 20.1382C1.99994 19.9301 1.99997 19.6843 2 19.4319V18.5681C1.99997 18.3157 1.99994 18.0699 2.01695 17.8618C2.03563 17.6332 2.07969 17.3634 2.21799 17.092C2.40974 16.7157 2.7157 16.4097 3.09202 16.218C3.36345 16.0797 3.63318 16.0356 3.86178 16.0169C3.90624 16.0133 3.95241 16.0105 4.00001 16.0082V7.99179C3.95241 7.98955 3.90624 7.98669 3.86178 7.98306C3.63318 7.96438 3.36345 7.92032 3.09202 7.78202C2.7157 7.59027 2.40974 7.28431 2.21799 6.90799C2.07969 6.63656 2.03563 6.36683 2.01695 6.13824C1.99994 5.93008 1.99997 5.68429 2 5.4319C2 5.42128 2.00001 5.41065 2.00001 5.40001V4.60001C2.00001 4.58936 2 4.57873 2 4.56811C1.99997 4.31572 1.99994 4.06993 2.01695 3.86178C2.03563 3.63318 2.07969 3.36345 2.21799 3.09202C2.40974 2.7157 2.7157 2.40974 3.09202 2.21799C3.36345 2.07969 3.63318 2.03563 3.86178 2.01695C4.06993 1.99994 4.31572 1.99997 4.56811 2ZM6.00001 7.99179V16.0082C6.0476 16.0105 6.09377 16.0133 6.13824 16.0169C6.36683 16.0356 6.63656 16.0797 6.90799 16.218C7.28431 16.4097 7.59027 16.7157 7.78202 17.092C7.92032 17.3634 7.96438 17.6332 7.98306 17.8618C7.98669 17.9062 7.98955 17.9524 7.99179 18H16.0082C16.0105 17.9524 16.0133 17.9062 16.0169 17.8618C16.0356 17.6332 16.0797 17.3634 16.218 17.092C16.4097 16.7157 16.7157 16.4097 17.092 16.218C17.3634 16.0797 17.6332 16.0356 17.8618 16.0169C17.9062 16.0133 17.9524 16.0105 18 16.0082V7.99179C17.9524 7.98955 17.9062 7.98669 17.8618 7.98306C17.6332 7.96438 17.3634 7.92032 17.092 7.78202C16.7157 7.59027 16.4097 7.28431 16.218 6.90799C16.0797 6.63656 16.0356 6.36683 16.0169 6.13824C16.0133 6.09377 16.0105 6.0476 16.0082 6.00001L7.99179 6.00001C7.98955 6.0476 7.98669 6.09377 7.98306 6.13824C7.96438 6.36683 7.92032 6.63656 7.78202 6.90799C7.59027 7.28431 7.28431 7.59027 6.90799 7.78202C6.63656 7.92032 6.36683 7.96438 6.13824 7.98306C6.09377 7.98669 6.0476 7.98955 6.00001 7.99179ZM6.00001 4.60001C6.00001 4.30348 5.99923 4.14122 5.9897 4.02464C5.98932 4.02 5.98894 4.0156 5.98856 4.01145C5.98441 4.01107 5.98001 4.01069 5.97537 4.01031C5.85879 4.00078 5.69653 4.00001 5.40001 4.00001H4.60001C4.30348 4.00001 4.14122 4.00078 4.02464 4.01031C4.02 4.01069 4.0156 4.01107 4.01145 4.01145C4.01107 4.0156 4.01069 4.02 4.01031 4.02464C4.00078 4.14122 4.00001 4.30348 4.00001 4.60001V5.40001C4.00001 5.69653 4.00078 5.85879 4.01031 5.97537C4.01069 5.98001 4.01107 5.98441 4.01145 5.98856C4.0156 5.98894 4.02 5.98932 4.02464 5.9897C4.14122 5.99923 4.30348 6.00001 4.60001 6.00001H5.40001C5.69653 6.00001 5.85879 5.99923 5.97537 5.9897C5.98001 5.98932 5.98441 5.98894 5.98856 5.98856C5.98894 5.98441 5.98932 5.98001 5.9897 5.97537C5.99923 5.85879 6.00001 5.69653 6.00001 5.40001V4.60001ZM18 5.40001C18 5.69653 18.0008 5.85879 18.0103 5.97537C18.0107 5.98001 18.0111 5.98441 18.0115 5.98856C18.0156 5.98894 18.02 5.98932 18.0246 5.9897C18.1412 5.99923 18.3035 6.00001 18.6 6.00001H19.4C19.6965 6.00001 19.8588 5.99923 19.9754 5.9897C19.98 5.98932 19.9844 5.98893 19.9886 5.98855C19.9889 5.9844 19.9893 5.98001 19.9897 5.97537C19.9992 5.85879 20 5.69653 20 5.40001V4.60001C20 4.30348 19.9992 4.14122 19.9897 4.02464C19.9893 4.02 19.9889 4.0156 19.9885 4.01145C19.9844 4.01107 19.98 4.01069 19.9754 4.01031C19.8588 4.00078 19.6965 4.00001 19.4 4.00001H18.6C18.3035 4.00001 18.1412 4.00078 18.0246 4.01031C18.02 4.01069 18.0156 4.01107 18.0115 4.01145C18.0111 4.0156 18.0107 4.02 18.0103 4.02464C18.0008 4.14122 18 4.30348 18 4.60001V5.40001ZM18.6 18C18.3035 18 18.1412 18.0008 18.0246 18.0103C18.02 18.0107 18.0156 18.0111 18.0115 18.0115C18.0111 18.0156 18.0107 18.02 18.0103 18.0246C18.0008 18.1412 18 18.3035 18 18.6V19.4C18 19.6965 18.0008 19.8588 18.0103 19.9754C18.0107 19.98 18.0111 19.9844 18.0115 19.9885C18.0156 19.9889 18.02 19.9893 18.0246 19.9897C18.1412 19.9992 18.3035 20 18.6 20H19.4C19.6965 20 19.8588 19.9992 19.9754 19.9897C19.98 19.9893 19.9844 19.9889 19.9886 19.9885C19.9889 19.9844 19.9893 19.98 19.9897 19.9754C19.9992 19.8588 20 19.6965 20 19.4V18.6C20 18.3035 19.9992 18.1412 19.9897 18.0246C19.9893 18.02 19.9889 18.0156 19.9885 18.0115C19.9844 18.0111 19.98 18.0107 19.9754 18.0103C19.8588 18.0008 19.6965 18 19.4 18H18.6ZM6.00001 18.6C6.00001 18.3035 5.99923 18.1412 5.9897 18.0246C5.98932 18.02 5.98894 18.0156 5.98856 18.0115C5.98441 18.0111 5.98001 18.0107 5.97537 18.0103C5.85879 18.0008 5.69653 18 5.40001 18H4.60001C4.30348 18 4.14122 18.0008 4.02464 18.0103C4.02 18.0107 4.0156 18.0111 4.01145 18.0115C4.01107 18.0156 4.01069 18.02 4.01031 18.0246C4.00078 18.1412 4.00001 18.3035 4.00001 18.6V19.4C4.00001 19.6965 4.00078 19.8588 4.01031 19.9754C4.01069 19.98 4.01107 19.9844 4.01145 19.9885C4.0156 19.9889 4.02 19.9893 4.02464 19.9897C4.14122 19.9992 4.30348 20 4.60001 20H5.40001C5.69653 20 5.85879 19.9992 5.97537 19.9897C5.98001 19.9893 5.98441 19.9889 5.98856 19.9885C5.98894 19.9844 5.98932 19.98 5.9897 19.9754C5.99923 19.8588 6.00001 19.6965 6.00001 19.4V18.6Z"}));export{H as S};
@@ -1 +0,0 @@
1
- import{k as n,F as i,p as o,q as u}from"./index-DWoLoYDY.js";import{b as c}from"./@tanstack-CcI3lvwB.js";async function p(e){const r=o(u.settings),t=await n(r,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const a=await t.json().then(s=>Array.isArray(s.detail)?s.detail[1]:s.detail).catch(()=>"Failed to update Server Settings");throw new i({status:t.status,statusText:t.statusText,message:a})}return t.json()}function f(e){return c({mutationFn:async r=>p(r),...e})}export{f as u};