mage-ai 0.9.65__py3-none-any.whl → 0.9.67__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/monitors/BaseMonitor.py +38 -16
- mage_ai/api/policies/BackfillPolicy.py +1 -0
- mage_ai/api/resources/OauthResource.py +13 -5
- mage_ai/api/resources/SessionResource.py +6 -4
- mage_ai/authentication/ldap.py +19 -9
- mage_ai/authentication/oauth/constants.py +8 -14
- mage_ai/authentication/oauth/utils.py +18 -6
- mage_ai/authentication/providers/active_directory.py +21 -16
- mage_ai/authentication/providers/azure_devops.py +18 -0
- mage_ai/authentication/providers/bitbucket.py +10 -9
- mage_ai/authentication/providers/constants.py +2 -0
- mage_ai/authentication/providers/ghe.py +5 -9
- mage_ai/authentication/providers/gitlab.py +6 -9
- mage_ai/authentication/providers/google.py +9 -6
- mage_ai/authentication/providers/oidc.py +6 -4
- mage_ai/authentication/providers/okta.py +9 -6
- mage_ai/cluster_manager/kubernetes/workload_manager.py +10 -0
- mage_ai/cluster_manager/workspace/base.py +6 -1
- mage_ai/cluster_manager/workspace/kubernetes.py +3 -0
- mage_ai/data_preparation/decorators.py +15 -0
- mage_ai/data_preparation/executors/streaming_pipeline_executor.py +22 -12
- mage_ai/data_preparation/git/__init__.py +10 -1
- mage_ai/data_preparation/git/api.py +3 -0
- mage_ai/data_preparation/git/clients/azure_devops.py +106 -0
- mage_ai/data_preparation/git/clients/base.py +6 -0
- mage_ai/data_preparation/git/clients/gitlab.py +3 -2
- mage_ai/data_preparation/git/utils.py +31 -29
- mage_ai/data_preparation/models/block/__init__.py +27 -18
- mage_ai/data_preparation/models/block/dbt/block_sql.py +164 -0
- mage_ai/data_preparation/models/block/dynamic/variables.py +1 -2
- mage_ai/data_preparation/models/pipeline.py +3 -3
- mage_ai/data_preparation/models/triggers/__init__.py +6 -1
- mage_ai/data_preparation/preferences.py +42 -37
- mage_ai/data_preparation/repo_manager.py +21 -0
- mage_ai/data_preparation/storage/gcs_storage.py +27 -2
- mage_ai/data_preparation/storage/local_storage.py +18 -3
- mage_ai/data_preparation/storage/s3_storage.py +7 -2
- mage_ai/data_preparation/templates/data_loaders/streaming/generic_python.py +23 -0
- mage_ai/data_preparation/templates/main/metadata.yaml +6 -0
- mage_ai/data_preparation/templates/template.py +6 -2
- mage_ai/data_preparation/variable_manager.py +2 -1
- mage_ai/io/base.py +3 -0
- mage_ai/io/bigquery.py +2 -0
- mage_ai/io/export_utils.py +14 -9
- mage_ai/io/mssql.py +104 -25
- mage_ai/io/mysql.py +10 -9
- mage_ai/io/oracledb.py +14 -2
- mage_ai/io/postgres.py +3 -0
- mage_ai/io/sql.py +14 -6
- mage_ai/io/trino.py +10 -8
- mage_ai/orchestration/db/migrations/versions/90d978a8aef8_update_unique_constraint_for_secret.py +11 -5
- mage_ai/orchestration/db/models/schedules.py +25 -1
- mage_ai/orchestration/db/models/schedules_project_platform.py +24 -1
- mage_ai/orchestration/job_manager.py +6 -1
- mage_ai/orchestration/pipeline_scheduler_original.py +16 -10
- mage_ai/server/constants.py +1 -1
- mage_ai/server/file_observer.py +10 -0
- mage_ai/server/frontend_dist/404.html +2 -2
- mage_ai/server/frontend_dist/_next/static/chunks/{1557-a754b04510d50b80.js → 1557-01f0843dc6ac4971.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9440-4069842b90d4b801.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-1c1ffd928f5a00f7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/index-b7b8695a7f9efde2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/oauth-30e34ee15d410331.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-aaf393c86fc1bda3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{edit-8d32ac7e8f023779.js → edit-36377e679da2cd91.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-3f5c14076ddde20e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-fe08120d9a6fb1b0.js → triggers-f508c2f261297724.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-bcdb4ad41dd4c7d5.js → frontend_dist/_next/static/chunks/pages/pipelines-f99e99aa8f45529c.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{sign-in-19b36600d908b711.js → sign-in-7d38b2f7c3e918a1.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-5753fac7c1bfdc88.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{webpack-ac7fdc472bedf682.js → webpack-d079359c241db804.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/{ZMrJfDouIX5AMb_RteRbL → vPsMu6Fi2zrHaf2fRXKRO}/_buildManifest.js +1 -1
- mage_ai/server/frontend_dist/block-layout.html +2 -2
- mage_ai/server/frontend_dist/compute.html +2 -2
- mage_ai/server/frontend_dist/files.html +2 -2
- mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
- mage_ai/server/frontend_dist/global-data-products.html +2 -2
- mage_ai/server/frontend_dist/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist/global-hooks.html +2 -2
- mage_ai/server/frontend_dist/index.html +2 -2
- mage_ai/server/frontend_dist/manage/files.html +2 -2
- mage_ai/server/frontend_dist/manage/settings.html +2 -2
- mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist/manage/users/new.html +2 -2
- mage_ai/server/frontend_dist/manage/users.html +2 -2
- mage_ai/server/frontend_dist/manage.html +2 -2
- mage_ai/server/frontend_dist/oauth.html +2 -2
- mage_ai/server/frontend_dist/overview.html +2 -2
- mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist/pipelines.html +2 -2
- mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist/platform/global-hooks.html +2 -2
- mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist/settings/platform/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/platform/settings.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/permissions.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/roles.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist/settings.html +2 -2
- mage_ai/server/frontend_dist/sign-in.html +2 -2
- 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/chunks/{1557-a754b04510d50b80.js → 1557-01f0843dc6ac4971.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9440-4069842b90d4b801.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-1c1ffd928f5a00f7.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-b7b8695a7f9efde2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/oauth-30e34ee15d410331.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-aaf393c86fc1bda3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{edit-8d32ac7e8f023779.js → edit-36377e679da2cd91.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-3f5c14076ddde20e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-fe08120d9a6fb1b0.js → triggers-f508c2f261297724.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines-bcdb4ad41dd4c7d5.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-f99e99aa8f45529c.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{sign-in-19b36600d908b711.js → sign-in-7d38b2f7c3e918a1.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-5753fac7c1bfdc88.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{webpack-481689d9989710cd.js → webpack-68c003fb6a175cd7.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/{QYwFH4sievaq5XyUjRriy → khKiaJtwrslgMmp4YSa1f}/_buildManifest.js +1 -1
- mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/compute.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/files.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-data-products.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-hooks.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/files.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/oauth.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/overview.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/sign-in.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/templates.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/terminal.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/test.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/triggers.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/version-control.html +2 -2
- mage_ai/server/server.py +117 -87
- mage_ai/server/utils/output_display.py +6 -1
- mage_ai/services/aws/s3/s3.py +8 -2
- mage_ai/services/slack/slack.py +8 -8
- mage_ai/settings/__init__.py +36 -186
- mage_ai/settings/backends.py +95 -0
- mage_ai/settings/keys/__init__.py +1 -0
- mage_ai/settings/keys/auth.py +76 -0
- mage_ai/settings/server.py +187 -0
- mage_ai/shared/io.py +2 -2
- mage_ai/shared/logger.py +12 -6
- mage_ai/streaming/sources/base_python.py +30 -0
- mage_ai/streaming/sources/source_factory.py +25 -0
- mage_ai/tests/api/endpoints/test_oauths.py +13 -5
- mage_ai/tests/api/operations/test_operations.py +2 -2
- mage_ai/tests/api/operations/test_sessions.py +83 -48
- mage_ai/tests/authentication/oauth/test_utils.py +56 -6
- mage_ai/tests/authentication/providers/test_active_directory.py +9 -15
- mage_ai/tests/data_preparation/models/test_block.py +39 -2
- mage_ai/tests/orchestration/db/models/test_schedules.py +33 -1
- {mage_ai-0.9.65.dist-info → mage_ai-0.9.67.dist-info}/METADATA +2 -1
- {mage_ai-0.9.65.dist-info → mage_ai-0.9.67.dist-info}/RECORD +225 -217
- {mage_ai-0.9.65.dist-info → mage_ai-0.9.67.dist-info}/WHEEL +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9440-2bcbdc765ed82062.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-2ae1d919333f01fe.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/index-64851458dde54ad9.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/oauth-abe5ba687cb93509.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-22e49726eeed16ae.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c74507dce89b41a2.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-cf656cbe37ecaacc.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-690206d30d8b412b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9440-2bcbdc765ed82062.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-2ae1d919333f01fe.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-64851458dde54ad9.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/oauth-abe5ba687cb93509.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-22e49726eeed16ae.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-c74507dce89b41a2.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-cf656cbe37ecaacc.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-690206d30d8b412b.js +0 -1
- mage_ai/settings/sso.py +0 -27
- /mage_ai/server/frontend_dist/_next/static/{ZMrJfDouIX5AMb_RteRbL → vPsMu6Fi2zrHaf2fRXKRO}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{QYwFH4sievaq5XyUjRriy → khKiaJtwrslgMmp4YSa1f}/_ssgManifest.js +0 -0
- {mage_ai-0.9.65.dist-info → mage_ai-0.9.67.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.65.dist-info → mage_ai-0.9.67.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.65.dist-info → mage_ai-0.9.67.dist-info}/top_level.txt +0 -0
mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-b7b8695a7f9efde2.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{55006:function(n,i,e){"use strict";e.r(i);var u=e(82684),t=e(34376),a=e(40761),o=e(35686),s=e(87432),l=e(66916);i.default=function(){var n,i=(0,t.useRouter)(),e=i.asPath,r=e.split("?")[0],v=o.ZP.statuses.list().data,c=(0,u.useMemo)((function(){var n;return null===v||void 0===v||null===(n=v.statuses)||void 0===n?void 0:n[0]}),[v]),d=o.ZP.pipeline_runs.list({_limit:0}).data,f=0===(0,u.useMemo)((function(){var n;return(null===d||void 0===d||null===(n=d.metadata)||void 0===n?void 0:n.count)||0}),[null===d||void 0===d||null===(n=d.metadata)||void 0===n?void 0:n.count])?"/pipelines":"/overview";(0,u.useEffect)((function(){(0,s.xf)()&&(0,l.a3)()}),[]),(0,u.useEffect)((function(){if(c){var n=null===c||void 0===c?void 0:c.require_user_authentication,u=a.Z.isLoggedIn();if(n&&!u)i.replace("/sign-in");else{var t=null===c||void 0===c?void 0:c.is_instance_manager,o=e;"/"===r&&(o=t?"/manage":f),d&&i.replace(o)}}}),[r,e,d,c,f,i])}},48312:function(n,i,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return e(55006)}])}},function(n){n.O(0,[9774,2888,179],(function(){return i=48312,n(n.s=i);var i}));var i=n.O();_N_E=i}]);
|
mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/oauth-30e34ee15d410331.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4688],{66316:function(e,t,r){"use strict";r.d(t,{Z:function(){return v}});var n=r(82394),i=r(70613),o=r(31557),u=r(33591),c=r(38276),s=r(70515),l=r(28598);var a=function(e){var t=e.children,r=e.width,n=void 0===r?12:r;return(0,l.jsx)(c.Z,{px:s.zC,children:(0,l.jsx)(u.Row,{children:(0,l.jsx)(u.Col,{lg:n,md:Math.min(12,Math.round(1.5*(12-n))),sm:Math.min(12,Math.round(1.75*(12-n))),xs:12,children:t})})})},d=r(25976),f=r(46684),p=d.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-jcgu5l-0"})(["padding-top:","px;",""],f.Mz,(function(e){return e.fullHeight&&"\n height: calc(100vh);\n "}));function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var v=function(e){var t=e.children,r=e.headerProps,n=e.title;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.Z,{title:n}),(0,l.jsx)(o.Z,O({},r)),(0,l.jsx)(a,{children:(0,l.jsx)(p,{fullHeight:!0,children:t})})]})}},77429:function(e,t,r){"use strict";r.r(t);var n=r(77837),i=r(82394),o=r(38860),u=r.n(o),c=r(82684),s=r(34376),l=r(66316),a=r(50724),d=r(1402),f=r(35686),p=r(53808),h=r(69419),O=r(28598);function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){(0,i.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function b(){var e=(0,s.useRouter)(),t=(0,h.iV)(),r=null===t||void 0===t?void 0:t.state,n=(0,p.U2)(r),i=null===n||void 0===n?void 0:n.provider,o=t;n&&(o=j(j({},t),n));var u=f.ZP.oauths.detail(i,o).data,v=(0,c.useMemo)((function(){var e;return null===u||void 0===u||null===(e=u.oauth)||void 0===e?void 0:e.url}),[u]),b=(0,c.useState)(null),g=b[0],y=b[1];return(0,c.useEffect)((function(){if(v){var t=((0,h.iV)(v)||{}).error;t?y(t):n?((0,p.Od)(r),e.push(v)):n||y("Oauth failed due to state not matching!")}}),[n,v,e,t,r]),(0,O.jsxs)(l.Z,{title:"Oauth",children:[(0,O.jsx)(O.Fragment,{}),g&&(0,O.jsx)(a.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===y||void 0===y?void 0:y(null)},children:(0,O.jsx)(d.Z,{displayMessage:g,onClose:function(){return null===y||void 0===y?void 0:y(null)}})})]})}b.getInitialProps=(0,n.Z)(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=b},39341:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/oauth",function(){return r(77429)}])}},function(e){e.O(0,[1557,9774,2888,179],(function(){return t=39341,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6780],{74395:function(e,n,t){"use strict";t.d(n,{M:function(){return a},W:function(){return l}});var r=t(25976),i=t(46684),l=34*t(70515).iI,a=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},8955:function(e,n,t){"use strict";t.d(n,{G7:function(){return P},ZP:function(){return O},u$:function(){return x}});var r=t(75582),i=t(82394),l=t(26304),a=t(90299),c=t(9134),u=t(24138),s=t(38276),o=t(30160),d=t(75499),p=t(70515),f=t(16488),v=t(42122),b=t(28598),h=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function m(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 j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var x=44,g={uuid:"Run details"},Z={uuid:"Dependency tree"},P=[Z,g];function O(e){var n=e.height,t=e.heightOffset,i=e.pipeline,m=e.selectedRun,O=e.selectedTab,y=e.setSelectedTab,k=j({},(0,l.Z)(e,h));m?k.blockStatus=(0,f.IJ)(null===m||void 0===m?void 0:m.block_runs):k.noStatus=!0;var _=(0,v.Kn)(null===m||void 0===m?void 0:m.variables)?j({},null===m||void 0===m?void 0:m.variables):(null===m||void 0===m?void 0:m.variables)||{},w=null===m||void 0===m?void 0:m.event_variables;if(w&&(0,v.Kn)(w)&&!(0,v.Qr)(w))if((0,v.Kn)(_)&&_.hasOwnProperty("event")){var S=(0,v.Kn)(_.event)?_.event:{};_.event=j(j({},S),w)}else _.event=j({},w);var I=[];_&&JSON.stringify(_,null,2).split("\n").forEach((function(e){I.push(" ".concat(e))}));var D=m&&[["Run ID",null===m||void 0===m?void 0:m.id],["Variables",(0,b.jsx)(c.Z,{language:"json",small:!0,source:I.join("\n")},"variable_value")]],C=m&&(0,b.jsx)(s.Z,{pb:p.cd,px:p.cd,children:(0,b.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:D.map((function(e,n){var t=(0,r.Z)(e,2),i=t[0],l=t[1];return[(0,b.jsx)(o.ZP,{monospace:!0,muted:!0,children:i},"key_".concat(n)),(0,b.jsx)(o.ZP,{monospace:!0,textOverflow:!0,children:l},"val_".concat(n))]})),uuid:"LogDetail"})}),E=O&&y;return(0,b.jsxs)(b.Fragment,{children:[E&&(0,b.jsx)(a.Z,{onClickTab:y,selectedTabUUID:null===O||void 0===O?void 0:O.uuid,tabs:P,underlineStyle:!0}),(!E||Z.uuid===(null===O||void 0===O?void 0:O.uuid))&&(0,b.jsx)(u.ZP,j(j({},k),{},{height:n,heightOffset:(t||0)+(E?x:0),pipeline:i})),g.uuid===(null===O||void 0===O?void 0:O.uuid)&&C]})}},8916:function(e,n,t){"use strict";t.d(n,{FS:function(){return s},JZ:function(){return p},Tt:function(){return d},e7:function(){return f},wx:function(){return o}});var r=t(75582),i=t(82394),l=t(83784),a=t(30229);function c(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 u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e){return"string"===typeof e?e:JSON.stringify(e)}function o(e,n){var t,r;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(r=t.variables)||void 0===r?void 0:r.map((function(e){var n=e.value;return u(u({},e),{},{value:s(n)})}))}function d(e){var n;return null===(n=o(e,(function(e){return e.uuid===l.C})))||void 0===n?void 0:n.reduce((function(e,n){var t=n.uuid,r=n.value;return u(u({},e),{},(0,i.Z)({},t,r))}),{})}function p(e,n){return n===a.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===a.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function f(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),l=t[0],a=t[1],c=a;try{c=JSON.parse(a)}catch(s){}return u(u({},e),{},(0,i.Z)({},l,c))}),{}):e}},88785:function(e,n,t){"use strict";t.d(n,{J:function(){return u},U:function(){return c}});var r=t(25976),i=t(44897),l=t(42631),a=t(70515),c=r.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],l.TR,14*a.iI,a.cd*a.iI,a.cd*a.iI,40*a.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||i.Z.interactive).linkPrimary,";\n ")})),u=r.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],l.n_,a.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*a.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*a.iI,"px;\n ")}))},37899:function(e,n,t){"use strict";var r=t(82394),i=t(75582),l=t(82684),a=t(71180),c=t(15338),u=t(97618),s=t(55485),o=t(38276),d=t(75499),p=t(30160),f=t(35576),v=t(17488),b=t(72473),h=t(70515),m=t(42122),j=t(81728),x=t(28598);function g(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 Z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?g(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){e.borderless,e.compact;var n=e.enableVariablesOverwrite,t=e.originalVariables,g=e.runtimeVariables,P=(e.setEnableVariablesOverwrite,e.setRuntimeVariables),O=(0,l.useState)({}),y=O[0],k=O[1],_=(0,l.useState)(null),w=_[0],S=_[1],I=(0,l.useState)(null),D=I[0],C=I[1];(0,l.useEffect)((function(){var e=Object.entries(g||{}).reduce((function(e,n){var t=(0,i.Z)(n,2),l=t[0],a=t[1],c=(0,j.Pb)(a)&&"object"===typeof JSON.parse(a)&&!Array.isArray(JSON.parse(a))&&null!==JSON.parse(a);return Z(Z({},e),{},(0,r.Z)({},l,c))}),{});k(e)}),[]);var E=function(e,n){var t={borderless:!0,key:"variable_uuid_input_".concat(e),monospace:!0,onChange:function(n){n.preventDefault(),P((function(t){return Z(Z({},t),{},(0,r.Z)({},e,n.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:n};return y[e]?(0,x.jsx)(f.Z,Z(Z({},t),{},{rows:1,value:n})):(0,x.jsx)(v.Z,Z({},t))};return(0,x.jsxs)(x.Fragment,{children:[n&&g&&Object.entries(g).length>0&&(0,x.jsx)(d.Z,{columnFlex:[null,1,null],columns:[{uuid:"Variable"},{uuid:"Value"},{label:function(){return""},uuid:"Action"}],rows:Object.entries(g).map((function(e){var n=(0,i.Z)(e,2),r=n[0],l=n[1];return[(0,x.jsx)(p.ZP,{default:!0,monospace:!0,children:r},"variable_".concat(r)),E(r,l),!(null!==t&&void 0!==t&&t[r])&&(0,x.jsx)(a.ZP,{iconOnly:!0,onClick:function(){P((function(e){return(0,m.gR)(e,[r])}))},children:(0,x.jsx)(b.Trash,{default:!0})})]}))}),(0,x.jsx)(o.Z,{p:h.cd,children:(0,x.jsxs)(s.ZP,{alignItems:"center",children:[(0,x.jsx)(u.Z,{flex:1,children:(0,x.jsx)(v.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return S(e.target.value)},placeholder:"New variable UUID",value:w||""})}),(0,x.jsx)(o.Z,{mr:1}),(0,x.jsx)(u.Z,{flex:1,children:(0,x.jsx)(v.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return C(e.target.value)},placeholder:"Variable value",value:D||""})}),(0,x.jsx)(o.Z,{mr:1}),(0,x.jsx)(a.ZP,{beforeIcon:(0,x.jsx)(b.Add,{}),disabled:!w||!D,onClick:function(){P((function(e){return Z(Z({},e),{},(0,r.Z)({},w,D))})),S(null),C(null)},children:"Add runtime variable"})]})}),(0,x.jsx)(c.Z,{light:!0})]})}},55072:function(e,n,t){"use strict";t.d(n,{Et:function(){return p},Q:function(){return d}});t(82684);var r=t(71180),i=t(55485),l=t(38276),a=t(31748),c=t(72473),u=t(79633),s=t(70515),o=t(28598),d=30,p=9;n.ZP=function(e){var n=e.page,t=e.maxPages,d=e.onUpdate,p=e.totalPages,f=[],v=t;if(v>p)f=Array.from({length:p},(function(e,n){return n}));else{var b=Math.floor(v/2),h=n-b;n+b>=p?(h=p-v+2,v-=2):n-b<=0?(h=0,v-=2):(v-=4,h=n-Math.floor(v/2)),f=Array.from({length:v},(function(e,n){return n+h}))}return(0,o.jsx)(o.Fragment,{children:p>0&&(0,o.jsxs)(i.ZP,{alignItems:"center",children:[(0,o.jsx)(r.ZP,{disabled:0===n,onClick:function(){return d(n-1)},children:(0,o.jsx)(c.PaginateArrowLeft,{size:1.5*s.iI,stroke:a.Av})}),!f.includes(0)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(l.Z,{ml:1,children:(0,o.jsx)(r.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return d(0)},children:1})},0),!f.includes(1)&&(0,o.jsx)(l.Z,{ml:1,children:(0,o.jsx)(r.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0)]}),f.map((function(e){return(0,o.jsx)(l.Z,{ml:1,children:(0,o.jsx)(r.ZP,{backgroundColor:e===n&&u.a$,borderLess:!0,noBackground:!0,notClickable:e===n,onClick:function(){e!==n&&d(e)},children:e+1})},e)})),!f.includes(p-1)&&(0,o.jsxs)(o.Fragment,{children:[!f.includes(p-2)&&(0,o.jsx)(l.Z,{ml:1,children:(0,o.jsx)(r.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0),(0,o.jsx)(l.Z,{ml:1,children:(0,o.jsx)(r.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return d(p-1)},children:p})},p-1)]}),(0,o.jsx)(l.Z,{ml:1}),(0,o.jsx)(r.ZP,{disabled:n===p-1,onClick:function(){return d(n+1)},children:(0,o.jsx)(c.PaginateArrowRight,{size:1.5*s.iI,stroke:a.Av})})]})})}},83641:function(e,n,t){"use strict";t.d(n,{I7:function(){return r},IB:function(){return u},VV:function(){return l},_7:function(){return a},rn:function(){return c}});var r,i=t(41143),l="datetime",a="code",c=i.V;!function(e){e.SECOND="second",e.MINUTE="minute",e.HOUR="hour",e.DAY="day",e.WEEK="week",e.MONTH="month",e.YEAR="year",e.CUSTOM="custom"}(r||(r={}));var u=[r.MINUTE,r.HOUR,r.DAY,r.WEEK,r.MONTH,r.YEAR]},83784:function(e,n,t){"use strict";t.d(n,{C:function(){return r}});var r="global"},14805:function(e,n,t){"use strict";var r=t(82394),i=t(44495),l=t(55485),a=t(44085),c=t(38276),u=t(30160),s=t(88785),o=t(70515),d=t(86735),p=t(28598);function f(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 v(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.localTime,t=e.selectedDate,r=e.selectedTime,f=e.setSelectedDate,b=e.setSelectedTime,h=e.topPosition;return(0,p.jsxs)(s.J,{absolute:!0,topPosition:h,children:[(0,p.jsx)(i.ZP,{onChange:f,value:t}),(0,p.jsx)(c.Z,{mb:2}),(0,p.jsxs)(l.ZP,{alignItems:"center",children:[(0,p.jsxs)(u.ZP,{default:!0,large:!0,children:["Time (",n?"Local":"UTC","):"]}),(0,p.jsx)(c.Z,{pr:2}),(0,p.jsx)(a.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),b((function(n){return v(v({},n),{},{hour:e.target.value})}))},paddingRight:5*o.iI,placeholder:"HH",value:null===r||void 0===r?void 0:r.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(c.Z,{px:1,children:(0,p.jsx)(u.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(a.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),b((function(n){return v(v({},n),{},{minute:e.target.value})}))},paddingRight:5*o.iI,placeholder:"MM",value:null===r||void 0===r?void 0:r.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},79500:function(e,n,t){"use strict";t.d(n,{a:function(){return l}});var r=t(16488),i=t(3917);function l(e,n){var t,l;if(null!==n&&void 0!==n&&n.localTimezone)t=(0,i.n$)(e),l={hour:(0,i.lJ)(String(t.getHours())),minute:(0,i.lJ)(String(t.getMinutes()))};else{var a=e.split(" ")[1];t=(0,r.eI)(e),l={hour:a.substring(0,2),minute:a.substring(3,5)}}return{date:t,time:l}}},9134:function(e,n,t){"use strict";var r=t(82684),i=t(21124),l=t(68432),a=t(25976),c=t(65292),u=t(44897),s=t(95363),o=t(70515),d=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,p=e.showLineNumbers,f=e.small,v=e.source,b=e.wrapLines,h=(0,r.useContext)(a.ThemeContext);function m(e){var r=e.value;return(0,d.jsx)(l.Z,{customStyle:{backgroundColor:(h.background||u.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:s.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,maxWidth:t,paddingBottom:2*o.iI,paddingTop:2*o.iI},language:n,lineNumberStyle:{color:(h.content||u.Z.content).muted},showLineNumbers:p,style:c._4,useInlineStyles:!0,wrapLines:b,children:r})}return(0,d.jsx)(i.D,{components:{code:function(e){var n=e.children;return(0,d.jsx)(m,{value:n})}},children:v})}},51532:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return se}});var r=t(75582),i=t(77837),l=t(82394),a=t(38860),c=t.n(a),u=t(82684),s=t(69864),o=t(34376),d=t(83641),p=t(71180),f=t(15338),v=t(55485),b=t(85854),h=t(55072),m=t(75457),j=t(27966),x=t(44265),g=t(83784),Z=t(44085),P=t(38276),O=t(4190),y=t(75499),k=t(30160),_=t(35686),w=t(8955),S=t(72473),I=t(74395),D=t(70515),C=t(28795),E=t(81728),T=t(16488),M=t(8916),N=t(81655),A=t(15610),L=t(42122),F=t(50178),V=t(72619),R=t(95924),U=t(69419),B=t(70320),H=t(28598);function z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function J(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?z(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Y=function(e){var n=e.backfill,t=e.errors,i=e.fetchBackfill,l=e.pipeline,a=e.setErrors,c=e.variables,z=(0,F.Ct)(),Y=(0,B.qB)(),K=(0,o.useRouter)(),W=n||{},X=W.block_uuid,Q=W.end_datetime,q=W.id,G=W.interval_type,$=W.interval_units,ee=W.name,ne=W.pipeline_run_dates,te=W.start_datetime,re=W.status,ie=W.total_run_count,le=W.variables,ae=void 0===le?{}:le,ce=l.uuid,ue=(0,U.iV)(),se={_limit:40,_offset:40*(null!==ue&&void 0!==ue&&ue.page?ue.page:0)};null!==ue&&void 0!==ue&&ue.status&&(se.status=ue.status);var oe=_.ZP.pipeline_runs.list(J(J({},se),{},{backfill_id:q}),{refreshInterval:3e3,revalidateOnFocus:!0},{pauseFetch:!q}),de=oe.data,pe=oe.mutate,fe=!(te&&Q&&G&&$),ve=!re,be=(0,u.useMemo)((function(){return(ve?ne:null===de||void 0===de?void 0:de.pipeline_runs)||[]}),[de,ne,ve]),he=(0,u.useMemo)((function(){var e;return ve?ie:null===de||void 0===de||null===(e=de.metadata)||void 0===e?void 0:e.count}),[de,ve,ie]),me=(0,u.useState)(null),je=me[0],xe=me[1],ge=(0,u.useMemo)((function(){var e=null!==ue&&void 0!==ue&&ue.page?ue.page:0;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(j.Z,{disableRowSelect:ve,emptyMessage:null!==ue&&void 0!==ue&&ue.status||re?"No runs available":'No runs available. Please complete backfill configuration by clicking "Edit backfill" above.',fetchPipelineRuns:pe,onClickRow:function(e){return xe((function(n){var t=be[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:be,selectedRun:je,setErrors:a,setSelectedRun:xe}),(0,H.jsx)(P.Z,{p:2,children:(0,H.jsx)(h.ZP,{maxPages:9,onUpdate:function(e){var n=Number(e),t=J(J({},ue),{},{page:n>=0?n:0});K.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(ce,"/backfills/").concat(q,"?").concat((0,U.uM)(t)))},page:Number(e),totalPages:Math.ceil(he/40)})})]})}),[pe,q,be,ce,ue,K,je,a,ve,he]),Ze=(0,u.useState)(w.G7[0]),Pe=Ze[0],Oe=Ze[1],ye=(0,s.Db)(_.ZP.backfills.useUpdate(q),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){i(),pe()},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),ke=(0,r.Z)(ye,2),_e=ke[0],we=ke[1].isLoading,Se=(0,u.useMemo)((function(){return!!re&&(d.rn.CANCELLED!==re&&d.rn.FAILED!==re)}),[re]),Ie=(0,u.useMemo)((function(){return re&&d.rn.CANCELLED!==re&&d.rn.FAILED!==re&&d.rn.INITIAL!==re&&d.rn.RUNNING!==re}),[re]),De=(0,u.useMemo)((function(){var e={default:!0,size:1.5*D.iI},n=[[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.MultiShare,J({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"Backfill type"})]},"backfill_type_label"),(0,H.jsx)(k.ZP,{monospace:!0,children:X?d._7:d.VV},"backfill_type")],[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.Switch,J({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"Status"})]},"backfill_status_label"),(0,u.createElement)(k.ZP,J(J({},(0,N.NC)(re)),{},{key:"backfill_status"}),re||"inactive")]];return X||n.push.apply(n,[[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.CalendarDate,J({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"Start date and time"})]},"backfill_start_date_label"),(0,H.jsx)(k.ZP,{monospace:!0,small:!0,children:(0,T.Uc)(te,Y)},"backfill_start_date")],[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.CalendarDate,J({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"End date and time"})]},"backfill_end_date_label"),(0,H.jsx)(k.ZP,{monospace:!0,small:!0,children:(0,T.Uc)(Q,Y)},"backfill_end_date")],[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.Schedule,J({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"Interval type"})]},"interval_type_label"),(0,H.jsx)(k.ZP,{monospace:!0,children:G&&(0,E.kC)(G)},"interval_type")],[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.Schedule,J({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"Interval units"})]},"interval_units_label"),(0,H.jsx)(k.ZP,{monospace:!0,children:$},"interval_units")],[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.NumberHash,J({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"Total runs"})]},"total_runs_label"),(0,H.jsx)(k.ZP,{monospace:!0,children:ie},"total_runs")]]),(0,H.jsx)(y.Z,{columnFlex:[null,1],rows:n})}),[X,Y,Q,G,$,te,re,ie]),Ce=(0,u.useMemo)((function(){return ae||{}}),[ae]),Ee=(0,u.useMemo)((function(){var e=(0,M.wx)(c,(function(e){return e.uuid===g.C}))||[];return(0,L.Qr)(Ce)||Object.entries(Ce).forEach((function(n){var t=(0,r.Z)(n,2),i=t[0],l=t[1],a=e.findIndex((function(e){return(null===e||void 0===e?void 0:e.uuid)===i}));-1!==a?e.splice(a,1,{uuid:i,value:(0,M.FS)(l)}):e.push({uuid:i,value:(0,M.FS)(l)})})),"undefined"!==typeof e&&null!==e&&void 0!==e&&e.length?(0,H.jsx)(y.Z,{columnFlex:[null,1],rows:e.map((function(e){var n=e.uuid,t=e.value;return[(0,H.jsx)(k.ZP,{default:!0,monospace:!0,small:!0,children:n},"settings_variable_label_".concat(n)),(0,H.jsx)(k.ZP,{monospace:!0,small:!0,children:t},"settings_variable_".concat(n))]}))}):null}),[Ce,c]);return(0,H.jsx)(H.Fragment,{children:(0,H.jsxs)(m.Z,{afterHidden:!je,before:(0,H.jsxs)(I.M,{children:[(0,H.jsxs)(P.Z,{mb:D.HN,pt:D.cd,px:D.cd,children:[(0,H.jsx)(P.Z,{mb:D.cd,children:(0,H.jsx)(S.Backfill,{size:5*D.iI})}),(0,H.jsx)(b.Z,{children:ee})]}),(0,H.jsx)(P.Z,{px:D.cd,children:(0,H.jsx)(b.Z,{level:5,children:"Settings"})}),(0,H.jsx)(f.Z,{light:!0,mt:1,short:!0}),De,Ee&&(0,H.jsxs)(P.Z,{my:D.HN,children:[(0,H.jsx)(P.Z,{px:D.cd,children:(0,H.jsx)(b.Z,{level:5,children:"Runtime variables"})}),(0,H.jsx)(f.Z,{light:!0,mt:1,short:!0}),Ee]})]}),beforeWidth:34*D.iI,breadcrumbs:[{label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(ce,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{label:function(){return ee},linkProps:{as:"/pipelines/".concat(ce,"/backfills/").concat(q),href:"/pipelines/[pipeline]/backfills/[...slug]"}}],buildSidekick:function(e){return(0,w.ZP)(J(J({},e),{},{selectedRun:je,selectedTab:Pe,setSelectedTab:Oe}))},errors:t,pageName:C.M.BACKFILLS,pipeline:l,setErrors:a,subheader:(0,H.jsxs)(v.ZP,{alignItems:"center",children:[!Ie&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(p.ZP,{beforeIcon:Se?(0,H.jsx)(S.Pause,{size:2*D.iI}):(0,H.jsx)(S.PlayButtonFilled,{inverted:!(d.rn.CANCELLED===re||d.rn.FAILED===re),size:2*D.iI}),danger:Se,disabled:fe,loading:we,onClick:function(e){(0,R.j)(e),_e({backfill:{status:Se?d.rn.CANCELLED:d.rn.INITIAL}})},outline:!0,success:!Se&&!(d.rn.CANCELLED===re||d.rn.FAILED===re)&&!fe,children:Se?"Cancel backfill":d.rn.CANCELLED===re||d.rn.FAILED===re?"Retry backfill":"Start backfill"}),(0,H.jsx)(P.Z,{mr:D.cd})]}),!z&&(0,H.jsxs)(H.Fragment,{children:[re===x.VO.COMPLETED?(0,H.jsx)(k.ZP,{bold:!0,default:!0,large:!0,children:"Filter runs by status:"}):(0,H.jsx)(p.ZP,{linkProps:{as:"/pipelines/".concat(ce,"/backfills/").concat(q,"/edit"),href:"/pipelines/[pipeline]/backfills/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit backfill"}),(0,H.jsx)(P.Z,{mr:D.cd})]}),!ve&&(0,H.jsxs)(Z.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?K.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(ce,"/backfills/").concat(q)):(0,A.u)({page:0,status:e.target.value})},paddingRight:4*D.iI,placeholder:"Select run status",value:(null===ue||void 0===ue?void 0:ue.status)||"all",children:[(0,H.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),x.IK.map((function(e){return(0,H.jsx)("option",{value:e,children:x.Do[e]},e)}))]})]}),title:function(){return ee},uuid:"backfill/detail",children:[(0,H.jsx)(P.Z,{mt:D.cd,px:D.cd,children:(0,H.jsx)(b.Z,{level:5,children:"Runs for this backfill"})}),(0,H.jsx)(f.Z,{light:!0,mt:D.cd,short:!0}),de?ge:(0,H.jsx)(P.Z,{m:2,children:(0,H.jsx)(O.Z,{inverted:!0})})]})})},K=t(14805),W=t(50724),X=t(97618),Q=t(37899),q=t(17488),G=[{label:function(){return"Date and time window"},description:function(){return"Backfill between a date and time range."},uuid:d.VV}],$=t(88785),ee=t(79500);function ne(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 te(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ne(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ne(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var re=function(e){var n=e.backfill,t=e.errors,i=e.fetchBackfill,l=e.pipeline,a=e.setErrors,c=e.variables,h=(0,o.useRouter)(),j=(0,B.qB)(),x=(0,u.useState)(),g=x[0],O=x[1],w=(0,u.useState)(),I=w[0],N=w[1],A=g||{},F=A.block_uuid,R=A.id,U=A.interval_type,z=A.interval_units,J=A.name,Y=l.uuid,ne=(0,u.useMemo)((function(){return(0,L.Qr)((null===n||void 0===n?void 0:n.variables)||{})?(0,M.Tt)(c)||{}:(0,L.Xc)(n.variables,(function(e){return(0,M.FS)(e)}))}),[null===n||void 0===n?void 0:n.variables,c]),re=(0,u.useState)(!0),ie=re[0],le=re[1],ae=(0,u.useState)(ne),ce=ae[0],ue=ae[1],se=(0,u.useState)(F?d._7:d.VV),oe=se[0],de=se[1],pe=(0,u.useState)(!1),fe=pe[0],ve=pe[1],be=(0,u.useState)(!1),he=be[0],me=be[1],je=(0,u.useState)(null),xe=je[0],ge=je[1],Ze=(0,u.useState)(null),Pe=Ze[0],Oe=Ze[1],ye=(0,u.useState)({hour:"00",minute:"00"}),ke=ye[0],_e=ye[1],we=(0,u.useState)({hour:"00",minute:"00"}),Se=we[0],Ie=we[1];(0,u.useEffect)((function(){if(n){O(n);var e=n.start_datetime;if(e){var t=(0,ee.a)(e,{localTimezone:j});Oe(null===t||void 0===t?void 0:t.date),Ie(t.time)}var r=n.end_datetime;if(r){var i=(0,ee.a)(r,{localTimezone:j});ge(null===i||void 0===i?void 0:i.date),_e(null===i||void 0===i?void 0:i.time)}}}),[j,n]),(0,u.useEffect)((function(){!I&&null!==g&&void 0!==g&&g.settings&&N(g.settings)}),[I,null===g||void 0===g?void 0:g.settings]);var De=(0,u.useMemo)((function(){var e=[[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.Alphabet,{default:!0}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"Backfill name"})]},"model_name_detail"),(0,H.jsx)(q.Z,{monospace:!0,onChange:function(e){e.preventDefault(),O((function(n){return te(te({},n),{},{name:e.target.value})}))},placeholder:"Name this backfill",value:J},"model_name_input_detail")]];return d.VV===oe&&e.push.apply(e,[[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.CalendarDate,{default:!0}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,H.jsxs)("div",{style:{minHeight:"".concat(5.75*D.iI,"px")},children:[!fe&&(0,H.jsx)(q.Z,{monospace:!0,onClick:function(){return ve((function(e){return!e}))},onFocus:function(){return ve(!0)},placeholder:"YYYY-MM-DD HH:MM",value:Pe?(0,T.XM)(Pe,Se,{localTimezone:j}):""}),(0,H.jsx)("div",{style:{width:"400px"},children:(0,H.jsx)(W.Z,{disableEscape:!0,onClickOutside:function(){return ve(!1)},open:fe,style:{position:"relative"},children:(0,H.jsx)(K.Z,{localTime:j,selectedDate:Pe,selectedTime:Se,setSelectedDate:Oe,setSelectedTime:Ie,topPosition:!0})})})]},"start_time_input")],[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.CalendarDate,{default:!0}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"End date and time"})]},"end_time"),(0,H.jsxs)("div",{style:{minHeight:"".concat(5.75*D.iI,"px")},children:[!he&&(0,H.jsx)(q.Z,{monospace:!0,onClick:function(){return me((function(e){return!e}))},onFocus:function(){return me(!0)},placeholder:"YYYY-MM-DD HH:MM",value:xe?(0,T.XM)(xe,ke,{localTimezone:j}):""}),(0,H.jsx)("div",{style:{width:"400px"},children:(0,H.jsx)(W.Z,{disableEscape:!0,onClickOutside:function(){return me(!1)},open:he,style:{position:"relative"},children:(0,H.jsx)(K.Z,{localTime:j,selectedDate:xe,selectedTime:ke,setSelectedDate:ge,setSelectedTime:_e,topPosition:!0})})})]},"end_time_input")],[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.Schedule,{default:!0}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"Interval type"})]},"interval_type"),(0,H.jsx)(Z.Z,{monospace:!0,onChange:function(e){e.preventDefault(),O((function(n){return te(te({},n),{},{interval_type:e.target.value})}))},placeholder:"Time spacing between each backfill",value:U,children:d.IB.map((function(e){return(0,H.jsx)("option",{value:e,children:(0,E.kC)(e)},e)}))},"interval_type_input")],[(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.Schedule,{default:!0}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"Interval units"})]},"interval_units"),(0,H.jsx)(q.Z,{disabled:!U,minValue:1,monospace:!0,onChange:function(e){e.preventDefault();var n=+e.target.value;O((function(e){return te(te({},e),{},{interval_units:n<1?1:n})}))},placeholder:U?"Number of ".concat(U).concat(U!==d.I7.CUSTOM?"s":""," between each backfill"):"Interval type is required",type:"number",value:z},"interval_unit_input")]]),(0,L.Qr)(ne)||e.push([(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(S.Variables,{default:!0}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(k.ZP,{default:!0,children:"Runtime variables"})]},"overwrite_runtime_variables"),(0,H.jsx)(Q.Z,{borderless:!0,compact:!0,enableVariablesOverwrite:ie,runtimeVariables:ce,setEnableVariablesOverwrite:le,setRuntimeVariables:ue},"overwrite_runtime_variables_table")]),e.push([(0,H.jsx)(v.ZP,{alignItems:"center",children:(0,H.jsx)(k.ZP,{default:!0,children:"Max concurrent runs"})},"concurrency"),(0,H.jsx)(q.Z,{minValue:1,monospace:!0,onChange:function(e){e.preventDefault(),N((function(n){return te(te({},n),{},{pipeline_run_limit:e.target.value})}))},type:"number",value:null===I||void 0===I?void 0:I.pipeline_run_limit},"concurrency_input")]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(P.Z,{mb:2,px:D.cd,children:(0,H.jsx)(b.Z,{children:"Settings"})}),(0,H.jsx)(f.Z,{light:!0,short:!0}),(0,H.jsx)(y.Z,{columnFlex:[null,1],rows:e})]})}),[xe,Pe,j,ie,U,z,J,ce,ne,null===I||void 0===I?void 0:I.pipeline_run_limit,oe,fe,he,ke,Se]),Ce=(0,s.Db)(_.ZP.backfills.useUpdate(R),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){i(),h.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(Y,"/backfills/").concat(R))},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),Ee=(0,r.Z)(Ce,2),Te=Ee[0],Me=Ee[1].isLoading,Ne=(0,u.useCallback)((function(){var e=te(te({},(0,L.GL)(g,["name"])),{},{end_datetime:null,interval_type:null,interval_units:null,settings:I,start_datetime:null,variables:ie?(0,M.e7)(ce):{}});return d._7===oe||(e.interval_type=U,e.interval_units=z,e.end_datetime=xe&&null!==ke&&void 0!==ke&&ke.hour&&null!==ke&&void 0!==ke&&ke.minute?(0,T.XM)(xe,ke,{convertToUtc:j,includeSeconds:!0,localTimezone:j}):null,e.start_datetime=Pe&&null!==Se&&void 0!==Se&&Se.hour&&null!==Se&&void 0!==Se&&Se.minute?(0,T.XM)(Pe,Se,{convertToUtc:j,includeSeconds:!0,localTimezone:j}):null),Te({backfill:e})}),[xe,Pe,j,ie,U,z,g,ce,I,oe,ke,Se,Te]),Ae=(0,u.useMemo)((function(){return d._7===oe?!F:!(xe&&Pe&&U&&z)}),[F,xe,Pe,U,z,oe]);return(0,H.jsxs)(m.Z,{breadcrumbs:[{label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(Y,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{label:function(){return null===g||void 0===g?void 0:g.name},linkProps:{as:"/pipelines/".concat(Y,"/backfills/").concat(R),href:"/pipelines/[pipeline]/backfills/[...slug]"}}],errors:t,pageName:C.M.BACKFILLS,pipeline:l,setErrors:a,subheader:(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(p.ZP,{disabled:Ae,loading:Me,onClick:Ne,outline:!0,primary:!0,children:"Save changes"}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(p.ZP,{linkProps:{href:"/pipelines/[pipeline]/backfills/[...slug]",as:"/pipelines/".concat(Y,"/backfills/").concat(R)},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"})]}),title:function(){return"Edit ".concat(null===g||void 0===g?void 0:g.name)},uuid:"backfill/edit",children:[(0,H.jsxs)(P.Z,{p:D.cd,children:[(0,H.jsxs)(P.Z,{mb:2,children:[(0,H.jsx)(b.Z,{children:"Backfill type"}),(0,H.jsx)(k.ZP,{muted:!0,children:"How would you like this pipeline to be backfilled?"})]}),(0,H.jsx)(v.ZP,{children:G.map((function(e){var n=e.label,t=e.description,r=e.uuid,i=oe===r,l=oe&&!i;return(0,H.jsx)(p.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){de(r)},children:(0,H.jsx)($.U,{selected:i,children:(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(X.Z,{children:(0,H.jsx)("input",{checked:i,type:"radio"})}),(0,H.jsx)(P.Z,{mr:D.cd}),(0,H.jsxs)(X.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,H.jsx)(b.Z,{bold:!0,default:!i&&!l,level:5,muted:!i&&l,children:n()}),(0,H.jsx)(k.ZP,{default:!i&&!l,leftAligned:!0,muted:l,children:t()})]})]})})},r)}))})]}),(0,H.jsx)(P.Z,{mt:5,children:De})]})},ie=t(93808),le=t(98464);function ae(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 ce(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ae(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ae(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function ue(e){var n=e.backfillId,t=e.pipelineUUID,r=e.subpath,i=(0,u.useState)(null),l=i[0],a=i[1],c=_.ZP.variables.pipelines.list(t,{},{revalidateOnFocus:!1}).data,s=(0,u.useMemo)((function(){return null===c||void 0===c?void 0:c.variables}),[c]),o=_.ZP.pipelines.detail(t,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,d=(0,u.useMemo)((function(){return ce(ce({},null===o||void 0===o?void 0:o.pipeline),{},{uuid:t})}),[o,t]),p=(0,U.iV)(),f={_limit:40,_offset:40*(null!==p&&void 0!==p&&p.page?p.page:0),include_preview_runs:!0},v=_.ZP.backfills.detail(n,ce({},f),{revalidateOnFocus:!0}),b=v.data,h=v.mutate,m=(0,u.useMemo)((function(){return null===b||void 0===b?void 0:b.backfill}),[b]),j=(0,le.Z)(p);return(0,u.useEffect)((function(){(null===j||void 0===j?void 0:j.page)!==(null===p||void 0===p?void 0:p.page)&&h()}),[h,p,j]),"edit"===r?(0,H.jsx)(re,{backfill:m,errors:l,fetchBackfill:h,pipeline:d,setErrors:a,variables:s}):(0,H.jsx)(Y,{backfill:m,errors:l,fetchBackfill:h,pipeline:d,setErrors:a,variables:s})}ue.getInitialProps=function(){var e=(0,i.Z)(c().mark((function e(n){var t,i,l,a,u,s;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.query,i=t.pipeline,l=t.slug,!Array.isArray(l)){e.next=4;break}return a=(0,r.Z)(l,2),u=a[0],s=a[1],e.abrupt("return",{backfillId:u,pipelineUUID:i,subpath:s});case 4:return e.abrupt("return",{pipelineUUID:i});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var se=(0,ie.Z)(ue)},53664:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/backfills/[...slug]",function(){return t(51532)}])}},function(e){e.O(0,[9161,7674,1557,3782,7966,9774,2888,179],(function(){return n=53664,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([[8450],{16488:function(e,n,t){"use strict";t.d(n,{IJ:function(){return b},M8:function(){return E},Uc:function(){return j},XM:function(){return y},_U:function(){return v},eI:function(){return k},gU:function(){return w},lO:function(){return T},ri:function(){return h},tL:function(){return _},vJ:function(){return g},xH:function(){return O}});var r,i=t(82394),u=t(92083),o=t.n(u),l=t(3917),c=t(4383),a=t(30229),s=t(42122),f=t(86735);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 p(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,i.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 v=function(e){return!!e&&!Object.values(a.U5).includes(e)};function b(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var t=n.block_uuid,r=n.completed_at,u=n.started_at,l=n.status,c=null;u&&r&&(c=o()(r).valueOf()-o()(u).valueOf());return p(p({},e),{},(0,i.Z)({},t,{runtime:c,status:l}))}),{})}var m,h=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 O(e){var n=(0,s.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 k(e){return e?new Date(o()(e).valueOf()):null}function j(e,n){return n?(0,l.XG)(e,n):function(e){if("string"!==typeof e)return e;var n=e.split("+")[0];return o()(k(n)).format(l.Nx)}(e)}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(m||(m={}));var _=(r={},(0,i.Z)(r,m.DAY,86400),(0,i.Z)(r,m.HOUR,3600),(0,i.Z)(r,m.MINUTE,60),(0,i.Z)(r,m.SECOND,1),r);function w(e){var n=m.SECOND,t=e;return e%86400===0?(t/=86400,n=m.DAY):e%3600===0?(t/=3600,n=m.HOUR):e%60===0&&(t/=60,n=m.MINUTE),{time:t,unit:n}}function g(e,n){return e*_[n]}function y(e,n,t){var r,i=o()(e);return 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(l.TD),null!==t&&void 0!==t&&t.includeSeconds&&(r=r.concat(":00")),null!==t&&void 0!==t&&t.localTimezone&&(r=i.format(l.lE),null!==t&&void 0!==t&&t.convertToUtc&&(r=(0,l.d$)(r,{includeSeconds:null===t||void 0===t?void 0:t.includeSeconds,utcFormat:!0}))),r}function E(e){var n,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",i=!0;return i&&(t?r="".concat(window.origin,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/api_trigger"):(r="".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&&(r="".concat(r,"/").concat(e.token)))),i&&(n=window.location.port)&&(r=r.replace(n,c.QT)),r}function P(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 u=0;u>n;u--)0===r?(r=t.length-1,i-=1):r-=1;else if(n>0)for(var o=0;o<n;o++)r===t.length-1?(r=0,i+=1):r+=1;var l="number"===typeof t[r]?t[r]:e;return{additionalOffset:i,cronValue:String(l)}}(+e,n,t)}var Z=(0,f.m5)(60),x=(0,f.m5)(24),D=(0,l.Cs)();function T(e,n){if(!e)return e;var t=o()().local().format("Z"),r=t.split(":"),i="-"===t[0],u=3===r[0].length?Number(r[0].slice(1)):Number(r[0]),l=Number(r[1]);(i&&!n||!i&&n)&&(u=-u,l=-l);var c=e.split(" "),a=c[0],s=c[1],f=c[2],d=P(a,l,Z),p=P(s,u+d.additionalOffset,x);if(c[0]=d.cronValue,c[1]=p.cronValue,0!==(null===p||void 0===p?void 0:p.additionalOffset)){var v=P(f,p.additionalOffset,D);c[2]=v.cronValue}return c.join(" ")}},83641:function(e,n,t){"use strict";t.d(n,{I7:function(){return r},IB:function(){return c},VV:function(){return u},_7:function(){return o},rn:function(){return l}});var r,i=t(41143),u="datetime",o="code",l=i.V;!function(e){e.SECOND="second",e.MINUTE="minute",e.HOUR="hour",e.DAY="day",e.WEEK="week",e.MONTH="month",e.YEAR="year",e.CUSTOM="custom"}(r||(r={}));var c=[r.MINUTE,r.HOUR,r.DAY,r.WEEK,r.MONTH,r.YEAR]},4303:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return z}});var r=t(77837),i=t(75582),u=t(38860),o=t.n(u),l=t(82684),c=t(69864),a=t(34376),s=t(82394),f=t(12691),d=t.n(f),p=t(83641),v=t(71180),b=t(55485),m=t(48670),h=t(75499),O=t(30160),k=t(35686),j=t(50724),_=t(89515),w=t(38276),g=t(81655),y=t(72191),E=t(72473),P=t(72619),Z=t(23780),x=t(28598);var D=function(e){var n=e.fetchItems,t=e.mutationFn,r=e.path,u=e.pipelineUUID,o=(0,a.useRouter)(),s=(0,l.useRef)({}),f=(0,l.useState)(null),d=f[0],p=f[1],b=(0,l.useState)(0),m=b[0],h=b[1],O=(0,l.useState)(0),k=O[0],D=O[1],T=(0,Z.VI)(null,{},[],{uuid:"".concat(r,"/").concat(u,"/delete/error")}),C=(0,i.Z)(T,1)[0],N=(0,c.Db)((function(e){return t(e)()}),{onSuccess:function(e){return(0,P.wD)(e,{callback:function(){null===n||void 0===n||n(),u&&o.push("/pipelines/[pipeline]/".concat(r),"/pipelines/".concat(u,"/").concat(r))},onErrorCallback:function(e,n){return C({errors:n,response:e})}})}}),I=(0,i.Z)(N,1)[0];return{deleteButton:function(e,n,t){return s.current[e]=(0,l.createRef)(),(0,x.jsxs)(w.Z,{mr:1,children:[(0,x.jsx)(v.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){var n,t,r,i;p(e),h((null===(n=s.current[e])||void 0===n||null===(t=n.current)||void 0===t?void 0:t.offsetTop)||0),D((null===(r=s.current[e])||void 0===r||null===(i=r.current)||void 0===i?void 0:i.offsetLeft)||0)},ref:s.current[e],title:"Delete",children:(0,x.jsx)(E.Trash,{default:!0,size:y.bL})}),(0,x.jsx)(j.Z,{onClickOutside:function(){return p(null)},open:d===e,children:(0,x.jsx)(_.Z,{danger:!0,left:(k||0)-g.nH,onCancel:function(){return p(null)},onClick:function(){p(null),I(e)},title:t,top:(m||0)-(n<=1?g.oz:g.OK),width:g.Xx})})]})}}},T=t(44265),C=t(70515),N=t(16488),I=t(50178),S=t(70320),U=t(3917);function R(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 A(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?R(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):R(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var M=function(e){var n=e.fetchBackfills,t=e.models,r=e.onClickRow,i=e.pipeline,u=e.selectedRow,o=(0,I.Ct)(),c=(0,S.qB)(),a=null===i||void 0===i?void 0:i.uuid,s=c?g.O$:{},f=D({fetchItems:n,mutationFn:k.ZP.backfills.useDelete,path:"backfills",pipelineUUID:a}).deleteButton,j=[{uuid:"Status"},{uuid:"Name"},{uuid:"Type"},{uuid:"Runs"},A(A({},s),{},{uuid:"Backfill"}),A(A({},s),{},{uuid:"Started at"}),A(A({},s),{},{uuid:"Completed at"})];return o||j.push({label:function(){return""},uuid:"edit_delete_backfill"}),(0,x.jsx)(h.Z,{columnFlex:[null,1,null,null,null,1,1,null],columns:j,isSelectedRow:function(e){return t[e].id===(null===u||void 0===u?void 0:u.id)},onClickRow:function(e){return null===r||void 0===r?void 0:r(t[e])},rows:t.map((function(e,n){var t=e.block_uuid,r=e.completed_at,i=e.end_datetime,u=e.id,s=e.name,h=e.start_datetime,k=e.started_at,j=e.status,_=e.total_run_count,w=[(0,l.createElement)(O.ZP,A(A({},(0,g.NC)(j)),{},{key:"status"}),j||"inactive"),(0,x.jsx)(d(),{as:"/pipelines/".concat(a,"/backfills/").concat(u),href:"/pipelines/[pipeline]/backfills/[...slug]",passHref:!0,children:(0,x.jsx)(m.Z,{bold:!0,sameColorAsText:!0,children:s})},"name"),(0,x.jsx)(O.ZP,{default:!0,monospace:!0,children:t?p._7:p.VV},"type"),(0,x.jsx)(O.ZP,{default:!0,monospace:!0,children:_||0},"runs"),(0,x.jsxs)(O.ZP,{default:!0,monospace:!0,small:!0,children:[h&&i&&(0,x.jsxs)(x.Fragment,{children:[(0,N.Uc)(h,c),"\xa0-\xa0",(0,N.Uc)(i,c)]}),!(h&&i)&&(0,x.jsx)(x.Fragment,{children:"\u2014"})]},"backfill"),(0,x.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,title:k?(0,U._6)(k):null,children:k?(0,N.Uc)(k,c):(0,x.jsx)(x.Fragment,{children:"\u2014"})},"started_at"),(0,x.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,title:r?(0,U._6)(r):null,children:r?(0,N.Uc)(r,c):(0,x.jsx)(x.Fragment,{children:"\u2014"})},"completed_at")];return o||w.push((0,x.jsxs)(b.ZP,{children:[(0,x.jsx)(v.ZP,{default:!0,disabled:j===T.VO.COMPLETED,iconOnly:!0,linkProps:{as:"/pipelines/".concat(a,"/backfills/").concat(u,"/edit"),href:"/pipelines/[pipeline]/backfills/[...slug]"},noBackground:!0,title:"Edit",children:(0,x.jsx)(E.Edit,{default:!0,size:2*C.iI})},"".concat(n,"_edit_button")),f(u,n,'Are you sure you want to delete the backfill "'.concat(s,'?"'))]},"edit_delete_backfill_".concat(n))),w})),uuid:"pipeline-runs"})},V=t(68562),B=t(75457),H=t(93808),L=t(28795),F=t(69419),Y=t(81728);function X(e){var n=e.pipeline,t=(0,a.useRouter)(),r=n.uuid,u=k.ZP.backfills.list({_limit:20,_offset:0,include_run_count:!0,pipeline_uuid:r},{refreshInterval:6e4}),o=u.data,s=u.mutate,f=(0,l.useMemo)((function(){return(null===o||void 0===o?void 0:o.backfills)||[]}),[o]),d=(0,F.iV)(),p=(0,l.useState)(null),v=p[0],b=p[1],m=(0,l.useState)(null),h=m[0],j=m[1];(0,l.useEffect)((function(){null!==d&&void 0!==d&&d.backfill_id?b(null===f||void 0===f?void 0:f.find((function(e){return e.id===Number(d.backfill_id)}))):v&&b(null)}),[f,d,v]);var _=(0,l.useMemo)((function(){var e="/pipelines/".concat(r,"/backfills"),n=[{label:function(){return"Backfills"},linkProps:v?{as:e,href:"/pipelines/[pipeline]/backfills"}:null}];return v&&n.push({label:function(){return v.name}}),n}),[r,v]),g=(0,c.Db)(k.ZP.backfills.pipelines.useCreate(r),{onSuccess:function(e){return(0,P.wD)(e,{callback:function(e){var n=e.backfill.id;t.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(r,"/backfills/").concat(n,"/edit"))},onErrorCallback:function(e,n){return j({errors:n,response:e})}})}}),y=(0,i.Z)(g,2),Z=y[0],D=y[1].isLoading;return(0,x.jsxs)(B.Z,{breadcrumbs:_,errors:h,pageName:L.M.BACKFILLS,pipeline:n,setErrors:j,title:function(e){var n=e.name;return"".concat(n," backfills")},uuid:"".concat(L.M.BACKFILLS,"_").concat(r),children:[(0,x.jsx)(w.Z,{p:C.cd,children:(0,x.jsx)(V.ZP,{beforeElement:(0,x.jsx)(E.Add,{size:2.5*C.iI}),blackBorder:!0,inline:!0,loading:D,noHoverUnderline:!0,onClick:function(){return Z({backfill:{name:(0,Y.Y6)()}})},sameColorAsText:!0,uuid:"PipelineDetailPage/Backfills/add_new_backfill",children:"Create new backfill"})}),f&&0===f.length&&(0,x.jsx)(w.Z,{p:C.cd,children:(0,x.jsx)(O.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No backfills available"})}),(null===f||void 0===f?void 0:f.length)>=1&&(0,x.jsx)(M,{fetchBackfills:s,models:f,pipeline:n,selectedRow:v})]})}X.getInitialProps=function(){var e=(0,r.Z)(o().mark((function e(n){var t;return o().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 z=(0,H.Z)(X)},37459:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/backfills",function(){return t(4303)}])},80022:function(e,n,t){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,{Z:function(){return r}})},15544:function(e,n,t){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}t.d(n,{Z:function(){return r}})},13692:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});var r=t(61049);function i(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&(0,r.Z)(e,n)}},93189:function(e,n,t){"use strict";t.d(n,{Z:function(){return u}});var r=t(12539),i=t(80022);function u(e,n){if(n&&("object"===r(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}}},function(e){e.O(0,[1557,3782,9774,2888,179],(function(){return n=37459,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|