zenml-nightly 0.82.1.dev20250526__py3-none-any.whl → 0.82.1.dev20250528__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 (311) hide show
  1. zenml/VERSION +1 -1
  2. zenml/artifacts/utils.py +8 -0
  3. zenml/cli/base.py +6 -1
  4. zenml/cli/model.py +16 -36
  5. zenml/cli/server.py +8 -3
  6. zenml/client.py +20 -4
  7. zenml/client_lazy_loader.py +2 -0
  8. zenml/config/docker_settings.py +15 -2
  9. zenml/enums.py +3 -0
  10. zenml/event_hub/event_hub.py +1 -1
  11. zenml/integrations/bitbucket/plugins/event_sources/bitbucket_webhook_event_source.py +1 -1
  12. zenml/integrations/github/plugins/event_sources/github_webhook_event_source.py +1 -1
  13. zenml/integrations/kubernetes/flavors/kubernetes_orchestrator_flavor.py +3 -0
  14. zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator_entrypoint.py +37 -26
  15. zenml/logging/step_logging.py +17 -4
  16. zenml/login/web_login.py +1 -1
  17. zenml/model/model.py +13 -23
  18. zenml/models/__init__.py +39 -2
  19. zenml/models/v2/base/scoped.py +34 -15
  20. zenml/models/v2/core/artifact.py +10 -9
  21. zenml/models/v2/core/artifact_version.py +16 -16
  22. zenml/models/v2/core/logs.py +8 -50
  23. zenml/models/v2/core/model.py +10 -10
  24. zenml/models/v2/core/model_version.py +155 -88
  25. zenml/models/v2/core/pipeline.py +10 -11
  26. zenml/models/v2/core/pipeline_deployment.py +1 -9
  27. zenml/models/v2/core/pipeline_run.py +10 -17
  28. zenml/models/v2/core/run_template.py +10 -10
  29. zenml/models/v2/core/step_run.py +100 -16
  30. zenml/models/v2/core/tag.py +5 -4
  31. zenml/models/v2/misc/pipeline_run_dag.py +46 -0
  32. zenml/orchestrators/base_orchestrator.py +8 -19
  33. zenml/orchestrators/cache_utils.py +48 -1
  34. zenml/orchestrators/input_utils.py +35 -39
  35. zenml/orchestrators/step_launcher.py +1 -1
  36. zenml/orchestrators/step_run_utils.py +26 -10
  37. zenml/pipelines/pipeline_definition.py +3 -3
  38. zenml/pipelines/run_utils.py +2 -3
  39. zenml/service_connectors/service_connector.py +5 -1
  40. zenml/stack/stack_component.py +1 -4
  41. zenml/steps/step_context.py +1 -1
  42. zenml/utils/dashboard_utils.py +3 -3
  43. zenml/zen_server/auth.py +6 -3
  44. zenml/zen_server/cloud_utils.py +2 -2
  45. zenml/zen_server/dashboard/assets/{404-_AtuLtaX.js → 404-DmJUgorp.js} +1 -1
  46. zenml/zen_server/dashboard/assets/{@radix-C7hRs6Kx.js → @radix-Cdvw4jJ8.js} +1 -1
  47. zenml/zen_server/dashboard/assets/{@react-router-CNP6g_RL.js → @react-router-DeDfXbUF.js} +5 -5
  48. zenml/zen_server/dashboard/assets/{@reactflow-CQi1Z1Wq.js → @reactflow-8OCk19Fi.js} +1 -1
  49. zenml/zen_server/dashboard/assets/{@tanstack-CSxjHCME.js → @tanstack-5gTMR7G2.js} +4 -4
  50. zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-CZW4QyWn.js +1 -0
  51. zenml/zen_server/dashboard/assets/ButtonGroup-DFWWFGUE.js +1 -0
  52. zenml/zen_server/dashboard/assets/{CodeSnippet-CvI6D0wx.js → CodeSnippet-D2HkkAGr.js} +1 -1
  53. zenml/zen_server/dashboard/assets/CollapsibleCard-CnS09ljw.js +1 -0
  54. zenml/zen_server/dashboard/assets/{ComponentBadge-DKw7Gndh.js → ComponentBadge-CDgdd0Ks.js} +1 -1
  55. zenml/zen_server/dashboard/assets/ComponentIcon-CbbOc7lb.js +1 -0
  56. zenml/zen_server/dashboard/assets/{DeleteAlertDialog-DVvXt-S6.js → DeleteAlertDialog-VIOMDLmx.js} +1 -1
  57. zenml/zen_server/dashboard/assets/DialogItem-ClFCqxEp.js +1 -0
  58. zenml/zen_server/dashboard/assets/{DisplayDate-CYVBBSgr.js → DisplayDate-8RESqe5H.js} +1 -1
  59. zenml/zen_server/dashboard/assets/{EmptyState-M1jafpg6.js → EmptyState-CjrgDtVk.js} +1 -1
  60. zenml/zen_server/dashboard/assets/{Error-BWaXP0VK.js → Error-CQzjbDcN.js} +1 -1
  61. zenml/zen_server/dashboard/assets/ExecutionStatus-CWreILP0.js +1 -0
  62. zenml/zen_server/dashboard/assets/{Helpbox-iE1xLmiZ.js → Helpbox-CiKxG5_X.js} +1 -1
  63. zenml/zen_server/dashboard/assets/Infobox-CGxFvqzi.js +1 -0
  64. zenml/zen_server/dashboard/assets/LeftSideMenu-DCsKdIjC.js +1 -0
  65. zenml/zen_server/dashboard/assets/{Lock-DW-0_M0o.js → Lock-CrIAdQo6.js} +1 -1
  66. zenml/zen_server/dashboard/assets/NestedCollapsible-3M4llYtH.js +1 -0
  67. zenml/zen_server/dashboard/assets/NumberBox-C0mQktmV.js +1 -0
  68. zenml/zen_server/dashboard/assets/Partials-DSjkttlz.js +1 -0
  69. zenml/zen_server/dashboard/assets/{PasswordChecker-lYTOtNom.js → PasswordChecker-B88WjuCe.js} +1 -1
  70. zenml/zen_server/dashboard/assets/ProCta-Dm5cWKpS.js +1 -0
  71. zenml/zen_server/dashboard/assets/{ProviderIcon-DLo7t1lo.js → ProviderIcon-DPwMR6nF.js} +1 -1
  72. zenml/zen_server/dashboard/assets/ProviderRadio-DEDNRgAb.js +1 -0
  73. zenml/zen_server/dashboard/assets/RunsBody-BRBn1e2O.js +1 -0
  74. zenml/zen_server/dashboard/assets/SearchField-DY6-UbRT.js +1 -0
  75. zenml/zen_server/dashboard/assets/SecretTooltip-CZTRnaCV.js +1 -0
  76. zenml/zen_server/dashboard/assets/{SetPassword-DR-EiLI5.js → SetPassword-BjNGDC5e.js} +1 -1
  77. zenml/zen_server/dashboard/assets/SheetHeader-CASpN2Lz.js +1 -0
  78. zenml/zen_server/dashboard/assets/StackComponentList-Be1pQt9m.js +1 -0
  79. zenml/zen_server/dashboard/assets/StackList-BdiR5DvR.js +1 -0
  80. zenml/zen_server/dashboard/assets/StackName-ojLC6xdl.js +1 -0
  81. zenml/zen_server/dashboard/assets/Tabs-DNSKblCM.js +1 -0
  82. zenml/zen_server/dashboard/assets/Tick-BPrWnNlN.js +1 -0
  83. zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-DbFEaezI.js → UpdatePasswordSchemas-CNfKDo2Q.js} +1 -1
  84. zenml/zen_server/dashboard/assets/UsageReason-Cb-mpV8M.js +1 -0
  85. zenml/zen_server/dashboard/assets/{Wizard-CMI6Ksgz.js → Wizard-Dg8Pmn5A.js} +1 -1
  86. zenml/zen_server/dashboard/assets/WizardFooter-BcNDIvlQ.js +1 -0
  87. zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-BGASHYtF.js → all-pipeline-runs-query-DCdax7I5.js} +1 -1
  88. zenml/zen_server/dashboard/assets/{arrow-left-CwgF2MEM.js → arrow-left-MRXv5pAH.js} +1 -1
  89. zenml/zen_server/dashboard/assets/bulk-delete-C_kpIB9A.js +3 -0
  90. zenml/zen_server/dashboard/assets/{check-DK77doTf.js → check-B9QMTa3f.js} +1 -1
  91. zenml/zen_server/dashboard/assets/{check-circle-mvyzYvIW.js → check-circle-C4tYvbtw.js} +1 -1
  92. zenml/zen_server/dashboard/assets/{chevron-down-A-rmltmI.js → chevron-down-jbbQh82s.js} +1 -1
  93. zenml/zen_server/dashboard/assets/{chevron-right-double-uNWbJT-C.js → chevron-right-double-Dgp_gEsp.js} +1 -1
  94. zenml/zen_server/dashboard/assets/{clock-CPA5cYxq.js → clock-B_mTG8PH.js} +1 -1
  95. zenml/zen_server/dashboard/assets/{code-browser-j2EpcxIA.js → code-browser-CiD8qkBx.js} +1 -1
  96. zenml/zen_server/dashboard/assets/configuration-form-B2hmKGnF.js +1 -0
  97. zenml/zen_server/dashboard/assets/connectivity-4UKGMYnr.webp +0 -0
  98. zenml/zen_server/dashboard/assets/constants-1EZZxtay.js +1 -0
  99. zenml/zen_server/dashboard/assets/create-stack-TKmMtrkQ.js +1 -0
  100. zenml/zen_server/dashboard/assets/dates-Buh6SMo7.js +1 -0
  101. zenml/zen_server/dashboard/assets/delete-run-CCR9md_s.js +1 -0
  102. zenml/zen_server/dashboard/assets/eye-CbVlAYty.js +1 -0
  103. zenml/zen_server/dashboard/assets/{file-text-BdxZdjP_.js → file-text-Cd8wVfq5.js} +1 -1
  104. zenml/zen_server/dashboard/assets/form-DFJkaFDX.js +1 -0
  105. zenml/zen_server/dashboard/assets/form-schemas-CrznJVzA.js +1 -0
  106. zenml/zen_server/dashboard/assets/{gcp-CHNvgEss.js → gcp-B1I3Qvcx.js} +1 -1
  107. zenml/zen_server/dashboard/assets/{help-DyMolRxD.js → help-Co6aedki.js} +1 -1
  108. zenml/zen_server/dashboard/assets/index-BFqbGSck.js +308 -0
  109. zenml/zen_server/dashboard/assets/{index-CrhdX_qG.js → index-BjUu1mP4.js} +1 -1
  110. zenml/zen_server/dashboard/assets/{index-DR30v9MZ.js → index-DWpiv-Ft.js} +1 -1
  111. zenml/zen_server/dashboard/assets/index-DuhuqTCI.css +1 -0
  112. zenml/zen_server/dashboard/assets/index-U992soPJ.js +1 -0
  113. zenml/zen_server/dashboard/assets/index.es-C1gfATPn.js +14 -0
  114. zenml/zen_server/dashboard/assets/{index.esm-D7jFlf5N.js → index.esm-DhJo3mA6.js} +1 -1
  115. zenml/zen_server/dashboard/assets/info-QkbQz4QU.js +1 -0
  116. zenml/zen_server/dashboard/assets/{key-icon-DO4DPJHZ.js → key-icon-C07HKw8z.js} +1 -1
  117. zenml/zen_server/dashboard/assets/{layout-h3cbx8WZ.js → layout-DBbfEFBe.js} +1 -1
  118. zenml/zen_server/dashboard/assets/layout-Do9YI4QX.js +1 -0
  119. zenml/zen_server/dashboard/assets/login-mutation-D3tFP6Wm.js +1 -0
  120. zenml/zen_server/dashboard/assets/{logs-B5n0U7tB.js → logs-CQKlJjo0.js} +1 -1
  121. zenml/zen_server/dashboard/assets/{package-D1Mhqeh8.js → package-miExReQl.js} +1 -1
  122. zenml/zen_server/dashboard/assets/page-9RjCitFH.js +1 -0
  123. zenml/zen_server/dashboard/assets/page-B0PsXWiT.js +1 -0
  124. zenml/zen_server/dashboard/assets/page-BCrKmYIZ.js +1 -0
  125. zenml/zen_server/dashboard/assets/page-BcRI3-aR.js +29 -0
  126. zenml/zen_server/dashboard/assets/page-Be3R2uYn.js +1 -0
  127. zenml/zen_server/dashboard/assets/page-BgknnddT.js +1 -0
  128. zenml/zen_server/dashboard/assets/page-BrT0_zSJ.js +40 -0
  129. zenml/zen_server/dashboard/assets/page-Bs3W2FDi.js +1 -0
  130. zenml/zen_server/dashboard/assets/page-C210HcBA.js +1 -0
  131. zenml/zen_server/dashboard/assets/page-C6KaiZ_W.js +1 -0
  132. zenml/zen_server/dashboard/assets/page-CAJ8B0vb.js +1 -0
  133. zenml/zen_server/dashboard/assets/page-CAUYrfui.js +1 -0
  134. zenml/zen_server/dashboard/assets/page-CHxVhF3x.js +1 -0
  135. zenml/zen_server/dashboard/assets/{page-CSwZxZMQ.js → page-CN7lkvXr.js} +1 -1
  136. zenml/zen_server/dashboard/assets/page-CUaMMoPG.js +1 -0
  137. zenml/zen_server/dashboard/assets/page-Cal6XQ4U.js +1 -0
  138. zenml/zen_server/dashboard/assets/page-CdZCmszX.js +1 -0
  139. zenml/zen_server/dashboard/assets/page-ChGcZI_6.js +1 -0
  140. zenml/zen_server/dashboard/assets/page-CktmtZ8Z.js +1 -0
  141. zenml/zen_server/dashboard/assets/page-ClvmVesa.js +1 -0
  142. zenml/zen_server/dashboard/assets/page-CnbIYE80.js +1 -0
  143. zenml/zen_server/dashboard/assets/page-CoXzjeEY.js +1 -0
  144. zenml/zen_server/dashboard/assets/page-CtiuMP_r.js +1 -0
  145. zenml/zen_server/dashboard/assets/page-D9Hfx6GV.js +1 -0
  146. zenml/zen_server/dashboard/assets/page-D9iuB88h.js +1 -0
  147. zenml/zen_server/dashboard/assets/page-DCcuPZ8P.js +1 -0
  148. zenml/zen_server/dashboard/assets/page-DEohTSz6.js +1 -0
  149. zenml/zen_server/dashboard/assets/page-DJIGaUQ9.js +1 -0
  150. zenml/zen_server/dashboard/assets/page-DKK6ulgy.js +1 -0
  151. zenml/zen_server/dashboard/assets/page-DNjKHjnH.js +1 -0
  152. zenml/zen_server/dashboard/assets/page-DUK0Nd_1.js +1 -0
  153. zenml/zen_server/dashboard/assets/page-DUKbOhaD.js +1 -0
  154. zenml/zen_server/dashboard/assets/page-DYOucPtA.js +1 -0
  155. zenml/zen_server/dashboard/assets/page-DpqRelAy.js +1 -0
  156. zenml/zen_server/dashboard/assets/{page-ZfTtFicG.js → page-DwVPpCFg.js} +2 -2
  157. zenml/zen_server/dashboard/assets/page-XURWnYZP.js +1 -0
  158. zenml/zen_server/dashboard/assets/page-abw-2oeW.js +1 -0
  159. zenml/zen_server/dashboard/assets/page-akLcPcKw.js +1 -0
  160. zenml/zen_server/dashboard/assets/page-n9ejQ2V3.js +2 -0
  161. zenml/zen_server/dashboard/assets/page-sJjNT9xA.js +6 -0
  162. zenml/zen_server/dashboard/assets/{persist-UUym702q.js → persist-DWMWVP-y.js} +1 -1
  163. zenml/zen_server/dashboard/assets/{persist-D87V82eO.js → persist-Dec_w7aB.js} +1 -1
  164. zenml/zen_server/dashboard/assets/pipeline-CSUlkd50.js +1 -0
  165. zenml/zen_server/dashboard/assets/{plus-COjQg3AG.js → plus-Cl0_rCVF.js} +1 -1
  166. zenml/zen_server/dashboard/assets/{react-error-boundary.esm-fyoUBS25.js → react-error-boundary.esm-7_MuhCay.js} +1 -1
  167. zenml/zen_server/dashboard/assets/{refresh-CM5T3QeU.js → refresh-BcTM09NW.js} +1 -1
  168. zenml/zen_server/dashboard/assets/resource-tyes-list-o2LXiMay.js +1 -0
  169. zenml/zen_server/dashboard/assets/resource-type-tooltip-DwHrJstL.js +1 -0
  170. zenml/zen_server/dashboard/assets/service-connectors-DSEMwJ5A.js +1 -0
  171. zenml/zen_server/dashboard/assets/{service-BQ9KIhls.js → service-jxtvgks0.js} +2 -2
  172. zenml/zen_server/dashboard/assets/sharedSchema-BXzg0EZz.js +1 -0
  173. zenml/zen_server/dashboard/assets/stack-detail-query-Cm0fsgo-.js +1 -0
  174. zenml/zen_server/dashboard/assets/{terminal-square-DMtel8mb.js → terminal-XFL_4QN-.js} +1 -1
  175. zenml/zen_server/dashboard/assets/terminal-square-XFL_4QN-.js +1 -0
  176. zenml/zen_server/dashboard/assets/transform-CeZdrxDZ.js +1 -0
  177. zenml/zen_server/dashboard/assets/{trash-BWSZ7NRK.js → trash-DP6Tpp_E.js} +1 -1
  178. zenml/zen_server/dashboard/assets/type-guards-CNgPYg8l.js +1 -0
  179. zenml/zen_server/dashboard/assets/update-current-user-mutation-D5MjcQ6F.js +1 -0
  180. zenml/zen_server/dashboard/assets/update-server-settings-mutation-CmnxdxiK.js +1 -0
  181. zenml/zen_server/dashboard/assets/{zod-C0xYeTvL.js → zod-XdS2h1ws.js} +1 -1
  182. zenml/zen_server/dashboard/index.html +7 -7
  183. zenml/zen_server/rbac/utils.py +2 -2
  184. zenml/zen_server/rbac/zenml_cloud_rbac.py +4 -3
  185. zenml/zen_server/routers/auth_endpoints.py +2 -2
  186. zenml/zen_server/routers/devices_endpoints.py +8 -5
  187. zenml/zen_server/routers/pipeline_deployments_endpoints.py +1 -1
  188. zenml/zen_server/routers/pipelines_endpoints.py +1 -1
  189. zenml/zen_server/routers/run_templates_endpoints.py +3 -3
  190. zenml/zen_server/routers/runs_endpoints.py +35 -0
  191. zenml/zen_server/routers/steps_endpoints.py +3 -0
  192. zenml/zen_server/template_execution/utils.py +6 -6
  193. zenml/zen_stores/dag_generator.py +171 -0
  194. zenml/zen_stores/rest_zen_store.py +17 -3
  195. zenml/zen_stores/schemas/action_schemas.py +40 -4
  196. zenml/zen_stores/schemas/api_key_schemas.py +29 -1
  197. zenml/zen_stores/schemas/artifact_schemas.py +168 -48
  198. zenml/zen_stores/schemas/base_schemas.py +26 -1
  199. zenml/zen_stores/schemas/code_repository_schemas.py +46 -5
  200. zenml/zen_stores/schemas/component_schemas.py +44 -3
  201. zenml/zen_stores/schemas/device_schemas.py +43 -2
  202. zenml/zen_stores/schemas/event_source_schemas.py +41 -5
  203. zenml/zen_stores/schemas/flavor_schemas.py +42 -2
  204. zenml/zen_stores/schemas/model_schemas.py +113 -77
  205. zenml/zen_stores/schemas/pipeline_build_schemas.py +53 -4
  206. zenml/zen_stores/schemas/pipeline_deployment_schemas.py +53 -4
  207. zenml/zen_stores/schemas/pipeline_run_schemas.py +111 -47
  208. zenml/zen_stores/schemas/pipeline_schemas.py +41 -9
  209. zenml/zen_stores/schemas/run_template_schemas.py +75 -11
  210. zenml/zen_stores/schemas/schedule_schema.py +50 -5
  211. zenml/zen_stores/schemas/secret_schemas.py +39 -2
  212. zenml/zen_stores/schemas/service_connector_schemas.py +39 -2
  213. zenml/zen_stores/schemas/service_schemas.py +39 -4
  214. zenml/zen_stores/schemas/stack_schemas.py +47 -2
  215. zenml/zen_stores/schemas/step_run_schemas.py +89 -26
  216. zenml/zen_stores/schemas/tag_schemas.py +69 -5
  217. zenml/zen_stores/schemas/trigger_schemas.py +44 -5
  218. zenml/zen_stores/schemas/utils.py +25 -4
  219. zenml/zen_stores/sql_zen_store.py +471 -28
  220. zenml/zen_stores/zen_store_interface.py +9 -1
  221. {zenml_nightly-0.82.1.dev20250526.dist-info → zenml_nightly-0.82.1.dev20250528.dist-info}/METADATA +1 -1
  222. {zenml_nightly-0.82.1.dev20250526.dist-info → zenml_nightly-0.82.1.dev20250528.dist-info}/RECORD +225 -219
  223. zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-BG7-Ki1L.js +0 -1
  224. zenml/zen_server/dashboard/assets/CollapsibleCard-D20FtrzC.js +0 -1
  225. zenml/zen_server/dashboard/assets/Commands-DGbAvMDk.js +0 -1
  226. zenml/zen_server/dashboard/assets/ComponentIcon-ils7uNAk.js +0 -1
  227. zenml/zen_server/dashboard/assets/CsvVizualization-DVN541XF.js +0 -15
  228. zenml/zen_server/dashboard/assets/DialogItem-BHWf3sIB.js +0 -1
  229. zenml/zen_server/dashboard/assets/ExecutionStatus-XrvT2r65.js +0 -1
  230. zenml/zen_server/dashboard/assets/Infobox-D9k5TFH4.js +0 -1
  231. zenml/zen_server/dashboard/assets/InlineAvatar-Cfz4WSLK.js +0 -1
  232. zenml/zen_server/dashboard/assets/MarkdownVisualization-URCyUPcZ.js +0 -14
  233. zenml/zen_server/dashboard/assets/NestedCollapsible-Dor-bi98.js +0 -1
  234. zenml/zen_server/dashboard/assets/NumberBox-D2A7ENHb.js +0 -1
  235. zenml/zen_server/dashboard/assets/Partials-DQJFw1yW.js +0 -1
  236. zenml/zen_server/dashboard/assets/ProBadge-Cp4hb1YT.js +0 -1
  237. zenml/zen_server/dashboard/assets/ProCta-EYoV9CvK.js +0 -1
  238. zenml/zen_server/dashboard/assets/ProviderRadio-BVDA-fAr.js +0 -1
  239. zenml/zen_server/dashboard/assets/RunSelector-BLuBYNJt.js +0 -1
  240. zenml/zen_server/dashboard/assets/RunsBody-W4WHf-sq.js +0 -1
  241. zenml/zen_server/dashboard/assets/SearchField-D-h6jXyg.js +0 -1
  242. zenml/zen_server/dashboard/assets/SecretTooltip-CePCL8kd.js +0 -1
  243. zenml/zen_server/dashboard/assets/StackList-CgmN5H-i.js +0 -1
  244. zenml/zen_server/dashboard/assets/Tabs-DxQ8PDOD.js +0 -1
  245. zenml/zen_server/dashboard/assets/Tick-CEsT3HPR.js +0 -1
  246. zenml/zen_server/dashboard/assets/UsageReason-DjI5qMje.js +0 -1
  247. zenml/zen_server/dashboard/assets/WizardFooter-CFBHFZas.js +0 -1
  248. zenml/zen_server/dashboard/assets/cloud-squares-DeRLMopf.svg +0 -43
  249. zenml/zen_server/dashboard/assets/configuration-form-BtI2Y4eX.js +0 -1
  250. zenml/zen_server/dashboard/assets/connectors-video-C9qY4syJ.svg +0 -21
  251. zenml/zen_server/dashboard/assets/constants-DP3ZEnXH.js +0 -1
  252. zenml/zen_server/dashboard/assets/create-stack-BJ6x5rzj.js +0 -1
  253. zenml/zen_server/dashboard/assets/dates-3pMLCNrD.js +0 -1
  254. zenml/zen_server/dashboard/assets/delete-run-DlSLEl5T.js +0 -1
  255. zenml/zen_server/dashboard/assets/docker-BuDBFEDL.js +0 -1
  256. zenml/zen_server/dashboard/assets/dots-horizontal-BGRJCPCs.js +0 -1
  257. zenml/zen_server/dashboard/assets/flavor-select-BnPxvQDN.js +0 -1
  258. zenml/zen_server/dashboard/assets/form-schemas-CbvoEUHr.js +0 -1
  259. zenml/zen_server/dashboard/assets/index-CFESYpe4.js +0 -1
  260. zenml/zen_server/dashboard/assets/index-CmLcvK2z.js +0 -1
  261. zenml/zen_server/dashboard/assets/index-CzX3ZYlI.css +0 -1
  262. zenml/zen_server/dashboard/assets/index-D2iSHVZq.js +0 -64
  263. zenml/zen_server/dashboard/assets/kubernetes-D6OUjwSK.js +0 -1
  264. zenml/zen_server/dashboard/assets/link-external-DUhCSKNm.js +0 -1
  265. zenml/zen_server/dashboard/assets/login-command-CkqxPtV3.js +0 -1
  266. zenml/zen_server/dashboard/assets/login-mutation-CXc-Klim.js +0 -1
  267. zenml/zen_server/dashboard/assets/not-found-olRU3fnu.js +0 -1
  268. zenml/zen_server/dashboard/assets/page-7keIM1V3.js +0 -1
  269. zenml/zen_server/dashboard/assets/page-B31neFwG.js +0 -1
  270. zenml/zen_server/dashboard/assets/page-B3zo4KYS.js +0 -1
  271. zenml/zen_server/dashboard/assets/page-BN3MHq1a.js +0 -1
  272. zenml/zen_server/dashboard/assets/page-BNgVExjN.js +0 -1
  273. zenml/zen_server/dashboard/assets/page-BPtvu74G.js +0 -1
  274. zenml/zen_server/dashboard/assets/page-BTIuG0ki.js +0 -2
  275. zenml/zen_server/dashboard/assets/page-BcQzleH6.js +0 -1
  276. zenml/zen_server/dashboard/assets/page-C05Jw4M2.js +0 -1
  277. zenml/zen_server/dashboard/assets/page-C28a7K8h.js +0 -1
  278. zenml/zen_server/dashboard/assets/page-C9WLk0X-.js +0 -1
  279. zenml/zen_server/dashboard/assets/page-CINMx64X.js +0 -1
  280. zenml/zen_server/dashboard/assets/page-CYrJbk7P.js +0 -1
  281. zenml/zen_server/dashboard/assets/page-Ce0cqLo3.js +0 -1
  282. zenml/zen_server/dashboard/assets/page-CgNsEkw-.js +0 -1
  283. zenml/zen_server/dashboard/assets/page-Ct2FUYuR.js +0 -1
  284. zenml/zen_server/dashboard/assets/page-D8G2B3Bu.js +0 -1
  285. zenml/zen_server/dashboard/assets/page-DL8a4_lg.js +0 -3
  286. zenml/zen_server/dashboard/assets/page-DMhYn1cF.js +0 -1
  287. zenml/zen_server/dashboard/assets/page-Dd_Yq-Uf.js +0 -6
  288. zenml/zen_server/dashboard/assets/page-DfSvqT8g.js +0 -1
  289. zenml/zen_server/dashboard/assets/page-Dt6ANUTx.js +0 -1
  290. zenml/zen_server/dashboard/assets/page-DtvTleaT.js +0 -1
  291. zenml/zen_server/dashboard/assets/page-DwfGTiVs.js +0 -1
  292. zenml/zen_server/dashboard/assets/page-JgomSTDc.js +0 -1
  293. zenml/zen_server/dashboard/assets/page-L84ig6HB.js +0 -1
  294. zenml/zen_server/dashboard/assets/page-Mabsn4QJ.js +0 -1
  295. zenml/zen_server/dashboard/assets/page-P04L5cm9.js +0 -1
  296. zenml/zen_server/dashboard/assets/page-PfhAnvq4.js +0 -1
  297. zenml/zen_server/dashboard/assets/page-WdRrlNt_.js +0 -1
  298. zenml/zen_server/dashboard/assets/page-cqJDDDeK.js +0 -1
  299. zenml/zen_server/dashboard/assets/page-k-Wxh9L_.js +0 -1
  300. zenml/zen_server/dashboard/assets/page-y-zV4n0c.js +0 -1
  301. zenml/zen_server/dashboard/assets/rocket-Cf-B-XOR.js +0 -1
  302. zenml/zen_server/dashboard/assets/settings_preview-0JLrRgHP.webp +0 -0
  303. zenml/zen_server/dashboard/assets/sharedSchema-Bse2agAf.js +0 -14
  304. zenml/zen_server/dashboard/assets/stack-detail-query-BAcZJrN3.js +0 -1
  305. zenml/zen_server/dashboard/assets/tick-circle-m94Aa6Zt.js +0 -1
  306. zenml/zen_server/dashboard/assets/tour-cover-BYfeen6M.webp +0 -0
  307. zenml/zen_server/dashboard/assets/type-guards-CaeD8wHO.js +0 -1
  308. zenml/zen_server/dashboard/assets/update-server-settings-mutation-DwMM1LJz.js +0 -1
  309. {zenml_nightly-0.82.1.dev20250526.dist-info → zenml_nightly-0.82.1.dev20250528.dist-info}/LICENSE +0 -0
  310. {zenml_nightly-0.82.1.dev20250526.dist-info → zenml_nightly-0.82.1.dev20250528.dist-info}/WHEEL +0 -0
  311. {zenml_nightly-0.82.1.dev20250526.dist-info → zenml_nightly-0.82.1.dev20250528.dist-info}/entry_points.txt +0 -0
