mage-ai 0.9.32__py3-none-any.whl → 0.9.34__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/constants.py +37 -2
- mage_ai/api/errors.py +9 -5
- mage_ai/api/middleware.py +2 -2
- mage_ai/api/mixins/__init__.py +0 -0
- mage_ai/api/mixins/result_set.py +65 -0
- mage_ai/api/operations/base.py +41 -11
- mage_ai/api/operations/constants.py +7 -6
- mage_ai/api/parsers/BaseParser.py +6 -4
- mage_ai/api/parsers/PipelineScheduleParser.py +36 -2
- mage_ai/api/policies/BackfillPolicy.py +1 -0
- mage_ai/api/policies/BasePolicy.py +229 -40
- mage_ai/api/policies/PermissionPolicy.py +17 -0
- mage_ai/api/policies/PipelineSchedulePolicy.py +18 -2
- mage_ai/api/policies/RolePermissionPolicy.py +2 -1
- mage_ai/api/policies/RolePolicy.py +3 -0
- mage_ai/api/policies/SessionPolicy.py +36 -1
- mage_ai/api/policies/StatusPolicy.py +46 -3
- mage_ai/api/policies/UserPolicy.py +25 -2
- mage_ai/api/policies/mixins/__init__.py +0 -0
- mage_ai/api/policies/mixins/user_permissions.py +241 -0
- mage_ai/api/presenters/PermissionPresenter.py +35 -8
- mage_ai/api/presenters/RolePresenter.py +29 -12
- mage_ai/api/presenters/StatusPresenter.py +11 -0
- mage_ai/api/presenters/UserPresenter.py +21 -24
- mage_ai/api/resources/BaseResource.py +24 -9
- mage_ai/api/resources/BlockResource.py +3 -2
- mage_ai/api/resources/DatabaseResource.py +2 -2
- mage_ai/api/resources/PermissionResource.py +65 -3
- mage_ai/api/resources/Resource.py +8 -1
- mage_ai/api/resources/RolePermissionResource.py +23 -0
- mage_ai/api/resources/RoleResource.py +75 -4
- mage_ai/api/resources/StatusResource.py +34 -0
- mage_ai/api/resources/UserResource.py +35 -4
- mage_ai/api/result_set.py +8 -1
- mage_ai/authentication/permissions/constants.py +78 -0
- mage_ai/data_integrations/destinations/constants.py +1 -0
- mage_ai/data_integrations/utils/config.py +9 -0
- mage_ai/data_integrations/utils/scheduler.py +16 -7
- mage_ai/data_preparation/models/block/__init__.py +56 -16
- mage_ai/data_preparation/models/block/data_integration/mixins.py +92 -1
- mage_ai/data_preparation/models/block/data_integration/utils.py +5 -5
- mage_ai/data_preparation/models/block/integration/__init__.py +12 -7
- mage_ai/data_preparation/models/block/sql/__init__.py +5 -2
- mage_ai/data_preparation/models/block/sql/utils/shared.py +15 -1
- mage_ai/data_preparation/models/pipelines/interactions.py +15 -0
- mage_ai/data_preparation/shared/secrets.py +7 -17
- mage_ai/data_preparation/templates/data_exporters/streaming/google_cloud_pubsub.yaml +5 -0
- mage_ai/data_preparation/templates/repo/metadata.yaml +5 -0
- mage_ai/io/druid.py +9 -5
- mage_ai/io/mssql.py +52 -30
- mage_ai/io/postgres.py +1 -0
- mage_ai/io/sql.py +15 -1
- mage_ai/orchestration/db/models/oauth.py +181 -17
- mage_ai/orchestration/db/models/schedules.py +11 -0
- mage_ai/presenters/interactions/constants.py +1 -0
- mage_ai/presenters/pages/loaders/pipeline_schedules.py +9 -3
- mage_ai/server/api/base.py +16 -6
- mage_ai/server/api/v1.py +2 -1
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +2 -2
- mage_ai/server/frontend_dist/_next/static/PBVuphyo_muEAj347ZP_b/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1124-d8fc76201b83b376.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{1749-9ec0f4709f5a9284.js → 1749-a6bdce4ee8a09bce.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1769-613e23e361eb5bce.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1821-953efd0da290d25f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2327-1a797c758f8b064a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2677-a85c5a72bb695304.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3419-6c8ec8db8c398c12.js → frontend_dist/_next/static/chunks/3419-0df6c5ef72f2e672.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3684-e1a713b7c16f0151.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3859-3501cdba0a33f9f2.js → frontend_dist/_next/static/chunks/3859-ba594d21a1260cd2.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/4636-84f545d1d238df13.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/4839-963da65cea58054f.js → frontend_dist/_next/static/chunks/4839-e5fe343a369734bc.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5457-97433bc45b42a88a.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/5499-63667ad5a785dba5.js → frontend_dist/_next/static/chunks/5499-b74459f6be5f9229.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6043-6ea109833b88eb1d.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/6333-ca4cd6a73a597a40.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7022-80d082a1d7fd1234.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7361-25f211ef377e5958.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/8013-1d6b1f7c13264cb4.js → frontend_dist/_next/static/chunks/8013-e67c71ddea072a20.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8146-941c5155c3bfcc35.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9161-837b653aa849a76f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9264-5730e4e059db40a8.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-752d991f239a128f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{block-layout-a624972d126a3dbd.js → block-layout-a27a28d2a615e364.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-98e27a4d7bd0da47.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/{[...slug]-a95787fe1695f493.js → [...slug]-9eb5dad57da13efd.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-data-products-0d55711df91a78d0.js → global-data-products-26909dec66f00231.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-b9eea6abc676ca81.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-11c601c6ef07fe86.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-ae6083077c9c1c41.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-bfce0ee677d57206.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-476c921d62f565fc.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/overview-9bc34ef66d84330a.js → frontend_dist/_next/static/chunks/pages/overview-2ec6b17e45a52be8.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-605918f3a5c1aac4.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-84ec3ab0770bcd68.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ee65a62ed166bd85.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-2402004a19a6ad53.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-9a5b4768a640cd68.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-8781db69f19759a1.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-d7fd4857579e2b00.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-bd4bd009146bab36.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-234007c99efdccf6.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-8405a83adeaa8ff5.js → block-runs-da7510d4b277e47b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runtime-98aa0840a00cc661.js → block-runtime-eae853ff34b09481.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-0fb48e1cc51f78b2.js → monitors-a057b17847b82468.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/{[run]-845c1f010d5ec380.js → [run]-99d11c86f8b15369.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-9255f85760e1f57a.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-3f0980d8810a540b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{settings-187ac359020704e1.js → settings-9edf75d03460aaeb.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-c52d0c49439ec620.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-e7692e54979f037d.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-7b3b57523b226a0e.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-cb6a3bcaf4fa1a81.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-5eff96c149584e87.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipelines-efc080913a247e99.js → pipelines-270b912e1ac189b5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-2058d022972cdea4.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/[...slug]-1a95628ea8d0d846.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions-cb1cdf5f8e5bf9c5.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-58978256db4efbda.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/[...slug]-9ddd7eb842d5a911.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles-1694c5eb1acbcf30.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-6850e854fbedbb61.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/[...slug]-5061c073e1c0de07.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-f551c5665bfd3494.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-6fe3657070f98aca.js → frontend_dist/_next/static/chunks/pages/sign-in-e779dbab123e626e.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/[...slug]-935113d252ada806.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/templates-25b6d24cfa81c306.js → frontend_dist/_next/static/chunks/pages/templates-7079d637e396f2a8.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-67fdb4a3be93aa14.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-9c0374c7c783b34a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-ea3a0d48e5822b42.js +1 -0
- mage_ai/server/frontend_dist/block-layout.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/index.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/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/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +24 -0
- mage_ai/server/frontend_dist/settings/workspace/permissions.html +24 -0
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +24 -0
- mage_ai/server/frontend_dist/settings/workspace/roles.html +24 -0
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +24 -0
- 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 +5 -5
- 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 +2 -2
- mage_ai/server/frontend_dist_base_path_template/_next/static/L-IKw5_bRZUs-wyjnpN_j/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1124-d8fc76201b83b376.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1749-9ec0f4709f5a9284.js → 1749-a6bdce4ee8a09bce.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1769-613e23e361eb5bce.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1821-953efd0da290d25f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2327-1a797c758f8b064a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2677-a85c5a72bb695304.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/3419-6c8ec8db8c398c12.js → frontend_dist_base_path_template/_next/static/chunks/3419-0df6c5ef72f2e672.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3684-e1a713b7c16f0151.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/3859-3501cdba0a33f9f2.js → frontend_dist_base_path_template/_next/static/chunks/3859-ba594d21a1260cd2.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4636-84f545d1d238df13.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/4839-963da65cea58054f.js → frontend_dist_base_path_template/_next/static/chunks/4839-e5fe343a369734bc.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5457-97433bc45b42a88a.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/5499-63667ad5a785dba5.js → frontend_dist_base_path_template/_next/static/chunks/5499-b74459f6be5f9229.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6043-6ea109833b88eb1d.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6333-ca4cd6a73a597a40.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7022-80d082a1d7fd1234.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-25f211ef377e5958.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/8013-1d6b1f7c13264cb4.js → frontend_dist_base_path_template/_next/static/chunks/8013-e67c71ddea072a20.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8146-941c5155c3bfcc35.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9161-837b653aa849a76f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-5730e4e059db40a8.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-752d991f239a128f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{block-layout-a624972d126a3dbd.js → block-layout-a27a28d2a615e364.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-98e27a4d7bd0da47.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/{[...slug]-a95787fe1695f493.js → [...slug]-9eb5dad57da13efd.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-data-products-0d55711df91a78d0.js → global-data-products-26909dec66f00231.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-b9eea6abc676ca81.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-11c601c6ef07fe86.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-ae6083077c9c1c41.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-bfce0ee677d57206.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-476c921d62f565fc.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/overview-9bc34ef66d84330a.js → frontend_dist_base_path_template/_next/static/chunks/pages/overview-2ec6b17e45a52be8.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-605918f3a5c1aac4.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-84ec3ab0770bcd68.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ee65a62ed166bd85.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-2402004a19a6ad53.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-9a5b4768a640cd68.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-8781db69f19759a1.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-d7fd4857579e2b00.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-bd4bd009146bab36.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-234007c99efdccf6.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-8405a83adeaa8ff5.js → block-runs-da7510d4b277e47b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runtime-98aa0840a00cc661.js → block-runtime-eae853ff34b09481.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-0fb48e1cc51f78b2.js → monitors-a057b17847b82468.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/{[run]-845c1f010d5ec380.js → [run]-99d11c86f8b15369.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-9255f85760e1f57a.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-3f0980d8810a540b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{settings-187ac359020704e1.js → settings-9edf75d03460aaeb.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-c52d0c49439ec620.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-e7692e54979f037d.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-7b3b57523b226a0e.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-cb6a3bcaf4fa1a81.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-5eff96c149584e87.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{pipelines-efc080913a247e99.js → pipelines-270b912e1ac189b5.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-2058d022972cdea4.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/[...slug]-1a95628ea8d0d846.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions-cb1cdf5f8e5bf9c5.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-58978256db4efbda.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/[...slug]-9ddd7eb842d5a911.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles-1694c5eb1acbcf30.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-6850e854fbedbb61.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/[...slug]-5061c073e1c0de07.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users-f551c5665bfd3494.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/sign-in-6fe3657070f98aca.js → frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-e779dbab123e626e.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-935113d252ada806.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/templates-25b6d24cfa81c306.js → frontend_dist_base_path_template/_next/static/chunks/pages/templates-7079d637e396f2a8.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/terminal-67fdb4a3be93aa14.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-9c0374c7c783b34a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-ea3a0d48e5822b42.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/files.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/global-data-products.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/settings.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage/users.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/manage.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/overview.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +5 -5
- 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 +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +24 -0
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +24 -0
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +24 -0
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +24 -0
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +24 -0
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/sign-in.html +13 -13
- mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +5 -5
- mage_ai/server/frontend_dist_base_path_template/templates.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/terminal.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/test.html +4 -4
- mage_ai/server/frontend_dist_base_path_template/triggers.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/version-control.html +5 -5
- mage_ai/server/server.py +37 -2
- mage_ai/services/aws/__init__.py +19 -8
- mage_ai/services/spark/config.py +5 -1
- mage_ai/services/spark/spark.py +5 -4
- mage_ai/settings/__init__.py +2 -0
- mage_ai/streaming/constants.py +1 -0
- mage_ai/streaming/sinks/google_cloud_pubsub.py +66 -0
- mage_ai/streaming/sinks/sink_factory.py +6 -0
- mage_ai/tests/api/operations/test_operations.py +8 -2
- mage_ai/tests/api/operations/test_pipeline_schedules.py +3 -0
- mage_ai/tests/data_preparation/models/block/sql/utils/test_shared.py +130 -5
- mage_ai/tests/factory.py +2 -0
- mage_ai/tests/orchestration/test_pipeline_scheduler.py +20 -3
- mage_ai/tests/streaming/sinks/test_google_cloud_pubsub.py +28 -0
- mage_ai/usage_statistics/logger.py +4 -1
- {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/METADATA +1 -1
- {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/RECORD +302 -268
- mage_ai/api/policies/utils.py +0 -14
- mage_ai/server/frontend_dist/_next/static/cbN7L4Ms6UUPoANozEh9w/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1769-e2efd4df8d09481f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2327-2d8a1555605cf4af.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2369-cb9cd97052e18d27.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2677-aea54e655c4a727f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5457-994e1044953f1425.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5597-c034402ee26af3b4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6333-d1f8db4e7d9656a5.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6648-9bd31397f1d1b551.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9161-0101571a3635a938.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9264-7c4fcfed1200046a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9696-3e8ab7786f0e3a0e.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-976b488b8aea327f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-1a6c6654bfc953ac.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-49004d918b04c866.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-97177740fbb6eb9f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-5b6411c9eb8c4ba4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-0a7a746cc0998608.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-606012a580245001.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-0801de3c9a2976ea.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-0a5865d4cf012127.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-87b1a0601c4236cd.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-77ffaa2d721a0a4e.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-4e72d40881ac0605.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-8da8f8e2fdb1c99f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-be029347e99fcea2.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-d4b07df78b3d6037.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/[...slug]-87c492e9edc6064e.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-2ab9f3d0c50cce81.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-0ba40243a030ddf4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-28a3a43d65074394.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1769-e2efd4df8d09481f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2327-2d8a1555605cf4af.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2369-cb9cd97052e18d27.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2677-aea54e655c4a727f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5457-994e1044953f1425.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5597-c034402ee26af3b4.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6333-d1f8db4e7d9656a5.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6648-9bd31397f1d1b551.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9161-0101571a3635a938.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-7c4fcfed1200046a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9696-3e8ab7786f0e3a0e.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-976b488b8aea327f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-1a6c6654bfc953ac.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-49004d918b04c866.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-97177740fbb6eb9f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-5b6411c9eb8c4ba4.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-0a7a746cc0998608.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-606012a580245001.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-0801de3c9a2976ea.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-0a5865d4cf012127.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-87b1a0601c4236cd.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-77ffaa2d721a0a4e.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-4e72d40881ac0605.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-8da8f8e2fdb1c99f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-be029347e99fcea2.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users-d4b07df78b3d6037.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-87c492e9edc6064e.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/terminal-2ab9f3d0c50cce81.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-0ba40243a030ddf4.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-28a3a43d65074394.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/o_Yc57jh8Te2SI-VoipGQ/_buildManifest.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{cbN7L4Ms6UUPoANozEh9w → PBVuphyo_muEAj347ZP_b}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{o_Yc57jh8Te2SI-VoipGQ → L-IKw5_bRZUs-wyjnpN_j}/_ssgManifest.js +0 -0
- {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/top_level.txt +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7803],{17717:function(e){!function(){"use strict";var n={114:function(e){function n(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,n){for(var r,t="",o=0,i=-1,l=0,c=0;c<=e.length;++c){if(c<e.length)r=e.charCodeAt(c);else{if(47===r)break;r=47}if(47===r){if(i===c-1||1===l);else if(i!==c-1&&2===l){if(t.length<2||2!==o||46!==t.charCodeAt(t.length-1)||46!==t.charCodeAt(t.length-2))if(t.length>2){var u=t.lastIndexOf("/");if(u!==t.length-1){-1===u?(t="",o=0):o=(t=t.slice(0,u)).length-1-t.lastIndexOf("/"),i=c,l=0;continue}}else if(2===t.length||1===t.length){t="",o=0,i=c,l=0;continue}n&&(t.length>0?t+="/..":t="..",o=2)}else t.length>0?t+="/"+e.slice(i+1,c):t=e.slice(i+1,c),o=c-i-1;i=c,l=0}else 46===r&&-1!==l?++l:l=-1}return t}var t={resolve:function(){for(var e,t="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var l;i>=0?l=arguments[i]:(void 0===e&&(e=""),l=e),n(l),0!==l.length&&(t=l+"/"+t,o=47===l.charCodeAt(0))}return t=r(t,!o),o?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(n(e),0===e.length)return".";var t=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!t)).length||t||(e="."),e.length>0&&o&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return n(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var o=arguments[r];n(o),o.length>0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":t.normalize(e)},relative:function(e,r){if(n(e),n(r),e===r)return"";if((e=t.resolve(e))===(r=t.resolve(r)))return"";for(var o=1;o<e.length&&47===e.charCodeAt(o);++o);for(var i=e.length,l=i-o,c=1;c<r.length&&47===r.charCodeAt(c);++c);for(var u=r.length-c,s=l<u?l:u,a=-1,d=0;d<=s;++d){if(d===s){if(u>s){if(47===r.charCodeAt(c+d))return r.slice(c+d+1);if(0===d)return r.slice(c+d)}else l>s&&(47===e.charCodeAt(o+d)?a=d:0===d&&(a=0));break}var f=e.charCodeAt(o+d);if(f!==r.charCodeAt(c+d))break;47===f&&(a=d)}var v="";for(d=o+a+1;d<=i;++d)d!==i&&47!==e.charCodeAt(d)||(0===v.length?v+="..":v+="/..");return v.length>0?v+r.slice(c+a):(c+=a,47===r.charCodeAt(c)&&++c,r.slice(c))},_makeLong:function(e){return e},dirname:function(e){if(n(e),0===e.length)return".";for(var r=e.charCodeAt(0),t=47===r,o=-1,i=!0,l=e.length-1;l>=1;--l)if(47===(r=e.charCodeAt(l))){if(!i){o=l;break}}else i=!1;return-1===o?t?"/":".":t&&1===o?"//":e.slice(0,o)},basename:function(e,r){if(void 0!==r&&"string"!==typeof r)throw new TypeError('"ext" argument must be a string');n(e);var t,o=0,i=-1,l=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var c=r.length-1,u=-1;for(t=e.length-1;t>=0;--t){var s=e.charCodeAt(t);if(47===s){if(!l){o=t+1;break}}else-1===u&&(l=!1,u=t+1),c>=0&&(s===r.charCodeAt(c)?-1===--c&&(i=t):(c=-1,i=u))}return o===i?i=u:-1===i&&(i=e.length),e.slice(o,i)}for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!l){o=t+1;break}}else-1===i&&(l=!1,i=t+1);return-1===i?"":e.slice(o,i)},extname:function(e){n(e);for(var r=-1,t=0,o=-1,i=!0,l=0,c=e.length-1;c>=0;--c){var u=e.charCodeAt(c);if(47!==u)-1===o&&(i=!1,o=c+1),46===u?-1===r?r=c:1!==l&&(l=1):-1!==r&&(l=-1);else if(!i){t=c+1;break}}return-1===r||-1===o||0===l||1===l&&r===o-1&&r===t+1?"":e.slice(r,o)},format:function(e){if(null===e||"object"!==typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,n){var r=n.dir||n.root,t=n.base||(n.name||"")+(n.ext||"");return r?r===n.root?r+t:r+e+t:t}("/",e)},parse:function(e){n(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var t,o=e.charCodeAt(0),i=47===o;i?(r.root="/",t=1):t=0;for(var l=-1,c=0,u=-1,s=!0,a=e.length-1,d=0;a>=t;--a)if(47!==(o=e.charCodeAt(a)))-1===u&&(s=!1,u=a+1),46===o?-1===l?l=a:1!==d&&(d=1):-1!==l&&(d=-1);else if(!s){c=a+1;break}return-1===l||-1===u||0===d||1===d&&l===u-1&&l===c+1?-1!==u&&(r.base=r.name=0===c&&i?e.slice(1,u):e.slice(c,u)):(0===c&&i?(r.name=e.slice(1,l),r.base=e.slice(1,u)):(r.name=e.slice(c,l),r.base=e.slice(c,u)),r.ext=e.slice(l,u)),c>0?r.dir=e.slice(0,c-1):i&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};t.posix=t,e.exports=t}},r={};function t(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}},l=!0;try{n[e](i,i.exports,t),l=!1}finally{l&&delete r[e]}return i.exports}t.ab="//";var o=t(114);e.exports=o}()},41143:function(e,n,r){"use strict";var t;r.d(n,{V:function(){return t}}),function(e){e.CANCELLED="cancelled",e.COMPLETED="completed",e.FAILED="failed",e.INITIAL="initial",e.RUNNING="running",e.UPSTREAM_FAILED="upstream_failed",e.CONDITION_FAILED="condition_failed"}(t||(t={}))},44265:function(e,n,r){"use strict";r.d(n,{Az:function(){return u},BF:function(){return c},Do:function(){return a},IK:function(){return l},VO:function(){return i},sZ:function(){return s}});var t,o=r(82394),i=r(41143).V,l=[i.FAILED,i.COMPLETED,i.RUNNING,i.CANCELLED,i.INITIAL],c=[i.INITIAL,i.RUNNING],u=[i.CANCELLED,i.COMPLETED,i.FAILED],s="__mage_variables",a=(t={},(0,o.Z)(t,i.CANCELLED,"Cancelled"),(0,o.Z)(t,i.COMPLETED,"Done"),(0,o.Z)(t,i.FAILED,"Failed"),(0,o.Z)(t,i.INITIAL,"Ready"),(0,o.Z)(t,i.RUNNING,"Running"),t)},25050:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return ie}});var t=r(77837),o=r(38860),i=r.n(o),l=r(82684),c=r(75457),u=r(93808),s=r(75582),a=r(82394),d=r(97618),f=r(55485),v=r(85854),h=r(44265),m=r(38276),p=r(4190),g=r(30160),b=r(44897),x=r(72473),j=r(38626),Z=r(42631),y=r(95363),_=r(70515),k=r(61896),I=j.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-15svh8z-0"})(["border-radius:","px;margin:","px;overflow:hidden;"," "," "," "," "," "," &:hover{"," "," "," "," ","}"],Z.n_,_.cd*_.iI,(function(e){return"\n background-color: ".concat((e.theme.background||b.Z.background).panel,";\n border: 1px solid ").concat((e.theme.borders||b.Z.borders).dark,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(e){return e.selected&&e.danger&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.selected&&e.primary&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.selected&&e.default&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")}),(function(e){return e.selected&&e.success&&"\n border-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.selected&&e.warning&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")}),(function(e){return e.danger&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")}),(function(e){return e.success&&"\n border-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")})),w=(0,j.css)([""," "," "," "," ",""],(function(e){return e.danger&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")})),N=j.default.div.withConfig({displayName:"indexstyle__StatusStyle",componentId:"sc-15svh8z-1"})([""," ",";border-radius:","px;display:inline-block;font-family:",";padding:6px;"," "," "," "," "," ",""],w,k.iD,Z.D7,y.ry,(function(e){return e.danger&&"\n color: ".concat((e.theme.content||b.Z.content).active,";\n ")}),(function(e){return e.primary&&"\n color: ".concat((e.theme.content||b.Z.content).active,";\n ")}),(function(e){return(e.default||e.success)&&"\n "}),(function(e){return e.default&&"\n color: ".concat((e.theme.content||b.Z.content).default,";\n ")}),(function(e){return e.success&&"\n color: ".concat((e.theme.content||b.Z.content).inverted,";\n ")}),(function(e){return e.warning&&"\n color: ".concat((e.theme.content||b.Z.content).inverted,";\n ")})),O=j.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-15svh8z-2"})([""," display:flex;height:auto;width:3px;",""],w,(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")})),E=r(81728),P=r(92083),C=r.n(P),A=r(41143),L=r(86735);function M(e){var n;return Object.keys((null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{}).sort()}function S(e){var n,r,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=null,i=null,l=null,c=null,u={},a=(null===e||void 0===e?void 0:e.block_runs)||[],d=(null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{},f=(null===e||void 0===e||null===(r=e.metrics)||void 0===r?void 0:r.pipeline)||{},v=D(e);return Object.entries(d).forEach((function(e){var n,r=(0,s.Z)(e,2),a=r[0],d=r[1];if(!t||t===a){var h,m=d||{},p=m.destinations,g=void 0===p?{records_affected:null,records_inserted:null,records_updated:null}:p,b=m.sources,x=void 0===b?{records:null}:b,j=v[a]||[];if(t&&t===a&&j.every((function(e){var n=e.status;return A.V.COMPLETED===n}))&&null===o&&(o=0),null!==f&&void 0!==f&&null!==(n=f[a])&&void 0!==n&&n.record_counts)null===o&&(o=0),o+=Number(null===f||void 0===f||null===(h=f[a])||void 0===h?void 0:h.record_counts);else null!==x&&void 0!==x&&x.records&&(null===o&&(o=0),o+=Number(x.records));null!==g&&void 0!==g&&g.records_updated?(null===l&&(l=0),l+=Number(g.records_updated),null===c&&(c=0),c+=Number(g.records_updated)):null!==g&&void 0!==g&&g.records_inserted?(null===l&&(l=0),l+=Number(g.records_inserted),null===i&&(i=0),i+=Number(g.records_inserted)):null!==g&&void 0!==g&&g.records_affected&&(null===l&&(l=0),l+=Number(g.records_affected)),["destinations","sources"].forEach((function(e){var n=d[e]||{};null!==n&&void 0!==n&&n.error&&(u[a]||(u[a]={}),u[a][e]={error:null===n||void 0===n?void 0:n.error,errors:null===n||void 0===n?void 0:n.errors,message:null===n||void 0===n?void 0:n.message})}))}})),null===a||void 0===a||a.forEach((function(e){var n=e.block_uuid,r=e.metrics,t=e.status;if(A.V.FAILED===t&&null!==r&&void 0!==r&&r.error&&n){var o=n.split(":"),i=(0,s.Z)(o,3),l=(i[0],i[1]);i[2];u[l]||(u[l]={}),u[l][""]=r.error}})),{errors:u,records:o,recordsInserted:i,recordsProcessed:l,recordsUpdated:c}}function D(e){var n=e.block_runs,r={};return null===n||void 0===n||n.forEach((function(e){var n=e.block_uuid.split(":"),t=(0,s.Z)(n,3),o=(t[0],t[1]);t[2];r[o]||(r[o]=[]),r[o].push(e)})),r}function T(e){var n=D(e),r={};return Object.entries(n).forEach((function(e){var n=(0,s.Z)(e,2),t=n[0],o=n[1],i=o.filter((function(e){var n=e.status;return A.V.COMPLETED===n})),l=i.map((function(e){var n=e.completed_at,r=e.started_at,t=C().utc(n),o=C().utc(r);return t.diff(o,"second")})),c=i.length,u=o.length;r[t]={completed:c,runtime:l.length>=1?(0,L.Sm)(l)/l.length:null,total:u}})),r}function V(e){var n=e.block_runs,r=(null===n||void 0===n?void 0:n.length)||1,t=function(e){var n=(null===e||void 0===e?void 0:e.block_runs)||[];return null===n||void 0===n?void 0:n.filter((function(e){var n=e.status;return A.V.COMPLETED===n}))}(e).length||0;return t/r}function R(e){var n=e.completed_at,r=e.block_runs,t=void 0===r?[]:r,o=e.status;if(null===t||void 0===t||!t.length)return 0;var i=C().utc();if(n)i=C().utc(n);else if([h.VO.CANCELLED,h.VO.FAILED].includes(o)){var l=(0,L.YC)(t,(function(e){return e.started_at}),{ascending:!1})[0];i=C().utc(l.updated_at)}var c=C().utc(e.created_at);return i.diff(c,"second")}function U(e,n){var r,t,o,i,l,c=D(e),u=T(e),s=(null===e||void 0===e?void 0:e.metrics)||{blocks:null,pipeline:null},a=s.blocks||{},d=s.pipeline||{},f=(a[n],d[n],u[n]||{completed:null,total:null}),v=f.completed,h=f.total,m=v&&h?v/h:0,p=c[n]||[],g=p.every((function(e){var n=e.status;return A.V.COMPLETED===n})),b=(0,L.YC)(p,(function(e){return e.updated_at}),{ascending:!1})[0],x=null===(r=(0,L.YC)(p,(function(e){return e.started_at}),{ascending:!0})[0])||void 0===r?void 0:r.started_at;g?t=null===(l=(0,L.YC)(p,(function(e){return e.completed_at}),{ascending:!1})[0])||void 0===l?void 0:l.completed_at:b&&(i=null===b||void 0===b?void 0:b.updated_at);var j=g?C().utc(t||i):C().utc(),Z=C().utc(x);return{completed:v,completedAt:t,done:g,progress:m,runtime:o=j.diff(Z,"second"),startedAt:x,status:null===b||void 0===b?void 0:b.status,timeText:(0,E.zf)(o),total:h,updatedAt:i}}var F=r(28598);function z(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function G(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?z(Object(r),!0).forEach((function(n){(0,a.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var B=function(e){var n=e.onSelect,r=e.pipelineRun,t=e.selected,o=(r.block_runs,r.created_at),i=r.status,c=(0,l.useMemo)((function(){return(null===r||void 0===r?void 0:r.metrics)||{blocks:{},destination:null,pipeline:{},source:null}}),[r]),u=((0,l.useMemo)((function(){return c.blocks||{}}),[c]),(0,l.useMemo)((function(){return c.pipeline||{}}),[c])),a=c.destination,j=c.source,Z=(0,l.useMemo)((function(){return Object.keys(u).length}),[u]),y=(0,l.useMemo)((function(){return S(r)}),[r]),k=y.errors,w=y.records,P=y.recordsProcessed,C=(0,l.useMemo)((function(){return V(r)}),[r]),A=(0,l.useMemo)((function(){return[h.VO.COMPLETED].includes(i)}),[i]),L=(0,l.useMemo)((function(){return{danger:h.VO.FAILED===i,default:h.VO.INITIAL===i,primary:h.VO.RUNNING===i,success:A,warning:h.VO.CANCELLED===i}}),[A,i]),M=(0,l.useMemo)((function(){if(r){var e=R(r);return(0,E.zf)(e)}}),[r]);return(0,F.jsx)(I,G(G({},L),{},{onClick:function(){return n(t?null:r.id)},selected:t,children:(0,F.jsxs)(f.ZP,{fullHeight:!0,justifyContent:"space-between",children:[(0,F.jsx)(O,G({},L)),(0,F.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,F.jsxs)(m.Z,{ml:3,py:3,children:[(0,F.jsx)(v.Z,{bold:!0,level:5,monospace:!0,children:o}),(0,F.jsx)(m.Z,{fullWidth:!1,mt:2,children:(0,F.jsx)(N,G(G({},L),{},{children:(0,F.jsxs)(f.ZP,{alignItems:"center",children:[A&&(0,F.jsx)(x.Jr,{inverted:!0,size:2*_.iI}),[h.VO.INITIAL,h.VO.RUNNING].includes(i)&&(0,F.jsx)(p.Z,{color:h.VO.INITIAL!==i?b.Z.monotone.white:null,inverted:h.VO.INITIAL===i,small:!0}),"\xa0",h.VO.RUNNING===i&&(0,F.jsxs)(F.Fragment,{children:["\xa0",Math.round(100*C),"%"]}),![h.VO.INITIAL,h.VO.RUNNING].includes(i)&&h.Do[i],h.VO.INITIAL===i&&"Starting"]})}))}),Object.values(k).length>=1&&(0,F.jsx)(m.Z,{mt:1,children:Object.entries(k).map((function(e,n){var r=(0,s.Z)(e,2),t=r[0];r[1];return(0,F.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:[t," stream failed"]},t)}))})]})}),(0,F.jsxs)(d.Z,{flex:1,children:[(0,F.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,F.jsxs)(m.Z,{ml:3,py:3,children:[(0,F.jsxs)(m.Z,{mb:1,children:[(0,F.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Rows processed"}),(0,F.jsx)(g.ZP,{monospace:!0,children:P>=1?(0,E.x6)(P):"-"})]}),(0,F.jsxs)(m.Z,{mb:1,children:[(0,F.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Rows remaining"}),(0,F.jsx)(g.ZP,{monospace:!0,children:w>=1&&w>=P?(0,E.x6)(w-P):"-"})]}),h.VO.RUNNING!==i&&(0,F.jsxs)(m.Z,{mb:1,children:[(0,F.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Runtime"}),(0,F.jsx)(g.ZP,{monospace:!0,children:M})]})]})}),(0,F.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,F.jsxs)(m.Z,{ml:3,py:3,children:[(0,F.jsxs)(m.Z,{mb:1,children:[(0,F.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Source"}),(0,F.jsx)(g.ZP,{monospace:!0,children:j||"-"})]}),(0,F.jsxs)(m.Z,{mb:1,children:[(0,F.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Destination"}),(0,F.jsx)(g.ZP,{monospace:!0,children:a||"-"})]}),(0,F.jsxs)(m.Z,{mb:1,children:[(0,F.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Streams"}),(0,F.jsx)(g.ZP,{monospace:!0,children:Z>=1?(0,E.x6)(Z):"-"})]})]})})]})]})}))},Y=r(89565),W=r.n(Y),J=r(34376),X=r(71180),q=r(48670),H=r(75499),K=j.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1thr560-0"})(["display:flex;flex:1;"," "," ",""],(function(e){return e.even&&e.fill&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).cyan,";\n ")}),(function(e){return e.even&&!e.fill&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).cyanTransparent,";\n ")}),(function(e){return"\n height: ".concat((e.small?1:2)*_.iI,"px;\n ")})),Q=r(3314);var $=function(e){var n=e.onClickRow,r=e.pipelineRun,t=e.selectedStream,o=(0,J.useRouter)(),i=(0,l.useState)(null),c=i[0],u=i[1],a=(0,l.useState)(null),d=a[0],p=a[1],b=(0,l.useMemo)((function(){return r?D(r):{}}),[r]),j=(0,l.useMemo)((function(){return r?T(r):{}}),[r]),Z=(0,l.useMemo)((function(){var e=0,n=[],r=[];if(Object.entries(j).forEach((function(t){var o=(0,s.Z)(t,2),i=(o[0],o[1]),l=i.completed,c=i.runtime,u=i.total;null===c?r.push(i):(n.push(c),e+=c*(u-l))})),0===n.length)return null;var t=(0,L.Sm)(n)/n.length;return r.forEach((function(n){var r=n.completed,o=n.total;e+=t*(o-r)})),e}),[j]),y=(0,l.useMemo)((function(){return t?j[t]:null}),[j,t]),k=(0,l.useMemo)((function(){if(t&&j){var e=j[t]||{},n=e.completed,o=e.total;if(o>=1)return n/o}else if(r)return V(r);return 0}),[y,r,t]),I=(0,l.useMemo)((function(){return(0,F.jsx)(f.ZP,{children:(0,L.w6)(101).map((function(e,n){return(0,F.jsx)(K,{even:n%2===0,fill:k>0&&Math.round(100*k)>=n},n)}))})}),[k]),w=(0,l.useMemo)((function(){if(t){var e=b[t]||[],n=e.every((function(e){var n=e.status;return A.V.COMPLETED===n})),o=(0,L.YC)(e,(function(e){return e.updated_at}),{ascending:!1})[0],i=null===o||void 0===o?void 0:o.status,l=y||{},c=l.completed,u=l.runtime,s=l.total;if(n)return"Sync complete for ".concat(t);if([A.V.CANCELLED,A.V.FAILED].includes(i))return h.Do[i];if(u&&s>=1){var a=Math.ceil(u*(s-c)/60);return"".concat((0,E._6)("minute",a,!0)," to completion")}return"Estimating time remaining for stream..."}if(h.VO.COMPLETED===(null===r||void 0===r?void 0:r.status))return"Sync complete";if(r){if([h.VO.CANCELLED,h.VO.FAILED].includes(null===r||void 0===r?void 0:r.status))return h.Do[null===r||void 0===r?void 0:r.status];if(h.VO.INITIAL===(null===r||void 0===r?void 0:r.status))return"Initializing sync (this can take several minutes)";if(null===Z)return"Estimating time remaining...";var d=Math.ceil(Z/60);return"".concat((0,E._6)("minute",d,!0)," to completion")}return"Select a sync"}),[b,Z,y,r,t]),N=(0,l.useMemo)((function(){return r&&t?U(r,t):{completed:null,completedAt:null,done:null,progress:null,runtime:null,startedAt:null,status:null,timeText:null,total:null,updatedAt:null}}),[r,t]);(0,l.useEffect)((function(){var e;if(r){var n=R(r);u(n),e=setInterval((function(){return u((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[r]),(0,l.useEffect)((function(){var e;if(r&&t&&N){var n=(null===N||void 0===N?void 0:N.runtime)||0;p(n),e=setInterval((function(){return p((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[r,t,N]);var O=(0,l.useMemo)((function(){if(r){if(t)return null===N||void 0===N?void 0:N.timeText;var e=R(r);return(0,E.zf)(e)}}),[r,t,N]),P=(0,l.useMemo)((function(){var e=Math.floor(c%86400/3600),n=Math.floor(c%3600/60),r=Math.floor(c%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),r>=10?String(r):"0".concat(r)].join(":")}),[c]),C=(0,l.useMemo)((function(){var e=Math.floor(d%86400/3600),n=Math.floor(d%3600/60),r=Math.floor(d%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),r>=10?String(r):"0".concat(r)].join(":")}),[d]),z=(0,l.useMemo)((function(){return r?S(r):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[r]),G=z.errors,B=z.records,Y=z.recordsInserted,$=z.recordsProcessed,ee=z.recordsUpdated,ne=(0,l.useMemo)((function(){return r&&t?S(r,t):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[r,t]),re=(0,l.useMemo)((function(){var e=t?null===ne||void 0===ne?void 0:ne.records:B,n=t?null===ne||void 0===ne?void 0:ne.recordsInserted:Y,r=t?null===ne||void 0===ne?void 0:ne.recordsProcessed:$,o=t?null===ne||void 0===ne?void 0:ne.recordsUpdated:ee,i=[{label:"Rows fetched",value:null===e?"-":(0,E.x6)(e)}];return null===n&&null===o?i.push({label:"Rows processed",value:null===r?"-":(0,E.x6)(r)}):null!==n?i.push({label:"Rows inserted",value:(0,E.x6)(n)}):null!==o&&i.push({label:"Rows updated",value:(0,E.x6)(o)}),i.map((function(e){var n=e.label,r=e.value;return(0,F.jsxs)("div",{children:[(0,F.jsx)(g.ZP,{bold:!0,large:!0,muted:!0,children:n}),(0,F.jsx)(g.ZP,{headline:!0,children:r})]},n)}))}),[B,ne,Y,$,ee,O,P,status]),te=(0,l.useMemo)((function(){if(!r)return(0,F.jsx)("div",{});var e=M(r);return(0,F.jsx)(H.Z,{columnFlex:[null,null,null,null,null,null],columns:[{uuid:"Stream"},{uuid:"Start"},{uuid:"End"},{uuid:"Time"},{uuid:"Progress"},{uuid:"Logs"}],isSelectedRow:function(n){return t&&t===e[n]},onClickRow:n,rows:e.map((function(e){var n=U(r,e),t=(n.completed,n.completedAt),i=n.done,l=n.progress,c=n.startedAt,u=n.status,s=n.timeText,a=(n.total,!!G[e]);return[(0,F.jsx)(g.ZP,{danger:a,default:!a,monospace:!0,children:e},"stream"),(0,F.jsx)(g.ZP,{default:!0,monospace:!0,children:c?c.split(".")[0]:"-"},"started_at"),(0,F.jsx)(g.ZP,{default:!0,monospace:!0,children:t?t.split(".")[0]:"-"},"completed_at"),(0,F.jsx)(g.ZP,{default:!0,children:[A.V.INITIAL,A.V.RUNNING].includes(u)?"-":s},"runtime"),(0,F.jsxs)("div",{children:[i&&(0,F.jsx)(x.Jr,{default:!0,size:2*_.iI}),!i&&(0,F.jsx)(f.ZP,{children:(0,L.w6)(51).map((function(e,n){return(0,F.jsx)(K,{fill:l>0&&Math.round(50*l)>=n,even:n%2===0,small:!0},n)}))})]},"progress"),(0,F.jsx)(X.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(e){o.push("/pipelines/".concat(r.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(r.id)),(0,Q.j)(e)},children:(0,F.jsx)(x.UL,{default:!0,size:2*_.iI})},"logs")]})),uuid:"".concat(null===r||void 0===r?void 0:r.id,"-streams-table")})}),[G,j,r,t]),oe=(0,l.useMemo)((function(){var e,n,o,i,l,c,u,a;if(r&&t){var d=(null===r||void 0===r?void 0:r.metrics)||{blocks:null,destination:null,pipeline:null,source:null},f=null===d||void 0===d||null===(e=d.pipeline)||void 0===e||null===(n=e[t])||void 0===n||null===(o=n.bookmarks)||void 0===o?void 0:o[t],v=null===d||void 0===d||null===(i=d.blocks)||void 0===i||null===(l=i[t])||void 0===l||null===(c=l.destinations)||void 0===c||null===(u=c.state)||void 0===u||null===(a=u.bookmarks)||void 0===a?void 0:a[t];if(f||v){var h=Array.from(new Set(Object.keys(f||{}).concat(Object.keys(v||{})))).sort(),m=[];h.forEach((function(e){var n=[(0,F.jsx)(g.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[f,v].forEach((function(r,t){r&&n.push((0,F.jsx)(g.ZP,{monospace:!0,small:!0,children:r[e]},"".concat(e,"-").concat(t)))})),m.push(n)}));var p=[{label:function(){return""},uuid:"column"}];return[[null===d||void 0===d?void 0:d.source,"source",f],[null===d||void 0===d?void 0:d.destination,"destination",v]].forEach((function(e){var n=(0,s.Z)(e,3),r=n[0],t=n[1];n[2]&&p.push({uuid:"".concat(r," (").concat(t,")")})})),(0,F.jsx)(H.Z,{columnFlex:[null,1,1],columns:p,rows:m,uuid:"".concat(t,"-bookmark-table")})}}}),[r,t]),ie=(0,l.useMemo)((function(){var e,n,o,i,l,c;if(r&&t){var u=(null===r||void 0===r?void 0:r.metrics)||{blocks:null,destination:null,pipeline:null,source:null},a=null===u||void 0===u||null===(e=u.blocks)||void 0===e||null===(n=e[t])||void 0===n||null===(o=n.sources)||void 0===o?void 0:o.record,d=null===u||void 0===u||null===(i=u.blocks)||void 0===i||null===(l=i[t])||void 0===l||null===(c=l.destinations)||void 0===c?void 0:c.record;if(a||d){var f=Object.keys(d||a||{}).sort(),v=[];f.forEach((function(e){var n=[(0,F.jsx)(g.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[a,d].forEach((function(r,t){if(r){var o=r[e],i="object"===typeof o;n.push((0,F.jsxs)(g.ZP,{monospace:!0,small:!0,textOverflow:!0,whiteSpaceNormal:!0,wordBreak:!0,children:[i&&(0,F.jsx)("pre",{children:JSON.stringify(o,null,2)}),!i&&o]},"".concat(e,"-").concat(t)))}})),v.push(n)}));var h=[{label:function(){return""},uuid:"column"}];return[[null===u||void 0===u?void 0:u.source,"source",a],[null===u||void 0===u?void 0:u.destination,"destination",d]].forEach((function(e){var n=(0,s.Z)(e,3),r=n[0],t=n[1];n[2]&&h.push({uuid:"".concat(r," (").concat(t,")")})})),(0,F.jsx)(H.Z,{columnFlex:[null,1,1],columns:h,rows:v.map((function(e){return e.map((function(e){return(0,F.jsx)(g.ZP,{default:!0,monospace:!0,children:e},e)}))})),uuid:"".concat(t,"-bookmark-table")})}}}),[r,t]),le=(0,l.useMemo)((function(){var e,n,o,i,l,c,u=null===r||void 0===r||null===(e=r.metrics)||void 0===e||null===(n=e.blocks)||void 0===n?void 0:n[t];return(null===u||void 0===u||null===(o=u.sources)||void 0===o||null===(i=o.block_tags)||void 0===i?void 0:i.destination_table)||(null===u||void 0===u||null===(l=u.destinations)||void 0===l||null===(c=l.block_tags)||void 0===c?void 0:c.destination_table)}),[r,t]);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(m.Z,{p:3,children:[t&&(0,F.jsx)(m.Z,{mb:3,children:(0,F.jsxs)(f.ZP,{alignItems:"center",children:[(0,F.jsx)(q.Z,{block:!0,onClick:function(){return o.push("/pipelines/".concat(r.pipeline_uuid,"/syncs?pipeline_run_id=").concat(r.id))},preventDefault:!0,children:(0,F.jsxs)(f.ZP,{alignItems:"center",children:[(0,F.jsx)(x.Xd,{default:!0,size:1.5*_.iI}),(0,F.jsx)(m.Z,{mr:1}),(0,F.jsx)(g.ZP,{default:!0,children:"Syncs"})]})}),(0,F.jsx)(m.Z,{mx:1,children:(0,F.jsx)(g.ZP,{default:!0,monospace:!0,children:"/"})}),(0,F.jsx)(g.ZP,{bold:!0,monospace:!0,children:t})]})}),(0,F.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,F.jsx)(m.Z,{mr:2,my:1,children:(0,F.jsx)(v.Z,{level:5,muted:!r,children:w})}),r&&(0,F.jsx)(X.Z,{onClick:function(){return o.push("/pipelines/".concat(r.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(r.id))},small:!0,children:"Logs"})]}),(0,F.jsx)(m.Z,{mt:2,children:I}),r&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(m.Z,{mt:3,children:(0,F.jsxs)(f.ZP,{justifyContent:"space-between",children:[(0,F.jsxs)("div",{children:[(0,F.jsx)(g.ZP,{bold:!0,large:!0,muted:!0,children:"Runtime"}),(0,F.jsxs)(g.ZP,{headline:!0,children:[t&&[A.V.INITIAL,A.V.RUNNING].includes(null===N||void 0===N?void 0:N.status)&&C,t&&![A.V.INITIAL,A.V.RUNNING].includes(null===N||void 0===N?void 0:N.status)&&(null===N||void 0===N?void 0:N.timeText),!t&&[h.VO.INITIAL,h.VO.RUNNING].includes(null===r||void 0===r?void 0:r.status)&&P,!t&&![h.VO.INITIAL,h.VO.RUNNING].includes(null===r||void 0===r?void 0:r.status)&&O]})]}),re]})}),Object.values(G).length>=1&&(0,F.jsxs)(m.Z,{mt:3,children:[(0,F.jsx)(v.Z,{level:5,muted:!0,children:"Errors"}),Object.entries(G).map((function(e,n){var r=(0,s.Z)(e,2),o=r[0],i=r[1];return(!t||t===o)&&(0,F.jsx)(m.Z,{mt:n>=1?1:0,children:Object.entries(i).map((function(e){var n=(0,s.Z)(e,2),r=n[0],t=n[1],i=t.error,l=t.errors,c=t.message,u=Array.isArray(i)?i.join(" "):i;return(0,F.jsxs)("div",{children:[(0,F.jsx)(m.Z,{mb:c||(null===l||void 0===l?void 0:l.length)>=1?2:0,children:(0,F.jsxs)(g.ZP,{monospace:!0,preWrap:!0,textOverflow:!0,children:[o,!!r&&(0,F.jsxs)(g.ZP,{inline:!0,monospace:!0,muted:!0,children:["\xa0(",r,")"]}),": ",(0,F.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:u&&(0,F.jsx)(W(),{children:u})})]})}),(0,F.jsx)(g.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:c}),l.map((function(e){return(0,F.jsx)(g.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))]},"".concat(o,"-").concat(r))}))},o)}))]})]})]}),r&&!t&&(0,F.jsx)(m.Z,{my:3,children:te}),r&&t&&(0,F.jsxs)(F.Fragment,{children:[le&&(0,F.jsx)(m.Z,{my:3,children:(0,F.jsxs)(m.Z,{px:3,children:[(0,F.jsx)(v.Z,{level:5,children:"Table name"}),(0,F.jsx)(m.Z,{mt:1,children:(0,F.jsx)(g.ZP,{default:!0,monospace:!0,children:le})})]})}),oe&&(0,F.jsxs)(m.Z,{my:3,children:[(0,F.jsx)(m.Z,{px:3,children:(0,F.jsx)(v.Z,{level:5,children:"Bookmarks"})}),(0,F.jsx)(m.Z,{px:1,children:oe})]}),ie&&(0,F.jsxs)(m.Z,{my:3,children:[(0,F.jsx)(m.Z,{px:3,children:(0,F.jsx)(v.Z,{level:5,children:"Sample row"})}),(0,F.jsx)(m.Z,{px:1,children:ie})]})]})]})},ee=r(35686),ne=r(28795),re=r(15610),te=r(69419);function oe(e){var n=e.pipeline,r=n.uuid,t=ee.ZP.pipeline_runs.list({_limit:20,_offset:0,pipeline_uuid:r},{refreshInterval:5e3}).data,o=(0,l.useMemo)((function(){return(null===t||void 0===t?void 0:t.pipeline_runs)||[]}),[t]),i=(0,te.iV)(),u=(0,l.useState)(null),s=u[0],a=u[1],d=(0,l.useState)(null),f=d[0],v=d[1],h=(0,l.useState)(null),m=h[0],p=h[1];(0,l.useEffect)((function(){null!==i&&void 0!==i&&i.pipeline_run_id?p(null===o||void 0===o?void 0:o.find((function(e){return e.id===Number(i.pipeline_run_id)}))):m&&p(null),null!==i&&void 0!==i&&i.stream?v(i.stream):f&&v(null)}),[o,i,m,f]);var g=(0,l.useCallback)((function(){var e=m?M(m):[];return(0,F.jsx)($,{onClickRow:function(n){var r=e[n];(0,re.u7)({stream:f===r?null:r})},pipelineRun:m,selectedStream:f})}),[m,f]),b=(0,l.useMemo)((function(){var e="/pipelines/".concat(r,"/syncs");m&&(e="".concat(e,"?pipeline_run_id=").concat(m.id));var n=[{label:function(){return"Syncs"},linkProps:f?{as:e,href:"/pipelines/[pipeline]/syncs"}:null}];return f&&n.push({label:function(){return f}}),n}),[r,m,f]);return(0,F.jsx)(c.Z,{breadcrumbs:b,buildSidekick:g,errors:s,pageName:ne.M.SYNCS,pipeline:n,setErrors:a,title:function(e){var n=e.name;return"".concat(n," syncs")},uuid:"".concat(ne.M.SYNCS,"_").concat(r),children:o.map((function(e){var n=(null===m||void 0===m?void 0:m.id)===e.id;return(0,F.jsx)(B,{onSelect:function(e){return(0,re.u7)({pipeline_run_id:e,stream:null})},pipelineRun:e,selected:n},e.id)}))})}oe.getInitialProps=function(){var e=(0,t.Z)(i().mark((function e(n){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:r}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var ie=(0,u.Z)(oe)},81728:function(e,n,r){"use strict";r.d(n,{RA:function(){return f},kC:function(){return v},vg:function(){return j},kE:function(){return w},Mp:function(){return h},Pb:function(){return a},HW:function(){return y},wX:function(){return m},x6:function(){return p},_6:function(){return g},zf:function(){return Z},Y6:function(){return k},Lo:function(){return I},wE:function(){return N},J3:function(){return b},We:function(){return d},QV:function(){return _},C5:function(){return x}});var t=r(75582),o=r(17717),i=["aged","ancient","autumn","billowing","bitter","black","blue","bold","broken","cold","cool","crimson","damp","dark","dawn","delicate","divine","dry","empty","falling","floral","fragrant","frosty","green","hidden","holy","icy","late","lingering","little","lively","long","misty","morning","muddy","nameless","old","patient","polished","proud","purple","quiet","red","restless","rough","shy","silent","small","snowy","solitary","sparkling","spring","still","summer","throbbing","twilight","wandering","weathered","white","wild","winter","wispy","withered","young"],l=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],c=(r(92083),["bird","breeze","brook","bush","butterfly","cherry","cloud","darkness","dawn","dew","dream","dust","feather","field","fire","firefly","flower","fog","forest","frog","frost","glade","glitter","grass","haze","hill","lake","leaf","meadow","moon","morning","mountain","night","paper","pine","pond","rain","resonance","river","sea","shadow","shape","silence","sky","smoke","snow","snowflake","sound","star","sun","sun","sunset","surf","thunder","tree","violet","voice","water","water","waterfall","wave","wildflower","wind","wood"]),u=["0","1","2","3","4","5","6","7","8","9"],s=r(86735);function a(e){if(!e)return!1;try{JSON.parse(e)}catch(n){return!1}return!0}function d(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return e.split(" ").join(n)}function f(e){return e.split(" ").join("_")}function v(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return String((new Date).getTime()*e)}function m(e){return e.charAt(0).toLowerCase()+e.slice(1)}function p(e){if(null===e||"undefined"===typeof e)return"";var n=e.toString().split("."),r=(0,t.Z)(n,2),o=r[0],i=r[1],l=o.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");return i?"".concat(l,".").concat(i):l}function g(e,n){var r,t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=n,l=void 0!==i&&null!==i;if(l||(i=2),1===i)r=e;else{var c=e.length,u=e[c-1];r="y"===u&&"day"!==e?"".concat(e.slice(0,c-1),"ies"):"".concat(e,"s"===u?"es":"s")}if(l&&!o){var s=t?p(i):i;return"".concat(s," ").concat(r)}return r}function b(e){return null===e||void 0===e?void 0:e.replace(/_/g," ")}function x(e){var n=e.length;return"ies"===e.slice(n-3,n)?"".concat(e.slice(0,n-3),"y"):"es"===e.slice(n-2,n)&&"ces"!==e.slice(n-3,n)?e.slice(0,n-2):e.slice(0,n-1)}function j(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return v(b(e.toLowerCase()))}function Z(e){var n,r=[["second",60],["minute",60],["hour",24],["day",7],["week",4],["month",12],["year",null]];return r.forEach((function(o,i){if(!n){var l=(0,t.Z)(o,2),c=l[0],u=l[1],s=r.slice(0,i).reduce((function(e,n){return e*Number(n[1])}),1);e<Number(u)*s&&(n=g(c,Math.round(e/s)))}})),n}function y(e){return"undefined"!==typeof e&&null!==e&&!isNaN(e)}function _(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=Math.pow(10,n);return Math.round((e||0)*r)/r}function k(){return"".concat((0,s.mp)(i)," ").concat((0,s.mp)(c))}function I(){return"".concat((0,s.mp)(l)).concat((0,s.mp)(u))}function w(e){return null===e||void 0===e?void 0:e.toLowerCase().replace(/\W+/g,"_")}function N(e){var n,r=e.split(o.sep),t=r[r.length-1].split(".");return n=1===t.length?t[0]:t.slice(0,-1).join("."),r.slice(0,r.length-1).concat(n).join(o.sep)}},59416:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/syncs",function(){return r(25050)}])},80022:function(e,n,r){"use strict";function t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(n,{Z:function(){return t}})},15544:function(e,n,r){"use strict";function t(e){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(e)}r.d(n,{Z:function(){return t}})},99177:function(e,n,r){"use strict";function t(e,n){return t=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},t(e,n)}function o(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&t(e,n)}r.d(n,{Z:function(){return o}})},93189:function(e,n,r){"use strict";r.d(n,{Z:function(){return i}});var t=r(12539),o=r(80022);function i(e,n){if(n&&("object"===t(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}},function(e){e.O(0,[844,2083,8013,600,9696,8264,4666,5499,5457,9774,2888,179],(function(){return n=59416,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7803],{17717:function(e){!function(){"use strict";var n={114:function(e){function n(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,n){for(var r,t="",o=0,i=-1,l=0,u=0;u<=e.length;++u){if(u<e.length)r=e.charCodeAt(u);else{if(47===r)break;r=47}if(47===r){if(i===u-1||1===l);else if(i!==u-1&&2===l){if(t.length<2||2!==o||46!==t.charCodeAt(t.length-1)||46!==t.charCodeAt(t.length-2))if(t.length>2){var c=t.lastIndexOf("/");if(c!==t.length-1){-1===c?(t="",o=0):o=(t=t.slice(0,c)).length-1-t.lastIndexOf("/"),i=u,l=0;continue}}else if(2===t.length||1===t.length){t="",o=0,i=u,l=0;continue}n&&(t.length>0?t+="/..":t="..",o=2)}else t.length>0?t+="/"+e.slice(i+1,u):t=e.slice(i+1,u),o=u-i-1;i=u,l=0}else 46===r&&-1!==l?++l:l=-1}return t}var t={resolve:function(){for(var e,t="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var l;i>=0?l=arguments[i]:(void 0===e&&(e=""),l=e),n(l),0!==l.length&&(t=l+"/"+t,o=47===l.charCodeAt(0))}return t=r(t,!o),o?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(n(e),0===e.length)return".";var t=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!t)).length||t||(e="."),e.length>0&&o&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return n(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var o=arguments[r];n(o),o.length>0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":t.normalize(e)},relative:function(e,r){if(n(e),n(r),e===r)return"";if((e=t.resolve(e))===(r=t.resolve(r)))return"";for(var o=1;o<e.length&&47===e.charCodeAt(o);++o);for(var i=e.length,l=i-o,u=1;u<r.length&&47===r.charCodeAt(u);++u);for(var c=r.length-u,s=l<c?l:c,a=-1,d=0;d<=s;++d){if(d===s){if(c>s){if(47===r.charCodeAt(u+d))return r.slice(u+d+1);if(0===d)return r.slice(u+d)}else l>s&&(47===e.charCodeAt(o+d)?a=d:0===d&&(a=0));break}var f=e.charCodeAt(o+d);if(f!==r.charCodeAt(u+d))break;47===f&&(a=d)}var v="";for(d=o+a+1;d<=i;++d)d!==i&&47!==e.charCodeAt(d)||(0===v.length?v+="..":v+="/..");return v.length>0?v+r.slice(u+a):(u+=a,47===r.charCodeAt(u)&&++u,r.slice(u))},_makeLong:function(e){return e},dirname:function(e){if(n(e),0===e.length)return".";for(var r=e.charCodeAt(0),t=47===r,o=-1,i=!0,l=e.length-1;l>=1;--l)if(47===(r=e.charCodeAt(l))){if(!i){o=l;break}}else i=!1;return-1===o?t?"/":".":t&&1===o?"//":e.slice(0,o)},basename:function(e,r){if(void 0!==r&&"string"!==typeof r)throw new TypeError('"ext" argument must be a string');n(e);var t,o=0,i=-1,l=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var u=r.length-1,c=-1;for(t=e.length-1;t>=0;--t){var s=e.charCodeAt(t);if(47===s){if(!l){o=t+1;break}}else-1===c&&(l=!1,c=t+1),u>=0&&(s===r.charCodeAt(u)?-1===--u&&(i=t):(u=-1,i=c))}return o===i?i=c:-1===i&&(i=e.length),e.slice(o,i)}for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!l){o=t+1;break}}else-1===i&&(l=!1,i=t+1);return-1===i?"":e.slice(o,i)},extname:function(e){n(e);for(var r=-1,t=0,o=-1,i=!0,l=0,u=e.length-1;u>=0;--u){var c=e.charCodeAt(u);if(47!==c)-1===o&&(i=!1,o=u+1),46===c?-1===r?r=u:1!==l&&(l=1):-1!==r&&(l=-1);else if(!i){t=u+1;break}}return-1===r||-1===o||0===l||1===l&&r===o-1&&r===t+1?"":e.slice(r,o)},format:function(e){if(null===e||"object"!==typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,n){var r=n.dir||n.root,t=n.base||(n.name||"")+(n.ext||"");return r?r===n.root?r+t:r+e+t:t}("/",e)},parse:function(e){n(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var t,o=e.charCodeAt(0),i=47===o;i?(r.root="/",t=1):t=0;for(var l=-1,u=0,c=-1,s=!0,a=e.length-1,d=0;a>=t;--a)if(47!==(o=e.charCodeAt(a)))-1===c&&(s=!1,c=a+1),46===o?-1===l?l=a:1!==d&&(d=1):-1!==l&&(d=-1);else if(!s){u=a+1;break}return-1===l||-1===c||0===d||1===d&&l===c-1&&l===u+1?-1!==c&&(r.base=r.name=0===u&&i?e.slice(1,c):e.slice(u,c)):(0===u&&i?(r.name=e.slice(1,l),r.base=e.slice(1,c)):(r.name=e.slice(u,l),r.base=e.slice(u,c)),r.ext=e.slice(l,c)),u>0?r.dir=e.slice(0,u-1):i&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};t.posix=t,e.exports=t}},r={};function t(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}},l=!0;try{n[e](i,i.exports,t),l=!1}finally{l&&delete r[e]}return i.exports}t.ab="//";var o=t(114);e.exports=o}()},41143:function(e,n,r){"use strict";var t;r.d(n,{V:function(){return t}}),function(e){e.CANCELLED="cancelled",e.COMPLETED="completed",e.FAILED="failed",e.INITIAL="initial",e.RUNNING="running",e.UPSTREAM_FAILED="upstream_failed",e.CONDITION_FAILED="condition_failed"}(t||(t={}))},44265:function(e,n,r){"use strict";r.d(n,{Az:function(){return c},BF:function(){return u},Do:function(){return a},IK:function(){return l},VO:function(){return i},sZ:function(){return s}});var t,o=r(82394),i=r(41143).V,l=[i.FAILED,i.COMPLETED,i.RUNNING,i.CANCELLED,i.INITIAL],u=[i.INITIAL,i.RUNNING],c=[i.CANCELLED,i.COMPLETED,i.FAILED],s="__mage_variables",a=(t={},(0,o.Z)(t,i.CANCELLED,"Cancelled"),(0,o.Z)(t,i.COMPLETED,"Done"),(0,o.Z)(t,i.FAILED,"Failed"),(0,o.Z)(t,i.INITIAL,"Ready"),(0,o.Z)(t,i.RUNNING,"Running"),t)},25050:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return ie}});var t=r(77837),o=r(38860),i=r.n(o),l=r(82684),u=r(75457),c=r(93808),s=r(75582),a=r(82394),d=r(97618),f=r(55485),v=r(85854),h=r(44265),m=r(38276),p=r(4190),g=r(30160),b=r(44897),x=r(72473),j=r(38626),Z=r(42631),y=r(95363),_=r(70515),k=r(61896),I=j.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-15svh8z-0"})(["border-radius:","px;margin:","px;overflow:hidden;"," "," "," "," "," "," &:hover{"," "," "," "," ","}"],Z.n_,_.cd*_.iI,(function(e){return"\n background-color: ".concat((e.theme.background||b.Z.background).panel,";\n border: 1px solid ").concat((e.theme.borders||b.Z.borders).dark,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(e){return e.selected&&e.danger&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.selected&&e.primary&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.selected&&e.default&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")}),(function(e){return e.selected&&e.success&&"\n border-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.selected&&e.warning&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")}),(function(e){return e.danger&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")}),(function(e){return e.success&&"\n border-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")})),w=(0,j.css)([""," "," "," "," ",""],(function(e){return e.danger&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")})),N=j.default.div.withConfig({displayName:"indexstyle__StatusStyle",componentId:"sc-15svh8z-1"})([""," ",";border-radius:","px;display:inline-block;font-family:",";padding:6px;"," "," "," "," "," ",""],w,k.iD,Z.D7,y.ry,(function(e){return e.danger&&"\n color: ".concat((e.theme.content||b.Z.content).active,";\n ")}),(function(e){return e.primary&&"\n color: ".concat((e.theme.content||b.Z.content).active,";\n ")}),(function(e){return(e.default||e.success)&&"\n "}),(function(e){return e.default&&"\n color: ".concat((e.theme.content||b.Z.content).default,";\n ")}),(function(e){return e.success&&"\n color: ".concat((e.theme.content||b.Z.content).inverted,";\n ")}),(function(e){return e.warning&&"\n color: ".concat((e.theme.content||b.Z.content).inverted,";\n ")})),O=j.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-15svh8z-2"})([""," display:flex;height:auto;width:3px;",""],w,(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")})),E=r(81728),P=r(92083),C=r.n(P),A=r(41143),L=r(86735);function M(e){var n;return Object.keys((null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{}).sort()}function S(e){var n,r,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=null,i=null,l=null,u=null,c={},a=(null===e||void 0===e?void 0:e.block_runs)||[],d=(null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{},f=(null===e||void 0===e||null===(r=e.metrics)||void 0===r?void 0:r.pipeline)||{},v=D(e);return Object.entries(d).forEach((function(e){var n,r=(0,s.Z)(e,2),a=r[0],d=r[1];if(!t||t===a){var h,m=d||{},p=m.destinations,g=void 0===p?{records_affected:null,records_inserted:null,records_updated:null}:p,b=m.sources,x=void 0===b?{records:null}:b,j=v[a]||[];if(t&&t===a&&j.every((function(e){var n=e.status;return A.V.COMPLETED===n}))&&null===o&&(o=0),null!==f&&void 0!==f&&null!==(n=f[a])&&void 0!==n&&n.record_counts)null===o&&(o=0),o+=Number(null===f||void 0===f||null===(h=f[a])||void 0===h?void 0:h.record_counts);else null!==x&&void 0!==x&&x.records&&(null===o&&(o=0),o+=Number(x.records));null!==g&&void 0!==g&&g.records_updated?(null===l&&(l=0),l+=Number(g.records_updated),null===u&&(u=0),u+=Number(g.records_updated)):null!==g&&void 0!==g&&g.records_inserted?(null===l&&(l=0),l+=Number(g.records_inserted),null===i&&(i=0),i+=Number(g.records_inserted)):null!==g&&void 0!==g&&g.records_affected&&(null===l&&(l=0),l+=Number(g.records_affected)),["destinations","sources"].forEach((function(e){var n=d[e]||{};null!==n&&void 0!==n&&n.error&&(c[a]||(c[a]={}),c[a][e]={error:null===n||void 0===n?void 0:n.error,errors:null===n||void 0===n?void 0:n.errors,message:null===n||void 0===n?void 0:n.message})}))}})),null===a||void 0===a||a.forEach((function(e){var n=e.block_uuid,r=e.metrics,t=e.status;if(A.V.FAILED===t&&null!==r&&void 0!==r&&r.error&&n){var o=n.split(":"),i=(0,s.Z)(o,3),l=(i[0],i[1]);i[2];c[l]||(c[l]={}),c[l][""]=r.error}})),{errors:c,records:o,recordsInserted:i,recordsProcessed:l,recordsUpdated:u}}function D(e){var n=e.block_runs,r={};return null===n||void 0===n||n.forEach((function(e){var n=e.block_uuid.split(":"),t=(0,s.Z)(n,3),o=(t[0],t[1]);t[2];r[o]||(r[o]=[]),r[o].push(e)})),r}function T(e){var n=D(e),r={};return Object.entries(n).forEach((function(e){var n=(0,s.Z)(e,2),t=n[0],o=n[1],i=o.filter((function(e){var n=e.status;return A.V.COMPLETED===n})),l=i.map((function(e){var n=e.completed_at,r=e.started_at,t=C().utc(n),o=C().utc(r);return t.diff(o,"second")})),u=i.length,c=o.length;r[t]={completed:u,runtime:l.length>=1?(0,L.Sm)(l)/l.length:null,total:c}})),r}function V(e){var n=e.block_runs,r=(null===n||void 0===n?void 0:n.length)||1,t=function(e){var n=(null===e||void 0===e?void 0:e.block_runs)||[];return null===n||void 0===n?void 0:n.filter((function(e){var n=e.status;return A.V.COMPLETED===n}))}(e).length||0;return t/r}function R(e){var n=e.completed_at,r=e.block_runs,t=void 0===r?[]:r,o=e.status;if(null===t||void 0===t||!t.length)return 0;var i=C().utc();if(n)i=C().utc(n);else if([h.VO.CANCELLED,h.VO.FAILED].includes(o)){var l=(0,L.YC)(t,(function(e){return e.started_at}),{ascending:!1})[0];i=C().utc(l.updated_at)}var u=C().utc(e.created_at);return i.diff(u,"second")}function U(e,n){var r,t,o,i,l,u=D(e),c=T(e),s=(null===e||void 0===e?void 0:e.metrics)||{blocks:null,pipeline:null},a=s.blocks||{},d=s.pipeline||{},f=(a[n],d[n],c[n]||{completed:null,total:null}),v=f.completed,h=f.total,m=v&&h?v/h:0,p=u[n]||[],g=p.every((function(e){var n=e.status;return A.V.COMPLETED===n})),b=(0,L.YC)(p,(function(e){return e.updated_at}),{ascending:!1})[0],x=null===(r=(0,L.YC)(p,(function(e){return e.started_at}),{ascending:!0})[0])||void 0===r?void 0:r.started_at;g?t=null===(l=(0,L.YC)(p,(function(e){return e.completed_at}),{ascending:!1})[0])||void 0===l?void 0:l.completed_at:b&&(i=null===b||void 0===b?void 0:b.updated_at);var j=g?C().utc(t||i):C().utc(),Z=C().utc(x);return{completed:v,completedAt:t,done:g,progress:m,runtime:o=j.diff(Z,"second"),startedAt:x,status:null===b||void 0===b?void 0:b.status,timeText:(0,E.zf)(o),total:h,updatedAt:i}}var F=r(28598);function z(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function G(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?z(Object(r),!0).forEach((function(n){(0,a.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var B=function(e){var n=e.onSelect,r=e.pipelineRun,t=e.selected,o=(r.block_runs,r.created_at),i=r.status,u=(0,l.useMemo)((function(){return(null===r||void 0===r?void 0:r.metrics)||{blocks:{},destination:null,pipeline:{},source:null}}),[r]),c=((0,l.useMemo)((function(){return u.blocks||{}}),[u]),(0,l.useMemo)((function(){return u.pipeline||{}}),[u])),a=u.destination,j=u.source,Z=(0,l.useMemo)((function(){return Object.keys(c).length}),[c]),y=(0,l.useMemo)((function(){return S(r)}),[r]),k=y.errors,w=y.records,P=y.recordsProcessed,C=(0,l.useMemo)((function(){return V(r)}),[r]),A=(0,l.useMemo)((function(){return[h.VO.COMPLETED].includes(i)}),[i]),L=(0,l.useMemo)((function(){return{danger:h.VO.FAILED===i,default:h.VO.INITIAL===i,primary:h.VO.RUNNING===i,success:A,warning:h.VO.CANCELLED===i}}),[A,i]),M=(0,l.useMemo)((function(){if(r){var e=R(r);return(0,E.zf)(e)}}),[r]);return(0,F.jsx)(I,G(G({},L),{},{onClick:function(){return n(t?null:r.id)},selected:t,children:(0,F.jsxs)(f.ZP,{fullHeight:!0,justifyContent:"space-between",children:[(0,F.jsx)(O,G({},L)),(0,F.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,F.jsxs)(m.Z,{ml:3,py:3,children:[(0,F.jsx)(v.Z,{bold:!0,level:5,monospace:!0,children:o}),(0,F.jsx)(m.Z,{fullWidth:!1,mt:2,children:(0,F.jsx)(N,G(G({},L),{},{children:(0,F.jsxs)(f.ZP,{alignItems:"center",children:[A&&(0,F.jsx)(x.Jr,{inverted:!0,size:2*_.iI}),[h.VO.INITIAL,h.VO.RUNNING].includes(i)&&(0,F.jsx)(p.Z,{color:h.VO.INITIAL!==i?b.Z.monotone.white:null,inverted:h.VO.INITIAL===i,small:!0}),"\xa0",h.VO.RUNNING===i&&(0,F.jsxs)(F.Fragment,{children:["\xa0",Math.round(100*C),"%"]}),![h.VO.INITIAL,h.VO.RUNNING].includes(i)&&h.Do[i],h.VO.INITIAL===i&&"Starting"]})}))}),Object.values(k).length>=1&&(0,F.jsx)(m.Z,{mt:1,children:Object.entries(k).map((function(e,n){var r=(0,s.Z)(e,2),t=r[0];r[1];return(0,F.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:[t," stream failed"]},t)}))})]})}),(0,F.jsxs)(d.Z,{flex:1,children:[(0,F.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,F.jsxs)(m.Z,{ml:3,py:3,children:[(0,F.jsxs)(m.Z,{mb:1,children:[(0,F.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Rows processed"}),(0,F.jsx)(g.ZP,{monospace:!0,children:P>=1?(0,E.x6)(P):"-"})]}),(0,F.jsxs)(m.Z,{mb:1,children:[(0,F.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Rows remaining"}),(0,F.jsx)(g.ZP,{monospace:!0,children:w>=1&&w>=P?(0,E.x6)(w-P):"-"})]}),h.VO.RUNNING!==i&&(0,F.jsxs)(m.Z,{mb:1,children:[(0,F.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Runtime"}),(0,F.jsx)(g.ZP,{monospace:!0,children:M})]})]})}),(0,F.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,F.jsxs)(m.Z,{ml:3,py:3,children:[(0,F.jsxs)(m.Z,{mb:1,children:[(0,F.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Source"}),(0,F.jsx)(g.ZP,{monospace:!0,children:j||"-"})]}),(0,F.jsxs)(m.Z,{mb:1,children:[(0,F.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Destination"}),(0,F.jsx)(g.ZP,{monospace:!0,children:a||"-"})]}),(0,F.jsxs)(m.Z,{mb:1,children:[(0,F.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Streams"}),(0,F.jsx)(g.ZP,{monospace:!0,children:Z>=1?(0,E.x6)(Z):"-"})]})]})})]})]})}))},Y=r(89565),W=r.n(Y),J=r(34376),X=r(71180),q=r(48670),H=r(75499),K=j.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1thr560-0"})(["display:flex;flex:1;"," "," ",""],(function(e){return e.even&&e.fill&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).cyan,";\n ")}),(function(e){return e.even&&!e.fill&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).cyanTransparent,";\n ")}),(function(e){return"\n height: ".concat((e.small?1:2)*_.iI,"px;\n ")})),Q=r(3314);var $=function(e){var n=e.onClickRow,r=e.pipelineRun,t=e.selectedStream,o=(0,J.useRouter)(),i=(0,l.useState)(null),u=i[0],c=i[1],a=(0,l.useState)(null),d=a[0],p=a[1],b=(0,l.useMemo)((function(){return r?D(r):{}}),[r]),j=(0,l.useMemo)((function(){return r?T(r):{}}),[r]),Z=(0,l.useMemo)((function(){var e=0,n=[],r=[];if(Object.entries(j).forEach((function(t){var o=(0,s.Z)(t,2),i=(o[0],o[1]),l=i.completed,u=i.runtime,c=i.total;null===u?r.push(i):(n.push(u),e+=u*(c-l))})),0===n.length)return null;var t=(0,L.Sm)(n)/n.length;return r.forEach((function(n){var r=n.completed,o=n.total;e+=t*(o-r)})),e}),[j]),y=(0,l.useMemo)((function(){return t?j[t]:null}),[j,t]),k=(0,l.useMemo)((function(){if(t&&j){var e=j[t]||{},n=e.completed,o=e.total;if(o>=1)return n/o}else if(r)return V(r);return 0}),[y,r,t]),I=(0,l.useMemo)((function(){return(0,F.jsx)(f.ZP,{children:(0,L.w6)(101).map((function(e,n){return(0,F.jsx)(K,{even:n%2===0,fill:k>0&&Math.round(100*k)>=n},n)}))})}),[k]),w=(0,l.useMemo)((function(){if(t){var e=b[t]||[],n=e.every((function(e){var n=e.status;return A.V.COMPLETED===n})),o=(0,L.YC)(e,(function(e){return e.updated_at}),{ascending:!1})[0],i=null===o||void 0===o?void 0:o.status,l=y||{},u=l.completed,c=l.runtime,s=l.total;if(n)return"Sync complete for ".concat(t);if([A.V.CANCELLED,A.V.FAILED].includes(i))return h.Do[i];if(c&&s>=1){var a=Math.ceil(c*(s-u)/60);return"".concat((0,E._6)("minute",a,!0)," to completion")}return"Estimating time remaining for stream..."}if(h.VO.COMPLETED===(null===r||void 0===r?void 0:r.status))return"Sync complete";if(r){if([h.VO.CANCELLED,h.VO.FAILED].includes(null===r||void 0===r?void 0:r.status))return h.Do[null===r||void 0===r?void 0:r.status];if(h.VO.INITIAL===(null===r||void 0===r?void 0:r.status))return"Initializing sync (this can take several minutes)";if(null===Z)return"Estimating time remaining...";var d=Math.ceil(Z/60);return"".concat((0,E._6)("minute",d,!0)," to completion")}return"Select a sync"}),[b,Z,y,r,t]),N=(0,l.useMemo)((function(){return r&&t?U(r,t):{completed:null,completedAt:null,done:null,progress:null,runtime:null,startedAt:null,status:null,timeText:null,total:null,updatedAt:null}}),[r,t]);(0,l.useEffect)((function(){var e;if(r){var n=R(r);c(n),e=setInterval((function(){return c((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[r]),(0,l.useEffect)((function(){var e;if(r&&t&&N){var n=(null===N||void 0===N?void 0:N.runtime)||0;p(n),e=setInterval((function(){return p((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[r,t,N]);var O=(0,l.useMemo)((function(){if(r){if(t)return null===N||void 0===N?void 0:N.timeText;var e=R(r);return(0,E.zf)(e)}}),[r,t,N]),P=(0,l.useMemo)((function(){var e=Math.floor(u%86400/3600),n=Math.floor(u%3600/60),r=Math.floor(u%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),r>=10?String(r):"0".concat(r)].join(":")}),[u]),C=(0,l.useMemo)((function(){var e=Math.floor(d%86400/3600),n=Math.floor(d%3600/60),r=Math.floor(d%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),r>=10?String(r):"0".concat(r)].join(":")}),[d]),z=(0,l.useMemo)((function(){return r?S(r):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[r]),G=z.errors,B=z.records,Y=z.recordsInserted,$=z.recordsProcessed,ee=z.recordsUpdated,ne=(0,l.useMemo)((function(){return r&&t?S(r,t):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[r,t]),re=(0,l.useMemo)((function(){var e=t?null===ne||void 0===ne?void 0:ne.records:B,n=t?null===ne||void 0===ne?void 0:ne.recordsInserted:Y,r=t?null===ne||void 0===ne?void 0:ne.recordsProcessed:$,o=t?null===ne||void 0===ne?void 0:ne.recordsUpdated:ee,i=[{label:"Rows fetched",value:null===e?"-":(0,E.x6)(e)}];return null===n&&null===o?i.push({label:"Rows processed",value:null===r?"-":(0,E.x6)(r)}):null!==n?i.push({label:"Rows inserted",value:(0,E.x6)(n)}):null!==o&&i.push({label:"Rows updated",value:(0,E.x6)(o)}),i.map((function(e){var n=e.label,r=e.value;return(0,F.jsxs)("div",{children:[(0,F.jsx)(g.ZP,{bold:!0,large:!0,muted:!0,children:n}),(0,F.jsx)(g.ZP,{headline:!0,children:r})]},n)}))}),[B,ne,Y,$,ee,O,P,status]),te=(0,l.useMemo)((function(){if(!r)return(0,F.jsx)("div",{});var e=M(r);return(0,F.jsx)(H.Z,{columnFlex:[null,null,null,null,null,null],columns:[{uuid:"Stream"},{uuid:"Start"},{uuid:"End"},{uuid:"Time"},{uuid:"Progress"},{uuid:"Logs"}],isSelectedRow:function(n){return t&&t===e[n]},onClickRow:n,rows:e.map((function(e){var n=U(r,e),t=(n.completed,n.completedAt),i=n.done,l=n.progress,u=n.startedAt,c=n.status,s=n.timeText,a=(n.total,!!G[e]);return[(0,F.jsx)(g.ZP,{danger:a,default:!a,monospace:!0,children:e},"stream"),(0,F.jsx)(g.ZP,{default:!0,monospace:!0,children:u?u.split(".")[0]:"-"},"started_at"),(0,F.jsx)(g.ZP,{default:!0,monospace:!0,children:t?t.split(".")[0]:"-"},"completed_at"),(0,F.jsx)(g.ZP,{default:!0,children:[A.V.INITIAL,A.V.RUNNING].includes(c)?"-":s},"runtime"),(0,F.jsxs)("div",{children:[i&&(0,F.jsx)(x.Jr,{default:!0,size:2*_.iI}),!i&&(0,F.jsx)(f.ZP,{children:(0,L.w6)(51).map((function(e,n){return(0,F.jsx)(K,{fill:l>0&&Math.round(50*l)>=n,even:n%2===0,small:!0},n)}))})]},"progress"),(0,F.jsx)(X.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(e){o.push("/pipelines/".concat(r.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(r.id)),(0,Q.j)(e)},children:(0,F.jsx)(x.UL,{default:!0,size:2*_.iI})},"logs")]})),uuid:"".concat(null===r||void 0===r?void 0:r.id,"-streams-table")})}),[G,j,r,t]),oe=(0,l.useMemo)((function(){var e,n,o,i,l,u,c,a;if(r&&t){var d=(null===r||void 0===r?void 0:r.metrics)||{blocks:null,destination:null,pipeline:null,source:null},f=null===d||void 0===d||null===(e=d.pipeline)||void 0===e||null===(n=e[t])||void 0===n||null===(o=n.bookmarks)||void 0===o?void 0:o[t],v=null===d||void 0===d||null===(i=d.blocks)||void 0===i||null===(l=i[t])||void 0===l||null===(u=l.destinations)||void 0===u||null===(c=u.state)||void 0===c||null===(a=c.bookmarks)||void 0===a?void 0:a[t];if(f||v){var h=Array.from(new Set(Object.keys(f||{}).concat(Object.keys(v||{})))).sort(),m=[];h.forEach((function(e){var n=[(0,F.jsx)(g.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[f,v].forEach((function(r,t){r&&n.push((0,F.jsx)(g.ZP,{monospace:!0,small:!0,children:r[e]},"".concat(e,"-").concat(t)))})),m.push(n)}));var p=[{label:function(){return""},uuid:"column"}];return[[null===d||void 0===d?void 0:d.source,"source",f],[null===d||void 0===d?void 0:d.destination,"destination",v]].forEach((function(e){var n=(0,s.Z)(e,3),r=n[0],t=n[1];n[2]&&p.push({uuid:"".concat(r," (").concat(t,")")})})),(0,F.jsx)(H.Z,{columnFlex:[null,1,1],columns:p,rows:m,uuid:"".concat(t,"-bookmark-table")})}}}),[r,t]),ie=(0,l.useMemo)((function(){var e,n,o,i,l,u;if(r&&t){var c=(null===r||void 0===r?void 0:r.metrics)||{blocks:null,destination:null,pipeline:null,source:null},a=null===c||void 0===c||null===(e=c.blocks)||void 0===e||null===(n=e[t])||void 0===n||null===(o=n.sources)||void 0===o?void 0:o.record,d=null===c||void 0===c||null===(i=c.blocks)||void 0===i||null===(l=i[t])||void 0===l||null===(u=l.destinations)||void 0===u?void 0:u.record;if(a||d){var f=Object.keys(d||a||{}).sort(),v=[];f.forEach((function(e){var n=[(0,F.jsx)(g.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[a,d].forEach((function(r,t){if(r){var o=r[e],i="object"===typeof o;n.push((0,F.jsxs)(g.ZP,{monospace:!0,small:!0,textOverflow:!0,whiteSpaceNormal:!0,wordBreak:!0,children:[i&&(0,F.jsx)("pre",{children:JSON.stringify(o,null,2)}),!i&&o]},"".concat(e,"-").concat(t)))}})),v.push(n)}));var h=[{label:function(){return""},uuid:"column"}];return[[null===c||void 0===c?void 0:c.source,"source",a],[null===c||void 0===c?void 0:c.destination,"destination",d]].forEach((function(e){var n=(0,s.Z)(e,3),r=n[0],t=n[1];n[2]&&h.push({uuid:"".concat(r," (").concat(t,")")})})),(0,F.jsx)(H.Z,{columnFlex:[null,1,1],columns:h,rows:v.map((function(e){return e.map((function(e){return(0,F.jsx)(g.ZP,{default:!0,monospace:!0,children:e},e)}))})),uuid:"".concat(t,"-bookmark-table")})}}}),[r,t]),le=(0,l.useMemo)((function(){var e,n,o,i,l,u,c=null===r||void 0===r||null===(e=r.metrics)||void 0===e||null===(n=e.blocks)||void 0===n?void 0:n[t];return(null===c||void 0===c||null===(o=c.sources)||void 0===o||null===(i=o.block_tags)||void 0===i?void 0:i.destination_table)||(null===c||void 0===c||null===(l=c.destinations)||void 0===l||null===(u=l.block_tags)||void 0===u?void 0:u.destination_table)}),[r,t]);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(m.Z,{p:3,children:[t&&(0,F.jsx)(m.Z,{mb:3,children:(0,F.jsxs)(f.ZP,{alignItems:"center",children:[(0,F.jsx)(q.Z,{block:!0,onClick:function(){return o.push("/pipelines/".concat(r.pipeline_uuid,"/syncs?pipeline_run_id=").concat(r.id))},preventDefault:!0,children:(0,F.jsxs)(f.ZP,{alignItems:"center",children:[(0,F.jsx)(x.Xd,{default:!0,size:1.5*_.iI}),(0,F.jsx)(m.Z,{mr:1}),(0,F.jsx)(g.ZP,{default:!0,children:"Syncs"})]})}),(0,F.jsx)(m.Z,{mx:1,children:(0,F.jsx)(g.ZP,{default:!0,monospace:!0,children:"/"})}),(0,F.jsx)(g.ZP,{bold:!0,monospace:!0,children:t})]})}),(0,F.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,F.jsx)(m.Z,{mr:2,my:1,children:(0,F.jsx)(v.Z,{level:5,muted:!r,children:w})}),r&&(0,F.jsx)(X.Z,{onClick:function(){return o.push("/pipelines/".concat(r.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(r.id))},small:!0,children:"Logs"})]}),(0,F.jsx)(m.Z,{mt:2,children:I}),r&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(m.Z,{mt:3,children:(0,F.jsxs)(f.ZP,{justifyContent:"space-between",children:[(0,F.jsxs)("div",{children:[(0,F.jsx)(g.ZP,{bold:!0,large:!0,muted:!0,children:"Runtime"}),(0,F.jsxs)(g.ZP,{headline:!0,children:[t&&[A.V.INITIAL,A.V.RUNNING].includes(null===N||void 0===N?void 0:N.status)&&C,t&&![A.V.INITIAL,A.V.RUNNING].includes(null===N||void 0===N?void 0:N.status)&&(null===N||void 0===N?void 0:N.timeText),!t&&[h.VO.INITIAL,h.VO.RUNNING].includes(null===r||void 0===r?void 0:r.status)&&P,!t&&![h.VO.INITIAL,h.VO.RUNNING].includes(null===r||void 0===r?void 0:r.status)&&O]})]}),re]})}),Object.values(G).length>=1&&(0,F.jsxs)(m.Z,{mt:3,children:[(0,F.jsx)(v.Z,{level:5,muted:!0,children:"Errors"}),Object.entries(G).map((function(e,n){var r=(0,s.Z)(e,2),o=r[0],i=r[1];return(!t||t===o)&&(0,F.jsx)(m.Z,{mt:n>=1?1:0,children:Object.entries(i).map((function(e){var n=(0,s.Z)(e,2),r=n[0],t=n[1],i=t.error,l=t.errors,u=t.message,c=Array.isArray(i)?i.join(" "):i;return(0,F.jsxs)("div",{children:[(0,F.jsx)(m.Z,{mb:u||(null===l||void 0===l?void 0:l.length)>=1?2:0,children:(0,F.jsxs)(g.ZP,{monospace:!0,preWrap:!0,textOverflow:!0,children:[o,!!r&&(0,F.jsxs)(g.ZP,{inline:!0,monospace:!0,muted:!0,children:["\xa0(",r,")"]}),": ",(0,F.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:c&&(0,F.jsx)(W(),{children:c})})]})}),(0,F.jsx)(g.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:u}),l.map((function(e){return(0,F.jsx)(g.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))]},"".concat(o,"-").concat(r))}))},o)}))]})]})]}),r&&!t&&(0,F.jsx)(m.Z,{my:3,children:te}),r&&t&&(0,F.jsxs)(F.Fragment,{children:[le&&(0,F.jsx)(m.Z,{my:3,children:(0,F.jsxs)(m.Z,{px:3,children:[(0,F.jsx)(v.Z,{level:5,children:"Table name"}),(0,F.jsx)(m.Z,{mt:1,children:(0,F.jsx)(g.ZP,{default:!0,monospace:!0,children:le})})]})}),oe&&(0,F.jsxs)(m.Z,{my:3,children:[(0,F.jsx)(m.Z,{px:3,children:(0,F.jsx)(v.Z,{level:5,children:"Bookmarks"})}),(0,F.jsx)(m.Z,{px:1,children:oe})]}),ie&&(0,F.jsxs)(m.Z,{my:3,children:[(0,F.jsx)(m.Z,{px:3,children:(0,F.jsx)(v.Z,{level:5,children:"Sample row"})}),(0,F.jsx)(m.Z,{px:1,children:ie})]})]})]})},ee=r(35686),ne=r(28795),re=r(15610),te=r(69419);function oe(e){var n=e.pipeline,r=n.uuid,t=ee.ZP.pipeline_runs.list({_limit:20,_offset:0,pipeline_uuid:r},{refreshInterval:5e3}).data,o=(0,l.useMemo)((function(){return(null===t||void 0===t?void 0:t.pipeline_runs)||[]}),[t]),i=(0,te.iV)(),c=(0,l.useState)(null),s=c[0],a=c[1],d=(0,l.useState)(null),f=d[0],v=d[1],h=(0,l.useState)(null),m=h[0],p=h[1];(0,l.useEffect)((function(){null!==i&&void 0!==i&&i.pipeline_run_id?p(null===o||void 0===o?void 0:o.find((function(e){return e.id===Number(i.pipeline_run_id)}))):m&&p(null),null!==i&&void 0!==i&&i.stream?v(i.stream):f&&v(null)}),[o,i,m,f]);var g=(0,l.useCallback)((function(){var e=m?M(m):[];return(0,F.jsx)($,{onClickRow:function(n){var r=e[n];(0,re.u7)({stream:f===r?null:r})},pipelineRun:m,selectedStream:f})}),[m,f]),b=(0,l.useMemo)((function(){var e="/pipelines/".concat(r,"/syncs");m&&(e="".concat(e,"?pipeline_run_id=").concat(m.id));var n=[{label:function(){return"Syncs"},linkProps:f?{as:e,href:"/pipelines/[pipeline]/syncs"}:null}];return f&&n.push({label:function(){return f}}),n}),[r,m,f]);return(0,F.jsx)(u.Z,{breadcrumbs:b,buildSidekick:g,errors:s,pageName:ne.M.SYNCS,pipeline:n,setErrors:a,title:function(e){var n=e.name;return"".concat(n," syncs")},uuid:"".concat(ne.M.SYNCS,"_").concat(r),children:o.map((function(e){var n=(null===m||void 0===m?void 0:m.id)===e.id;return(0,F.jsx)(B,{onSelect:function(e){return(0,re.u7)({pipeline_run_id:e,stream:null})},pipelineRun:e,selected:n},e.id)}))})}oe.getInitialProps=function(){var e=(0,t.Z)(i().mark((function e(n){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:r}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var ie=(0,c.Z)(oe)},81728:function(e,n,r){"use strict";r.d(n,{RA:function(){return v},j3:function(){return y},kC:function(){return h},vg:function(){return Z},kE:function(){return E},Mp:function(){return m},Pb:function(){return a},HW:function(){return k},HD:function(){return d},wX:function(){return p},x6:function(){return g},_6:function(){return b},zf:function(){return _},Y6:function(){return N},Lo:function(){return O},wE:function(){return P},Tz:function(){return I},J3:function(){return x},We:function(){return f},QV:function(){return w},C5:function(){return j}});var t=r(75582),o=r(17717),i=["aged","ancient","autumn","billowing","bitter","black","blue","bold","broken","cold","cool","crimson","damp","dark","dawn","delicate","divine","dry","empty","falling","floral","fragrant","frosty","green","hidden","holy","icy","late","lingering","little","lively","long","misty","morning","muddy","nameless","old","patient","polished","proud","purple","quiet","red","restless","rough","shy","silent","small","snowy","solitary","sparkling","spring","still","summer","throbbing","twilight","wandering","weathered","white","wild","winter","wispy","withered","young"],l=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],u=(r(92083),["bird","breeze","brook","bush","butterfly","cherry","cloud","darkness","dawn","dew","dream","dust","feather","field","fire","firefly","flower","fog","forest","frog","frost","glade","glitter","grass","haze","hill","lake","leaf","meadow","moon","morning","mountain","night","paper","pine","pond","rain","resonance","river","sea","shadow","shape","silence","sky","smoke","snow","snowflake","sound","star","sun","sun","sunset","surf","thunder","tree","violet","voice","water","water","waterfall","wave","wildflower","wind","wood"]),c=["0","1","2","3","4","5","6","7","8","9"],s=r(86735);function a(e){if(!e)return!1;try{JSON.parse(e)}catch(n){return!1}return!0}function d(e){return"string"===typeof e}function f(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return e.split(" ").join(n)}function v(e){return e.split(" ").join("_")}function h(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return String((new Date).getTime()*e)}function p(e){return e.charAt(0).toLowerCase()+e.slice(1)}function g(e){if(null===e||"undefined"===typeof e)return"";var n=e.toString().split("."),r=(0,t.Z)(n,2),o=r[0],i=r[1],l=o.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");return i?"".concat(l,".").concat(i):l}function b(e,n){var r,t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=n,l=void 0!==i&&null!==i;if(l||(i=2),1===i)r=e;else{var u=e.length,c=e[u-1];r="y"===c&&"day"!==e?"".concat(e.slice(0,u-1),"ies"):"".concat(e,"s"===c?"es":"s")}if(l&&!o){var s=t?g(i):i;return"".concat(s," ").concat(r)}return r}function x(e){return null===e||void 0===e?void 0:e.replace(/_/g," ")}function j(e){var n=e.length;return"ies"===e.slice(n-3,n)?"".concat(e.slice(0,n-3),"y"):"es"===e.slice(n-2,n)&&"ces"!==e.slice(n-3,n)?e.slice(0,n-2):e.slice(0,n-1)}function Z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return h(x(e.toLowerCase()))}function y(e){return e.replace(/([A-Z])/g," $1")}function _(e){var n,r=[["second",60],["minute",60],["hour",24],["day",7],["week",4],["month",12],["year",null]];return r.forEach((function(o,i){if(!n){var l=(0,t.Z)(o,2),u=l[0],c=l[1],s=r.slice(0,i).reduce((function(e,n){return e*Number(n[1])}),1);e<Number(c)*s&&(n=b(u,Math.round(e/s)))}})),n}function k(e){return"undefined"!==typeof e&&null!==e&&!isNaN(e)}function I(e){var n,r=e.match(/\d+(\.?\d*)%/)||[];return Number(null===(n=r[0])||void 0===n?void 0:n.slice(0,-1))}function w(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=Math.pow(10,n);return Math.round((e||0)*r)/r}function N(){return"".concat((0,s.mp)(i)," ").concat((0,s.mp)(u))}function O(){return"".concat((0,s.mp)(l)).concat((0,s.mp)(c))}function E(e){return null===e||void 0===e?void 0:e.toLowerCase().replace(/\W+/g,"_")}function P(e){var n,r=e.split(o.sep),t=r[r.length-1].split(".");return n=1===t.length?t[0]:t.slice(0,-1).join("."),r.slice(0,r.length-1).concat(n).join(o.sep)}},59416:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/syncs",function(){return r(25050)}])},80022:function(e,n,r){"use strict";function t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(n,{Z:function(){return t}})},15544:function(e,n,r){"use strict";function t(e){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(e)}r.d(n,{Z:function(){return t}})},99177:function(e,n,r){"use strict";function t(e,n){return t=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},t(e,n)}function o(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&t(e,n)}r.d(n,{Z:function(){return o}})},93189:function(e,n,r){"use strict";r.d(n,{Z:function(){return i}});var t=r(12539),o=r(80022);function i(e,n){if(n&&("object"===t(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}},function(e){e.O(0,[844,2083,8013,600,4636,8264,4666,5499,5457,9774,2888,179],(function(){return n=59416,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[643],{92709:function(e,n,i){"use strict";i.d(n,{IY:function(){return s},Jf:function(){return l},LR:function(){return r},NR:function(){return o},b7:function(){return t}});var t="edit",r="[ERR_BLOCK_EXISTS]",l={uuid:"All files"},s={uuid:"Files in pipeline"},o=[l,s]},74395:function(e,n,i){"use strict";i.d(n,{M:function(){return s},W:function(){return l}});var t=i(38626),r=i(46684),l=34*i(70515).iI,s=t.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],r.Mz)},8955:function(e,n,i){"use strict";i.d(n,{G7:function(){return _},ZP:function(){return P},u$:function(){return j}});var t=i(75582),r=i(82394),l=i(26304),s=i(90299),o=i(9134),c=i(17586),u=i(38276),a=i(30160),d=i(75499),p=i(70515),g=i(16488),f=i(42122),h=i(28598),v=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function x(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function m(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?x(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):x(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var j=76,Z={uuid:"Run details"},b={uuid:"Dependency tree"},_=[b,Z];function P(e){var n=e.height,i=e.heightOffset,r=e.pipeline,x=e.selectedRun,P=e.selectedTab,y=e.setSelectedTab,O=m({},(0,l.Z)(e,v));x?O.blockStatus=(0,g.IJ)(null===x||void 0===x?void 0:x.block_runs):O.noStatus=!0;var I=(0,f.Kn)(null===x||void 0===x?void 0:x.variables)?m({},null===x||void 0===x?void 0:x.variables):(null===x||void 0===x?void 0:x.variables)||{},w=null===x||void 0===x?void 0:x.event_variables;if(w&&(0,f.Kn)(w)&&!(0,f.Qr)(w))if((0,f.Kn)(I)&&I.hasOwnProperty("event")){var k=(0,f.Kn)(I.event)?I.event:{};I.event=m(m({},k),w)}else I.event=m({},w);var S=[];I&&JSON.stringify(I,null,2).split("\n").forEach((function(e){S.push(" ".concat(e))}));var E=x&&[["Run ID",null===x||void 0===x?void 0:x.id],["Variables",(0,h.jsx)(o.Z,{language:"json",small:!0,source:S.join("\n")},"variable_value")]],C=x&&(0,h.jsx)(u.Z,{pb:p.cd,px:p.cd,children:(0,h.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:E.map((function(e,n){var i=(0,t.Z)(e,2),r=i[0],l=i[1];return[(0,h.jsx)(a.ZP,{monospace:!0,muted:!0,children:r},"key_".concat(n)),(0,h.jsx)(a.ZP,{monospace:!0,textOverflow:!0,children:l},"val_".concat(n))]})),uuid:"LogDetail"})}),T=P&&y;return(0,h.jsxs)(h.Fragment,{children:[T&&(0,h.jsx)(u.Z,{py:p.cd,children:(0,h.jsx)(s.Z,{onClickTab:y,selectedTabUUID:null===P||void 0===P?void 0:P.uuid,tabs:_})}),(!T||b.uuid===(null===P||void 0===P?void 0:P.uuid))&&(0,h.jsx)(c.Z,m(m({},O),{},{height:n,heightOffset:(i||0)+(T?j:0),pipeline:r})),Z.uuid===(null===P||void 0===P?void 0:P.uuid)&&C]})}},48381:function(e,n,i){"use strict";var t=i(82684),r=i(31882),l=i(55485),s=i(30160),o=i(86735),c=i(28598);n.Z=function(e){var n=e.onClickTag,i=e.tags,u=void 0===i?[]:i,a=(0,t.useMemo)((function(){return(null===u||void 0===u?void 0:u.length)||0}),[u]),d=(0,t.useMemo)((function(){return(0,o.YC)(u||[],"uuid")}),[u]);return(0,c.jsx)(l.ZP,{alignItems:"center",flexWrap:"wrap",children:null===d||void 0===d?void 0:d.reduce((function(e,i){return e.push((0,c.jsx)("div",{style:{marginBottom:2,marginRight:a>=2?4:0,marginTop:2},children:(0,c.jsx)(r.Z,{onClick:n?function(){return n(i)}:null,small:!0,children:(0,c.jsx)(s.ZP,{children:i.uuid})})},"tag-".concat(i.uuid))),e}),[])})}},31882:function(e,n,i){"use strict";var t=i(38626),r=i(71180),l=i(55485),s=i(30160),o=i(44897),c=i(72473),u=i(70515),a=i(61896),d=i(28598),p=t.default.div.withConfig({displayName:"Chip__ChipStyle",componentId:"sc-1ok73g-0"})(["display:inline-block;"," "," "," "," "," ",""],(function(e){return!e.primary&&"\n background-color: ".concat((e.theme.background||o.Z.background).tag,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.chart||o.Z.chart).primary,";\n ")}),(function(e){return!e.small&&"\n border-radius: ".concat((u.iI+a.Al)/2,"px;\n height: ").concat(1.5*u.iI+a.Al,"px;\n padding: ").concat(u.iI/1.5,"px ").concat(1.25*u.iI,"px;\n ")}),(function(e){return e.small&&"\n border-radius: ".concat((u.iI/2+a.Al)/2,"px;\n height: ").concat(a.Al+u.iI/2+2,"px;\n padding: ").concat(u.iI/4,"px ").concat(u.iI,"px;\n ")}),(function(e){return e.xsmall&&"\n border-radius: ".concat((u.iI/1+a.Al)/1,"px;\n height: ").concat(20,"px;\n padding: 4px 6px;\n ")}),(function(e){return e.border&&"\n border: 1px solid ".concat((e.theme.content||o.Z.content).muted,";\n ")}));n.Z=function(e){var n=e.border,i=e.children,t=e.disabled,o=e.label,a=e.monospace,g=e.onClick,f=e.primary,h=e.small,v=e.xsmall;return(0,d.jsx)(p,{border:n,primary:f,small:h,xsmall:v,children:(0,d.jsx)(r.Z,{basic:!0,disabled:t,noBackground:!0,noPadding:!0,onClick:g,transparent:!0,children:(0,d.jsxs)(l.ZP,{alignItems:"center",children:[i,o&&(0,d.jsx)(s.ZP,{monospace:a,small:h,xsmall:v,children:o}),!t&&g&&(0,d.jsx)("div",{style:{marginLeft:2}}),!t&&g&&(0,d.jsx)(c.x8,{default:f,muted:!f,size:h?u.iI:1.25*u.iI})]})})})}},36604:function(e,n,i){"use strict";i.r(n),i.d(n,{default:function(){return se}});var t=i(75582),r=i(77837),l=i(82394),s=i(38860),o=i.n(s),c=i(82684),u=i(69864),a=i(34376),d=i(71180),p=i(39457),g=i(15338),f=i(55485),h=i(85854),v=i(48670),x=i(55072),m=i(75457),j=i(53943),Z=i(44265),b=i(30229),_=i(83784),P=i(44085),y=i(38276),O=i(4190),I=i(75499),w=i(48381),k=i(30160),S=i(12468),E=i(35686),C=i(8955),T=i(74395),D=i(44425),M=i(72473),N=i(70515),R=i(28795),A=i(97196),F=i(8916),U=i(16488),z=i(3917),H=i(44375),X=i(15610),q=i(86735),K=i(42122),V=i(50178),W=i(72619),G=i(3314),L=i(69419),B=i(70320),J=i(28598);function Q(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function Y(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Q(Object(i),!0).forEach((function(n){(0,l.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Q(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var $=function(e){var n=e.errors,i=e.fetchPipelineSchedule,r=e.pipeline,l=e.pipelineSchedule,s=e.setErrors,o=e.variables,Q=(0,a.useRouter)(),$=(0,V.Ct)(),ee=(0,B.q)(),ne=(r||{}).uuid,ie=l||{},te=ie.description,re=ie.id,le=ie.event_matchers,se=ie.name,oe=ie.next_pipeline_run_date,ce=ie.schedule_interval,ue=ie.schedule_type,ae=ie.settings,de=ie.sla,pe=ie.start_time,ge=ie.status,fe=ie.tags,he=ie.variables,ve=void 0===he?{}:he,xe=(0,c.useMemo)((function(){return(0,U._U)(ce)}),[ce]),me=(0,L.iV)(),je={_limit:30,_offset:30*(null!==me&&void 0!==me&&me.page?me.page:0)};null!==me&&void 0!==me&&me.status&&(je.status=me.status),null!==l&&void 0!==l&&l.global_data_product_uuid&&(je.global_data_product_uuid=null===l||void 0===l?void 0:l.global_data_product_uuid);var Ze=E.ZP.pipeline_runs.pipeline_schedules.list(re,je,{refreshInterval:3e3,revalidateOnFocus:!0}),be=Ze.data,_e=Ze.mutate,Pe=(0,c.useMemo)((function(){return(null===be||void 0===be?void 0:be.pipeline_runs)||[]}),[be]),ye=(0,c.useMemo)((function(){var e;return(null===be||void 0===be||null===(e=be.metadata)||void 0===e?void 0:e.count)||[]}),[be]),Oe=(0,c.useState)(null),Ie=Oe[0],we=Oe[1],ke=(0,c.useMemo)((function(){var e=null!==me&&void 0!==me&&me.page?me.page:0;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(j.Z,{fetchPipelineRuns:_e,onClickRow:function(e){return we((function(n){var i=Pe[e];return(null===n||void 0===n?void 0:n.id)!==i.id?i:null}))},pipelineRuns:Pe,selectedRun:Ie,setErrors:s}),(0,J.jsx)(y.Z,{p:2,children:(0,J.jsx)(x.ZP,{maxPages:9,onUpdate:function(e){var n=Number(e),i=Y(Y({},me),{},{page:n>=0?n:0});Q.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(ne,"/triggers/").concat(re,"?").concat((0,L.uM)(i)))},page:Number(e),totalPages:Math.ceil(ye/30)})})]})}),[_e,Pe,re,ne,me,Q,Ie,s,ye]),Se=(0,c.useState)(C.G7[0]),Ee=Se[0],Ce=Se[1],Te=(0,u.Db)((function(e){return E.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:(0,K.gR)(e,["id"])})}),{onSuccess:function(e){return(0,W.wD)(e,{callback:function(){i()},onErrorCallback:function(e,n){return s({errors:n,response:e})}})}}),De=(0,t.Z)(Te,2),Me=De[0],Ne=De[1].isLoading,Re=E.ZP.pipeline_triggers.pipelines.list(ne),Ae=Re.data,Fe=Re.mutate,Ue=(0,c.useMemo)((function(){return(0,q.HK)((null===Ae||void 0===Ae?void 0:Ae.pipeline_triggers)||[],(function(e){return e.name}))}),[Ae]),ze=(0,c.useMemo)((function(){return!(null===Ue||void 0===Ue||!Ue[null===l||void 0===l?void 0:l.name])}),[l,Ue]),He=(0,u.Db)(E.ZP.pipeline_triggers.pipelines.useCreate(ne),{onSuccess:function(e){return(0,W.wD)(e,{callback:function(){Fe()},onErrorCallback:function(e,n){return s({errors:n,response:e})}})}}),Xe=(0,t.Z)(He,2),qe=Xe[0],Ke=Xe[1].isLoading,Ve=(0,c.useMemo)((function(){return b.fq.ACTIVE===ge}),[ge]),We=(0,c.useMemo)((function(){var e,n,i={default:!0,size:1.5*N.iI},t=[[(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(M.VW,Y({},i)),(0,J.jsx)(y.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Trigger type"})]},"trigger_type_label"),(0,J.jsx)(k.ZP,{monospace:!0,children:null===(e=b.Z4[ue])||void 0===e?void 0:e.call(b.Z4)},"trigger_type")],[(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(M.rs,Y({},i)),(0,J.jsx)(y.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Status"})]},"trigger_status_label"),(0,J.jsx)(k.ZP,{danger:!Ve,monospace:!0,success:Ve,children:ge},"trigger_status")]];if(te&&t.push([(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(M.KJ,Y({},i)),(0,J.jsx)(y.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Description"})]},"trigger_description_label"),(0,J.jsx)(k.ZP,{children:te},"trigger_description")]),de){var r=(0,U.gU)(de),s=r.time,o=r.unit,c=1===s?o:"".concat(o,"s");t.push([(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(M.kI,Y({},i)),(0,J.jsx)(y.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"SLA"})]},"trigger_sla_label"),(0,J.jsx)(k.ZP,{monospace:!0,children:"".concat(s," ").concat(c)},"trigger_sla")])}if(ce&&t.push([(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(M.Pf,Y({},i)),(0,J.jsx)(y.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Frequency"})]},"trigger_frequency_label"),(0,J.jsx)(k.ZP,{monospace:!0,children:ee&&xe?(0,U.lO)(ce):ce.replace("@","")},"trigger_frequency")],[(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(M.aw,Y({},i)),(0,J.jsx)(y.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Next run date"})]},"trigger_next_run_date_label"),(0,J.jsx)(k.ZP,{monospace:!0,children:oe?ee?(0,z.XG)(oe,ee):(0,z.d$)(oe,{includeSeconds:!0,utcFormat:!0}):"N/A"},"trigger_next_run_date")]),pe&&t.push([(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(M.aw,Y({},i)),(0,J.jsx)(y.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Start date"})]},"trigger_start_date_label"),(0,J.jsx)(k.ZP,{monospace:!0,children:ee?(0,z.XG)(pe,ee):pe},"trigger_start_date")]),b.Xm.API===ue){var u=(0,U.M8)(l);t.push([(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(M.Ae,Y({},i)),(0,J.jsx)(y.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"API endpoint"})]},"trigger_api_endpoint_label"),(0,J.jsx)(p.Z,{copiedText:u,children:(0,J.jsx)(k.ZP,{monospace:!0,small:!0,children:u})},"trigger_api_endpoint")])}if(null!==ae&&void 0!==ae&&ae.timeout){var a=(0,U.gU)(null===ae||void 0===ae?void 0:ae.timeout),d=a.time,g=a.unit,h=1===d?g:"".concat(g,"s");t.push([(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(S.Z,{default:!0,label:"Timeout set for runs of this trigger",size:1.5*N.iI,widthFitContent:!0}),(0,J.jsx)(y.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Timeout"})]},"trigger_timeout"),(0,J.jsx)(k.ZP,{monospace:!0,children:"".concat(d," ").concat(h)},"trigger_timeout_label")])}null!==ae&&void 0!==ae&&ae.skip_if_previous_running&&t.push([(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(S.Z,{default:!0,label:"Skip current run if any previous runs are still in progress",size:1.5*N.iI,widthFitContent:!0}),(0,J.jsx)(y.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Skip if running"})]},"trigger_skip_if_running"),(0,J.jsx)(k.ZP,{monospace:!0,children:null===(n=ae.skip_if_previous_running)||void 0===n?void 0:n.toString()},"trigger_skip_if_running_label")]);return null!==ae&&void 0!==ae&&ae.allow_blocks_to_fail&&t.push([(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(S.Z,{default:!0,label:"Trigger runs will continue running blocks if other unrelated blocks fail",size:1.5*N.iI,widthFitContent:!0}),(0,J.jsx)(y.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Allow blocks to fail"})]},"trigger_allow_blocks_to_fail"),(0,J.jsx)(k.ZP,{monospace:!0,children:ae.allow_blocks_to_fail.toString()},"trigger_allow_blocks_to_fail_label")]),(0,J.jsx)(I.Z,{columnFlex:[null,1],rows:t})}),[te,ee,Ve,xe,oe,l,ce,ue,ae,de,pe,ge]),Ge=(0,c.useMemo)((function(){return ve||{}}),[ve]),Le=(0,c.useMemo)((function(){var e,n=[];return(0,K.Qr)(Ge)?n=(0,F.wx)(o,(function(e){return e.uuid===_.C})):Object.entries(Ge).forEach((function(e){var i=(0,t.Z)(e,2),r=i[0],l=i[1];Z.sZ!==r&&n.push({uuid:r,value:(0,F.FS)(l)})})),"undefined"!==typeof(n=(0,F.JZ)(n||[],ue))&&null!==(e=n)&&void 0!==e&&e.length?(0,J.jsx)(I.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,i=e.value;return[(0,J.jsx)(k.ZP,{default:!0,monospace:!0,children:n},"settings_variable_label_".concat(n)),(0,J.jsx)(k.ZP,{monospace:!0,children:i},"settings_variable_".concat(n))]}))}):null}),[ue,Ge,o]),Be=(0,c.useMemo)((function(){var e,n,i=[],t=null===Ge||void 0===Ge||null===(e=Ge[Z.sZ])||void 0===e?void 0:e.blocks;return null===r||void 0===r||null===(n=r.blocks)||void 0===n||n.forEach((function(e){var n=e.type,r=e.uuid;if(D.tf.DBT===n){var l,s=(null===t||void 0===t||null===(l=t[r])||void 0===l?void 0:l.configuration)||{},o=s.flags,c=s.prefix,u=s.suffix,a=(0,H.IU)(e).name;(o||c||u)&&i.push({flags:o,prefix:c,suffix:u,uuid:a})}})),"undefined"!==typeof i&&null!==i&&void 0!==i&&i.length?(0,J.jsx)(I.Z,{columnFlex:[1,null],rows:i.map((function(e){var n=e.flags,i=e.prefix,t=e.suffix,r=e.uuid;return[(0,J.jsxs)(k.ZP,{monospace:!0,small:!0,children:[i&&(0,J.jsx)(k.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:i}),r,t&&(0,J.jsx)(k.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:t})]},"settings_variable_label_".concat(r)),(0,J.jsx)(k.ZP,{monospace:!0,muted:!0,small:!0,children:n&&n.join(", ")},"settings_variable_".concat(r))]}))}):null}),[r,Ge]),Je=(0,c.useMemo)((function(){return(0,J.jsx)(I.Z,{columnFlex:[null,1],columns:[{uuid:"Provider"},{uuid:"Event"}],rows:null===le||void 0===le?void 0:le.map((function(e,n){var i=e.event_type,t=e.name;return[(0,J.jsx)(k.ZP,{default:!0,monospace:!0,children:A._P[i].label()},"".concat(i,"_").concat(n,"_label")),(0,J.jsx)(k.ZP,{monospace:!0,children:t},"".concat(i,"_").concat(n,"_name"))]}))})}),[le]);return(0,J.jsxs)(m.Z,{afterHidden:!Ie,before:(0,J.jsxs)(T.M,{children:[(0,J.jsxs)(y.Z,{mb:N.HN,pt:N.cd,px:N.cd,children:[(0,J.jsxs)(y.Z,{mb:N.cd,children:[b.Xm.TIME===ue&&(0,J.jsx)(M.kO,{size:5*N.iI}),b.Xm.EVENT===ue&&(0,J.jsx)(M.Jp,{size:5*N.iI}),b.Xm.API===ue&&(0,J.jsx)(M.Bf,{size:5*N.iI}),!ue&&(0,J.jsx)(M.VW,{size:5*N.iI})]}),(0,J.jsx)(h.Z,{children:se})]}),(0,J.jsx)(y.Z,{px:N.cd,children:(0,J.jsx)(h.Z,{level:5,children:"Settings"})}),(0,J.jsx)(g.Z,{light:!0,mt:1,short:!0}),We,(null===le||void 0===le?void 0:le.length)>=1&&(0,J.jsxs)(y.Z,{my:N.HN,children:[(0,J.jsx)(y.Z,{px:N.cd,children:(0,J.jsx)(h.Z,{level:5,children:"Events"})}),(0,J.jsx)(g.Z,{light:!0,mt:1,short:!0}),Je]}),Le&&(0,J.jsxs)(y.Z,{my:N.HN,children:[(0,J.jsx)(y.Z,{px:N.cd,children:(0,J.jsx)(h.Z,{level:5,children:"Runtime variables"})}),(0,J.jsx)(g.Z,{light:!0,mt:1,short:!0}),Le]}),Be&&(0,J.jsxs)(y.Z,{my:N.HN,children:[(0,J.jsx)(y.Z,{px:N.cd,children:(0,J.jsx)(h.Z,{level:5,children:"dbt runtime settings"})}),(0,J.jsx)(g.Z,{light:!0,mt:1,short:!0}),Be]}),(null===fe||void 0===fe?void 0:fe.length)>=1&&(0,J.jsxs)(y.Z,{my:N.HN,children:[(0,J.jsx)(y.Z,{px:N.cd,children:(0,J.jsx)(h.Z,{level:5,children:"Tags"})}),(0,J.jsx)(g.Z,{light:!0,mt:1,short:!0}),(0,J.jsx)(y.Z,{mt:N.cd,px:N.cd,children:(0,J.jsx)(w.Z,{tags:null===fe||void 0===fe?void 0:fe.map((function(e){return{uuid:e}}))})})]}),(0,J.jsx)(y.Z,{my:N.HN,children:(0,J.jsxs)(y.Z,{px:N.cd,children:[(0,J.jsxs)(h.Z,{level:5,children:[ze&&"Trigger exists in code",!ze&&"Store trigger in code"]}),(0,J.jsx)(y.Z,{mt:1,children:(0,J.jsxs)(k.ZP,{default:!0,children:["Save or update the trigger and its settings in the pipeline\u2019s metadata and version control the trigger using Git. For more information, please read the ",(0,J.jsx)(v.Z,{href:"https://docs.mage.ai/guides/triggers/configure-triggers-in-code",openNewWindow:!0,children:"documentation"}),"."]})}),(0,J.jsxs)(y.Z,{mt:N.cd,children:[!Ae&&(0,J.jsx)(O.Z,{inverted:!0}),Ae&&(0,J.jsxs)(d.Z,{disabled:!(null!==l&&void 0!==l&&l.id),loading:Ke,onClick:function(){qe({pipeline_trigger:{pipeline_schedule_id:null===l||void 0===l?void 0:l.id}})},secondary:!0,children:[ze&&"Update trigger in code",!ze&&"Save trigger in code"]})]})]})})]}),beforeWidth:T.W,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(ne,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return se},linkProps:{as:"/pipelines/".concat(ne,"/triggers/").concat(re),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],buildSidekick:function(e){return(0,C.ZP)(Y(Y({},e),{},{selectedRun:Ie,selectedTab:Ee,setSelectedTab:Ce}))},errors:n,pageName:R.M.TRIGGERS,pipeline:r,setErrors:s,subheader:(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(d.Z,{beforeIcon:Ve?(0,J.jsx)(M.dz,{size:2*N.iI}):(0,J.jsx)(M.Py,{inverted:!$,size:2*N.iI}),danger:Ve&&!$,loading:Ne,onClick:function(e){(0,G.j)(e),Me({id:re,status:Ve?b.fq.INACTIVE:b.fq.ACTIVE})},outline:!0,success:!Ve&&!$,children:Ve?"Pause trigger":"Start trigger"}),(0,J.jsx)(y.Z,{mr:N.cd}),!$&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(d.Z,{linkProps:{as:"/pipelines/".concat(ne,"/triggers/").concat(re,"/edit"),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit trigger"}),(0,J.jsx)(y.Z,{mr:N.cd})]}),(0,J.jsxs)(P.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?Q.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(ne,"/triggers/").concat(re)):(0,X.u7)({page:0,status:e.target.value})},paddingRight:4*N.iI,placeholder:"Select run status",value:(null===me||void 0===me?void 0:me.status)||"all",children:[(0,J.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Z.IK.map((function(e){return(0,J.jsx)("option",{value:e,children:Z.Do[e]},e)}))]})]}),title:function(){return se},uuid:"triggers/detail",children:[(0,J.jsx)(y.Z,{mt:N.cd,px:N.cd,children:(0,J.jsx)(h.Z,{level:5,children:"Runs for this trigger"})}),(0,J.jsx)(g.Z,{light:!0,mt:N.cd,short:!0}),ke]})},ee=i(12717),ne=i(93808),ie=i(92709);function te(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function re(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?te(Object(i),!0).forEach((function(n){(0,l.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):te(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}function le(e){var n=e.pipelineScheduleId,i=e.pipelineUUID,t=e.subpath,r=ie.b7===t,l=(0,c.useState)(null),s=l[0],o=l[1],u=E.ZP.variables.pipelines.list(i,{},{revalidateOnFocus:!1}).data,a=null===u||void 0===u?void 0:u.variables,d={};r&&(d._format="with_runtime_average");var p=E.ZP.pipeline_schedules.detail("undefined"!==typeof n&&n,d),g=p.data,f=p.mutate,h=null===g||void 0===g?void 0:g.pipeline_schedule,v=E.ZP.pipelines.detail(i,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,x=re(re({},null===v||void 0===v?void 0:v.pipeline),{},{uuid:i}),m=E.ZP.projects.list().data,j=(0,c.useMemo)((function(){var e;return null===m||void 0===m||null===(e=m.projects)||void 0===e?void 0:e[0]}),[m]);return r?(0,J.jsx)(ee.Z,{errors:s,fetchPipelineSchedule:f,pipeline:x,pipelineSchedule:h,project:j,setErrors:o,variables:a}):(0,J.jsx)($,{errors:s,fetchPipelineSchedule:f,pipeline:x,pipelineSchedule:h,setErrors:o,variables:a})}le.getInitialProps=function(){var e=(0,r.Z)(o().mark((function e(n){var i,r,l,s,c,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.query,r=i.pipeline,l=i.slug,!Array.isArray(l)){e.next=4;break}return s=(0,t.Z)(l,2),c=s[0],u=s[1],e.abrupt("return",{pipelineScheduleId:c,pipelineUUID:r,subpath:u});case 4:return e.abrupt("return",{pipelineUUID:r});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var se=(0,ne.Z)(le)},95488:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers/[...slug]",function(){return i(36604)}])}},function(e){e.O(0,[844,2083,2851,2369,341,9161,4495,9302,8013,600,9696,8264,4666,5499,4839,5457,7055,1769,3943,6333,9774,2888,179],(function(){return n=95488,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[643],{92709:function(e,n,i){"use strict";i.d(n,{IY:function(){return s},Jf:function(){return l},LR:function(){return r},NR:function(){return o},b7:function(){return t}});var t="edit",r="[ERR_BLOCK_EXISTS]",l={uuid:"All files"},s={uuid:"Files in pipeline"},o=[l,s]},74395:function(e,n,i){"use strict";i.d(n,{M:function(){return s},W:function(){return l}});var t=i(38626),r=i(46684),l=34*i(70515).iI,s=t.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],r.Mz)},8955:function(e,n,i){"use strict";i.d(n,{G7:function(){return _},ZP:function(){return P},u$:function(){return j}});var t=i(75582),r=i(82394),l=i(26304),s=i(90299),o=i(9134),c=i(17586),u=i(38276),a=i(30160),d=i(75499),p=i(70515),g=i(16488),f=i(42122),h=i(28598),v=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function x(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function m(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?x(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):x(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var j=76,Z={uuid:"Run details"},b={uuid:"Dependency tree"},_=[b,Z];function P(e){var n=e.height,i=e.heightOffset,r=e.pipeline,x=e.selectedRun,P=e.selectedTab,y=e.setSelectedTab,O=m({},(0,l.Z)(e,v));x?O.blockStatus=(0,g.IJ)(null===x||void 0===x?void 0:x.block_runs):O.noStatus=!0;var I=(0,f.Kn)(null===x||void 0===x?void 0:x.variables)?m({},null===x||void 0===x?void 0:x.variables):(null===x||void 0===x?void 0:x.variables)||{},w=null===x||void 0===x?void 0:x.event_variables;if(w&&(0,f.Kn)(w)&&!(0,f.Qr)(w))if((0,f.Kn)(I)&&I.hasOwnProperty("event")){var k=(0,f.Kn)(I.event)?I.event:{};I.event=m(m({},k),w)}else I.event=m({},w);var S=[];I&&JSON.stringify(I,null,2).split("\n").forEach((function(e){S.push(" ".concat(e))}));var E=x&&[["Run ID",null===x||void 0===x?void 0:x.id],["Variables",(0,h.jsx)(o.Z,{language:"json",small:!0,source:S.join("\n")},"variable_value")]],C=x&&(0,h.jsx)(u.Z,{pb:p.cd,px:p.cd,children:(0,h.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:E.map((function(e,n){var i=(0,t.Z)(e,2),r=i[0],l=i[1];return[(0,h.jsx)(a.ZP,{monospace:!0,muted:!0,children:r},"key_".concat(n)),(0,h.jsx)(a.ZP,{monospace:!0,textOverflow:!0,children:l},"val_".concat(n))]})),uuid:"LogDetail"})}),T=P&&y;return(0,h.jsxs)(h.Fragment,{children:[T&&(0,h.jsx)(u.Z,{py:p.cd,children:(0,h.jsx)(s.Z,{onClickTab:y,selectedTabUUID:null===P||void 0===P?void 0:P.uuid,tabs:_})}),(!T||b.uuid===(null===P||void 0===P?void 0:P.uuid))&&(0,h.jsx)(c.Z,m(m({},O),{},{height:n,heightOffset:(i||0)+(T?j:0),pipeline:r})),Z.uuid===(null===P||void 0===P?void 0:P.uuid)&&C]})}},48381:function(e,n,i){"use strict";var t=i(82684),r=i(31882),l=i(55485),s=i(30160),o=i(86735),c=i(28598);n.Z=function(e){var n=e.onClickTag,i=e.tags,u=void 0===i?[]:i,a=(0,t.useMemo)((function(){return(null===u||void 0===u?void 0:u.length)||0}),[u]),d=(0,t.useMemo)((function(){return(0,o.YC)(u||[],"uuid")}),[u]);return(0,c.jsx)(l.ZP,{alignItems:"center",flexWrap:"wrap",children:null===d||void 0===d?void 0:d.reduce((function(e,i){return e.push((0,c.jsx)("div",{style:{marginBottom:2,marginRight:a>=2?4:0,marginTop:2},children:(0,c.jsx)(r.Z,{onClick:n?function(){return n(i)}:null,small:!0,children:(0,c.jsx)(s.ZP,{children:i.uuid})})},"tag-".concat(i.uuid))),e}),[])})}},31882:function(e,n,i){"use strict";var t=i(38626),r=i(71180),l=i(55485),s=i(30160),o=i(44897),c=i(72473),u=i(70515),a=i(61896),d=i(28598),p=t.default.div.withConfig({displayName:"Chip__ChipStyle",componentId:"sc-1ok73g-0"})(["display:inline-block;"," "," "," "," "," ",""],(function(e){return!e.primary&&"\n background-color: ".concat((e.theme.background||o.Z.background).tag,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.chart||o.Z.chart).primary,";\n ")}),(function(e){return!e.small&&"\n border-radius: ".concat((u.iI+a.Al)/2,"px;\n height: ").concat(1.5*u.iI+a.Al,"px;\n padding: ").concat(u.iI/1.5,"px ").concat(1.25*u.iI,"px;\n ")}),(function(e){return e.small&&"\n border-radius: ".concat((u.iI/2+a.Al)/2,"px;\n height: ").concat(a.Al+u.iI/2+2,"px;\n padding: ").concat(u.iI/4,"px ").concat(u.iI,"px;\n ")}),(function(e){return e.xsmall&&"\n border-radius: ".concat((u.iI/1+a.Al)/1,"px;\n height: ").concat(20,"px;\n padding: 4px 6px;\n ")}),(function(e){return e.border&&"\n border: 1px solid ".concat((e.theme.content||o.Z.content).muted,";\n ")}));n.Z=function(e){var n=e.border,i=e.children,t=e.disabled,o=e.label,a=e.monospace,g=e.onClick,f=e.primary,h=e.small,v=e.xsmall;return(0,d.jsx)(p,{border:n,primary:f,small:h,xsmall:v,children:(0,d.jsx)(r.Z,{basic:!0,disabled:t,noBackground:!0,noPadding:!0,onClick:g,transparent:!0,children:(0,d.jsxs)(l.ZP,{alignItems:"center",children:[i,o&&(0,d.jsx)(s.ZP,{monospace:a,small:h,xsmall:v,children:o}),!t&&g&&(0,d.jsx)("div",{style:{marginLeft:2}}),!t&&g&&(0,d.jsx)(c.x8,{default:f,muted:!f,size:h?u.iI:1.25*u.iI})]})})})}},36604:function(e,n,i){"use strict";i.r(n),i.d(n,{default:function(){return se}});var t=i(75582),r=i(77837),l=i(82394),s=i(38860),o=i.n(s),c=i(82684),u=i(69864),a=i(34376),d=i(71180),p=i(39457),g=i(15338),f=i(55485),h=i(85854),v=i(48670),x=i(55072),m=i(75457),j=i(53943),Z=i(44265),b=i(30229),_=i(83784),P=i(44085),y=i(38276),O=i(4190),I=i(75499),w=i(48381),k=i(30160),S=i(12468),E=i(35686),C=i(8955),T=i(74395),D=i(44425),M=i(72473),N=i(70515),R=i(28795),A=i(97196),F=i(8916),U=i(16488),z=i(3917),H=i(44375),X=i(15610),q=i(86735),K=i(42122),V=i(50178),W=i(72619),G=i(3314),L=i(69419),B=i(70320),J=i(28598);function Q(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function Y(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Q(Object(i),!0).forEach((function(n){(0,l.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Q(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var $=function(e){var n=e.errors,i=e.fetchPipelineSchedule,r=e.pipeline,l=e.pipelineSchedule,s=e.setErrors,o=e.variables,Q=(0,a.useRouter)(),$=(0,V.Ct)(),ee=(0,B.q)(),ne=(r||{}).uuid,ie=l||{},te=ie.description,re=ie.id,le=ie.event_matchers,se=ie.name,oe=ie.next_pipeline_run_date,ce=ie.schedule_interval,ue=ie.schedule_type,ae=ie.settings,de=ie.sla,pe=ie.start_time,ge=ie.status,fe=ie.tags,he=ie.variables,ve=void 0===he?{}:he,xe=(0,c.useMemo)((function(){return(0,U._U)(ce)}),[ce]),me=(0,L.iV)(),je={_limit:30,_offset:30*(null!==me&&void 0!==me&&me.page?me.page:0)};null!==me&&void 0!==me&&me.status&&(je.status=me.status),null!==l&&void 0!==l&&l.global_data_product_uuid&&(je.global_data_product_uuid=null===l||void 0===l?void 0:l.global_data_product_uuid);var Ze=E.ZP.pipeline_runs.pipeline_schedules.list(re,je,{refreshInterval:3e3,revalidateOnFocus:!0}),be=Ze.data,_e=Ze.mutate,Pe=(0,c.useMemo)((function(){return(null===be||void 0===be?void 0:be.pipeline_runs)||[]}),[be]),ye=(0,c.useMemo)((function(){var e;return(null===be||void 0===be||null===(e=be.metadata)||void 0===e?void 0:e.count)||[]}),[be]),Oe=(0,c.useState)(null),Ie=Oe[0],we=Oe[1],ke=(0,c.useMemo)((function(){var e=null!==me&&void 0!==me&&me.page?me.page:0;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(j.Z,{fetchPipelineRuns:_e,onClickRow:function(e){return we((function(n){var i=Pe[e];return(null===n||void 0===n?void 0:n.id)!==i.id?i:null}))},pipelineRuns:Pe,selectedRun:Ie,setErrors:s}),(0,J.jsx)(y.Z,{p:2,children:(0,J.jsx)(x.ZP,{maxPages:9,onUpdate:function(e){var n=Number(e),i=Y(Y({},me),{},{page:n>=0?n:0});Q.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(ne,"/triggers/").concat(re,"?").concat((0,L.uM)(i)))},page:Number(e),totalPages:Math.ceil(ye/30)})})]})}),[_e,Pe,re,ne,me,Q,Ie,s,ye]),Se=(0,c.useState)(C.G7[0]),Ee=Se[0],Ce=Se[1],Te=(0,u.Db)((function(e){return E.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:(0,K.gR)(e,["id"])})}),{onSuccess:function(e){return(0,W.wD)(e,{callback:function(){i()},onErrorCallback:function(e,n){return s({errors:n,response:e})}})}}),De=(0,t.Z)(Te,2),Me=De[0],Ne=De[1].isLoading,Re=E.ZP.pipeline_triggers.pipelines.list(ne),Ae=Re.data,Fe=Re.mutate,Ue=(0,c.useMemo)((function(){return(0,q.HK)((null===Ae||void 0===Ae?void 0:Ae.pipeline_triggers)||[],(function(e){return e.name}))}),[Ae]),ze=(0,c.useMemo)((function(){return!(null===Ue||void 0===Ue||!Ue[null===l||void 0===l?void 0:l.name])}),[l,Ue]),He=(0,u.Db)(E.ZP.pipeline_triggers.pipelines.useCreate(ne),{onSuccess:function(e){return(0,W.wD)(e,{callback:function(){Fe()},onErrorCallback:function(e,n){return s({errors:n,response:e})}})}}),Xe=(0,t.Z)(He,2),qe=Xe[0],Ke=Xe[1].isLoading,Ve=(0,c.useMemo)((function(){return b.fq.ACTIVE===ge}),[ge]),We=(0,c.useMemo)((function(){var e,n,i={default:!0,size:1.5*N.iI},t=[[(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(M.VW,Y({},i)),(0,J.jsx)(y.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Trigger type"})]},"trigger_type_label"),(0,J.jsx)(k.ZP,{monospace:!0,children:null===(e=b.Z4[ue])||void 0===e?void 0:e.call(b.Z4)},"trigger_type")],[(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(M.rs,Y({},i)),(0,J.jsx)(y.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Status"})]},"trigger_status_label"),(0,J.jsx)(k.ZP,{danger:!Ve,monospace:!0,success:Ve,children:ge},"trigger_status")]];if(te&&t.push([(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(M.KJ,Y({},i)),(0,J.jsx)(y.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Description"})]},"trigger_description_label"),(0,J.jsx)(k.ZP,{children:te},"trigger_description")]),de){var r=(0,U.gU)(de),s=r.time,o=r.unit,c=1===s?o:"".concat(o,"s");t.push([(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(M.kI,Y({},i)),(0,J.jsx)(y.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"SLA"})]},"trigger_sla_label"),(0,J.jsx)(k.ZP,{monospace:!0,children:"".concat(s," ").concat(c)},"trigger_sla")])}if(ce&&t.push([(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(M.Pf,Y({},i)),(0,J.jsx)(y.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Frequency"})]},"trigger_frequency_label"),(0,J.jsx)(k.ZP,{monospace:!0,children:ee&&xe?(0,U.lO)(ce):ce.replace("@","")},"trigger_frequency")],[(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(M.aw,Y({},i)),(0,J.jsx)(y.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Next run date"})]},"trigger_next_run_date_label"),(0,J.jsx)(k.ZP,{monospace:!0,children:oe?ee?(0,z.XG)(oe,ee):(0,z.d$)(oe,{includeSeconds:!0,utcFormat:!0}):"N/A"},"trigger_next_run_date")]),pe&&t.push([(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(M.aw,Y({},i)),(0,J.jsx)(y.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Start date"})]},"trigger_start_date_label"),(0,J.jsx)(k.ZP,{monospace:!0,children:ee?(0,z.XG)(pe,ee):pe},"trigger_start_date")]),b.Xm.API===ue){var u=(0,U.M8)(l);t.push([(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(M.Ae,Y({},i)),(0,J.jsx)(y.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"API endpoint"})]},"trigger_api_endpoint_label"),(0,J.jsx)(p.Z,{copiedText:u,children:(0,J.jsx)(k.ZP,{monospace:!0,small:!0,children:u})},"trigger_api_endpoint")])}if(null!==ae&&void 0!==ae&&ae.timeout){var a=(0,U.gU)(null===ae||void 0===ae?void 0:ae.timeout),d=a.time,g=a.unit,h=1===d?g:"".concat(g,"s");t.push([(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(S.Z,{default:!0,label:"Timeout set for runs of this trigger",size:1.5*N.iI,widthFitContent:!0}),(0,J.jsx)(y.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Timeout"})]},"trigger_timeout"),(0,J.jsx)(k.ZP,{monospace:!0,children:"".concat(d," ").concat(h)},"trigger_timeout_label")])}null!==ae&&void 0!==ae&&ae.skip_if_previous_running&&t.push([(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(S.Z,{default:!0,label:"Skip current run if any previous runs are still in progress",size:1.5*N.iI,widthFitContent:!0}),(0,J.jsx)(y.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Skip if running"})]},"trigger_skip_if_running"),(0,J.jsx)(k.ZP,{monospace:!0,children:null===(n=ae.skip_if_previous_running)||void 0===n?void 0:n.toString()},"trigger_skip_if_running_label")]);return null!==ae&&void 0!==ae&&ae.allow_blocks_to_fail&&t.push([(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(S.Z,{default:!0,label:"Trigger runs will continue running blocks if other unrelated blocks fail",size:1.5*N.iI,widthFitContent:!0}),(0,J.jsx)(y.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Allow blocks to fail"})]},"trigger_allow_blocks_to_fail"),(0,J.jsx)(k.ZP,{monospace:!0,children:ae.allow_blocks_to_fail.toString()},"trigger_allow_blocks_to_fail_label")]),(0,J.jsx)(I.Z,{columnFlex:[null,1],rows:t})}),[te,ee,Ve,xe,oe,l,ce,ue,ae,de,pe,ge]),Ge=(0,c.useMemo)((function(){return ve||{}}),[ve]),Le=(0,c.useMemo)((function(){var e,n=[];return(0,K.Qr)(Ge)?n=(0,F.wx)(o,(function(e){return e.uuid===_.C})):Object.entries(Ge).forEach((function(e){var i=(0,t.Z)(e,2),r=i[0],l=i[1];Z.sZ!==r&&n.push({uuid:r,value:(0,F.FS)(l)})})),"undefined"!==typeof(n=(0,F.JZ)(n||[],ue))&&null!==(e=n)&&void 0!==e&&e.length?(0,J.jsx)(I.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,i=e.value;return[(0,J.jsx)(k.ZP,{default:!0,monospace:!0,children:n},"settings_variable_label_".concat(n)),(0,J.jsx)(k.ZP,{monospace:!0,children:i},"settings_variable_".concat(n))]}))}):null}),[ue,Ge,o]),Be=(0,c.useMemo)((function(){var e,n,i=[],t=null===Ge||void 0===Ge||null===(e=Ge[Z.sZ])||void 0===e?void 0:e.blocks;return null===r||void 0===r||null===(n=r.blocks)||void 0===n||n.forEach((function(e){var n=e.type,r=e.uuid;if(D.tf.DBT===n){var l,s=(null===t||void 0===t||null===(l=t[r])||void 0===l?void 0:l.configuration)||{},o=s.flags,c=s.prefix,u=s.suffix,a=(0,H.IU)(e).name;(o||c||u)&&i.push({flags:o,prefix:c,suffix:u,uuid:a})}})),"undefined"!==typeof i&&null!==i&&void 0!==i&&i.length?(0,J.jsx)(I.Z,{columnFlex:[1,null],rows:i.map((function(e){var n=e.flags,i=e.prefix,t=e.suffix,r=e.uuid;return[(0,J.jsxs)(k.ZP,{monospace:!0,small:!0,children:[i&&(0,J.jsx)(k.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:i}),r,t&&(0,J.jsx)(k.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:t})]},"settings_variable_label_".concat(r)),(0,J.jsx)(k.ZP,{monospace:!0,muted:!0,small:!0,children:n&&n.join(", ")},"settings_variable_".concat(r))]}))}):null}),[r,Ge]),Je=(0,c.useMemo)((function(){return(0,J.jsx)(I.Z,{columnFlex:[null,1],columns:[{uuid:"Provider"},{uuid:"Event"}],rows:null===le||void 0===le?void 0:le.map((function(e,n){var i=e.event_type,t=e.name;return[(0,J.jsx)(k.ZP,{default:!0,monospace:!0,children:A._P[i].label()},"".concat(i,"_").concat(n,"_label")),(0,J.jsx)(k.ZP,{monospace:!0,children:t},"".concat(i,"_").concat(n,"_name"))]}))})}),[le]);return(0,J.jsxs)(m.Z,{afterHidden:!Ie,before:(0,J.jsxs)(T.M,{children:[(0,J.jsxs)(y.Z,{mb:N.HN,pt:N.cd,px:N.cd,children:[(0,J.jsxs)(y.Z,{mb:N.cd,children:[b.Xm.TIME===ue&&(0,J.jsx)(M.kO,{size:5*N.iI}),b.Xm.EVENT===ue&&(0,J.jsx)(M.Jp,{size:5*N.iI}),b.Xm.API===ue&&(0,J.jsx)(M.Bf,{size:5*N.iI}),!ue&&(0,J.jsx)(M.VW,{size:5*N.iI})]}),(0,J.jsx)(h.Z,{children:se})]}),(0,J.jsx)(y.Z,{px:N.cd,children:(0,J.jsx)(h.Z,{level:5,children:"Settings"})}),(0,J.jsx)(g.Z,{light:!0,mt:1,short:!0}),We,(null===le||void 0===le?void 0:le.length)>=1&&(0,J.jsxs)(y.Z,{my:N.HN,children:[(0,J.jsx)(y.Z,{px:N.cd,children:(0,J.jsx)(h.Z,{level:5,children:"Events"})}),(0,J.jsx)(g.Z,{light:!0,mt:1,short:!0}),Je]}),Le&&(0,J.jsxs)(y.Z,{my:N.HN,children:[(0,J.jsx)(y.Z,{px:N.cd,children:(0,J.jsx)(h.Z,{level:5,children:"Runtime variables"})}),(0,J.jsx)(g.Z,{light:!0,mt:1,short:!0}),Le]}),Be&&(0,J.jsxs)(y.Z,{my:N.HN,children:[(0,J.jsx)(y.Z,{px:N.cd,children:(0,J.jsx)(h.Z,{level:5,children:"dbt runtime settings"})}),(0,J.jsx)(g.Z,{light:!0,mt:1,short:!0}),Be]}),(null===fe||void 0===fe?void 0:fe.length)>=1&&(0,J.jsxs)(y.Z,{my:N.HN,children:[(0,J.jsx)(y.Z,{px:N.cd,children:(0,J.jsx)(h.Z,{level:5,children:"Tags"})}),(0,J.jsx)(g.Z,{light:!0,mt:1,short:!0}),(0,J.jsx)(y.Z,{mt:N.cd,px:N.cd,children:(0,J.jsx)(w.Z,{tags:null===fe||void 0===fe?void 0:fe.map((function(e){return{uuid:e}}))})})]}),(0,J.jsx)(y.Z,{my:N.HN,children:(0,J.jsxs)(y.Z,{px:N.cd,children:[(0,J.jsxs)(h.Z,{level:5,children:[ze&&"Trigger exists in code",!ze&&"Store trigger in code"]}),(0,J.jsx)(y.Z,{mt:1,children:(0,J.jsxs)(k.ZP,{default:!0,children:["Save or update the trigger and its settings in the pipeline\u2019s metadata and version control the trigger using Git. For more information, please read the ",(0,J.jsx)(v.Z,{href:"https://docs.mage.ai/guides/triggers/configure-triggers-in-code",openNewWindow:!0,children:"documentation"}),"."]})}),(0,J.jsxs)(y.Z,{mt:N.cd,children:[!Ae&&(0,J.jsx)(O.Z,{inverted:!0}),Ae&&(0,J.jsxs)(d.Z,{disabled:!(null!==l&&void 0!==l&&l.id),loading:Ke,onClick:function(){qe({pipeline_trigger:{pipeline_schedule_id:null===l||void 0===l?void 0:l.id}})},secondary:!0,children:[ze&&"Update trigger in code",!ze&&"Save trigger in code"]})]})]})})]}),beforeWidth:T.W,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(ne,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return se},linkProps:{as:"/pipelines/".concat(ne,"/triggers/").concat(re),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],buildSidekick:function(e){return(0,C.ZP)(Y(Y({},e),{},{selectedRun:Ie,selectedTab:Ee,setSelectedTab:Ce}))},errors:n,pageName:R.M.TRIGGERS,pipeline:r,setErrors:s,subheader:(0,J.jsxs)(f.ZP,{alignItems:"center",children:[(0,J.jsx)(d.Z,{beforeIcon:Ve?(0,J.jsx)(M.dz,{size:2*N.iI}):(0,J.jsx)(M.Py,{inverted:!$,size:2*N.iI}),danger:Ve&&!$,loading:Ne,onClick:function(e){(0,G.j)(e),Me({id:re,status:Ve?b.fq.INACTIVE:b.fq.ACTIVE})},outline:!0,success:!Ve&&!$,children:Ve?"Pause trigger":"Start trigger"}),(0,J.jsx)(y.Z,{mr:N.cd}),!$&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(d.Z,{linkProps:{as:"/pipelines/".concat(ne,"/triggers/").concat(re,"/edit"),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit trigger"}),(0,J.jsx)(y.Z,{mr:N.cd})]}),(0,J.jsxs)(P.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?Q.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(ne,"/triggers/").concat(re)):(0,X.u7)({page:0,status:e.target.value})},paddingRight:4*N.iI,placeholder:"Select run status",value:(null===me||void 0===me?void 0:me.status)||"all",children:[(0,J.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Z.IK.map((function(e){return(0,J.jsx)("option",{value:e,children:Z.Do[e]},e)}))]})]}),title:function(){return se},uuid:"triggers/detail",children:[(0,J.jsx)(y.Z,{mt:N.cd,px:N.cd,children:(0,J.jsx)(h.Z,{level:5,children:"Runs for this trigger"})}),(0,J.jsx)(g.Z,{light:!0,mt:N.cd,short:!0}),ke]})},ee=i(12717),ne=i(93808),ie=i(92709);function te(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function re(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?te(Object(i),!0).forEach((function(n){(0,l.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):te(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}function le(e){var n=e.pipelineScheduleId,i=e.pipelineUUID,t=e.subpath,r=ie.b7===t,l=(0,c.useState)(null),s=l[0],o=l[1],u=E.ZP.variables.pipelines.list(i,{},{revalidateOnFocus:!1}).data,a=null===u||void 0===u?void 0:u.variables,d={};r&&(d._format="with_runtime_average");var p=E.ZP.pipeline_schedules.detail("undefined"!==typeof n&&n,d),g=p.data,f=p.mutate,h=null===g||void 0===g?void 0:g.pipeline_schedule,v=E.ZP.pipelines.detail(i,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,x=re(re({},null===v||void 0===v?void 0:v.pipeline),{},{uuid:i}),m=E.ZP.projects.list().data,j=(0,c.useMemo)((function(){var e;return null===m||void 0===m||null===(e=m.projects)||void 0===e?void 0:e[0]}),[m]);return r?(0,J.jsx)(ee.Z,{errors:s,fetchPipelineSchedule:f,pipeline:x,pipelineSchedule:h,project:j,setErrors:o,variables:a}):(0,J.jsx)($,{errors:s,fetchPipelineSchedule:f,pipeline:x,pipelineSchedule:h,setErrors:o,variables:a})}le.getInitialProps=function(){var e=(0,r.Z)(o().mark((function e(n){var i,r,l,s,c,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.query,r=i.pipeline,l=i.slug,!Array.isArray(l)){e.next=4;break}return s=(0,t.Z)(l,2),c=s[0],u=s[1],e.abrupt("return",{pipelineScheduleId:c,pipelineUUID:r,subpath:u});case 4:return e.abrupt("return",{pipelineUUID:r});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var se=(0,ne.Z)(le)},95488:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers/[...slug]",function(){return i(36604)}])}},function(e){e.O(0,[844,2083,2851,1124,341,9161,4495,9302,8013,600,4636,8264,4666,5499,4839,5457,7055,1769,3943,6333,9774,2888,179],(function(){return n=95488,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4249],{16488:function(e,n,t){"use strict";t.d(n,{IJ:function(){return g},M8:function(){return P},Vx:function(){return j},XM:function(){return Z},_U:function(){return h},eI:function(){return x},gU:function(){return O},lO:function(){return S},ri:function(){return m},tL:function(){return y},vJ:function(){return w},xH:function(){return b}});var r,i=t(82394),o=t(92083),c=t.n(o),u=t(3917),l=t(4383),a=t(30229),d=t(42122),s=t(86735);function p(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function 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,i.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(a.U5).includes(e)};function g(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var t=n.block_uuid,r=n.completed_at,o=n.started_at,u=n.status,l=null;o&&r&&(l=c()(r).valueOf()-c()(o).valueOf());return f(f({},e),{},(0,i.Z)({},t,{runtime:l,status:u}))}),{})}var v,m=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:a.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:a.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:a.Xm.API}];return e?n.slice(0,1):n};function b(e){var n=(0,d.gR)(e,[a.gm.INTERVAL,a.gm.TYPE]),t=e[a.gm.INTERVAL];t&&(n["schedule_interval[]"]=encodeURIComponent(t));var r=e[a.gm.TYPE];return r&&(n["schedule_type[]"]=r),n}function x(e){if(!e)return null;var n=new Date(c()(e).valueOf()),t=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds());return new Date(t)}function j(e){return"string"!==typeof e?e:x(e.split("+")[0]).toISOString().split(".")[0]}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(v||(v={}));var y=(r={},(0,i.Z)(r,v.DAY,86400),(0,i.Z)(r,v.HOUR,3600),(0,i.Z)(r,v.MINUTE,60),(0,i.Z)(r,v.SECOND,1),r);function O(e){var n=v.SECOND,t=e;return e%86400===0?(t/=86400,n=v.DAY):e%3600===0?(t/=3600,n=v.HOUR):e%60===0&&(t/=60,n=v.MINUTE),{time:t,unit:n}}function w(e,n){return e*y[n]}function Z(e,n,t){var r="".concat(e.toISOString().split("T")[0]," ").concat(null===n||void 0===n?void 0:n.hour,":").concat(null===n||void 0===n?void 0:n.minute);if(null!==t&&void 0!==t&&t.includeSeconds&&(r=r.concat(":00")),null!==t&&void 0!==t&&t.localTimezone){var i=c()(e);i.set("hour",+(null===n||void 0===n?void 0:n.hour)||0),i.set("minute",+(null===n||void 0===n?void 0:n.minute)||0),i.set("second",0),r=i.format(u.lE),null!==t&&void 0!==t&&t.convertToUtc&&(r=(0,u.d$)(r,{includeSeconds:null===t||void 0===t?void 0:t.includeSeconds,utcFormat:!0}))}return r}function P(e){var n,t="";return t="".concat(window.origin,"/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)),(n=window.location.port)&&(t=t.replace(n,l.QT)),t}function I(e,n,t){return e.match(/[*,-/]/)?{additionalOffset:0,cronValue:e}:function(e,n,t){var r=t.indexOf(e),i=0;if(n<0)for(var o=0;o>n;o--)0===r?(r=t.length-1,i-=1):r-=1;else if(n>0)for(var c=0;c<n;c++)r===t.length-1?(r=0,i+=1):r+=1;return{additionalOffset:i,cronValue:String(t[r]||e)}}(+e,n,t)}var k=(0,s.m5)(60),C=(0,s.m5)(24),_=(0,u.Cs)();function S(e,n){if(!e)return e;var t=c()().local().format("Z"),r=t.split(":"),i="-"===t[0],o=3===r[0].length?Number(r[0].slice(1)):Number(r[0]),u=Number(r[1]);(i&&!n||!i&&n)&&(o=-o,u=-u);var l=e.split(" "),a=l[0],d=l[1],s=l[2],p=I(a,u,k),f=I(d,o+p.additionalOffset,C);if(l[0]=p.cronValue,l[1]=f.cronValue,0!==(null===f||void 0===f?void 0:f.additionalOffset)){var h=I(s,f.additionalOffset,_);l[2]=h.cronValue}return l.join(" ")}},81066:function(e,n,t){"use strict";t.d(n,{B:function(){return p}});var r=t(82394),i=t(46732),o=t(93369),c=t(72473),u=t(8059),l=t(70515),a=t(28598);function d(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?d(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var p={bold:!0,greyBorder:!0,paddingBottom:9,paddingTop:9};n.Z=function(e){var n=e.addButtonMenuOpen,t=e.addButtonMenuRef,r=e.isLoading,d=e.label,f=e.menuItems,h=e.onClick,g=e.onClickCallback;return(0,a.jsx)(i.Z,{disableKeyboardShortcuts:!0,items:f,onClickCallback:g,onClickOutside:g,open:n,parentRef:t,roundedStyle:!0,topOffset:1,uuid:"Table/Toolbar/NewItemMenu",children:(0,a.jsx)(o.ZP,s(s({},p),{},{background:u.eW,beforeElement:(0,a.jsx)(c.mm,{size:2.5*l.iI}),loading:r,onClick:function(e){e.preventDefault(),null===h||void 0===h||h()},uuid:"shared/AddButton/index",children:d}))})}},44265:function(e,n,t){"use strict";t.d(n,{Az:function(){return l},BF:function(){return u},Do:function(){return d},IK:function(){return c},VO:function(){return o},sZ:function(){return a}});var r,i=t(82394),o=t(41143).V,c=[o.FAILED,o.COMPLETED,o.RUNNING,o.CANCELLED,o.INITIAL],u=[o.INITIAL,o.RUNNING],l=[o.CANCELLED,o.COMPLETED,o.FAILED],a="__mage_variables",d=(r={},(0,i.Z)(r,o.CANCELLED,"Cancelled"),(0,i.Z)(r,o.COMPLETED,"Done"),(0,i.Z)(r,o.FAILED,"Failed"),(0,i.Z)(r,o.INITIAL,"Ready"),(0,i.Z)(r,o.RUNNING,"Running"),r)},46732:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=(t(82684),t(50724)),c=t(70374),u=t(28598),l=["children","items","open","onClickCallback","onClickOutside","parentRef","uuid","zIndex"];function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.items,r=e.open,a=e.onClickCallback,s=e.onClickOutside,p=e.parentRef,f=e.uuid,h=e.zIndex,g=(0,i.Z)(e,l),v=(0,u.jsxs)("div",{style:{position:"relative",zIndex:(s?3:2)+(h||0)},children:[(0,u.jsx)("div",{ref:p,children:n}),(0,u.jsx)(c.Z,d(d({},g),{},{items:t,onClickCallback:a,open:r,parentRef:p,uuid:f}))]});return s?(0,u.jsx)(o.Z,{onClickOutside:s,open:!0,children:v}):v}},65956:function(e,n,t){"use strict";var r=t(38626),i=t(55485),o=t(38276),c=t(30160),u=t(44897),l=t(42631),a=t(47041),d=t(70515),s=t(28598),p=(0,r.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*d.iI,1.5*d.iI,1.5*d.iI),f=r.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],l.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||u.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||u.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||u.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||u.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),h=r.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],l.n_,l.n_,(function(e){return"\n background-color: ".concat((e.theme.background||u.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),p,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),g=r.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*d.iI,a.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*d.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),v=r.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],l.M8,l.YF,1.75*d.iI);n.Z=function(e){var n=e.borderless,t=e.children,r=e.containerRef,u=e.contentContainerRef,l=e.dark,a=e.footer,d=e.fullHeight,p=void 0===d||d,m=e.fullWidth,b=void 0===m||m,x=e.header,j=e.headerHeight,y=e.headerIcon,O=e.headerPaddingVertical,w=e.headerTitle,Z=e.maxHeight,P=e.maxWidth,I=e.minWidth,k=e.noPadding,C=e.overflowVisible,_=e.subtitle,S=e.success;return(0,s.jsxs)(f,{borderless:n,dark:l,fullHeight:p,fullWidth:b,maxHeight:Z,maxWidth:P,minWidth:I,overflowVisible:C,ref:r,success:S,children:[(x||w)&&(0,s.jsxs)(h,{headerPaddingVertical:O,height:j,children:[x&&x,w&&(0,s.jsx)(i.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(i.ZP,{alignItems:"center",children:[y&&y,(0,s.jsx)(o.Z,{ml:y?1:0,children:(0,s.jsx)(c.ZP,{bold:!0,default:!0,children:w})})]})})]}),(0,s.jsxs)(g,{maxHeight:Z,noPadding:k,overflowVisible:C,ref:u,children:[_&&(0,s.jsx)(o.Z,{mb:2,children:(0,s.jsx)(c.ZP,{default:!0,children:_})}),t]}),a&&(0,s.jsx)(v,{children:a})]})}},35185:function(e,n,t){"use strict";var r=t(82394),i=t(91835),o=(t(82684),t(38626)),c=t(44897),u=t(42631),l=t(70515),a=t(28598);function d(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?d(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var p=o.default.div.withConfig({displayName:"ProgressBar__ProgressBarContainerStyle",componentId:"sc-10x9ojc-0"})(["border-radius:","px;height:","px;overflow:hidden;position:relative;width:100%;",""],u.BG,.75*l.iI,(function(e){return"\n background-color: ".concat((e.theme.monotone||c.Z.monotone).grey200,";\n ")})),f=o.default.div.withConfig({displayName:"ProgressBar__ProgressBarStyle",componentId:"sc-10x9ojc-1"})(["height:inherit;position:absolute;"," "," "," ",""],(function(e){return!e.danger&&"\n background-color: ".concat((e.theme.progress||c.Z.progress).positive,";\n ")}),(function(e){return e.progress&&"\n width: ".concat(e.progress,"%;\n ")}),(function(e){return e.danger&&"\n background-color: ".concat((e.theme.progress||c.Z.progress).negative,";\n ")}),(function(e){return e.animateProgress&&"\n animation: animate-progress ".concat(e.animateProgress.duration,"ms linear forwards;\n\n @keyframes animate-progress {\n 0% {\n width: ").concat(e.animateProgress.start,"%;\n }\n\n 100% {\n width: ").concat(e.animateProgress.end,"%;\n }\n }\n ")}));n.Z=function(e){var n=(0,i.Z)({},e);return(0,a.jsx)(p,s(s({},n),{},{children:(0,a.jsx)(f,s({},n))}))}},72191:function(e,n,t){"use strict";t.d(n,{_k:function(){return o},bL:function(){return i},l2:function(){return c}});var r=t(70515),i=(r.iI,2*r.iI),o=2.5*r.iI,c=3*r.iI},18213:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Ce}});var r=t(77837),i=t(75582),o=t(82394),c=t(38860),u=t.n(c),l=t(12691),a=t.n(l),d=t(82684),s=t(69864),p=t(34376),f=t(17586),h=t(15338),g=t(93369),v=t(48670),m=t(55072),b=t(75457),x=t(30229),j=t(93808),y=t(82359),O=t(71180),w=t(55485),Z=t(85854),P=t(65956),I=t(38276),k=t(75499),C=t(30160),_=t(35576),S=t(17488),E=t(69650),N=t(44897),D=t(38626),T=t(42631),R=t(70515),B=D.default.div.withConfig({displayName:"indexstyle__ToggleStyle",componentId:"sc-f9kt7n-0"})(["padding:","px ","px;border-radius:","px;",""],1.5*R.iI,2*R.iI,T.n_,(function(e){return"\n border: 1px solid ".concat((e.theme||N.Z).borders.light,";\n background-color: ").concat((e.theme||N.Z).background.popup,";\n ")})),M=t(81728),A=t(8916),H=t(28598);function V(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function L(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?V(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):V(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var F="".concat(R.iI,"px ").concat(3*R.iI,"px");var U=function(e){var n=e.initialPipelineSchedulePayload,t=e.onCancel,r=e.onSuccess,c=e.variables,u=(0,d.useState)(!1),l=u[0],a=u[1],s=(0,d.useState)({}),p=s[0],f=s[1],h=(0,d.useState)(c||{}),g=h[0],v=h[1],m=(0,d.useMemo)((function(){return L(L({},n),{},{name:(0,M.Y6)(),variables:l?(0,A.e7)(g):null})}),[n,l,g]),b=function(e,n){var t={borderless:!0,key:"variable_uuid_input_".concat(e),monospace:!0,onChange:function(n){n.preventDefault(),v((function(t){return L(L({},t),{},(0,o.Z)({},e,n.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:n};return p[e]?(0,H.jsx)(_.Z,L(L({},t),{},{rows:1,value:n})):(0,H.jsx)(S.Z,L({},t))};return(0,d.useEffect)((function(){var e=Object.entries(g).reduce((function(e,n){var t=(0,i.Z)(n,2),r=t[0],c=t[1],u=(0,M.Pb)(c)&&"object"===typeof JSON.parse(c)&&!Array.isArray(JSON.parse(c))&&null!==JSON.parse(c);return L(L({},e),{},(0,o.Z)({},r,u))}),{});f(e)}),[]),(0,H.jsxs)(P.Z,{footer:(0,H.jsxs)(w.ZP,{alignItems:"center",fullWidth:!0,justifyContent:"flex-end",children:[(0,H.jsx)(O.Z,{onClick:function(){r({pipeline_schedule:m}),t()},padding:F,primaryAlternate:!0,children:"Run now"}),(0,H.jsx)(I.Z,{mr:1}),(0,H.jsx)(O.Z,{borderColor:N.Z.background.page,onClick:t,padding:F,secondary:!0,children:"Cancel"})]}),header:(0,H.jsx)(Z.Z,{level:5,children:"Run pipeline now"}),maxHeight:"90vh",minWidth:85*R.iI,subtitle:"Creates a new trigger and immediately runs the current pipeline once.",children:[(0,H.jsx)(B,{children:(0,H.jsxs)(w.ZP,{alignItems:"center",children:[(0,H.jsx)(I.Z,{mr:2,children:(0,H.jsx)(E.Z,{checked:l,onCheck:a})}),(0,H.jsx)(C.ZP,{bold:!0,large:!0,children:"Overwrite runtime variables"})]})}),l&&g&&Object.entries(g).length>0&&(0,H.jsx)(I.Z,{mt:2,children:(0,H.jsx)(k.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(g).map((function(e){var n=(0,i.Z)(e,2),t=n[0],r=n[1];return[(0,H.jsx)(C.ZP,{default:!0,monospace:!0,children:t},"variable_".concat(t)),b(t,r)]}))})})]})},G=t(97618),W=t(72473),z=t(47041),Y=t(91437),X=D.default.div.withConfig({displayName:"indexstyle__TableStyle",componentId:"sc-pu8csx-0"})([""," overflow-y:auto;position:relative;width:100%;z-index:3;border-radius:","px;"," "," "," ",""],z.w5,T.n_,(function(e){return"\n background-color: ".concat((e.theme.background||N.Z.background).page,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.flex&&"\n flex: 1;\n "}),(function(e){return(e.noBorder||e.noBorderRadius)&&"\n border-radius: 0;\n "})),J=D.default.div.withConfig({displayName:"indexstyle__ColumnHeaderRowStyle",componentId:"sc-pu8csx-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;position:sticky;top:0;width:100%;z-index:2;"," "," ",""],T.n_,T.n_,(function(e){return"\n background-color: ".concat((e.theme.background||N.Z.background).panel,";\n ")}),(function(e){return!e.noBorder&&"\n border: 1px solid ".concat((e.theme.interactive||N.Z.interactive).defaultBorder,";\n ")}),(function(e){return(e.noBorder||e.noBorderRadius)&&"\n border-radius: 0;\n "})),Q=D.default.div.withConfig({displayName:"indexstyle__ColumnHeaderCellStyle",componentId:"sc-pu8csx-2"})([""," ",""],(function(e){return!e.small&&"\n padding: ".concat(1.5*R.iI,"px;\n ")}),(function(e){return e.small&&"\n padding: ".concat(1.5*R.iI,"px;\n ")})),q=D.default.div.withConfig({displayName:"indexstyle__RowTitleStyle",componentId:"sc-pu8csx-3"})([""," "," ",""],(function(e){return"\n background-color: ".concat((e.theme.background||N.Z.background).header,";\n border: 1px solid ").concat((e.theme.interative||N.Z.interactive).defaultBorder,";\n ")}),(function(e){return!e.small&&"\n padding: ".concat(1.5*R.iI,"px;\n ")}),(function(e){return e.small&&"\n padding: ".concat(1.5*R.iI,"px;\n ")})),K=D.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-pu8csx-4"})([""," "," "," ",""],(0,Y.eR)(),(function(e){return"\n background-color: ".concat((e.theme.background||N.Z.background).page,";\n border-top: none;\n border-bottom: none;\n ")}),(function(e){return!e.noBorder&&"\n border-bottom: 1px solid ".concat((e.theme.interactive||N.Z.interactive).defaultBorder,";\n border-left: 1px solid ").concat((e.theme.interactive||N.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||N.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.finalRow&&!e.noBorderRadius&&"\n border-bottom-left-radius: ".concat(T.n_,"px;\n border-bottom-right-radius: ").concat(T.n_,"px;\n ")})),$=D.default.div.withConfig({displayName:"indexstyle__TextStyle",componentId:"sc-pu8csx-5"})(["p{cursor:pointer;}"]),ee=D.default.div.withConfig({displayName:"indexstyle__RowCellStyle",componentId:"sc-pu8csx-6"})(["width:100%;z-index:0;"," "," "," "," ",""],(function(e){return!e.first&&"\n border-left: 1px solid ".concat((e.theme.background||N.Z.background).page,";\n ")}),(function(e){return!e.small&&"\n padding: ".concat(1.5*R.iI,"px;\n ")}),(function(e){return e.small&&"\n padding: ".concat(1.5*R.iI,"px;\n ")}),(function(e){return e.textColor&&"\n & p {\n color: ".concat(e.textColor,";\n }\n ")}),(function(e){return e.vanish&&"\n border: none;\n padding: 0 !important;\n width: 0% !important;\n height: 100% !important;\n background-color: ".concat((e.theme.background||N.Z.background).page," !important;\n ")})),ne=t(35185);var te=function(e){var n,t=e.cellIndex,r=e.danger,i=e.flex,o=e.render,c=e.rowGroupIndex,u=e.rowIndex,l=e.selected,a=e.small,s=e.showBackground,p=e.showProgress,f=e.textColor,h=e.value,g=e.vanish,m=(0,d.useState)(!1),b=m[0],x=m[1],j=Array.isArray(h);return n=o?o(h):"function"===typeof h?h({selected:l}):j?(0,H.jsxs)(G.Z,{alignItems:"start",flexDirection:"row",justifyContent:"space-between",children:[(0,H.jsxs)(C.ZP,{small:a,textOverflow:!0,title:h[0],children:[b&&(0,H.jsx)(H.Fragment,{children:"".concat(h[0]," & ").concat(h.length-1," more")}),!b&&(0,H.jsx)(H.Fragment,{children:h.map((function(e){return(0,H.jsx)("div",{children:e},e)}))})]}),(0,H.jsxs)(v.Z,{onClick:function(){return x(!b)},children:[b&&(0,H.jsx)(W.K5,{muted:!0,size:2*R.iI}),!b&&(0,H.jsx)(W.ol,{muted:!0,size:2*R.iI})]})]}):p?(0,H.jsx)(w.ZP,{alignItems:"center",fullHeight:!0,fullWidth:!0,children:(0,H.jsx)(ne.Z,{danger:h<80,progress:h})}):(0,H.jsx)(C.ZP,{bold:r,danger:r,small:a,textOverflow:!0,title:h,children:h}),(0,H.jsx)(G.Z,{flex:i,textOverflow:!0,children:(0,H.jsx)(ee,{first:0===t,showBackground:s,small:a,textColor:f,vanish:g,children:!g&&(0,H.jsxs)(H.Fragment,{children:[n," "]})})},"cell-".concat(c,"-").concat(u,"-").concat(t,"-").concat(h))};var re=function(e){var n=e.columnFlexNumbers,t=e.columnHeaders,r=e.height,i=e.isTextSelectionRequired,o=e.noBorder,c=e.noBorderRadius,u=e.onClickRow,l=e.onHoverRow,a=e.renderRowCellByIndex,s=e.rowGroupData,p=void 0===s?[]:s,f=e.selectedRowIndexes,h=e.small,g=e.flex,m=e.warnings,b=void 0===m?[]:m,x=(0,d.useMemo)((function(){return p.length}),[p]);return(0,H.jsxs)(X,{flex:g,height:r,noBorder:o,noBorderRadius:c,noScrollbarTrackBackground:!0,children:[(0,H.jsx)(J,{noBorder:o,noBorderRadius:c,children:(0,H.jsx)(w.ZP,{alignItems:"center",children:t.map((function(e,t){var r=e.Icon,i=e.label;return(0,H.jsx)(G.Z,{flex:n[t],children:(0,H.jsx)(Q,{first:0===t,small:h,children:(0,H.jsxs)(w.ZP,{alignItems:"center",children:[r&&(0,H.jsx)(W.Jr,{}),r&&(0,H.jsx)(I.Z,{mr:1}),(0,H.jsx)(C.ZP,{bold:!0,children:i})]})})},i)}))})}),p&&p.map((function(e,t){var r,d=e.title,s=e.rowData,p=d||t,g=[];d&&(r=(0,H.jsx)(q,{small:h,children:(0,H.jsx)(C.ZP,{bold:!0,children:d})}));var m=null===s||void 0===s?void 0:s.length;return null===s||void 0===s||s.forEach((function(e,r){var d=e.columnTextColors,s=e.columnValues,j=e.danger,y=e.uuid,O=(null===f||void 0===f?void 0:f[0])===t&&(null===f||void 0===f?void 0:f[1])===r,Z=[],P=b.find((function(e){return e.name===s[0]})),I=P&&(0,M.HD)(s[1])?(0,M.Tz)(s[1]):s[1],k=P&&P.compare(I,P.val);null===s||void 0===s||s.forEach((function(e,i,o){var c=null===a||void 0===a?void 0:a[i],u=d?d[i]:void 0;Array.isArray(e)?Z.push((0,H.jsx)(te,{cellIndex:i,flex:n[i],render:c,rowGroupIndex:t,rowIndex:r,selected:O,showBackground:r%2===1,showProgress:e[0],small:h,textColor:u,value:e[1]},i)):"undefined"===typeof e?(Z.pop(),i=o.length+1,Z.push((0,H.jsx)(te,{cellIndex:i,danger:j,flex:n[i],render:c,rowGroupIndex:t,rowIndex:r,selected:O,showBackground:r%2===1,small:h,textColor:u,value:e,vanish:!0},i))):Z.push((0,H.jsx)(te,{cellIndex:i,danger:k||j,flex:n[i],render:c,rowGroupIndex:t,rowIndex:r,selected:O,showBackground:r%2===1,small:h,textColor:u,value:e},i))}));var C=(0,H.jsx)(w.ZP,{textOverflow:!0,children:Z});g.push((0,H.jsxs)(K,{finalRow:x-1===t&&m-1===r,hasHover:!!l,noBorder:o,noBorderRadius:c,onMouseEnter:function(){return null===l||void 0===l?void 0:l({rowGroupIndex:t,rowIndex:r,uuid:y})},selected:O,children:[u&&(i?(0,H.jsx)($,{onClick:function(){return u({rowGroupIndex:t,rowIndex:r,uuid:y})},role:"cell",children:C}):(0,H.jsx)(v.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,onClick:function(){return u({rowGroupIndex:t,rowIndex:r,uuid:y})},preventDefault:!0,children:C})),!u&&C]},"row-group-".concat(p,"-row-").concat(r)))})),(0,H.jsxs)("div",{children:[r,g]},p)}))]})},ie=D.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1xgfh62-0"})(["display:flex;flex-direction:column;height:","px;border-bottom:1px solid ",";"],(function(e){return e.height}),N.Z.borders.medium),oe=t(79633);var ce=function(e){var n=e.height,t=e.scheduleType,r=e.variables,o=e.variablesOverride,c=[];Object.entries(r).forEach((function(e){var n=(0,i.Z)(e,2),t=n[0],r=n[1],u=null===o||void 0===o?void 0:o[t];c.push({uuid:t,value:(0,A.FS)(u||r)})})),(0,A.JZ)(c,t);var u=Object.keys(r).length;return(0,H.jsx)(ie,{height:n,children:r&&(0,H.jsx)(re,{columnFlexNumbers:[1,1],columnHeaders:[{label:"Runtime variable (".concat(u,")")},{label:"Value"}],noBorderRadius:!0,rowGroupData:[{rowData:c.map((function(e){var n=e.uuid,t=e.value;return{columnTextColors:[oe.Or,void 0],columnValues:[n,t],uuid:n}}))}],small:!0})})},ue=t(4190),le=t(12717),ae=t(85544),de=t(31743),se=t(35686),pe=t(83784),fe=t(28795),he=t(81066),ge=t(24944),ve=t(3917),me=t(69419),be=t(16488),xe=t(86735),je=t(42122),ye=t(50178),Oe=t(72619),we=t(70320),Ze=t(89538);function Pe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Ie(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Pe(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Pe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function ke(e){var n=e.pipeline,t=(0,p.useRouter)(),r=(0,ye.Ct)(),c=n.uuid,u=(0,d.useState)(null),l=u[0],j=u[1],O=(0,d.useState)(!1),w=O[0],Z=O[1],P=se.ZP.projects.list().data,k=(0,d.useMemo)((function(){var e;return null===P||void 0===P||null===(e=P.projects)||void 0===e?void 0:e[0]}),[P]),_=((0,d.useMemo)((function(){var e;return(0,we.h)(null===k||void 0===k||null===(e=k.features)||void 0===e?void 0:e[y.d.LOCAL_TIMEZONE])}),[null===k||void 0===k?void 0:k.features]),se.ZP.client_pages.detail("pipeline_schedule:create",{"pipelines[]":[c]},{},{key:"Triggers/Edit/".concat(c)}).data),S=(0,d.useMemo)((function(){return null===_||void 0===_?void 0:_.client_page}),[_]),E=(0,d.useMemo)((function(){var e,n;return null===S||void 0===S||null===(e=S.components)||void 0===e||null===(n=e.find((function(e){return"create_with_interactions_component"===e.uuid})))||void 0===n?void 0:n.enabled}),[S]),N=(0,d.useMemo)((function(){return null===S||void 0===S?void 0:S.disabled}),[S]),D=se.ZP.variables.pipelines.list(c,{global_only:!0},{revalidateOnFocus:!1}).data,T=null===D||void 0===D?void 0:D.variables,B=(0,me.iV)(),V=(0,me.DQ)(B,[x.gm.INTERVAL,x.gm.STATUS,x.gm.TAG,x.gm.TYPE]),L=(0,be.xH)(V),F=null!==B&&void 0!==B&&B.page?B.page:0,G=se.ZP.pipeline_schedules.pipelines.list(c,Ie(Ie({},L),{},{_limit:m.Q,_offset:(null!==B&&void 0!==B&&B.page?B.page:0)*m.Q}),{refreshInterval:7500}),z=G.data,Y=G.mutate,X=(0,d.useMemo)((function(){return(null===z||void 0===z?void 0:z.pipeline_schedules)||[]}),[z]),J=function(e){return(0,s.Db)(se.ZP.pipeline_schedules.pipelines.useCreate(c),{onSuccess:function(n){return(0,Oe.wD)(n,{callback:function(n){var t=n.pipeline_schedule.id;null===e||void 0===e||e(t)},onErrorCallback:function(e,n){return j({errors:n,response:e})}})}})},Q=J((function(e){return t.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(null===n||void 0===n?void 0:n.uuid,"/triggers/").concat(e,"/edit"))})),q=(0,i.Z)(Q,2),K=q[0],$=q[1].isLoading,ee=J(Y),ne=(0,i.Z)(ee,2),te=ne[0],re=ne[1].isLoading,ie=(0,d.useMemo)((function(){var e;return null===(e=(0,A.wx)(T,(function(e){return e.uuid===pe.C})))||void 0===e?void 0:e.reduce((function(e,n){var t=n.uuid,r=n.value;return Ie(Ie({},e),{},(0,o.Z)({},t,r))}),{})}),[T]),oe=(0,M.Y6)(),Pe=(0,d.useMemo)((function(){return{name:oe,schedule_interval:x.U5.ONCE,schedule_type:x.Xm.TIME,start_time:(0,ve.d$)((new Date).toISOString(),{dayAgo:!0,utcFormat:!0}),status:x.fq.ACTIVE}}),[oe]),ke=(0,Ze.dd)((function(){return(0,H.jsx)(U,{initialPipelineSchedulePayload:Pe,onCancel:Se,onSuccess:te,variables:ie})}),{},[T,ie],{background:!0,uuid:"run_pipeline_now_popup"}),Ce=(0,i.Z)(ke,2),_e=Ce[0],Se=Ce[1],Ee=(0,d.useState)(),Ne=Ee[0],De=Ee[1],Te=(0,d.useMemo)((function(){var e=null===Ne||void 0===Ne?void 0:Ne.variables,n=!(0,je.Qr)(ie);return function(t){var i=80;if(n){var o=Object.keys(ie).length;i=46+43*Math.min(5,o)+1}var u=t.height-i;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(f.Z,Ie(Ie({},t),{},{height:u,noStatus:!0})),n&&(0,H.jsx)(ce,{height:i,scheduleType:null===Ne||void 0===Ne?void 0:Ne.schedule_type,variables:ie,variablesOverride:e}),!n&&(0,H.jsxs)(I.Z,{p:R.cd,children:[(0,H.jsx)(C.ZP,{children:"This pipeline has no runtime variables."}),!r&&(0,H.jsxs)(I.Z,{mt:1,children:[(0,H.jsx)(a(),{as:"/pipelines/".concat(c,"/edit?sideview=variables"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,H.jsx)(v.Z,{primary:!0,children:"Click here"})})," ",(0,H.jsx)(C.ZP,{inline:!0,children:"to add variables to this pipeline."})]})]})]})}}),[r,c,null===Ne||void 0===Ne?void 0:Ne.schedule_type,null===Ne||void 0===Ne?void 0:Ne.variables,ie]),Re=(0,d.useMemo)((function(){var e;return(null===z||void 0===z||null===(e=z.metadata)||void 0===e?void 0:e.count)||[]}),[z]),Be=se.ZP.pipeline_triggers.pipelines.list(c).data,Me=(0,d.useMemo)((function(){return(0,xe.HK)((null===Be||void 0===Be?void 0:Be.pipeline_triggers)||[],(function(e){return e.name}))}),[Be]),Ae=se.ZP.tags.list().data,He=(0,d.useMemo)((function(){return(0,xe.YC)((null===Ae||void 0===Ae?void 0:Ae.tags)||[],(function(e){return e.uuid}))}),[Ae]),Ve=se.ZP.pipeline_interactions.detail(E&&c,{filter_for_permissions:1}),Le=Ve.data,Fe=(Ve.mutate,se.ZP.interactions.pipeline_interactions.list(E&&c)),Ue=Fe.data,Ge=(Fe.mutate,se.ZP.pipelines.detail(E&&c).data),We=(0,d.useMemo)((function(){return(null===Le||void 0===Le?void 0:Le.pipeline_interaction)||{}}),[Le]),ze=((0,d.useMemo)((function(){return(null===Ue||void 0===Ue?void 0:Ue.interactions)||[]}),[Ue]),(0,d.useMemo)((function(){var e;return E&&(null===(e=Object.keys((null===We||void 0===We?void 0:We.blocks)||{}))||void 0===e?void 0:e.length)>=1}),[E,We])),Ye=(0,d.useMemo)((function(){return ze&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(I.Z,{ml:"12px"}),(0,H.jsx)(ge.lZ,{}),(0,H.jsx)(I.Z,{ml:"12px"}),(0,H.jsx)(g.ZP,Ie(Ie({},he.B),{},{Icon:W.yd,inline:!0,onClick:function(){return Z(!0)},uuid:"Create trigger with no-code",children:"Create trigger with no-code"}))]})}),[ze,Z]),Xe=(0,d.useMemo)((function(){return(0,H.jsx)(ae.Z,{addButtonProps:!N&&{isLoading:$,label:"New trigger",onClick:function(){return K({pipeline_schedule:{name:(0,M.Y6)()}})}},filterOptions:{frequency:Object.values(x.U5),status:Object.values(x.fq),tag:He.map((function(e){return e.uuid})),type:Object.values(x.Xm)},filterValueLabelMapping:{tag:He.reduce((function(e,n){var t=n.uuid;return Ie(Ie({},e),{},(0,o.Z)({},t,t))}),{}),type:x.Z4},onClickFilterDefaults:function(){t.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(c,"/triggers"))},query:V,secondaryButtonProps:!N&&{disabled:r,isLoading:re,label:"Run @once",onClick:(0,je.Qr)(ie)?function(){return te({pipeline_schedule:Pe})}:_e,tooltip:"Creates an @once trigger and runs pipeline immediately"},showDivider:!N,children:Ye})}),[K,te,N,$,re,r,Ye,Pe,c,V,t,_e,He,ie]),Je=(0,d.useMemo)((function(){var e=[];return w?e.push.apply(e,[{label:function(){return"Triggers"},onClick:function(){return Z(!1)}},{bold:!0,label:function(){return"New trigger"}}]):e.push({label:function(){return"Triggers"}}),e}),[w,Z]);return w?(0,H.jsx)(le.Z,{creatingWithLimitation:!0,errors:l,onCancel:function(){return Z(!1)},pipeline:null===Ge||void 0===Ge?void 0:Ge.pipeline,project:k,setErrors:j,useCreateScheduleMutation:J}):(0,H.jsx)(b.Z,{breadcrumbs:Je,buildSidekick:!w&&Te,errors:l,pageName:fe.M.TRIGGERS,pipeline:n,setErrors:j,subheader:!w&&Xe,title:function(e){var n=e.name;return"".concat(n," triggers")},uuid:"".concat(fe.M.TRIGGERS,"_").concat(c),children:!w&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(h.Z,{light:!0}),z?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(de.Z,{fetchPipelineSchedules:Y,pipeline:n,pipelineSchedules:X,pipelineTriggersByName:Me,selectedSchedule:Ne,setErrors:j,setSelectedSchedule:De}),(0,H.jsx)(I.Z,{p:2,children:(0,H.jsx)(m.ZP,{maxPages:9,onUpdate:function(e){var n=Number(e),r=Ie(Ie({},B),{},{page:n>=0?n:0});t.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(c,"/triggers?").concat((0,me.uM)(r)))},page:Number(F),totalPages:Math.ceil(Re/m.Q)})})]}):(0,H.jsx)(I.Z,{m:2,children:(0,H.jsx)(ue.Z,{inverted:!0})})]})})}ke.getInitialProps=function(){var e=(0,r.Z)(u().mark((function e(n){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var Ce=(0,j.Z)(ke)},40183:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers",function(){return t(18213)}])}},function(e){e.O(0,[844,2083,2851,1124,341,9161,4495,9302,8013,600,4636,8264,4666,5499,4839,5457,7055,1769,1743,6333,3951,9774,2888,179],(function(){return n=40183,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1221],{8666:function(e,n,i){"use strict";var t;i.d(n,{b:function(){return t}}),function(e){e.BLOCK="block",e.PIPELINE="pipeline"}(t||(t={}))},31882:function(e,n,i){"use strict";var t=i(38626),o=i(71180),u=i(55485),r=i(30160),l=i(44897),c=i(72473),s=i(70515),d=i(61896),a=i(28598),p=t.default.div.withConfig({displayName:"Chip__ChipStyle",componentId:"sc-1ok73g-0"})(["display:inline-block;"," "," "," "," "," ",""],(function(e){return!e.primary&&"\n background-color: ".concat((e.theme.background||l.Z.background).tag,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.chart||l.Z.chart).primary,";\n ")}),(function(e){return!e.small&&"\n border-radius: ".concat((s.iI+d.Al)/2,"px;\n height: ").concat(1.5*s.iI+d.Al,"px;\n padding: ").concat(s.iI/1.5,"px ").concat(1.25*s.iI,"px;\n ")}),(function(e){return e.small&&"\n border-radius: ".concat((s.iI/2+d.Al)/2,"px;\n height: ").concat(d.Al+s.iI/2+2,"px;\n padding: ").concat(s.iI/4,"px ").concat(s.iI,"px;\n ")}),(function(e){return e.xsmall&&"\n border-radius: ".concat((s.iI/1+d.Al)/1,"px;\n height: ").concat(20,"px;\n padding: 4px 6px;\n ")}),(function(e){return e.border&&"\n border: 1px solid ".concat((e.theme.content||l.Z.content).muted,";\n ")}));n.Z=function(e){var n=e.border,i=e.children,t=e.disabled,l=e.label,d=e.monospace,f=e.onClick,v=e.primary,h=e.small,m=e.xsmall;return(0,a.jsx)(p,{border:n,primary:v,small:h,xsmall:m,children:(0,a.jsx)(o.Z,{basic:!0,disabled:t,noBackground:!0,noPadding:!0,onClick:f,transparent:!0,children:(0,a.jsxs)(u.ZP,{alignItems:"center",children:[i,l&&(0,a.jsx)(r.ZP,{monospace:d,small:h,xsmall:m,children:l}),!t&&f&&(0,a.jsx)("div",{style:{marginLeft:2}}),!t&&f&&(0,a.jsx)(c.x8,{default:v,muted:!v,size:h?s.iI:1.25*s.iI})]})})})}},55620:function(e,n,i){"use strict";i.r(n),i.d(n,{default:function(){return Ie}});var t=i(77837),o=i(75582),u=i(82394),r=i(38860),l=i.n(r),c=i(12691),s=i.n(c),d=i(82684),a=i(69864),p=i(34376),f=i(52749),v=i(60523),h=i(71180),m=i(90299),g=i(31882),b=i(94629),x=i(97618),j=i(55485),Z=i(85854),C=i(93369),_=i(65956),w=i(38276),k=i(30160),y=i(35576),I=i(17488),P=i(28598);var T=function(e){var n=e.description,i=e.isLoading,t=e.maxWidth,o=e.minWidth,u=e.noEmptyValue,r=e.onClose,l=e.onSave,c=e.textArea,s=e.title,a=e.value,p=(0,d.useRef)(null),f=(0,d.useState)(a),v=f[0],m=f[1],g=c?y.Z:I.Z;return(0,d.useEffect)((function(){var e;null===p||void 0===p||null===(e=p.current)||void 0===e||e.focus()}),[]),(0,P.jsxs)(_.Z,{maxWidth:t,minWidth:o,children:[(0,P.jsx)(k.ZP,{bold:!0,children:s}),(0,P.jsx)(w.Z,{mt:1,children:(0,P.jsx)(g,{monospace:!0,onChange:function(e){return m(e.target.value)},ref:p,rows:c?7:null,value:v})}),n&&(0,P.jsx)(w.Z,{mt:2,children:(0,P.jsx)(k.ZP,{muted:!0,small:!0,children:n})}),(0,P.jsx)(w.Z,{mt:3,children:(0,P.jsxs)(j.ZP,{children:[(0,P.jsx)(C.ZP,{bold:!0,inline:!0,loading:i,onClick:function(){v===a||u&&!v?r():l(v)},outline:!0,primary:!0,uuid:"Inputs/InputModal/SaveInput",children:"Save"}),(0,P.jsx)(w.Z,{ml:1}),(0,P.jsx)(h.Z,{onClick:r,children:"Cancel"})]})})]})},S=i(48670),A=i(57653),E=i(55729),O=i(93808),M=i(82359),R=i(4190),D=i(75499),G=i(48381),L=i(69650),N=i(85544),B=i(35686),U=i(44897),H=i(42631),Y=i(44425),z=i(72473),V=i(23780),W=i(8666),$=i(46684),q=i(53808),K="pipeline_list_filters",Q="pipeline_list_group_bys",F="pipeline_list_sort_column_index",X="pipeline_list_sort_direction",J="pipeline_list_selected_tab_uuid";function ee(e){return(0,q.t8)(K,e),e}function ne(e){return(0,q.t8)(Q,e),e}var ie=i(32929),te=i(44898),oe=i(70515),ue=i(30229),re=i(81655),le=i(31608),ce=i(81728),se=i(3917),de=i(72619),ae=i(69419),pe=i(65458),fe=i(15610),ve=i(86735),he=i(42122),me=i(3314),ge=i(70320),be=i(89538);function xe(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function je(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?xe(Object(i),!0).forEach((function(n){(0,u.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):xe(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var Ze={Icon:z.Pf,label:function(){return"Recently viewed"},uuid:"recent"},Ce={Icon:z.vd,label:function(){return"All pipelines"},uuid:"all"},_e=[Ce,Ze],we="tab",ke={borderRadius:H.BG,iconOnly:!0,noBackground:!0,noBorder:!0,outline:!0,padding:"4px"};function ye(){var e,n=(0,p.useRouter)(),i=(0,d.useRef)(null),t=(0,d.useRef)(null),r=(0,d.useState)(null),l=r[0],c=r[1],C=(0,d.useState)(null),y=C[0],I=C[1],O=(0,d.useState)(null),H=O[0],xe=O[1],ye=(0,d.useState)(null),Ie=ye[0],Pe=ye[1],Te=(0,d.useState)(null),Se=Te[0],Ae=Te[1],Ee=(0,d.useState)({}),Oe=Ee[0],Me=Ee[1],Re=(0,d.useState)(null),De=Re[0],Ge=Re[1],Le=(0,ae.iV)(),Ne=(0,ae.DQ)(Le,[A.$1.STATUS,A.$1.TAG,A.$1.TYPE]);(0,d.useEffect)((function(){var e;c(null===i||void 0===i||null===(e=i.current)||void 0===e?void 0:e.getBoundingClientRect().height)}),[Le,i]);var Be=B.ZP.projects.list(),Ue=Be.data,He=Be.mutate,Ye=(0,d.useMemo)((function(){var e;return null===Ue||void 0===Ue||null===(e=Ue.projects)||void 0===e?void 0:e[0]}),[Ue]),ze=(0,d.useMemo)((function(){var e;return(0,ge.h)(null===Ye||void 0===Ye||null===(e=Ye.features)||void 0===e?void 0:e[M.d.LOCAL_TIMEZONE])}),[null===Ye||void 0===Ye?void 0:Ye.features]),Ve=(0,d.useMemo)((function(){var e;return null===Ye||void 0===Ye||null===(e=Ye.features)||void 0===e?void 0:e[M.d.OPERATION_HISTORY]}),[Ye]),We=(0,d.useMemo)((function(){return ze?re.O$:{}}),[ze]),$e=B.ZP.pipelines.list(je(je({},Ne),{},{include_schedules:1})),qe=$e.data,Ke=$e.mutate,Qe=(0,d.useMemo)((function(){return(null===Le||void 0===Le?void 0:Le[A.$1.HISTORY_DAYS])||7}),[Le]),Fe=B.ZP.pipelines.list(je(je({},Ne),{},(e={},(0,u.Z)(e,A.$1.HISTORY_DAYS,(0,ce.HW)(Qe)?Number(Qe):Qe),(0,u.Z)(e,"include_schedules",1),e)),{},{pauseFetch:!Ve}),Xe=Fe.data,Je=Fe.mutate,en=(0,d.useCallback)((function(e){var n=e||[];if(Se){var i=Se.toLowerCase();n=n.filter((function(e){var n=e.name,t=e.description,o=e.uuid;return(null===n||void 0===n?void 0:n.toLowerCase().includes(i))||(null===o||void 0===o?void 0:o.toLowerCase().includes(i))||(null===t||void 0===t?void 0:t.toLowerCase().includes(i))}))}return n}),[Se]),nn=(0,d.useMemo)((function(){return en((null===qe||void 0===qe?void 0:qe.pipelines)||[])}),[qe,en]),tn=(0,d.useMemo)((function(){return en((null===Xe||void 0===Xe?void 0:Xe.pipelines)||[])}),[Xe,en]),on=(0,d.useMemo)((function(){return(0,ve.HK)(nn,(function(e){return e.uuid}))}),[nn]),un=(0,d.useMemo)((function(){return(0,ve.HK)(tn,(function(e){return e.uuid}))}),[tn]),rn=(0,d.useCallback)((function(e){var n,i,t,o;return null===e||void 0===e||null===(n=e[2])||void 0===n||null===(i=n.props)||void 0===i||null===(t=i.children)||void 0===t||null===(o=t.props)||void 0===o?void 0:o.children}),[]),ln=(0,d.useMemo)((function(){return(null===H||void 0===H?void 0:H.length)>0?null===H||void 0===H?void 0:H.map((function(e){var n=rn(e);return null===on||void 0===on?void 0:on[n]})):nn}),[rn,H,nn,on]),cn=(0,d.useMemo)((function(){return(null===Ie||void 0===Ie?void 0:Ie.length)>0?null===Ie||void 0===Ie?void 0:Ie.map((function(e){var n=rn(e);return null===un||void 0===un?void 0:un[n]})):tn}),[rn,Ie,tn,un]),sn=(0,d.useMemo)((function(){return[1,2,3,4,5,6,8,9]}),[]),dn=null===Le||void 0===Le?void 0:Le[re.lG.SORT_COL_IDX],an=null===Le||void 0===Le?void 0:Le[re.lG.SORT_DIRECTION],pn=(0,d.useMemo)((function(){return dn?{columnIndex:+dn,sortDirection:an||re.sh.ASC}:void 0}),[dn,an]),fn=null===Le||void 0===Le?void 0:Le[A.$1.GROUP],vn=(0,d.useMemo)((function(){return null===Le||void 0===Le?void 0:Le.tab}),[Le]);(0,d.useEffect)((function(){var e,n={};if(dn&&sn.includes(+dn))(0,q.t8)(F,dn),an&&(0,q.t8)(X,an);else{var i=(0,q.U2)(F,null),t=(0,q.U2)(X,re.sh.ASC);null!==i&&(n[re.lG.SORT_COL_IDX]=i,n[re.lG.SORT_DIRECTION]=t)}Ve&&(vn?(0,q.t8)(J,vn):n.tab=(0,q.U2)(J,null===_e||void 0===_e||null===(e=_e[0])||void 0===e?void 0:e.uuid));if(fn)ne((0,u.Z)({},fn,!0));else{var r,l=(0,q.U2)(Q,{});l&&Object.entries(l).forEach((function(e){var n=(0,o.Z)(e,2),i=n[0],t=n[1];!r&&t&&(r=i)})),r&&(n[A.$1.GROUP]=r)}if((0,he.Qr)(Ne)){var c={},s=(0,q.U2)(K,{});s&&Object.entries(s).forEach((function(e){var n=(0,o.Z)(e,2),i=n[0],t=n[1];c[i]=[],Object.entries(t).forEach((function(e){var n=(0,o.Z)(e,2),t=n[0];n[1]&&c[i].push(t)}))})),(0,he.Qr)(c)||(n=je(je({},n),c))}else{var d={};Object.entries(Ne).forEach((function(e){var n=(0,o.Z)(e,2),i=n[0],t=n[1];d[i]={};var u,r=t;(Array.isArray(r)||(r=[r]),r&&Array.isArray(r))&&(null===(u=r)||void 0===u||u.forEach((function(e){d[i][e]=!0})))})),ee(d)}(0,he.Qr)(n)||(0,fe.u7)(n,{pushHistory:!1})}),[fn,Ve,Ne,vn,sn,dn,an]),(0,d.useEffect)((function(){(0,de.bB)(qe,Ge)}),[qe]);var hn=function(e){return(0,a.Db)(B.ZP.pipelines.useCreate(),{onSuccess:function(n){return(0,de.wD)(n,{callback:function(n){var i=n.pipeline.uuid;null===e||void 0===e||e(i)},onErrorCallback:function(e,n){return Ge({errors:n,response:e})}})}})},mn=hn((function(e){return n.push("/pipelines/[pipeline]/edit","/pipelines/".concat(e,"/edit"))})),gn=(0,o.Z)(mn,2),bn=gn[0],xn=gn[1].isLoading,jn=hn((function(){null===Ke||void 0===Ke||Ke(),null===Je||void 0===Je||Je()})),Zn=(0,o.Z)(jn,2),Cn=Zn[0],_n=Zn[1].isLoading,wn=(0,a.Db)((function(e){return B.ZP.pipelines.useUpdate(e.uuid)({pipeline:e})}),{onSuccess:function(e){return(0,de.wD)(e,{callback:function(e){var n=e.pipeline.uuid;Me((function(e){return je(je({},e),{},(0,u.Z)({},n,!1))})),Ke(),null===Je||void 0===Je||Je(),null===Rn||void 0===Rn||Rn(),I(null)},onErrorCallback:function(e,n){var i,t=null===e||void 0===e||null===(i=e.url_parameters)||void 0===i?void 0:i.pk;Me((function(e){return je(je({},e),{},(0,u.Z)({},t,!1))})),Ge({errors:n,response:e})}})}}),kn=(0,o.Z)(wn,2),yn=kn[0],In=kn[1].isLoading,Pn=(0,a.Db)((function(e){return B.ZP.pipelines.useDelete(e)()}),{onSuccess:function(e){return(0,de.wD)(e,{callback:function(){null===Ke||void 0===Ke||Ke(),null===Je||void 0===Je||Je()},onErrorCallback:function(e,n){return Ge({errors:n,response:e})}})}}),Tn=(0,o.Z)(Pn,2),Sn=Tn[0],An=Tn[1].isLoading,En=(0,be.dd)((function(e){var n=e.pipeline,i=e.pipelineDescription,t=e.pipelineName;return(0,P.jsx)(T,{isLoading:In,minWidth:55*oe.iI,noEmptyValue:!!t,onClose:Rn,onSave:function(e){var i=n||y;if(i){var o=i.uuid,r={uuid:o};t?r.name=e:r.description=e,Me((function(e){return je(je({},e),{},(0,u.Z)({},o,!0))})),yn(r)}},textArea:!t,title:t?"Rename pipeline":"Edit description for ".concat(null===n||void 0===n?void 0:n.uuid),value:t||i})}),{},[In,y],{background:!0,uuid:"rename_pipeline_and_save"}),On=(0,o.Z)(En,2),Mn=On[0],Rn=On[1],Dn=(0,be.dd)((function(){return(0,P.jsx)(V.BC,{children:(0,P.jsx)(v.Z,{contained:!0,onClickCustomTemplate:function(e){bn({pipeline:{custom_template_uuid:null===e||void 0===e?void 0:e.template_uuid,name:(0,ce.Y6)()}}).then((function(){Nn()}))},showBreadcrumbs:!0,tabs:[ie.A2]})})}),{},[bn],{background:!0,uuid:"browse_templates"}),Gn=(0,o.Z)(Dn,2),Ln=Gn[0],Nn=Gn[1],Bn=(0,be.dd)((function(e){var n=e.cancelButtonText,i=(e.header,e.onCancel),t=e.onSaveSuccess;return(0,P.jsx)(V.BC,{children:(0,P.jsx)(E.Z,{cancelButtonText:n,contained:!0,header:(0,P.jsx)(w.Z,{mb:oe.HN,children:(0,P.jsxs)(_.Z,{children:[(0,P.jsx)(k.ZP,{warning:!0,children:"You need to add an OpenAI API key to your project before you can generate pipelines using AI."}),(0,P.jsx)(w.Z,{mt:1,children:(0,P.jsxs)(k.ZP,{warning:!0,children:["Read ",(0,P.jsx)(S.Z,{href:"https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key",openNewWindow:!0,children:"OpenAI\u2019s documentation"})," to get your API key."]})})]})}),onCancel:function(){null===i||void 0===i||i(),Yn()},onSaveSuccess:function(e){He(),Yn(),null===t||void 0===t||t(e)}})})}),{},[He],{background:!0,uuid:"configure_project"}),Un=(0,o.Z)(Bn,2),Hn=Un[0],Yn=Un[1],zn=(0,be.dd)((function(){return(0,P.jsx)(V.BC,{children:(0,P.jsx)(f.Z,{createPipeline:bn,isLoading:xn,onClose:$n})})}),{},[bn,xn],{background:!0,disableClickOutside:!0,disableCloseButton:!0,uuid:"AI_modal"}),Vn=(0,o.Z)(zn,2),Wn=Vn[0],$n=Vn[1],qn=(0,d.useMemo)((function(){return(0,pe.d)(bn,{showAIModal:function(){null!==Ye&&void 0!==Ye&&Ye.openai_api_key?Wn():Hn({onSaveSuccess:function(){Wn()}})},showBrowseTemplates:Ln})}),[bn,Ye,Wn,Ln,Hn]),Kn=B.ZP.tags.list().data,Qn=(0,d.useMemo)((function(){return(0,ve.YC)((null===Kn||void 0===Kn?void 0:Kn.tags)||[],(function(e){return e.uuid}))}),[Kn]),Fn=(0,d.useMemo)((function(){return(0,P.jsx)(N.Z,{addButtonProps:{isLoading:xn,label:"New",menuItems:qn},deleteRowProps:{confirmationMessage:"This is irreversible and will immediately delete everything associated with the pipeline, including its blocks, triggers, runs, logs, and history.",isLoading:An,item:"pipeline",onDelete:function(){window.confirm("Are you sure you want to delete pipeline ".concat(null===y||void 0===y?void 0:y.uuid,"?"))&&Sn(null===y||void 0===y?void 0:y.uuid)}},extraActionButtonProps:{Icon:z.oX,confirmationDescription:"Cloning the selected pipeline will create a new pipeline with the same configuration and code blocks. The blocks use the same block files as the original pipeline. Pipeline triggers, runs, backfills, and logs are not copied over to the new pipeline.",confirmationMessage:"Do you want to clone the pipeline ".concat(null===y||void 0===y?void 0:y.uuid,"?"),isLoading:_n,onClick:function(){return Cn({pipeline:{clone_pipeline_uuid:null===y||void 0===y?void 0:y.uuid}})},openConfirmationDialogue:!0,tooltip:"Clone pipeline"},filterOptions:{status:A.kA,tag:Qn.map((function(e){return e.uuid})),type:Object.values(A.qL)},filterValueLabelMapping:{tag:Qn.reduce((function(e,n){var i=n.uuid;return je(je({},e),{},(0,u.Z)({},i,i))}),{}),type:A.G7},groupButtonProps:{groupByLabel:fn,menuItems:[{beforeIcon:fn===A.r0.STATUS?(0,P.jsx)(z.Jr,{fill:U.Z.content.default,size:1.5*oe.iI}):(0,P.jsx)(z.Cd,{muted:!0,size:1.5*oe.iI}),label:function(){return(0,ce.kC)(A.r0.STATUS)},onClick:function(){var e=fn===A.r0.STATUS?null:A.r0.STATUS;e||ne({}),(0,fe.u7)((0,u.Z)({},A.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Status"},{beforeIcon:fn===A.r0.TAG?(0,P.jsx)(z.Jr,{fill:U.Z.content.default,size:1.5*oe.iI}):(0,P.jsx)(z.Cd,{muted:!0,size:1.5*oe.iI}),label:function(){return(0,ce.kC)(A.r0.TAG)},onClick:function(){var e=fn===A.r0.TAG?null:A.r0.TAG;e||ne({}),(0,fe.u7)((0,u.Z)({},A.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Tag"},{beforeIcon:fn===A.r0.TYPE?(0,P.jsx)(z.Jr,{fill:U.Z.content.default,size:1.5*oe.iI}):(0,P.jsx)(z.Cd,{muted:!0,size:1.5*oe.iI}),label:function(){return(0,ce.kC)(A.r0.TYPE)},onClick:function(){var e=fn===A.r0.TYPE?null:A.r0.TYPE;e||ne({}),(0,fe.u7)((0,u.Z)({},A.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Type"}]},moreActionsMenuItems:[{label:function(){return"Rename pipeline"},onClick:function(){return Mn({pipelineName:null===y||void 0===y?void 0:y.name})},uuid:"Pipelines/MoreActionsMenu/Rename"},{label:function(){return"Edit description"},onClick:function(){return Mn({pipeline:y,pipelineDescription:null===y||void 0===y?void 0:y.description})},uuid:"Pipelines/MoreActionsMenu/EditDescription"}],onClickFilterDefaults:function(){ee({}),n.push("/pipelines")},onFilterApply:function(e,n){Object.values(n).every((function(e){return!(null!==e&&void 0!==e&&e.length)}))&&ee({})},query:Ne,searchProps:{onChange:Ae,value:Se},selectedRowId:null===y||void 0===y?void 0:y.uuid,setSelectedRow:I})}),[Cn,Sn,fn,_n,xn,An,qn,Ne,n,Se,y,Mn,Qn]),Xn=(0,V.VI)(null,{},[],{uuid:"pipelines/list"}),Jn=(0,o.Z)(Xn,1)[0],ei=(0,a.Db)(B.ZP.projects.useUpdate(null===Ye||void 0===Ye?void 0:Ye.name),{onSuccess:function(e){return(0,de.wD)(e,{callback:function(){He()},onErrorCallback:function(e,n){return Jn({errors:n,response:e})}})}}),ni=(0,o.Z)(ei,2),ii=ni[0],ti=ni[1].isLoading,oi=(0,d.useCallback)((function(e){return ii({project:e})}),[ii]),ui=(0,be.dd)((function(){return(0,P.jsxs)(_.Z,{maxWidth:60*oe.iI,children:[(0,P.jsx)(w.Z,{mb:1,children:(0,P.jsx)(Z.Z,{children:"Help improve Mage"})}),(0,P.jsx)(w.Z,{mb:oe.cd,children:(0,P.jsx)(k.ZP,{default:!0,children:"Please contribute usage statistics to help improve the developer experience for you and everyone in the community \ud83e\udd1d."})}),(0,P.jsx)(w.Z,{mb:oe.cd,children:(0,P.jsx)(_.Z,{success:!0,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsx)(z.Yo,{size:5*oe.iI,success:!0}),(0,P.jsx)(w.Z,{mr:1}),(0,P.jsx)(x.Z,{children:(0,P.jsx)(k.ZP,{children:"All usage statistics are completely anonymous. It\u2019s impossible for Mage to know which statistics belongs to whom."})})]})})}),(0,P.jsx)(w.Z,{mb:oe.cd,children:(0,P.jsxs)(k.ZP,{default:!0,children:["By opting into sending usage statistics to ",(0,P.jsx)(S.Z,{href:"https://www.mage.ai",openNewWindow:!0,children:"Mage"}),", it\u2019ll help the team and community of contributors (",(0,P.jsx)(S.Z,{href:"https://www.mage.ai/chat",openNewWindow:!0,children:"Magers"}),") learn what\u2019s going wrong with the tool and what improvements can be made."]})}),(0,P.jsx)(w.Z,{mb:oe.cd,children:(0,P.jsx)(k.ZP,{default:!0,children:"In addition to helping reduce potential errors, you\u2019ll help inform which features are useful and which need work."})}),(0,P.jsx)(w.Z,{mb:oe.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,P.jsx)(k.ZP,{bold:!0,children:"I want to help make Mage more powerful for everyone"}),(0,P.jsx)(w.Z,{mr:oe.cd}),(0,P.jsx)(L.Z,{checked:!0,onCheck:function(){window.confirm("Are you sure you don\u2019t want to help everyone in the community?")&&oi({help_improve_mage:!1}).then((function(){return ci()}))}})]})}),ti&&(0,P.jsx)(w.Z,{mb:oe.cd,children:(0,P.jsx)(R.Z,{inverted:!0})}),(0,P.jsx)(w.Z,{mb:oe.cd,children:(0,P.jsxs)(k.ZP,{muted:!0,small:!0,children:["To learn more about how this works, please check out the ",(0,P.jsx)(S.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,small:!0,children:"documentation"}),"."]})}),(0,P.jsx)(h.Z,{onClick:function(){return oi({help_improve_mage:!0}).then((function(){return ci()}))},secondary:!0,children:"Close"})]})}),{},[Ye],{background:!0,hideCallback:function(){oi({help_improve_mage:!0})},uuid:"help_mage"}),ri=(0,o.Z)(ui,2),li=ri[0],ci=ri[1];(0,d.useEffect)((function(){Ye&&null===(null===Ye||void 0===Ye?void 0:Ye.help_improve_mage)&&li()}),[Ye,li]);var si=(0,d.useCallback)((function(e){var n={};null===e||void 0===e||e.forEach((function(e,i){var t=null===e||void 0===e?void 0:e[fn];if(A.r0.STATUS===fn){var o=(e||{}).schedules,u=void 0===o?[]:o,r=u.length;t=u.find((function(e){var n=e.status;return ue.fq.ACTIVE===n}))?A.QK.ACTIVE:r>=1?A.QK.INACTIVE:A.QK.NO_SCHEDULES}else if(A.r0.TAG===fn){t=(null===e||void 0===e?void 0:e.tags)?(0,ve.YC)(e.tags,(function(e){return e})).join(", "):""}n[t]||(n[t]=[]),n[t].push(i)}));var i=[],t=[];A.r0.STATUS===fn?Object.values(A.QK).forEach((function(e){i.push(n[e]),t.push((0,ce.vg)(e))})):A.r0.TAG===fn?(0,ve.YC)(Object.keys(n),(function(e){return e})).forEach((function(e){i.push(n[e]),e?t.push(e.split(", ").map((function(e,n){return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("div",{style:{marginLeft:n>=1?4:0}},"".concat(e,"-").concat(n,"-spacing")),(0,P.jsx)(g.Z,{small:!0,children:(0,P.jsx)(k.ZP,{children:e})},"".concat(e,"-").concat(n))]})}))):t.push("No tags")})):A.r0.TYPE===fn&&Object.values(A.qL).forEach((function(e){i.push(n[e]),t.push(A.G7[e])}));var o=[],u=[];return null===i||void 0===i||i.forEach((function(e,n){"undefined"!==typeof e&&null!==e&&(null===e||void 0===e?void 0:e.length)>=1&&(u.push(e),o.push(null===t||void 0===t?void 0:t[n]))})),{rowGroupHeaders:o,rowsGroupedByIndex:u}}),[fn]),di=(0,d.useMemo)((function(){return si(ln)}),[si,ln]),ai=di.rowGroupHeaders,pi=di.rowsGroupedByIndex,fi=(0,d.useMemo)((function(){return si(cn)}),[si,cn]),vi=fi.rowGroupHeaders,hi=fi.rowsGroupedByIndex,mi=(0,d.useCallback)((function(e,i,o,r,l){return(0,P.jsx)(D.Z,{columnFlex:[null,null,null,2,null,null,null,1,null,null,null],columns:[{label:function(){return""},uuid:"action"},{uuid:(0,ce.kC)(A.r0.STATUS)},{uuid:"Name"},{uuid:"Description"},{uuid:(0,ce.kC)(A.r0.TYPE)},je(je({},We),{},{uuid:"Updated at"}),je(je({},We),{},{uuid:"Created at"}),{uuid:"Tags"},{uuid:"Blocks"},{uuid:"Triggers"},{center:!0,label:function(){return""},uuid:"Actions"}],defaultSortColumnIndex:2,getUniqueRowIdentifier:rn,isSelectedRow:function(e){var n;return(null===(n=i[e])||void 0===n?void 0:n.uuid)===(null===y||void 0===y?void 0:y.uuid)},localStorageKeySortColIdx:F,localStorageKeySortDirection:X,onClickRow:function(e){return I((function(n){var t=i[e];return(null===n||void 0===n?void 0:n.uuid)!==(null===t||void 0===t?void 0:t.uuid)?t:null}))},onDoubleClickRow:function(e){n.push("/pipelines/[pipeline]/edit","/pipelines/".concat(i[e].uuid,"/edit"))},ref:t,renderRightClickMenuItems:function(e){var t=i[e];return[{label:function(){return"Edit description"},onClick:function(){return Mn({pipeline:t,pipelineDescription:null===t||void 0===t?void 0:t.description})},uuid:"edit_description"},{label:function(){return"Rename"},onClick:function(){return Mn({pipeline:t,pipelineName:null===t||void 0===t?void 0:t.name})},uuid:"rename"},{label:function(){return"Clone"},onClick:function(){return Cn({pipeline:{clone_pipeline_uuid:null===t||void 0===t?void 0:t.uuid}})},uuid:"clone"},{label:function(){return"Add/Remove tags"},onClick:function(){n.push("/pipelines/[pipeline]/settings","/pipelines/".concat(null===t||void 0===t?void 0:t.uuid,"/settings"))},uuid:"add_tags"},{label:function(){return"Create template"},onClick:function(){n.push("/templates?object_type=".concat(te.R,"&new=1&pipeline_uuid=").concat(null===t||void 0===t?void 0:t.uuid))},uuid:"create_custom_template"},{label:function(){return"Create global data product"},onClick:function(){n.push("/global-data-products?object_type=".concat(W.b.PIPELINE,"&new=1&object_uuid=").concat(null===t||void 0===t?void 0:t.uuid))},uuid:"create_global_data_product"},{label:function(){return"Delete"},onClick:function(){window.confirm("Are you sure you want to delete pipeline ".concat(null===t||void 0===t?void 0:t.uuid,"?"))&&Sn(null===t||void 0===t?void 0:t.uuid)},uuid:"delete"}]},rightClickMenuHeight:252,rightClickMenuWidth:25*oe.iI,rowGroupHeaders:o,rows:null===e||void 0===e?void 0:e.map((function(e,i){var t=e.blocks,o=e.created_at,r=e.description,l=e.schedules,c=e.tags,d=e.type,a=e.updated_at,p=e.uuid,f=t.filter((function(e){var n=e.type;return Y.tf.SCRATCHPAD!==n})).length,v=l.length,m=l.find((function(e){var n=e.status;return ue.fq.ACTIVE===n})),g=(0,P.jsx)("div",{children:(0,P.jsx)(G.Z,{tags:null===c||void 0===c?void 0:c.map((function(e){return{uuid:e}}))})},"pipeline_tags_".concat(i));return[v>=1||Oe[p]?(0,P.jsx)(h.Z,{iconOnly:!0,loading:!!Oe[p],noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(n){(0,me.j)(n),Me((function(e){return je(je({},e),{},(0,u.Z)({},p,!0))})),yn(je(je({},e),{},{status:m?ue.fq.INACTIVE:ue.fq.ACTIVE}))},children:m?(0,P.jsx)(z.dz,{muted:!0,size:2*oe.iI}):(0,P.jsx)(z.Py,{default:!0,size:2*oe.iI})}):null,(0,P.jsx)(k.ZP,{default:!m,monospace:!0,success:!!m,children:m?ue.fq.ACTIVE:v>=1?ue.fq.INACTIVE:"no schedules"},"pipeline_status_".concat(i)),(0,P.jsx)(s(),{as:"/pipelines/".concat(p),href:"/pipelines/[pipeline]",passHref:!0,children:(0,P.jsx)(S.Z,{sameColorAsText:!0,children:p})},"pipeline_name_".concat(i)),(0,P.jsx)(k.ZP,{default:!0,preWrap:!0,title:r,children:r},"pipeline_description_".concat(i)),(0,P.jsx)(k.ZP,{children:A.G7[d]},"pipeline_type_".concat(i)),(0,P.jsx)(k.ZP,{monospace:!0,small:!0,title:a?"UTC: ".concat(a):null,children:a?(0,se.XG)(a,ze):(0,P.jsx)(P.Fragment,{children:"\u2014"})},"pipeline_updated_at_".concat(i)),(0,P.jsx)(k.ZP,{monospace:!0,small:!0,title:o?"UTC: ".concat(o.slice(0,19)):null,children:o?(0,se.XG)(o.slice(0,19),ze):(0,P.jsx)(P.Fragment,{children:"\u2014"})},"pipeline_created_at_".concat(i)),g,(0,P.jsx)(k.ZP,{default:0===f,monospace:!0,children:f},"pipeline_block_count_".concat(i)),(0,P.jsx)(k.ZP,{default:0===v,monospace:!0,children:v},"pipeline_trigger_count_".concat(i)),(0,P.jsxs)(x.Z,{flex:1,justifyContent:"flex-end",children:[(0,P.jsx)(h.Z,je(je({},ke),{},{onClick:function(){n.push("/pipelines/[pipeline]","/pipelines/".concat(p))},title:"Detail",children:(0,P.jsx)(z.UY,{default:!0,size:2*oe.iI})})),(0,P.jsx)(w.Z,{mr:1}),(0,P.jsx)(h.Z,je(je({},ke),{},{onClick:function(){n.push("/pipelines/[pipeline]/logs","/pipelines/".concat(p,"/logs"))},title:"Logs",children:(0,P.jsx)(z.$B,{default:!0,size:2*oe.iI})}))]},"chevron_icon_".concat(i))]})),rowsGroupedByIndex:r,setRowsSorted:l,sortableColumnIndexes:sn,sortedColumn:pn,stickyHeader:!0})}),[Cn,Sn,ze,rn,Oe,n,y,Me,I,Mn,sn,pn,We,yn]),gi=(0,d.useMemo)((function(){return mi(nn,ln,ai,pi,xe)}),[nn,ln,mi,ai,pi,xe]),bi=(0,d.useMemo)((function(){return mi(tn,cn,vi,hi,Pe)}),[tn,cn,mi,vi,hi,Pe]),xi=(0,d.useMemo)((function(){return(null===nn||void 0===nn?void 0:nn.length)||0}),[nn]),ji=(0,d.useMemo)((function(){return(null===tn||void 0===tn?void 0:tn.length)||0}),[tn]),Zi=(0,d.useMemo)((function(){return(!Ve||Ce.uuid===vn)&&!xi||Ve&&Ze.uuid===vn&&!ji}),[Ve,xi,ji,vn]);return(0,P.jsxs)(b.Z,{errors:De,setErrors:Ge,subheaderChildren:Fn,title:"Pipelines",uuid:"pipelines/index",children:[Ve&&(0,P.jsx)(w.Z,{pb:fn?0:oe.cd,pt:oe.cd,px:oe.cd,ref:i,children:(0,P.jsx)(m.Z,{noPadding:!0,onClickTab:function(e){var n=e.uuid;return(0,fe.u7)((0,u.Z)({},we,n),{pushHistory:!0})},regularSizeText:!0,selectedTabUUID:vn,tabs:_e})}),Zi?(0,P.jsx)(w.Z,{p:oe.Mq,children:qe?(0,P.jsx)(k.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No pipelines available"}):(0,P.jsx)(R.Z,{inverted:!0,large:!0})}):null,(0,P.jsxs)(le.cl,{hide:Zi,includePadding:!!fn,maxHeight:"calc(100vh - ".concat($.Mz+74+(l||0),"px)"),children:[(!Ve||Ce.uuid===vn)&&gi,Ve&&Ze.uuid===vn&&bi]})]})}ye.getInitialProps=(0,t.Z)(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var Ie=(0,O.Z)(ye)},79274:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines",function(){return i(55620)}])}},function(e){e.O(0,[844,2083,2851,2369,341,8789,4913,6648,8013,600,9696,8264,4666,5499,4839,7055,5810,1769,3859,9264,2677,3951,9774,2888,179],(function(){return n=79274,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1221],{8666:function(e,n,i){"use strict";var t;i.d(n,{b:function(){return t}}),function(e){e.BLOCK="block",e.PIPELINE="pipeline"}(t||(t={}))},31882:function(e,n,i){"use strict";var t=i(38626),o=i(71180),u=i(55485),r=i(30160),l=i(44897),c=i(72473),s=i(70515),d=i(61896),a=i(28598),p=t.default.div.withConfig({displayName:"Chip__ChipStyle",componentId:"sc-1ok73g-0"})(["display:inline-block;"," "," "," "," "," ",""],(function(e){return!e.primary&&"\n background-color: ".concat((e.theme.background||l.Z.background).tag,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.chart||l.Z.chart).primary,";\n ")}),(function(e){return!e.small&&"\n border-radius: ".concat((s.iI+d.Al)/2,"px;\n height: ").concat(1.5*s.iI+d.Al,"px;\n padding: ").concat(s.iI/1.5,"px ").concat(1.25*s.iI,"px;\n ")}),(function(e){return e.small&&"\n border-radius: ".concat((s.iI/2+d.Al)/2,"px;\n height: ").concat(d.Al+s.iI/2+2,"px;\n padding: ").concat(s.iI/4,"px ").concat(s.iI,"px;\n ")}),(function(e){return e.xsmall&&"\n border-radius: ".concat((s.iI/1+d.Al)/1,"px;\n height: ").concat(20,"px;\n padding: 4px 6px;\n ")}),(function(e){return e.border&&"\n border: 1px solid ".concat((e.theme.content||l.Z.content).muted,";\n ")}));n.Z=function(e){var n=e.border,i=e.children,t=e.disabled,l=e.label,d=e.monospace,f=e.onClick,v=e.primary,h=e.small,m=e.xsmall;return(0,a.jsx)(p,{border:n,primary:v,small:h,xsmall:m,children:(0,a.jsx)(o.Z,{basic:!0,disabled:t,noBackground:!0,noPadding:!0,onClick:f,transparent:!0,children:(0,a.jsxs)(u.ZP,{alignItems:"center",children:[i,l&&(0,a.jsx)(r.ZP,{monospace:d,small:h,xsmall:m,children:l}),!t&&f&&(0,a.jsx)("div",{style:{marginLeft:2}}),!t&&f&&(0,a.jsx)(c.x8,{default:v,muted:!v,size:h?s.iI:1.25*s.iI})]})})})}},55620:function(e,n,i){"use strict";i.r(n),i.d(n,{default:function(){return Ie}});var t=i(77837),o=i(75582),u=i(82394),r=i(38860),l=i.n(r),c=i(12691),s=i.n(c),d=i(82684),a=i(69864),p=i(34376),f=i(52749),v=i(60523),h=i(71180),m=i(90299),g=i(31882),b=i(94629),x=i(97618),j=i(55485),Z=i(85854),C=i(93369),_=i(65956),w=i(38276),k=i(30160),y=i(35576),I=i(17488),P=i(28598);var T=function(e){var n=e.description,i=e.isLoading,t=e.maxWidth,o=e.minWidth,u=e.noEmptyValue,r=e.onClose,l=e.onSave,c=e.textArea,s=e.title,a=e.value,p=(0,d.useRef)(null),f=(0,d.useState)(a),v=f[0],m=f[1],g=c?y.Z:I.Z;return(0,d.useEffect)((function(){var e;null===p||void 0===p||null===(e=p.current)||void 0===e||e.focus()}),[]),(0,P.jsxs)(_.Z,{maxWidth:t,minWidth:o,children:[(0,P.jsx)(k.ZP,{bold:!0,children:s}),(0,P.jsx)(w.Z,{mt:1,children:(0,P.jsx)(g,{monospace:!0,onChange:function(e){return m(e.target.value)},ref:p,rows:c?7:null,value:v})}),n&&(0,P.jsx)(w.Z,{mt:2,children:(0,P.jsx)(k.ZP,{muted:!0,small:!0,children:n})}),(0,P.jsx)(w.Z,{mt:3,children:(0,P.jsxs)(j.ZP,{children:[(0,P.jsx)(C.ZP,{bold:!0,inline:!0,loading:i,onClick:function(){v===a||u&&!v?r():l(v)},outline:!0,primary:!0,uuid:"Inputs/InputModal/SaveInput",children:"Save"}),(0,P.jsx)(w.Z,{ml:1}),(0,P.jsx)(h.Z,{onClick:r,children:"Cancel"})]})})]})},S=i(48670),A=i(57653),E=i(55729),O=i(93808),M=i(82359),R=i(4190),D=i(75499),G=i(48381),L=i(69650),N=i(85544),B=i(35686),U=i(44897),H=i(42631),Y=i(44425),z=i(72473),V=i(23780),W=i(8666),$=i(46684),q=i(53808),K="pipeline_list_filters",Q="pipeline_list_group_bys",F="pipeline_list_sort_column_index",X="pipeline_list_sort_direction",J="pipeline_list_selected_tab_uuid";function ee(e){return(0,q.t8)(K,e),e}function ne(e){return(0,q.t8)(Q,e),e}var ie=i(32929),te=i(44898),oe=i(70515),ue=i(30229),re=i(81655),le=i(31608),ce=i(81728),se=i(3917),de=i(72619),ae=i(69419),pe=i(65458),fe=i(15610),ve=i(86735),he=i(42122),me=i(3314),ge=i(70320),be=i(89538);function xe(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function je(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?xe(Object(i),!0).forEach((function(n){(0,u.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):xe(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var Ze={Icon:z.Pf,label:function(){return"Recently viewed"},uuid:"recent"},Ce={Icon:z.vd,label:function(){return"All pipelines"},uuid:"all"},_e=[Ce,Ze],we="tab",ke={borderRadius:H.BG,iconOnly:!0,noBackground:!0,noBorder:!0,outline:!0,padding:"4px"};function ye(){var e,n=(0,p.useRouter)(),i=(0,d.useRef)(null),t=(0,d.useRef)(null),r=(0,d.useState)(null),l=r[0],c=r[1],C=(0,d.useState)(null),y=C[0],I=C[1],O=(0,d.useState)(null),H=O[0],xe=O[1],ye=(0,d.useState)(null),Ie=ye[0],Pe=ye[1],Te=(0,d.useState)(null),Se=Te[0],Ae=Te[1],Ee=(0,d.useState)({}),Oe=Ee[0],Me=Ee[1],Re=(0,d.useState)(null),De=Re[0],Ge=Re[1],Le=(0,ae.iV)(),Ne=(0,ae.DQ)(Le,[A.$1.STATUS,A.$1.TAG,A.$1.TYPE]);(0,d.useEffect)((function(){var e;c(null===i||void 0===i||null===(e=i.current)||void 0===e?void 0:e.getBoundingClientRect().height)}),[Le,i]);var Be=B.ZP.projects.list(),Ue=Be.data,He=Be.mutate,Ye=(0,d.useMemo)((function(){var e;return null===Ue||void 0===Ue||null===(e=Ue.projects)||void 0===e?void 0:e[0]}),[Ue]),ze=(0,d.useMemo)((function(){var e;return(0,ge.h)(null===Ye||void 0===Ye||null===(e=Ye.features)||void 0===e?void 0:e[M.d.LOCAL_TIMEZONE])}),[null===Ye||void 0===Ye?void 0:Ye.features]),Ve=(0,d.useMemo)((function(){var e;return null===Ye||void 0===Ye||null===(e=Ye.features)||void 0===e?void 0:e[M.d.OPERATION_HISTORY]}),[Ye]),We=(0,d.useMemo)((function(){return ze?re.O$:{}}),[ze]),$e=B.ZP.pipelines.list(je(je({},Ne),{},{include_schedules:1})),qe=$e.data,Ke=$e.mutate,Qe=(0,d.useMemo)((function(){return(null===Le||void 0===Le?void 0:Le[A.$1.HISTORY_DAYS])||7}),[Le]),Fe=B.ZP.pipelines.list(je(je({},Ne),{},(e={},(0,u.Z)(e,A.$1.HISTORY_DAYS,(0,ce.HW)(Qe)?Number(Qe):Qe),(0,u.Z)(e,"include_schedules",1),e)),{},{pauseFetch:!Ve}),Xe=Fe.data,Je=Fe.mutate,en=(0,d.useCallback)((function(e){var n=e||[];if(Se){var i=Se.toLowerCase();n=n.filter((function(e){var n=e.name,t=e.description,o=e.uuid;return(null===n||void 0===n?void 0:n.toLowerCase().includes(i))||(null===o||void 0===o?void 0:o.toLowerCase().includes(i))||(null===t||void 0===t?void 0:t.toLowerCase().includes(i))}))}return n}),[Se]),nn=(0,d.useMemo)((function(){return en((null===qe||void 0===qe?void 0:qe.pipelines)||[])}),[qe,en]),tn=(0,d.useMemo)((function(){return en((null===Xe||void 0===Xe?void 0:Xe.pipelines)||[])}),[Xe,en]),on=(0,d.useMemo)((function(){return(0,ve.HK)(nn,(function(e){return e.uuid}))}),[nn]),un=(0,d.useMemo)((function(){return(0,ve.HK)(tn,(function(e){return e.uuid}))}),[tn]),rn=(0,d.useCallback)((function(e){var n,i,t,o;return null===e||void 0===e||null===(n=e[2])||void 0===n||null===(i=n.props)||void 0===i||null===(t=i.children)||void 0===t||null===(o=t.props)||void 0===o?void 0:o.children}),[]),ln=(0,d.useMemo)((function(){return(null===H||void 0===H?void 0:H.length)>0?null===H||void 0===H?void 0:H.map((function(e){var n=rn(e);return null===on||void 0===on?void 0:on[n]})):nn}),[rn,H,nn,on]),cn=(0,d.useMemo)((function(){return(null===Ie||void 0===Ie?void 0:Ie.length)>0?null===Ie||void 0===Ie?void 0:Ie.map((function(e){var n=rn(e);return null===un||void 0===un?void 0:un[n]})):tn}),[rn,Ie,tn,un]),sn=(0,d.useMemo)((function(){return[1,2,3,4,5,6,8,9]}),[]),dn=null===Le||void 0===Le?void 0:Le[re.lG.SORT_COL_IDX],an=null===Le||void 0===Le?void 0:Le[re.lG.SORT_DIRECTION],pn=(0,d.useMemo)((function(){return dn?{columnIndex:+dn,sortDirection:an||re.sh.ASC}:void 0}),[dn,an]),fn=null===Le||void 0===Le?void 0:Le[A.$1.GROUP],vn=(0,d.useMemo)((function(){return null===Le||void 0===Le?void 0:Le.tab}),[Le]);(0,d.useEffect)((function(){var e,n={};if(dn&&sn.includes(+dn))(0,q.t8)(F,dn),an&&(0,q.t8)(X,an);else{var i=(0,q.U2)(F,null),t=(0,q.U2)(X,re.sh.ASC);null!==i&&(n[re.lG.SORT_COL_IDX]=i,n[re.lG.SORT_DIRECTION]=t)}Ve&&(vn?(0,q.t8)(J,vn):n.tab=(0,q.U2)(J,null===_e||void 0===_e||null===(e=_e[0])||void 0===e?void 0:e.uuid));if(fn)ne((0,u.Z)({},fn,!0));else{var r,l=(0,q.U2)(Q,{});l&&Object.entries(l).forEach((function(e){var n=(0,o.Z)(e,2),i=n[0],t=n[1];!r&&t&&(r=i)})),r&&(n[A.$1.GROUP]=r)}if((0,he.Qr)(Ne)){var c={},s=(0,q.U2)(K,{});s&&Object.entries(s).forEach((function(e){var n=(0,o.Z)(e,2),i=n[0],t=n[1];c[i]=[],Object.entries(t).forEach((function(e){var n=(0,o.Z)(e,2),t=n[0];n[1]&&c[i].push(t)}))})),(0,he.Qr)(c)||(n=je(je({},n),c))}else{var d={};Object.entries(Ne).forEach((function(e){var n=(0,o.Z)(e,2),i=n[0],t=n[1];d[i]={};var u,r=t;(Array.isArray(r)||(r=[r]),r&&Array.isArray(r))&&(null===(u=r)||void 0===u||u.forEach((function(e){d[i][e]=!0})))})),ee(d)}(0,he.Qr)(n)||(0,fe.u7)(n,{pushHistory:!1})}),[fn,Ve,Ne,vn,sn,dn,an]),(0,d.useEffect)((function(){(0,de.bB)(qe,Ge)}),[qe]);var hn=function(e){return(0,a.Db)(B.ZP.pipelines.useCreate(),{onSuccess:function(n){return(0,de.wD)(n,{callback:function(n){var i=n.pipeline.uuid;null===e||void 0===e||e(i)},onErrorCallback:function(e,n){return Ge({errors:n,response:e})}})}})},mn=hn((function(e){return n.push("/pipelines/[pipeline]/edit","/pipelines/".concat(e,"/edit"))})),gn=(0,o.Z)(mn,2),bn=gn[0],xn=gn[1].isLoading,jn=hn((function(){null===Ke||void 0===Ke||Ke(),null===Je||void 0===Je||Je()})),Zn=(0,o.Z)(jn,2),Cn=Zn[0],_n=Zn[1].isLoading,wn=(0,a.Db)((function(e){return B.ZP.pipelines.useUpdate(e.uuid)({pipeline:e})}),{onSuccess:function(e){return(0,de.wD)(e,{callback:function(e){var n=e.pipeline.uuid;Me((function(e){return je(je({},e),{},(0,u.Z)({},n,!1))})),Ke(),null===Je||void 0===Je||Je(),null===Rn||void 0===Rn||Rn(),I(null)},onErrorCallback:function(e,n){var i,t=null===e||void 0===e||null===(i=e.url_parameters)||void 0===i?void 0:i.pk;Me((function(e){return je(je({},e),{},(0,u.Z)({},t,!1))})),Ge({errors:n,response:e})}})}}),kn=(0,o.Z)(wn,2),yn=kn[0],In=kn[1].isLoading,Pn=(0,a.Db)((function(e){return B.ZP.pipelines.useDelete(e)()}),{onSuccess:function(e){return(0,de.wD)(e,{callback:function(){null===Ke||void 0===Ke||Ke(),null===Je||void 0===Je||Je()},onErrorCallback:function(e,n){return Ge({errors:n,response:e})}})}}),Tn=(0,o.Z)(Pn,2),Sn=Tn[0],An=Tn[1].isLoading,En=(0,be.dd)((function(e){var n=e.pipeline,i=e.pipelineDescription,t=e.pipelineName;return(0,P.jsx)(T,{isLoading:In,minWidth:55*oe.iI,noEmptyValue:!!t,onClose:Rn,onSave:function(e){var i=n||y;if(i){var o=i.uuid,r={uuid:o};t?r.name=e:r.description=e,Me((function(e){return je(je({},e),{},(0,u.Z)({},o,!0))})),yn(r)}},textArea:!t,title:t?"Rename pipeline":"Edit description for ".concat(null===n||void 0===n?void 0:n.uuid),value:t||i})}),{},[In,y],{background:!0,uuid:"rename_pipeline_and_save"}),On=(0,o.Z)(En,2),Mn=On[0],Rn=On[1],Dn=(0,be.dd)((function(){return(0,P.jsx)(V.BC,{children:(0,P.jsx)(v.Z,{contained:!0,onClickCustomTemplate:function(e){bn({pipeline:{custom_template_uuid:null===e||void 0===e?void 0:e.template_uuid,name:(0,ce.Y6)()}}).then((function(){Nn()}))},showBreadcrumbs:!0,tabs:[ie.A2]})})}),{},[bn],{background:!0,uuid:"browse_templates"}),Gn=(0,o.Z)(Dn,2),Ln=Gn[0],Nn=Gn[1],Bn=(0,be.dd)((function(e){var n=e.cancelButtonText,i=(e.header,e.onCancel),t=e.onSaveSuccess;return(0,P.jsx)(V.BC,{children:(0,P.jsx)(E.Z,{cancelButtonText:n,contained:!0,header:(0,P.jsx)(w.Z,{mb:oe.HN,children:(0,P.jsxs)(_.Z,{children:[(0,P.jsx)(k.ZP,{warning:!0,children:"You need to add an OpenAI API key to your project before you can generate pipelines using AI."}),(0,P.jsx)(w.Z,{mt:1,children:(0,P.jsxs)(k.ZP,{warning:!0,children:["Read ",(0,P.jsx)(S.Z,{href:"https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key",openNewWindow:!0,children:"OpenAI\u2019s documentation"})," to get your API key."]})})]})}),onCancel:function(){null===i||void 0===i||i(),Yn()},onSaveSuccess:function(e){He(),Yn(),null===t||void 0===t||t(e)}})})}),{},[He],{background:!0,uuid:"configure_project"}),Un=(0,o.Z)(Bn,2),Hn=Un[0],Yn=Un[1],zn=(0,be.dd)((function(){return(0,P.jsx)(V.BC,{children:(0,P.jsx)(f.Z,{createPipeline:bn,isLoading:xn,onClose:$n})})}),{},[bn,xn],{background:!0,disableClickOutside:!0,disableCloseButton:!0,uuid:"AI_modal"}),Vn=(0,o.Z)(zn,2),Wn=Vn[0],$n=Vn[1],qn=(0,d.useMemo)((function(){return(0,pe.d)(bn,{showAIModal:function(){null!==Ye&&void 0!==Ye&&Ye.openai_api_key?Wn():Hn({onSaveSuccess:function(){Wn()}})},showBrowseTemplates:Ln})}),[bn,Ye,Wn,Ln,Hn]),Kn=B.ZP.tags.list().data,Qn=(0,d.useMemo)((function(){return(0,ve.YC)((null===Kn||void 0===Kn?void 0:Kn.tags)||[],(function(e){return e.uuid}))}),[Kn]),Fn=(0,d.useMemo)((function(){return(0,P.jsx)(N.Z,{addButtonProps:{isLoading:xn,label:"New",menuItems:qn},deleteRowProps:{confirmationMessage:"This is irreversible and will immediately delete everything associated with the pipeline, including its blocks, triggers, runs, logs, and history.",isLoading:An,item:"pipeline",onDelete:function(){window.confirm("Are you sure you want to delete pipeline ".concat(null===y||void 0===y?void 0:y.uuid,"?"))&&Sn(null===y||void 0===y?void 0:y.uuid)}},extraActionButtonProps:{Icon:z.oX,confirmationDescription:"Cloning the selected pipeline will create a new pipeline with the same configuration and code blocks. The blocks use the same block files as the original pipeline. Pipeline triggers, runs, backfills, and logs are not copied over to the new pipeline.",confirmationMessage:"Do you want to clone the pipeline ".concat(null===y||void 0===y?void 0:y.uuid,"?"),isLoading:_n,onClick:function(){return Cn({pipeline:{clone_pipeline_uuid:null===y||void 0===y?void 0:y.uuid}})},openConfirmationDialogue:!0,tooltip:"Clone pipeline"},filterOptions:{status:A.kA,tag:Qn.map((function(e){return e.uuid})),type:Object.values(A.qL)},filterValueLabelMapping:{tag:Qn.reduce((function(e,n){var i=n.uuid;return je(je({},e),{},(0,u.Z)({},i,i))}),{}),type:A.G7},groupButtonProps:{groupByLabel:fn,menuItems:[{beforeIcon:fn===A.r0.STATUS?(0,P.jsx)(z.Jr,{fill:U.Z.content.default,size:1.5*oe.iI}):(0,P.jsx)(z.Cd,{muted:!0,size:1.5*oe.iI}),label:function(){return(0,ce.kC)(A.r0.STATUS)},onClick:function(){var e=fn===A.r0.STATUS?null:A.r0.STATUS;e||ne({}),(0,fe.u7)((0,u.Z)({},A.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Status"},{beforeIcon:fn===A.r0.TAG?(0,P.jsx)(z.Jr,{fill:U.Z.content.default,size:1.5*oe.iI}):(0,P.jsx)(z.Cd,{muted:!0,size:1.5*oe.iI}),label:function(){return(0,ce.kC)(A.r0.TAG)},onClick:function(){var e=fn===A.r0.TAG?null:A.r0.TAG;e||ne({}),(0,fe.u7)((0,u.Z)({},A.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Tag"},{beforeIcon:fn===A.r0.TYPE?(0,P.jsx)(z.Jr,{fill:U.Z.content.default,size:1.5*oe.iI}):(0,P.jsx)(z.Cd,{muted:!0,size:1.5*oe.iI}),label:function(){return(0,ce.kC)(A.r0.TYPE)},onClick:function(){var e=fn===A.r0.TYPE?null:A.r0.TYPE;e||ne({}),(0,fe.u7)((0,u.Z)({},A.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Type"}]},moreActionsMenuItems:[{label:function(){return"Rename pipeline"},onClick:function(){return Mn({pipelineName:null===y||void 0===y?void 0:y.name})},uuid:"Pipelines/MoreActionsMenu/Rename"},{label:function(){return"Edit description"},onClick:function(){return Mn({pipeline:y,pipelineDescription:null===y||void 0===y?void 0:y.description})},uuid:"Pipelines/MoreActionsMenu/EditDescription"}],onClickFilterDefaults:function(){ee({}),n.push("/pipelines")},onFilterApply:function(e,n){Object.values(n).every((function(e){return!(null!==e&&void 0!==e&&e.length)}))&&ee({})},query:Ne,searchProps:{onChange:Ae,value:Se},selectedRowId:null===y||void 0===y?void 0:y.uuid,setSelectedRow:I})}),[Cn,Sn,fn,_n,xn,An,qn,Ne,n,Se,y,Mn,Qn]),Xn=(0,V.VI)(null,{},[],{uuid:"pipelines/list"}),Jn=(0,o.Z)(Xn,1)[0],ei=(0,a.Db)(B.ZP.projects.useUpdate(null===Ye||void 0===Ye?void 0:Ye.name),{onSuccess:function(e){return(0,de.wD)(e,{callback:function(){He()},onErrorCallback:function(e,n){return Jn({errors:n,response:e})}})}}),ni=(0,o.Z)(ei,2),ii=ni[0],ti=ni[1].isLoading,oi=(0,d.useCallback)((function(e){return ii({project:e})}),[ii]),ui=(0,be.dd)((function(){return(0,P.jsxs)(_.Z,{maxWidth:60*oe.iI,children:[(0,P.jsx)(w.Z,{mb:1,children:(0,P.jsx)(Z.Z,{children:"Help improve Mage"})}),(0,P.jsx)(w.Z,{mb:oe.cd,children:(0,P.jsx)(k.ZP,{default:!0,children:"Please contribute usage statistics to help improve the developer experience for you and everyone in the community \ud83e\udd1d."})}),(0,P.jsx)(w.Z,{mb:oe.cd,children:(0,P.jsx)(_.Z,{success:!0,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsx)(z.Yo,{size:5*oe.iI,success:!0}),(0,P.jsx)(w.Z,{mr:1}),(0,P.jsx)(x.Z,{children:(0,P.jsx)(k.ZP,{children:"All usage statistics are completely anonymous. It\u2019s impossible for Mage to know which statistics belongs to whom."})})]})})}),(0,P.jsx)(w.Z,{mb:oe.cd,children:(0,P.jsxs)(k.ZP,{default:!0,children:["By opting into sending usage statistics to ",(0,P.jsx)(S.Z,{href:"https://www.mage.ai",openNewWindow:!0,children:"Mage"}),", it\u2019ll help the team and community of contributors (",(0,P.jsx)(S.Z,{href:"https://www.mage.ai/chat",openNewWindow:!0,children:"Magers"}),") learn what\u2019s going wrong with the tool and what improvements can be made."]})}),(0,P.jsx)(w.Z,{mb:oe.cd,children:(0,P.jsx)(k.ZP,{default:!0,children:"In addition to helping reduce potential errors, you\u2019ll help inform which features are useful and which need work."})}),(0,P.jsx)(w.Z,{mb:oe.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,P.jsx)(k.ZP,{bold:!0,children:"I want to help make Mage more powerful for everyone"}),(0,P.jsx)(w.Z,{mr:oe.cd}),(0,P.jsx)(L.Z,{checked:!0,onCheck:function(){window.confirm("Are you sure you don\u2019t want to help everyone in the community?")&&oi({help_improve_mage:!1}).then((function(){return ci()}))}})]})}),ti&&(0,P.jsx)(w.Z,{mb:oe.cd,children:(0,P.jsx)(R.Z,{inverted:!0})}),(0,P.jsx)(w.Z,{mb:oe.cd,children:(0,P.jsxs)(k.ZP,{muted:!0,small:!0,children:["To learn more about how this works, please check out the ",(0,P.jsx)(S.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,small:!0,children:"documentation"}),"."]})}),(0,P.jsx)(h.Z,{onClick:function(){return oi({help_improve_mage:!0}).then((function(){return ci()}))},secondary:!0,children:"Close"})]})}),{},[Ye],{background:!0,hideCallback:function(){oi({help_improve_mage:!0})},uuid:"help_mage"}),ri=(0,o.Z)(ui,2),li=ri[0],ci=ri[1];(0,d.useEffect)((function(){Ye&&null===(null===Ye||void 0===Ye?void 0:Ye.help_improve_mage)&&li()}),[Ye,li]);var si=(0,d.useCallback)((function(e){var n={};null===e||void 0===e||e.forEach((function(e,i){var t=null===e||void 0===e?void 0:e[fn];if(A.r0.STATUS===fn){var o=(e||{}).schedules,u=void 0===o?[]:o,r=u.length;t=u.find((function(e){var n=e.status;return ue.fq.ACTIVE===n}))?A.QK.ACTIVE:r>=1?A.QK.INACTIVE:A.QK.NO_SCHEDULES}else if(A.r0.TAG===fn){t=(null===e||void 0===e?void 0:e.tags)?(0,ve.YC)(e.tags,(function(e){return e})).join(", "):""}n[t]||(n[t]=[]),n[t].push(i)}));var i=[],t=[];A.r0.STATUS===fn?Object.values(A.QK).forEach((function(e){i.push(n[e]),t.push((0,ce.vg)(e))})):A.r0.TAG===fn?(0,ve.YC)(Object.keys(n),(function(e){return e})).forEach((function(e){i.push(n[e]),e?t.push(e.split(", ").map((function(e,n){return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("div",{style:{marginLeft:n>=1?4:0}},"".concat(e,"-").concat(n,"-spacing")),(0,P.jsx)(g.Z,{small:!0,children:(0,P.jsx)(k.ZP,{children:e})},"".concat(e,"-").concat(n))]})}))):t.push("No tags")})):A.r0.TYPE===fn&&Object.values(A.qL).forEach((function(e){i.push(n[e]),t.push(A.G7[e])}));var o=[],u=[];return null===i||void 0===i||i.forEach((function(e,n){"undefined"!==typeof e&&null!==e&&(null===e||void 0===e?void 0:e.length)>=1&&(u.push(e),o.push(null===t||void 0===t?void 0:t[n]))})),{rowGroupHeaders:o,rowsGroupedByIndex:u}}),[fn]),di=(0,d.useMemo)((function(){return si(ln)}),[si,ln]),ai=di.rowGroupHeaders,pi=di.rowsGroupedByIndex,fi=(0,d.useMemo)((function(){return si(cn)}),[si,cn]),vi=fi.rowGroupHeaders,hi=fi.rowsGroupedByIndex,mi=(0,d.useCallback)((function(e,i,o,r,l){return(0,P.jsx)(D.Z,{columnFlex:[null,null,null,2,null,null,null,1,null,null,null],columns:[{label:function(){return""},uuid:"action"},{uuid:(0,ce.kC)(A.r0.STATUS)},{uuid:"Name"},{uuid:"Description"},{uuid:(0,ce.kC)(A.r0.TYPE)},je(je({},We),{},{uuid:"Updated at"}),je(je({},We),{},{uuid:"Created at"}),{uuid:"Tags"},{uuid:"Blocks"},{uuid:"Triggers"},{center:!0,label:function(){return""},uuid:"Actions"}],defaultSortColumnIndex:2,getUniqueRowIdentifier:rn,isSelectedRow:function(e){var n;return(null===(n=i[e])||void 0===n?void 0:n.uuid)===(null===y||void 0===y?void 0:y.uuid)},localStorageKeySortColIdx:F,localStorageKeySortDirection:X,onClickRow:function(e){return I((function(n){var t=i[e];return(null===n||void 0===n?void 0:n.uuid)!==(null===t||void 0===t?void 0:t.uuid)?t:null}))},onDoubleClickRow:function(e){n.push("/pipelines/[pipeline]/edit","/pipelines/".concat(i[e].uuid,"/edit"))},ref:t,renderRightClickMenuItems:function(e){var t=i[e];return[{label:function(){return"Edit description"},onClick:function(){return Mn({pipeline:t,pipelineDescription:null===t||void 0===t?void 0:t.description})},uuid:"edit_description"},{label:function(){return"Rename"},onClick:function(){return Mn({pipeline:t,pipelineName:null===t||void 0===t?void 0:t.name})},uuid:"rename"},{label:function(){return"Clone"},onClick:function(){return Cn({pipeline:{clone_pipeline_uuid:null===t||void 0===t?void 0:t.uuid}})},uuid:"clone"},{label:function(){return"Add/Remove tags"},onClick:function(){n.push("/pipelines/[pipeline]/settings","/pipelines/".concat(null===t||void 0===t?void 0:t.uuid,"/settings"))},uuid:"add_tags"},{label:function(){return"Create template"},onClick:function(){n.push("/templates?object_type=".concat(te.R,"&new=1&pipeline_uuid=").concat(null===t||void 0===t?void 0:t.uuid))},uuid:"create_custom_template"},{label:function(){return"Create global data product"},onClick:function(){n.push("/global-data-products?object_type=".concat(W.b.PIPELINE,"&new=1&object_uuid=").concat(null===t||void 0===t?void 0:t.uuid))},uuid:"create_global_data_product"},{label:function(){return"Delete"},onClick:function(){window.confirm("Are you sure you want to delete pipeline ".concat(null===t||void 0===t?void 0:t.uuid,"?"))&&Sn(null===t||void 0===t?void 0:t.uuid)},uuid:"delete"}]},rightClickMenuHeight:252,rightClickMenuWidth:25*oe.iI,rowGroupHeaders:o,rows:null===e||void 0===e?void 0:e.map((function(e,i){var t=e.blocks,o=e.created_at,r=e.description,l=e.schedules,c=e.tags,d=e.type,a=e.updated_at,p=e.uuid,f=t.filter((function(e){var n=e.type;return Y.tf.SCRATCHPAD!==n})).length,v=l.length,m=l.find((function(e){var n=e.status;return ue.fq.ACTIVE===n})),g=(0,P.jsx)("div",{children:(0,P.jsx)(G.Z,{tags:null===c||void 0===c?void 0:c.map((function(e){return{uuid:e}}))})},"pipeline_tags_".concat(i));return[v>=1||Oe[p]?(0,P.jsx)(h.Z,{iconOnly:!0,loading:!!Oe[p],noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(n){(0,me.j)(n),Me((function(e){return je(je({},e),{},(0,u.Z)({},p,!0))})),yn(je(je({},e),{},{status:m?ue.fq.INACTIVE:ue.fq.ACTIVE}))},children:m?(0,P.jsx)(z.dz,{muted:!0,size:2*oe.iI}):(0,P.jsx)(z.Py,{default:!0,size:2*oe.iI})}):null,(0,P.jsx)(k.ZP,{default:!m,monospace:!0,success:!!m,children:m?ue.fq.ACTIVE:v>=1?ue.fq.INACTIVE:"no schedules"},"pipeline_status_".concat(i)),(0,P.jsx)(s(),{as:"/pipelines/".concat(p),href:"/pipelines/[pipeline]",passHref:!0,children:(0,P.jsx)(S.Z,{sameColorAsText:!0,children:p})},"pipeline_name_".concat(i)),(0,P.jsx)(k.ZP,{default:!0,preWrap:!0,title:r,children:r},"pipeline_description_".concat(i)),(0,P.jsx)(k.ZP,{children:A.G7[d]},"pipeline_type_".concat(i)),(0,P.jsx)(k.ZP,{monospace:!0,small:!0,title:a?"UTC: ".concat(a):null,children:a?(0,se.XG)(a,ze):(0,P.jsx)(P.Fragment,{children:"\u2014"})},"pipeline_updated_at_".concat(i)),(0,P.jsx)(k.ZP,{monospace:!0,small:!0,title:o?"UTC: ".concat(o.slice(0,19)):null,children:o?(0,se.XG)(o.slice(0,19),ze):(0,P.jsx)(P.Fragment,{children:"\u2014"})},"pipeline_created_at_".concat(i)),g,(0,P.jsx)(k.ZP,{default:0===f,monospace:!0,children:f},"pipeline_block_count_".concat(i)),(0,P.jsx)(k.ZP,{default:0===v,monospace:!0,children:v},"pipeline_trigger_count_".concat(i)),(0,P.jsxs)(x.Z,{flex:1,justifyContent:"flex-end",children:[(0,P.jsx)(h.Z,je(je({},ke),{},{onClick:function(){n.push("/pipelines/[pipeline]","/pipelines/".concat(p))},title:"Detail",children:(0,P.jsx)(z.UY,{default:!0,size:2*oe.iI})})),(0,P.jsx)(w.Z,{mr:1}),(0,P.jsx)(h.Z,je(je({},ke),{},{onClick:function(){n.push("/pipelines/[pipeline]/logs","/pipelines/".concat(p,"/logs"))},title:"Logs",children:(0,P.jsx)(z.$B,{default:!0,size:2*oe.iI})}))]},"chevron_icon_".concat(i))]})),rowsGroupedByIndex:r,setRowsSorted:l,sortableColumnIndexes:sn,sortedColumn:pn,stickyHeader:!0})}),[Cn,Sn,ze,rn,Oe,n,y,Me,I,Mn,sn,pn,We,yn]),gi=(0,d.useMemo)((function(){return mi(nn,ln,ai,pi,xe)}),[nn,ln,mi,ai,pi,xe]),bi=(0,d.useMemo)((function(){return mi(tn,cn,vi,hi,Pe)}),[tn,cn,mi,vi,hi,Pe]),xi=(0,d.useMemo)((function(){return(null===nn||void 0===nn?void 0:nn.length)||0}),[nn]),ji=(0,d.useMemo)((function(){return(null===tn||void 0===tn?void 0:tn.length)||0}),[tn]),Zi=(0,d.useMemo)((function(){return(!Ve||Ce.uuid===vn)&&!xi||Ve&&Ze.uuid===vn&&!ji}),[Ve,xi,ji,vn]);return(0,P.jsxs)(b.Z,{errors:De,setErrors:Ge,subheaderChildren:Fn,title:"Pipelines",uuid:"pipelines/index",children:[Ve&&(0,P.jsx)(w.Z,{pb:fn?0:oe.cd,pt:oe.cd,px:oe.cd,ref:i,children:(0,P.jsx)(m.Z,{noPadding:!0,onClickTab:function(e){var n=e.uuid;return(0,fe.u7)((0,u.Z)({},we,n),{pushHistory:!0})},regularSizeText:!0,selectedTabUUID:vn,tabs:_e})}),Zi?(0,P.jsx)(w.Z,{p:oe.Mq,children:qe?(0,P.jsx)(k.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No pipelines available"}):(0,P.jsx)(R.Z,{inverted:!0,large:!0})}):null,(0,P.jsxs)(le.cl,{hide:Zi,includePadding:!!fn,maxHeight:"calc(100vh - ".concat($.Mz+74+(l||0),"px)"),children:[(!Ve||Ce.uuid===vn)&&gi,Ve&&Ze.uuid===vn&&bi]})]})}ye.getInitialProps=(0,t.Z)(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var Ie=(0,O.Z)(ye)},79274:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines",function(){return i(55620)}])}},function(e){e.O(0,[844,2083,2851,1124,341,8789,4913,1821,8013,600,4636,8264,4666,5499,4839,7055,5810,1769,3859,9264,2677,3951,9774,2888,179],(function(){return n=79274,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-2058d022972cdea4.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6308],{65956:function(n,e,t){"use strict";var i=t(38626),o=t(55485),r=t(38276),c=t(30160),a=t(44897),l=t(42631),d=t(47041),u=t(70515),s=t(28598),h=(0,i.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*u.iI,1.5*u.iI,1.5*u.iI),f=i.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],l.n_,(function(n){return n.fullWidth&&"\n width: 100%;\n "}),(function(n){return!n.borderless&&"\n border: 1px solid ".concat((n.theme.interactive||a.Z.interactive).defaultBorder,";\n ")}),(function(n){return n.success&&"\n background-color: ".concat((n.theme.background||a.Z.background).successLight,";\n ")}),(function(n){return n.success&&!n.borderless&&"\n border: 1px solid ".concat((n.theme.background||a.Z.background).success,";\n ")}),(function(n){return!n.dark&&!n.success&&"\n background-color: ".concat((n.theme.background||a.Z.background).panel,";\n ")}),(function(n){return n.dark&&"\n background-color: ".concat((n.theme.background||a.Z.background).content,";\n ")}),(function(n){return!n.fullHeight&&"\n height: fit-content;\n "}),(function(n){return n.maxHeight&&"\n max-height: ".concat(n.maxHeight,";\n ")}),(function(n){return n.maxWidth&&"\n max-width: ".concat(n.maxWidth,"px;\n ")}),(function(n){return n.minWidth&&"\n min-width: ".concat(n.minWidth,"px;\n\n @media (max-width: ").concat(n.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(n){return n.borderless&&"\n border: none;\n "}),(function(n){return n.overflowVisible&&"\n overflow: visible;\n "})),p=i.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],l.n_,l.n_,(function(n){return"\n background-color: ".concat((n.theme.background||a.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((n.theme.interactive||a.Z.interactive).defaultBorder,";\n ")}),(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")}),h,(function(n){return n.headerPaddingVertical&&"\n padding-bottom: ".concat(n.headerPaddingVertical,"px;\n padding-top: ").concat(n.headerPaddingVertical,"px;\n ")})),m=i.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*u.iI,d.w5,(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")}),(function(n){return n.maxHeight&&"\n max-height: calc(".concat(n.maxHeight," - ").concat(15*u.iI,"px);\n ")}),(function(n){return n.noPadding&&"\n padding: 0;\n "}),(function(n){return n.overflowVisible&&"\n overflow: visible;\n "})),g=i.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],l.M8,l.YF,1.75*u.iI);e.Z=function(n){var e=n.borderless,t=n.children,i=n.containerRef,a=n.contentContainerRef,l=n.dark,d=n.footer,u=n.fullHeight,h=void 0===u||u,x=n.fullWidth,b=void 0===x||x,y=n.header,w=n.headerHeight,v=n.headerIcon,_=n.headerPaddingVertical,j=n.headerTitle,I=n.maxHeight,Z=n.maxWidth,N=n.minWidth,H=n.noPadding,P=n.overflowVisible,S=n.subtitle,k=n.success;return(0,s.jsxs)(f,{borderless:e,dark:l,fullHeight:h,fullWidth:b,maxHeight:I,maxWidth:Z,minWidth:N,overflowVisible:P,ref:i,success:k,children:[(y||j)&&(0,s.jsxs)(p,{headerPaddingVertical:_,height:w,children:[y&&y,j&&(0,s.jsx)(o.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(o.ZP,{alignItems:"center",children:[v&&v,(0,s.jsx)(r.Z,{ml:v?1:0,children:(0,s.jsx)(c.ZP,{bold:!0,default:!0,children:j})})]})})]}),(0,s.jsxs)(m,{maxHeight:I,noPadding:H,overflowVisible:P,ref:a,children:[S&&(0,s.jsx)(r.Z,{mb:2,children:(0,s.jsx)(c.ZP,{default:!0,children:S})}),t]}),d&&(0,s.jsx)(g,{children:d})]})}},85854:function(n,e,t){"use strict";var i,o,r,c,a,l,d,u,s=t(82394),h=t(26304),f=t(26653),p=t(38626),m=t(33591),g=t(44897),x=t(95363),b=t(61896),y=t(30160),w=t(70515),v=t(38276),_=t(28598),j=["children","condensed","inline","level","marketing","spacingBelow"];function I(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,i)}return t}function Z(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?I(Object(t),!0).forEach((function(e){(0,s.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):I(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var N=(0,p.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," ",""],y.IH,(function(n){return n.color&&"\n color: ".concat(n.color,"\n ")}),(function(n){return n.yellow&&"\n color: ".concat((n.theme.accent||g.Z.accent).yellow,";\n ")}),(function(n){return n.center&&"\n text-align: center;\n "}),(function(n){return!n.monospace&&0===Number(n.weightStyle)&&"\n font-family: ".concat(x.iI,";\n ")}),(function(n){return!n.monospace&&1===Number(n.weightStyle)&&"\n font-family: ".concat(x.LX,";\n ")}),(function(n){return!n.monospace&&2===Number(n.weightStyle)&&"\n font-family: ".concat(x.LX,";\n ")}),(function(n){return!n.monospace&&3===Number(n.weightStyle)&&"\n font-family: ".concat(x.ry,";\n ")}),(function(n){return!n.monospace&&4===Number(n.weightStyle)&&"\n font-family: ".concat(x.YC,";\n ")}),(function(n){return!n.monospace&&5===Number(n.weightStyle)&&"\n font-family: ".concat(x.nF,";\n ")}),(function(n){return!n.monospace&&(6===Number(n.weightStyle)||n.bold)&&"\n font-family: ".concat(x.nF,";\n ")}),(function(n){return!n.monospace&&7===Number(n.weightStyle)&&"\n font-family: ".concat(x.nF,";\n ")}),(function(n){return!n.monospace&&8===Number(n.weightStyle)&&"\n font-family: ".concat(x.nF,";\n ")}),(function(n){return n.lineHeightAuto&&"\n line-height: normal !important;\n "})),H=p.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(n){return"\n color: ".concat((n.theme.content||g.Z.content).active,";\n ")})),P=p.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],N,m.media.md(i||(i=(0,f.Z)(["\n ","\n "])),b.aQ),m.media.lg(o||(o=(0,f.Z)(["\n ","\n "])),b.aQ),m.media.xl(r||(r=(0,f.Z)(["\n ","\n "])),b.aQ)),S=p.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],N,b.MJ),k=p.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],N,m.media.xs(c||(c=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI),m.media.sm(a||(a=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI),m.media.md(l||(l=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI),m.media.lg(d||(d=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI),m.media.xl(u||(u=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI)),C=p.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],N,b.BL),z=p.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],N),O=p.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],N),W=p.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],N),V=p.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],N,(function(n){return 1===n.level&&"\n ".concat(b.MJ,"\n ")}),(function(n){return 2===n.level&&"\n ".concat(b.BL,"\n ")}),(function(n){return 3===n.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(n){return 4===n.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),B=function(n){var e,t=n.children,i=n.condensed,o=n.inline,r=n.level,c=n.marketing,a=n.spacingBelow,l=(0,h.Z)(n,j);o?e=V:0===Number(r)?e=P:1===Number(r)?e=c?k:S:2===Number(r)?e=C:3===Number(r)?e=z:4===Number(r)?e=O:5===Number(r)&&(e=W);var d=(0,_.jsxs)(e,Z(Z({},l),{},{level:r,children:[a&&(0,_.jsx)(v.Z,{mb:i?2:3,children:t}),!a&&t]}));return o?d:(0,_.jsx)(H,{children:d})};B.defaultProps={level:3,weightStyle:6},e.Z=B},86627:function(n,e,t){"use strict";t.r(e);var i=t(77837),o=t(38860),r=t.n(o),c=t(65956),a=t(93808),l=t(28274),d=t(38276),u=t(36043),s=t(35686),h=t(70515),f=t(24755),p=t(50178),m=t(28598);function g(){var n=((0,p.PR)()||{}).id,e=s.ZP.users.detail(n),t=e.data,i=e.mutate,o=null===t||void 0===t?void 0:t.user;return(0,m.jsx)(l.Z,{uuidItemSelected:f.DQ,uuidWorkspaceSelected:f.tC,children:(0,m.jsx)(d.Z,{p:h.cd,children:(0,m.jsx)(c.Z,{children:(0,m.jsx)(u.Z,{disabledFields:["roles"],onSaveSuccess:i,user:o})})})})}g.getInitialProps=(0,i.Z)(r().mark((function n(){return r().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",{});case 1:case"end":return n.stop()}}),n)}))),e.default=(0,a.Z)(g)},10736:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/account/profile",function(){return t(86627)}])}},function(n){n.O(0,[844,8013,600,4636,8264,3684,6043,9774,2888,179],(function(){return e=10736,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[609],{5149:function(n,r,u){"use strict";u.r(r);var t=u(77837),e=u(38860),s=u.n(e),i=u(58146),o=u(93808),a=u(28598);function c(n){var r=n.slug;return(0,a.jsx)(i.Z,{slug:r})}c.getInitialProps=function(){var n=(0,t.Z)(s().mark((function n(r){var u;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=r.query.slug,n.abrupt("return",{slug:null===u||void 0===u?void 0:u[0]});case 2:case"end":return n.stop()}}),n)})));return function(r){return n.apply(this,arguments)}}(),r.default=(0,o.Z)(c)},79877:function(n,r,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/permissions/[...slug]",function(){return u(5149)}])}},function(n){n.O(0,[844,2083,8013,600,4636,8264,4666,5499,3684,8146,9774,2888,179],(function(){return r=79877,n(n.s=r);var r}));var r=n.O();_N_E=r}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4085],{34331:function(n,e,t){"use strict";t.r(e);var i=t(77837),r=t(38860),s=t.n(r),u=t(82684),c=t(34376),o=t(71180),d=t(15338),l=t(55485),a=t(58146),p=t(93808),m=t(28274),f=t(38276),h=t(75499),v=t(30160),x=t(35686),j=t(72473),Z=t(70515),_=t(24755),P=t(3917),w=t(36717),b=t(28598);function k(){var n=(0,c.useRouter)(),e=(0,u.useState)(!1),t=e[0],i=e[1],r=x.ZP.permissions.list().data,s=(0,u.useMemo)((function(){return(null===r||void 0===r?void 0:r.permissions)||[]}),[r]),p=[{bold:!t,label:function(){return"Permissions"}}];return t?(p[0].onClick=function(){return i(!1)},p.push({bold:!0,label:function(){return"New permission"}})):p[0].linkProps={href:"/settings/workspace/permissions"},(0,b.jsxs)(m.Z,{appendBreadcrumbs:!0,breadcrumbs:p,title:"Permissions",uuidItemSelected:_.B2.PERMISSIONS,uuidWorkspaceSelected:_.Pl.USER_MANAGEMENT,children:[t&&(0,b.jsx)(a.Z,{contained:!0,onCancel:function(){return i(!1)}}),!t&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.Z,{p:Z.cd,children:(0,b.jsx)(o.Z,{beforeIcon:(0,b.jsx)(j.QM,{}),onClick:function(){return i(!0)},primary:!0,children:"Add new permission"})}),(0,b.jsx)(d.Z,{light:!0}),(0,b.jsx)(h.Z,{columnFlex:[3,1,null,6,null,null],columns:[{uuid:"Entity"},{uuid:"Subtype"},{uuid:"Entity ID"},{uuid:"Access"},{uuid:"Last updated"},{rightAligned:!0,uuid:"Created at"}],onClickRow:function(e){var t,i=null===(t=s[e])||void 0===t?void 0:t.id;n.push("/settings/workspace/permissions/".concat(i))},rows:null===s||void 0===s?void 0:s.map((function(n){var e=n.access,t=n.created_at,i=n.entity,r=n.entity_id,s=n.entity_name,u=n.entity_type,c=(n.id,n.updated_at),o=(n.user,e?(0,w.q)(e):[]),d=(null===o||void 0===o?void 0:o.length)||0;return[(0,b.jsx)(v.ZP,{monospace:!0,children:s||i},"entityName"),(0,b.jsx)(v.ZP,{default:!0,monospace:!!u,children:u||"-"},"entityType"),(0,b.jsx)(v.ZP,{default:!0,monospace:!!r,children:r||"-"},"entityID"),(0,b.jsx)("div",{children:d>=1&&(0,b.jsx)(l.ZP,{alignItems:"center",flexWrap:"wrap",children:null===o||void 0===o?void 0:o.map((function(n,e){return(0,b.jsx)("div",{children:(0,b.jsxs)(v.ZP,{default:!0,monospace:!0,small:!0,children:[n,d>=2&&e<d-1&&(0,b.jsx)(v.ZP,{inline:!0,muted:!0,small:!0,children:",\xa0"})]})},n)}))})},"access"),(0,b.jsx)(v.ZP,{monospace:!0,default:!0,children:c&&(0,P.d$)(c)},"updatedAt"),(0,b.jsx)(v.ZP,{monospace:!0,default:!0,rightAligned:!0,children:t&&(0,P.d$)(t)},"createdAt")]})),uuid:"permissions"})]})]})}k.getInitialProps=(0,i.Z)(s().mark((function n(){return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",{});case 1:case"end":return n.stop()}}),n)}))),e.default=(0,p.Z)(k)},36717:function(n,e,t){"use strict";t.d(e,{q:function(){return s}});var i=t(75582),r=t(36288);function s(n){return Object.entries(r.K4).reduce((function(e,t){var r=(0,i.Z)(t,2),s=r[0],u=r[1];return n&Number(s)?e.concat(u):e}),[])}},65960:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/permissions",function(){return t(34331)}])}},function(n){n.O(0,[844,2083,8013,600,4636,8264,4666,5499,3684,8146,9774,2888,179],(function(){return e=65960,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
|