zenml-nightly 0.82.1.dev20250527__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.
- zenml/VERSION +1 -1
- zenml/cli/base.py +6 -1
- zenml/cli/model.py +16 -36
- zenml/cli/server.py +8 -3
- zenml/client.py +20 -4
- zenml/client_lazy_loader.py +2 -0
- zenml/config/docker_settings.py +15 -2
- zenml/enums.py +3 -0
- zenml/event_hub/event_hub.py +1 -1
- zenml/integrations/bitbucket/plugins/event_sources/bitbucket_webhook_event_source.py +1 -1
- zenml/integrations/github/plugins/event_sources/github_webhook_event_source.py +1 -1
- zenml/integrations/kubernetes/flavors/kubernetes_orchestrator_flavor.py +3 -0
- zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator_entrypoint.py +37 -26
- zenml/login/web_login.py +1 -1
- zenml/model/model.py +13 -23
- zenml/models/__init__.py +39 -2
- zenml/models/v2/base/scoped.py +34 -15
- zenml/models/v2/core/artifact.py +10 -9
- zenml/models/v2/core/artifact_version.py +16 -16
- zenml/models/v2/core/logs.py +8 -50
- zenml/models/v2/core/model.py +10 -10
- zenml/models/v2/core/model_version.py +155 -88
- zenml/models/v2/core/pipeline.py +10 -11
- zenml/models/v2/core/pipeline_deployment.py +1 -9
- zenml/models/v2/core/pipeline_run.py +10 -17
- zenml/models/v2/core/run_template.py +10 -10
- zenml/models/v2/core/step_run.py +100 -16
- zenml/models/v2/core/tag.py +5 -4
- zenml/models/v2/misc/pipeline_run_dag.py +46 -0
- zenml/orchestrators/base_orchestrator.py +8 -19
- zenml/orchestrators/cache_utils.py +48 -1
- zenml/orchestrators/input_utils.py +35 -39
- zenml/orchestrators/step_launcher.py +1 -1
- zenml/orchestrators/step_run_utils.py +26 -10
- zenml/pipelines/pipeline_definition.py +3 -3
- zenml/pipelines/run_utils.py +2 -3
- zenml/service_connectors/service_connector.py +5 -1
- zenml/stack/stack_component.py +1 -4
- zenml/steps/step_context.py +1 -1
- zenml/utils/dashboard_utils.py +3 -3
- zenml/zen_server/auth.py +6 -3
- zenml/zen_server/dashboard/assets/{404-_AtuLtaX.js → 404-DmJUgorp.js} +1 -1
- zenml/zen_server/dashboard/assets/{@radix-C7hRs6Kx.js → @radix-Cdvw4jJ8.js} +1 -1
- zenml/zen_server/dashboard/assets/{@react-router-CNP6g_RL.js → @react-router-DeDfXbUF.js} +5 -5
- zenml/zen_server/dashboard/assets/{@reactflow-CQi1Z1Wq.js → @reactflow-8OCk19Fi.js} +1 -1
- zenml/zen_server/dashboard/assets/{@tanstack-CSxjHCME.js → @tanstack-5gTMR7G2.js} +4 -4
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-CZW4QyWn.js +1 -0
- zenml/zen_server/dashboard/assets/ButtonGroup-DFWWFGUE.js +1 -0
- zenml/zen_server/dashboard/assets/{CodeSnippet-CvI6D0wx.js → CodeSnippet-D2HkkAGr.js} +1 -1
- zenml/zen_server/dashboard/assets/CollapsibleCard-CnS09ljw.js +1 -0
- zenml/zen_server/dashboard/assets/{ComponentBadge-DKw7Gndh.js → ComponentBadge-CDgdd0Ks.js} +1 -1
- zenml/zen_server/dashboard/assets/ComponentIcon-CbbOc7lb.js +1 -0
- zenml/zen_server/dashboard/assets/{DeleteAlertDialog-DVvXt-S6.js → DeleteAlertDialog-VIOMDLmx.js} +1 -1
- zenml/zen_server/dashboard/assets/DialogItem-ClFCqxEp.js +1 -0
- zenml/zen_server/dashboard/assets/{DisplayDate-CYVBBSgr.js → DisplayDate-8RESqe5H.js} +1 -1
- zenml/zen_server/dashboard/assets/{EmptyState-M1jafpg6.js → EmptyState-CjrgDtVk.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-BWaXP0VK.js → Error-CQzjbDcN.js} +1 -1
- zenml/zen_server/dashboard/assets/ExecutionStatus-CWreILP0.js +1 -0
- zenml/zen_server/dashboard/assets/{Helpbox-iE1xLmiZ.js → Helpbox-CiKxG5_X.js} +1 -1
- zenml/zen_server/dashboard/assets/Infobox-CGxFvqzi.js +1 -0
- zenml/zen_server/dashboard/assets/LeftSideMenu-DCsKdIjC.js +1 -0
- zenml/zen_server/dashboard/assets/{Lock-DW-0_M0o.js → Lock-CrIAdQo6.js} +1 -1
- zenml/zen_server/dashboard/assets/NestedCollapsible-3M4llYtH.js +1 -0
- zenml/zen_server/dashboard/assets/NumberBox-C0mQktmV.js +1 -0
- zenml/zen_server/dashboard/assets/Partials-DSjkttlz.js +1 -0
- zenml/zen_server/dashboard/assets/{PasswordChecker-lYTOtNom.js → PasswordChecker-B88WjuCe.js} +1 -1
- zenml/zen_server/dashboard/assets/ProCta-Dm5cWKpS.js +1 -0
- zenml/zen_server/dashboard/assets/{ProviderIcon-DLo7t1lo.js → ProviderIcon-DPwMR6nF.js} +1 -1
- zenml/zen_server/dashboard/assets/ProviderRadio-DEDNRgAb.js +1 -0
- zenml/zen_server/dashboard/assets/RunsBody-BRBn1e2O.js +1 -0
- zenml/zen_server/dashboard/assets/SearchField-DY6-UbRT.js +1 -0
- zenml/zen_server/dashboard/assets/SecretTooltip-CZTRnaCV.js +1 -0
- zenml/zen_server/dashboard/assets/{SetPassword-DR-EiLI5.js → SetPassword-BjNGDC5e.js} +1 -1
- zenml/zen_server/dashboard/assets/SheetHeader-CASpN2Lz.js +1 -0
- zenml/zen_server/dashboard/assets/StackComponentList-Be1pQt9m.js +1 -0
- zenml/zen_server/dashboard/assets/StackList-BdiR5DvR.js +1 -0
- zenml/zen_server/dashboard/assets/StackName-ojLC6xdl.js +1 -0
- zenml/zen_server/dashboard/assets/Tabs-DNSKblCM.js +1 -0
- zenml/zen_server/dashboard/assets/Tick-BPrWnNlN.js +1 -0
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-DbFEaezI.js → UpdatePasswordSchemas-CNfKDo2Q.js} +1 -1
- zenml/zen_server/dashboard/assets/UsageReason-Cb-mpV8M.js +1 -0
- zenml/zen_server/dashboard/assets/{Wizard-CMI6Ksgz.js → Wizard-Dg8Pmn5A.js} +1 -1
- zenml/zen_server/dashboard/assets/WizardFooter-BcNDIvlQ.js +1 -0
- zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-BGASHYtF.js → all-pipeline-runs-query-DCdax7I5.js} +1 -1
- zenml/zen_server/dashboard/assets/{arrow-left-CwgF2MEM.js → arrow-left-MRXv5pAH.js} +1 -1
- zenml/zen_server/dashboard/assets/bulk-delete-C_kpIB9A.js +3 -0
- zenml/zen_server/dashboard/assets/{check-DK77doTf.js → check-B9QMTa3f.js} +1 -1
- zenml/zen_server/dashboard/assets/{check-circle-mvyzYvIW.js → check-circle-C4tYvbtw.js} +1 -1
- zenml/zen_server/dashboard/assets/{chevron-down-A-rmltmI.js → chevron-down-jbbQh82s.js} +1 -1
- zenml/zen_server/dashboard/assets/{chevron-right-double-uNWbJT-C.js → chevron-right-double-Dgp_gEsp.js} +1 -1
- zenml/zen_server/dashboard/assets/{clock-CPA5cYxq.js → clock-B_mTG8PH.js} +1 -1
- zenml/zen_server/dashboard/assets/{code-browser-j2EpcxIA.js → code-browser-CiD8qkBx.js} +1 -1
- zenml/zen_server/dashboard/assets/configuration-form-B2hmKGnF.js +1 -0
- zenml/zen_server/dashboard/assets/connectivity-4UKGMYnr.webp +0 -0
- zenml/zen_server/dashboard/assets/constants-1EZZxtay.js +1 -0
- zenml/zen_server/dashboard/assets/create-stack-TKmMtrkQ.js +1 -0
- zenml/zen_server/dashboard/assets/dates-Buh6SMo7.js +1 -0
- zenml/zen_server/dashboard/assets/delete-run-CCR9md_s.js +1 -0
- zenml/zen_server/dashboard/assets/eye-CbVlAYty.js +1 -0
- zenml/zen_server/dashboard/assets/{file-text-BdxZdjP_.js → file-text-Cd8wVfq5.js} +1 -1
- zenml/zen_server/dashboard/assets/form-DFJkaFDX.js +1 -0
- zenml/zen_server/dashboard/assets/form-schemas-CrznJVzA.js +1 -0
- zenml/zen_server/dashboard/assets/{gcp-CHNvgEss.js → gcp-B1I3Qvcx.js} +1 -1
- zenml/zen_server/dashboard/assets/{help-DyMolRxD.js → help-Co6aedki.js} +1 -1
- zenml/zen_server/dashboard/assets/index-BFqbGSck.js +308 -0
- zenml/zen_server/dashboard/assets/{index-CrhdX_qG.js → index-BjUu1mP4.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-DR30v9MZ.js → index-DWpiv-Ft.js} +1 -1
- zenml/zen_server/dashboard/assets/index-DuhuqTCI.css +1 -0
- zenml/zen_server/dashboard/assets/index-U992soPJ.js +1 -0
- zenml/zen_server/dashboard/assets/index.es-C1gfATPn.js +14 -0
- zenml/zen_server/dashboard/assets/{index.esm-D7jFlf5N.js → index.esm-DhJo3mA6.js} +1 -1
- zenml/zen_server/dashboard/assets/info-QkbQz4QU.js +1 -0
- zenml/zen_server/dashboard/assets/{key-icon-DO4DPJHZ.js → key-icon-C07HKw8z.js} +1 -1
- zenml/zen_server/dashboard/assets/{layout-h3cbx8WZ.js → layout-DBbfEFBe.js} +1 -1
- zenml/zen_server/dashboard/assets/layout-Do9YI4QX.js +1 -0
- zenml/zen_server/dashboard/assets/login-mutation-D3tFP6Wm.js +1 -0
- zenml/zen_server/dashboard/assets/{logs-B5n0U7tB.js → logs-CQKlJjo0.js} +1 -1
- zenml/zen_server/dashboard/assets/{package-D1Mhqeh8.js → package-miExReQl.js} +1 -1
- zenml/zen_server/dashboard/assets/page-9RjCitFH.js +1 -0
- zenml/zen_server/dashboard/assets/page-B0PsXWiT.js +1 -0
- zenml/zen_server/dashboard/assets/page-BCrKmYIZ.js +1 -0
- zenml/zen_server/dashboard/assets/page-BcRI3-aR.js +29 -0
- zenml/zen_server/dashboard/assets/page-Be3R2uYn.js +1 -0
- zenml/zen_server/dashboard/assets/page-BgknnddT.js +1 -0
- zenml/zen_server/dashboard/assets/page-BrT0_zSJ.js +40 -0
- zenml/zen_server/dashboard/assets/page-Bs3W2FDi.js +1 -0
- zenml/zen_server/dashboard/assets/page-C210HcBA.js +1 -0
- zenml/zen_server/dashboard/assets/page-C6KaiZ_W.js +1 -0
- zenml/zen_server/dashboard/assets/page-CAJ8B0vb.js +1 -0
- zenml/zen_server/dashboard/assets/page-CAUYrfui.js +1 -0
- zenml/zen_server/dashboard/assets/page-CHxVhF3x.js +1 -0
- zenml/zen_server/dashboard/assets/{page-CSwZxZMQ.js → page-CN7lkvXr.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CUaMMoPG.js +1 -0
- zenml/zen_server/dashboard/assets/page-Cal6XQ4U.js +1 -0
- zenml/zen_server/dashboard/assets/page-CdZCmszX.js +1 -0
- zenml/zen_server/dashboard/assets/page-ChGcZI_6.js +1 -0
- zenml/zen_server/dashboard/assets/page-CktmtZ8Z.js +1 -0
- zenml/zen_server/dashboard/assets/page-ClvmVesa.js +1 -0
- zenml/zen_server/dashboard/assets/page-CnbIYE80.js +1 -0
- zenml/zen_server/dashboard/assets/page-CoXzjeEY.js +1 -0
- zenml/zen_server/dashboard/assets/page-CtiuMP_r.js +1 -0
- zenml/zen_server/dashboard/assets/page-D9Hfx6GV.js +1 -0
- zenml/zen_server/dashboard/assets/page-D9iuB88h.js +1 -0
- zenml/zen_server/dashboard/assets/page-DCcuPZ8P.js +1 -0
- zenml/zen_server/dashboard/assets/page-DEohTSz6.js +1 -0
- zenml/zen_server/dashboard/assets/page-DJIGaUQ9.js +1 -0
- zenml/zen_server/dashboard/assets/page-DKK6ulgy.js +1 -0
- zenml/zen_server/dashboard/assets/page-DNjKHjnH.js +1 -0
- zenml/zen_server/dashboard/assets/page-DUK0Nd_1.js +1 -0
- zenml/zen_server/dashboard/assets/page-DUKbOhaD.js +1 -0
- zenml/zen_server/dashboard/assets/page-DYOucPtA.js +1 -0
- zenml/zen_server/dashboard/assets/page-DpqRelAy.js +1 -0
- zenml/zen_server/dashboard/assets/{page-ZfTtFicG.js → page-DwVPpCFg.js} +2 -2
- zenml/zen_server/dashboard/assets/page-XURWnYZP.js +1 -0
- zenml/zen_server/dashboard/assets/page-abw-2oeW.js +1 -0
- zenml/zen_server/dashboard/assets/page-akLcPcKw.js +1 -0
- zenml/zen_server/dashboard/assets/page-n9ejQ2V3.js +2 -0
- zenml/zen_server/dashboard/assets/page-sJjNT9xA.js +6 -0
- zenml/zen_server/dashboard/assets/{persist-UUym702q.js → persist-DWMWVP-y.js} +1 -1
- zenml/zen_server/dashboard/assets/{persist-D87V82eO.js → persist-Dec_w7aB.js} +1 -1
- zenml/zen_server/dashboard/assets/pipeline-CSUlkd50.js +1 -0
- zenml/zen_server/dashboard/assets/{plus-COjQg3AG.js → plus-Cl0_rCVF.js} +1 -1
- zenml/zen_server/dashboard/assets/{react-error-boundary.esm-fyoUBS25.js → react-error-boundary.esm-7_MuhCay.js} +1 -1
- zenml/zen_server/dashboard/assets/{refresh-CM5T3QeU.js → refresh-BcTM09NW.js} +1 -1
- zenml/zen_server/dashboard/assets/resource-tyes-list-o2LXiMay.js +1 -0
- zenml/zen_server/dashboard/assets/resource-type-tooltip-DwHrJstL.js +1 -0
- zenml/zen_server/dashboard/assets/service-connectors-DSEMwJ5A.js +1 -0
- zenml/zen_server/dashboard/assets/{service-BQ9KIhls.js → service-jxtvgks0.js} +2 -2
- zenml/zen_server/dashboard/assets/sharedSchema-BXzg0EZz.js +1 -0
- zenml/zen_server/dashboard/assets/stack-detail-query-Cm0fsgo-.js +1 -0
- zenml/zen_server/dashboard/assets/{terminal-square-DMtel8mb.js → terminal-XFL_4QN-.js} +1 -1
- zenml/zen_server/dashboard/assets/terminal-square-XFL_4QN-.js +1 -0
- zenml/zen_server/dashboard/assets/transform-CeZdrxDZ.js +1 -0
- zenml/zen_server/dashboard/assets/{trash-BWSZ7NRK.js → trash-DP6Tpp_E.js} +1 -1
- zenml/zen_server/dashboard/assets/type-guards-CNgPYg8l.js +1 -0
- zenml/zen_server/dashboard/assets/update-current-user-mutation-D5MjcQ6F.js +1 -0
- zenml/zen_server/dashboard/assets/update-server-settings-mutation-CmnxdxiK.js +1 -0
- zenml/zen_server/dashboard/assets/{zod-C0xYeTvL.js → zod-XdS2h1ws.js} +1 -1
- zenml/zen_server/dashboard/index.html +7 -7
- zenml/zen_server/rbac/utils.py +2 -2
- zenml/zen_server/routers/auth_endpoints.py +2 -2
- zenml/zen_server/routers/devices_endpoints.py +8 -5
- zenml/zen_server/routers/pipeline_deployments_endpoints.py +1 -1
- zenml/zen_server/routers/pipelines_endpoints.py +1 -1
- zenml/zen_server/routers/run_templates_endpoints.py +3 -3
- zenml/zen_server/routers/runs_endpoints.py +35 -0
- zenml/zen_server/template_execution/utils.py +6 -6
- zenml/zen_stores/dag_generator.py +171 -0
- zenml/zen_stores/rest_zen_store.py +17 -3
- zenml/zen_stores/schemas/action_schemas.py +40 -4
- zenml/zen_stores/schemas/api_key_schemas.py +29 -1
- zenml/zen_stores/schemas/artifact_schemas.py +168 -48
- zenml/zen_stores/schemas/base_schemas.py +26 -1
- zenml/zen_stores/schemas/code_repository_schemas.py +46 -5
- zenml/zen_stores/schemas/component_schemas.py +44 -3
- zenml/zen_stores/schemas/device_schemas.py +43 -2
- zenml/zen_stores/schemas/event_source_schemas.py +41 -5
- zenml/zen_stores/schemas/flavor_schemas.py +42 -2
- zenml/zen_stores/schemas/model_schemas.py +113 -77
- zenml/zen_stores/schemas/pipeline_build_schemas.py +53 -4
- zenml/zen_stores/schemas/pipeline_deployment_schemas.py +53 -4
- zenml/zen_stores/schemas/pipeline_run_schemas.py +111 -47
- zenml/zen_stores/schemas/pipeline_schemas.py +41 -9
- zenml/zen_stores/schemas/run_template_schemas.py +75 -11
- zenml/zen_stores/schemas/schedule_schema.py +50 -5
- zenml/zen_stores/schemas/secret_schemas.py +39 -2
- zenml/zen_stores/schemas/service_connector_schemas.py +39 -2
- zenml/zen_stores/schemas/service_schemas.py +39 -4
- zenml/zen_stores/schemas/stack_schemas.py +47 -2
- zenml/zen_stores/schemas/step_run_schemas.py +89 -26
- zenml/zen_stores/schemas/tag_schemas.py +69 -5
- zenml/zen_stores/schemas/trigger_schemas.py +44 -5
- zenml/zen_stores/schemas/utils.py +25 -4
- zenml/zen_stores/sql_zen_store.py +471 -28
- zenml/zen_stores/zen_store_interface.py +9 -1
- {zenml_nightly-0.82.1.dev20250527.dist-info → zenml_nightly-0.82.1.dev20250528.dist-info}/METADATA +1 -1
- {zenml_nightly-0.82.1.dev20250527.dist-info → zenml_nightly-0.82.1.dev20250528.dist-info}/RECORD +220 -214
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-BG7-Ki1L.js +0 -1
- zenml/zen_server/dashboard/assets/CollapsibleCard-D20FtrzC.js +0 -1
- zenml/zen_server/dashboard/assets/Commands-DGbAvMDk.js +0 -1
- zenml/zen_server/dashboard/assets/ComponentIcon-ils7uNAk.js +0 -1
- zenml/zen_server/dashboard/assets/CsvVizualization-DVN541XF.js +0 -15
- zenml/zen_server/dashboard/assets/DialogItem-BHWf3sIB.js +0 -1
- zenml/zen_server/dashboard/assets/ExecutionStatus-XrvT2r65.js +0 -1
- zenml/zen_server/dashboard/assets/Infobox-D9k5TFH4.js +0 -1
- zenml/zen_server/dashboard/assets/InlineAvatar-Cfz4WSLK.js +0 -1
- zenml/zen_server/dashboard/assets/MarkdownVisualization-URCyUPcZ.js +0 -14
- zenml/zen_server/dashboard/assets/NestedCollapsible-Dor-bi98.js +0 -1
- zenml/zen_server/dashboard/assets/NumberBox-D2A7ENHb.js +0 -1
- zenml/zen_server/dashboard/assets/Partials-DQJFw1yW.js +0 -1
- zenml/zen_server/dashboard/assets/ProBadge-Cp4hb1YT.js +0 -1
- zenml/zen_server/dashboard/assets/ProCta-EYoV9CvK.js +0 -1
- zenml/zen_server/dashboard/assets/ProviderRadio-BVDA-fAr.js +0 -1
- zenml/zen_server/dashboard/assets/RunSelector-BLuBYNJt.js +0 -1
- zenml/zen_server/dashboard/assets/RunsBody-W4WHf-sq.js +0 -1
- zenml/zen_server/dashboard/assets/SearchField-D-h6jXyg.js +0 -1
- zenml/zen_server/dashboard/assets/SecretTooltip-CePCL8kd.js +0 -1
- zenml/zen_server/dashboard/assets/StackList-CgmN5H-i.js +0 -1
- zenml/zen_server/dashboard/assets/Tabs-DxQ8PDOD.js +0 -1
- zenml/zen_server/dashboard/assets/Tick-CEsT3HPR.js +0 -1
- zenml/zen_server/dashboard/assets/UsageReason-DjI5qMje.js +0 -1
- zenml/zen_server/dashboard/assets/WizardFooter-CFBHFZas.js +0 -1
- zenml/zen_server/dashboard/assets/cloud-squares-DeRLMopf.svg +0 -43
- zenml/zen_server/dashboard/assets/configuration-form-BtI2Y4eX.js +0 -1
- zenml/zen_server/dashboard/assets/connectors-video-C9qY4syJ.svg +0 -21
- zenml/zen_server/dashboard/assets/constants-DP3ZEnXH.js +0 -1
- zenml/zen_server/dashboard/assets/create-stack-BJ6x5rzj.js +0 -1
- zenml/zen_server/dashboard/assets/dates-3pMLCNrD.js +0 -1
- zenml/zen_server/dashboard/assets/delete-run-DlSLEl5T.js +0 -1
- zenml/zen_server/dashboard/assets/docker-BuDBFEDL.js +0 -1
- zenml/zen_server/dashboard/assets/dots-horizontal-BGRJCPCs.js +0 -1
- zenml/zen_server/dashboard/assets/flavor-select-BnPxvQDN.js +0 -1
- zenml/zen_server/dashboard/assets/form-schemas-CbvoEUHr.js +0 -1
- zenml/zen_server/dashboard/assets/index-CFESYpe4.js +0 -1
- zenml/zen_server/dashboard/assets/index-CmLcvK2z.js +0 -1
- zenml/zen_server/dashboard/assets/index-CzX3ZYlI.css +0 -1
- zenml/zen_server/dashboard/assets/index-D2iSHVZq.js +0 -64
- zenml/zen_server/dashboard/assets/kubernetes-D6OUjwSK.js +0 -1
- zenml/zen_server/dashboard/assets/link-external-DUhCSKNm.js +0 -1
- zenml/zen_server/dashboard/assets/login-command-CkqxPtV3.js +0 -1
- zenml/zen_server/dashboard/assets/login-mutation-CXc-Klim.js +0 -1
- zenml/zen_server/dashboard/assets/not-found-olRU3fnu.js +0 -1
- zenml/zen_server/dashboard/assets/page-7keIM1V3.js +0 -1
- zenml/zen_server/dashboard/assets/page-B31neFwG.js +0 -1
- zenml/zen_server/dashboard/assets/page-B3zo4KYS.js +0 -1
- zenml/zen_server/dashboard/assets/page-BN3MHq1a.js +0 -1
- zenml/zen_server/dashboard/assets/page-BNgVExjN.js +0 -1
- zenml/zen_server/dashboard/assets/page-BPtvu74G.js +0 -1
- zenml/zen_server/dashboard/assets/page-BTIuG0ki.js +0 -2
- zenml/zen_server/dashboard/assets/page-BcQzleH6.js +0 -1
- zenml/zen_server/dashboard/assets/page-C05Jw4M2.js +0 -1
- zenml/zen_server/dashboard/assets/page-C28a7K8h.js +0 -1
- zenml/zen_server/dashboard/assets/page-C9WLk0X-.js +0 -1
- zenml/zen_server/dashboard/assets/page-CINMx64X.js +0 -1
- zenml/zen_server/dashboard/assets/page-CYrJbk7P.js +0 -1
- zenml/zen_server/dashboard/assets/page-Ce0cqLo3.js +0 -1
- zenml/zen_server/dashboard/assets/page-CgNsEkw-.js +0 -1
- zenml/zen_server/dashboard/assets/page-Ct2FUYuR.js +0 -1
- zenml/zen_server/dashboard/assets/page-D8G2B3Bu.js +0 -1
- zenml/zen_server/dashboard/assets/page-DL8a4_lg.js +0 -3
- zenml/zen_server/dashboard/assets/page-DMhYn1cF.js +0 -1
- zenml/zen_server/dashboard/assets/page-Dd_Yq-Uf.js +0 -6
- zenml/zen_server/dashboard/assets/page-DfSvqT8g.js +0 -1
- zenml/zen_server/dashboard/assets/page-Dt6ANUTx.js +0 -1
- zenml/zen_server/dashboard/assets/page-DtvTleaT.js +0 -1
- zenml/zen_server/dashboard/assets/page-DwfGTiVs.js +0 -1
- zenml/zen_server/dashboard/assets/page-JgomSTDc.js +0 -1
- zenml/zen_server/dashboard/assets/page-L84ig6HB.js +0 -1
- zenml/zen_server/dashboard/assets/page-Mabsn4QJ.js +0 -1
- zenml/zen_server/dashboard/assets/page-P04L5cm9.js +0 -1
- zenml/zen_server/dashboard/assets/page-PfhAnvq4.js +0 -1
- zenml/zen_server/dashboard/assets/page-WdRrlNt_.js +0 -1
- zenml/zen_server/dashboard/assets/page-cqJDDDeK.js +0 -1
- zenml/zen_server/dashboard/assets/page-k-Wxh9L_.js +0 -1
- zenml/zen_server/dashboard/assets/page-y-zV4n0c.js +0 -1
- zenml/zen_server/dashboard/assets/rocket-Cf-B-XOR.js +0 -1
- zenml/zen_server/dashboard/assets/settings_preview-0JLrRgHP.webp +0 -0
- zenml/zen_server/dashboard/assets/sharedSchema-Bse2agAf.js +0 -14
- zenml/zen_server/dashboard/assets/stack-detail-query-BAcZJrN3.js +0 -1
- zenml/zen_server/dashboard/assets/tick-circle-m94Aa6Zt.js +0 -1
- zenml/zen_server/dashboard/assets/tour-cover-BYfeen6M.webp +0 -0
- zenml/zen_server/dashboard/assets/type-guards-CaeD8wHO.js +0 -1
- zenml/zen_server/dashboard/assets/update-server-settings-mutation-DwMM1LJz.js +0 -1
- {zenml_nightly-0.82.1.dev20250527.dist-info → zenml_nightly-0.82.1.dev20250528.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.82.1.dev20250527.dist-info → zenml_nightly-0.82.1.dev20250528.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.82.1.dev20250527.dist-info → zenml_nightly-0.82.1.dev20250528.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
import{r as d,j as e}from"./@radix-Cdvw4jJ8.js";import{T as y,P as g}from"./ProCta-Dm5cWKpS.js";import{z as c,a as N,f as b,c as v,d as w,e as S,g as k,I as m,B as p,h as F,r as P}from"./index-BFqbGSck.js";import{t as U}from"./zod-XdS2h1ws.js";import{c as C}from"./@tanstack-5gTMR7G2.js";import{u as E}from"./index.esm-DhJo3mA6.js";import{S as M}from"./check-circle-C4tYvbtw.js";import{L}from"./@react-router-DeDfXbUF.js";import"./check-B9QMTa3f.js";import"./@reactflow-8OCk19Fi.js";const h=d.createContext(null);function z({children:s}){const[t,a]=d.useState(!1);return e.jsx(h.Provider,{value:{setSubmitSuccess:a,submitSuccess:t},children:s})}function f(){const s=d.useContext(h);if(s===null)throw new Error("useUpgradeContext must be used within an UpgradeProvider");return s}const B=c.object({name:c.string().min(1),company:c.string().min(1),email:c.string().email()});function T(){const{setSubmitSuccess:s}=f(),{toast:t}=N(),a=E({resolver:U(B),defaultValues:{company:"",email:"",name:""}}),n=C({mutationFn:I,onSuccess:()=>s(!0),onError:r=>{t({emphasis:"subtle",status:"error",rounded:!0,description:r.message})}});async function i(r,o,l){n.mutate({...r,userId:o,isDebug:l})}return{form:a,submitFormMutation:n,handleSubmitForm:i}}async function I({company:s,email:t,isDebug:a,name:n,userId:i}){return b(v,{method:"POST",credentials:"omit",headers:{"Content-Type":"application/json"},body:JSON.stringify([{debug:a,event:"Upgrade initiated",type:"track",user_id:i,properties:{company:s,email:t,name:n}}])})}function Z(){return e.jsxs("div",{className:"space-y-5",children:[e.jsx(_,{}),e.jsx(D,{})]})}function _(){return e.jsxs("div",{className:"flex flex-col items-center space-y-0.5",children:[e.jsx("h1",{className:"text-center text-display-xs font-semibold",children:"Upgrade to ZenML Pro on your own VPC"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Direct self-deployment, no sales calls"})]})}function D(){const s=w(),t=S(),{form:a,handleSubmitForm:n,submitFormMutation:i}=T(),{register:r,handleSubmit:o,formState:{isValid:l,isSubmitting:u}}=a,{isPending:x}=i;return s.isPending||t.isPending?e.jsx(k,{className:"h-[250px] w-full"}):s.isError||t.isError?e.jsx("p",{children:"Something went wrong...."}):e.jsxs("div",{className:"space-y-5",children:[e.jsxs("form",{onSubmit:o(j=>n(j,t.data.id,!!s.data.debug)),className:"space-y-5",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:"name",className:"text-text-sm",children:"Your Name"}),e.jsx(m,{...r("name"),id:"name",className:"w-full"})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:"company",className:"text-text-sm",children:"Company"}),e.jsx(m,{...r("company"),id:"company",className:"w-full"})]}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:"email",className:"text-text-sm",children:"Email address"}),e.jsx(m,{...r("email"),id:"email",className:"w-full"})]}),e.jsxs(p,{size:"md",className:"w-full justify-center",disabled:u||x||!l,type:"submit",children:[(x||u)&&e.jsx("div",{role:"alert","aria-busy":"true",className:"full h-[20px] w-[20px] animate-spin rounded-rounded border-2 border-theme-text-negative border-b-theme-text-brand"}),"Continue"]})]}),e.jsxs("p",{className:"text-center text-text-xs text-theme-text-secondary",children:["By submitting the form you accept our"," ",e.jsx("a",{className:"link",href:"https://www.zenml.io/cloud-terms-and-privacy",target:"_blank",rel:"noopener noreferrer",children:"terms of use"})," ","and"," ",e.jsx("a",{href:"https://www.zenml.io/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"link",children:"privacy policy"}),"."]})]})}function R(){return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-display-xs font-semibold",children:"As easy as following the steps"}),e.jsx("p",{className:"text-theme-text-secondary",children:"From sign-up to deployment in minutes"})]}),e.jsx(W,{})]})}const V=["Fill out your details","Receive comprehensive ZenML Pro documentation","Deploy ZenML Pro and upgrade your tenant","Get a free 14-day trial license"];function W(){return e.jsx("ol",{className:"space-y-3",children:V.map((s,t)=>e.jsxs("li",{className:"flex items-center space-x-1",children:[e.jsx(Y,{children:t+1}),e.jsx("span",{children:s})]},t))})}function Y({className:s,...t}){return e.jsx("div",{...t,className:F("flex h-4 w-4 shrink-0 items-center justify-center rounded-rounded bg-warning-400 text-text-xs text-theme-text-negative")})}function q(){return e.jsxs("section",{className:"flex w-full flex-col-reverse items-center justify-end gap-5 lg:flex-row lg:gap-[100px] xl:pl-[200px] 2xl:pl-[300px]",children:[e.jsx(R,{}),e.jsx(Z,{})]})}const G="/assets/upgrade-form-CwRHBuXB.webp",H=["Comprehensive documentation to get started","Your 14-day trial license key","Step-by-step deployment instructions"];function O(){return e.jsxs("section",{className:"flex h-full w-full flex-col items-center justify-center space-y-5",children:[e.jsx(M,{className:"h-[120px] w-[120px] fill-theme-text-success"}),e.jsxs("div",{className:"space-y-7",children:[e.jsxs("div",{className:"max-w-[500px] space-y-2 text-center",children:[e.jsx("h1",{className:"text-display-xs font-semibold",children:"You're on your way to ZenML Pro!"}),e.jsx("p",{className:"text-theme-text-secondary",children:"Thank you for choosing to upgrade to ZenML Pro. We've received your request and you'll receive an email with:"}),e.jsx("ul",{className:"mx-auto w-fit space-y-3",children:H.map((s,t)=>e.jsxs("li",{className:"flex items-center gap-1",children:[e.jsx(y,{}),e.jsx("span",{children:s})]},t))}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Meanwhile, you can ask your questions in our"," ",e.jsx("a",{className:"link",href:"https://zenml.io/slack",target:"_blank",rel:"noopener noreferrer",children:"Slack channel"})," ","or"," ",e.jsx("a",{className:"link",href:"https://docs.zenml.io",target:"_blank",rel:"noopener noreferrer",children:"check our documentation."})]})]}),e.jsx(p,{size:"md",className:"mx-auto",children:e.jsx(L,{to:P.home,children:"Go to Dashboard"})})]})]})}function A(){const{submitSuccess:s}=f();return e.jsxs(g,{className:"relative min-h-[620px]",children:[e.jsx("img",{src:G,className:"absolute hidden -translate-x-3/4 -rotate-[5deg] scale-75 xl:block 2xl:-translate-x-[60%]"}),s===!1&&e.jsx(q,{}),s===!0&&e.jsx(O,{})]})}function ne(){return e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx("div",{className:"layout-container",children:e.jsx(z,{children:e.jsx(A,{})})})})}export{ne as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{j as e,r as d,aF as N,aG as H,aH as P,aI as Q}from"./@radix-Cdvw4jJ8.js";import{T as U,q as Z,s as G,t as J,av as O,aw as E,ai as u,ar as K,B as f,az as W,aA as X,as as Y,at as ee,au as te,bw as se,I as R,J as re,V as ne,L as ae,G as ie,r as B,z as x,a as oe,S as ce,h as le}from"./index-BFqbGSck.js";import{a as p,C as de,u as me,F as ue}from"./index.esm-DhJo3mA6.js";import{C as V}from"./ComponentIcon-CbbOc7lb.js";import{D as pe}from"./DisplayDate-8RESqe5H.js";import{j as he,k as xe,h as fe}from"./@tanstack-5gTMR7G2.js";import{d as ge}from"./index-DWpiv-Ft.js";import{s as je,R as ke,a as be,u as ve}from"./create-stack-TKmMtrkQ.js";import{S as ye}from"./info-QkbQz4QU.js";import{S as Ne,s as b}from"./constants-1EZZxtay.js";import{S as Se}from"./arrow-left-MRXv5pAH.js";import{C as we}from"./configuration-form-B2hmKGnF.js";import{S as Ce}from"./check-circle-C4tYvbtw.js";import{L as Le,c as _e}from"./@react-router-DeDfXbUF.js";import{s as Fe}from"./index-BjUu1mP4.js";import{t as Te}from"./zod-XdS2h1ws.js";import{s as ze}from"./sharedSchema-BXzg0EZz.js";import"./@reactflow-8OCk19Fi.js";import"./layout-DBbfEFBe.js";import"./transform-CeZdrxDZ.js";import"./index-U992soPJ.js";import"./form-DFJkaFDX.js";import"./plus-Cl0_rCVF.js";import"./trash-DP6Tpp_E.js";import"./type-guards-CNgPYg8l.js";import"./check-B9QMTa3f.js";import"./CodeSnippet-D2HkkAGr.js";import"./file-text-Cd8wVfq5.js";import"./terminal-square-XFL_4QN-.js";import"./stack-detail-query-Cm0fsgo-.js";import"./index.es-C1gfATPn.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"},F={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"},T={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 "},M={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"},I={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"},A={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"},D={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 Me({type:t}){const{description:s,link:r}=Ie(t);return e.jsx(U,{children:e.jsxs(Z,{delayDuration:200,children:[e.jsxs(G,{children:[e.jsx(ye,{className:"h-4 w-4 shrink-0 fill-theme-text-tertiary"}),e.jsxs("div",{className:"sr-only",children:["Info for ",t]})]}),e.jsxs(J,{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 Ie(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:M.description,link:M.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:I.description,link:I.helpLink};case"experiment_tracker":return{description:T.description,link:T.helpLink};case"feature_store":return{description:F.description,link:F.helpLink};case"image_builder":return{description:A.description,link:A.helpLink};case"model_deployer":return{description:_.description,link:_.helpLink};case"model_registry":return{description:D.description,link:D.helpLink};case"step_operator":return{description:L.description,link:L.helpLink}}}function Ae({type:t,setSelectedFlavor:s}){return e.jsxs(e.Fragment,{children:[e.jsx(O,{children:e.jsxs(E,{children:["Select ",u(t)," Flavor"]})}),e.jsx(K,{viewportClassName:"max-h-[70vh]",children:e.jsx("div",{className:"p-5",children:e.jsx(Ne,{setSelectedFlavor:s,type:t})})})]})}function De({name:t,id:s,backHandler:r,type:n,successHandler:a}){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(Se,{className:"size-5 shrink-0"}),e.jsx("span",{className:"sr-only",children:"Go step back"})]}),e.jsxs(E,{className:"truncate",children:["Configure your ",u(t)," ",u(n)]})]})}),e.jsx(we,{useMaxHeight:!0,flavorId:s,formId:o,successHandler:a,FooterComponent:$e})]})}function $e({formId:t,isPending:s}){return e.jsx(W,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(X,{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 Oe({type:t}){const[s,r]=d.useState(!1),[n,a]=d.useState(0),[o,c]=d.useState(null);async function i(l){r(l),await je(100),l||(a(0),c(null))}function g(l){var m;c({id:l.id,name:l.name,logoUrl:((m=l.body)==null?void 0:m.logo_url)??void 0}),a(j=>j+1)}function h(){a(0),c(null)}return e.jsxs(Y,{open:s,onOpenChange:l=>i(l),children:[e.jsx(ee,{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 ",u(t)]})}),e.jsxs(te,{className:"w-full sm:max-w-[640px] md:max-w-3xl xl:max-w-[1080px]",children:[n===0&&e.jsx(Ae,{setSelectedFlavor:g,type:t}),n===1&&!!o&&e.jsx(De,{successHandler:()=>i(!1),backHandler:h,...o,type:t})]})]})}function Ee(){return e.jsxs(e.Fragment,{children:[b.map(t=>e.jsx(N,{className:"h-full space-y-5 p-5",value:t,children:e.jsx(Ve,{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 Re({type:t,search:s}){const r=he({...re.componentListInfinite({sort_by:"desc:updated",type:t,...s?{name:`contains:${s}`}:{}})}),{control:n,watch:a,setValue:o}=p();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(c=>c.items.map(i=>e.jsx("li",{children:e.jsx(de,{name:`components.${t}.id`,control:n,render:({field:{onChange:g,...h}})=>{var l,m,j,v;return e.jsxs(ke,{className:"justify-between bg-theme-surface-primary font-medium","data-state":a(`components.${t}.id`)===i.id?"selected":"unselected",htmlFor:i.id,children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(be,{...h,id:i.id,type:"radio",value:i.id,onChange:q=>{var y;o(`components.${t}.name`,i.name),o(`components.${t}.logoUrl`,((y=i.body)==null?void 0:y.logo_url)||""),g(q)},checked:a(`components.${t}.id`)===i.id,name:t}),e.jsx("img",{alt:"flavor icon",src:ae(((l=i.body)==null?void 0:l.logo_url)||""),width:24,height:24}),e.jsxs("div",{className:"min-w-0 truncate",children:[e.jsx("div",{className:"truncate font-semibold",children:i.name}),e.jsx("div",{className:"truncate text-text-xs text-theme-text-secondary",children:i.id.split("-")[0]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-text-sm",children:[((j=(m=i.resources)==null?void 0:m.user)==null?void 0:j.name)&&e.jsx(ie,{username:i.resources.user.name}),((v=i.body)==null?void 0:v.updated)&&e.jsx("div",{className:"whitespace-nowrap text-theme-text-secondary",children:e.jsx(pe,{short:!0,dateString:i.body.updated})})]})]})}})},i.id)))}),e.jsx(Oe,{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 Be({type:t}){return e.jsxs("section",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(V,{className:"h-5 w-5 fill-primary-400",type:t}),e.jsx("h2",{className:"text-text-lg font-semibold",children:u(t)}),e.jsx(Me,{type:t})]}),e.jsxs("p",{className:"text-theme-text-secondary",children:["Select a existing ",se(t)," from your server:"]})]})}function Ve({type:t}){const[s,r]=d.useState(""),{watch:n,setValue:a}=p(),o=n(`components.${t}`);return d.useEffect(()=>{o&&!o.id&&a(`components.${t}`,null)},[o,a,t]),e.jsxs(e.Fragment,{children:[e.jsx(Be,{type:t}),e.jsx(qe,{search:s,setSearch:r}),e.jsx(Re,{search:s,type:t})]})}function qe({setSearch:t,search:s}){const[r,n]=d.useState(s),a=d.useCallback(ge(t,500),[]);d.useEffect(()=>()=>{a.cancel()},[a]);function o(c){n(c),a(c)}return e.jsx(R,{value:r,onChange:c=>o(c.target.value),placeholder:"Search..."})}function He({type:t}){const{watch:s,formState:{errors:r}}=p(),n=s(`components.${t}`),a=n&&n.id;return e.jsx("div",{"data-error":!a&&r.components&&r.components[t]?"true":"false","data-filled":a?"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:a?e.jsx(Pe,{type:t}):e.jsx(Qe,{type:t})})}function Pe({type:t}){const{watch:s}=p(),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:u(t)})]})]}):null}function Qe({type:t}){return e.jsxs(e.Fragment,{children:[e.jsx(V,{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:u(t)})]})}function Ue(){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(Je,{}),e.jsx(Ze,{})]}),e.jsx(Ge,{})]})}function Ze(){const{watch:t,resetField:s}=p();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(H,{children:e.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-4",children:b.map(r=>e.jsxs("div",{className:"relative",children:[e.jsx(P,{className:"group/trigger w-full",value:r,children:e.jsx(He,{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(Ce,{className:"h-5 w-5 shrink-0 fill-success-400"})})]},r))})})]})}function Ge(){const{formState:{isSubmitting:t}}=p(),s=!!xe();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(Le,{to:B.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 Je(){var r;const{register:t,formState:{errors:s}}=p();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 k=x.object({id:x.string().trim().min(1),name:x.string().trim().min(1),logoUrl:x.string().trim().min(1)}),Ke=b.reduce((t,s)=>(t[s]=k.nullable(),t),{}),We=x.object({stackName:ze,components:x.object({...Ke,orchestrator:k,artifact_store:k})});function Xe(){const{toast:t}=oe(),s=_e(),r=fe(),n=ve({onSuccess:async()=>{r.invalidateQueries({queryKey:Fe.all}),s(B.stacks.overview)},onError:c=>{t({status:"error",emphasis:"subtle",icon:e.jsx(ce,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:c.message,rounded:!0})}});function a(c){const i=Object.entries(c.components).reduce((h,[l,m])=>(m&&(h[l]=[m.id]),h),{}),g={name:c.stackName,components:i};n.mutate({payload:g})}const o=me({resolver:Te(We),defaultValues:{components:{alerter:null,orchestrator:{},annotator:null,artifact_store:{},container_registry:null,data_validator:null,experiment_tracker:null,feature_store:null,model_registry:null,image_builder:null,model_deployer:null,step_operator:null},stackName:""}});return{createManualStack:a,form:o}}function Tt(){const[t,s]=d.useState(""),{createManualStack:r,form:n}=Xe();return e.jsx(ue,{...n,children:e.jsx(Q,{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(Ue,{})}),e.jsx($,{children:e.jsx(Ee,{})})]})})})}function $({className:t,...s}){return e.jsx("div",{className:le("w-full overflow-y-auto xl:w-1/2",t),...s})}export{Tt as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as f,j as e}from"./@radix-Cdvw4jJ8.js";import{u as y,W as X,L as $}from"./LeftSideMenu-DCsKdIjC.js";import{u,R as ee,a as te,E as se,D as F,G as re,A as ae,C as O,b as oe,N as ne}from"./Partials-DSjkttlz.js";import{g as V,b as Y,bf as ie,B as ce,r as T}from"./index-BFqbGSck.js";import{f as de,c as le}from"./@react-router-DeDfXbUF.js";import{S as me,C as ue}from"./StackName-ojLC6xdl.js";import{I as G}from"./Infobox-CGxFvqzi.js";import{t as H}from"./zod-XdS2h1ws.js";import{u as Q,F as pe}from"./index.esm-DhJo3mA6.js";import{b as xe,c as q,d as fe,p as he}from"./persist-Dec_w7aB.js";import{C as h}from"./ProviderIcon-DPwMR6nF.js";import{s as J}from"./index-BjUu1mP4.js";import{b as K}from"./@tanstack-5gTMR7G2.js";import{C as v,P as N}from"./ProviderRadio-DEDNRgAb.js";import"./Tick-BPrWnNlN.js";import"./check-B9QMTa3f.js";import"./package-miExReQl.js";import"./ComponentBadge-CDgdd0Ks.js";import"./ComponentIcon-CbbOc7lb.js";import"./layout-DBbfEFBe.js";import"./transform-CeZdrxDZ.js";import"./logs-CQKlJjo0.js";import"./CodeSnippet-D2HkkAGr.js";import"./NumberBox-C0mQktmV.js";import"./@reactflow-8OCk19Fi.js";import"./info-QkbQz4QU.js";import"./sharedSchema-BXzg0EZz.js";import"./index.es-C1gfATPn.js";import"./gcp-B1I3Qvcx.js";import"./stack-detail-query-Cm0fsgo-.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(ee,{provider:o.provider||"aws"}),e.jsx(me,{})]}),e.jsx(te,{provider:o.provider||"aws"}),e.jsx(se,{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(re,{}),t.provider==="azure"&&e.jsx(ae,{})]})}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(ie,{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(ke,{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 ke({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 Se(){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(oe,{})}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,k,S,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=(k=r.stack.metadata)==null?void 0:k.components.artifact_store,i=(S=r.stack.metadata)==null?void 0:S.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(Se,{});if(t===4)return e.jsx(Pe,{})}function Ie(){var c;const[s]=de(),{setCurrentStep:a,currentStep:o}=y(),{formRef:n,isNextButtonDisabled:l}=u(),r=le(),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(ce,{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(ue,{}),e.jsx(Ie,{})]})]})}const Z=["Infrastructure Type","Cloud Provider","Review Configuration","Deploy Stack"];function nt(){const{success:t}=he();return e.jsx(X,{maxSteps:Z.length,initialStep:t?3:1,children:e.jsx(ne,{children:e.jsxs("section",{className:"layout-container flex flex-col gap-5 p-5 xl:flex-row",children:[e.jsx($,{entries:Z}),e.jsx("div",{className:"w-full overflow-y-hidden",children:e.jsx(De,{})})]})})})}export{nt as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as p,j as e}from"./@radix-Cdvw4jJ8.js";import{S as j}from"./chevron-down-jbbQh82s.js";import{D as i}from"./DisplayDate-8RESqe5H.js";import{aO as l,g as c,ac as h,ad as f,ae as g,af as y,w as u,G as b,aP as N}from"./index-BFqbGSck.js";import{K as n,a as v,V as C,N as E}from"./NestedCollapsible-3M4llYtH.js";import{a as m,e as w,R as T,E as R}from"./service-connectors-DSEMwJ5A.js";import{R as P}from"./resource-tyes-list-o2LXiMay.js";import{b as d}from"./@tanstack-5gTMR7G2.js";import{a as x}from"./@react-router-DeDfXbUF.js";import"./@reactflow-8OCk19Fi.js";import"./type-guards-CNgPYg8l.js";import"./eye-CbVlAYty.js";import"./CollapsibleCard-CnS09ljw.js";import"./check-circle-C4tYvbtw.js";import"./CodeSnippet-D2HkkAGr.js";function D(){const[a,r]=p.useState(!0),{connectorId:s}=x(),o=d({...l.serviceConnectorDetail(s),throwOnError:!0});if(o.isPending)return e.jsx(c,{className:"h-[300px] w-full"});if(o.isError)return e.jsx("div",{children:"Error"});const t=o.data;return e.jsxs(h,{open:a,onOpenChange:r,children:[e.jsx(f,{className:"flex items-center gap-[10px]",children:e.jsxs(g,{className:"flex w-full items-center gap-[10px] text-text-lg",children:[e.jsx(j,{className:` ${a?"":"-rotate-90"} h-5 w-5 rounded-md fill-neutral-500 transition-transform duration-200 hover:bg-neutral-200`}),"Basic Parameters"]})}),e.jsx(y,{className:"space-y-5 border-t border-theme-border-moderate bg-theme-surface-primary p-5",children:e.jsxs("dl",{className:"grid grid-cols-1 gap-x-[10px] gap-y-2 md:gap-y-4 lg:grid-cols-3",children:[e.jsx(n,{label:"Name",value:t.name}),e.jsx(A,{connector:t}),e.jsx(O,{connector:t}),e.jsx(S,{connector:t}),e.jsx(_,{connector:t}),e.jsx(I,{connector:t}),e.jsx(Q,{connector:t}),e.jsx(K,{connector:t}),e.jsx(M,{connector:t})]})})]})}function A({connector:a}){var s;const r=(s=a.body)==null?void 0:s.connector_type;return!r||typeof r=="string"?null:e.jsx(n,{label:"Type",value:e.jsxs(u,{size:"sm",rounded:!1,emphasis:"minimal",className:"w-fit gap-0.5 text-theme-text-primary",color:"grey",children:[e.jsx("img",{src:r.logo_url??"",className:"h-4 w-4 shrink-0",alt:r.name}),e.jsx("span",{children:r.name})]})})}function O({connector:a}){var s;const r=m(a);return e.jsx(n,{label:"Auth Method",value:r===void 0?null:e.jsx(u,{size:"sm",rounded:!1,emphasis:"minimal",className:"w-fit text-theme-text-primary",color:"grey",children:e.jsx("span",{children:r.name||((s=a.body)==null?void 0:s.auth_method)})})})}function S({connector:a}){const r=w(a);return e.jsxs(e.Fragment,{children:[e.jsx(v,{children:"Resrouce Types"}),e.jsx(C,{className:"h-auto",children:e.jsx(P,{resourceTypes:r})})]})}function _({connector:a}){return e.jsx(n,{label:"Resource Name",value:e.jsx(T,{connector:a})})}function I({connector:a}){var s;const r=(s=a.resources)==null?void 0:s.user;return e.jsx(n,{label:"Author",value:r?e.jsx(b,{username:N(r)}):null})}function Q({connector:a}){var s;const r=(s=a.body)==null?void 0:s.expires_at;return e.jsx(n,{label:"Expires in",value:r?e.jsx(R,{expires:r}):"Never"})}function K({connector:a}){var s;const r=(s=a.body)==null?void 0:s.created;return e.jsx(n,{label:"Created",value:r?e.jsx("span",{className:"truncate",children:e.jsx(i,{dateString:r})}):null})}function M({connector:a}){var s;const r=(s=a.body)==null?void 0:s.updated;return e.jsx(n,{label:"Updated",value:r?e.jsx("span",{className:"truncate",children:e.jsx(i,{dateString:r})}):null})}function U(){var t;const{connectorId:a}=x(),r=d({...l.serviceConnectorDetail(a),throwOnError:!0});if(r.isPending)return e.jsx(c,{className:"h-[300px] w-full"});if(r.isError)return e.jsx("div",{children:"Error"});const s=r.data,o=m(s);return e.jsx(E,{schema:o==null?void 0:o.config_schema,title:e.jsx("p",{className:"text-text-xl",children:"Configuration"}),data:(t=s.metadata)==null?void 0:t.configuration,isInitialOpen:!0})}function ee(){return e.jsxs("div",{className:"grid grid-cols-1 gap-5",children:[e.jsx("div",{children:e.jsx(D,{})}),e.jsx("div",{className:"space-y-5",children:e.jsx(U,{})})]})}export{ee as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as i,j as s}from"./@radix-Cdvw4jJ8.js";import{as as D,at as k,B as f,au as z,av as E,aw as A,ap as T,a as v,aB as b,S,I as o,az as B,aA as q,z as a,e as M,b as Q,g as P,aj as V,ak as _}from"./index-BFqbGSck.js";import{u as C}from"./update-current-user-mutation-D5MjcQ6F.js";import{h as K}from"./@tanstack-5gTMR7G2.js";import{u as F}from"./index.esm-DhJo3mA6.js";import{t as I}from"./zod-XdS2h1ws.js";import{P as O}from"./PasswordChecker-B88WjuCe.js";import{u as H}from"./UpdatePasswordSchemas-CNfKDo2Q.js";import{D as R}from"./DisplayDate-8RESqe5H.js";import"./@react-router-DeDfXbUF.js";import"./@reactflow-8OCk19Fi.js";function G(){const[e,l]=i.useState(!1);return s.jsxs(D,{onOpenChange:()=>{l(!1)},children:[s.jsx(k,{asChild:!0,children:s.jsx(f,{size:"md",className:"shrink-0",intent:"primary",emphasis:"subtle",children:"Change Password"})}),s.jsxs(z,{children:[s.jsx(E,{children:s.jsx(A,{children:" Update Credentials"})}),e?s.jsx(L,{}):s.jsx(J,{setSuccess:l})]})]})}function J({setSuccess:e}){var u;const l=i.useId(),d=i.useId(),n=i.useId(),{toast:x}=v(),{mutate:p,isPending:j}=C({onSuccess(){e(!0)},onError(t){b(t)&&x({status:"error",emphasis:"subtle",icon:s.jsx(S,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:t.message,rounded:!0})}}),{register:c,handleSubmit:m,watch:w,formState:{isValid:N,errors:y}}=F({resolver:I(H),mode:"onChange",criteriaMode:"all"});function g(t){p({old_password:t.oldPassword,password:t.newPassword})}const h=(u=y.newPassword)==null?void 0:u.types;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-5 p-7",children:[s.jsx("form",{id:"update-password-form",onSubmit:m(g),children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:l,className:"text-text-sm",children:"Old Password"}),s.jsx(o,{...c("oldPassword"),type:"password",id:l,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:d,className:"text-text-sm",children:"New Password"}),s.jsx(o,{...c("newPassword"),type:"password",id:d,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:n,className:"text-text-sm",children:"Confirm Password"}),s.jsx(o,{...c("confirmPassword"),type:"password",id:n,className:"w-full"})]})]})}),s.jsx(O,{val:w("newPassword"),errors:h||[]})]}),s.jsxs(B,{className:"gap-[10px]",children:[s.jsx(q,{asChild:!0,children:s.jsx(f,{size:"sm",intent:"secondary",children:"Cancel"})}),s.jsx(f,{disabled:!N||j,form:"update-password-form",size:"sm",children:"Update Password"})]})]})}function L(){return s.jsxs("div",{className:"space-y-5 p-7 text-center",children:[s.jsx(T,{className:"mx-auto h-[110px] w-[110px] fill-success-500"}),s.jsx("p",{className:"text-text-lg font-semibold text-theme-text-primary",children:"The password was updated successfully!"})]})}const W=a.object({fullName:a.union([a.string(),a.literal("")]),username:a.union([a.string(),a.literal("")]),email:a.union([a.string().email(),a.literal("")])}).refine(e=>e.fullName!==""||e.username!==""||e.email!=="");function X({user:e}){var h,u,t;const l=K(),{toast:d}=v(),n=i.useId(),x=i.useId(),p=i.useId(),{isPending:j,mutate:c}=C({onError(r){b(r)&&d({status:"error",emphasis:"subtle",icon:s.jsx(S,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:r.message,rounded:!0})},onSuccess:()=>{l.invalidateQueries({queryKey:["current-user"]}),l.invalidateQueries({queryKey:["users"]}),w(),d({status:"success",emphasis:"subtle",rounded:!0,description:"User updated successfully"})}}),{register:m,reset:w,handleSubmit:N,formState:{isValid:y}}=F({resolver:I(W),defaultValues:{email:void 0,fullName:void 0,username:void 0}});function g(r){const U={...r.fullName&&{full_name:r.fullName},...r.username&&{name:r.username},...r.email&&{email:r.email}};c(U)}return s.jsxs("div",{className:"w-full max-w-[600px]",children:[s.jsx("form",{onSubmit:N(g),children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:n,className:"text-text-sm",children:"Full Name"}),s.jsx(o,{placeholder:(h=e.body)==null?void 0:h.full_name,...m("fullName"),id:n,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:x,className:"text-text-sm",children:"Username"}),s.jsx(o,{...m("username"),placeholder:e.name,id:x,className:"w-full"})]}),s.jsxs("div",{className:"space-y-0.5",children:[s.jsx("label",{htmlFor:p,className:"text-text-sm",children:"Email"}),s.jsx(o,{placeholder:((u=e.metadata)==null?void 0:u.email)??void 0,...m("email"),id:p,className:"w-full"})]}),s.jsx("div",{className:"flex justify-end",children:s.jsx(f,{disabled:j||!y,size:"md",intent:"primary",children:"Update"})})]})}),s.jsx(G,{}),s.jsxs("p",{className:"mt-5 text-text-sm text-theme-text-secondary",children:["Created on ",s.jsx(R,{dateString:((t=e.body)==null?void 0:t.created)||""})]})]})}function ds(){const{data:e}=M();return s.jsxs(Q,{className:"flex flex-col gap-5 p-5",children:[s.jsx("h1",{className:"text-text-xl font-semibold",children:"Profile"}),s.jsxs("div",{className:"flex justify-between",children:[e?s.jsx(X,{user:e}):s.jsx(P,{className:"h-[350px] w-full"}),e?s.jsx(V,{size:"xxl",className:"ml-5 h-[140px] w-[140px]",type:"rounded",children:s.jsx(_,{className:"text-display-lg",size:"xxl",children:e.name[0]})}):s.jsx(P,{className:"h-[140px] w-[140px] rounded-rounded"})]})]})}export{ds as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as c,j as e}from"./@radix-Cdvw4jJ8.js";import{c as A,u as _}from"./bulk-delete-C_kpIB9A.js";import{q as E,c as O,b as I}from"./@tanstack-5gTMR7G2.js";import{i as C,j as w,o as F,f as B,n as L,F as y,A as q,k as z,B as P,D as $,l as M,m as G,p as H,C as g,r as p,T as U,q as K,s as Q,t as J,v as j,w as V,z as d,x as W,g as D}from"./index-BFqbGSck.js";import{S as X}from"./refresh-BcTM09NW.js";import{S as Y,P as Z}from"./SearchField-DY6-UbRT.js";import{S}from"./trash-DP6Tpp_E.js";import{D as v,a as T}from"./DeleteAlertDialog-VIOMDLmx.js";import{S as ee}from"./pipeline-CSUlkd50.js";import{S as te}from"./terminal-XFL_4QN-.js";import{g as se,E as ne,a as ae}from"./ExecutionStatus-CWreILP0.js";import{L as m,f as ie}from"./@react-router-DeDfXbUF.js";import{A as re}from"./AlertDialogDropdownItem-CZW4QyWn.js";import"./@reactflow-8OCk19Fi.js";import"./chevron-right-double-Dgp_gEsp.js";import"./index-DWpiv-Ft.js";import"./zod-XdS2h1ws.js";import"./index.esm-DhJo3mA6.js";import"./check-circle-C4tYvbtw.js";import"./help-Co6aedki.js";async function oe({params:t}){const n=C(w.pipelines.all+"?"+F(t)),s=await B(n,{method:"GET",headers:{"Content-Type":"application/json"}});if(s.status===404&&L(),!s.ok)throw new y({message:"Error while fetching pipelines",status:s.status,statusText:s.statusText});return s.json()}const x={all:["pipelines"],pipelineList:t=>E({queryKey:[...x.all,t],queryFn:async()=>oe({params:t})})};async function le({pipelineId:t}){const n=C(w.pipelines.detail(t)),s=await fetch(n,{method:"DELETE",credentials:"include",headers:{"Content-Type":"application/json"}});if(!s.ok){const a=await s.json().then(i=>i.detail).catch(()=>`Failed to delete pipeline ${t}`);throw new y({status:s.status,statusText:s.statusText,message:a})}return s.json()}function ce(t){return O({mutationFn:le,...t})}const{ContextProvider:de,useContext:u}=A();function b(){const{setRowSelection:t}=u(),{mutateAsync:n}=ce();async function s(a){await n({pipelineId:a})}return _({deleteFn:s,queryKeyToInvalidate:x.all,setRowSelection:t})}function ue(){const[t,n]=c.useState(!1),{selectedRowCount:s,selectedRowIDs:a}=u(),{bulkDelete:i}=b();async function r(){await i(a),n(!1)}return e.jsxs(q,{open:t,onOpenChange:n,children:[e.jsx(z,{asChild:!0,children:e.jsxs(P,{className:"rounded-sharp border-y-0 bg-white",size:"md",emphasis:"subtle",intent:"secondary",children:[e.jsx(S,{className:"h-5 w-5 shrink-0 gap-1 fill-neutral-400"}),"Delete"]})}),e.jsx(v,{title:`Delete Pipeline${s>=2?"s":""}`,handleDelete:r,children:e.jsxs(T,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})]})}function pe(){const{selectedRowCount:t}=u();return e.jsxs("div",{className:"flex items-center divide-x divide-theme-border-moderate overflow-hidden rounded-md border border-theme-border-moderate",children:[e.jsx("div",{className:"bg-primary-25 px-2 py-1 font-semibold text-theme-text-brand",children:`${t} Pipeline${t>1?"s":""} selected`}),e.jsx(ue,{})]})}function me({id:t}){const[n,s]=c.useState(!1),[a,i]=c.useState(!1),r=c.useRef(null),o=c.useRef(null),{bulkDelete:N}=b();async function R(){await N([t]),f(!1)}function k(){o.current=r.current}function f(l){if(l===!1){i(!1),setTimeout(()=>{s(l)},200);return}s(l)}return e.jsxs($,{onOpenChange:i,open:a,children:[e.jsx(M,{ref:r,children:e.jsx(G,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(H,{hidden:n,onCloseAutoFocus:l=>{o.current&&(o.current.focus(),o.current=null,l.preventDefault())},align:"end",sideOffset:7,children:e.jsx(re,{onSelect:k,open:n,onOpenChange:f,triggerChildren:"Delete",icon:e.jsx(S,{fill:"red"}),children:e.jsx(v,{title:"Delete Pipeline",handleDelete:R,children:e.jsxs(T,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})})})]})}function he(){return[{id:"select",meta:{width:"1%"},header:({table:t})=>e.jsx(g,{id:"check-all",checked:t.getIsAllRowsSelected(),onCheckedChange:n=>t.toggleAllRowsSelected(n==="indeterminate"?!0:n)}),cell:({row:t})=>e.jsx(g,{id:`check-${t.id}`,checked:t.getIsSelected(),onCheckedChange:t.getToggleSelectedHandler()})},{id:"name",header:"Pipeline",cell:({row:t})=>{var n,s,a;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[e.jsx(ee,{className:`h-5 w-5 ${se((n=t.original.resources)==null?void 0:n.latest_run_status)}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(m,{to:p.projects.pipelines.namespace(encodeURIComponent(t.original.name)),className:"flex items-center gap-1",children:e.jsx("span",{className:"text-text-md font-semibold text-theme-text-primary",children:t.original.name})}),e.jsx(U,{children:e.jsxs(K,{children:[e.jsx(Q,{className:"hover:text-theme-text-brand hover:underline",children:e.jsx(ne,{status:(s=t.original.resources)==null?void 0:s.latest_run_status})}),e.jsx(J,{className:"z-20 capitalize",children:(a=t.original.resources)==null?void 0:a.latest_run_status})]})}),e.jsx(j,{copyText:t.original.name})]}),e.jsxs(m,{to:p.projects.pipelines.namespace(encodeURIComponent(t.original.name)),className:"flex items-center gap-1",children:[e.jsx("p",{className:"text-text-xs text-theme-text-secondary",children:t.original.id.split("-")[0]}),e.jsx(j,{copyText:t.original.id})]})]})]})}},{id:"latest-run",header:"Latest Run",accessorFn:t=>{var n,s;return{status:(n=t.resources)==null?void 0:n.latest_run_status,runId:(s=t.resources)==null?void 0:s.latest_run_id}},cell:({getValue:t})=>{const{runId:n,status:s}=t();return!n||!s?e.jsx("div",{children:"No run"}):e.jsx(m,{to:p.projects.runs.detail(n),children:e.jsxs(V,{emphasis:"subtle",rounded:!1,className:"inline-flex items-center gap-0.5",color:ae(s),children:[e.jsx(te,{className:"h-3 w-3 fill-current"}),n==null?void 0:n.split("-")[0]]})})}},{id:"admin_actions",header:"",meta:{width:"5%"},cell:({row:t})=>e.jsx(me,{id:t.original.id})}]}const h=1,xe=d.object({page:d.coerce.number().min(h).optional().default(h).catch(h),name:d.string().optional(),operator:d.enum(["and","or"]).optional()});function fe(){const[t]=ie(),{page:n,name:s,operator:a}=xe.parse({page:t.get("page")||void 0,name:t.get("name")||void 0,operator:t.get("operator")||void 0});return{page:n,name:s,logical_operator:a}}function ge(){const t=fe(),{selectedRowCount:n,rowSelection:s,setRowSelection:a}=u(),{data:i,refetch:r}=I({...x.pipelineList({...t,sort_by:"desc:latest_run"}),throwOnError:!0});return e.jsxs("div",{className:"flex flex-col gap-5 pt-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[n?e.jsx(pe,{}):e.jsx(Y,{searchParams:t}),e.jsx("div",{className:"flex justify-between",children:e.jsxs(P,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>r(),children:[e.jsx(X,{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:i?e.jsx(W,{rowSelection:s,onRowSelectionChange:a,getRowId:o=>o.id,columns:he(),data:i.items}):e.jsx(D,{className:"h-[500px] w-full"})}),i?i.total_pages>1&&e.jsx(Z,{searchParams:t,paginate:i}):e.jsx(D,{className:"h-[36px] w-[300px]"})]})]})}function Le(){return e.jsx(de,{children:e.jsx(ge,{})})}export{Le as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as p,j as e}from"./@radix-Cdvw4jJ8.js";import{f as D,i as C,n as $,F as k,j as E,au as T,av as P,aw as F,I as j,az as O,aA as A,B as u,D as K,l as H,m as G,p as U,b1 as J,r as S,v,G as W,z as f,e as X,g as N,as as Y,at as Z,a as ee,aB as se,x as te,b as ae}from"./index-BFqbGSck.js";import{S as re,P as ne}from"./SearchField-DY6-UbRT.js";import{E as ie,S as le,s as ce,a as oe}from"./SecretTooltip-CZTRnaCV.js";import{c as V,h as q,b as me}from"./@tanstack-5gTMR7G2.js";import{S as de}from"./Lock-CrIAdQo6.js";import{D as ue}from"./DisplayDate-8RESqe5H.js";import{c as xe}from"./code-snippets-CqONne41.js";import{L as w,f as he}from"./@react-router-DeDfXbUF.js";import{S as I}from"./trash-DP6Tpp_E.js";import{D as b}from"./DialogItem-ClFCqxEp.js";import{S as pe}from"./eye-CbVlAYty.js";import{S as L}from"./plus-Cl0_rCVF.js";import{t as fe}from"./zod-XdS2h1ws.js";import{u as je,b as ge,C as g}from"./index.esm-DhJo3mA6.js";import"./@reactflow-8OCk19Fi.js";import"./chevron-right-double-Dgp_gEsp.js";import"./index-DWpiv-Ft.js";import"./CodeSnippet-D2HkkAGr.js";import"./info-QkbQz4QU.js";async function ye(t){const s=C(E.secrets.detail(t)),a=await D(s,{method:"DELETE",headers:{"Content-Type":"application/json"}});if(a.status===404&&$(),!a.ok)throw new k({message:"Error deleting secret",status:a.status,statusText:a.statusText});return a.json()}function Ne(t){return V({mutationFn:async s=>ye(s),...t})}function Se({secretId:t}){const s=q(),{mutate:a}=Ne({onSuccess(){s.invalidateQueries({queryKey:["secrets"]})}}),[r,n]=p.useState("");function o(){a(t)}function m(x){n(x.target.value)}return e.jsxs(T,{children:[e.jsx(P,{children:e.jsx(F,{children:"Delete secret"})}),e.jsxs("div",{className:"gap-5 p-5",children:[e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Are you sure you want to delete this secret?"}),e.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"This action cannot be undone."}),e.jsx("h3",{className:"font-inter text-sm mb-1 mt-4 text-left font-medium leading-5",children:"Please type DELETE to confirm"}),e.jsx(j,{name:"key",onChange:m,className:"w-full",required:!0,value:r})]}),e.jsxs(O,{className:"gap-[10px]",children:[e.jsx(A,{asChild:!0,children:e.jsx(u,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(u,{intent:"danger",type:"submit",form:"edit-secret-form",onClick:o,disabled:r!=="DELETE",children:"Delete"})]})]})}function ve({secretId:t}){const[s,a]=p.useState(!1),[r,n]=p.useState(!1),o=p.useRef(null),m=p.useRef(null);function x(){m.current=o.current}function h(d){if(d===!1){a(!1),setTimeout(()=>{n(d)},200);return}n(d)}return e.jsxs(K,{onOpenChange:a,open:s,children:[e.jsx(H,{ref:o,children:e.jsx(G,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsxs(U,{hidden:r,onCloseAutoFocus:d=>{m.current&&(m.current.focus(),m.current=null,d.preventDefault())},align:"end",sideOffset:7,children:[e.jsx(b,{onSelect:x,onOpenChange:h,triggerChildren:"Edit ",icon:e.jsx(J,{}),children:e.jsx(ie,{secretId:t,isSecretNameEditable:!0,dialogTitle:"Edit secret"})}),e.jsx(b,{onSelect:x,onOpenChange:h,triggerChildren:"Delete ",icon:e.jsx(I,{}),children:e.jsx(Se,{secretId:t})})]})]})}const we=[{id:"secret",header:"Secret",accessorFn:t=>t.name,cell:({getValue:t,row:s})=>{const a=xe(s.original.name);return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(de,{className:"h-5 w-5 flex-shrink-0 fill-primary-400"}),e.jsxs("div",{className:"group/copybutton flex flex-col",children:[e.jsxs("div",{className:"flex flex-row items-center space-x-1",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(w,{className:"text-text-md font-semibold text-theme-text-primary",to:S.settings.secrets.detail(s.original.id),children:s.original.name}),e.jsx(le,{code:a})]}),e.jsx(v,{copyText:t()})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(w,{to:S.settings.secrets.detail(s.original.id),className:"flex items-center gap-1 text-text-sm text-theme-text-secondary",children:s.original.id.slice(0,8)}),e.jsx(v,{copyText:s.original.id})]})]})]})}},{id:"author",header:"Author",accessorFn:t=>{var s,a;return(a=(s=t.resources)==null?void 0:s.user)==null?void 0:a.name},cell:({getValue:t})=>{const s=t();return s?e.jsx(W,{username:s}):null}},{id:"created_at",header:"Created At",accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.created},cell:({getValue:t})=>e.jsx("p",{className:"text-text-sm text-theme-text-secondary",children:e.jsx(ue,{dateString:t()})})},{id:"admin_actions",header:"",accessorFn:t=>String(t.id),cell:({row:t,getValue:s})=>{var r,n,o;const a=s();return(o=(n=(r=t.original.resources)==null?void 0:r.user)==null?void 0:n.body)!=null&&o.is_admin?e.jsx(ve,{secretId:a}):e.jsx("p",{className:"text-sm text-theme-text-secondary",children:"No Actions"})}}],y=1,be=f.object({page:f.coerce.number().min(y).optional().default(y).catch(y),name:f.string().optional(),operator:f.enum(["and","or"]).optional()});function De(){const[t]=he(),{page:s,name:a,operator:r}=be.parse({page:t.get("page")||void 0,name:t.get("name")||void 0,operator:t.get("operator")||void 0});return{page:s,name:a,logical_operator:r}}async function Ce(t){const s=C(E.secrets.all),a=await D(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){const r=await a.json().then(n=>n.detail).catch(()=>"Failed to create Secret");throw new k({status:a.status,statusText:a.statusText,message:r})}return a.json()}function ke(t){return V({mutationFn:async s=>Ce(s),...t})}function Ee(){const[t,s]=p.useState(!1),a=X();if(a.isPending)return e.jsx(N,{className:"h-7 w-full"});if(a.isError)return e.jsx("div",{children:"Error loading user"});const r=a.data.id;return e.jsxs(Y,{open:t,onOpenChange:s,children:[e.jsx(Z,{asChild:!0,children:e.jsxs(u,{size:"md",className:"shrink-0",intent:"primary",children:[e.jsx(L,{className:"h-5 w-5 shrink-0 fill-white"}),e.jsx("span",{children:"New Secret"})]})}),e.jsxs(T,{className:"mx-auto w-[90vw] max-w-[744px]",children:[e.jsx(P,{children:e.jsx(F,{children:"Register New Secret"})}),e.jsx(Te,{userId:r,setOpen:s})]})]})}function Te({userId:t,setOpen:s}){const{handleSubmit:a,control:r,watch:n,setValue:o,formState:{isValid:m},reset:x}=je({resolver:fe(ce),defaultValues:{secretName:"",keysValues:[{key:"",value:""}]}}),{fields:h,append:d,remove:_}=ge({control:r,name:"keysValues"}),{toast:z}=ee(),R=q(),{mutate:M}=ke({onError(i){se(i)&&z({status:"error",emphasis:"subtle",description:i.message,rounded:!0})},onSuccess(){R.invalidateQueries({queryKey:["secrets"]}),s(!1),x()}}),Q=i=>{M({user:t,name:i.secretName,values:i.keysValues.reduce((l,c)=>(c.key&&c.value&&(l[c.key]=c.value),l),{})})},B=i=>{Q(i)};return e.jsxs(e.Fragment,{children:[e.jsx("form",{id:"create-secret-form",className:"gap-5 p-5",onSubmit:a(B),children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("label",{className:"font-inter text-sm text-left font-medium leading-5",children:["Secret Name",e.jsx("span",{className:"ml-1 text-theme-text-error",children:"*"})]}),e.jsx(g,{name:"secretName",control:r,render:({field:i})=>e.jsx(j,{...i,className:"mb-3 w-full",required:!0})})]}),e.jsxs("div",{className:"mt-10",children:[e.jsx("div",{children:e.jsx("h1",{className:"font-inter text-lg text-left font-semibold",children:"Keys"})}),e.jsxs("div",{className:"mt-5 flex flex-row",children:[e.jsx("div",{className:"flex-grow",children:e.jsx("label",{className:"font-inter text-sm text-left font-medium",children:"Key"})}),e.jsx("div",{className:"flex-grow pr-12",children:e.jsx("label",{className:"font-inter text-sm text-left font-medium",children:"Value"})})]})]}),h.map((i,l)=>e.jsxs("div",{className:"flex flex-row items-center space-x-1",children:[e.jsx("div",{className:"relative flex-grow",children:e.jsx(g,{name:`keysValues.${l}.key`,control:r,render:({field:c})=>e.jsx(j,{...c,className:"mb-2 w-full",required:!0,placeholder:"key"})})}),e.jsx("div",{className:"relative flex-grow",children:e.jsxs("div",{className:"relative",children:[e.jsx(g,{name:`keysValues.${l}.value`,control:r,render:({field:c})=>e.jsx(j,{...c,className:"mb-2 w-full pr-10",required:!0,placeholder:"•••••••••",type:n(`keysValues.${l}.showPassword`)?"text":"password"})}),e.jsx("button",{type:"button",onClick:()=>{const c=n(`keysValues.${l}.showPassword`);o(`keysValues.${l}.showPassword`,!c)},className:"absolute inset-y-1 right-0 flex items-center pb-1 pr-3",children:e.jsx(pe,{className:"h-4 w-4 flex-shrink-0"})})]})}),e.jsxs("div",{className:"flex items-center",children:[l===h.length-1&&e.jsx(u,{intent:"primary",emphasis:"subtle",onClick:()=>d({key:"",value:""}),className:"mb-2 flex h-7 w-7 items-center justify-center",children:e.jsx(L,{className:"flex-shrink-0 fill-primary-600"})}),l!==h.length-1&&e.jsx(u,{intent:"secondary",emphasis:"minimal",onClick:()=>_(l),className:"mb-2 h-7 w-7 items-center justify-center",children:e.jsx(I,{className:"flex-shrink-0 fill-theme-text-secondary"})})]})]},i.id))]})}),e.jsxs(O,{className:"gap-[10px]",children:[e.jsx(A,{asChild:!0,children:e.jsx(u,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(u,{intent:"primary",disabled:!m,type:"submit",form:"create-secret-form",children:"Register Secret"})]})]})}function Pe(){const t=De(),{data:s}=me({...oe.secretList({...t,sort_by:"desc:created"}),throwOnError:!0});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsx(re,{searchParams:t}),e.jsx(Ee,{})]}),e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:s?e.jsx(te,{columns:we,data:s.items}):e.jsx(N,{className:"h-[250px] w-full"})}),s?s.total_pages>1&&e.jsx(ne,{searchParams:t,paginate:s}):e.jsx(N,{className:"h-[36px] w-[300px]"})]})]})}function Xe(){return e.jsxs(ae,{className:"space-y-4 p-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Secrets"}),e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:["Configure and manage your pipeline secrets and configurations."," ",e.jsx("a",{target:"_blank",rel:"noreferrer noopener",href:"https://docs.zenml.io/how-to/interact-with-secrets",className:"link text-primary-400",children:"Learn More"})]})]}),e.jsx(Pe,{})]})}export{Xe as default};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as u,j as a}from"./@radix-
|
2
|
-
Length provided: ${this.length}. Number of dictionaries provided: ${this.dictionaries.length}`);let r=this.seed;return this.dictionaries.slice(0,this.length).reduce((t,s)=>{let o;r?(o=(l=>{if(typeof l=="string"){const c=l.split("").map(d=>d.charCodeAt(0)).reduce((d,b)=>d+b,1),n=Math.floor(Number(c));return m(n)}return m(l)})(r),r=4294967296*o):o=Math.random();let i=s[Math.floor(o*s.length)]||"";if(this.style==="lowerCase")i=i.toLowerCase();else if(this.style==="capital"){const[l,...c]=i.split("");i=l.toUpperCase()+c.join("")}else this.style==="upperCase"&&(i=i.toUpperCase());return t?`${t}${this.separator}${i}`:`${i}`},"")}}const p={separator:"_",dictionaries:[]},_=e=>{const r=[...e&&e.dictionaries||p.dictionaries],t={...p,...e,length:e&&e.length||r.length,dictionaries:r};if(!e||!e.dictionaries||!e.dictionaries.length)throw new Error('A "dictionaries" array must be provided. This is a breaking change introduced starting from Unique Name Generator v4. Read more about the breaking change here: https://github.com/andreasonny83/unique-names-generator#migration-guide');return new L(t).generate()};var H=["aardvark","aardwolf","albatross","alligator","alpaca","amphibian","anaconda","angelfish","anglerfish","ant","anteater","antelope","antlion","ape","aphid","armadillo","asp","baboon","badger","bandicoot","barnacle","barracuda","basilisk","bass","bat","bear","beaver","bedbug","bee","beetle","bird","bison","blackbird","boa","boar","bobcat","bobolink","bonobo","booby","bovid","bug","butterfly","buzzard","camel","canid","canidae","capybara","cardinal","caribou","carp","cat","caterpillar","catfish","catshark","cattle","centipede","cephalopod","chameleon","cheetah","chickadee","chicken","chimpanzee","chinchilla","chipmunk","cicada","clam","clownfish","cobra","cockroach","cod","condor","constrictor","coral","cougar","cow","coyote","crab","crane","crawdad","crayfish","cricket","crocodile","crow","cuckoo","damselfly","deer","dingo","dinosaur","dog","dolphin","donkey","dormouse","dove","dragon","dragonfly","duck","eagle","earthworm","earwig","echidna","eel","egret","elephant","elk","emu","ermine","falcon","felidae","ferret","finch","firefly","fish","flamingo","flea","fly","flyingfish","fowl","fox","frog","galliform","gamefowl","gayal","gazelle","gecko","gerbil","gibbon","giraffe","goat","goldfish","goose","gopher","gorilla","grasshopper","grouse","guan","guanaco","guineafowl","gull","guppy","haddock","halibut","hamster","hare","harrier","hawk","hedgehog","heron","herring","hippopotamus","hookworm","hornet","horse","hoverfly","hummingbird","hyena","iguana","impala","jackal","jaguar","jay","jellyfish","junglefowl","kangaroo","kingfisher","kite","kiwi","koala","koi","krill","ladybug","lamprey","landfowl","lark","leech","lemming","lemur","leopard","leopon","limpet","lion","lizard","llama","lobster","locust","loon","louse","lungfish","lynx","macaw","mackerel","magpie","mammal","manatee","mandrill","marlin","marmoset","marmot","marsupial","marten","mastodon","meadowlark","meerkat","mink","minnow","mite","mockingbird","mole","mollusk","mongoose","monkey","moose","mosquito","moth","mouse","mule","muskox","narwhal","newt","nightingale","ocelot","octopus","opossum","orangutan","orca","ostrich","otter","owl","ox","panda","panther","parakeet","parrot","parrotfish","partridge","peacock","peafowl","pelican","penguin","perch","pheasant","pig","pigeon","pike","pinniped","piranha","planarian","platypus","pony","porcupine","porpoise","possum","prawn","primate","ptarmigan","puffin","puma","python","quail","quelea","quokka","rabbit","raccoon","rat","rattlesnake","raven","reindeer","reptile","rhinoceros","roadrunner","rodent","rook","rooster","roundworm","sailfish","salamander","salmon","sawfish","scallop","scorpion","seahorse","shark","sheep","shrew","shrimp","silkworm","silverfish","skink","skunk","sloth","slug","smelt","snail","snake","snipe","sole","sparrow","spider","spoonbill","squid","squirrel","starfish","stingray","stoat","stork","sturgeon","swallow","swan","swift","swordfish","swordtail","tahr","takin","tapir","tarantula","tarsier","termite","tern","thrush","tick","tiger","tiglon","toad","tortoise","toucan","trout","tuna","turkey","turtle","tyrannosaurus","unicorn","urial","vicuna","viper","vole","vulture","wallaby","walrus","warbler","wasp","weasel","whale","whippet","whitefish","wildcat","wildebeest","wildfowl","wolf","wolverine","wombat","woodpecker","worm","wren","xerinae","yak","zebra"],
|
1
|
+
import{r as u,j as a}from"./@radix-Cdvw4jJ8.js";import{u as h,c as w,S as v,a as y,b as k}from"./form-schemas-CrznJVzA.js";import{S}from"./SetPassword-BjNGDC5e.js";import{I as x,B as j,f as N,i as A,F as C,j as q,u as P,a as z,S as E}from"./index-BFqbGSck.js";import{u as F}from"./index.esm-DhJo3mA6.js";import{t as M}from"./zod-XdS2h1ws.js";import{c as T}from"./@tanstack-5gTMR7G2.js";import{u as U}from"./login-mutation-D3tFP6Wm.js";import"./check-circle-C4tYvbtw.js";import"./@react-router-DeDfXbUF.js";import"./UpdatePasswordSchemas-CNfKDo2Q.js";import"./PasswordChecker-B88WjuCe.js";import"./@reactflow-8OCk19Fi.js";const g=u.createContext(null);function $({children:e,initialSettings:r}){const[t,s]=u.useState(r||{});return a.jsx(g.Provider,{value:{serverSettings:t,setServerSettings:s},children:e})}function f(){const e=u.useContext(g);if(e===null)throw new Error("useServerActivationContext must be used within an ServerActivationProvider");return e}function I(){const{setSurveyStep:e}=h(),{setServerSettings:r}=f();function t({newPassword:s,username:o}){r(i=>({...i,admin_password:s,admin_username:o})),e(i=>i+1)}return a.jsx(S,{displayUsername:!0,headline:"Create your admin user and password",subHeadine:"Select a username and password for your admin account",submitHandler:t})}const m=e=>{e=1831565813+(e|=0)|0;let r=Math.imul(e^e>>>15,1|e);return r=r+Math.imul(r^r>>>7,61|r)^r,((r^r>>>14)>>>0)/4294967296};class L{constructor(r){this.dictionaries=void 0,this.length=void 0,this.separator=void 0,this.style=void 0,this.seed=void 0;const{length:t,separator:s,dictionaries:o,style:i,seed:l}=r;this.dictionaries=o,this.separator=s,this.length=t,this.style=i,this.seed=l}generate(){if(!this.dictionaries)throw new Error('Cannot find any dictionary. Please provide at least one, or leave the "dictionary" field empty in the config object');if(this.length<=0)throw new Error("Invalid length provided");if(this.length>this.dictionaries.length)throw new Error(`The length cannot be bigger than the number of dictionaries.
|
2
|
+
Length provided: ${this.length}. Number of dictionaries provided: ${this.dictionaries.length}`);let r=this.seed;return this.dictionaries.slice(0,this.length).reduce((t,s)=>{let o;r?(o=(l=>{if(typeof l=="string"){const c=l.split("").map(d=>d.charCodeAt(0)).reduce((d,b)=>d+b,1),n=Math.floor(Number(c));return m(n)}return m(l)})(r),r=4294967296*o):o=Math.random();let i=s[Math.floor(o*s.length)]||"";if(this.style==="lowerCase")i=i.toLowerCase();else if(this.style==="capital"){const[l,...c]=i.split("");i=l.toUpperCase()+c.join("")}else this.style==="upperCase"&&(i=i.toUpperCase());return t?`${t}${this.separator}${i}`:`${i}`},"")}}const p={separator:"_",dictionaries:[]},_=e=>{const r=[...e&&e.dictionaries||p.dictionaries],t={...p,...e,length:e&&e.length||r.length,dictionaries:r};if(!e||!e.dictionaries||!e.dictionaries.length)throw new Error('A "dictionaries" array must be provided. This is a breaking change introduced starting from Unique Name Generator v4. Read more about the breaking change here: https://github.com/andreasonny83/unique-names-generator#migration-guide');return new L(t).generate()};var H=["aardvark","aardwolf","albatross","alligator","alpaca","amphibian","anaconda","angelfish","anglerfish","ant","anteater","antelope","antlion","ape","aphid","armadillo","asp","baboon","badger","bandicoot","barnacle","barracuda","basilisk","bass","bat","bear","beaver","bedbug","bee","beetle","bird","bison","blackbird","boa","boar","bobcat","bobolink","bonobo","booby","bovid","bug","butterfly","buzzard","camel","canid","canidae","capybara","cardinal","caribou","carp","cat","caterpillar","catfish","catshark","cattle","centipede","cephalopod","chameleon","cheetah","chickadee","chicken","chimpanzee","chinchilla","chipmunk","cicada","clam","clownfish","cobra","cockroach","cod","condor","constrictor","coral","cougar","cow","coyote","crab","crane","crawdad","crayfish","cricket","crocodile","crow","cuckoo","damselfly","deer","dingo","dinosaur","dog","dolphin","donkey","dormouse","dove","dragon","dragonfly","duck","eagle","earthworm","earwig","echidna","eel","egret","elephant","elk","emu","ermine","falcon","felidae","ferret","finch","firefly","fish","flamingo","flea","fly","flyingfish","fowl","fox","frog","galliform","gamefowl","gayal","gazelle","gecko","gerbil","gibbon","giraffe","goat","goldfish","goose","gopher","gorilla","grasshopper","grouse","guan","guanaco","guineafowl","gull","guppy","haddock","halibut","hamster","hare","harrier","hawk","hedgehog","heron","herring","hippopotamus","hookworm","hornet","horse","hoverfly","hummingbird","hyena","iguana","impala","jackal","jaguar","jay","jellyfish","junglefowl","kangaroo","kingfisher","kite","kiwi","koala","koi","krill","ladybug","lamprey","landfowl","lark","leech","lemming","lemur","leopard","leopon","limpet","lion","lizard","llama","lobster","locust","loon","louse","lungfish","lynx","macaw","mackerel","magpie","mammal","manatee","mandrill","marlin","marmoset","marmot","marsupial","marten","mastodon","meadowlark","meerkat","mink","minnow","mite","mockingbird","mole","mollusk","mongoose","monkey","moose","mosquito","moth","mouse","mule","muskox","narwhal","newt","nightingale","ocelot","octopus","opossum","orangutan","orca","ostrich","otter","owl","ox","panda","panther","parakeet","parrot","parrotfish","partridge","peacock","peafowl","pelican","penguin","perch","pheasant","pig","pigeon","pike","pinniped","piranha","planarian","platypus","pony","porcupine","porpoise","possum","prawn","primate","ptarmigan","puffin","puma","python","quail","quelea","quokka","rabbit","raccoon","rat","rattlesnake","raven","reindeer","reptile","rhinoceros","roadrunner","rodent","rook","rooster","roundworm","sailfish","salamander","salmon","sawfish","scallop","scorpion","seahorse","shark","sheep","shrew","shrimp","silkworm","silverfish","skink","skunk","sloth","slug","smelt","snail","snake","snipe","sole","sparrow","spider","spoonbill","squid","squirrel","starfish","stingray","stoat","stork","sturgeon","swallow","swan","swift","swordfish","swordtail","tahr","takin","tapir","tarantula","tarsier","termite","tern","thrush","tick","tiger","tiglon","toad","tortoise","toucan","trout","tuna","turkey","turtle","tyrannosaurus","unicorn","urial","vicuna","viper","vole","vulture","wallaby","walrus","warbler","wasp","weasel","whale","whippet","whitefish","wildcat","wildebeest","wildfowl","wolf","wolverine","wombat","woodpecker","worm","wren","xerinae","yak","zebra"],B=["amaranth","amber","amethyst","apricot","aqua","aquamarine","azure","beige","black","blue","blush","bronze","brown","chocolate","coffee","copper","coral","crimson","cyan","emerald","fuchsia","gold","gray","green","harlequin","indigo","ivory","jade","lavender","lime","magenta","maroon","moccasin","olive","orange","peach","pink","plum","purple","red","rose","salmon","sapphire","scarlet","silver","tan","teal","tomato","turquoise","violet","white","yellow"];const D=["booby","swallow"];function R(){return _({dictionaries:[B,H.filter(e=>!D.includes(e))]})}function V({submitHandler:e}){const r=u.useId(),{handleSubmit:t,register:s,formState:{isValid:o}}=F({resolver:M(w),defaultValues:{serverName:R()}});return a.jsxs("div",{className:"max-w-[570px] space-y-5",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-display-xs font-semibold",children:"Almost there! Select a server name"}),a.jsx("p",{className:"text-theme-text-secondary",children:"This will identify your ZenML server. You can use the generated name or create your own."})]}),a.jsxs("form",{onSubmit:t(e),className:"space-y-5",children:[a.jsx("div",{className:"space-y-2",children:a.jsxs("div",{className:"space-y-0.5",children:[a.jsx("label",{htmlFor:r,className:"text-text-sm",children:"Server Name"}),a.jsx(x,{...s("serverName"),id:r,className:"w-full"})]})}),a.jsx(j,{disabled:!o,className:"w-full text-center",size:"md",children:a.jsx("span",{className:"w-full",children:"Activate your Server"})})]})]})}async function Y(e){const r=A(q.activate),t=await N(r,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const s=await t.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Failed to activate server");throw new C({status:t.status,statusText:t.statusText,message:s})}return t.json()}function Z(e){return T({mutationFn:async r=>Y(r),...e})}function G({setUsername:e}){const{serverSettings:r}=f(),{setSurveyStep:t}=h(),{setAuthState:s}=P(),{toast:o}=z(),{mutate:i}=U({onSuccess:()=>{s("true"),t(n=>n+1)}}),{mutate:l}=Z({onSuccess:async n=>{e(n.name),i({username:n.name,password:r.admin_password??void 0})},onError:n=>{n instanceof Error&&o({status:"error",emphasis:"subtle",icon:a.jsx(E,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:n.message,rounded:!0})}});function c({serverName:n}){l({...r,server_name:n})}return a.jsx(V,{submitHandler:c})}function J(){const{surveyStep:e}=h(),[r,t]=u.useState("");return a.jsx(a.Fragment,{children:a.jsxs($,{children:[a.jsx(v,{stepAmount:2}),e===1&&a.jsx(I,{}),e===2&&a.jsx(G,{setUsername:t}),e===3&&a.jsx(y,{subHeader:"Your created your ZenML account",username:r})]})})}function le(){return a.jsx(k,{children:a.jsx(J,{})})}export{le as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as i,j as e}from"./@radix-Cdvw4jJ8.js";import{g as o,B as n,r as c,bh as d}from"./index-BFqbGSck.js";import{S as h}from"./StackList-BdiR5DvR.js";import{p as m,c as j}from"./persist-Dec_w7aB.js";import{p as l,c as k}from"./persist-DWMWVP-y.js";import{I as p}from"./Infobox-CGxFvqzi.js";import{s as u}from"./index-BjUu1mP4.js";import{b as f}from"./@tanstack-5gTMR7G2.js";import{L as x}from"./@react-router-DeDfXbUF.js";import"./@reactflow-8OCk19Fi.js";import"./plus-Cl0_rCVF.js";import"./refresh-BcTM09NW.js";import"./SearchField-DY6-UbRT.js";import"./chevron-right-double-Dgp_gEsp.js";import"./index-DWpiv-Ft.js";import"./DisplayDate-8RESqe5H.js";import"./CodeSnippet-D2HkkAGr.js";import"./CollapsibleCard-CnS09ljw.js";import"./chevron-down-jbbQh82s.js";import"./check-circle-C4tYvbtw.js";import"./SheetHeader-CASpN2Lz.js";import"./components-Br2ezRib.js";import"./NumberBox-C0mQktmV.js";import"./ComponentBadge-CDgdd0Ks.js";import"./ComponentIcon-CbbOc7lb.js";import"./layout-DBbfEFBe.js";import"./transform-CeZdrxDZ.js";import"./trash-DP6Tpp_E.js";import"./DialogItem-ClFCqxEp.js";import"./AlertDialogDropdownItem-CZW4QyWn.js";import"./sharedSchema-BXzg0EZz.js";import"./index.es-C1gfATPn.js";import"./info-QkbQz4QU.js";import"./stack-detail-query-Cm0fsgo-.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 b({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!a&&!s?null:e.jsxs("div",{className:"space-y-5",children:[a&&e.jsx(w,{setHasResumeableStack:t}),s&&e.jsx(b,{setHasResumeableTerraform:r})]})}function re(){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 py-5",children:[e.jsx(v,{}),e.jsx(h,{})]})}export{re as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{j as e,r as j}from"./@radix-Cdvw4jJ8.js";import{B as i,r as u,f as D,i as S,F as b,j as T,aO as x,A as g,k,z as c,D as R,l as A,m as P,p as B,an as E,C as h,v as p,G as L,aP as F,g as f,x as _,b as I}from"./index-BFqbGSck.js";import{S as M,P as z}from"./SearchField-DY6-UbRT.js";import{c as O,b as C}from"./@tanstack-5gTMR7G2.js";import{S as H}from"./refresh-BcTM09NW.js";import{S as $}from"./plus-Cl0_rCVF.js";import{L as m,f as G}from"./@react-router-DeDfXbUF.js";import{c as Q,u as K}from"./bulk-delete-C_kpIB9A.js";import{S as y}from"./trash-DP6Tpp_E.js";import{D as U,a as q}from"./DeleteAlertDialog-VIOMDLmx.js";import{C as J,R as V}from"./resource-type-tooltip-DwHrJstL.js";import{e as W,R as X,E as Y}from"./service-connectors-DSEMwJ5A.js";import"./@reactflow-8OCk19Fi.js";import"./chevron-right-double-Dgp_gEsp.js";import"./index-DWpiv-Ft.js";import"./zod-XdS2h1ws.js";import"./index.esm-DhJo3mA6.js";import"./type-guards-CNgPYg8l.js";function Z(){return e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:"Service Connectors"}),e.jsxs("p",{className:"text-text-sm text-theme-text-secondary",children:["Configure and manage your service connectors."," ",e.jsx("a",{target:"_blank",rel:"noreferrer noopener",href:"https://docs.zenml.io/how-to/infrastructure-deployment/auth-management",className:"link text-text-sm text-primary-400",children:"Learn More"})]})]})}function ee(){return e.jsx(i,{size:"md",asChild:!0,children:e.jsxs(m,{to:u.settings.connectors.create,children:[e.jsx($,{className:"h-5 w-5 shrink-0 fill-white"}),e.jsx("span",{children:"New Connector"})]})})}async function te({connectorId:t}){const s=S(T.serviceConnectors.detail(t)),n=await D(s,{method:"DELETE"});if(!n.ok){const r=await n.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>`Error while deleting connector ${t}`);throw new b({status:n.status,statusText:n.statusText,message:r})}return n.json()}function se(t){return O({...t,mutationFn:async({connectorId:s})=>te({connectorId:s})})}const{ContextProvider:ne,useContext:l}=Q();function w(){const{setRowSelection:t}=l(),{mutateAsync:s}=se();async function n(r){await s({connectorId:r})}return K({deleteFn:n,queryKeyToInvalidate:[...x.connectors],setRowSelection:t})}function v({deleteHandler:t}){return e.jsx(U,{title:"Delete Connectors",handleDelete:t,children:e.jsxs(q,{children:[e.jsx("p",{children:"Are you sure?"}),e.jsx("p",{children:"This action cannot be undone."})]})})}function re({deleteHandler:t,open:s,setOpen:n}){return e.jsx(g,{open:s,onOpenChange:n,children:e.jsx(v,{deleteHandler:t})})}function oe(){const{selectedRowCount:t,selectedRowIDs:s}=l(),{bulkDelete:n}=w();async function r(){await n(s)}const o=t>1?"s":"",a=`${t} Service connector${o} selected`;return e.jsxs("div",{className:"flex h-7 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:a}),e.jsxs(g,{children:[e.jsx(k,{asChild:!0,children:e.jsxs(i,{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(v,{deleteHandler:r})]})]})}function ae({queryParams:t}){const{selectedRowCount:s}=l();return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[s>0?e.jsx(oe,{}):e.jsx(M,{searchParams:t}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ce,{queryParams:t}),e.jsx(ee,{})]})]})})}function ce({queryParams:t}){const{refetch:s}=C(x.serviceConnectorList(t));return e.jsxs(i,{intent:"primary",emphasis:"subtle",size:"md",onClick:()=>s(),children:[e.jsx(H,{className:"h-5 w-5 fill-theme-text-brand"}),"Refresh"]})}const d=1,ie=c.object({page:c.coerce.number().min(d).optional().default(d).catch(d),name:c.string().optional(),operator:c.enum(["and","or"]).optional()});function le(){const[t]=G(),{page:s,name:n,operator:r}=ie.parse({page:t.get("page")||void 0,name:t.get("name")||void 0,sortBy:t.get("sort_by")||void 0});return{page:s,name:n,logical_operator:r}}function de({id:t}){const[s,n]=j.useState(!1),{bulkDelete:r}=w();async function o(){await r([t]),n(!1)}return e.jsxs(e.Fragment,{children:[e.jsx(re,{deleteHandler:o,open:s,setOpen:n}),e.jsxs(R,{children:[e.jsx(A,{asChild:!0,children:e.jsx(i,{intent:"secondary",emphasis:"minimal",className:"flex aspect-square items-center justify-center p-0",children:e.jsx(P,{className:"h-4 w-4 shrink-0 fill-theme-text-tertiary"})})}),e.jsx(B,{align:"end",sideOffset:7,children:e.jsxs(E,{onSelect:()=>n(!0),className:"cursor-pointer space-x-2",children:[e.jsx(y,{className:"h-3 w-3 fill-neutral-400"}),e.jsx("p",{children:"Delete"})]})})]})]})}function ue(){return j.useMemo(()=>[{id:"select",meta:{width:"1%"},header:({table:t})=>e.jsx(h,{id:"check-all",checked:t.getIsAllRowsSelected(),onCheckedChange:s=>t.toggleAllRowsSelected(s==="indeterminate"?!0:s)}),cell:({row:t})=>e.jsx(h,{id:`check-${t.id}`,checked:t.getIsSelected(),onCheckedChange:t.getToggleSelectedHandler()})},{id:"name",header:"Service Connector",accessorKey:"name",cell:({row:t})=>{var o;const s=t.original.id,n=t.original.name,r=(o=t.original.body)==null?void 0:o.connector_type;return e.jsxs("div",{className:"group/copybutton flex items-center gap-2",children:[!!r&&typeof r!="string"&&e.jsx(J,{connectorType:r}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(m,{to:u.settings.connectors.detail.configuration(s),className:"block max-w-[200px] truncate text-text-md font-semibold",children:n}),e.jsx(p,{copyText:n})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(m,{to:u.settings.connectors.detail.configuration(s),children:s.split("-")[0]}),e.jsx(p,{copyText:s})]})]})]})}},{id:"resource_types",header(){return e.jsx("p",{className:"whitespace-nowrap",children:"Resource Types"})},cell:({row:t})=>{const s=W(t.original);return e.jsx("div",{className:"flex items-center gap-0.5",children:s.map((n,r)=>e.jsx(V,{resourceType:n},r))})}},{id:"resource-name",header(){return e.jsx("p",{className:"whitespace-nowrap",children:"Resource Name"})},cell:({row:t})=>e.jsx("div",{className:"max-w-[100px]",children:e.jsx(X,{connector:t.original})})},{id:"user",header:"Author",accessorFn:t=>{var s,n;return(n=(s=t.resources)==null?void 0:s.user)==null?void 0:n.name},cell:({row:t})=>{var n;const s=(n=t.original.resources)==null?void 0:n.user;return s?e.jsx(L,{className:"max-w-[200px] truncate",username:F(s)}):null}},{id:"expires",header(){return e.jsx("p",{className:"whitespace-nowrap",children:"Expires in"})},accessorFn:t=>{var s;return(s=t.body)==null?void 0:s.expires_at},cell:({row:t})=>{var n;const s=(n=t.original.body)==null?void 0:n.expires_at;return s?e.jsx(Y,{expires:s}):e.jsx("p",{children:"Never"})}},{id:"admin_actions",header:"",cell:({row:t})=>e.jsx(de,{id:t.original.id})}],[])}function me({queryParams:t}){const{rowSelection:s,setRowSelection:n}=l(),r=C({...x.serviceConnectorList(t)}),o=ue();if(r.isPending)return e.jsxs("div",{className:"space-y-5",children:[e.jsx(f,{className:"h-[300px] w-full"}),e.jsx(f,{className:"mx-auto h-[36px] w-[300px]"})]});if(r.isError)return null;const a=r.data;return e.jsx("section",{className:"flex flex-col gap-5",children:e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[e.jsx("div",{className:"w-full",children:e.jsx(_,{columns:o,data:a.items,rowSelection:s,getRowId:N=>N.id,onRowSelectionChange:n})}),a.total_pages>1&&e.jsx(z,{searchParams:t,paginate:a})]})})}function xe(){const s={...le(),sort_by:"desc:updated"};return e.jsxs(e.Fragment,{children:[e.jsx(ae,{queryParams:s}),e.jsx(me,{queryParams:s})]})}function Be(){return e.jsxs(I,{className:"space-y-4 p-5",children:[e.jsx(Z,{}),e.jsx(ne,{children:e.jsx(xe,{})})]})}export{Be as default};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{j as e,r as f}from"./@radix-Cdvw4jJ8.js";import{z as d,i as x,j as h,o as N,f as j,F as p,b as m,a as S,C as D,B as C,S as P,V as E}from"./index-BFqbGSck.js";import{f as _}from"./@react-router-DeDfXbUF.js";import{E as F}from"./EmptyState-CjrgDtVk.js";import{b as T,c as k}from"./@tanstack-5gTMR7G2.js";import{E as I}from"./Error-CQzjbDcN.js";import{t as V}from"./zod-XdS2h1ws.js";import{u as A,C as z}from"./index.esm-DhJo3mA6.js";import{S as q}from"./check-circle-C4tYvbtw.js";import"./@reactflow-8OCk19Fi.js";const B=d.object({device_id:d.string().optional(),user_code:d.string().optional()});function Y(){const[s]=_(),{device_id:t,user_code:i}=B.parse({device_id:s.get("device_id")||void 0,user_code:s.get("user_code")||void 0});return{user_code:i,device_id:t}}const K=d.object({trustDevice:d.boolean()});function L({deviceId:s,queryParams:t}){return["devices",s,t]}async function R({deviceId:s,queryParams:t}){const i=x(h.devices.detail(s)+"?"+N(t)),r=await j(i,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}});if(!r.ok)throw new p({message:"Error while fetching Device details",status:r.status,statusText:r.statusText});return r.json()}function W(s,t){return T({queryKey:L(s),queryFn:async()=>R(s),...t})}function G({device:s}){var t,i,r,a,c,n;return e.jsx(m,{className:"w-full p-5",children:e.jsxs("dl",{className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("dt",{children:"IP Address"}),e.jsx("dd",{children:(t=s.body)==null?void 0:t.ip_address})]}),((i=s.metadata)==null?void 0:i.city)&&((r=s.metadata)==null?void 0:r.country)&&e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("dt",{children:"Location"}),e.jsxs("dd",{children:[(a=s.metadata)==null?void 0:a.city,", ",(c=s.metadata)==null?void 0:c.country]})]}),e.jsxs("div",{className:"flex min-w-0 items-center justify-between",children:[e.jsx("dt",{children:"Hostname"}),e.jsx("dd",{className:"truncate",children:(n=s.body)==null?void 0:n.hostname})]})]})})}async function H({deviceId:s,payload:t}){const i=x(h.devices.verify(s)),r=await j(i,{method:"PUT",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){const a=await r.json().then(c=>c.detail).catch(()=>["","Failed to verify device."]);throw new p({status:r.status,statusText:r.statusText,message:a[1]||"Failed to verify device."})}return r.json()}function J(s){return k({mutationFn:async t=>H(t),...s})}function M({deviceId:s,user_code:t,setSuccess:i}){const r=f.useId(),{handleSubmit:a,formState:{isValid:c},control:n}=A({resolver:V(K),defaultValues:{trustDevice:!1}}),{toast:l}=S(),{mutate:v,isPending:y}=J({onSuccess:()=>{i(!0)},onError:o=>{o instanceof Error&&l({status:"error",emphasis:"subtle",icon:e.jsx(P,{className:"h-5 w-5 shrink-0 fill-error-700"}),description:o.message,rounded:!0})}});function g(o){v({deviceId:s,payload:{user_code:t,trusted_device:o.trustDevice}})}return e.jsxs("form",{onSubmit:a(g),className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(z,{control:n,name:"trustDevice",render:({field:{onChange:o,value:b}})=>e.jsx(D,{checked:b,onCheckedChange:w=>o(!!w),id:r})}),e.jsxs("label",{htmlFor:r,children:[e.jsx("p",{children:"Trust this device"}),e.jsx("p",{className:"text-theme-text-secondary",children:"We won't ask you again soon on this device."})]})]}),e.jsx(C,{disabled:y||!c,size:"md",className:"flex w-full justify-center",children:"Authorize this device"})]})}function O(){return e.jsxs(m,{className:"flex min-w-[540px] flex-col items-center justify-center space-y-7 px-7 py-9",children:[e.jsx(q,{className:"h-[120px] w-[120px] fill-theme-text-success"}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-display-xs font-semibold",children:"You successfully added your device"}),e.jsx("p",{className:"text-theme-text-secondary",children:"You may close this screen and return to your CLI."})]})]})}function ae(){const{device_id:s,user_code:t}=Y(),[i,r]=f.useState(!1),{data:a,isPending:c,isError:n,error:l}=W({deviceId:s,queryParams:{user_code:t}},{enabled:!!s&&!!t});return!s||!t?e.jsx(F,{children:e.jsx("p",{children:"Invalid device verification link."})}):n?e.jsx(u,{children:e.jsx(I,{isAlertCircle:!0,err:l})}):c?e.jsx(u,{children:e.jsx(E,{})}):i?e.jsx(O,{}):e.jsx(u,{children:e.jsxs("div",{className:"w-full space-y-7",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"mb-0.5 text-display-xs font-semibold",children:"Authorize a new device"}),e.jsx("p",{className:"text-theme-text-secondary",children:"You are logging in from a new device."})]}),e.jsx(G,{device:a}),e.jsx(M,{setSuccess:r,deviceId:s,user_code:t})]})})}function u({children:s}){return e.jsx(m,{className:"flex w-full min-w-[540px] flex-col items-center justify-center gap-5 p-7",children:s})}export{ae as default};
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as v,j as s}from"./@radix-Cdvw4jJ8.js";import{o as q,f as B,i as V,F as Z,j as G,as as J,au as Y,av as K,aw as Q,B as D,ab as X,a$ as ee,r as te,a as re,d as ne,g as oe,h as se,b0 as ae,aB as ie,b as _}from"./index-BFqbGSck.js";import{c as ce}from"./@tanstack-5gTMR7G2.js";import{S as ue}from"./clock-B_mTG8PH.js";import{C as I}from"./CodeSnippet-D2HkkAGr.js";import{I as le}from"./Infobox-CGxFvqzi.js";import{T as pe}from"./Tick-BPrWnNlN.js";import{E as me}from"./react-error-boundary.esm-7_MuhCay.js";import{L as de}from"./@react-router-DeDfXbUF.js";import"./@reactflow-8OCk19Fi.js";import"./info-QkbQz4QU.js";import"./check-B9QMTa3f.js";async function fe({params:t}){const n=q(t).toString(),o=V(G.apiToken+(n?`?${n}`:"")),r=await B(o,{credentials:"include",headers:{"Content-Type":"application/json"}});if(!r.ok){const e=await r.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>"Error while creating API Token");throw new Z({status:r.status,statusText:r.statusText,message:e})}return r.json()}function he(t){return ce({mutationFn:async n=>fe(n),...t})}class x extends Error{}x.prototype.name="InvalidTokenError";function ye(t){return decodeURIComponent(atob(t).replace(/(.)/g,(n,o)=>{let r=o.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function ve(t){let n=t.replace(/-/g,"+").replace(/_/g,"/");switch(n.length%4){case 0:break;case 2:n+="==";break;case 3:n+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return ye(n)}catch{return atob(n)}}function Te(t,n){if(typeof t!="string")throw new x("Invalid token specified: must be a string");n||(n={});const o=n.header===!0?0:1,r=t.split(".")[o];if(typeof r!="string")throw new x(`Invalid token specified: missing part #${o+1}`);let e;try{e=ve(r)}catch(a){throw new x(`Invalid token specified: invalid base64 for part #${o+1} (${a.message})`)}try{return JSON.parse(e)}catch(a){throw new x(`Invalid token specified: invalid json for part #${o+1} (${a.message})`)}}var b={exports:{}},S,N;function xe(){if(N)return S;N=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return S=t,S}var j,E;function ge(){if(E)return j;E=1;var t=xe();function n(){}function o(){}return o.resetWarningCache=n,j=function(){function r(i,c,l,d,h,p){if(p!==t){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function e(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:e,element:r,elementType:r,instanceOf:e,node:r,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:n};return a.PropTypes=a,a},j}var A;function be(){return A||(A=1,b.exports=ge()()),b.exports}var u=be();function R(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Se(t,n){for(var o=0;o<n.length;o++){var r=n[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function M(t,n,o){return n&&Se(t.prototype,n),t}function $(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&w(t,n)}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},g(t)}function w(t,n){return w=Object.setPrototypeOf||function(r,e){return r.__proto__=e,r},w(t,n)}function je(){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 we(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Pe(t,n){return n&&(typeof n=="object"||typeof n=="function")?n:we(t)}function z(t){var n=je();return function(){var r=g(t),e;if(n){var a=g(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return Pe(this,e)}}function ke(t){return De(t)||Ce(t)||Oe(t)||_e()}function De(t){if(Array.isArray(t))return P(t)}function Ce(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function Oe(t,n){if(t){if(typeof t=="string")return P(t,n);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 P(t,n)}}function P(t,n){(n==null||n>t.length)&&(n=t.length);for(var o=0,r=new Array(n);o<n;o++)r[o]=t[o];return r}function _e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,o=String(t);if(n===0)return o;var r=o.match(/(.*?)([0-9]+)(.*)/),e=r?r[1]:"",a=r?r[3]:"",i=r?r[2]:o,c=i.length>=n?i:(ke(Array(n)).map(function(){return"0"}).join("")+i).slice(n*-1);return"".concat(e).concat(c).concat(a)}var U={daysInHours:!1,zeroPadTime:2};function Ie(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.now,r=o===void 0?Date.now:o,e=n.precision,a=e===void 0?0:e,i=n.controlled,c=n.offsetTime,l=c===void 0?0:c,d=n.overtime,h;typeof t=="string"?h=new Date(t).getTime():t instanceof Date?h=t.getTime():h=t,i||(h+=l);var p=i?h:h-r(),f=Math.min(20,Math.max(0,a)),m=Math.round(parseFloat(((d?p:Math.max(0,p))/1e3).toFixed(f))*1e3),y=Math.abs(m)/1e3;return{total:m,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:m<=0}}function Ne(t,n){var o=t.days,r=t.hours,e=t.minutes,a=t.seconds,i=Object.assign(Object.assign({},U),n),c=i.daysInHours,l=i.zeroPadTime,d=i.zeroPadDays,h=d===void 0?l:d,p=Math.min(2,l),f=c?T(r+o*24,l):T(r,p);return{days:c?"":T(o,h),hours:f,minutes:T(e,p),seconds:T(a,p)}}var F=function(t){$(o,t);var n=z(o);function o(){var r;return R(this,o),r=n.apply(this,arguments),r.state={count:r.props.count||3},r.startCountdown=function(){r.interval=window.setInterval(function(){var e=r.state.count-1;e===0?(r.stopCountdown(),r.props.onComplete&&r.props.onComplete()):r.setState(function(a){return{count:a.count-1}})},1e3)},r.stopCountdown=function(){clearInterval(r.interval)},r.addTime=function(e){r.stopCountdown(),r.setState(function(a){return{count:a.count+e}},r.startCountdown)},r}return M(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);F.propTypes={count:u.number,children:u.element,onComplete:u.func};var C=function(t){$(o,t);var n=z(o);function o(r){var e;if(R(this,o),e=n.call(this,r),e.mounted=!1,e.initialTimestamp=e.calcOffsetStartTimestamp(),e.offsetStartTimestamp=e.props.autoStart?0:e.initialTimestamp,e.offsetTime=0,e.legacyMode=!1,e.legacyCountdownRef=null,e.tick=function(){var i=e.calcTimeDelta(),c=i.completed&&!e.props.overtime?void 0:e.props.onTick;e.setTimeDeltaState(i,void 0,c)},e.setLegacyCountdownRef=function(i){e.legacyCountdownRef=i},e.start=function(){if(!e.isStarted()){var i=e.offsetStartTimestamp;e.offsetStartTimestamp=0,e.offsetTime+=i?e.calcOffsetStartTimestamp()-i:0;var c=e.calcTimeDelta();e.setTimeDeltaState(c,"STARTED",e.props.onStart),!e.props.controlled&&(!c.completed||e.props.overtime)&&(e.clearTimer(),e.interval=window.setInterval(e.tick,e.props.intervalDelay))}},e.pause=function(){e.isPaused()||(e.clearTimer(),e.offsetStartTimestamp=e.calcOffsetStartTimestamp(),e.setTimeDeltaState(e.state.timeDelta,"PAUSED",e.props.onPause))},e.stop=function(){e.isStopped()||(e.clearTimer(),e.offsetStartTimestamp=e.calcOffsetStartTimestamp(),e.offsetTime=e.offsetStartTimestamp-e.initialTimestamp,e.setTimeDeltaState(e.calcTimeDelta(),"STOPPED",e.props.onStop))},e.isStarted=function(){return e.isStatus("STARTED")},e.isPaused=function(){return e.isStatus("PAUSED")},e.isStopped=function(){return e.isStatus("STOPPED")},e.isCompleted=function(){return e.isStatus("COMPLETED")},r.date){var a=e.calcTimeDelta();e.state={timeDelta:a,status:a.completed?"COMPLETED":"STOPPED"}}else e.legacyMode=!0;return e}return M(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,l=e.controlled,d=e.overtime;return Ie(a,{now:i,precision:c,controlled:l,offsetTime:this.offsetTime,overtime:d})}},{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 l=e.completed&&!this.state.timeDelta.completed,d=e.completed&&a==="STARTED";l&&!this.props.overtime&&this.clearTimer();var h=function(){i&&i(c.state.timeDelta),c.props.onComplete&&(l||d)&&c.props.onComplete(e,d)};return this.setState(function(p){var f=a||p.status;return e.completed&&!c.props.overtime?f="COMPLETED":!a&&f==="COMPLETED"&&(f="STOPPED"),{timeDelta:e,status:f}},h)}}},{key:"getApi",value:function(){return this.api=this.api||{start:this.start,pause:this.pause,stop:this.stop,isStarted:this.isStarted,isPaused:this.isPaused,isStopped:this.isStopped,isCompleted:this.isCompleted}}},{key:"getRenderProps",value:function(){var e=this.props,a=e.daysInHours,i=e.zeroPadTime,c=e.zeroPadDays,l=this.state.timeDelta;return Object.assign(Object.assign({},l),{api:this.getApi(),props:this.props,formatted:Ne(l,{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(F,{ref:this.setLegacyCountdownRef,count:a,onComplete:c},i)}var l=this.props,d=l.className,h=l.overtime,p=l.children,f=l.renderer,m=this.getRenderProps();if(f)return f(m);if(p&&this.state.timeDelta.completed&&!h)return v.cloneElement(p,{countdown:m});var y=m.formatted,O=y.days,H=y.hours,L=y.minutes,W=y.seconds;return v.createElement("span",{className:d},m.total<0?"-":"",O,O?":":"",H,":",L,":",W)}}]),o}(v.Component);C.defaultProps=Object.assign(Object.assign({},U),{controlled:!1,intervalDelay:1e3,precision:0,autoStart:!0});C.propTypes={date:u.oneOfType([u.instanceOf(Date),u.string,u.number]),daysInHours:u.bool,zeroPadTime:u.number,zeroPadDays:u.number,controlled:u.bool,intervalDelay:u.number,precision:u.number,autoStart:u.bool,overtime:u.bool,className:u.string,children:u.element,renderer:u.func,now:u.func,onMount:u.func,onStart:u.func,onPause:u.func,onStop:u.func,onTick:u.func,onComplete:u.func};function Ee({token:t,open:n,setOpen:o}){return s.jsx(J,{open:n,onOpenChange:o,children:s.jsxs(Y,{className:"max-w-[700px]",children:[s.jsx(K,{children:s.jsx(Q,{children:"API Token Created Successfully"})}),s.jsxs("div",{className:"space-y-3 overflow-hidden px-7 py-5",children:[s.jsx(Ae,{}),s.jsx(Re,{}),s.jsx(Me,{token:t}),s.jsx(me,{fallbackRender:()=>null,children:s.jsx(ze,{token:t})}),s.jsx("div",{role:"separator","aria-hidden":"true",className:"h-[1px] bg-theme-border-moderate"}),s.jsx(Ue,{token:t}),s.jsx(Fe,{}),s.jsx("div",{role:"separator","aria-hidden":"true",className:"h-[1px] bg-theme-border-moderate"}),s.jsx(He,{})]})]})})}function Ae(){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 Re(){return s.jsx(le,{children:"Important: This token expires in 1 hour and cannot be retrieved later. Please, copy it now."})}function Me({token:t}){const[n,o]=v.useState(!1);function r(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}),n?s.jsxs("div",{className:"flex h-7 items-center",children:[s.jsx(pe,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"}),s.jsx("p",{className:"sr-only",children:"copied successfully"})]}):s.jsxs(D,{onClick:()=>r(t),size:"md",intent:"secondary",className:"flex items-center gap-1",emphasis:"subtle",children:[s.jsx(X,{className:"size-4 shrink-0 fill-inherit"}),"Copy"]})]})}const $e=({days:t,hours:n,minutes:o,seconds:r,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||n>0)&&i.push(`${a(n)}`),(t>0||n>0||o>0)&&i.push(`${a(o)}`),i.push(`${a(r)}`),s.jsx("span",{className:"font-semibold",children:i.join(":")})};function ze({token:t}){if(!t)return null;const n=Te(t);return n.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(ue,{className:"size-5 shrink-0 fill-theme-text-secondary"}),s.jsxs("div",{children:["Expires in:"," ",s.jsx(C,{daysInHours:!0,renderer:$e,zeroPadTime:2,date:new Date(n.exp*1e3)})]})]}):null}function Ue({token:t}){const n=`${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(I,{code:Le(t,n)}),s.jsx(I,{code:We(t,n)})]})]})}function Fe(){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(D,{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(ee,{className:"size-5 shrink-0 fill-inherit"})]})})]})}function He(){return s.jsxs("p",{children:["For long-term programmatic access, consider"," ",s.jsx(de,{className:"link text-theme-text-brand",to:te.settings.service_accounts.overview,children:"setting up a service account instead."})]})}function Le(t,n){return`curl -H "Authorization: Bearer ${t}" "${encodeURI(n)}"`}function We(t,n){return`wget -qO- --header="Authorization: Bearer ${t}" "${encodeURI(n)}"`}const k=v.forwardRef(({className:t,onClick:n,...o},r)=>{const{toast:e}=re(),[a,i]=v.useState(""),[c,l]=v.useState(!1),d=ne(),{mutate:h,isPending:p}=he({onError:m=>{ie(m)&&e({title:"Error",emphasis:"subtle",rounded:!0,status:"error",description:m.message}),console.log(m)},onSuccess:m=>{i(m),l(!0)}});function f(m){l(m),m||i("")}return d.isPending?s.jsx(oe,{className:"h-7 w-10"}):d.isError?null:s.jsxs(s.Fragment,{children:[s.jsxs(D,{disabled:p||ae(d.data.auth_scheme||"other"),ref:r,...o,onClick:()=>h({params:{token_type:"generic"}}),className:se(t),children:[p&&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(Ee,{open:c,setOpen:f,token:a})]})});k.displayName="CreateTokenButton";function rt(){return s.jsxs(_,{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(k,{size:"sm"})}),s.jsxs(_,{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(k,{size:"md"})]})]})}export{rt as default};
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import{r as l,j as e}from"./@radix-Cdvw4jJ8.js";import{a as p,u as D,S as v,E as S}from"./SecretTooltip-CZTRnaCV.js";import{b as f,h as b}from"./@tanstack-5gTMR7G2.js";import{aC as C,b2 as N,aD as w,I as j,b3 as E,aF as k,B as h,aB as T,b4 as A,D as K,l as V,m as B,p as O,g as F,as as L,at as z,x as I,y as Q,b5 as R,r as q,b as P,v as H}from"./index-BFqbGSck.js";import{S as M}from"./eye-CbVlAYty.js";import{S as _}from"./key-icon-C07HKw8z.js";import{S as $}from"./trash-DP6Tpp_E.js";import{A as U}from"./AlertDialogDropdownItem-CZW4QyWn.js";import{a as G}from"./@react-router-DeDfXbUF.js";import"./plus-Cl0_rCVF.js";import"./zod-XdS2h1ws.js";import"./index.esm-DhJo3mA6.js";import"./CodeSnippet-D2HkkAGr.js";import"./info-QkbQz4QU.js";import"./@reactflow-8OCk19Fi.js";function J({secretId:t,keyName:s}){const{data:a,isLoading:r,isError:u}=f({...p.secretDetail(t)}),i=b(),{mutate:c}=D({onError(d){T(d)&&A({status:"error",emphasis:"subtle",description:d.message,rounded:!0})},onSuccess(){i.invalidateQueries({queryKey:["secrets"]}),i.invalidateQueries({queryKey:["secretDetail",t]})}}),[n,m]=l.useState(""),x=()=>{var d;if(a){const g={...(d=a.body)==null?void 0:d.values};delete g[s];const y={name:a.name,values:g};c({id:t,body:y})}};function o(d){m(d.target.value)}return r?e.jsx("div",{children:"Loading..."}):u?e.jsx("div",{children:"Error loading secret details"}):e.jsxs(C,{children:[e.jsx(N,{children:e.jsx(w,{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(E,{className:"gap-[10px]",children:[e.jsx(k,{asChild:!0,children:e.jsx(h,{size:"sm",intent:"secondary",children:"Cancel"})}),e.jsx(h,{intent:"danger",type:"button",onClick:x,disabled:n!=="DELETE",children:"Delete"})]})]})}function W({secretId:t,keyName:s}){const[a,r]=l.useState(!1),[u,i]=l.useState(!1),c=l.useRef(null),n=l.useRef(null);function m(){n.current=c.current}function x(o){if(o===!1){r(!1),setTimeout(()=>{i(o)},200);return}i(o)}return e.jsxs(K,{onOpenChange:r,open:a,children:[e.jsx(V,{ref:c,children:e.jsx(B,{className:"h-4 w-4 fill-theme-text-tertiary"})}),e.jsx(O,{hidden:u,onCloseAutoFocus:o=>{n.current&&(n.current.focus(),n.current=null,o.preventDefault())},align:"end",sideOffset:7,children:e.jsx(U,{onSelect:m,onOpenChange:x,triggerChildren:"Delete ",icon:e.jsx($,{}),children:e.jsx(J,{secretId:t,keyName:s})})})]})}const X=({value:t})=>{const[s,a]=l.useState(!1),r=typeof t=="string"?t:"",u="•".repeat(r.length);return e.jsxs("div",{className:"flex items-center gap-2 space-x-2",children:[e.jsx(M,{onClick:()=>a(!s),className:"h-4 w-4 flex-shrink-0"}),e.jsx("span",{children:s?r:u})]})};function Y(t,s){return[{id:"key",header:"Key",accessorKey:"key",cell:({row:a})=>{const r=`from zenml.client import Client
|
2
|
+
secret = Client().get_secret("${s}")
|
3
|
+
|
4
|
+
# 'secret.secret_values' will contain a dictionary with all key-value pairs within your secret.
|
5
|
+
secret.secret_values["${a.original.key}"]
|
6
|
+
`;return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(_,{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:a.original.key}),e.jsx(v,{code:r})]})})})]})}},{id:"value",header:"Value",accessorKey:"value",cell:({row:a})=>e.jsx(X,{value:a.getValue("value")})},{id:"actions",header:"",cell:({row:a})=>e.jsx(W,{secretId:t,keyName:a.original.key})}]}function Z({secretId:t}){var c;const[s,a]=l.useState(""),r=f({...p.secretDetail(t)});if(r.isPending)return e.jsx(F,{className:"h-[200px] w-full"});if(r.isError)return e.jsx("div",{children:r.error.message});const i=Object.entries(((c=r.data.body)==null?void 0:c.values)||{}).map(([n,m])=>({key:n,value:m})).filter(n=>n.key.toLowerCase().includes(s.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:s,onChange:n=>a(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(S,{secretId:t,isSecretNameEditable:!1,dialogTitle:"Edit keys"})]})]}),e.jsx("div",{className:"w-full",children:e.jsx(I,{columns:Y(t,r.data.name),data:i})})]})}function ee(t){const{setBreadcrumbs:s}=Q();l.useEffect(()=>{t&&s([...R,{label:t.name,href:q.settings.secrets.detail(t.id)}])},[t,s])}function fe(){const{secretId:t}=G(),{data:s}=f({...p.secretDetail(t||"")});return ee(s),e.jsx(e.Fragment,{children:e.jsxs(P,{className:"space-y-5 p-5",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-text-xl font-semibold",children:s==null?void 0:s.name}),e.jsxs("div",{className:"group/copybutton flex items-center space-x-1",children:[e.jsx("div",{className:"text-theme-text-secondary",children:t==null?void 0:t.slice(0,8)}),e.jsx(H,{copyText:t})]})]}),e.jsx(Z,{secretId:t||""})]})})}export{fe as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{z as t}from"./index-
|
1
|
+
import{z as t}from"./index-BFqbGSck.js";import{a as s}from"./persist-Dec_w7aB.js";const r="create-terraform-data",e=t.object({provider:s,stackName:t.string().min(1).trim(),location:t.string().min(1).trim(),timestamp:t.string().min(1).trim()});function n(a){localStorage.setItem(r,JSON.stringify(a))}function l(){try{const a=localStorage.getItem(r),o=a?JSON.parse(a):{};return e.safeParse(o)}catch{return i(),e.safeParse({})}}function i(){localStorage.removeItem(r)}export{i as c,l as p,n as s};
|
@@ -1 +1 @@
|
|
1
|
-
import{z as a}from"./index-
|
1
|
+
import{z as a}from"./index-BFqbGSck.js";import{s as i}from"./sharedSchema-BXzg0EZz.js";const o=a.enum(["aws","gcp","azure"]),p=a.object({provider:o}),g=a.object({region:a.string().trim().min(1),stackName:i}),r="new-infra-data",e=a.object({provider:o,stackName:a.string().min(1).trim(),location:a.string().min(1).trim(),timestamp:a.string().min(1).trim()});function d(t){localStorage.setItem(r,JSON.stringify(t))}function f(){try{const t=localStorage.getItem(r),s=t?JSON.parse(t):{};return e.safeParse(s)}catch{return c(),e.safeParse({})}}function c(){localStorage.removeItem(r)}export{o as a,g as b,c,p as d,f as p,d as s};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as C}from"./@radix-Cdvw4jJ8.js";const t=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:"M5 3C4.44772 3 4 3.44772 4 4C4 4.55228 4.44772 5 5 5C5.55228 5 6 4.55228 6 4C6 3.44772 5.55228 3 5 3ZM2 4C2 2.34315 3.34315 1 5 1C6.30622 1 7.41746 1.83481 7.82929 3L16.1707 3C16.5825 1.83481 17.6938 1 19 1C20.6569 1 22 2.34315 22 4C22 5.65685 20.6569 7 19 7C17.6938 7 16.5825 6.16519 16.1707 5L13 5V11H16.1707C16.5825 9.83481 17.6938 9 19 9C20.6569 9 22 10.3431 22 12C22 13.6569 20.6569 15 19 15C17.6938 15 16.5825 14.1652 16.1707 13H13V15.2C13 16.0566 13.0008 16.6389 13.0376 17.089C13.0734 17.5274 13.1383 17.7516 13.218 17.908C13.4097 18.2843 13.7157 18.5903 14.092 18.782C14.2484 18.8617 14.4726 18.9266 14.911 18.9624C15.2412 18.9894 15.6425 18.997 16.171 18.9992C16.5831 17.8344 17.6941 17 19 17C20.6569 17 22 18.3431 22 20C22 21.6569 20.6569 23 19 23C17.6935 23 16.5821 22.1648 16.1705 20.9993C15.6232 20.9971 15.1515 20.9888 14.7482 20.9558C14.1861 20.9099 13.6694 20.8113 13.184 20.564C12.4314 20.1805 11.8195 19.5686 11.436 18.816C11.1887 18.3306 11.0901 17.8139 11.0442 17.2518C11 16.7106 11 16.0463 11 15.2413V5L7.82929 5C7.41746 6.16519 6.30622 7 5 7C3.34315 7 2 5.65685 2 4ZM19 3C18.4477 3 18 3.44771 18 4C18 4.55228 18.4477 5 19 5C19.5523 5 20 4.55228 20 4C20 3.44772 19.5523 3 19 3ZM19 11C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11ZM19 19C18.4477 19 18 19.4477 18 20C18 20.5523 18.4477 21 19 21C19.5523 21 20 20.5523 20 20C20 19.4477 19.5523 19 19 19Z"}));export{t as S};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e}from"./@radix-
|
1
|
+
import{r as e}from"./@radix-Cdvw4jJ8.js";const o=t=>e.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 4C12.5523 4 13 4.44772 13 5V11H19C19.5523 11 20 11.4477 20 12C20 12.5523 19.5523 13 19 13H13V19C13 19.5523 12.5523 20 12 20C11.4477 20 11 19.5523 11 19V13H5C4.44772 13 4 12.5523 4 12C4 11.4477 4.44772 11 5 11H11V5C11 4.44772 11.4477 4 12 4Z"}));export{o as S};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as i}from"./@radix-
|
1
|
+
import{r as i}from"./@radix-Cdvw4jJ8.js";const c=i.createContext(null),d={didCatch:!1,error:null};class f extends i.Component{constructor(r){super(r),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=d}static getDerivedStateFromError(r){return{didCatch:!0,error:r}}resetErrorBoundary(){const{error:r}=this.state;if(r!==null){for(var t,e,n=arguments.length,s=new Array(n),o=0;o<n;o++)s[o]=arguments[o];(t=(e=this.props).onReset)===null||t===void 0||t.call(e,{args:s,reason:"imperative-api"}),this.setState(d)}}componentDidCatch(r,t){var e,n;(e=(n=this.props).onError)===null||e===void 0||e.call(n,r,t)}componentDidUpdate(r,t){const{didCatch:e}=this.state,{resetKeys:n}=this.props;if(e&&t.error!==null&&h(r.resetKeys,n)){var s,o;(s=(o=this.props).onReset)===null||s===void 0||s.call(o,{next:n,prev:r.resetKeys,reason:"keys"}),this.setState(d)}}render(){const{children:r,fallbackRender:t,FallbackComponent:e,fallback:n}=this.props,{didCatch:s,error:o}=this.state;let a=r;if(s){const u={error:o,resetErrorBoundary:this.resetErrorBoundary};if(typeof t=="function")a=t(u);else if(e)a=i.createElement(e,u);else if(n!==void 0)a=n;else throw o}return i.createElement(c.Provider,{value:{didCatch:s,error:o,resetErrorBoundary:this.resetErrorBoundary}},a)}}function h(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return l.length!==r.length||l.some((t,e)=>!Object.is(t,r[e]))}export{f as E};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e}from"./@radix-
|
1
|
+
import{r as e}from"./@radix-Cdvw4jJ8.js";const r=C=>e.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...C},e.createElement("g",{id:"refresh-cw-01"},e.createElement("path",{id:"Icon (Stroke)",fillRule:"evenodd",clipRule:"evenodd",d:"M2 12C2 6.47715 6.47715 2 12 2C14.7624 2 17.2648 3.12139 19.0735 4.93138C19.7132 5.57146 20.3981 6.36248 21 7.09444V4C21 3.44772 21.4477 3 22 3C22.5523 3 23 3.44772 23 4V10C23 10.5523 22.5523 11 22 11H16C15.4477 11 15 10.5523 15 10C15 9.44772 15.4477 9 16 9H19.9692C19.277 8.13128 18.4165 7.10335 17.6588 6.34511C16.2098 4.89514 14.2104 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C15.6457 20 18.7243 17.5605 19.6874 14.2227C19.8406 13.6921 20.3948 13.3861 20.9255 13.5392C21.4561 13.6923 21.7622 14.2466 21.609 14.7773C20.4055 18.9481 16.5605 22 12 22C6.47715 22 2 17.5228 2 12Z"})));export{r as S};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{j as s}from"./@radix-Cdvw4jJ8.js";import{w as i,h as o}from"./index-BFqbGSck.js";function c({resourceTypes:m,className:t,size:r="sm",iconSize:a=20}){return s.jsx("div",{className:"flex flex-wrap gap-1",children:m.map(e=>s.jsxs(i,{size:r,rounded:!1,emphasis:"minimal",className:o("w-fit gap-0.5 text-theme-text-primary",t),color:"grey",children:[s.jsx("img",{width:a,height:a,className:"shrink-0 object-contain",src:e.logo_url??"",alt:`Logo of ${e.name}`}),s.jsx("p",{children:e.name})]},e.name))})}export{c as R};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{j as s}from"./@radix-Cdvw4jJ8.js";import{T as e,q as n,s as l,t}from"./index-BFqbGSck.js";function h({connectorType:o}){const r=o.logo_url,i=o.name;return s.jsx(e,{children:s.jsxs(n,{children:[s.jsx(l,{children:s.jsxs("div",{className:"size-5 shrink-0",children:[s.jsx("img",{width:24,height:24,className:"size-5 shrink-0",src:r??"",alt:`Logo of ${i}`}),s.jsx("p",{className:"sr-only",children:i})]})}),s.jsx(t,{children:i})]})})}function d({resourceType:o}){const r=o.logo_url,i=o.name;return s.jsx(e,{children:s.jsxs(n,{children:[s.jsx(l,{children:s.jsxs("div",{className:"size-5 shrink-0",children:[s.jsx("img",{width:24,height:24,className:"size-5 shrink-0",src:r??"",alt:`Logo of ${i}`}),s.jsx("p",{className:"sr-only",children:i})]})}),s.jsx(t,{children:i})]})})}export{h as C,d as R};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as c,j as o}from"./@radix-Cdvw4jJ8.js";import{S as f,T as l,q as d,s as m,w as h,t as p}from"./index-BFqbGSck.js";import{a as u}from"./type-guards-CNgPYg8l.js";function x(t){const s=new Date(`${t}Z`),e=new Date;if(s<e)return"Expired";const a=s.getTime()-e.getTime(),r=Math.floor(a/(1e3*60*60*24)),i=Math.floor(a%(1e3*60*60*24)/(1e3*60*60)),n=Math.floor(a%(1e3*60*60)/(1e3*60));return r>0?`in ${r} ${r===1?"day":"days"}`:i>0?`in ${i} ${i===1?"hour":"hours"}`:n>0?`in ${n} ${n===1?"minute":"minutes"}`:"in less than a minute"}function j({expires:t}){const[s,e]=c.useState("");return c.useEffect(()=>{e(x(t))},[t]),s==="Expired"?o.jsxs("div",{className:"flex items-center space-x-0.5 text-theme-text-warning",children:[o.jsx(f,{className:"size-3 shrink-0 fill-theme-text-warning"}),o.jsx("span",{children:"Expired"})]}):o.jsx("div",{children:s})}function M({connector:t}){var e;const s=((e=t.body)==null?void 0:e.resource_id)||"Multiple";return o.jsx(l,{children:o.jsxs(d,{children:[o.jsx(m,{className:"max-w-full truncate",children:o.jsx(h,{size:"sm",rounded:!1,emphasis:"minimal",className:"block w-fit max-w-full gap-0.5 truncate text-theme-text-primary",color:"grey",children:s})}),o.jsx(p,{children:s})]})})}function w(t){var r,i;const s=((r=t.body)==null?void 0:r.resource_types)??[],e=(i=t.body)==null?void 0:i.connector_type;return u(e)?[]:((e==null?void 0:e.resource_types)??[]).filter(n=>s.includes(n.resource_type))}function _(t){var r,i;const s=((r=t.body)==null?void 0:r.auth_method)||"",e=(i=t.body)==null?void 0:i.connector_type;return u(e)?void 0:((e==null?void 0:e.auth_methods)??[]).find(n=>n.auth_method===s)}export{j as E,M as R,_ as a,w as e};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{q as y,
|
2
|
-
ZENML_STORE_API_KEY: ${e}`})]})]})}function E({value:e}){const[r,s]=g.useState(!1);function t(n){navigator.clipboard&&(navigator.clipboard.writeText(n),s(!0),setTimeout(()=>{s(!1)},2e3))}return a.jsxs("section",{className:"flex w-full items-center justify-between gap-5 overflow-hidden py-5 text-text-md",children:[a.jsx("code",{className:"w-[3/4] min-w-0 flex-1 overflow-x-auto font-sans text-display-xs",children:e}),r?a.jsxs(a.Fragment,{children:[a.jsx(T,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"}),a.jsx("p",{className:"sr-only",children:"copied successfully"})]}):a.jsxs(j,{intent:"secondary",emphasis:"subtle",onClick:()=>t(e),size:"md",children:[a.jsx(A,{className:"h-4 w-4 shrink-0 fill-theme-text-primary"}),a.jsx("p",{children:"Copy"})]})]})}function P(){return a.jsx(v,{children:"Important: This key is your authentication for API access and will not be shown again. Please copy it and store it securely."})}const d=1,D=i.object({page:i.coerce.number().min(d).optional().default(d).catch(d),name:i.string().optional(),operator:i.enum(["and","or"]).optional()});function
|
1
|
+
import{q as y,c as w}from"./@tanstack-5gTMR7G2.js";import{i as l,o as f,f as u,n as h,F as p,j as m,z as i,B as j,ab as A}from"./index-BFqbGSck.js";import{j as a,r as g}from"./@radix-Cdvw4jJ8.js";import{C as x}from"./CodeSnippet-D2HkkAGr.js";import{I as v}from"./Infobox-CGxFvqzi.js";import{T}from"./Tick-BPrWnNlN.js";import{f as K}from"./@react-router-DeDfXbUF.js";async function b({params:e}){const r=l(m.serviceAccounts.all)+"?"+f(e),s=await u(r,{method:"GET",headers:{"Content-Type":"application/json"}});if(s.status===404&&h(),!s.ok){const t=await s.json().then(n=>Array.isArray(n.detail)?n.detail[1]:n.detail).catch(()=>"Failed to fetch service accounts");throw new p({status:s.status,statusText:s.statusText,message:t})}return s.json()}async function k({serviceAccountId:e}){const r=l(m.serviceAccounts.detail(e)),s=await u(r,{method:"GET",headers:{"Content-Type":"application/json"}});if(s.status===404&&h(),!s.ok){const t=await s.json().then(n=>Array.isArray(n.detail)?n.detail[1]:n.detail).catch(()=>`Failed to fetch service account ${e}`);throw new p({status:s.status,statusText:s.statusText,message:t})}return s.json()}async function N({serviceAccountId:e,params:r}){const s=l(m.serviceAccounts.apiKeys.all(e))+"?"+f(r),t=await u(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.status===404&&h(),!t.ok){const n=await t.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Failed to list of api keys");throw new p({status:t.status,statusText:t.statusText,message:n})}return t.json()}async function S({serviceAccountId:e,apiKeyId:r}){const s=l(m.serviceAccounts.apiKeys.detail(e,r)),t=await u(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(t.status===404&&h(),!t.ok){const n=await t.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>`Failed to fetch api key ${r}`);throw new p({status:t.status,statusText:t.statusText,message:n})}return t.json()}const $={serviceAccountList:e=>y({queryKey:[...c.serviceAccountsKey(),e],queryFn:async()=>b({params:e})}),serviceAccountDetail:e=>y({queryKey:[...c.serviceAccountsKey(),e],queryFn:async()=>k({serviceAccountId:e})}),serviceAccountApiKeys:(e,r)=>y({queryKey:[...c.apiKeysKey(e),r],queryFn:async()=>N({serviceAccountId:e,params:r})}),ApiKeysDetail:(e,r)=>y({queryKey:[...c.apiKeysKey(e),r],queryFn:async()=>S({serviceAccountId:e,apiKeyId:r})})},c={serviceAccountsKey:()=>["service_accounts"],apiKeysKey:e=>[...c.serviceAccountsKey(),e,"api_keys"]};async function C({body:e,serviceAccountId:r}){const s=l(m.serviceAccounts.apiKeys.all(r)),t=await u(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const n=await t.json().then(o=>Array.isArray(o.detail)?o.detail[1]:o.detail).catch(()=>"Failed to create service account");throw new p({status:t.status,statusText:t.statusText,message:n})}return t.json()}function I(e){return w({...e,mutationFn:async({serviceAccountId:r,body:s})=>C({body:s,serviceAccountId:r})})}const F=i.object({name:i.string().min(1,"Service Account Name is required"),description:i.string()}),R=F.extend({createDefault:i.boolean()});function B({value:e}){return a.jsxs("div",{className:"space-y-3 overflow-x-hidden px-7 py-5 text-text-md text-theme-text-primary",children:[a.jsxs("div",{className:"space-y-0.5",children:[a.jsx("p",{className:"text-text-md font-semibold text-theme-text-primary",children:"Here is your new API Key"}),a.jsx("p",{className:"text-text-md text-theme-text-secondary",children:"Your key was created successfully"})]}),a.jsx(P,{}),a.jsx(E,{value:e}),a.jsx("div",{className:"h-[1px] bg-theme-border-moderate","aria-hidden":"true"}),a.jsxs("div",{className:"space-y-3 pt-5",children:[a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("p",{className:"text-text-md font-semibold text-theme-text-primary",children:"Using your API Key"}),a.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"})]}),a.jsx("p",{className:"text-theme-text-secondary",children:"To log in to the ZenML server using the generated key, you can run the following CLI command and enter the API key when prompted:"}),a.jsx(x,{highlightCode:!0,wrap:!0,code:`zenml login --api-key ${window.location.origin}`}),a.jsx("p",{className:"text-theme-text-secondary",children:"Alternatively, you can set the following environment variables to configure workloads where CLI interaction is not possible:"}),a.jsx(x,{highlightCode:!0,wrap:!0,code:`ZENML_STORE_URL: ${window.location.origin}
|
2
|
+
ZENML_STORE_API_KEY: ${e}`})]})]})}function E({value:e}){const[r,s]=g.useState(!1);function t(n){navigator.clipboard&&(navigator.clipboard.writeText(n),s(!0),setTimeout(()=>{s(!1)},2e3))}return a.jsxs("section",{className:"flex w-full items-center justify-between gap-5 overflow-hidden py-5 text-text-md",children:[a.jsx("code",{className:"w-[3/4] min-w-0 flex-1 overflow-x-auto font-sans text-display-xs",children:e}),r?a.jsxs(a.Fragment,{children:[a.jsx(T,{className:"h-5 w-5 shrink-0 fill-theme-text-tertiary"}),a.jsx("p",{className:"sr-only",children:"copied successfully"})]}):a.jsxs(j,{intent:"secondary",emphasis:"subtle",onClick:()=>t(e),size:"md",children:[a.jsx(A,{className:"h-4 w-4 shrink-0 fill-theme-text-primary"}),a.jsx("p",{children:"Copy"})]})]})}function P(){return a.jsx(v,{children:"Important: This key is your authentication for API access and will not be shown again. Please copy it and store it securely."})}const d=1,D=i.object({page:i.coerce.number().min(d).optional().default(d).catch(d),name:i.string().optional(),operator:i.enum(["and","or"]).optional()});function U(){const[e]=K(),{page:r,name:s,operator:t}=D.parse({page:e.get("page")||void 0,name:e.get("name")||void 0,operator:e.get("operator")||void 0});return{page:r,name:s,logical_operator:t}}export{B as A,U as a,$ as b,R as c,F as d,c as s,I as u};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{f as t}from"./index-BjUu1mP4.js";import{A as e}from"./index.es-C1gfATPn.js";import{z as s}from"./index-BFqbGSck.js";const m=e(async a=>(await t({name:a})).total===0,500),o=s.string().trim().min(1,"Stack name is required").max(255,"Stack name must be less than 255 characters").refine(a=>m(a),"Stack name is already in use");export{o as s};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{f as a,i as r,n,F as o,j as u}from"./index-BFqbGSck.js";import{b as i}from"./@tanstack-5gTMR7G2.js";function c({stackId:t}){return["stacks",t]}async function f({stackId:t}){const s=r(u.stacks.detail(t)),e=await a(s,{method:"GET",headers:{"Content-Type":"application/json"}});if(e.status===404&&n(),!e.ok)throw new o({message:`Error while fetching stack ${t}`,status:e.status,statusText:e.statusText});return e.json()}function y(t,s){return i({queryKey:c(t),queryFn:()=>f(t),...s})}export{f,y as u};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as C}from"./@radix-
|
1
|
+
import{r as C}from"./@radix-Cdvw4jJ8.js";const t=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 2H16.2413C17.0463 1.99999 17.7106 1.99998 18.2518 2.04419C18.8139 2.09012 19.3306 2.18868 19.816 2.43597C20.5686 2.81947 21.1805 3.43139 21.564 4.18404C21.8113 4.66937 21.9099 5.18608 21.9558 5.74817C22 6.28936 22 6.95372 22 7.75868V16.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.43597 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 2ZM5.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.2V7.8C20 6.94342 19.9992 6.36113 19.9624 5.91104C19.9266 5.47262 19.8617 5.24842 19.782 5.09202C19.5903 4.7157 19.2843 4.40973 18.908 4.21799C18.7516 4.1383 18.5274 4.07337 18.089 4.03755C17.6389 4.00078 17.0566 4 16.2 4H7.8C6.94342 4 6.36113 4.00078 5.91104 4.03755ZM6.29289 8.29289C6.68342 7.90237 7.31658 7.90237 7.70711 8.29289L10.7071 11.2929C11.0976 11.6834 11.0976 12.3166 10.7071 12.7071L7.70711 15.7071C7.31658 16.0976 6.68342 16.0976 6.29289 15.7071C5.90237 15.3166 5.90237 14.6834 6.29289 14.2929L8.58579 12L6.29289 9.70711C5.90237 9.31658 5.90237 8.68342 6.29289 8.29289ZM12 15C12 14.4477 12.4477 14 13 14H17C17.5523 14 18 14.4477 18 15C18 15.5523 17.5523 16 17 16H13C12.4477 16 12 15.5523 12 15Z"}));export{t as S};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as C}from"./@radix-Cdvw4jJ8.js";const t=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 2H16.2413C17.0463 1.99999 17.7106 1.99998 18.2518 2.04419C18.8139 2.09012 19.3306 2.18868 19.816 2.43597C20.5686 2.81947 21.1805 3.43139 21.564 4.18404C21.8113 4.66937 21.9099 5.18608 21.9558 5.74817C22 6.28936 22 6.95372 22 7.75868V16.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.43597 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 2ZM5.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.2V7.8C20 6.94342 19.9992 6.36113 19.9624 5.91104C19.9266 5.47262 19.8617 5.24842 19.782 5.09202C19.5903 4.7157 19.2843 4.40973 18.908 4.21799C18.7516 4.1383 18.5274 4.07337 18.089 4.03755C17.6389 4.00078 17.0566 4 16.2 4H7.8C6.94342 4 6.36113 4.00078 5.91104 4.03755ZM6.29289 8.29289C6.68342 7.90237 7.31658 7.90237 7.70711 8.29289L10.7071 11.2929C11.0976 11.6834 11.0976 12.3166 10.7071 12.7071L7.70711 15.7071C7.31658 16.0976 6.68342 16.0976 6.29289 15.7071C5.90237 15.3166 5.90237 14.6834 6.29289 14.2929L8.58579 12L6.29289 9.70711C5.90237 9.31658 5.90237 8.68342 6.29289 8.29289ZM12 15C12 14.4477 12.4477 14 13 14H17C17.5523 14 18 14.4477 18 15C18 15.5523 17.5523 16 17 16H13C12.4477 16 12 15.5523 12 15Z"}));export{t as S};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as C}from"./@radix-Cdvw4jJ8.js";const H=e=>C.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.56811 2C4.57873 2 4.58936 2.00001 4.60001 2.00001H5.40001C5.41065 2.00001 5.42128 2 5.4319 2C5.68429 1.99997 5.93008 1.99994 6.13824 2.01695C6.36683 2.03563 6.63656 2.07969 6.90799 2.21799C7.28431 2.40974 7.59027 2.7157 7.78202 3.09202C7.92032 3.36345 7.96438 3.63318 7.98306 3.86178C7.98669 3.90624 7.98955 3.95241 7.99179 4.00001L16.0082 4.00001C16.0105 3.95241 16.0133 3.90624 16.0169 3.86178C16.0356 3.63318 16.0797 3.36345 16.218 3.09202C16.4097 2.7157 16.7157 2.40974 17.092 2.21799C17.3634 2.07969 17.6332 2.03563 17.8618 2.01695C18.0699 1.99994 18.3157 1.99997 18.5681 2H19.4319C19.6843 1.99997 19.9301 1.99994 20.1382 2.01695C20.3668 2.03563 20.6366 2.07969 20.908 2.21799C21.2843 2.40974 21.5903 2.7157 21.782 3.09202C21.9203 3.36345 21.9644 3.63318 21.9831 3.86178C22.0001 4.06993 22 4.31571 22 4.56809V5.43192C22 5.6843 22.0001 5.93008 21.9831 6.13824C21.9644 6.36683 21.9203 6.63656 21.782 6.90799C21.5903 7.28431 21.2843 7.59027 20.908 7.78202C20.6366 7.92032 20.3668 7.96438 20.1382 7.98306C20.0938 7.98669 20.0476 7.98955 20 7.99179V16.0082C20.0476 16.0105 20.0938 16.0133 20.1382 16.0169C20.3668 16.0356 20.6366 16.0797 20.908 16.218C21.2843 16.4097 21.5903 16.7157 21.782 17.092C21.9203 17.3634 21.9644 17.6332 21.9831 17.8618C22.0001 18.0699 22 18.3157 22 18.5681V19.4319C22 19.6843 22.0001 19.9301 21.9831 20.1382C21.9644 20.3668 21.9203 20.6366 21.782 20.908C21.5903 21.2843 21.2843 21.5903 20.908 21.782C20.6366 21.9203 20.3668 21.9644 20.1382 21.9831C19.9301 22.0001 19.6843 22 19.4319 22H18.5681C18.3157 22 18.0699 22.0001 17.8618 21.9831C17.6332 21.9644 17.3634 21.9203 17.092 21.782C16.7157 21.5903 16.4097 21.2843 16.218 20.908C16.0797 20.6366 16.0356 20.3668 16.0169 20.1382C16.0133 20.0938 16.0105 20.0476 16.0082 20H7.99179C7.98955 20.0476 7.98669 20.0938 7.98306 20.1382C7.96438 20.3668 7.92032 20.6366 7.78202 20.908C7.59027 21.2843 7.28431 21.5903 6.90799 21.782C6.63656 21.9203 6.36683 21.9644 6.13824 21.9831C5.93008 22.0001 5.6843 22 5.43192 22H4.56809C4.31571 22 4.06993 22.0001 3.86178 21.9831C3.63318 21.9644 3.36345 21.9203 3.09202 21.782C2.7157 21.5903 2.40974 21.2843 2.21799 20.908C2.07969 20.6366 2.03563 20.3668 2.01695 20.1382C1.99994 19.9301 1.99997 19.6843 2 19.4319V18.5681C1.99997 18.3157 1.99994 18.0699 2.01695 17.8618C2.03563 17.6332 2.07969 17.3634 2.21799 17.092C2.40974 16.7157 2.7157 16.4097 3.09202 16.218C3.36345 16.0797 3.63318 16.0356 3.86178 16.0169C3.90624 16.0133 3.95241 16.0105 4.00001 16.0082V7.99179C3.95241 7.98955 3.90624 7.98669 3.86178 7.98306C3.63318 7.96438 3.36345 7.92032 3.09202 7.78202C2.7157 7.59027 2.40974 7.28431 2.21799 6.90799C2.07969 6.63656 2.03563 6.36683 2.01695 6.13824C1.99994 5.93008 1.99997 5.68429 2 5.4319C2 5.42128 2.00001 5.41065 2.00001 5.40001V4.60001C2.00001 4.58936 2 4.57873 2 4.56811C1.99997 4.31572 1.99994 4.06993 2.01695 3.86178C2.03563 3.63318 2.07969 3.36345 2.21799 3.09202C2.40974 2.7157 2.7157 2.40974 3.09202 2.21799C3.36345 2.07969 3.63318 2.03563 3.86178 2.01695C4.06993 1.99994 4.31572 1.99997 4.56811 2ZM6.00001 7.99179V16.0082C6.0476 16.0105 6.09377 16.0133 6.13824 16.0169C6.36683 16.0356 6.63656 16.0797 6.90799 16.218C7.28431 16.4097 7.59027 16.7157 7.78202 17.092C7.92032 17.3634 7.96438 17.6332 7.98306 17.8618C7.98669 17.9062 7.98955 17.9524 7.99179 18H16.0082C16.0105 17.9524 16.0133 17.9062 16.0169 17.8618C16.0356 17.6332 16.0797 17.3634 16.218 17.092C16.4097 16.7157 16.7157 16.4097 17.092 16.218C17.3634 16.0797 17.6332 16.0356 17.8618 16.0169C17.9062 16.0133 17.9524 16.0105 18 16.0082V7.99179C17.9524 7.98955 17.9062 7.98669 17.8618 7.98306C17.6332 7.96438 17.3634 7.92032 17.092 7.78202C16.7157 7.59027 16.4097 7.28431 16.218 6.90799C16.0797 6.63656 16.0356 6.36683 16.0169 6.13824C16.0133 6.09377 16.0105 6.0476 16.0082 6.00001L7.99179 6.00001C7.98955 6.0476 7.98669 6.09377 7.98306 6.13824C7.96438 6.36683 7.92032 6.63656 7.78202 6.90799C7.59027 7.28431 7.28431 7.59027 6.90799 7.78202C6.63656 7.92032 6.36683 7.96438 6.13824 7.98306C6.09377 7.98669 6.0476 7.98955 6.00001 7.99179ZM6.00001 4.60001C6.00001 4.30348 5.99923 4.14122 5.9897 4.02464C5.98932 4.02 5.98894 4.0156 5.98856 4.01145C5.98441 4.01107 5.98001 4.01069 5.97537 4.01031C5.85879 4.00078 5.69653 4.00001 5.40001 4.00001H4.60001C4.30348 4.00001 4.14122 4.00078 4.02464 4.01031C4.02 4.01069 4.0156 4.01107 4.01145 4.01145C4.01107 4.0156 4.01069 4.02 4.01031 4.02464C4.00078 4.14122 4.00001 4.30348 4.00001 4.60001V5.40001C4.00001 5.69653 4.00078 5.85879 4.01031 5.97537C4.01069 5.98001 4.01107 5.98441 4.01145 5.98856C4.0156 5.98894 4.02 5.98932 4.02464 5.9897C4.14122 5.99923 4.30348 6.00001 4.60001 6.00001H5.40001C5.69653 6.00001 5.85879 5.99923 5.97537 5.9897C5.98001 5.98932 5.98441 5.98894 5.98856 5.98856C5.98894 5.98441 5.98932 5.98001 5.9897 5.97537C5.99923 5.85879 6.00001 5.69653 6.00001 5.40001V4.60001ZM18 5.40001C18 5.69653 18.0008 5.85879 18.0103 5.97537C18.0107 5.98001 18.0111 5.98441 18.0115 5.98856C18.0156 5.98894 18.02 5.98932 18.0246 5.9897C18.1412 5.99923 18.3035 6.00001 18.6 6.00001H19.4C19.6965 6.00001 19.8588 5.99923 19.9754 5.9897C19.98 5.98932 19.9844 5.98893 19.9886 5.98855C19.9889 5.9844 19.9893 5.98001 19.9897 5.97537C19.9992 5.85879 20 5.69653 20 5.40001V4.60001C20 4.30348 19.9992 4.14122 19.9897 4.02464C19.9893 4.02 19.9889 4.0156 19.9885 4.01145C19.9844 4.01107 19.98 4.01069 19.9754 4.01031C19.8588 4.00078 19.6965 4.00001 19.4 4.00001H18.6C18.3035 4.00001 18.1412 4.00078 18.0246 4.01031C18.02 4.01069 18.0156 4.01107 18.0115 4.01145C18.0111 4.0156 18.0107 4.02 18.0103 4.02464C18.0008 4.14122 18 4.30348 18 4.60001V5.40001ZM18.6 18C18.3035 18 18.1412 18.0008 18.0246 18.0103C18.02 18.0107 18.0156 18.0111 18.0115 18.0115C18.0111 18.0156 18.0107 18.02 18.0103 18.0246C18.0008 18.1412 18 18.3035 18 18.6V19.4C18 19.6965 18.0008 19.8588 18.0103 19.9754C18.0107 19.98 18.0111 19.9844 18.0115 19.9885C18.0156 19.9889 18.02 19.9893 18.0246 19.9897C18.1412 19.9992 18.3035 20 18.6 20H19.4C19.6965 20 19.8588 19.9992 19.9754 19.9897C19.98 19.9893 19.9844 19.9889 19.9886 19.9885C19.9889 19.9844 19.9893 19.98 19.9897 19.9754C19.9992 19.8588 20 19.6965 20 19.4V18.6C20 18.3035 19.9992 18.1412 19.9897 18.0246C19.9893 18.02 19.9889 18.0156 19.9885 18.0115C19.9844 18.0111 19.98 18.0107 19.9754 18.0103C19.8588 18.0008 19.6965 18 19.4 18H18.6ZM6.00001 18.6C6.00001 18.3035 5.99923 18.1412 5.9897 18.0246C5.98932 18.02 5.98894 18.0156 5.98856 18.0115C5.98441 18.0111 5.98001 18.0107 5.97537 18.0103C5.85879 18.0008 5.69653 18 5.40001 18H4.60001C4.30348 18 4.14122 18.0008 4.02464 18.0103C4.02 18.0107 4.0156 18.0111 4.01145 18.0115C4.01107 18.0156 4.01069 18.02 4.01031 18.0246C4.00078 18.1412 4.00001 18.3035 4.00001 18.6V19.4C4.00001 19.6965 4.00078 19.8588 4.01031 19.9754C4.01069 19.98 4.01107 19.9844 4.01145 19.9885C4.0156 19.9889 4.02 19.9893 4.02464 19.9897C4.14122 19.9992 4.30348 20 4.60001 20H5.40001C5.69653 20 5.85879 19.9992 5.97537 19.9897C5.98001 19.9893 5.98441 19.9889 5.98856 19.9885C5.98894 19.9844 5.98932 19.98 5.9897 19.9754C5.99923 19.8588 6.00001 19.6965 6.00001 19.4V18.6Z"}));export{H as S};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as C}from"./@radix-
|
1
|
+
import{r as C}from"./@radix-Cdvw4jJ8.js";const l=e=>C.createElement("svg",{viewBox:"0 0 24 24",fill:"black",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1615 1H12.8385C13.3657 0.999983 13.8205 0.999967 14.195 1.03057C14.5904 1.06287 14.9836 1.13419 15.362 1.32698C15.9265 1.6146 16.3854 2.07354 16.673 2.63803C16.8658 3.01641 16.9371 3.40963 16.9694 3.80497C16.9969 4.14075 16.9997 4.54097 17 5H21C21.5523 5 22 5.44772 22 6C22 6.55229 21.5523 7 21 7H20V17.2413C20 18.0463 20 18.7106 19.9558 19.2518C19.9099 19.8139 19.8113 20.3306 19.564 20.816C19.1805 21.5686 18.5686 22.1805 17.816 22.564C17.3306 22.8113 16.8139 22.9099 16.2518 22.9558C15.7106 23 15.0463 23 14.2413 23H9.75868C8.95372 23 8.28936 23 7.74817 22.9558C7.18608 22.9099 6.66937 22.8113 6.18404 22.564C5.43139 22.1805 4.81947 21.5686 4.43597 20.816C4.18868 20.3306 4.09012 19.8139 4.04419 19.2518C3.99998 18.7106 3.99999 18.0463 4 17.2413L4 7H3C2.44772 7 2 6.55229 2 6C2 5.44772 2.44772 5 3 5H7.00003C7.00031 4.54097 7.00314 4.14075 7.03057 3.80497C7.06287 3.40963 7.13419 3.01641 7.32698 2.63803C7.6146 2.07354 8.07354 1.6146 8.63803 1.32698C9.01641 1.13419 9.40963 1.06287 9.80497 1.03057C10.1795 0.999967 10.6343 0.999983 11.1615 1ZM6 7V17.2C6 18.0566 6.00078 18.6389 6.03755 19.089C6.07337 19.5274 6.1383 19.7516 6.21799 19.908C6.40973 20.2843 6.71569 20.5903 7.09202 20.782C7.24842 20.8617 7.47262 20.9266 7.91104 20.9625C8.36113 20.9992 8.94342 21 9.8 21H14.2C15.0566 21 15.6389 20.9992 16.089 20.9625C16.5274 20.9266 16.7516 20.8617 16.908 20.782C17.2843 20.5903 17.5903 20.2843 17.782 19.908C17.8617 19.7516 17.9266 19.5274 17.9624 19.089C17.9992 18.6389 18 18.0566 18 17.2V7H6ZM14.9999 5H9.00007C9.00051 4.5349 9.00357 4.21698 9.02393 3.96784C9.04612 3.69617 9.0838 3.59546 9.10899 3.54601C9.20487 3.35785 9.35785 3.20487 9.54601 3.109C9.59545 3.0838 9.69617 3.04612 9.96784 3.02393C10.2512 3.00078 10.6234 3 11.2 3H12.8C13.3766 3 13.7488 3.00078 14.0322 3.02393C14.3038 3.04612 14.4045 3.0838 14.454 3.109C14.6422 3.20487 14.7951 3.35785 14.891 3.54601C14.9162 3.59546 14.9539 3.69617 14.9761 3.96784C14.9964 4.21698 14.9995 4.5349 14.9999 5ZM10 10.5C10.5523 10.5 11 10.9477 11 11.5V16.5C11 17.0523 10.5523 17.5 10 17.5C9.44772 17.5 9 17.0523 9 16.5V11.5C9 10.9477 9.44772 10.5 10 10.5ZM14 10.5C14.5523 10.5 15 10.9477 15 11.5V16.5C15 17.0523 14.5523 17.5 14 17.5C13.4477 17.5 13 17.0523 13 16.5V11.5C13 10.9477 13.4477 10.5 14 10.5Z"}));export{l as S};
|
@@ -0,0 +1 @@
|
|
1
|
+
function t(r){return typeof r=="string"}function n(r){return Array.isArray(r)}function i(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)}export{t as a,n as b,i};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{f as n,i as o,F as i,j as u}from"./index-BFqbGSck.js";import{c}from"./@tanstack-5gTMR7G2.js";async function p(r){const e=o(u.currentUser),t=await n(e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!t.ok){const s=await t.json().then(a=>Array.isArray(a.detail)?a.detail[1]:a.detail).catch(()=>"Failed to update User");throw new i({status:t.status,statusText:t.statusText,message:s})}return t.json()}function d(r){return c({mutationFn:async e=>p(e),...r})}export{d as u};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{f as n,i,F as o,j as u}from"./index-BFqbGSck.js";import{c}from"./@tanstack-5gTMR7G2.js";async function p(e){const r=i(u.settings),t=await n(r,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const a=await t.json().then(s=>Array.isArray(s.detail)?s.detail[1]:s.detail).catch(()=>"Failed to update Server Settings");throw new o({status:t.status,statusText:t.statusText,message:a})}return t.json()}function d(e){return c({mutationFn:async r=>p(r),...e})}export{d as u};
|
@@ -1 +1 @@
|
|
1
|
-
import{g as l,s as u,c as p}from"./index.esm-
|
1
|
+
import{g as l,s as u,c as p}from"./index.esm-DhJo3mA6.js";const d=(o,s,e)=>{if(o&&"reportValidity"in o){const r=l(e,s);o.setCustomValidity(r&&r.message||""),o.reportValidity()}},h=(o,s)=>{for(const e in s.fields){const r=s.fields[e];r&&r.ref&&"reportValidity"in r.ref?d(r.ref,e,o):r.refs&&r.refs.forEach(i=>d(i,e,o))}},y=(o,s)=>{s.shouldUseNativeValidation&&h(o,s);const e={};for(const r in o){const i=l(s.fields,r),t=Object.assign(o[r]||{},{ref:i&&i.ref});if(g(s.names||Object.keys(o),r)){const n=Object.assign({},l(e,r));u(n,"root",t),u(e,r,n)}else u(e,r,t)}return e},g=(o,s)=>o.some(e=>e.startsWith(s+"."));var E=function(o,s){for(var e={};o.length;){var r=o[0],i=r.code,t=r.message,n=r.path.join(".");if(!e[n])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];e[n]={message:a.message,type:a.code}}else e[n]={message:t,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(m){return m.errors.forEach(function(v){return o.push(v)})}),s){var c=e[n].types,f=c&&c[r.code];e[n]=p(n,s,e,i,f?[].concat(f,r.message):r.message)}o.shift()}return e},j=function(o,s,e){return e===void 0&&(e={}),function(r,i,t){try{return Promise.resolve(function(n,a){try{var c=Promise.resolve(o[e.mode==="sync"?"parse":"parseAsync"](r,s)).then(function(f){return t.shouldUseNativeValidation&&h({},t),{errors:{},values:e.raw?r:f}})}catch(f){return a(f)}return c&&c.then?c.then(void 0,a):c}(0,function(n){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(n))return{values:{},errors:y(E(n.errors,!t.shouldUseNativeValidation&&t.criteriaMode==="all"),t)};throw n}))}catch(n){return Promise.reject(n)}}};export{j as t};
|