mage-ai 0.9.66__py3-none-any.whl → 0.9.68__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 +1 -2
- mage_ai/api/policies/PipelinePolicy.py +2 -0
- mage_ai/api/resources/BlockLayoutItemResource.py +2 -2
- mage_ai/api/resources/BlockResource.py +4 -3
- mage_ai/api/resources/CacheItemResource.py +1 -1
- mage_ai/api/resources/GitBranchResource.py +3 -5
- mage_ai/api/resources/PageBlockLayoutResource.py +2 -2
- mage_ai/api/resources/PipelineResource.py +13 -0
- mage_ai/api/resources/PipelineRunResource.py +10 -1
- mage_ai/cache/tag.py +3 -0
- mage_ai/cluster_manager/manage.py +4 -1
- mage_ai/data_preparation/decorators.py +15 -0
- mage_ai/data_preparation/executors/k8s_block_executor.py +8 -1
- mage_ai/data_preparation/executors/k8s_pipeline_executor.py +12 -1
- mage_ai/data_preparation/executors/streaming_pipeline_executor.py +22 -12
- mage_ai/data_preparation/git/api.py +3 -0
- mage_ai/data_preparation/git/clients/gitlab.py +3 -2
- mage_ai/data_preparation/logging/gcs_logger_manager.py +7 -4
- mage_ai/data_preparation/models/block/__init__.py +45 -86
- mage_ai/data_preparation/models/block/block_factory.py +77 -0
- mage_ai/data_preparation/models/block/dbt/block.py +5 -7
- mage_ai/data_preparation/models/block/global_data_product/__init__.py +9 -3
- mage_ai/data_preparation/models/block/integration/__init__.py +12 -8
- mage_ai/data_preparation/models/block/platform/mixins.py +1 -1
- mage_ai/data_preparation/models/pipeline.py +80 -13
- mage_ai/data_preparation/storage/gcs_storage.py +28 -3
- 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/constants.py +7 -0
- mage_ai/data_preparation/templates/data_loaders/streaming/generic_python.py +23 -0
- mage_ai/data_preparation/templates/template.py +6 -2
- mage_ai/data_preparation/variable_manager.py +2 -1
- mage_ai/io/bigquery.py +2 -0
- mage_ai/io/export_utils.py +3 -0
- mage_ai/io/oracledb.py +152 -5
- mage_ai/io/sql.py +4 -0
- mage_ai/orchestration/db/__init__.py +2 -2
- mage_ai/orchestration/db/models/schedules.py +2 -2
- mage_ai/orchestration/job_manager.py +6 -1
- mage_ai/orchestration/notification/sender.py +8 -0
- mage_ai/orchestration/pipeline_scheduler_original.py +10 -1
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +2 -2
- mage_ai/server/frontend_dist/_next/static/chunks/3548-961ff79ca70038c7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{4241-ccd0126f5750cc35.js → 4241-4499461184ba0d23.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5627-237a3de578538022.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{7966-5c1786fb7e7a48f5.js → 7966-f07b2913f7326b50.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-08790743315de36a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/index-13760bb72d823b69.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-8bbfa0c19b5e4cb3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-852d403c7bda21b3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-597b74828bf105db.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-bd0aff5a5ed8888c.js +1 -0
- 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]/runs/[run]-1417ad1c821d720a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-d1ee961387c58b7f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-90abafc7ed61c582.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-cb88fd075a357fcf.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-ceb06e1616ee9610.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-8ff16ef9566e911a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-d7a8bc51bb7a1082.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/sign-in-f59d34429fe022ee.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-9cba3211434a8966.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/wxqkF4diPqRxUfP6Ac6ai → frontend_dist/_next/static/i8pymuJDTVHdWjUP1QSh1}/_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 +3 -3
- 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 +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/_next/static/rtugsJoijF2SsCCB5_yKS → frontend_dist_base_path_template/_next/static/CKCvjsYCf2imD2X8zAOBf}/_buildManifest.js +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-961ff79ca70038c7.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{4241-ccd0126f5750cc35.js → 4241-4499461184ba0d23.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5627-237a3de578538022.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{7966-5c1786fb7e7a48f5.js → 7966-f07b2913f7326b50.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-08790743315de36a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-13760bb72d823b69.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-8bbfa0c19b5e4cb3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-852d403c7bda21b3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-597b74828bf105db.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-bd0aff5a5ed8888c.js +1 -0
- 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]/runs/[run]-1417ad1c821d720a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-d1ee961387c58b7f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-90abafc7ed61c582.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-cb88fd075a357fcf.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-ceb06e1616ee9610.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-8ff16ef9566e911a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-d7a8bc51bb7a1082.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-f59d34429fe022ee.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-9cba3211434a8966.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/compute.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/files.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-data-products.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-hooks.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/files.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/oauth.html +3 -3
- 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 +5 -5
- 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/services/aws/s3/s3.py +8 -2
- mage_ai/services/k8s/job_manager.py +8 -0
- mage_ai/services/slack/slack.py +10 -1
- mage_ai/services/spark/spark.py +9 -2
- mage_ai/settings/backends.py +8 -8
- mage_ai/settings/models/configuration_option.py +10 -9
- mage_ai/settings/server.py +6 -1
- mage_ai/shared/files.py +19 -1
- mage_ai/shared/logger.py +12 -6
- mage_ai/shared/path_fixer.py +3 -0
- mage_ai/streaming/sources/base.py +5 -0
- mage_ai/streaming/sources/base_python.py +30 -0
- mage_ai/streaming/sources/kafka.py +2 -1
- mage_ai/streaming/sources/mongodb.py +4 -0
- mage_ai/streaming/sources/source_factory.py +25 -0
- mage_ai/tests/data_preparation/models/block/dbt/test_block.py +2 -2
- mage_ai/tests/data_preparation/models/block/dbt/test_block_sql.py +1 -1
- mage_ai/tests/data_preparation/models/block/dbt/test_block_yaml.py +1 -1
- mage_ai/tests/data_preparation/models/test_block.py +41 -3
- mage_ai/tests/orchestration/test_pipeline_scheduler.py +2 -0
- mage_ai/tests/settings/models/test_configuration_option.py +2 -2
- {mage_ai-0.9.66.dist-info → mage_ai-0.9.68.dist-info}/METADATA +3 -3
- {mage_ai-0.9.66.dist-info → mage_ai-0.9.68.dist-info}/RECORD +225 -222
- mage_ai/server/frontend_dist/_next/static/chunks/181-e61915415a976861.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3548-13563a1ff815f922.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-913116aa749f7ca6.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/manage/users/[user]-d3a5fd3119fdb1e4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-42789d698d28a92f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-d05040edba41b2ac.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-aaf393c86fc1bda3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-d84556cefbe31a1a.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/pipelines/[pipeline]/runs/[run]-1b688d61f8efe07a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-ed3331d22d5cff7d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-d94e48bad89ba1e0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-f508c2f261297724.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-f99e99aa8f45529c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-6826000cdffc36b8.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-dde29a463495cebb.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/sign-in-7d38b2f7c3e918a1.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-ab98a7b3a678669e.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/181-e61915415a976861.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-13563a1ff815f922.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-913116aa749f7ca6.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/manage/users/[user]-d3a5fd3119fdb1e4.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-42789d698d28a92f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-d05040edba41b2ac.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-aaf393c86fc1bda3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-d84556cefbe31a1a.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/pipelines/[pipeline]/runs/[run]-1b688d61f8efe07a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-ed3331d22d5cff7d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-d94e48bad89ba1e0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-f508c2f261297724.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-f99e99aa8f45529c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-6826000cdffc36b8.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-dde29a463495cebb.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-7d38b2f7c3e918a1.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-ab98a7b3a678669e.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{rtugsJoijF2SsCCB5_yKS → i8pymuJDTVHdWjUP1QSh1}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{wxqkF4diPqRxUfP6Ac6ai → CKCvjsYCf2imD2X8zAOBf}/_ssgManifest.js +0 -0
- {mage_ai-0.9.66.dist-info → mage_ai-0.9.68.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.66.dist-info → mage_ai-0.9.68.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.66.dist-info → mage_ai-0.9.68.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.66.dist-info → mage_ai-0.9.68.dist-info}/top_level.txt +0 -0
|
@@ -1 +0,0 @@
|
|
|
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),o=e(35686),a=e(87432),l=e(66916);i.default=function(){var n,i=(0,t.useRouter)(),e=i.asPath,s=e.split("?")[0],r=o.ZP.statuses.list().data,v=(0,u.useMemo)((function(){var n;return null===r||void 0===r||null===(n=r.statuses)||void 0===n?void 0:n[0]}),[r]),d=o.ZP.pipeline_runs.list({_limit:0}).data,c=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,a.xf)()&&(0,l.a3)()}),[]),(0,u.useEffect)((function(){var n;if(403===(null===d||void 0===d||null===(n=d.error)||void 0===n?void 0:n.code))i.replace("/sign-in");else if(v){var u=null===v||void 0===v?void 0:v.is_instance_manager,t=e;"/"===s&&(t=u?"/manage":c),d&&i.replace(t)}}),[s,e,d,v,c,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/_next/static/chunks/pages/manage/users/[user]-d3a5fd3119fdb1e4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4496],{14875:function(e,r,n){"use strict";n.d(r,{Z3:function(){return o},ms:function(){return i},s7:function(){return t}});var o=[{autoComplete:"username",label:"Username",required:!0,uuid:"username"},{autoComplete:"email",disabled:!1,label:"Email",required:!0,type:"email",uuid:"email"}],t="password_current",i=[{autoComplete:"current-password",label:"Current password",type:"password",uuid:t},{autoComplete:"new-password",label:"New password",type:"password",uuid:"password"},{autoComplete:"new-password",label:"Confirm new password",type:"password",uuid:"password_confirmation"}]},36043:function(e,r,n){"use strict";var o=n(82394),t=n(21831),i=n(75582),u=n(21764),s=n(82684),l=n(69864),a=n(71180),d=n(31882),c=n(55485),v=n(85854),p=n(44085),f=n(38276),m=n(30160),w=n(17488),b=n(35686),h=n(98464),j=n(82359),Z=n(14875),y=n(86735),O=n(50178),_=n(42122),g=n(72619),x=n(28598);function P(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,o)}return n}function C(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?P(Object(n),!0).forEach((function(r){(0,o.Z)(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}r.Z=function(e){var r=e.disabledFields,n=e.hideFields,P=e.newUser,k=e.onDeleteSuccess,S=e.onSaveSuccess,E=e.showDelete,D=e.title,I=e.user,M=(0,s.useState)(!0),T=M[0],U=M[1],N=(0,s.useState)({}),q=N[0],R=N[1],F=(0,s.useState)(null),A=F[0],L=F[1],B=((0,O.PR)()||{}).owner,G=b.ZP.statuses.list().data,W=(0,s.useMemo)((function(){var e;return(null===G||void 0===G||null===(e=G.statuses)||void 0===e?void 0:e[0])||{}}),[G]),H=W.project_type,X=W.project_uuid,Q="global",z=null,J=null;H===j.k.SUB?(Q="project",z=X):H===j.k.MAIN&&(J="The roles selected here will apply to this user globally.\n If a user has both a global role and a workspace role,\n then the role with higher access will take precedence.");var K=b.ZP.roles.list({entity:Q,entity_ids:z?[z]:[],limit_roles:!!P},{revalidateOnFocus:!1}),V=K.data,Y=(K.mutate,(0,s.useMemo)((function(){return(null===V||void 0===V?void 0:V.roles)||[]}),[null===V||void 0===V?void 0:V.roles])),$=(0,l.Db)(P?b.ZP.users.useCreate():b.ZP.users.useUpdate(null===I||void 0===I?void 0:I.id),{onSuccess:function(e){return(0,g.wD)(e,{callback:function(e){var r=e.user,n=Z.Z3.concat(Z.ms).map((function(e){return e.uuid}));n.push("id");var o=(0,_.GL)(r,n);L(o),u.Am.success(P?"New user created successfully.":"User profile successfully updated.",{position:u.Am.POSITION.BOTTOM_RIGHT,toastId:"user-update-success-".concat(r.id)}),null===S||void 0===S||S(o)},onErrorCallback:function(e){var r=e.error,n=r.errors,o=r.exception,t=r.message,i=r.type;u.Am.error((null===n||void 0===n?void 0:n.error)||o||t,{position:u.Am.POSITION.BOTTOM_RIGHT,toastId:i})}})}}),ee=(0,i.Z)($,2),re=ee[0],ne=ee[1].isLoading,oe=(0,l.Db)(b.ZP.users.useDelete(null===I||void 0===I?void 0:I.id),{onSuccess:function(e){return(0,g.wD)(e,{callback:function(){null===k||void 0===k||k()},onErrorCallback:function(e){var r=e.error,n=r.errors,o=r.message;alert(o),console.log(n)}})}}),te=(0,i.Z)(oe,2),ie=te[0],ue=te[1].isLoading,se=n?(0,t.Z)(n):[];P&&se.push(Z.s7);var le=!se||!se.includes(Z.s7),ae=(0,h.Z)(I);(0,s.useEffect)((function(){if(I&&(!A||(null===ae||void 0===ae?void 0:ae.id)!==(null===I||void 0===I?void 0:I.id))){var e=Z.Z3.concat(Z.ms).map((function(e){return e.uuid}));L((0,_.GL)(I,e))}null!==A&&void 0!==A&&A.password||null!==A&&void 0!==A&&A.password_confirmation?(null===A||void 0===A?void 0:A.password)!==(null===A||void 0===A?void 0:A.password_confirmation)?R({password_confirmation:"Password confirmation does not match."}):!le||null!==A&&void 0!==A&&A.password_current?R(null):R({password_current:"This field is required."}):null!==A&&void 0!==A&&A.password_current&&le?null!==A&&void 0!==A&&A.password&&null!==A&&void 0!==A&&A.password_confirmation?R(null):R({password:"This field is required.",password_confirmation:"This field is required."}):null!==A&&void 0!==A&&A.password_current||null!==A&&void 0!==A&&A.password||null!==A&&void 0!==A&&A.password_confirmation||R(null)}),[A,le,I,ae]);var de=(0,s.useState)(!1),ce=de[0],ve=de[1],pe=(0,s.useMemo)((function(){return(ce?null===A||void 0===A?void 0:A.roles_new:null===I||void 0===I?void 0:I.roles_new)||[]}),[A,ce,I]),fe=(0,s.useMemo)((function(){var e=(null===Y||void 0===Y?void 0:Y.map((function(e){return e.id})))||[];return null===pe||void 0===pe?void 0:pe.filter((function(r){var n=r.id;return e.includes(n)}))}),[pe,Y]);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(v.Z,{children:D||"Edit profile"}),(0,x.jsxs)("form",{children:[Z.Z3.filter((function(e){var r=e.uuid;return!se||!se.includes(r)})).map((function(e){var r=e.autoComplete,n=e.disabled,t=e.label,i=e.required,u=e.type,s=e.uuid;return(0,x.jsx)(f.Z,{mt:2,children:(0,x.jsx)(w.Z,{autoComplete:r,disabled:n&&!P,label:t,onChange:function(e){U(!1),L((function(r){return C(C({},r),{},(0,o.Z)({},s,e.target.value))}))},primary:!0,required:i,setContentOnMount:!0,type:u,value:(null===A||void 0===A?void 0:A[s])||""})},s)})),!(null!==I&&void 0!==I&&I.owner)&&!(null!==se&&void 0!==se&&se.includes("roles"))&&(0,x.jsxs)(f.Z,{mt:2,children:[J&&(0,x.jsx)(f.Z,{mb:1,children:(0,x.jsx)(m.ZP,{children:J})}),(0,x.jsx)(p.Z,{disabled:null===r||void 0===r?void 0:r.includes("roles"),label:"Roles",onChange:function(e){var r=(0,y.sE)(Y,(function(r){return r.id==e.target.value}));r&&(U(!1),ve(!0),L((function(e){var n={};return(0,y.sE)(pe,(function(e){return e.id==(null===r||void 0===r?void 0:r.id)}))||(n={roles_new:[].concat((0,t.Z)(pe),[r])}),C(C({},e),n)})))},primary:!0,setContentOnMount:!0,children:Y.map((function(e){var r=e.id,n=e.name;return(0,x.jsx)("option",{value:r,children:n},n)}))}),(0,x.jsx)(f.Z,{mb:1}),(0,x.jsx)(c.ZP,{alignItems:"center",flexWrap:"wrap",children:null===fe||void 0===fe?void 0:fe.map((function(e){var n=e.id,o=e.name;return(0,x.jsx)(f.Z,{mb:1,mr:1,children:(0,x.jsx)(d.Z,{disabled:null===r||void 0===r?void 0:r.includes("roles"),label:o,onClick:function(){U(!1),ve(!0),L((function(e){return C(C({},e),{},{roles_new:(0,y.Od)(pe,(function(e){return e.id===n}))})}))},primary:!0})},"user_roles/".concat(o))}))})]}),(0,x.jsxs)(f.Z,{mt:5,children:[(0,x.jsx)(v.Z,{children:P?"Password":"Change password"}),Z.ms.filter((function(e){var r=e.uuid;return!se||!se.includes(r)})).map((function(e){var r=e.autoComplete,n=e.disabled,t=e.label,i=e.required,u=e.type,s=e.uuid;return(0,x.jsx)(f.Z,{mt:2,children:(0,x.jsx)(w.Z,{autoComplete:r,disabled:n,label:t,meta:{error:null===q||void 0===q?void 0:q[s],touched:!(null===q||void 0===q||!q[s])},onChange:function(e){U(!1),L((function(r){return C(C({},r),{},(0,o.Z)({},s,e.target.value))}))},primary:!0,required:i,setContentOnMount:!0,type:u,value:(null===A||void 0===A?void 0:A[s])||""})},s)}))]}),(0,x.jsx)(f.Z,{mt:5,children:(0,x.jsxs)(c.ZP,{children:[(0,x.jsx)(a.ZP,{disabled:T||q&&!(0,_.Qr)(q),loading:ne,onClick:function(){var e,r=C({},A);"roles_new"in r&&(r.roles_new=null===(e=A.roles_new)||void 0===e?void 0:e.map((function(e){return e.id})));re({user:r})},primary:!0,children:P?"Create new user":"Update user profile"}),E&&B&&(0,x.jsx)(f.Z,{ml:1,children:(0,x.jsx)(a.ZP,{danger:!0,loading:ue,onClick:function(){window.confirm("Are you sure you want to delete ".concat(A.username||A.email,"?"))&&ie()},children:"Delete user"})})]})})]})]})}},5178:function(e,r,n){"use strict";n.r(r),n.d(r,{default:function(){return T}});var o=n(77837),t=n(38860),i=n.n(t),u=n(82684),s=n(34376),l=n(93808),a=n(38276),d=n(36043),c=n(75582),v=n(21831),p=n(82394),f=n(21764),m=n(69864),w=n(71180),b=n(31882),h=n(55485),j=n(44085),Z=n(75499),y=n(30160),O=n(35686),_=n(86735),g=n(72619),x=n(28598);function P(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,o)}return n}function C(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?P(Object(n),!0).forEach((function(r){(0,p.Z)(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var k=function(e){e.fetchUser;var r=e.user,n=e.workspaces,o=(0,s.useRouter)(),t=(0,u.useState)(),i=t[0],l=t[1],d=(0,u.useState)(!0),P=d[0],k=d[1];(0,u.useEffect)((function(){r&&l(r)}),[r]);var S=null===n||void 0===n?void 0:n.map((function(e){return e.project_uuid})),E=O.ZP.roles.list({entity:"project",entity_ids:S},{},{}),D=E.data,I=(E.mutate,(0,u.useCallback)((function(e){return null===e||void 0===e?void 0:e.reduce((function(e,r){var n,o=e;return null===r||void 0===r||null===(n=r.permissions)||void 0===n||n.forEach((function(e){var n=e.entity_id,t=o[n]||[];o=C(C({},o),{},(0,p.Z)({},n,[].concat((0,v.Z)(t),[r])))})),o}),{})}),[])),M=(0,u.useMemo)((function(){var e=(null===D||void 0===D?void 0:D.roles)||[];return I(e)}),[D,I]),T=(0,u.useMemo)((function(){var e=i||r,n=null===e||void 0===e?void 0:e.roles_new;return I(n)}),[I,i,r]),U=(0,m.Db)(O.ZP.users.useUpdate(null===r||void 0===r?void 0:r.id),{onSuccess:function(e){return(0,g.wD)(e,{callback:function(){o.push("/manage/users")},onErrorCallback:function(e){var r=e.error,n=r.errors,o=r.exception,t=r.message,i=r.type;f.Am.error((null===n||void 0===n?void 0:n.error)||o||t,{position:f.Am.POSITION.BOTTOM_RIGHT,toastId:i})}})}}),N=(0,c.Z)(U,2),q=N[0],R=N[1].isLoading;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(a.Z,{p:2,children:(0,x.jsx)(w.ZP,{disabled:P,loading:R,onClick:function(){var e,r=C(C({},i),{},{roles_new:null===i||void 0===i||null===(e=i.roles_new)||void 0===e?void 0:e.map((function(e){return e.id}))});q({user:r})},primary:!0,children:"Update workspace roles"})}),(0,x.jsx)(Z.Z,{columnFlex:[1,1],columns:[{uuid:"Workspace"},{uuid:"Role"}],rows:null===n||void 0===n?void 0:n.map((function(e){var r=e.name,n=e.project_uuid,o=(null===M||void 0===M?void 0:M[n])||[],t=null===T||void 0===T?void 0:T[n];return[(0,x.jsx)(y.ZP,{bold:!0,children:r},"name"),(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(j.Z,{label:"Roles",onChange:function(e){k(!1);var r=(0,_.sE)(o,(function(r){return r.id==e.target.value}));r&&l((function(e){var n,o=(null===e||void 0===e||null===(n=e.roles_new)||void 0===n?void 0:n.filter((function(e){return e.id!=(null===r||void 0===r?void 0:r.id)})))||[],t={roles_new:[].concat((0,v.Z)(o),[r])};return C(C({},e),t)}))},primary:!0,setContentOnMount:!0,children:o.map((function(e){var r=e.id,n=e.name;return(0,x.jsx)("option",{value:r,children:n},n)}))},"project_role"),(0,x.jsx)(a.Z,{mb:1}),(0,x.jsx)(h.ZP,{alignItems:"center",flexWrap:"wrap",children:null===t||void 0===t?void 0:t.map((function(e){var r=e.id,n=e.name;return(0,x.jsx)(a.Z,{mb:1,mr:1,children:(0,x.jsx)(b.Z,{label:n,onClick:function(){k(!1),l((function(e){return C(C({},e),{},{roles_new:(0,_.Od)(t,(function(e){return e.id===r}))})}))},primary:!0})},"user_roles/".concat(n))}))})]})]}))})]})},S=n(59533),E=n(70515),D=n(14875),I=n(75083);function M(e){var r=e.user,n=(0,s.useRouter)(),o=(0,u.useState)(null),t=o[0],i=o[1],l=null===r||void 0===r?void 0:r.id,c=O.ZP.users.detail(l),v=c.data,p=c.mutate,f=O.ZP.statuses.list().data,m=(0,u.useMemo)((function(){var e,r;return null===f||void 0===f||null===(e=f.statuses)||void 0===e||null===(r=e[0])||void 0===r?void 0:r.instance_type}),[f]),w=(0,u.useMemo)((function(){return null===v||void 0===v?void 0:v.user}),[v]);(0,u.useEffect)((function(){(0,g.bB)(v,i)}),[v]);var b=O.ZP.workspaces.list({cluster_type:m,user_id:l},{refreshInterval:5e3,revalidateOnFocus:!0}).data,h=(0,u.useMemo)((function(){return(0,x.jsx)(a.Z,{p:E.cd,children:(0,x.jsx)(d.Z,{hideFields:[D.s7],onDeleteSuccess:function(){return n.push("/manage/users")},onSaveSuccess:function(){return n.push("/manage/users")},showDelete:!0,title:"Edit user",user:w})})}),[n,w]),j=(0,u.useMemo)((function(){return null===b||void 0===b?void 0:b.workspaces}),[b]);return(0,x.jsx)(S.Z,{before:h,breadcrumbs:[{label:function(){return"Workspaces"},linkProps:{as:"/manage",href:"/manage"}},{label:function(){return"Users"},linkProps:{as:"/manage/users",href:"/manage/users"}},{bold:!0,label:function(){return(null===w||void 0===w?void 0:w.username)||"User"}}],errors:t,pageName:I.L6.USERS,children:(0,x.jsx)(k,{fetchUser:p,user:w,workspaces:j})})}M.getInitialProps=function(){var e=(0,o.Z)(i().mark((function e(r){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.query.user,e.abrupt("return",{user:{id:n}});case 2:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}();var T=(0,l.Z)(M)},11976:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage/users/[user]",function(){return n(5178)}])}},function(e){e.O(0,[1557,1598,9774,2888,179],(function(){return r=11976,e(e.s=r);var r}));var r=e.O();_N_E=r}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8867],{53779:function(e,n,t){"use strict";t.d(n,{C:function(){return h},X$:function(){return f},eD:function(){return d}});var r=t(25976),i=t(44897),o=t(42631),c=t(70515),s=t(47041),l=t(91437),a=6.25*c.iI,u=(c.iI,100*c.iI),d=r.default.div.withConfig({displayName:"indexstyle__WindowContainerStyle",componentId:"sc-g0cszf-0"})(["border-radius:","px;width:100%;max-width:","px;z-index:101;position:absolute;overflow:hidden;top:50%;left:50%;transform:translate(-50%,-50%);",""],o.n_,u,(function(e){return"\n box-shadow: ".concat((e.theme||i.Z).shadow.window,";\n background-color: ").concat((e.theme||i.Z).background.panel,";\n ")})),p=(0,r.css)(["display:flex;align-items:center;justify-content:space-between;height:","px;padding:","px ","px;",""],a,c.iI,c.cd*c.iI,(function(e){return"\n background-color: ".concat((e.theme||i.Z).background.output,";\n ")})),f=r.default.div.withConfig({displayName:"indexstyle__WindowHeaderStyle",componentId:"sc-g0cszf-1"})([""," border-top-left-radius:","px;border-top-right-radius:","px;",""],p,o.n_,o.n_,(function(e){return"\n border-bottom: ".concat(o.YF,"px ").concat(o.M8," ").concat((e.theme||i.Z).borders.medium,";\n ")})),h=r.default.div.withConfig({displayName:"indexstyle__WindowContentStyle",componentId:"sc-g0cszf-2"})(["overflow:auto;padding:","px 0;"," "," "," ",""],c.iI,s.w5,(0,l.eR)(),(function(e){return e.minMaxHeight&&"\n max-height: ".concat(7*c.iI,"px;\n ")}),(function(e){return!e.minMaxHeight&&"\n max-height: calc(100vh - ".concat(6.5*a,"px);\n ")}));r.default.div.withConfig({displayName:"indexstyle__WindowFooterStyle",componentId:"sc-g0cszf-3"})([""," justify-content:flex-end;border-bottom-left-radius:","px;border-bottom-right-radius:","px;",""],p,o.n_,o.n_,(function(e){return"\n border-top: ".concat(o.YF,"px ").concat(o.M8," ").concat((e.theme||i.Z).borders.medium,";\n ")})),r.default.div.withConfig({displayName:"indexstyle__InputRowStyle",componentId:"sc-g0cszf-4"})(["padding:","px ","px;",""],.75*c.iI,2*c.iI,(function(e){return"\n border-bottom: ".concat(o.YF,"px ").concat(o.M8," ").concat((e.theme||i.Z).borders.medium,";\n ")}))},29480:function(e,n,t){"use strict";t.d(n,{$W:function(){return u},cl:function(){return d},cv:function(){return p},dE:function(){return l},zG:function(){return a}});var r=t(25976),i=t(44897),o=t(42631),c=t(70515),s=t(47041),l=r.default.div.withConfig({displayName:"indexstyle__SectionStyle",componentId:"sc-7a1uhf-0"})(["border-radius:","px;padding:","px;",""],o.n_,c.cd*c.iI,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).popup,";\n ")})),a=r.default.div.withConfig({displayName:"indexstyle__DocsStyle",componentId:"sc-7a1uhf-1"})(["> div{overflow:initial;}> div img{max-width:80%;background:white;padding:1rem;max-height:20vh;}"]),u=r.default.div.withConfig({displayName:"indexstyle__CodeEditorStyle",componentId:"sc-7a1uhf-2"})(["padding-top:","px;",""],c.cd*c.iI,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).codeTextarea,";\n ")})),d=r.default.div.withConfig({displayName:"indexstyle__TableContainerStyle",componentId:"sc-7a1uhf-3"})(["overflow:auto;max-height:90vh;width:100%;"," "," "," "," ",""],s.w5,(function(e){return e.hideHorizontalScrollbar&&"\n overflow-x: hidden;\n "}),(function(e){return e.width&&"\n width: ".concat(e.width,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,";\n ")}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")})),p=r.default.div.withConfig({displayName:"indexstyle__HeaderRowStyle",componentId:"sc-7a1uhf-4"})(["padding:","px;"," "," ",""],2*c.iI,(function(e){return"\n background-color: ".concat((e.theme||i.Z).interactive.defaultBackground,";\n border-bottom: ").concat(o.YF,"px ").concat(o.M8," ").concat((e.theme||i.Z).borders.medium,";\n ")}),(function(e){return e.padding&&"\n padding: ".concat(e.padding,"px;\n ")}),(function(e){return e.rounded&&"\n border-top-left-radius: ".concat(o.n_,"px;\n border-top-right-radius: ").concat(o.n_,"px;\n ")}))},11074:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(25976),i=t(44897),o=t(42631),c=r.default.div.withConfig({displayName:"indexstyle__PanelStyle",componentId:"sc-1rfr5wd-0"})(["border-radius:","px;"," ",""],o.n_,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).panel,";\n ")}),(function(e){return e.fullWidth&&"\n width: 100%;\n "})),s=t(28598);var l=function(e){var n=e.children,t=e.fullWidth,r=void 0===t||t;return(0,s.jsx)(c,{fullWidth:r,children:n})}},42765:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Ze}});var r,i=t(77837),o=t(75582),c=t(82394),s=t(38860),l=t.n(s),a=t(82684),u=t(34376),d=t(71180),p=t(69864),f=t(32013),h=t(98777),m=t(89083),x=t(15338),j=t(78650),v=t(97618),g=t(55485),b=t(85854),Z=t(68562),y=t(11074),_=t(44085),w=t(38276),P=t(30160),k=t(17488),C=t(69650),O=t(12468),S=t(35686),I=["ReadWriteOnce","ReadWriteMany","ReadOnlyMany"],D=["Retain","Delete"],N=[{label:"Workspace name",required:!0,uuid:"name"}],E=[{label:"Namespace",labelDescription:"The namespace where the workspace resources will be deployed. Defaults to the value of the KUBE_NAMESPACE environment variable.",uuid:"namespace"},{label:"Service account name",placeholder:"default",uuid:"service_account_name"},{label:"Ingress name",labelDescription:"If you want to add the workspace to an existing ingress, enter the name of the ingress here. Otherwise, the workspace can be accessed through the service.",placeholder:"my-ingress",uuid:"ingress_name"}],M=[{label:"Storage class name",placeholder:"default",uuid:"storage_class_name"},{label:"Storage request size (in GB)",type:"number",uuid:"storage_request_size"}],F=t(44425),R=t(72473);!function(e){e.K8S="k8s",e.ECS="ecs",e.CLOUD_RUN="cloud_run",e.EMR="emr"}(r||(r={}));var A={ingress_name:"Ingress",namespace:"Namespace",pvc_retention_policy:"PVC retention policy",service_account_name:"Service account name",storage_access_mode:"Storage access mode",storage_class_name:"Storage class name",storage_request_size:"Storage request size (in GB)",url:"Access URL"},W={"termination_policy.enable_auto_termination":"Termination policy: auto-terminate","termination_policy.max_idle_seconds":"Termination policy: max idle seconds",pre_start_script_path:"Pre start: script path","post_start.command":"Post start: command","post_start.hook_path":"Post start: path to hook"},T=t(29480),z=t(79633),L=t(53779),B=t(72619),G=t(81728),U=t(89538),q=t(28598);function H(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?H(Object(t),!0).forEach((function(n){(0,c.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):H(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var K=function(e){var n=e.clusterType,t=e.onCancel,i=e.onCreate,s=e.project,l=(0,a.useState)(),u=l[0],A=l[1],W=(0,a.useState)(),H=W[0],K=W[1],Y=(0,a.useState)(null),$=Y[0],Q=Y[1],X=(0,a.useState)(null),J=X[0],ee=X[1],ne=(0,a.useMemo)((function(){return null===s||void 0===s?void 0:s.workspace_config_defaults}),[s]);(0,a.useEffect)((function(){if(ne&&(J||ee(null===ne||void 0===ne?void 0:ne.lifecycle_config),!$)){var e=V(V({},null===ne||void 0===ne?void 0:ne.k8s),{},{name:null===ne||void 0===ne?void 0:ne.name});Q(e)}}),[ne,J,$]);var te=(0,p.Db)(S.ZP.workspaces.useCreate(),{onSuccess:function(e){return(0,B.wD)(e,{callback:function(e){e.error_message?A(e.error_message):i()},onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.message;A(r),console.log(t,r)}})}}),re=(0,o.Z)(te,2),ie=re[0],oe=re[1].isLoading,ce=S.ZP.files.list(),se=ce.data,le=ce.mutate,ae=(0,a.useMemo)((function(){return(null===se||void 0===se?void 0:se.files)||[]}),[se]),ue=(0,U.dd)((function(e){return(0,q.jsxs)(L.eD,{children:[(0,q.jsxs)(L.X$,{children:[(0,q.jsx)(v.Z,{alignItems:"center",children:(0,q.jsx)(P.ZP,{disableWordBreak:!0,monospace:!0,children:"Select file"})}),(0,q.jsx)(d.ZP,{iconOnly:!0,onClick:fe,children:(0,q.jsx)(R.Close,{muted:!0})})]}),(0,q.jsx)(L.C,{children:(0,q.jsx)(j.Z,{disableContextMenu:!0,fetchFiles:le,files:ae,isFileDisabled:null===e||void 0===e?void 0:e.isFileDisabled,openFile:e.onFileOpen,uuid:"ConfigureWorkspace/FileBrowser"})})]})}),{},[ae,le],{background:!0,uuid:"file_selector"}),de=(0,o.Z)(ue,2),pe=de[0],fe=de[1],he=(0,a.useCallback)((function(e){var n=e.autoComplete,t=e.disabled,r=e.label,i=e.labelDescription,o=e.placeholder,s=e.required,l=e.type,a=e.uuid;return(0,q.jsxs)("div",{children:[(0,q.jsx)(x.Z,{muted:!0}),(0,q.jsx)(w.Z,{ml:3,mr:2,my:1,children:(0,q.jsxs)(g.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,q.jsxs)(v.Z,{flex:2,flexDirection:"column",children:[(0,q.jsx)(P.ZP,{children:r}),i&&(0,q.jsx)(P.ZP,{muted:!0,children:i})]}),(0,q.jsx)(v.Z,{flex:1}),(0,q.jsx)(v.Z,{flex:1,children:(0,q.jsx)(k.Z,{autoComplete:n,disabled:t,onChange:function(e){Q((function(n){return V(V({},n),{},(0,c.Z)({},a,e.target.value))}))},placeholder:o,required:s,setContentOnMount:!0,type:l,value:(null===$||void 0===$?void 0:$[a])||""})})]})})]},a)}),[$,Q]),me=(0,a.useMemo)((function(){return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(g.ZP,{children:(0,q.jsx)(w.Z,{ml:2,my:2,children:(0,q.jsx)(P.ZP,{bold:!0,sky:!0,children:"General"})})}),E.map((function(e){return he(e)})),(0,q.jsx)(x.Z,{muted:!0}),(0,q.jsx)(g.ZP,{children:(0,q.jsx)(w.Z,{ml:2,my:2,children:(0,q.jsx)(P.ZP,{bold:!0,sky:!0,children:"Volume claim params"})})}),M.map((function(e){return he(e)})),(0,q.jsx)(x.Z,{muted:!0}),(0,q.jsx)(w.Z,{ml:3,mr:2,my:1,children:(0,q.jsxs)(g.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,q.jsx)(v.Z,{flex:3,children:(0,q.jsx)(P.ZP,{children:"Access mode"})}),(0,q.jsx)(v.Z,{flex:1,children:(0,q.jsx)(_.Z,{fullWidth:!0,label:"Access mode",onChange:function(e){e.preventDefault(),Q((function(n){return V(V({},n),{},{storage_access_mode:e.target.value})}))},placeholder:"Access mode",value:null===$||void 0===$?void 0:$.storage_access_mode,children:I.map((function(e){return(0,q.jsx)("option",{value:e,children:e},e)}))})})]})}),(0,q.jsx)(x.Z,{muted:!0}),(0,q.jsx)(w.Z,{ml:3,mr:2,my:1,children:(0,q.jsxs)(g.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,q.jsx)(v.Z,{flex:3,children:(0,q.jsx)(O.Z,{block:!0,description:(0,q.jsxs)(P.ZP,{default:!0,inline:!0,children:["Configure the retention policy for the stateful set PVC.",(0,q.jsx)("br",{}),"Retain will keep the PVC after the workspace is deleted.",(0,q.jsx)("br",{}),"Delete will delete the PVC when the workspace is deleted."]}),size:null,widthFitContent:!0,children:(0,q.jsx)(P.ZP,{children:"Retention policy (default: Retain)"})})}),(0,q.jsx)(v.Z,{flex:1,children:(0,q.jsx)(_.Z,{fullWidth:!0,label:"Retention policy",onChange:function(e){e.preventDefault(),Q((function(n){return V(V({},n),{},{pvc_retention_policy:e.target.value})}))},placeholder:"Retention policy",value:null===$||void 0===$?void 0:$.pvc_retention_policy,children:D.map((function(e){return(0,q.jsx)("option",{value:e,children:e},e)}))})})]})}),(0,q.jsx)(x.Z,{muted:!0}),(0,q.jsx)(w.Z,{ml:2,my:2,children:(0,q.jsxs)(g.ZP,{alignItems:"center",children:[(0,q.jsx)(C.Z,{checked:H,compact:!0,onCheck:function(){return K((function(e){return!e}))}}),(0,q.jsx)(w.Z,{ml:1,children:(0,q.jsx)(P.ZP,{bold:!0,sky:!0,children:"Configure container"})})]})}),(0,q.jsx)(x.Z,{muted:!0}),H&&(0,q.jsx)(w.Z,{ml:3,mr:2,my:1,children:(0,q.jsx)(T.$W,{children:(0,q.jsx)(m.Z,{autoHeight:!0,fontSize:12,language:F.t6.YAML,onChange:function(e){Q((function(n){return V(V({},n),{},{container_config:e})}))},tabSize:2,value:null===$||void 0===$?void 0:$.container_config,width:"100%"})})})]})}),[he,H,$]),xe=(0,a.useMemo)((function(){var e,n,t,r;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(g.ZP,{children:(0,q.jsx)(w.Z,{ml:2,my:2,children:(0,q.jsx)(P.ZP,{bold:!0,sky:!0,children:"Termination policy"})})}),(0,q.jsx)(x.Z,{muted:!0}),(0,q.jsx)(w.Z,{ml:3,mr:2,my:1,children:(0,q.jsxs)(g.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,q.jsx)(v.Z,{flex:3,children:(0,q.jsx)(P.ZP,{children:"Enable auto termination"})}),(0,q.jsx)(v.Z,{flex:1,children:(0,q.jsxs)(_.Z,{fullWidth:!0,onChange:function(e){e.preventDefault(),ee((function(n){return V(V({},n),{},{termination_policy:V(V({},null===n||void 0===n?void 0:n.termination_policy),{},{enable_auto_termination:"true"===e.target.value})})}))},value:(null===J||void 0===J||null===(e=J.termination_policy)||void 0===e?void 0:e.enable_auto_termination)||"false",children:[(0,q.jsx)("option",{value:"true",children:"True"},"true"),(0,q.jsx)("option",{value:"false",children:"False"},"false")]})})]})}),(0,q.jsx)(x.Z,{muted:!0}),(0,q.jsx)(w.Z,{ml:3,mr:2,my:1,children:(0,q.jsxs)(g.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,q.jsx)(v.Z,{flex:3,children:(0,q.jsx)(P.ZP,{children:"Max idle time (in seconds)"})}),(0,q.jsx)(v.Z,{flex:1,children:(0,q.jsx)(k.Z,{onChange:function(e){ee((function(n){return V(V({},n),{},{termination_policy:V(V({},null===n||void 0===n?void 0:n.termination_policy),{},{max_idle_seconds:e.target.value})})}))},setContentOnMount:!0,type:"number",value:(null===J||void 0===J||null===(n=J.termination_policy)||void 0===n?void 0:n.max_idle_seconds)||""})})]})}),(0,q.jsx)(x.Z,{muted:!0}),(0,q.jsx)(g.ZP,{children:(0,q.jsx)(w.Z,{ml:2,my:2,children:(0,q.jsx)(P.ZP,{bold:!0,sky:!0,children:"Pre start"})})}),(0,q.jsx)(x.Z,{muted:!0}),(0,q.jsx)(w.Z,{ml:3,mr:2,my:1,children:(0,q.jsxs)(g.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,q.jsxs)(v.Z,{flex:3,justifyContent:"space-between",children:[(0,q.jsx)(P.ZP,{children:"Path to pre start script"}),(0,q.jsx)(w.Z,{mr:1,children:(0,q.jsx)(d.ZP,{iconOnly:!0,noBackground:!0,noBorder:!0,onClick:function(){return pe({isFileDisabled:function(e,n){return!n&&!e.endsWith(".py")},onFileOpen:function(e,n){ee((function(n){return V(V({},n),{},{pre_start_script_path:e})})),fe()}})},children:(0,q.jsx)(R.Folder,{})})})]}),(0,q.jsx)(v.Z,{flex:1,children:(0,q.jsx)(k.Z,{onChange:function(e){ee((function(n){return V(V({},n),{},{pre_start_script_path:e.target.value})}))},placeholder:"/",setContentOnMount:!0,value:(null===J||void 0===J?void 0:J.pre_start_script_path)||""})})]})}),(0,q.jsx)(x.Z,{muted:!0}),(0,q.jsx)(g.ZP,{children:(0,q.jsx)(w.Z,{ml:2,my:2,children:(0,q.jsx)(P.ZP,{bold:!0,sky:!0,children:"Post start"})})}),(0,q.jsx)(x.Z,{muted:!0}),(0,q.jsx)(w.Z,{ml:3,mr:2,my:1,children:(0,q.jsxs)(g.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,q.jsx)(v.Z,{flex:3,children:(0,q.jsx)(P.ZP,{children:"Command"})}),(0,q.jsx)(v.Z,{flex:1,children:(0,q.jsx)(k.Z,{monospace:!0,onChange:function(e){ee((function(n){return V(V({},n),{},{post_start:V(V({},null===n||void 0===n?void 0:n.post_start),{},{command:e.target.value})})}))},setContentOnMount:!0,value:(null===J||void 0===J||null===(t=J.post_start)||void 0===t?void 0:t.command)||""})})]})}),(0,q.jsx)(x.Z,{muted:!0}),(0,q.jsx)(w.Z,{ml:3,mr:2,my:1,children:(0,q.jsxs)(g.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,q.jsxs)(v.Z,{flex:3,justifyContent:"space-between",children:[(0,q.jsx)(P.ZP,{children:"Path to hook (optional)"}),(0,q.jsx)(w.Z,{mr:1,children:(0,q.jsx)(d.ZP,{iconOnly:!0,noBackground:!0,noBorder:!0,onClick:function(){return pe({onFileOpen:function(e,n){ee((function(n){return V(V({},n),{},{post_start:V(V({},null===n||void 0===n?void 0:n.post_start),{},{hook_path:e})})})),fe()}})},children:(0,q.jsx)(R.Folder,{})})})]}),(0,q.jsx)(v.Z,{flex:1,children:(0,q.jsx)(k.Z,{onChange:function(e){ee((function(n){return V(V({},n),{},{post_start:V(V({},null===n||void 0===n?void 0:n.post_start),{},{hook_path:e.target.value})})}))},placeholder:"/",setContentOnMount:!0,value:(null===J||void 0===J||null===(r=J.post_start)||void 0===r?void 0:r.hook_path)||""})})]})}),(0,q.jsx)(x.Z,{muted:!0})]})}),[fe,J,ee,pe]);return(0,q.jsx)(y.Z,{children:(0,q.jsx)("div",{style:{width:"750px"},children:(0,q.jsxs)(w.Z,{p:2,children:[(0,q.jsx)(b.Z,{level:4,children:"Create workspace"}),(0,q.jsxs)("form",{children:[N.map((function(e){var n=e.autoComplete,t=e.disabled,r=e.label,i=e.required,o=e.type,s=e.uuid;return(0,q.jsx)(w.Z,{mt:2,children:(0,q.jsx)(k.Z,{autoComplete:n,disabled:t,label:r,onChange:function(e){Q((function(n){return V(V({},n),{},(0,c.Z)({},s,e.target.value))}))},required:i,setContentOnMount:!0,type:o,value:(null===$||void 0===$?void 0:$[s])||""})},s)})),(0,q.jsx)(w.Z,{mt:2,children:(0,q.jsxs)(f.Z,{noPaddingContent:!0,children:[n===r.K8S&&(0,q.jsx)(h.Z,{title:"Kubernetes",children:me}),(0,q.jsx)(h.Z,{title:"Lifecycle (optional)",children:xe})]})})]}),oe&&(0,q.jsx)(w.Z,{mt:1,children:(0,q.jsx)(P.ZP,{small:!0,warning:!0,children:"This may take up to a few minutes... Once the service is created, it may take another 5-10 minutes for the service to be accessible."})}),!oe&&u&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(w.Z,{mt:1,children:(0,q.jsx)(P.ZP,{danger:!0,small:!0,children:"Failed to create instance, see error below."})}),(0,q.jsx)(w.Z,{mt:1,children:(0,q.jsx)(P.ZP,{danger:!0,small:!0,children:u})})]}),(0,q.jsx)(w.Z,{my:2,children:(0,q.jsxs)(g.ZP,{flexDirection:"row-reverse",children:[(0,q.jsx)(Z.ZP,{background:z.a$,bold:!0,inline:!0,loading:oe,onClick:function(){var e=$||{},t=e.name,r=e.container_config;if(t){var i=V({},$);i.name=function(e){return"ecs"===n?(0,G.We)(e,"_"):(0,G.We)(e,"-")}(t),i.container_config=H&&r,ie({workspace:V(V({},i),{},{cluster_type:n,lifecycle_config:J})})}else A("Please enter a valid name!")},uuid:"workspaces/create",children:"Create"}),(0,q.jsx)(w.Z,{ml:1}),(0,q.jsx)(Z.ZP,{bold:!0,inline:!0,onClick:t,uuid:"workspaces/cancel",children:"Cancel"})]})})]})})})},Y=t(65956),$=t(93808),Q=t(75499),X=t(85544),J=t(59533),ee=t(25976),ne=t(44897),te=ee.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-19701zd-0"})(["border:1px solid;border-radius:8px;",""],(function(e){return"\n border-color: ".concat((e.theme.monotone||ne.Z.monotone).grey500,";\n ")})),re=t(70515);function ie(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 oe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ie(Object(t),!0).forEach((function(n){(0,c.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ie(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ce,se=function(e){var n=e.clusterType,t=e.fetchWorkspaces,i=e.onSuccess,c=e.setErrors,s=e.workspace,l=s.instance,u=s.lifecycle_config,f=(l.ip,l.name),h=l.status,m=(l.type,{cluster_type:n}),j=(0,p.Db)(S.ZP.workspaces.useUpdate(f,m),{onSuccess:function(e){return(0,B.wD)(e,{callback:function(){t(),i()},onErrorCallback:function(e,n){return c({errors:n,response:e})}})}}),Z=(0,o.Z)(j,2),y=Z[0],_=Z[1].isLoading,k=(0,p.Db)(S.ZP.workspaces.useDelete(f,m),{onSuccess:function(e){return(0,B.wD)(e,{callback:function(){t(),i()},onErrorCallback:function(e,n){return c({errors:n,response:e})}})}}),C=(0,o.Z)(k,2),O=C[0],I=C[1].isLoading,D=(0,a.useMemo)((function(){if(u){var e={};return Object.entries(u).map((function(n){var t=(0,o.Z)(n,2),r=t[0],i=t[1];i&&"object"===typeof i?Object.entries(i).map((function(n){var t=(0,o.Z)(n,2),i=t[0],c=t[1];e["".concat(r,".").concat(i)]=c})):e[r]=i})),e}}),[u]),N=(0,a.useMemo)((function(){var e=l.status,t=[];return"ecs"===n&&("STOPPED"===e?t.unshift({label:"Resume instance",onClick:function(){return y({workspace:{action:"resume",cluster_type:n,name:l.name,task_arn:l.task_arn}})},props:{loading:_,primary:!0},uuid:"resume_instance"}):"RUNNING"===e&&t.unshift({label:"Stop instance",onClick:function(){return y({workspace:{action:"stop",cluster_type:n,name:l.name,task_arn:l.task_arn}})},props:{loading:_,warning:!0},uuid:"stop_instance"})),"k8s"===n&&("STOPPED"===e?t.unshift({label:"Resume instance",onClick:function(){return y({workspace:{action:"resume",cluster_type:n,name:l.name}})},props:{loading:_,primary:!0},uuid:"resume_instance"}):"RUNNING"===e&&t.unshift({label:"Stop instance",onClick:function(){return y({workspace:{action:"stop",cluster_type:n,name:l.name}})},props:{loading:_,warning:!0},uuid:"stop_instance"})),null===s||void 0===s||!s.ingress_name||null!==s&&void 0!==s&&s.url||t.push({label:"Add to ingress",onClick:function(){return y({workspace:{action:"add_to_ingress",cluster_type:n,name:l.name}})},props:{default:!0,loading:_},uuid:"re_add_to_ingress"}),t}),[n,l,y,s,_]),E=(0,a.useMemo)((function(){return(0,q.jsx)(d.ZP,{danger:!0,loading:I,onClick:function(){window.confirm("Are you sure you want to delete workspace ".concat(f,"?"))&&O()},children:"Delete workspace"})}),[O,I,f]);return(0,q.jsx)(q.Fragment,{children:(0,q.jsxs)(w.Z,{p:2,children:[(0,q.jsx)(w.Z,{mb:2,children:(0,q.jsxs)(g.ZP,{alignItems:"center",children:[(0,q.jsx)(R.Folder,{size:2*re.iI}),(0,q.jsx)(w.Z,{mr:1}),(0,q.jsx)(b.Z,{level:3,children:null===s||void 0===s?void 0:s.name})]})}),(0,q.jsx)(w.Z,{mb:2,children:(0,q.jsxs)(P.ZP,{children:["Status: ",(0,q.jsx)(P.ZP,{bold:!0,danger:"STOPPED"===h,default:"PROVISIONING"===h,inline:!0,success:"RUNNING"===h,warning:"PENDING"===h,children:h})]})}),!N||0==N.length&&(0,q.jsx)(w.Z,{mb:2,children:E}),N&&N.length>0&&(0,q.jsx)(w.Z,{mb:2,children:(0,q.jsxs)(g.ZP,{justifyContent:"space-between",children:[(0,q.jsx)(v.Z,{children:N.map((function(e){var n=e.label,t=e.onClick,r=e.uuid,i=e.props;return(0,q.jsx)(w.Z,{mr:1,children:(0,q.jsx)(d.ZP,oe(oe({},i),{},{onClick:t,children:n}))},r)}))}),E]})}),n===r.K8S&&(0,q.jsx)(te,{children:Object.entries(A).map((function(e,n){var t=(0,o.Z)(e,2),r=t[0],i=t[1];return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(w.Z,{mx:2,my:2,children:(0,q.jsxs)(g.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,q.jsx)(v.Z,{flex:4,children:(0,q.jsx)(P.ZP,{muted:!0,children:i})}),(0,q.jsx)(v.Z,{flex:2,flexDirection:"row-reverse",children:(0,q.jsx)(P.ZP,{bold:!0,children:(null===s||void 0===s?void 0:s[r])||"N/A"})})]})},r),n!==Object.entries(A).length-1&&(0,q.jsx)(x.Z,{muted:!0})]})}))}),D&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(w.Z,{my:2,children:(0,q.jsx)(b.Z,{default:!0,level:5,children:"Lifecycle Properties"})}),(0,q.jsx)(te,{children:Object.entries(W).map((function(e,n){var t,r=(0,o.Z)(e,2),i=r[0],c=r[1];return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(w.Z,{mx:2,my:2,children:(0,q.jsxs)(g.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,q.jsx)(v.Z,{flex:3,children:(0,q.jsx)(P.ZP,{muted:!0,children:c})}),(0,q.jsx)(v.Z,{flex:1,flexDirection:"row-reverse",children:(0,q.jsx)(P.ZP,{bold:!0,children:null===(t=D[i])||void 0===t?void 0:t.toString()})})]})},i),n!==Object.entries(W).length-1&&(0,q.jsx)(x.Z,{muted:!0})]})}))})]})]})})};!function(e){e.ALL="__all__",e.NAMESPACE="namespace[]"}(ce||(ce={}));var le=t(42631),ae=t(11498),ue=t(75083),de=t(69419),pe=t(53808),fe="workspace_list_filters";function he(e){return(0,pe.t8)(fe,e),e}var me=t(15610),xe=t(42122),je=t(98464);function ve(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 ge(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ve(Object(t),!0).forEach((function(n){(0,c.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ve(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function be(){var e=(0,u.useRouter)(),n=S.ZP.statuses.list().data,t=(0,a.useState)(null),i=t[0],s=t[1],l=(0,de.iV)(),p=(0,a.useMemo)((function(){return ge({},(0,de.DQ)(l,[ce.NAMESPACE]))}),[l]),f=(0,a.useMemo)((function(){var e,t;return(null===n||void 0===n||null===(e=n.statuses)||void 0===e||null===(t=e[0])||void 0===t?void 0:t.instance_type)||"ecs"}),[n]),h=S.ZP.projects.list({},{revalidateOnFocus:!1}).data,m=(0,a.useMemo)((function(){var e;return null===h||void 0===h||null===(e=h.projects)||void 0===e?void 0:e[0]}),[h]),x=(0,a.useState)(!1),j=x[0],v=x[1],g=S.ZP.workspaces.list(ge(ge({},p),{},{cluster_type:f}),{revalidateOnFocus:!1}),b=g.data,Z=g.mutate,y=(0,je.Z)(b);(0,a.useEffect)((function(){null==b?v(!0):null==y&&v(!1)}),[b,y]);var _=(0,a.useMemo)((function(){var e;return null===b||void 0===b||null===(e=b.workspaces)||void 0===e?void 0:e.filter((function(e){return e.name}))}),[b]),w=(0,U.dd)((function(){return(0,q.jsx)(K,{clusterType:f,onCancel:O,onCreate:function(){Z(),O()},project:m})}),{},[f,Z,m],{background:!0,disableClickOutside:!0,disableEscape:!0,uuid:"configure_workspace"}),k=(0,o.Z)(w,2),C=k[0],O=k[1],I=(0,U.dd)((function(e){var n=e.workspace;return(0,q.jsx)(Y.Z,{children:(0,q.jsx)("div",{style:{width:"750px"},children:(0,q.jsx)(se,{clusterType:f,fetchWorkspaces:Z,onSuccess:E,setErrors:s,workspace:n})})})}),{},[f,Z,s,_],{background:!0,uuid:"workspace_detail"}),D=(0,o.Z)(I,2),N=D[0],E=D[1],M=(0,a.useCallback)((function(e){var n=null===_||void 0===_?void 0:_[e];N({workspace:n})}),[N,_]);(0,a.useEffect)((function(){var e={};if((0,xe.Qr)(p)){var n={},t=(0,pe.U2)(fe,{});t&&Object.entries(t).forEach((function(e){var t=(0,o.Z)(e,2),r=t[0],i=t[1];"undefined"!==typeof i&&null!==i&&(ae.RG.includes(r)?n[r]=i:(n[r]=[],Object.entries(i).forEach((function(e){var t=(0,o.Z)(e,2),i=t[0];t[1]&&n[r].push(i)}))))})),(0,xe.Qr)(n)||(e={},Object.entries(ge(ge({},e),n)||{}).forEach((function(n){var t=(0,o.Z)(n,2),r=t[0],i=t[1];"undefined"!==typeof i&&null!==i&&(e[r]=i)})))}else{var r={};Object.entries(p).forEach((function(e){var n=(0,o.Z)(e,2),t=n[0],i=n[1];r[t]={};var c,s=i;"undefined"!==typeof i&&null!==i&&(ae.RG.includes(t)?r[t]=s:(Array.isArray(s)||(s=[s]),s&&Array.isArray(s)&&(null===(c=s)||void 0===c||c.forEach((function(e){r[t][e]=!0})))))})),he((0,xe.hB)(r))}(0,xe.Qr)(e)||(0,me.u)((0,xe.hB)(e),{pushHistory:!1})}),[p]);var F=(0,a.useMemo)((function(){var n={},t={};return f===r.K8S&&(n={namespace:[ce.ALL]},t={namespace:(0,c.Z)({},ce.ALL,"All namespaces")}),(0,q.jsx)(X.Z,{addButtonProps:{label:"Create new workspace",onClick:C},extraActionButtonProps:{Icon:R.Refresh,disabled:!1,isLoading:j,onClick:function(){v(!0),Z().then((function(){return v(!1)}))},tooltip:"Refresh workspaces"},filterOptions:n,filterValueLabelMapping:t,onClickFilterDefaults:function(){he({}),e.push("/manage")},onFilterApply:function(e,n){Object.values(n).every((function(e){return!(null!==e&&void 0!==e&&e.length)}))&&he({})},query:p})}),[f,Z,j,p,e,C]);return(0,q.jsx)(J.Z,{breadcrumbs:[{bold:!0,label:function(){return"Workspaces"}}],errors:i,pageName:ue.L6.WORKSPACES,setErrors:s,subheaderChildren:F,children:(0,q.jsx)(Q.Z,{columnFlex:[2,4,2,3,1,null],columns:[{uuid:"Status"},{uuid:"Instance Name"},{uuid:"Type"},{uuid:"URL/IP"},{uuid:"Open"}],onClickRow:["ecs","k8s"].includes(f)&&M,rows:null===_||void 0===_?void 0:_.map((function(e){var n=e.instance,t=e.url,r=n.ip,i=n.name,o=n.status,c=n.type,s=t||r,l=s;return s&&!s.includes("http")&&(l="http://".concat(s),"ecs"===f&&(l="http://".concat(s,":6789"))),[(0,q.jsx)(d.ZP,{borderRadius:"".concat(le.D7,"px"),danger:"STOPPED"===o,default:"PROVISIONING"===o,notClickable:!0,padding:"6px",success:"RUNNING"===o,warning:"PENDING"===o,children:(0,G.vg)(o)},"status"),(0,q.jsx)(P.ZP,{children:i},"name"),(0,q.jsx)(P.ZP,{children:(0,G.vg)(c)},"type"),(0,q.jsx)(P.ZP,{children:s||"N/A"},"ip"),(0,q.jsx)(d.ZP,{disabled:!s,iconOnly:!0,onClick:function(){return window.open(l)},children:(0,q.jsx)(R.Expand,{size:2*re.iI})},"open_button")]}))})})}be.getInitialProps=(0,i.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 Ze=(0,$.Z)(be)},13157:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage",function(){return t(42765)}])}},function(e){e.O(0,[1557,1598,5544,9774,2888,179],(function(){return n=13157,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1709],{81066:function(e,n,t){"use strict";t.d(n,{B:function(){return p}});var r=t(82394),i=t(46732),o=t(68562),c=t(72473),u=t(8059),a=t(70515),l=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,b=e.onClickCallback;return(0,l.jsx)(i.Z,{disableKeyboardShortcuts:!0,items:f,onClickCallback:b,onClickOutside:b,open:n,parentRef:t,roundedStyle:!0,topOffset:1,uuid:"Table/Toolbar/NewItemMenu",children:(0,l.jsx)(o.ZP,s(s({},p),{},{background:u.eW,beforeElement:(0,l.jsx)(c.Add,{size:2.5*a.iI}),loading:r,onClick:function(e){e.preventDefault(),null===h||void 0===h||h()},uuid:"shared/AddButton/index",children:d}))})}},46568:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=(t(82684),t(33591)),c=t(28598),u=["children","fullHeight","gutter","style"];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 l(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.fullHeight,r=e.gutter,a=e.style,d=void 0===a?{}:a,s=(0,i.Z)(e,u),p=l({},d);return r&&(p.paddingLeft=r,p.paddingRight=p.paddingLeft),t&&(p.height="100%"),(0,c.jsx)(o.Col,l(l({},s),{},{style:p,children:n}))}},82682:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=t(82684),c=t(33591),u=t(28598),a=["children","fullHeight","gutter","justifyContent","style"];function l(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?l(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.fullHeight,r=e.gutter,l=e.justifyContent,s=e.style,p=void 0===s?{}:s,f=(0,i.Z)(e,a),h=d({},p);return r&&(h.marginLeft=-1*r,h.marginRight=h.marginLeft),t&&(h.height="100%"),(0,u.jsx)(c.Row,d(d({},f),{},{justifyContent:l,style:h,children:o.Children.map(n,(function(e,n){return e&&o.cloneElement(e,{gutter:r,key:n})}))}))}},94542:function(e,n,t){"use strict";t.d(n,{J:function(){return o},X:function(){return c}});var r=t(46568),i=t(82682),o=r.Z,c=i.Z},29241:function(e,n,t){"use strict";var r=t(25976),i=t(44897),o=r.default.div.withConfig({displayName:"PageSectionHeader",componentId:"sc-1wznrcv-0"})(["left:0;position:sticky;top:0;width:100%;z-index:3;",""],(function(e){return"\n background-color: ".concat(e.backgroundColor||(e.theme.background||i.Z.background).page,";\n border-bottom: 1px solid ").concat((e.theme.borders||i.Z.borders).medium,";\n ")}));n.Z=o},96348:function(e,n,t){"use strict";t.d(n,{g:function(){return g},Z:function(){return v}});var r=t(82684),i=t(25976),o=t(44897),c=t(42631),u=t(47041),a=t(70515),l=1.5*a.iI,d=1.5*a.iI,s=i.default.div.withConfig({displayName:"indexstyle__TableStyle",componentId:"sc-13p7y8j-0"})(["border-radius:","px;overflow:hidden;width:100%;"," "," "," ",""],c.n_,(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")}),(function(e){return"\n background-color: ".concat((e.theme||o.Z).background.page,";\n border: ").concat(c.YF,"px ").concat(c.M8," ").concat((e.theme||o.Z).interactive.defaultBorder,";\n box-shadow: ").concat((e.theme||o.Z).shadow.frame,";\n ")}),(function(e){return e.noBackground&&"\n background-color: transparent;\n "}),(function(e){return e.noBoxShadow&&"\n box-shadow: none;\n "})),p=i.default.div.withConfig({displayName:"indexstyle__RowContainerStyle",componentId:"sc-13p7y8j-1"})(["overflow:auto;border-bottom-left-radius:","px;border-bottom-right-radius:","px;"," "," "," ",""],c.n_,c.n_,u.w5,(function(e){return e.maxHeight>0&&"\n max-height: ".concat(e.maxHeight,"px;\n ")}),(function(e){return e.minHeight>0&&"\n min-height: ".concat(e.minHeight,"px;\n ")}),(function(e){return e.scrollable&&"\n margin-bottom: ".concat(a.iI,"px;\n overflow-y: auto;\n padding-top: ").concat(3,"px;\n padding-left: ").concat(3,"px;\n padding-right: ").concat(3,"px;\n ")})),f=i.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-13p7y8j-2"})(["border-top-left-radius:","px;border-top-right-radius:","px;padding:","px ","px;",""],c.n_,c.n_,l,2*a.iI,(function(e){return"\n border-bottom: ".concat(c.YF,"px ").concat(c.M8," ").concat((e.theme.interactive||o.Z.interactive).defaultBorder,";\n ")})),h=i.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-13p7y8j-3"})(["padding:","px ","px;"," "," "," "," "," ",""],d,2*a.iI,(function(e){return"\n border-bottom: ".concat(c.YF,"px ").concat(c.M8," ").concat((e.theme||o.Z).borders.medium2,";\n ")}),(function(e){return e.sameColorBorders&&"\n border-bottom-color: ".concat((e.theme||o.Z).interactive.defaultBorder,";\n ")}),(function(e){return e.noHorizontalPadding&&"\n padding-left: 0;\n padding-right: 0;\n "}),(function(e){return e.condensed&&"\n padding-top: ".concat(9,"px;\n padding-bottom: ").concat(9,"px;\n ")}),(function(e){return e.secondary&&"\n background-color: ".concat((e.theme.background||o.Z.background).row2,";\n ")}),(function(e){return e.last&&e.noBorder&&"\n border-bottom-left-radius: ".concat(c.n_,"px;\n border-bottom-right-radius: ").concat(c.n_,"px;\n border-bottom: none;\n ")})),b=i.default.div.withConfig({displayName:"indexstyle__FooterStyle",componentId:"sc-13p7y8j-4"})(["border-bottom-left-radius:","px;border-bottom-right-radius:","px;padding:","px ","px;",""],c.n_,c.n_,l,2*a.iI,(function(e){return"\n border-top: ".concat(c.YF,"px ").concat(c.M8," ").concat((e.theme||o.Z).borders.medium2,";\n ")})),m=t(28598),g=h;var v=function(e){var n=e.alternating,t=e.children,i=e.footer,o=e.header,c=e.maxHeight,u=e.minHeight,a=e.noBackground,l=e.noBoxShadow,d=e.sameColorBorders,h=e.scrollable,g=e.width,v=[].concat(t).filter((function(e){return null!==e}));return(0,m.jsxs)(s,{noBackground:a,noBoxShadow:l,width:g,children:[o&&(0,m.jsx)(f,{children:o}),(0,m.jsx)(p,{maxHeight:c,minHeight:u,scrollable:h,children:r.Children.map(v,(function(e,t){return e&&r.cloneElement(e,{last:t===v.length-1,sameColorBorders:d,secondary:n&&t%2===1})}))}),i&&(0,m.jsx)(b,{children:i})]})}},17380:function(e,n,t){"use strict";t.d(n,{i:function(){return d}});t(82684);var r=t(25976),i=(t(97618),t(55485),t(48670),t(38276),t(47329)),o=t.n(i);o().node,o().node,o().node.isRequired,o().bool,o().string.isRequired;t(30160);var c=t(70987),u=t(95363),a=t(70515),l=t(42631),d=(t(28598),"tab");r.default.div.withConfig({displayName:"Tabs__TabHeaderContainerStyle",componentId:"sc-rojme5-0"})(["",""],(function(e){return e.containerWidthPercentage&&"\n width: ".concat(e.containerWidthPercentage,"%;\n ")})),r.default.div.withConfig({displayName:"Tabs__TabHeader",componentId:"sc-rojme5-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;margin-right:","px;position:relative;z-index:2;"," "," ",""],l.BG,l.BG,6*a.iI,(function(e){return e.noBottomBorder&&"\n border-bottom: none;\n "}),(function(e){return e.active&&"\n border-bottom: ".concat(a.cd,"px solid;\n border-color: ").concat((e.theme.interactive||c.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.fullWidth&&"\n width: 100%;\n "})),r.default.div.withConfig({displayName:"Tabs__LinkStyle",componentId:"sc-rojme5-2"})(["align-items:center;display:flex;"," "," ",""],(function(e){return e.bold&&"\n font-family: ".concat(u.nF,";\n ")}),(function(e){return e.fullWidth&&"\n justify-content: center;\n "}),(function(e){return!e.disabled&&"\n &:hover {\n path {\n fill: ".concat((e.theme.content||c.Z.interactive).linkPrimary," !important;\n }\n }\n ")}))},98941:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Ue}});var r=t(77837),i=t(82394),o=t(75582),c=t(38860),u=t.n(c),a=t(69864),l=t(82684),d=t(34376),s=t(92083),p=t.n(s),f=t(52749),h=t(81066),b=t(53998),m=t(39440),g=t(60523),v=t(90299),x=t(94629),y=t(55485),j=t(85854),O=t(48670),Z=t(97618),_=t(38276),w=t(30160),P=t(25976),C=t(44897),k=t(42631),I=t(70515),T=12.5*I.iI,E=8*I.iI,D=5*I.iI,N=3*I.iI,S=P.default.div.withConfig({displayName:"indexstyle__TileContainerStyle",componentId:"sc-c3nc3q-0"})(["padding:","px;border-radius:","px;height:","px;width:","px;"," ",""],2.5*I.iI,k.TR,T,T,(function(e){return"\n background-color: ".concat((e.theme||C.Z).background.chartBlock,";\n ")}),(function(e){return e.compact&&"\n height: ".concat(E,"px;\n width: ").concat(E,"px;\n ")})),R=t(28598);var M=function(e){var n=e.Icon,t=e.compact,r=e.label;return(0,R.jsx)(S,{compact:t,children:(0,R.jsxs)(y.ZP,{alignItems:"center",flexDirection:"column",justifyContent:"center",children:[(0,R.jsx)(n,{size:t?N:D}),(0,R.jsx)(_.Z,{mb:"4px"}),(0,R.jsx)(w.ZP,{bold:!0,small:t,children:r})]})})},A=t(12468),B=P.default.div.withConfig({displayName:"indexstyle__MetricsSummaryContainerStyle",componentId:"sc-nu65g1-0"})(["width:100%;padding:","px;border-radius:","px;",""],2*I.iI,k.n_,(function(e){return"\n border: ".concat(k.YF,"px ").concat(k.M8," ").concat((e.theme||C.Z).interactive.defaultBorder,";\n box-shadow: ").concat((e.theme||C.Z).shadow.frame,";\n ")})),L=P.default.div.withConfig({displayName:"indexstyle__MetricContainerStyle",componentId:"sc-nu65g1-1"})(["display:flex;flex:1;align-items:center;justify-content:space-between;",""],(function(e){return e.includeLeftBorder&&"\n @media (min-width: 1200px) {\n padding-left: 24px;\n border-left: ".concat(k.YF,"px ").concat(k.M8," ").concat((e.theme||C.Z).interactive.defaultBorder,";\n }\n ")})),H=t(57653),Y=t(94542),F=t(41143),U={muted:!0,size:t(72191)._k,widthFitContent:!0},V=t(81728),q=t(48277),G=t(79221),W=t(70320),X=t(86735);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,i.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 K=function(e){var n=e.pipelineRunCountByPipelineType,t=(0,W.qB)(),r=(0,l.useMemo)((function(){if(!n)return[];var e=JSON.parse(JSON.stringify(n)),t=e[H.qL.PYTHON]||{};return Object.entries(e[H.qL.PYSPARK]||{}).forEach((function(e){var n=(0,o.Z)(e,2),r=n[0],i=n[1];t[r]?t[r]+=i:t[r]=i})),e[H.qL.PYTHON]=t,delete e[H.qL.PYSPARK],(0,X.mr)(Object.entries(e).filter((function(e){var n=(0,o.Z)(e,2),t=(n[0],n[1]);return 0!==Object.keys(t).length})))}),[n]),i=(0,l.useMemo)((function(){return t?(0,R.jsx)(_.Z,{ml:"4px",children:(0,R.jsx)(A.Z,J(J({},U),{},{label:"Please note that these metrics are based on UTC time."}))}):null}),[t]);return(0,R.jsxs)(B,{children:[(0,R.jsxs)(y.ZP,{alignItems:"center",children:[(0,R.jsx)(w.ZP,{bold:!0,large:!0,children:"Pipeline run metrics"}),i]}),(0,R.jsx)(_.Z,{mb:2}),(0,R.jsx)(Y.X,{style:{gap:"16px"},children:r.map((function(e,n){var t=(0,o.Z)(e,2),i=t[0],c=t[1];return(0,R.jsxs)(L,{includeLeftBorder:0!==n,children:[(0,R.jsx)(M,{Icon:H.Mj[i],label:H.G7[i]}),(0,X.mr)(Object.entries(c)).map((function(e,n){var t=(0,o.Z)(e,2),r=t[0],i=t[1];return(0,R.jsx)(_.Z,{px:1,children:(0,R.jsxs)(Z.Z,{flexDirection:"column",children:[(0,R.jsx)(w.ZP,{children:(0,V.kC)(r)}),(0,R.jsx)(w.ZP,{bold:!0,danger:r===F.V.FAILED&&i>0,title:(0,q.uf)(i),xlarge:!0,children:(0,G.P5)(i,{maxFractionDigits:1,minAmount:1e3})})]})},"".concat(r,"_").concat(n))})),(0,R.jsx)(_.Z,{pr:n!==r.length-1?2:0})]},"".concat(i,"_metric"))}))})]})},$=t(29241),Q=t(65956),ee=t(55729),ne=t(93808),te=t(82359),re=t(4190),ie=t(12691),oe=t.n(ie),ce=t(71180),ue=t(96348),ae=t(68899),le=t(17380),de=t(3917),se=t(69419);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 fe(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,i.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}var he=40*I.iI,be=40*I.iI;var me=function(e){var n=e.pipelineType,t=e.pipelineRuns,r=void 0===t?[]:t,i=(0,d.useRouter)(),o=(0,se.iV)(),c=(null===o||void 0===o?void 0:o[le.i])||de.vk.TODAY,u=(0,W.qB)(),a=n===H.LM,s=a?H.LM:H.G7[n],p=H.Mj[n],f=r.length,h=0===f?"":"(".concat(f,")"),b=(0,l.useMemo)((function(){return u?(0,R.jsx)(_.Z,{ml:"4px",children:(0,R.jsx)(A.Z,fe(fe({},U),{},{label:"The pipeline run failures are displayed in local time.",maxWidth:24*I.iI,widthFitContent:!1}))}):null}),[u]);return(0,R.jsx)(ue.Z,{footer:(0,R.jsx)(y.ZP,{alignItems:"center",justifyContent:"center",children:(0,R.jsx)(oe(),{as:"/pipeline-runs?status=failed",href:"/pipeline-runs",passHref:!0,children:(0,R.jsx)(O.Z,{sameColorAsText:!0,children:"View more"})})}),header:(0,R.jsxs)(y.ZP,{alignItems:"center",children:[(0,R.jsx)(ce.ZP,{beforeIcon:(0,R.jsx)(p,{size:2.5*I.iI}),compact:!0,notClickable:!0,children:(0,V.kC)(s)}),(0,R.jsx)(_.Z,{ml:2}),(0,R.jsxs)(w.ZP,{bold:!0,children:["Latest ",a?"":"".concat((0,V.wX)(s)," "),"pipeline run failures ",h]}),b]}),maxHeight:he,minHeight:be,children:0===f?(0,R.jsx)(y.ZP,{alignItems:"center",fullWidth:!0,justifyContent:"center",children:(0,R.jsx)(_.Z,{px:5,py:10,children:(0,R.jsxs)(y.ZP,{alignItems:"center",flexDirection:"column",children:[(0,R.jsx)(ae.Hn,{imageUrl:"".concat(i.basePath,"/images/blocks/grey_block.webp")}),(0,R.jsx)(_.Z,{mb:3}),(0,R.jsxs)(w.ZP,{large:!0,children:["No ",a?"":"".concat((0,V.wX)(s)," "),"pipeline run failures for ",de.s8[c]]})]})})}):r.map((function(e){var n=e.created_at,t=e.id,r=e.pipeline_uuid;return(0,R.jsx)(ue.g,{children:(0,R.jsxs)(y.ZP,{alignItems:"center",children:[(0,R.jsx)(oe(),{as:"/pipelines/".concat(r),href:"/pipelines/[pipeline]",passHref:!0,children:(0,R.jsx)(O.Z,{monospace:!0,sameColorAsText:!0,small:!0,children:r})}),(0,R.jsx)(w.ZP,{monospace:!0,small:!0,children:"\xa0>\xa0"}),(0,R.jsx)(oe(),{as:"/pipelines/".concat(r,"/runs/").concat(t),href:"/pipelines/[pipeline]/runs/[run]",passHref:!0,children:(0,R.jsxs)(O.Z,{danger:!0,monospace:!0,sameColorAsText:!0,small:!0,children:["Run created on\xa0",u?(0,de.XG)(n,u):n]})})]})},"pipeline_run_".concat(t))}))})},ge=t(35686),ve=t(35058),xe=t(64657),ye=t(44425),je=t(75399),Oe=t(23780),Ze=t(46684),_e=t(61556),we=t(32929),Pe=t(72473),Ce={Icon:Pe.Smiley,label:function(){return(0,V.kC)(de.s8[de.vk.TODAY])},uuid:de.vk.TODAY},ke={Icon:Pe.WeekDots,label:function(){return(0,V.kC)(de.s8[de.vk.WEEK])},uuid:de.vk.WEEK},Ie={Icon:Pe.CalendarRounded,label:function(){return(0,V.kC)(de.s8[de.vk.MONTH])},uuid:de.vk.MONTH},Te={Icon:Pe.NavDashboard,label:function(){return"Dashboard"},uuid:"Dashboard"},Ee=[Ce,ke,Ie],De=t(24491),Ne=t(65458),Se=t(15610),Re=t(72619),Me=t(89538),Ae=t(70026);function Be(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 Le(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Be(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Be(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var He={mt:2,mx:3},Ye={refreshInterval:6e4,revalidateOnFocus:!1};function Fe(e){var n,t,r=e.tab,c=(0,l.useRef)(null),u=(0,l.useRef)(!1),s=(0,l.useRef)(null),Z=((0,se.iV)(),(0,d.useRouter)()),P=(0,l.useRef)(null),k=(0,l.useState)(Ee.find((function(e){return e.uuid===r}))||Ce),T=k[0],E=k[1],D=(0,l.useState)(!1),N=D[0],S=D[1],M=(0,l.useState)(null),B=M[0],L=M[1],Y=null===T||void 0===T?void 0:T.uuid,G=(0,l.useMemo)((function(){return Ee.concat(Te)}),[]),z=(0,l.useMemo)((function(){return(0,de.jV)(Y,{isoString:!0})}),[Y]),J=(0,l.useMemo)((function(){return{group_by_pipeline_type:1,start_time:z}}),[z]),ne=(0,l.useState)(),ie=ne[0],oe=ne[1],ce=(0,a.Db)((function(){var e,n;return null===(e=ge.ZP.monitor_stats)||void 0===e?void 0:e.detailAsync(_e.h.PIPELINE_RUN_COUNT,J,{signal:null===c||void 0===c||null===(n=c.current)||void 0===n?void 0:n.signal})}),{onSuccess:function(e){return(0,Re.wD)(e,{callback:function(e){var n=e.monitor_stat.stats;oe(n)}})}}),ue=(0,o.Z)(ce,2),pe=ue[0],fe=ue[1].isLoading,he=(0,l.useCallback)((function(e){var n;null!==(null===c||void 0===c?void 0:c.current)&&(null===c||void 0===c||null===(n=c.current)||void 0===n||n.abort());c.current=new AbortController,E((function(n){var t="function"===typeof e?e(n):e;return(null===n||void 0===n?void 0:n.uuid)!==(null===t||void 0===t?void 0:t.uuid)&&((0,Se.u)((0,i.Z)({},le.i,null===t||void 0===t?void 0:t.uuid),{replaceParams:!0}),pe()),t}))}),[]);(0,l.useEffect)((function(){null!==u&&void 0!==u&&u.current||(u.current=!0,pe())}),[]);var be,Pe=ge.ZP.pipeline_runs.list({_limit:50,include_pipeline_type:1,"order_by[]":"created_at desc",start_timestamp:(0,de.A5)(z),status:F.V.FAILED},Le({},Ye)).data,ke=(0,l.useMemo)((function(){return((null===Pe||void 0===Pe?void 0:Pe.pipeline_runs)||[]).filter((function(e){return null!==e.pipeline_type}))}),[null===Pe||void 0===Pe?void 0:Pe.pipeline_runs]),Ie=(0,l.useMemo)((function(){return(0,X.vM)(ke,(function(e){return e.pipeline_type}))}),[ke]),Be=Ie.integration,Fe=void 0===Be?[]:Be,Ue=Ie.python,Ve=void 0===Ue?[]:Ue,qe=Ie.streaming,Ge=void 0===qe?[]:qe,We=(0,l.useMemo)((function(){return(0,de.Y_)(de.yD[Y]+1)}),[Y]),Xe=(0,l.useMemo)((function(){return(0,De.i)(ie,We)}),[ie,We]),ze=Xe.pipelineRunCountByPipelineType,Je=Xe.totalPipelineRunCount,Ke=Xe.ungroupedPipelineRunData,$e=(0,l.useMemo)((function(){return(0,de.Ro)(de.yD[Y],{endDateOnly:Y===de.vk.TODAY})}),[Y]),Qe=(be=function(e){return Z.push("/pipelines/[pipeline]/edit","/pipelines/".concat(e,"/edit"))},(0,a.Db)(ge.ZP.pipelines.useCreate(),{onSuccess:function(e){return(0,Re.wD)(e,{callback:function(e){var n=e.pipeline.uuid;null===be||void 0===be||be(n)},onErrorCallback:function(e,n){return L({errors:n,response:e})}})}})),en=(0,o.Z)(Qe,2),nn=en[0],tn=en[1].isLoading,rn=ge.ZP.projects.list(),on=rn.data,cn=rn.mutate,un=(0,l.useMemo)((function(){var e;return null===on||void 0===on||null===(e=on.projects)||void 0===e?void 0:e[0]}),[on]),an=(0,l.useMemo)((function(){var e;return(0,W.hY)(null===un||void 0===un||null===(e=un.features)||void 0===e?void 0:e[te.d.LOCAL_TIMEZONE])}),[null===un||void 0===un?void 0:un.features]),ln=(0,Me.dd)((function(){return(0,R.jsx)(Oe.BC,{children:(0,R.jsx)(g.Z,{contained:!0,onClickCustomTemplate:function(e){nn({pipeline:{custom_template_uuid:null===e||void 0===e?void 0:e.template_uuid,name:(0,V.Y6)()}}).then((function(){pn()}))},showBreadcrumbs:!0,tabs:[we.A2]})})}),{},[],{background:!0,uuid:"browse_templates"}),dn=(0,o.Z)(ln,2),sn=dn[0],pn=dn[1],fn=(0,Me.dd)((function(){return(0,R.jsx)(Ae.Z,{onCancel:mn})}),{},[,],{background:!0,uuid:"import_pipeline"}),hn=(0,o.Z)(fn,2),bn=hn[0],mn=hn[1],gn=(0,Me.dd)((function(e){var n=e.cancelButtonText,t=(e.header,e.onCancel),r=e.onSaveSuccess;return(0,R.jsx)(Oe.BC,{children:(0,R.jsx)(ee.Z,{cancelButtonText:n,contained:!0,header:(0,R.jsx)(_.Z,{mb:I.HN,children:(0,R.jsxs)(Q.Z,{children:[(0,R.jsx)(w.ZP,{warning:!0,children:"You need to add an OpenAI API key to your project before you can generate pipelines using AI."}),(0,R.jsx)(_.Z,{mt:1,children:(0,R.jsxs)(w.ZP,{warning:!0,children:["Read ",(0,R.jsx)(O.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===t||void 0===t||t(),yn()},onSaveSuccess:function(e){cn(),yn(),null===r||void 0===r||r(e)}})})}),{},[cn],{background:!0,uuid:"configure_project"}),vn=(0,o.Z)(gn,2),xn=vn[0],yn=vn[1],jn=(0,Me.dd)((function(){return(0,R.jsx)(Oe.BC,{children:(0,R.jsx)(f.Z,{createPipeline:nn,isLoading:tn,onClose:_n})})}),{},[nn,tn],{background:!0,disableClickOutside:!0,disableCloseButton:!0,uuid:"AI_modal"}),On=(0,o.Z)(jn,2),Zn=On[0],_n=On[1],wn=(0,l.useMemo)((function(){return(0,Ne.d)(nn,{showImportPipelineModal:bn,showAIModal:function(){null!==un&&void 0!==un&&un.openai_api_key?Zn():xn({onSaveSuccess:function(){Zn()}})},showBrowseTemplates:sn})}),[nn,un,Zn,sn,xn,bn]),Pn=(0,l.useMemo)((function(){return(0,R.jsx)(h.Z,{addButtonMenuOpen:N,addButtonMenuRef:P,isLoading:tn,label:"New pipeline",menuItems:wn,onClick:function(){return S((function(e){return!e}))},onClickCallback:function(){return S(!1)}})}),[N,tn,wn]),Cn=(0,l.useMemo)((function(){return an?(0,R.jsx)(_.Z,{ml:"4px",children:(0,R.jsx)(A.Z,Le(Le({},U),{},{label:"Please note that these counts are based on UTC time."}))}):null}),[an]),kn=(0,l.useMemo)((function(){var e,n,t,r,o,c,u="Pipelines",a=(0,V.kE)("".concat(u,"_overview_dashboard_").concat((0,V.Lo)())),l="Trigger active status",d=(0,V.kE)("".concat(l,"_overview_dashboard_").concat((0,V.Lo)())),s="Pipeline run status",p=(0,V.kE)("".concat(s,"_overview_dashboard_").concat((0,V.Lo)())),f="Pipeline runs daily",h=(0,V.kE)("".concat(f,"_overview_dashboard_").concat((0,V.Lo)())),b="Completed pipeline runs daily",m=(0,V.kE)("".concat(b,"_overview_dashboard_").concat((0,V.Lo)())),g="Failed pipeline runs daily",v=(0,V.kE)("".concat(g,"_overview_dashboard_").concat((0,V.Lo)())),x="Running pipelines",y=(0,V.kE)("".concat(x,"_overview_dashboard_").concat((0,V.Lo)())),j={type:je.XO.PIPELINE_SCHEDULES},O={type:je.XO.PIPELINE_RUNS},Z={configuration:(e={},(0,i.Z)(e,ve.eN,["execution_date"]),(0,i.Z)(e,ve.bE,[{aggregation:ve.os.COUNT_DISTINCT,column:"id"}]),(0,i.Z)(e,ve.Yg,ve.aE.DAY),(0,i.Z)(e,"chart_type",ve.oV.TIME_SERIES_LINE_CHART),e),data_source:O,type:ye.tf.CHART};return{blocks:(c={},(0,i.Z)(c,a,{configuration:(n={},(0,i.Z)(n,ve.eN,["type"]),(0,i.Z)(n,ve.bE,[{aggregation:ve.os.COUNT_DISTINCT,column:"uuid"}]),(0,i.Z)(n,ve.$1,ve.MP.DESCENDING),(0,i.Z)(n,"chart_style",ve.JT.HORIZONTAL),(0,i.Z)(n,"chart_type",ve.oV.BAR_CHART),n),data_source:{type:je.XO.PIPELINES},name:u,type:ye.tf.CHART,uuid:a}),(0,i.Z)(c,d,{configuration:(t={},(0,i.Z)(t,ve.eN,["status"]),(0,i.Z)(t,ve.bE,[{aggregation:ve.os.COUNT_DISTINCT,column:"id"}]),(0,i.Z)(t,ve.$1,ve.MP.DESCENDING),(0,i.Z)(t,"chart_type",ve.oV.BAR_CHART),t),data_source:j,name:l,type:ye.tf.CHART,uuid:d}),(0,i.Z)(c,p,{configuration:(r={},(0,i.Z)(r,ve.eN,["status"]),(0,i.Z)(r,ve.bE,[{aggregation:ve.os.COUNT_DISTINCT,column:"id"}]),(0,i.Z)(r,ve.$1,ve.MP.DESCENDING),(0,i.Z)(r,"chart_style",ve.JT.HORIZONTAL),(0,i.Z)(r,"chart_type",ve.oV.BAR_CHART),r),data_source:O,name:s,type:ye.tf.CHART,uuid:p}),(0,i.Z)(c,h,Le(Le({},Z),{},{name:f,uuid:h})),(0,i.Z)(c,m,Le(Le({},Z),{},{content:"\n@data_source\ndef d(df):\n return df[df['status'] == '".concat(F.V.COMPLETED,"']\n"),name:b,uuid:m})),(0,i.Z)(c,v,Le(Le({},Z),{},{content:"\n@data_source\ndef d(df):\n return df[df['status'] == '".concat(F.V.FAILED,"']\n"),name:g,uuid:v})),(0,i.Z)(c,y,{configuration:(o={},(0,i.Z)(o,ve.eN,["backfill_id","completed_at","created_at","execution_date","executor_type","id","pipeline_schedule_id","pipeline_uuid","started_at","status"]),(0,i.Z)(o,"chart_type",ve.oV.TABLE),o),content:"\n@data_source\ndef d(df):\n return df[df['status'] == '".concat(F.V.RUNNING,"']\n"),data_source:O,name:x,type:ye.tf.CHART,uuid:y}),c),layout:[[{block_uuid:a,width:1},{block_uuid:d,width:1}],[{block_uuid:p,width:1},{block_uuid:h,width:2}],[{block_uuid:m,width:1},{block_uuid:v,width:1}],[{block_uuid:y,width:1}]]}}),[]);return(0,R.jsxs)(x.Z,{errors:B,setErrors:L,title:"Overview",uuid:"overview/index",children:[(0,R.jsx)($.Z,{backgroundColor:C.Z.background.panel,ref:s,children:(0,R.jsx)(_.Z,{py:2,children:(0,R.jsxs)(y.ZP,{alignItems:"center",children:[(0,R.jsx)(_.Z,{ml:3,children:Pn}),(0,R.jsx)(v.Z,{onClickTab:function(e){var n=e.uuid;he((function(){return G.find((function(e){return n===e.uuid}))}))},regularSizeText:!0,selectedTabUUID:Y,tabs:G})]})})}),Te.uuid===(null===T||void 0===T?void 0:T.uuid)&&(0,R.jsx)(m.Z,{leftOffset:ae.k1-1,pageBlockLayoutTemplate:kn,topOffset:Ze.Mz+(null===s||void 0===s||null===(n=s.current)||void 0===n||null===(t=n.getBoundingClientRect())||void 0===t?void 0:t.height),uuid:"overview/dashboard"}),Te.uuid!==(null===T||void 0===T?void 0:T.uuid)&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(_.Z,{mx:3,my:2,children:[(0,R.jsxs)(j.Z,{level:4,children:[Y===de.vk.TODAY&&"".concat((0,V.kC)(de.vk.TODAY)," (UTC): ").concat($e),Y!==de.vk.TODAY&&"".concat((0,V.kC)(de.s8[Y])," (UTC): ").concat($e)]}),(0,R.jsx)(_.Z,{mt:2,children:fe?(0,R.jsx)(_.Z,{mx:2,my:11,children:(0,R.jsx)(re.Z,{inverted:!0})}):(0,R.jsx)(K,{pipelineRunCountByPipelineType:ze})}),(0,R.jsxs)(_.Z,{mt:2,children:[(0,R.jsx)(_.Z,{ml:2,children:(0,R.jsxs)(y.ZP,{alignItems:"center",children:[(0,R.jsxs)(w.ZP,{bold:!0,large:!0,children:[fe?"--":(0,q.uf)(Je)," total pipeline runs"]}),Cn]})}),(0,R.jsx)(_.Z,{mt:1,children:(0,R.jsx)(b.Z,{backgroundColor:C.Z.background.panel,colors:xe.NU,data:Ke,getXValue:function(e){return e.date},height:200,keys:xe.hu,margin:{bottom:30,left:35,right:0,top:10},tooltipLeftOffset:xe.CD,xLabelFormat:function(e){return p()(e).format("MMM DD")}})})]})]}),(0,R.jsx)(_.Z,Le(Le({},He),{},{children:(0,R.jsxs)(y.ZP,{alignItems:"center",justifyContent:"center",children:[(0,R.jsx)(me,{pipelineRuns:ke,pipelineType:H.LM}),(0,R.jsx)(_.Z,{ml:2}),(0,R.jsx)(me,{pipelineRuns:Ve,pipelineType:H.qL.PYTHON})]})})),(0,R.jsx)(_.Z,Le(Le({},He),{},{children:(0,R.jsxs)(y.ZP,{alignItems:"center",justifyContent:"center",children:[(0,R.jsx)(me,{pipelineRuns:Fe,pipelineType:H.qL.INTEGRATION}),(0,R.jsx)(_.Z,{ml:2}),(0,R.jsx)(me,{pipelineRuns:Ge,pipelineType:H.qL.STREAMING})]})})),(0,R.jsx)(_.Z,{mb:2})]})]})}Fe.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 e.abrupt("return",{tab:(null===n||void 0===n||null===(t=n.query)||void 0===t?void 0:t.tab)||de.vk.TODAY});case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var Ue=(0,ne.Z)(Fe)},56655:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overview",function(){return t(98941)}])}},function(e){e.O(0,[3662,125,2714,2631,4783,1557,4241,8095,635,523,9440,3548,5831,181,9774,2888,179],(function(){return n=56655,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -1 +0,0 @@
|
|
|
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}]);
|