@@ -1 +0,0 @@
1
- import{r as C}from"./@radix-C7hRs6Kx.js";const t=L=>C.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...L},C.createElement("path",{d:"M20.2524 6.30383C20.1382 5.93755 19.864 5.63994 19.5213 5.4568L12.5537 2.11446C12.3709 2.02289 12.1653 2 11.9826 2C11.7998 2 11.5942 2 11.4115 2.04579L4.4438 5.41102C4.10113 5.57126 3.84984 5.86887 3.75846 6.25805L2.02226 13.7898C1.95372 14.1789 2.0451 14.5681 2.27355 14.8886L7.09379 20.8636C7.36793 21.1383 7.75629 21.3215 8.14465 21.3444H15.8433C16.2545 21.3901 16.6429 21.207 16.8942 20.8636L21.7144 14.8886C21.9429 14.5681 22.0343 14.1789 21.9886 13.7898L20.2524 6.30383Z",fill:"#326DE6"}),C.createElement("path",{d:"M19.1559 13.4921C19.133 13.4921 19.133 13.4921 19.1559 13.4921C19.133 13.4464 19.0645 13.4464 19.0416 13.4464C18.9503 13.4235 18.8589 13.4235 18.7675 13.4235C18.7218 13.4235 18.6761 13.4235 18.6304 13.4006H18.6076C18.3563 13.3777 18.0822 13.3319 17.8309 13.2632C17.7623 13.2403 17.6938 13.1716 17.671 13.103C17.671 13.0801 17.6481 13.0801 17.6481 13.0801L17.4654 13.0343C17.5567 12.3704 17.5111 11.6836 17.374 11.0197C17.2141 10.3558 16.9399 9.71485 16.5744 9.14253L16.7115 9.00517V8.98228C16.7115 8.9136 16.7343 8.82203 16.78 8.77624C16.9856 8.61599 17.1912 8.45575 17.4197 8.34128C17.4654 8.31839 17.5111 8.2955 17.5567 8.2726C17.6481 8.22682 17.7167 8.18103 17.808 8.13525C17.8309 8.11235 17.8537 8.11235 17.8766 8.08946C17.8994 8.06657 17.8994 8.06657 17.8994 8.06657C18.105 7.90632 18.1507 7.63161 17.9908 7.42557C17.9223 7.334 17.7852 7.26532 17.671 7.26532C17.5567 7.26532 17.4425 7.31111 17.3511 7.37979L17.3283 7.40268C17.3054 7.42557 17.2826 7.44847 17.2598 7.44847C17.1912 7.51714 17.1227 7.58582 17.077 7.6545C17.0542 7.70029 17.0085 7.72318 16.9856 7.74607C16.8029 7.92921 16.6201 8.11235 16.4145 8.24971C16.3688 8.2726 16.3231 8.2955 16.2774 8.2955C16.2546 8.2955 16.2089 8.2955 16.1861 8.2726L16.0033 8.40996C15.8205 8.22682 15.6149 8.04368 15.4322 7.86054C14.5869 7.19665 13.5361 6.78458 12.4624 6.67011L12.4395 6.48697L12.4167 6.46408C12.3481 6.41829 12.3253 6.34962 12.3024 6.28094C12.3024 6.02912 12.3024 5.7773 12.3481 5.50258V5.47969C12.3481 5.43391 12.371 5.38812 12.371 5.34234C12.3938 5.25076 12.3938 5.15919 12.4167 5.06762V4.93027C12.4395 4.70134 12.2568 4.47241 12.0283 4.47241C11.8912 4.47241 11.7542 4.5182 11.6628 4.60977C11.5714 4.70134 11.5257 4.8158 11.5257 4.93027V5.04473C11.5257 5.1363 11.5486 5.22787 11.5714 5.31944C11.5943 5.36523 11.5943 5.41101 11.5943 5.4568V5.47969C11.6399 5.73151 11.6399 5.98333 11.6399 6.25804C11.6171 6.32672 11.5943 6.3954 11.5257 6.44119L11.5029 6.46408L11.48 6.64722C11.2287 6.67011 10.9774 6.7159 10.7033 6.76168C9.62961 6.99061 8.64728 7.56293 7.89341 8.36417L7.75634 8.2726H7.73349C7.71065 8.2726 7.68781 8.2955 7.64212 8.2955C7.59643 8.2955 7.52789 8.2726 7.50505 8.24971C7.29944 8.08946 7.11669 7.90632 6.93393 7.72318C6.91108 7.67739 6.86539 7.6545 6.84255 7.63161C6.77401 7.56293 6.72833 7.49425 6.65979 7.42557C6.63695 7.40268 6.6141 7.40268 6.59126 7.37979C6.56841 7.3569 6.56841 7.35689 6.56841 7.35689C6.47703 7.28822 6.36281 7.24243 6.24859 7.24243C6.11152 7.24243 5.99729 7.28822 5.90591 7.40268C5.76885 7.60872 5.81454 7.88343 5.99729 8.04368C6.02014 8.04368 6.02014 8.06657 6.02014 8.06657C6.02014 8.06657 6.06583 8.11236 6.08867 8.11236C6.15721 8.15814 6.24859 8.20393 6.33996 8.24971C6.38565 8.2726 6.43134 8.2955 6.47703 8.31839C6.70548 8.45575 6.91108 8.5931 7.11669 8.75335C7.16238 8.79914 7.20807 8.89071 7.18522 8.95939V8.98228L7.32229 9.11963C7.29944 9.16542 7.2766 9.18831 7.25375 9.2341C6.54557 10.3558 6.27143 11.6836 6.47703 12.9885L6.29427 13.0343C6.29427 13.0572 6.27143 13.0572 6.27143 13.0572C6.24859 13.1259 6.18005 13.1716 6.11152 13.2174C5.86022 13.2861 5.60893 13.3319 5.3348 13.3548H5.31195C5.26626 13.3548 5.22057 13.3548 5.17488 13.3777C5.0835 13.3777 4.99212 13.4006 4.90074 13.4006C4.8779 13.4006 4.85506 13.4235 4.80937 13.4235C4.78652 13.4235 4.78652 13.4235 4.76368 13.4464C4.51238 13.4921 4.35247 13.7211 4.39816 13.9729C4.44385 14.1789 4.64945 14.3163 4.85506 14.2934C4.90074 14.2934 4.92359 14.2934 4.96928 14.2705C4.99212 14.2705 4.99212 14.2705 4.99212 14.2476C4.99212 14.2247 5.03781 14.2247 5.0835 14.2247C5.17488 14.2018 5.26626 14.156 5.3348 14.1331C5.38048 14.1102 5.42617 14.0874 5.47186 14.0874H5.49471C5.72316 13.9958 5.97445 13.9271 6.22574 13.8813H6.24859C6.31712 13.8813 6.38565 13.9042 6.43134 13.95C6.45419 13.95 6.45419 13.9729 6.45419 13.9729L6.65979 13.95C7.00246 15.0031 7.64212 15.9417 8.53306 16.6284C8.73866 16.7887 8.92142 16.9261 9.14987 17.0405L9.05849 17.2237C9.05849 17.2466 9.08134 17.2466 9.08134 17.2466C9.12703 17.3152 9.12703 17.4068 9.10418 17.4755C9.0128 17.7044 8.87573 17.9333 8.73866 18.1394V18.1623C8.71582 18.208 8.69297 18.2309 8.64729 18.2767C8.6016 18.3225 8.55591 18.4141 8.48737 18.5057C8.46453 18.5285 8.46453 18.5514 8.44168 18.5743C8.44168 18.5743 8.44168 18.5972 8.41884 18.5972C8.30461 18.8261 8.39599 19.1009 8.6016 19.2153C8.64728 19.2382 8.71582 19.2611 8.78435 19.2611C8.96711 19.2611 9.12703 19.1466 9.2184 18.9864C9.2184 18.9864 9.2184 18.9635 9.24125 18.9635C9.24125 18.9406 9.26409 18.9177 9.28694 18.8948C9.30978 18.8033 9.35547 18.7346 9.37832 18.643L9.42401 18.5057C9.49254 18.2538 9.60676 18.0249 9.72099 17.796C9.76668 17.7273 9.83521 17.6815 9.90375 17.6586C9.92659 17.6586 9.92659 17.6586 9.92659 17.6357L10.018 17.4526C10.6576 17.7044 11.3201 17.8189 12.0055 17.8189C12.4167 17.8189 12.8279 17.7731 13.2391 17.6815C13.4904 17.6357 13.7417 17.5442 13.9701 17.4755L14.0615 17.6357C14.0843 17.6357 14.0843 17.6357 14.0843 17.6586C14.1529 17.6815 14.2214 17.7273 14.2671 17.796C14.3813 18.0249 14.4727 18.2538 14.5641 18.4828V18.5057L14.6098 18.643C14.6326 18.7346 14.6555 18.8261 14.7011 18.8948C14.724 18.9177 14.724 18.9406 14.7468 18.9635C14.7468 18.9635 14.7468 18.9864 14.7697 18.9864C14.8611 19.1466 15.021 19.2611 15.2037 19.2611C15.2723 19.2611 15.318 19.2382 15.3865 19.2153C15.4779 19.1695 15.5692 19.078 15.5921 18.9635C15.6149 18.849 15.6149 18.7117 15.5692 18.5972C15.5692 18.5743 15.5464 18.5743 15.5464 18.5743C15.5464 18.5514 15.5236 18.5285 15.5007 18.5057C15.455 18.4141 15.4093 18.3454 15.3408 18.2767C15.318 18.2309 15.2951 18.208 15.2494 18.1623V18.1394C15.0895 17.9333 14.9753 17.7044 14.8839 17.4755C14.8611 17.4068 14.8611 17.3152 14.9067 17.2466C14.9067 17.2237 14.9296 17.2237 14.9296 17.2237L14.8611 17.0405C16.049 16.3308 16.9171 15.232 17.3511 13.9271L17.5339 13.95C17.5567 13.95 17.5567 13.9271 17.5567 13.9271C17.6024 13.8813 17.671 13.8584 17.7395 13.8584H17.7623C18.0136 13.9042 18.2649 13.9729 18.4934 14.0645H18.5162C18.5619 14.0874 18.6076 14.1102 18.6533 14.1102C18.7447 14.156 18.8132 14.1789 18.9046 14.2018C18.9274 14.2018 18.9503 14.2247 18.996 14.2247C19.0188 14.2247 19.0188 14.2247 19.0416 14.2476C19.0873 14.2705 19.1102 14.2705 19.1559 14.2705C19.3615 14.2705 19.5442 14.1331 19.6128 13.95C19.5442 13.7211 19.3843 13.5379 19.1559 13.4921ZM12.5766 12.7825L11.9598 13.0801L11.343 12.7825L11.1602 12.1186L11.5943 11.5692H12.3024L12.7365 12.1186L12.5766 12.7825ZM16.3003 11.2944C16.4145 11.7752 16.4373 12.2559 16.3917 12.7367L14.2214 12.1186C14.0158 12.0728 13.9016 11.8668 13.9473 11.6607C13.9701 11.592 13.993 11.5463 14.0386 11.5005L15.752 9.94377C16.0033 10.3558 16.1861 10.8137 16.3003 11.2944ZM15.0667 9.09674L13.2162 10.4245C13.0563 10.5161 12.8279 10.4932 12.7137 10.3329C12.668 10.2872 12.6451 10.2414 12.6451 10.1727L12.508 7.86054C13.4675 7.975 14.3813 8.40996 15.0667 9.09674ZM10.9318 7.92921L11.3887 7.83764L11.2516 10.1269C11.2516 10.3329 11.0688 10.4932 10.8632 10.4932C10.7947 10.4932 10.749 10.4703 10.6805 10.4474L8.83004 9.09674C9.40116 8.52442 10.1322 8.11235 10.9318 7.92921ZM8.1447 9.94377L9.83521 11.4547C9.99513 11.592 10.018 11.821 9.8809 11.9812C9.83521 12.0499 9.78952 12.0728 9.69814 12.0957L7.50505 12.7367C7.41367 11.7752 7.64212 10.7908 8.1447 9.94377ZM7.75634 13.8126L10.018 13.4235C10.2007 13.4235 10.3835 13.5379 10.4063 13.7211C10.4292 13.7898 10.4292 13.8813 10.3835 13.95L9.51539 16.0561C8.71582 15.5296 8.07617 14.7284 7.75634 13.8126ZM12.9421 16.6513C12.6223 16.72 12.2796 16.7658 11.9369 16.7658C11.4572 16.7658 10.9546 16.6742 10.4977 16.5369L11.6171 14.4994C11.7313 14.3621 11.9141 14.3163 12.074 14.4079C12.1425 14.4536 12.1882 14.4994 12.2568 14.5681L13.3533 16.5598C13.2391 16.5827 13.102 16.6056 12.9421 16.6513ZM15.7292 14.6597C15.3865 15.2091 14.9067 15.6898 14.3585 16.0332L13.4675 13.9042C13.4218 13.7211 13.4904 13.5379 13.6731 13.4464C13.7417 13.4235 13.8102 13.4006 13.8787 13.4006L16.1632 13.7898C16.049 14.1102 15.9119 14.4079 15.7292 14.6597Z",fill:"white"}));export{t as S};
@@ -1 +0,0 @@
1
- import{r as C}from"./@radix-C7hRs6Kx.js";const l=e=>C.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.7587 2L10 2C10.5523 2 11 2.44772 11 3C11 3.55229 10.5523 4 10 4H7.8C6.94342 4 6.36113 4.00078 5.91104 4.03755C5.47262 4.07337 5.24842 4.1383 5.09202 4.21799C4.7157 4.40973 4.40973 4.7157 4.21799 5.09202C4.1383 5.24842 4.07337 5.47262 4.03755 5.91104C4.00078 6.36113 4 6.94342 4 7.8V16.2C4 17.0566 4.00078 17.6389 4.03755 18.089C4.07337 18.5274 4.1383 18.7516 4.21799 18.908C4.40973 19.2843 4.7157 19.5903 5.09202 19.782C5.24842 19.8617 5.47262 19.9266 5.91104 19.9624C6.36113 19.9992 6.94342 20 7.8 20H16.2C17.0566 20 17.6389 19.9992 18.089 19.9624C18.5274 19.9266 18.7516 19.8617 18.908 19.782C19.2843 19.5903 19.5903 19.2843 19.782 18.908C19.8617 18.7516 19.9266 18.5274 19.9624 18.089C19.9992 17.6389 20 17.0566 20 16.2V14C20 13.4477 20.4477 13 21 13C21.5523 13 22 13.4477 22 14V16.2413C22 17.0463 22 17.7106 21.9558 18.2518C21.9099 18.8139 21.8113 19.3306 21.564 19.816C21.1805 20.5686 20.5686 21.1805 19.816 21.564C19.3306 21.8113 18.8139 21.9099 18.2518 21.9558C17.7106 22 17.0463 22 16.2413 22H7.75868C6.95372 22 6.28936 22 5.74817 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43598 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413V7.7587C1.99999 6.95373 1.99998 6.28937 2.04419 5.74817C2.09012 5.18608 2.18868 4.66937 2.43597 4.18404C2.81947 3.43139 3.43139 2.81947 4.18404 2.43597C4.66937 2.18868 5.18608 2.09012 5.74817 2.04419C6.28937 1.99998 6.95373 1.99999 7.7587 2ZM14 3.00001C14 2.44773 14.4477 2.00001 15 2.00001H21C21.5523 2.00001 22 2.44773 22 3.00001L22 9.00001C22 9.55229 21.5523 10 21 10C20.4477 10 20 9.5523 20 9.00001L20 5.41422L12.7071 12.7071C12.3166 13.0976 11.6834 13.0976 11.2929 12.7071C10.9024 12.3166 10.9024 11.6834 11.2929 11.2929L18.5858 4.00001H15C14.4477 4.00001 14 3.5523 14 3.00001Z"}));export{l as S};
@@ -1 +0,0 @@
1
- function o(n){switch(n){case"local":return"zenml login --local";case"docker":return"zenml login --local --docker";default:return`zenml login ${window.location.origin}`}}export{o as g};
@@ -1 +0,0 @@
1
- import{j as s,o as r,F as i,p as u}from"./index-D2iSHVZq.js";import{b as c}from"./@tanstack-CSxjHCME.js";async function h(a){const o=r(u.login),t=await s(o,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(a)});if(!t.ok){const e=await t.json().then(n=>n.detail).catch(()=>["","Failed to login"]);throw new i({status:t.status,statusText:t.statusText,message:e[1]||"Failed to login"})}return t.json()}function m(a){return c({mutationFn:async o=>h(o),...a})}export{m as u};
@@ -1 +0,0 @@
1
- import{j as e}from"./@radix-C7hRs6Kx.js";import{i as s,h as r}from"./index-D2iSHVZq.js";import{S as a}from"./arrow-left-CwgF2MEM.js";import{c as n}from"./@react-router-CNP6g_RL.js";import"./@tanstack-CSxjHCME.js";import"./@reactflow-CQi1Z1Wq.js";function h(){const t=n();return e.jsx(e.Fragment,{children:e.jsxs("section",{className:"layout-container my-9 flex flex-col items-center gap-5",children:[e.jsx(s,{className:"h-[120px] w-[120px] fill-neutral-300"}),e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"mb-2 text-display-xs font-semibold",children:"Error 404 - Run Not Found"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Oh no! It seems that the run you are looking for doesn't exist."})]}),e.jsxs(r,{intent:"primary",size:"lg",onClick:()=>t(-1),children:[e.jsx(a,{className:"h-5 w-5 fill-theme-text-negative"})," ",e.jsx("span",{children:"Go back"})]})]})})}export{h as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./@radix-C7hRs6Kx.js";import{B as o,aE as n}from"./index-D2iSHVZq.js";import{I as r}from"./Infobox-D9k5TFH4.js";import{H as a}from"./Helpbox-iE1xLmiZ.js";import{V as s,g as c}from"./Commands-DGbAvMDk.js";import"./@tanstack-CSxjHCME.js";import"./@react-router-CNP6g_RL.js";import"./@reactflow-CQi1Z1Wq.js";import"./help-DyMolRxD.js";import"./CodeSnippet-CvI6D0wx.js";const l=[{command:"zenml code-repository register <NAME> --type=<CODE_REPOSITORY_TYPE] [--CODE_REPOSITORY_OPTIONS]",description:"Register a code repository"},{command:"zenml code-repository register <NAME> --type=custom --source=<CODE_REPOSITORY_SOURCE> [--CODE_REPOSITORY_OPTIONS]",description:"Use a custom repository "},{command:"zenml code-repository list",description:"List your registered code repositories"},{command:"zenml code-repository delete <REPOSITORY_NAME_OR_ID>",description:"Delete a code repository that you have previously registered"}],d="/assets/repos-video-D8kpu60k.svg";function m(){return e.jsx(r,{children:e.jsxs("div",{className:"flex w-full flex-wrap items-center gap-x-2 gap-y-0.5 text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"We are creating a new Repositories experience"}),e.jsx("p",{children:"In the meanwhile you can use the CLI to add and manage your repos."})]})})}function p(){const t="https://zenml.portal.trainn.co/share/koVfVubiXfXLXtVcDAqPyg/embed?autoplay=false";return e.jsxs(o,{className:"flex flex-col-reverse items-stretch overflow-hidden md:flex-row",children:[e.jsxs("div",{className:"w-full p-7 md:w-2/3",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Learn More about Repositories"}),e.jsx("p",{className:"mt-2 text-text-lg text-theme-text-secondary",children:"Get started with ZenML Repositories for streamlined pipeline versioning and faster Docker builds."}),e.jsx(s,{videoLink:t,buttonText:"Watch the Starter Guide (2 min)"})]}),e.jsx("div",{className:"flex w-full items-center justify-center bg-primary-50 lg:w-1/3",children:e.jsx(s,{fallbackImage:e.jsx("img",{src:d,alt:"Purple squares with text indicating a starter guide for secrets",className:"h-full w-full"}),videoLink:t,isButton:!1})})]})}function x(){return e.jsxs("section",{className:"space-y-5 pl-8 pr-5",children:[e.jsx(r,{className:"text-text-md",intent:"neutral",children:"Code repositories enable ZenML to keep track of the code version that you use for your pipeline runs. Additionally, running a pipeline which is tracked in a registered code repository can decrease the time it takes Docker to build images for containerized stack components."}),l.map((t,i)=>e.jsx(e.Fragment,{children:c(t)},i)),e.jsx(a,{text:"Check all the commands and find more about Repositories in our Docs",link:"https://docs.zenml.io/how-to/setting-up-a-project-repository/connect-your-git-repository"})]})}function w(){return e.jsxs(o,{className:"space-y-4 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Repositories"}),e.jsx(m,{}),e.jsx(p,{}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(n,{}),"Administering your Code Repositories"]}),e.jsx(x,{})]})}export{w as default};
@@ -1 +0,0 @@
1
- import{r as x,j as e}from"./@radix-C7hRs6Kx.js";import{o as D,p as C,j as E,F as T,ai as H,aj as K,h,ak as F,al as P,am as O,f as J,I as j,ap as A,aq as V,ar as G,s as U,D as W,w as X,x as Y,aH as Z,r as N,J as S,z as f,l as ee,M as se,S as w,n as te,B as ae}from"./index-D2iSHVZq.js";import{S as re,P as ne}from"./SearchField-D-h6jXyg.js";import{S as ie,s as le,E as ce,a as oe,b as de}from"./SecretTooltip-CePCL8kd.js";import{b as I,c as L,a as v}from"./@tanstack-CSxjHCME.js";import{w as me}from"./index-CFESYpe4.js";import{S as ue}from"./plus-COjQg3AG.js";import{S as q}from"./trash-BWSZ7NRK.js";import{t as xe}from"./zod-C0xYeTvL.js";import{u as he,a as pe,C as g}from"./index.esm-D7jFlf5N.js";import{S as fe}from"./Lock-DW-0_M0o.js";import{D as je}from"./DisplayDate-CYVBBSgr.js";import{I as ge}from"./InlineAvatar-Cfz4WSLK.js";import{c as ye}from"./code-snippets-CqONne41.js";import{L as b,d as Ne}from"./@react-router-CNP6g_RL.js";import{S as Se}from"./dots-horizontal-BGRJCPCs.js";import{D as k}from"./DialogItem-BHWf3sIB.js";import"./@reactflow-CQi1Z1Wq.js";import"./chevron-right-double-uNWbJT-C.js";import"./index-DR30v9MZ.js";import"./CodeSnippet-CvI6D0wx.js";async function we(s){const t=D(C.secrets.add(s.workspace)),a=await E(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!a.ok){const r=await a.json().then(n=>n.detail).catch(()=>"Failed to create Secret");throw new T({status:a.status,statusText:a.statusText,message:r})}return a.json()}function ve(s){return I({mutationFn:async t=>we(t),...s})}function be({id:s,workspace:t}){const[a,r]=x.useState(!1);return e.jsxs(H,{open:a,onOpenChange:r,children:[e.jsx(K,{asChild:!0,children:e.jsx(h,{className:"shrink-0",intent:"primary",children:"Add secret"})}),e.jsxs(F,{className:"mx-auto w-[90vw] max-w-[744px]",children:[e.jsx(P,{children:e.jsx(O,{children:"Register New Secret"})}),e.jsx(ke,{userId:s,setOpen:r,workspaceId:t.id})]})]})}function ke({userId:s,setOpen:t,workspaceId:a}){const{handleSubmit:r,control:n,watch:i,setValue:o,formState:{isValid:u},reset:p}=he({resolver:xe(le),defaultValues:{secretName:"",keysValues:[{key:"",value:""}]}}),{fields:m,append:_,remove:M}=pe({control:n,name:"keysValues"}),{toast:R}=J(),B=L(),{mutate:Q}=ve({onError(l){G(l)&&R({status:"error",emphasis:"subtle",description:l.message,rounded:!0})},onSuccess(){B.invalidateQueries({queryKey:["secrets"]}),t(!1),p()}}),z=l=>{Q({user:s,workspace:a,name:l.secretName,scope:"workspace",values:l.keysValues.reduce((c,d)=>(d.key&&d.value&&(c[d.key]=d.value),c),{})})},$=l=>{z(l)};return e.jsxs(e.Fragment,{children:[e.jsx("form",{id:"create-secret-form",className:"gap-5 p-5",onSubmit:r($),children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("label",{className:"font-inter text-sm text-left font-medium leading-5",children:["Secret Name",e.jsx("span",{className:"ml-1 text-theme-text-error",children:"*"})]}),e.jsx(g,{name:"secretName",control:n,render:({field:l})=>e.jsx(j,{...l,className:"mb-3 w-full",required:!0})})]}),e.jsxs("div",{className:"mt-10",children:[e.jsx("div",{children:e.jsx("h1",{className:"font-inter text-lg text-left font-semibold ",children:"Keys"})}),e.jsxs("div",{className:"mt-5 flex flex-row ",children:[e.jsx("div",{className:"flex-grow",children:e.jsx("label",{className:"font-inter text-sm text-left font-medium",children:"Key"})}),e.jsx("div",{className:"flex-grow pr-12",children:e.jsx("label",{className:"font-inter text-sm text-left font-medium",children:"Value"})})]})]}),m.map((l,c)=>e.jsxs("div",{className:"flex flex-row items-center space-x-1 ",children:[e.jsx("div",{className:"relative flex-grow ",children:e.jsx(g,{name:`keysValues.${c}.key`,control:n,render:({field:d})=>e.jsx(j,{...d,className:"mb-2 w-full",required:!0,placeholder:"key"})})}),e.jsx("div",{className:"relative flex-grow",children:e.jsxs("div",{className:"relative",children:[e.jsx(g,{name:`keysValues.${c}.value`,control:n,render:({field:d})=>e.jsx(j,{...d,className:"mb-2 w-full pr-10",required:!0,placeholder:"•••••••••",type:i(`keysValues.${c}.showPassword`)?"text":"password"})}),e.jsx("button",{type:"button",onClick:()=>{const d=i(`keysValues.${c}.showPassword`);o(`keysValues.${c}.showPassword`,!d)},className:"absolute inset-y-1 right-0 flex items-center pb-1 pr-3",children:e.jsx(ie,{className:"h-4 w-4 flex-shrink-0"})})]})}),e.jsxs("div",{className:"flex items-center",children:[c===m.length-1&&e.jsx(h,{intent:"primary",emphasis:"subtle",onClick:()=>_({key:"",value:""}),className:"mb-2 flex h-7 w-7 items-center justify-center",children:e.jsx(ue,{className:"flex-shrink-0 fill-primary-600"})}),c!==m.length-1&&e.jsx(h,{intent:"secondary",emphasis:"minimal",onClick:()=>M(c),className:"mb-2 h-7 w-7 items-center justify-center",children:e.jsx(q,{className:"flex-shrink-0 fill-theme-text-secondary"})})]})]},l.id))]})}),e.jsxs(A,{className:"gap-[10px]",children:[e.jsx(V,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{intent:"primary",disabled:!u,type:"submit",form:"create-secret-form",children:"Register Secret"})]})]})}async function De(s){const t=D(C.secrets.detail(s)),a=await E(t,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(a.status===404&&U(),!a.ok)throw new T({message:"Error deleting secret",status:a.status,statusText:a.statusText});return a.json()}function Ce(s){return I({mutationFn:async t=>De(t),...s})}function Ee({secretId:s}){const t=L(),{mutate:a}=Ce({onSuccess(){t.invalidateQueries({queryKey:["secrets"]})}}),[r,n]=x.useState("");function i(){a(s)}function o(u){n(u.target.value)}return e.jsxs(F,{children:[e.jsx(P,{children:e.jsx(O,{children:"Delete secret"})}),e.jsxs("div",{className:"gap-5 p-5",children:[e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Are you sure you want to delete this secret?"}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"This action cannot be undone."}),e.jsx("h3",{className:"font-inter text-sm mb-1 mt-4 text-left font-medium leading-5",children:"Please type DELETE to confirm"}),e.jsx(j,{name:"key",onChange:o,className:"w-full",required:!0,value:r})]}),e.jsxs(A,{className:"gap-[10px]",children:[e.jsx(V,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{intent:"danger",type:"submit",form:"edit-secret-form",onClick:i,disabled:r!=="DELETE",children:"Delete"})]})]})}function Te({secretId:s}){const[t,a]=x.useState(!1),[r,n]=x.useState(!1),i=x.useRef(null),o=x.useRef(null);function u(){o.current=i.current}function p(m){if(m===!1){a(!1),setTimeout(()=>{n(m)},200);return}n(m)}return e.jsxs(W,{onOpenChange:a,open:t,children:[e.jsx(X,{ref:i,children:e.jsx(Se,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsxs(Y,{hidden:r,onCloseAutoFocus:m=>{o.current&&(o.current.focus(),o.current=null,m.preventDefault())},align:"end",sideOffset:7,children:[e.jsx(k,{onSelect:u,onOpenChange:p,triggerChildren:"Edit ",icon:e.jsx(Z,{}),children:e.jsx(ce,{secretId:s,isSecretNameEditable:!0,dialogTitle:"Edit secret"})}),e.jsx(k,{onSelect:u,onOpenChange:p,triggerChildren:"Delete ",icon:e.jsx(q,{}),children:e.jsx(Ee,{secretId:s})})]})]})}const Fe=[{id:"secret",header:"Secret",accessorFn:s=>s.name,cell:({getValue:s,row:t})=>{const a=ye(t.original.name);return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(fe,{className:"h-5 w-5 flex-shrink-0 fill-primary-400"}),e.jsxs("div",{className:"group/copybutton flex flex-col",children:[e.jsxs("div",{className:"flex flex-row items-center space-x-1",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(b,{className:"text-text-md font-semibold text-theme-text-primary",to:N.settings.secrets.detail(t.original.id),children:t.original.name}),e.jsx(oe,{code:a})]}),e.jsx(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,a;return(a=(t=s.body)==null?void 0:t.user)==null?void 0:a.name},cell:({getValue:s})=>{const t=s();return t?e.jsx(ge,{username:t}):null}},{id:"created_at",header:"Created At",accessorFn:s=>{var t;return(t=s.body)==null?void 0:t.created},cell:({getValue:s})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(je,{dateString:s()})})},{id:"admin_actions",header:"",accessorFn:s=>String(s.id),cell:({row:s,getValue:t})=>{var r,n,i;const a=t();return(i=(n=(r=s.original.body)==null?void 0:r.user)==null?void 0:n.body)!=null&&i.is_admin?e.jsx(Te,{secretId:a}):e.jsx("p",{className:"text-sm text-theme-text-secondary",children:"No Actions"})}}],y=1,Pe=f.object({page:f.coerce.number().min(y).optional().default(y).catch(y),name:f.string().optional(),operator:f.enum(["and","or"]).optional()});function Oe(){const[s]=Ne(),{page:t,name:a,operator:r}=Pe.parse({page:s.get("page")||void 0,name:s.get("name")||void 0,operator:s.get("operator")||void 0});return{page:t,name:a,logical_operator:r}}function Ae(){const s=Oe(),{data:t}=v({...de.secretList({...s,sort_by:"desc:created"}),throwOnError:!0}),{data:a}=ee(),r=(a==null?void 0:a.id)||"",{data:n,isLoading:i,isError:o,isSuccess:u}=v({...me.workspaceDetail("default")});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsx(re,{searchParams:s}),i?e.jsx("div",{children:"Loading..."}):o?e.jsx("div",{children:"Error loading workspace details."}):u&&e.jsx(be,{id:r,workspace:n})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:t?e.jsx(se,{columns:Fe,data:t.items}):e.jsx(w,{className:"h-[250px] w-full"})}),t?t.total_pages>1&&e.jsx(ne,{searchParams:s,paginate:t}):e.jsx(w,{className:"h-[36px] w-[300px]"})]})]})}function ss(){const{setCurrentBreadcrumbData:s}=te();return x.useEffect(()=>{s({segment:"secrets",data:null})},[]),e.jsxs(ae,{className:"space-y-4 p-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Secrets"}),e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:["Configure and manage your pipeline secrets and configurations."," ",e.jsx("a",{target:"_blank",rel:"noreferrer noopener",href:"https://docs.zenml.io/how-to/interact-with-secrets",className:"link text-primary-400",children:"Learn More"})]})]}),e.jsx(Ae,{})]})}export{ss as default};
@@ -1 +0,0 @@
1
- import{r as i,j as e}from"./@radix-C7hRs6Kx.js";import{S as Z}from"./code-browser-j2EpcxIA.js";import{S as x}from"./help-DyMolRxD.js";import{B as T,m as B,aU as P,c as V,S as M,ag as E,r as d,T as a,E as l,G as n,a0 as m,H as c,aV as R}from"./index-D2iSHVZq.js";import{d as z,L as h}from"./@react-router-CNP6g_RL.js";import{S as F}from"./clock-CPA5cYxq.js";import{C as L}from"./ProviderIcon-DLo7t1lo.js";import{S as _}from"./layout-h3cbx8WZ.js";import"./@tanstack-CSxjHCME.js";import"./@reactflow-CQi1Z1Wq.js";import"./gcp-CHNvgEss.js";const U=s=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},i.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.99179V11C20 11.5523 19.5523 12 19 12C18.4477 12 18 11.5523 18 11V7.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.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 18H11C11.5523 18 12 18.4477 12 19C12 19.5523 11.5523 20 11 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 2ZM5.40001 6.00001C5.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.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.40001ZM4.60001 18C4.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.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.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 14C18.5523 14 19 14.4477 19 15V17H21C21.5523 17 22 17.4477 22 18C22 18.5523 21.5523 19 21 19H19V21C19 21.5523 18.5523 22 18 22C17.4477 22 17 21.5523 17 21V19H15C14.4477 19 14 18.5523 14 18C14 17.4477 14.4477 17 15 17H17V15C17 14.4477 17.4477 14 18 14Z"}));function S(){return e.jsx("div",{className:"group absolute z-20 flex h-full w-full items-center justify-center rounded-md border border-theme-border-moderate bg-white/70",children:e.jsx("div",{className:"hidden rounded-md bg-theme-text-primary px-3 py-2 text-text-xs text-theme-text-negative shadow-lg animate-in fade-in-0 fade-out-0 zoom-in-95 group-hover:block",children:"This option is not available for local deployments"})})}const D=s=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},i.createElement("path",{d:"M15.1636 8.68344V14.9934L20.644 11.8401V5.52344L15.1636 8.68344Z",fill:"#4040B2"}),i.createElement("path",{d:"M9.08185 5.52344L14.5622 8.68344V14.9934L9.08185 11.8368V5.52344Z",fill:"#5C4EE5"}),i.createElement("path",{d:"M3 2V8.31333L8.48033 11.47V5.15667L3 2ZM9.08183 18.8433L14.5622 22V15.6867L9.08183 12.53V18.8433Z",fill:"#5C4EE5"})),$=s=>i.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.5 4C7.84315 4 6.5 5.34315 6.5 7C6.5 8.65685 7.84315 10 9.5 10C11.1569 10 12.5 8.65685 12.5 7C12.5 5.34315 11.1569 4 9.5 4ZM4.5 7C4.5 4.23858 6.73858 2 9.5 2C12.2614 2 14.5 4.23858 14.5 7C14.5 9.76142 12.2614 12 9.5 12C6.73858 12 4.5 9.76142 4.5 7ZM14.5731 2.91554C14.7803 2.40361 15.3633 2.1566 15.8752 2.36382C17.7058 3.10481 19 4.90006 19 7C19 9.09994 17.7058 10.8952 15.8752 11.6362C15.3633 11.8434 14.7803 11.5964 14.5731 11.0845C14.3658 10.5725 14.6129 9.98953 15.1248 9.7823C16.2261 9.33652 17 8.25744 17 7C17 5.74256 16.2261 4.66348 15.1248 4.2177C14.6129 4.01047 14.3658 3.42748 14.5731 2.91554ZM7.96448 14H11.0355C11.9373 14 12.6647 14 13.2567 14.0404C13.8654 14.0819 14.4037 14.1695 14.9134 14.3806C16.1386 14.8881 17.1119 15.8614 17.6194 17.0866C17.8305 17.5963 17.9181 18.1346 17.9596 18.7433C18 19.3353 18 20.0627 18 20.9645V21C18 21.5523 17.5523 22 17 22C16.4477 22 16 21.5523 16 21C16 20.0544 15.9995 19.3953 15.9643 18.8794C15.9297 18.3725 15.865 18.0773 15.7716 17.8519C15.4672 17.1169 14.8831 16.5328 14.1481 16.2284C13.9227 16.135 13.6275 16.0703 13.1206 16.0357C12.6047 16.0005 11.9456 16 11 16H8C7.05444 16 6.39534 16.0005 5.87945 16.0357C5.37254 16.0703 5.07733 16.135 4.85195 16.2284C4.11687 16.5328 3.53284 17.1169 3.22836 17.8519C3.135 18.0773 3.07033 18.3725 3.03574 18.8794C3.00054 19.3953 3 20.0544 3 21C3 21.5523 2.55229 22 2 22C1.44772 22 1 21.5523 1 21L1 20.9645C0.999993 20.0627 0.999988 19.3353 1.04038 18.7433C1.08191 18.1346 1.16948 17.5963 1.3806 17.0866C1.88807 15.8614 2.86144 14.8881 4.08658 14.3806C4.59628 14.1695 5.13456 14.0819 5.74331 14.0404C6.33531 14 7.06272 14 7.96448 14ZM18.0316 14.8768C18.1692 14.3419 18.7144 14.0199 19.2493 14.1576C21.4056 14.7126 23 16.6688 23 19V21C23 21.5523 22.5523 22 22 22C21.4477 22 21 21.5523 21 21V19C21 17.6035 20.0449 16.4275 18.7507 16.0945C18.2159 15.9568 17.8939 15.4116 18.0316 14.8768Z"}));function C({children:s,className:r,...t}){return e.jsx(T,{...t,className:B("h-full w-full space-y-1 px-6 py-5",r),children:s})}function u({children:s}){return e.jsx(e.Fragment,{children:s})}function j({children:s}){return e.jsx("div",{className:"space-y-0.5",children:s})}function f({children:s}){return e.jsx("div",{className:"flex items-center gap-1",children:s})}function p({children:s}){return e.jsx("h2",{className:"text-text-lg font-semibold",children:s})}function g({children:s}){return e.jsx("p",{className:"text-theme-text-secondary",children:s})}function y({children:s}){return e.jsx("div",{className:"flex w-full flex-wrap items-start justify-between gap-y-1",children:s})}function v({hasTerraform:s=!1}){return e.jsxs("div",{className:"flex items-center gap-2",children:[s&&e.jsx(D,{className:"h-4 w-4 shrink-0"}),e.jsx(L,{className:"h-4 w-4",provider:"aws"}),e.jsx(L,{className:"h-4 w-4",provider:"gcp"}),e.jsx(L,{className:"h-4 w-4",provider:"azure"})]})}function w({min:s}){return e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx(F,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"}),e.jsxs("p",{className:"text-text-xs text-theme-text-tertiary",children:["Estimated time: ",s," mins"]})]})}function N({flexibility:s,children:r}){return e.jsxs("div",{className:"flex w-full items-center gap-0.5 lg:w-1/3",children:[e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx("span",{className:"text-theme-text-secondary",children:"Flexibility"}),r]}),e.jsx(P,{className:"h-1 flex-1 shrink-0 rounded-rounded",value:s})]})}function k({children:s}){return e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-y-1 text-text-xs",children:s})}function b({recommendataion:s}){return e.jsxs("div",{className:"flex items-center gap-0.5 text-text-xs text-theme-text-success",children:[e.jsx($,{className:"h-3 w-3 shrink-0 fill-theme-text-success"}),e.jsxs("p",{children:["Recommended for ",s]})]})}const H="https://docs.zenml.io/how-to/infrastructure-deployment/stack-deployment/deploy-a-cloud-stack";function q(){const{isError:s,isPending:r,data:t}=V();if(r)return e.jsx(M,{className:"h-[200px] w-full"});if(s)return e.jsx("div",{children:"Failed to load server info"});const o=E(t.deployment_type||"other");return e.jsxs("section",{className:"w-full space-y-5",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-text-xl font-semibold",children:"Create New Infrastructure"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Use our smart tools to create a new Cloud infrastructure a quick and simplified way."})]}),e.jsxs("div",{className:"grid w-full grid-cols-1 gap-6 md:grid-cols-2",children:[e.jsx(O,{isLocalDeployment:o}),e.jsx(A,{isLocalDeployment:o})]})]})}function O({isLocalDeployment:s}){const[r]=z(),t=d.stacks.create.newInfra+(r.size>=1?`?${r.toString()}`:"");return e.jsxs("div",{className:"relative",children:[s&&e.jsx(S,{}),e.jsx(h,{to:t,children:e.jsxs(C,{children:[e.jsxs(y,{children:[e.jsx(u,{children:e.jsx(Z,{className:"h-6 w-6 fill-primary-400"})}),e.jsx(v,{})]}),e.jsxs(j,{children:[e.jsxs(f,{children:[e.jsx(p,{children:"In-browser Experience"}),e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(m,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{align:"start",side:"bottom",className:"z-50 flex max-w-[480px] flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:"Deploy the necessary pieces of infrastructure on your selected cloud provider and get you started on remote stack with a single click."}),e.jsx("a",{className:"link text-primary-400",target:"_blank",href:H,children:"Learn More"})]})]})})]}),e.jsx(g,{children:"Provision cloud infrastructure via browser UI. No local installs needed. Quick setup for cloud resources."})]}),e.jsx(b,{recommendataion:"data scientists"}),e.jsxs(k,{children:[e.jsx(w,{min:"5"}),e.jsx(N,{flexibility:25,children:e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(x,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{className:"z-50 max-w-[480px] bg-theme-surface-primary text-theme-text-primary",children:[e.jsx("strong",{children:"Low flexibility:"})," Best for straightforward setups with minimal customization."]})]})})})]})]})})]})}function A({isLocalDeployment:s}){const[r]=z(),t=d.stacks.create.terraform+(r.size>=1?`?${r.toString()}`:"");return e.jsxs("div",{className:"relative",children:[s&&e.jsx(S,{}),e.jsx(h,{to:t,children:e.jsxs(C,{className:"flex flex-col justify-between space-y-0",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs(y,{children:[e.jsx(u,{children:e.jsx(U,{className:"h-6 w-6 fill-primary-400"})}),e.jsx(v,{hasTerraform:!0})]}),e.jsxs(j,{children:[e.jsxs(f,{children:[e.jsx(p,{children:"Infrastructure-as-code"}),e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(m,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{align:"start",side:"bottom",className:"z-50 flex max-w-[480px] flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:"Infrastructure-as-code (IaC) refers to using a dynamic codebase to provision and manage infrastructure, rather than deferring to manual processes."}),e.jsx("a",{className:"link text-primary-400",target:"_blank",href:H,children:"Learn More"})]})]})})]}),e.jsx(g,{children:"Use Terraform modules to deploy infrastructure and register it back to ZenML."})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(b,{recommendataion:"infrastructure engineers"}),e.jsxs(k,{children:[e.jsx(w,{min:"3"}),e.jsx(N,{flexibility:75,children:e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(x,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{className:"z-50 max-w-[480px] bg-theme-surface-primary text-theme-text-primary",children:[e.jsx("strong",{children:"High flexibility:"})," Offers extensive customization for advanced users or complex setups."]})]})})})]})]})]})})]})}const I="https://docs.zenml.io/how-to/infrastructure-deployment/stack-deployment/deploy-a-cloud-stack";function G(){const{isError:s,isPending:r,data:t}=V();if(r)return e.jsx(M,{className:"h-[200px] w-full"});if(s)return e.jsx("div",{children:"Failed to load server info"});const o=E(t.deployment_type||"other");return e.jsxs("section",{className:"w-full space-y-5",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-text-xl font-semibold",children:"Connect Existing Infrastructure"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Register your stack and components using existing resources that are already provisioned."})]}),e.jsxs("div",{className:"grid w-full grid-cols-1 gap-6 md:grid-cols-2",children:[e.jsx(J,{isLocalDeployment:o}),e.jsx(Q,{})]})]})}function Q(){const[s]=z(),r=d.stacks.create.manual+(s.size>=1?`?${s.toString()}`:"");return e.jsx("div",{className:"relative",children:e.jsx(h,{to:r,children:e.jsxs(C,{children:[e.jsxs(y,{children:[e.jsx(u,{children:e.jsx(_,{className:"h-6 w-6 fill-primary-400"})}),e.jsx(v,{})]}),e.jsxs(j,{children:[e.jsxs(f,{children:[e.jsx(p,{children:"Manual Setup"}),e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(m,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{align:"start",side:"bottom",className:"z-50 flex max-w-[480px] flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:"Customize your ML stack by selecting each component individually through the ZenML interface. Choose from a list of pre-configured components or add new ones tailored to your needs."}),e.jsx("a",{className:"link text-primary-400",target:"_blank",href:I,children:"Learn More"})]})]})})]}),e.jsx(g,{children:"Register stack and components manually using ZenML. Recommended for advanced or custom configurations."})]}),e.jsx(b,{recommendataion:"advanced users"}),e.jsxs(k,{children:[e.jsx(w,{min:"5-10"}),e.jsx(N,{flexibility:100,children:e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(x,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{className:"z-50 max-w-[480px] bg-theme-surface-primary text-theme-text-primary",children:[e.jsx("strong",{children:"Full flexibility:"})," Complete control and customization. For expert users and highly specialized requirements."]})]})})})]})]})})})}function J({isLocalDeployment:s}){return e.jsxs("div",{className:"relative",children:[s&&e.jsx(S,{}),e.jsx(h,{to:d.stacks.create.existingInfra,children:e.jsxs(C,{children:[e.jsxs(y,{children:[e.jsx(u,{children:e.jsx(R,{className:"h-6 w-6 fill-primary-400"})}),e.jsx(v,{})]}),e.jsxs(j,{children:[e.jsxs(f,{children:[e.jsx(p,{children:"Scan your Cloud"}),e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(m,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{align:"start",side:"bottom",className:"z-50 flex max-w-[480px] flex-col gap-2 bg-theme-surface-primary p-5 text-text-sm text-theme-text-primary",children:[e.jsx("p",{children:"The stack wizard allows you to browse through your existing infrastructure and use it to register a ZenML cloud stack."}),e.jsx("a",{className:"link text-primary-400",target:"_blank",href:I,children:"Learn More"})]})]})})]}),e.jsx(g,{children:"Input your credentials and scan existing infrastructure on your cloud provider. Best for users with existing resources."})]}),e.jsx(b,{recommendataion:"infrastructure engineers"}),e.jsxs(k,{children:[e.jsx(w,{min:"5"}),e.jsx(N,{flexibility:50,children:e.jsx(a,{children:e.jsxs(l,{children:[e.jsx(n,{asChild:!0,children:e.jsx("div",{className:"z-10",children:e.jsx(x,{className:"h-3 w-3 shrink-0 fill-theme-text-tertiary"})})}),e.jsxs(c,{className:"z-50 max-w-[480px] bg-theme-surface-primary text-theme-text-primary",children:[e.jsx("strong",{children:"Medium flexibility:"})," Balances ease-of-use with some customization options."]})]})})})]})]})})]})}function n1(){return e.jsxs("section",{className:"layout-container space-y-5 py-5",children:[e.jsx(q,{}),e.jsx(G,{})]})}export{n1 as default};
@@ -1 +0,0 @@
1
- import{j as e,r as d,aG as N,aH as q,aI as P,aJ as U}from"./@radix-C7hRs6Kx.js";import{T as V,E as Z,G,a0 as J,H as K,al as O,am as E,ac as p,ah as W,h as f,ap as X,aq as Y,ai as ee,aj as te,ak as se,aW as re,I as R,X as ae,_ as ne,Z as ie,r as Q,z as x,f as oe,i as ce,m as le}from"./index-D2iSHVZq.js";import{b as u,C as de,u as me,F as pe}from"./index.esm-D7jFlf5N.js";import{C as B}from"./ComponentIcon-ils7uNAk.js";import{D as ue}from"./DisplayDate-CYVBBSgr.js";import{I as he}from"./InlineAvatar-Cfz4WSLK.js";import{h as xe,j as fe,a as ge,c as je}from"./@tanstack-CSxjHCME.js";import{d as ke}from"./index-DR30v9MZ.js";import{s as be,R as ve,a as ye,u as Ne}from"./create-stack-BJ6x5rzj.js";import{S as Se}from"./flavor-select-BnPxvQDN.js";import{S as we}from"./arrow-left-CwgF2MEM.js";import{C as Ce}from"./configuration-form-BtI2Y4eX.js";import{s as v}from"./constants-DP3ZEnXH.js";import{S as Le}from"./check-circle-mvyzYvIW.js";import{L as _e,c as Te}from"./@react-router-CNP6g_RL.js";import{s as Fe}from"./index-CrhdX_qG.js";import{w as ze}from"./index-CFESYpe4.js";import{t as Ie}from"./zod-C0xYeTvL.js";import{s as Me}from"./sharedSchema-Bse2agAf.js";import"./@reactflow-CQi1Z1Wq.js";import"./layout-h3cbx8WZ.js";import"./rocket-Cf-B-XOR.js";import"./index-CmLcvK2z.js";import"./plus-COjQg3AG.js";import"./trash-BWSZ7NRK.js";import"./type-guards-CaeD8wHO.js";import"./check-DK77doTf.js";import"./CodeSnippet-CvI6D0wx.js";import"./file-text-BdxZdjP_.js";import"./terminal-square-DMtel8mb.js";import"./stack-detail-query-BAcZJrN3.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(V,{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(W,{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(X,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Y,{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(qe,{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({...ae.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(ne,{})}):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:ie(((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 ",re(t)," from your server:"]})]})}function qe({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(Pe,{search:s,setSearch:r}),e.jsx(Be,{search:s,type:t})]})}function Pe({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 Ue({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(Ve,{type:t}):e.jsx(Ze,{type:t})})}function Ve({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(We,{}),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(q,{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(P,{className:"group/trigger w-full",value:r,children:e.jsx(Ue,{type:r})}),t(`components.${r}.id`)&&e.jsx("button",{type:"button",onClick:n=>{n.preventDefault(),s(`components.${r}`)},className:"absolute right-[-12px] top-[-12px] flex aspect-square h-[28px] w-[28px] items-center justify-center rounded-rounded bg-theme-surface-primary",children:e.jsx(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 We(){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)}),Xe=v.reduce((t,s)=>(t[s]=b.nullable(),t),{}),Ye=x.object({stackName:Me,components:x.object({...Xe,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(Ye),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 It(){const[t,s]=d.useState(""),{createManualStack:r,form:n}=et();return e.jsx(pe,{...n,children:e.jsx(U,{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{It as default};
@@ -1 +0,0 @@
1
- import{r as x,j as e}from"./@radix-C7hRs6Kx.js";import{ai as M,aj as ne,h as y,ak as E,al as _,am as q,f as b,I as K,ap as z,aq as B,ar as D,j as C,o as S,F as k,p as T,t as Q,v as ae,C as re,s as V,z as N,ao as $,T as ie,E as oe,G as ce,a0 as le,H as de,S as v,D as ue,w as me,x as xe,af as he,as as pe,aI as ye,at as fe,aJ as je,av as ge,B as H,M as Ae,n as ve,R as be}from"./index-D2iSHVZq.js";import{c as j,b as P,a as F}from"./@tanstack-CSxjHCME.js";import{s as g,A as G,d as De,u as Ne,b as O,a as L}from"./service-BQ9KIhls.js";import{P as Ke,S as we}from"./SearchField-D-h6jXyg.js";import{t as J}from"./zod-C0xYeTvL.js";import{u as U,C as w}from"./index.esm-D7jFlf5N.js";import{S as Y}from"./trash-BWSZ7NRK.js";import{D as Z,a as W}from"./DeleteAlertDialog-DVvXt-S6.js";import{S as X}from"./key-icon-DO4DPJHZ.js";import{D as I}from"./DisplayDate-CYVBBSgr.js";import{i as Ce,a as Se}from"./dates-3pMLCNrD.js";import{S as ke}from"./dots-horizontal-BGRJCPCs.js";import{S as Te}from"./refresh-CM5T3QeU.js";import{A as Pe}from"./AlertDialogDropdownItem-BG7-Ki1L.js";import{I as Fe}from"./Infobox-D9k5TFH4.js";import{a as R}from"./@react-router-CNP6g_RL.js";import"./@reactflow-CQi1Z1Wq.js";import"./CodeSnippet-CvI6D0wx.js";import"./Tick-CEsT3HPR.js";import"./check-DK77doTf.js";import"./chevron-right-double-uNWbJT-C.js";import"./index-DR30v9MZ.js";function ee({serviceAccountId:t,isFallback:s}){const n=j(),[a,r]=x.useState(!1),[i,o]=x.useState(""),l=!!i;function m(){return l?e.jsx(G,{value:i}):e.jsx(Oe,{isFallback:s,serviceAccountId:t,setApikeyValue:o})}return e.jsx(e.Fragment,{children:e.jsxs(M,{open:a,onOpenChange:c=>{s&&!c&&n.invalidateQueries({queryKey:g.apiKeysKey(t)}),r(c),o("")},children:[e.jsx(ne,{asChild:!0,children:e.jsx(y,{className:"shrink-0",intent:"primary",size:"sm",children:"Generate API Key"})}),e.jsxs(E,{"data-success":l,className:"mx-auto overflow-x-auto transition-none data-[success=true]:max-w-[800px]",children:[e.jsx(_,{children:e.jsx(q,{children:l?"API Key Created Successfully":"Generate API Key"})}),m()]})]})})}function Oe({serviceAccountId:t,setApikeyValue:s,isFallback:n}){const{toast:a}=b(),r=j(),{handleSubmit:i,control:o,formState:{isValid:l},reset:m}=U({resolver:J(De),defaultValues:{name:"",description:""}}),{mutate:c}=Ne({onError(u){D(u)&&a({status:"error",emphasis:"subtle",description:u.message,rounded:!0})},onSuccess(u){var f;n||r.invalidateQueries({queryKey:g.apiKeysKey(t)}),s(((f=u.body)==null?void 0:f.key)||""),m()}});function d(u){c({serviceAccountId:t,body:{name:u.name,description:u.description}})}return e.jsxs(e.Fragment,{children:[e.jsxs("form",{id:"create-secret-form",className:"space-y-5 p-7",onSubmit:i(d),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(w,{name:"name",control:o,render:({field:u})=>e.jsx(K,{...u,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(w,{name:"description",control:o,render:({field:u})=>e.jsx(K,{...u,className:"w-full",placeholder:"Add description"})})]})]}),e.jsxs(z,{className:"gap-[10px]",children:[e.jsx(B,{asChild:!0,children:e.jsx(y,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(y,{intent:"primary",disabled:!l,type:"submit",form:"create-secret-form",children:"Generate Key"})]})]})}async function Re(t,s){const n=S(T.serviceAccounts.apiKeys.detail(t,s)),a=await C(n,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(!a.ok){const r=await a.json().then(i=>Array.isArray(i.detail)?i.detail[1]:i.detail).catch(()=>`Failed to delete api key ${s}`);throw new k({status:a.status,statusText:a.statusText,message:r})}return a.json()}function Ie(t){return P({...t,mutationFn:async({serviceAccountId:s,apiKeyId:n})=>{await Re(s,n)}})}const te=x.createContext(null);function Me({children:t}){const[s,n]=x.useState([]),a=j(),{toast:r}=b(),i=Ie(),o=async(l,m)=>{try{const c=l.map(d=>i.mutateAsync({apiKeyId:d,serviceAccountId:m}));await Promise.all(c),r({description:"Deleted successfully.",status:"success",emphasis:"subtle",rounded:!0}),await a.invalidateQueries({queryKey:g.apiKeysKey(m)}),n([])}catch(c){D(c)&&r({status:"error",emphasis:"subtle",description:c.message,rounded:!0})}};return e.jsx(te.Provider,{value:{selectedApiKeys:s,setSelectedApiKeys:n,bulkDeleteApiKeys:o},children:t})}function A(){const t=x.useContext(te);if(!t)throw new Error("useServiceAccountSelectorContext must be used within a ServiceAccountsSelectorProvider");return t}function Ee({serviceAccountId:t}){const[s,n]=x.useState(!1),{bulkDeleteApiKeys:a,selectedApiKeys:r}=A();async function i(){await a(r,t),n(!1)}return e.jsxs(Q,{open:s,onOpenChange:n,children:[e.jsx(ae,{asChild:!0,children:e.jsxs(y,{className:"rounded-sharp border-y-0 bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(Y,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(Z,{title:`Delete Api Key${r.length>=2?"s":""}`,handleDelete:i,children:e.jsxs(W,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function _e({serviceAccountId:t}){const{selectedApiKeys:s}=A();return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:`${s==null?void 0:s.length} Api Key${(s==null?void 0:s.length)>1?"s":""} selected`}),e.jsx(Ee,{serviceAccountId:t})]})}const qe=({id:t})=>{const{selectedApiKeys:s,setSelectedApiKeys:n}=A(),a=(r,i)=>{n(o=>r?[...o,i]:o.filter(l=>l!==i))};return e.jsx(re,{id:t,onCheckedChange:r=>a(r,t),checked:s.includes(t),className:"h-3 w-3"})};async function ze({apiKeyId:t,body:s,serviceAccountId:n}){const a=S(T.serviceAccounts.apiKeys.rotate(n,t)),r=await C(a,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(r.status===404&&V(),!r.ok){const i=await r.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>`Failed to rotate key ${t}`);throw new k({status:r.status,statusText:r.statusText,message:i})}return r.json()}function Be(t){return P({...t,mutationFn:async({serviceAccountId:s,apiKeyId:n,body:a})=>ze({serviceAccountId:s,apiKeyId:n,body:a})})}const Qe=N.object({enableRetention:N.boolean(),rotateMinutes:N.coerce.number().int().min(1).optional()}).refine(t=>!(t.enableRetention&&!t.rotateMinutes));function Ve({serviceAccountId:t,apiKeyId:s,open:n,setOpen:a}){const[r,i]=x.useState(""),o=!!r;function l(){return o?e.jsx(G,{value:r}):e.jsx($e,{setApiKeyValue:i,apiKeyId:s,serviceAccountId:t})}return e.jsx(M,{open:n,onOpenChange:m=>{a(m),i("")},children:e.jsxs(E,{className:"mx-auto max-w-[800px] overflow-x-auto",children:[e.jsx(_,{children:e.jsx(q,{children:"Rotate API Key"})}),l()]})})}function $e({apiKeyId:t,serviceAccountId:s,setApiKeyValue:n}){const{toast:a}=b(),r=j(),{control:i,watch:o,register:l,handleSubmit:m,formState:{errors:c,isValid:d}}=U({resolver:J(Qe),defaultValues:{enableRetention:!1,rotateMinutes:void 0}});function u(p){const h={retain_period_minutes:p.rotateMinutes};f({serviceAccountId:s,apiKeyId:t,body:h})}const{mutate:f}=Be({onError(p){D(p)&&a({status:"error",emphasis:"subtle",description:p.message,rounded:!0})},onSuccess(p){var h;a({description:"The API key has been rotated successfully.",status:"success",emphasis:"subtle",rounded:!0}),n(((h=p.body)==null?void 0:h.key)||""),r.invalidateQueries({queryKey:[...g.apiKeysKey(s)]})}});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-5 p-7",children:[e.jsx(He,{apiKeyId:t,serviceAccountId:s}),e.jsx(Ge,{}),e.jsxs("form",{onSubmit:m(u),id:"retention-form",children:[e.jsxs("div",{className:"flex items-center gap-1 rounded-t-md border bg-theme-surface-secondary p-1",children:[e.jsx(w,{control:i,name:"enableRetention",render:({field:{onChange:p,value:h}})=>e.jsx($,{className:"data-[state=unchecked]:bg-neutral-200",checked:h,id:"enable-retention",onCheckedChange:se=>p(!!se)})}),"Include Retention Period",e.jsx(ie,{children:e.jsxs(oe,{children:[e.jsx(ce,{asChild:!0,children:e.jsxs("button",{type:"button",children:[e.jsx(le,{className:"h-4 w-4 shrink-0 fill-theme-text-tertiary"}),e.jsx("div",{className:"sr-only",children:"Info tooltip"})]})}),e.jsx(de,{className:"z-50 flex max-w-[480px] bg-black",children:e.jsx("p",{className:"text-text-xs text-white",children:"To minimize disruption, you can set a retention period for your current key. Enter the duration(in minutes) you'd like the old key to remain active alongside the new one."})})]})})]}),e.jsxs("fieldset",{disabled:!o("enableRetention"),className:"space-y-5 rounded-b-md border-x border-b p-5 text-text-md text-theme-text-primary",children:[e.jsx("p",{className:"text-text-md text-theme-text-primary",children:"Keep the current key working for the next"}),e.jsxs("div",{children:[e.jsx("label",{className:"text-text-sm text-theme-text-primary",htmlFor:"retention-minutes",children:"Minutes"}),e.jsx(K,{id:"retention-minutes",...l("rotateMinutes"),disabled:!o("enableRetention"),placeholder:"0"}),c.rotateMinutes&&e.jsx("p",{className:"text-text-sm text-theme-text-error",children:c.rotateMinutes.message})]})]})]})]}),e.jsxs(z,{className:"gap-[10px]",children:[e.jsx(B,{asChild:!0,children:e.jsx(y,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(y,{intent:"primary",disabled:!d,size:"sm",form:"retention-form",children:"Rotate Key"})]})]})}function He({apiKeyId:t,serviceAccountId:s}){var i;const{data:n,isPending:a,isError:r}=F({...O.ApiKeysDetail(s,t),throwOnError:!0});return a?e.jsx(v,{className:"h-8 w-full"}):r?null:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(X,{className:"h-5 w-5 flex-shrink-0 fill-primary-400"}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("p",{children:n&&n.name}),e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:n&&((i=n.metadata)==null?void 0:i.description)})]})]})}function Ge(){return e.jsxs(Fe,{children:[e.jsx("strong",{children:"Your current API Key will be deactivated."})," This means any processes or integrations using the old key will no longer function once the new key is generated."]})}function Le({serviceAccountId:t,apiKeyId:s}){const[n,a]=x.useState(!1),[r,i]=x.useState(!1),[o,l]=x.useState(!1),m=x.useRef(null),c=x.useRef(null),{bulkDeleteApiKeys:d}=A();function u(){c.current=m.current}function f(h){l(h),h||a(!1)}async function p(){await d([s],t),f(!1)}return e.jsxs(e.Fragment,{children:[e.jsx(Ve,{setOpen:i,open:r,serviceAccountId:t,apiKeyId:s}),e.jsxs(ue,{onOpenChange:a,open:n,children:[e.jsx(me,{ref:m,children:e.jsx(ke,{className:"h-5 w-5 fill-theme-text-secondary"})}),e.jsxs(xe,{hidden:o,onCloseAutoFocus:h=>{c.current&&(c.current.focus(),c.current=null,h.preventDefault())},align:"end",sideOffset:7,children:[e.jsx(he,{className:"px-3",onClick:()=>i(!0),icon:e.jsx(Te,{}),children:e.jsx("span",{children:"Rotate"})}),e.jsx(Pe,{onSelect:u,open:o,onOpenChange:f,triggerChildren:"Delete",icon:e.jsx(Y,{fill:"red"}),children:e.jsx(Z,{title:"Delete API Key",handleDelete:p,children:e.jsxs(W,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})]})]})]})}async function Je({apiKeyId:t,body:s,serviceAccountId:n}){const a=S(T.serviceAccounts.apiKeys.detail(n,t)),r=await C(a,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(r.status===404&&V(),!r.ok){const i=await r.json().then(o=>Array.isArray(o.detail)?o.detail[0]:o.detail||"An error occurred").catch(()=>`Failed to update key ${t}`);throw new k({status:r.status,statusText:r.statusText,message:i})}return r.json()}function Ue(t){return P({...t,mutationFn:async({serviceAccountId:s,apiKeyId:n,body:a})=>{await Je({serviceAccountId:s,apiKeyId:n,body:a})}})}function Ye({isActive:t,serviceAccountId:s,apiKeyId:n}){const{toast:a}=b(),r=j(),[i,o]=x.useState(!1),{mutate:l}=Ue({onError(d){D(d)&&a({status:"error",emphasis:"subtle",description:d.message,rounded:!0})},onSuccess(){r.invalidateQueries({queryKey:g.apiKeysKey(s)})}});function m(d){d?c(d):o(!0)}async function c(d){l({serviceAccountId:s,apiKeyId:n,body:{active:d}})}return e.jsxs(e.Fragment,{children:[e.jsx(Q,{open:i,onOpenChange:o,children:e.jsxs(pe,{children:[e.jsx(ye,{children:e.jsx(fe,{children:"Deactivate API Key"})}),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 this API Key to authenticate with the server anymore."})]}),e.jsxs(je,{className:"gap-[10px]",children:[e.jsx(ge,{asChild:!0,children:e.jsx(y,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(y,{onClick:()=>c(!1).then(d=>o(!1)),intent:"primary",type:"button",children:"Deactivate"})]})]})}),e.jsx($,{checked:t,onCheckedChange:m})]})}function Ze(){return[{id:"check",header:"",meta:{width:"1%"},accessorFn:t=>{var s;return String((s=t.body)==null?void 0:s.service_account.id)},cell:({row:t})=>e.jsx(qe,{id:t.original.id})},{id:"name",header:"Name",accessorFn:t=>({name:t.name}),cell:({row:t})=>{var s;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(X,{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 text-text-md font-semibold text-theme-text-primary",children:t.original.name})}),e.jsx("div",{className:"flex items-center gap-1 text-text-sm text-theme-text-secondary",children:(s=t.original.metadata)==null?void 0:s.description})]})]})}},{id:"last-login",header:"Last Login",accessorFn:t=>{var s;return(s=t.metadata)==null?void 0:s.last_login},cell:({row:t})=>{var s,n;return(s=t.original.metadata)!=null&&s.last_login?e.jsx("p",{children:e.jsx(I,{short:!0,dateString:(n=t.original.metadata)==null?void 0:n.last_login})}):e.jsx("p",{children:"Never"})}},{id:"last-rotated",header:"Last Rotated",accessorFn:t=>{var s;return(s=t.metadata)==null?void 0:s.last_rotated},cell:({row:t})=>{var i;const s=(i=t.original.metadata)==null?void 0:i.last_rotated;if(!s)return e.jsx("p",{children:"Never"});const n=new Date(`${s}Z`),a=Ce(n),r=Se(n);return e.jsxs("div",{children:[e.jsx("p",{children:e.jsx(I,{short:!0,dateString:s})}),(a||r)&&e.jsx("p",{className:`${r?"text-theme-text-error":"text-theme-text-warning"} text-text-xs`,children:r?"More than 1 year old":"More than 6 months old"})]})}},{id:"active",header:"Active",accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.active},cell:({row:t})=>{var s,n;return e.jsx(Ye,{isActive:!!((s=t.original.body)!=null&&s.active),serviceAccountId:((n=t.original.body)==null?void 0:n.service_account.id)||"",apiKeyId:t.original.id})}},{id:"actions",header:"",meta:{width:"5%"},cell:({row:t})=>{var n;const s=(n=t.original.body)==null?void 0:n.service_account.id;return s?e.jsx("div",{className:"flex items-center justify-end",children:e.jsx(Le,{serviceAccountId:s,apiKeyId:t.original.id})}):null}}]}function We(){const{serviceAccountId:t}=R();return e.jsxs(H,{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:"This service account doesn't have any API Keys yet"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Generate your first API Key to enable secure interactions with the ZenML Server."})]}),e.jsx(ee,{isFallback:!0,serviceAccountId:t})]})}function Xe(){const{serviceAccountId:t}=R(),s=L(),n=x.useMemo(()=>Ze(),[]),{data:a}=F({...O.serviceAccountApiKeys(t,{...s,sort_by:"desc:created",hydrate:!0})});return a&&(a==null?void 0:a.items.length)<1&&!s.name?e.jsx(We,{}):e.jsxs(Me,{children:[e.jsx(et,{serviceAccountId:t}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:a?e.jsx(Ae,{columns:n,data:a.items}):e.jsx(v,{className:"h-[500px] w-full"})}),a?a.total_pages>1&&e.jsx(Ke,{searchParams:s,paginate:a}):e.jsx(v,{className:"h-[36px] w-[300px]"})]})]})}function et({serviceAccountId:t}){const s=L(),{selectedApiKeys:n}=A();return e.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-2",children:[n.length?e.jsx(_e,{serviceAccountId:t}):e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(we,{searchParams:s})}),e.jsx(ee,{isFallback:!1,serviceAccountId:t})]})}function Kt(){return e.jsxs(H,{className:"space-y-5 p-5",children:[e.jsxs("div",{children:[e.jsx(tt,{}),e.jsx("h1",{className:"my-5 text-text-lg font-semibold",children:"API Keys"})]}),e.jsx(Xe,{})]})}function tt(){var r,i,o;const{setCurrentBreadcrumbData:t}=ve(),{serviceAccountId:s}=R(),n=F({...O.serviceAccountDetail(s),throwOnError:!0});if(x.useEffect(()=>{n.data&&t({segment:"service_account_detail",data:n.data})},[n.data,t]),n.isPending)return e.jsx(v,{className:"h-9 w-full"});if(n.isError)return null;const a=n.data;return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-text-xl font-semibold",children:a.name}),e.jsx(be,{size:"sm",color:(r=a.body)!=null&&r.active?"light-purple":"light-grey",className:"text-text-xs font-semibold uppercase",children:(i=a.body)!=null&&i.active?"active":"inactive"})]}),e.jsx("p",{className:"text-text-md text-theme-text-secondary ",children:(o=a.metadata)==null?void 0:o.description})]})}export{tt as APIKeyHeader,Kt as default};
@@ -1 +0,0 @@
1
- import{r as o,j as e}from"./@radix-C7hRs6Kx.js";import{o as j,p as C,q as M,j as y,s as T,F as b,ai as F,aj as E,h,ak as P,al as U,am as k,an as O,f as v,I,ao as R,ap as _,aq as q,ar as H,i as D,z as m,as as z,at as Z,au as B,av as K,aw as Q,D as V,w as L,x as G,R as w,l as J,S as f,M as $,B as W}from"./index-D2iSHVZq.js";import{S as X,P as Y}from"./SearchField-D-h6jXyg.js";import{a as ee,b as N,c as A}from"./@tanstack-CSxjHCME.js";import{C as se}from"./CodeSnippet-CvI6D0wx.js";import{u as te}from"./index.esm-D7jFlf5N.js";import{D as ae}from"./DisplayDate-CYVBBSgr.js";import{I as re}from"./InlineAvatar-Cfz4WSLK.js";import{S as ne}from"./dots-horizontal-BGRJCPCs.js";import{A as ie}from"./AlertDialogDropdownItem-BG7-Ki1L.js";import{d as oe}from"./@react-router-CNP6g_RL.js";import"./@reactflow-CQi1Z1Wq.js";import"./chevron-right-double-uNWbJT-C.js";import"./index-DR30v9MZ.js";function le({params:a}){return["users",a]}async function ce({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 de(a,s){return ee({queryKey:le(a),queryFn:()=>ce(a),...s})}const ue=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 me(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 he(a){return N({mutationFn:async s=>me(s),...a})}function xe(){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(fe,{name:t.name,token:O(t)}):e.jsx(pe,{setSuccessMember:r})]})]})}m.object({username:m.string(),isAdmin:m.boolean()});function pe({setSuccessMember:a}){const{toast:s}=v(),t=A(),{mutate:r,isPending:n}=he({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}=te();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 fe({token:a,name:s}){return e.jsxs("div",{className:"space-y-5 overflow-hidden p-7 text-center",children:[e.jsx(ue,{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(se,{className:"mx-auto",code:a})]})}const ge=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 je(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 Ce(a){return N({mutationFn:async s=>je(s),...a})}function ye({userId:a,name:s}){const{toast:t}=v(),r=A(),{isPending:n,mutate:c}=Ce({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 be({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(ne,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(G,{hidden:t,onCloseAutoFocus:u=>{i.current&&(i.current.focus(),i.current=null,u.preventDefault())},align:"end",sideOffset:7,children:e.jsx(ie,{onSelect:x,onOpenChange:p,triggerChildren:"Remove Member",icon:e.jsx(ge,{fill:"red"}),children:e.jsx(ye,{name:s,userId:a})})})]})}function we({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(re,{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(ae,{dateString:s()})})},...a?[{id:"actions",header:"",accessorFn:s=>({id:s.id,name:s.name}),meta:{width:"5%"},cell:({getValue:s})=>{const{id:t,name:r}=s();return e.jsx(be,{name:r,userId:t})}}]:[]]}const g=1,ve=m.object({page:m.coerce.number().min(g).optional().default(g).catch(g),name:m.string().optional(),operator:m.enum(["and","or"]).optional()});function De(){const[a]=oe(),{page:s,name:t,operator:r}=ve.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 Ne(){var l,i;const a=De(),{data:s,isError:t}=de({params:{...a,sort_by:"desc:created"}},{throwOnError:!0}),{data:r,isPending:n,isError:c}=J();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(X,{searchParams:a}),((l=r.body)==null?void 0:l.is_admin)&&e.jsx(xe,{})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:s?e.jsx($,{columns:we({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(Y,{searchParams:a,paginate:s}):e.jsx(f,{className:"h-[36px] w-[300px]"})]})]})}function He(){return e.jsxs(W,{className:"flex flex-col gap-4 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Members"}),e.jsx(Ne,{})]})}export{He as default};
@@ -1,2 +0,0 @@
1
- import{r as v,j as s}from"./@radix-C7hRs6Kx.js";import{q as R,j as U,o as H,F as L,p as F,aF as l,ai as B,ak as W,al as q,am as G,h as w,a5 as Z,r as J,f as V,c as K,S as Q,m as X,aG as Y,ar as ee,B as D}from"./index-D2iSHVZq.js";import{b as te}from"./@tanstack-CSxjHCME.js";import{S as re}from"./clock-CPA5cYxq.js";import{S as ne}from"./link-external-DUhCSKNm.js";import{C}from"./CodeSnippet-CvI6D0wx.js";import{I as oe}from"./Infobox-D9k5TFH4.js";import{T as se}from"./Tick-CEsT3HPR.js";import{E as ae}from"./react-error-boundary.esm-fyoUBS25.js";import{L as ie}from"./@react-router-CNP6g_RL.js";import"./@reactflow-CQi1Z1Wq.js";import"./check-DK77doTf.js";async function ce({params:t}){const r=R(t).toString(),o=H(F.apiToken+(r?`?${r}`:"")),n=await U(o,{credentials:"include",headers:{"Content-Type":"application/json"}});if(!n.ok){const e=await n.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>"Error while creating API Token");throw new L({status:n.status,statusText:n.statusText,message:e})}return n.json()}function le(t){return te({mutationFn:async r=>ce(r),...t})}class T extends Error{}T.prototype.name="InvalidTokenError";function ue(t){return decodeURIComponent(atob(t).replace(/(.)/g,(r,o)=>{let n=o.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function de(t){let r=t.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return ue(r)}catch{return atob(r)}}function pe(t,r){if(typeof t!="string")throw new T("Invalid token specified: must be a string");r||(r={});const o=r.header===!0?0:1,n=t.split(".")[o];if(typeof n!="string")throw new T(`Invalid token specified: missing part #${o+1}`);let e;try{e=de(n)}catch(a){throw new T(`Invalid token specified: invalid base64 for part #${o+1} (${a.message})`)}try{return JSON.parse(e)}catch(a){throw new T(`Invalid token specified: invalid json for part #${o+1} (${a.message})`)}}function O(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function me(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function I(t,r,o){return r&&me(t.prototype,r),t}function N(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),r&&b(t,r)}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},g(t)}function b(t,r){return b=Object.setPrototypeOf||function(n,e){return n.__proto__=e,n},b(t,r)}function fe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function he(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ye(t,r){return r&&(typeof r=="object"||typeof r=="function")?r:he(t)}function A(t){var r=fe();return function(){var n=g(t),e;if(r){var a=g(this).constructor;e=Reflect.construct(n,arguments,a)}else e=n.apply(this,arguments);return ye(this,e)}}function ve(t){return xe(t)||Te(t)||ge(t)||be()}function xe(t){if(Array.isArray(t))return S(t)}function Te(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function ge(t,r){if(t){if(typeof t=="string")return S(t,r);var o=Object.prototype.toString.call(t).slice(8,-1);if(o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set")return Array.from(t);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return S(t,r)}}function S(t,r){(r==null||r>t.length)&&(r=t.length);for(var o=0,n=new Array(r);o<r;o++)n[o]=t[o];return n}function be(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,o=String(t);if(r===0)return o;var n=o.match(/(.*?)([0-9]+)(.*)/),e=n?n[1]:"",a=n?n[3]:"",i=n?n[2]:o,c=i.length>=r?i:(ve(Array(r)).map(function(){return"0"}).join("")+i).slice(r*-1);return"".concat(e).concat(c).concat(a)}var E={daysInHours:!1,zeroPadTime:2};function Se(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=r.now,n=o===void 0?Date.now:o,e=r.precision,a=e===void 0?0:e,i=r.controlled,c=r.offsetTime,u=c===void 0?0:c,p=r.overtime,f;typeof t=="string"?f=new Date(t).getTime():t instanceof Date?f=t.getTime():f=t,i||(f+=u);var m=i?f:f-n(),h=Math.min(20,Math.max(0,a)),d=Math.round(parseFloat(((p?m:Math.max(0,m))/1e3).toFixed(h))*1e3),y=Math.abs(d)/1e3;return{total:d,days:Math.floor(y/(3600*24)),hours:Math.floor(y/3600%24),minutes:Math.floor(y/60%60),seconds:Math.floor(y%60),milliseconds:Number((y%1*1e3).toFixed()),completed:d<=0}}function je(t,r){var o=t.days,n=t.hours,e=t.minutes,a=t.seconds,i=Object.assign(Object.assign({},E),r),c=i.daysInHours,u=i.zeroPadTime,p=i.zeroPadDays,f=p===void 0?u:p,m=Math.min(2,u),h=c?x(n+o*24,u):x(n,m);return{days:c?"":x(o,f),hours:h,minutes:x(e,m),seconds:x(a,m)}}var _=function(t){N(o,t);var r=A(o);function o(){var n;return O(this,o),n=r.apply(this,arguments),n.state={count:n.props.count||3},n.startCountdown=function(){n.interval=window.setInterval(function(){var e=n.state.count-1;e===0?(n.stopCountdown(),n.props.onComplete&&n.props.onComplete()):n.setState(function(a){return{count:a.count-1}})},1e3)},n.stopCountdown=function(){clearInterval(n.interval)},n.addTime=function(e){n.stopCountdown(),n.setState(function(a){return{count:a.count+e}},n.startCountdown)},n}return I(o,[{key:"componentDidMount",value:function(){this.startCountdown()}},{key:"componentWillUnmount",value:function(){clearInterval(this.interval)}},{key:"render",value:function(){return this.props.children?v.cloneElement(this.props.children,{count:this.state.count}):null}}]),o}(v.Component);_.propTypes={count:l.number,children:l.element,onComplete:l.func};var P=function(t){N(o,t);var r=A(o);function o(n){var e;if(O(this,o),e=r.call(this,n),e.mounted=!1,e.initialTimestamp=e.calcOffsetStartTimestamp(),e.offsetStartTimestamp=e.props.autoStart?0:e.initialTimestamp,e.offsetTime=0,e.legacyMode=!1,e.legacyCountdownRef=null,e.tick=function(){var i=e.calcTimeDelta(),c=i.completed&&!e.props.overtime?void 0:e.props.onTick;e.setTimeDeltaState(i,void 0,c)},e.setLegacyCountdownRef=function(i){e.legacyCountdownRef=i},e.start=function(){if(!e.isStarted()){var i=e.offsetStartTimestamp;e.offsetStartTimestamp=0,e.offsetTime+=i?e.calcOffsetStartTimestamp()-i:0;var c=e.calcTimeDelta();e.setTimeDeltaState(c,"STARTED",e.props.onStart),!e.props.controlled&&(!c.completed||e.props.overtime)&&(e.clearTimer(),e.interval=window.setInterval(e.tick,e.props.intervalDelay))}},e.pause=function(){e.isPaused()||(e.clearTimer(),e.offsetStartTimestamp=e.calcOffsetStartTimestamp(),e.setTimeDeltaState(e.state.timeDelta,"PAUSED",e.props.onPause))},e.stop=function(){e.isStopped()||(e.clearTimer(),e.offsetStartTimestamp=e.calcOffsetStartTimestamp(),e.offsetTime=e.offsetStartTimestamp-e.initialTimestamp,e.setTimeDeltaState(e.calcTimeDelta(),"STOPPED",e.props.onStop))},e.isStarted=function(){return e.isStatus("STARTED")},e.isPaused=function(){return e.isStatus("PAUSED")},e.isStopped=function(){return e.isStatus("STOPPED")},e.isCompleted=function(){return e.isStatus("COMPLETED")},n.date){var a=e.calcTimeDelta();e.state={timeDelta:a,status:a.completed?"COMPLETED":"STOPPED"}}else e.legacyMode=!0;return e}return I(o,[{key:"componentDidMount",value:function(){this.legacyMode||(this.mounted=!0,this.props.onMount&&this.props.onMount(this.calcTimeDelta()),this.props.autoStart&&this.start())}},{key:"componentDidUpdate",value:function(e){this.legacyMode||this.props.date!==e.date&&(this.initialTimestamp=this.calcOffsetStartTimestamp(),this.offsetStartTimestamp=this.initialTimestamp,this.offsetTime=0,this.setTimeDeltaState(this.calcTimeDelta()))}},{key:"componentWillUnmount",value:function(){this.legacyMode||(this.mounted=!1,this.clearTimer())}},{key:"calcTimeDelta",value:function(){var e=this.props,a=e.date,i=e.now,c=e.precision,u=e.controlled,p=e.overtime;return Se(a,{now:i,precision:c,controlled:u,offsetTime:this.offsetTime,overtime:p})}},{key:"calcOffsetStartTimestamp",value:function(){return Date.now()}},{key:"addTime",value:function(e){this.legacyCountdownRef.addTime(e)}},{key:"clearTimer",value:function(){window.clearInterval(this.interval)}},{key:"isStatus",value:function(e){return this.state.status===e}},{key:"setTimeDeltaState",value:function(e,a,i){var c=this;if(this.mounted){var u=e.completed&&!this.state.timeDelta.completed,p=e.completed&&a==="STARTED";u&&!this.props.overtime&&this.clearTimer();var f=function(){i&&i(c.state.timeDelta),c.props.onComplete&&(u||p)&&c.props.onComplete(e,p)};return this.setState(function(m){var h=a||m.status;return e.completed&&!c.props.overtime?h="COMPLETED":!a&&h==="COMPLETED"&&(h="STOPPED"),{timeDelta:e,status:h}},f)}}},{key:"getApi",value:function(){return this.api=this.api||{start:this.start,pause:this.pause,stop:this.stop,isStarted:this.isStarted,isPaused:this.isPaused,isStopped:this.isStopped,isCompleted:this.isCompleted}}},{key:"getRenderProps",value:function(){var e=this.props,a=e.daysInHours,i=e.zeroPadTime,c=e.zeroPadDays,u=this.state.timeDelta;return Object.assign(Object.assign({},u),{api:this.getApi(),props:this.props,formatted:je(u,{daysInHours:a,zeroPadTime:i,zeroPadDays:c})})}},{key:"render",value:function(){if(this.legacyMode){var e=this.props,a=e.count,i=e.children,c=e.onComplete;return v.createElement(_,{ref:this.setLegacyCountdownRef,count:a,onComplete:c},i)}var u=this.props,p=u.className,f=u.overtime,m=u.children,h=u.renderer,d=this.getRenderProps();if(h)return h(d);if(m&&this.state.timeDelta.completed&&!f)return v.cloneElement(m,{countdown:d});var y=d.formatted,k=y.days,M=y.hours,$=y.minutes,z=y.seconds;return v.createElement("span",{className:p},d.total<0?"-":"",k,k?":":"",M,":",$,":",z)}}]),o}(v.Component);P.defaultProps=Object.assign(Object.assign({},E),{controlled:!1,intervalDelay:1e3,precision:0,autoStart:!0});P.propTypes={date:l.oneOfType([l.instanceOf(Date),l.string,l.number]),daysInHours:l.bool,zeroPadTime:l.number,zeroPadDays:l.number,controlled:l.bool,intervalDelay:l.number,precision:l.number,autoStart:l.bool,overtime:l.bool,className:l.string,children:l.element,renderer:l.func,now:l.func,onMount:l.func,onStart:l.func,onPause:l.func,onStop:l.func,onTick:l.func,onComplete:l.func};function we({token:t,open:r,setOpen:o}){return s.jsx(B,{open:r,onOpenChange:o,children:s.jsxs(W,{className:"max-w-[700px]",children:[s.jsx(q,{children:s.jsx(G,{children:"API Token Created Successfully"})}),s.jsxs("div",{className:"space-y-3 overflow-hidden px-7 py-5",children:[s.jsx(Pe,{}),s.jsx(ke,{}),s.jsx(De,{token:t}),s.jsx(ae,{fallbackRender:()=>null,children:s.jsx(Oe,{token:t})}),s.jsx("div",{role:"separator","aria-hidden":"true",className:"h-[1px] bg-theme-border-moderate"}),s.jsx(Ie,{token:t}),s.jsx(Ne,{}),s.jsx("div",{role:"separator","aria-hidden":"true",className:"h-[1px] bg-theme-border-moderate"}),s.jsx(Ae,{})]})]})})}function Pe(){return s.jsxs("section",{children:[s.jsx("p",{className:"font-semibold",children:"Here is your new API Token"}),s.jsx("p",{className:"text-theme-text-secondary",children:"This token provides temporary access to your ZenML Server"})]})}function ke(){return s.jsx(oe,{children:"Important: This token expires in 1 hour and cannot be retrieved later. Please, copy it now."})}function De({token:t}){const[r,o]=v.useState(!1);function n(e){navigator.clipboard&&(navigator.clipboard.writeText(e),o(!0),setTimeout(()=>{o(!1)},2e3))}return s.jsxs("section",{className:"flex items-center gap-5 py-5",children:[s.jsx("code",{className:"block overflow-x-auto whitespace-nowrap font-sans text-display-xs",children:t}),r?s.jsxs("div",{className:"flex h-7 items-center",children:[s.jsx(se,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"}),s.jsx("p",{className:"sr-only",children:"copied successfully"})]}):s.jsxs(w,{onClick:()=>n(t),size:"md",intent:"secondary",className:"flex items-center gap-1",emphasis:"subtle",children:[s.jsx(Z,{className:"size-4 shrink-0 fill-inherit"}),"Copy"]})]})}const Ce=({days:t,hours:r,minutes:o,seconds:n,completed:e})=>{if(e)return s.jsx("span",{className:"font-semibold text-theme-text-error",children:"Expired"});const a=c=>String(c).padStart(2,"0"),i=[];return t>0&&i.push(`${t}`),(t>0||r>0)&&i.push(`${a(r)}`),(t>0||r>0||o>0)&&i.push(`${a(o)}`),i.push(`${a(n)}`),s.jsx("span",{className:"font-semibold",children:i.join(":")})};function Oe({token:t}){if(!t)return null;const r=pe(t);return r.exp?s.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3 rounded-sm border border-theme-border-moderate bg-theme-surface-tertiary py-1 text-center",children:[s.jsx(re,{className:"size-5 shrink-0 fill-theme-text-secondary"}),s.jsxs("div",{children:["Expires in:"," ",s.jsx(P,{daysInHours:!0,renderer:Ce,zeroPadTime:2,date:new Date(r.exp*1e3)})]})]}):null}function Ie({token:t}){const r=`${window.location.origin}/api/v1/current-user`;return s.jsxs("section",{className:"space-y-1",children:[s.jsx("div",{className:"font-semibold",children:"Using your API Token"}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("p",{className:"text-theme-text-secondary",children:"To use the API token to run queries against the Server API, you can run the following commands:"}),s.jsx(C,{code:Ee(t,r)}),s.jsx(C,{code:_e(t,r)})]})]})}function Ne(){const t=`${window.location.origin}/docs`;return s.jsxs("section",{className:"space-y-2",children:[s.jsx("p",{className:"font-semibold",children:"API Documentation"}),s.jsx("p",{className:"text-theme-text-secondary",children:"Access our OpenAPI dashboard for comprehensive documentation on all available REST API endpoints:"}),s.jsx(w,{asChild:!0,size:"md",intent:"secondary",className:"flex w-fit items-center gap-1",emphasis:"subtle",children:s.jsxs("a",{target:"_blank",rel:"noopener noreferrer",href:t,children:[s.jsx("span",{children:"Open the documentation"}),s.jsx(ne,{className:"size-5 shrink-0 fill-inherit"})]})})]})}function Ae(){return s.jsxs("p",{children:["For long-term programmatic access, consider"," ",s.jsx(ie,{className:"link text-theme-text-brand",to:J.settings.service_accounts.overview,children:"setting up a service account instead."})]})}function Ee(t,r){return`curl -H "Authorization: Bearer ${t}" "${encodeURI(r)}"`}function _e(t,r){return`wget -qO- --header="Authorization: Bearer ${t}" "${encodeURI(r)}"`}const j=v.forwardRef(({className:t,onClick:r,...o},n)=>{const{toast:e}=V(),[a,i]=v.useState(""),[c,u]=v.useState(!1),p=K(),{mutate:f,isPending:m}=le({onError:d=>{ee(d)&&e({title:"Error",emphasis:"subtle",rounded:!0,status:"error",description:d.message}),console.log(d)},onSuccess:d=>{i(d),u(!0)}});function h(d){u(d),d||i("")}return p.isPending?s.jsx(Q,{className:"h-7 w-10"}):p.isError?null:s.jsxs(s.Fragment,{children:[s.jsxs(w,{disabled:m||Y(p.data.auth_scheme||"other"),ref:n,...o,onClick:()=>f({params:{token_type:"generic"}}),className:X(t),children:[m&&s.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Create new token"]}),s.jsx(we,{open:c,setOpen:h,token:a})]})});j.displayName="CreateTokenButton";function Ze(){return s.jsxs(D,{className:"flex flex-col gap-5 p-5",children:[s.jsx("h1",{className:"text-text-xl font-semibold",children:"API Tokens"}),s.jsx("div",{className:"flex items-center justify-end",children:s.jsx(j,{size:"sm"})}),s.jsxs(D,{className:"flex w-full flex-col items-center justify-center space-y-5 p-9 text-center",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"text-display-xs font-semibold",children:"Create a new API Token"}),s.jsx("p",{className:"text-text-xl text-theme-text-secondary",children:"Generate a temporary access key for quick, secure automation tasks in your Tenant. An API Token is temporary (max. 1 hour) and won't be stored anywhere."})]}),s.jsx(j,{size:"md"})]})]})}export{Ze as default};
@@ -1 +0,0 @@
1
- import{r as f,j as e}from"./@radix-C7hRs6Kx.js";import{S as X,u as y,C as v,P as N,a as $,W as ee,L as te}from"./ProviderRadio-BVDA-fAr.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-DQJFw1yW.js";import{S as V,B as Y,aN as de,h as le,r as T}from"./index-D2iSHVZq.js";import{d as me,c as ue}from"./@react-router-CNP6g_RL.js";import{I as G}from"./Infobox-D9k5TFH4.js";import{t as H}from"./zod-C0xYeTvL.js";import{u as Q,F as pe}from"./index.esm-D7jFlf5N.js";import{a as xe,c as q,b as fe,p as he}from"./persist-D87V82eO.js";import{C as h}from"./ProviderIcon-DLo7t1lo.js";import{s as J}from"./index-CrhdX_qG.js";import{a as K}from"./@tanstack-CSxjHCME.js";import"./Tick-CEsT3HPR.js";import"./check-DK77doTf.js";import"./package-D1Mhqeh8.js";import"./ComponentBadge-DKw7Gndh.js";import"./ComponentIcon-ils7uNAk.js";import"./layout-h3cbx8WZ.js";import"./rocket-Cf-B-XOR.js";import"./logs-B5n0U7tB.js";import"./CodeSnippet-CvI6D0wx.js";import"./NumberBox-D2A7ENHb.js";import"./link-external-DUhCSKNm.js";import"./@reactflow-CQi1Z1Wq.js";import"./sharedSchema-Bse2agAf.js";import"./gcp-CHNvgEss.js";import"./stack-detail-query-BAcZJrN3.js";function je(){const{formRef:t,setIsNextButtonDisabled:s,setData:a,data:o}=u(),n=Q({resolver:H(xe),mode:"onChange",defaultValues:{region:o.location,stackName:o.stackName||""}});f.useEffect(()=>{s(!n.formState.isValid)},[n.formState.isValid,s]);function l(r){a(m=>({...m,location:r.region,stackName:r.stackName}))}return e.jsx(j,{title:"Review Stack Configuration",children:e.jsx(pe,{...n,children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs(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}}=Q({resolver:H(fe),defaultValues:{provider:o.provider}});f.useEffect(()=>{s(!r)},[r,s]);function m(d){a(c=>({...c,provider:d.provider}))}return e.jsx(j,{title:"New Cloud Infrastructure",children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-text-lg font-semibold",children:"Select a Cloud Provider"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Select the cloud provider where your want to create your infrastructure and deploy your ZenML models. You will be able to remove the ZenML stack at any time."})]}),e.jsxs("form",{id:"provider-form",onSubmit:l(m),className:"grid grid-cols-1 gap-3 xl:grid-cols-3",ref:t,children:[e.jsx(v,{id:"aws-provider",...n("provider"),value:"aws",children:e.jsx(N,{icon:e.jsx(h,{provider:"aws",className:"h-6 w-6 shrink-0"}),title:"AWS",subtitle:"ZenML stack with S3, ECR, and SageMaker integration"})}),e.jsx(v,{id:"gcp-provider",...n("provider"),value:"gcp",children:e.jsx(N,{icon:e.jsx(h,{provider:"gcp",className:"h-6 w-6 shrink-0"}),title:"GCP",subtitle:"Create ZenML infrastructure using GCS, Artifact Registry, and Vertex AI"})}),e.jsx(v,{id:"azure-provider",...n("provider"),value:"azure",children:e.jsx(N,{icon:e.jsx(h,{provider:"azure",className:"h-6 w-6 shrink-0"}),title:"Azure",subtitle:"Set up ZenML with Azure Storage, Container Registry, and ML services"})})]})]})})}function Ce({provider:t,stackName:s,timestamp:a,isTerraform:o}){var g,S,k,b,w,C,P,D,I,z,L,R,B,E,W,M,_,A;const{isPending:n,isError:l,data:r}=K({...J.stackDeploymentStack({provider:t,stack_name:s,date_start:a,terraform:o}),throwOnError:!0});if(n)return e.jsx(V,{className:"h-[200px] w-full"});if(l)return null;const m=r.stack.name,d=(g=r.stack.metadata)==null?void 0:g.components.orchestrator,c=(S=r.stack.metadata)==null?void 0:S.components.artifact_store,i=(k=r.stack.metadata)==null?void 0:k.components.container_registry,p=(b=r.stack.metadata)==null?void 0:b.components.image_builder,x=(w=r.stack.metadata)==null?void 0:w.components.step_operator,U={orchestrator:{name:((C=d==null?void 0:d[0])==null?void 0:C.name)??"Orchestrator",id:((P=d==null?void 0:d[0])==null?void 0:P.id.split("-")[0])??""},artifactStore:{name:((D=c==null?void 0:c[0])==null?void 0:D.name)??"Artifact Store",id:((I=c==null?void 0:c[0])==null?void 0:I.id.split("-")[0])??""},registry:{name:((z=i==null?void 0:i[0])==null?void 0:z.name)??"Container Registry",id:((L=i==null?void 0:i[0])==null?void 0:L.id.split("-")[0])??""},connector:{name:(R=r.service_connector)==null?void 0:R.name,id:((E=(B=r.service_connector)==null?void 0:B.id)==null?void 0:E.split("-")[0])??""},imageBuilder:{name:((W=p==null?void 0:p[0])==null?void 0:W.name)??"Image Builder",id:((M=p==null?void 0:p[0])==null?void 0:M.id.split("-")[0])??""},operator:{name:((_=x==null?void 0:x[0])==null?void 0:_.name)??"Step Operator",id:((A=x==null?void 0:x[0])==null?void 0:A.id.split("-")[0])??""}};return e.jsx(O,{type:t,componentProps:{components:U,isSuccess:!0,stackName:m}})}function Pe(){const{setIsNextButtonDisabled:t,data:s,timestamp:a}=u();return t(!1),e.jsx(j,{title:"Your Stack",children:e.jsxs("div",{className:"space-y-5",children:[e.jsx("p",{className:"text-theme-text-secondary",children:"Here you can review the created stack and stack components. Now you can start running pipelines using this new configuration."}),e.jsx(Ce,{provider:s.provider||"aws",stackName:s.stackName||"",timestamp:a})]})})}function De(){const{currentStep:t}=y();if(t===1)return e.jsx(we,{});if(t===2)return e.jsx(je,{});if(t===3)return e.jsx(ke,{});if(t===4)return e.jsx(Pe,{})}function Ie(){var c;const[s]=me(),{setCurrentStep:a,currentStep:o}=y(),{formRef:n,isNextButtonDisabled:l}=u(),r=ue(),m=s.get("origin")==="onboarding";async function d(){n.current&&(n.current.requestSubmit(),await new Promise(i=>setTimeout(i,20))),a(i=>i<4?i+1:i),o===4&&(q(),r(m?T.onboarding:T.stacks.overview))}return e.jsx(le,{form:(c=n.current)==null?void 0:c.id,disabled:l,onClick:()=>d(),size:"md",children:o===4?"Finish":"Next"})}function j({children:t,title:s}){return e.jsxs(Y,{className:"w-full",children:[e.jsx("div",{className:"border-b border-theme-border-moderate px-5 py-3 text-display-xs font-semibold",children:s}),e.jsx("div",{className:"p-5",children:t}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-theme-border-moderate p-5",children:[e.jsx($,{}),e.jsx(Ie,{})]})]})}const Z=["Infrastructure Type","Cloud Provider","Review Configuration","Deploy Stack"];function rt(){const{success:t}=he();return e.jsx(ee,{maxSteps:Z.length,initialStep:t?3:1,children:e.jsx(ce,{children:e.jsxs("section",{className:"layout-container flex flex-col gap-5 p-5 xl:flex-row",children:[e.jsx(te,{entries:Z}),e.jsx("div",{className:"w-full overflow-y-hidden",children:e.jsx(De,{})})]})})})}export{rt as default};
@@ -1 +0,0 @@
1
- import{j as e,r as j}from"./@radix-C7hRs6Kx.js";import{V as f,y as g,z as o,L as b,r as c,T as y,E as N,G as v,H as P,J as p,K as u,h as R,M as S,S as x,n as T}from"./index-D2iSHVZq.js";import{d as k,L as l,a as h}from"./@react-router-CNP6g_RL.js";import{S as C}from"./refresh-CM5T3QeU.js";import{u as _}from"./all-pipeline-runs-query-BGASHYtF.js";import{S as E,P as w}from"./SearchField-D-h6jXyg.js";import{D}from"./DisplayDate-CYVBBSgr.js";import{g as F,E as A}from"./ExecutionStatus-XrvT2r65.js";import{I as B}from"./InlineAvatar-Cfz4WSLK.js";import{a as I,b as z,u as L,c as G,R as H}from"./RunSelector-BLuBYNJt.js";import"./@tanstack-CSxjHCME.js";import"./@reactflow-CQi1Z1Wq.js";import"./dots-horizontal-BGRJCPCs.js";import"./chevron-right-double-uNWbJT-C.js";import"./index-DR30v9MZ.js";import"./check-circle-mvyzYvIW.js";import"./trash-BWSZ7NRK.js";import"./DeleteAlertDialog-DVvXt-S6.js";import"./zod-C0xYeTvL.js";import"./index.esm-D7jFlf5N.js";import"./AlertDialogDropdownItem-BG7-Ki1L.js";import"./delete-run-DlSLEl5T.js";function U({namespace:s}){return e.jsx(f,{children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(g,{className:"h-5 w-5 fill-neutral-400"}),e.jsx("h1",{className:"text-display-xs font-semibold",children:decodeURIComponent(s)})]})})}const d=1,q=o.object({page:o.coerce.number().min(d).optional().default(d).catch(d),name:o.string().optional(),operator:o.enum(["and","or"]).optional()});function J(){const[s]=k(),{page:a,name:t,operator:r}=q.parse({page:s.get("page")||void 0,name:s.get("name")||void 0});return{page:a,name:t,logical_operator:r}}function K(){return[{id:"check",header:"",meta:{width:"1%"},accessorFn:s=>({id:s.id}),cell:({getValue:s})=>{const{id:a}=s();return e.jsx(I,{id:a})}},{id:"run",header:"Run",accessorFn:s=>{var a;return{name:s.name,id:s.id,status:(a=s.body)==null?void 0:a.status}},cell:({getValue:s})=>{const{name:a,status:t,id:r}=s();return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(b,{className:`h-5 w-5 shrink-0 ${F(t)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(l,{to:c.runs.detail(r),className:"flex items-center gap-1",children:e.jsx("h2",{className:"text-text-md font-semibold",children:a})}),e.jsx(y,{children:e.jsxs(N,{children:[e.jsx(v,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(A,{status:t})}),e.jsx(P,{className:"z-20 capitalize",children:t})]})}),e.jsx(p,{copyText:a})]}),e.jsxs(l,{to:c.runs.detail(r),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:r.split("-")[0]}),e.jsx(p,{copyText:r})]})]})]})}},{id:"stack",header:"Stack",accessorFn:s=>{var a,t,r,n;return{name:(t=(a=s.body)==null?void 0:a.stack)==null?void 0:t.name,id:(n=(r=s.body)==null?void 0:r.stack)==null?void 0:n.id}},cell:({getValue:s})=>{const{name:a,id:t}=s();return!a||!t?null:e.jsx(l,{to:c.stacks.overview,children:e.jsx(u,{rounded:!1,className:"inline-block",color:"turquoise",emphasis:"subtle",children:a})})}},{id:"repository",header:"Repository",accessorFn:s=>{var a,t,r,n,i,m;return{name:(r=(t=(a=s.body)==null?void 0:a.code_reference)==null?void 0:t.body)==null?void 0:r.code_repository.name,id:(m=(i=(n=s.body)==null?void 0:n.code_reference)==null?void 0:i.body)==null?void 0:m.code_repository.id}},cell:({getValue:s})=>{const{name:a,id:t}=s();return!a||!t?null:e.jsx("div",{children:e.jsx(u,{rounded:!1,className:"inline-block",color:"grey",emphasis:"subtle",children:a})})}},{id:"created",header:"Created at",accessorFn:s=>{var a;return(a=s.body)==null?void 0:a.created},cell:({getValue:s})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(D,{dateString:s()})})},{id:"author",header:"Author",accessorFn:s=>{var a;return{author:(a=s.body)==null?void 0:a.user}},cell:({getValue:s})=>{const{author:a}=s();return e.jsx(B,{username:a.name})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:s})=>e.jsx(z,{id:s.original.id})}]}function M(){const{namespace:s}=h(),a=J(),t=K(),{selectedRuns:r}=L(),{data:n,refetch:i}=_({params:{pipeline_name:decodeURIComponent(s),...a,sort_by:"desc:updated"}},{throwOnError:!0});return e.jsxs("div",{className:"flex flex-col gap-5 p-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[r.length?e.jsx(G,{}):e.jsx(E,{searchParams:a}),e.jsxs(R,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>i(),children:[e.jsx(C,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:n?e.jsx(S,{columns:t,data:n.items}):e.jsx(x,{className:"h-[500px] w-full"})}),n?n.total_pages>1&&e.jsx(w,{searchParams:a,paginate:n}):e.jsx(x,{className:"h-[36px] w-[300px]"})]})]})}function xe(){const{namespace:s}=h(),{setCurrentBreadcrumbData:a}=T();return j.useEffect(()=>{s&&a({segment:"pipeline_detail",data:{name:s}})},[s]),e.jsx("div",{children:e.jsxs(H,{children:[e.jsx(U,{namespace:s}),e.jsx(M,{})]})})}export{xe as default};
@@ -1 +0,0 @@
1
- import{r as a,j as e}from"./@radix-C7hRs6Kx.js";import{n as g,V as C,aO as y,h as i,ac as c,r as h}from"./index-D2iSHVZq.js";import{H as p,B as u,F as b,W as v}from"./Wizard-CMI6Ksgz.js";import{S as f}from"./arrow-left-CwgF2MEM.js";import{C as N}from"./configuration-form-BtI2Y4eX.js";import{c as S,L as k}from"./@react-router-CNP6g_RL.js";import{S as F}from"./flavor-select-BnPxvQDN.js";import{C as w}from"./ComponentIcon-ils7uNAk.js";import{s as B}from"./constants-DP3ZEnXH.js";import"./@tanstack-CSxjHCME.js";import"./@reactflow-CQi1Z1Wq.js";import"./index-CmLcvK2z.js";import"./plus-COjQg3AG.js";import"./trash-BWSZ7NRK.js";import"./index.esm-D7jFlf5N.js";import"./type-guards-CaeD8wHO.js";import"./index-CFESYpe4.js";import"./zod-C0xYeTvL.js";import"./check-DK77doTf.js";import"./CodeSnippet-CvI6D0wx.js";import"./file-text-BdxZdjP_.js";import"./terminal-square-DMtel8mb.js";import"./layout-h3cbx8WZ.js";import"./rocket-Cf-B-XOR.js";function T(){const{setCurrentBreadcrumbData:s}=g();return a.useEffect(()=>{s({segment:"createComponent",data:null})},[]),e.jsx(C,{children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(y,{className:"h-5 w-5 fill-turquoise-400"}),e.jsx("h1",{className:"text-display-xs font-semibold",children:"Register new Component"})]})})}function z({flavor:s,type:t,handleBack:r}){const l=a.useId(),o=S();function m(d){o(h.components.detail(d))}return e.jsxs(e.Fragment,{children:[e.jsxs(p,{className:"flex items-center gap-2",children:[e.jsxs(i,{intent:"secondary",emphasis:"subtle",className:"flex aspect-square size-6 items-center justify-center",onClick:()=>r(),children:[e.jsx(f,{className:"size-5 shrink-0"}),e.jsx("span",{className:"sr-only",children:"Go step back"})]}),e.jsxs("span",{children:["Configure your ",c(s.name)," ",c(t)]})]}),e.jsx(u,{className:"p-0",children:e.jsx(N,{flavorId:s.id,formId:l,successHandler:m,FooterComponent:H})})]})}function H({formId:s,isPending:t}){return e.jsxs(b,{children:[e.jsx(i,{asChild:!0,intent:"secondary",size:"md",children:e.jsx(k,{to:h.components.overview,children:"Cancel"})}),e.jsxs(i,{size:"md",disabled:t,type:"submit",form:s,children:[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 Component"]})]})}function I({type:s,handleFlavorSelect:t,handleBack:r}){return e.jsxs(e.Fragment,{children:[e.jsxs(p,{className:"flex items-center gap-2",children:[e.jsxs(i,{intent:"secondary",emphasis:"subtle",className:"flex aspect-square size-6 items-center justify-center",onClick:()=>r(),children:[e.jsx(f,{className:"size-5 shrink-0"}),e.jsx("span",{className:"sr-only",children:"Go step back"})]}),e.jsxs("span",{children:["Select your ",c(s)," Flavor"]})," "]}),e.jsx(u,{children:e.jsx(F,{type:s,setSelectedFlavor:t})})]})}function L({selectTypeHandler:s}){return e.jsxs(e.Fragment,{children:[e.jsx(p,{children:"Select your Component Type"}),e.jsx(u,{children:e.jsx("ul",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-4",children:B.map(t=>e.jsx(R,{type:t,selectTypeHandler:s},t))})})]})}function R({type:s,selectTypeHandler:t}){return e.jsxs("button",{onClick:()=>t(s),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",children:[e.jsx(w,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary group-data-[state=active]/trigger:fill-theme-surface-strong",type:s}),e.jsx("span",{children:c(s)})]})}function q(){const[s,t]=a.useState(0),[r,l]=a.useState(null),[o,m]=a.useState();function d(n){l(n),t(1)}function j(n){m(n),t(2)}function x(){t(n=>n-1)}return e.jsxs(v,{children:[s===0&&e.jsx(L,{selectTypeHandler:d}),s===1&&r&&e.jsx(I,{type:r,handleFlavorSelect:j,handleBack:x}),s===2&&o&&r&&e.jsx(z,{flavor:o,type:r,handleBack:x})]})}function oe(){return e.jsxs("div",{className:"space-y-5",children:[e.jsx(T,{}),e.jsx("section",{className:"layout-container pb-5",children:e.jsx(q,{})})]})}export{oe as default};
@@ -1 +0,0 @@
1
- import{j as e,r as m}from"./@radix-C7hRs6Kx.js";import{az as g,aA as b,aB as v,aC as y,aD as S,B as h,aE as C}from"./index-D2iSHVZq.js";import{I as l}from"./Infobox-D9k5TFH4.js";import{V as d,g as p}from"./Commands-DGbAvMDk.js";import{H as j}from"./Helpbox-iE1xLmiZ.js";import{S as w,a as k,b as A}from"./gcp-CHNvgEss.js";import{S as z}from"./kubernetes-D6OUjwSK.js";import{S as T}from"./docker-BuDBFEDL.js";import"./@tanstack-CSxjHCME.js";import"./@react-router-CNP6g_RL.js";import"./@reactflow-CQi1Z1Wq.js";import"./CodeSnippet-CvI6D0wx.js";import"./help-DyMolRxD.js";const N="/assets/connectors-video-C9qY4syJ.svg",s="w-5 h-5",P=[{label:"Kubernetes",value:"kubernetes",icon:e.jsx(z,{className:s})},{label:"GCP",value:"gcp",icon:e.jsx(w,{className:s})},{label:"Docker",value:"docker",icon:e.jsx(T,{className:s})},{label:"Azure",value:"azure",icon:e.jsx(k,{className:s})},{label:"AWS",value:"aws",icon:e.jsx(A,{className:s})}],I={help:{href:"https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/kubernetes-service-connector",text:"Use the complete guide to set up your Kubernetes Service Connector."},prerequisites:i("kubernetes","Kubernetes"),listCommand:a("kubernetes","Kubernetes"),topInfobox:"The ZenML Kubernetes service connector facilitates authenticating and connecting to a Kubernetes cluster. The connector can be used to access to any generic Kubernetes cluster by providing pre-authenticated Kubernetes python clients to Stack Components that are linked to it and also allows configuring the local Kubernetes CLI (i.e. kubectl).",bottomInfobox:"Upon completion of the installation of the required prerequisites and integration, our documentation provides you with a comprehensive list of resource types that can be employed to establish your connector. Please refer to the documentation to explore all available options."},q={help:{text:"Use the complete guide to set up your GCP Service Connector.",href:"https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/gcp-service-connector"},prerequisites:i("gcp","GCP"),listCommand:a("gcp","GCP"),bottomInfobox:"Upon completion of the installation of the required prerequisites and integration, our documentation will guide you with a comprehensive list of all the resource types that can be employed to establish your GCP connector. Please refer to the documentation to explore all available options.",topInfobox:"The ZenML GCP Service Connector facilitates the authentication and access to managed GCP services and resources. These encompass a range of resources, including GCS buckets, GCR container repositories, and GKE clusters. The connector provides support for various authentication methods, including GCP user accounts, service accounts, short-lived OAuth 2.0 tokens, and implicit authentication."},G={help:{text:"Use the complete guide to set up your Docker Service Connector.",href:"https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/docker-service-connector"},listCommand:a("docker","Docker"),topInfobox:"The ZenML Docker Service Connector allows authenticating with a Docker or OCI container registry and managing Docker clients for the registry. This connector provides pre-authenticated python-docker Python clients to Stack Components that are linked to it.",bottomInfobox:"No Python packages are required for this Service Connector. All prerequisites are included in the base ZenML Python package. Docker needs to be installed on environments where container images are built and pushed to the target container registry. Please refer to the documentation to explore all available options."},K={help:{text:"Use the complete guide to set up your Azure Service Connector.",href:"https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/azure-service-connector"},listCommand:a("azure","Azure"),prerequisites:i("azure","Azure"),topInfobox:"The ZenML Azure Service Connector facilitates the authentication and access to managed Azure services and resources. These encompass a range of resources, including blob storage containers, ACR repositories, and AKS clusters.",bottomInfobox:"Upon completion of the installation of the required prerequisites and integration, our documentation will guide you with a comprehensive list of all the resource types that can be employed to establish your Azure connector. Please refer to the documentation to explore all available options."},L={help:{text:"Use the complete guide to set up your AWS Service Connector.",href:"https://docs.zenml.io/how-to/infrastructure-deployment/auth-management/aws-service-connector"},listCommand:a("aws","AWS"),prerequisites:i("aws","AWS"),topInfobox:"The ZenML AWS Service Connector facilitates the authentication and access to managed AWS services and resources. These encompass a range of resources, including S3 buckets, ECR container repositories, and EKS clusters. The connector provides support for various authentication methods, including explicit long-lived AWS secret keys, IAM roles, short-lived STS tokens, and implicit authentication.",bottomInfobox:"Upon completion of the installation of the required prerequisites and integration, our documentation will guide you with a comprehensive list of all the resource types that can be employed to establish your AWS connector. Please refer to the documentation to explore all available options."};function a(t,o){return{command:`zenml service-connector list-types --type ${t}`,description:`List ${o} Connector Types`}}function i(t,o){return[{description:"Install the prerequisites",command:`pip install "zenml[connectors-${t}]"`},{description:`Install the entire ${o} ZenML integration`,command:`zenml integration install ${t}`}]}function M({id:t,selectedType:o,onTypeChange:c}){return e.jsxs(g,{value:o,onValueChange:n=>c(n),children:[e.jsx(b,{id:t,className:"w-[250px] border border-neutral-300 px-2 text-left text-text-md",children:e.jsx(v,{placeholder:"Select Connector Type"})}),e.jsx(y,{className:"",children:P.map(n=>e.jsx(S,{value:n.value,children:e.jsxs("div",{className:"flex items-center gap-1",children:[n.icon,n.label]})},n.value))})]})}function D(){return e.jsx(l,{children:e.jsxs("div",{className:"flex w-full flex-wrap items-center gap-x-2 gap-y-0.5 text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"We are creating a new Connectors experience"}),e.jsx("p",{children:"In the meanwhile you can use the CLI to add and manage your connectors."})]})})}function W(){const t="https://zenml.portal.trainn.co/share/V6magMJZZvMptz1wdnUmPA/embed?autoplay=false";return e.jsxs(h,{className:"flex flex-col-reverse items-stretch overflow-hidden lg:flex-row",children:[e.jsxs("div",{className:"w-full p-7 lg:w-2/3",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Learn More about Connectors"}),e.jsx("p",{className:"mt-2 text-text-lg text-theme-text-secondary",children:"Dive into Service Connector Types for a documented approach to secure authentication and authorization practices."}),e.jsx(d,{videoLink:t,buttonText:"Watch the Starter Guide (2 min)"})]}),e.jsx("div",{className:"flex w-full items-center justify-center bg-primary-50 lg:w-1/3",children:e.jsx(d,{fallbackImage:e.jsx("img",{src:N,alt:"Purple squares with text indicating a starter guide for secrets",className:"h-full w-full"}),videoLink:t,isButton:!1})})]})}function U(){const[t,o]=m.useState("kubernetes");return e.jsxs("section",{className:"space-y-5 pl-8 pr-5",children:[e.jsx(M,{selectedType:t,onTypeChange:o,id:"connector-select"}),Z(t)]})}function r({topInfobox:t,bottomInfobox:o,listCommand:c,prerequisites:n,help:u}){return e.jsxs(e.Fragment,{children:[e.jsx(l,{className:"text-text-md",intent:"neutral",children:t}),p(c),n&&e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"Prerequisites"}),n.map((x,f)=>e.jsx(m.Fragment,{children:p(x)},f))]}),e.jsx(l,{className:"text-text-md",intent:"neutral",children:o}),e.jsx(j,{text:u.text,link:u.href})]})}function Z(t){switch(t){case"kubernetes":return r(I);case"gcp":return r(q);case"docker":return r(G);case"azure":return r(K);case"aws":return r(L)}}function ee(){return e.jsxs(h,{className:"space-y-4 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Secrets"}),e.jsx(D,{}),e.jsx(W,{}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(C,{}),"Administering your Connectors"]}),e.jsx(U,{})]})}export{ee as default};
@@ -1 +0,0 @@
1
- import{r as l,j as e}from"./@radix-C7hRs6Kx.js";import{u as m,S as x,a as y,b as v}from"./form-schemas-CbvoEUHr.js";import{A as j,I as U,P as b,U as h,S as _}from"./UsageReason-DjI5qMje.js";import{f as g,ax as C,i as P,bd as w,l as A,S as E}from"./index-D2iSHVZq.js";import{c as F}from"./@tanstack-CSxjHCME.js";import"./check-circle-mvyzYvIW.js";import"./@react-router-CNP6g_RL.js";import"./UpdatePasswordSchemas-DbFEaezI.js";import"./zod-C0xYeTvL.js";import"./index.esm-D7jFlf5N.js";import"./gcp-CHNvgEss.js";import"./kubernetes-D6OUjwSK.js";import"./rocket-Cf-B-XOR.js";import"./@reactflow-CQi1Z1Wq.js";const S=l.createContext(null);function H({children:t,initialUser:n}){const[a,r]=l.useState(n||{});return e.jsx(S.Provider,{value:{user:a,setUser:r},children:t})}function d(){const t=l.useContext(S);if(t===null)throw new Error("useSurveyUserContext must be used within an SurveyUserProvider");return t}function D({user:t}){var u,i;const{setSurveyStep:n}=m(),{setUser:a}=d();function r({fullName:s,getUpdates:c,email:o}){a(p=>({...p,...o?{email:o}:{email:null},full_name:s,email_opted_in:c})),n(2)}return e.jsx(j,{email:(u=t.metadata)==null?void 0:u.email,fullName:(i=t.body)==null?void 0:i.full_name,submitHandler:r})}function I(){const{user:t}=d(),{setSurveyStep:n}=m(),{toast:a}=g(),r=F(),{mutate:u}=C({onSuccess:async()=>{await r.invalidateQueries({queryKey:w()}),n(s=>s+1)},onError:s=>{s instanceof Error&&a({status:"error",emphasis:"subtle",icon:e.jsx(P,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:s.message,rounded:!0})}});function i({other:s,providers:c,otherVal:o}){const f={infra_providers:s?[...c,o]:c,finished_onboarding_survey:!0};u({...t,user_metadata:{...t.user_metadata,...f}})}return e.jsx(U,{submitHandler:i})}function R({user:t}){const{setSurveyStep:n}=m(),{setUser:a}=d();function r({primaryUse:u}){const i={primary_use:u};a(s=>({...s,user_metadata:{...s.user_metadata,...i}})),n(3)}return e.jsx(b,{user:t,submitHandler:r})}function k(){const{setSurveyStep:t}=m(),{setUser:n}=d();function a({usageReason:r,comparison_tools:u,otherTool:i,otherToolVal:s}){const c={usage_reason:r,...!!u&&{comparing_tools:i&&s?[...u,s]:u}};n(o=>({...o,user_metadata:{...o.user_metadata,...c}})),t(o=>o+1)}return e.jsx(h,{submitHandler:a})}function M(){const{data:t,isPending:n,isError:a}=A({throwOnError:!0}),{surveyStep:r}=m();return a?null:n?e.jsx(E,{className:"h-[300px]"}):e.jsx(e.Fragment,{children:e.jsxs(H,{children:[e.jsx(x,{stepAmount:5}),r===1&&e.jsx(D,{user:t}),r===2&&e.jsx(R,{user:t}),r===3&&e.jsx(k,{}),r===4&&e.jsx(I,{}),r===5&&e.jsx(_,{}),r===6&&e.jsx(y,{subHeader:"Your ZenML account is now updated",displayBody:!1,username:t.name})]})})}function X(){return e.jsx("div",{children:e.jsx(v,{children:e.jsx(M,{})})})}export{X as default};
@@ -1 +0,0 @@
1
- import{r as o,j as e}from"./@radix-C7hRs6Kx.js";import{z as i,f as v,ao as y,ay as j,ar as S,i as C,u as k,B as w,S as E}from"./index-D2iSHVZq.js";import{u as F}from"./update-server-settings-mutation-DwMM1LJz.js";import{t as q}from"./zod-C0xYeTvL.js";import{c as A}from"./@tanstack-CSxjHCME.js";import{u as I,C as b}from"./index.esm-D7jFlf5N.js";import"./@react-router-CNP6g_RL.js";import"./@reactflow-CQi1Z1Wq.js";const _=i.object({announcements:i.boolean(),updates:i.boolean()});function K({settings:t}){var h,f;const c=o.useId(),d=o.useId(),{toast:l}=v(),u=A(),{mutate:g}=F({onError:s=>{u.invalidateQueries({queryKey:j()}),S(s)&&l({status:"error",emphasis:"subtle",icon:e.jsx(C,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:s.message,rounded:!0})},onSuccess:()=>{u.invalidateQueries({queryKey:j()}),l({status:"success",emphasis:"subtle",rounded:!0,description:"Settings updated successfully"})}}),{control:m,handleSubmit:p,watch:x}=I({resolver:q(_),defaultValues:{announcements:((h=t.body)==null?void 0:h.display_announcements)??void 0,updates:((f=t.body)==null?void 0:f.display_updates)??void 0}});function N({announcements:s,updates:a}){g({display_announcements:s,display_updates:a})}return o.useEffect(()=>{const s=x(()=>p(N)());return()=>s.unsubscribe()},[p,x]),e.jsx("form",{id:"create-user-form",className:"space-y-5",children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(b,{control:m,name:"announcements",render:({field:{value:s,onChange:a,ref:n}})=>e.jsx(y,{ref:n,checked:s,onCheckedChange:r=>{a(!!r)},id:c})}),e.jsxs("label",{htmlFor:c,className:"text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"Announcements"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Enable Announcements for important ZenML updates, surveys, and feedback opportunities."})]})]}),e.jsx("hr",{}),e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(b,{control:m,name:"updates",render:({field:{value:s,onChange:a,ref:n}})=>e.jsx(y,{ref:n,checked:s,onCheckedChange:r=>{a(!!r)},id:d})}),e.jsxs("label",{htmlFor:d,className:"text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"Updates"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Activate Updates to receive the latest ZenML news and feature releases."})]})]})]})})}function P(){const{data:t}=k({throwOnError:!0});return e.jsxs(w,{className:"flex flex-col gap-5 p-5",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Notifications"}),e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:"ZenML comes equipped with default widgets designed to enhance your experience by analyzing usage patterns, gathering your feedback, and ensuring you stay informed about our latest updates and features."})]}),e.jsx("div",{className:"",children:t?e.jsx(K,{settings:t}):e.jsx(E,{className:"h-[250px] w-full"})})]})}export{P as default};
@@ -1 +0,0 @@
1
- import{r as m,j as e}from"./@radix-C7hRs6Kx.js";import{j as S,o as D,F as b,p as C,f as w,ar as y,t as O,v as H,h,s as $,as as R,aI as V,at as J,aJ as U,av as G,ao as Y,D as Z,w as W,x as X,C as K,r as k,ai as ee,aj as te,ak as se,al as ne,am as re,I as F,ap as ce,aq as ae,B as q,n as ie,M as oe,S as T}from"./index-D2iSHVZq.js";import{P as le,S as ue}from"./SearchField-D-h6jXyg.js";import{s as f,A as de,u as me,c as xe,a as E,b as he}from"./service-BQ9KIhls.js";import{b as N,c as g,a as pe}from"./@tanstack-CSxjHCME.js";import{S as I}from"./trash-BWSZ7NRK.js";import{D as M,a as Q}from"./DeleteAlertDialog-DVvXt-S6.js";import{S as fe}from"./Lock-DW-0_M0o.js";import{L as P}from"./@react-router-CNP6g_RL.js";import{S as je}from"./dots-horizontal-BGRJCPCs.js";import{A as ve}from"./AlertDialogDropdownItem-BG7-Ki1L.js";import{t as ye}from"./zod-C0xYeTvL.js";import{u as ge,F as Ae,b as Se,C as A}from"./index.esm-D7jFlf5N.js";import"./@reactflow-CQi1Z1Wq.js";import"./chevron-right-double-uNWbJT-C.js";import"./index-DR30v9MZ.js";import"./CodeSnippet-CvI6D0wx.js";import"./Infobox-D9k5TFH4.js";import"./Tick-CEsT3HPR.js";import"./check-DK77doTf.js";async function De(t){const s=D(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 b({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 j(){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}=j();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-y-0 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}=j();return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:`${t==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=D(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 b({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}=j(),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(je,{className:"h-5 w-5 fill-theme-text-secondary"})}),e.jsx(X,{hidden:n,onCloseAutoFocus:x=>{o.current&&(o.current.focus(),o.current=null,x.preventDefault())},align:"end",sideOffset:7,children:e.jsx(ve,{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}=j(),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(fe,{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=D(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 b({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(xe),defaultValues:{name:"",description:"",createDefault:!1}}),o=!!n&&u.watch("createDefault");function d(){return o?e.jsx(de,{value:n}):e.jsx(Ie,{isFallback:t,setApiKeyValue:c,setOpen:r})}return e.jsx(Ae,{...u,children:e.jsxs(ee,{open:s,onOpenChange:l=>{t&&!l&&a.invalidateQueries({queryKey:f.serviceAccountsKey()}),r(l),c(""),u.reset()},children:[e.jsx(te,{asChild:!0,children:e.jsx(h,{className:"shrink-0",size:"sm",intent:"primary",children:"Add service account"})}),e.jsxs(se,{"data-success":o,className:"mx-auto overflow-x-auto transition-none data-[success=true]:max-w-[800px]",children:[e.jsx(ne,{children:e.jsx(re,{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}=me({onSuccess(i){var v;r||d.invalidateQueries({queryKey:f.serviceAccountsKey()}),t(((v=i.body)==null?void 0:v.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:v}})=>e.jsx(K,{checked:v,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(ce,{className:"gap-[10px]",children:[e.jsx(ae,{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}=ie(),s=E();m.useEffect(()=>{t({segment:"service_accounts",data:null})},[]);const r=m.useMemo(()=>Ke(),[]),{data:n}=pe({...he.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(oe,{columns:r,data:n.items}):e.jsx(T,{className:"h-[500px] w-full"})}),n?n.total_pages>1&&e.jsx(le,{searchParams:s,paginate:n}):e.jsx(T,{className:"h-[36px] w-[300px]"})]})]})}function ze(){const t=E(),{selectedServiceAccounts:s}=j();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(ue,{searchParams:t})}),e.jsx(B,{isFallback:!1})]})}function it(){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{it as default};
@@ -1 +0,0 @@
1
- import{r as u,j as r}from"./@radix-C7hRs6Kx.js";import{B as f,F as x,W as h}from"./Wizard-CMI6Ksgz.js";import{X as j,S as C,h as a,r as m}from"./index-D2iSHVZq.js";import{c as b,a as p,L as v}from"./@react-router-CNP6g_RL.js";import{a as g}from"./@tanstack-CSxjHCME.js";import{C as E}from"./configuration-form-BtI2Y4eX.js";import"./@reactflow-CQi1Z1Wq.js";import"./index-CmLcvK2z.js";import"./plus-COjQg3AG.js";import"./trash-BWSZ7NRK.js";import"./index.esm-D7jFlf5N.js";import"./type-guards-CaeD8wHO.js";import"./index-CFESYpe4.js";import"./zod-C0xYeTvL.js";import"./ComponentIcon-ils7uNAk.js";import"./layout-h3cbx8WZ.js";import"./rocket-Cf-B-XOR.js";import"./check-DK77doTf.js";import"./CodeSnippet-CvI6D0wx.js";import"./file-text-BdxZdjP_.js";import"./terminal-square-DMtel8mb.js";function y(){var s,i;const e=b(),{componentId:t}=p(),o=g({...j.componentDetail(t),throwOnError:!0});function d(l){e(m.components.detail(l))}const c=u.useId();if(o.isPending)return r.jsx(C,{className:"h-[300px] w-full"});if(o.isError)return r.jsx("div",{children:"Error"});const n=(i=(s=o.data.resources)==null?void 0:s.flavor)==null?void 0:i.id;return n?r.jsx(r.Fragment,{children:r.jsx(f,{className:"p-0",children:r.jsx(E,{component:o.data,flavorId:n,formId:c,isCreate:!1,successHandler:d,FooterComponent:N})})}):r.jsx("div",{children:"No flavor found"})}function N({formId:e,isPending:t}){const o=p();return r.jsxs(x,{children:[r.jsx(a,{asChild:!0,intent:"secondary",size:"md",children:r.jsx(v,{to:m.components.detail(o.componentId),children:"Cancel"})}),r.jsxs(a,{size:"md",disabled:t,type:"submit",form:e,children:[t&&r.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Update Component"]})]})}function K(){return r.jsx("section",{className:"layout-container mt-5 pb-5",children:r.jsx(h,{children:r.jsx(y,{})})})}export{K as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./@radix-C7hRs6Kx.js";import{I as m}from"./InlineAvatar-Cfz4WSLK.js";import{u as x,S as c,A as d,a as f,g as u,b as v,r,c as h,d as p,l as g}from"./index-D2iSHVZq.js";import{u as j,h as N,O as b}from"./@react-router-CNP6g_RL.js";import"./@tanstack-CSxjHCME.js";import"./@reactflow-CQi1Z1Wq.js";function w({children:s,isActiveOverride:t,...n}){const a=j(),i=t?t(a.pathname):!1;return e.jsx(N,{...n,className:({isActive:l})=>` ${i||l?"bg-primary-50 text-theme-text-brand":"hover:bg-neutral-200"} block rounded-md px-4 py-1 text-text-sm font-semibold `,children:s})}function o({items:s}){return e.jsx("nav",{className:"flex w-full flex-col items-center",children:e.jsx("ul",{className:"flex w-full flex-row flex-wrap items-center gap-1 lg:flex-col lg:items-start",children:s.map(t=>e.jsx("li",{className:"lg:w-full",children:e.jsx(w,{end:!0,to:t.href,isActiveOverride:t.isActiveOverride,children:t.name})},t.name))})})}function y(){var a,i,l;const{data:s,isError:t,isPending:n}=x({throwOnError:!0});return n?e.jsx(c,{className:"h-9 w-full"}):t?null:e.jsxs("div",{className:"flex w-full items-center gap-2 rounded-md border border-theme-border-moderate bg-theme-surface-primary p-2",children:[e.jsxs(d,{size:"md",type:"square",children:[e.jsx(f,{src:u(((a=s.body)==null?void 0:a.server_name)||"default")}),e.jsx(v,{size:"md",children:((i=s.body)==null?void 0:i.server_name[0])||"D"})]}),e.jsx("p",{className:"truncate text-text-sm font-semibold",children:(l=s.body)==null?void 0:l.server_name})]})}function S(){function s(){return[{name:"General",href:r.settings.general},{name:"Members",href:r.settings.members},{name:"API Tokens",href:r.settings.apiTokens},{name:"Repositories",href:r.settings.repositories.overview},{name:"Secrets",href:r.settings.secrets.overview,isActiveOverride:n=>n.startsWith(r.settings.secrets.overview)},{name:"Connectors",href:r.settings.connectors.overview},{name:"Service Accounts",href:r.settings.service_accounts.overview,isActiveOverride:n=>n.startsWith(r.settings.service_accounts.overview)},{name:"Notifications",href:r.settings.notifications}]}const t=s();return e.jsx(o,{items:t})}function A(){function s(){return[{name:"Profile",href:r.settings.profile}]}const t=s();return e.jsx(o,{items:t})}function I(){const{data:s,isPending:t,isError:n}=h();return t?e.jsx(c,{className:"h-[70px] w-full"}):n?null:e.jsxs("div",{className:"rounded-md border border-theme-border-moderate bg-theme-surface-primary p-3",children:[e.jsxs("div",{className:"mb-2 flex items-center",children:[e.jsx(p,{className:"h-4 w-4 fill-theme-text-brand"}),e.jsx("p",{className:"ml-2 text-text-sm font-semibold",children:"Open source"})]}),e.jsxs("p",{className:"mb-1 text-text-sm text-theme-text-tertiary",children:["ZenML v",s.version]}),e.jsxs("p",{className:"text-text-sm text-theme-text-tertiary",children:["UI Version ","v0.32.1"]})]})}function L(){const{data:s}=g();return e.jsxs("div",{className:"layout-container flex flex-col gap-7 pt-5 lg:flex-row lg:px-10",children:[e.jsxs("div",{className:"flex shrink-0 flex-col gap-4 lg:w-[200px]",children:[e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("p",{className:"text-text-xs font-semibold uppercase text-theme-text-tertiary",children:"Server"}),e.jsx(y,{}),e.jsx(S,{})]}),s?e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("p",{className:"text-text-xs font-semibold uppercase text-theme-text-tertiary",children:"Account"}),e.jsx(m,{username:s.name})]}):e.jsx(c,{className:"h-[70px] w-full"}),e.jsx("div",{className:"flex flex-col gap-4",children:e.jsx(A,{})}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("p",{className:"text-text-xs font-semibold uppercase text-theme-text-tertiary",children:"Version"}),e.jsx(I,{})]})]}),e.jsx("div",{className:"w-full",children:e.jsx(b,{})})]})}export{L as default};
@@ -1 +0,0 @@
1
- import{r as i,j as e}from"./@radix-C7hRs6Kx.js";import{S as o,h as n,r as c,aP as d}from"./index-D2iSHVZq.js";import{S as h}from"./StackList-CgmN5H-i.js";import{p as m,c as j}from"./persist-D87V82eO.js";import{p as l,c as k}from"./persist-UUym702q.js";import{I as p}from"./Infobox-D9k5TFH4.js";import{s as u}from"./index-CrhdX_qG.js";import{a as f}from"./@tanstack-CSxjHCME.js";import{L as x}from"./@react-router-CNP6g_RL.js";import"./@reactflow-CQi1Z1Wq.js";import"./plus-COjQg3AG.js";import"./refresh-CM5T3QeU.js";import"./SearchField-D-h6jXyg.js";import"./dots-horizontal-BGRJCPCs.js";import"./chevron-right-double-uNWbJT-C.js";import"./index-DR30v9MZ.js";import"./DisplayDate-CYVBBSgr.js";import"./InlineAvatar-Cfz4WSLK.js";import"./CodeSnippet-CvI6D0wx.js";import"./CollapsibleCard-D20FtrzC.js";import"./chevron-down-A-rmltmI.js";import"./components-Br2ezRib.js";import"./NumberBox-D2A7ENHb.js";import"./ComponentBadge-DKw7Gndh.js";import"./ComponentIcon-ils7uNAk.js";import"./layout-h3cbx8WZ.js";import"./rocket-Cf-B-XOR.js";import"./trash-BWSZ7NRK.js";import"./DialogItem-BHWf3sIB.js";import"./AlertDialogDropdownItem-BG7-Ki1L.js";import"./sharedSchema-Bse2agAf.js";import"./stack-detail-query-BAcZJrN3.js";function w({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 S({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(w,{setHasResumeableStack:t}),s&&e.jsx(S,{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};