mage-ai 0.9.68__py3-none-any.whl → 0.9.70__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.
Potentially problematic release.
This version of mage-ai might be problematic. Click here for more details.
- mage_ai/api/policies/BackfillPolicy.py +1 -0
- mage_ai/api/policies/PipelinePolicy.py +1 -0
- mage_ai/api/policies/WorkspacePolicy.py +1 -0
- mage_ai/api/presenters/BackfillPresenter.py +1 -0
- mage_ai/api/resources/GitBranchResource.py +56 -23
- mage_ai/api/resources/GitCustomBranchResource.py +29 -1
- mage_ai/api/resources/OauthResource.py +1 -1
- mage_ai/api/resources/PipelineResource.py +11 -5
- mage_ai/api/resources/PipelineRunResource.py +41 -4
- mage_ai/api/resources/PipelineScheduleResource.py +4 -0
- mage_ai/api/resources/PullRequestResource.py +6 -4
- mage_ai/api/resources/SeedResource.py +2 -1
- mage_ai/api/resources/SessionResource.py +13 -1
- mage_ai/api/resources/WorkspaceResource.py +5 -4
- mage_ai/authentication/permissions/constants.py +2 -0
- mage_ai/authentication/permissions/seed.py +32 -21
- mage_ai/authentication/providers/active_directory.py +4 -3
- mage_ai/authentication/providers/okta.py +22 -83
- mage_ai/cache/block_action_object/__init__.py +1 -1
- mage_ai/cluster_manager/kubernetes/workload_manager.py +52 -1
- mage_ai/cluster_manager/workspace/base.py +6 -0
- mage_ai/cluster_manager/workspace/kubernetes.py +22 -1
- mage_ai/command_center/applications/utils.py +2 -2
- mage_ai/command_center/presenters/text.py +1 -1
- mage_ai/data_preparation/executors/k8s_block_executor.py +30 -7
- mage_ai/data_preparation/executors/k8s_pipeline_executor.py +30 -7
- mage_ai/data_preparation/executors/streaming_pipeline_executor.py +78 -8
- mage_ai/data_preparation/git/__init__.py +50 -22
- mage_ai/data_preparation/git/api.py +62 -7
- mage_ai/data_preparation/git/utils.py +45 -21
- mage_ai/data_preparation/models/block/__init__.py +31 -8
- mage_ai/data_preparation/models/block/data_integration/mixins.py +16 -5
- mage_ai/data_preparation/models/block/dynamic/child.py +3 -0
- mage_ai/data_preparation/models/block/dynamic/utils.py +9 -4
- mage_ai/data_preparation/models/block/dynamic/variables.py +2 -2
- mage_ai/data_preparation/models/block/extension/utils.py +1 -0
- mage_ai/data_preparation/models/block/global_data_product/__init__.py +25 -2
- mage_ai/data_preparation/models/block/integration/__init__.py +1 -1
- mage_ai/data_preparation/models/block/remote/__init__.py +0 -0
- mage_ai/data_preparation/models/block/remote/models.py +58 -0
- mage_ai/data_preparation/models/block/sql/__init__.py +1 -1
- mage_ai/data_preparation/models/block/utils.py +38 -0
- mage_ai/data_preparation/models/constants.py +2 -0
- mage_ai/data_preparation/models/global_data_product/__init__.py +12 -0
- mage_ai/data_preparation/models/pipeline.py +31 -11
- mage_ai/data_preparation/models/triggers/__init__.py +4 -2
- mage_ai/data_preparation/models/utils.py +6 -0
- mage_ai/data_preparation/models/variable.py +18 -4
- mage_ai/data_preparation/repo_manager.py +3 -2
- mage_ai/data_preparation/shared/utils.py +1 -1
- mage_ai/data_preparation/storage/local_storage.py +12 -6
- mage_ai/data_preparation/templates/data_exporters/mysql.py +2 -2
- mage_ai/data_preparation/templates/data_exporters/oracledb.py +27 -0
- mage_ai/data_preparation/templates/repo/metadata.yaml +1 -0
- mage_ai/io/bigquery.py +131 -58
- mage_ai/io/mysql.py +38 -6
- mage_ai/io/snowflake.py +152 -29
- mage_ai/orchestration/db/migrations/versions/42a14d6143f1_update_token_column_type.py +54 -0
- mage_ai/orchestration/db/models/oauth.py +14 -13
- mage_ai/orchestration/db/models/schedules.py +30 -2
- mage_ai/orchestration/job_manager.py +6 -0
- mage_ai/orchestration/notification/sender.py +37 -15
- mage_ai/orchestration/pipeline_scheduler_original.py +48 -31
- mage_ai/orchestration/queue/celery_queue.py +8 -1
- mage_ai/orchestration/queue/process_queue.py +67 -4
- mage_ai/orchestration/queue/queue.py +8 -0
- mage_ai/orchestration/triggers/api.py +29 -1
- mage_ai/orchestration/triggers/global_data_product.py +9 -4
- mage_ai/orchestration/triggers/utils.py +10 -1
- mage_ai/orchestration/utils/resources.py +3 -0
- mage_ai/server/api/downloads.py +4 -1
- mage_ai/server/api/runs.py +151 -0
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +6 -6
- mage_ai/server/frontend_dist/_next/static/{i8pymuJDTVHdWjUP1QSh1 → RhDiJSkcjCsh4xxX4BFBk}/_buildManifest.js +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1557-b3502f3f1aa92ac7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2717-d9200be634dd6766.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3548-9d26185b3fb663b1.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/5699-6d708c6b2153ea08.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7361-8a23dd8360593e7a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7966-b9b85ba10667e654.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9624-8b8e100079ab69e1.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-2a69553d8c6eeb53.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/index-4e12783b064c1cfe.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-4bfc84ff07d7656f.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-a66b4c7641ae03eb.js → frontend_dist/_next/static/chunks/pages/pipeline-runs-6d183f91a2ff6668.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-7181b086c93784d2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-38e1fbcfbfc1014e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-b645a6d13ab9fe3a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-eb11c5390c982b49.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-cb88fd075a357fcf.js → triggers-4612d15a65c35912.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-3591d035bb3bb2b8.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-32985f3f7c7dd3ab.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-349af617d05f001b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-60d01d3887e31136.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-86814e581acaf5db.js → users-a4db8710f703c729.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/sign-in-09414a8b66fb6f06.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/triggers-9cba3211434a8966.js → frontend_dist/_next/static/chunks/pages/triggers-a599c6ac89be8c8d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-3433c8b22e8342aa.js +1 -0
- mage_ai/server/frontend_dist/block-layout.html +2 -2
- mage_ai/server/frontend_dist/compute.html +2 -2
- mage_ai/server/frontend_dist/files.html +2 -2
- mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
- mage_ai/server/frontend_dist/global-data-products.html +2 -2
- mage_ai/server/frontend_dist/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist/global-hooks.html +2 -2
- mage_ai/server/frontend_dist/index.html +2 -2
- mage_ai/server/frontend_dist/manage/files.html +2 -2
- mage_ai/server/frontend_dist/manage/settings.html +2 -2
- mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist/manage/users/new.html +2 -2
- mage_ai/server/frontend_dist/manage/users.html +2 -2
- mage_ai/server/frontend_dist/manage.html +2 -2
- mage_ai/server/frontend_dist/oauth.html +2 -2
- mage_ai/server/frontend_dist/overview.html +2 -2
- mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist/pipelines.html +2 -2
- mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist/platform/global-hooks.html +2 -2
- mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist/settings/platform/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/platform/settings.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/permissions.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/roles.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist/settings.html +2 -2
- mage_ai/server/frontend_dist/sign-in.html +6 -6
- mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
- mage_ai/server/frontend_dist/templates.html +2 -2
- mage_ai/server/frontend_dist/terminal.html +2 -2
- mage_ai/server/frontend_dist/test.html +2 -2
- mage_ai/server/frontend_dist/triggers.html +2 -2
- mage_ai/server/frontend_dist/version-control.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/404.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/_next/static/{CKCvjsYCf2imD2X8zAOBf → TdpLLFome13qvM0gXvpHs}/_buildManifest.js +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-b3502f3f1aa92ac7.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-d9200be634dd6766.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-9d26185b3fb663b1.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-6d708c6b2153ea08.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-8a23dd8360593e7a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7966-b9b85ba10667e654.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-8b8e100079ab69e1.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-2a69553d8c6eeb53.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-4e12783b064c1cfe.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-4bfc84ff07d7656f.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipeline-runs-a66b4c7641ae03eb.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-6d183f91a2ff6668.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-7181b086c93784d2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-38e1fbcfbfc1014e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-b645a6d13ab9fe3a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-eb11c5390c982b49.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-cb88fd075a357fcf.js → triggers-4612d15a65c35912.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-3591d035bb3bb2b8.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-32985f3f7c7dd3ab.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-349af617d05f001b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-60d01d3887e31136.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-86814e581acaf5db.js → users-a4db8710f703c729.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-09414a8b66fb6f06.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/triggers-9cba3211434a8966.js → frontend_dist_base_path_template/_next/static/chunks/pages/triggers-a599c6ac89be8c8d.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-3433c8b22e8342aa.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/compute.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/files.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-data-products.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-hooks.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/files.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/oauth.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/overview.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/sign-in.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/templates.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/terminal.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/test.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/triggers.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/version-control.html +2 -2
- mage_ai/server/scheduler_manager.py +9 -0
- mage_ai/server/server.py +47 -17
- mage_ai/server/utils/output_display.py +2 -2
- mage_ai/server/websocket_server.py +1 -0
- mage_ai/services/aws/ecs/ecs.py +1 -0
- mage_ai/services/k8s/config.py +4 -4
- mage_ai/services/k8s/utils.py +97 -0
- mage_ai/settings/keys/auth.py +2 -0
- mage_ai/settings/server.py +1 -1
- mage_ai/shared/parsers.py +6 -1
- mage_ai/streaming/sources/influxdb.py +2 -0
- mage_ai/streaming/sources/kafka.py +1 -1
- mage_ai/tests/api/endpoints/mixins.py +10 -9
- mage_ai/tests/api/endpoints/test_seeds.py +24 -0
- mage_ai/tests/api/operations/base/mixins.py +1 -1
- mage_ai/tests/api/operations/test_sessions.py +53 -2
- mage_ai/tests/api/resources/test_pipeline_resource.py +2 -2
- mage_ai/tests/authentication/oauth/test_utils.py +1 -1
- mage_ai/tests/authentication/providers/test_okta.py +43 -0
- mage_ai/tests/data_preparation/models/block/test_global_data_product.py +2 -0
- mage_ai/tests/orchestration/db/models/test_oauth.py +3 -3
- mage_ai/tests/orchestration/queue/test_process_queue.py +1 -0
- mage_ai/tests/orchestration/triggers/test_global_data_product.py +138 -136
- mage_ai/tests/server/test_server.py +27 -4
- mage_ai/tests/services/k8s/test_job_manager.py +9 -6
- mage_ai/version_control/branch/utils.py +2 -1
- mage_ai/version_control/models.py +3 -2
- {mage_ai-0.9.68.dist-info → mage_ai-0.9.70.dist-info}/METADATA +5 -5
- {mage_ai-0.9.68.dist-info → mage_ai-0.9.70.dist-info}/RECORD +272 -264
- mage_ai/server/frontend_dist/_next/static/chunks/1557-01f0843dc6ac4971.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2717-b5f9575799b594d5.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3548-961ff79ca70038c7.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5699-6efc749f2f8ddd20.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7361-18d9d8be96e1ce97.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7966-f07b2913f7326b50.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9624-59b2f803f9c88cd6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-08790743315de36a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/index-13760bb72d823b69.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-852d403c7bda21b3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-bd0aff5a5ed8888c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-d1ee961387c58b7f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-f028ef3880ed856c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-ceb06e1616ee9610.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-8ff16ef9566e911a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/settings-74d76300942dcee8.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-d7a8bc51bb7a1082.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-79a4cf66a623e667.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/sign-in-f59d34429fe022ee.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-5753fac7c1bfdc88.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-01f0843dc6ac4971.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-b5f9575799b594d5.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-961ff79ca70038c7.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-6efc749f2f8ddd20.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-18d9d8be96e1ce97.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7966-f07b2913f7326b50.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-59b2f803f9c88cd6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-08790743315de36a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-13760bb72d823b69.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-852d403c7bda21b3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-bd0aff5a5ed8888c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-d1ee961387c58b7f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-f028ef3880ed856c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-ceb06e1616ee9610.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-8ff16ef9566e911a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-74d76300942dcee8.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-d7a8bc51bb7a1082.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-79a4cf66a623e667.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-f59d34429fe022ee.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-5753fac7c1bfdc88.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{i8pymuJDTVHdWjUP1QSh1 → RhDiJSkcjCsh4xxX4BFBk}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{CKCvjsYCf2imD2X8zAOBf → TdpLLFome13qvM0gXvpHs}/_ssgManifest.js +0 -0
- {mage_ai-0.9.68.dist-info → mage_ai-0.9.70.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.68.dist-info → mage_ai-0.9.70.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.68.dist-info → mage_ai-0.9.70.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.68.dist-info → mage_ai-0.9.70.dist-info}/top_level.txt +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8170],{81334:function(e,n,t){"use strict";t.d(n,{Z:function(){return w}});var i=t(82394),r=t(82684),o=t(27277),u=t(31882),l=t(38276),c=t(48381),s=t(30160),a=t(17488),d=t(25976),f=t(44897),p=t(42631),v=t(47041),g=t(70515),h=d.default.div.withConfig({displayName:"indexstyle__DropdownStyle",componentId:"sc-suwkha-0"})([""," border-radius:","px;max-height:","px;overflow:auto;position:absolute;width:100%;z-index:1;"," ",""],v.w5,p.BG,40*g.iI,(function(e){return"\n background-color: ".concat((e.theme.background||f.Z.background).popup,";\n box-shadow: ").concat((e.theme.shadow||f.Z.shadow).popup,";\n ")}),(function(e){return e.topOffset&&"\n top: ".concat(e.topOffset-.5*g.iI,"px;\n ")})),m=d.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-suwkha-1"})(["padding:","px;position:relative;z-index:2;&:hover{cursor:pointer;}",""],.5*g.iI,(function(e){return e.highlighted&&"\n background-color: ".concat((e.theme.interactive||f.Z.interactive).hoverBackground,";\n ")})),y=t(39643),b=t(95924),_=t(86735),j=t(44688),x=t(28598);function O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function Z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var w=function(e){var n,t=e.removeTag,i=e.selectTag,d=e.selectedTags,f=void 0===d?[]:d,p=e.tags,v=void 0===p?[]:p,g=e.uuid,O=(0,r.useRef)(null),w=(0,r.useState)(!1),P=w[0],k=w[1],C=(0,r.useState)(null),S=C[0],E=C[1],N=(0,r.useMemo)((function(){return(0,_.YC)(v||[],"uuid")}),[v]),T=(0,r.useMemo)((function(){return null===N||void 0===N?void 0:N.map((function(e){return{itemObject:e,searchQueries:[e.uuid],value:e.uuid}}))}),[N]),D=(0,r.useMemo)((function(){return(null===S||void 0===S?void 0:S.length)>=1?T.concat({itemObject:{uuid:S},searchQueries:[S],value:"Add tag: ".concat(S)}):T}),[T,S]),R=(0,j.y)(),M=R.registerOnKeyDown,I=R.unregisterOnKeyDown;return(0,r.useEffect)((function(){return function(){return I(g)}}),[I,g]),null===M||void 0===M||M(g,(function(e,n){var t;P&&n[y.vP]&&(k(!1),null===O||void 0===O||null===(t=O.current)||void 0===t||t.blur())}),[P,O]),(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(c.Z,{onClickTag:t,tags:f}),(0,x.jsxs)(l.Z,{mt:1,style:{position:"relative"},children:[(0,x.jsx)(a.Z,{onBlur:function(){return setTimeout((function(){return k(!1)}),150)},onChange:function(e){return E(e.target.value)},onFocus:function(){return k(!0)},ref:O,value:S||""}),(0,x.jsx)(h,{topOffset:null===O||void 0===O||null===(n=O.current)||void 0===n?void 0:n.getBoundingClientRect().height,children:(0,x.jsx)(o.Z,{itemGroups:[{items:P?D:[],renderItem:function(e,n){var t=e.value;return(0,x.jsx)(m,Z(Z({},n),{},{onClick:function(e){var t;(0,b.j)(e),null===n||void 0===n||null===(t=n.onClick)||void 0===t||t.call(n,e)},children:(0,x.jsx)(u.Z,{small:!0,children:(0,x.jsx)(s.ZP,{children:t})})}))}}],onSelectItem:function(e){var n=e.itemObject;null===i||void 0===i||i(n),E(null)},searchQuery:S,uuid:g})})]})]})}},68781:function(e,n,t){"use strict";var i;t.d(n,{R:function(){return r}}),function(e){e.AZURE_CONTAINER_INSTANCE="azure_container_instance",e.ECS="ecs",e.GCP_CLOUD_RUN="gcp_cloud_run",e.K8S="k8s",e.LOCAL_PYTHON="local_python",e.PYSPARK="pyspark"}(i||(i={}));var r=[i.AZURE_CONTAINER_INSTANCE,i.ECS,i.GCP_CLOUD_RUN,i.K8S,i.LOCAL_PYTHON,i.PYSPARK]},37003:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return K}});var i=t(77837),r=t(75582),o=t(82394),u=t(38860),l=t.n(u),c=t(82684),s=t(34376),a=t(75457),d=t(93808),f=t(71180),p=t(70652),v=t(55485),g=t(85854),h=t(48670),m=t(44085),y=t(88543),b=t(38276),_=t(81334),j=t(30160),x=t(17488),O=t(35686),Z=t(98464),w=t(77417),P=t(68781),k=t(78419),C=t(70515),S=t(53808),E=t(42122),N=t(81728),T=t(86735),D=t(28598);function R(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function M(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?R(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):R(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var I=function(e){var n,t,i,r,u,l,s,a=e.isPipelineUpdating,d=e.pipeline,R=e.updatePipeline,I=(0,w.Z)().project,A=(0,c.useRef)(null),U=(0,c.useRef)(null),H=null===d||void 0===d?void 0:d.uuid,F=(0,c.useMemo)((function(){return(null===d||void 0===d?void 0:d.blocks)||[]}),[d]),L=(0,c.useState)(!1),G=L[0],K=L[1],Y=(0,c.useState)(!1),z=Y[0],B=Y[1],W=(0,c.useState)(null),Q=W[0],X=W[1],q=(0,Z.Z)(d);(0,c.useEffect)((function(){(0,E.Xy)(d,q)||X(d)}),[d,q]);var J=(0,c.useCallback)((function(e){K(!0),X(e)}),[]),$="".concat(k.g6,"_").concat(H),V=(0,c.useState)({}),ee=V[0],ne=V[1],te="".concat(k.vF,"_").concat(H),ie=(0,c.useState)(!1),re=ie[0],oe=ie[1],ue=(0,c.useCallback)((function(e){ne((function(n){var t=e(n);return(0,S.t8)($,JSON.stringify(t)),t}))}),[$,ne]),le=(0,c.useCallback)((function(e){oe((function(n){var t=e(n);return(0,S.t8)(te,t),t}))}),[te,oe]);(0,c.useEffect)((function(){var e=(0,S.U2)($);e&&(0,N.Pb)(e)&&ne(JSON.parse(e))}),[$,ne]),(0,c.useEffect)((function(){var e=(0,S.U2)(te);e&&oe(e)}),[te,oe]);var ce=(0,c.useMemo)((function(){return null===Q||void 0===Q?void 0:Q.executor_type}),[Q]);(0,c.useEffect)((function(){z||!ce||P.R.find((function(e){return e===ce}))||B(!0)}),[z,ce]);var se=(0,c.useMemo)((function(){return(null===F||void 0===F?void 0:F.filter((function(e){var n=e.uuid;return!(null===ee||void 0===ee||!ee[n])}))).length===F.length}),[F,ee]),ae=(0,c.useMemo)((function(){return!(null!==F&&void 0!==F&&F.length)}),[F]),de=(0,c.useMemo)((function(){return(null===Q||void 0===Q?void 0:Q.tags)||[]}),[Q]),fe=O.ZP.tags.list().data,pe=(0,c.useMemo)((function(){return((null===fe||void 0===fe?void 0:fe.tags)||[]).filter((function(e){var n=e.uuid;return!de.includes(n)}))}),[fe,de]),ve=(0,c.useMemo)((function(){var e;return null===I||void 0===I||null===(e=I.pipelines)||void 0===e?void 0:e.settings}),[I]),ge=(0,c.useMemo)((function(){var e,n,t;return(null===ve||void 0===ve||null===(e=ve.triggers)||void 0===e?void 0:e.save_in_code_automatically)&&"undefined"===typeof(null===Q||void 0===Q||null===(n=Q.settings)||void 0===n||null===(t=n.triggers)||void 0===t?void 0:t.save_in_code_automatically)}),[Q,ve]);return(0,D.jsxs)(b.Z,{p:C.cd,children:[(0,D.jsxs)(y.Z,{title:"Details",children:[(0,D.jsx)(y.S,{invalid:G&&!(null!==Q&&void 0!==Q&&Q.name),textInput:{onChange:function(e){return J((function(n){return M(M({},n),{},{name:e.target.value})}))},value:null===Q||void 0===Q?void 0:Q.name},title:"Pipeline name"}),(0,D.jsx)(y.S,{textInput:{onChange:function(e){return J((function(n){return M(M({},n),{},{description:e.target.value})}))},placeholder:"Enter description...",value:(null===Q||void 0===Q?void 0:Q.description)||""},title:"Pipeline description"}),(0,D.jsx)(y.S,{description:"When enabled, this setting allows sharing of objects and memory space across blocks within a single pipeline.",title:"Run pipeline in a single process",toggleSwitch:{checked:!(null===Q||void 0===Q||!Q.run_pipeline_in_one_process),onCheck:function(e){return J((function(n){return M(M({},n),{},{run_pipeline_in_one_process:e(null===n||void 0===n?void 0:n.run_pipeline_in_one_process)})}))}}}),(0,D.jsx)(y.S,{description:(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(j.ZP,{muted:!0,small:!0,children:"Every time a trigger is created or updated in this pipeline, it\u2019ll be automatically be persisted it in code."}),(null===ve||void 0===ve||null===(n=ve.triggers)||void 0===n?void 0:n.save_in_code_automatically)&&(0,D.jsx)(j.ZP,{small:!0,warning:!0,children:"This settings is enabled at the project level. Changing the value here will only affect this pipeline."})]}),title:"Save triggers in code automatically",toggleSwitch:{checked:ge||!(null===Q||void 0===Q||null===(t=Q.settings)||void 0===t||null===(i=t.triggers)||void 0===i||!i.save_in_code_automatically),onCheck:function(e){return J((function(n){var t,i,r;return M(M({},n),{},{settings:M(M({},null===n||void 0===n?void 0:n.settings),{},{triggers:M(M({},null===n||void 0===n||null===(t=n.settings)||void 0===t?void 0:t.triggers),{},{save_in_code_automatically:e(ge||(null===n||void 0===n||null===(i=n.settings)||void 0===i||null===(r=i.triggers)||void 0===r?void 0:r.save_in_code_automatically))})})})}))}}})]}),(0,D.jsxs)(b.Z,{mt:C.HN,children:[(0,D.jsx)(g.Z,{children:"Executor type"}),(0,D.jsxs)(j.ZP,{muted:!0,children:["For more information on this setting, please read the ",(0,D.jsx)(h.Z,{href:"https://docs.mage.ai/production/configuring-production-settings/compute-resource#2-set-executor-type-and-customize-the-compute-resource-of-the-mage-executor",openNewWindow:!0,children:"documentation"}),"."]}),(0,D.jsxs)(b.Z,{mt:1,children:[!z&&(0,D.jsx)(m.Z,{label:"Executor type",onChange:function(e){return J((function(n){return M(M({},n),{},{executor_type:e.target.value})}))},primary:!0,ref:A,value:(null===Q||void 0===Q?void 0:Q.executor_type)||"",children:P.R.map((function(e){return(0,D.jsx)("option",{value:e,children:e},e)}))}),z&&(0,D.jsx)(x.Z,{label:"Executor type",monospace:!0,onChange:function(e){return J((function(n){return M(M({},n),{},{executor_type:e.target.value})}))},ref:U,setContentOnMount:!0,value:(null===Q||void 0===Q?void 0:Q.executor_type)||""}),(0,D.jsx)(b.Z,{mt:1,children:(0,D.jsx)(h.Z,{muted:!0,onClick:function(){z?(J((function(e){return M(M({},e),{},{executor_type:null===d||void 0===d?void 0:d.executor_type})})),setTimeout((function(){var e;return null===A||void 0===A||null===(e=A.current)||void 0===e?void 0:e.focus()}),1)):setTimeout((function(){var e;return null===U||void 0===U||null===(e=U.current)||void 0===e?void 0:e.focus()}),1),B(!z)},preventDefault:!0,small:!0,children:z?"Select a preset executor type":"Enter a custom executor type"})})]})]}),(0,D.jsxs)(b.Z,{mt:C.HN,children:[(0,D.jsx)(g.Z,{children:"Retry configuration"}),(0,D.jsxs)(j.ZP,{muted:!0,children:["For more information on this setting, please read the ",(0,D.jsx)(h.Z,{href:"https://docs.mage.ai/orchestration/pipeline-runs/retrying-block-runs",openNewWindow:!0,children:"documentation"}),"."]}),(0,D.jsx)(b.Z,{mt:1,children:(0,D.jsxs)(v.ZP,{children:[(0,D.jsx)(x.Z,{label:"Retries",monospace:!0,onChange:function(e){return J((function(n){return M(M({},n),{},{retry_config:M(M({},null===n||void 0===n?void 0:n.retry_config),{},{retries:"undefined"!==typeof e.target.value&&null!==e.target.value?Number(e.target.value):e.target.value})})}))},setContentOnMount:!0,type:"number",value:(null===Q||void 0===Q||null===(r=Q.retry_config)||void 0===r?void 0:r.retries)||""}),(0,D.jsx)(b.Z,{mr:1}),(0,D.jsx)(x.Z,{label:"Delay",monospace:!0,onChange:function(e){return J((function(n){return M(M({},n),{},{retry_config:M(M({},null===n||void 0===n?void 0:n.retry_config),{},{delay:"undefined"!==typeof e.target.value&&null!==e.target.value?Number(e.target.value):e.target.value})})}))},setContentOnMount:!0,type:"number",value:(null===Q||void 0===Q||null===(u=Q.retry_config)||void 0===u?void 0:u.delay)||""}),(0,D.jsx)(b.Z,{mr:1}),(0,D.jsx)(x.Z,{label:"Max delay",monospace:!0,onChange:function(e){return J((function(n){return M(M({},n),{},{retry_config:M(M({},null===n||void 0===n?void 0:n.retry_config),{},{max_delay:"undefined"!==typeof e.target.value&&null!==e.target.value?Number(e.target.value):e.target.value})})}))},setContentOnMount:!0,type:"number",value:(null===Q||void 0===Q||null===(l=Q.retry_config)||void 0===l?void 0:l.max_delay)||""}),(0,D.jsx)(b.Z,{mr:1}),(0,D.jsx)(p.Z,{checked:!(null===Q||void 0===Q||null===(s=Q.retry_config)||void 0===s||!s.exponential_backoff),label:"Exponential backoff",onClick:function(){return J((function(e){var n;return M(M({},e),{},{retry_config:M(M({},null===e||void 0===e?void 0:e.retry_config),{},{exponential_backoff:!(null!==e&&void 0!==e&&null!==(n=e.retry_config)&&void 0!==n&&n.exponential_backoff)})})}))}})]})})]}),(0,D.jsxs)(b.Z,{mt:C.HN,children:[(0,D.jsx)(g.Z,{children:"Tags"}),(0,D.jsx)(b.Z,{mt:1,children:(0,D.jsx)(_.Z,{removeTag:function(e){J((function(n){return M(M({},n),{},{tags:de.filter((function(n){return n!==e.uuid}))})}))},selectTag:function(e){J((function(n){return M(M({},n),{},{tags:(0,T.$C)(e.uuid,de,(function(n){return n===e.uuid}))})}))},selectedTags:null===de||void 0===de?void 0:de.map((function(e){return{uuid:e}})),tags:pe,uuid:"TagsAutocompleteInputField-".concat(null===d||void 0===d?void 0:d.uuid)})})]}),(0,D.jsx)(b.Z,{mt:C.HN,children:(0,D.jsx)(v.ZP,{children:(0,D.jsx)(f.ZP,{disabled:!G,loading:a,onClick:function(){return R({description:null===Q||void 0===Q?void 0:Q.description,executor_type:null===Q||void 0===Q?void 0:Q.executor_type,name:null===Q||void 0===Q?void 0:Q.name,retry_config:null===Q||void 0===Q?void 0:Q.retry_config,run_pipeline_in_one_process:null===Q||void 0===Q?void 0:Q.run_pipeline_in_one_process,settings:null===Q||void 0===Q?void 0:Q.settings,tags:null===Q||void 0===Q?void 0:Q.tags}).then((function(){return K(!1)}))},primary:!0,children:"Save pipeline settings"})})}),(0,D.jsx)(b.Z,{mt:C.HN,children:(0,D.jsx)(p.Z,{checked:se&&!ae,disabled:ae,label:"Hide all blocks in notebook",onClick:function(){return ue((function(){return se?{}:null===F||void 0===F?void 0:F.reduce((function(e,n){var t=n.uuid;return M(M({},e),{},(0,o.Z)({},t,!0))}),{})}))}})}),(0,D.jsx)(b.Z,{mt:C.Mq,children:(0,D.jsx)(p.Z,{checked:re,label:"When running a block while editing a pipeline, output the block messages to the logs",onClick:function(){return le((function(e){return!e}))}})})]})},A=t(28795),U=t(69864),H=t(72619);function F(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function L(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?F(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):F(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function G(e){var n=e.pipeline,t=(0,s.useRouter)(),i=(0,c.useState)(null),o=i[0],u=i[1],l=null===n||void 0===n?void 0:n.uuid,d=O.ZP.pipelines.detail(l).data,f=L(L({},null===d||void 0===d?void 0:d.pipeline),n),p=(0,U.Db)(O.ZP.pipelines.useUpdate(l,{update_content:!0}),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(e){if(null!==e&&void 0!==e&&e.pipeline){var n=e.pipeline.uuid;l!==n&&(window.location.href="".concat(t.basePath,"/pipelines/").concat(n,"/settings"))}},onErrorCallback:function(e,n){return u({errors:n,response:e})}})}}),v=(0,r.Z)(p,2),g=v[0],h=v[1].isLoading;return(0,D.jsx)(a.Z,{breadcrumbs:[{label:function(){return"Settings"}}],errors:o,pageName:A.M.SETTINGS,pipeline:f,setErrors:u,title:function(e){var n=e.name;return"".concat(n," settings")},uuid:"".concat(A.M.SETTINGS,"_").concat(l),children:f&&(0,D.jsx)(I,{isPipelineUpdating:h,pipeline:f,updatePipeline:function(e){return g({pipeline:e})}})})}G.getInitialProps=function(){var e=(0,i.Z)(l().mark((function e(n){var t;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var K=(0,d.Z)(G)},59606:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/settings",function(){return t(37003)}])},80022:function(e,n,t){"use strict";function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,{Z:function(){return i}})},15544:function(e,n,t){"use strict";function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}t.d(n,{Z:function(){return i}})},13692:function(e,n,t){"use strict";t.d(n,{Z:function(){return r}});var i=t(61049);function r(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&(0,i.Z)(e,n)}},93189:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var i=t(12539),r=t(80022);function o(e,n){if(n&&("object"===i(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,r.Z)(e)}}},function(e){e.O(0,[1557,3782,9774,2888,179],(function(){return n=59606,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[643],{74395:function(e,n,i){"use strict";i.d(n,{M:function(){return s},W:function(){return l}});var t=i(25976),r=i(46684),l=34*i(70515).iI,s=t.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],r.Mz)},8955:function(e,n,i){"use strict";i.d(n,{G7:function(){return b},ZP:function(){return P},u$:function(){return m}});var t=i(75582),r=i(82394),l=i(26304),s=i(90299),o=i(9134),c=i(24138),u=i(38276),a=i(30160),d=i(75499),p=i(70515),g=i(16488),h=i(42122),f=i(28598),v=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function x(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function j(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?x(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):x(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var m=44,Z={uuid:"Run details"},_={uuid:"Dependency tree"},b=[_,Z];function P(e){var n=e.height,i=e.heightOffset,r=e.pipeline,x=e.selectedRun,P=e.selectedTab,y=e.setSelectedTab,O=j({},(0,l.Z)(e,v));x?O.blockStatus=(0,g.IJ)(null===x||void 0===x?void 0:x.block_runs):O.noStatus=!0;var k=(0,h.Kn)(null===x||void 0===x?void 0:x.variables)?j({},null===x||void 0===x?void 0:x.variables):(null===x||void 0===x?void 0:x.variables)||{},w=null===x||void 0===x?void 0:x.event_variables;if(w&&(0,h.Kn)(w)&&!(0,h.Qr)(w))if((0,h.Kn)(k)&&k.hasOwnProperty("event")){var I=(0,h.Kn)(k.event)?k.event:{};k.event=j(j({},I),w)}else k.event=j({},w);var S=[];k&&JSON.stringify(k,null,2).split("\n").forEach((function(e){S.push(" ".concat(e))}));var C=x&&[["Run ID",null===x||void 0===x?void 0:x.id],["Variables",(0,f.jsx)(o.Z,{language:"json",small:!0,source:S.join("\n")},"variable_value")]],E=x&&(0,f.jsx)(u.Z,{pb:p.cd,px:p.cd,children:(0,f.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:C.map((function(e,n){var i=(0,t.Z)(e,2),r=i[0],l=i[1];return[(0,f.jsx)(a.ZP,{monospace:!0,muted:!0,children:r},"key_".concat(n)),(0,f.jsx)(a.ZP,{monospace:!0,textOverflow:!0,children:l},"val_".concat(n))]})),uuid:"LogDetail"})}),D=P&&y;return(0,f.jsxs)(f.Fragment,{children:[D&&(0,f.jsx)(s.Z,{onClickTab:y,selectedTabUUID:null===P||void 0===P?void 0:P.uuid,tabs:b,underlineStyle:!0}),(!D||_.uuid===(null===P||void 0===P?void 0:P.uuid))&&(0,f.jsx)(c.ZP,j(j({},O),{},{height:n,heightOffset:(i||0)+(D?m:0),pipeline:r})),Z.uuid===(null===P||void 0===P?void 0:P.uuid)&&E]})}},55072:function(e,n,i){"use strict";i.d(n,{Et:function(){return p},Q:function(){return d}});i(82684);var t=i(71180),r=i(55485),l=i(38276),s=i(31748),o=i(72473),c=i(79633),u=i(70515),a=i(28598),d=30,p=9;n.ZP=function(e){var n=e.page,i=e.maxPages,d=e.onUpdate,p=e.totalPages,g=[],h=i;if(h>p)g=Array.from({length:p},(function(e,n){return n}));else{var f=Math.floor(h/2),v=n-f;n+f>=p?(v=p-h+2,h-=2):n-f<=0?(v=0,h-=2):(h-=4,v=n-Math.floor(h/2)),g=Array.from({length:h},(function(e,n){return n+v}))}return(0,a.jsx)(a.Fragment,{children:p>0&&(0,a.jsxs)(r.ZP,{alignItems:"center",children:[(0,a.jsx)(t.ZP,{disabled:0===n,onClick:function(){return d(n-1)},children:(0,a.jsx)(o.PaginateArrowLeft,{size:1.5*u.iI,stroke:s.Av})}),!g.includes(0)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.Z,{ml:1,children:(0,a.jsx)(t.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return d(0)},children:1})},0),!g.includes(1)&&(0,a.jsx)(l.Z,{ml:1,children:(0,a.jsx)(t.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0)]}),g.map((function(e){return(0,a.jsx)(l.Z,{ml:1,children:(0,a.jsx)(t.ZP,{backgroundColor:e===n&&c.a$,borderLess:!0,noBackground:!0,notClickable:e===n,onClick:function(){e!==n&&d(e)},children:e+1})},e)})),!g.includes(p-1)&&(0,a.jsxs)(a.Fragment,{children:[!g.includes(p-2)&&(0,a.jsx)(l.Z,{ml:1,children:(0,a.jsx)(t.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0),(0,a.jsx)(l.Z,{ml:1,children:(0,a.jsx)(t.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return d(p-1)},children:p})},p-1)]}),(0,a.jsx)(l.Z,{ml:1}),(0,a.jsx)(t.ZP,{disabled:n===p-1,onClick:function(){return d(n+1)},children:(0,a.jsx)(o.PaginateArrowRight,{size:1.5*u.iI,stroke:s.Av})})]})})}},36604:function(e,n,i){"use strict";i.r(n),i.d(n,{default:function(){return ge}});var t=i(75582),r=i(77837),l=i(82394),s=i(38860),o=i.n(s),c=i(82684),u=i(12691),a=i.n(u),d=i(25976),p=i(69864),g=i(34376),h=i(71180),f=i(39457),v=i(15338),x=i(55485),j=i(85854),m=i(48670),Z=i(55072),_=i(75457),b=i(27966),P=i(44265),y=i(30229),O=i(57653),k=i(83784),w=i(44085),I=i(38276),S=i(4190),C=i(75499),E=i(48381),D=i(30160),M=i(12468),T=i(35686),N=i(8955),A=i(77417),F=i(74395),R=i(44425),L=i(72473),U=i(72191),z=i(70515),H=i(28795),q=i(97196),X=i(8916),B=i(16488),G=i(3917),W=i(55283),K=i(44375),V=i(15610),$=i(86735),J=i(42122),Q=i(50178),Y=i(72619),ee=i(95924),ne=i(69419),ie=i(70320),te=i(28598);function re(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function le(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?re(Object(i),!0).forEach((function(n){(0,l.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):re(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var se=function(e){var n=e.errors,i=e.fetchPipelineSchedule,r=e.pipeline,l=e.pipelineSchedule,s=e.setErrors,o=e.variables,u=(0,c.useContext)(d.ThemeContext),re=(0,A.Z)().project,se=(0,g.useRouter)(),oe=(0,Q.Ct)(),ce=(0,ie.qB)(),ue=(0,c.useMemo)((function(){return(0,$.HK)((null===r||void 0===r?void 0:r.blocks)||[],(function(e){return e.uuid}))}),[r]),ae=r||{},de=ae.uuid,pe=ae.type,ge=l||{},he=ge.description,fe=ge.id,ve=ge.event_matchers,xe=ge.last_enabled_at,je=ge.name,me=ge.next_pipeline_run_date,Ze=ge.schedule_interval,_e=ge.schedule_type,be=ge.settings,Pe=ge.sla,ye=ge.start_time,Oe=ge.status,ke=ge.tags,we=ge.variables,Ie=void 0===we?{}:we,Se=(0,c.useMemo)((function(){return(0,B._U)(Ze)}),[Ze]),Ce=(0,ne.iV)(),Ee={_limit:30,_offset:30*(null!==Ce&&void 0!==Ce&&Ce.page?Ce.page:0)};null!==Ce&&void 0!==Ce&&Ce.status&&(Ee.status=Ce.status),null!==l&&void 0!==l&&l.global_data_product_uuid&&(Ee.global_data_product_uuid=null===l||void 0===l?void 0:l.global_data_product_uuid);var De=T.ZP.pipeline_runs.pipeline_schedules.list(fe,Ee,{refreshInterval:3e3,revalidateOnFocus:!0}),Me=De.data,Te=De.mutate,Ne=(0,c.useMemo)((function(){return(null===Me||void 0===Me?void 0:Me.pipeline_runs)||[]}),[Me]),Ae=(0,c.useMemo)((function(){var e;return(null===Me||void 0===Me||null===(e=Me.metadata)||void 0===e?void 0:e.count)||[]}),[Me]),Fe=(0,c.useState)(null),Re=Fe[0],Le=Fe[1],Ue=(0,c.useMemo)((function(){var e=null!==Ce&&void 0!==Ce&&Ce.page?Ce.page:0;return(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)(b.Z,{fetchPipelineRuns:Te,onClickRow:function(e){return Le((function(n){var i=Ne[e];return(null===n||void 0===n?void 0:n.id)!==i.id?i:null}))},pipelineRuns:Ne,selectedRun:Re,setErrors:s,setSelectedRun:Le}),(0,te.jsx)(I.Z,{p:2,children:(0,te.jsx)(Z.ZP,{maxPages:9,onUpdate:function(e){var n=Number(e),i=le(le({},Ce),{},{page:n>=0?n:0});se.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(de,"/triggers/").concat(fe,"?").concat((0,ne.uM)(i)))},page:Number(e),totalPages:Math.ceil(Ae/30)})})]})}),[Te,Ne,fe,de,Ce,se,Re,s,Ae]),ze=(0,c.useState)(N.G7[0]),He=ze[0],qe=ze[1],Xe=(0,p.Db)((function(e){return T.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:(0,J.gR)(e,["id"])})}),{onSuccess:function(e){return(0,Y.wD)(e,{callback:function(){i()},onErrorCallback:function(e,n){return null===s||void 0===s?void 0:s({errors:n,response:e})}})}}),Be=(0,t.Z)(Xe,2),Ge=Be[0],We=Be[1].isLoading,Ke=T.ZP.pipeline_triggers.pipelines.list(de),Ve=Ke.data,$e=Ke.mutate,Je=(0,c.useMemo)((function(){return(0,$.HK)((null===Ve||void 0===Ve?void 0:Ve.pipeline_triggers)||[],(function(e){return e.name}))}),[Ve]),Qe=(0,c.useMemo)((function(){return!(null===Je||void 0===Je||!Je[null===l||void 0===l?void 0:l.name])}),[l,Je]),Ye=(0,p.Db)(T.ZP.pipeline_triggers.pipelines.useCreate(de),{onSuccess:function(e){return(0,Y.wD)(e,{callback:function(){$e()},onErrorCallback:function(e,n){return null===s||void 0===s?void 0:s({errors:n,response:e})}})}}),en=(0,t.Z)(Ye,2),nn=en[0],tn=en[1].isLoading,rn=(0,p.Db)(T.ZP.pipeline_runs.pipeline_schedules.useCreate(fe),{onSuccess:function(e){return(0,Y.wD)(e,{callback:function(){Te()},onErrorCallback:function(e,n){return null===s||void 0===s?void 0:s({errors:n,response:e})}})}}),ln=(0,t.Z)(rn,2),sn=ln[0],on=ln[1].isLoading,cn=(0,c.useMemo)((function(){return y.fq.ACTIVE===Oe}),[Oe]),un=(0,c.useMemo)((function(){return!cn&&!(_e===y.Xm.TIME&&Ze===y.U5.ONCE)}),[cn,Ze,_e]),an=(0,c.useMemo)((function(){var e,n,i,t={default:!0,size:1.5*z.iI},r=[[(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(L.MultiShare,le({},t)),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"Trigger type"})]},"trigger_type_label"),(0,te.jsx)(D.ZP,{monospace:!0,children:null===(e=y.Z4[_e])||void 0===e?void 0:e.call(y.Z4)},"trigger_type")],[(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(L.Switch,le({},t)),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"Status"})]},"trigger_status_label"),(0,te.jsx)(D.ZP,{danger:!cn,monospace:!0,success:cn,children:Oe},"trigger_status")]];if(he&&r.push([(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(L.Alphabet,le({},t)),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"Description"})]},"trigger_description_label"),(0,te.jsx)(D.ZP,{children:he},"trigger_description")]),Pe){var s=(0,B.gU)(Pe),o=s.time,c=s.unit,u=1===o?c:"".concat(c,"s");r.push([(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(L.Info,le({},t)),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"SLA"})]},"trigger_sla_label"),(0,te.jsx)(D.ZP,{monospace:!0,children:"".concat(o," ").concat(u)},"trigger_sla")])}if(Ze&&r.push([(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(L.Schedule,le({},t)),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"Frequency"})]},"trigger_frequency_label"),(0,te.jsx)(D.ZP,{monospace:!0,children:ce&&Se?(0,B.lO)(Ze):Ze.replace("@","")},"trigger_frequency")],[(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(L.CalendarDate,le({},t)),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"Next run date"})]},"trigger_next_run_date_label"),(0,te.jsx)(D.ZP,{monospace:!0,children:me?ce?(0,G.XG)(me,ce):(0,G.d$)(me,{includeSeconds:!0,utcFormat:!0}):"N/A"},"trigger_next_run_date")]),ye&&r.push([(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(L.CalendarDate,le({},t)),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"Start date"})]},"trigger_start_date_label"),(0,te.jsx)(D.ZP,{monospace:!0,children:ce?(0,G.XG)(ye,ce):ye},"trigger_start_date")]),xe&&r.push([(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(L.CalendarDate,le({},t)),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"Last enabled at"})]},"trigger_last_enabled_at_label"),(0,te.jsx)(D.ZP,{monospace:!0,children:ce?(0,G.XG)(xe,ce):(0,G.d$)(xe,{includeSeconds:!0})},"trigger_last_enabled_at")]),y.Xm.API===_e){var a=(0,B.M8)(l);r.push([(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(L.PlugAPI,le({},t)),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"API endpoint"})]},"trigger_api_endpoint_label"),(0,te.jsx)(f.Z,{copiedText:a,children:(0,te.jsx)(D.ZP,{monospace:!0,small:!0,children:a})},"trigger_api_endpoint")])}if(null!==be&&void 0!==be&&be.timeout){var d=(0,B.gU)(null===be||void 0===be?void 0:be.timeout),p=d.time,g=d.unit,h=1===p?g:"".concat(g,"s");r.push([(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(M.Z,{default:!0,label:"Timeout set for runs of this trigger",size:U.gt,widthFitContent:!0}),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"Timeout"})]},"trigger_timeout"),(0,te.jsx)(D.ZP,{monospace:!0,children:"".concat(p," ").concat(h)},"trigger_timeout_label")])}null!==be&&void 0!==be&&be.skip_if_previous_running&&r.push([(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(M.Z,{default:!0,label:"Skip current run if any previous runs are still in progress",size:U.gt,widthFitContent:!0}),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"Skip if running"})]},"trigger_skip_if_running"),(0,te.jsx)(D.ZP,{monospace:!0,children:null===(n=be.skip_if_previous_running)||void 0===n?void 0:n.toString()},"trigger_skip_if_running_label")]);(null!==be&&void 0!==be&&be.allow_blocks_to_fail&&r.push([(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(M.Z,{default:!0,label:"Trigger runs will continue running blocks if other unrelated blocks fail",size:U.gt,widthFitContent:!0}),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"Allow blocks to fail"})]},"trigger_allow_blocks_to_fail"),(0,te.jsx)(D.ZP,{monospace:!0,children:be.allow_blocks_to_fail.toString()},"trigger_allow_blocks_to_fail_label")]),null!==be&&void 0!==be&&be.create_initial_pipeline_run)&&r.push([(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(M.Z,{default:!0,label:"Create initial pipeline run if start date is before current execution period",maxWidth:32*z.iI,size:U.gt}),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"Create initial run"})]},"trigger_create_initial_pipeline_run"),(0,te.jsx)(D.ZP,{monospace:!0,children:null===(i=be.create_initial_pipeline_run)||void 0===i?void 0:i.toString()},"trigger_create_initial_pipeline_run_label")]);return(0,te.jsx)(C.Z,{columnFlex:[null,1],rows:r})}),[he,ce,cn,Se,me,l,Ze,_e,be,Pe,ye,Oe]),dn=(0,c.useMemo)((function(){return Ie||{}}),[Ie]),pn=(0,c.useMemo)((function(){var e,n=[];return(0,J.Qr)(dn)?n=(0,X.wx)(o,(function(e){return e.uuid===k.C})):Object.entries(dn).forEach((function(e){var i=(0,t.Z)(e,2),r=i[0],l=i[1];[P.sZ,y.PN].includes(r)||n.push({uuid:r,value:(0,X.FS)(l)})})),"undefined"!==typeof(n=(0,X.JZ)(n||[],_e))&&null!==(e=n)&&void 0!==e&&e.length?(0,te.jsx)(C.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,i=e.value;return[(0,te.jsx)(D.ZP,{default:!0,monospace:!0,children:n},"settings_variable_label_".concat(n)),(0,te.jsx)(D.ZP,{monospace:!0,children:i},"settings_variable_".concat(n))]}))}):null}),[_e,dn,o]),gn=(0,c.useMemo)((function(){var e=null===dn||void 0===dn?void 0:dn[y.PN];return e?(0,te.jsx)(te.Fragment,{children:Object.entries(e||{}).map((function(e){var n,i=(0,t.Z)(e,2),r=i[0],l=i[1],s=null===ue||void 0===ue?void 0:ue[r];return(0,te.jsxs)(I.Z,{mt:1,children:[(0,te.jsx)(I.Z,{pb:1,px:z.cd,children:(0,te.jsx)(D.ZP,{color:(0,W.qn)(null===s||void 0===s?void 0:s.type,{blockColor:null===s||void 0===s?void 0:s.color,theme:u}).accent,monospace:!0,children:r})}),(0,te.jsx)(v.Z,{light:!0}),null===(n=Object.entries(l||{}))||void 0===n?void 0:n.map((function(e,n){var i=(0,t.Z)(e,2),r=i[0],l=i[1];return(0,te.jsx)("div",{children:(0,te.jsx)(C.Z,{columnFlex:[null,1],rows:[[(0,te.jsx)(D.ZP,{default:!0,monospace:!0,children:"Stream"},"stream_title_".concat(n)),(0,te.jsx)(D.ZP,{monospace:!0,rightAligned:!0,children:r},"stream_id_".concat(n))]].concat(Object.entries(l||{}).map((function(e){var n=(0,t.Z)(e,2),i=n[0],r=n[1];return[(0,te.jsx)(D.ZP,{default:!0,monospace:!0,children:i},"settings_variable_label_".concat(i)),(0,te.jsx)(D.ZP,{monospace:!0,rightAligned:!0,children:r},"settings_variable_".concat(i))]})))})},r)}))]},r)}))}):null}),[ue,dn,u]),hn=(0,c.useMemo)((function(){var e,n,i=[],t=null===dn||void 0===dn||null===(e=dn[P.sZ])||void 0===e?void 0:e.blocks;return null===r||void 0===r||null===(n=r.blocks)||void 0===n||n.forEach((function(e){var n=e.type,r=e.uuid;if(R.tf.DBT===n){var l,s=(null===t||void 0===t||null===(l=t[r])||void 0===l?void 0:l.configuration)||{},o=s.flags,c=s.prefix,u=s.suffix,a=(0,K.IU)(e).name;(o||c||u)&&i.push({flags:o,prefix:c,suffix:u,uuid:a})}})),"undefined"!==typeof i&&null!==i&&void 0!==i&&i.length?(0,te.jsx)(C.Z,{columnFlex:[1,null],rows:i.map((function(e){var n=e.flags,i=e.prefix,t=e.suffix,r=e.uuid;return[(0,te.jsxs)(D.ZP,{monospace:!0,small:!0,children:[i&&(0,te.jsx)(D.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:i}),r,t&&(0,te.jsx)(D.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:t})]},"settings_variable_label_".concat(r)),(0,te.jsx)(D.ZP,{monospace:!0,muted:!0,small:!0,children:n&&n.join(", ")},"settings_variable_".concat(r))]}))}):null}),[r,dn]),fn=(0,c.useMemo)((function(){return(0,te.jsx)(C.Z,{columnFlex:[null,1],columns:[{uuid:"Provider"},{uuid:"Event"}],rows:null===ve||void 0===ve?void 0:ve.map((function(e,n){var i=e.event_type,t=e.name;return[(0,te.jsx)(D.ZP,{default:!0,monospace:!0,children:q._P[i].label()},"".concat(i,"_").concat(n,"_label")),(0,te.jsx)(D.ZP,{monospace:!0,children:t},"".concat(i,"_").concat(n,"_name"))]}))})}),[ve]),vn=(0,c.useMemo)((function(){var e,n,i,t,l,s,o;return"undefined"===typeof(null===r||void 0===r||null===(e=r.settings)||void 0===e||null===(n=e.triggers)||void 0===n?void 0:n.save_in_code_automatically)?null===re||void 0===re||null===(i=re.pipelines)||void 0===i||null===(t=i.settings)||void 0===t||null===(l=t.triggers)||void 0===l?void 0:l.save_in_code_automatically:null===r||void 0===r||null===(s=r.settings)||void 0===s||null===(o=s.triggers)||void 0===o?void 0:o.save_in_code_automatically}),[r,re]);return(0,te.jsxs)(_.Z,{afterHidden:!Re,before:(0,te.jsxs)(F.M,{children:[(0,te.jsxs)(I.Z,{mb:z.HN,pt:z.cd,px:z.cd,children:[(0,te.jsxs)(I.Z,{mb:z.cd,children:[y.Xm.TIME===_e&&(0,te.jsx)(L.Sun,{size:5*z.iI}),y.Xm.EVENT===_e&&(0,te.jsx)(L.MusicNotes,{size:5*z.iI}),y.Xm.API===_e&&(0,te.jsx)(L.Lightning,{size:5*z.iI}),!_e&&(0,te.jsx)(L.MultiShare,{size:5*z.iI})]}),(0,te.jsx)(j.Z,{children:je})]}),(0,te.jsx)(I.Z,{px:z.cd,children:(0,te.jsx)(j.Z,{level:5,children:"Settings"})}),(0,te.jsx)(v.Z,{light:!0,mt:1,short:!0}),an,(null===ve||void 0===ve?void 0:ve.length)>=1&&(0,te.jsxs)(I.Z,{my:z.HN,children:[(0,te.jsx)(I.Z,{px:z.cd,children:(0,te.jsx)(j.Z,{level:5,children:"Events"})}),(0,te.jsx)(v.Z,{light:!0,mt:1,short:!0}),fn]}),pn&&(0,te.jsxs)(I.Z,{my:z.HN,children:[(0,te.jsx)(I.Z,{px:z.cd,children:(0,te.jsx)(j.Z,{level:5,children:"Runtime variables"})}),(0,te.jsx)(v.Z,{light:!0,mt:1,short:!0}),pn]}),gn&&(0,te.jsxs)(I.Z,{my:z.HN,children:[(0,te.jsx)(I.Z,{px:z.cd,children:(0,te.jsx)(j.Z,{level:5,children:"Bookmark values"})}),(0,te.jsx)(v.Z,{light:!0,mt:1,short:!0}),gn]}),hn&&(0,te.jsxs)(I.Z,{my:z.HN,children:[(0,te.jsx)(I.Z,{px:z.cd,children:(0,te.jsx)(j.Z,{level:5,children:"dbt runtime settings"})}),(0,te.jsx)(v.Z,{light:!0,mt:1,short:!0}),hn]}),(null===ke||void 0===ke?void 0:ke.length)>=1&&(0,te.jsxs)(I.Z,{my:z.HN,children:[(0,te.jsx)(I.Z,{px:z.cd,children:(0,te.jsx)(j.Z,{level:5,children:"Tags"})}),(0,te.jsx)(v.Z,{light:!0,mt:1,short:!0}),(0,te.jsx)(I.Z,{mt:z.cd,px:z.cd,children:(0,te.jsx)(E.Z,{tags:null===ke||void 0===ke?void 0:ke.map((function(e){return{uuid:e}}))})})]}),"\\",(0,te.jsx)(I.Z,{my:z.HN,children:(0,te.jsxs)(I.Z,{px:z.cd,children:[(0,te.jsxs)(j.Z,{level:5,children:[Qe&&"Trigger exists in code",!Qe&&"Store trigger in code"]}),(0,te.jsxs)(I.Z,{mt:1,children:[vn&&(0,te.jsxs)(D.ZP,{default:!0,children:["This trigger will automatically be persisted in code. To change this behavior, update the ",(0,te.jsx)(a(),{as:"/pipelines/".concat(de,"/settings"),href:"/pipelines/[pipeline]/settings",passHref:!0,children:(0,te.jsx)(m.Z,{openNewWindow:!0,children:"pipeline\u2019s settings"})})," or ",(0,te.jsx)(a(),{as:"/settings/workspace/preferences",href:"/settings/workspace/preferences",passHref:!0,children:(0,te.jsx)(m.Z,{openNewWindow:!0,children:"project settings"})}),"."]}),!vn&&(0,te.jsxs)(D.ZP,{default:!0,children:["Save or update the trigger and its settings in the pipeline\u2019s metadata and version control the trigger using Git. For more information, please read the ",(0,te.jsx)(m.Z,{href:"https://docs.mage.ai/guides/triggers/configure-triggers-in-code",openNewWindow:!0,children:"documentation"}),"."]})]}),!vn&&(0,te.jsxs)(I.Z,{mt:z.cd,children:[!Ve&&(0,te.jsx)(S.Z,{inverted:!0}),Ve&&(0,te.jsxs)(h.ZP,{disabled:!(null!==l&&void 0!==l&&l.id),loading:tn,onClick:function(){nn({pipeline_trigger:{pipeline_schedule_id:null===l||void 0===l?void 0:l.id}})},secondary:!0,children:[Qe&&"Update trigger in code",!Qe&&"Save trigger in code"]})]})]})})]}),beforeWidth:F.W,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(de,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return je},linkProps:{as:"/pipelines/".concat(de,"/triggers/").concat(fe),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],buildSidekick:function(e){return(0,N.ZP)(le(le({},e),{},{selectedRun:Re,selectedTab:He,setSelectedTab:qe}))},errors:n,pageName:H.M.TRIGGERS,pipeline:r,setErrors:s,subheader:(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(h.ZP,{beforeIcon:cn?(0,te.jsx)(L.LightningOff,{size:U.bL}):(0,te.jsx)(L.Lightning,{inverted:!oe,size:U.bL}),danger:cn&&!oe,loading:We,onClick:function(e){(0,ee.j)(e),Ge({id:fe,status:cn?y.fq.INACTIVE:y.fq.ACTIVE})},outline:!0,success:!cn&&!oe,children:cn?"Disable trigger":"Enable trigger"}),(0,te.jsx)(I.Z,{mr:z.cd}),pe!==O.qL.STREAMING&&(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)(h.ZP,{beforeIcon:(0,te.jsx)(L.Once,{size:U.bL}),disabled:un,loading:on,onClick:function(){return sn({pipeline_run:{pipeline_schedule_id:fe,pipeline_uuid:de,variables:dn}})},outline:!0,title:un?"Trigger must be enabled to run@once":"Manually run pipeline once immediately",children:(0,te.jsx)(D.ZP,{disabled:un,children:"Run@once"})}),(0,te.jsx)(I.Z,{mr:z.cd})]}),!oe&&(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)(h.ZP,{beforeIcon:(0,te.jsx)(L.Edit,{size:U.bL}),linkProps:{as:"/pipelines/".concat(de,"/triggers/").concat(fe,"/edit"),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit trigger"}),(0,te.jsx)(I.Z,{mr:z.cd})]}),(0,te.jsxs)(w.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?se.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(de,"/triggers/").concat(fe)):(0,V.u)({page:0,status:e.target.value})},paddingRight:4*z.iI,placeholder:"Select run status",value:(null===Ce||void 0===Ce?void 0:Ce.status)||"all",children:[(0,te.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),P.IK.map((function(e){return(0,te.jsx)("option",{value:e,children:P.Do[e]},e)}))]})]}),title:function(){return je},uuid:"triggers/detail",children:[(0,te.jsx)(I.Z,{mt:z.cd,px:z.cd,children:(0,te.jsx)(j.Z,{level:5,children:"Runs for this trigger"})}),(0,te.jsx)(v.Z,{light:!0,mt:z.cd,short:!0}),Ue]})},oe=i(12717),ce=i(93808),ue=i(92709);function ae(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function de(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ae(Object(i),!0).forEach((function(n){(0,l.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ae(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}function pe(e){var n=e.pipelineScheduleId,i=e.pipelineUUID,t=e.subpath,r=ue.b7===t,l=(0,c.useState)(null),s=l[0],o=l[1],u=T.ZP.variables.pipelines.list(i,{},{revalidateOnFocus:!1}).data,a=null===u||void 0===u?void 0:u.variables,d={};r&&(d._format="with_runtime_average");var p=T.ZP.pipeline_schedules.detail("undefined"!==typeof n&&n,d),g=p.data,h=p.mutate,f=null===g||void 0===g?void 0:g.pipeline_schedule,v=T.ZP.pipelines.detail(i,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,x=de(de({},null===v||void 0===v?void 0:v.pipeline),{},{uuid:i});return r?(0,te.jsx)(oe.Z,{errors:s,fetchPipelineSchedule:h,pipeline:x,pipelineSchedule:f,setErrors:o,variables:a}):(0,te.jsx)(se,{errors:s,fetchPipelineSchedule:h,pipeline:x,pipelineSchedule:f,setErrors:o,variables:a})}pe.getInitialProps=function(){var e=(0,r.Z)(o().mark((function e(n){var i,r,l,s,c,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.query,r=i.pipeline,l=i.slug,!Array.isArray(l)){e.next=4;break}return s=(0,t.Z)(l,2),c=s[0],u=s[1],e.abrupt("return",{pipelineScheduleId:c,pipelineUUID:r,subpath:u});case 4:return e.abrupt("return",{pipelineUUID:r});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var ge=(0,ce.Z)(pe)},95488:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers/[...slug]",function(){return i(36604)}])}},function(e){e.O(0,[9161,7674,26,1557,3782,7966,2717,9774,2888,179],(function(){return n=95488,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1221],{8666:function(e,n,i){"use strict";var t;i.d(n,{b:function(){return t}}),function(e){e.BLOCK="block",e.PIPELINE="pipeline"}(t||(t={}))},55620:function(e,n,i){"use strict";i.r(n),i.d(n,{default:function(){return Re}});var t=i(77837),o=i(75582),u=i(21831),r=i(82394),l=i(38860),c=i.n(l),s=i(12691),d=i.n(s),a=i(82684),p=i(69864),f=i(34376),v=i(52749),h=i(60523),m=i(71180),g=i(90299),b=i(31882),j=i(76111),Z=i(94629),x=i(97618),_=i(55485),C=i(85854),w=i(68562),y=i(65956),P=i(38276),k=i(30160),I=i(35576),T=i(17488),S=i(28598);var O=function(e){var n=e.description,i=e.isLoading,t=e.maxWidth,o=e.minWidth,u=e.noEmptyValue,r=e.onClose,l=e.onSave,c=e.textArea,s=e.title,d=e.value,p=(0,a.useRef)(null),f=(0,a.useState)(d),v=f[0],h=f[1],g=c?I.Z:T.Z;return(0,a.useEffect)((function(){var e;null===p||void 0===p||null===(e=p.current)||void 0===e||e.focus()}),[]),(0,S.jsxs)(y.Z,{maxWidth:t,minWidth:o,children:[(0,S.jsx)(k.ZP,{bold:!0,children:s}),(0,S.jsx)(P.Z,{mt:1,children:(0,S.jsx)(g,{monospace:!0,onChange:function(e){return h(e.target.value)},ref:p,rows:c?7:null,value:v})}),n&&(0,S.jsx)(P.Z,{mt:2,children:(0,S.jsx)(k.ZP,{muted:!0,small:!0,children:n})}),(0,S.jsx)(P.Z,{mt:3,children:(0,S.jsxs)(_.ZP,{children:[(0,S.jsx)(w.ZP,{bold:!0,inline:!0,loading:i,onClick:function(){v===d||u&&!v?r():l(v)},outline:!0,primary:!0,uuid:"Inputs/InputModal/SaveInput",children:"Save"}),(0,S.jsx)(P.Z,{ml:1}),(0,S.jsx)(m.ZP,{onClick:r,children:"Cancel"})]})})]})},E=i(48670),A=i(55072),D=i(57653),M=i(55729),R=i(93808),G=i(82359),$=i(44085),N=i(4190),U=i(75499),L=i(48381),B=i(69650),H=i(85544),F=i(70026),Y=i(35686),z=i(44897),Q=i(77417),V=i(42631),W=i(44425),q=i(72473),K=i(23780),X=i(8666),J=i(46684),ee=i(53808),ne="pipeline_list_filters",ie="pipeline_list_group_bys",te="pipeline_list_sort_column_index",oe="pipeline_list_sort_direction",ue="pipeline_list_selected_tab_uuid";function re(e){return(0,ee.t8)(ne,e),e}function le(e){return(0,ee.t8)(ie,e),e}var ce=i(11498),se=i(32929),de=i(44898),ae=i(70515),pe=i(30229),fe=i(81655),ve=i(31608),he=i(81728),me=i(3917),ge=i(72619),be=i(69419),je=i(65458),Ze=i(15610),xe=i(42122),_e=i(95924),Ce=i(86735),we=i(70320),ye=i(89538),Pe=i(44952);function ke(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function Ie(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ke(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ke(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var Te={Icon:q.Schedule,label:function(){return"Recently viewed"},uuid:"recent"},Se={Icon:q.PipelineV3,label:function(e){return null!==e&&void 0!==e&&e.count?"All pipelines \u203a ".concat((null===e||void 0===e?void 0:e.count)||0):"All pipelines"},uuid:"all"},Oe=[Se,Te],Ee="tab",Ae=[D.$1.SEARCH],De={borderRadius:"".concat(V.BG,"px"),iconOnly:!0,noBackground:!0,noBorder:!0,outline:!0,padding:"4px"};function Me(){var e,n=(0,f.useRouter)(),i=(0,a.useRef)(null),t=(0,a.useRef)(null),l=(0,a.useRef)(null),c=(0,a.useRef)(null),s=(0,Q.Z)(),w=s.fetchProjects,I=s.project,T=(0,a.useState)(null),R=T[0],V=T[1],ke=(0,a.useState)(null),Me=ke[0],Re=ke[1],Ge=(0,a.useState)(null),$e=Ge[0],Ne=Ge[1],Ue=(0,a.useCallback)((function(e){Ne(e),clearTimeout(c.current),c.current=setTimeout((function(){var n;return(0,Ze.u)((n={},(0,r.Z)(n,ce.$D.OFFSET,0),(0,r.Z)(n,D.$1.SEARCH,e),n))}),500)}),[Ne]),Le=(0,a.useState)({}),Be=Le[0],He=Le[1],Fe=(0,a.useState)(null),Ye=Fe[0],ze=Fe[1],Qe=(0,be.iV)(),Ve=Ie({},(0,be.DQ)(Qe,[D.$1.SEARCH,D.$1.STATUS,D.$1.TAG,D.$1.TYPE].concat((0,u.Z)(ce.RG)))),We=(0,a.useMemo)((function(){return null===Qe||void 0===Qe?void 0:Qe.tab}),[Qe]);(0,a.useEffect)((function(){var e;V(null===i||void 0===i||null===(e=i.current)||void 0===e?void 0:e.getBoundingClientRect().height)}),[Qe,i]);var qe=(0,a.useMemo)((function(){var e;return(0,we.hY)(null===I||void 0===I||null===(e=I.features)||void 0===e?void 0:e[G.d.LOCAL_TIMEZONE])}),[null===I||void 0===I?void 0:I.features]),Ke=(0,a.useMemo)((function(){var e;return null===I||void 0===I||null===(e=I.features)||void 0===e?void 0:e[G.d.OPERATION_HISTORY]}),[I]),Xe=(0,a.useMemo)((function(){return qe?fe.O$:{}}),[qe]),Je=Y.ZP.pipelines.list(Ie(Ie({},Ve),{},{include_schedules:1}),{revalidateOnFocus:!1}),en=Je.data,nn=Je.mutate,tn=(0,a.useMemo)((function(){return(null===Qe||void 0===Qe?void 0:Qe[D.$1.HISTORY_DAYS])||7}),[Qe]),on=Y.ZP.pipelines.list(Ie(Ie({},Ve),{},(e={},(0,r.Z)(e,D.$1.HISTORY_DAYS,(0,he.HW)(tn)?Number(tn):tn),(0,r.Z)(e,"include_schedules",1),e)),{},{pauseFetch:!Ke||!We||Te.uuid!==We}),un=on.data,rn=on.mutate,ln=(0,a.useCallback)((function(e){return e}),[]),cn=(0,a.useMemo)((function(){var e=ln((null===en||void 0===en?void 0:en.pipelines)||[]);if(null!==Qe&&void 0!==Qe&&Qe[D.$1.TAG]){var n=Qe[D.$1.TAG];e=e.filter((function(e){var i=e.tags;return i.some((function(e){return n.includes(e)}))||0===i.length&&n.includes(D.$1.NO_TAGS)}))}return e}),[en,ln,Qe]),sn=(0,a.useMemo)((function(){return ln((null===un||void 0===un?void 0:un.pipelines)||[])}),[un,ln]),dn=(0,a.useMemo)((function(){return[1,2,3,4,5,6,8,9]}),[]),an=null===Qe||void 0===Qe?void 0:Qe[fe.lG.SORT_COL_IDX],pn=null===Qe||void 0===Qe?void 0:Qe[fe.lG.SORT_DIRECTION],fn=(0,a.useMemo)((function(){return an?{columnIndex:+an,sortDirection:pn||fe.sh.ASC}:void 0}),[an,pn]),vn=null===Qe||void 0===Qe?void 0:Qe[D.$1.GROUP],hn=(0,p.Db)((function(e){var n=e.pipelineUUID,i=e.filesOnly,t=void 0!==i&&i;return Y.ZP.downloads.pipelines.useCreate(n)({download:{ignore_folder_structure:t}})}),{onSuccess:function(e){return(0,ge.wD)(e,{callback:function(){var n=e.data.download.token;(0,Pe.K)(n)},onErrorCallback:function(e,n){return ze({errors:n,response:e})}})}}),mn=(0,o.Z)(hn,1)[0];(0,a.useEffect)((function(){null!==Ve&&void 0!==Ve&&Ve[D.$1.SEARCH]&&null===$e&&Ne(null===Ve||void 0===Ve?void 0:Ve[D.$1.SEARCH])}),[Ve,$e,Ne]),(0,a.useEffect)((function(){var e,n={};if(!an){var i=(0,ee.U2)(te,null),t=(0,ee.U2)(oe,fe.sh.ASC);null!==i&&(n[fe.lG.SORT_COL_IDX]=i,n[fe.lG.SORT_DIRECTION]=t)}Ke&&(We?(0,ee.t8)(ue,We):n.tab=(0,ee.U2)(ue,null===Oe||void 0===Oe||null===(e=Oe[0])||void 0===e?void 0:e.uuid));if(vn)le((0,r.Z)({},vn,!0));else{var u,l=(0,ee.U2)(ie,{});l&&Object.entries(l).forEach((function(e){var n=(0,o.Z)(e,2),i=n[0],t=n[1];!u&&t&&(u=i)})),u&&(n[D.$1.GROUP]=u)}if((0,xe.Qr)(Ve)){var c=(0,r.Z)({},ce.$D.LIMIT,A.Q),s=(0,ee.U2)(ne,{});s&&Object.entries(s).forEach((function(e){var n=(0,o.Z)(e,2),i=n[0],t=n[1];"undefined"!==typeof t&&null!==t&&(ce.RG.includes(i)||Ae.includes(i)?c[i]=t:(c[i]=[],Object.entries(t).forEach((function(e){var n=(0,o.Z)(e,2),t=n[0];n[1]&&c[i].push(t)}))))})),(0,xe.Qr)(c)||(n={},Object.entries(Ie(Ie({},n),c)||{}).forEach((function(e){var i=(0,o.Z)(e,2),t=i[0],u=i[1];"undefined"!==typeof u&&null!==u&&(n[t]=u)})))}else{var d={};Object.entries(Ve).forEach((function(e){var n=(0,o.Z)(e,2),i=n[0],t=n[1];d[i]={};var u,r=t;"undefined"!==typeof t&&null!==t&&(ce.RG.includes(i)||Ae.includes(i)?d[i]=r:(Array.isArray(r)||(r=[r]),r&&Array.isArray(r)&&(null===(u=r)||void 0===u||u.forEach((function(e){d[i][e]=!0})))))})),re((0,xe.hB)(d))}(0,xe.Qr)(n)||(0,Ze.u)((0,xe.hB)(n),{pushHistory:!1})}),[vn,Ke,Ve,We,dn,an,pn]),(0,a.useEffect)((function(){(0,ge.bB)(en,ze)}),[en]);var gn=function(e){return(0,p.Db)(Y.ZP.pipelines.useCreate(),{onSuccess:function(n){return(0,ge.wD)(n,{callback:function(n){var i=n.pipeline.uuid;null===e||void 0===e||e(i)},onErrorCallback:function(e,n){return ze({errors:n,response:e})}})}})},bn=gn((function(e){return n.push("/pipelines/[pipeline]/edit","/pipelines/".concat(e,"/edit"))})),jn=(0,o.Z)(bn,2),Zn=jn[0],xn=jn[1].isLoading,_n=gn((function(){null===nn||void 0===nn||nn(),null===rn||void 0===rn||rn()})),Cn=(0,o.Z)(_n,2),wn=Cn[0],yn=Cn[1].isLoading,Pn=(0,p.Db)((function(e){return Y.ZP.pipelines.useUpdate(e.uuid)({pipeline:e})}),{onSuccess:function(e){return(0,ge.wD)(e,{callback:function(e){var n=e.pipeline.uuid;He((function(e){return Ie(Ie({},e),{},(0,r.Z)({},n,!1))})),nn(),null===rn||void 0===rn||rn(),null===Ln||void 0===Ln||Ln(),Re(null)},onErrorCallback:function(e,n){var i,t=null===e||void 0===e||null===(i=e.url_parameters)||void 0===i?void 0:i.pk;He((function(e){return Ie(Ie({},e),{},(0,r.Z)({},t,!1))})),ze({errors:n,response:e})}})}}),kn=(0,o.Z)(Pn,2),In=kn[0],Tn=kn[1].isLoading,Sn=(0,p.Db)((function(e){return Y.ZP.pipelines.useDelete(e)()}),{onSuccess:function(e){return(0,ge.wD)(e,{callback:function(){null===nn||void 0===nn||nn(),null===rn||void 0===rn||rn()},onErrorCallback:function(e,n){return ze({errors:n,response:e})}})}}),On=(0,o.Z)(Sn,2),En=On[0],An=On[1].isLoading,Dn=(0,ye.dd)((function(e){var n=e.pipelineType;return(0,S.jsx)(j.Z,{onClose:Gn,onSave:function(e){var i=e.name,t=e.description,o=e.tags;Zn({pipeline:{description:t,name:i,tags:o,type:n}})},pipelineType:n})}),{},[Zn],{background:!0,disableEscape:!0,uuid:"overview/create_pipeline"}),Mn=(0,o.Z)(Dn,2),Rn=Mn[0],Gn=Mn[1],$n=(0,ye.dd)((function(e){var n=e.pipeline,i=e.pipelineDescription,t=e.pipelineName;return(0,S.jsx)(O,{isLoading:Tn,minWidth:55*ae.iI,noEmptyValue:!!t,onClose:Ln,onSave:function(e){var i=n||Me;if(i){var o=i.uuid,u={uuid:o};t?u.name=e:u.description=e,He((function(e){return Ie(Ie({},e),{},(0,r.Z)({},o,!0))})),In(u)}},textArea:!t,title:t?"Rename pipeline":"Edit description for ".concat(null===n||void 0===n?void 0:n.uuid),value:t||i})}),{},[Tn,Me],{background:!0,uuid:"rename_pipeline_and_save"}),Nn=(0,o.Z)($n,2),Un=Nn[0],Ln=Nn[1],Bn=(0,ye.dd)((function(){return(0,S.jsx)(F.Z,{fetchPipelines:nn,onCancel:Yn})}),{},[nn],{background:!0,uuid:"upload_pipeline"}),Hn=(0,o.Z)(Bn,2),Fn=Hn[0],Yn=Hn[1],zn=(0,ye.dd)((function(){return(0,S.jsx)(K.BC,{children:(0,S.jsx)(h.Z,{contained:!0,onClickCustomTemplate:function(e){Zn({pipeline:{custom_template_uuid:null===e||void 0===e?void 0:e.template_uuid,name:(0,he.Y6)()}}).then((function(){Wn()}))},showBreadcrumbs:!0,tabs:[se.A2]})})}),{},[Zn],{background:!0,uuid:"browse_templates"}),Qn=(0,o.Z)(zn,2),Vn=Qn[0],Wn=Qn[1],qn=(0,ye.dd)((function(e){var n=e.cancelButtonText,i=(e.header,e.onCancel),t=e.onSaveSuccess;return(0,S.jsx)(K.BC,{children:(0,S.jsx)(M.Z,{cancelButtonText:n,contained:!0,header:(0,S.jsx)(P.Z,{mb:ae.HN,children:(0,S.jsxs)(y.Z,{children:[(0,S.jsx)(k.ZP,{warning:!0,children:"You need to add an OpenAI API key to your project before you can generate pipelines using AI."}),(0,S.jsx)(P.Z,{mt:1,children:(0,S.jsxs)(k.ZP,{warning:!0,children:["Read ",(0,S.jsx)(E.Z,{href:"https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key",openNewWindow:!0,children:"OpenAI\u2019s documentation"})," to get your API key."]})})]})}),onCancel:function(){null===i||void 0===i||i(),Jn()},onSaveSuccess:function(e){w(),Jn(),null===t||void 0===t||t(e)}})})}),{},[w],{background:!0,uuid:"configure_project"}),Kn=(0,o.Z)(qn,2),Xn=Kn[0],Jn=Kn[1],ei=(0,ye.dd)((function(){return(0,S.jsx)(K.BC,{children:(0,S.jsx)(v.Z,{createPipeline:Zn,isLoading:xn,onClose:ti})})}),{},[Zn,xn],{background:!0,disableClickOutside:!0,disableCloseButton:!0,uuid:"AI_modal"}),ni=(0,o.Z)(ei,2),ii=ni[0],ti=ni[1],oi=(0,a.useMemo)((function(){return(0,je.d)(Zn,{showAIModal:function(){null!==I&&void 0!==I&&I.openai_api_key?ii():Xn({onSaveSuccess:function(){ii()}})},showBrowseTemplates:Vn,showCreatePipelineModal:Rn,showImportPipelineModal:Fn})}),[Zn,I,ii,Vn,Xn,Rn,Fn]),ui=Y.ZP.tags.list().data,ri=(0,a.useMemo)((function(){return(0,Ce.YC)((null===ui||void 0===ui?void 0:ui.tags)||[],(function(e){return e.uuid}))}),[ui]),li=(0,a.useMemo)((function(){return(0,S.jsx)(H.Z,{addButtonProps:{isLoading:xn,label:"New",menuItems:oi},deleteRowProps:{confirmationMessage:"This is irreversible and will immediately delete everything associated with the pipeline, including its blocks, triggers, runs, logs, and history.",isLoading:An,item:"pipeline",onDelete:function(){window.confirm("Are you sure you want to delete pipeline ".concat(null===Me||void 0===Me?void 0:Me.uuid,"?"))&&En(null===Me||void 0===Me?void 0:Me.uuid)}},extraActionButtonProps:{Icon:q.Clone,confirmationDescription:"Cloning the selected pipeline will create a new pipeline with the same configuration and code blocks. The blocks use the same block files as the original pipeline. Pipeline triggers, runs, backfills, and logs are not copied over to the new pipeline.",confirmationMessage:"Do you want to clone the pipeline ".concat(null===Me||void 0===Me?void 0:Me.uuid,"?"),isLoading:yn,onClick:function(){return wn({pipeline:{clone_pipeline_uuid:null===Me||void 0===Me?void 0:Me.uuid}})},openConfirmationDialogue:!0,tooltip:"Clone pipeline"},filterOptions:{status:D.kA,tag:[D.$1.NO_TAGS].concat((0,u.Z)(ri.map((function(e){return e.uuid})))),type:Object.values(D.qL)},filterValueLabelMapping:{status:D.kA.reduce((function(e,n){return Ie(Ie({},e),{},(0,r.Z)({},n,(0,he.J3)((0,he.kC)(n))))}),{}),tag:Ie((0,r.Z)({},D.$1.NO_TAGS,"No tags"),ri.reduce((function(e,n){var i=n.uuid;return Ie(Ie({},e),{},(0,r.Z)({},i,i))}),{})),type:D.G7},groupButtonProps:{groupByLabel:vn,menuItems:[{beforeIcon:vn===D.r0.STATUS?(0,S.jsx)(q.Check,{fill:z.Z.content.default,size:1.5*ae.iI}):(0,S.jsx)(q.Circle,{muted:!0,size:1.5*ae.iI}),label:function(){return(0,he.kC)(D.r0.STATUS)},onClick:function(){var e=vn===D.r0.STATUS?null:D.r0.STATUS;e||le({}),(0,Ze.u)((0,r.Z)({},D.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Status"},{beforeIcon:vn===D.r0.TAG?(0,S.jsx)(q.Check,{fill:z.Z.content.default,size:1.5*ae.iI}):(0,S.jsx)(q.Circle,{muted:!0,size:1.5*ae.iI}),label:function(){return(0,he.kC)(D.r0.TAG)},onClick:function(){var e=vn===D.r0.TAG?null:D.r0.TAG;e||le({}),(0,Ze.u)((0,r.Z)({},D.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Tag"},{beforeIcon:vn===D.r0.TYPE?(0,S.jsx)(q.Check,{fill:z.Z.content.default,size:1.5*ae.iI}):(0,S.jsx)(q.Circle,{muted:!0,size:1.5*ae.iI}),label:function(){return(0,he.kC)(D.r0.TYPE)},onClick:function(){var e=vn===D.r0.TYPE?null:D.r0.TYPE;e||le({}),(0,Ze.u)((0,r.Z)({},D.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Type"}]},moreActionsMenuItems:[{label:function(){return"Rename pipeline"},onClick:function(){return Un({pipelineName:null===Me||void 0===Me?void 0:Me.name})},uuid:"Pipelines/MoreActionsMenu/Rename"},{label:function(){return"Edit description"},onClick:function(){return Un({pipeline:Me,pipelineDescription:null===Me||void 0===Me?void 0:Me.description})},uuid:"Pipelines/MoreActionsMenu/EditDescription"}],onClickFilterDefaults:function(){re({}),Ne(""),null===nn||void 0===nn||nn().then((function(){var e;(0,Ze.u)((e={},(0,r.Z)(e,ce.$D.LIMIT,(null===Ve||void 0===Ve?void 0:Ve[ce.$D.LIMIT])||A.Q),(0,r.Z)(e,D.$1.SEARCH,""),e),{replaceParams:!0})}))},onFilterApply:function(e,n){Object.values(n).every((function(e){return!(null!==e&&void 0!==e&&e.length)}))&&re({})},query:Ve,resetLimitOnFilterApply:!0,searchProps:{onChange:Ue,value:$e},selectedRowId:null===Me||void 0===Me?void 0:Me.uuid,setSelectedRow:Re})}),[wn,En,nn,vn,yn,xn,An,oi,Ve,$e,Me,Ue,Un,ri]),ci=(0,K.VI)(null,{},[],{uuid:"pipelines/list"}),si=(0,o.Z)(ci,1)[0],di=(0,p.Db)(Y.ZP.projects.useUpdate(null===I||void 0===I?void 0:I.name),{onSuccess:function(e){return(0,ge.wD)(e,{callback:function(){w()},onErrorCallback:function(e,n){return si({errors:n,response:e})}})}}),ai=(0,o.Z)(di,2),pi=ai[0],fi=ai[1].isLoading,vi=(0,a.useCallback)((function(e){return pi({project:e})}),[pi]),hi=(0,ye.dd)((function(){return(0,S.jsxs)(y.Z,{maxWidth:60*ae.iI,children:[(0,S.jsx)(P.Z,{mb:1,children:(0,S.jsx)(C.Z,{children:"Help improve Mage"})}),(0,S.jsx)(P.Z,{mb:ae.cd,children:(0,S.jsx)(k.ZP,{default:!0,children:"Please contribute usage statistics to help improve the developer experience for you and everyone in the community \ud83e\udd1d."})}),(0,S.jsx)(P.Z,{mb:ae.cd,children:(0,S.jsx)(y.Z,{success:!0,children:(0,S.jsxs)(_.ZP,{alignItems:"center",children:[(0,S.jsx)(q.Secrets,{size:5*ae.iI,success:!0}),(0,S.jsx)(P.Z,{mr:1}),(0,S.jsx)(x.Z,{children:(0,S.jsx)(k.ZP,{children:"All usage statistics are completely anonymous. It\u2019s impossible for Mage to know which statistics belongs to whom."})})]})})}),(0,S.jsx)(P.Z,{mb:ae.cd,children:(0,S.jsxs)(k.ZP,{default:!0,children:["By opting into sending usage statistics to ",(0,S.jsx)(E.Z,{href:"https://www.mage.ai",openNewWindow:!0,children:"Mage"}),", it\u2019ll help the team and community of contributors (",(0,S.jsx)(E.Z,{href:"https://www.mage.ai/chat",openNewWindow:!0,children:"Magers"}),") learn what\u2019s going wrong with the tool and what improvements can be made."]})}),(0,S.jsx)(P.Z,{mb:ae.cd,children:(0,S.jsx)(k.ZP,{default:!0,children:"In addition to helping reduce potential errors, you\u2019ll help inform which features are useful and which need work."})}),(0,S.jsx)(P.Z,{mb:ae.cd,children:(0,S.jsxs)(_.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,S.jsx)(k.ZP,{bold:!0,children:"I want to help make Mage more powerful for everyone"}),(0,S.jsx)(P.Z,{mr:ae.cd}),(0,S.jsx)(B.Z,{checked:!0,onCheck:function(){window.confirm("Are you sure you don\u2019t want to help everyone in the community?")&&vi({deny_improve_mage:!0,help_improve_mage:!1}).then((function(){return bi()}))}})]})}),fi&&(0,S.jsx)(P.Z,{mb:ae.cd,children:(0,S.jsx)(N.Z,{inverted:!0})}),(0,S.jsx)(P.Z,{mb:ae.cd,children:(0,S.jsxs)(k.ZP,{muted:!0,small:!0,children:["To learn more about how this works, please check out the ",(0,S.jsx)(E.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,small:!0,children:"documentation"}),"."]})}),(0,S.jsx)(m.ZP,{"data-testid":"help_mage_close_button",onClick:function(){return vi({help_improve_mage:!0}).then((function(){return bi()}))},secondary:!0,children:"Close"})]})}),{},[I],{background:!0,hideCallback:function(){vi({help_improve_mage:!0})},uuid:"help_mage"}),mi=(0,o.Z)(hi,2),gi=mi[0],bi=mi[1];(0,a.useEffect)((function(){I&&null===(null===I||void 0===I?void 0:I.help_improve_mage)&&gi()}),[I,gi]);var ji=(0,a.useCallback)((function(e){var n={};null===e||void 0===e||e.forEach((function(e,i){var t=null===e||void 0===e?void 0:e[vn];if(D.r0.STATUS===vn){var o=(e||{}).schedules,u=void 0===o?[]:o,r=u.length;t=u.find((function(e){var n=e.status;return pe.fq.ACTIVE===n}))?D.QK.ACTIVE:r>=1?D.QK.INACTIVE:D.QK.NO_SCHEDULES}else if(D.r0.TAG===vn){t=(null===e||void 0===e?void 0:e.tags)?(0,Ce.YC)(e.tags,(function(e){return e})).join(", "):""}n[t]||(n[t]=[]),n[t].push(i)}));var i=[],t=[];D.r0.STATUS===vn?Object.values(D.QK).forEach((function(e){i.push(n[e]),t.push((0,he.vg)(e))})):D.r0.TAG===vn?(0,Ce.YC)(Object.keys(n),(function(e){return e})).forEach((function(e){i.push(n[e]),e?t.push(e.split(", ").map((function(e,n){return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("div",{style:{marginLeft:n>=1?4:0}},"".concat(e,"-").concat(n,"-spacing")),(0,S.jsx)(b.Z,{small:!0,children:(0,S.jsx)(k.ZP,{children:e})},"".concat(e,"-").concat(n))]})}))):t.push("No tags")})):D.r0.TYPE===vn&&Object.values(D.qL).forEach((function(e){i.push(n[e]),t.push(D.G7[e])}));var o=[],u=[];return null===i||void 0===i||i.forEach((function(e,n){"undefined"!==typeof e&&null!==e&&(null===e||void 0===e?void 0:e.length)>=1&&(u.push(e),o.push(null===t||void 0===t?void 0:t[n]))})),{rowGroupHeaders:o,rowsGroupedByIndex:u}}),[vn]),Zi=(0,a.useMemo)((function(){return ji(cn)}),[ji,cn]),xi=Zi.rowGroupHeaders,_i=Zi.rowsGroupedByIndex,Ci=(0,a.useMemo)((function(){return ji(sn)}),[ji,sn]),wi=Ci.rowGroupHeaders,yi=Ci.rowsGroupedByIndex,Pi=(0,a.useCallback)((function(e,i,o){return(0,S.jsx)(U.Z,{columnFlex:[null,null,null,2,null,null,null,1,null,null,null],columns:[{label:function(){return""},uuid:"action"},{uuid:(0,he.kC)(D.r0.STATUS)},{uuid:"Name"},{uuid:"Description"},{uuid:(0,he.kC)(D.r0.TYPE)},Ie(Ie({},Xe),{},{uuid:"Updated at"}),Ie(Ie({},Xe),{},{uuid:"Created at"}),{uuid:"Tags"},{uuid:"Blocks"},{uuid:"Triggers"},{center:!0,label:function(){return""},uuid:"Actions"}],isSelectedRow:function(n){var i;return(null===(i=e[n])||void 0===i?void 0:i.uuid)===(null===Me||void 0===Me?void 0:Me.uuid)},localStorageKeySortColIdx:te,localStorageKeySortDirection:oe,onClickRow:function(n){return Re((function(i){var t=e[n];return(null===i||void 0===i?void 0:i.uuid)!==(null===t||void 0===t?void 0:t.uuid)?t:null}))},onDoubleClickRow:function(i){n.push("/pipelines/[pipeline]/edit","/pipelines/".concat(e[i].uuid,"/edit"))},ref:t,renderRightClickMenuItems:function(i){var t=e[i];return[{label:function(){return"Edit description"},onClick:function(){return Un({pipeline:t,pipelineDescription:null===t||void 0===t?void 0:t.description})},uuid:"edit_description"},{label:function(){return"Rename"},onClick:function(){return Un({pipeline:t,pipelineName:null===t||void 0===t?void 0:t.name})},uuid:"rename"},{label:function(){return"Clone"},onClick:function(){return wn({pipeline:{clone_pipeline_uuid:null===t||void 0===t?void 0:t.uuid}})},uuid:"clone"},{label:function(){return"Download (keep folder structure)"},onClick:function(){mn({filesOnly:!1,pipelineUUID:null===t||void 0===t?void 0:t.uuid})},uuid:"download_keep_folder_structure"},{label:function(){return"Download (without folder structure)"},onClick:function(){mn({filesOnly:!0,pipelineUUID:null===t||void 0===t?void 0:t.uuid})},uuid:"download_without_folder_structure"},{label:function(){return"Add/Remove tags"},onClick:function(){n.push("/pipelines/[pipeline]/settings","/pipelines/".concat(null===t||void 0===t?void 0:t.uuid,"/settings"))},uuid:"add_tags"},{label:function(){return"Create template"},onClick:function(){n.push("/templates?object_type=".concat(de.R,"&new=1&pipeline_uuid=").concat(null===t||void 0===t?void 0:t.uuid))},uuid:"create_custom_template"},{label:function(){return"Create global data product"},onClick:function(){n.push("/global-data-products?object_type=".concat(X.b.PIPELINE,"&new=1&object_uuid=").concat(null===t||void 0===t?void 0:t.uuid))},uuid:"create_global_data_product"},{label:function(){return"Delete"},onClick:function(){window.confirm("Are you sure you want to delete pipeline ".concat(null===t||void 0===t?void 0:t.uuid,"?"))&&En(null===t||void 0===t?void 0:t.uuid)},uuid:"delete"}]},rightClickMenuHeight:252,rightClickMenuWidth:30*ae.iI,rowGroupHeaders:i,rows:null===e||void 0===e?void 0:e.map((function(e,i){var t=e.blocks,o=e.created_at,u=e.description,l=e.schedules,c=e.tags,s=e.type,a=e.updated_at,p=e.uuid,f=t.filter((function(e){var n=e.type;return W.tf.SCRATCHPAD!==n})).length,v=l.length,h=l.find((function(e){var n=e.status;return pe.fq.ACTIVE===n})),g=s===D.ad,b=(0,S.jsx)("div",{children:(0,S.jsx)(L.Z,{tags:null===c||void 0===c?void 0:c.map((function(e){return{uuid:e}}))})},"pipeline_tags_".concat(i));return[v>=1||Be[p]?(0,S.jsx)(m.ZP,{iconOnly:!0,loading:!!Be[p],noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(n){(0,_e.j)(n),He((function(e){return Ie(Ie({},e),{},(0,r.Z)({},p,!0))})),In(Ie(Ie({},e),{},{status:h?pe.fq.INACTIVE:pe.fq.ACTIVE}))},children:h?(0,S.jsx)(q.Pause,{muted:!0,size:2*ae.iI}):(0,S.jsx)(q.PlayButtonFilled,{default:!0,size:2*ae.iI})}):null,(0,S.jsx)(k.ZP,{default:!h,monospace:!0,success:!!h,children:h?pe.fq.ACTIVE:v>=1?pe.fq.INACTIVE:"no schedules"},"pipeline_status_".concat(i)),(0,S.jsx)(d(),{as:"/pipelines/".concat(p),href:"/pipelines/[pipeline]",passHref:!0,children:(0,S.jsx)(E.Z,{sameColorAsText:!0,children:p})},"pipeline_name_".concat(i)),(0,S.jsx)(k.ZP,{default:!0,preWrap:!0,title:u,children:u},"pipeline_description_".concat(i)),(0,S.jsx)(k.ZP,{bold:g,danger:g,children:g?(0,he.kC)(D.ad):D.G7[s]},"pipeline_type_".concat(i)),(0,S.jsx)(k.ZP,{monospace:!0,small:!0,title:a?(0,me._6)(a):null,children:a?(0,me.XG)((0,me.d$)(a,{includeSeconds:!0,utcFormat:!0}),qe):(0,S.jsx)(S.Fragment,{children:"\u2014"})},"pipeline_updated_at_".concat(i)),(0,S.jsx)(k.ZP,{monospace:!0,small:!0,title:o?(0,me._6)(o):null,children:o?(0,me.XG)(o.slice(0,19),qe):(0,S.jsx)(S.Fragment,{children:"\u2014"})},"pipeline_created_at_".concat(i)),b,(0,S.jsx)(k.ZP,{default:0===f,monospace:!0,children:f},"pipeline_block_count_".concat(i)),(0,S.jsx)(k.ZP,{default:0===v,monospace:!0,children:v},"pipeline_trigger_count_".concat(i)),(0,S.jsxs)(x.Z,{flex:1,justifyContent:"flex-end",children:[(0,S.jsx)(m.ZP,Ie(Ie({},De),{},{onClick:function(){mn({pipelineUUID:p})},title:"Download (keep folder structure)",children:(0,S.jsx)(q.Save,{default:!0,size:2*ae.iI})})),(0,S.jsx)(P.Z,{mr:1}),(0,S.jsx)(m.ZP,Ie(Ie({},De),{},{onClick:function(){n.push("/pipelines/[pipeline]","/pipelines/".concat(p))},title:"Detail",children:(0,S.jsx)(q.Open,{default:!0,size:2*ae.iI})})),(0,S.jsx)(P.Z,{mr:1}),(0,S.jsx)(m.ZP,Ie(Ie({},De),{},{onClick:function(){n.push("/pipelines/[pipeline]/logs","/pipelines/".concat(p,"/logs"))},title:"Logs",children:(0,S.jsx)(q.File,{default:!0,size:2*ae.iI})}))]},"chevron_icon_".concat(i))]})),rowsGroupedByIndex:o,sortableColumnIndexes:dn,sortedColumn:fn,stickyHeader:!0,uuid:"pipelines_table"})}),[wn,En,mn,qe,Be,n,Me,He,Re,Un,dn,fn,Xe,In]),ki=(0,a.useMemo)((function(){return Pi(cn,xi,_i)}),[cn,Pi,xi,_i]),Ii=(0,a.useMemo)((function(){return Pi(sn,wi,yi)}),[sn,Pi,wi,yi]),Ti=(0,a.useMemo)((function(){return(null===cn||void 0===cn?void 0:cn.length)||0}),[cn]),Si=(0,a.useMemo)((function(){return(null===sn||void 0===sn?void 0:sn.length)||0}),[sn]),Oi=(0,a.useMemo)((function(){return(!Ke||Se.uuid===We)&&!Ti||Ke&&Te.uuid===We&&!Si}),[Ke,Ti,Si,We]),Ei=(0,a.useMemo)((function(){var e=null===Ve||void 0===Ve?void 0:Ve[ce.$D.LIMIT];return(0,S.jsxs)(_.ZP,{alignItems:"center",children:[(0,S.jsx)(k.ZP,{muted:!0,small:!0,children:"Per page"}),(0,S.jsx)(P.Z,{mr:1}),(0,S.jsxs)($.Z,{compact:!0,onChange:function(e){var n;return(0,Ze.u)((n={},(0,r.Z)(n,ce.$D.LIMIT,e.target.value),(0,r.Z)(n,ce.$D.OFFSET,0),n),{pushHistory:!0})},small:!0,value:e,children:[e&&(e>5*A.Q||e%A.Q)&&(0,S.jsx)("option",{value:e,children:e}),(0,Ce.w6)(5).map((function(e,n){var i=(n+1)*A.Q;return(0,S.jsx)("option",{value:i,children:i},i)}))]})]})}),[Ve]),Ai=(0,a.useMemo)((function(){var e,n,i=en;Ke&&Te.uuid===We&&(i=un);var t=(null===(e=i)||void 0===e||null===(n=e.metadata)||void 0===n?void 0:n.count)||0,o=(null===Ve||void 0===Ve?void 0:Ve[ce.$D.LIMIT])||A.Q,u=(null===Ve||void 0===Ve?void 0:Ve[ce.$D.OFFSET])||0,l=Math.ceil(t/o);return(0,S.jsx)(P.Z,{p:ae.cd,children:(0,S.jsx)(A.ZP,{maxPages:A.Et,onUpdate:function(e){var n=Number(e);(0,Ze.u)((0,r.Z)({},ce.$D.OFFSET,n*o))},page:Math.floor(u/o),totalPages:l})})}),[en,un,Ke,Ve,We]);return(0,S.jsxs)(Z.Z,{errors:Ye,setErrors:ze,subheaderChildren:(0,S.jsxs)(_.ZP,{alignItems:"center",justifyContent:"space-between",children:[li,Ei]}),title:"Pipelines",uuid:"pipelines/index",children:[Ke&&(0,S.jsx)(P.Z,{px:ae.cd,ref:i,children:(0,S.jsx)(g.Z,{noPadding:!0,onClickTab:function(e){var n,i=e.uuid;return(0,Ze.u)((n={},(0,r.Z)(n,Ee,i),(0,r.Z)(n,ce.$D.OFFSET,0),n),{pushHistory:!0})},regularSizeText:!0,selectedTabUUID:We,tabs:Oe.map((function(e){var n=e.Icon,i=e.label;return{Icon:n,label:function(){var e;return i({count:null===en||void 0===en||null===(e=en.metadata)||void 0===e?void 0:e.count})},uuid:e.uuid}})),underlineStyle:!0})}),Oi?(0,S.jsx)(P.Z,{p:ae.Mq,children:en?(0,S.jsx)(k.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No pipelines available"}):(0,S.jsx)(N.Z,{inverted:!0,large:!0})}):null,(0,S.jsxs)(ve.cl,{hide:Oi,includePadding:!!vn,maxHeight:"calc(100vh - ".concat(J.Mz+74+(R||44)+68,"px)"),children:[(!Ke||Se.uuid===We)&&ki,Ke&&Te.uuid===We&&Ii]}),(0,S.jsx)("div",{ref:l,children:Ai})]})}Me.getInitialProps=(0,t.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var Re=(0,R.Z)(Me)},79274:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines",function(){return i(55620)}])},80022:function(e,n,i){"use strict";function t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}i.d(n,{Z:function(){return t}})},15544:function(e,n,i){"use strict";function t(e){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(e)}i.d(n,{Z:function(){return t}})},13692:function(e,n,i){"use strict";i.d(n,{Z:function(){return o}});var t=i(61049);function o(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&(0,t.Z)(e,n)}},93189:function(e,n,i){"use strict";i.d(n,{Z:function(){return u}});var t=i(12539),o=i(80022);function u(e,n){if(n&&("object"===t(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}},function(e){e.O(0,[1557,4241,5544,523,3548,5627,9774,2888,179],(function(){return n=79274,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3605],{55729:function(e,t,n){"use strict";n.d(t,{Z:function(){return M}});var r=n(82394),i=n(75582),o=n(82684),c=n(69864),l=n(71180),s=n(15338),u=n(97618),d=n(55485),a=n(85854),p=n(48670),j=n(65956),f=n(82359),h=n(88543),v=n(38276),g=n(30160),m=n(17488),Z=n(69650),x=n(12468),b=n(35686),y=n(77417),O=n(25976),P=n(44897),_=n(42631),w=n(70515),k=O.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],_.n_,w.cd*w.iI,(function(e){return"\n background-color: ".concat((e.theme.background||P.Z.background).codeArea,";\n ")})),C=n(72473),E=n(72191),S=n(70320),D=n(81728),I=n(42122),N=n(72619),L=n(23780),A=n(28598);function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var M=function(e){var t,n,O,P=e.cancelButtonText,_=e.contained,H=e.header,M=e.onCancel,T=e.onSaveSuccess,F=e.rootProject,B=(0,L.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),U=(0,i.Z)(B,1)[0],V=(0,o.useState)(null),W=V[0],X=V[1],q=(0,o.useState)(!1),z=q[0],G=q[1],J=(0,y.Z)(),K=J.fetchProjects,Y=J.project,Q=J.projectPlatformActivated,$=J.rootProject,ee=(0,o.useMemo)((function(){return F?$:Y}),[Y,$,F]),te=ee||{},ne=te.name,re=te.openai_api_key,ie=te.project_uuid,oe=(0,o.useMemo)((function(){return"demo.mage.ai"===window.location.hostname}),[]);(0,o.useEffect)((function(){W||X(ee)}),[ee,W]);var ce=(0,c.Db)(b.ZP.projects.useUpdate(ne),{onSuccess:function(e){return(0,N.wD)(e,{callback:function(e){var t,n=e.project;K(),X(n),G(!1),(0,S.hY)(null===n||void 0===n||null===(t=n.features)||void 0===t?void 0:t[f.d.LOCAL_TIMEZONE]),T&&(null===T||void 0===T||T(n))},onErrorCallback:function(e,t){return U({errors:t,response:e})}})}}),le=(0,i.Z)(ce,2),se=le[0],ue=le[1].isLoading,de=(0,o.useCallback)((function(e){return se({project:R(R({},e),{},{root_project:F})})}),[F,se]),ae=(0,A.jsxs)(A.Fragment,{children:[H,(0,A.jsxs)(j.Z,{noPadding:!0,children:[(0,A.jsxs)(v.Z,{p:w.cd,children:[(0,A.jsx)(v.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"Project name"})}),(0,A.jsx)(g.ZP,{default:!0,monospace:!0,children:ne})]}),(0,A.jsx)(s.Z,{light:!0}),(0,A.jsxs)(v.Z,{p:w.cd,children:[(0,A.jsx)(v.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"Project UUID"})}),(0,A.jsx)(g.ZP,{default:!!ie,monospace:!0,muted:!ie,children:ie||"Not required"})]}),(0,A.jsx)(s.Z,{light:!0}),(0,A.jsx)(v.Z,{p:w.cd,children:(0,A.jsxs)(d.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,A.jsxs)(u.Z,{flexDirection:"column",children:[(0,A.jsx)(v.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"Help improve Mage"})}),(0,A.jsxs)(g.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,A.jsx)(p.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,A.jsx)(v.Z,{mr:w.cd}),(0,A.jsx)(Z.Z,{compact:!0,checked:null===W||void 0===W?void 0:W.help_improve_mage,onCheck:function(){return X((function(e){return R(R({},e),{},{help_improve_mage:!(null!==W&&void 0!==W&&W.help_improve_mage)})}))}})]})})]}),(0,A.jsx)(v.Z,{mt:w.HN}),(0,A.jsx)(h.Z,{description:"Global settings that are applied to all pipelines in this project.",title:"Pipeline settings",children:(0,A.jsx)(h.S,{description:"Every time a trigger is created or updated in this pipeline, automatically persist it in code.",title:"Save triggers in code automatically",toggleSwitch:{checked:!(null===W||void 0===W||null===(t=W.pipelines)||void 0===t||null===(n=t.settings)||void 0===n||null===(O=n.triggers)||void 0===O||!O.save_in_code_automatically),onCheck:function(e){return X((function(t){var n,r,i,o,c,l;return R(R({},t),{},{pipelines:R(R({},null===t||void 0===t?void 0:t.pipelines),{},{settings:R(R({},null===t||void 0===t||null===(n=t.pipelines)||void 0===n?void 0:n.settings),{},{triggers:R(R({},null===t||void 0===t||null===(r=t.pipelines)||void 0===r||null===(i=r.settings)||void 0===i?void 0:i.triggers),{},{save_in_code_automatically:e(null===t||void 0===t||null===(o=t.pipelines)||void 0===o||null===(c=o.settings)||void 0===c||null===(l=c.triggers)||void 0===l?void 0:l.save_in_code_automatically)})})})})}))}}})}),(0,A.jsx)(v.Z,{mt:w.HN}),(0,A.jsx)(j.Z,{noPadding:!0,overflowVisible:!0,children:(0,A.jsxs)(v.Z,{p:w.cd,children:[(0,A.jsx)(v.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"Features"})}),Object.entries((0,I.gR)(null===W||void 0===W?void 0:W.features,[f.d.CODE_BLOCK_V2])||{}).map((function(e,t){var n=(0,i.Z)(e,2),o=n[0],c=n[1],l=Q&&!F&&(null===ee||void 0===ee?void 0:ee.features_override)&&o in(null===ee||void 0===ee?void 0:ee.features_override);return(0,A.jsx)(v.Z,{mt:0===t?0:1,children:(0,A.jsxs)(d.ZP,{alignItems:"center",children:[(0,A.jsxs)(u.Z,{flex:1,children:[(0,A.jsx)(Z.Z,{disabled:l,checked:!!c,compact:!0,onCheck:function(){return X((function(e){return R(R({},e),{},{features:R(R({},null===W||void 0===W?void 0:W.features),{},(0,r.Z)({},o,!c))})}))}}),(0,A.jsx)(v.Z,{mr:w.cd}),(0,A.jsxs)(u.Z,{children:[(0,A.jsx)(g.ZP,{default:!c,monospace:!0,children:(0,D.vg)(o)}),o===f.d.LOCAL_TIMEZONE&&(0,A.jsx)(v.Z,{ml:1,children:(0,A.jsx)(x.Z,R({},S.EB))})]})]}),l&&(0,A.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"overridden"})]})},o)}))]})}),(0,A.jsx)(v.Z,{mt:w.HN}),(0,A.jsx)(j.Z,{noPadding:!0,children:(0,A.jsxs)(v.Z,{p:w.cd,children:[(0,A.jsx)(v.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"OpenAI"})}),re&&!z?(0,A.jsxs)(d.ZP,R(R({},d.A0),{},{children:[(0,A.jsx)(g.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,A.jsx)(l.ZP,{iconOnly:!0,onClick:function(){return G(!0)},secondary:!0,title:"Edit",children:(0,A.jsx)(C.Edit,{size:E.bL})})]})):(0,A.jsx)(m.Z,{disabled:oe,label:oe?"Entering API key is disabled on demo":"API key",monospace:!0,onChange:function(e){return X((function(t){return R(R({},t),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===W||void 0===W?void 0:W.openai_api_key)||""})]})}),(0,A.jsx)(v.Z,{mt:w.HN}),(0,A.jsxs)(d.ZP,{alignItems:"center",children:[(0,A.jsx)(l.ZP,{id:"save-project-settings",loading:ue,onClick:function(){de({features:null===W||void 0===W?void 0:W.features,help_improve_mage:null===W||void 0===W?void 0:W.help_improve_mage,openai_api_key:null===W||void 0===W?void 0:W.openai_api_key,pipelines:null===W||void 0===W?void 0:W.pipelines})},primary:!0,children:"Save project settings"}),M&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(v.Z,{mr:w.cd}),(0,A.jsx)(l.ZP,{onClick:M,secondary:!0,children:P||"Cancel"})]})]})]});return _?(0,A.jsx)(k,{children:ae}):ae}},46568:function(e,t,n){"use strict";var r=n(82394),i=n(26304),o=(n(82684),n(33591)),c=n(28598),l=["children","fullHeight","gutter","style"];function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=e.children,n=e.fullHeight,r=e.gutter,s=e.style,d=void 0===s?{}:s,a=(0,i.Z)(e,l),p=u({},d);return r&&(p.paddingLeft=r,p.paddingRight=p.paddingLeft),n&&(p.height="100%"),(0,c.jsx)(o.Col,u(u({},a),{},{style:p,children:t}))}},82682:function(e,t,n){"use strict";var r=n(82394),i=n(26304),o=n(82684),c=n(33591),l=n(28598),s=["children","fullHeight","gutter","justifyContent","style"];function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=e.children,n=e.fullHeight,r=e.gutter,u=e.justifyContent,a=e.style,p=void 0===a?{}:a,j=(0,i.Z)(e,s),f=d({},p);return r&&(f.marginLeft=-1*r,f.marginRight=f.marginLeft),n&&(f.height="100%"),(0,l.jsx)(c.Row,d(d({},j),{},{justifyContent:u,style:f,children:o.Children.map(t,(function(e,t){return e&&o.cloneElement(e,{gutter:r,key:t})}))}))}},70791:function(e,t,n){"use strict";n.r(t);var r=n(77837),i=n(38860),o=n.n(i),c=n(46568),l=n(55729),s=n(93808),u=n(82682),d=n(28274),a=n(38276),p=n(70515),j=n(24755),f=n(28598);function h(){return(0,f.jsx)(d.Z,{uuidItemSelected:j.B2.PREFERENCES,uuidWorkspaceSelected:j.Pl.PROJECT_PLATFORM,children:(0,f.jsx)(a.Z,{p:p.cd,children:(0,f.jsx)(u.Z,{justifyContent:"center",children:(0,f.jsx)(c.Z,{xl:8,xxl:6,children:(0,f.jsx)(l.Z,{rootProject:!0})})})})})}h.getInitialProps=(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,s.Z)(h)},8071:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/platform/preferences",function(){return n(70791)}])}},function(e){e.O(0,[1557,5699,9774,2888,179],(function(){return t=8071,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3112],{80754:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return D}});var n=r(77837),o=r(38860),i=r.n(o),c=r(93808),s=r(82394),l=r(75582),u=r(82684),a=r(69864),d=r(21764),p=r(32013),f=r(98777),j=r(71180),v=r(15338),h=r(55485),g=r(88543),m=r(38276),x=r(30160),P=r(35686),b=r(77417),Z=r(72473),O=r(70515),S=r(81728),w=r(42122),y=r(72619),k=r(23780),I=r(28598);function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach((function(t){(0,s.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var T=function(){var e,t=(0,k.VI)(null,{},[],{uuid:"Platform/Settings"}),r=((0,l.Z)(t,1)[0],(0,b.Z)()),n=r.project,o=r.rootProject,i=(0,u.useState)(null),c=i[0],_=i[1],T=(0,u.useState)(!1),E=(T[0],T[1]),N=(0,u.useState)(null),R=N[0],D=N[1],B=(0,u.useCallback)((function(e){_(e),E(!0)}),[_,E]);(0,u.useEffect)((function(){o&&!c&&_(null===o||void 0===o?void 0:o.platform_settings),n&&!R&&D(null===n||void 0===n?void 0:n.name)}),[o]);var A=(0,u.useMemo)((function(){var e=(0,S.RA)((0,S.Y6)());return(0,I.jsx)(j.ZP,{beforeIcon:(0,I.jsx)(Z.Add,{}),compact:!0,small:!0,onClick:function(){return B((function(t){return C(C({},t),{},{projects:C(C({},null===c||void 0===c?void 0:c.projects),{},(0,s.Z)({},e,{}))})}))},secondary:!0,children:"Register project"})}),[c]),F=(0,a.Db)(P.ZP.projects.useUpdate(null===o||void 0===o?void 0:o.name),{onSuccess:function(e){return(0,y.wD)(e,{callback:function(e){var t=e.project;B((function(e){return C(C({},e),t)})),d.Am.success("Platform settings successfully saved.",{position:d.Am.POSITION.BOTTOM_RIGHT,toastId:"platform-settings-success-".concat(null===t||void 0===t?void 0:t.name)})}})}}),M=(0,l.Z)(F,2),H=M[0],W=M[1].isLoading;return(0,I.jsxs)(m.Z,{p:O.cd,children:[(0,I.jsx)(g.Z,{title:"Projects",headerChildren:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(m.Z,{ml:O.cd}),A]}),children:(0,I.jsx)(p.Z,{noBorder:!0,noBoxShadow:!0,visibleMappingForced:Object.keys((null===c||void 0===c?void 0:c.projects)||{}).reduce((function(e,t,r){return C(C({},e),{},(0,s.Z)({},String(r),!0))}),{}),children:Object.entries((null===c||void 0===c?void 0:c.projects)||{}).map((function(e){var t=(0,l.Z)(e,2),r=t[0],n=t[1],o=n.path,i=n.uuid;return(0,I.jsxs)(f.Z,{noBorderRadius:!0,noPaddingContent:!0,title:(0,I.jsx)(h.ZP,{alignItems:"center",children:(0,I.jsx)(x.ZP,{large:!0,monospace:!0,children:r})}),titleXPadding:O.cd*O.iI,titleYPadding:O.cd*O.iI,children:[(0,I.jsx)(g.S,{title:"Name",description:"Unique name of project.",textInput:{fullWidth:!1,monospace:!0,placeholder:r,onChange:function(e){return B((function(t){return C(C({},t),{},{projects:C(C({},null===c||void 0===c?void 0:c.projects),{},(0,s.Z)({},r,C(C({},n),{},{uuid:e.target.value})))})}))},value:i}}),(0,I.jsx)(g.S,{title:"Path",description:(0,I.jsxs)(x.ZP,{muted:!0,small:!0,children:["Relative path to the project directory starting from the root project directory.",(0,I.jsx)("br",{}),"If blank, the default path will be the project name."]}),textInput:{fullWidth:!1,monospace:!0,placeholder:r,onChange:function(e){return B((function(t){return C(C({},t),{},{projects:C(C({},null===c||void 0===c?void 0:c.projects),{},(0,s.Z)({},r,C(C({},n),{},{path:e.target.value})))})}))},value:o||""}}),(0,I.jsx)(g.S,{title:"Currently selected project",description:"The currently selected project.",toggleSwitch:{checked:r===R,onCheck:function(){return D(r===R?null:r)}}}),(0,I.jsx)(v.Z,{light:!0}),(0,I.jsx)(g.S,{children:(0,I.jsx)(j.ZP,{compact:!0,noBorder:!0,onClick:function(){B((function(e){return C(C({},e),{},{projects:(0,w.gR)(null===c||void 0===c?void 0:c.projects,[r])})}))},small:!0,children:"Deregister project"})})]},r)}))})}),(0,I.jsx)(m.Z,{mt:O.HN}),(0,I.jsx)(g.Z,{title:"Features",children:(0,I.jsx)(g.S,{title:"Override all project features",description:(0,I.jsxs)(x.ZP,{muted:!0,small:!0,children:["If this setting is toggled, the feature flags that are set from the root project",(0,I.jsx)("br",{}),"will override the feature flags of all sub-projects."]}),toggleSwitch:{checked:null===c||void 0===c||null===(e=c.features)||void 0===e?void 0:e.override,onCheck:function(){return B((function(e){var t;return C(C({},e),{},{features:C(C({},null===e||void 0===e?void 0:e.features),{},{override:!(null!==c&&void 0!==c&&null!==(t=c.features)&&void 0!==t&&t.override)})})}))}}})}),(0,I.jsx)(m.Z,{my:O.HN,children:(0,I.jsxs)(h.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,I.jsx)("div",{}),(0,I.jsx)(j.ZP,{beforeIcon:(0,I.jsx)(Z.Save,{}),loading:W,onClick:function(){return H({project:{activate_project:R,platform_settings:c,root_project:!0}})},primary:!0,children:"Save settings"})]})})]})},E=r(28274),N=r(24755);function R(){return(0,I.jsx)(E.Z,{uuidItemSelected:N.B2.SETTINGS,uuidWorkspaceSelected:N.Pl.PROJECT_PLATFORM,children:(0,I.jsx)(T,{})})}R.getInitialProps=(0,n.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var D=(0,c.Z)(R)},39863:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/platform/settings",function(){return r(80754)}])}},function(e){e.O(0,[1557,5699,9774,2888,179],(function(){return t=39863,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3853],{55729:function(e,t,n){"use strict";n.d(t,{Z:function(){return T}});var r=n(82394),i=n(75582),o=n(82684),c=n(69864),l=n(71180),s=n(15338),u=n(97618),d=n(55485),a=n(85854),p=n(48670),j=n(65956),f=n(82359),h=n(88543),v=n(38276),g=n(30160),m=n(17488),Z=n(69650),x=n(12468),b=n(35686),y=n(77417),O=n(25976),P=n(44897),_=n(42631),w=n(70515),k=O.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],_.n_,w.cd*w.iI,(function(e){return"\n background-color: ".concat((e.theme.background||P.Z.background).codeArea,";\n ")})),C=n(72473),E=n(72191),S=n(70320),D=n(81728),I=n(42122),N=n(72619),L=n(23780),H=n(28598);function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var T=function(e){var t,n,O,P=e.cancelButtonText,_=e.contained,A=e.header,T=e.onCancel,R=e.onSaveSuccess,B=e.rootProject,F=(0,L.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),U=(0,i.Z)(F,1)[0],V=(0,o.useState)(null),W=V[0],X=V[1],Y=(0,o.useState)(!1),q=Y[0],z=Y[1],G=(0,y.Z)(),K=G.fetchProjects,J=G.project,Q=G.projectPlatformActivated,$=G.rootProject,ee=(0,o.useMemo)((function(){return B?$:J}),[J,$,B]),te=ee||{},ne=te.name,re=te.openai_api_key,ie=te.project_uuid,oe=(0,o.useMemo)((function(){return"demo.mage.ai"===window.location.hostname}),[]);(0,o.useEffect)((function(){W||X(ee)}),[ee,W]);var ce=(0,c.Db)(b.ZP.projects.useUpdate(ne),{onSuccess:function(e){return(0,N.wD)(e,{callback:function(e){var t,n=e.project;K(),X(n),z(!1),(0,S.hY)(null===n||void 0===n||null===(t=n.features)||void 0===t?void 0:t[f.d.LOCAL_TIMEZONE]),R&&(null===R||void 0===R||R(n))},onErrorCallback:function(e,t){return U({errors:t,response:e})}})}}),le=(0,i.Z)(ce,2),se=le[0],ue=le[1].isLoading,de=(0,o.useCallback)((function(e){return se({project:M(M({},e),{},{root_project:B})})}),[B,se]),ae=(0,H.jsxs)(H.Fragment,{children:[A,(0,H.jsxs)(j.Z,{noPadding:!0,children:[(0,H.jsxs)(v.Z,{p:w.cd,children:[(0,H.jsx)(v.Z,{mb:1,children:(0,H.jsx)(a.Z,{level:5,children:"Project name"})}),(0,H.jsx)(g.ZP,{default:!0,monospace:!0,children:ne})]}),(0,H.jsx)(s.Z,{light:!0}),(0,H.jsxs)(v.Z,{p:w.cd,children:[(0,H.jsx)(v.Z,{mb:1,children:(0,H.jsx)(a.Z,{level:5,children:"Project UUID"})}),(0,H.jsx)(g.ZP,{default:!!ie,monospace:!0,muted:!ie,children:ie||"Not required"})]}),(0,H.jsx)(s.Z,{light:!0}),(0,H.jsx)(v.Z,{p:w.cd,children:(0,H.jsxs)(d.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,H.jsxs)(u.Z,{flexDirection:"column",children:[(0,H.jsx)(v.Z,{mb:1,children:(0,H.jsx)(a.Z,{level:5,children:"Help improve Mage"})}),(0,H.jsxs)(g.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,H.jsx)(p.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,H.jsx)(v.Z,{mr:w.cd}),(0,H.jsx)(Z.Z,{compact:!0,checked:null===W||void 0===W?void 0:W.help_improve_mage,onCheck:function(){return X((function(e){return M(M({},e),{},{help_improve_mage:!(null!==W&&void 0!==W&&W.help_improve_mage)})}))}})]})})]}),(0,H.jsx)(v.Z,{mt:w.HN}),(0,H.jsx)(h.Z,{description:"Global settings that are applied to all pipelines in this project.",title:"Pipeline settings",children:(0,H.jsx)(h.S,{description:"Every time a trigger is created or updated in this pipeline, automatically persist it in code.",title:"Save triggers in code automatically",toggleSwitch:{checked:!(null===W||void 0===W||null===(t=W.pipelines)||void 0===t||null===(n=t.settings)||void 0===n||null===(O=n.triggers)||void 0===O||!O.save_in_code_automatically),onCheck:function(e){return X((function(t){var n,r,i,o,c,l;return M(M({},t),{},{pipelines:M(M({},null===t||void 0===t?void 0:t.pipelines),{},{settings:M(M({},null===t||void 0===t||null===(n=t.pipelines)||void 0===n?void 0:n.settings),{},{triggers:M(M({},null===t||void 0===t||null===(r=t.pipelines)||void 0===r||null===(i=r.settings)||void 0===i?void 0:i.triggers),{},{save_in_code_automatically:e(null===t||void 0===t||null===(o=t.pipelines)||void 0===o||null===(c=o.settings)||void 0===c||null===(l=c.triggers)||void 0===l?void 0:l.save_in_code_automatically)})})})})}))}}})}),(0,H.jsx)(v.Z,{mt:w.HN}),(0,H.jsx)(j.Z,{noPadding:!0,overflowVisible:!0,children:(0,H.jsxs)(v.Z,{p:w.cd,children:[(0,H.jsx)(v.Z,{mb:1,children:(0,H.jsx)(a.Z,{level:5,children:"Features"})}),Object.entries((0,I.gR)(null===W||void 0===W?void 0:W.features,[f.d.CODE_BLOCK_V2])||{}).map((function(e,t){var n=(0,i.Z)(e,2),o=n[0],c=n[1],l=Q&&!B&&(null===ee||void 0===ee?void 0:ee.features_override)&&o in(null===ee||void 0===ee?void 0:ee.features_override);return(0,H.jsx)(v.Z,{mt:0===t?0:1,children:(0,H.jsxs)(d.ZP,{alignItems:"center",children:[(0,H.jsxs)(u.Z,{flex:1,children:[(0,H.jsx)(Z.Z,{disabled:l,checked:!!c,compact:!0,onCheck:function(){return X((function(e){return M(M({},e),{},{features:M(M({},null===W||void 0===W?void 0:W.features),{},(0,r.Z)({},o,!c))})}))}}),(0,H.jsx)(v.Z,{mr:w.cd}),(0,H.jsxs)(u.Z,{children:[(0,H.jsx)(g.ZP,{default:!c,monospace:!0,children:(0,D.vg)(o)}),o===f.d.LOCAL_TIMEZONE&&(0,H.jsx)(v.Z,{ml:1,children:(0,H.jsx)(x.Z,M({},S.EB))})]})]}),l&&(0,H.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"overridden"})]})},o)}))]})}),(0,H.jsx)(v.Z,{mt:w.HN}),(0,H.jsx)(j.Z,{noPadding:!0,children:(0,H.jsxs)(v.Z,{p:w.cd,children:[(0,H.jsx)(v.Z,{mb:1,children:(0,H.jsx)(a.Z,{level:5,children:"OpenAI"})}),re&&!q?(0,H.jsxs)(d.ZP,M(M({},d.A0),{},{children:[(0,H.jsx)(g.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,H.jsx)(l.ZP,{iconOnly:!0,onClick:function(){return z(!0)},secondary:!0,title:"Edit",children:(0,H.jsx)(C.Edit,{size:E.bL})})]})):(0,H.jsx)(m.Z,{disabled:oe,label:oe?"Entering API key is disabled on demo":"API key",monospace:!0,onChange:function(e){return X((function(t){return M(M({},t),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===W||void 0===W?void 0:W.openai_api_key)||""})]})}),(0,H.jsx)(v.Z,{mt:w.HN}),(0,H.jsxs)(d.ZP,{alignItems:"center",children:[(0,H.jsx)(l.ZP,{id:"save-project-settings",loading:ue,onClick:function(){de({features:null===W||void 0===W?void 0:W.features,help_improve_mage:null===W||void 0===W?void 0:W.help_improve_mage,openai_api_key:null===W||void 0===W?void 0:W.openai_api_key,pipelines:null===W||void 0===W?void 0:W.pipelines})},primary:!0,children:"Save project settings"}),T&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(v.Z,{mr:w.cd}),(0,H.jsx)(l.ZP,{onClick:T,secondary:!0,children:P||"Cancel"})]})]})]});return _?(0,H.jsx)(k,{children:ae}):ae}},46568:function(e,t,n){"use strict";var r=n(82394),i=n(26304),o=(n(82684),n(33591)),c=n(28598),l=["children","fullHeight","gutter","style"];function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=e.children,n=e.fullHeight,r=e.gutter,s=e.style,d=void 0===s?{}:s,a=(0,i.Z)(e,l),p=u({},d);return r&&(p.paddingLeft=r,p.paddingRight=p.paddingLeft),n&&(p.height="100%"),(0,c.jsx)(o.Col,u(u({},a),{},{style:p,children:t}))}},82682:function(e,t,n){"use strict";var r=n(82394),i=n(26304),o=n(82684),c=n(33591),l=n(28598),s=["children","fullHeight","gutter","justifyContent","style"];function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=e.children,n=e.fullHeight,r=e.gutter,u=e.justifyContent,a=e.style,p=void 0===a?{}:a,j=(0,i.Z)(e,s),f=d({},p);return r&&(f.marginLeft=-1*r,f.marginRight=f.marginLeft),n&&(f.height="100%"),(0,l.jsx)(c.Row,d(d({},j),{},{justifyContent:u,style:f,children:o.Children.map(t,(function(e,t){return e&&o.cloneElement(e,{gutter:r,key:t})}))}))}},61316:function(e,t,n){"use strict";n.r(t);var r=n(77837),i=n(38860),o=n.n(i),c=n(46568),l=n(55729),s=n(93808),u=n(82682),d=n(28274),a=n(38276),p=n(70515),j=n(24755),f=n(28598);function h(){return(0,f.jsx)(d.Z,{uuidItemSelected:j.HY,uuidWorkspaceSelected:j.WH,children:(0,f.jsx)(a.Z,{p:p.cd,children:(0,f.jsx)(u.Z,{justifyContent:"center",children:(0,f.jsx)(c.Z,{xl:8,xxl:6,children:(0,f.jsx)(l.Z,{})})})})})}h.getInitialProps=(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,s.Z)(h)},33323:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/preferences",function(){return n(61316)}])}},function(e){e.O(0,[1557,5699,9774,2888,179],(function(){return t=33323,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2403],{60480:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return G}});var r,i=t(77837),s=t(82394),o=t(75582),l=t(38860),c=t.n(l),u=t(82684),a=t(12691),d=t.n(a),h=t(21764),p=t(69864),m=t(71180),y=t(70652),b=t(50724),f=t(1402),v=t(55485),j=t(85854),x=t(48670),Z=t(93808),_=t(44085),g=t(28274),k=t(38276);!function(e){e.SSH="ssh",e.HTTPS="https"}(r||(r={}));var w=[{autoComplete:"remote_repo_link",label:"Remote repo url",required:!0,uuid:"remote_repo_link"},{autoComplete:"repo_path",label:"Local directory path",labelDescription:"Defaults to Python's os.getcwd() if omitted. Mage will create this local directory if it doesn't already exist.",uuid:"repo_path"}],P=[{autoComplete:"username",label:"Username",uuid:"username"},{autoComplete:"email",label:"Email",uuid:"email"},{autoComplete:"ssh_public_key",label:"SSH public key in base64",type:"password",uuid:"ssh_public_key"},{autoComplete:"ssh_private_key",label:"SSH private key in base64",type:"password",uuid:"ssh_private_key"}],O=[{autoComplete:"username",label:"Username",required:!0,uuid:"username"},{autoComplete:"email",label:"Email",required:!0,uuid:"email"},{autoComplete:"access_token",label:"Access token",labelDescription:"Add your Git access token to authenticate with your provided username. The access token will be stored as a Mage secret.",required:!0,type:"password",uuid:"access_token"}],C=[{autoComplete:"branch",label:"Branch name",required:!0,uuid:"branch"}],S=t(30160),T=t(17488),I=t(35686),M=t(70515),q=t(24755),H=t(72619),A=t(28598);function D(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function E(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?D(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):D(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function N(){var e=I.ZP.syncs.list().data,n=(0,u.useState)(null),t=n[0],i=n[1],l=(0,u.useState)(null),c=l[0],a=l[1],Z=(0,u.useState)(null),D=Z[0],N=Z[1],G=(0,u.useState)(null),R=G[0],B=G[1];(0,u.useEffect)((function(){if(e){var n,t=null===e||void 0===e||null===(n=e.syncs)||void 0===n?void 0:n[0];a(null===t||void 0===t?void 0:t.user_git_settings),i(t),B(!(null===t||void 0===t||!t.branch))}}),[e]);var F=(0,u.useMemo)((function(){if(e){var n,t=null===e||void 0===e||null===(n=e.syncs)||void 0===n?void 0:n[0];return!(null===t||void 0===t||!t.branch)}return!1}),[e]),U=(0,p.Db)(I.ZP.syncs.useCreate(),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(e){var n=e.sync;n&&(i(n),window.location.reload(),h.Am.success("Sync saved",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:"data_sync_success"}))},onErrorCallback:function(e,n){return N({errors:n,response:e})}})}}),W=(0,o.Z)(U,2),L=W[0],z=W[1].isLoading,X=(0,p.Db)(I.ZP.syncs.useUpdate("git"),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(e){e.sync&&h.Am.success("Success!",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:"data_sync_success"})},onErrorCallback:function(e,n){return N({errors:n,response:e})}})}}),Y=(0,o.Z)(X,2),J=Y[0],K=Y[1].isLoading,Q=(0,u.useMemo)((function(){return(null===t||void 0===t?void 0:t.auth_type)||r.SSH}),[null===t||void 0===t?void 0:t.auth_type]),V=(0,u.useMemo)((function(){return Q===r.HTTPS?O:P}),[Q]),$=I.ZP.statuses.list().data,ee=(0,u.useMemo)((function(){var e,n;return null===$||void 0===$||null===(e=$.statuses)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.require_user_authentication}),[$]),ne=(0,u.useMemo)((function(){var e=i,n=t;return!R&&ee&&(e=a,n=c),(0,A.jsx)("form",{children:V.map((function(t){var r,i,o=t.autoComplete,l=t.disabled,c=t.label,u=t.labelDescription,a=t.required,d=t.type,p=t.uuid;return i="ssh_public_key"===p?(0,A.jsx)(k.Z,{mb:1,children:(0,A.jsxs)(S.ZP,{small:!0,children:["Run ",(0,A.jsx)(x.Z,{onClick:function(){navigator.clipboard.writeText("cat ~/.ssh/id_ed25519.pub | base64 | tr -d \\\\n && echo"),h.Am.success("Successfully copied to clipboard.",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:p})},small:!0,children:"cat ~/.ssh/id_ed25519.pub | base64 | tr -d \\\\n && echo"})," in terminal to get base64 encoded public key and paste the result here. The key will be stored as a Mage secret."]})}):"ssh_private_key"===p?(0,A.jsx)(k.Z,{mb:1,children:(0,A.jsxs)(S.ZP,{small:!0,children:["Follow same steps as the public key, but run ",(0,A.jsx)(x.Z,{onClick:function(){navigator.clipboard.writeText("cat ~/.ssh/id_ed25519 | base64 | tr -d \\\\n && echo"),h.Am.success("Successfully copied to clipboard.",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:p})},small:!0,children:"cat ~/.ssh/id_ed25519 | base64 | tr -d \\\\n && echo"})," instead. The key will be stored as a Mage secret."]})}):u&&(0,A.jsx)(k.Z,{mb:1,children:(0,A.jsx)(S.ZP,{small:!0,children:u})}),(0,A.jsxs)(k.Z,{mt:2,children:[i,(0,A.jsx)(T.Z,{autoComplete:o,disabled:l,label:c,onChange:function(n){e((function(e){return E(E({},e),{},(0,s.Z)({},p,n.target.value))}))},primary:!0,required:a,setContentOnMount:!0,type:d,value:(null===(r=n)||void 0===r?void 0:r[p])||""})]},p)}))})}),[V,ee,a,i,R,t,c]);return(0,A.jsx)(g.Z,{uuidItemSelected:q.fF,uuidWorkspaceSelected:q.WH,children:(0,A.jsxs)(k.Z,{p:M.cd,style:{width:"600px"},children:[(0,A.jsx)(j.Z,{children:"Git repository settings"}),(0,A.jsxs)(S.ZP,{children:["If you are using Github and want to use a more feature rich integration, you can check out the ",(0,A.jsx)(d(),{as:"/version-control",href:"/version-control",children:(0,A.jsx)(x.Z,{inline:!0,children:"version control app"})}),"."]}),(0,A.jsx)(x.Z,{}),(0,A.jsx)(k.Z,{mt:1,children:(0,A.jsx)(S.ZP,{bold:!0,children:"Authentication type"})}),(0,A.jsx)(k.Z,{mt:1,children:(0,A.jsx)(_.Z,{compact:!0,label:"Authentication type",onChange:function(e){var n=e.target.value;i((function(e){return E(E({},e),{},{auth_type:n})}))},value:Q,children:Object.entries(r).map((function(e){var n=(0,o.Z)(e,2),t=n[0],r=n[1];return(0,A.jsx)("option",{value:r,children:t},r)}))})}),(0,A.jsx)(k.Z,{mt:M.Mq,children:Q===r.SSH&&(0,A.jsxs)(S.ZP,{bold:!0,children:["You will need to ",(0,A.jsx)(x.Z,{href:"https://docs.mage.ai/development/git/configure#generate-ssh-token",openNewWindow:!0,children:"set up your SSH key"})," if you have not done so already."]})}),(0,A.jsx)("form",{children:w.map((function(e){var n=e.autoComplete,r=e.disabled,o=e.label,l=e.labelDescription,c=e.required,u=e.type,a=e.uuid;return(0,A.jsxs)(k.Z,{mt:2,children:[l&&(0,A.jsx)(k.Z,{mb:1,children:(0,A.jsx)(S.ZP,{small:!0,children:l})}),(0,A.jsx)(T.Z,{autoComplete:n,disabled:r,label:o,onChange:function(e){i((function(n){return E(E({},n),{},(0,s.Z)({},a,e.target.value))}))},primary:!0,required:c,setContentOnMount:!0,type:u,value:(null===t||void 0===t?void 0:t[a])||""})]},a)}))}),(0,A.jsx)(k.Z,{mt:M.Mq,children:(0,A.jsxs)(v.ZP,{alignItems:"center",children:[(0,A.jsx)(k.Z,{mr:1,children:(0,A.jsx)(y.Z,{checked:!!R,onClick:function(){return B((function(e){var n=!e;return n||i((function(e){return E(E({},e),{},{branch:null,sync_on_pipeline_run:!1,sync_on_start:!1})})),n}))}})}),(0,A.jsxs)(S.ZP,{bold:!0,children:["Use ",(0,A.jsx)(x.Z,{bold:!0,href:"https://docs.mage.ai/production/data-sync/git-sync",openNewWindow:!0,children:"One-way git sync"})," (Click link for more info)"]})]})}),R?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(k.Z,{mt:M.Mq,children:(0,A.jsx)(S.ZP,{bold:!0,children:"Sync with a specified branch. These settings will be saved at the project level."})}),(0,A.jsx)("form",{children:C.map((function(e){var n=e.autoComplete,r=e.disabled,o=e.label,l=e.required,c=e.type,u=e.uuid;return(0,A.jsx)(k.Z,{mt:2,children:(0,A.jsx)(T.Z,{autoComplete:n,disabled:r,label:o,onChange:function(e){i((function(n){return E(E({},n),{},(0,s.Z)({},u,e.target.value))}))},primary:!0,required:l,setContentOnMount:!0,type:c,value:(null===t||void 0===t?void 0:t[u])||""})},u)}))}),(0,A.jsx)(v.ZP,{alignItems:"center",children:(0,A.jsx)(k.Z,{mt:2,children:(0,A.jsx)(y.Z,{checked:null===t||void 0===t?void 0:t.sync_submodules,label:"Include submodules",onClick:function(){i((function(e){return E(E({},e),{},{sync_submodules:!(null!==t&&void 0!==t&&t.sync_submodules)})}))}})})}),(0,A.jsx)(k.Z,{mt:2,children:(0,A.jsx)(j.Z,{level:5,children:"Additional sync settings"})}),(0,A.jsx)(v.ZP,{alignItems:"center",children:(0,A.jsx)(k.Z,{mt:2,children:(0,A.jsx)(y.Z,{checked:null===t||void 0===t?void 0:t.sync_on_pipeline_run,label:"Sync before each trigger run",onClick:function(){i((function(e){return E(E({},e),{},{sync_on_pipeline_run:!(null!==t&&void 0!==t&&t.sync_on_pipeline_run)})}))}})})}),(0,A.jsx)(v.ZP,{alignItems:"center",children:(0,A.jsx)(k.Z,{mt:2,children:(0,A.jsx)(y.Z,{checked:null===t||void 0===t?void 0:t.sync_on_start,label:"Sync on server start up",onClick:function(){i((function(e){return E(E({},e),{},{sync_on_start:!(null!==t&&void 0!==t&&t.sync_on_start)})}))}})})}),(0,A.jsx)(k.Z,{mt:M.Mq,children:(0,A.jsx)(S.ZP,{bold:!0,children:"Configure the Git authentication credentials that will be used to sync with the specified Git repository."})}),ne]}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(k.Z,{mt:M.Mq,children:(0,A.jsx)(S.ZP,{bold:!0,children:"These fields are required to help Mage configure your Git settings. These settings will be specific to your user."})}),ne]}),(0,A.jsx)(k.Z,{mt:2,children:(0,A.jsx)(m.ZP,{loading:z,onClick:function(){return L({sync:E(E({},t),{},{user_git_settings:c})})},primary:!0,children:"Save repository settings"})}),D&&(0,A.jsx)(b.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===N||void 0===N?void 0:N(null)},children:(0,A.jsx)(f.Z,E(E({},D),{},{onClose:function(){return null===N||void 0===N?void 0:N(null)}}))}),F&&(0,A.jsxs)(k.Z,{mt:M.HN,children:[(0,A.jsx)(j.Z,{children:"Synchronize code from remote repository"}),(0,A.jsxs)(k.Z,{mt:1,children:[(0,A.jsxs)(S.ZP,{children:["Running the sync from this page will run a one time sync with the remote repository.",(0,A.jsx)("br",{}),"This may ",(0,A.jsx)(S.ZP,{bold:!0,danger:!0,inline:!0,children:"overwrite"})," your existing data, so make sure you\u2019ve committed or backed up your current changes."]}),(0,A.jsx)(k.Z,{mt:2}),(0,A.jsxs)(S.ZP,{children:["Reset will tell Mage to try to clone your repository from remote. This will also ",(0,A.jsx)(S.ZP,{bold:!0,danger:!0,inline:!0,children:"overwrite"})," all your local changes and reset any settings you may have configured for your local Git repo. This may be helpful if you are having issues syncing your repository."]})]}),(0,A.jsx)(k.Z,{mt:2,children:(0,A.jsxs)(v.ZP,{children:[(0,A.jsx)(m.ZP,{loading:K,onClick:function(){return J({sync:{action_type:"sync_data"}})},warning:!0,children:"Synchronize code"}),(0,A.jsx)(k.Z,{ml:2}),(0,A.jsx)(m.ZP,{danger:!0,loading:K,onClick:function(){return J({sync:{action_type:"reset"}})},children:"Reset repository"})]})})]})]})})}N.getInitialProps=(0,i.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var G=(0,Z.Z)(N)},37056:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/sync-data",function(){return t(60480)}])}},function(e){e.O(0,[1557,5699,9774,2888,179],(function(){return n=37056,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1312],{66316:function(e,t,r){"use strict";r.d(t,{Z:function(){return j}});var n=r(82394),i=r(70613),o=r(31557),c=r(33591),u=r(38276),s=r(70515),a=r(28598);var l=function(e){var t=e.children,r=e.width,n=void 0===r?12:r;return(0,a.jsx)(u.Z,{px:s.zC,children:(0,a.jsx)(c.Row,{children:(0,a.jsx)(c.Col,{lg:n,md:Math.min(12,Math.round(1.5*(12-n))),sm:Math.min(12,Math.round(1.75*(12-n))),xs:12,children:t})})})},d=r(25976),f=r(46684),p=d.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-jcgu5l-0"})(["padding-top:","px;",""],f.Mz,(function(e){return e.fullHeight&&"\n height: calc(100vh);\n "}));function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var j=function(e){var t=e.children,r=e.headerProps,n=e.title;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.Z,{title:n}),(0,a.jsx)(o.Z,g({},r)),(0,a.jsx)(l,{children:(0,a.jsx)(p,{fullHeight:!0,children:t})})]})}},46568:function(e,t,r){"use strict";var n=r(82394),i=r(26304),o=(r(82684),r(33591)),c=r(28598),u=["children","fullHeight","gutter","style"];function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.Z=function(e){var t=e.children,r=e.fullHeight,n=e.gutter,s=e.style,l=void 0===s?{}:s,d=(0,i.Z)(e,u),f=a({},l);return n&&(f.paddingLeft=n,f.paddingRight=f.paddingLeft),r&&(f.height="100%"),(0,c.jsx)(o.Col,a(a({},d),{},{style:f,children:t}))}},82682:function(e,t,r){"use strict";var n=r(82394),i=r(26304),o=r(82684),c=r(33591),u=r(28598),s=["children","fullHeight","gutter","justifyContent","style"];function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.Z=function(e){var t=e.children,r=e.fullHeight,n=e.gutter,a=e.justifyContent,d=e.style,f=void 0===d?{}:d,p=(0,i.Z)(e,s),h=l({},f);return n&&(h.marginLeft=-1*n,h.marginRight=h.marginLeft),r&&(h.height="100%"),(0,u.jsx)(c.Row,l(l({},p),{},{justifyContent:a,style:h,children:o.Children.map(t,(function(e,t){return e&&o.cloneElement(e,{gutter:n,key:t})}))}))}},94542:function(e,t,r){"use strict";r.d(t,{J:function(){return o},X:function(){return c}});var n=r(46568),i=r(82682),o=n.Z,c=i.Z},91769:function(e,t,r){"use strict";r.d(t,{f:function(){return v},h:function(){return j}});var n=r(82394),i=r(82684),o=r(34376),c=r(68562),u=r(72473),s=r(70515),a=r(69419),l=r(53808),d=r(28598);var f=function(e){var t=e.oauthResponse,r=(0,o.useRouter)(),n=(0,i.useMemo)((function(){return t||{}}),[t]),f=n.url,p=n.redirect_query_params,h=void 0===p?{}:p;return(0,d.jsx)(d.Fragment,{children:f&&(0,d.jsx)(c.ZP,{beforeElement:(0,d.jsx)(u.GoogleIcon,{size:2*s.iI}),bold:!0,inline:!0,onClick:function(){var e=(0,a.iV)(f).state;(0,l.t8)(e,h),r.push(f)},uuid:"SignForm/google",children:"Sign in with Google"})})};var p=function(e){var t=e.oauthResponse,r=(0,o.useRouter)(),n=(0,i.useMemo)((function(){return t||{}}),[t]),f=n.url,p=n.redirect_query_params,h=void 0===p?{}:p;return(0,d.jsx)(d.Fragment,{children:f&&(0,d.jsx)(c.ZP,{beforeElement:(0,d.jsx)(u.MicrosoftIcon,{size:2*s.iI}),bold:!0,inline:!0,onClick:function(){var e=(0,a.iV)(f).state;h&&(0,l.t8)(e,h),r.push(f)},uuid:"SignForm/active_directory",children:"Sign in with Microsoft"})})};var h=function(e){var t=e.oauthResponse,r=(0,o.useRouter)(),n=(0,i.useMemo)((function(){return t||{}}),[t]),u=n.url,s=n.redirect_query_params,f=void 0===s?{}:s;return(0,d.jsx)(d.Fragment,{children:u&&(0,d.jsx)(c.ZP,{bold:!0,inline:!0,onClick:function(){var e=(0,a.iV)(u).state;(0,l.t8)(e,f),r.push(u)},uuid:"SignForm/oidc_generic",children:"Sign in with OIDC"})})};var g,j,b=function(e){var t=e.oauthResponse,r=(0,o.useRouter)(),n=(0,i.useMemo)((function(){return t||{}}),[t]),u=n.url,s=n.redirect_query_params,f=void 0===s?{}:s;return(0,d.jsx)(d.Fragment,{children:u&&(0,d.jsx)(c.ZP,{bold:!0,inline:!0,onClick:function(){var e=(0,a.iV)(u).state;(0,l.t8)(e,f),r.push(u)},uuid:"SignForm/okta",children:"Sign in with Okta"})})};!function(e){e.ACTIVE_DIRECTORY="active_directory",e.AZURE_DEVOPS="azure_devops",e.BITBUCKET="bitbucket",e.GITHUB="github",e.GITLAB="gitlab",e.GOOGLE="google",e.OIDC_GENERIC="oidc_generic",e.OKTA="okta"}(j||(j={}));var v=(g={},(0,n.Z)(g,j.ACTIVE_DIRECTORY,p),(0,n.Z)(g,j.GOOGLE,f),(0,n.Z)(g,j.OIDC_GENERIC,h),(0,n.Z)(g,j.OKTA,b),g)},13180:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return L}});var n=r(77837),i=r(38860),o=r.n(i),c=r(66316),u=r(82394),s=r(75582),a=r(82684),l=r(69864),d=r(34376),f=r(40761),p=r(55485),h=r(85854),g=r(68562),j=r(38276),b=r(30160),v=r(17488),O=r(35686),y=r(25976),m=r(44897),x=r(42631),w=r(70515),P=y.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-641xul-0"})(["border-radius:","px;padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;width:100%;",""],x.TR,21*w.iI,w.Vj,w.Vj,w.Vj,(function(e){return"\n background-color: ".concat((e.theme.background||m.Z.background).panel,";\n ")})),Z=y.default.div.withConfig({displayName:"indexstyle__BackgroundImageStyle",componentId:"sc-641xul-1"})(["border-radius:","px;font-size:0;overflow:hidden;",""],x.D7,(function(e){return e.src&&"\n background-image: url(".concat(e.src,");\n background-size: cover;\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n ")})),C=r(94542),_=r(39643),k=r(91769),E=r(42122),S=r(72619),D=r(42041),R=r(69419),I=r(50178),M=r(28598);function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?T(Object(r),!0).forEach((function(t){(0,u.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var V="email",F="password";var G=function(e){var t=e.title,r=(0,d.useRouter)(),n=(0,a.useState)(null),i=n[0],o=n[1],c=(0,a.useState)({}),y=c[0],m=c[1],x=(0,l.Db)(O.ZP.sessions.useCreate(),{onSuccess:function(e){return(0,S.wD)(e,{callback:function(e){var t=e.session,n=t.token,i=t.user;(0,I.av)(i),f.Z.storeToken(n,(function(){var e="".concat(r.basePath,"/"),t=(0,R.iV)(window.location.href),n=(0,R.uM)((0,E.gR)(t,["redirect_url","access_token","provider"]));t.redirect_url&&(e="".concat(t.redirect_url,"?").concat(n)),window.location.href=e}))},onErrorCallback:function(e){var t=e.error;o(t)}})}}),T=(0,s.Z)(x,2),G=T[0],H=T[1].isLoading,L=(0,a.useCallback)((function(e){return f.Z.logout((function(){return G(e)}))}),[G]),N=O.ZP.oauths.list({redirect_uri:encodeURIComponent(window.location.href)}).data,A=(0,a.useMemo)((function(){var e;return null===N||void 0===N||null===(e=N.oauths)||void 0===e?void 0:e.reduce((function(e,t){return e[t.provider]=t,e}),{})}),[N]),U=(0,R.iV)()||{},q=U.access_token,B=U.provider;return(0,a.useEffect)((function(){var e;q&&B&&G({session:(e={},(0,u.Z)(e,"provider",B),(0,u.Z)(e,"token",q),e)})}),[q,G,B]),(0,M.jsxs)(C.X,{fullHeight:!0,children:[(0,M.jsx)(C.J,{lg:6,md:12,children:(0,M.jsx)(p.ZP,{flexDirection:"column",fullHeight:!0,fullWidth:!0,justifyContent:"center",children:(0,M.jsx)(j.Z,{px:{xl:5*w.zC,xs:w.zC},py:w.zC,children:(0,M.jsxs)(P,{children:[(0,M.jsx)(h.Z,{yellow:!0,children:t}),(0,M.jsxs)("form",{children:[(0,M.jsxs)(j.Z,{mt:3,children:[(0,M.jsx)(v.Z,{autoComplete:"username",label:"Email",large:!0,meta:{error:" ",touched:!!i},onChange:function(e){return m((function(t){return z(z({},t),{},(0,u.Z)({},V,e.target.value))}))},primary:!i,value:y.email}),(0,M.jsx)(j.Z,{mt:2,children:(0,M.jsx)(v.Z,{autoComplete:"current-password",label:"Password",large:!0,meta:{error:" ",touched:!!i},onChange:function(e){return m((function(t){return z(z({},t),{},(0,u.Z)({},F,e.target.value))}))},primary:!i,type:"password",value:y.password})})]}),i&&(0,M.jsx)(j.Z,{mt:2,children:(0,M.jsx)(b.ZP,{danger:!0,children:i.message})}),(0,M.jsx)(j.Z,{mt:3,children:(0,M.jsx)(g.ZP,{bold:!0,inline:!0,keyTextGroups:[[_.Lz]],keyboardShortcutValidation:function(e){var t=e.keyMapping;return(0,D.y)([_.Uq],t)},large:!0,loading:H,noHoverUnderline:!0,onClick:function(){return L({session:y})},selected:!0,uuid:"SignForm/action",wind:!0,children:"Sign into Mage"})}),Object.entries(k.f).map((function(e){var t=(0,s.Z)(e,2),r=t[0],n=t[1];return(0,M.jsx)(M.Fragment,{children:(null===A||void 0===A?void 0:A[r])&&(0,M.jsx)(j.Z,{mt:4,children:(0,M.jsx)(n,{oauthResponse:null===A||void 0===A?void 0:A[r]})})})}))]})]})})})}),(0,M.jsx)(C.J,{hiddenLgDown:!0,lg:6,style:{flex:1},children:(0,M.jsx)(j.Z,{fullHeight:!0,fullWidth:!0,px:w.zC,py:w.zC+8,children:(0,M.jsx)(Z,{src:"".concat(r.basePath,"/images/sessions/abstract.png"),children:"Sign in abstract image"})})})]})};function H(){return(0,M.jsx)(c.Z,{title:"Sign in",children:(0,M.jsx)(G,{title:"\ud83d\udc4b Sign in"})})}H.getInitialProps=(0,n.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var L=H},6821:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/sign-in",function(){return r(13180)}])}},function(e){e.O(0,[1557,9774,2888,179],(function(){return t=6821,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2858],{94629:function(e,n,t){"use strict";t.d(n,{Z:function(){return C}});var r=t(82394),o=t(21831),i=t(82684),l=t(50724),s=t(1402),c=t(97618),u=t(70613),a=t(31557),d=t(68899),h=t(28598);function f(e,n){var t=e.children,r=e.noPadding;return(0,h.jsx)(d.HS,{noPadding:r,ref:n,children:t})}var m=i.forwardRef(f),v=t(62547),j=t(82571),p=t(77417),x=t(46684),b=t(75375);function Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function g(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Z(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function y(e,n){e.addProjectBreadcrumbToCustomBreadcrumbs;var t=e.after,r=e.afterHeader,i=e.afterHidden,f=e.afterWidth,Z=e.afterWidthOverride,y=e.appendBreadcrumbs,C=e.before,P=e.beforeHeader,_=e.beforeWidth,w=e.breadcrumbs,O=e.children,k=e.contained,M=e.errors,I=e.headerMenuItems,S=e.headerOffset,H=e.hideAfterCompletely,E=e.mainContainerHeader,A=e.navigationItems,D=e.setAfterHidden,R=e.setAfterWidth,F=e.setBeforeWidth,B=e.setErrors,N=e.subheaderChildren,V=e.subheaderNoPadding,T=e.title,U=e.uuid,L=(0,b.Z)(U,{beforeResizeOffset:b.H,setWidthAfter:R,setWidthBefore:F,widthAfter:f,widthBefore:_,widthOverrideAfter:Z}),q=L.mainContainerRef,G=L.mousedownActiveAfter,z=L.mousedownActiveBefore,W=L.setMousedownActiveAfter,Q=L.setMousedownActiveBefore,K=L.setWidthAfter,Y=L.setWidthBefore,X=L.widthAfter,J=L.widthBefore,$=(0,p.Z)().project,ee=[];return w&&ee.push.apply(ee,(0,o.Z)(w)),null!==w&&void 0!==w&&w.length&&!y||!$||null!==w&&void 0!==w&&w.length||ee.unshift({bold:!y,label:function(){return T}}),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(u.Z,{title:T}),(0,h.jsx)(a.Z,{breadcrumbs:ee,menuItems:I}),(0,h.jsxs)(d.Nk,{ref:n,children:[0!==(null===A||void 0===A?void 0:A.length)&&(0,h.jsx)(d.lm,{showMore:!0,children:(0,h.jsx)(j.Z,{navigationItems:A,showMore:!0})}),(0,h.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,h.jsxs)(v.Z,{after:t,afterHeader:r,afterHeightOffset:x.Mz,afterHidden:i,afterMousedownActive:G,afterWidth:X,before:C,beforeHeader:P,beforeHeightOffset:x.Mz,beforeMousedownActive:z,beforeWidth:C?J:d.k1,contained:k,headerOffset:S,hideAfterCompletely:!t||H,leftOffset:C?d.k1:null,mainContainerHeader:E,mainContainerRef:q,setAfterHidden:D,setAfterMousedownActive:W,setAfterWidth:K,setBeforeMousedownActive:Q,setBeforeWidth:Y,children:[N&&(0,h.jsx)(m,{noPadding:V,children:N}),O]})})]}),M&&(0,h.jsx)(l.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===B||void 0===B?void 0:B(null)},children:(0,h.jsx)(s.Z,g(g({},M),{},{onClose:function(){return null===B||void 0===B?void 0:B(null)}}))})]})}var C=i.forwardRef(y)},93808:function(e,n,t){"use strict";t.d(n,{Z:function(){return O}});var r=t(77837),o=t(26304),i=t(62243),l=t(29385),s=t(80022),c=t(13692),u=t(93189),a=t(15544),d=t(82394),h=t(38860),f=t.n(h),m=t(82684),v=t(56663),j=t.n(v),p=t(40761),x=t(34661),b=t(36105),Z=t(50178),g=t(69419),y=t(28598),C=["auth"];function P(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function _(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?P(Object(t),!0).forEach((function(n){(0,d.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function w(e){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=(0,a.Z)(e);if(n){var o=(0,a.Z)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return(0,u.Z)(this,t)}}function O(e){return function(n){(0,c.Z)(u,n);var t=w(u);function u(){var e;(0,i.Z)(this,u);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e=t.call.apply(t,[this].concat(r)),(0,d.Z)((0,s.Z)(e),"state",{auth:new p.Z(e.props.token)}),e}return(0,l.Z)(u,[{key:"componentDidMount",value:function(){this.setState({auth:new p.Z(this.props.token)})}},{key:"render",value:function(){var n=this.props,t=(n.auth,(0,o.Z)(n,C));return(0,y.jsx)(e,_({auth:this.state.auth},t))}}],[{key:"getInitialProps",value:function(){var n=(0,r.Z)(f().mark((function n(t){var r,o,i,l,s,c,u,a,d;return f().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=j()(t),o=(0,Z.ex)(t),i=o.id,l=r[x.Mv],s=r[b.qt],c=new p.Z(l),u=_(_({},t),{},{auth:c,currentGroupId:i,theme:s}),(0,Z.YB)(t)&&c.isExpired&&(console.log("OAuth token has expired."),a=_(_({},t.query),{},{redirect_url:t.asPath}),(0,g.nL)("/sign-in?".concat((0,g.uM)(a)),t.res)),!e.getInitialProps){n.next=12;break}return n.next=10,e.getInitialProps(u);case 10:return d=n.sent,n.abrupt("return",_(_({},d),{},{auth:c,currentGroupId:i,theme:s}));case 12:return n.abrupt("return",u);case 13:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()}]),u}(m.Component)}},91769:function(e,n,t){"use strict";t.d(n,{f:function(){return x},h:function(){return j}});var r=t(82394),o=t(82684),i=t(34376),l=t(68562),s=t(72473),c=t(70515),u=t(69419),a=t(53808),d=t(28598);var h=function(e){var n=e.oauthResponse,t=(0,i.useRouter)(),r=(0,o.useMemo)((function(){return n||{}}),[n]),h=r.url,f=r.redirect_query_params,m=void 0===f?{}:f;return(0,d.jsx)(d.Fragment,{children:h&&(0,d.jsx)(l.ZP,{beforeElement:(0,d.jsx)(s.GoogleIcon,{size:2*c.iI}),bold:!0,inline:!0,onClick:function(){var e=(0,u.iV)(h).state;(0,a.t8)(e,m),t.push(h)},uuid:"SignForm/google",children:"Sign in with Google"})})};var f=function(e){var n=e.oauthResponse,t=(0,i.useRouter)(),r=(0,o.useMemo)((function(){return n||{}}),[n]),h=r.url,f=r.redirect_query_params,m=void 0===f?{}:f;return(0,d.jsx)(d.Fragment,{children:h&&(0,d.jsx)(l.ZP,{beforeElement:(0,d.jsx)(s.MicrosoftIcon,{size:2*c.iI}),bold:!0,inline:!0,onClick:function(){var e=(0,u.iV)(h).state;m&&(0,a.t8)(e,m),t.push(h)},uuid:"SignForm/active_directory",children:"Sign in with Microsoft"})})};var m=function(e){var n=e.oauthResponse,t=(0,i.useRouter)(),r=(0,o.useMemo)((function(){return n||{}}),[n]),s=r.url,c=r.redirect_query_params,h=void 0===c?{}:c;return(0,d.jsx)(d.Fragment,{children:s&&(0,d.jsx)(l.ZP,{bold:!0,inline:!0,onClick:function(){var e=(0,u.iV)(s).state;(0,a.t8)(e,h),t.push(s)},uuid:"SignForm/oidc_generic",children:"Sign in with OIDC"})})};var v,j,p=function(e){var n=e.oauthResponse,t=(0,i.useRouter)(),r=(0,o.useMemo)((function(){return n||{}}),[n]),s=r.url,c=r.redirect_query_params,h=void 0===c?{}:c;return(0,d.jsx)(d.Fragment,{children:s&&(0,d.jsx)(l.ZP,{bold:!0,inline:!0,onClick:function(){var e=(0,u.iV)(s).state;(0,a.t8)(e,h),t.push(s)},uuid:"SignForm/okta",children:"Sign in with Okta"})})};!function(e){e.ACTIVE_DIRECTORY="active_directory",e.AZURE_DEVOPS="azure_devops",e.BITBUCKET="bitbucket",e.GITHUB="github",e.GITLAB="gitlab",e.GOOGLE="google",e.OIDC_GENERIC="oidc_generic",e.OKTA="okta"}(j||(j={}));var x=(v={},(0,r.Z)(v,j.ACTIVE_DIRECTORY,f),(0,r.Z)(v,j.GOOGLE,h),(0,r.Z)(v,j.OIDC_GENERIC,m),(0,r.Z)(v,j.OKTA,p),v)},37520:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Ne}});var r=t(77837),o=t(38860),i=t.n(o),l=t(93808),s=t(82394),c=t(75582),u=t(82684),a=t(69864),d=t(71180),h=t(15338),f=t(55485),m=t(85854),v=t(44085),j=t(38276),p=t(4190),x=t(30160),b=t(35576),Z=t(17488),g=t(12468),y=t(35686),C=t(72473),P="clone",_="delete",w="fetch",O="merge",k="pull",M="push",I="rebase",S="git_remote_name",H="git_repository_name",E={uuid:"Branches"},A={uuid:"Commit"},D={uuid:"Push & Pull Requests"},R={uuid:"Remote & Auth"},F=[R,E,A,D],B=t(70515),N=t(81728),V=t(72619),T=t(28598);var U=function(e){var n=e.actionRemoteName,t=e.branch,r=e.branches,o=e.fetchBranch,i=e.fetchBranches,l=e.remotes,s=e.setActionRemoteName,P=e.showError,w=(0,u.useState)(""),k=w[0],M=w[1],S=(0,u.useState)(null),H=S[0],E=S[1],D=(0,u.useState)(null),F=D[0],U=D[1],L=(0,u.useState)(null),q=L[0],G=L[1],z=(0,u.useState)(""),W=z[0],Q=z[1],K=(0,u.useMemo)((function(){return null===l||void 0===l?void 0:l.find((function(e){return e.name===n}))}),[n,l]),Y=(0,u.useMemo)((function(){return(null===r||void 0===r?void 0:r.concat((null===K||void 0===K?void 0:K.refs)||[]))||[]}),[r,K]),X=(0,a.Db)(y.ZP.git_custom_branches.useCreate(),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){o(),i(),Q("")},onErrorCallback:function(e,n){return P({errors:n,response:e})}})}}),J=(0,c.Z)(X,2),$=J[0],ee=J[1].isLoading,ne=(0,a.Db)(y.ZP.git_custom_branches.useCreate(),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){o(),window.location.reload()},onErrorCallback:function(e,n){return P({errors:n,response:e})}})}}),te=(0,c.Z)(ne,2),re=te[0],oe=te[1].isLoading,ie=(0,a.Db)(y.ZP.git_custom_branches.useUpdate(null===t||void 0===t?void 0:t.name),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(e){var n=e.git_custom_branch.progress;o(),M(""),E(""),U(n),G("")},onErrorCallback:function(e,n){return P({errors:n,response:e})}})}}),le=(0,c.Z)(ie,2),se=le[0],ce=le[1].isLoading;return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsxs)(m.Z,{children:["Branches",r?" (".concat(null===r||void 0===r?void 0:r.length,")"):""]}),(0,T.jsx)(j.Z,{mt:B.Mq,children:(0,T.jsxs)(f.ZP,{children:[(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Remote"})}),(0,T.jsx)(v.Z,{beforeIcon:(0,T.jsx)(C.MultiShare,{}),beforeIconSize:1.5*B.iI,monospace:!0,onChange:function(e){return s(e.target.value)},placeholder:"Choose a remote",value:n||"",children:null===l||void 0===l?void 0:l.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))})]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Current branch"})}),(0,T.jsxs)(f.ZP,{alignItems:"center",children:[(0,T.jsx)(g.Z,{fullSize:!0,label:"Choose a different branch to switch branches",widthFitContent:!0,children:(0,T.jsx)(v.Z,{beforeIcon:(0,T.jsx)(C.Branch,{muted:!1}),beforeIconSize:2*B.iI,monospace:!0,onChange:function(e){return re({git_custom_branch:{name:e.target.value,remote:n}})},value:null===t||void 0===t?void 0:t.name,children:(null===t||void 0===t?void 0:t.name)&&(null===Y||void 0===Y?void 0:Y.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)})))})}),(0,T.jsx)(j.Z,{mr:B.cd}),oe&&(0,T.jsx)(p.Z,{inverted:!0})]})]})]})}),(0,T.jsx)(j.Z,{mt:B.Mq,children:(0,T.jsxs)(f.ZP,{alignItems:"center",children:[(0,T.jsx)(Z.Z,{label:"New branch name",monospace:!0,onChange:function(e){var n;return Q(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.value)},value:W||""}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.Add,{size:2*B.iI}),disabled:!W,loading:ee,onClick:function(){$({git_custom_branch:{name:W}})},primary:!0,children:"Create new branch"})]})})]}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(m.Z,{children:"Actions"}),(0,T.jsxs)(j.Z,{mt:B.Mq,children:[(0,T.jsxs)(j.Z,{mb:B.Mq,children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Compare branch"})}),(null===t||void 0===t?void 0:t.name)&&(0,T.jsx)(x.ZP,{monospace:!0,children:null===t||void 0===t?void 0:t.name})]}),(0,T.jsxs)(f.ZP,{alignItems:"center",children:[(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Base branch"})}),(0,T.jsx)(v.Z,{beforeIcon:(0,T.jsx)(C.Branch,{}),beforeIconSize:1.5*B.iI,monospace:!0,onChange:function(e){return G(e.target.value)},placeholder:"Choose a branch",value:q,children:null===Y||void 0===Y?void 0:Y.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))})]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Action"})}),(0,T.jsxs)(v.Z,{onChange:function(e){return E(e.target.value)},placeholder:"Choose action",value:H||"",children:[(0,T.jsx)("option",{value:O,children:(0,N.vg)(O)}),(0,T.jsx)("option",{value:I,children:(0,N.vg)(I)}),(0,T.jsx)("option",{value:_,children:(0,N.vg)(_)})]})]})]}),H&&[O,I].includes(H)&&(0,T.jsxs)(j.Z,{mt:B.cd,children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsxs)(x.ZP,{bold:!0,muted:!0,children:["Message for ",H]})}),(0,T.jsx)(b.Z,{monospace:!0,onChange:function(e){return M(e.target.value)},value:k||""})]}),(0,T.jsxs)(j.Z,{mt:B.cd,children:[(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.Lightning,{size:2*B.iI}),disabled:!H||!q,loading:ce,onClick:function(){(_!==H||"undefined"!==typeof location&&window.confirm("Are you sure you want to delete branch ".concat(q,"?")))&&se({git_custom_branch:{action_payload:{base_branch:q},action_type:H,message:k}})},primary:!0,children:H?(0,N.vg)(H):"Execute action"}),F&&(0,T.jsx)(j.Z,{mt:B.cd,children:(0,T.jsx)(x.ZP,{default:!0,monospace:!0,preWrap:!0,children:F})})]})]})]}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:B.HN,children:(0,T.jsx)(h.Z,{light:!0})}),(0,T.jsxs)(f.ZP,{children:[(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.PaginateArrowLeft,{}),linkProps:{href:"/version-control?tab=".concat(encodeURIComponent(R.uuid))},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:R.uuid}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)(d.ZP,{afterIcon:(0,T.jsx)(C.PaginateArrowRight,{}),linkProps:{href:"/version-control?tab=".concat(A.uuid)},noHoverUnderline:!0,sameColorAsText:!0,secondary:!0,children:["Next: ",A.uuid]})]})]})]})},L=t(90299),q=t(32013),G=t(98777),z=t(48670),W=t(75499);function Q(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function K(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Q(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Q(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Y={base_branch:null,body:null,compare_branch:null,repository:null,title:null};var X=function(e){var n=e.actionRemoteName,t=e.branch,r=e.branches,o=e.fetchBranch,i=e.loading,l=e.remotes,s=e.repositories,g=e.repositoryName,P=e.setActionRemoteName,_=e.setRepositoryName,w=e.showError,O=(0,u.useState)((null===t||void 0===t?void 0:t.name)||""),k=O[0],I=O[1],S=(0,u.useState)(null),H=S[0],E=S[1],D=(0,u.useState)(null),R=D[0],F=D[1],U=(0,u.useState)(Y),L=U[0],Q=U[1],X=(0,a.Db)(y.ZP.git_custom_branches.useUpdate(null===t||void 0===t?void 0:t.name),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(e){var n=e.git_custom_branch,t=n.error,r=n.progress;t?(E(t),F(null)):(o(),E(null),F(r))},onErrorCallback:function(e,n){return w({errors:n,response:e})}})}}),J=(0,c.Z)(X,2),$=J[0],ee=J[1].isLoading,ne=(0,u.useMemo)((function(){var e;return null===s||void 0===s||null===(e=s.find((function(e){return e.name===g})))||void 0===e?void 0:e.url}),[s,g]),te=y.ZP.pull_requests.list({remote_url:ne,repository:g},{},{pauseFetch:!g}),re=te.data,oe=te.mutate,ie=(0,u.useMemo)((function(){return(null===re||void 0===re?void 0:re.pull_requests)||[]}),[re]),le=(0,u.useMemo)((function(){return(0,T.jsx)(W.Z,{columnFlex:[null,null,null,null],columns:[{uuid:"Title"},{uuid:"Author"},{uuid:"Created"},{uuid:"Last modified"}],onClickRow:function(e){var n,t=null===ie||void 0===ie||null===(n=ie[e])||void 0===n?void 0:n.url;t&&window.open(t,"_blank")},rows:null===ie||void 0===ie?void 0:ie.map((function(e){var n=e.created_at,t=e.last_modified,r=e.title,o=e.url,i=e.user;return[(0,T.jsx)(z.Z,{default:!0,href:o,monospace:!0,openNewWindow:!0,small:!0,children:r},"title"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:i},"user"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:n},"createdAt"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:t||"-"},"lastModified")]})),uuid:"pull-requests"})}),[ie]),se=y.ZP.git_custom_branches.list({remote_url:ne,repository:g},{},{pauseFetch:!g}).data,ce=(0,u.useMemo)((function(){return(null===se||void 0===se?void 0:se.git_custom_branches)||[]}),[se]);(0,u.useEffect)((function(){null!==L&&void 0!==L&&L.compare_branch||null===ce||void 0===ce||!ce.find((function(e){return e.name===(null===t||void 0===t?void 0:t.name)}))||Q((function(e){return K(K({},e),{},{compare_branch:null===t||void 0===t?void 0:t.name})}))}),[t,ce,L]);var ue=(0,a.Db)(y.ZP.pull_requests.useCreate(),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){oe(),Q(Y)},onErrorCallback:function(e,n){return w({errors:n,response:e})}})}}),ae=(0,c.Z)(ue,2),de=ae[0],he=ae[1].isLoading;return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(m.Z,{children:(0,N.vg)(M)})}),(0,T.jsxs)(j.Z,{mt:B.Mq,children:[(0,T.jsxs)(f.ZP,{children:[(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Remote"})}),i&&(0,T.jsx)(p.Z,{inverted:!0}),!i&&(0,T.jsx)(v.Z,{beforeIcon:(0,T.jsx)(C.MultiShare,{}),beforeIconSize:1.5*B.iI,monospace:!0,onChange:function(e){return P(e.target.value)},placeholder:"Choose remote",value:n||"",children:null===l||void 0===l?void 0:l.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))})]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Branch"})}),(0,T.jsxs)(v.Z,{beforeIcon:(0,T.jsx)(C.Branch,{}),beforeIconSize:1.5*B.iI,monospace:!0,onChange:function(e){return I(e.target.value)},placeholder:"Choose branch",value:k||"",children:[(0,T.jsx)("option",{value:""}),null===r||void 0===r?void 0:r.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))]})]})]}),(0,T.jsx)(j.Z,{mt:B.cd,children:(0,T.jsxs)(d.ZP,{beforeIcon:(0,T.jsx)(C.Lightning,{size:2*B.iI}),disabled:!n||!k,loading:ee,onClick:function(){F(null),$({git_custom_branch:{action_payload:{branch:k,remote:n},action_type:M}})},primary:!0,children:[(0,N.vg)(M)," ",n," ",n&&k]})}),(R||H)&&(0,T.jsx)(j.Z,{mt:B.cd,children:(0,T.jsx)(x.ZP,{danger:!!H,default:!!R,monospace:!0,preWrap:!0,children:R||H})})]})]}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(m.Z,{children:"Create pull request"})}),(0,T.jsxs)(j.Z,{mt:B.Mq,children:[i&&(0,T.jsx)(p.Z,{inverted:!0}),!i&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(f.ZP,{children:[(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Repository"})}),(0,T.jsx)(v.Z,{monospace:!0,onChange:function(e){return _(e.target.value)},placeholder:"Choose repository",value:g||"",children:null===s||void 0===s?void 0:s.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))})]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Base branch"})}),g&&!se&&(0,T.jsx)(p.Z,{inverted:!0}),(!g||se)&&(0,T.jsx)(v.Z,{beforeIcon:(0,T.jsx)(C.Branch,{}),beforeIconSize:1.5*B.iI,disabled:!g,monospace:!0,onChange:function(e){return Q((function(n){return K(K({},n),{},{base_branch:e.target.value})}))},placeholder:"Choose branch",value:(null===L||void 0===L?void 0:L.base_branch)||"",children:null===ce||void 0===ce?void 0:ce.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))})]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Compare branch"})}),g&&!se&&(0,T.jsx)(p.Z,{inverted:!0}),(!g||se||(null===L||void 0===L?void 0:L.compare_branch))&&(0,T.jsxs)(v.Z,{beforeIcon:(0,T.jsx)(C.Branch,{}),beforeIconSize:1.5*B.iI,disabled:!g,monospace:!0,onChange:function(e){return Q((function(n){return K(K({},n),{},{compare_branch:e.target.value})}))},placeholder:"Choose branch",value:(null===L||void 0===L?void 0:L.compare_branch)||"",children:[!(null!==ce&&void 0!==ce&&ce.length)&&(null===L||void 0===L?void 0:L.compare_branch)&&(0,T.jsx)("option",{value:null===L||void 0===L?void 0:L.compare_branch,children:null===L||void 0===L?void 0:L.compare_branch}),null===ce||void 0===ce?void 0:ce.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))]})]})]}),(0,T.jsx)(j.Z,{mt:1,children:(0,T.jsx)(Z.Z,{label:"Title",monospace:!0,onChange:function(e){return Q((function(n){return K(K({},n),{},{title:e.target.value})}))},value:(null===L||void 0===L?void 0:L.title)||""})}),(0,T.jsx)(j.Z,{mt:1,children:(0,T.jsx)(b.Z,{label:"Description",monospace:!0,onChange:function(e){return Q((function(n){return K(K({},n),{},{body:e.target.value})}))},value:(null===L||void 0===L?void 0:L.body)||""})}),(0,T.jsx)(j.Z,{mt:B.cd,children:(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.Lightning,{size:2*B.iI}),disabled:!g||!(null!==L&&void 0!==L&&L.title)||!(null!==L&&void 0!==L&&L.base_branch)||!(null!==L&&void 0!==L&&L.compare_branch),loading:he,onClick:function(){de({pull_request:K(K({},L),{},{remote_url:ne,repository:g})})},primary:!0,children:"Create new pull request"})})]})]}),(0,T.jsx)(j.Z,{mt:B.Mq,children:(0,T.jsx)(q.Z,{visibleMapping:{0:!g},children:(0,T.jsxs)(G.Z,{noPaddingContent:!0,title:re?"Pull requests (".concat(null===ie||void 0===ie?void 0:ie.length,")"):"Pull requests",children:[!g&&(0,T.jsx)(j.Z,{p:B.cd,children:(0,T.jsx)(x.ZP,{muted:!0,children:"Please select a repository to view open pull requests."})}),g&&(0,T.jsxs)(T.Fragment,{children:[!re&&(0,T.jsx)(j.Z,{p:B.cd,children:(0,T.jsx)(p.Z,{inverted:!0})}),re&&le]})]})})})]}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:B.HN,children:(0,T.jsx)(h.Z,{light:!0})}),(0,T.jsx)(f.ZP,{children:(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.PaginateArrowLeft,{}),linkProps:{href:"/version-control?tab=".concat(A.uuid)},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:A.uuid})})]})]})},J=t(94629),$=t(78650),ee=t(70652),ne=t(97618),te=t(25976),re=te.default.div.withConfig({displayName:"indexstyle__SpacingStyle",componentId:"sc-el09vr-0"})(["margin-top:","px;"],.5*B.iI),oe=t(42122);function ie(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function le(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ie(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ie(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var se,ce=function(e){var n=e.branch,t=e.fetchBranch,r=e.modifiedFiles,o=e.setSelectedFilePath,i=e.showError,l=e.stagedFiles,s=e.untrackedFiles,v=(0,u.useRef)(null),Z=(0,u.useState)(""),g=Z[0],P=Z[1],_=(0,u.useState)({}),w=_[0],O=_[1],k=(0,u.useState)({}),M=k[0],I=k[1],S=(0,u.useMemo)((function(){return Object.keys(r).concat(Object.keys(s)).sort()}),[r,s]),H=(0,u.useMemo)((function(){return Object.keys(l||{})}),[l]),A=(0,u.useMemo)((function(){return H.length}),[H]),R=(0,u.useMemo)((function(){return Object.keys(w).length===(null===S||void 0===S?void 0:S.length)}),[w,S]),F=(0,u.useMemo)((function(){return Object.keys(M).length===(null===H||void 0===H?void 0:H.length)}),[M,H]),U=(0,u.useMemo)((function(){return{onErrorCallback:function(e,n){return i({errors:n,response:e})}}}),[i]),L=(0,u.useMemo)((function(){return{onSuccess:function(e){return(0,V.wD)(e,le({callback:function(){t(),O({})}},U))}}}),[t,U]),Q=(0,u.useMemo)((function(){return y.ZP.git_custom_branches.useUpdate(null===n||void 0===n?void 0:n.name)}),[n]),K=(0,a.Db)(Q,L),Y=(0,c.Z)(K,2),X=Y[0],J=Y[1].isLoading,$=(0,a.Db)(Q,L),te=(0,c.Z)($,2),ie=te[0],se=te[1].isLoading,ce=(0,a.Db)(Q,{onSuccess:function(e){return(0,V.wD)(e,le({callback:function(){t(),I({})}},U))}}),ue=(0,c.Z)(ce,2),ae=ue[0],de=ue[1].isLoading,he=(0,u.useCallback)((function(e,n,t,r,o){var i=(null===e||void 0===e?void 0:e.length)>=1;return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(z.Z,{block:!0,noHoverUnderline:!0,onClick:function(){t(o?{}:r)},preventDefault:!0,children:(0,T.jsxs)(f.ZP,{alignItems:"center",flexDirection:"row",children:[(0,T.jsx)(ee.Z,{checked:i&&o,disabled:!i}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(x.ZP,{bold:!0,children:i&&o?"Unselect all":"Select all"})]})}),e.map((function(e){return(0,T.jsx)(re,{children:(0,T.jsx)(z.Z,{block:!0,noHoverUnderline:!0,onClick:function(){return t((function(n){var t=le({},n);return!(null!==t&&void 0!==t&&t[e])?t[e]=!0:delete t[e],t}))},preventDefault:!0,children:(0,T.jsxs)(f.ZP,{alignItems:"center",flexDirection:"row",children:[(0,T.jsx)(ee.Z,{checked:!(null===n||void 0===n||!n[e])}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,children:e})]})})},e)}))]})}),[]),fe=(0,u.useMemo)((function(){return(0,oe.Qr)(w)}),[w]),me=y.ZP.git_custom_branches.detail("with_logs",{_format:"with_logs"}),ve=me.data,je=me.mutate,pe=(0,u.useMemo)((function(){var e;return(null===ve||void 0===ve||null===(e=ve.git_custom_branch)||void 0===e?void 0:e.logs)||[]}),[ve]),xe=(0,a.Db)(y.ZP.git_custom_branches.useUpdate(null===n||void 0===n?void 0:n.name),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){je(),t(),P("")},onErrorCallback:function(e,n){return i({errors:n,response:e})}})}}),be=(0,c.Z)(xe,2),Ze=be[0],ge=be[1].isLoading,ye=(0,u.useMemo)((function(){return(0,T.jsx)(W.Z,{columnFlex:[1,1,1],columns:[{uuid:"Author"},{uuid:"Date"},{uuid:"Message"}],rows:pe.map((function(e){var n=e.author,t=e.date,r=e.message;return[(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:null===n||void 0===n?void 0:n.name},"author"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:t},"date"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:r},"message")]})),uuid:"git-branch-logs"})}),[pe]);return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(j.Z,{mb:B.HN,children:(0,T.jsxs)(f.ZP,{children:[(0,T.jsxs)(ne.Z,{flex:1,flexDirection:"column",children:[(0,T.jsxs)(m.Z,{children:["Not staged ",(null===S||void 0===S?void 0:S.length)>=1&&"(".concat(null===S||void 0===S?void 0:S.length,")")]}),(0,T.jsx)(j.Z,{my:B.cd,children:(0,T.jsx)(h.Z,{light:!0})}),(0,T.jsx)(j.Z,{mb:B.cd,children:(0,T.jsxs)(f.ZP,{flexDirection:"row",children:[(0,T.jsx)(d.ZP,{compact:!0,disabled:fe||de||se,loading:J,onClick:function(){X({git_custom_branch:{action_type:"add",files:Object.keys(w)}}).then((function(e){var n,t=e.data;null!==t&&void 0!==t&&t.git_custom_branch&&(null===v||void 0===v||null===(n=v.current)||void 0===n||n.focus())}))},primary:!0,children:"Add files"}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(d.ZP,{compact:!0,disabled:fe||J||de,loading:se,noBackground:!0,onClick:function(){"undefined"!==typeof location&&window.confirm("Are you sure you want to undo all changes in the selected files?")&&ie({git_custom_branch:{action_type:"checkout",files:Object.keys(w)}})},children:"Checkout files"})]})}),he(S,w,O,le(le({},r),s),R)]}),(0,T.jsx)(j.Z,{mr:B.cd}),(0,T.jsxs)(ne.Z,{flex:1,flexDirection:"column",children:[(0,T.jsxs)(m.Z,{children:["Staged files ",(null===H||void 0===H?void 0:H.length)>=1&&"(".concat(null===H||void 0===H?void 0:H.length,")")]}),(0,T.jsx)(j.Z,{my:B.cd,children:(0,T.jsx)(h.Z,{light:!0})}),(0,T.jsx)(j.Z,{mb:B.cd,children:(0,T.jsx)(f.ZP,{flexDirection:"row",children:(0,T.jsx)(d.ZP,{compact:!0,disabled:(0,oe.Qr)(M)||J||se,loading:de,onClick:function(){ae({git_custom_branch:{action_type:"reset",files:Object.keys(M)}})},secondary:!0,children:"Reset files"})})}),he(H,M,I,l,F)]})]})}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(m.Z,{children:"Commit"})}),(0,T.jsx)(j.Z,{mb:B.cd,children:(0,T.jsx)(q.Z,{children:(0,T.jsx)(G.Z,{noPaddingContent:!0,title:A>=1?"Staged files (".concat(A,")"):"No staged files",children:null===H||void 0===H?void 0:H.map((function(e){return(0,T.jsx)(j.Z,{my:1,px:B.cd,children:(0,T.jsxs)(f.ZP,{justifyContent:"space-between",children:[(0,T.jsx)(z.Z,{default:!0,monospace:!0,onClick:function(){return o((function(n){return n===e?null:e}))},warning:null===r||void 0===r?void 0:r[e],children:e}),(0,T.jsx)(j.Z,{mr:1}),(null===r||void 0===r?void 0:r[e])&&(0,T.jsx)(x.ZP,{warning:!0,children:"Modified after staging"})]})},e)}))})})}),(0,T.jsx)(b.Z,{label:"Commit message",monospace:!0,onChange:function(e){return P(e.target.value)},ref:v,value:g||""}),(0,T.jsx)(j.Z,{mt:B.cd,children:(0,T.jsxs)(f.ZP,{alignItems:"center",children:[(0,T.jsxs)(d.ZP,{disabled:0===A||!((null===g||void 0===g?void 0:g.length)>=1),loading:ge,onClick:function(){Ze({git_custom_branch:{action_type:"commit",message:g}})},primary:!0,children:["Commit ",(0,N._6)("file",A,!0)," with message"]}),0===A&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(x.ZP,{danger:!0,small:!0,children:"Please stage at least 1 file before committing."})]})]})})]}),(0,T.jsx)(j.Z,{mb:B.HN,children:(0,T.jsx)(q.Z,{children:(0,T.jsxs)(G.Z,{noPaddingContent:!0,title:"Logs",children:[!ve&&(0,T.jsx)(j.Z,{p:B.cd,children:(0,T.jsx)(p.Z,{inverted:!0})}),ve&&ye]})})}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:B.HN,children:(0,T.jsx)(h.Z,{light:!0})}),(0,T.jsxs)(f.ZP,{children:[(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.PaginateArrowLeft,{}),linkProps:{href:"/version-control?tab=".concat(E.uuid)},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:E.uuid}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)(d.ZP,{afterIcon:(0,T.jsx)(C.PaginateArrowRight,{}),linkProps:fe?{href:"/version-control?tab=".concat(encodeURIComponent(D.uuid))}:null,noHoverUnderline:!0,primary:fe,sameColorAsText:!0,secondary:!fe,children:["Next: ",D.uuid]})]})]})]})},ue=t(23531),ae=t(12691),de=t.n(ae),he=t(34376),fe=t(63403),me=te.default.svg.withConfig({displayName:"BitbucketWithText__SVGStyle",componentId:"sc-wdje9z-0"})([""]),ve=function(e){var n=e.fill,t=e.opacity,r=e.size,o=void 0===r?fe.C:r,i=e.style,l=e.viewBox,s=void 0===l?"0 0 299 42":l;return(0,T.jsxs)(me,{fill:n,height:o,opacity:t,style:i,viewBox:s,width:o,children:[(0,T.jsx)("path",{d:"M63.3372 2.9978H79.5353C87.4335 2.9978 91.2488 6.77741 91.2488 12.8379C91.2488 17.3994 89.1068 20.2016 84.756 21.179C90.4455 22.0914 93.3237 25.1542 93.3237 30.4978C93.3237 36.4931 89.1737 40.6637 80.4724 40.6637H63.3372V2.9978ZM68.625 19.0939H78.799C83.8191 19.0939 85.894 16.8782 85.894 13.2289C85.894 9.57954 83.6852 7.82008 78.799 7.82008H68.625V19.0939ZM68.625 23.7206V35.4504H80.673C85.7601 35.4504 88.036 33.6909 88.036 29.9113C88.036 25.871 85.827 23.7206 80.5393 23.7206H68.625Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M101.958 0.977783C104.033 0.977783 105.506 2.21592 105.506 4.43157C105.506 6.58205 104.033 7.88536 101.958 7.88536C99.8833 7.88536 98.4106 6.6472 98.4106 4.43157C98.4106 2.21592 99.8833 0.977783 101.958 0.977783ZM99.3478 11.9907H104.435V40.6638H99.3478V11.9907Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M123.779 36.0376C124.984 36.0376 126.055 35.7769 126.992 35.6466V40.4037C126.121 40.6643 125.117 40.8599 123.578 40.8599C117.286 40.8599 114.207 37.2756 114.207 31.9321V16.5529H109.455V11.9912H114.207V5.93091H119.16V11.9912H126.992V16.5529H119.16V31.7367C119.093 34.2781 120.633 36.0376 123.779 36.0376Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M138.504 35.5806V40.5982H133.417V0H138.504V17.1386C140.378 13.359 143.926 11.4039 148.477 11.4039C156.309 11.4039 160.258 17.8554 160.258 26.3271C160.258 34.4076 156.108 41.25 147.875 41.25C143.524 41.25 140.244 39.3602 138.504 35.5806ZM147.072 16.0309C142.52 16.0309 138.504 18.8329 138.504 25.2191V27.5001C138.504 33.8863 142.186 36.6883 146.536 36.6883C152.226 36.6883 155.171 33.0392 155.171 26.3921C155.171 19.4194 152.36 16.0309 147.072 16.0309Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M165.546 11.991H170.633V29.3252C170.633 34.4733 172.775 36.7541 177.594 36.7541C182.279 36.7541 185.559 33.6913 185.559 27.8915V11.991H190.647V40.664H185.559V35.972C183.685 39.3607 180.204 41.2505 176.255 41.2505C169.495 41.2505 165.613 36.6888 165.613 28.8039V11.991H165.546Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M219.027 39.8814C217.287 40.7938 214.542 41.1847 211.864 41.1847C201.355 41.1847 196.469 34.9941 196.469 26.1967C196.469 17.5296 201.355 11.3389 211.864 11.3389C214.542 11.3389 216.55 11.6647 218.892 12.7072V17.2689C217.019 16.4218 215.011 15.9006 212.266 15.9006C204.636 15.9006 201.49 20.5924 201.49 26.1967C201.49 31.8009 204.702 36.4929 212.401 36.4929C215.412 36.4929 217.287 36.1018 219.092 35.4502V39.8814H219.027Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M224.783 40.6635V0H229.87V25.4147L242.52 11.9904H249.147L235.29 26.0664L249.681 40.6635H242.789L229.802 27.2392V40.6635H224.783Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M266.483 41.2506C255.437 41.2506 250.619 35.0599 250.619 26.2624C250.619 17.5954 255.572 11.4045 264.541 11.4045C273.644 11.4045 277.259 17.5302 277.259 26.2624V28.4781H255.773C256.51 33.3655 259.722 36.4935 266.684 36.4935C270.096 36.4935 272.974 35.8418 275.652 34.9296V39.4911C273.175 40.7944 269.494 41.2506 266.483 41.2506ZM255.706 24.2423H272.172C271.904 18.8987 269.427 15.9012 264.34 15.9012C258.919 15.9012 256.242 19.2897 255.706 24.2423Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M294.929 36.0376C296.134 36.0376 297.205 35.7769 298.142 35.6466V40.4037C297.272 40.6643 296.267 40.8599 294.728 40.8599C288.437 40.8599 285.359 37.2756 285.359 31.9321V16.5529H280.606V11.9912H285.359V5.93091H290.311V11.9912H298.142V16.5529H290.311V31.7367C290.245 34.2781 291.784 36.0376 294.929 36.0376Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M1.36497 4.1062C0.556341 4.1062 -0.117513 4.82301 0.0172582 5.605L5.74501 39.1654C5.87979 40.0127 6.62103 40.6642 7.56442 40.6642H34.9903C35.6641 40.6642 36.2032 40.208 36.338 39.5565L42.0658 5.605C42.2006 4.82301 41.594 4.1062 40.718 4.1062H1.36497ZM25.4889 28.3479H16.7288L14.3704 16.3573H27.6453L25.4889 28.3479Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M40.2462 16.3572H27.5775L25.4886 28.3478H16.7286L6.3512 40.2079C6.3512 40.2079 6.82289 40.6641 7.56413 40.6641H34.99C35.6639 40.6641 36.2029 40.2079 36.3377 39.5562L40.2462 16.3572Z",fill:"url(#paint0_linear_13549_1163)"}),(0,T.jsx)("defs",{children:(0,T.jsxs)("linearGradient",{gradientUnits:"userSpaceOnUse",id:"paint0_linear_13549_1163",x1:"43.1513",x2:"22.7826",y1:"19.7256",y2:"36.1667",children:[(0,T.jsx)("stop",{offset:"0.176",stopColor:"#0052CC"}),(0,T.jsx)("stop",{offset:"1",stopColor:"#2684FF"})]})})]})},je=t(91769),pe=t(69419),xe=t(53808),be=(se={},(0,s.Z)(se,je.h.AZURE_DEVOPS,C.DevOpsWithText),(0,s.Z)(se,je.h.BITBUCKET,ve),(0,s.Z)(se,je.h.GITHUB,C.GitHubWithTextIcon),(0,s.Z)(se,je.h.GITLAB,C.GitLabWithTextIcon),se);function Ze(e){var n=e.isLoadingCreateOauth,t=e.oauth,r=e.provider,o=e.showError,i=(0,he.useRouter)(),l=(0,a.Db)(y.ZP.oauths.useUpdate(r),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){return window.location.href=window.location.href.split("?")[0]},onErrorCallback:function(e,n){return o({errors:n,response:e})}})}}),s=(0,c.Z)(l,2),u=s[0],h=s[1].isLoading,m=be[r];return(0,T.jsxs)(f.ZP,{justifyContent:"space-between",children:[(0,T.jsx)(ne.Z,{children:(0,T.jsx)(m,{size:12*B.iI})}),(0,T.jsx)(ne.Z,{alignItems:"center",children:null!==t&&void 0!==t&&t.authenticated?(0,T.jsx)(d.ZP,{loading:h,onClick:function(){return u({oauth:{action_type:"reset"}})},warning:!0,children:"Reset"}):(0,T.jsx)(d.ZP,{loading:n,onClick:function(){var e=null===t||void 0===t?void 0:t.url,n=(0,pe.iV)(e).state;(0,xe.t8)(n,(null===t||void 0===t?void 0:t.redirect_query_params)||{}),i.push(e)},primary:!0,children:"Authenticate"})})]})}var ge=function(e){var n=e.branch,t=e.isLoadingCreateOauth,r=e.showError,o=y.ZP.oauths.list({type:"git",redirect_uri:encodeURIComponent(window.location.href)}),i=o.data,l=(o.mutate,y.ZP.oauths.detail(je.h.GITHUB,{redirect_uri:encodeURIComponent(window.location.href)})),s=l.data,a=(l.mutate,(0,u.useMemo)((function(){return(null===s||void 0===s?void 0:s.oauth)||{}}),[s])),f=(0,u.useMemo)((function(){return null===n||void 0===n?void 0:n.access_token_exists}),[n]),v=(0,u.useMemo)((function(){var e,n=(null===i||void 0===i||null===(e=i.oauths)||void 0===e?void 0:e.reduce((function(e,n){return e[n.provider]=n,e}),{}))||{};return a&&(n[je.h.GITHUB]=a),n}),[i,a]),p=(0,u.useMemo)((function(){return Object.values(v).some((function(e){return null===e||void 0===e?void 0:e.authenticated}))}),[v]);return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(m.Z,{children:"Authentication"}),(0,T.jsxs)(j.Z,{mt:B.Mq,children:[f&&!p&&(0,T.jsxs)(j.Z,{mb:2,children:[(0,T.jsx)(d.ZP,{disabled:!0,children:"Using access token from Git Settings"}),(0,T.jsx)(j.Z,{mt:1,children:(0,T.jsx)(x.ZP,{muted:!0,children:"Some features may not work unless you authenticate with a Git client."})})]}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:B.Mq,children:(0,T.jsx)(x.ZP,{muted:!0,children:"Authenticating with the apps below will allow you to easily pull, push, and create pull requests."})}),(0,T.jsxs)(j.Z,{mb:B.Mq,style:{maxWidth:"600px"},children:[(0,T.jsx)(h.Z,{muted:!0}),Object.entries(v||{}).map((function(e){var n=(0,c.Z)(e,2),o=n[0],i=n[1];return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(Ze,{isLoadingCreateOauth:t,oauth:i,provider:o,showError:r},o),(0,T.jsx)(h.Z,{muted:!0})]})}))]})]})]})]})},ye=t(77417);var Ce=function(e){var n,t,r,o,i=e.actionRemoteName,l=e.branch,s=e.fetchBranch,b=e.loading,g=e.remotes,_=e.setActionRemoteName,O=e.showError,M=(0,he.useRouter)(),I=(0,ye.Z)().project,S=(0,u.useRef)(null),H=(0,u.useState)(null),A=H[0],D=H[1],R=(0,u.useState)(null),F=R[0],U=R[1],L=(0,u.useState)(null),Q=L[0],K=L[1],Y=(0,u.useState)(null),X=Y[0],J=Y[1],$=(0,u.useState)(!1),ee=$[0],te=$[1],re=(0,u.useState)(null),oe=re[0],ie=re[1],le=(0,u.useState)(""),se=le[0],ce=le[1],ue=(0,u.useState)(""),ae=ue[0],fe=ue[1],me=(0,u.useState)(null),ve=me[0],xe=me[1],be=(0,u.useMemo)((function(){return!(null===l||void 0===l||!l.name)}),[l]);(0,u.useEffect)((function(){var e,n;!ve&&(null!==l&&void 0!==l&&null!==(e=l.sync_config)&&void 0!==e&&e.repo_path||null!==I&&void 0!==I&&I.repo_path)&&xe((null===l||void 0===l||null===(n=l.sync_config)||void 0===n?void 0:n.repo_path)||(null===I||void 0===I?void 0:I.repo_path))}),[l,I,ve]);var Ze=(0,u.useMemo)((function(){var e,n;return null===g||void 0===g||null===(e=g.find((function(e){return e.name===i})))||void 0===e||null===(n=e.refs)||void 0===n?void 0:n.map((function(e){var n=e.name.split("/");return{name:n[n.length-1]}}))}),[i,g]),Ce=(0,a.Db)(y.ZP.syncs.useCreate(),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){s(),te(!1)},onErrorCallback:function(e,n){return O({errors:n,response:e})}})}}),Pe=(0,c.Z)(Ce,2),_e=Pe[0],we=Pe[1].isLoading,Oe=(0,a.Db)(y.ZP.git_custom_branches.useUpdate(null===l||void 0===l?void 0:l.name),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(e){var n=e.git_custom_branch,t=n.error,r=n.progress;t?(U(t),J(null)):(s(),D(null),U(null),K(null),J(r))},onErrorCallback:function(e,n){return O({errors:n,response:e})}})}}),ke=(0,c.Z)(Oe,2),Me=ke[0],Ie=ke[1].isLoading,Se=(0,a.Db)(y.ZP.git_custom_branches.useUpdate(null===l||void 0===l?void 0:l.name),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){s(),ce(""),fe("")},onErrorCallback:function(e,n){return O({errors:n,response:e})}})}}),He=(0,c.Z)(Se,2),Ee=He[0],Ae=He[1].isLoading,De=(0,a.Db)(y.ZP.git_custom_branches.useUpdate(null===l||void 0===l?void 0:l.name),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){s(),ie(null)},onErrorCallback:function(e,n){ie(null),O({errors:n,response:e})}})}}),Re=(0,c.Z)(De,2),Fe=Re[0],Be=Re[1].isLoading,Ne=(0,a.Db)(y.ZP.oauths.useCreate(),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){return window.location.href="".concat(M.basePath,"/version-control")},onErrorCallback:function(e,n){O({errors:n,response:e})}})}}),Ve=(0,c.Z)(Ne,2),Te=Ve[0],Ue=Ve[1].isLoading,Le=(0,pe.iV)()||{},qe=Le.access_token,Ge=Le.provider,ze=Le.refresh_token,We=Le.expires_in;(0,u.useEffect)((function(){qe&&Te({oauth:{expires_in:We,provider:Ge||je.h.GITHUB,refresh_token:ze,token:qe}})}),[qe,Te,We,Ge,ze]);var Qe=(0,u.useMemo)((function(){return null===g||void 0===g?void 0:g.map((function(e){var n=e.name,t=e.refs,r=e.urls;return(0,T.jsxs)(j.Z,{mt:B.Mq,children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,T.jsxs)(ne.Z,{alignItems:"center",children:[(0,T.jsx)(x.ZP,{bold:!0,children:n}),(0,T.jsx)(j.Z,{mx:1,children:(0,T.jsx)(C.ChevronRight,{muted:!0})}),null===r||void 0===r?void 0:r.map((function(e){return(0,T.jsx)(j.Z,{mr:1,children:(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:e})},e)}))]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(d.ZP,{compact:!0,disabled:Be&&oe!==n,iconOnly:!0,loading:Be&&oe===n,noBackground:!0,onClick:function(){"undefined"!==typeof location&&window.confirm("Are you sure you want to remove remote ".concat(n,"?"))&&(ie(n),Fe({git_custom_branch:{action_type:"remove_remote",action_payload:{name:n}}}).then((function(){i===n&&_(null)})))},small:!0,title:"Remote remote ".concat(n),children:(0,T.jsx)(C.Trash,{})})]})}),(0,T.jsx)(q.Z,{children:(0,T.jsxs)(G.Z,{noPaddingContent:!0,smallTitle:!0,title:"Refs (".concat(null===t||void 0===t?void 0:t.length,")"),children:[0===(null===t||void 0===t?void 0:t.length)&&(0,T.jsx)(j.Z,{p:B.cd,children:(0,T.jsx)(x.ZP,{muted:!0,children:"This remote has no refs."})}),(null===t||void 0===t?void 0:t.length)>=1&&(0,T.jsx)(W.Z,{columnFlex:[1,1,1],columns:[{uuid:"Ref"},{uuid:"Author"},{uuid:"Date"},{uuid:"Message"}],rows:t.map((function(e){var n,t=e.commit,r=e.name;return[(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:r},"ref-name"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:null===t||void 0===t||null===(n=t.author)||void 0===n?void 0:n.name},"author"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:null===t||void 0===t?void 0:t.date},"date"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:null===t||void 0===t?void 0:t.message},"message")]})),uuid:"git-branch-remotes-refs"})]})}),(0,T.jsx)(j.Z,{mt:B.Mq,children:(0,T.jsx)(h.Z,{light:!0})})]},n)}))}),[Be,oe,g,Fe]);return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(m.Z,{children:"Setup"}),(0,T.jsxs)(j.Z,{mt:B.Mq,children:[(0,T.jsxs)(j.Z,{mb:1,children:[(0,T.jsx)(x.ZP,{bold:!0,large:!0,children:be?"Git init directory":"Initialize Git directory"}),!be&&(0,T.jsxs)(x.ZP,{muted:!0,children:["Enter the directory you want to initialize git in.",(0,T.jsx)("br",{}),"The current project directoy is filled in for you. If you want to use that, click the save button."]}),be&&(0,T.jsxs)(x.ZP,{muted:!0,children:["If the directory below is blank, then the current working directory will be used to initialize git.",(0,T.jsx)("br",{}),"If git hasn\u2019t been initialized in the directory below, Mage will automatically run git init for you."]})]}),(0,T.jsxs)(f.ZP,{alignItems:"center",children:[(0,T.jsx)(Z.Z,{disabled:be&&!ee,fullWidth:!0,label:"Git directory",maxWidth:400,monospace:!0,onChange:function(e){return xe(e.target.value)},ref:S,value:ve||""}),(0,T.jsx)(j.Z,{mr:1}),(!be||ee)&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(d.ZP,{compact:!0,disabled:!be&&!ve,loading:we,onClick:function(){_e({sync:{repo_path:ve}})},primary:!0,small:!0,children:"Save"}),be&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(z.Z,{onClick:function(){return te(!1)},preventDefault:!0,sameColorAsText:!0,small:!0,children:"Cancel"})]})]}),be&&!ee&&(0,T.jsx)(z.Z,{onClick:function(){te(!0),setTimeout((function(){var e;return null===S||void 0===S||null===(e=S.current)||void 0===e?void 0:e.focus()}),1)},preventDefault:!0,sameColorAsText:!0,small:!0,children:"Edit"})]})]})]}),(0,T.jsx)(j.Z,{mb:B.HN,children:(0,T.jsx)(ge,{branch:l,isLoadingCreateOauth:Ue,showError:O})}),be&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsxs)(m.Z,{children:["Remotes",!b&&g?" (".concat(null===g||void 0===g?void 0:g.length,")"):""]}),b&&(0,T.jsx)(j.Z,{mt:B.Mq,children:(0,T.jsx)(p.Z,{inverted:!0})}),!b&&Qe,(0,T.jsx)(j.Z,{mt:B.Mq,children:(0,T.jsxs)(f.ZP,{alignItems:"flex-start",children:[(0,T.jsx)(Z.Z,{label:"New remote name",monospace:!0,onChange:function(e){var n;return ce(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.value)},value:se||""}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)(f.ZP,{flexDirection:"column",children:[(0,T.jsx)(Z.Z,{label:"Remote URL",monospace:!0,onChange:function(e){var n;return fe(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.value)},value:ae||""}),(0,T.jsx)(j.Z,{mt:1,children:(0,T.jsxs)(x.ZP,{muted:!0,small:!0,children:["Use the https URL if you",(0,T.jsx)("br",{}),"authenticated with GitHub above."]})})]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.Add,{size:2*B.iI}),disabled:!se||!ae,loading:Ae,onClick:function(){Ee({git_custom_branch:{action_type:"add_remote",action_payload:{name:se,url:ae}}})},primary:!0,children:"Create new remote"})]})})]}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(m.Z,{children:"Actions"}),(0,T.jsxs)(j.Z,{mt:B.Mq,children:[(0,T.jsxs)(j.Z,{mb:B.Mq,children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Current branch"})}),(null===l||void 0===l?void 0:l.name)&&(0,T.jsxs)(f.ZP,{alignItems:"center",children:[(0,T.jsx)(x.ZP,{monospace:!0,children:null===l||void 0===l?void 0:l.name}),(0,T.jsx)(j.Z,{mr:B.cd}),(0,T.jsx)(de(),{href:"/version-control?tab=".concat(E.uuid),passHref:!0,children:(0,T.jsx)(z.Z,{small:!0,children:"Switch branch"})})]})]}),(0,T.jsxs)(f.ZP,{children:[(0,T.jsxs)(v.Z,{onChange:function(e){return K(e.target.value)},placeholder:"Action",value:Q||"",children:[(0,T.jsx)("option",{value:w,children:(0,N.vg)(w)}),(0,T.jsx)("option",{value:k,children:(0,N.vg)(k)}),(0,T.jsx)("option",{value:"reset",children:(0,N.vg)("reset --hard")}),(0,T.jsx)("option",{value:P,children:(0,N.vg)(P)})]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(v.Z,{beforeIcon:(0,T.jsx)(C.MultiShare,{}),beforeIconSize:1.5*B.iI,monospace:!0,onChange:function(e){return _(e.target.value)},placeholder:"Remote",value:i||"",children:null===g||void 0===g?void 0:g.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))}),![w,P].includes(Q)&&(0,T.jsx)(j.Z,{ml:1,children:(0,T.jsxs)(v.Z,{beforeIcon:(0,T.jsx)(C.Branch,{}),beforeIconSize:1.5*B.iI,monospace:!0,onChange:function(e){return D(e.target.value)},value:A||"",children:[(0,T.jsx)("option",{value:"",children:"All branches"}),null===Ze||void 0===Ze?void 0:Ze.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))]})})]}),P===Q&&(0,T.jsxs)(j.Z,{mt:B.cd,children:[(0,T.jsxs)(x.ZP,{muted:!0,small:!0,children:["Cloning a branch will copy all the files and folders from the remote repository and put them into the Git directory configured above:",(0,T.jsx)("br",{}),(0,T.jsx)(x.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:null===l||void 0===l||null===(n=l.sync_config)||void 0===n?void 0:n.repo_path}),"."]}),(0,T.jsx)(j.Z,{mt:1,children:(0,T.jsx)(x.ZP,{muted:!0,small:!0,children:"Cloning won\u2019t automatically create a folder that is named after the remote repository."})}),(0,T.jsx)(j.Z,{mt:1,children:(0,T.jsxs)(x.ZP,{muted:!0,small:!0,children:["For example, if you have a file named ",(0,T.jsx)(x.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:"magic.py"})," in a remote repository named ",(0,T.jsx)(x.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:"project_romeo"}),(0,T.jsx)("br",{}),"then that file will be cloned here ",(0,T.jsxs)(x.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:[null===l||void 0===l||null===(t=l.sync_config)||void 0===t?void 0:t.repo_path,"/magic.py"]}),(0,T.jsx)("br",{}),"as opposed to ",(0,T.jsxs)(x.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:[null===l||void 0===l||null===(r=l.sync_config)||void 0===r?void 0:r.repo_path,"/project_romeo/magic.py"]}),"."]})}),(0,T.jsx)(j.Z,{mt:1,children:(0,T.jsxs)(x.ZP,{muted:!0,small:!0,children:["If you want to clone the content of a remote repository into a folder named after the remote repository, then change the Git init directoy above to",(0,T.jsx)("br",{}),(0,T.jsxs)(x.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:[null===l||void 0===l||null===(o=l.sync_config)||void 0===o?void 0:o.repo_path,"/",(0,T.jsx)(x.ZP,{inline:!0,monospace:!0,small:!0,children:"[remote repository name]"})]})]})})]}),(0,T.jsxs)(j.Z,{mt:B.cd,children:[(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.Lightning,{size:2*B.iI}),disabled:!Q||!i,loading:Ie,onClick:function(){J(null),(Q!==P||"undefined"!==typeof location&&window.confirm("Are you sure you want to clone remote ".concat(i,"? This will ")+"overwrite all your local changes and may reset any settings you may have configured for your local Git repo. This action cannot be undone."))&&Me({git_custom_branch:{action_payload:{branch:A,remote:i},action_type:Q}})},primary:!0,children:Q?(0,N.vg)(Q):"Execute action"}),(X||F)&&(0,T.jsx)(j.Z,{mt:B.cd,children:(0,T.jsx)(x.ZP,{danger:!!F,default:!!X,monospace:!0,preWrap:!0,children:X||F})})]})]})]}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:B.HN,children:(0,T.jsx)(h.Z,{light:!0})}),(0,T.jsx)(f.ZP,{children:(0,T.jsxs)(d.ZP,{afterIcon:(0,T.jsx)(C.PaginateArrowRight,{}),linkProps:{href:"/version-control?tab=".concat(E.uuid)},noHoverUnderline:!0,sameColorAsText:!0,secondary:!0,children:["Next: ",E.uuid]})})]})]})]})},Pe=t(93528),_e=t(98464),we=t(46684),Oe=t(53005),ke=t(15610),Me=(t(17717),t(74401)),Ie=t(86735);function Se(e,n){var t=(0,Me.a9)(e),r=Object.keys(n)||[];return null===r||void 0===r?void 0:r.find((function(e){return null===t||void 0===t?void 0:t.endsWith(e)}))}var He=t(23780);function Ee(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Ae(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ee(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ee(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var De="version_control/index",Re=30*B.iI;var Fe=function(){var e=(0,u.useRef)(null),n=(0,u.useRef)(null),t=(0,He.VI)(null,{},[],{uuid:"VersionControlPage"}),r=(0,c.Z)(t,1)[0],o=(0,u.useState)(!0),i=o[0],l=o[1],d=(0,u.useState)(Re),f=d[0],m=d[1],b="layout_before_".concat(De,"_width"),Z=(0,xe.U2)(b,Re),C=(0,u.useState)(Z),P=C[0],_=C[1],w=(0,u.useState)({}),O=w[0],k=w[1],M=(0,u.useState)(null),I=M[0],N=M[1],V=(0,u.useState)(null),q=V[0],G=V[1],z=(0,u.useState)(F[0]),W=z[0],Q=z[1],K=(0,u.useState)({"All projects":{uuid:"All projects"},"Git directory":{uuid:"Git directory"}}),Y=K[0],ee=K[1],ne=(0,pe.iV)();(0,u.useEffect)((function(){null!==ne&&void 0!==ne&&ne.tab&&Q(F.find((function(e){return e.uuid===(null===ne||void 0===ne?void 0:ne.tab)})))}),[ne]);var te=y.ZP.git_custom_branches.list({include_remote_branches:1}),re=te.data,ie=te.mutate,le=(0,u.useMemo)((function(){return null===re||void 0===re?void 0:re.git_custom_branches}),[re]);(0,u.useEffect)((function(){var e,n;!I&&(null===le||void 0===le?void 0:le.length)>=1&&null!==(e=le[0])&&void 0!==e&&e.name&&N(null===(n=le[0])||void 0===n?void 0:n.name)}),[I,le]);var se=y.ZP.git_custom_branches.detail("current",{_format:"with_files"}),ae=se.data,de=se.mutate,he=(0,u.useMemo)((function(){return(null===ae||void 0===ae?void 0:ae.git_custom_branch)||{}}),[ae]),fe=(0,u.useMemo)((function(){return(null===he||void 0===he?void 0:he.files)||[]}),[he]),me=y.ZP.git_custom_branches.detail("with_remotes",{_format:"with_remotes"}),ve=me.data,je=me.mutate,be=(0,u.useMemo)((function(){return null===ve||void 0===ve?void 0:ve.git_custom_branch}),[ve]),Ze=(0,u.useMemo)((function(){return(null===be||void 0===be?void 0:be.remotes)||[]}),[be]),ge=(0,u.useState)(null),ye=ge[0],Me=ge[1],Ee=(0,u.useCallback)((function(e){(0,xe.t8)(S,e),Me(e)}),[]);(0,u.useEffect)((function(){var e=(0,xe.U2)(S,null);if(ve&&e){var n=null===Ze||void 0===Ze?void 0:Ze.find((function(n){return n.name===e}));Ee(n?null===n||void 0===n?void 0:n.name:null)}}),[ve,Ze,Ee]);var Fe=(0,u.useState)((0,xe.U2)(H,"")),Be=Fe[0],Ne=Fe[1],Ve=(0,u.useCallback)((function(e){(0,xe.t8)(H,e),Ne(e)}),[]),Te=(0,u.useMemo)((function(){return(0,Ie.Tw)(Ze.reduce((function(e,n){var t;return e.concat((null===n||void 0===n||null===(t=n.repository_names)||void 0===t?void 0:t.map((function(e){var t;return{name:e,url:null===n||void 0===n||null===(t=n.urls)||void 0===t?void 0:t[0]}})))||[])}),[]),(function(e){return e.name}))}),[Ze]);(0,u.useEffect)((function(){var e=(0,xe.U2)(H,null);if(ve&&e){var n=null===Te||void 0===Te?void 0:Te.find((function(n){return n.name===e}));Ve(n?null===n||void 0===n?void 0:n.name:null)}}),[ve,Te,Ve]);var Ue=y.ZP.git_files.detail(q?encodeURIComponent(q):null,{base_branch:I}),Le=Ue.data,qe=Ue.mutate,Ge=(0,u.useMemo)((function(){return null===Le||void 0===Le?void 0:Le.git_file}),[Le]),ze=(0,_e.Z)(Ge);(0,u.useEffect)((function(){if(Ge!==ze){var e,n=null===he||void 0===he||null===(e=he.files_absolute_path)||void 0===e?void 0:e[q];k((function(e){var t;return Ae(Ae({},e),{},(0,s.Z)({},n,Ae(Ae({},Ge),{},{fullPath:n,relativePath:q,repoPath:null===he||void 0===he||null===(t=he.sync_config)||void 0===t?void 0:t.repo_path})))}))}}),[he,Ge,ze]),(0,u.useEffect)((function(){I&&qe()}),[I,qe]),(0,u.useEffect)((function(){null!==Le&&void 0!==Le&&Le.error&&r({errors:null===Le||void 0===Le?void 0:Le.error,response:Le})}),[Le,r]);var We=(0,u.useMemo)((function(){var e,n,t;return{modifiedFiles:null===he||void 0===he||null===(e=he.modified_files)||void 0===e?void 0:e.reduce((function(e,n){return Ae(Ae({},e),{},(0,s.Z)({},n,!0))}),{}),stagedFiles:null===he||void 0===he||null===(n=he.staged_files)||void 0===n?void 0:n.reduce((function(e,n){return Ae(Ae({},e),{},(0,s.Z)({},n,!0))}),{}),untrackedFiles:null===he||void 0===he||null===(t=he.untracked_files)||void 0===t?void 0:t.reduce((function(e,n){return Ae(Ae({},e),{},(0,s.Z)({},n,!0))}),{})}}),[he]),Qe=We.modifiedFiles,Ke=void 0===Qe?{}:Qe,Ye=We.stagedFiles,Xe=void 0===Ye?{}:Ye,Je=We.untrackedFiles,$e=void 0===Je?{}:Je;(0,u.useEffect)((function(){q&&(0,oe.Qr)(Ke)&&(0,oe.Qr)(Xe)&&(0,oe.Qr)($e)&&G(null)}),[Ke,q,Xe,$e]);var en=(0,u.useMemo)((function(){return(null===fe||void 0===fe?void 0:fe.length)>=1?(0,T.jsx)($.Z,{allowEmptyFolders:!0,disableContextMenu:!0,fetchFiles:de,files:fe,isFileDisabled:function(){return!1},onClickFile:function(e,t){G((function(t){if(!t||t!==e){var r;if(!I)null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus();return e}return null})),qe()},ref:e,renderAfterContent:function(e){var n,t,r=e.children,o=(null===r||void 0===r?void 0:r.length)>=1,i=(0,Oe.a9)(e);o&&(i="".concat(i,"/"));var l={};return Se(e,Ke)?(n="M",t="Modified",l.warning=!0):Se(e,$e)?(n="U",t="Untracked",l.danger=!0):Se(e,Xe)&&(n="S",t="Staged",l.success=!0),o&&!n?null:(0,T.jsx)(j.Z,{mx:1,children:(0,T.jsx)(g.Z,{appearBefore:!0,label:t,widthFitContent:!0,children:(0,T.jsx)(x.ZP,Ae(Ae({},l),{},{monospace:!0,rightAligned:!0,small:!0,children:n}))})})},useRootFolder:!0,uuid:"pages/VersionControl"}):(0,T.jsx)(j.Z,{p:B.cd,children:(0,T.jsx)(x.ZP,{monospace:!0,muted:!0,children:"No files modified"})})}),[I,de,qe,e,fe,Ke,n,G,Xe,$e]),nn=((0,u.useMemo)((function(){return!Le||!Ge||q&&(null===Ge||void 0===Ge?void 0:Ge.filename)!==q}),[Le,Ge,q]),(0,u.useMemo)((function(){return ae&&null!==he&&void 0!==he&&he.name?F:F.slice(0,1)}),[he,ae])),tn=(0,u.useMemo)((function(){return(0,T.jsxs)("div",{style:{marginTop:5},children:[(0,T.jsx)(L.Z,{onClickTab:function(e){var n=e.uuid;(0,ke.u)({tab:n})},selectedTabUUID:null===W||void 0===W?void 0:W.uuid,tabs:nn,underlineStyle:!0}),(0,T.jsx)(h.Z,{light:!0})]})}),[W,nn]),rn=(0,u.useMemo)((function(){return(0,T.jsx)(Ce,{actionRemoteName:ye,branch:he,fetchBranch:function(){de(),je()},loading:!ve,remotes:Ze,setActionRemoteName:Ee,showError:r})}),[ye,he,ve,de,je,Ze,Ee,r]),on=(0,u.useMemo)((function(){return(0,T.jsx)(U,{actionRemoteName:ye,branch:he,branches:le,fetchBranch:de,fetchBranches:ie,remotes:Ze,setActionRemoteName:Ee,showError:r})}),[ye,he,le,de,ie,Ze,Ee,r]),ln=(0,u.useMemo)((function(){return(0,T.jsx)(ce,{branch:he,fetchBranch:de,modifiedFiles:Ke,setSelectedFilePath:G,showError:r,stagedFiles:Xe,untrackedFiles:$e})}),[he,de,Ke,G,r,Xe,$e]),sn=(0,u.useMemo)((function(){return(0,T.jsx)(X,{actionRemoteName:ye,branch:he,branches:le,fetchBranch:de,loading:!ve,modifiedFiles:Ke,remotes:Ze,repositories:Te,repositoryName:Be,setActionRemoteName:Ee,setRepositoryName:Ve,showError:r,stagedFiles:Xe})}),[ye,he,le,ve,de,Ke,Ze,Te,Be,Ee,Ve,r,Xe]),cn=(0,u.useMemo)((function(){return(0,T.jsx)(L.Z,{allowScroll:!0,onClickTab:function(e){ee((function(n){return Ae(Ae({},(0,oe.gR)(n,[null===e||void 0===e?void 0:e.uuid])),null!==n&&void 0!==n&&n[null===e||void 0===e?void 0:e.uuid]?{}:(0,s.Z)({},null===e||void 0===e?void 0:e.uuid,e))}))},selectedTabUUIDs:Y,tabs:[{uuid:"All projects"},{uuid:"Git directory"}],underlineStyle:!0})}),[Y]),un=(0,u.useCallback)((function(){qe()}),[qe]),an=(0,u.useCallback)((function(){de()}),[de]),dn=(0,u.useMemo)((function(){var e;if(q)return null===he||void 0===he||null===(e=he.files_absolute_path)||void 0===e?void 0:e[q]}),[he,q]),hn=(0,u.useCallback)((function(e){k((function(n){return(0,oe.gR)(n,[e])}))}),[]),fn=(0,Pe.ZP)({codeEditorMaximumHeightOffset:2*we.Mz+10,onClickTabClose:hn,onCreateFile:an,onUpdateFileSuccess:un,originalContent:O,selectedFilePath:dn,showHiddenFilesSetting:!0,uuid:"pages/VersionControlPage"}),mn=fn.browser,vn=fn.controller,jn=fn.filePaths,pn=(fn.menu,fn.selectedFilePath),xn=fn.tabs,bn=(0,a.Db)((function(e){var n=e.filePath,t=e.query;return y.ZP.git_files.detailAsync(encodeURIComponent(n),t)})),Zn=(0,c.Z)(bn,2),gn=Zn[0];Zn[1].isLoading,(0,u.useEffect)((function(){pn&&gn({filePath:pn,query:{base_branch:I,derive:!0}}).then((function(e){return k((function(n){var t;return Ae(Ae({},n),{},(0,s.Z)({},pn,null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.git_file))}))}))}),[pn]),(0,u.useEffect)((function(){(null===jn||void 0===jn?void 0:jn.length)>=1&&l(!1)}),[jn]);var yn=(0,u.useMemo)((function(){var e=[];return"All projects"in Y&&e.push([{render:function(e){var n=e.columnWidth;return(0,T.jsx)("div",{style:{width:"".concat(n,"px")},children:mn})}}]),"Git directory"in Y&&e.push([{render:function(){return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(j.Z,{p:1,children:(0,T.jsx)(v.Z,{compact:!0,label:"Base branch",onChange:function(e){return N(e.target.value)},ref:n,small:!0,value:I||"",children:null===le||void 0===le?void 0:le.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))})}),en]})}}]),(0,T.jsx)(ue.Z,{columnsOfItems:e,fullHeight:!0,heightOffset:2*we.Mz,uuid:"version-control-all-modified-files",width:P})}),[I,le,mn,P,en,Y]);return(0,T.jsx)(J.Z,{after:vn,afterHeader:xn,afterHidden:i,afterWidth:f,before:yn,beforeHeader:cn,beforeWidth:P,mainContainerHeader:tn,setAfterHidden:l,setAfterWidth:m,setBeforeWidth:_,title:"Version control",uuid:De,children:(0,T.jsxs)(j.Z,{p:B.cd,children:[!ae&&(0,T.jsx)(p.Z,{inverted:!0}),ae&&(0,T.jsxs)(T.Fragment,{children:[R.uuid===(null===W||void 0===W?void 0:W.uuid)&&rn,E.uuid===(null===W||void 0===W?void 0:W.uuid)&&on,A.uuid===(null===W||void 0===W?void 0:W.uuid)&&ln,D.uuid===(null===W||void 0===W?void 0:W.uuid)&&sn]})]})})};function Be(){return(0,T.jsx)(Fe,{})}Be.getInitialProps=(0,r.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var Ne=(0,l.Z)(Be)},75302:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/version-control",function(){return t(37520)}])},80022:function(e,n,t){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,{Z:function(){return r}})},15544:function(e,n,t){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}t.d(n,{Z:function(){return r}})},13692:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(61049);function o(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&(0,r.Z)(e,n)}},93189:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});var r=t(12539),o=t(80022);function i(e,n){if(n&&("object"===r(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}},function(e){e.O(0,[1557,9774,2888,179],(function(){return n=75302,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-01f0843dc6ac4971.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1557],{54750:function(e,n,t){var i=t(82394),r=t(12691),l=t.n(r),o=t(55485),c=t(48670),a=t(44085),s=t(38276),d=t(4190),u=t(30160),h=t(72473),f=t(70515),v=t(28598),p=t(82684);function x(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?x(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.breadcrumbs,t=e.noMarginLeft,i=n.length,r=[];return n.forEach((function(e,n){var x=e.bold,m=e.danger,g=e.label,b=e.linkProps,Z=e.loading,y=e.monospace,C=void 0===y||y,M=e.onClick,F=e.options,O=g();i>=2&&n>=1&&r.push((0,v.jsx)(s.Z,{mx:1,children:(0,v.jsx)(h.ChevronRight,{muted:!0})},"divider-".concat(O)));var H=(0,v.jsx)(u.ZP,{bold:x,danger:m,default:!x,monospace:C,noWrapping:!0,children:O});if((null===F||void 0===F?void 0:F.length)>=1){var w,P,k=null===F||void 0===F?void 0:F.find((function(e){return!!e.selected}));if(k)(w=((null===k||void 0===k||null===(P=k.uuid)||void 0===P?void 0:P.length)||0)*f.ro)&&(w+=3*f.iI,Z&&(w+=2*f.iI));H=(0,v.jsx)(o.ZP,{alignItems:"center",children:(0,v.jsx)(a.Z,{afterIcon:Z?(0,v.jsx)(d.Z,{inverted:!0,small:!0}):null,danger:m,defaultTextColor:!x,maxWidth:w||null,monospace:C,noBackground:!0,noBorder:!0,onChange:function(e){var n,t=e.target.value,i=null===F||void 0===F?void 0:F.find((function(e){return e.uuid===t}));i&&null!==i&&void 0!==i&&i.onClick&&(null===i||void 0===i||null===(n=i.onClick)||void 0===n||n.call(i,t))},paddingHorizontal:0,paddingVertical:0,value:(null===k||void 0===k?void 0:k.uuid)||"",children:null===F||void 0===F?void 0:F.map((function(e){var n=e.label,t=e.selected,i=e.uuid,r=n?null===n||void 0===n?void 0:n():i;return(0,v.jsx)("option",{value:i,children:t?i:r},i)}))})})}var z=(0,v.jsx)(s.Z,{ml:t||0!==n?0:2,children:H},"breadcrumb-".concat(O));b?z=(0,p.createElement)(l(),j(j({},b),{},{key:"breadcrumb-link-".concat(O),passHref:!0}),(0,v.jsx)(c.Z,{block:!0,default:!x,noOutline:!0,sameColorAsText:x,children:z})):M&&(z=(0,v.jsx)(c.Z,{block:!0,default:!x,noOutline:!0,onClick:M,preventDefault:!0,sameColorAsText:x,children:z})),r.push(z)})),(0,v.jsx)(o.ZP,{alignItems:"center",children:r})}},31557:function(e,n,t){t.d(n,{Z:function(){return Ve}});var i=t(21831),r=t(82394),l=t(75582),o=t(12691),c=t.n(o),a=t(25976),s=t(82684),d=t(34376),u=t(40761),h=t(54750),f=t(71180),v=t(39867),p=t(50724),x=t(58036),j=t(97618),m=t(55485),g=t(70374),b=t(56085),Z=t(69864),y=t(70652),C=t(44085),M=t(38276),F=t(4190),O=t(28026),H=t(30160),w=t(35576),P=t(17488),k=t(69650),z=t(35686),_=t(72473),D=t(44897),S=t(42631),I=t(31353),E=t(47041),A=t(70515),L=a.default.div.withConfig({displayName:"GitActionsstyle__HeaderStyle",componentId:"sc-ynrhio-0"})(["border-bottom:1px solid #1B1C20;height:","px;display:flex;flex-direction:row;justify-content:space-between;align-items:center;"],I.Mz),N=a.default.div.withConfig({displayName:"GitActionsstyle__TerminalStyle",componentId:"sc-ynrhio-1"})(["height:calc(75vh - ","px);position:relative;"],I.Mz),B=a.default.div.withConfig({displayName:"GitActionsstyle__PanelStyle",componentId:"sc-ynrhio-2"})(["height:75vh;min-height:300px;width:75vw;backgroundColor:#232429;border-radius:","px;",""],S.n_,(function(e){return"\n background-color: ".concat((e.theme.background||D.Z.background).panel,";\n ")})),T=a.default.div.withConfig({displayName:"GitActionsstyle__OutputStyle",componentId:"sc-ynrhio-3"})([""," padding:","px;height:calc(75vh - ","px);overflow-y:auto;"],E.w5,2*A.iI,I.Mz),U=t(4383),W=t(72619),R=t(86735),G=t(50178),Y=t(28598);function q(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function J(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?q(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):q(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var V={clone:"Clone repository",new_branch:"Create new branch",commit:"Commit & push",pull:"Pull",reset_hard:"Hard reset"};var Q=function(e){var n,t=e.branch,i=(e.fetchBranch,(0,s.useState)()),r=i[0],o=i[1],c=(0,s.useState)(),a=c[0],d=c[1],u=(0,s.useState)(),h=u[0],v=u[1],p=(0,s.useState)(),x=p[0],j=p[1],g=(0,s.useState)(),D=g[0],S=g[1],I=(0,s.useState)(),E=I[0],A=I[1],q=z.ZP.git_custom_branches.list(),Q=q.data,$=q.mutate,K=(0,s.useMemo)((function(){return null===Q||void 0===Q?void 0:Q.git_custom_branches}),[Q]),X=z.ZP.syncs.list().data,ee=(0,s.useMemo)((function(){var e;if(X)return null===(e=X.syncs)||void 0===e?void 0:e[0]}),[X]),ne=(0,Z.Db)(z.ZP.git_branches.useCreate(),{onSuccess:function(e){return(0,W.wD)(e,{callback:function(){$(),window.location.reload()},onErrorCallback:function(e){var n=e.error.exception;S(n)}})}}),te=(0,l.Z)(ne,2),ie=te[0],re=te[1].isLoading,le=(0,Z.Db)((function(){return z.ZP.git_branches.useUpdate(t)({git_branch:{action_type:"status"}})}),{onSuccess:function(e){return(0,W.wD)(e,{onErrorCallback:function(e){var n=e.error.exception;S(n)}})}}),oe=(0,l.Z)(le,1)[0],ce=(0,Z.Db)(z.ZP.git_branches.useUpdate(t),{onSuccess:function(e){return(0,W.wD)(e,{callback:function(){S(null),j("DONE")},onErrorCallback:function(e){var n=e.error.exception;S(n)}})}}),ae=(0,l.Z)(ce,2),se=ae[0],de=ae[1].isLoading,ue=(0,Z.Db)(z.ZP.git_branches.useUpdate(t),{onSuccess:function(e){return(0,W.wD)(e,{callback:function(){S(null),window.location.reload()},onErrorCallback:function(e){var n=e.error.exception;S(n)}})}}),he=(0,l.Z)(ue,2),fe=he[0],ve=he[1].isLoading,pe=(0,s.useState)(),xe=pe[0],je=pe[1],me=(0,s.useState)([]),ge=me[0],be=me[1],Ze=(0,s.useState)([]),ye=Ze[0],Ce=Ze[1],Me=(0,s.useCallback)((function(){oe().then((function(e){var n=e.data,t=null===n||void 0===n?void 0:n.git_branch,i=null===t||void 0===t?void 0:t.status,r=null===t||void 0===t?void 0:t.modified_files,l=null===t||void 0===t?void 0:t.untracked_files;je(i),be(l),Ce(r)}))}),[oe]),Fe=(0,s.useMemo)((function(){return re||de||ve}),[re,de,ve]);(0,s.useEffect)((function(){return Me()}),[h,Me]);var Oe=(0,s.useMemo)((function(){return(0,G.PR)()||{}}),[]),He=(0,s.useMemo)((function(){var e={term_name:null!==Oe&&void 0!==Oe&&Oe.id?"git_".concat(null===Oe||void 0===Oe?void 0:Oe.id):"git"};return null!==ee&&void 0!==ee&&ee.repo_path&&(e.cwd=null===ee||void 0===ee?void 0:ee.repo_path),e}),[null===ee||void 0===ee?void 0:ee.repo_path,Oe]),we=(0,b.ZP)((0,U.Ib)("terminal"),{shouldReconnect:function(){return!0}},"cwd"in He),Pe=we.lastMessage,ke=we.sendMessage,ze=(0,s.useCallback)((function(e){return(0,Y.jsx)(y.Z,{checked:((null===r||void 0===r?void 0:r.files)||[]).includes(e),label:(0,Y.jsx)(H.ZP,{small:!0,children:e}),onClick:function(){o((function(n){var t=(null===n||void 0===n?void 0:n.files)||[];return t=t.includes(e)?(0,R.Od)(t,(function(n){return n===e})):[e].concat(t),J(J({},n),{},{files:t})}))},small:!0},e)}),[r]),_e=(0,s.useMemo)((function(){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(f.ZP,{onClick:function(){return o((function(e){return J(J({},e),{},{files:ye.concat(ge)})}))},children:"Include all changes"}),ye&&ye.length>0&&(0,Y.jsxs)(M.Z,{mb:1,children:[(0,Y.jsx)(M.Z,{my:1,children:(0,Y.jsx)(H.ZP,{children:"Modified files"})}),ye.map(ze)]}),ge&&ge.length>0&&(0,Y.jsxs)(M.Z,{mb:1,children:[(0,Y.jsx)(M.Z,{my:1,children:(0,Y.jsx)(H.ZP,{children:"Untracked files"})}),ge.map(ze)]})]})}),[ze,ye,ge]),De=(0,s.useMemo)((function(){return(0,Y.jsx)(M.Z,{p:2,children:Fe?(0,Y.jsx)(F.Z,{color:"white"}):(0,Y.jsxs)(Y.Fragment,{children:["commit"===h&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(w.Z,{compact:!0,fullWidth:!0,label:"Commit message",monospace:!0,onChange:function(e){return o((function(n){return J(J({},n),{},{message:e.target.value})}))},required:!0,value:null===r||void 0===r?void 0:r.message}),(0,Y.jsx)(M.Z,{mt:1}),(0,Y.jsxs)(m.ZP,{children:[(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){se({git_branch:J({action_type:"commit"},r)}).then((function(){Me(),o(null)}))},success:!0,children:"Commit"}),(0,Y.jsx)(M.Z,{mr:1}),(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){se({git_branch:{action_type:"push"}})},primary:!0,children:"Push"})]})]}),"new_branch"===h&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(P.Z,{compact:!0,fullWidth:!0,label:"Branch name",monospace:!0,onChange:function(e){return o({name:e.target.value})},value:null===r||void 0===r?void 0:r.name}),(0,Y.jsx)(M.Z,{mt:1}),(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){ie({git_branch:r})},primary:!0,children:"Create"})]}),"clone"===h&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(H.ZP,{children:["Clone from ",(0,Y.jsx)(H.ZP,{default:!0,inline:!0,children:null===ee||void 0===ee?void 0:ee.remote_repo_link})," to ",(0,Y.jsx)(H.ZP,{default:!0,inline:!0,children:null===ee||void 0===ee?void 0:ee.repo_path}),". This ",(0,Y.jsx)(H.ZP,{danger:!0,inline:!0,children:"will overwrite"})," any existing data in the local repository."]}),(0,Y.jsx)(M.Z,{mt:1}),(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){fe({git_branch:{action_type:"clone"}})},primary:!0,children:"Clone"})]}),"pull"===h&&(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){fe({git_branch:{action_type:"pull"}})},primary:!0,children:"Pull"}),"reset_hard"===h&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(M.Z,{mb:1,children:(0,Y.jsx)(H.ZP,{children:a||"This will reset your local branch to match the remote branch."})}),a?(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){d(null),fe({git_branch:{action_type:"reset"}})},warning:!0,children:"Confirm"}):(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){return d("Are you sure you want to reset your branch? Your local changes may be erased.")},primary:!0,children:"Reset branch"})]}),(0,Y.jsx)(M.Z,{mt:1,children:!Fe&&(0,Y.jsxs)(Y.Fragment,{children:[!D&&x&&(0,Y.jsx)(H.ZP,{children:x}),D&&(0,Y.jsx)(H.ZP,{preWrap:!0,danger:!0,children:D})]})})]})})}),[Fe,h,D,ee,x,r,a,xe]),Se=(0,s.useMemo)((function(){return(0,Y.jsx)(O.Z,{lastMessage:Pe,sendMessage:ke})}),[Pe,ke]);return(0,Y.jsxs)(B,{children:[(0,Y.jsxs)(L,{children:[(0,Y.jsx)(M.Z,{m:2,children:(0,Y.jsxs)(m.ZP,{children:[(0,Y.jsx)(C.Z,{beforeIcon:(0,Y.jsx)(_.Branch,{}),compact:!0,onChange:function(e){e.preventDefault(),ie({git_branch:{name:e.target.value}})},placeholder:"Select a branch",value:t,children:null===K||void 0===K?void 0:K.map((function(e){var n=e.name;return(0,Y.jsx)("option",{value:n,children:n},n)}))},"select_branch"),(0,Y.jsx)(M.Z,{ml:2}),(0,Y.jsxs)(C.Z,{compact:!0,onChange:function(e){e.preventDefault(),v(e.target.value),A(!1),j(null),o(null)},value:h,children:[(0,Y.jsx)("option",{value:"",children:"Select an action"}),Object.entries(V).map((function(e){var n=(0,l.Z)(e,2),t=n[0],i=n[1];return(0,Y.jsx)("option",{value:t,children:i},t)}))]},"select_git_action")]})}),(0,Y.jsx)(M.Z,{m:2,children:(0,Y.jsxs)(m.ZP,{alignItems:"center",children:[(0,Y.jsx)(H.ZP,{children:"UI"}),(0,Y.jsx)(M.Z,{ml:1}),(0,Y.jsx)(k.Z,{checked:!!E,monotone:!0,onCheck:function(){return A((function(e){return!e}))}}),(0,Y.jsx)(M.Z,{ml:1}),(0,Y.jsx)(H.ZP,{children:"Terminal"})]})})]}),(0,Y.jsxs)(m.ZP,{children:[(0,Y.jsx)("div",{style:{width:"50%"},children:(0,Y.jsx)(T,{children:"commit"===h?_e:(0,Y.jsx)(Y.Fragment,{children:null===xe||void 0===xe||null===(n=xe.split("\\n"))||void 0===n?void 0:n.map((function(e){return(0,Y.jsx)(H.ZP,{monospace:!0,preWrap:!0,small:!0,children:e},e)}))})})}),(0,Y.jsx)("div",{style:{width:"50%"},children:E?(0,Y.jsx)(N,{children:Se}):De})]})]})},$=t(65186),K=t(68562),X=t(81106),ee=t(65927),ne=t(48670),te=t(63637),ie=t(89515),re=t(82359),le=t(26304),oe="12px 20px",ce="1px",ae=(0,a.default)(f.ZP).withConfig({displayName:"indexstyle__ButtonStyle",componentId:"sc-hssntx-0"})(["",";"],(function(e){return e.active&&"\n background-color: ".concat((e.theme.background||D.Z.background).dashboard,";\n ")})),se=a.default.div.withConfig({displayName:"indexstyle__DropdownContainerStyle",componentId:"sc-hssntx-1"})(["position:absolute;top:",";right:0;width:","px;display:flex;flex-direction:column;gap:",";overflow:hidden;background-color:",";border-radius:","px;border:1px solid ",";"],(function(e){return e.top||0}),45*A.iI,ce,(function(e){return(e.theme.borders||D.Z.borders).darkLight}),S.n_,(function(e){return(e.theme.borders||D.Z.borders).darkLight})),de=a.default.div.withConfig({displayName:"indexstyle__DropdownHeaderStyle",componentId:"sc-hssntx-2"})(["padding:",";background-color:",";"],oe,(function(e){return(e.theme.background||D.Z.background).panel})),ue=a.default.div.withConfig({displayName:"indexstyle__TimeListContainerStyle",componentId:"sc-hssntx-3"})(["height:","px;display:flex;gap:",";"],20*A.iI,ce),he=a.default.div.withConfig({displayName:"indexstyle__TimeColumnStyle",componentId:"sc-hssntx-4"})(["display:flex;flex-direction:column;align-items:center;flex:1;gap:",";"],ce),fe=a.default.div.withConfig({displayName:"indexstyle__DropdownCellStyle",componentId:"sc-hssntx-5"})(["width:100%;padding:",";display:flex;flex-direction:",";flex-grow:",";justify-content:center;align-items:center;background-color:",";"],oe,(function(e){return e.flexDirection||"unset"}),(function(e){return e.flexGrow||"unset"}),(function(e){return(e.theme.background||D.Z.background).dashboard})),ve=a.default.div.withConfig({displayName:"indexstyle__ToggleGroupStyle",componentId:"sc-hssntx-6"})(["display:flex;flex-direction:column;"]),pe=(0,a.default)(fe).withConfig({displayName:"indexstyle__ToggleDropdownCellStyle",componentId:"sc-hssntx-7"})(["justify-content:flex-start;gap:12px;padding-right:","px;"],1.25*A.iI),xe=["active","mountedCallback","time","timeZone"];function je(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function me(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?je(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):je(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function ge(e){var n=e.active,t=e.mountedCallback,i=e.time,r=e.timeZone,l=(0,le.Z)(e,xe),o=(0,s.useRef)(null);return(0,s.useEffect)((function(){null!==o&&void 0!==o&&o.current&&t(o.current.offsetHeight)}),[t]),(0,Y.jsx)(ae,me(me({},l),{},{active:n,borderLess:!0,borderRadius:"".concat(S.BG,"px"),compact:!0,highlightOnHoverAlt:!0,ref:o,transparent:!0,children:(0,Y.jsx)(H.ZP,{inline:!0,monospace:!0,noWrapping:!0,small:!0,children:"".concat(i," ").concat(r)})}))}var be=(0,s.memo)(ge),Ze=t(12468),ye=t(63055),Ce=t(72191),Me=t(70320),Fe=t(79633),Oe=t(3917),He=t(78419),we=t(53808);var Pe=t(23780);function ke(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function ze(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ke(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ke(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var _e=[Oe.Oh.UTC,Oe.Oh.LOCAL];var De=function(e){var n=e.projectName,t=(0,s.useState)((0,Me.qB)()),i=t[0],o=t[1],c=(0,s.useState)((0,we.U2)(He.kL,!1)),a=c[0],d=c[1],u=(0,s.useState)(!1),h=u[0],f=u[1],v=(0,s.useState)((0,Oe.e)({includeSeconds:!0,timeZones:_e})),x=v[0],j=v[1],m=(0,s.useState)(0),g=m[0],b=m[1],y=i?Oe.Oh.LOCAL:Oe.Oh.UTC,C=window.innerWidth<ye.nc,M=(0,Pe.VI)(null,{},[],{uuid:"components/ServerTimeDropdown"}),F=(0,l.Z)(M,1)[0],O=(0,Z.Db)(z.ZP.projects.useUpdate(n),{onSuccess:function(e){return(0,W.wD)(e,{onErrorCallback:function(e,n){return F({errors:n,response:e})}})}}),w=(0,l.Z)(O,1)[0],P=(0,s.useCallback)((function(){f((function(e){return!e}))}),[]),_=(0,s.useCallback)((function(e){b(e)}),[]),D=(0,s.useCallback)((function(){var e=(0,Oe.e)({includeSeconds:a,timeZones:_e});j((function(n){return n.size===e.size&&n.get(Oe.Oh.UTC)===e.get(Oe.Oh.UTC)?n:e}))}),[a]),S=[{checked:i,label:"Display local timezone (requires refresh)",onCheck:function(){var e=!i;o((0,Me.hY)(e)),w({project:{features:(0,r.Z)({},re.d.LOCAL_TIMEZONE,e)}})},uuid:re.d.LOCAL_TIMEZONE},{checked:a,label:"Include seconds in current time",onCheck:function(){var e;d((e=!a,!!(0,we.uN)(He.kL,e)))},uuid:"current_time_seconds"}];return(0,s.useEffect)((function(){var e=setInterval((function(){D()}),1e3);return function(){return clearInterval(e)}}),[D]),(0,s.useEffect)((function(){D()}),[a,D]),x?(0,Y.jsx)(p.Z,{onClickOutside:function(){return f(!1)},open:!0,children:(0,Y.jsxs)("div",{style:{position:"relative"},children:[(0,Y.jsx)(be,{active:h,disabled:C,mountedCallback:_,onClick:P,time:x.get(y),timeZone:(0,Oe.WT)(y)}),!C&&h&&(0,Y.jsxs)(se,{top:g,children:[(0,Y.jsx)(de,{children:(0,Y.jsx)(H.ZP,{bold:!0,muted:!0,uppercase:!0,children:"Current Time"})}),(0,Y.jsx)(ue,{children:_e.map((function(e){return(0,Y.jsxs)(he,{children:[(0,Y.jsx)(fe,{children:(0,Y.jsx)(H.ZP,{bold:!0,center:!0,muted:!0,uppercase:!0,children:"".concat(e).concat(e===Oe.Oh.LOCAL?" - ".concat((0,Oe.WT)(e)):"")})}),(0,Y.jsxs)(fe,{flexDirection:"column",flexGrow:3,children:[(0,Y.jsx)(H.ZP,{bold:!0,center:!0,color:Fe.J$,largeLg:!0,children:x.get(e)}),(0,Y.jsx)(H.ZP,{center:!0,muted:!0,small:!0,children:e===Oe.Oh.UTC?"Universal Time":Oe.mi[e]})]})]},e)}))}),(0,Y.jsx)(ve,{children:S.map((function(e){return(0,Y.jsxs)(pe,{children:[(0,Y.jsx)(k.Z,{checked:e.checked,compact:!0,onCheck:e.onCheck,purpleBackground:!0}),(0,Y.jsx)(H.ZP,{children:e.label}),e.uuid===re.d.LOCAL_TIMEZONE&&(0,Y.jsx)(Ze.Z,ze(ze({},Me.EB),{},{appearAbove:!0,appearBefore:!0,size:Ce.bL}))]},e.label)}))})]})]})}):null},Se=t(58401),Ie=t(59457),Ee=t(77417),Ae=t(46684),Le=t(16682),Ne=t(68804),Be=a.default.div.withConfig({displayName:"indexstyle__LinkStyle",componentId:"sc-y3uzxv-0"})(["padding:","px ","px;&:hover{cursor:pointer;","}",""],.5*A.iI,1.5*A.iI,(function(e){return"\n background-color: ".concat((e.theme.interactive||D.Z.interactive).hoverBackground,";\n ")}),(function(e){return e.highlighted&&"\n background-color: ".concat((e.theme.interactive||D.Z.interactive).hoverBackground,";\n ")})),Te=t(95363),Ue=t(74445),We=t(66472),Re=t(95924),Ge=t(69419),Ye=t(89538);function qe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function Je(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?qe(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ve=function(e){var n,t,o=e.breadcrumbs,b=e.menuItems,Z=e.project,y=e.version,C=(0,Pe.VI)(null,{},[],{uuid:"shared/Header"}),F=(0,l.Z)(C,1)[0],O=(0,s.useContext)(a.ThemeContext),w=(0,G.PR)(),P=(0,s.useState)(null),k=P[0],D=P[1],S=(0,s.useState)(!1),I=S[0],E=S[1],L=(0,s.useState)(!1),N=L[0],B=L[1],T=(0,s.useState)(null),U=T[0],W=T[1],R=(0,s.useState)(!1),q=R[0],J=R[1],V=(0,s.useState)(null),le=V[0],oe=V[1],ce=(0,s.useRef)(null),ae=(0,s.useRef)(null),se=(0,s.useRef)(null),de=(0,d.useRouter)(),ue=u.Z.isLoggedIn(),he=(0,Ie.Z)(z.ZP.git_branches.detail,"test",{_format:"with_basic_details"},{revalidateOnFocus:!1},{pauseFetch:(0,G.YB)()&&!ue},{delay:11e3}),fe=he.data,ve=he.mutate,pe=(0,s.useMemo)((function(){return(null===fe||void 0===fe?void 0:fe.git_branch)||{}}),[fe]),xe=pe.is_git_integration_enabled,je=pe.name,me=(0,Se.Z)().design,ge=(0,Ee.Z)(),be=ge.featureEnabled,Ze=ge.featureUUIDs,ye=ge.isLoadingUpdate,Ce=ge.project,Me=ge.rootProject,Oe=ge.updateProject,He=(0,s.useMemo)((function(){return Z||Ce}),[Ce,Z]),we=(0,s.useMemo)((function(){return y||(null===He||void 0===He?void 0:He.version)}),[He,y]),ke=(0,s.useMemo)((function(){return Le.WH.CLOSED===k||Le.WH.OPEN===k||(null===be||void 0===be?void 0:be(null===Ze||void 0===Ze?void 0:Ze.COMMAND_CENTER))}),[k,be,Ze]);ae.current=He;var ze=(0,s.useCallback)((function(){ke?(0,We.WJ)():(E(!0),Oe({features:Je(Je({},(null===He||void 0===He?void 0:He.features)||{}),{},(0,r.Z)({},null===Ze||void 0===Ze?void 0:Ze.COMMAND_CENTER,!0))}).then((function(e){var n;if(null!==e&&void 0!==e&&null!==(n=e.data)&&void 0!==n&&n.error){var t;E(!1),F({errors:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.error,response:e})}else{var i=new CustomEvent(Ne.YS.COMMAND_CENTER_ENABLED);window.dispatchEvent(i)}})))}),[ke,null===Ze||void 0===Ze?void 0:Ze.COMMAND_CENTER,null===He||void 0===He?void 0:He.features,F,Oe]),_e=[];if(Me&&_e.push({label:function(){return null===Me||void 0===Me?void 0:Me.name},linkProps:{href:"/"}}),He){var qe={label:function(){return null===He||void 0===He?void 0:He.name}};Me?(qe.loading=ye&&!I,qe.options=Object.keys((null===Me||void 0===Me?void 0:Me.projects)||{}).map((function(e){return{onClick:function(){Oe({activate_project:e}).then((function(e){var n,t;null!==e&&void 0!==e&&null!==(n=e.data)&&void 0!==n&&n.error?F({errors:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.error,response:e}):window.location.reload()}))},selected:e===(null===He||void 0===He?void 0:He.name),uuid:e}}))):qe.linkProps={href:"/"},_e.push(qe)}var Ve=(0,s.useMemo)((function(){return[].concat(_e,(0,i.Z)(o||[]))}),[_e,o,He]),Qe=de.query.pipeline,$e=(He||{}).latest_version,Ke=(0,s.useState)(null),Xe=Ke[0],en=Ke[1],nn=((0,s.useMemo)((function(){var e,n,t=null===me||void 0===me||null===(e=me.components)||void 0===e||null===(n=e.header)||void 0===n?void 0:n.media;if(t){var i=new Image,r=(null===t||void 0===t?void 0:t.url)||(null===t||void 0===t?void 0:t.file_path);if("undefined"!==typeof r&&null!==r)return i.src=r,i.onload=function(){en(i)},i}}),[me,en]),(0,s.useMemo)((function(){var e,n,t=Ae.y7,i=(0,Y.jsx)($.Z,{height:Ae.y7});if(null!==me&&void 0!==me&&null!==(e=me.components)&&void 0!==e&&null!==(n=e.header)&&void 0!==n&&n.media){var r,l,o=null===me||void 0===me||null===(r=me.components)||void 0===r||null===(l=r.header)||void 0===l?void 0:l.media;if(null!==Xe){var a=((null===Xe||void 0===Xe?void 0:Xe.width)||1)/((null===Xe||void 0===Xe?void 0:Xe.height)||1);t=Ae.sQ,i=(0,Y.jsx)(Ae.XD,{height:Ae.sQ,width:Ae.sQ*a,url:(null===o||void 0===o?void 0:o.url)||(null===o||void 0===o?void 0:o.file_path)})}}return(0,Y.jsx)(c(),{as:"/",href:"/",passHref:!0,children:(0,Y.jsx)(ne.Z,{block:!0,height:t,noHoverUnderline:!0,noOutline:!0,children:i})})}),[Xe,me])),tn=[{label:function(){return"Settings"},linkProps:{href:"/settings/workspace/preferences"},uuid:"user_settings"},{label:function(){return"Launch command center"},onClick:function(e){(0,Re.j)(e),ze()},uuid:"Launch command center"}];(0,G.YB)()&&tn.push({label:function(){return"Sign out"},onClick:function(){u.Z.logout((function(){z.ZP.sessions.updateAsyncServer(null,1).then((function(){(0,Ge.nL)("/sign-in")})).catch((function(){(0,Ge.nL)("/")}))}))},uuid:"sign_out"});var rn=(0,Ye.dd)((function(){return(0,Y.jsx)(Q,{branch:je,fetchBranch:ve})}),{},[je,ve],{background:!0,uuid:"git_actions"}),ln=(0,l.Z)(rn,2),on=ln[0],cn=(ln[1],(0,s.useMemo)((function(){return(null===je||void 0===je?void 0:je.length)>=21?"".concat(je.slice(0,21),"..."):je}),[je])),an=(0,s.useMemo)((function(){return!(!w||null===w||void 0===w||!w.avatar)&&!/[A-Za-z0-9]+/.exec((null===w||void 0===w?void 0:w.avatar)||"")}),[w]),sn=(0,s.useMemo)((function(){return!(!w||null===w||void 0===w||!w.avatar)&&!!/[A-Za-z0-9]+/.exec((null===w||void 0===w?void 0:w.avatar)||"")}),[w]),dn=(0,s.useMemo)((function(){var e;if(!w||null===w||void 0===w||!w.avatar)return(0,Y.jsx)(te.Z,{});var n={color:null===O||void 0===O||null===(e=O.content)||void 0===e?void 0:e.active,fontFamily:Te.v$};return sn?(n.fontSize=2*A.iI,n.lineHeight="".concat(2*A.iI,"px"),n.position="relative",n.top=1):n.fontSize=3*A.iI,(0,Y.jsx)("div",{style:n,children:null===w||void 0===w?void 0:w.avatar})}),[sn,w]);return(0,s.useEffect)((function(){var e=function(e){var n,t,i=e.detail;null!==i&&void 0!==i&&i.state&&(D(null===i||void 0===i?void 0:i.state),Le.WH.MOUNTED===(null===i||void 0===i?void 0:i.state)&&(null!==ae&&void 0!==ae&&null!==(n=ae.current)&&void 0!==n&&null!==(t=n.features)&&void 0!==t&&t[re.d.COMMAND_CENTER]||setTimeout((function(){(0,We.WJ)(),E(!1)}),1)))};return window.addEventListener(Ne.Mt,e),function(){window.removeEventListener(Ne.Mt,e)}}),[]),(0,Y.jsx)(Ae.I5,{children:(0,Y.jsx)(x.Z,{children:(0,Y.jsxs)(m.ZP,{alignItems:"center",fullHeight:!0,justifyContent:"space-between",children:[(0,Y.jsxs)(j.Z,{alignItems:"center",children:[nn,(0,Y.jsx)(h.Z,{breadcrumbs:Ve})]}),!!He&&(0,Y.jsxs)(j.Z,{flex:1,alignItems:"center",justifyContent:"center",children:[(0,Y.jsx)(M.Z,{ml:A.cd}),(0,Y.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(e){(0,Re.j)(e),ze()},children:(0,Y.jsx)(Ae._m,{active:Le.WH.OPEN===k,children:(0,Y.jsxs)(m.ZP,{alignItems:"center",children:[(0,Y.jsx)(Y.Fragment,{children:Le.WH.OPEN===k?(0,Y.jsx)(_.UFO,{muted:!0,size:2*A.iI}):(0,Y.jsx)(_.Planet,{size:2*A.iI,success:!I&&!ke,warning:I})}),(0,Y.jsx)("div",{style:{marginRight:1.5*A.iI}}),Le.WH.OPEN!==k&&(0,Y.jsx)(H.ZP,{default:!0,noWrapping:!0,weightStyle:4,children:ke?"Command Center":I?"Launching Command Center":"Launch Command Center"}),Le.WH.OPEN===k&&(0,Y.jsx)(H.ZP,{muted:!0,noWrapping:!0,children:"Command Center launched"}),I&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)("div",{style:{marginRight:1.5*A.iI}}),(0,Y.jsx)(ee.Z,{color:null===O||void 0===O||null===(n=O.accent)||void 0===n?void 0:n.warning,loadingStyle:ee.F.BLOCKS,width:1.5*A.iI})]}),ke&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)("div",{style:{marginRight:1.5*A.iI}}),(0,Y.jsx)(X.Z,{compact:!0,settings:(0,Ue.MK)(),small:!0})]})]})})}),(0,Y.jsx)(M.Z,{mr:A.cd})]}),(0,Y.jsxs)(j.Z,{alignItems:"center",children:[xe&&je&&(0,Y.jsx)(M.Z,{mr:1,children:(0,Y.jsx)(K.ZP,{compact:!0,highlightOnHoverAlt:!0,noBackground:!0,noHoverUnderline:!0,onClick:on,sameColorAsText:!0,title:je,uuid:"Header/GitActions",children:(0,Y.jsxs)(m.ZP,{alignItems:"center",children:[(0,Y.jsx)(_.BranchAlt,{size:1.5*A.iI}),(0,Y.jsx)(M.Z,{ml:1}),(0,Y.jsx)(H.ZP,{monospace:!0,noWrapping:!0,small:!0,children:cn})]})})}),$e&&we&&$e!==we&&(0,Y.jsx)(f.ZP,{backgroundColor:Fe.$R,borderLess:!0,compact:!0,linkProps:{href:"https://docs.mage.ai/about/releases"},noHoverUnderline:!0,pill:!0,sameColorAsText:!0,target:"_blank",title:"Update to version ".concat($e),children:(0,Y.jsx)(H.ZP,{black:!0,bold:!0,children:"Update"})}),we&&"undefined"!==typeof we&&(0,Y.jsx)(M.Z,{px:1,children:(0,Y.jsx)(ne.Z,{href:"https://www.mage.ai/changelog",monospace:!0,noWrapping:!0,openNewWindow:!0,sameColorAsText:!0,small:!0,children:"v".concat(we)})}),(0,Y.jsx)(M.Z,{ml:1,children:(0,Y.jsx)(De,{projectName:null===He||void 0===He?void 0:He.name})}),(0,Y.jsx)(M.Z,{ml:1,children:(0,Y.jsx)(K.ZP,{beforeElement:(0,Y.jsx)(_.Slack,{}),compact:!0,highlightOnHoverAlt:!0,inline:!0,linkProps:{as:"https://www.mage.ai/chat",href:"https://www.mage.ai/chat"},noBackground:!0,noHoverUnderline:!0,openNewTab:!0,sameColorAsText:!0,uuid:"Header/live_chat",children:"Live help"})}),b&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(M.Z,{ml:2}),(0,Y.jsx)(p.Z,{onClickOutside:function(){return W(null)},open:!0,style:{position:"relative"},children:(0,Y.jsxs)(m.ZP,{children:[(0,Y.jsx)(Be,{highlighted:0===U,onClick:function(){return W((function(e){return 0===e?null:0}))},onMouseEnter:function(){return W((function(e){return null!==e?0:null}))},ref:ce,children:(0,Y.jsx)(H.ZP,{children:"Menu"})}),(0,Y.jsx)(g.Z,{alternateBackground:!0,items:b,onClickCallback:function(){return W(null)},open:0===U,parentRef:ce,rightOffset:0,setConfirmationAction:oe,setConfirmationDialogueOpen:J,uuid:"PipelineDetail/Header/menu"})]})}),(0,Y.jsx)(p.Z,{onClickOutside:function(){return J(!1)},open:q,children:(0,Y.jsx)(ie.Z,{danger:!0,onCancel:function(){return J(!1)},onClick:le,right:16*A.iI,subtitle:"This is irreversible and will immediately delete everything associated with the pipeline, including its blocks, triggers, runs, logs, and history.",title:"Are you sure you want to delete the pipeline ".concat(Qe,"?"),width:40*A.iI})})]}),(ue||!(0,G.YB)())&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(M.Z,{ml:1}),(0,Y.jsx)(p.Z,{onClickOutside:function(){return B(!1)},open:!0,style:{position:"relative"},children:(0,Y.jsxs)(m.ZP,{alignItems:"flex-end",flexDirection:"column",children:[(0,Y.jsx)(K.ZP,{compact:!0,highlightOnHoverAlt:!0,inline:!0,noBackground:!0,noHoverUnderline:!0,onClick:function(){return B(!0)},ref:se,uuid:"Header/menu",children:an&&(null===w||void 0===w||null===(t=w.avatar)||void 0===t?void 0:t.length)>=2?dn:(0,Y.jsx)(v.Z,{color:Fe.Jm,size:4*A.iI,children:dn})}),(0,Y.jsx)(g.Z,{alternateBackground:!0,items:tn,onClickCallback:function(){return B(!1)},open:N,parentRef:se,rightOffset:0,uuid:"shared/Header/user_menu"})]})})]})]})]})})})}},63637:function(e,n,t){var i=t(25976),r=t(28598),l=i.default.svg.withConfig({displayName:"Mage8Bit__SVGStyle",componentId:"sc-cj6ltf-0"})([""]);n.Z=function(e){var n=e.size,t=void 0===n?20:n,i=e.viewBox,o=void 0===i?"0 0 20 20":i;return(0,r.jsxs)(l,{height:t,viewBox:o,width:t,children:[(0,r.jsxs)("g",{clipPath:"url(#clip0_297_42814)",children:[(0,r.jsx)("path",{d:"M13.334 0h1.66667v1.66667H13.334zM11.666 1.6665h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M10 1.6665h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M8.33398 1.6665h1.66667v1.66667H8.33398z",fill:"#AF93FF"}),(0,r.jsx)("path",{d:"M8.33398 3.3335h1.66667v1.66667H8.33398z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 3.3335h1.66667v1.66667H6.66602z",fill:"#AF93FF"}),(0,r.jsx)("path",{d:"M3.33398 5h1.66667v1.66667H3.33398z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M5 5h1.66667v1.66667H5z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 5h1.66667v1.66667H6.66602z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 5h1.66667v1.66667H6.66602z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 8.3335h1.66667v1.66667H6.66602z",fill:"#000"}),(0,r.jsx)("path",{d:"M6.66602 6.6665h1.66667v1.66667H6.66602z",fill:"#AD8FFF"}),(0,r.jsx)("path",{d:"M6.66602 10h1.66667v1.66667H6.66602z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M8.33398 6.6665h1.66667v1.66667H8.33398z",fill:"#AD8FFF"}),(0,r.jsx)("path",{d:"M1.66602 13.3335h1.66667v1.66667H1.66602z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M1.66602 11.6665h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,r.jsx)("path",{d:"M1.66602 10h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,r.jsx)("path",{d:"M1.66602 8.3335h1.66667v1.66667H1.66602zM1.66602 6.6665h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,r.jsx)("path",{d:"M1.66602 6.6665h1.66667v1.66667H1.66602zM0 0h1.66667v1.66667H0zM3.33398 1.6665h1.66667v1.66667H3.33398zM0 3.3335h1.66667v1.66667H0z",fill:"#2ECDF7"}),(0,r.jsx)("path",{d:"M1.66602 16.6665h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,r.jsx)("path",{d:"M1.66602 16.6665h1.66667v1.66667H1.66602zM1.66602 18.3335h1.66667v1.66667H1.66602z",fill:"#FFCC19"}),(0,r.jsx)("path",{d:"M1.66602 15h1.66667v1.66667H1.66602zM3.33398 15h1.66667v1.66667H3.33398z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M3.33398 16.6665h1.66667v1.66667H3.33398z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M3.33398 13.3335h1.66667v1.66667H3.33398z",fill:"#AD8FFF"}),(0,r.jsx)("path",{d:"M8.33398 8.3335h1.66667v1.66667H8.33398z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M10 6.6665h1.66667v1.66667H10z",fill:"#AD8FFF"}),(0,r.jsx)("path",{d:"M10 10h1.66667v1.66667H10z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M11.666 6.6665h1.66667v1.66667H11.666z",fill:"#AD8FFF"}),(0,r.jsx)("path",{d:"M11.666 8.3335h1.66667v1.66667H11.666z",fill:"#C9B6FF"}),(0,r.jsx)("path",{d:"M8.33398 10h1.66667v1.66667H8.33398z",fill:"#FF8DA9"}),(0,r.jsx)("path",{d:"M8.33398 11.6665h1.66667v1.66667H8.33398z",fill:"#FF8DA9"}),(0,r.jsx)("path",{d:"M6.66602 11.6665h1.66667v1.66667H6.66602z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M6.66602 11.6665h1.66667v1.66667H6.66602z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M5 10h1.66667v1.66667H5z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M5 8.3335h1.66667v1.66667H5z",fill:"#232429"}),(0,r.jsx)("path",{d:"M8.33398 11.6665h1.66667v1.66667H8.33398zM8.33398 13.3335h1.66667v1.66667H8.33398z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M10 11.6665h1.66667v1.66667H10z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M11.666 10h1.66667v1.66667H11.666zM13.334 6.6665h1.66667v1.66667H13.334zM13.334 8.3335h1.66667v1.66667H13.334z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M15 8.3335h1.66667v1.66667H15z",fill:"#757575"}),(0,r.jsx)("path",{d:"M15 10h1.66667v1.66667H15z",fill:"#D9D9D9"}),(0,r.jsx)("path",{d:"M10 8.3335h1.66667v1.66667H10z",fill:"#000"}),(0,r.jsx)("path",{d:"M8.33398 5h1.66667v1.66667H8.33398zM11.666 5h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M13.334 10h1.66667v1.66667H13.334zM11.666 11.6665h1.66667v1.66667H11.666zM10 13.3335h1.66667v1.66667H10z",fill:"#501FD8"}),(0,r.jsx)("path",{d:"M8.33398 15h1.66667v1.66667H8.33398zM6.66602 13.3335h1.66667v1.66667H6.66602zM15 11.6665h1.66667v1.66667H15z",fill:"#501FD8"}),(0,r.jsx)("path",{d:"M16.666 11.6665h1.66667v1.66667H16.666zM16.666 13.3335h1.66667v1.66667H16.666z",fill:"#501FD8"}),(0,r.jsx)("path",{d:"M15 13.3335h1.66667v1.66667H15z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M13.334 13.3335h1.66667v1.66667H13.334zM13.334 11.6665h1.66667v1.66667H13.334zM11.666 13.3335h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M11.666 15h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M10 15h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M8.33398 16.6665h1.66667v1.66667H8.33398z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 15h1.66667v1.66667H6.66602z",fill:"#AF93FF"}),(0,r.jsx)("path",{d:"M6.66602 16.6665h1.66667v1.66667H6.66602z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M5 16.6665h1.66667v1.66667H5z",fill:"#AF93FF"}),(0,r.jsx)("path",{d:"M5 18.3335h1.66667v1.66667H5z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M6.66602 18.3335h1.66667v1.66667H6.66602zM8.33398 18.3335h1.66667v1.66667H8.33398z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M10 18.3335h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M11.666 18.3335h1.66667v1.66667H11.666zM13.334 18.3335h1.66667v1.66667H13.334z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M15 18.3335h1.66667v1.66667H15z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M16.666 18.3335h1.66667v1.66667H16.666z",fill:"#652EFF"}),(0,r.jsx)("path",{d:"M3.33398 18.3335h1.66667v1.66667H3.33398zM10 16.6665h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M11.666 16.6665h1.66667v1.66667H11.666zM13.334 15h1.66667v1.66667H13.334z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M13.334 16.6665h1.66667v1.66667H13.334z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M15 16.6665h1.66667v1.66667H15z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M15 15h1.66667v1.66667H15z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M16.666 15h1.66667v1.66667H16.666zM18.334 16.6665h1.66667v1.66667H18.334zM18.334 18.3335h1.66667v1.66667H18.334z",fill:"#501FD8"}),(0,r.jsx)("path",{d:"M16.666 16.6665h1.66667v1.66667H16.666z",fill:"#652EFF"}),(0,r.jsx)("path",{d:"M13.334 5h1.66667v1.66667H13.334z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M15 5h1.66667v1.66667H15zM10 5h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M10 3.3335h1.66667v1.66667H10z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M11.666 3.3335h1.66667v1.66667H11.666z",fill:"#7949FF"}),(0,r.jsx)("path",{d:"M11.666 0h1.66667v1.66667H11.666z",fill:"#AF93FF"})]}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_297_42814",children:(0,r.jsx)("path",{d:"M0 0h20v20H0z",fill:"#fff"})})})]})}}}]);
|