zenml-nightly 0.81.0.dev20250428__py3-none-any.whl → 0.81.0.dev20250430__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 (168) hide show
  1. zenml/VERSION +1 -1
  2. zenml/cli/model.py +2 -7
  3. zenml/client.py +17 -2
  4. zenml/config/build_configuration.py +4 -0
  5. zenml/config/docker_settings.py +1 -1
  6. zenml/config/resource_settings.py +1 -1
  7. zenml/config/strict_base_model.py +1 -1
  8. zenml/entrypoints/base_entrypoint_configuration.py +1 -1
  9. zenml/environment.py +37 -34
  10. zenml/exceptions.py +0 -78
  11. zenml/integrations/aws/__init__.py +1 -1
  12. zenml/integrations/evidently/__init__.py +1 -0
  13. zenml/integrations/evidently/metrics.py +1 -1
  14. zenml/integrations/evidently/tests.py +1 -1
  15. zenml/integrations/gcp/flavors/vertex_orchestrator_flavor.py +6 -0
  16. zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +49 -28
  17. zenml/integrations/kubeflow/orchestrators/kubeflow_orchestrator.py +7 -29
  18. zenml/integrations/kubernetes/flavors/kubernetes_orchestrator_flavor.py +6 -0
  19. zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator.py +12 -5
  20. zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator_entrypoint.py +31 -18
  21. zenml/integrations/kubernetes/orchestrators/manifest_utils.py +21 -0
  22. zenml/integrations/kubernetes/pod_settings.py +6 -1
  23. zenml/integrations/numpy/__init__.py +4 -1
  24. zenml/integrations/numpy/materializers/numpy_materializer.py +75 -6
  25. zenml/integrations/pandas/materializers/pandas_materializer.py +118 -22
  26. zenml/integrations/tekton/orchestrators/tekton_orchestrator.py +8 -28
  27. zenml/models/v2/core/model_version.py +28 -33
  28. zenml/models/v2/core/pipeline_deployment.py +4 -4
  29. zenml/models/v2/core/pipeline_run.py +5 -12
  30. zenml/models/v2/core/user.py +1 -1
  31. zenml/orchestrators/dag_runner.py +50 -14
  32. zenml/secret/base_secret.py +1 -1
  33. zenml/stack/stack_component.py +1 -1
  34. zenml/stack/utils.py +1 -1
  35. zenml/utils/code_utils.py +1 -1
  36. zenml/zen_server/dashboard/assets/{404-o3nB5iwI.js → 404-D4aYbspS.js} +1 -1
  37. zenml/zen_server/dashboard/assets/{@react-router-BGgzhn5D.js → @react-router-CNP6g_RL.js} +1 -1
  38. zenml/zen_server/dashboard/assets/{AlertDialogDropdownItem-C_qWs-4u.js → AlertDialogDropdownItem-CRZjthRL.js} +1 -1
  39. zenml/zen_server/dashboard/assets/{CodeSnippet-nRnOvbOJ.js → CodeSnippet-Di-loaZu.js} +1 -1
  40. zenml/zen_server/dashboard/assets/CollapsibleCard-Dr5zb5T5.js +1 -0
  41. zenml/zen_server/dashboard/assets/{Commands-BwBzFj-5.js → Commands-CD9Y7FOE.js} +1 -1
  42. zenml/zen_server/dashboard/assets/{ComponentBadge-CMx2DbsV.js → ComponentBadge-BgGnzcLu.js} +1 -1
  43. zenml/zen_server/dashboard/assets/{ComponentIcon-CSxdApv8.js → ComponentIcon-B_7Y_oV-.js} +1 -1
  44. zenml/zen_server/dashboard/assets/{CsvVizualization-lxB2iyEh.js → CsvVizualization-CDrjL6bW.js} +1 -1
  45. zenml/zen_server/dashboard/assets/{DeleteAlertDialog-Bp0o-UXZ.js → DeleteAlertDialog-9RTDnEx3.js} +1 -1
  46. zenml/zen_server/dashboard/assets/DialogItem-0fWTH7ki.js +1 -0
  47. zenml/zen_server/dashboard/assets/{Error-DRhVeVHQ.js → Error-vBjUYjb-.js} +1 -1
  48. zenml/zen_server/dashboard/assets/{ExecutionStatus-HnZXi9bW.js → ExecutionStatus-B-ysY113.js} +1 -1
  49. zenml/zen_server/dashboard/assets/{Helpbox-Dsr3ZYcL.js → Helpbox-Dt3q7NGd.js} +1 -1
  50. zenml/zen_server/dashboard/assets/{Infobox-C4Op55B8.js → Infobox-Bai0JtFs.js} +1 -1
  51. zenml/zen_server/dashboard/assets/{InlineAvatar-CrAwe7Pl.js → InlineAvatar-Cpj0lVRQ.js} +1 -1
  52. zenml/zen_server/dashboard/assets/NestedCollapsible-DbhKdWx-.js +1 -0
  53. zenml/zen_server/dashboard/assets/{Partials-DjTM0Oe-.js → Partials-BNBtCjuT.js} +1 -1
  54. zenml/zen_server/dashboard/assets/ProBadge-3vtouJQf.js +1 -0
  55. zenml/zen_server/dashboard/assets/{ProCta-BYSSivgY.js → ProCta-BoTLdAdV.js} +1 -1
  56. zenml/zen_server/dashboard/assets/{ProviderIcon-B8W7AGNk.js → ProviderIcon-kkODO9tx.js} +1 -1
  57. zenml/zen_server/dashboard/assets/{ProviderRadio-BWFJPEY2.js → ProviderRadio-26EB5tY-.js} +1 -1
  58. zenml/zen_server/dashboard/assets/RunSelector-j0C_TPVp.js +1 -0
  59. zenml/zen_server/dashboard/assets/RunsBody-DexNouV4.js +1 -0
  60. zenml/zen_server/dashboard/assets/SearchField-DMCywawn.js +1 -0
  61. zenml/zen_server/dashboard/assets/{SecretTooltip-CCn9HfEh.js → SecretTooltip-LLGP7AIC.js} +1 -1
  62. zenml/zen_server/dashboard/assets/{SetPassword-BDFVwnNB.js → SetPassword-CBHW-Su8.js} +1 -1
  63. zenml/zen_server/dashboard/assets/StackList-S-9I1R4n.js +1 -0
  64. zenml/zen_server/dashboard/assets/Tabs-C2ufJX4t.js +1 -0
  65. zenml/zen_server/dashboard/assets/Tick-ay3Bgtro.js +1 -0
  66. zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-3gg2tC-H.js → UpdatePasswordSchemas-p3RX0P-Q.js} +1 -1
  67. zenml/zen_server/dashboard/assets/{UsageReason-DOMAzO02.js → UsageReason-C8sD2bOU.js} +1 -1
  68. zenml/zen_server/dashboard/assets/{Wizard-BSH_lIfi.js → Wizard-DIllc07n.js} +1 -1
  69. zenml/zen_server/dashboard/assets/{WizardFooter-CnM-50jL.js → WizardFooter-dNDpuero.js} +1 -1
  70. zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-D9XfZpmV.js → all-pipeline-runs-query-BUT1PiTp.js} +1 -1
  71. zenml/zen_server/dashboard/assets/{configuration-form-Ci_QlfZC.js → configuration-form-DBZSb0FV.js} +1 -1
  72. zenml/zen_server/dashboard/assets/{create-stack-CoQ5SEJL.js → create-stack-BXLyjE58.js} +1 -1
  73. zenml/zen_server/dashboard/assets/{delete-run-B5xUZwdP.js → delete-run-DzcYxUnd.js} +1 -1
  74. zenml/zen_server/dashboard/assets/dots-horizontal-BGRJCPCs.js +1 -0
  75. zenml/zen_server/dashboard/assets/{flavor-select-DOLAl-S4.js → flavor-select-BTEwByv6.js} +1 -1
  76. zenml/zen_server/dashboard/assets/{form-schemas-BaEJ1z87.js → form-schemas-BJN_25Ua.js} +1 -1
  77. zenml/zen_server/dashboard/assets/{index-e8udi7QT.js → index-8uhUi12k.js} +1 -1
  78. zenml/zen_server/dashboard/assets/{index-hsSXyS3H.js → index-BygJE88j.js} +8 -8
  79. zenml/zen_server/dashboard/assets/{index-ojAuWXMf.js → index-D9-ukAem.js} +1 -1
  80. zenml/zen_server/dashboard/assets/index-DmTFrHJm.css +1 -0
  81. zenml/zen_server/dashboard/assets/{index-BoWZ9rXk.js → index-wYtmKLnQ.js} +1 -1
  82. zenml/zen_server/dashboard/assets/{login-mutation-CwraNa5G.js → login-mutation-DywLqguW.js} +1 -1
  83. zenml/zen_server/dashboard/assets/{not-found-BuK1QrF2.js → not-found-BOoklIG4.js} +1 -1
  84. zenml/zen_server/dashboard/assets/{page-0AIX3VK8.js → page--hSXKqyG.js} +1 -1
  85. zenml/zen_server/dashboard/assets/{page-CIDo1Ajk.js → page-2BsNK_sZ.js} +1 -1
  86. zenml/zen_server/dashboard/assets/page-4nVakAEl.js +1 -0
  87. zenml/zen_server/dashboard/assets/{page-CjRoKEQs.js → page-8AzB83Py.js} +1 -1
  88. zenml/zen_server/dashboard/assets/{page-BQVPbNps.js → page-B0r9dBEU.js} +1 -1
  89. zenml/zen_server/dashboard/assets/{page-hVng6ANV.js → page-B1Uq1S1Q.js} +1 -1
  90. zenml/zen_server/dashboard/assets/page-B3DscprQ.js +1 -0
  91. zenml/zen_server/dashboard/assets/{page-KRP_w5zH.js → page-B7Aj2XbV.js} +1 -1
  92. zenml/zen_server/dashboard/assets/{page-CZgeF_wQ.js → page-BE8jdyaM.js} +1 -1
  93. zenml/zen_server/dashboard/assets/page-BIYqUwTI.js +1 -0
  94. zenml/zen_server/dashboard/assets/page-BTzhAVEn.js +1 -0
  95. zenml/zen_server/dashboard/assets/{page-_Zt6UwiG.js → page-ByXQN8A-.js} +1 -1
  96. zenml/zen_server/dashboard/assets/page-CI4a9CXs.js +1 -0
  97. zenml/zen_server/dashboard/assets/page-CPLlVRXx.js +6 -0
  98. zenml/zen_server/dashboard/assets/page-CSQOpvvK.js +3 -0
  99. zenml/zen_server/dashboard/assets/{page-DwIlrsF0.js → page-Ccnk_5ji.js} +1 -1
  100. zenml/zen_server/dashboard/assets/{page-C-6XUKSp.js → page-Ci_n_x3a.js} +1 -1
  101. zenml/zen_server/dashboard/assets/page-D-ry_oLs.js +1 -0
  102. zenml/zen_server/dashboard/assets/{page-DbEn9V9E.js → page-D2TtSfnb.js} +1 -1
  103. zenml/zen_server/dashboard/assets/page-DHnkTzqs.js +1 -0
  104. zenml/zen_server/dashboard/assets/{page-B5clbTo4.js → page-DP2Ed-2m.js} +1 -1
  105. zenml/zen_server/dashboard/assets/{page-C30HZCTR.js → page-D_5R6E7b.js} +1 -1
  106. zenml/zen_server/dashboard/assets/page-DfTsntQI.js +1 -0
  107. zenml/zen_server/dashboard/assets/page-DkY7AIhj.js +1 -0
  108. zenml/zen_server/dashboard/assets/page-DmteSSj6.js +1 -0
  109. zenml/zen_server/dashboard/assets/page-Dt3wHeWX.js +1 -0
  110. zenml/zen_server/dashboard/assets/page-EXvws1ss.js +1 -0
  111. zenml/zen_server/dashboard/assets/{page-Czj8fu8q.js → page-K9yjbnd4.js} +1 -1
  112. zenml/zen_server/dashboard/assets/{page-DHDeVaMO.js → page-RV8wpZ_4.js} +1 -1
  113. zenml/zen_server/dashboard/assets/{page-DLVtrRa5.js → page-bUVHi7DE.js} +1 -1
  114. zenml/zen_server/dashboard/assets/page-cOEvFs_l.js +1 -0
  115. zenml/zen_server/dashboard/assets/page-kzSGEVUs.js +1 -0
  116. zenml/zen_server/dashboard/assets/{page-C7buw8xJ.js → page-uDGvpa5g.js} +2 -2
  117. zenml/zen_server/dashboard/assets/{page-BbygQpf-.js → page-uN0n_DE2.js} +1 -1
  118. zenml/zen_server/dashboard/assets/{page-CgJcperk.js → page-xa1EAPcI.js} +1 -1
  119. zenml/zen_server/dashboard/assets/{persist-xOAq24Bm.js → persist-CEeDYHW5.js} +1 -1
  120. zenml/zen_server/dashboard/assets/{persist-DLvsEXh0.js → persist-SSTTV5q0.js} +1 -1
  121. zenml/zen_server/dashboard/assets/{service-MHyqhRgp.js → service-BRoAA1Kq.js} +1 -1
  122. zenml/zen_server/dashboard/assets/sharedSchema-BACERDat.js +14 -0
  123. zenml/zen_server/dashboard/assets/{stack-detail-query-C1GoxBeK.js → stack-detail-query-ihiJr6nq.js} +1 -1
  124. zenml/zen_server/dashboard/assets/{update-server-settings-mutation-DduehrZn.js → update-server-settings-mutation-CK6COmw9.js} +1 -1
  125. zenml/zen_server/dashboard/index.html +4 -4
  126. zenml/zen_server/deploy/daemon/daemon_zen_server.py +1 -1
  127. zenml/zen_server/deploy/docker/docker_zen_server.py +1 -1
  128. zenml/zen_server/exceptions.py +0 -2
  129. zenml/zen_server/routers/model_versions_endpoints.py +10 -19
  130. zenml/zen_server/routers/runs_endpoints.py +7 -1
  131. zenml/zen_stores/schemas/pipeline_deployment_schemas.py +20 -3
  132. zenml/zen_stores/schemas/pipeline_run_schemas.py +21 -1
  133. zenml/zen_stores/secrets_stores/hashicorp_secrets_store.py +1 -1
  134. zenml/zen_stores/secrets_stores/sql_secrets_store.py +1 -1
  135. zenml/zen_stores/sql_zen_store.py +10 -34
  136. {zenml_nightly-0.81.0.dev20250428.dist-info → zenml_nightly-0.81.0.dev20250430.dist-info}/METADATA +2 -2
  137. {zenml_nightly-0.81.0.dev20250428.dist-info → zenml_nightly-0.81.0.dev20250430.dist-info}/RECORD +140 -139
  138. zenml/zen_server/dashboard/assets/CollapsibleCard-9sSz7n1R.js +0 -1
  139. zenml/zen_server/dashboard/assets/DialogItem-DHw2ihTx.js +0 -1
  140. zenml/zen_server/dashboard/assets/NestedCollapsible-Ce1bmT8N.js +0 -1
  141. zenml/zen_server/dashboard/assets/ProBadge-CDEqgzh8.js +0 -1
  142. zenml/zen_server/dashboard/assets/RunSelector-DoL_gMHJ.js +0 -1
  143. zenml/zen_server/dashboard/assets/RunsBody-B6mBjv-_.js +0 -1
  144. zenml/zen_server/dashboard/assets/SearchField-DHl5flXv.js +0 -1
  145. zenml/zen_server/dashboard/assets/StackList-dhdUtky3.js +0 -1
  146. zenml/zen_server/dashboard/assets/Tabs-BuZG8ft1.js +0 -1
  147. zenml/zen_server/dashboard/assets/Tick-C4gtED35.js +0 -1
  148. zenml/zen_server/dashboard/assets/index-6mLFgFwe.css +0 -1
  149. zenml/zen_server/dashboard/assets/page-3lW9eIer.js +0 -1
  150. zenml/zen_server/dashboard/assets/page-9PzQok8O.js +0 -1
  151. zenml/zen_server/dashboard/assets/page-BEibNYiA.js +0 -6
  152. zenml/zen_server/dashboard/assets/page-BOE2XBFy.js +0 -1
  153. zenml/zen_server/dashboard/assets/page-Bki79xdd.js +0 -1
  154. zenml/zen_server/dashboard/assets/page-BnKwJnOb.js +0 -1
  155. zenml/zen_server/dashboard/assets/page-CBGeo-7W.js +0 -2
  156. zenml/zen_server/dashboard/assets/page-Co-FJ5ds.js +0 -1
  157. zenml/zen_server/dashboard/assets/page-Cu8vuohQ.js +0 -1
  158. zenml/zen_server/dashboard/assets/page-D0QcEBi1.js +0 -1
  159. zenml/zen_server/dashboard/assets/page-DKY_U5Sz.js +0 -1
  160. zenml/zen_server/dashboard/assets/page-DQHU5o_C.js +0 -1
  161. zenml/zen_server/dashboard/assets/page-DpY1koQY.js +0 -1
  162. zenml/zen_server/dashboard/assets/page-DrS4WOup.js +0 -1
  163. zenml/zen_server/dashboard/assets/page-HIAPXq4w.js +0 -1
  164. zenml/zen_server/dashboard/assets/page-Jw2QAdxa.js +0 -1
  165. zenml/zen_server/dashboard/assets/sharedSchema-CQA5lnlU.js +0 -14
  166. {zenml_nightly-0.81.0.dev20250428.dist-info → zenml_nightly-0.81.0.dev20250430.dist-info}/LICENSE +0 -0
  167. {zenml_nightly-0.81.0.dev20250428.dist-info → zenml_nightly-0.81.0.dev20250430.dist-info}/WHEEL +0 -0
  168. {zenml_nightly-0.81.0.dev20250428.dist-info → zenml_nightly-0.81.0.dev20250430.dist-info}/entry_points.txt +0 -0
