mage-ai 0.9.68__py3-none-any.whl → 0.9.70__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mage-ai might be problematic. Click here for more details.
- mage_ai/api/policies/BackfillPolicy.py +1 -0
- mage_ai/api/policies/PipelinePolicy.py +1 -0
- mage_ai/api/policies/WorkspacePolicy.py +1 -0
- mage_ai/api/presenters/BackfillPresenter.py +1 -0
- mage_ai/api/resources/GitBranchResource.py +56 -23
- mage_ai/api/resources/GitCustomBranchResource.py +29 -1
- mage_ai/api/resources/OauthResource.py +1 -1
- mage_ai/api/resources/PipelineResource.py +11 -5
- mage_ai/api/resources/PipelineRunResource.py +41 -4
- mage_ai/api/resources/PipelineScheduleResource.py +4 -0
- mage_ai/api/resources/PullRequestResource.py +6 -4
- mage_ai/api/resources/SeedResource.py +2 -1
- mage_ai/api/resources/SessionResource.py +13 -1
- mage_ai/api/resources/WorkspaceResource.py +5 -4
- mage_ai/authentication/permissions/constants.py +2 -0
- mage_ai/authentication/permissions/seed.py +32 -21
- mage_ai/authentication/providers/active_directory.py +4 -3
- mage_ai/authentication/providers/okta.py +22 -83
- mage_ai/cache/block_action_object/__init__.py +1 -1
- mage_ai/cluster_manager/kubernetes/workload_manager.py +52 -1
- mage_ai/cluster_manager/workspace/base.py +6 -0
- mage_ai/cluster_manager/workspace/kubernetes.py +22 -1
- mage_ai/command_center/applications/utils.py +2 -2
- mage_ai/command_center/presenters/text.py +1 -1
- mage_ai/data_preparation/executors/k8s_block_executor.py +30 -7
- mage_ai/data_preparation/executors/k8s_pipeline_executor.py +30 -7
- mage_ai/data_preparation/executors/streaming_pipeline_executor.py +78 -8
- mage_ai/data_preparation/git/__init__.py +50 -22
- mage_ai/data_preparation/git/api.py +62 -7
- mage_ai/data_preparation/git/utils.py +45 -21
- mage_ai/data_preparation/models/block/__init__.py +31 -8
- mage_ai/data_preparation/models/block/data_integration/mixins.py +16 -5
- mage_ai/data_preparation/models/block/dynamic/child.py +3 -0
- mage_ai/data_preparation/models/block/dynamic/utils.py +9 -4
- mage_ai/data_preparation/models/block/dynamic/variables.py +2 -2
- mage_ai/data_preparation/models/block/extension/utils.py +1 -0
- mage_ai/data_preparation/models/block/global_data_product/__init__.py +25 -2
- mage_ai/data_preparation/models/block/integration/__init__.py +1 -1
- mage_ai/data_preparation/models/block/remote/__init__.py +0 -0
- mage_ai/data_preparation/models/block/remote/models.py +58 -0
- mage_ai/data_preparation/models/block/sql/__init__.py +1 -1
- mage_ai/data_preparation/models/block/utils.py +38 -0
- mage_ai/data_preparation/models/constants.py +2 -0
- mage_ai/data_preparation/models/global_data_product/__init__.py +12 -0
- mage_ai/data_preparation/models/pipeline.py +31 -11
- mage_ai/data_preparation/models/triggers/__init__.py +4 -2
- mage_ai/data_preparation/models/utils.py +6 -0
- mage_ai/data_preparation/models/variable.py +18 -4
- mage_ai/data_preparation/repo_manager.py +3 -2
- mage_ai/data_preparation/shared/utils.py +1 -1
- mage_ai/data_preparation/storage/local_storage.py +12 -6
- mage_ai/data_preparation/templates/data_exporters/mysql.py +2 -2
- mage_ai/data_preparation/templates/data_exporters/oracledb.py +27 -0
- mage_ai/data_preparation/templates/repo/metadata.yaml +1 -0
- mage_ai/io/bigquery.py +131 -58
- mage_ai/io/mysql.py +38 -6
- mage_ai/io/snowflake.py +152 -29
- mage_ai/orchestration/db/migrations/versions/42a14d6143f1_update_token_column_type.py +54 -0
- mage_ai/orchestration/db/models/oauth.py +14 -13
- mage_ai/orchestration/db/models/schedules.py +30 -2
- mage_ai/orchestration/job_manager.py +6 -0
- mage_ai/orchestration/notification/sender.py +37 -15
- mage_ai/orchestration/pipeline_scheduler_original.py +48 -31
- mage_ai/orchestration/queue/celery_queue.py +8 -1
- mage_ai/orchestration/queue/process_queue.py +67 -4
- mage_ai/orchestration/queue/queue.py +8 -0
- mage_ai/orchestration/triggers/api.py +29 -1
- mage_ai/orchestration/triggers/global_data_product.py +9 -4
- mage_ai/orchestration/triggers/utils.py +10 -1
- mage_ai/orchestration/utils/resources.py +3 -0
- mage_ai/server/api/downloads.py +4 -1
- mage_ai/server/api/runs.py +151 -0
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +6 -6
- mage_ai/server/frontend_dist/_next/static/{i8pymuJDTVHdWjUP1QSh1 → RhDiJSkcjCsh4xxX4BFBk}/_buildManifest.js +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1557-b3502f3f1aa92ac7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2717-d9200be634dd6766.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3548-9d26185b3fb663b1.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/5699-6d708c6b2153ea08.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7361-8a23dd8360593e7a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7966-b9b85ba10667e654.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9624-8b8e100079ab69e1.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-2a69553d8c6eeb53.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/index-4e12783b064c1cfe.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-4bfc84ff07d7656f.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-a66b4c7641ae03eb.js → frontend_dist/_next/static/chunks/pages/pipeline-runs-6d183f91a2ff6668.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-7181b086c93784d2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-38e1fbcfbfc1014e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-b645a6d13ab9fe3a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-eb11c5390c982b49.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-cb88fd075a357fcf.js → triggers-4612d15a65c35912.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-3591d035bb3bb2b8.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-32985f3f7c7dd3ab.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-349af617d05f001b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-60d01d3887e31136.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-86814e581acaf5db.js → users-a4db8710f703c729.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/sign-in-09414a8b66fb6f06.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/triggers-9cba3211434a8966.js → frontend_dist/_next/static/chunks/pages/triggers-a599c6ac89be8c8d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-3433c8b22e8342aa.js +1 -0
- mage_ai/server/frontend_dist/block-layout.html +2 -2
- mage_ai/server/frontend_dist/compute.html +2 -2
- mage_ai/server/frontend_dist/files.html +2 -2
- mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
- mage_ai/server/frontend_dist/global-data-products.html +2 -2
- mage_ai/server/frontend_dist/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist/global-hooks.html +2 -2
- mage_ai/server/frontend_dist/index.html +2 -2
- mage_ai/server/frontend_dist/manage/files.html +2 -2
- mage_ai/server/frontend_dist/manage/settings.html +2 -2
- mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist/manage/users/new.html +2 -2
- mage_ai/server/frontend_dist/manage/users.html +2 -2
- mage_ai/server/frontend_dist/manage.html +2 -2
- mage_ai/server/frontend_dist/oauth.html +2 -2
- mage_ai/server/frontend_dist/overview.html +2 -2
- mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist/pipelines.html +2 -2
- mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist/platform/global-hooks.html +2 -2
- mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist/settings/platform/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/platform/settings.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/permissions.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/roles.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist/settings.html +2 -2
- mage_ai/server/frontend_dist/sign-in.html +6 -6
- mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
- mage_ai/server/frontend_dist/templates.html +2 -2
- mage_ai/server/frontend_dist/terminal.html +2 -2
- mage_ai/server/frontend_dist/test.html +2 -2
- mage_ai/server/frontend_dist/triggers.html +2 -2
- mage_ai/server/frontend_dist/version-control.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/404.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/_next/static/{CKCvjsYCf2imD2X8zAOBf → TdpLLFome13qvM0gXvpHs}/_buildManifest.js +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-b3502f3f1aa92ac7.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-d9200be634dd6766.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-9d26185b3fb663b1.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-6d708c6b2153ea08.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-8a23dd8360593e7a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7966-b9b85ba10667e654.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-8b8e100079ab69e1.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-2a69553d8c6eeb53.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-4e12783b064c1cfe.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-4bfc84ff07d7656f.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipeline-runs-a66b4c7641ae03eb.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-6d183f91a2ff6668.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-7181b086c93784d2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-38e1fbcfbfc1014e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-b645a6d13ab9fe3a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-eb11c5390c982b49.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-cb88fd075a357fcf.js → triggers-4612d15a65c35912.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-3591d035bb3bb2b8.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-32985f3f7c7dd3ab.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-349af617d05f001b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-60d01d3887e31136.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-86814e581acaf5db.js → users-a4db8710f703c729.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-09414a8b66fb6f06.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/triggers-9cba3211434a8966.js → frontend_dist_base_path_template/_next/static/chunks/pages/triggers-a599c6ac89be8c8d.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-3433c8b22e8342aa.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/compute.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/files.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-data-products.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-hooks.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/files.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/oauth.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/overview.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/sign-in.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/templates.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/terminal.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/test.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/triggers.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/version-control.html +2 -2
- mage_ai/server/scheduler_manager.py +9 -0
- mage_ai/server/server.py +47 -17
- mage_ai/server/utils/output_display.py +2 -2
- mage_ai/server/websocket_server.py +1 -0
- mage_ai/services/aws/ecs/ecs.py +1 -0
- mage_ai/services/k8s/config.py +4 -4
- mage_ai/services/k8s/utils.py +97 -0
- mage_ai/settings/keys/auth.py +2 -0
- mage_ai/settings/server.py +1 -1
- mage_ai/shared/parsers.py +6 -1
- mage_ai/streaming/sources/influxdb.py +2 -0
- mage_ai/streaming/sources/kafka.py +1 -1
- mage_ai/tests/api/endpoints/mixins.py +10 -9
- mage_ai/tests/api/endpoints/test_seeds.py +24 -0
- mage_ai/tests/api/operations/base/mixins.py +1 -1
- mage_ai/tests/api/operations/test_sessions.py +53 -2
- mage_ai/tests/api/resources/test_pipeline_resource.py +2 -2
- mage_ai/tests/authentication/oauth/test_utils.py +1 -1
- mage_ai/tests/authentication/providers/test_okta.py +43 -0
- mage_ai/tests/data_preparation/models/block/test_global_data_product.py +2 -0
- mage_ai/tests/orchestration/db/models/test_oauth.py +3 -3
- mage_ai/tests/orchestration/queue/test_process_queue.py +1 -0
- mage_ai/tests/orchestration/triggers/test_global_data_product.py +138 -136
- mage_ai/tests/server/test_server.py +27 -4
- mage_ai/tests/services/k8s/test_job_manager.py +9 -6
- mage_ai/version_control/branch/utils.py +2 -1
- mage_ai/version_control/models.py +3 -2
- {mage_ai-0.9.68.dist-info → mage_ai-0.9.70.dist-info}/METADATA +5 -5
- {mage_ai-0.9.68.dist-info → mage_ai-0.9.70.dist-info}/RECORD +272 -264
- mage_ai/server/frontend_dist/_next/static/chunks/1557-01f0843dc6ac4971.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2717-b5f9575799b594d5.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3548-961ff79ca70038c7.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5699-6efc749f2f8ddd20.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7361-18d9d8be96e1ce97.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7966-f07b2913f7326b50.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9624-59b2f803f9c88cd6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-08790743315de36a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/index-13760bb72d823b69.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-852d403c7bda21b3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-bd0aff5a5ed8888c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-d1ee961387c58b7f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-f028ef3880ed856c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-ceb06e1616ee9610.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-8ff16ef9566e911a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/settings-74d76300942dcee8.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-d7a8bc51bb7a1082.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-79a4cf66a623e667.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/sign-in-f59d34429fe022ee.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-5753fac7c1bfdc88.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-01f0843dc6ac4971.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-b5f9575799b594d5.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-961ff79ca70038c7.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-6efc749f2f8ddd20.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-18d9d8be96e1ce97.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7966-f07b2913f7326b50.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-59b2f803f9c88cd6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-08790743315de36a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-13760bb72d823b69.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-852d403c7bda21b3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-bd0aff5a5ed8888c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-d1ee961387c58b7f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-f028ef3880ed856c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-ceb06e1616ee9610.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-8ff16ef9566e911a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-74d76300942dcee8.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-d7a8bc51bb7a1082.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-79a4cf66a623e667.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-f59d34429fe022ee.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-5753fac7c1bfdc88.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{i8pymuJDTVHdWjUP1QSh1 → RhDiJSkcjCsh4xxX4BFBk}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{CKCvjsYCf2imD2X8zAOBf → TdpLLFome13qvM0gXvpHs}/_ssgManifest.js +0 -0
- {mage_ai-0.9.68.dist-info → mage_ai-0.9.70.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.68.dist-info → mage_ai-0.9.70.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.68.dist-info → mage_ai-0.9.70.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.68.dist-info → mage_ai-0.9.70.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +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),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([[5699],{94629:function(e,t,r){r.d(t,{Z:function(){return w}});var n=r(82394),o=r(21831),i=r(82684),c=r(50724),u=r(1402),s=r(97618),a=r(70613),f=r(31557),d=r(68899),l=r(28598);function p(e,t){var r=e.children,n=e.noPadding;return(0,l.jsx)(d.HS,{noPadding:n,ref:t,children:r})}var h=i.forwardRef(p),b=r(62547),v=r(82571),m=r(77417),O=r(46684),y=r(75375);function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function P(e,t){e.addProjectBreadcrumbToCustomBreadcrumbs;var r=e.after,n=e.afterHeader,i=e.afterHidden,p=e.afterWidth,g=e.afterWidthOverride,P=e.appendBreadcrumbs,w=e.before,k=e.beforeHeader,x=e.beforeWidth,A=e.breadcrumbs,S=e.children,Z=e.contained,I=e.errors,E=e.headerMenuItems,R=e.headerOffset,C=e.hideAfterCompletely,W=e.mainContainerHeader,M=e.navigationItems,H=e.setAfterHidden,B=e.setAfterWidth,_=e.setBeforeWidth,N=e.setErrors,D=e.subheaderChildren,T=e.subheaderNoPadding,U=e.title,G=e.uuid,F=(0,y.Z)(G,{beforeResizeOffset:y.H,setWidthAfter:B,setWidthBefore:_,widthAfter:p,widthBefore:x,widthOverrideAfter:g}),L=F.mainContainerRef,z=F.mousedownActiveAfter,Y=F.mousedownActiveBefore,q=F.setMousedownActiveAfter,J=F.setMousedownActiveBefore,K=F.setWidthAfter,Q=F.setWidthBefore,V=F.widthAfter,X=F.widthBefore,$=(0,m.Z)().project,ee=[];return A&&ee.push.apply(ee,(0,o.Z)(A)),null!==A&&void 0!==A&&A.length&&!P||!$||null!==A&&void 0!==A&&A.length||ee.unshift({bold:!P,label:function(){return U}}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.Z,{title:U}),(0,l.jsx)(f.Z,{breadcrumbs:ee,menuItems:E}),(0,l.jsxs)(d.Nk,{ref:t,children:[0!==(null===M||void 0===M?void 0:M.length)&&(0,l.jsx)(d.lm,{showMore:!0,children:(0,l.jsx)(v.Z,{navigationItems:M,showMore:!0})}),(0,l.jsx)(s.Z,{flex:1,flexDirection:"column",children:(0,l.jsxs)(b.Z,{after:r,afterHeader:n,afterHeightOffset:O.Mz,afterHidden:i,afterMousedownActive:z,afterWidth:V,before:w,beforeHeader:k,beforeHeightOffset:O.Mz,beforeMousedownActive:Y,beforeWidth:w?X:d.k1,contained:Z,headerOffset:R,hideAfterCompletely:!r||C,leftOffset:w?d.k1:null,mainContainerHeader:W,mainContainerRef:L,setAfterHidden:H,setAfterMousedownActive:q,setAfterWidth:K,setBeforeMousedownActive:J,setBeforeWidth:Q,children:[D&&(0,l.jsx)(h,{noPadding:T,children:D}),S]})})]}),I&&(0,l.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===N||void 0===N?void 0:N(null)},children:(0,l.jsx)(u.Z,j(j({},I),{},{onClose:function(){return null===N||void 0===N?void 0:N(null)}}))})]})}var w=i.forwardRef(P)},74395:function(e,t,r){r.d(t,{M:function(){return c},W:function(){return i}});var n=r(25976),o=r(46684),i=34*r(70515).iI,c=n.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],o.Mz)},24755:function(e,t,r){r.d(t,{B2:function(){return o},DQ:function(){return l},HY:function(){return a},Pl:function(){return n},SA:function(){return p},WH:function(){return f},fF:function(){return s},tC:function(){return d}});var n,o,i=r(19452),c=r(50178),u=r(72473),s="Git settings",a="Preferences",f="Workspace";!function(e){e.PROJECT_PLATFORM="Platform",e.WORKSPACE="Workspace",e.USER_MANAGEMENT="User management"}(n||(n={})),function(e){e.PERMISSIONS="Permissions",e.PREFERENCES="Preferences",e.ROLES="Roles",e.SETTINGS="Settings",e.USERS="Users"}(o||(o={}));var d="Account",l="Profile",p=function(e,t){var r=e.owner,p=e.roles,h=e.project_access,b=(t||{projectPlatformActivated:!1}).projectPlatformActivated,v=r||p===i.No.ADMIN||0!==(3&h),m=[{items:[{Icon:u.WorkspacesIcon,linkProps:{href:"/settings/workspace/preferences"},uuid:a},{Icon:u.Settings,linkProps:{href:"/settings/workspace/sync-data"},uuid:s}],uuid:f}];if((0,c.YB)()&&v){var O=[{Icon:u.WorkspacesUsersIcon,linkProps:{href:"/settings/workspace/users"},uuid:o.USERS}];(0,c.Bw)()&&O.push.apply(O,[{Icon:u.VisibleEye,linkProps:{href:"/settings/workspace/roles"},uuid:o.ROLES},{Icon:u.Locked,linkProps:{href:"/settings/workspace/permissions"},uuid:o.PERMISSIONS}]),m.push({items:O,uuid:n.USER_MANAGEMENT})}return!b||(0,c.YB)()&&!v||m.push({items:[{Icon:u.BlocksSeparated,linkProps:{href:"/settings/platform/preferences"},uuid:o.PREFERENCES},{Icon:u.SettingsWithKnobs,linkProps:{href:"/settings/platform/settings"},uuid:o.SETTINGS}],uuid:n.PROJECT_PLATFORM}),(0,c.YB)()?m.concat([{items:[{Icon:u.Sun,linkProps:{href:"/settings/account/profile"},uuid:l}],uuid:d}]):m}},28274:function(e,t,r){r.d(t,{Z:function(){return A}});var n=r(94629),o=r(82394),i=r(12691),c=r.n(i),u=r(55485),s=r(48670),a=r(38276),f=r(30160),d=r(25976),l=r(44897),p=r(70515),h=r(91437),b=(p.iI,d.default.div.withConfig({displayName:"indexstyle__SectionTitleStyle",componentId:"sc-1y8dyue-0"})(["padding:","px ","px;"],1*p.iI,2.5*p.iI)),v=d.default.div.withConfig({displayName:"indexstyle__ItemStyle",componentId:"sc-1y8dyue-1"})([""," padding:","px ","px;"," ",""],(0,h.eR)(),1.5*p.iI,2.5*p.iI,(function(e){return!e.selected&&"\n &:hover {\n background-color: ".concat((e.theme.background||l.Z.background).codeArea,";\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.background||l.Z.background).codeTextarea,";\n ")})),m=r(28598),O=r(82684);function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){(0,o.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var j=function(e){var t=e.isItemSelected,r=e.sections;return(0,m.jsx)(a.Z,{py:p.Gg,children:null===r||void 0===r?void 0:r.map((function(e){var r=e.items,n=e.title,o=e.uuid;return(0,m.jsxs)(a.Z,{children:[(0,m.jsx)(b,{children:(0,m.jsx)(f.ZP,{bold:!0,muted:!0,small:!0,uppercase:!0,children:n?n():o})}),null===r||void 0===r?void 0:r.map((function(e){var r=e.Icon,n=e.label,i=e.linkProps,f=e.onClick,d=e.uuid,l=null===t||void 0===t?void 0:t(g(g({},e),{},{uuidWorkspace:o})),h=n?n():d,b=(0,m.jsx)(v,{selected:l,children:(0,m.jsxs)(u.ZP,{alignItems:"center",children:[r&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(r,{default:!l,size:1.75*p.iI}),(0,m.jsx)(a.Z,{mr:1})]}),h]})});return i?(0,O.createElement)(c(),g(g({},i),{},{key:d,passHref:!0}),(0,m.jsx)(s.Z,{block:!0,default:!l,noHoverUnderline:!0,noOutline:!0,sameColorAsText:l,children:b})):(0,m.jsx)(s.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,onClick:f,preventDefault:!0,sameColorAsText:!0,children:b},d)}))]},o)}))})},P=r(77417),w=r(74395),k=r(24755),x=r(50178);var A=function(e){var t=e.after,r=e.afterHeader,o=e.afterHidden,i=e.afterWidth,c=e.appendBreadcrumbs,u=e.breadcrumbs,s=e.children,a=e.hideAfterCompletely,f=e.setAfterHidden,d=e.title,l=e.uuidItemSelected,h=e.uuidWorkspaceSelected,b=(0,x.PR)()||{},v=(0,P.Z)().projectPlatformActivated;return(0,m.jsx)(n.Z,{after:t,afterHeader:r,afterHidden:!t||o,afterWidth:t?i||50*p.iI:0,afterWidthOverride:!0,appendBreadcrumbs:c,before:(0,m.jsx)(w.M,{children:(0,m.jsx)(j,{isItemSelected:function(e){var t=e.uuid,r=e.uuidWorkspace;return h===r&&l===t},sections:(0,k.SA)(b,{projectPlatformActivated:v})})}),beforeWidth:w.W,breadcrumbs:u,hideAfterCompletely:a,setAfterHidden:f,title:d||"Settings",uuid:"".concat(d||"settings","/index"),children:s})}},93808:function(e,t,r){r.d(t,{Z:function(){return S}});var n=r(77837),o=r(26304),i=r(62243),c=r(29385),u=r(80022),s=r(13692),a=r(93189),f=r(15544),d=r(82394),l=r(38860),p=r.n(l),h=r(82684),b=r(56663),v=r.n(b),m=r(40761),O=r(34661),y=r(36105),g=r(50178),j=r(69419),P=r(28598),w=["auth"];function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach((function(t){(0,d.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function A(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.Z)(e);if(t){var o=(0,f.Z)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,a.Z)(this,r)}}function S(e){return function(t){(0,s.Z)(a,t);var r=A(a);function a(){var e;(0,i.Z)(this,a);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=r.call.apply(r,[this].concat(n)),(0,d.Z)((0,u.Z)(e),"state",{auth:new m.Z(e.props.token)}),e}return(0,c.Z)(a,[{key:"componentDidMount",value:function(){this.setState({auth:new m.Z(this.props.token)})}},{key:"render",value:function(){var t=this.props,r=(t.auth,(0,o.Z)(t,w));return(0,P.jsx)(e,x({auth:this.state.auth},r))}}],[{key:"getInitialProps",value:function(){var t=(0,n.Z)(p().mark((function t(r){var n,o,i,c,u,s,a,f,d;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=v()(r),o=(0,g.ex)(r),i=o.id,c=n[O.Mv],u=n[y.qt],s=new m.Z(c),a=x(x({},r),{},{auth:s,currentGroupId:i,theme:u}),(0,g.YB)(r)&&s.isExpired&&(console.log("OAuth token has expired."),f=x(x({},r.query),{},{redirect_url:r.asPath}),(0,j.nL)("/sign-in?".concat((0,j.uM)(f)),r.res)),!e.getInitialProps){t.next=12;break}return t.next=10,e.getInitialProps(a);case 10:return d=t.sent,t.abrupt("return",x(x({},d),{},{auth:s,currentGroupId:i,theme:u}));case 12:return t.abrupt("return",a);case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}]),a}(h.Component)}},80022:function(e,t,r){function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{Z:function(){return n}})},15544:function(e,t,r){function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}r.d(t,{Z:function(){return n}})},13692:function(e,t,r){r.d(t,{Z:function(){return o}});var n=r(61049);function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,n.Z)(e,t)}},93189:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(12539),o=r(80022);function i(e,t){if(t&&("object"===n(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7361],{37361:function(e,n,r){r.d(n,{X:function(){return k}});var i=r(21831),l=r(75582),s=r(82394),t=r(21764),o=r(82684),d=r(69864),a=r(34376),c=r(71180),u=r(70652),E=r(15338),f=r(97618),v=r(55485),I=r(85854),j=r(65956),m=r(28274),p=r(38276),Z=r(75499),x=r(30160),h=r(17488),g=r(35686),A=r(8193),L=r(72473),_=r(70515),S=r(24755),D=r(3917),R=r(76417),P=r(36717),T=r(50178),O=r(86735),b=r(42122),C=r(72619),B=r(95924),w=r(28598);function N(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,i)}return r}function y(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?N(Object(r),!0).forEach((function(n){(0,s.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var k,W=2*_.iI;!function(e){e.PERMISSIONS="Permissions",e.ROLES="Roles"}(k||(k={})),n.Z=function(e){var n,r,s,N=e.contained,M=e.disableFields,U=e.onCancel,H=e.slug,Y=(0,T.PR)()||{},z=Y.id,Q=Y.owner,V=(0,a.useRouter)(),q=(0,o.useState)(!0),F=q[0],G=q[1],K=(0,o.useState)(null),$=K[0],X=K[1],J=(0,o.useState)({}),ee=J[0],ne=J[1],re=(0,o.useState)(null),ie=re[0],le=re[1],se=(0,o.useCallback)((function(e,n,r){le(y(y({},e),{},{rolesMapping:(0,O.HK)(n||[],(function(e){return e.id})),permissionsMapping:(0,O.HK)(r||[],(function(e){return e.id}))}))}),[le]),te=(0,o.useCallback)((function(e){ne((function(n){return y(y({},n),e)})),le((function(n){return y(y({},n),e)}))}),[ne,le]),oe=g.ZP.users.detail(H,{},{revalidateOnFocus:!1}).data,de=(0,o.useMemo)((function(){return null===oe||void 0===oe?void 0:oe.user}),[oe]);(0,o.useEffect)((function(){de&&se(de,null===de||void 0===de?void 0:de.roles_new,null===de||void 0===de?void 0:de.permissions)}),[se,de]);var ae=(0,d.Db)(de?g.ZP.users.useUpdate(H):g.ZP.users.useCreate(),{onSuccess:function(e){return(0,C.wD)(e,{callback:function(e){var n=e.user;ne({}),se(n,null===n||void 0===n?void 0:n.roles_new,null===n||void 0===n?void 0:n.permissions),de||V.push("/settings/workspace/users/".concat(null===n||void 0===n?void 0:n.id)),String(null===n||void 0===n?void 0:n.id)===String(z)&&(0,T.av)(y(y({},(0,T.PR)()),{},{avatar:null===n||void 0===n?void 0:n.avatar,first_name:null===n||void 0===n?void 0:n.first_name,last_name:null===n||void 0===n?void 0:n.last_name,username:null===n||void 0===n?void 0:n.username})),t.Am.success(de?"User profile successfully updated.":"New user created successfully.",{position:t.Am.POSITION.BOTTOM_RIGHT,toastId:"user-update-success-".concat(n.id)})},onErrorCallback:function(e){var n=e.error,r=n.errors,i=n.exception,l=n.message,s=n.type;t.Am.error((null===r||void 0===r?void 0:r.error)||i||l,{position:t.Am.POSITION.BOTTOM_RIGHT,toastId:s})}})}}),ce=(0,l.Z)(ae,2),ue=ce[0],Ee=ce[1].isLoading,fe=(0,d.Db)(g.ZP.users.useDelete(null===de||void 0===de?void 0:de.id),{onSuccess:function(e){return(0,C.wD)(e,{callback:function(){V.push("/settings/workspace/users"),t.Am.success("User successfully delete.",{position:t.Am.POSITION.BOTTOM_RIGHT,toastId:"user-delete-success-".concat(null===de||void 0===de?void 0:de.id)})},onErrorCallback:function(e){var n=e.error,r=n.errors,i=n.exception,l=n.message,s=n.type;t.Am.error((null===r||void 0===r?void 0:r.error)||i||l,{position:t.Am.POSITION.BOTTOM_RIGHT,toastId:s})}})}}),ve=(0,l.Z)(fe,2),Ie=ve[0],je=ve[1].isLoading,me=g.ZP.roles.list().data,pe=(0,o.useMemo)((function(){return(0,O.YC)((null===me||void 0===me?void 0:me.roles)||[],"name")}),[me]),Ze=(0,o.useMemo)((function(){return(null===ie||void 0===ie?void 0:ie.rolesMapping)||{}}),[ie]),xe=(0,o.useMemo)((function(){return(0,O.YC)(Object.values(Ze),"name")}),[Ze]),he=g.ZP.permissions.list({_limit:1e3}).data,ge=((0,o.useMemo)((function(){return(0,O.YC)((null===he||void 0===he?void 0:he.permissions)||[],"entity_name")}),[he]),(0,o.useMemo)((function(){return(null===ie||void 0===ie?void 0:ie.permissionsMapping)||{}}),[ie])),Ae=(0,o.useMemo)((function(){return(0,O.YC)(Object.values(ge),"entity_name")}),[ge]),Le=(0,o.useMemo)((function(){return(null===xe||void 0===xe?void 0:xe.length)>=1}),[xe]),_e=(0,o.useMemo)((function(){return(0,w.jsx)(c.ZP,{beforeIcon:(0,w.jsx)(L.Add,{}),compact:!0,onClick:function(){X(k.ROLES),G(!1)},primary:!Le,secondary:Le,small:!0,children:"Add roles"})}),[Le,X,G]),Se=(0,o.useMemo)((function(){return(null===Ae||void 0===Ae?void 0:Ae.length)>=1}),[Ae]),De=((0,o.useMemo)((function(){return(0,w.jsx)(c.ZP,{beforeIcon:(0,w.jsx)(L.Add,{}),compact:!0,onClick:function(){X(k.PERMISSIONS),G(!1)},primary:!Se,secondary:Se,small:!0,children:"Add permission"})}),[Se,X,G]),(0,o.useCallback)((function(e,n,r){return(0,w.jsx)(Z.Z,{columnFlex:[].concat((0,i.Z)(r?[]:[null]),[1]),columns:[].concat((0,i.Z)(r?[]:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===Ze||void 0===Ze?void 0:Ze[n]}));return(0,w.jsx)(u.Z,{checked:n,onClick:function(r){(0,B.j)(r),te(n?{rolesMapping:{}}:{rolesMapping:(0,O.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"}]),[{uuid:"Role"}]),onClickRow:n&&!r?function(n){var r=e[n];r&&window.open("/settings/workspace/roles/".concat(null===r||void 0===r?void 0:r.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.name,l=e.id,s=!(null===Ze||void 0===Ze||!Ze[l]);return[].concat((0,i.Z)(r?[]:[(0,w.jsx)(u.Z,{checked:s,onClick:function(n){(0,B.j)(n);var r=y({},Ze);s?null===r||void 0===r||delete r[l]:r[l]=e,te({rolesMapping:r})}},"checkbox")]),[(0,w.jsx)(x.ZP,{monospace:!0,children:n},"name")])})),uuid:"roles"})}),[Ze,te])),Re=(0,o.useCallback)((function(e,n,r){return(0,w.jsx)(Z.Z,{columnFlex:[null,2,1,1,6],columns:[{uuid:"ID"},{uuid:"Entity"},{uuid:"Subtype"},{uuid:"Entity ID"},{rightAligned:!0,uuid:"Access"}],onClickRow:n&&!r?function(n){var r=e[n];r&&window.open("/settings/workspace/permissions/".concat(null===r||void 0===r?void 0:r.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.access,r=e.entity,i=e.entity_id,l=e.entity_name,s=e.entity_type,t=e.id,o=n?(0,P.q)(n):[],d=(null===o||void 0===o?void 0:o.length)||0;return[(0,w.jsx)(x.ZP,{default:!0,monospace:!0,children:t},"id"),(0,w.jsx)(x.ZP,{monospace:!0,children:l||r},"entityName"),(0,w.jsx)(x.ZP,{default:!0,monospace:!!s,children:s||"-"},"entityType"),(0,w.jsx)(x.ZP,{default:!0,monospace:!!i,children:i||"-"},"entityID"),(0,w.jsx)("div",{children:d>=1&&(0,w.jsx)(v.ZP,{alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end",children:null===o||void 0===o?void 0:o.map((function(e,n){return(0,w.jsx)("div",{children:(0,w.jsxs)(x.ZP,{default:!0,monospace:!0,small:!0,children:[e,d>=2&&n<d-1&&(0,w.jsx)(x.ZP,{inline:!0,muted:!0,small:!0,children:",\xa0"})]})},e)}))})},"access")]})),uuid:"permissions"})}),[]),Pe=(0,o.useMemo)((function(){return De(pe)}),[De,pe]),Te=(0,o.useMemo)((function(){var e;return De(xe,!0,null===(e=M||[])||void 0===e?void 0:e.includes(k.ROLES))}),[De,M,xe]),Oe=(0,o.useMemo)((function(){var e;return Re(Ae,!0,null===(e=M||[])||void 0===e?void 0:e.includes(k.PERMISSIONS))}),[Re,M,Ae]),be=(0,w.jsxs)(A.N,{children:[(0,w.jsxs)(j.Z,{noPadding:!0,children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsx)(I.Z,{level:4,children:"Profile"})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"Avatar"}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({avatar:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"Add initials or an emoji",value:(null===ie||void 0===ie?void 0:ie.avatar)||""})})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsxs)(x.ZP,{danger:"username"in ee&&!(null!==ie&&void 0!==ie&&ie.username),default:!0,large:!0,children:["Username ","username"in ee&&!(null!==ie&&void 0!==ie&&ie.username)&&(0,w.jsx)(x.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({username:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Mage Supreme",value:(null===ie||void 0===ie?void 0:ie.username)||""})})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"First name"}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({first_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Urza",value:(null===ie||void 0===ie?void 0:ie.first_name)||""})})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"Last name"}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({last_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Andromeda",value:(null===ie||void 0===ie?void 0:ie.last_name)||""})})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[de&&(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"Email"}),!de&&(0,w.jsxs)(x.ZP,{danger:"email"in ee&&!(null!==ie&&void 0!==ie&&ie.email),default:!0,large:!0,children:["Email ","email"in ee&&!(null!==ie&&void 0!==ie&&ie.email)&&(0,w.jsx)(x.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,w.jsx)(p.Z,{mr:_.cd}),de&&(0,w.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,w.jsx)(x.ZP,{large:!0,muted:!0,children:null===ie||void 0===ie?void 0:ie.email}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(L.Alphabet,{muted:!0,size:W}),(0,w.jsx)(p.Z,{mr:1})]}),!de&&(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Alphabet,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({email:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. mage@power.com",type:"email",value:(null===ie||void 0===ie?void 0:ie.email)||""})})]})})]}),(0,w.jsx)(p.Z,{mb:_.HN}),(0,w.jsxs)(j.Z,{noPadding:!0,children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsx)(I.Z,{level:4,children:"Authentication"})}),(0,w.jsx)(E.Z,{light:!0}),de&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsxs)(x.ZP,{danger:"password_current"in ee&&!(null!==ie&&void 0!==ie&&ie.password_current),default:!0,large:!0,children:["Current password ","password_current"in ee&&!(null!==ie&&void 0!==ie&&ie.password_current)&&(0,w.jsx)(x.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({password_current:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===ie||void 0===ie?void 0:ie.password_current)||""})})]})}),(0,w.jsx)(E.Z,{light:!0})]}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsxs)(x.ZP,{danger:"password"in ee&&!(null!==ie&&void 0!==ie&&ie.password),default:!0,large:!0,children:[de?"New password":"Password"," ","password"in ee&&!(null!==ie&&void 0!==ie&&ie.password)&&(0,w.jsx)(x.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({password:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===ie||void 0===ie?void 0:ie.password)||""})})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsxs)(x.ZP,{danger:"password_confirmation"in ee&&!(null!==ie&&void 0!==ie&&ie.password_confirmation),default:!0,large:!0,children:["Confirm ",de?"new password":"password"," ","password_confirmation"in ee&&!(null!==ie&&void 0!==ie&&ie.password_confirmation)&&(0,w.jsx)(x.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({password_confirmation:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===ie||void 0===ie?void 0:ie.password_confirmation)||""})})]})})]}),(0,w.jsx)(p.Z,{mb:_.HN}),de&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(j.Z,{noPadding:!0,children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,w.jsx)(I.Z,{level:4,children:"Roles"}),(0,w.jsx)(p.Z,{mr:_.cd}),Le&&!(null!==(n=M||[])&&void 0!==n&&n.includes(k.ROLES))&&(0,w.jsx)(v.ZP,{alignItems:"center",children:_e})]})}),(0,w.jsx)(E.Z,{light:!0}),!Le&&!(null!==(r=M||[])&&void 0!==r&&r.includes(k.ROLES))&&(0,w.jsxs)(p.Z,{p:_.cd,children:[(0,w.jsx)(p.Z,{mb:_.cd,children:(0,w.jsx)(x.ZP,{default:!0,children:"This user currently has no roles attached."})}),(0,w.jsx)(v.ZP,{alignItems:"center",children:_e})]}),Le&&(0,w.jsx)(p.Z,{pb:_.Mq,children:Te})]}),(0,w.jsx)(p.Z,{mb:_.HN}),(0,w.jsxs)(j.Z,{noPadding:!0,children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsx)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,w.jsx)(I.Z,{level:4,children:"Permissions"})})}),(0,w.jsx)(E.Z,{light:!0}),!Se&&(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsx)(x.ZP,{default:!0,children:"This user currently has no permissions."})}),Se&&(0,w.jsx)(p.Z,{pb:_.Mq,children:Oe})]}),(0,w.jsx)(p.Z,{mb:_.HN}),(0,w.jsxs)(j.Z,{noPadding:!0,children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsx)(I.Z,{level:4,children:"Metadata"})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"Last updated"}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,w.jsx)(x.ZP,{large:!0,monospace:!0,muted:!0,children:(null===ie||void 0===ie?void 0:ie.updated_at)&&(0,D.d$)(null===ie||void 0===ie?void 0:ie.updated_at,{includeSeconds:!0})}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(L.Schedule,{muted:!0,size:W}),(0,w.jsx)(p.Z,{mr:1})]})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"Created at"}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,w.jsx)(x.ZP,{large:!0,monospace:!0,muted:!0,children:(null===ie||void 0===ie?void 0:ie.created_at)&&(0,D.d$)(null===ie||void 0===ie?void 0:ie.created_at,{includeSeconds:!0})}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(L.Schedule,{muted:!0,size:W}),(0,w.jsx)(p.Z,{mr:1})]})]})})]}),(0,w.jsx)(p.Z,{mb:_.HN})]}),(0,w.jsxs)(v.ZP,{children:[(0,w.jsx)(c.ZP,{beforeIcon:(0,w.jsx)(L.Save,{}),disabled:!ee||!(null!==(s=Object.keys(ee))&&void 0!==s&&s.length),loading:Ee,onClick:function(){return ue({user:y(y({},(0,b.GL)(ie,["avatar","first_name","last_name","password","password_confirmation","password_current","username"].concat(de?[]:"email"),{include_blanks:!0})),null!==M&&void 0!==M&&M.includes(k.ROLES)?{}:{role_ids:Object.keys((null===ie||void 0===ie?void 0:ie.rolesMapping)||{}).map((function(e){return Number(e)}))})})},primary:!0,children:de?"Save changes":"Create new user"}),U&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(c.ZP,{onClick:function(){return null===U||void 0===U?void 0:U()},secondary:!0,children:"Cancel and go back"})]}),de&&String(z)!==String(H)&&Q&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(c.ZP,{beforeIcon:(0,w.jsx)(L.Trash,{}),danger:!0,loading:je,onClick:function(){return Ie()},children:"Delete user"})]})]})]});return N?be:(0,w.jsx)(m.Z,{after:Pe,afterHeader:(0,w.jsx)(p.Z,{px:_.cd,children:(0,w.jsx)(x.ZP,{bold:!0,children:$})}),afterHidden:F,afterWidth:60*_.iI,appendBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Users"},linkProps:{href:"/settings/workspace/users"}},{bold:!0,label:function(){return(0,R.s)(ie)}}],setAfterHidden:G,title:de?(0,R.s)(de):"New user",uuidItemSelected:S.B2.USERS,uuidWorkspaceSelected:S.Pl.USER_MANAGEMENT,children:de&&be})}},36288:function(e,n,r){r.d(n,{Fy:function(){return v},G9:function(){return c},H1:function(){return I},K4:function(){return d},ND:function(){return a},Pt:function(){return u},WG:function(){return s},hl:function(){return f},m_:function(){return t},oO:function(){return E}});var i,l,s,t,o=r(82394);!function(e){e[e.OWNER=1]="OWNER",e[e.ADMIN=2]="ADMIN",e[e.EDITOR=4]="EDITOR",e[e.VIEWER=8]="VIEWER",e[e.LIST=16]="LIST",e[e.DETAIL=32]="DETAIL",e[e.CREATE=64]="CREATE",e[e.UPDATE=128]="UPDATE",e[e.DELETE=512]="DELETE",e[e.OPERATION_ALL=1024]="OPERATION_ALL",e[e.QUERY=2048]="QUERY",e[e.QUERY_ALL=4096]="QUERY_ALL",e[e.READ=8192]="READ",e[e.READ_ALL=16384]="READ_ALL",e[e.WRITE=32768]="WRITE",e[e.WRITE_ALL=65536]="WRITE_ALL",e[e.ALL=131072]="ALL",e[e.DISABLE_LIST=262144]="DISABLE_LIST",e[e.DISABLE_DETAIL=524288]="DISABLE_DETAIL",e[e.DISABLE_CREATE=1048576]="DISABLE_CREATE",e[e.DISABLE_UPDATE=2097152]="DISABLE_UPDATE",e[e.DISABLE_DELETE=4194304]="DISABLE_DELETE",e[e.DISABLE_OPERATION_ALL=8388608]="DISABLE_OPERATION_ALL",e[e.DISABLE_QUERY=16777216]="DISABLE_QUERY",e[e.DISABLE_QUERY_ALL=33554432]="DISABLE_QUERY_ALL",e[e.DISABLE_READ=67108864]="DISABLE_READ",e[e.DISABLE_READ_ALL=134217728]="DISABLE_READ_ALL",e[e.DISABLE_WRITE=268435456]="DISABLE_WRITE",e[e.DISABLE_WRITE_ALL=536870912]="DISABLE_WRITE_ALL",e[e.DISABLE_UNLESS_CONDITIONS=1073741824]="DISABLE_UNLESS_CONDITIONS"}(s||(s={})),function(e){e.HAS_NOTEBOOK_EDIT_ACCESS="HAS_NOTEBOOK_EDIT_ACCESS",e.HAS_PIPELINE_EDIT_ACCESS="HAS_PIPELINE_EDIT_ACCESS",e.USER_OWNS_ENTITY="USER_OWNS_ENTITY"}(t||(t={}));var d=(i={},(0,o.Z)(i,s.OWNER,"Owner"),(0,o.Z)(i,s.ADMIN,"Admin"),(0,o.Z)(i,s.EDITOR,"Editor"),(0,o.Z)(i,s.VIEWER,"Viewer"),(0,o.Z)(i,s.LIST,"List"),(0,o.Z)(i,s.DETAIL,"Detail"),(0,o.Z)(i,s.CREATE,"Create"),(0,o.Z)(i,s.UPDATE,"Update"),(0,o.Z)(i,s.DELETE,"Delete"),(0,o.Z)(i,s.OPERATION_ALL,"All operations"),(0,o.Z)(i,s.QUERY,"Query"),(0,o.Z)(i,s.QUERY_ALL,"Query all attributes"),(0,o.Z)(i,s.READ,"Read"),(0,o.Z)(i,s.READ_ALL,"Read all attributes"),(0,o.Z)(i,s.WRITE,"Write"),(0,o.Z)(i,s.WRITE_ALL,"Write all attributes"),(0,o.Z)(i,s.ALL,"All"),(0,o.Z)(i,s.DISABLE_LIST,"Disable list"),(0,o.Z)(i,s.DISABLE_DETAIL,"Disable detail"),(0,o.Z)(i,s.DISABLE_CREATE,"Disable create"),(0,o.Z)(i,s.DISABLE_UPDATE,"Disable update"),(0,o.Z)(i,s.DISABLE_DELETE,"Disable delete"),(0,o.Z)(i,s.DISABLE_OPERATION_ALL,"Disable all operations"),(0,o.Z)(i,s.DISABLE_QUERY,"Disable query"),(0,o.Z)(i,s.DISABLE_QUERY_ALL,"Disable all query parameters"),(0,o.Z)(i,s.DISABLE_READ,"Disable read"),(0,o.Z)(i,s.DISABLE_READ_ALL,"Disable all read attributes"),(0,o.Z)(i,s.DISABLE_WRITE,"Disable write"),(0,o.Z)(i,s.DISABLE_WRITE_ALL,"Disable all write attributes"),i),a=(l={},(0,o.Z)(l,t.HAS_NOTEBOOK_EDIT_ACCESS,"Disable unless user has notebook edit access"),(0,o.Z)(l,t.HAS_PIPELINE_EDIT_ACCESS,"Disable unless user has pipeline edit access"),(0,o.Z)(l,t.USER_OWNS_ENTITY,"Disable unless user owns the current entity"),l),c=[s.OWNER,s.ADMIN,s.EDITOR,s.VIEWER,s.ALL],u=[s.LIST,s.DETAIL,s.CREATE,s.UPDATE,s.DELETE,s.OPERATION_ALL],E=[s.DISABLE_LIST,s.DISABLE_DETAIL,s.DISABLE_CREATE,s.DISABLE_UPDATE,s.DISABLE_DELETE,s.DISABLE_OPERATION_ALL],f=[s.QUERY,s.QUERY_ALL,s.DISABLE_QUERY,s.DISABLE_QUERY_ALL],v=[s.READ,s.READ_ALL,s.DISABLE_READ,s.DISABLE_READ_ALL],I=[s.WRITE,s.WRITE_ALL,s.DISABLE_WRITE,s.DISABLE_WRITE_ALL]},36717:function(e,n,r){r.d(n,{q:function(){return s}});var i=r(75582),l=r(36288);function s(e){return Object.entries(l.K4).reduce((function(n,r){var l=(0,i.Z)(r,2),s=l[0],t=l[1];return e&Number(s)?n.concat(t):n}),[])}},76417:function(e,n,r){function i(e){return null!==e&&void 0!==e&&e.first_name?[null===e||void 0===e?void 0:e.first_name,null===e||void 0===e?void 0:e.last_name].filter((function(e){return e})).join(" "):null===e||void 0===e?void 0:e.username}r.d(n,{s:function(){return i}})}}]);
|
|
@@ -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"})})}}}]);
|