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
|
@@ -19,6 +19,9 @@ def get_memory() -> Tuple[float, float, float]:
|
|
|
19
19
|
used_memory = None
|
|
20
20
|
|
|
21
21
|
try:
|
|
22
|
+
# Skip check the memory in Windows
|
|
23
|
+
if os.name == 'nt':
|
|
24
|
+
return free_memory, used_memory, total_memory
|
|
22
25
|
output = subprocess.check_output('free -t -m', shell=True).decode('utf-8')
|
|
23
26
|
values = output.splitlines()[-1].split()[1:]
|
|
24
27
|
total_memory, used_memory, free_memory = map(float, values)
|
mage_ai/server/api/downloads.py
CHANGED
|
@@ -114,7 +114,10 @@ class ApiResourceDownloadHandler(BaseHandler):
|
|
|
114
114
|
# file pointer points to either a singular file or a temporary zip
|
|
115
115
|
def get_file_pointer(self, file_list, relative_file_list):
|
|
116
116
|
if len(file_list) == 1:
|
|
117
|
-
|
|
117
|
+
if file_list[0].endswith('.xlsx'): # Check if it's an XLSX file
|
|
118
|
+
return open(file_list[0], 'rb') # Open in binary mode for XLSX
|
|
119
|
+
else:
|
|
120
|
+
return open(file_list[0])
|
|
118
121
|
return self.zip_files(file_list, relative_file_list)
|
|
119
122
|
|
|
120
123
|
# creates a temporary zip and returns the (open) file pointer
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from datetime import datetime
|
|
3
|
+
from uuid import uuid4
|
|
4
|
+
|
|
5
|
+
from sqlalchemy.orm import load_only
|
|
6
|
+
|
|
7
|
+
from mage_ai.api.errors import ApiError
|
|
8
|
+
from mage_ai.data_preparation.logging.logger import DictLogger
|
|
9
|
+
from mage_ai.data_preparation.logging.logger_manager_factory import LoggerManagerFactory
|
|
10
|
+
from mage_ai.data_preparation.models.pipeline import Pipeline
|
|
11
|
+
from mage_ai.data_preparation.models.triggers import ScheduleType
|
|
12
|
+
from mage_ai.orchestration.db import safe_db_query
|
|
13
|
+
from mage_ai.orchestration.db.models.schedules import (
|
|
14
|
+
BlockRun,
|
|
15
|
+
PipelineRun,
|
|
16
|
+
PipelineSchedule,
|
|
17
|
+
)
|
|
18
|
+
from mage_ai.server.api.base import BaseHandler
|
|
19
|
+
from mage_ai.server.api.errors import UnauthenticatedRequestException
|
|
20
|
+
from mage_ai.settings.utils import base_repo_dirname
|
|
21
|
+
from mage_ai.shared.requests import get_bearer_auth_token_from_headers
|
|
22
|
+
from mage_ai.shared.utils import clean_name
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class ApiRunHandler(BaseHandler):
|
|
26
|
+
@safe_db_query
|
|
27
|
+
def post(self, token: str = None):
|
|
28
|
+
if token is None:
|
|
29
|
+
token = get_bearer_auth_token_from_headers(self.request.headers)
|
|
30
|
+
if not token:
|
|
31
|
+
raise UnauthenticatedRequestException('Invalid token.')
|
|
32
|
+
|
|
33
|
+
pipeline_schedule = PipelineSchedule.query.filter(
|
|
34
|
+
PipelineSchedule.schedule_type == ScheduleType.API,
|
|
35
|
+
PipelineSchedule.token == token,
|
|
36
|
+
).options(load_only('id')).one()
|
|
37
|
+
if not pipeline_schedule:
|
|
38
|
+
raise ApiError(ApiError.RESOURCE_NOT_FOUND)
|
|
39
|
+
|
|
40
|
+
payload = self.get_payload().get('run', {})
|
|
41
|
+
pipeline_uuid = payload.get('pipeline_uuid')
|
|
42
|
+
block_uuid = payload.get('block_uuid')
|
|
43
|
+
project = payload.get('project')
|
|
44
|
+
variables = payload.get('variables', {})
|
|
45
|
+
|
|
46
|
+
record = payload.get('record', True)
|
|
47
|
+
store_variables = payload.get('store_variables', True)
|
|
48
|
+
run_upstream_blocks = payload.get('run_upstream_blocks', False)
|
|
49
|
+
incomplete_only = payload.get('incomplete_only', False)
|
|
50
|
+
|
|
51
|
+
pipeline = Pipeline.get(
|
|
52
|
+
pipeline_uuid,
|
|
53
|
+
repo_path=os.path.join(base_repo_dirname(), project) if project else None,
|
|
54
|
+
check_if_exists=False,
|
|
55
|
+
all_projects=True,
|
|
56
|
+
use_repo_path=True if project else False,
|
|
57
|
+
)
|
|
58
|
+
if not pipeline:
|
|
59
|
+
raise ApiError(ApiError.RESOURCE_NOT_FOUND)
|
|
60
|
+
|
|
61
|
+
block = pipeline.get_block(block_uuid)
|
|
62
|
+
if not block:
|
|
63
|
+
raise ApiError(ApiError.RESOURCE_NOT_FOUND)
|
|
64
|
+
|
|
65
|
+
pipeline_run = None
|
|
66
|
+
block_run = None
|
|
67
|
+
|
|
68
|
+
try:
|
|
69
|
+
if record:
|
|
70
|
+
pipeline_run = PipelineRun.create(
|
|
71
|
+
completed_at=datetime.utcnow(),
|
|
72
|
+
create_block_runs=False,
|
|
73
|
+
execution_date=datetime.utcnow(),
|
|
74
|
+
started_at=datetime.utcnow(),
|
|
75
|
+
pipeline_schedule_id=pipeline_schedule.id,
|
|
76
|
+
pipeline_uuid=pipeline.uuid,
|
|
77
|
+
status=PipelineRun.PipelineRunStatus.COMPLETED,
|
|
78
|
+
variables=variables,
|
|
79
|
+
)
|
|
80
|
+
block_run = BlockRun.create(
|
|
81
|
+
pipeline_run_id=pipeline_run.id,
|
|
82
|
+
block_uuid=block.uuid,
|
|
83
|
+
metrics=variables,
|
|
84
|
+
status=BlockRun.BlockRunStatus.RUNNING,
|
|
85
|
+
started_at=datetime.utcnow(),
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
parts = []
|
|
89
|
+
if pipeline_run:
|
|
90
|
+
parts.append(pipeline_run.execution_partition)
|
|
91
|
+
else:
|
|
92
|
+
parts.extend([
|
|
93
|
+
str(pipeline_schedule.id),
|
|
94
|
+
datetime.utcnow().strftime('%Y%m%dT%H%M%S'),
|
|
95
|
+
])
|
|
96
|
+
|
|
97
|
+
execution_partition = os.path.join(
|
|
98
|
+
*parts,
|
|
99
|
+
uuid4().hex,
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
logger_manager = LoggerManagerFactory.get_logger_manager(
|
|
103
|
+
pipeline_uuid=clean_name(pipeline.uuid),
|
|
104
|
+
block_uuid=clean_name(block.uuid),
|
|
105
|
+
partition=execution_partition,
|
|
106
|
+
repo_config=pipeline.repo_config,
|
|
107
|
+
repo_path=pipeline.repo_path,
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
if run_upstream_blocks:
|
|
111
|
+
block.run_upstream_blocks(
|
|
112
|
+
incomplete_only=incomplete_only,
|
|
113
|
+
global_vars=variables,
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
output = block.execute_with_callback(
|
|
117
|
+
execution_partition=execution_partition,
|
|
118
|
+
global_vars=variables,
|
|
119
|
+
logging_tags=dict(
|
|
120
|
+
block_uuid=block.uuid,
|
|
121
|
+
pipeline_uuid=pipeline.uuid,
|
|
122
|
+
),
|
|
123
|
+
logger=DictLogger(logger_manager.logger),
|
|
124
|
+
override_outputs=False,
|
|
125
|
+
store_variables=store_variables,
|
|
126
|
+
update_status=False,
|
|
127
|
+
verify_output=False,
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
if record:
|
|
131
|
+
block_run.update(
|
|
132
|
+
completed_at=datetime.utcnow(),
|
|
133
|
+
status=BlockRun.BlockRunStatus.COMPLETED,
|
|
134
|
+
)
|
|
135
|
+
except Exception as err:
|
|
136
|
+
if record:
|
|
137
|
+
if pipeline_run:
|
|
138
|
+
pipeline_run.update(
|
|
139
|
+
status=PipelineRun.PipelineRunStatus.FAILED,
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
if block_run:
|
|
143
|
+
block_run.update(
|
|
144
|
+
status=BlockRun.BlockRunStatus.FAILED,
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
raise err
|
|
148
|
+
|
|
149
|
+
self.write(dict(
|
|
150
|
+
run=output,
|
|
151
|
+
))
|
mage_ai/server/constants.py
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><title>Mage</title><meta content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=0" name="viewport"/><meta name="next-head-count" content="3"/><link href="/favicon.ico" rel="icon"/><link rel="preload" href="/_next/static/css/b59541b123fd7191.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b59541b123fd7191.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-d079359c241db804.js" defer=""></script><script src="/_next/static/chunks/framework-22b71764bf44ede4.js" defer=""></script><script src="/_next/static/chunks/main-77fe248a6fbd12d8.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
|
1
|
+
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><title>Mage</title><meta content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=0" name="viewport"/><meta name="next-head-count" content="3"/><link href="/favicon.ico" rel="icon"/><link rel="preload" href="/_next/static/css/b59541b123fd7191.css" as="style"/><link rel="stylesheet" href="/_next/static/css/b59541b123fd7191.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-d079359c241db804.js" defer=""></script><script src="/_next/static/chunks/framework-22b71764bf44ede4.js" defer=""></script><script src="/_next/static/chunks/main-77fe248a6fbd12d8.js" defer=""></script><script src="/_next/static/chunks/pages/_app-2a69553d8c6eeb53.js" defer=""></script><script src="/_next/static/chunks/pages/404-8ecd93274c427b76.js" defer=""></script><script src="/_next/static/RhDiJSkcjCsh4xxX4BFBk/_buildManifest.js" defer=""></script><script src="/_next/static/RhDiJSkcjCsh4xxX4BFBk/_ssgManifest.js" defer=""></script><style data-styled="" data-styled-version="5.3.6">html{-webkit-box-sizing:border-box;box-sizing:border-box;-ms-overflow-style:scrollbar;}/*!sc*/
|
|
2
2
|
*,*::before,*::after{-webkit-box-sizing:inherit;box-sizing:inherit;}/*!sc*/
|
|
3
3
|
data-styled.g4[id="sc-global-czSCUT1"]{content:"sc-global-czSCUT1,"}/*!sc*/
|
|
4
4
|
.cAAVhx{margin-top:16px;margin-bottom:16px;}/*!sc*/
|
|
5
5
|
data-styled.g7[id="Spacing__SpacingStyle-sc-1mpmtgj-0"]{content:"cAAVhx,"}/*!sc*/
|
|
6
|
-
.
|
|
7
|
-
data-styled.g8[id="Text__TextStyle-sc-sl5nur-0"]{content:"
|
|
6
|
+
.gjRqzz{margin:0;font-size:16px;line-height:22px;font-family:Roboto Regular,Helvetica Neue,Helvetica,sans-serif;color:#FFFFFF;}/*!sc*/
|
|
7
|
+
data-styled.g8[id="Text__TextStyle-sc-sl5nur-0"]{content:"gjRqzz,"}/*!sc*/
|
|
8
8
|
.dDWSWx{color:#FFFFFF;}/*!sc*/
|
|
9
9
|
data-styled.g77[id="Headline__HeadlineContainerStyle-sc-12jzt2e-0"]{content:"dDWSWx,"}/*!sc*/
|
|
10
|
-
.
|
|
11
|
-
data-styled.g79[id="Headline__H1Style-sc-12jzt2e-2"]{content:"
|
|
10
|
+
.wPqQh{margin:0;font-size:14px;line-height:20px;font-family:Roboto Bold,Helvetica Neue,Helvetica,sans-serif;color:#FFFFFF;margin:0;font-family:Roboto Bold,Helvetica Neue,Helvetica,sans-serif;font-size:40px;line-height:48px;}/*!sc*/
|
|
11
|
+
data-styled.g79[id="Headline__H1Style-sc-12jzt2e-2"]{content:"wPqQh,"}/*!sc*/
|
|
12
12
|
.kOVcuR .Toastify__toast-container{margin-top:24px;padding:0 !important;width:500px !important;}/*!sc*/
|
|
13
13
|
.kOVcuR .Toastify__toast{border-radius:8px !important;font-family:Greycliff Medium,Helvetica Neue,Helvetica,sans-serif !important;font-size:14px !important;line-height:20px !important;margin-bottom:0 !important;margin-left:0 !important;margin-right:0 !important;margin-top:16px !important;min-height:0 !important;padding:16px !important;}/*!sc*/
|
|
14
14
|
.kOVcuR .Toastify__toast-body{margin:0 !important;}/*!sc*/
|
|
@@ -17,4 +17,4 @@ data-styled.g79[id="Headline__H1Style-sc-12jzt2e-2"]{content:"hkcwCQ,"}/*!sc*/
|
|
|
17
17
|
.kOVcuR .Toastify__toast--success{background:#00A81A !important;color:#FFFFFF !important;}/*!sc*/
|
|
18
18
|
.kOVcuR .Toastify__toast--warning{background:#DD9900 !important;color:#FFFFFF !important;}/*!sc*/
|
|
19
19
|
data-styled.g275[id="ToastWrapper-sc-1a33ph1-0"]{content:"kOVcuR,"}/*!sc*/
|
|
20
|
-
</style></head><body><div id="__next"><div class="" style="position:fixed;top:0;left:0;height:2px;background:transparent;z-index:99999999999;width:100%"><div class="" style="height:100%;background:#FF144D;transition:all 500ms ease;width:0%"><div style="box-shadow:0 0 10px #FF144D, 0 0 10px #FF144D;width:5%;opacity:1;position:absolute;height:100%;transition:all 500ms ease;transform:rotate(3deg) translate(0px, -4px);left:-10rem"></div></div></div><main style="align-items:center;display:flex;flex-direction:column;height:100vh;margin-top:16rem"><svg width="84.70857142857143" height="64" viewBox="0 0 20 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity="0.4" d="M15.3266 0L19.2641 1.82961e-06L11.9687 14L8.03125 14L15.3266 0Z" fill="url(#paint0_linear_1303_5)"></path><path d="M11.9692 1.82961e-06L8.03164 0L0.736328 14L4.67383 14L8.03164 7.55626V14H11.9691V8.38194e-05L11.9692 1.82961e-06Z" fill="url(#paint1_linear_1303_5)"></path><path d="M15.3269 2.57679e-06H19.2644V14H15.3269V2.57679e-06Z" fill="url(#paint2_linear_1303_5)"></path><defs><linearGradient id="paint0_linear_1303_5" x1="8.03125" y1="7" x2="19.2641" y2="7" gradientUnits="userSpaceOnUse"><stop offset="0.28125" stop-color="#7D55EC"></stop><stop offset="1" stop-color="#2AB2FE"></stop></linearGradient><linearGradient id="paint1_linear_1303_5" x1="0.736328" y1="7" x2="19.2644" y2="7" gradientUnits="userSpaceOnUse"><stop offset="0.28125" stop-color="#7D55EC"></stop><stop offset="1" stop-color="#2AB2FE"></stop></linearGradient><linearGradient id="paint2_linear_1303_5" x1="0.736328" y1="7" x2="19.2644" y2="7" gradientUnits="userSpaceOnUse"><stop offset="0.28125" stop-color="#7D55EC"></stop><stop offset="1" stop-color="#2AB2FE"></stop></linearGradient></defs></svg><div class="Spacing__SpacingStyle-sc-1mpmtgj-0 cAAVhx"><div class="Headline__HeadlineContainerStyle-sc-12jzt2e-0 dDWSWx"><h1 class="Headline__H1Style-sc-12jzt2e-2
|
|
20
|
+
</style></head><body><div id="__next"><div class="" style="position:fixed;top:0;left:0;height:2px;background:transparent;z-index:99999999999;width:100%"><div class="" style="height:100%;background:#FF144D;transition:all 500ms ease;width:0%"><div style="box-shadow:0 0 10px #FF144D, 0 0 10px #FF144D;width:5%;opacity:1;position:absolute;height:100%;transition:all 500ms ease;transform:rotate(3deg) translate(0px, -4px);left:-10rem"></div></div></div><main style="align-items:center;display:flex;flex-direction:column;height:100vh;margin-top:16rem"><svg width="84.70857142857143" height="64" viewBox="0 0 20 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity="0.4" d="M15.3266 0L19.2641 1.82961e-06L11.9687 14L8.03125 14L15.3266 0Z" fill="url(#paint0_linear_1303_5)"></path><path d="M11.9692 1.82961e-06L8.03164 0L0.736328 14L4.67383 14L8.03164 7.55626V14H11.9691V8.38194e-05L11.9692 1.82961e-06Z" fill="url(#paint1_linear_1303_5)"></path><path d="M15.3269 2.57679e-06H19.2644V14H15.3269V2.57679e-06Z" fill="url(#paint2_linear_1303_5)"></path><defs><linearGradient id="paint0_linear_1303_5" x1="8.03125" y1="7" x2="19.2641" y2="7" gradientUnits="userSpaceOnUse"><stop offset="0.28125" stop-color="#7D55EC"></stop><stop offset="1" stop-color="#2AB2FE"></stop></linearGradient><linearGradient id="paint1_linear_1303_5" x1="0.736328" y1="7" x2="19.2644" y2="7" gradientUnits="userSpaceOnUse"><stop offset="0.28125" stop-color="#7D55EC"></stop><stop offset="1" stop-color="#2AB2FE"></stop></linearGradient><linearGradient id="paint2_linear_1303_5" x1="0.736328" y1="7" x2="19.2644" y2="7" gradientUnits="userSpaceOnUse"><stop offset="0.28125" stop-color="#7D55EC"></stop><stop offset="1" stop-color="#2AB2FE"></stop></linearGradient></defs></svg><div class="Spacing__SpacingStyle-sc-1mpmtgj-0 cAAVhx"><div class="Headline__HeadlineContainerStyle-sc-12jzt2e-0 dDWSWx"><h1 class="Headline__H1Style-sc-12jzt2e-2 wPqQh">404 - Page Not Found<!-- --></h1></div></div><p class="Text__TextStyle-sc-sl5nur-0 gjRqzz">You will be redirected to the Pipelines dashboard in <!-- -->5<!-- --> seconds.<!-- --></p></main><div id="command-center-root"></div><div></div><div></div><div></div><div class="ToastWrapper-sc-1a33ph1-0 kOVcuR"><div class="Toastify"></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{},"currentTheme":{"accent":{"alert":"#F6540B","blue":"#4877FF","blueLight":"rgba(72, 119, 255, 0.5)","contentDefaultTransparent":"rgba(174, 174, 174, 0.5)","cyan":"#65E3FF","cyanLight":"rgba(101, 227, 255, 0.3)","cyanTransparent":"rgba(101, 227, 255, 0.12)","dbt":"#fc6949","dbtDark":"rgba(252, 105, 73, 0.3)","dbtLight":"rgba(252, 105, 73, 0.5)","info":"#00ABFF","infoTransparent":"rgba(0, 171, 255, 0.5)","negative":"#FF1E59","negativeTransparent":"rgba(255, 30, 89, 0.3)","pink":"#FF4FF8","pinkLight":"rgb(255, 79, 248, 0.5)","positive":"#00A81A","primaryTransparent":"rgba(155, 108, 167, 0.5)","purple":"#7D55EC","purpleLight":"rgba(125, 85, 236, 0.5)","rose":"#D1A2AB","roseLight":"rgba(209, 162, 171, 0.5)","sky":"#6AA1E0","skyLight":"rgba(106, 161, 224, 0.5)","teal":"#00B4CC","tealLight":"rgba(0, 180, 204, 0.5)","warning":"#DD9900","warningTransparent":"rgba(221, 153, 0, 0.5)","yellow":"#FFCC19","yellowLight":"rgba(255, 204, 25, 0.5)"},"background":{"blackTransparent":"rgba(0, 0, 0, 0.6)","blackTransparentDark":"rgba(0, 0, 0, 0.8)","chartBlock":"#2E3036","codeArea":"#1E1F24","codeTextarea":"#000000","content":"#1B1C20","danger":"#FFD0DB","dark":"#B1B8C3","dashboard":"#18181C","dashboardTransparent":"rgba(24, 24, 28, 0.1)","header":"#1B1B1B","menu":"#0F4CFF","muted":"#F9FAFC","navigation":"#EDEDED","output":"#2E3036","page":"#1E1F24","panel":"#232429","panelTransparent":"rgba(35, 36, 41, 0.7)","popup":"#27292E","row":"#2C2C2C","row2":"#51535C","scrollbarThumb":"rgba(100, 100, 100, 0.5)","scrollbarThumbHover":"rgba(255, 255, 255, 0.3)","scrollbarTrack":"#2E3036","success":"#8ADE00","successLight":"rgb(138, 222, 0, 0.3)","table":"#292A2F","tag":"#3A4550"},"borders":{"button":"#454850","contrast":"#FFFFFF","danger":"#FF144D","dark":"#000000","darkLight":"#2E3036","info":"#FFCC19","light":"#2F3034","medium":"#1C1C1C","medium2":"#141414","success":"#2FCB52"},"brand":{"earth100":"#C6EEDB","earth200":"#9DDFBF","earth300":"#6BBF96","earth400":"#37A46F","earth400Transparent":"rgba(55, 164, 111, 0.4)","earth500":"#00954C","energy100":"#FFF4BA","energy200":"#FFED92","energy300":"#FFE662","energy400":"#FFDA19","energy400Transparent":"rgba(255, 218, 25, 0.04)","energy500":"#F6C000","fire100":"#FFD7E0","fire200":"#FFA3B9","fire300":"#FF547D","fire400":"#FF144D","fire400Transparent":"rgba(255, 20, 77, 0.4)","fire500":"#EB0032","stone100":"#F3E6D7","stone200":"#E3D4C2","stone400":"#BFA78B","stone500":"#AF8859","water100":"#BDCEFF","water200":"#81A1FF","water300":"#517DFF","water400":"#2A60FE","water400Transparent":"rgba(42, 96, 254, 0.4)","water500":"#0F4CFF","wind100":"#EEEAFF","wind200":"#CCC1F4","wind300":"#A698DD","wind400":"#6B50D7","wind400SuperTransparent":"rgba(107, 80, 215, 0.12)","wind400Transparent":"rgba(107, 80, 215, 0.4)","wind500":"#4E32BC"},"chart":{"backgroundPrimary":"#7D55EC","backgroundSecondary":"#FF144D","backgroundTertiary":"#86E2FF","button1":"#4877FF","button2":"#FFCC19","button3":"#8ADE00","button4":"#FF4FF8","button5":"#B98D95","lines":"#9B6CA7","primary":"#6B50D7","secondary":"#FF144D","tertiary":"#2A60FE"},"content":{"active":"#FFFFFF","default":"#AEAEAE","disabled":"rgba(255, 255, 255, 0.3)","inverted":"#2C2C2C","muted":"#787A85"},"elevation":{"visualizationAccent":"#996CFF","visualizationAccentAlt":"#C1ACF7"},"feature":{"active":"rgba(250, 248, 254, 0.14)","disabled":"rgba(201, 206, 218, 0.12)"},"icons":{"neutral":"#787878"},"interactive":{"activeBorder":"#060606","blackBackgroundTransparent":"rgba(0, 0, 0, 0.5)","checked":"#060606","dangerBorder":"#FF144D","defaultBackground":"#36383F","defaultBackgroundTransparent":"rgba(54, 56, 63, 0.5)","defaultBorder":"#ffffff1a","disabledBorder":"#B1B8C3","focusBackground":"#B1B8C3","focusBorder":"#86E2FF","hoverBackground":"#4E4E4E","hoverBackgroundTransparent":"rgba(78, 78, 78, 0.5)","hoverBlackBackgroundTransparent":"rgba(0, 0, 0, 0.7)","hoverBorder":"#B9BFCA","hoverOverlay":"rgba(255, 255, 255, 0.1)","linkPrimary":"#1752FF","linkPrimaryHover":"#4877FF","linkPrimaryLight":"#5982ff","linkSecondary":"#6B50D7","linkSecondaryDisabled":"#C4B9EF","linkText":"#6AA1E0","linkTextLight":"#9ECBFF","purple":"#885EFF","rowHoverBackground":"rgba(0, 0, 0, 0.1)","transparent":"rgba(255, 255, 255, 0)"},"loader":{"color":"#EB0032","colorInverted":"#8ADE00"},"logo":{"color":"#FFFFFF"},"monotone":{"black":"#060606","blackTransparent":"rgba(0, 0, 0, 0.6)","gray":"#B1B8C3","grey100":"#F2F2F2","grey200":"#D5D7DC","grey300":"#B4B8C0","grey400":"#70747C","grey500":"#51535C","purple":"#6B50D7","white":"#FFFFFF","whiteTransparent":"rgba(255, 255, 255, 0.6)"},"neutral":{"n100":"#E7E8EA","n200":"#D8DADE","n300":"#CBCCD0","n400":"#BCBEC4","n500":"#AEB0B6"},"progress":{"negative":"#FF144D","positive":"#6B50D7"},"shadow":{"base":"12px 40px 120px rgba(0, 0, 0, 0.3)","frame":"0px 10px 40px rgba(0, 0, 0, 0.26)","menu":"4px 10px 20px rgba(6, 6, 6, 0.12)","popup":"10px 20px 40px rgba(0, 0, 0, 0.2)","small":"0px, 4px, rgba(0, 0, 0, 0.25)","window":"0px 10px 60px rgba(0, 0, 0, 0.7)"},"status":{"negative":"#FF144D","positive":"#24B400"},"text":{"fileBrowser":"#787A85"}}},"page":"/404","query":{},"buildId":"RhDiJSkcjCsh4xxX4BFBk","nextExport":true,"isFallback":false,"appGip":true,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST=function(s,e,i,a,t,c,n,p,l,g,u,r,o,f,
|
|
1
|
+
self.__BUILD_MANIFEST=function(s,e,i,a,t,c,n,p,l,g,u,r,o,k,d,f,b,h,j,m,w,_,v,y,I,B,F,A,D,E,L){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":["static/chunks/pages/index-4e12783b064c1cfe.js"],"/404":["static/chunks/pages/404-8ecd93274c427b76.js"],"/_error":["static/chunks/pages/_error-e989623bffcbf724.js"],"/block-layout":[l,a,t,g,o,u,k,m,"static/chunks/pages/block-layout-14f952f66964022f.js"],"/compute":[s,v,"static/chunks/pages/compute-010d9ac728f8a517.js"],"/files":[s,"static/chunks/pages/files-98df0674eac4ec84.js"],"/global-data-products":[s,c,d,y,"static/chunks/pages/global-data-products-78e8e88f2a757a18.js"],"/global-data-products/[...slug]":[s,c,d,y,"static/chunks/pages/global-data-products/[...slug]-591abd392dc50ed4.js"],"/global-hooks":[s,f,"static/chunks/pages/global-hooks-34966cfd2d89c366.js"],"/global-hooks/[...slug]":[s,f,"static/chunks/pages/global-hooks/[...slug]-fbc51d79d3196fa2.js"],"/manage":[s,n,b,"static/chunks/pages/manage-4bfc84ff07d7656f.js"],"/manage/files":[s,n,"static/chunks/pages/manage/files-f15a685682b1037b.js"],"/manage/settings":[s,n,"static/chunks/pages/manage/settings-52a597d0c674907a.js"],"/manage/users":[s,n,"static/chunks/pages/manage/users-b2896118903236c5.js"],"/manage/users/new":[s,n,"static/chunks/pages/manage/users/new-d0a403e8920104d2.js"],"/manage/users/[user]":[s,n,"static/chunks/pages/manage/users/[user]-8bbfa0c19b5e4cb3.js"],"/oauth":[s,"static/chunks/pages/oauth-30e34ee15d410331.js"],"/overview":[l,a,t,g,o,s,r,u,k,h,m,w,I,B,"static/chunks/pages/overview-597b74828bf105db.js"],"/pipeline-runs":[s,c,b,"static/chunks/pages/pipeline-runs-6d183f91a2ff6668.js"],"/pipelines":[s,r,b,h,w,I,"static/chunks/pages/pipelines-3591d035bb3bb2b8.js"],"/pipelines/[pipeline]":["static/chunks/pages/pipelines/[pipeline]-91a5d6a11e7d4c56.js"],"/pipelines/[pipeline]/backfills":[s,e,"static/chunks/pages/pipelines/[pipeline]/backfills-38e1fbcfbfc1014e.js"],"/pipelines/[pipeline]/backfills/[...slug]":[p,j,s,e,c,"static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-7181b086c93784d2.js"],"/pipelines/[pipeline]/dashboard":[l,a,t,g,o,s,e,u,k,m,"static/chunks/pages/pipelines/[pipeline]/dashboard-95ffcd3e2b27e567.js"],"/pipelines/[pipeline]/edit":[l,a,t,p,g,o,s,r,u,k,h,w,F,v,"static/chunks/pages/pipelines/[pipeline]/edit-b645a6d13ab9fe3a.js"],"/pipelines/[pipeline]/logs":[j,s,e,"static/chunks/pages/pipelines/[pipeline]/logs-3f5c14076ddde20e.js"],"/pipelines/[pipeline]/monitors":[a,t,s,e,B,"static/chunks/pages/pipelines/[pipeline]/monitors-7acc7afc00df17c2.js"],"/pipelines/[pipeline]/monitors/block-runs":[a,t,s,e,"static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-a5c0362763a21fa8.js"],"/pipelines/[pipeline]/monitors/block-runtime":[l,a,t,"static/chunks/9832-67896490f6e8a014.js",s,e,"static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-1ed9045b2f1dfd65.js"],"/pipelines/[pipeline]/runs":[p,s,e,c,"static/chunks/pages/pipelines/[pipeline]/runs-6dae38250e135c54.js"],"/pipelines/[pipeline]/runs/[run]":[a,p,g,s,e,u,F,"static/chunks/pages/pipelines/[pipeline]/runs/[run]-1417ad1c821d720a.js"],"/pipelines/[pipeline]/settings":[s,e,"static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js"],"/pipelines/[pipeline]/syncs":[s,e,"static/chunks/pages/pipelines/[pipeline]/syncs-90abafc7ed61c582.js"],"/pipelines/[pipeline]/triggers":[p,j,A,s,e,b,d,D,"static/chunks/pages/pipelines/[pipeline]/triggers-4612d15a65c35912.js"],"/pipelines/[pipeline]/triggers/[...slug]":[p,j,A,s,e,c,D,"static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-eb11c5390c982b49.js"],"/platform/global-hooks":[s,f,"static/chunks/pages/platform/global-hooks-c916c778b0764634.js"],"/platform/global-hooks/[...slug]":[s,f,"static/chunks/pages/platform/global-hooks/[...slug]-e187f4c2b4eccd00.js"],"/settings":["static/chunks/pages/settings-b39e5bca035dec41.js"],"/settings/account/profile":[s,i,_,"static/chunks/pages/settings/account/profile-3f0df3decc856ee9.js"],"/settings/platform/preferences":[s,i,"static/chunks/pages/settings/platform/preferences-32985f3f7c7dd3ab.js"],"/settings/platform/settings":[s,i,"static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js"],"/settings/workspace/permissions":[s,i,E,"static/chunks/pages/settings/workspace/permissions-e5a4d3d815cec25d.js"],"/settings/workspace/permissions/[...slug]":[s,i,E,"static/chunks/pages/settings/workspace/permissions/[...slug]-47b64ced27c24985.js"],"/settings/workspace/preferences":[s,i,"static/chunks/pages/settings/workspace/preferences-349af617d05f001b.js"],"/settings/workspace/roles":[s,i,L,"static/chunks/pages/settings/workspace/roles-36fa165a48af586b.js"],"/settings/workspace/roles/[...slug]":[s,i,L,"static/chunks/pages/settings/workspace/roles/[...slug]-379e1ee292504842.js"],"/settings/workspace/sync-data":[s,i,"static/chunks/pages/settings/workspace/sync-data-60d01d3887e31136.js"],"/settings/workspace/users":[s,i,_,"static/chunks/pages/settings/workspace/users-a4db8710f703c729.js"],"/settings/workspace/users/[...slug]":[s,i,_,"static/chunks/pages/settings/workspace/users/[...slug]-2af9afbe727d88aa.js"],"/sign-in":[s,"static/chunks/pages/sign-in-09414a8b66fb6f06.js"],"/templates":[s,r,h,"static/chunks/pages/templates-05a5312f50db749c.js"],"/templates/[...slug]":[s,r,"static/chunks/pages/templates/[...slug]-98a34c313012fc10.js"],"/terminal":[s,"static/chunks/pages/terminal-89e1b3e6799378a5.js"],"/test":["static/chunks/pages/test-bd51b3918b39329e.js"],"/triggers":[s,d,"static/chunks/pages/triggers-a599c6ac89be8c8d.js"],"/version-control":[s,"static/chunks/pages/version-control-3433c8b22e8342aa.js"],sortedPages:["/","/404","/_app","/_error","/block-layout","/compute","/files","/global-data-products","/global-data-products/[...slug]","/global-hooks","/global-hooks/[...slug]","/manage","/manage/files","/manage/settings","/manage/users","/manage/users/new","/manage/users/[user]","/oauth","/overview","/pipeline-runs","/pipelines","/pipelines/[pipeline]","/pipelines/[pipeline]/backfills","/pipelines/[pipeline]/backfills/[...slug]","/pipelines/[pipeline]/dashboard","/pipelines/[pipeline]/edit","/pipelines/[pipeline]/logs","/pipelines/[pipeline]/monitors","/pipelines/[pipeline]/monitors/block-runs","/pipelines/[pipeline]/monitors/block-runtime","/pipelines/[pipeline]/runs","/pipelines/[pipeline]/runs/[run]","/pipelines/[pipeline]/settings","/pipelines/[pipeline]/syncs","/pipelines/[pipeline]/triggers","/pipelines/[pipeline]/triggers/[...slug]","/platform/global-hooks","/platform/global-hooks/[...slug]","/settings","/settings/account/profile","/settings/platform/preferences","/settings/platform/settings","/settings/workspace/permissions","/settings/workspace/permissions/[...slug]","/settings/workspace/preferences","/settings/workspace/roles","/settings/workspace/roles/[...slug]","/settings/workspace/sync-data","/settings/workspace/users","/settings/workspace/users/[...slug]","/sign-in","/templates","/templates/[...slug]","/terminal","/test","/triggers","/version-control"]}}("static/chunks/1557-b3502f3f1aa92ac7.js","static/chunks/3782-ef4cd4f0b52072d0.js","static/chunks/5699-6d708c6b2153ea08.js","static/chunks/125-abc06c39b97fd8aa.js","static/chunks/2714-68fef54789d7eaeb.js","static/chunks/7966-b9b85ba10667e654.js","static/chunks/1598-3070ba5a71ce3e2d.js","static/chunks/9161-837b653aa849a76f.js","static/chunks/29107295-989a0767a635d9d5.js","static/chunks/2631-b9f9bea3f1cf906d.js","static/chunks/8095-bdce03896ef9639a.js","static/chunks/4241-4499461184ba0d23.js","static/chunks/4783-422429203610c318.js","static/chunks/635-0d6b7c8804bcd2dc.js","static/chunks/9624-8b8e100079ab69e1.js","static/chunks/1187-c9537b3f51775d0c.js","static/chunks/5544-d10ee8ec70354aa1.js","static/chunks/523-be11ad59861d00ca.js","static/chunks/7674-5f8f0882b3411d98.js","static/chunks/9440-4069842b90d4b801.js","static/chunks/3548-9d26185b3fb663b1.js","static/chunks/7361-8a23dd8360593e7a.js","static/chunks/3366-526b00bb494c02a4.js","static/chunks/3763-61b542dafdbf5754.js","static/chunks/5627-237a3de578538022.js","static/chunks/5831-2abc4063e887a03e.js","static/chunks/9265-d2a1aaec75ec69b8.js","static/chunks/26-38bc9380422f3900.js","static/chunks/2717-d9200be634dd6766.js","static/chunks/8146-6bed4e7401e067e6.js","static/chunks/7022-0d52dd8868621fb0.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
|
@@ -0,0 +1 @@
|
|
|
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 m(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 x(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(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 m=e.bold,j=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:m,danger:j,default:!m,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:j,defaultTextColor:!m,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(),x(x({},b),{},{key:"breadcrumb-link-".concat(O),passHref:!0}),(0,v.jsx)(c.Z,{block:!0,default:!m,noOutline:!0,sameColorAsText:m,children:z})):M&&(z=(0,v.jsx)(c.Z,{block:!0,default:!m,noOutline:!0,onClick:M,preventDefault:!0,sameColorAsText:m,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 Qe}});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),m=t(58036),x=t(97618),j=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),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),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;"],E.w5,2*A.iI,I.Mz),U=t(4383),R=t(72619),W=t(86735),G=t(50178),Y=t(28598);function V(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 q(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?V(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):V(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var J={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)(),m=p[0],x=p[1],g=(0,s.useState)(),D=g[0],S=g[1],I=(0,s.useState)(),E=I[0],A=I[1],V=z.ZP.git_branches.list({include_remote_branches:1}),Q=V.data,$=V.isValidating,K=V.mutate,X=(0,s.useMemo)((function(){return null===Q||void 0===Q?void 0:Q.git_branches}),[Q]),ee=z.ZP.syncs.list().data,ne=(0,s.useMemo)((function(){var e;if(ee)return null===(e=ee.syncs)||void 0===e?void 0:e[0]}),[ee]),te=(0,y.Db)(z.ZP.git_branches.useCreate(),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(){K(),window.location.reload()},onErrorCallback:function(e){var n=e.error.exception;S(n)}})}}),ie=(0,l.Z)(te,2),re=ie[0],le=ie[1].isLoading,oe=(0,y.Db)((function(){return z.ZP.git_branches.useUpdate(encodeURIComponent(t))({git_branch:{action_type:"status"}})}),{onSuccess:function(e){return(0,R.wD)(e,{onErrorCallback:function(e){var n=e.error.exception;S(n)}})}}),ce=(0,l.Z)(oe,1)[0],ae=(0,y.Db)(z.ZP.git_branches.useUpdate(encodeURIComponent(t)),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(){S(null),x("DONE")},onErrorCallback:function(e){var n=e.error.exception;S(n)}})}}),se=(0,l.Z)(ae,2),de=se[0],ue=se[1].isLoading,he=(0,y.Db)(z.ZP.git_branches.useUpdate(encodeURIComponent(t)),{onSuccess:function(e){return(0,R.wD)(e,{callback:function(){S(null),window.location.reload()},onErrorCallback:function(e){var n=e.error.exception;S(n)}})}}),fe=(0,l.Z)(he,2),ve=fe[0],pe=fe[1].isLoading,me=(0,s.useState)(),xe=me[0],je=me[1],ge=(0,s.useState)([]),be=ge[0],ye=ge[1],Ze=(0,s.useState)([]),Ce=Ze[0],Me=Ze[1],Fe=(0,s.useCallback)((function(){ce().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),ye(l),Me(r)}))}),[ce]),Oe=(0,s.useMemo)((function(){return le||ue||pe}),[le,ue,pe]);(0,s.useEffect)((function(){$||Fe()}),[h,$,Fe]);var He=(0,s.useMemo)((function(){return(0,G.PR)()||{}}),[]),we=(0,s.useMemo)((function(){var e={term_name:null!==He&&void 0!==He&&He.id?"git_".concat(null===He||void 0===He?void 0:He.id):"git"};return null!==ne&&void 0!==ne&&ne.repo_path&&(e.cwd=null===ne||void 0===ne?void 0:ne.repo_path),e}),[null===ne||void 0===ne?void 0:ne.repo_path,He]),Pe=(0,b.ZP)((0,U.Ib)("terminal"),{shouldReconnect:function(){return!0}},"cwd"in we),ke=Pe.lastMessage,ze=Pe.sendMessage,_e=(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,W.Od)(t,(function(n){return n===e})):[e].concat(t),q(q({},n),{},{files:t})}))},small:!0},e)}),[r]),De=(0,s.useMemo)((function(){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(f.ZP,{onClick:function(){return o((function(e){return q(q({},e),{},{files:Ce.concat(be)})}))},children:"Include all changes"}),Ce&&Ce.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"})}),Ce.map(_e)]}),be&&be.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"})}),be.map(_e)]})]})}),[_e,Ce,be]),Se=(0,s.useMemo)((function(){return(0,Y.jsx)(M.Z,{p:2,children:Oe?(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 q(q({},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)(j.ZP,{children:[(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){de({git_branch:q({action_type:"commit"},r)}).then((function(){Fe(),o(null)}))},success:!0,children:"Commit"}),(0,Y.jsx)(M.Z,{mr:1}),(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){de({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(){re({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===ne||void 0===ne?void 0:ne.remote_repo_link})," to ",(0,Y.jsx)(H.ZP,{default:!0,inline:!0,children:null===ne||void 0===ne?void 0:ne.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(){ve({git_branch:{action_type:"clone"}})},primary:!0,children:"Clone"})]}),"pull"===h&&(0,Y.jsx)(f.ZP,{borderLess:!0,onClick:function(){ve({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),ve({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:!Oe&&(0,Y.jsxs)(Y.Fragment,{children:[!D&&m&&(0,Y.jsx)(H.ZP,{children:m}),D&&(0,Y.jsx)(H.ZP,{preWrap:!0,danger:!0,children:D})]})})]})})}),[Oe,h,D,ne,m,r,a,xe]),Ie=(0,s.useMemo)((function(){return(0,Y.jsx)(O.Z,{lastMessage:ke,sendMessage:ze})}),[ke,ze]);return(0,Y.jsxs)(T,{children:[(0,Y.jsxs)(L,{children:[(0,Y.jsx)(M.Z,{m:2,children:(0,Y.jsxs)(j.ZP,{children:[(0,Y.jsx)(C.Z,{beforeIcon:(0,Y.jsx)(_.Branch,{}),compact:!0,onChange:function(e){e.preventDefault(),re({git_branch:{name:e.target.value,remote:"mage-repo"}})},placeholder:"Select a branch",value:t,children:null===X||void 0===X?void 0:X.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),x(null),o(null)},value:h,children:[(0,Y.jsx)("option",{value:"",children:"Select an action"}),Object.entries(J).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)(j.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)(j.ZP,{children:[(0,Y.jsx)("div",{style:{width:"50%"},children:(0,Y.jsx)(B,{children:"commit"===h?De:(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:Ie}):Se})]})]})},$=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),me=["active","mountedCallback","time","timeZone"];function xe(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?xe(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xe(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,me),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,je(je({},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],m=f[1],x=(0,s.useState)((0,Oe.e)({includeSeconds:!0,timeZones:_e})),j=x[0],g=x[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,R.wD)(e,{onErrorCallback:function(e,n){return w({errors:n,response:e})}})}}),_=(0,l.Z)(P,1)[0],D=(0,s.useCallback)((function(){m((function(e){return!e}))}),[]),S=(0,s.useCallback)((function(e){C(e)}),[]),I=(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]),E=[{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(){I()}),1e3);return function(){return clearInterval(e)}}),[I]),(0,s.useEffect)((function(){I()}),[u,I]),j?(0,Y.jsx)(p.Z,{onClickOutside:function(){return m(!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:j.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:j.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:E.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),Ie=t(59457),Ee=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),Re=t(42122),We=t(66472),Ge=t(95924),Ye=t(69419),Ve=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 Qe=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],I=(0,s.useState)(!1),E=I[0],L=I[1],N=(0,s.useState)(!1),T=N[0],B=N[1],U=(0,s.useState)(null),R=U[0],W=U[1],V=(0,s.useState)(!1),q=V[0],J=V[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,Ie.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,me=(0,s.useMemo)((function(){return(null===ve||void 0===ve?void 0:ve.git_branch)||{}}),[ve]),xe=me.is_git_integration_enabled,je=me.name,ge=(0,Se.Z)().design,be=(0,Ee.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]),qe=(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]),Qe=!(0,Re.Qr)(null===ze||void 0===ze?void 0:ze.features_override);se.current=ze;var $e=(0,s.useCallback)((function(){qe?(0,We.WJ)():(L(!0),ke({features:Je(Je({},(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)}})))}),[qe,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&&!E,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,Ve.dd)((function(){return(0,Y.jsx)(Q,{branch:je,fetchBranch:pe})}),{},[je,pe],{background:!0,uuid:"git_actions"}),dn=(0,l.Z)(sn,2),un=dn[0],hn=(dn[1],(0,s.useMemo)((function(){return(null===je||void 0===je?void 0:je.length)>=21?"".concat(je.slice(0,21),"..."):je}),[je])),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,We.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)(m.Z,{children:(0,Y.jsxs)(j.ZP,{alignItems:"center",fullHeight:!0,justifyContent:"space-between",children:[(0,Y.jsxs)(x.Z,{alignItems:"center",children:[cn,(0,Y.jsx)(h.Z,{breadcrumbs:en})]}),!!ze&&!b&&(0,Y.jsxs)(x.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)(j.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:!E&&!qe,warning:E})}),(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:qe?"Command Center":E?"Launching Command Center":"Launch Command Center"}),Le.WH.OPEN===D&&(0,Y.jsx)(H.ZP,{muted:!0,noWrapping:!0,children:"Command Center launched"}),E&&(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})]}),qe&&(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)(x.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:un,sameColorAsText:!0,title:je,uuid:"Header/GitActions",children:(0,Y.jsxs)(j.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:Qe,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 W(null)},open:!0,style:{position:"relative"},children:(0,Y.jsxs)(j.ZP,{children:[(0,Y.jsx)(Te,{highlighted:0===R,onClick:function(){return W((function(e){return 0===e?null:0}))},onMouseEnter:function(){return W((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 W(null)},open:0===R,parentRef:ae,rightOffset:0,setConfirmationAction:ce,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: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)(j.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 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3548],{4015:function(e,n,t){t.d(n,{$b:function(){return s},I5:function(){return l},Nk:function(){return d},gI:function(){return a}});var i=t(25976),r=t(44897),o=t(42631),c=t(70515),d=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-h093u4-0"})([""," ",""],(function(e){return!e.width&&"\n width: ".concat(40*c.iI,"px;\n ")}),(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")})),l=i.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-h093u4-1"})(["padding:","px;"," ",""],2.5*c.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).dashboard,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-top-left-radius: ").concat(o.n_,"px;\n border-top-right-radius: ").concat(o.n_,"px;\n border-top: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.lightBackground&&"\n background-color: ".concat((e.theme.background||r.Z.background).panel,"\n ")})),a=i.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-h093u4-2"})(["align-items:center;justify-content:space-between;"," "," ",""],(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).dashboard,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-top: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n display: ").concat((null===e||void 0===e?void 0:e.display)||"flex",";\n padding-bottom: ").concat(1*c.iI+((null===e||void 0===e?void 0:e.paddingVerticalAddition)||0),"px;\n padding-left: ").concat(c.cd*c.iI,"px;\n padding-top: ").concat(1*c.iI+((null===e||void 0===e?void 0:e.paddingVerticalAddition)||0),"px;\n ")}),(function(e){return e.columnFlex&&"\n display: flex;\n flex-direction: column;\n "}),(function(e){return e.lightBackground&&"\n background-color: ".concat((e.theme.background||r.Z.background).panel,"\n ")})),s=i.default.div.withConfig({displayName:"indexstyle__FooterStyle",componentId:"sc-h093u4-3"})(["padding:","px ","px;"," ",""],2.5*c.iI,2*c.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).panel,";\n border-bottom-left-radius: ").concat(o.n_,"px;\n border-bottom-right-radius: ").concat(o.n_,"px;\n border-bottom: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.topBorder&&"\n border-top: 1px solid ".concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n ")}))},55729:function(e,n,t){t.d(n,{Z:function(){return M}});var i=t(82394),r=t(75582),o=t(82684),c=t(69864),d=t(71180),l=t(15338),a=t(97618),s=t(55485),u=t(85854),p=t(48670),v=t(65956),h=t(82359),m=t(88543),g=t(38276),f=t(30160),x=t(17488),j=t(69650),b=t(12468),Z=t(35686),_=t(77417),y=t(25976),k=t(44897),P=t(42631),w=t(70515),O=y.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],P.n_,w.cd*w.iI,(function(e){return"\n background-color: ".concat((e.theme.background||k.Z.background).codeArea,";\n ")})),C=t(72473),I=t(72191),B=t(70320),E=t(81728),N=t(42122),S=t(72619),A=t(23780),D=t(28598);function L(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 H(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var M=function(e){var n,t,y,k=e.cancelButtonText,P=e.contained,L=e.header,M=e.onCancel,F=e.onSaveSuccess,V=e.rootProject,T=(0,A.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),U=(0,r.Z)(T,1)[0],R=(0,o.useState)(null),q=R[0],z=R[1],G=(0,o.useState)(!1),K=G[0],W=G[1],Y=(0,_.Z)(),$=Y.fetchProjects,J=Y.project,Q=Y.projectPlatformActivated,X=Y.rootProject,ee=(0,o.useMemo)((function(){return V?X:J}),[J,X,V]),ne=ee||{},te=ne.name,ie=ne.openai_api_key,re=ne.project_uuid,oe=(0,o.useMemo)((function(){return"demo.mage.ai"===window.location.hostname}),[]);(0,o.useEffect)((function(){q||z(ee)}),[ee,q]);var ce=(0,c.Db)(Z.ZP.projects.useUpdate(te),{onSuccess:function(e){return(0,S.wD)(e,{callback:function(e){var n,t=e.project;$(),z(t),W(!1),(0,B.hY)(null===t||void 0===t||null===(n=t.features)||void 0===n?void 0:n[h.d.LOCAL_TIMEZONE]),F&&(null===F||void 0===F||F(t))},onErrorCallback:function(e,n){return U({errors:n,response:e})}})}}),de=(0,r.Z)(ce,2),le=de[0],ae=de[1].isLoading,se=(0,o.useCallback)((function(e){return le({project:H(H({},e),{},{root_project:V})})}),[V,le]),ue=(0,D.jsxs)(D.Fragment,{children:[L,(0,D.jsxs)(v.Z,{noPadding:!0,children:[(0,D.jsxs)(g.Z,{p:w.cd,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"Project name"})}),(0,D.jsx)(f.ZP,{default:!0,monospace:!0,children:te})]}),(0,D.jsx)(l.Z,{light:!0}),(0,D.jsxs)(g.Z,{p:w.cd,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"Project UUID"})}),(0,D.jsx)(f.ZP,{default:!!re,monospace:!0,muted:!re,children:re||"Not required"})]}),(0,D.jsx)(l.Z,{light:!0}),(0,D.jsx)(g.Z,{p:w.cd,children:(0,D.jsxs)(s.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,D.jsxs)(a.Z,{flexDirection:"column",children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"Help improve Mage"})}),(0,D.jsxs)(f.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,D.jsx)(p.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,D.jsx)(g.Z,{mr:w.cd}),(0,D.jsx)(j.Z,{checked:null===q||void 0===q?void 0:q.help_improve_mage,compact:!0,id:"help_improve_mage_toggle",onCheck:function(){return z((function(e){return H(H({},e),{},{help_improve_mage:!(null!==q&&void 0!==q&&q.help_improve_mage)})}))}})]})})]}),(0,D.jsx)(g.Z,{mt:w.HN}),(0,D.jsx)(m.Z,{description:"Global settings that are applied to all pipelines in this project.",title:"Pipeline settings",children:(0,D.jsx)(m.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===q||void 0===q||null===(n=q.pipelines)||void 0===n||null===(t=n.settings)||void 0===t||null===(y=t.triggers)||void 0===y||!y.save_in_code_automatically),onCheck:function(e){return z((function(n){var t,i,r,o,c,d;return H(H({},n),{},{pipelines:H(H({},null===n||void 0===n?void 0:n.pipelines),{},{settings:H(H({},null===n||void 0===n||null===(t=n.pipelines)||void 0===t?void 0:t.settings),{},{triggers:H(H({},null===n||void 0===n||null===(i=n.pipelines)||void 0===i||null===(r=i.settings)||void 0===r?void 0:r.triggers),{},{save_in_code_automatically:e(null===n||void 0===n||null===(o=n.pipelines)||void 0===o||null===(c=o.settings)||void 0===c||null===(d=c.triggers)||void 0===d?void 0:d.save_in_code_automatically)})})})})}))}}})}),(0,D.jsx)(g.Z,{mt:w.HN}),(0,D.jsx)(v.Z,{noPadding:!0,overflowVisible:!0,children:(0,D.jsxs)(g.Z,{p:w.cd,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"Features"})}),Object.entries((0,N.gR)(null===q||void 0===q?void 0:q.features,[h.d.CODE_BLOCK_V2])||{}).map((function(e,n){var t=(0,r.Z)(e,2),o=t[0],c=t[1],d=Q&&!V&&(null===ee||void 0===ee?void 0:ee.features_override)&&o in(null===ee||void 0===ee?void 0:ee.features_override);return(0,D.jsx)(g.Z,{mt:0===n?0:1,children:(0,D.jsxs)(s.ZP,{alignItems:"center",children:[(0,D.jsxs)(a.Z,{flex:1,children:[(0,D.jsx)(j.Z,{disabled:d,checked:!!c,compact:!0,onCheck:function(){return z((function(e){return H(H({},e),{},{features:H(H({},null===q||void 0===q?void 0:q.features),{},(0,i.Z)({},o,!c))})}))}}),(0,D.jsx)(g.Z,{mr:w.cd}),(0,D.jsxs)(a.Z,{children:[(0,D.jsx)(f.ZP,{default:!c,monospace:!0,children:(0,E.vg)(o)}),o===h.d.LOCAL_TIMEZONE&&(0,D.jsx)(g.Z,{ml:1,children:(0,D.jsx)(b.Z,H({},B.EB))})]})]}),d&&(0,D.jsx)(f.ZP,{monospace:!0,muted:!0,small:!0,children:"overridden"})]})},o)}))]})}),(0,D.jsx)(g.Z,{mt:w.HN}),(0,D.jsx)(v.Z,{noPadding:!0,children:(0,D.jsxs)(g.Z,{p:w.cd,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"OpenAI"})}),ie&&!K?(0,D.jsxs)(s.ZP,H(H({},s.A0),{},{children:[(0,D.jsx)(f.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,D.jsx)(d.ZP,{iconOnly:!0,onClick:function(){return W(!0)},secondary:!0,title:"Edit",children:(0,D.jsx)(C.Edit,{size:I.bL})})]})):(0,D.jsx)(x.Z,{disabled:oe,label:oe?"Entering API key is disabled on demo":"API key",monospace:!0,onChange:function(e){return z((function(n){return H(H({},n),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===q||void 0===q?void 0:q.openai_api_key)||""})]})}),(0,D.jsx)(g.Z,{mt:w.HN}),(0,D.jsxs)(s.ZP,{alignItems:"center",children:[(0,D.jsx)(d.ZP,{id:"save-project-settings",loading:ae,onClick:function(){var e={features:null===q||void 0===q?void 0:q.features,help_improve_mage:null===q||void 0===q?void 0:q.help_improve_mage,openai_api_key:null===q||void 0===q?void 0:q.openai_api_key,pipelines:null===q||void 0===q?void 0:q.pipelines};!0===(null===ee||void 0===ee?void 0:ee.help_improve_mage)&&!1===(null===q||void 0===q?void 0:q.help_improve_mage)&&(e.deny_improve_mage=!0),se(e)},primary:!0,children:"Save project settings"}),M&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(g.Z,{mr:w.cd}),(0,D.jsx)(d.ZP,{onClick:M,secondary:!0,children:k||"Cancel"})]})]})]});return P?(0,D.jsx)(O,{children:ue}):ue}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3548],{4015:function(e,n,t){t.d(n,{$b:function(){return s},I5:function(){return l},Nk:function(){return d},gI:function(){return a}});var i=t(25976),o=t(44897),r=t(42631),c=t(70515),d=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-h093u4-0"})([""," ",""],(function(e){return!e.width&&"\n width: ".concat(40*c.iI,"px;\n ")}),(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")})),l=i.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-h093u4-1"})(["padding:","px;"," ",""],2.5*c.iI,(function(e){return"\n background-color: ".concat((e.theme.background||o.Z.background).dashboard,";\n border-left: 1px solid ").concat((e.theme.interactive||o.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||o.Z.interactive).defaultBorder,";\n border-top-left-radius: ").concat(r.n_,"px;\n border-top-right-radius: ").concat(r.n_,"px;\n border-top: 1px solid ").concat((e.theme.interactive||o.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.lightBackground&&"\n background-color: ".concat((e.theme.background||o.Z.background).panel,"\n ")})),a=i.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-h093u4-2"})(["align-items:center;justify-content:space-between;"," "," ",""],(function(e){return"\n background-color: ".concat((e.theme.background||o.Z.background).dashboard,";\n border-left: 1px solid ").concat((e.theme.interactive||o.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||o.Z.interactive).defaultBorder,";\n border-top: 1px solid ").concat((e.theme.interactive||o.Z.interactive).defaultBorder,";\n display: ").concat((null===e||void 0===e?void 0:e.display)||"flex",";\n padding-bottom: ").concat(1*c.iI+((null===e||void 0===e?void 0:e.paddingVerticalAddition)||0),"px;\n padding-left: ").concat(c.cd*c.iI,"px;\n padding-top: ").concat(1*c.iI+((null===e||void 0===e?void 0:e.paddingVerticalAddition)||0),"px;\n ")}),(function(e){return e.columnFlex&&"\n display: flex;\n flex-direction: column;\n "}),(function(e){return e.lightBackground&&"\n background-color: ".concat((e.theme.background||o.Z.background).panel,"\n ")})),s=i.default.div.withConfig({displayName:"indexstyle__FooterStyle",componentId:"sc-h093u4-3"})(["padding:","px ","px;"," ",""],2.5*c.iI,2*c.iI,(function(e){return"\n background-color: ".concat((e.theme.background||o.Z.background).panel,";\n border-bottom-left-radius: ").concat(r.n_,"px;\n border-bottom-right-radius: ").concat(r.n_,"px;\n border-bottom: 1px solid ").concat((e.theme.interactive||o.Z.interactive).defaultBorder,";\n border-left: 1px solid ").concat((e.theme.interactive||o.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||o.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.topBorder&&"\n border-top: 1px solid ".concat((e.theme.interactive||o.Z.interactive).defaultBorder,";\n ")}))},55729:function(e,n,t){t.d(n,{Z:function(){return M}});var i=t(82394),o=t(75582),r=t(82684),c=t(69864),d=t(71180),l=t(15338),a=t(97618),s=t(55485),u=t(85854),p=t(48670),v=t(65956),h=t(82359),m=t(88543),g=t(38276),f=t(30160),x=t(17488),j=t(69650),b=t(12468),Z=t(35686),_=t(77417),y=t(25976),k=t(44897),P=t(42631),w=t(70515),O=y.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],P.n_,w.cd*w.iI,(function(e){return"\n background-color: ".concat((e.theme.background||k.Z.background).codeArea,";\n ")})),C=t(72473),I=t(72191),N=t(70320),S=t(81728),B=t(42122),E=t(72619),A=t(23780),D=t(28598);function L(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 H(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var M=function(e){var n,t,y,k=e.cancelButtonText,P=e.contained,L=e.header,M=e.onCancel,F=e.onSaveSuccess,V=e.rootProject,T=(0,A.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),U=(0,o.Z)(T,1)[0],R=(0,r.useState)(null),W=R[0],q=R[1],z=(0,r.useState)(!1),G=z[0],K=z[1],Y=(0,_.Z)(),$=Y.fetchProjects,J=Y.project,Q=Y.projectPlatformActivated,X=Y.rootProject,ee=(0,r.useMemo)((function(){return V?X:J}),[J,X,V]),ne=ee||{},te=ne.name,ie=ne.openai_api_key,oe=ne.project_uuid,re=(0,r.useMemo)((function(){return"demo.mage.ai"===window.location.hostname}),[]);(0,r.useEffect)((function(){W||q(ee)}),[ee,W]);var ce=(0,c.Db)(Z.ZP.projects.useUpdate(te),{onSuccess:function(e){return(0,E.wD)(e,{callback:function(e){var n,t=e.project;$(),q(t),K(!1),(0,N.hY)(null===t||void 0===t||null===(n=t.features)||void 0===n?void 0:n[h.d.LOCAL_TIMEZONE]),F&&(null===F||void 0===F||F(t))},onErrorCallback:function(e,n){return U({errors:n,response:e})}})}}),de=(0,o.Z)(ce,2),le=de[0],ae=de[1].isLoading,se=(0,r.useCallback)((function(e){return le({project:H(H({},e),{},{root_project:V})})}),[V,le]),ue=(0,D.jsxs)(D.Fragment,{children:[L,(0,D.jsxs)(v.Z,{noPadding:!0,children:[(0,D.jsxs)(g.Z,{p:w.cd,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"Project name"})}),(0,D.jsx)(f.ZP,{default:!0,monospace:!0,children:te})]}),(0,D.jsx)(l.Z,{light:!0}),(0,D.jsxs)(g.Z,{p:w.cd,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"Project UUID"})}),(0,D.jsx)(f.ZP,{default:!!oe,monospace:!0,muted:!oe,children:oe||"Not required"})]}),(0,D.jsx)(l.Z,{light:!0}),(0,D.jsx)(g.Z,{p:w.cd,children:(0,D.jsxs)(s.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,D.jsxs)(a.Z,{flexDirection:"column",children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"Help improve Mage"})}),(0,D.jsxs)(f.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,D.jsx)(p.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,D.jsx)(g.Z,{mr:w.cd}),(0,D.jsx)(j.Z,{checked:null===W||void 0===W?void 0:W.help_improve_mage,compact:!0,id:"help_improve_mage_toggle",onCheck:function(){return q((function(e){return H(H({},e),{},{help_improve_mage:!(null!==W&&void 0!==W&&W.help_improve_mage)})}))}})]})})]}),(0,D.jsx)(g.Z,{mt:w.HN}),(0,D.jsx)(m.Z,{description:"Global settings that are applied to all pipelines in this project.",title:"Pipeline settings",children:(0,D.jsx)(m.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===(n=W.pipelines)||void 0===n||null===(t=n.settings)||void 0===t||null===(y=t.triggers)||void 0===y||!y.save_in_code_automatically),onCheck:function(e){return q((function(n){var t,i,o,r,c,d;return H(H({},n),{},{pipelines:H(H({},null===n||void 0===n?void 0:n.pipelines),{},{settings:H(H({},null===n||void 0===n||null===(t=n.pipelines)||void 0===t?void 0:t.settings),{},{triggers:H(H({},null===n||void 0===n||null===(i=n.pipelines)||void 0===i||null===(o=i.settings)||void 0===o?void 0:o.triggers),{},{save_in_code_automatically:e(null===n||void 0===n||null===(r=n.pipelines)||void 0===r||null===(c=r.settings)||void 0===c||null===(d=c.triggers)||void 0===d?void 0:d.save_in_code_automatically)})})})})}))}}})}),(0,D.jsx)(g.Z,{mt:w.HN}),(0,D.jsx)(v.Z,{noPadding:!0,overflowVisible:!0,children:(0,D.jsxs)(g.Z,{p:w.cd,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsxs)(u.Z,{level:5,children:["Features\xa0",(0,D.jsx)(p.Z,{bold:!0,href:"https://docs.mage.ai/development/project/features",largeSm:!0,openNewWindow:!0,children:"(docs)"})]})}),Object.entries((0,B.gR)(null===W||void 0===W?void 0:W.features,[h.d.CODE_BLOCK_V2])||{}).map((function(e,n){var t=(0,o.Z)(e,2),r=t[0],c=t[1],d=Q&&!V&&(null===ee||void 0===ee?void 0:ee.features_override)&&r in(null===ee||void 0===ee?void 0:ee.features_override);return(0,D.jsx)(g.Z,{mt:0===n?0:1,children:(0,D.jsxs)(s.ZP,{alignItems:"center",children:[(0,D.jsxs)(a.Z,{flex:1,children:[(0,D.jsx)(j.Z,{disabled:d,checked:!!c,compact:!0,onCheck:function(){return q((function(e){return H(H({},e),{},{features:H(H({},null===W||void 0===W?void 0:W.features),{},(0,i.Z)({},r,!c))})}))}}),(0,D.jsx)(g.Z,{mr:w.cd}),(0,D.jsxs)(a.Z,{children:[(0,D.jsx)(f.ZP,{default:!c,monospace:!0,children:(0,S.vg)(r)}),r===h.d.LOCAL_TIMEZONE&&(0,D.jsx)(g.Z,{ml:1,children:(0,D.jsx)(b.Z,H({},N.EB))})]})]}),d&&(0,D.jsx)(f.ZP,{monospace:!0,muted:!0,small:!0,children:"overridden"})]})},r)}))]})}),(0,D.jsx)(g.Z,{mt:w.HN}),(0,D.jsx)(v.Z,{noPadding:!0,children:(0,D.jsxs)(g.Z,{p:w.cd,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(u.Z,{level:5,children:"OpenAI"})}),ie&&!G?(0,D.jsxs)(s.ZP,H(H({},s.A0),{},{children:[(0,D.jsx)(f.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,D.jsx)(d.ZP,{iconOnly:!0,onClick:function(){return K(!0)},secondary:!0,title:"Edit",children:(0,D.jsx)(C.Edit,{size:I.bL})})]})):(0,D.jsx)(x.Z,{disabled:re,label:re?"Entering API key is disabled on demo":"API key",monospace:!0,onChange:function(e){return q((function(n){return H(H({},n),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===W||void 0===W?void 0:W.openai_api_key)||""})]})}),(0,D.jsx)(g.Z,{mt:w.HN}),(0,D.jsxs)(s.ZP,{alignItems:"center",children:[(0,D.jsx)(d.ZP,{id:"save-project-settings",loading:ae,onClick:function(){var e={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};!0===(null===ee||void 0===ee?void 0:ee.help_improve_mage)&&!1===(null===W||void 0===W?void 0:W.help_improve_mage)&&(e.deny_improve_mage=!0),se(e)},primary:!0,children:"Save project settings"}),M&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(g.Z,{mr:w.cd}),(0,D.jsx)(d.ZP,{onClick:M,secondary:!0,children:k||"Cancel"})]})]})]});return P?(0,D.jsx)(O,{children:ue}):ue}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
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.hidePipelineColumn,X=e.hideTriggerColumn,Q=e.includePipelineTags,q=e.onClickRow,J=e.pipelineRuns,$=e.selectedRun,W=e.selectedRuns,ee=e.setSelectedRun,ne=e.setSelectedRuns,te=e.setErrors,ie=(0,s.useRouter)(),re=(0,T.Ct)(),le=(0,B.qB)(),ue=(0,c.useRef)({}),oe=(0,c.useState)(null),ce=oe[0],se=oe[1],ae=(0,c.useState)(null),de=ae[0],pe=ae[1],fe=(0,c.useState)(null),he=fe[0],ve=fe[1],me=(0,c.useState)(0),ge=me[0],be=me[1],_e=(0,c.useState)(0),xe=_e[0],je=_e[1],Oe=(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(){se(null),null===N||void 0===N||N()},onErrorCallback:function(e,n){se(null),null===te||void 0===te||te({errors:n,response:e})}})}}),we=(0,r.Z)(Oe,2),ye=we[0],Pe=we[1].isLoading,Ze="PipelineDetail/Runs/Table",Ce="pipeline-runs",ke=(0,c.useCallback)((function(e){if(!e)return null;var n=J.findIndex((function(n){return n.id===e.id}));return n>=0?n:null}),[J]),Ee=(0,z.y)(),De=Ee.registerOnKeyDown,Ie=Ee.unregisterOnKeyDown;(0,c.useEffect)((function(){return function(){Ie(Ze)}}),[Ie,Ze]),De(Ze,(function(e,n){var t=n[E.Bu],i=n[E.kD];ee&&!_&&(t||i)&&ee((function(n){var r=ke(n);if(null!==r){if(e.repeat)return e.preventDefault(),n;if(t){var l=r-1;return l<0&&(l=J.length-1),J[l]}if(i){var u=r+1;return u>=J.length&&(u=0),J[u]}}return n}))}),[J,ee]),(0,c.useEffect)((function(){var e=ke($);if(null!==e){var n=(0,C.w4)({rowIndex:e,uuid:Ce}),t=document.getElementById(n);t&&t.scrollIntoView({behavior:"smooth",block:"center"})}}),[ke,$]);var Re=le?C.O$:{},Ne=[null,null,null,null],Le=[{uuid:"Status"},{center:!0,uuid:"Logs"},{center:!0,uuid:"ID"},{uuid:"Block runs"}];U||(Ne.push(1),Le.push({uuid:"Pipeline"})),X||(Ne.push(1),Le.push({uuid:"Trigger"})),Q&&(Ne.push(null),Le.push({uuid:"Pipeline tags"})),Ne.push.apply(Ne,[1,1,1,null,null]),Le.push.apply(Le,[K(K({},Re),{},{uuid:"Execution date"}),K(K({},Re),{},{uuid:"Started at"}),K(K({},Re),{},{uuid:"Completed at"}),{uuid:"Execution time"}]),t&&!re&&(Ne.push.apply(Ne,[null]),Le.push({label:function(){return""},uuid:"Delete"}));var Se=(0,c.useMemo)((function(){return J.every((function(e){var n=e.id;return!(null===W||void 0===W||!W[n])}))}),[J,W]);n&&(Ne.unshift(null),Le.unshift({label:function(){return(0,H.jsx)(d.Z,{checked:Se,onClick:function(){var e=(0,V.HK)(J||[],(function(e){return e.id}));ne(Se?{}:e)}})},uuid:"Selected"})),!y&&q&&(Ne.push(null),Le.push({label:function(){return""},uuid:"action"}));var Ve=(0,c.useCallback)((function(e,n){if(q&&ne&&n&&n.metaKey){var t=J[e];ne((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,J,ne]);return(0,H.jsx)(L.cl,{minHeight:30*I.iI,overflowVisible:!!de,children:0===(null===J||void 0===J?void 0:J.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:Ne,columns:Le,isSelectedRow:function(e){return!y&&J[e].id===(null===$||void 0===$?void 0:$.id)},onClickRow:y?null:Ve,rowVerticalPadding:6,rows:null===J||void 0===J?void 0:J.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;ue.current[w]=(0,c.createRef)();var T,F,B=!w&&!V,z="".concat(s," out of ").concat(o," block runs completed"),$=(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)),ee=[];r>0&&J[r-1].execution_date===e.execution_date&&J[r-1].pipeline_schedule_id===e.pipeline_schedule_id?(ee=[(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(),ie.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")],U||ee.push((0,H.jsx)(O.ZP,{default:!0,monospace:!0,muted:!0,children:R},"row_pipeline_uuid")),X||ee.push((0,H.jsx)(O.ZP,{default:!0,monospace:!0,muted:!0,children:"-"},"row_trigger_retry")),Q&&ee.push($),(T=ee).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,le):(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)(_,le):(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"}))])):(ee=[(0,H.jsx)(Y,{cancelingRunId:ce,disabled:B,isLoadingCancelPipeline:Pe,onCancel:ye,onSuccess:N,pipelineRun:e,setCancelingRunId:se,setErrors:te,setShowConfirmationId:pe,showConfirmationId:de},"row_retry_button"),(0,H.jsx)(a.ZP,{default:!0,disabled:B,iconOnly:!0,noBackground:!0,onClick:function(e){e.stopPropagation(),ie.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")],U||ee.push((0,H.jsx)(O.ZP,{default:!0,monospace:!0,children:R},"row_pipeline_uuid")),X||ee.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")),Q&&ee.push($),(F=ee).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,le):(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,le):(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)(_,le):(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&&!re&&ee.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),ve(w),be((null===(n=ue.current[w])||void 0===n||null===(t=n.current)||void 0===t?void 0:t.offsetTop)||0),je((null===(i=ue.current[w])||void 0===i||null===(r=i.current)||void 0===r?void 0:r.offsetLeft)||0)},ref:ue.current[w],title:"Delete",children:(0,H.jsx)(Z.Trash,{default:!0,size:k.bL})}),(0,H.jsx)(p.Z,{onClickOutside:function(){return ve(null)},open:he===w,children:(0,H.jsx)(g.Z,{danger:!0,left:(xe||0)-C.nH,onCancel:function(){return ve(null)},onClick:function(){ve(null),l(w)},title:"Are you sure you want to delete this run (id ".concat(w,' for trigger "').concat(D,'")?'),top:(ge||0)-(r<=1?C.oz:C.OK),width:C.Xx})})]})),n){var oe=!(null===W||void 0===W||!W[w]);ee.unshift((0,H.jsx)(d.Z,{checked:oe,onClick:function(n){n.stopPropagation(),ne((function(n){return K(K({},n),{},(0,i.Z)({},w,oe?null:e))}))}},"selected-pipeline-run-".concat(w)))}return!y&&q&&ee.push((0,H.jsx)(f.Z,{flex:1,justifyContent:"flex-end",children:(0,H.jsx)(Z.ChevronRight,{default:!0,size:k.bL})})),ee})),uuid:Ce})})}},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(" ")}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9624],{29624:function(e,n,t){t.d(n,{Z:function(){return Q}});var i=t(82394),l=t(75582),r=t(12691),u=t.n(r),o=t(82684),c=t(69864),s=t(34376),p=t(71180),d=t(50724),a=t(30160),h=t(44897),f=t(42631),g=t(70515),v=t(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||h.Z).background.dashboard}),(function(e){return(e.theme||h.Z).borders.darkLight}),f.n_,(function(e){return(e.theme||h.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),y=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||h.Z).background.panel}),(function(e){return(e.theme||h.Z).borders.darkLight})),j=t(72473),b=t(72191),m=t(79633),Z=t(81728),C=t(28598);var P=function(e){var n=e.inProgressRunsCount,t=e.left,i=void 0===t?0:t,l=e.onAllow,r=e.onStop,u=e.pipelineScheduleId,c=e.pipelineUuid,s=e.top,d=void 0===s?0:s,h=e.topOffset,f=void 0===h?0:h,v=(0,o.useRef)(null),P=(0,o.useState)(d+f),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+f+e>window.innerHeight;w(n?d-e:d+f)}),[i,d,f]),(0,C.jsxs)(_,{left:i,ref:v,top:k,children:[(0,C.jsxs)(x,{children:[(0,C.jsx)(j.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)(y,{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=t(55485),w=t(48670),I=t(30229),O=t(89515),S=t(38276),R=t(75499),E=t(48381),A=t(69650),D=t(12468),N=t(35686),T=t(77417),q=t(19698),L=t(81655),U=t(41143),z=t(31608),B=t(16488),V=t(3917),F=t(50178),H=t(72619),X=t(95924),$=t(70320),G=t(89538);function K(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?K(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):K(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var J=1.5*g.iI;var Q=function(e){var n=e.disableActions,t=e.fetchPipelineSchedules,i=e.highlightRowOnHover,r=e.includeCreatedAtColumn,h=e.includePipelineColumn,f=e.pipeline,v=e.pipelineSchedules,_=e.pipelineTriggersByName,x=e.selectedSchedule,y=e.setErrors,m=e.setSelectedSchedule,Z=e.stickyHeader,K=null===f||void 0===f?void 0:f.uuid,Q=(0,s.useRouter)(),W=(0,T.Z)().projectPlatformActivated,Y=(0,q.Z)().status,ee=(0,o.useRef)({}),ne=(0,o.useRef)({}),te=(0,o.useState)(null),ie=te[0],le=te[1],re=(0,o.useState)(0),ue=re[0],oe=re[1],ce=(0,o.useState)(0),se=ce[0],pe=ce[1],de=(0,$.qB)(),ae=de?L.O$:{},he=(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===t||void 0===t||t()},onErrorCallback:function(e,n){return null===y||void 0===y?void 0:y({errors:n,response:e})}})}}),fe=(0,l.Z)(he,1)[0],ge=(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===t||void 0===t||t()},onErrorCallback:function(e,n){return null===y||void 0===y?void 0:y({errors:n,response:e})}})}}),ve=(0,l.Z)(ge,1)[0],_e=(0,c.Db)((function(e){return N.ZP.pipeline_schedules.useDelete(e)()}),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(){null===t||void 0===t||t(),K?Q.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(K,"/triggers")):null===t||void 0===t||t()},onErrorCallback:function(e,n){return y({errors:n,response:e})}})}}),xe=(0,l.Z)(_e,1)[0],ye=[],je=[];n||(ye.push.apply(ye,[null]),je.push.apply(je,[{uuid:"Active"}])),ye.push.apply(ye,[1]),je.push.apply(je,[{uuid:"Name"}]),n||(ye.push.apply(ye,[null]),je.push.apply(je,[{center:!0,uuid:"Logs"}]),W&&(ye.push.apply(ye,[null]),je.push.apply(je,[{uuid:"Project"}])),h&&(ye.push.apply(ye,[1]),je.push.apply(je,[{uuid:"Pipeline"}])),ye.push.apply(ye,[null,null]),je.push.apply(je,[{uuid:"Type"},{uuid:"Frequency"}])),ye.push.apply(ye,[1,1,null,null]),je.push.apply(je,[{uuid:"Latest status"},M(M({},ae),{},{uuid:"Next run date"}),{uuid:"Runs"},{uuid:"Description"}]),n||(ye.push.apply(ye,[1]),je.push.apply(je,[{uuid:"Tags"}]),r&&(ye.push.apply(ye,[null]),je.push.apply(je,[M(M({},ae),{},{uuid:"Created at"})])),(0,F.Ct)()||(ye.push.apply(ye,[null]),je.push.apply(je,[{label:function(){return""},uuid:"edit/delete"}])));var be=(0,G.dd)((function(e){var n=e.inProgressRunsCount,t=e.left,i=e.pipelineScheduleId,l=e.pipelineUuid,r=e.top,u=e.topOffset;return(0,C.jsx)(P,{inProgressRunsCount:n,left:t,onAllow:function(e){Ce(),ve({id:e,status:I.fq.INACTIVE})},onStop:function(e,n){Ce(),fe({pipeline_schedule_id:e,status:U.V.CANCELLED,uuid:n}),ve({id:e,status:I.fq.INACTIVE})},pipelineScheduleId:i,pipelineUuid:l,top:r,topOffset:u})}),{},[],{background:!0,uuid:"disable_trigger"}),me=(0,l.Z)(be,2),Ze=me[0],Ce=me[1];return(0,C.jsx)(z.cl,{overflowVisible:!0,children:0===v.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:ye,columns:je,highlightRowOnHover:i,isSelectedRow:function(e){return v[e].id===(null===x||void 0===x?void 0:x.id)},onClickRow:m?function(e){return null===m||void 0===m?void 0:m(v[e])}:null,rowVerticalPadding:6,rows:v.map((function(e,t){var i=e.id,l=e.created_at,c=e.description,s=e.next_pipeline_run_date,f=e.pipeline_in_progress_runs_count,v=e.pipeline_runs_count,x=e.pipeline_uuid,y=e.last_pipeline_run_status,m=e.name,Z=e.repo_path,P=e.schedule_interval,R=e.status,N=e.tags,T=I.fq.ACTIVE===R,q=(0,B._U)(P),U=K||x;ee.current[i]=(0,o.createRef)(),ne.current[i]=(0,o.createRef)();var z=null!==_&&void 0!==_&&_[m]?(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)(j.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:m}),z]},"trigger_name_".concat(t))]):H.push.apply(H,[(0,C.jsx)(D.Z,{block:!0,label:R,size:20,widthFitContent:!0,children:(0,C.jsx)("div",{ref:ee.current[i],style:{position:"relative"},children:(0,C.jsx)(A.Z,{checked:T,compact:!0,onCheck:function(e){return function(e){var n=e.event,t=e.inProgressRunsCount,i=e.pipelineIsActive,l=e.pipelineScheduleId,r=e.pipelineUuid;if((0,X.j)(n),i&&t>0){var u,o=null===(u=ee.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;Ze({inProgressRunsCount:t,left:p,pipelineScheduleId:l,pipelineUuid:r,top:d,topOffset:s})}else ve({id:l,status:i?I.fq.INACTIVE:I.fq.ACTIVE})}({event:e,inProgressRunsCount:f,pipelineIsActive:T,pipelineScheduleId:i,pipelineUuid:x})},purpleBackground:!0})})},"trigger_enabled_".concat(t)),(0,C.jsxs)(k.ZP,{alignItems:"center",children:[(0,C.jsx)(u(),{as:"/pipelines/".concat(U,"/triggers/").concat(i),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,C.jsx)(w.Z,{bold:!0,onClick:function(e){(0,X.j)(e),Q.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(U,"/triggers/").concat(i))},sky:!0,children:m})}),z]},"trigger_name_".concat(t))]),!n){var $,G;if(H.push((0,C.jsx)(p.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return Q.push("/pipelines/".concat(U,"/logs?pipeline_schedule_id[]=").concat(i))},children:(0,C.jsx)(j.Logs,{default:!0,size:b.bL})},"logs_button_".concat(t))),W)H.push.apply(H,[(0,C.jsx)(a.ZP,{default:!0,monospace:!0,children:null===Z||void 0===Z||null===(G=Z.replace((null===Y||void 0===Y?void 0:Y.repo_path_root)||"",""))||void 0===G?void 0:G.slice(1)},"project_".concat(t))]);h&&H.push((0,C.jsx)(a.ZP,{default:!0,monospace:!0,children:U},"pipeline_name_".concat(t))),H.push.apply(H,[(0,C.jsx)(a.ZP,{default:!0,monospace:!0,children:null===($=I.Z4[e.schedule_type])||void 0===$?void 0:$.call(I.Z4)},"trigger_type_".concat(t)),(0,C.jsx)(a.ZP,{default:!0,monospace:!0,children:de&&q?(0,B.lO)(P):P},"trigger_frequency_".concat(t))])}return H.push.apply(H,[(0,o.createElement)(a.ZP,M(M({},(0,L.NC)(y)),{},{key:"latest_run_status_".concat(t)}),y||"\u2014"),(0,C.jsx)(a.ZP,{monospace:!0,small:!0,title:s?"UTC: ".concat(s.slice(0,19)):null,children:s?de?(0,V.XG)(s,de):(0,V.d$)(s,{includeSeconds:!0,utcFormat:!0}):(0,C.jsx)(C.Fragment,{children:"\u2014"})},"trigger_next_run_date_".concat(t)),(0,C.jsx)(a.ZP,{default:!0,monospace:!0,children:v||"0"},"trigger_run_count_".concat(t)),(0,C.jsx)(a.ZP,{default:!0,title:c,width:40*g.iI,children:c},"trigger_description_".concat(t))]),n||(H.push((0,C.jsx)("div",{children:(0,C.jsx)(E.Z,{tags:null===N||void 0===N?void 0:N.map((function(e){return{uuid:e}}))})},"pipeline_tags_".concat(t))),r&&H.push((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),de)},"created_at_".concat(t))),(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 Q.push("/pipelines/".concat(U,"/triggers/").concat(i,"/edit"))},title:"Edit",children:(0,C.jsx)(j.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,t,l;le(i),oe((null===(e=ne.current[i])||void 0===e||null===(n=e.current)||void 0===n?void 0:n.offsetTop)||0),pe((null===(t=ne.current[i])||void 0===t||null===(l=t.current)||void 0===l?void 0:l.offsetLeft)||0)},ref:ne.current[i],title:"Delete",children:(0,C.jsx)(j.Trash,{default:!0,size:b.bL})}),(0,C.jsx)(d.Z,{onClickOutside:function(){return le(null)},open:ie===i,children:(0,C.jsx)(O.Z,{danger:!0,left:(se||0)-L.nH,onCancel:function(){return le(null)},onClick:function(){le(null),xe(i)},title:"Are you sure you want to delete the trigger ".concat(m,"?"),top:(ue||0)-(t<=1?L.oz:L.OK),width:L.Xx})})]},"edit_delete_buttons_".concat(t)))),H})),stickyHeader:Z,uuid:"pipeline-triggers"})})}}}]);
|