mage-ai 0.9.69__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/WorkspaceResource.py +5 -4
- 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 +1 -1
- 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 +24 -5
- mage_ai/data_preparation/models/block/dynamic/utils.py +9 -4
- mage_ai/data_preparation/models/block/global_data_product/__init__.py +25 -2
- 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/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 +9 -5
- mage_ai/data_preparation/models/triggers/__init__.py +4 -2
- mage_ai/data_preparation/storage/local_storage.py +12 -6
- mage_ai/orchestration/db/migrations/versions/42a14d6143f1_update_token_column_type.py +54 -0
- mage_ai/orchestration/db/models/oauth.py +10 -9
- mage_ai/orchestration/db/models/schedules.py +21 -0
- mage_ai/orchestration/notification/sender.py +37 -15
- mage_ai/orchestration/pipeline_scheduler_original.py +32 -25
- 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/{_krrrgup_C-dPOpX36S8I → 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/{3548-fa0792ddb88f4646.js → 3548-9d26185b3fb663b1.js} +1 -1
- 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/manage-4bfc84ff07d7656f.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-3edc6270c5b0e962.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]/triggers/[...slug]-eb11c5390c982b49.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-1bdfda8edc9cf4a8.js → triggers-4612d15a65c35912.js} +1 -1
- 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/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_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/{KLL5mirre9d7_ZeEpaw3s → 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/{3548-fa0792ddb88f4646.js → 3548-9d26185b3fb663b1.js} +1 -1
- 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/manage-4bfc84ff07d7656f.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipeline-runs-3edc6270c5b0e962.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]/triggers/[...slug]-eb11c5390c982b49.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-1bdfda8edc9cf4a8.js → triggers-4612d15a65c35912.js} +1 -1
- 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/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/_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 +3 -1
- mage_ai/server/server.py +35 -12
- mage_ai/server/utils/output_display.py +2 -2
- 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/shared/parsers.py +6 -1
- mage_ai/tests/api/operations/base/mixins.py +1 -1
- mage_ai/tests/api/resources/test_pipeline_resource.py +2 -2
- mage_ai/tests/authentication/oauth/test_utils.py +1 -1
- mage_ai/tests/data_preparation/models/block/test_global_data_product.py +2 -0
- mage_ai/tests/orchestration/triggers/test_global_data_product.py +138 -136
- mage_ai/tests/server/test_server.py +19 -0
- 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.69.dist-info → mage_ai-0.9.70.dist-info}/METADATA +2 -2
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.70.dist-info}/RECORD +217 -212
- mage_ai/server/frontend_dist/_next/static/chunks/1557-df144fbd8b2208c3.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-d9c89527266296f7.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-e1dd1ed71d26c10d.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/settings/platform/preferences-503049734a8b082f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.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-df144fbd8b2208c3.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-d9c89527266296f7.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-e1dd1ed71d26c10d.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/settings/platform/preferences-503049734a8b082f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.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/{_krrrgup_C-dPOpX36S8I → RhDiJSkcjCsh4xxX4BFBk}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{KLL5mirre9d7_ZeEpaw3s → TdpLLFome13qvM0gXvpHs}/_ssgManifest.js +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.70.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.70.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.70.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.70.dist-info}/top_level.txt +0 -0
|
@@ -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,y=e.loading,Z=e.monospace,C=void 0===Z||Z,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,y&&(w+=2*f.iI));H=(0,v.jsx)(o.ZP,{alignItems:"center",children:(0,v.jsx)(a.Z,{afterIcon:y?(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),y=t(69864),Z=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),E=t(31353),I=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;"],E.Mz),N=a.default.div.withConfig({displayName:"GitActionsstyle__TerminalStyle",componentId:"sc-ynrhio-1"})(["height:calc(75vh - ","px);position:relative;"],E.Mz),T=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 ")})),B=a.default.div.withConfig({displayName:"GitActionsstyle__OutputStyle",componentId:"sc-ynrhio-3"})([""," padding:","px;height:calc(75vh - ","px);overflow-y:auto;"],I.w5,2*A.iI,E.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 Q={clone:"Clone repository",new_branch:"Create new branch",commit:"Commit & push",pull:"Pull",reset_hard:"Hard reset"};var V=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],E=(0,s.useState)(),I=E[0],A=E[1],q=z.ZP.git_custom_branches.list(),V=q.data,$=q.mutate,K=(0,s.useMemo)((function(){return null===V||void 0===V?void 0:V.git_custom_branches}),[V]),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,y.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,y.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,y.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,y.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],ye=(0,s.useState)([]),Ze=ye[0],Ce=ye[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)(Z.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:Ze.concat(ge)})}))},children:"Include all changes"}),Ze&&Ze.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"})}),Ze.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,Ze,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)(T,{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(Q).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:!!I,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)(B,{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:I?(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),ye=t(12468),Ze=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.disabled,t=e.disableTimezoneToggle,i=e.projectName,o=(0,s.useState)((0,Me.qB)()),c=o[0],a=o[1],d=(0,s.useState)((0,we.U2)(He.kL,!1)),u=d[0],h=d[1],f=(0,s.useState)(!1),v=f[0],x=f[1],j=(0,s.useState)((0,Oe.e)({includeSeconds:!0,timeZones:_e})),m=j[0],g=j[1],b=(0,s.useState)(0),Z=b[0],C=b[1],M=c?Oe.Oh.LOCAL:Oe.Oh.UTC,F=window.innerWidth<Ze.nc,O=(0,Pe.VI)(null,{},[],{uuid:"components/ServerTimeDropdown"}),w=(0,l.Z)(O,1)[0],P=(0,y.Db)(z.ZP.projects.useUpdate(i),{onSuccess:function(e){return(0,W.wD)(e,{onErrorCallback:function(e,n){return w({errors:n,response:e})}})}}),_=(0,l.Z)(P,1)[0],D=(0,s.useCallback)((function(){x((function(e){return!e}))}),[]),S=(0,s.useCallback)((function(e){C(e)}),[]),E=(0,s.useCallback)((function(){var e=(0,Oe.e)({includeSeconds:u,timeZones:_e});g((function(n){return n.size===e.size&&n.get(Oe.Oh.UTC)===e.get(Oe.Oh.UTC)?n:e}))}),[u]),I=[{checked:c,disabled:t,label:t?"Display local timezone (must be changed in platform preferences)":"Display local timezone (requires refresh)",onCheck:function(){var e=!c;a((0,Me.hY)(e)),_({project:{features:(0,r.Z)({},re.d.LOCAL_TIMEZONE,e)}})},uuid:re.d.LOCAL_TIMEZONE},{checked:u,label:"Include seconds in current time",onCheck:function(){var e;h((e=!u,!!(0,we.uN)(He.kL,e)))},uuid:"current_time_seconds"}];return(0,s.useEffect)((function(){var e=setInterval((function(){E()}),1e3);return function(){return clearInterval(e)}}),[E]),(0,s.useEffect)((function(){E()}),[u,E]),m?(0,Y.jsx)(p.Z,{onClickOutside:function(){return x(!1)},open:!0,children:(0,Y.jsxs)("div",{style:{position:"relative"},children:[(0,Y.jsx)(be,{active:v,disabled:F||n,mountedCallback:S,onClick:D,time:m.get(M),timeZone:(0,Oe.WT)(M)}),!F&&v&&(0,Y.jsxs)(se,{top:Z,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:m.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:I.map((function(e){return(0,Y.jsxs)(pe,{children:[(0,Y.jsx)(k.Z,{checked:e.checked,compact:!0,disabled:e.disabled,onCheck:e.onCheck,purpleBackground:!e.disabled}),(0,Y.jsx)(H.ZP,{children:e.label}),e.uuid===re.d.LOCAL_TIMEZONE&&(0,Y.jsx)(ye.Z,ze(ze({},Me.EB),{},{appearAbove:!0,appearBefore:!0,size:Ce.bL}))]},e.label)}))})]})]})}):null},Se=t(58401),Ee=t(59457),Ie=t(77417),Ae=t(46684),Le=t(16682),Ne=t(68804),Te=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 ")})),Be=t(95363),Ue=t(74445),We=t(42122),Re=t(66472),Ge=t(95924),Ye=t(69419),qe=t(89538);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 Qe(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}var Ve=function(e){var n,t,o=e.breadcrumbs,b=e.hideActions,y=e.menuItems,Z=e.project,C=e.version,F=(0,Pe.VI)(null,{},[],{uuid:"shared/Header"}),O=(0,l.Z)(F,1)[0],w=(0,s.useContext)(a.ThemeContext),P=(0,G.PR)(),k=(0,s.useState)(null),D=k[0],S=k[1],E=(0,s.useState)(!1),I=E[0],L=E[1],N=(0,s.useState)(!1),T=N[0],B=N[1],U=(0,s.useState)(null),W=U[0],R=U[1],q=(0,s.useState)(!1),J=q[0],Q=q[1],le=(0,s.useState)(null),oe=le[0],ce=le[1],ae=(0,s.useRef)(null),se=(0,s.useRef)(null),de=(0,s.useRef)(null),ue=(0,d.useRouter)(),he=u.Z.isLoggedIn(),fe=(0,Ee.Z)(z.ZP.git_branches.detail,"test",{_format:"with_basic_details"},{revalidateOnFocus:!1},{pauseFetch:(0,G.YB)()&&!he},{delay:11e3}),ve=fe.data,pe=fe.mutate,xe=(0,s.useMemo)((function(){return(null===ve||void 0===ve?void 0:ve.git_branch)||{}}),[ve]),je=xe.is_git_integration_enabled,me=xe.name,ge=(0,Se.Z)().design,be=(0,Ie.Z)({showError:O}),ye=be.featureEnabled,Ze=be.featureUUIDs,Ce=be.isLoadingProject,Oe=be.isLoadingUpdate,He=be.project,we=be.rootProject,ke=be.updateProject,ze=(0,s.useMemo)((function(){return Z||He}),[He,Z]),_e=(0,s.useMemo)((function(){return C||(null===ze||void 0===ze?void 0:ze.version)}),[ze,C]),Je=(0,s.useMemo)((function(){return Le.WH.CLOSED===D||Le.WH.OPEN===D||(null===ye||void 0===ye?void 0:ye(null===Ze||void 0===Ze?void 0:Ze.COMMAND_CENTER))}),[D,ye,Ze]),Ve=!(0,We.Qr)(null===ze||void 0===ze?void 0:ze.features_override);se.current=ze;var $e=(0,s.useCallback)((function(){Je?(0,Re.WJ)():(L(!0),ke({features:Qe(Qe({},(null===ze||void 0===ze?void 0:ze.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;L(!1),O({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)}})))}),[Je,null===Ze||void 0===Ze?void 0:Ze.COMMAND_CENTER,null===ze||void 0===ze?void 0:ze.features,O,ke]),Ke=[];if(we&&Ke.push({label:function(){return null===we||void 0===we?void 0:we.name},linkProps:{href:"/"}}),ze){var Xe={label:function(){return null===ze||void 0===ze?void 0:ze.name}};we?(Xe.loading=Oe&&!I,Xe.options=Object.keys((null===we||void 0===we?void 0:we.projects)||{}).map((function(e){return{onClick:function(){ke({activate_project:e}).then((function(e){var n;if(null!==e&&void 0!==e&&null!==(n=e.data)&&void 0!==n&&n.error){var t;O({errors:null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.error,response:e})}else{var i,r,l,o=!(null===e||void 0===e||null===(i=e.data)||void 0===i||null===(r=i.project)||void 0===r||null===(l=r.features)||void 0===l||!l.display_local_timezone);(0,Me.hY)(o),window.location.reload()}}))},selected:e===(null===ze||void 0===ze?void 0:ze.name),uuid:e}}))):Xe.linkProps={href:"/"},Ke.push(Xe)}else Ce||b||Ke.push({bold:!0,danger:!0,label:function(){return"Error loading project configuration"}});var en=(0,s.useMemo)((function(){return[].concat(Ke,(0,i.Z)(o||[]))}),[Ke,o,ze]),nn=ue.query.pipeline,tn=(ze||{}).latest_version,rn=(0,s.useState)(null),ln=rn[0],on=rn[1],cn=((0,s.useMemo)((function(){var e,n,t=null===ge||void 0===ge||null===(e=ge.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(){on(i)},i}}),[ge,on]),(0,s.useMemo)((function(){var e,n,t=Ae.y7,i=(0,Y.jsx)($.Z,{height:Ae.y7});if(null!==ge&&void 0!==ge&&null!==(e=ge.components)&&void 0!==e&&null!==(n=e.header)&&void 0!==n&&n.media){var r,l,o=null===ge||void 0===ge||null===(r=ge.components)||void 0===r||null===(l=r.header)||void 0===l?void 0:l.media;if(null!==ln){var a=((null===ln||void 0===ln?void 0:ln.width)||1)/((null===ln||void 0===ln?void 0:ln.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})})}),[ln,ge])),an=b?[]:[{label:function(){return"Settings"},linkProps:{href:"/settings/workspace/preferences"},uuid:"user_settings"},{label:function(){return"Launch command center"},onClick:function(e){(0,Ge.j)(e),$e()},uuid:"Launch command center"}];(0,G.YB)()&&an.push({label:function(){return"Sign out"},onClick:function(){u.Z.logout((function(){z.ZP.sessions.updateAsyncServer(null,1).then((function(){(0,Ye.nL)("/sign-in")})).catch((function(){(0,Ye.nL)("/")}))}))},uuid:"sign_out"});var sn=(0,qe.dd)((function(){return(0,Y.jsx)(V,{branch:me,fetchBranch:pe})}),{},[me,pe],{background:!0,uuid:"git_actions"}),dn=(0,l.Z)(sn,2),un=dn[0],hn=(dn[1],(0,s.useMemo)((function(){return(null===me||void 0===me?void 0:me.length)>=21?"".concat(me.slice(0,21),"..."):me}),[me])),fn=(0,s.useMemo)((function(){return!(!P||null===P||void 0===P||!P.avatar)&&!/[A-Za-z0-9]+/.exec((null===P||void 0===P?void 0:P.avatar)||"")}),[P]),vn=(0,s.useMemo)((function(){return!(!P||null===P||void 0===P||!P.avatar)&&!!/[A-Za-z0-9]+/.exec((null===P||void 0===P?void 0:P.avatar)||"")}),[P]),pn=(0,s.useMemo)((function(){var e;if(!P||null===P||void 0===P||!P.avatar)return(0,Y.jsx)(te.Z,{});var n={color:null===w||void 0===w||null===(e=w.content)||void 0===e?void 0:e.active,fontFamily:Be.v$};return vn?(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===P||void 0===P?void 0:P.avatar})}),[vn,P]);return(0,s.useEffect)((function(){var e=function(e){var n,t,i=e.detail;null!==i&&void 0!==i&&i.state&&(S(null===i||void 0===i?void 0:i.state),Le.WH.MOUNTED===(null===i||void 0===i?void 0:i.state)&&(null!==se&&void 0!==se&&null!==(n=se.current)&&void 0!==n&&null!==(t=n.features)&&void 0!==t&&t[re.d.COMMAND_CENTER]||setTimeout((function(){(0,Re.WJ)(),L(!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:[cn,(0,Y.jsx)(h.Z,{breadcrumbs:en})]}),!!ze&&!b&&(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,Ge.j)(e),$e()},children:(0,Y.jsx)(Ae._m,{active:Le.WH.OPEN===D,children:(0,Y.jsxs)(m.ZP,{alignItems:"center",children:[(0,Y.jsx)(Y.Fragment,{children:Le.WH.OPEN===D?(0,Y.jsx)(_.UFO,{muted:!0,size:2*A.iI}):(0,Y.jsx)(_.Planet,{size:2*A.iI,success:!I&&!Je,warning:I})}),(0,Y.jsx)("div",{style:{marginRight:1.5*A.iI}}),Le.WH.OPEN!==D&&(0,Y.jsx)(H.ZP,{default:!0,noWrapping:!0,weightStyle:4,children:Je?"Command Center":I?"Launching Command Center":"Launch Command Center"}),Le.WH.OPEN===D&&(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===w||void 0===w||null===(n=w.accent)||void 0===n?void 0:n.warning,loadingStyle:ee.F.BLOCKS,width:1.5*A.iI})]}),Je&&(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:[je&&me&&(0,Y.jsx)(M.Z,{mr:1,children:(0,Y.jsx)(K.ZP,{compact:!0,highlightOnHoverAlt:!0,noBackground:!0,noHoverUnderline:!0,onClick:un,sameColorAsText:!0,title:me,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:hn})]})})}),tn&&_e&&tn!==_e&&(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(tn),children:(0,Y.jsx)(H.ZP,{black:!0,bold:!0,children:"Update"})}),_e&&"undefined"!==typeof _e&&(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(_e)})}),(0,Y.jsx)(M.Z,{ml:1,children:(0,Y.jsx)(De,{disableTimezoneToggle:Ve,disabled:b,projectName:null===ze||void 0===ze?void 0:ze.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"})}),y&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(M.Z,{ml:2}),(0,Y.jsx)(p.Z,{onClickOutside:function(){return R(null)},open:!0,style:{position:"relative"},children:(0,Y.jsxs)(m.ZP,{children:[(0,Y.jsx)(Te,{highlighted:0===W,onClick:function(){return R((function(e){return 0===e?null:0}))},onMouseEnter:function(){return R((function(e){return null!==e?0:null}))},ref:ae,children:(0,Y.jsx)(H.ZP,{children:"Menu"})}),(0,Y.jsx)(g.Z,{alternateBackground:!0,items:y,onClickCallback:function(){return R(null)},open:0===W,parentRef:ae,rightOffset:0,setConfirmationAction:ce,setConfirmationDialogueOpen:Q,uuid:"PipelineDetail/Header/menu"})]})}),(0,Y.jsx)(p.Z,{onClickOutside:function(){return Q(!1)},open:J,children:(0,Y.jsx)(ie.Z,{danger:!0,onCancel:function(){return Q(!1)},onClick:oe,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(nn,"?"),width:40*A.iI})})]}),(he||!(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:de,uuid:"Header/menu",children:fn&&(null===P||void 0===P||null===(t=P.avatar)||void 0===t?void 0:t.length)>=2?pn:(0,Y.jsx)(v.Z,{color:Fe.Jm,size:4*A.iI,children:pn})}),(0,Y.jsx)(g.Z,{alternateBackground:!0,items:an,onClickCallback:function(){return B(!1)},open:T,parentRef:de,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"})})})]})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7966],{27966:function(e,n,t){t.d(n,{Z:function(){return Q}});var i=t(82394),r=t(75582),l=t(12691),u=t.n(l),o=t(69864),c=t(82684),s=t(34376),a=t(71180),d=t(70652),p=t(50724),f=t(97618),h=t(55485),v=t(48670),m=t(44265),g=t(89515),b=t(38276),_=t(4190),x=t(75499),j=t(48381),O=t(30160),w=t(35686),y=t(44897),P=t(42631),Z=t(72473),C=t(81655),k=t(72191),E=t(39643),D=t(25976),I=t(70515),R=D.default.div.withConfig({displayName:"Tablestyle__PopupContainerStyle",componentId:"sc-8ammqd-0"})(["position:absolute;max-height:","px;z-index:10;border-radius:","px;padding:","px;"," "," "," ",""],58*I.iI,P.TR,2*I.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||y.Z.shadow).popup,";\n background-color: ").concat((e.theme.interactive||y.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.leftOffset&&"\n left: ".concat(e.leftOffset,"px;\n ")}),(function(e){return e.topOffset&&"\n top: ".concat(e.topOffset,"px;\n ")}),(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")})),N=t(30229),L=t(31608),S=t(16488),V=t(86735),T=t(50178),F=t(72619),A=t(95924),U=t(69419),B=t(70320),M=t(3917),z=t(44688),H=t(28598);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 K(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}var G={monospace:!0,small:!0};function Y(e){var n=e.cancelingRunId,t=e.disabled,i=e.isLoadingCancelPipeline,l=e.onCancel,u=e.onSuccess,s=e.pipelineRun,d=e.setCancelingRunId,f=e.setErrors,v=e.setShowConfirmationId,g=e.showConfirmationId,x=(0,T.Ct)(),j=s||{},C=j.id,E=j.pipeline_schedule_id,D=j.pipeline_schedule_token,I=j.pipeline_schedule_type,L=j.status,S=i&&C===n&&m.VO.RUNNING===L,V=(0,U.iV)(),A=(0,c.useMemo)((function(){return(null!==V&&void 0!==V&&V.page?+V.page:0)>0}),[null===V||void 0===V?void 0:V.page]),B=(0,o.Db)(N.Xm.API===I&&D?w.ZP.pipeline_runs.pipeline_schedules.useCreateWithParent(E,D):w.ZP.pipeline_runs.pipeline_schedules.useCreate(E),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){u()},onErrorCallback:function(e,n){return null===f||void 0===f?void 0:f({errors:n,response:e})}})}}),M=(0,r.Z)(B,1)[0],z=(0,c.useCallback)((function(){v(null),M({pipeline_run:{backfill_id:null===s||void 0===s?void 0:s.backfill_id,event_variables:(null===s||void 0===s?void 0:s.event_variables)||{},execution_date:null===s||void 0===s?void 0:s.execution_date,pipeline_schedule_id:null===s||void 0===s?void 0:s.pipeline_schedule_id,pipeline_uuid:null===s||void 0===s?void 0:s.pipeline_uuid,variables:(null===s||void 0===s?void 0:s.variables)||{}}})}),[M,s,v]),X=(0,c.useCallback)((function(){v(null),d(C),l({id:C,status:m.VO.CANCELLED})}),[l,C,d,v]);return(0,H.jsxs)("div",{style:{position:"relative"},children:[(0,H.jsx)(a.ZP,{backgroundColor:S&&y.Z.accent.yellow,beforeIcon:m.VO.INITIAL!==L&&!t&&(0,H.jsxs)(H.Fragment,{children:[m.VO.COMPLETED===L&&(0,H.jsx)(Z.Check,{size:k.bL}),[m.VO.FAILED,m.VO.CANCELLED].includes(L)&&(0,H.jsx)(Z.PlayButtonFilled,{inverted:m.VO.CANCELLED===L&&!x,size:k.bL}),[m.VO.RUNNING].includes(L)&&(0,H.jsx)(_.Z,{color:S?y.Z.status.negative:y.Z.monotone.white,small:!0})]}),borderRadius:"".concat(P.D7,"px"),danger:m.VO.FAILED===L&&!x,default:m.VO.INITIAL===L,disabled:t||x,loading:!s,onClick:function(e){e.stopPropagation(),v(C)},padding:"6px",primary:m.VO.RUNNING===L&&!S&&!x,warning:m.VO.CANCELLED===L&&!x,children:t?"Ready":S?"Canceling":m.Do[L]}),(0,H.jsx)(p.Z,{onClickOutside:function(){return v(null)},open:g===C,children:(0,H.jsxs)(R,{children:[[m.VO.RUNNING,m.VO.INITIAL].includes(L)&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(O.ZP,{bold:!0,color:"#9ECBFF",children:"Run is in progress"}),(0,H.jsx)(b.Z,{mb:1}),(0,H.jsxs)(O.ZP,{children:["This pipeline run is currently ongoing. Retrying will cancel",(0,H.jsx)("br",{}),"the current pipeline run."]}),(0,H.jsx)(O.ZP,{}),(0,H.jsx)(b.Z,{mt:1,children:(0,H.jsxs)(h.ZP,{children:[(0,H.jsx)(a.ZP,{onClick:function(){X(),z()},children:"Retry run"}),(0,H.jsx)(b.Z,{ml:1}),(0,H.jsx)(a.ZP,{onClick:X,children:"Cancel run"})]})})]}),[m.VO.CANCELLED,m.VO.FAILED,m.VO.COMPLETED].includes(L)&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(O.ZP,{bold:!0,color:"#9ECBFF",children:["Run ",L]}),(0,H.jsx)(b.Z,{mb:1}),(0,H.jsxs)(O.ZP,{children:["Retry the run with changes you have made to the pipeline.",A?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("br",{}),"Note that the retried run may appear on a previous page."]}):null]}),(0,H.jsx)(b.Z,{mb:1}),(0,H.jsx)(a.ZP,{onClick:z,children:"Retry run"})]})]})})]})}var Q=function(e){var n=e.allowBulkSelect,t=e.allowDelete,l=e.deletePipelineRun,_=e.disableKeyboardNav,y=e.disableRowSelect,D=e.emptyMessage,R=void 0===D?"No runs available":D,N=e.fetchPipelineRuns,U=e.hideTriggerColumn,X=e.includePipelineTags,Q=e.onClickRow,q=e.pipelineRuns,J=e.selectedRun,$=e.selectedRuns,W=e.setSelectedRun,ee=e.setSelectedRuns,ne=e.setErrors,te=(0,s.useRouter)(),ie=(0,T.Ct)(),re=(0,B.qB)(),le=(0,c.useRef)({}),ue=(0,c.useState)(null),oe=ue[0],ce=ue[1],se=(0,c.useState)(null),ae=se[0],de=se[1],pe=(0,c.useState)(null),fe=pe[0],he=pe[1],ve=(0,c.useState)(0),me=ve[0],ge=ve[1],be=(0,c.useState)(0),_e=be[0],xe=be[1],je=(0,o.Db)((function(e){var n=e.id,t=e.status;return w.ZP.pipeline_runs.useUpdate(n)({pipeline_run:{status:t}})}),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){ce(null),null===N||void 0===N||N()},onErrorCallback:function(e,n){ce(null),null===ne||void 0===ne||ne({errors:n,response:e})}})}}),Oe=(0,r.Z)(je,2),we=Oe[0],ye=Oe[1].isLoading,Pe="PipelineDetail/Runs/Table",Ze="pipeline-runs",Ce=(0,c.useCallback)((function(e){if(!e)return null;var n=q.findIndex((function(n){return n.id===e.id}));return n>=0?n:null}),[q]),ke=(0,z.y)(),Ee=ke.registerOnKeyDown,De=ke.unregisterOnKeyDown;(0,c.useEffect)((function(){return function(){De(Pe)}}),[De,Pe]),Ee(Pe,(function(e,n){var t=n[E.Bu],i=n[E.kD];W&&!_&&(t||i)&&W((function(n){var r=Ce(n);if(null!==r){if(e.repeat)return e.preventDefault(),n;if(t){var l=r-1;return l<0&&(l=q.length-1),q[l]}if(i){var u=r+1;return u>=q.length&&(u=0),q[u]}}return n}))}),[q,W]),(0,c.useEffect)((function(){var e=Ce(J);if(null!==e){var n=(0,C.w4)({rowIndex:e,uuid:Ze}),t=document.getElementById(n);t&&t.scrollIntoView({behavior:"smooth",block:"center"})}}),[Ce,J]);var Ie=re?C.O$:{},Re=[null,null,null,null,1],Ne=[{uuid:"Status"},{center:!0,uuid:"Logs"},{center:!0,uuid:"ID"},{uuid:"Block runs"},{uuid:"Pipeline"}];U||(Re.push(1),Ne.push({uuid:"Trigger"})),X&&(Re.push(null),Ne.push({uuid:"Pipeline tags"})),Re.push.apply(Re,[1,1,1,null,null]),Ne.push.apply(Ne,[K(K({},Ie),{},{uuid:"Execution date"}),K(K({},Ie),{},{uuid:"Started at"}),K(K({},Ie),{},{uuid:"Completed at"}),{uuid:"Execution time"}]),t&&!ie&&(Re.push.apply(Re,[null]),Ne.push({label:function(){return""},uuid:"Delete"}));var Le=(0,c.useMemo)((function(){return q.every((function(e){var n=e.id;return!(null===$||void 0===$||!$[n])}))}),[q,$]);n&&(Re.unshift(null),Ne.unshift({label:function(){return(0,H.jsx)(d.Z,{checked:Le,onClick:function(){var e=(0,V.HK)(q||[],(function(e){return e.id}));ee(Le?{}:e)}})},uuid:"Selected"})),!y&&Q&&(Re.push(null),Ne.push({label:function(){return""},uuid:"action"}));var Se=(0,c.useCallback)((function(e,n){if(Q&&ee&&n&&n.metaKey){var t=q[e];ee((function(e){var n=!(null===e||void 0===e||!e[t.id]);return K(K({},e),{},(0,i.Z)({},t.id,n?null:t))}))}else Q&&Q(e)}),[Q,q,ee]);return(0,H.jsx)(L.cl,{minHeight:30*I.iI,overflowVisible:!!ae,children:0===(null===q||void 0===q?void 0:q.length)?(0,H.jsx)(b.Z,{px:3,py:1,children:(0,H.jsx)(O.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:R})}):(0,H.jsx)(x.Z,{columnFlex:Re,columns:Ne,isSelectedRow:function(e){return!y&&q[e].id===(null===J||void 0===J?void 0:J.id)},onClickRow:y?null:Se,rowVerticalPadding:6,rows:null===q||void 0===q?void 0:q.map((function(e,r){var o=e.block_runs_count,s=e.completed_block_runs_count,_=e.completed_at,x=e.execution_date,w=e.id,E=e.pipeline_schedule_id,D=e.pipeline_schedule_name,I=e.pipeline_tags,R=e.pipeline_uuid,L=e.started_at,V=e.status;le.current[w]=(0,c.createRef)();var T,F,B=!w&&!V,z="".concat(s," out of ").concat(o," block runs completed"),J=(0,H.jsx)(j.Z,{tags:null===I||void 0===I?void 0:I.map((function(e){return{uuid:e}}))},"row_pipeline_tags_".concat(r)),W=[];r>0&&q[r-1].execution_date===e.execution_date&&q[r-1].pipeline_schedule_id===e.pipeline_schedule_id?(W=[(0,H.jsx)(b.Z,{ml:1,children:(0,H.jsxs)(h.ZP,{alignItems:"center",children:[(0,H.jsx)(Z.Subitem,{size:k.bL,useStroke:!0}),(0,H.jsx)(a.ZP,{borderRadius:"".concat(P.D7,"px"),notClickable:!0,padding:"6px",children:(0,H.jsx)(O.ZP,{muted:!0,children:m.Do[V]})})]})},"row_status"),(0,H.jsx)(a.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(e){e.stopPropagation(),te.push("/pipelines/".concat(R,"/logs?pipeline_run_id[]=").concat(w))},children:(0,H.jsx)(Z.Logs,{default:!0,size:k.bL})},"row_logs"),(0,H.jsx)(O.ZP,{center:!0,default:!0,monospace:!0,muted:!0,children:null===e||void 0===e?void 0:e.id},"row_id"),(0,H.jsx)(u(),{as:"/pipelines/".concat(R,"/runs/").concat(w),href:"/pipelines/[pipeline]/runs/[run]",passHref:!0,children:(0,H.jsx)(v.Z,{bold:!0,block:!0,centerAlign:!0,muted:!0,title:z,children:"".concat(s," / ").concat(o)})},"row_block_runs"),(0,H.jsx)(O.ZP,{default:!0,monospace:!0,muted:!0,children:R},"row_pipeline_uuid")],U||W.push((0,H.jsx)(O.ZP,{default:!0,monospace:!0,muted:!0,children:"-"},"row_trigger_retry")),X&&W.push(J),(T=W).push.apply(T,[(0,H.jsx)(O.ZP,{default:!0,monospace:!0,muted:!0,children:"-"},"row_date_retry"),(0,c.createElement)(O.ZP,K(K({},G),{},{key:"row_started_at",muted:!0,title:L?(0,M._6)(L):null}),L?(0,S.Uc)(L,re):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(O.ZP,K(K({},G),{},{key:"row_completed_at",muted:!0,title:_?(0,M._6)(_):null}),_?(0,S.Uc)(_,re):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(O.ZP,K(K({},G),{},{default:!0,key:"row_execution_time",title:L&&_?(0,M.Qf)({endDatetime:_,showFullFormat:!0,startDatetime:L}):null}),L&&_?(0,M.Qf)({endDatetime:_,startDatetime:L}):(0,H.jsx)(H.Fragment,{children:"\u2014"}))])):(W=[(0,H.jsx)(Y,{cancelingRunId:oe,disabled:B,isLoadingCancelPipeline:ye,onCancel:we,onSuccess:N,pipelineRun:e,setCancelingRunId:ce,setErrors:ne,setShowConfirmationId:de,showConfirmationId:ae},"row_retry_button"),(0,H.jsx)(a.ZP,{default:!0,disabled:B,iconOnly:!0,noBackground:!0,onClick:function(e){e.stopPropagation(),te.push("/pipelines/".concat(R,"/logs?pipeline_run_id[]=").concat(w))},children:(0,H.jsx)(Z.Logs,{default:!0,size:k.bL})},"row_logs"),(0,H.jsx)(O.ZP,{center:!0,default:!0,monospace:!0,muted:!0,children:null===e||void 0===e?void 0:e.id},"row_id"),(0,H.jsx)(u(),{as:"/pipelines/".concat(R,"/runs/").concat(w),href:"/pipelines/[pipeline]/runs/[run]",passHref:!0,children:(0,H.jsx)(v.Z,{bold:!0,block:!0,centerAlign:!0,disabled:B,sky:!0,title:z,children:B?"":"".concat(s," / ").concat(o)})},"row_block_runs"),(0,H.jsx)(O.ZP,{default:!0,monospace:!0,children:R},"row_pipeline_uuid")],U||W.push((0,H.jsx)(u(),{as:"/pipelines/".concat(R,"/triggers/").concat(E),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,H.jsx)(v.Z,{bold:!0,sky:!0,children:D})},"row_trigger")),X&&W.push(J),(F=W).push.apply(F,[(0,c.createElement)(O.ZP,K(K({},G),{},{default:!0,key:"row_date",title:x?(0,M._6)(x):null}),x?(0,S.Uc)(x,re):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(O.ZP,K(K({},G),{},{default:!0,key:"row_started_at",title:L?(0,M._6)(L):null}),L?(0,S.Uc)(L,re):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(O.ZP,K(K({},G),{},{default:!0,key:"row_completed_at",title:_?(0,M._6)(_):null}),_?(0,S.Uc)(_,re):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(O.ZP,K(K({},G),{},{default:!0,key:"row_execution_time",title:L&&_?(0,M.Qf)({endDatetime:_,showFullFormat:!0,startDatetime:L}):null}),L&&_?(0,M.Qf)({endDatetime:_,startDatetime:L}):(0,H.jsx)(H.Fragment,{children:"\u2014"}))]));if(t&&!ie&&W.push((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(a.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(e){var n,t,i,r;(0,A.j)(e),he(w),ge((null===(n=le.current[w])||void 0===n||null===(t=n.current)||void 0===t?void 0:t.offsetTop)||0),xe((null===(i=le.current[w])||void 0===i||null===(r=i.current)||void 0===r?void 0:r.offsetLeft)||0)},ref:le.current[w],title:"Delete",children:(0,H.jsx)(Z.Trash,{default:!0,size:k.bL})}),(0,H.jsx)(p.Z,{onClickOutside:function(){return he(null)},open:fe===w,children:(0,H.jsx)(g.Z,{danger:!0,left:(_e||0)-C.nH,onCancel:function(){return he(null)},onClick:function(){he(null),l(w)},title:"Are you sure you want to delete this run (id ".concat(w,' for trigger "').concat(D,'")?'),top:(me||0)-(r<=1?C.oz:C.OK),width:C.Xx})})]})),n){var ue=!(null===$||void 0===$||!$[w]);W.unshift((0,H.jsx)(d.Z,{checked:ue,onClick:function(n){n.stopPropagation(),ee((function(n){return K(K({},n),{},(0,i.Z)({},w,ue?null:e))}))}},"selected-pipeline-run-".concat(w)))}return!y&&Q&&W.push((0,H.jsx)(f.Z,{flex:1,justifyContent:"flex-end",children:(0,H.jsx)(Z.ChevronRight,{default:!0,size:k.bL})})),W})),uuid:Ze})})}},16488:function(e,n,t){t.d(n,{IJ:function(){return v},M8:function(){return P},Uc:function(){return x},XM:function(){return y},_U:function(){return h},eI:function(){return _},gU:function(){return O},lO:function(){return D},ri:function(){return g},tL:function(){return j},vJ:function(){return w},xH:function(){return b}});var i,r=t(82394),l=t(92083),u=t.n(l),o=t(3917),c=t(4383),s=t(30229),a=t(42122),d=t(86735);function p(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 f(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,r.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}var h=function(e){return!!e&&!Object.values(s.U5).includes(e)};function v(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var t=n.block_uuid,i=n.completed_at,l=n.started_at,o=n.status,c=null;l&&i&&(c=u()(i).valueOf()-u()(l).valueOf());return f(f({},e),{},(0,r.Z)({},t,{runtime:c,status:o}))}),{})}var m,g=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:s.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:s.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:s.Xm.API}];return e?n.slice(0,1):n};function b(e){var n=(0,a.gR)(e,[s.gm.INTERVAL,s.gm.TYPE]),t=e[s.gm.INTERVAL];t&&(n["schedule_interval[]"]=encodeURIComponent(t));var i=e[s.gm.TYPE];return i&&(n["schedule_type[]"]=i),n}function _(e){return e?new Date(u()(e).valueOf()):null}function x(e,n){return n?(0,o.XG)(e,n):function(e){if("string"!==typeof e)return e;var n=e.split("+")[0];return u()(_(n)).format(o.Nx)}(e)}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(m||(m={}));var j=(i={},(0,r.Z)(i,m.DAY,86400),(0,r.Z)(i,m.HOUR,3600),(0,r.Z)(i,m.MINUTE,60),(0,r.Z)(i,m.SECOND,1),i);function O(e){var n=m.SECOND,t=e;return e%86400===0?(t/=86400,n=m.DAY):e%3600===0?(t/=3600,n=m.HOUR):e%60===0&&(t/=60,n=m.MINUTE),{time:t,unit:n}}function w(e,n){return e*j[n]}function y(e,n,t){var i,r=u()(e);return r.set("hour",+(null===n||void 0===n?void 0:n.hour)||0),r.set("minute",+(null===n||void 0===n?void 0:n.minute)||0),r.set("second",0),i=r.format(o.TD),null!==t&&void 0!==t&&t.includeSeconds&&(i=i.concat(":00")),null!==t&&void 0!==t&&t.localTimezone&&(i=r.format(o.lE),null!==t&&void 0!==t&&t.convertToUtc&&(i=(0,o.d$)(i,{includeSeconds:null===t||void 0===t?void 0:t.includeSeconds,utcFormat:!0}))),i}function P(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t="",i=!0;if(i){var r=(0,c.XF)();n?t="".concat(r,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/api_trigger"):(t="".concat(r,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/pipeline_runs"),null!==e&&void 0!==e&&e.token&&(t="".concat(t,"/").concat(e.token)))}return t}function Z(e,n,t){return e.match(/[*,-/]/)?{additionalOffset:0,cronValue:e}:function(e,n,t){var i=t.indexOf(e),r=0;if(n<0)for(var l=0;l>n;l--)0===i?(i=t.length-1,r-=1):i-=1;else if(n>0)for(var u=0;u<n;u++)i===t.length-1?(i=0,r+=1):i+=1;var o="number"===typeof t[i]?t[i]:e;return{additionalOffset:r,cronValue:String(o)}}(+e,n,t)}var C=(0,d.m5)(60),k=(0,d.m5)(24),E=(0,o.Cs)();function D(e,n){if(!e)return e;var t=u()().local().format("Z"),i=t.split(":"),r="-"===t[0],l=3===i[0].length?Number(i[0].slice(1)):Number(i[0]),o=Number(i[1]);(r&&!n||!r&&n)&&(l=-l,o=-o);var c=e.split(" "),s=c[0],a=c[1],d=c[2],p=Z(s,o,C),f=Z(a,l+p.additionalOffset,k);if(c[0]=p.cronValue,c[1]=f.cronValue,0!==(null===f||void 0===f?void 0:f.additionalOffset)){var h=Z(d,f.additionalOffset,E);c[2]=h.cronValue}return c.join(" ")}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9624],{29624:function(e,n,i){i.d(n,{Z:function(){return Q}});var t=i(82394),l=i(75582),r=i(12691),u=i.n(r),o=i(82684),c=i(69864),s=i(34376),p=i(71180),d=i(50724),a=i(30160),f=i(44897),h=i(42631),g=i(70515),v=i(25976),_=v.default.div.withConfig({displayName:"indexstyle__ModalStyle",componentId:"sc-qldrgc-0"})(["position:absolute;"," "," display:flex;flex-direction:column;width:","px;overflow:hidden;background-color:",";border:1px solid ",";border-radius:","px;box-shadow:",";"],(function(e){return e.top&&"\n top: ".concat(e.top,"px;\n ")}),(function(e){return e.left&&"\n left: ".concat(e.left,"px;\n ")}),39*g.iI,(function(e){return(e.theme||f.Z).background.dashboard}),(function(e){return(e.theme||f.Z).borders.darkLight}),h.n_,(function(e){return(e.theme||f.Z).shadow.popup})),x=v.default.div.withConfig({displayName:"indexstyle__ContentStyle",componentId:"sc-qldrgc-1"})(["display:flex;flex-direction:column;gap:","px;padding:","px ","px;"],2*g.iI,2.5*g.iI,2*g.iI),j=v.default.div.withConfig({displayName:"indexstyle__ActionsStyle",componentId:"sc-qldrgc-2"})(["display:flex;gap:","px;padding:","px;background-color:",";border-top:1px solid ",";& > *{flex:1;}"],g.iI,2*g.iI,(function(e){return(e.theme||f.Z).background.panel}),(function(e){return(e.theme||f.Z).borders.darkLight})),y=i(72473),b=i(72191),m=i(79633),Z=i(81728),C=i(28598);var P=function(e){var n=e.inProgressRunsCount,i=e.left,t=void 0===i?0:i,l=e.onAllow,r=e.onStop,u=e.pipelineScheduleId,c=e.pipelineUuid,s=e.top,d=void 0===s?0:s,f=e.topOffset,h=void 0===f?0:f,v=(0,o.useRef)(null),P=(0,o.useState)(d+h),k=P[0],w=P[1];return(0,o.useEffect)((function(){var e=null!==v&&void 0!==v&&v.current?v.current.getBoundingClientRect().height:32*g.iI,n=d+h+e>window.innerHeight;w(n?d-e:d+h)}),[t,d,h]),(0,C.jsxs)(_,{left:t,ref:v,top:k,children:[(0,C.jsxs)(x,{children:[(0,C.jsx)(y.AlertTriangle,{fill:m.$R,size:b.nz}),(0,C.jsx)(a.ZP,{bold:!0,large:!0,warning:!0,children:"There ".concat(1===n?"is":"are"," currently ").concat((0,Z._6)("run",n,!0)," in progress.")}),(0,C.jsx)(a.ZP,{large:!0,children:"Do you want to stop or allow the ".concat((0,Z._6)("run",n,!0,!0)," to complete?")})]}),(0,C.jsxs)(j,{children:[(0,C.jsx)(p.ZP,{large:!0,onClick:function(){return r(u,c)},children:"Stop"}),(0,C.jsx)(p.ZP,{large:!0,onClick:function(){return l(u)},children:"Allow"})]})]})},k=i(55485),w=i(48670),O=i(30229),I=i(89515),S=i(38276),R=i(75499),A=i(48381),E=i(69650),D=i(12468),N=i(35686),T=i(77417),q=i(19698),L=i(81655),U=i(41143),z=i(31608),B=i(16488),V=i(3917),F=i(50178),H=i(72619),X=i(95924),$=i(70320),G=i(89538);function K(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 M(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?K(Object(i),!0).forEach((function(n){(0,t.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):K(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var J=1.5*g.iI;var Q=function(e){var n=e.disableActions,i=e.fetchPipelineSchedules,t=e.highlightRowOnHover,r=e.includeCreatedAtColumn,f=e.includePipelineColumn,h=e.pipeline,g=e.pipelineSchedules,v=e.pipelineTriggersByName,_=e.selectedSchedule,x=e.setErrors,j=e.setSelectedSchedule,m=e.stickyHeader,Z=null===h||void 0===h?void 0:h.uuid,K=(0,s.useRouter)(),Q=(0,T.Z)().projectPlatformActivated,W=(0,q.Z)().status,Y=(0,o.useRef)({}),ee=(0,o.useRef)({}),ne=(0,o.useState)(null),ie=ne[0],te=ne[1],le=(0,o.useState)(0),re=le[0],ue=le[1],oe=(0,o.useState)(0),ce=oe[0],se=oe[1],pe=(0,$.qB)(),de=pe?L.O$:{},ae=(0,c.Db)((function(e){return N.ZP.pipelines.useUpdate(e.uuid)({pipeline:e})}),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(){null===i||void 0===i||i()},onErrorCallback:function(e,n){return null===x||void 0===x?void 0:x({errors:n,response:e})}})}}),fe=(0,l.Z)(ae,1)[0],he=(0,c.Db)((function(e){return N.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:e})}),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(){null===i||void 0===i||i()},onErrorCallback:function(e,n){return null===x||void 0===x?void 0:x({errors:n,response:e})}})}}),ge=(0,l.Z)(he,1)[0],ve=(0,c.Db)((function(e){return N.ZP.pipeline_schedules.useDelete(e)()}),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(){null===i||void 0===i||i(),Z?K.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(Z,"/triggers")):null===i||void 0===i||i()},onErrorCallback:function(e,n){return x({errors:n,response:e})}})}}),_e=(0,l.Z)(ve,1)[0],xe=[],je=[];n||(xe.push.apply(xe,[null,null,null]),je.push.apply(je,[{uuid:"Active"},{uuid:"Type"},{center:!0,uuid:"Logs"}])),Q&&(xe.push.apply(xe,[null]),je.push.apply(je,[{uuid:"Project"}])),xe.push.apply(xe,[1,2]),je.push.apply(je,[{uuid:"Name"},{uuid:"Description"}]),n||(xe.push.apply(xe,[null]),je.push({uuid:"Frequency"})),xe.push.apply(xe,[1,1,null]),je.push.apply(je,[M(M({},de),{},{uuid:"Next run date"}),{uuid:"Latest status"},{uuid:"Runs"}]),n||(xe.push.apply(xe,[1]),je.push({uuid:"Tags"})),n||(0,F.Ct)()||(xe.push.apply(xe,[null]),je.push({label:function(){return""},uuid:"edit/delete"})),!n&&f&&(je.splice(2,0,{uuid:"Pipeline"}),xe.splice(2,0,1)),!n&&r&&(je.splice(5,0,M(M({},de),{},{uuid:"Created at"})),xe.splice(5,0,null));var ye=(0,G.dd)((function(e){var n=e.inProgressRunsCount,i=e.left,t=e.pipelineScheduleId,l=e.pipelineUuid,r=e.top,u=e.topOffset;return(0,C.jsx)(P,{inProgressRunsCount:n,left:i,onAllow:function(e){Ze(),ge({id:e,status:O.fq.INACTIVE})},onStop:function(e,n){Ze(),fe({pipeline_schedule_id:e,status:U.V.CANCELLED,uuid:n}),ge({id:e,status:O.fq.INACTIVE})},pipelineScheduleId:t,pipelineUuid:l,top:r,topOffset:u})}),{},[],{background:!0,uuid:"disable_trigger"}),be=(0,l.Z)(ye,2),me=be[0],Ze=be[1];return(0,C.jsx)(z.cl,{overflowVisible:!0,children:0===g.length?(0,C.jsx)(S.Z,{px:3,py:1,children:(0,C.jsx)(a.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No triggers available"})}):(0,C.jsx)(R.Z,{columnFlex:xe,columns:je,highlightRowOnHover:t,isSelectedRow:function(e){return g[e].id===(null===_||void 0===_?void 0:_.id)},onClickRow:j?function(e){return null===j||void 0===j?void 0:j(g[e])}:null,rowVerticalPadding:6,rows:g.map((function(e,i){var t=e.id,l=e.created_at,c=e.description,s=e.next_pipeline_run_date,h=e.pipeline_in_progress_runs_count,g=e.pipeline_runs_count,_=e.pipeline_uuid,x=e.last_pipeline_run_status,j=e.name,m=e.repo_path,P=e.schedule_interval,R=e.status,N=e.tags,T=O.fq.ACTIVE===R,q=(0,B._U)(P),U=Z||_;Y.current[t]=(0,o.createRef)(),ee.current[t]=(0,o.createRef)();var z=null!==v&&void 0!==v&&v[j]?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(S.Z,{mr:1}),(0,C.jsx)(D.Z,{block:!0,label:"This trigger is saved in code.",size:J,widthFitContent:!0,children:(0,C.jsx)(y.Code,{default:!0,size:J})})]}):null,H=[];if(n)H.push.apply(H,[(0,C.jsxs)(k.ZP,{alignItems:"center",children:[(0,C.jsx)(a.ZP,{bold:!0,children:j}),z]},"trigger_name_".concat(i))]);else{var $,G;if(H.push.apply(H,[(0,C.jsx)(D.Z,{block:!0,label:R,size:20,widthFitContent:!0,children:(0,C.jsx)("div",{ref:Y.current[t],style:{position:"relative"},children:(0,C.jsx)(E.Z,{checked:T,compact:!0,onCheck:function(e){return function(e){var n=e.event,i=e.inProgressRunsCount,t=e.pipelineIsActive,l=e.pipelineScheduleId,r=e.pipelineUuid;if((0,X.j)(n),t&&i>0){var u,o=null===(u=Y.current[l])||void 0===u?void 0:u.current,c=null===o||void 0===o?void 0:o.getBoundingClientRect(),s=c.height,p=c.left,d=c.top;me({inProgressRunsCount:i,left:p,pipelineScheduleId:l,pipelineUuid:r,top:d,topOffset:s})}else ge({id:l,status:t?O.fq.INACTIVE:O.fq.ACTIVE})}({event:e,inProgressRunsCount:h,pipelineIsActive:T,pipelineScheduleId:t,pipelineUuid:_})},purpleBackground:!0})})},"trigger_enabled_".concat(i)),(0,C.jsx)(a.ZP,{default:!0,monospace:!0,children:null===($=O.Z4[e.schedule_type])||void 0===$?void 0:$.call(O.Z4)},"trigger_type_".concat(i))]),H.push((0,C.jsx)(p.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return K.push("/pipelines/".concat(U,"/logs?pipeline_schedule_id[]=").concat(t))},children:(0,C.jsx)(y.Logs,{default:!0,size:b.bL})},"logs_button_".concat(i))),Q)H.push.apply(H,[(0,C.jsx)(a.ZP,{default:!0,monospace:!0,children:null===m||void 0===m||null===(G=m.replace((null===W||void 0===W?void 0:W.repo_path_root)||"",""))||void 0===G?void 0:G.slice(1)},"project_".concat(i))]);H.push.apply(H,[(0,C.jsxs)(k.ZP,{alignItems:"center",children:[(0,C.jsx)(u(),{as:"/pipelines/".concat(U,"/triggers/").concat(t),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,C.jsx)(w.Z,{bold:!0,onClick:function(e){(0,X.j)(e),K.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(U,"/triggers/").concat(t))},sky:!0,children:j})}),z]},"trigger_name_".concat(i))])}return H.push.apply(H,[(0,C.jsx)(a.ZP,{default:!0,children:c},"trigger_description_".concat(i))]),n||H.push((0,C.jsx)(a.ZP,{default:!0,monospace:!0,children:pe&&q?(0,B.lO)(P):P},"trigger_frequency_".concat(i))),H.push.apply(H,[(0,C.jsx)(a.ZP,{monospace:!0,small:!0,title:s?"UTC: ".concat(s.slice(0,19)):null,children:s?pe?(0,V.XG)(s,pe):(0,V.d$)(s,{includeSeconds:!0,utcFormat:!0}):(0,C.jsx)(C.Fragment,{children:"\u2014"})},"trigger_next_run_date_".concat(i)),(0,o.createElement)(a.ZP,M(M({},(0,L.NC)(x)),{},{key:"latest_run_status_".concat(i)}),x||"N/A"),(0,C.jsx)(a.ZP,{default:!0,monospace:!0,children:g||"0"},"trigger_run_count_".concat(i))]),n||H.push((0,C.jsx)("div",{children:(0,C.jsx)(A.Z,{tags:null===N||void 0===N?void 0:N.map((function(e){return{uuid:e}}))})},"pipeline_tags_".concat(i))),n||(0,F.Ct)()||H.push((0,C.jsxs)(k.ZP,{children:[(0,C.jsx)(p.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return K.push("/pipelines/".concat(U,"/triggers/").concat(t,"/edit"))},title:"Edit",children:(0,C.jsx)(y.Edit,{default:!0,size:b.bL})}),(0,C.jsx)(S.Z,{mr:1}),(0,C.jsx)(p.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){var e,n,i,l;te(t),ue((null===(e=ee.current[t])||void 0===e||null===(n=e.current)||void 0===n?void 0:n.offsetTop)||0),se((null===(i=ee.current[t])||void 0===i||null===(l=i.current)||void 0===l?void 0:l.offsetLeft)||0)},ref:ee.current[t],title:"Delete",children:(0,C.jsx)(y.Trash,{default:!0,size:b.bL})}),(0,C.jsx)(d.Z,{onClickOutside:function(){return te(null)},open:ie===t,children:(0,C.jsx)(I.Z,{danger:!0,left:(ce||0)-L.nH,onCancel:function(){return te(null)},onClick:function(){te(null),_e(t)},title:"Are you sure you want to delete the trigger ".concat(j,"?"),top:(re||0)-(i<=1?L.oz:L.OK),width:L.Xx})})]},"edit_delete_buttons_".concat(i))),!n&&f&&H.splice(2,0,(0,C.jsx)(a.ZP,{default:!0,monospace:!0,children:U},"pipeline_name_".concat(i))),!n&&r&&H.splice(5,0,(0,C.jsx)(a.ZP,{default:!0,monospace:!0,small:!0,title:l?(0,V._6)(l):null,children:(0,V.XG)(null===l||void 0===l?void 0:l.slice(0,19),pe)},"created_at_".concat(i))),H})),stickyHeader:m,uuid:"pipeline-triggers"})})}}}]);
|