@@ -1 +1 @@
1
- import{r as a,j as e}from"./@radix-C7hRs6Kx.js";import{n as g,W as C,aR as y,h as i,ae as c,r as h}from"./index-hsSXyS3H.js";import{H as p,B as u,F as b,W as v}from"./Wizard-BSH_lIfi.js";import{S as f}from"./arrow-left-CwgF2MEM.js";import{C as N}from"./configuration-form-Ci_QlfZC.js";import{a as S,L as k}from"./@react-router-BGgzhn5D.js";import{S as F}from"./flavor-select-DOLAl-S4.js";import{C as w}from"./ComponentIcon-CSxdApv8.js";import{s as B}from"./constants-DP3ZEnXH.js";import"./@tanstack-CSxjHCME.js";import"./@reactflow-CQi1Z1Wq.js";import"./index-ojAuWXMf.js";import"./plus-COjQg3AG.js";import"./trash-BWSZ7NRK.js";import"./index.esm-D7jFlf5N.js";import"./type-guards-CaeD8wHO.js";import"./index-BoWZ9rXk.js";import"./zod-C0xYeTvL.js";import"./check-DK77doTf.js";import"./CodeSnippet-nRnOvbOJ.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 R({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(L,{type:t,selectTypeHandler:s},t))})})]})}function L({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 W(){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(R,{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(W,{})})]})}export{oe as default};
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-BygJE88j.js";import{H as p,B as u,F as b,W as v}from"./Wizard-DIllc07n.js";import{S as f}from"./arrow-left-CwgF2MEM.js";import{C as N}from"./configuration-form-DBZSb0FV.js";import{c as S,L as k}from"./@react-router-CNP6g_RL.js";import{S as F}from"./flavor-select-BTEwByv6.js";import{C as w}from"./ComponentIcon-B_7Y_oV-.js";import{s as B}from"./constants-DP3ZEnXH.js";import"./@tanstack-CSxjHCME.js";import"./@reactflow-CQi1Z1Wq.js";import"./index-D9-ukAem.js";import"./plus-COjQg3AG.js";import"./trash-BWSZ7NRK.js";import"./index.esm-D7jFlf5N.js";import"./type-guards-CaeD8wHO.js";import"./index-wYtmKLnQ.js";import"./zod-C0xYeTvL.js";import"./check-DK77doTf.js";import"./CodeSnippet-Di-loaZu.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};
@@ -0,0 +1 @@
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-BygJE88j.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-BRoAA1Kq.js";import{P as Ke,S as we}from"./SearchField-DMCywawn.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-9RTDnEx3.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-CRZjthRL.js";import{I as Fe}from"./Infobox-Bai0JtFs.js";import{a as R}from"./@react-router-CNP6g_RL.js";import"./@reactflow-CQi1Z1Wq.js";import"./CodeSnippet-Di-loaZu.js";import"./Tick-ay3Bgtro.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};
@@ -0,0 +1 @@
1
+ import{j as o}from"./@radix-C7hRs6Kx.js";import{S as r}from"./Tabs-C2ufJX4t.js";import{R as m}from"./RunsBody-DexNouV4.js";import{R as i}from"./RunSelector-j0C_TPVp.js";import{S as p}from"./StackList-S-9I1R4n.js";import{a as s}from"./@react-router-CNP6g_RL.js";import"./index-BygJE88j.js";import"./@tanstack-CSxjHCME.js";import"./@reactflow-CQi1Z1Wq.js";import"./chevron-down-A-rmltmI.js";import"./ComponentIcon-B_7Y_oV-.js";import"./layout-h3cbx8WZ.js";import"./rocket-Cf-B-XOR.js";import"./DisplayDate-CYVBBSgr.js";import"./InlineAvatar-Cpj0lVRQ.js";import"./NestedCollapsible-DbhKdWx-.js";import"./type-guards-CaeD8wHO.js";import"./CodeSnippet-Di-loaZu.js";import"./CollapsibleCard-Dr5zb5T5.js";import"./chevron-right-double-uNWbJT-C.js";import"./check-circle-mvyzYvIW.js";import"./refresh-CM5T3QeU.js";import"./SearchField-DMCywawn.js";import"./dots-horizontal-BGRJCPCs.js";import"./index-DR30v9MZ.js";import"./all-pipeline-runs-query-BUT1PiTp.js";import"./ExecutionStatus-B-ysY113.js";import"./trash-BWSZ7NRK.js";import"./DeleteAlertDialog-9RTDnEx3.js";import"./zod-C0xYeTvL.js";import"./index.esm-D7jFlf5N.js";import"./AlertDialogDropdownItem-CRZjthRL.js";import"./delete-run-DzcYxUnd.js";import"./plus-COjQg3AG.js";import"./index-8uhUi12k.js";import"./stack-detail-query-ihiJr6nq.js";import"./components-Br2ezRib.js";import"./NumberBox-D2A7ENHb.js";import"./ComponentBadge-BgGnzcLu.js";import"./Infobox-Bai0JtFs.js";import"./DialogItem-0fWTH7ki.js";function V(){const{componentId:t}=s();return o.jsx("div",{className:"@container",children:o.jsx(r,{isPanel:!1,stacksTabContent:o.jsx(p,{fixedQueryParams:{component_id:t}}),runsTabContent:o.jsx(i,{children:o.jsx(m,{fixedQueryParams:{stack_component:t}})}),componentId:t})})}export{V as default};
@@ -1 +1 @@
1
- import{j as e}from"./@radix-C7hRs6Kx.js";import{B as o,aH as n}from"./index-hsSXyS3H.js";import{I as r}from"./Infobox-C4Op55B8.js";import{H as a}from"./Helpbox-Dsr3ZYcL.js";import{V as s,g as c}from"./Commands-BwBzFj-5.js";import"./@tanstack-CSxjHCME.js";import"./@react-router-BGgzhn5D.js";import"./@reactflow-CQi1Z1Wq.js";import"./help-DyMolRxD.js";import"./CodeSnippet-nRnOvbOJ.js";const l=[{command:"zenml code-repository register <NAME> --type=<CODE_REPOSITORY_TYPE] [--CODE_REPOSITORY_OPTIONS]",description:"Register a code repository"},{command:"zenml code-repository register <NAME> --type=custom --source=<CODE_REPOSITORY_SOURCE> [--CODE_REPOSITORY_OPTIONS]",description:"Use a custom repository "},{command:"zenml code-repository list",description:"List your registered code repositories"},{command:"zenml code-repository delete <REPOSITORY_NAME_OR_ID>",description:"Delete a code repository that you have previously registered"}],d="/assets/repos-video-D8kpu60k.svg";function m(){return e.jsx(r,{children:e.jsxs("div",{className:"flex w-full flex-wrap items-center gap-x-2 gap-y-0.5 text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"We are creating a new Repositories experience"}),e.jsx("p",{children:"In the meanwhile you can use the CLI to add and manage your repos."})]})})}function p(){const t="https://zenml.portal.trainn.co/share/koVfVubiXfXLXtVcDAqPyg/embed?autoplay=false";return e.jsxs(o,{className:"flex flex-col-reverse items-stretch overflow-hidden md:flex-row",children:[e.jsxs("div",{className:"w-full p-7 md:w-2/3",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Learn More about Repositories"}),e.jsx("p",{className:"mt-2 text-text-lg text-theme-text-secondary",children:"Get started with ZenML Repositories for streamlined pipeline versioning and faster Docker builds."}),e.jsx(s,{videoLink:t,buttonText:"Watch the Starter Guide (2 min)"})]}),e.jsx("div",{className:"flex w-full items-center justify-center bg-primary-50 lg:w-1/3",children:e.jsx(s,{fallbackImage:e.jsx("img",{src:d,alt:"Purple squares with text indicating a starter guide for secrets",className:"h-full w-full"}),videoLink:t,isButton:!1})})]})}function x(){return e.jsxs("section",{className:"space-y-5 pl-8 pr-5",children:[e.jsx(r,{className:"text-text-md",intent:"neutral",children:"Code repositories enable ZenML to keep track of the code version that you use for your pipeline runs. Additionally, running a pipeline which is tracked in a registered code repository can decrease the time it takes Docker to build images for containerized stack components."}),l.map((t,i)=>e.jsx(e.Fragment,{children:c(t)},i)),e.jsx(a,{text:"Check all the commands and find more about Repositories in our Docs",link:"https://docs.zenml.io/how-to/setting-up-a-project-repository/connect-your-git-repository"})]})}function E(){return e.jsxs(o,{className:"space-y-4 p-5",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Repositories"}),e.jsx(m,{}),e.jsx(p,{}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(n,{}),"Administering your Code Repositories"]}),e.jsx(x,{})]})}export{E as default};
1
+ import{j as e}from"./@radix-C7hRs6Kx.js";import{B as o,aE as n}from"./index-BygJE88j.js";import{I as r}from"./Infobox-Bai0JtFs.js";import{H as a}from"./Helpbox-Dt3q7NGd.js";import{V as s,g as c}from"./Commands-CD9Y7FOE.js";import"./@tanstack-CSxjHCME.js";import"./@react-router-CNP6g_RL.js";import"./@reactflow-CQi1Z1Wq.js";import"./help-DyMolRxD.js";import"./CodeSnippet-Di-loaZu.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};
@@ -0,0 +1 @@
1
+ import{r as l,j as e}from"./@radix-C7hRs6Kx.js";import{o as S,p as T,q as M,j as _,s as k,F as N,f as B,t as O,v as F,h,D as z,w as I,x as Z,C as U,y as $,r as f,T as q,E as H,G as V,H as Q,J as y,K as G,L as D,z as c,M as K,S as w,B as J,N as W,O as X,P as Y,Q as ee,R as se,U as g,n as te,V as ae}from"./index-BygJE88j.js";import{L as j,d as b,c as ne}from"./@react-router-CNP6g_RL.js";import{S as re}from"./refresh-CM5T3QeU.js";import{S as ie,P as le}from"./SearchField-DMCywawn.js";import{q as oe,b as ce,c as de,a as pe}from"./@tanstack-CSxjHCME.js";import{S as R}from"./trash-BWSZ7NRK.js";import{D as E,a as L}from"./DeleteAlertDialog-9RTDnEx3.js";import{g as ue,E as me,a as he}from"./ExecutionStatus-B-ysY113.js";import{S as xe}from"./dots-horizontal-BGRJCPCs.js";import{A as fe}from"./AlertDialogDropdownItem-CRZjthRL.js";import{R as ge}from"./RunsBody-DexNouV4.js";import{R as je}from"./RunSelector-j0C_TPVp.js";import{I as Ce}from"./Infobox-Bai0JtFs.js";import"./@reactflow-CQi1Z1Wq.js";import"./chevron-right-double-uNWbJT-C.js";import"./index-DR30v9MZ.js";import"./zod-C0xYeTvL.js";import"./index.esm-D7jFlf5N.js";import"./check-circle-mvyzYvIW.js";import"./all-pipeline-runs-query-BUT1PiTp.js";import"./DisplayDate-CYVBBSgr.js";import"./InlineAvatar-Cpj0lVRQ.js";import"./delete-run-DzcYxUnd.js";const be=s=>l.createElement("svg",{viewBox:"0 0 60 60",fill:"black",xmlns:"http://www.w3.org/2000/svg",...s},l.createElement("g",{id:"dataflow-02"},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5 7.5C11.1193 7.5 10 8.61929 10 10C10 11.3807 11.1193 12.5 12.5 12.5C13.8807 12.5 15 11.3807 15 10C15 8.61929 13.8807 7.5 12.5 7.5ZM5 10C5 5.85786 8.35787 2.5 12.5 2.5C15.7655 2.5 18.5436 4.58702 19.5732 7.5L40.4268 7.5C41.4564 4.58702 44.2345 2.5 47.5 2.5C51.6421 2.5 55 5.85786 55 10C55 14.1421 51.6421 17.5 47.5 17.5C44.2345 17.5 41.4564 15.413 40.4268 12.5L32.5 12.5V27.5H40.4268C41.4564 24.587 44.2345 22.5 47.5 22.5C51.6421 22.5 55 25.8579 55 30C55 34.1421 51.6421 37.5 47.5 37.5C44.2345 37.5 41.4564 35.413 40.4268 32.5H32.5V38C32.5 40.1415 32.502 41.5972 32.5939 42.7224C32.6834 43.8185 32.8457 44.379 33.045 44.77C33.5243 45.7108 34.2892 46.4757 35.2301 46.955C35.6211 47.1543 36.1816 47.3166 37.2776 47.4061C38.103 47.4736 39.1062 47.4926 40.4275 47.4979C41.4577 44.586 44.2352 42.5 47.5 42.5C51.6421 42.5 55 45.8579 55 50C55 54.1421 51.6421 57.5 47.5 57.5C44.2338 57.5 41.4552 55.4121 40.4261 52.4982C39.0579 52.4929 37.8787 52.4719 36.8704 52.3895C35.4652 52.2747 34.1734 52.0283 32.9601 51.4101C31.0785 50.4513 29.5487 48.9215 28.5899 47.0399C27.9717 45.8266 27.7253 44.5348 27.6105 43.1296C27.4999 41.7766 27.5 40.1157 27.5 38.1032V12.5L19.5732 12.5C18.5436 15.413 15.7655 17.5 12.5 17.5C8.35787 17.5 5 14.1421 5 10ZM47.5 7.5C46.1193 7.5 45 8.61929 45 10C45 11.3807 46.1193 12.5 47.5 12.5C48.8807 12.5 50 11.3807 50 10C50 8.61929 48.8807 7.5 47.5 7.5ZM47.5 27.5C46.1193 27.5 45 28.6193 45 30C45 31.3807 46.1193 32.5 47.5 32.5C48.8807 32.5 50 31.3807 50 30C50 28.6193 48.8807 27.5 47.5 27.5ZM47.5 47.5C46.1193 47.5 45 48.6193 45 50C45 51.3807 46.1193 52.5 47.5 52.5C48.8807 52.5 50 51.3807 50 50C50 48.6193 48.8807 47.5 47.5 47.5Z"})));async function ve({params:s}){const a=S(T.pipelines.all+"?"+M(s)),t=await _(a,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.status===404&&k(),!t.ok)throw new N({message:"Error while fetching pipelines",status:t.status,statusText:t.statusText});return t.json()}const v={all:["pipelines"],pipelineList:s=>oe({queryKey:[...v.all,s],queryFn:async()=>ve({params:s})})};async function Pe({pipelineId:s}){const a=S(T.pipelines.detail(s)),t=await fetch(a,{method:"DELETE",credentials:"include",headers:{"Content-Type":"application/json"}});if(!t.ok){const r=await t.json().then(n=>n.detail).catch(()=>`Failed to delete pipeline ${s}`);throw new N({status:t.status,statusText:t.statusText,message:r})}return t.json()}function ye(s){return ce({mutationFn:Pe,...s})}const A=l.createContext(null);function we({children:s}){const[a,t]=l.useState([]),r=de(),{toast:n}=B(),i=ye(),o=async d=>{try{const p=d.map(x=>i.mutateAsync({pipelineId:x}));await Promise.all(p),n({description:"Deleted successfully.",status:"success",emphasis:"subtle",rounded:!0}),await r.invalidateQueries({queryKey:v.all}),t([])}catch(p){console.error("Failed to delete some pipelines:",p)}};return e.jsx(A.Provider,{value:{selectedPipelines:a,setSelectedPipelines:t,bulkDeletePipelines:o},children:s})}function m(){const s=l.useContext(A);if(!s)throw new Error("usePipelinesSelectorContext must be used within a PipelinesSelectorProvider");return s}function Se(){const[s,a]=l.useState(!1),{bulkDeletePipelines:t,selectedPipelines:r}=m();async function n(){await t(r),a(!1)}return e.jsxs(O,{open:s,onOpenChange:a,children:[e.jsx(F,{asChild:!0,children:e.jsxs(h,{className:"rounded-sharp border-y-0 bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(R,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(E,{title:`Delete Pipeline${r.length>=2?"s":""}`,handleDelete:n,children:e.jsxs(L,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function Te(){const{selectedPipelines:s}=m();return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:`${s==null?void 0:s.length} Pipeline${(s==null?void 0:s.length)>1?"s":""} selected`}),e.jsx(Se,{})]})}function Ne({id:s}){const[a,t]=l.useState(!1),[r,n]=l.useState(!1),i=l.useRef(null),o=l.useRef(null),{bulkDeletePipelines:d}=m();async function p(){await d([s]),P(!1)}function x(){o.current=i.current}function P(u){if(u===!1){n(!1),setTimeout(()=>{t(u)},200);return}t(u)}return e.jsxs(z,{onOpenChange:n,open:r,children:[e.jsx(I,{ref:i,children:e.jsx(xe,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(Z,{hidden:a,onCloseAutoFocus:u=>{o.current&&(o.current.focus(),o.current=null,u.preventDefault())},align:"end",sideOffset:7,children:e.jsx(fe,{onSelect:x,open:a,onOpenChange:P,triggerChildren:"Delete",icon:e.jsx(R,{fill:"red"}),children:e.jsx(E,{title:"Delete Pipeline",handleDelete:p,children:e.jsxs(L,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})})]})}const De=({id:s})=>{const{selectedPipelines:a,setSelectedPipelines:t}=m(),r=(n,i)=>{t(o=>n?[...o,i]:o.filter(d=>d!==i))};return e.jsx(U,{id:s,onCheckedChange:n=>r(n,s),checked:a.includes(s),className:"h-3 w-3"})};function Re(){return[{id:"check",header:"",meta:{width:"1%"},cell:({row:s})=>e.jsx(De,{id:s.original.id})},{id:"name",header:"Pipeline",cell:({row:s})=>{var a,t,r;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx($,{className:`h-5 w-5 ${ue((a=s.original.body)==null?void 0:a.latest_run_status)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(j,{to:f.pipelines.namespace(encodeURIComponent(s.original.name)),className:"flex items-center gap-1",children:e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:s.original.name})}),e.jsx(q,{children:e.jsxs(H,{children:[e.jsx(V,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(me,{status:(t=s.original.body)==null?void 0:t.latest_run_status})}),e.jsx(Q,{className:"z-20 capitalize",children:(r=s.original.body)==null?void 0:r.latest_run_status})]})}),e.jsx(y,{copyText:s.original.name})]}),e.jsxs(j,{to:f.pipelines.namespace(encodeURIComponent(s.original.name)),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:s.original.id.split("-")[0]}),e.jsx(y,{copyText:s.original.id})]})]})]})}},{id:"latest-run",header:"Latest Run",accessorFn:s=>{var a,t;return{status:(a=s.body)==null?void 0:a.latest_run_status,runId:(t=s.body)==null?void 0:t.latest_run_id}},cell:({getValue:s})=>{const{runId:a,status:t}=s();return!a||!t?e.jsx("div",{children:"No run"}):e.jsx(j,{to:f.runs.detail(a),children:e.jsxs(G,{emphasis:"subtle",rounded:!1,className:"inline-flex items-center gap-0.5",color:he(t),children:[e.jsx(D,{className:"h-3 w-3 fill-current"}),a==null?void 0:a.split("-")[0]]})})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:s})=>e.jsx(Ne,{id:s.original.id})}]}const C=1,Ee=c.object({page:c.coerce.number().min(C).optional().default(C).catch(C),name:c.string().optional(),operator:c.enum(["and","or"]).optional()});function Le(){const[s]=b(),{page:a,name:t,operator:r}=Ee.parse({page:s.get("page")||void 0,name:s.get("name")||void 0,operator:s.get("operator")||void 0});return{page:a,name:t,logical_operator:r}}function Ae(){const s=Le(),{selectedPipelines:a}=m(),{data:t,refetch:r}=pe({...v.pipelineList({...s,sort_by:"desc:latest_run"}),throwOnError:!0});return e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[a.length?e.jsx(Te,{}):e.jsx(ie,{searchParams:s}),e.jsx("div",{className:"flex justify-between",children:e.jsxs(h,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>r(),children:[e.jsx(re,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:t?e.jsx(K,{columns:Re(),data:t.items}):e.jsx(w,{className:"h-[500px] w-full"})}),t?t.total_pages>1&&e.jsx(le,{searchParams:s,paginate:t}):e.jsx(w,{className:"h-[36px] w-[300px]"})]})]})}const Me=c.object({tab:c.enum(["pipelines","runs","templates"]).optional().default("pipelines").catch("pipelines")});function _e(){const[s]=b(),{tab:a}=Me.parse({tab:s.get("tab")||void 0});return a}const ke="/assets/templates-1S_8WeSK.webp";function Be(){return e.jsxs("div",{className:"layout-container space-y-5",children:[e.jsx(Oe,{}),e.jsx(ze,{})]})}function Oe(){return e.jsx(Ce,{children:e.jsxs("div",{className:"flex w-full flex-wrap items-center gap-x-2 gap-y-0.5 text-text-md",children:[e.jsx("p",{className:"font-semibold",children:"This is a ZenML Pro feature. "}),e.jsx("p",{children:"Upgrade to ZenML Pro to access the Templates and save settings and run pipelines from the dashboard."})]})})}const Fe=["Run pipelines from the dashboard with Templates","Re-run a pipeline easily from the UI","Model and Artifact Control Plane Dashboard","Managed ZenML server on your VPC or hosted on our servers","Social SSO, RBAC, and User Management","CI/CD/CT, and more!"];function ze(){return e.jsxs(J,{className:"relative overflow-hidden px-7 py-5",children:[e.jsxs("div",{className:"max-w-[450px] space-y-4",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"Access Advanced Template Features with ZenML Pro"}),e.jsx("ul",{className:"space-y-2",children:Fe.map((s,a)=>e.jsx("li",{className:"text-text-md text-theme-text-secondary",children:s},a))}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(h,{size:"md",asChild:!0,children:e.jsx("a",{href:"https://cloud.zenml.io/signup",target:"_blank",rel:"noopener noreferrer",children:"Upgrade to ZenML Pro"})}),e.jsx(h,{emphasis:"minimal",size:"md",children:e.jsx("a",{href:"https://www.zenml.io/pro",target:"_blank",rel:"noopener noreferrer",children:"Learn more"})})]})]}),e.jsx("img",{className:"absolute right-0 top-0 hidden translate-x-[30%] scale-75 md:translate-y-[30%] lg:block xl:-translate-y-[5%]",src:ke,alt:"Screenshot of Zenml Pro Templates Feature"})]})}const Ie=[{value:"pipelines",label:"Pipelines",icon:be},{value:"runs",label:"Runs",icon:D},{value:"templates",label:"Templates",icon:Y}];function Ze(){const[s]=b(),a=_e(),t=ne();l.useEffect(()=>{if(!s.get("tab")){const i=new URLSearchParams(s);i.set("tab","pipelines"),t(`?${i.toString()}`,{replace:!0})}},[t,s]);function r(n){const i=new URLSearchParams;i.set("tab",n),t(`?${i.toString()}`)}return e.jsx("div",{className:"p-5",children:e.jsxs(W,{onValueChange:r,value:a,children:[e.jsx(X,{children:Ie.map(n=>e.jsxs(ee,{className:"flex items-center gap-2 text-text-md",value:n.value.toLowerCase(),children:[e.jsx(n.icon,{className:`h-5 w-5 ${a===n.value?"fill-primary-400":"fill-theme-text-tertiary"}`}),n.label,n.value==="templates"&&e.jsx(se,{className:"rounded-sm font-semibold text-primary-500",color:"purple",size:"sm",children:"New"})]},n.value))}),e.jsx(g,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"pipelines",children:e.jsx(we,{children:e.jsx(Ae,{})})}),e.jsx(g,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"runs",children:e.jsx(je,{children:e.jsx(ge,{})})}),e.jsx(g,{className:"m-0 mt-5 border-0 bg-transparent p-0",value:"templates",children:e.jsx(Be,{})})]})})}function us(){const{setCurrentBreadcrumbData:s}=te();return l.useEffect(()=>{s({segment:"pipelines",data:null})},[]),e.jsxs("div",{children:[e.jsx(ae,{children:e.jsx("h1",{className:"text-display-xs font-semibold",children:"Pipelines"})}),e.jsx(Ze,{})]})}export{us as default};
@@ -0,0 +1,6 @@
1
+ import{r as i,j as e}from"./@radix-C7hRs6Kx.js";import{b as p,u as D,a as v,S,E as C}from"./SecretTooltip-LLGP7AIC.js";import{a as f,c as N}from"./@tanstack-CSxjHCME.js";import{as as b,aI as w,at as E,I as j,aJ as k,av as T,h,ar as K,aK as A,D as V,w as O,x as B,S as I,ai as L,aj as z,M as F,n as Q,B as R,J as q}from"./index-BygJE88j.js";import{S as M}from"./key-icon-DO4DPJHZ.js";import{S as P}from"./dots-horizontal-BGRJCPCs.js";import{S as H}from"./trash-BWSZ7NRK.js";import{A as _}from"./AlertDialogDropdownItem-CRZjthRL.js";import{a as J}from"./@react-router-CNP6g_RL.js";import"./plus-COjQg3AG.js";import"./zod-C0xYeTvL.js";import"./index.esm-D7jFlf5N.js";import"./CodeSnippet-Di-loaZu.js";import"./@reactflow-CQi1Z1Wq.js";function $({secretId:s,keyName:r}){const{data:t,isLoading:a,isError:u}=f({...p.secretDetail(s)}),l=N(),{mutate:c}=D({onError(d){K(d)&&A({status:"error",emphasis:"subtle",description:d.message,rounded:!0})},onSuccess(){l.invalidateQueries({queryKey:["secrets"]}),l.invalidateQueries({queryKey:["secretDetail",s]})}}),[n,m]=i.useState(""),x=()=>{var d;if(t){const g={...(d=t.body)==null?void 0:d.values};delete g[r];const y={name:t.name,scope:"workspace",values:g};c({id:s,body:y})}};function o(d){m(d.target.value)}return a?e.jsx("div",{children:"Loading..."}):u?e.jsx("div",{children:"Error loading secret details"}):e.jsxs(b,{children:[e.jsx(w,{children:e.jsx(E,{children:"Delete Key"})}),e.jsxs("div",{className:"gap-5 p-5",children:[e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Are you sure you want to delete this key?"}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"This action cannot be undone."}),e.jsx("h3",{className:"font-inter text-sm mb-1 mt-4 text-left font-medium leading-5",children:"Please type DELETE to confirm"}),e.jsx(j,{name:"key",onChange:o,className:"w-full",required:!0,value:n})]}),e.jsxs(k,{className:"gap-[10px]",children:[e.jsx(T,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{intent:"danger",type:"button",onClick:x,disabled:n!=="DELETE",children:"Delete"})]})]})}function U({secretId:s,keyName:r}){const[t,a]=i.useState(!1),[u,l]=i.useState(!1),c=i.useRef(null),n=i.useRef(null);function m(){n.current=c.current}function x(o){if(o===!1){a(!1),setTimeout(()=>{l(o)},200);return}l(o)}return e.jsxs(V,{onOpenChange:a,open:t,children:[e.jsx(O,{ref:c,children:e.jsx(P,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(B,{hidden:u,onCloseAutoFocus:o=>{n.current&&(n.current.focus(),n.current=null,o.preventDefault())},align:"end",sideOffset:7,children:e.jsx(_,{onSelect:m,onOpenChange:x,triggerChildren:"Delete ",icon:e.jsx(H,{}),children:e.jsx($,{secretId:s,keyName:r})})})]})}const G=({value:s})=>{const[r,t]=i.useState(!1),a=typeof s=="string"?s:"",u="•".repeat(a.length);return e.jsxs("div",{className:"flex items-center gap-2 space-x-2",children:[e.jsx(S,{onClick:()=>t(!r),className:"h-4 w-4 flex-shrink-0"}),e.jsx("span",{children:r?a:u})]})};function W(s,r){return[{id:"key",header:"Key",accessorKey:"key",cell:({row:t})=>{const a=`from zenml.client import Client
2
+ secret = Client().get_secret("${r}")
3
+
4
+ # 'secret.secret_values' will contain a dictionary with all key-value pairs within your secret.
5
+ secret.secret_values["${t.original.key}"]
6
+ `;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(M,{className:"h-5 w-5 flex-shrink-0 fill-primary-400"}),e.jsx("div",{className:"flex flex-col",children:e.jsx("div",{className:"flex items-center space-x-1",children:e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:t.original.key}),e.jsx(v,{code:a})]})})})]})}},{id:"value",header:"Value",accessorKey:"value",cell:({row:t})=>e.jsx(G,{value:t.getValue("value")})},{id:"actions",header:"",cell:({row:t})=>e.jsx(U,{secretId:s,keyName:t.original.key})}]}function X({secretId:s}){var c;const[r,t]=i.useState(""),a=f({...p.secretDetail(s)});if(a.isPending)return e.jsx(I,{className:"h-[200px] w-full"});if(a.isError)return e.jsx("div",{children:a.error.message});const l=Object.entries(((c=a.data.body)==null?void 0:c.values)||{}).map(([n,m])=>({key:n,value:m})).filter(n=>n.key.toLowerCase().includes(r.toLowerCase()));return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-2",children:[e.jsx(j,{type:"text",placeholder:"Search Keys...",value:r,onChange:n=>t(n.target.value),inputSize:"md"}),e.jsxs(L,{children:[e.jsx(z,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"primary",children:"Edit Keys"})}),e.jsx(C,{secretId:s,isSecretNameEditable:!1,dialogTitle:"Edit keys"})]})]}),e.jsx("div",{className:"w-full",children:e.jsx(F,{columns:W(s,a.data.name),data:l})})]})}function me(){const{secretId:s}=J(),{setCurrentBreadcrumbData:r}=Q(),{data:t}=f({...p.secretDetail(s||"")});return i.useEffect(()=>{t&&r({segment:"secretsDetail",data:{name:t.name,id:t.id}})},[t]),e.jsx(e.Fragment,{children:e.jsxs(R,{className:"space-y-5 p-5",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:t==null?void 0:t.name}),e.jsxs("div",{className:"group/copybutton flex items-center space-x-1",children:[e.jsx("div",{className:"text-theme-text-secondary",children:s==null?void 0:s.slice(0,8)}),e.jsx(q,{copyText:s})]})]}),e.jsx(X,{secretId:s||""})]})})}export{me as default};