mage-ai 0.9.69__py3-none-any.whl → 0.9.71__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/ai/utils/xgboost.py +222 -0
- mage_ai/api/errors.py +37 -25
- mage_ai/api/operations/base.py +13 -1
- mage_ai/api/parsers/PipelineScheduleParser.py +1 -1
- mage_ai/api/policies/BackfillPolicy.py +1 -0
- mage_ai/api/policies/BlockOutputPolicy.py +40 -17
- mage_ai/api/policies/GlobalDataProductPolicy.py +91 -41
- mage_ai/api/policies/KernelPolicy.py +55 -32
- mage_ai/api/policies/KernelProcessPolicy.py +56 -0
- mage_ai/api/policies/OutputPolicy.py +73 -41
- mage_ai/api/policies/PipelinePolicy.py +206 -137
- mage_ai/api/policies/WorkspacePolicy.py +1 -0
- mage_ai/api/presenters/BackfillPresenter.py +1 -0
- mage_ai/api/presenters/BlockLayoutItemPresenter.py +9 -7
- mage_ai/api/presenters/BlockPresenter.py +1 -1
- mage_ai/api/presenters/GlobalDataProductPresenter.py +6 -1
- mage_ai/api/presenters/KernelPresenter.py +5 -26
- mage_ai/api/presenters/KernelProcessPresenter.py +28 -0
- mage_ai/api/presenters/PipelinePresenter.py +18 -5
- mage_ai/api/presenters/StatusPresenter.py +2 -0
- mage_ai/api/presenters/SyncPresenter.py +25 -0
- mage_ai/api/resources/AutocompleteItemResource.py +1 -1
- mage_ai/api/resources/BlockLayoutItemResource.py +90 -44
- mage_ai/api/resources/BlockOutputResource.py +42 -9
- mage_ai/api/resources/BlockResource.py +4 -3
- mage_ai/api/resources/BlockRunResource.py +27 -22
- mage_ai/api/resources/ClusterResource.py +4 -1
- mage_ai/api/resources/CustomTemplateResource.py +34 -14
- mage_ai/api/resources/DataProviderResource.py +1 -1
- mage_ai/api/resources/ExecutionStateResource.py +3 -1
- mage_ai/api/resources/FileContentResource.py +8 -2
- mage_ai/api/resources/FileResource.py +10 -4
- mage_ai/api/resources/FileVersionResource.py +3 -1
- mage_ai/api/resources/GitBranchResource.py +101 -31
- mage_ai/api/resources/GitCustomBranchResource.py +29 -1
- mage_ai/api/resources/GlobalDataProductResource.py +44 -7
- mage_ai/api/resources/GlobalHookResource.py +4 -1
- mage_ai/api/resources/IntegrationDestinationResource.py +6 -2
- mage_ai/api/resources/IntegrationSourceResource.py +8 -4
- mage_ai/api/resources/IntegrationSourceStreamResource.py +6 -2
- mage_ai/api/resources/KernelProcessResource.py +44 -0
- mage_ai/api/resources/KernelResource.py +25 -3
- mage_ai/api/resources/OauthResource.py +1 -1
- mage_ai/api/resources/OutputResource.py +33 -11
- mage_ai/api/resources/PageBlockLayoutResource.py +34 -23
- mage_ai/api/resources/PipelineInteractionResource.py +31 -15
- mage_ai/api/resources/PipelineResource.py +258 -125
- mage_ai/api/resources/PipelineRunResource.py +52 -7
- mage_ai/api/resources/PipelineScheduleResource.py +11 -2
- mage_ai/api/resources/PipelineTriggerResource.py +6 -1
- mage_ai/api/resources/ProjectResource.py +18 -7
- mage_ai/api/resources/PullRequestResource.py +6 -4
- mage_ai/api/resources/SecretResource.py +1 -1
- mage_ai/api/resources/SeedResource.py +8 -1
- mage_ai/api/resources/StatusResource.py +21 -6
- mage_ai/api/resources/SyncResource.py +6 -8
- mage_ai/api/resources/VariableResource.py +46 -26
- mage_ai/api/resources/VersionControlProjectResource.py +9 -2
- mage_ai/api/resources/WidgetResource.py +1 -1
- mage_ai/api/resources/WorkspaceResource.py +6 -5
- mage_ai/api/views.py +47 -40
- mage_ai/authentication/permissions/seed.py +16 -2
- mage_ai/authentication/providers/oidc.py +21 -1
- mage_ai/autocomplete/utils.py +13 -9
- mage_ai/cache/base.py +1 -1
- mage_ai/cache/block.py +18 -12
- mage_ai/cache/block_action_object/__init__.py +33 -5
- mage_ai/cache/file.py +22 -19
- mage_ai/cache/pipeline.py +18 -12
- mage_ai/cli/main.py +1 -0
- mage_ai/cluster_manager/aws/emr_cluster_manager.py +9 -5
- mage_ai/cluster_manager/config.py +2 -2
- mage_ai/cluster_manager/kubernetes/workload_manager.py +52 -1
- mage_ai/cluster_manager/manage.py +1 -1
- mage_ai/cluster_manager/workspace/base.py +7 -1
- mage_ai/cluster_manager/workspace/kubernetes.py +22 -1
- mage_ai/command_center/applications/factory.py +10 -7
- mage_ai/command_center/applications/utils.py +2 -2
- mage_ai/command_center/files/factory.py +17 -15
- mage_ai/command_center/presenters/text.py +1 -1
- mage_ai/command_center/utils.py +25 -13
- mage_ai/data/__init__.py +0 -0
- mage_ai/data/constants.py +45 -0
- mage_ai/data/models/__init__.py +0 -0
- mage_ai/data/models/base.py +119 -0
- mage_ai/data/models/constants.py +1 -0
- mage_ai/data/models/generator.py +115 -0
- mage_ai/data/models/manager.py +168 -0
- mage_ai/data/models/pyarrow/__init__.py +0 -0
- mage_ai/data/models/pyarrow/record_batch.py +55 -0
- mage_ai/data/models/pyarrow/shared.py +21 -0
- mage_ai/data/models/pyarrow/table.py +8 -0
- mage_ai/data/models/reader.py +103 -0
- mage_ai/data/models/utils.py +59 -0
- mage_ai/data/models/writer.py +91 -0
- mage_ai/data/tabular/__init__.py +0 -0
- mage_ai/data/tabular/constants.py +23 -0
- mage_ai/data/tabular/mocks.py +19 -0
- mage_ai/data/tabular/models.py +126 -0
- mage_ai/data/tabular/reader.py +602 -0
- mage_ai/data/tabular/utils.py +102 -0
- mage_ai/data/tabular/writer.py +266 -0
- mage_ai/data/variables/__init__.py +0 -0
- mage_ai/data/variables/wrapper.py +54 -0
- mage_ai/data_cleaner/analysis/charts.py +61 -39
- mage_ai/data_cleaner/column_types/column_type_detector.py +53 -31
- mage_ai/data_cleaner/estimators/encoders.py +5 -2
- mage_ai/data_integrations/utils/scheduler.py +16 -11
- mage_ai/data_preparation/decorators.py +1 -0
- mage_ai/data_preparation/executors/block_executor.py +237 -155
- mage_ai/data_preparation/executors/k8s_block_executor.py +30 -7
- mage_ai/data_preparation/executors/k8s_pipeline_executor.py +30 -7
- mage_ai/data_preparation/executors/streaming_pipeline_executor.py +2 -2
- mage_ai/data_preparation/git/__init__.py +77 -29
- mage_ai/data_preparation/git/api.py +69 -8
- mage_ai/data_preparation/git/utils.py +64 -34
- mage_ai/data_preparation/logging/logger_manager.py +4 -3
- mage_ai/data_preparation/models/block/__init__.py +1562 -879
- mage_ai/data_preparation/models/block/data_integration/mixins.py +4 -3
- mage_ai/data_preparation/models/block/dynamic/__init__.py +17 -6
- mage_ai/data_preparation/models/block/dynamic/child.py +41 -102
- mage_ai/data_preparation/models/block/dynamic/constants.py +1 -0
- mage_ai/data_preparation/models/block/dynamic/counter.py +296 -0
- mage_ai/data_preparation/models/block/dynamic/data.py +16 -0
- mage_ai/data_preparation/models/block/dynamic/factory.py +163 -0
- mage_ai/data_preparation/models/block/dynamic/models.py +19 -0
- mage_ai/data_preparation/models/block/dynamic/shared.py +92 -0
- mage_ai/data_preparation/models/block/dynamic/utils.py +295 -167
- mage_ai/data_preparation/models/block/dynamic/variables.py +384 -144
- mage_ai/data_preparation/models/block/dynamic/wrappers.py +77 -0
- mage_ai/data_preparation/models/block/extension/utils.py +10 -1
- mage_ai/data_preparation/models/block/global_data_product/__init__.py +35 -3
- mage_ai/data_preparation/models/block/integration/__init__.py +6 -2
- mage_ai/data_preparation/models/block/outputs.py +722 -0
- mage_ai/data_preparation/models/block/platform/mixins.py +7 -8
- mage_ai/data_preparation/models/block/r/__init__.py +56 -38
- mage_ai/data_preparation/models/block/remote/__init__.py +0 -0
- mage_ai/data_preparation/models/block/remote/models.py +58 -0
- mage_ai/data_preparation/models/block/settings/__init__.py +0 -0
- mage_ai/data_preparation/models/block/settings/dynamic/__init__.py +0 -0
- mage_ai/data_preparation/models/block/settings/dynamic/constants.py +7 -0
- mage_ai/data_preparation/models/block/settings/dynamic/mixins.py +118 -0
- mage_ai/data_preparation/models/block/settings/dynamic/models.py +31 -0
- mage_ai/data_preparation/models/block/settings/global_data_products/__init__.py +0 -0
- mage_ai/data_preparation/models/block/settings/global_data_products/mixins.py +20 -0
- mage_ai/data_preparation/models/block/settings/global_data_products/models.py +46 -0
- mage_ai/data_preparation/models/block/settings/variables/__init__.py +0 -0
- mage_ai/data_preparation/models/block/settings/variables/mixins.py +74 -0
- mage_ai/data_preparation/models/block/settings/variables/models.py +49 -0
- mage_ai/data_preparation/models/block/spark/mixins.py +2 -1
- mage_ai/data_preparation/models/block/sql/__init__.py +30 -5
- mage_ai/data_preparation/models/block/sql/utils/shared.py +21 -3
- mage_ai/data_preparation/models/block/utils.py +164 -69
- mage_ai/data_preparation/models/constants.py +21 -14
- mage_ai/data_preparation/models/custom_templates/custom_block_template.py +18 -13
- mage_ai/data_preparation/models/custom_templates/custom_pipeline_template.py +33 -16
- mage_ai/data_preparation/models/custom_templates/utils.py +1 -1
- mage_ai/data_preparation/models/file.py +41 -28
- mage_ai/data_preparation/models/global_data_product/__init__.py +100 -58
- mage_ai/data_preparation/models/global_hooks/models.py +1 -0
- mage_ai/data_preparation/models/interfaces.py +29 -0
- mage_ai/data_preparation/models/pipeline.py +374 -185
- mage_ai/data_preparation/models/pipelines/integration_pipeline.py +1 -2
- mage_ai/data_preparation/models/pipelines/seed.py +1 -1
- mage_ai/data_preparation/models/project/__init__.py +66 -18
- mage_ai/data_preparation/models/project/constants.py +2 -0
- mage_ai/data_preparation/models/triggers/__init__.py +124 -26
- mage_ai/data_preparation/models/utils.py +467 -17
- mage_ai/data_preparation/models/variable.py +1028 -137
- mage_ai/data_preparation/models/variables/__init__.py +0 -0
- mage_ai/data_preparation/models/variables/cache.py +149 -0
- mage_ai/data_preparation/models/variables/constants.py +72 -0
- mage_ai/data_preparation/models/variables/summarizer.py +336 -0
- mage_ai/data_preparation/models/variables/utils.py +77 -0
- mage_ai/data_preparation/models/widget/__init__.py +63 -41
- mage_ai/data_preparation/models/widget/charts.py +40 -27
- mage_ai/data_preparation/models/widget/constants.py +2 -0
- mage_ai/data_preparation/models/widget/utils.py +3 -3
- mage_ai/data_preparation/preferences.py +3 -3
- mage_ai/data_preparation/repo_manager.py +55 -21
- mage_ai/data_preparation/storage/base_storage.py +2 -2
- mage_ai/data_preparation/storage/gcs_storage.py +7 -4
- mage_ai/data_preparation/storage/local_storage.py +18 -9
- mage_ai/data_preparation/storage/s3_storage.py +5 -2
- mage_ai/data_preparation/templates/data_exporters/streaming/oracledb.yaml +8 -0
- mage_ai/data_preparation/variable_manager.py +281 -76
- mage_ai/io/base.py +3 -2
- mage_ai/io/bigquery.py +1 -0
- mage_ai/io/redshift.py +7 -5
- mage_ai/kernels/__init__.py +0 -0
- mage_ai/kernels/models.py +188 -0
- mage_ai/kernels/utils.py +169 -0
- mage_ai/orchestration/concurrency.py +6 -2
- mage_ai/orchestration/db/__init__.py +1 -0
- mage_ai/orchestration/db/migrations/versions/0227396a216c_add_userproject_table.py +38 -0
- mage_ai/orchestration/db/migrations/versions/42a14d6143f1_update_token_column_type.py +54 -0
- mage_ai/orchestration/db/models/dynamic/__init__.py +0 -0
- mage_ai/orchestration/db/models/dynamic/controller.py +67 -0
- mage_ai/orchestration/db/models/oauth.py +12 -18
- mage_ai/orchestration/db/models/projects.py +10 -0
- mage_ai/orchestration/db/models/schedules.py +225 -187
- mage_ai/orchestration/db/models/schedules_project_platform.py +18 -12
- mage_ai/orchestration/db/models/utils.py +46 -5
- mage_ai/orchestration/metrics/pipeline_run.py +8 -9
- mage_ai/orchestration/notification/sender.py +38 -15
- mage_ai/orchestration/pipeline_scheduler_original.py +64 -33
- mage_ai/orchestration/pipeline_scheduler_project_platform.py +1 -1
- mage_ai/orchestration/run_status_checker.py +11 -4
- mage_ai/orchestration/triggers/api.py +41 -2
- mage_ai/orchestration/triggers/global_data_product.py +9 -4
- mage_ai/orchestration/triggers/utils.py +10 -1
- mage_ai/orchestration/utils/resources.py +3 -0
- mage_ai/presenters/charts/data_sources/base.py +4 -2
- mage_ai/presenters/charts/data_sources/block.py +15 -9
- mage_ai/presenters/charts/data_sources/chart_code.py +8 -5
- mage_ai/presenters/charts/data_sources/constants.py +1 -0
- mage_ai/presenters/charts/data_sources/system_metrics.py +22 -0
- mage_ai/presenters/interactions/models.py +11 -7
- mage_ai/presenters/pages/loaders/pipelines.py +5 -3
- mage_ai/presenters/pages/models/page_components/pipeline_schedules.py +3 -1
- mage_ai/presenters/utils.py +2 -0
- mage_ai/server/api/blocks.py +2 -1
- mage_ai/server/api/downloads.py +9 -2
- mage_ai/server/api/runs.py +151 -0
- mage_ai/server/api/triggers.py +3 -1
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +8 -8
- mage_ai/server/frontend_dist/_next/static/UZLabyPgcxtZvp0O0EUUS/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1376-22de38b4ad008d8a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1557-25a7d985d5564fd3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1668-30b4619b9534519b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1799-c42db95a015689ee.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2996-2108b53b9d371d8d.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{3548-fa0792ddb88f4646.js → 3548-9d26185b3fb663b1.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{3763-61b542dafdbf5754.js → 3763-40780c6d1e4b261d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3782-129dd2a2448a2e36.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3958-bcdfa414ccfa1eb2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/4168-97fd1578d1a38315.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/4982-fa5a238b139fbdd2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/5699-176f445e1313f001.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7162-7dd03f0f605de721.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7779-68d2b72a90c5f925.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7966-5446a8e43711e2f9.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8023-6c2f172f48dcb99b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8095-c351b8a735d73e0c.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9624-8b8e100079ab69e1.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{main-77fe248a6fbd12d8.js → main-b99d4e30a88d9dc7.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-9fe2d9d07c94e968.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{block-layout-14f952f66964022f.js → block-layout-7f4b735c67115df5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/[...slug]-e7d48e6b0c3068ac.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products-b943f31f050fc3a4.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-4bfc84ff07d7656f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{overview-597b74828bf105db.js → overview-9f1ac4ec003884f3.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-3edc6270c5b0e962.js → frontend_dist/_next/static/chunks/pages/pipeline-runs-6d183f91a2ff6668.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-7e737f6fc7e83e9b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-38e1fbcfbfc1014e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-d94488e3f2eeef36.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-cc641a7fa8473796.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-a5c0362763a21fa8.js → block-runs-284309877f3c5a5a.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-26250e5335194ade.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-7acc7afc00df17c2.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-5f4c8128b2413fd8.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-4ebfc8e400315dda.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-e5e0150a256aadb3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-eb11c5390c982b49.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-1bdfda8edc9cf4a8.js → triggers-4612d15a65c35912.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/{profile-3f0df3decc856ee9.js → profile-3ae43c932537b254.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-b603d7fe4b175256.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js → frontend_dist/_next/static/chunks/pages/settings/platform/settings-319ddbabc239e91b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-47b64ced27c24985.js → [...slug]-5c360f72e4498855.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{permissions-e5a4d3d815cec25d.js → permissions-fb29fa6c2bd90bb0.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-3b76fa959ffa09d3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-379e1ee292504842.js → [...slug]-3b787b42f1093b1f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles-0b83fbdd39e85f5b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-a1e6950974d643a8.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/{[...slug]-2af9afbe727d88aa.js → [...slug]-0aa019d87db8b0b8.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-a4db8710f703c729.js → users-88c694d19207f2ec.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{triggers-9cba3211434a8966.js → triggers-a599c6ac89be8c8d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-31d0d50f7f30462b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{webpack-d079359c241db804.js → webpack-ac7fdc472bedf682.js} +1 -1
- mage_ai/server/frontend_dist/block-layout.html +3 -3
- mage_ai/server/frontend_dist/compute.html +6 -6
- mage_ai/server/frontend_dist/files.html +6 -6
- mage_ai/server/frontend_dist/global-data-products/[...slug].html +6 -6
- mage_ai/server/frontend_dist/global-data-products.html +6 -6
- mage_ai/server/frontend_dist/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist/global-hooks.html +6 -6
- mage_ai/server/frontend_dist/index.html +3 -3
- mage_ai/server/frontend_dist/manage/files.html +6 -6
- mage_ai/server/frontend_dist/manage/settings.html +6 -6
- mage_ai/server/frontend_dist/manage/users/[user].html +6 -6
- mage_ai/server/frontend_dist/manage/users/new.html +6 -6
- mage_ai/server/frontend_dist/manage/users.html +6 -6
- mage_ai/server/frontend_dist/manage.html +6 -6
- mage_ai/server/frontend_dist/oauth.html +5 -5
- mage_ai/server/frontend_dist/overview.html +6 -6
- mage_ai/server/frontend_dist/pipeline-runs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +3 -3
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +3 -3
- mage_ai/server/frontend_dist/pipelines.html +6 -6
- mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist/platform/global-hooks.html +6 -6
- mage_ai/server/frontend_dist/settings/account/profile.html +6 -6
- mage_ai/server/frontend_dist/settings/platform/preferences.html +6 -6
- mage_ai/server/frontend_dist/settings/platform/settings.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/permissions.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/roles.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/users.html +6 -6
- mage_ai/server/frontend_dist/settings.html +3 -3
- mage_ai/server/frontend_dist/sign-in.html +15 -15
- mage_ai/server/frontend_dist/templates/[...slug].html +6 -6
- mage_ai/server/frontend_dist/templates.html +6 -6
- mage_ai/server/frontend_dist/terminal.html +6 -6
- mage_ai/server/frontend_dist/test.html +3 -3
- mage_ai/server/frontend_dist/triggers.html +6 -6
- mage_ai/server/frontend_dist/version-control.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/404.html +8 -8
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1376-22de38b4ad008d8a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-25a7d985d5564fd3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1668-30b4619b9534519b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1799-c42db95a015689ee.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2996-2108b53b9d371d8d.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{3548-fa0792ddb88f4646.js → 3548-9d26185b3fb663b1.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{3763-61b542dafdbf5754.js → 3763-40780c6d1e4b261d.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-129dd2a2448a2e36.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3958-bcdfa414ccfa1eb2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4168-97fd1578d1a38315.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4982-fa5a238b139fbdd2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-176f445e1313f001.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7162-7dd03f0f605de721.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7779-68d2b72a90c5f925.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7966-5446a8e43711e2f9.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8023-6c2f172f48dcb99b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8095-c351b8a735d73e0c.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-8b8e100079ab69e1.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{main-70b78159c2bb3fe1.js → main-384298e9133cec76.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-13a578bce3b7f30c.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{block-layout-14f952f66964022f.js → block-layout-7f4b735c67115df5.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/[...slug]-e7d48e6b0c3068ac.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products-b943f31f050fc3a4.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-4bfc84ff07d7656f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{overview-597b74828bf105db.js → overview-9f1ac4ec003884f3.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipeline-runs-3edc6270c5b0e962.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-6d183f91a2ff6668.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-7e737f6fc7e83e9b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-38e1fbcfbfc1014e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-d94488e3f2eeef36.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-cc641a7fa8473796.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-a5c0362763a21fa8.js → block-runs-284309877f3c5a5a.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-26250e5335194ade.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-7acc7afc00df17c2.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-5f4c8128b2413fd8.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-4ebfc8e400315dda.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-e5e0150a256aadb3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-eb11c5390c982b49.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-1bdfda8edc9cf4a8.js → triggers-4612d15a65c35912.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/{profile-3f0df3decc856ee9.js → profile-3ae43c932537b254.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-b603d7fe4b175256.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-319ddbabc239e91b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-47b64ced27c24985.js → [...slug]-5c360f72e4498855.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{permissions-e5a4d3d815cec25d.js → permissions-fb29fa6c2bd90bb0.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-3b76fa959ffa09d3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-379e1ee292504842.js → [...slug]-3b787b42f1093b1f.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles-0b83fbdd39e85f5b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-a1e6950974d643a8.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/{[...slug]-2af9afbe727d88aa.js → [...slug]-0aa019d87db8b0b8.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-a4db8710f703c729.js → users-88c694d19207f2ec.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{triggers-9cba3211434a8966.js → triggers-a599c6ac89be8c8d.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-31d0d50f7f30462b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{webpack-68c003fb6a175cd7.js → webpack-481689d9989710cd.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/kcptwoOU-JJJg6Vwpkfmx/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/block-layout.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/compute.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/files.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-data-products.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-hooks.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/index.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/manage/files.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/settings.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/users.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/oauth.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/overview.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +3 -3
- mage_ai/server/frontend_dist_base_path_template/pipelines.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/sign-in.html +15 -15
- mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/templates.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/terminal.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/test.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/triggers.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/version-control.html +6 -6
- mage_ai/server/kernel_output_parser.py +4 -1
- mage_ai/server/scheduler_manager.py +12 -1
- mage_ai/server/server.py +69 -42
- mage_ai/server/utils/custom_output.py +284 -0
- mage_ai/server/utils/execute_custom_code.py +245 -0
- mage_ai/server/utils/output_display.py +123 -289
- mage_ai/server/websocket_server.py +116 -69
- mage_ai/services/aws/ecs/ecs.py +1 -0
- mage_ai/services/k8s/config.py +27 -4
- mage_ai/services/k8s/job_manager.py +6 -1
- mage_ai/services/k8s/utils.py +97 -0
- mage_ai/services/ssh/aws/emr/utils.py +8 -8
- mage_ai/settings/keys/auth.py +1 -0
- mage_ai/settings/platform/__init__.py +159 -38
- mage_ai/settings/platform/constants.py +5 -0
- mage_ai/settings/platform/utils.py +53 -10
- mage_ai/settings/repo.py +26 -12
- mage_ai/settings/server.py +128 -37
- mage_ai/shared/array.py +24 -1
- mage_ai/shared/complex.py +45 -0
- mage_ai/shared/config.py +2 -1
- mage_ai/shared/custom_logger.py +11 -0
- mage_ai/shared/dates.py +10 -6
- mage_ai/shared/files.py +63 -8
- mage_ai/shared/hash.py +33 -9
- mage_ai/shared/io.py +9 -5
- mage_ai/shared/models.py +82 -24
- mage_ai/shared/outputs.py +87 -0
- mage_ai/shared/parsers.py +144 -13
- mage_ai/shared/path_fixer.py +11 -7
- mage_ai/shared/singletons/__init__.py +0 -0
- mage_ai/shared/singletons/base.py +47 -0
- mage_ai/shared/singletons/memory.py +38 -0
- mage_ai/shared/strings.py +34 -1
- mage_ai/shared/yaml.py +24 -0
- mage_ai/streaming/sinks/oracledb.py +57 -0
- mage_ai/streaming/sinks/sink_factory.py +4 -0
- mage_ai/system/__init__.py +0 -0
- mage_ai/system/constants.py +14 -0
- mage_ai/system/memory/__init__.py +0 -0
- mage_ai/system/memory/constants.py +1 -0
- mage_ai/system/memory/manager.py +174 -0
- mage_ai/system/memory/presenters.py +158 -0
- mage_ai/system/memory/process.py +216 -0
- mage_ai/system/memory/samples.py +13 -0
- mage_ai/system/memory/utils.py +656 -0
- mage_ai/system/memory/wrappers.py +177 -0
- mage_ai/system/models.py +58 -0
- mage_ai/system/storage/__init__.py +0 -0
- mage_ai/system/storage/utils.py +29 -0
- mage_ai/tests/api/endpoints/mixins.py +2 -2
- mage_ai/tests/api/endpoints/test_blocks.py +2 -1
- mage_ai/tests/api/endpoints/test_custom_designs.py +4 -4
- mage_ai/tests/api/endpoints/test_pipeline_runs.py +2 -2
- mage_ai/tests/api/endpoints/test_projects.py +2 -1
- mage_ai/tests/api/operations/base/mixins.py +1 -1
- mage_ai/tests/api/operations/base/test_base.py +27 -27
- mage_ai/tests/api/operations/base/test_base_with_user_authentication.py +27 -27
- mage_ai/tests/api/operations/base/test_base_with_user_permissions.py +23 -23
- mage_ai/tests/api/operations/test_syncs.py +6 -4
- mage_ai/tests/api/resources/test_pipeline_resource.py +11 -4
- mage_ai/tests/authentication/oauth/test_utils.py +1 -1
- mage_ai/tests/authentication/providers/test_oidc.py +59 -0
- mage_ai/tests/base_test.py +2 -2
- mage_ai/tests/data/__init__.py +0 -0
- mage_ai/tests/data/models/__init__.py +0 -0
- mage_ai/tests/data_preparation/executors/test_block_executor.py +23 -16
- mage_ai/tests/data_preparation/git/test_git.py +4 -1
- mage_ai/tests/data_preparation/models/block/dynamic/test_combos.py +305 -0
- mage_ai/tests/data_preparation/models/block/dynamic/test_counter.py +212 -0
- mage_ai/tests/data_preparation/models/block/dynamic/test_factory.py +360 -0
- mage_ai/tests/data_preparation/models/block/dynamic/test_variables.py +332 -0
- mage_ai/tests/data_preparation/models/block/hook/test_hook_block.py +2 -2
- mage_ai/tests/data_preparation/models/block/platform/test_mixins.py +1 -1
- mage_ai/tests/data_preparation/models/block/sql/utils/test_shared.py +26 -1
- mage_ai/tests/data_preparation/models/block/test_global_data_product.py +5 -2
- mage_ai/tests/data_preparation/models/custom_templates/test_utils.py +5 -4
- mage_ai/tests/data_preparation/models/global_hooks/test_hook.py +3 -0
- mage_ai/tests/data_preparation/models/global_hooks/test_predicates.py +9 -3
- mage_ai/tests/data_preparation/models/test_block.py +115 -120
- mage_ai/tests/data_preparation/models/test_blocks_helper.py +114 -0
- mage_ai/tests/data_preparation/models/test_global_data_product.py +41 -24
- mage_ai/tests/data_preparation/models/test_pipeline.py +9 -6
- mage_ai/tests/data_preparation/models/test_project.py +4 -1
- mage_ai/tests/data_preparation/models/test_utils.py +80 -0
- mage_ai/tests/data_preparation/models/test_variable.py +242 -69
- mage_ai/tests/data_preparation/models/variables/__init__.py +0 -0
- mage_ai/tests/data_preparation/models/variables/test_summarizer.py +481 -0
- mage_ai/tests/data_preparation/storage/shared/__init__.py +0 -0
- mage_ai/tests/data_preparation/test_repo_manager.py +6 -7
- mage_ai/tests/data_preparation/test_variable_manager.py +57 -48
- mage_ai/tests/factory.py +64 -43
- mage_ai/tests/orchestration/db/models/test_schedules.py +3 -3
- mage_ai/tests/orchestration/db/models/test_schedules_dynamic_blocks.py +279 -0
- mage_ai/tests/orchestration/test_pipeline_scheduler.py +1 -0
- mage_ai/tests/orchestration/triggers/test_global_data_product.py +141 -138
- mage_ai/tests/orchestration/triggers/test_utils.py +3 -2
- mage_ai/tests/server/test_server.py +19 -0
- mage_ai/tests/services/k8s/test_job_manager.py +27 -6
- mage_ai/tests/streaming/sinks/test_oracledb.py +38 -0
- mage_ai/tests/test_shared.py +61 -0
- mage_ai/usage_statistics/logger.py +7 -2
- mage_ai/utils/code.py +33 -19
- mage_ai/version_control/branch/utils.py +2 -1
- mage_ai/version_control/models.py +3 -2
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/METADATA +6 -3
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/RECORD +555 -454
- mage_ai/data_preparation/models/global_data_product/constants.py +0 -6
- mage_ai/server/frontend_dist/_next/static/_krrrgup_C-dPOpX36S8I/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1557-df144fbd8b2208c3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2631-b9f9bea3f1cf906d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3782-ef4cd4f0b52072d0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/4783-422429203610c318.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5699-6d708c6b2153ea08.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/635-0d6b7c8804bcd2dc.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7022-0d52dd8868621fb0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7361-8a23dd8360593e7a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7966-f07b2913f7326b50.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8095-bdce03896ef9639a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8146-6bed4e7401e067e6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9265-d2a1aaec75ec69b8.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9440-4069842b90d4b801.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9624-59b2f803f9c88cd6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9832-67896490f6e8a014.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-d9c89527266296f7.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/[...slug]-591abd392dc50ed4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products-78e8e88f2a757a18.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-852d403c7bda21b3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-95ffcd3e2b27e567.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-1ed9045b2f1dfd65.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1417ad1c821d720a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-f028ef3880ed856c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles-36fa165a48af586b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-5753fac7c1bfdc88.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/KLL5mirre9d7_ZeEpaw3s/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-df144fbd8b2208c3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2631-b9f9bea3f1cf906d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-ef4cd4f0b52072d0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4783-422429203610c318.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-6d708c6b2153ea08.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/635-0d6b7c8804bcd2dc.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7022-0d52dd8868621fb0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-8a23dd8360593e7a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7966-f07b2913f7326b50.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8095-bdce03896ef9639a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8146-6bed4e7401e067e6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9265-d2a1aaec75ec69b8.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9440-4069842b90d4b801.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-59b2f803f9c88cd6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9832-67896490f6e8a014.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-d9c89527266296f7.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/[...slug]-591abd392dc50ed4.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products-78e8e88f2a757a18.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-852d403c7bda21b3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-95ffcd3e2b27e567.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-1ed9045b2f1dfd65.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1417ad1c821d720a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-f028ef3880ed856c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles-36fa165a48af586b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-5753fac7c1bfdc88.js +0 -1
- mage_ai/shared/memory.py +0 -90
- mage_ai/tests/data_preparation/models/block/dynamic/test_dynamic_helpers.py +0 -48
- /mage_ai/{tests/data_preparation/shared → ai/utils}/__init__.py +0 -0
- /mage_ai/server/frontend_dist/_next/static/{_krrrgup_C-dPOpX36S8I → UZLabyPgcxtZvp0O0EUUS}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{KLL5mirre9d7_ZeEpaw3s → kcptwoOU-JJJg6Vwpkfmx}/_ssgManifest.js +0 -0
- /mage_ai/tests/data_preparation/{shared → storage/shared}/test_secrets.py +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/top_level.txt +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7022],{17022:function(e,n,i){var r=i(75582),s=i(82394),t=i(21764),l=i(82684),o=i(69864),u=i(34376),c=i(71180),d=i(70652),a=i(15338),E=i(97618),A=i(55485),I=i(85854),m=i(65956),L=i(28274),f=i(38276),_=i(75499),Z=i(30160),j=i(17488),D=i(35686),p=i(8193),v=i(72473),x=i(70515),S=i(24755),h=i(3917),T=i(76417),R=i(36717),b=i(86735),P=i(42122),g=i(72619),O=i(95924),C=i(28598);function B(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,r)}return i}function N(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?B(Object(i),!0).forEach((function(n){(0,s.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):B(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var y,k=2*x.iI;!function(e){e.PERMISSIONS="Permissions",e.USERS="Users"}(y||(y={})),n.Z=function(e){var n,i=e.contained,s=e.onCancel,B=e.slug,M=(0,u.useRouter)(),U=(0,l.useState)(!0),w=U[0],W=U[1],H=(0,l.useState)(null),Y=H[0],Q=H[1],F=(0,l.useState)({}),K=F[0],G=F[1],q=(0,l.useState)(null),V=q[0],z=q[1],$=(0,l.useCallback)((function(e,n,i){z(N(N({},e),{},{permissionsMapping:(0,b.HK)(n||[],(function(e){return e.id})),usersMapping:(0,b.HK)(i||[],(function(e){return e.id}))}))}),[z]),J=(0,l.useCallback)((function(e){G((function(n){return N(N({},n),e)})),z((function(n){return N(N({},n),e)}))}),[G,z]),X=D.ZP.roles.detail(B,{},{revalidateOnFocus:!1}).data,ee=(0,l.useMemo)((function(){return null===X||void 0===X?void 0:X.role}),[X]);(0,l.useEffect)((function(){ee&&$(ee,null===ee||void 0===ee?void 0:ee.role_permissions,null===ee||void 0===ee?void 0:ee.users)}),[$,ee]);var ne=(0,o.Db)(ee?D.ZP.roles.useUpdate(null===ee||void 0===ee?void 0:ee.id):D.ZP.roles.useCreate(),{onSuccess:function(e){return(0,g.wD)(e,{callback:function(e){var n=e.role;G({}),$(n,null===n||void 0===n?void 0:n.role_permissions,null===n||void 0===n?void 0:n.users),ee||M.push("/settings/workspace/roles/".concat(null===n||void 0===n?void 0:n.id)),t.Am.success(ee?"Role successfully updated.":"New role created successfully.",{position:t.Am.POSITION.BOTTOM_RIGHT,toastId:"role-mutate-success-".concat(n.id)})},onErrorCallback:function(e){var n=e.error,i=n.errors,r=n.exception,s=n.message,l=n.type;t.Am.error((null===i||void 0===i?void 0:i.error)||r||s,{position:t.Am.POSITION.BOTTOM_RIGHT,toastId:l})}})}}),ie=(0,r.Z)(ne,2),re=ie[0],se=ie[1].isLoading,te=(0,o.Db)(D.ZP.roles.useDelete(null===ee||void 0===ee?void 0:ee.id),{onSuccess:function(e){return(0,g.wD)(e,{callback:function(){M.push("/settings/workspace/roles"),t.Am.success("Role successfully delete.",{position:t.Am.POSITION.BOTTOM_RIGHT,toastId:"role-delete-success-".concat(null===ee||void 0===ee?void 0:ee.id)})},onErrorCallback:function(e){var n=e.error,i=n.errors,r=n.exception,s=n.message,l=n.type;t.Am.error((null===i||void 0===i?void 0:i.error)||r||s,{position:t.Am.POSITION.BOTTOM_RIGHT,toastId:l})}})}}),le=(0,r.Z)(te,2),oe=le[0],ue=le[1].isLoading,ce=D.ZP.permissions.list({_limit:1e3},{},{pauseFetch:!ee}).data,de=(0,l.useMemo)((function(){return(0,b.YC)((null===ce||void 0===ce?void 0:ce.permissions)||[],"entity_name")}),[ce]),ae=(0,l.useMemo)((function(){return(null===V||void 0===V?void 0:V.permissionsMapping)||{}}),[V]),Ee=(0,l.useMemo)((function(){return(0,b.YC)(Object.values(ae),"entity_name")}),[ae]),Ae=D.ZP.users.list({},{},{pauseFetch:!ee}).data,Ie=(0,l.useMemo)((function(){return(0,b.YC)((null===Ae||void 0===Ae?void 0:Ae.users)||[],(function(e){return(0,T.s)(e)}))}),[Ae]),me=(0,l.useMemo)((function(){return(null===V||void 0===V?void 0:V.usersMapping)||{}}),[V]),Le=(0,l.useMemo)((function(){return(0,b.YC)(Object.values(me),(function(e){return(0,T.s)(e)}))}),[me]),fe=(0,l.useMemo)((function(){return(null===Ee||void 0===Ee?void 0:Ee.length)>=1}),[Ee]),_e=(0,l.useMemo)((function(){return(0,C.jsx)(c.ZP,{beforeIcon:(0,C.jsx)(v.Add,{}),compact:!0,onClick:function(){Q(y.PERMISSIONS),W(!1)},primary:!fe,secondary:fe,small:!0,children:"Add permission"})}),[fe,Q,W]),Ze=(0,l.useMemo)((function(){return(null===Le||void 0===Le?void 0:Le.length)>=1}),[Le]),je=(0,l.useMemo)((function(){return(0,C.jsx)(c.ZP,{beforeIcon:(0,C.jsx)(v.Add,{}),compact:!0,onClick:function(){Q(y.USERS),W(!1)},primary:!Ze,secondary:Ze,small:!0,children:"Add user"})}),[Ze]),De=(0,l.useCallback)((function(e,n){return(0,C.jsx)(_.Z,{columnFlex:[null,null,2,1,1,6],columns:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===ae||void 0===ae?void 0:ae[n]}));return(0,C.jsx)(d.Z,{checked:n,onClick:function(i){(0,O.j)(i),J(n?{permissionsMapping:{}}:{permissionsMapping:(0,b.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"},{uuid:"ID"},{uuid:"Entity"},{uuid:"Subtype"},{uuid:"Entity ID"},{rightAligned:!0,uuid:"Access"}],onClickRow:n?function(n){var i=e[n];i&&window.open("/settings/workspace/permissions/".concat(null===i||void 0===i?void 0:i.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.access,i=e.entity,r=e.entity_id,s=e.entity_name,t=e.entity_type,l=e.id,o=n?(0,R.q)(n):[],u=(null===o||void 0===o?void 0:o.length)||0,c=!(null===ae||void 0===ae||!ae[l]);return[(0,C.jsx)(d.Z,{checked:c,onClick:function(n){(0,O.j)(n);var i=N({},ae);c?null===i||void 0===i||delete i[l]:i[l]=e,J({permissionsMapping:i})}},"checkbox"),(0,C.jsx)(Z.ZP,{default:!0,monospace:!0,children:l},"id"),(0,C.jsx)(Z.ZP,{monospace:!0,children:s||i},"entityName"),(0,C.jsx)(Z.ZP,{default:!0,monospace:!!t,children:t||"-"},"entityType"),(0,C.jsx)(Z.ZP,{default:!0,monospace:!!r,children:r||"-"},"entityID"),(0,C.jsx)("div",{children:u>=1&&(0,C.jsx)(A.ZP,{alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end",children:null===o||void 0===o?void 0:o.map((function(e,n){return(0,C.jsx)("div",{children:(0,C.jsxs)(Z.ZP,{default:!0,monospace:!0,small:!0,children:[e,u>=2&&n<u-1&&(0,C.jsx)(Z.ZP,{inline:!0,muted:!0,small:!0,children:",\xa0"})]})},e)}))})},"access")]})),uuid:"permissions"})}),[ae,J]),pe=(0,l.useCallback)((function(e,n){return(0,C.jsx)(_.Z,{columnFlex:[null,1,1,1],columns:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===me||void 0===me?void 0:me[n]}));return(0,C.jsx)(d.Z,{checked:n,onClick:function(i){(0,O.j)(i),J(n?{usersMapping:{}}:{usersMapping:(0,b.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"},{uuid:"Username"},{uuid:"First name"},{uuid:"Last name"}],onClickRow:n?function(n){var i=e[n];i&&window.open("/settings/workspace/users/".concat(null===i||void 0===i?void 0:i.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.first_name,i=e.id,r=e.last_name,s=e.username,t=!(null===me||void 0===me||!me[i]);return[(0,C.jsx)(d.Z,{checked:t,onClick:function(n){(0,O.j)(n);var r=N({},me);t?null===r||void 0===r||delete r[i]:r[i]=e,J({usersMapping:r})}},"checkbox"),(0,C.jsx)(Z.ZP,{children:s},"username"),(0,C.jsx)(Z.ZP,{default:!0,children:n},"firstName"),(0,C.jsx)(Z.ZP,{default:!0,children:r},"lastName")]})),uuid:"users"})}),[me,J]),ve=(0,l.useMemo)((function(){return De(de)}),[De,de]),xe=(0,l.useMemo)((function(){return pe(Ie)}),[pe,Ie]),Se=(0,l.useMemo)((function(){return De(Ee,!0)}),[De,Ee]),he=(0,l.useMemo)((function(){return pe(Le,!0)}),[pe,Le]),Te=(0,C.jsxs)(p.N,{children:[(0,C.jsxs)(m.Z,{noPadding:!0,children:[(0,C.jsx)(f.Z,{p:x.cd,children:(0,C.jsx)(I.Z,{level:4,children:"Role"})}),(0,C.jsx)(a.Z,{light:!0}),(0,C.jsx)(f.Z,{p:x.cd,children:(0,C.jsxs)(A.ZP,{alignItems:"center",children:[(0,C.jsxs)(Z.ZP,{danger:"name"in K&&!(null!==V&&void 0!==V&&V.name),default:!0,large:!0,children:["Name ","name"in K&&!(null!==V&&void 0!==V&&V.name)&&(0,C.jsx)(Z.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,C.jsx)(f.Z,{mr:x.cd}),(0,C.jsx)(E.Z,{flex:1,children:(0,C.jsx)(j.Z,{afterIcon:(0,C.jsx)(v.Edit,{}),afterIconClick:function(e,n){var i;null===n||void 0===n||null===(i=n.current)||void 0===i||i.focus()},afterIconSize:k,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return J({name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Archmage",value:(null===V||void 0===V?void 0:V.name)||""})})]})})]}),(0,C.jsx)(f.Z,{mb:x.HN}),ee&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(m.Z,{noPadding:!0,children:[(0,C.jsx)(f.Z,{p:x.cd,children:(0,C.jsxs)(A.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,C.jsx)(I.Z,{level:4,children:"Permissions"}),(0,C.jsx)(f.Z,{mr:x.cd}),fe&&(0,C.jsx)(A.ZP,{alignItems:"center",children:_e})]})}),(0,C.jsx)(a.Z,{light:!0}),!fe&&(0,C.jsxs)(f.Z,{p:x.cd,children:[(0,C.jsx)(f.Z,{mb:x.cd,children:(0,C.jsx)(Z.ZP,{default:!0,children:"This role currently has no permissions attached."})}),(0,C.jsx)(A.ZP,{alignItems:"center",children:_e})]}),fe&&(0,C.jsx)(f.Z,{pb:x.Mq,children:Se})]}),(0,C.jsx)(f.Z,{mb:x.HN}),(0,C.jsxs)(m.Z,{noPadding:!0,children:[(0,C.jsx)(f.Z,{p:x.cd,children:(0,C.jsxs)(A.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,C.jsx)(I.Z,{level:4,children:"Users"}),(0,C.jsx)(f.Z,{mr:x.cd}),Ze&&(0,C.jsx)(A.ZP,{alignItems:"center",children:je})]})}),(0,C.jsx)(a.Z,{light:!0}),!Ze&&(0,C.jsxs)(f.Z,{p:x.cd,children:[(0,C.jsx)(f.Z,{mb:x.cd,children:(0,C.jsx)(Z.ZP,{default:!0,children:"There are currently no users with this role."})}),(0,C.jsx)(A.ZP,{alignItems:"center",children:je})]}),Ze&&(0,C.jsx)(f.Z,{pb:x.Mq,children:he})]}),(0,C.jsx)(f.Z,{mb:x.HN}),(0,C.jsxs)(m.Z,{noPadding:!0,children:[(0,C.jsx)(f.Z,{p:x.cd,children:(0,C.jsx)(I.Z,{level:4,children:"Metadata"})}),(0,C.jsx)(a.Z,{light:!0}),(0,C.jsx)(f.Z,{p:x.cd,children:(0,C.jsxs)(A.ZP,{alignItems:"center",children:[(0,C.jsx)(Z.ZP,{default:!0,large:!0,children:"Last updated"}),(0,C.jsx)(f.Z,{mr:x.cd}),(0,C.jsxs)(E.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,C.jsx)(Z.ZP,{large:!0,monospace:!0,muted:!0,children:(null===V||void 0===V?void 0:V.updated_at)&&(0,h.d$)(null===V||void 0===V?void 0:V.updated_at,{includeSeconds:!0})}),(0,C.jsx)(f.Z,{mr:x.cd}),(0,C.jsx)(v.Schedule,{muted:!0,size:k}),(0,C.jsx)(f.Z,{mr:1})]})]})}),(0,C.jsx)(a.Z,{light:!0}),(0,C.jsx)(f.Z,{p:x.cd,children:(0,C.jsxs)(A.ZP,{alignItems:"center",children:[(0,C.jsx)(Z.ZP,{default:!0,large:!0,children:"Created at"}),(0,C.jsx)(f.Z,{mr:x.cd}),(0,C.jsxs)(E.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,C.jsx)(Z.ZP,{large:!0,monospace:!0,muted:!0,children:(null===V||void 0===V?void 0:V.created_at)&&(0,h.d$)(null===V||void 0===V?void 0:V.created_at,{includeSeconds:!0})}),(0,C.jsx)(f.Z,{mr:x.cd}),(0,C.jsx)(v.Schedule,{muted:!0,size:k}),(0,C.jsx)(f.Z,{mr:1})]})]})}),(0,C.jsx)(a.Z,{light:!0}),(0,C.jsx)(f.Z,{p:x.cd,children:(0,C.jsxs)(A.ZP,{alignItems:"center",children:[(0,C.jsx)(Z.ZP,{default:!0,large:!0,children:"Created by"}),(0,C.jsx)(f.Z,{mr:x.cd}),(0,C.jsxs)(E.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,C.jsx)(Z.ZP,{large:!0,monospace:!0,muted:!0,children:(0,T.s)(null===ee||void 0===ee?void 0:ee.user)}),(0,C.jsx)(f.Z,{mr:x.cd}),(0,C.jsx)(v.UserSmileyFace,{muted:!0,size:k}),(0,C.jsx)(f.Z,{mr:1})]})]})})]}),(0,C.jsx)(f.Z,{mb:x.HN})]}),(0,C.jsxs)(A.ZP,{children:[(0,C.jsx)(c.ZP,{beforeIcon:(0,C.jsx)(v.Save,{}),disabled:!K||!(null!==(n=Object.keys(K))&&void 0!==n&&n.length),loading:se,onClick:function(){return re({role:N(N({},(0,P.GL)(V,["name"],{include_blanks:!0})),{},{permission_ids:Object.keys((null===V||void 0===V?void 0:V.permissionsMapping)||{}).map((function(e){return Number(e)})),user_ids:Object.keys((null===V||void 0===V?void 0:V.usersMapping)||{}).map((function(e){return Number(e)}))})})},primary:!0,children:ee?"Save changes":"Create new role"}),s&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(f.Z,{mr:x.cd}),(0,C.jsx)(c.ZP,{onClick:function(){return null===s||void 0===s?void 0:s()},secondary:!0,children:"Cancel and go back"})]}),ee&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(f.Z,{mr:x.cd}),(0,C.jsx)(c.ZP,{beforeIcon:(0,C.jsx)(v.Trash,{}),danger:!0,loading:ue,onClick:function(){return oe()},children:"Delete role"})]})]})]});return i?Te:(0,C.jsx)(L.Z,{after:y.PERMISSIONS===Y?ve:y.USERS===Y?xe:null,afterHeader:(0,C.jsx)(f.Z,{px:x.cd,children:(0,C.jsx)(Z.ZP,{bold:!0,children:Y})}),afterHidden:w,afterWidth:60*x.iI,appendBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Roles"},linkProps:{href:"/settings/workspace/roles"}},{bold:!0,label:function(){return null===ee||void 0===ee?void 0:ee.name}}],hideAfterCompletely:!0,setAfterHidden:W,title:null!==ee&&void 0!==ee&&ee.name?"".concat(null===ee||void 0===ee?void 0:ee.name," role"):"New role",uuidItemSelected:S.B2.ROLES,uuidWorkspaceSelected:S.Pl.USER_MANAGEMENT,children:ee&&Te})}},36288:function(e,n,i){i.d(n,{Fy:function(){return I},G9:function(){return d},H1:function(){return m},K4:function(){return u},ND:function(){return c},Pt:function(){return a},WG:function(){return t},hl:function(){return A},m_:function(){return l},oO:function(){return E}});var r,s,t,l,o=i(82394);!function(e){e[e.OWNER=1]="OWNER",e[e.ADMIN=2]="ADMIN",e[e.EDITOR=4]="EDITOR",e[e.VIEWER=8]="VIEWER",e[e.LIST=16]="LIST",e[e.DETAIL=32]="DETAIL",e[e.CREATE=64]="CREATE",e[e.UPDATE=128]="UPDATE",e[e.DELETE=512]="DELETE",e[e.OPERATION_ALL=1024]="OPERATION_ALL",e[e.QUERY=2048]="QUERY",e[e.QUERY_ALL=4096]="QUERY_ALL",e[e.READ=8192]="READ",e[e.READ_ALL=16384]="READ_ALL",e[e.WRITE=32768]="WRITE",e[e.WRITE_ALL=65536]="WRITE_ALL",e[e.ALL=131072]="ALL",e[e.DISABLE_LIST=262144]="DISABLE_LIST",e[e.DISABLE_DETAIL=524288]="DISABLE_DETAIL",e[e.DISABLE_CREATE=1048576]="DISABLE_CREATE",e[e.DISABLE_UPDATE=2097152]="DISABLE_UPDATE",e[e.DISABLE_DELETE=4194304]="DISABLE_DELETE",e[e.DISABLE_OPERATION_ALL=8388608]="DISABLE_OPERATION_ALL",e[e.DISABLE_QUERY=16777216]="DISABLE_QUERY",e[e.DISABLE_QUERY_ALL=33554432]="DISABLE_QUERY_ALL",e[e.DISABLE_READ=67108864]="DISABLE_READ",e[e.DISABLE_READ_ALL=134217728]="DISABLE_READ_ALL",e[e.DISABLE_WRITE=268435456]="DISABLE_WRITE",e[e.DISABLE_WRITE_ALL=536870912]="DISABLE_WRITE_ALL",e[e.DISABLE_UNLESS_CONDITIONS=1073741824]="DISABLE_UNLESS_CONDITIONS"}(t||(t={})),function(e){e.HAS_NOTEBOOK_EDIT_ACCESS="HAS_NOTEBOOK_EDIT_ACCESS",e.HAS_PIPELINE_EDIT_ACCESS="HAS_PIPELINE_EDIT_ACCESS",e.USER_OWNS_ENTITY="USER_OWNS_ENTITY"}(l||(l={}));var u=(r={},(0,o.Z)(r,t.OWNER,"Owner"),(0,o.Z)(r,t.ADMIN,"Admin"),(0,o.Z)(r,t.EDITOR,"Editor"),(0,o.Z)(r,t.VIEWER,"Viewer"),(0,o.Z)(r,t.LIST,"List"),(0,o.Z)(r,t.DETAIL,"Detail"),(0,o.Z)(r,t.CREATE,"Create"),(0,o.Z)(r,t.UPDATE,"Update"),(0,o.Z)(r,t.DELETE,"Delete"),(0,o.Z)(r,t.OPERATION_ALL,"All operations"),(0,o.Z)(r,t.QUERY,"Query"),(0,o.Z)(r,t.QUERY_ALL,"Query all attributes"),(0,o.Z)(r,t.READ,"Read"),(0,o.Z)(r,t.READ_ALL,"Read all attributes"),(0,o.Z)(r,t.WRITE,"Write"),(0,o.Z)(r,t.WRITE_ALL,"Write all attributes"),(0,o.Z)(r,t.ALL,"All"),(0,o.Z)(r,t.DISABLE_LIST,"Disable list"),(0,o.Z)(r,t.DISABLE_DETAIL,"Disable detail"),(0,o.Z)(r,t.DISABLE_CREATE,"Disable create"),(0,o.Z)(r,t.DISABLE_UPDATE,"Disable update"),(0,o.Z)(r,t.DISABLE_DELETE,"Disable delete"),(0,o.Z)(r,t.DISABLE_OPERATION_ALL,"Disable all operations"),(0,o.Z)(r,t.DISABLE_QUERY,"Disable query"),(0,o.Z)(r,t.DISABLE_QUERY_ALL,"Disable all query parameters"),(0,o.Z)(r,t.DISABLE_READ,"Disable read"),(0,o.Z)(r,t.DISABLE_READ_ALL,"Disable all read attributes"),(0,o.Z)(r,t.DISABLE_WRITE,"Disable write"),(0,o.Z)(r,t.DISABLE_WRITE_ALL,"Disable all write attributes"),r),c=(s={},(0,o.Z)(s,l.HAS_NOTEBOOK_EDIT_ACCESS,"Disable unless user has notebook edit access"),(0,o.Z)(s,l.HAS_PIPELINE_EDIT_ACCESS,"Disable unless user has pipeline edit access"),(0,o.Z)(s,l.USER_OWNS_ENTITY,"Disable unless user owns the current entity"),s),d=[t.OWNER,t.ADMIN,t.EDITOR,t.VIEWER,t.ALL],a=[t.LIST,t.DETAIL,t.CREATE,t.UPDATE,t.DELETE,t.OPERATION_ALL],E=[t.DISABLE_LIST,t.DISABLE_DETAIL,t.DISABLE_CREATE,t.DISABLE_UPDATE,t.DISABLE_DELETE,t.DISABLE_OPERATION_ALL],A=[t.QUERY,t.QUERY_ALL,t.DISABLE_QUERY,t.DISABLE_QUERY_ALL],I=[t.READ,t.READ_ALL,t.DISABLE_READ,t.DISABLE_READ_ALL],m=[t.WRITE,t.WRITE_ALL,t.DISABLE_WRITE,t.DISABLE_WRITE_ALL]},36717:function(e,n,i){i.d(n,{q:function(){return t}});var r=i(75582),s=i(36288);function t(e){return Object.entries(s.K4).reduce((function(n,i){var s=(0,r.Z)(i,2),t=s[0],l=s[1];return e&Number(t)?n.concat(l):n}),[])}},76417:function(e,n,i){function r(e){return null!==e&&void 0!==e&&e.first_name?[null===e||void 0===e?void 0:e.first_name,null===e||void 0===e?void 0:e.last_name].filter((function(e){return e})).join(" "):null===e||void 0===e?void 0:e.username}i.d(n,{s:function(){return r}})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7361],{37361:function(e,n,r){r.d(n,{X:function(){return k}});var i=r(21831),l=r(75582),s=r(82394),t=r(21764),o=r(82684),d=r(69864),a=r(34376),c=r(71180),u=r(70652),E=r(15338),f=r(97618),v=r(55485),I=r(85854),j=r(65956),m=r(28274),p=r(38276),Z=r(75499),x=r(30160),h=r(17488),g=r(35686),A=r(8193),L=r(72473),_=r(70515),S=r(24755),D=r(3917),R=r(76417),P=r(36717),T=r(50178),O=r(86735),b=r(42122),C=r(72619),B=r(95924),w=r(28598);function N(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,i)}return r}function y(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?N(Object(r),!0).forEach((function(n){(0,s.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var k,W=2*_.iI;!function(e){e.PERMISSIONS="Permissions",e.ROLES="Roles"}(k||(k={})),n.Z=function(e){var n,r,s,N=e.contained,M=e.disableFields,U=e.onCancel,H=e.slug,Y=(0,T.PR)()||{},z=Y.id,Q=Y.owner,V=(0,a.useRouter)(),q=(0,o.useState)(!0),F=q[0],G=q[1],K=(0,o.useState)(null),$=K[0],X=K[1],J=(0,o.useState)({}),ee=J[0],ne=J[1],re=(0,o.useState)(null),ie=re[0],le=re[1],se=(0,o.useCallback)((function(e,n,r){le(y(y({},e),{},{rolesMapping:(0,O.HK)(n||[],(function(e){return e.id})),permissionsMapping:(0,O.HK)(r||[],(function(e){return e.id}))}))}),[le]),te=(0,o.useCallback)((function(e){ne((function(n){return y(y({},n),e)})),le((function(n){return y(y({},n),e)}))}),[ne,le]),oe=g.ZP.users.detail(H,{},{revalidateOnFocus:!1}).data,de=(0,o.useMemo)((function(){return null===oe||void 0===oe?void 0:oe.user}),[oe]);(0,o.useEffect)((function(){de&&se(de,null===de||void 0===de?void 0:de.roles_new,null===de||void 0===de?void 0:de.permissions)}),[se,de]);var ae=(0,d.Db)(de?g.ZP.users.useUpdate(H):g.ZP.users.useCreate(),{onSuccess:function(e){return(0,C.wD)(e,{callback:function(e){var n=e.user;ne({}),se(n,null===n||void 0===n?void 0:n.roles_new,null===n||void 0===n?void 0:n.permissions),de||V.push("/settings/workspace/users/".concat(null===n||void 0===n?void 0:n.id)),String(null===n||void 0===n?void 0:n.id)===String(z)&&(0,T.av)(y(y({},(0,T.PR)()),{},{avatar:null===n||void 0===n?void 0:n.avatar,first_name:null===n||void 0===n?void 0:n.first_name,last_name:null===n||void 0===n?void 0:n.last_name,username:null===n||void 0===n?void 0:n.username})),t.Am.success(de?"User profile successfully updated.":"New user created successfully.",{position:t.Am.POSITION.BOTTOM_RIGHT,toastId:"user-update-success-".concat(n.id)})},onErrorCallback:function(e){var n=e.error,r=n.errors,i=n.exception,l=n.message,s=n.type;t.Am.error((null===r||void 0===r?void 0:r.error)||i||l,{position:t.Am.POSITION.BOTTOM_RIGHT,toastId:s})}})}}),ce=(0,l.Z)(ae,2),ue=ce[0],Ee=ce[1].isLoading,fe=(0,d.Db)(g.ZP.users.useDelete(null===de||void 0===de?void 0:de.id),{onSuccess:function(e){return(0,C.wD)(e,{callback:function(){V.push("/settings/workspace/users"),t.Am.success("User successfully delete.",{position:t.Am.POSITION.BOTTOM_RIGHT,toastId:"user-delete-success-".concat(null===de||void 0===de?void 0:de.id)})},onErrorCallback:function(e){var n=e.error,r=n.errors,i=n.exception,l=n.message,s=n.type;t.Am.error((null===r||void 0===r?void 0:r.error)||i||l,{position:t.Am.POSITION.BOTTOM_RIGHT,toastId:s})}})}}),ve=(0,l.Z)(fe,2),Ie=ve[0],je=ve[1].isLoading,me=g.ZP.roles.list().data,pe=(0,o.useMemo)((function(){return(0,O.YC)((null===me||void 0===me?void 0:me.roles)||[],"name")}),[me]),Ze=(0,o.useMemo)((function(){return(null===ie||void 0===ie?void 0:ie.rolesMapping)||{}}),[ie]),xe=(0,o.useMemo)((function(){return(0,O.YC)(Object.values(Ze),"name")}),[Ze]),he=g.ZP.permissions.list({_limit:1e3}).data,ge=((0,o.useMemo)((function(){return(0,O.YC)((null===he||void 0===he?void 0:he.permissions)||[],"entity_name")}),[he]),(0,o.useMemo)((function(){return(null===ie||void 0===ie?void 0:ie.permissionsMapping)||{}}),[ie])),Ae=(0,o.useMemo)((function(){return(0,O.YC)(Object.values(ge),"entity_name")}),[ge]),Le=(0,o.useMemo)((function(){return(null===xe||void 0===xe?void 0:xe.length)>=1}),[xe]),_e=(0,o.useMemo)((function(){return(0,w.jsx)(c.ZP,{beforeIcon:(0,w.jsx)(L.Add,{}),compact:!0,onClick:function(){X(k.ROLES),G(!1)},primary:!Le,secondary:Le,small:!0,children:"Add roles"})}),[Le,X,G]),Se=(0,o.useMemo)((function(){return(null===Ae||void 0===Ae?void 0:Ae.length)>=1}),[Ae]),De=((0,o.useMemo)((function(){return(0,w.jsx)(c.ZP,{beforeIcon:(0,w.jsx)(L.Add,{}),compact:!0,onClick:function(){X(k.PERMISSIONS),G(!1)},primary:!Se,secondary:Se,small:!0,children:"Add permission"})}),[Se,X,G]),(0,o.useCallback)((function(e,n,r){return(0,w.jsx)(Z.Z,{columnFlex:[].concat((0,i.Z)(r?[]:[null]),[1]),columns:[].concat((0,i.Z)(r?[]:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===Ze||void 0===Ze?void 0:Ze[n]}));return(0,w.jsx)(u.Z,{checked:n,onClick:function(r){(0,B.j)(r),te(n?{rolesMapping:{}}:{rolesMapping:(0,O.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"}]),[{uuid:"Role"}]),onClickRow:n&&!r?function(n){var r=e[n];r&&window.open("/settings/workspace/roles/".concat(null===r||void 0===r?void 0:r.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.name,l=e.id,s=!(null===Ze||void 0===Ze||!Ze[l]);return[].concat((0,i.Z)(r?[]:[(0,w.jsx)(u.Z,{checked:s,onClick:function(n){(0,B.j)(n);var r=y({},Ze);s?null===r||void 0===r||delete r[l]:r[l]=e,te({rolesMapping:r})}},"checkbox")]),[(0,w.jsx)(x.ZP,{monospace:!0,children:n},"name")])})),uuid:"roles"})}),[Ze,te])),Re=(0,o.useCallback)((function(e,n,r){return(0,w.jsx)(Z.Z,{columnFlex:[null,2,1,1,6],columns:[{uuid:"ID"},{uuid:"Entity"},{uuid:"Subtype"},{uuid:"Entity ID"},{rightAligned:!0,uuid:"Access"}],onClickRow:n&&!r?function(n){var r=e[n];r&&window.open("/settings/workspace/permissions/".concat(null===r||void 0===r?void 0:r.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.access,r=e.entity,i=e.entity_id,l=e.entity_name,s=e.entity_type,t=e.id,o=n?(0,P.q)(n):[],d=(null===o||void 0===o?void 0:o.length)||0;return[(0,w.jsx)(x.ZP,{default:!0,monospace:!0,children:t},"id"),(0,w.jsx)(x.ZP,{monospace:!0,children:l||r},"entityName"),(0,w.jsx)(x.ZP,{default:!0,monospace:!!s,children:s||"-"},"entityType"),(0,w.jsx)(x.ZP,{default:!0,monospace:!!i,children:i||"-"},"entityID"),(0,w.jsx)("div",{children:d>=1&&(0,w.jsx)(v.ZP,{alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end",children:null===o||void 0===o?void 0:o.map((function(e,n){return(0,w.jsx)("div",{children:(0,w.jsxs)(x.ZP,{default:!0,monospace:!0,small:!0,children:[e,d>=2&&n<d-1&&(0,w.jsx)(x.ZP,{inline:!0,muted:!0,small:!0,children:",\xa0"})]})},e)}))})},"access")]})),uuid:"permissions"})}),[]),Pe=(0,o.useMemo)((function(){return De(pe)}),[De,pe]),Te=(0,o.useMemo)((function(){var e;return De(xe,!0,null===(e=M||[])||void 0===e?void 0:e.includes(k.ROLES))}),[De,M,xe]),Oe=(0,o.useMemo)((function(){var e;return Re(Ae,!0,null===(e=M||[])||void 0===e?void 0:e.includes(k.PERMISSIONS))}),[Re,M,Ae]),be=(0,w.jsxs)(A.N,{children:[(0,w.jsxs)(j.Z,{noPadding:!0,children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsx)(I.Z,{level:4,children:"Profile"})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"Avatar"}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({avatar:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"Add initials or an emoji",value:(null===ie||void 0===ie?void 0:ie.avatar)||""})})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsxs)(x.ZP,{danger:"username"in ee&&!(null!==ie&&void 0!==ie&&ie.username),default:!0,large:!0,children:["Username ","username"in ee&&!(null!==ie&&void 0!==ie&&ie.username)&&(0,w.jsx)(x.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({username:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Mage Supreme",value:(null===ie||void 0===ie?void 0:ie.username)||""})})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"First name"}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({first_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Urza",value:(null===ie||void 0===ie?void 0:ie.first_name)||""})})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"Last name"}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({last_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Andromeda",value:(null===ie||void 0===ie?void 0:ie.last_name)||""})})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[de&&(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"Email"}),!de&&(0,w.jsxs)(x.ZP,{danger:"email"in ee&&!(null!==ie&&void 0!==ie&&ie.email),default:!0,large:!0,children:["Email ","email"in ee&&!(null!==ie&&void 0!==ie&&ie.email)&&(0,w.jsx)(x.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,w.jsx)(p.Z,{mr:_.cd}),de&&(0,w.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,w.jsx)(x.ZP,{large:!0,muted:!0,children:null===ie||void 0===ie?void 0:ie.email}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(L.Alphabet,{muted:!0,size:W}),(0,w.jsx)(p.Z,{mr:1})]}),!de&&(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Alphabet,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({email:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. mage@power.com",type:"email",value:(null===ie||void 0===ie?void 0:ie.email)||""})})]})})]}),(0,w.jsx)(p.Z,{mb:_.HN}),(0,w.jsxs)(j.Z,{noPadding:!0,children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsx)(I.Z,{level:4,children:"Authentication"})}),(0,w.jsx)(E.Z,{light:!0}),de&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsxs)(x.ZP,{danger:"password_current"in ee&&!(null!==ie&&void 0!==ie&&ie.password_current),default:!0,large:!0,children:["Current password ","password_current"in ee&&!(null!==ie&&void 0!==ie&&ie.password_current)&&(0,w.jsx)(x.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({password_current:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===ie||void 0===ie?void 0:ie.password_current)||""})})]})}),(0,w.jsx)(E.Z,{light:!0})]}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsxs)(x.ZP,{danger:"password"in ee&&!(null!==ie&&void 0!==ie&&ie.password),default:!0,large:!0,children:[de?"New password":"Password"," ","password"in ee&&!(null!==ie&&void 0!==ie&&ie.password)&&(0,w.jsx)(x.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({password:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===ie||void 0===ie?void 0:ie.password)||""})})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsxs)(x.ZP,{danger:"password_confirmation"in ee&&!(null!==ie&&void 0!==ie&&ie.password_confirmation),default:!0,large:!0,children:["Confirm ",de?"new password":"password"," ","password_confirmation"in ee&&!(null!==ie&&void 0!==ie&&ie.password_confirmation)&&(0,w.jsx)(x.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(f.Z,{flex:1,children:(0,w.jsx)(h.Z,{afterIcon:(0,w.jsx)(L.Edit,{}),afterIconClick:function(e,n){var r;null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus()},afterIconSize:W,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return te({password_confirmation:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"* * * * * * * *",type:"password",value:(null===ie||void 0===ie?void 0:ie.password_confirmation)||""})})]})})]}),(0,w.jsx)(p.Z,{mb:_.HN}),de&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(j.Z,{noPadding:!0,children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,w.jsx)(I.Z,{level:4,children:"Roles"}),(0,w.jsx)(p.Z,{mr:_.cd}),Le&&!(null!==(n=M||[])&&void 0!==n&&n.includes(k.ROLES))&&(0,w.jsx)(v.ZP,{alignItems:"center",children:_e})]})}),(0,w.jsx)(E.Z,{light:!0}),!Le&&!(null!==(r=M||[])&&void 0!==r&&r.includes(k.ROLES))&&(0,w.jsxs)(p.Z,{p:_.cd,children:[(0,w.jsx)(p.Z,{mb:_.cd,children:(0,w.jsx)(x.ZP,{default:!0,children:"This user currently has no roles attached."})}),(0,w.jsx)(v.ZP,{alignItems:"center",children:_e})]}),Le&&(0,w.jsx)(p.Z,{pb:_.Mq,children:Te})]}),(0,w.jsx)(p.Z,{mb:_.HN}),(0,w.jsxs)(j.Z,{noPadding:!0,children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsx)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,w.jsx)(I.Z,{level:4,children:"Permissions"})})}),(0,w.jsx)(E.Z,{light:!0}),!Se&&(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsx)(x.ZP,{default:!0,children:"This user currently has no permissions."})}),Se&&(0,w.jsx)(p.Z,{pb:_.Mq,children:Oe})]}),(0,w.jsx)(p.Z,{mb:_.HN}),(0,w.jsxs)(j.Z,{noPadding:!0,children:[(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsx)(I.Z,{level:4,children:"Metadata"})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"Last updated"}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,w.jsx)(x.ZP,{large:!0,monospace:!0,muted:!0,children:(null===ie||void 0===ie?void 0:ie.updated_at)&&(0,D.d$)(null===ie||void 0===ie?void 0:ie.updated_at,{includeSeconds:!0})}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(L.Schedule,{muted:!0,size:W}),(0,w.jsx)(p.Z,{mr:1})]})]})}),(0,w.jsx)(E.Z,{light:!0}),(0,w.jsx)(p.Z,{p:_.cd,children:(0,w.jsxs)(v.ZP,{alignItems:"center",children:[(0,w.jsx)(x.ZP,{default:!0,large:!0,children:"Created at"}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsxs)(f.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,w.jsx)(x.ZP,{large:!0,monospace:!0,muted:!0,children:(null===ie||void 0===ie?void 0:ie.created_at)&&(0,D.d$)(null===ie||void 0===ie?void 0:ie.created_at,{includeSeconds:!0})}),(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(L.Schedule,{muted:!0,size:W}),(0,w.jsx)(p.Z,{mr:1})]})]})})]}),(0,w.jsx)(p.Z,{mb:_.HN})]}),(0,w.jsxs)(v.ZP,{children:[(0,w.jsx)(c.ZP,{beforeIcon:(0,w.jsx)(L.Save,{}),disabled:!ee||!(null!==(s=Object.keys(ee))&&void 0!==s&&s.length),loading:Ee,onClick:function(){return ue({user:y(y({},(0,b.GL)(ie,["avatar","first_name","last_name","password","password_confirmation","password_current","username"].concat(de?[]:"email"),{include_blanks:!0})),null!==M&&void 0!==M&&M.includes(k.ROLES)?{}:{role_ids:Object.keys((null===ie||void 0===ie?void 0:ie.rolesMapping)||{}).map((function(e){return Number(e)}))})})},primary:!0,children:de?"Save changes":"Create new user"}),U&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(c.ZP,{onClick:function(){return null===U||void 0===U?void 0:U()},secondary:!0,children:"Cancel and go back"})]}),de&&String(z)!==String(H)&&Q&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(p.Z,{mr:_.cd}),(0,w.jsx)(c.ZP,{beforeIcon:(0,w.jsx)(L.Trash,{}),danger:!0,loading:je,onClick:function(){return Ie()},children:"Delete user"})]})]})]});return N?be:(0,w.jsx)(m.Z,{after:Pe,afterHeader:(0,w.jsx)(p.Z,{px:_.cd,children:(0,w.jsx)(x.ZP,{bold:!0,children:$})}),afterHidden:F,afterWidth:60*_.iI,appendBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Users"},linkProps:{href:"/settings/workspace/users"}},{bold:!0,label:function(){return(0,R.s)(ie)}}],setAfterHidden:G,title:de?(0,R.s)(de):"New user",uuidItemSelected:S.B2.USERS,uuidWorkspaceSelected:S.Pl.USER_MANAGEMENT,children:de&&be})}},36288:function(e,n,r){r.d(n,{Fy:function(){return v},G9:function(){return c},H1:function(){return I},K4:function(){return d},ND:function(){return a},Pt:function(){return u},WG:function(){return s},hl:function(){return f},m_:function(){return t},oO:function(){return E}});var i,l,s,t,o=r(82394);!function(e){e[e.OWNER=1]="OWNER",e[e.ADMIN=2]="ADMIN",e[e.EDITOR=4]="EDITOR",e[e.VIEWER=8]="VIEWER",e[e.LIST=16]="LIST",e[e.DETAIL=32]="DETAIL",e[e.CREATE=64]="CREATE",e[e.UPDATE=128]="UPDATE",e[e.DELETE=512]="DELETE",e[e.OPERATION_ALL=1024]="OPERATION_ALL",e[e.QUERY=2048]="QUERY",e[e.QUERY_ALL=4096]="QUERY_ALL",e[e.READ=8192]="READ",e[e.READ_ALL=16384]="READ_ALL",e[e.WRITE=32768]="WRITE",e[e.WRITE_ALL=65536]="WRITE_ALL",e[e.ALL=131072]="ALL",e[e.DISABLE_LIST=262144]="DISABLE_LIST",e[e.DISABLE_DETAIL=524288]="DISABLE_DETAIL",e[e.DISABLE_CREATE=1048576]="DISABLE_CREATE",e[e.DISABLE_UPDATE=2097152]="DISABLE_UPDATE",e[e.DISABLE_DELETE=4194304]="DISABLE_DELETE",e[e.DISABLE_OPERATION_ALL=8388608]="DISABLE_OPERATION_ALL",e[e.DISABLE_QUERY=16777216]="DISABLE_QUERY",e[e.DISABLE_QUERY_ALL=33554432]="DISABLE_QUERY_ALL",e[e.DISABLE_READ=67108864]="DISABLE_READ",e[e.DISABLE_READ_ALL=134217728]="DISABLE_READ_ALL",e[e.DISABLE_WRITE=268435456]="DISABLE_WRITE",e[e.DISABLE_WRITE_ALL=536870912]="DISABLE_WRITE_ALL",e[e.DISABLE_UNLESS_CONDITIONS=1073741824]="DISABLE_UNLESS_CONDITIONS"}(s||(s={})),function(e){e.HAS_NOTEBOOK_EDIT_ACCESS="HAS_NOTEBOOK_EDIT_ACCESS",e.HAS_PIPELINE_EDIT_ACCESS="HAS_PIPELINE_EDIT_ACCESS",e.USER_OWNS_ENTITY="USER_OWNS_ENTITY"}(t||(t={}));var d=(i={},(0,o.Z)(i,s.OWNER,"Owner"),(0,o.Z)(i,s.ADMIN,"Admin"),(0,o.Z)(i,s.EDITOR,"Editor"),(0,o.Z)(i,s.VIEWER,"Viewer"),(0,o.Z)(i,s.LIST,"List"),(0,o.Z)(i,s.DETAIL,"Detail"),(0,o.Z)(i,s.CREATE,"Create"),(0,o.Z)(i,s.UPDATE,"Update"),(0,o.Z)(i,s.DELETE,"Delete"),(0,o.Z)(i,s.OPERATION_ALL,"All operations"),(0,o.Z)(i,s.QUERY,"Query"),(0,o.Z)(i,s.QUERY_ALL,"Query all attributes"),(0,o.Z)(i,s.READ,"Read"),(0,o.Z)(i,s.READ_ALL,"Read all attributes"),(0,o.Z)(i,s.WRITE,"Write"),(0,o.Z)(i,s.WRITE_ALL,"Write all attributes"),(0,o.Z)(i,s.ALL,"All"),(0,o.Z)(i,s.DISABLE_LIST,"Disable list"),(0,o.Z)(i,s.DISABLE_DETAIL,"Disable detail"),(0,o.Z)(i,s.DISABLE_CREATE,"Disable create"),(0,o.Z)(i,s.DISABLE_UPDATE,"Disable update"),(0,o.Z)(i,s.DISABLE_DELETE,"Disable delete"),(0,o.Z)(i,s.DISABLE_OPERATION_ALL,"Disable all operations"),(0,o.Z)(i,s.DISABLE_QUERY,"Disable query"),(0,o.Z)(i,s.DISABLE_QUERY_ALL,"Disable all query parameters"),(0,o.Z)(i,s.DISABLE_READ,"Disable read"),(0,o.Z)(i,s.DISABLE_READ_ALL,"Disable all read attributes"),(0,o.Z)(i,s.DISABLE_WRITE,"Disable write"),(0,o.Z)(i,s.DISABLE_WRITE_ALL,"Disable all write attributes"),i),a=(l={},(0,o.Z)(l,t.HAS_NOTEBOOK_EDIT_ACCESS,"Disable unless user has notebook edit access"),(0,o.Z)(l,t.HAS_PIPELINE_EDIT_ACCESS,"Disable unless user has pipeline edit access"),(0,o.Z)(l,t.USER_OWNS_ENTITY,"Disable unless user owns the current entity"),l),c=[s.OWNER,s.ADMIN,s.EDITOR,s.VIEWER,s.ALL],u=[s.LIST,s.DETAIL,s.CREATE,s.UPDATE,s.DELETE,s.OPERATION_ALL],E=[s.DISABLE_LIST,s.DISABLE_DETAIL,s.DISABLE_CREATE,s.DISABLE_UPDATE,s.DISABLE_DELETE,s.DISABLE_OPERATION_ALL],f=[s.QUERY,s.QUERY_ALL,s.DISABLE_QUERY,s.DISABLE_QUERY_ALL],v=[s.READ,s.READ_ALL,s.DISABLE_READ,s.DISABLE_READ_ALL],I=[s.WRITE,s.WRITE_ALL,s.DISABLE_WRITE,s.DISABLE_WRITE_ALL]},36717:function(e,n,r){r.d(n,{q:function(){return s}});var i=r(75582),l=r(36288);function s(e){return Object.entries(l.K4).reduce((function(n,r){var l=(0,i.Z)(r,2),s=l[0],t=l[1];return e&Number(s)?n.concat(t):n}),[])}},76417:function(e,n,r){function i(e){return null!==e&&void 0!==e&&e.first_name?[null===e||void 0===e?void 0:e.first_name,null===e||void 0===e?void 0:e.last_name].filter((function(e){return e})).join(" "):null===e||void 0===e?void 0:e.username}r.d(n,{s:function(){return i}})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7966],{27966:function(e,n,t){t.d(n,{Z:function(){return Q}});var i=t(82394),r=t(75582),l=t(12691),u=t.n(l),o=t(69864),c=t(82684),s=t(34376),a=t(71180),d=t(70652),p=t(50724),f=t(97618),h=t(55485),v=t(48670),m=t(44265),g=t(89515),b=t(38276),_=t(4190),x=t(75499),j=t(48381),O=t(30160),w=t(35686),y=t(44897),P=t(42631),Z=t(72473),C=t(81655),k=t(72191),E=t(39643),D=t(25976),I=t(70515),R=D.default.div.withConfig({displayName:"Tablestyle__PopupContainerStyle",componentId:"sc-8ammqd-0"})(["position:absolute;max-height:","px;z-index:10;border-radius:","px;padding:","px;"," "," "," ",""],58*I.iI,P.TR,2*I.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||y.Z.shadow).popup,";\n background-color: ").concat((e.theme.interactive||y.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.leftOffset&&"\n left: ".concat(e.leftOffset,"px;\n ")}),(function(e){return e.topOffset&&"\n top: ".concat(e.topOffset,"px;\n ")}),(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")})),N=t(30229),L=t(31608),S=t(16488),V=t(86735),T=t(50178),F=t(72619),A=t(95924),U=t(69419),B=t(70320),M=t(3917),z=t(44688),H=t(28598);function X(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function K(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?X(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):X(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var G={monospace:!0,small:!0};function Y(e){var n=e.cancelingRunId,t=e.disabled,i=e.isLoadingCancelPipeline,l=e.onCancel,u=e.onSuccess,s=e.pipelineRun,d=e.setCancelingRunId,f=e.setErrors,v=e.setShowConfirmationId,g=e.showConfirmationId,x=(0,T.Ct)(),j=s||{},C=j.id,E=j.pipeline_schedule_id,D=j.pipeline_schedule_token,I=j.pipeline_schedule_type,L=j.status,S=i&&C===n&&m.VO.RUNNING===L,V=(0,U.iV)(),A=(0,c.useMemo)((function(){return(null!==V&&void 0!==V&&V.page?+V.page:0)>0}),[null===V||void 0===V?void 0:V.page]),B=(0,o.Db)(N.Xm.API===I&&D?w.ZP.pipeline_runs.pipeline_schedules.useCreateWithParent(E,D):w.ZP.pipeline_runs.pipeline_schedules.useCreate(E),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){u()},onErrorCallback:function(e,n){return null===f||void 0===f?void 0:f({errors:n,response:e})}})}}),M=(0,r.Z)(B,1)[0],z=(0,c.useCallback)((function(){v(null),M({pipeline_run:{backfill_id:null===s||void 0===s?void 0:s.backfill_id,event_variables:(null===s||void 0===s?void 0:s.event_variables)||{},execution_date:null===s||void 0===s?void 0:s.execution_date,pipeline_schedule_id:null===s||void 0===s?void 0:s.pipeline_schedule_id,pipeline_uuid:null===s||void 0===s?void 0:s.pipeline_uuid,variables:(null===s||void 0===s?void 0:s.variables)||{}}})}),[M,s,v]),X=(0,c.useCallback)((function(){v(null),d(C),l({id:C,status:m.VO.CANCELLED})}),[l,C,d,v]);return(0,H.jsxs)("div",{style:{position:"relative"},children:[(0,H.jsx)(a.ZP,{backgroundColor:S&&y.Z.accent.yellow,beforeIcon:m.VO.INITIAL!==L&&!t&&(0,H.jsxs)(H.Fragment,{children:[m.VO.COMPLETED===L&&(0,H.jsx)(Z.Check,{size:k.bL}),[m.VO.FAILED,m.VO.CANCELLED].includes(L)&&(0,H.jsx)(Z.PlayButtonFilled,{inverted:m.VO.CANCELLED===L&&!x,size:k.bL}),[m.VO.RUNNING].includes(L)&&(0,H.jsx)(_.Z,{color:S?y.Z.status.negative:y.Z.monotone.white,small:!0})]}),borderRadius:"".concat(P.D7,"px"),danger:m.VO.FAILED===L&&!x,default:m.VO.INITIAL===L,disabled:t||x,loading:!s,onClick:function(e){e.stopPropagation(),v(C)},padding:"6px",primary:m.VO.RUNNING===L&&!S&&!x,warning:m.VO.CANCELLED===L&&!x,children:t?"Ready":S?"Canceling":m.Do[L]}),(0,H.jsx)(p.Z,{onClickOutside:function(){return v(null)},open:g===C,children:(0,H.jsxs)(R,{children:[[m.VO.RUNNING,m.VO.INITIAL].includes(L)&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(O.ZP,{bold:!0,color:"#9ECBFF",children:"Run is in progress"}),(0,H.jsx)(b.Z,{mb:1}),(0,H.jsxs)(O.ZP,{children:["This pipeline run is currently ongoing. Retrying will cancel",(0,H.jsx)("br",{}),"the current pipeline run."]}),(0,H.jsx)(O.ZP,{}),(0,H.jsx)(b.Z,{mt:1,children:(0,H.jsxs)(h.ZP,{children:[(0,H.jsx)(a.ZP,{onClick:function(){X(),z()},children:"Retry run"}),(0,H.jsx)(b.Z,{ml:1}),(0,H.jsx)(a.ZP,{onClick:X,children:"Cancel run"})]})})]}),[m.VO.CANCELLED,m.VO.FAILED,m.VO.COMPLETED].includes(L)&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(O.ZP,{bold:!0,color:"#9ECBFF",children:["Run ",L]}),(0,H.jsx)(b.Z,{mb:1}),(0,H.jsxs)(O.ZP,{children:["Retry the run with changes you have made to the pipeline.",A?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("br",{}),"Note that the retried run may appear on a previous page."]}):null]}),(0,H.jsx)(b.Z,{mb:1}),(0,H.jsx)(a.ZP,{onClick:z,children:"Retry run"})]})]})})]})}var Q=function(e){var n=e.allowBulkSelect,t=e.allowDelete,l=e.deletePipelineRun,_=e.disableKeyboardNav,y=e.disableRowSelect,D=e.emptyMessage,R=void 0===D?"No runs available":D,N=e.fetchPipelineRuns,U=e.hideTriggerColumn,X=e.includePipelineTags,Q=e.onClickRow,q=e.pipelineRuns,J=e.selectedRun,$=e.selectedRuns,W=e.setSelectedRun,ee=e.setSelectedRuns,ne=e.setErrors,te=(0,s.useRouter)(),ie=(0,T.Ct)(),re=(0,B.qB)(),le=(0,c.useRef)({}),ue=(0,c.useState)(null),oe=ue[0],ce=ue[1],se=(0,c.useState)(null),ae=se[0],de=se[1],pe=(0,c.useState)(null),fe=pe[0],he=pe[1],ve=(0,c.useState)(0),me=ve[0],ge=ve[1],be=(0,c.useState)(0),_e=be[0],xe=be[1],je=(0,o.Db)((function(e){var n=e.id,t=e.status;return w.ZP.pipeline_runs.useUpdate(n)({pipeline_run:{status:t}})}),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){ce(null),null===N||void 0===N||N()},onErrorCallback:function(e,n){ce(null),null===ne||void 0===ne||ne({errors:n,response:e})}})}}),Oe=(0,r.Z)(je,2),we=Oe[0],ye=Oe[1].isLoading,Pe="PipelineDetail/Runs/Table",Ze="pipeline-runs",Ce=(0,c.useCallback)((function(e){if(!e)return null;var n=q.findIndex((function(n){return n.id===e.id}));return n>=0?n:null}),[q]),ke=(0,z.y)(),Ee=ke.registerOnKeyDown,De=ke.unregisterOnKeyDown;(0,c.useEffect)((function(){return function(){De(Pe)}}),[De,Pe]),Ee(Pe,(function(e,n){var t=n[E.Bu],i=n[E.kD];W&&!_&&(t||i)&&W((function(n){var r=Ce(n);if(null!==r){if(e.repeat)return e.preventDefault(),n;if(t){var l=r-1;return l<0&&(l=q.length-1),q[l]}if(i){var u=r+1;return u>=q.length&&(u=0),q[u]}}return n}))}),[q,W]),(0,c.useEffect)((function(){var e=Ce(J);if(null!==e){var n=(0,C.w4)({rowIndex:e,uuid:Ze}),t=document.getElementById(n);t&&t.scrollIntoView({behavior:"smooth",block:"center"})}}),[Ce,J]);var Ie=re?C.O$:{},Re=[null,null,null,null,1],Ne=[{uuid:"Status"},{center:!0,uuid:"Logs"},{center:!0,uuid:"ID"},{uuid:"Block runs"},{uuid:"Pipeline"}];U||(Re.push(1),Ne.push({uuid:"Trigger"})),X&&(Re.push(null),Ne.push({uuid:"Pipeline tags"})),Re.push.apply(Re,[1,1,1,null,null]),Ne.push.apply(Ne,[K(K({},Ie),{},{uuid:"Execution date"}),K(K({},Ie),{},{uuid:"Started at"}),K(K({},Ie),{},{uuid:"Completed at"}),{uuid:"Execution time"}]),t&&!ie&&(Re.push.apply(Re,[null]),Ne.push({label:function(){return""},uuid:"Delete"}));var Le=(0,c.useMemo)((function(){return q.every((function(e){var n=e.id;return!(null===$||void 0===$||!$[n])}))}),[q,$]);n&&(Re.unshift(null),Ne.unshift({label:function(){return(0,H.jsx)(d.Z,{checked:Le,onClick:function(){var e=(0,V.HK)(q||[],(function(e){return e.id}));ee(Le?{}:e)}})},uuid:"Selected"})),!y&&Q&&(Re.push(null),Ne.push({label:function(){return""},uuid:"action"}));var Se=(0,c.useCallback)((function(e,n){if(Q&&ee&&n&&n.metaKey){var t=q[e];ee((function(e){var n=!(null===e||void 0===e||!e[t.id]);return K(K({},e),{},(0,i.Z)({},t.id,n?null:t))}))}else Q&&Q(e)}),[Q,q,ee]);return(0,H.jsx)(L.cl,{minHeight:30*I.iI,overflowVisible:!!ae,children:0===(null===q||void 0===q?void 0:q.length)?(0,H.jsx)(b.Z,{px:3,py:1,children:(0,H.jsx)(O.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:R})}):(0,H.jsx)(x.Z,{columnFlex:Re,columns:Ne,isSelectedRow:function(e){return!y&&q[e].id===(null===J||void 0===J?void 0:J.id)},onClickRow:y?null:Se,rowVerticalPadding:6,rows:null===q||void 0===q?void 0:q.map((function(e,r){var o=e.block_runs_count,s=e.completed_block_runs_count,_=e.completed_at,x=e.execution_date,w=e.id,E=e.pipeline_schedule_id,D=e.pipeline_schedule_name,I=e.pipeline_tags,R=e.pipeline_uuid,L=e.started_at,V=e.status;le.current[w]=(0,c.createRef)();var T,F,B=!w&&!V,z="".concat(s," out of ").concat(o," block runs completed"),J=(0,H.jsx)(j.Z,{tags:null===I||void 0===I?void 0:I.map((function(e){return{uuid:e}}))},"row_pipeline_tags_".concat(r)),W=[];r>0&&q[r-1].execution_date===e.execution_date&&q[r-1].pipeline_schedule_id===e.pipeline_schedule_id?(W=[(0,H.jsx)(b.Z,{ml:1,children:(0,H.jsxs)(h.ZP,{alignItems:"center",children:[(0,H.jsx)(Z.Subitem,{size:k.bL,useStroke:!0}),(0,H.jsx)(a.ZP,{borderRadius:"".concat(P.D7,"px"),notClickable:!0,padding:"6px",children:(0,H.jsx)(O.ZP,{muted:!0,children:m.Do[V]})})]})},"row_status"),(0,H.jsx)(a.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(e){e.stopPropagation(),te.push("/pipelines/".concat(R,"/logs?pipeline_run_id[]=").concat(w))},children:(0,H.jsx)(Z.Logs,{default:!0,size:k.bL})},"row_logs"),(0,H.jsx)(O.ZP,{center:!0,default:!0,monospace:!0,muted:!0,children:null===e||void 0===e?void 0:e.id},"row_id"),(0,H.jsx)(u(),{as:"/pipelines/".concat(R,"/runs/").concat(w),href:"/pipelines/[pipeline]/runs/[run]",passHref:!0,children:(0,H.jsx)(v.Z,{bold:!0,block:!0,centerAlign:!0,muted:!0,title:z,children:"".concat(s," / ").concat(o)})},"row_block_runs"),(0,H.jsx)(O.ZP,{default:!0,monospace:!0,muted:!0,children:R},"row_pipeline_uuid")],U||W.push((0,H.jsx)(O.ZP,{default:!0,monospace:!0,muted:!0,children:"-"},"row_trigger_retry")),X&&W.push(J),(T=W).push.apply(T,[(0,H.jsx)(O.ZP,{default:!0,monospace:!0,muted:!0,children:"-"},"row_date_retry"),(0,c.createElement)(O.ZP,K(K({},G),{},{key:"row_started_at",muted:!0,title:L?(0,M._6)(L):null}),L?(0,S.Uc)(L,re):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(O.ZP,K(K({},G),{},{key:"row_completed_at",muted:!0,title:_?(0,M._6)(_):null}),_?(0,S.Uc)(_,re):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(O.ZP,K(K({},G),{},{default:!0,key:"row_execution_time",title:L&&_?(0,M.Qf)({endDatetime:_,showFullFormat:!0,startDatetime:L}):null}),L&&_?(0,M.Qf)({endDatetime:_,startDatetime:L}):(0,H.jsx)(H.Fragment,{children:"\u2014"}))])):(W=[(0,H.jsx)(Y,{cancelingRunId:oe,disabled:B,isLoadingCancelPipeline:ye,onCancel:we,onSuccess:N,pipelineRun:e,setCancelingRunId:ce,setErrors:ne,setShowConfirmationId:de,showConfirmationId:ae},"row_retry_button"),(0,H.jsx)(a.ZP,{default:!0,disabled:B,iconOnly:!0,noBackground:!0,onClick:function(e){e.stopPropagation(),te.push("/pipelines/".concat(R,"/logs?pipeline_run_id[]=").concat(w))},children:(0,H.jsx)(Z.Logs,{default:!0,size:k.bL})},"row_logs"),(0,H.jsx)(O.ZP,{center:!0,default:!0,monospace:!0,muted:!0,children:null===e||void 0===e?void 0:e.id},"row_id"),(0,H.jsx)(u(),{as:"/pipelines/".concat(R,"/runs/").concat(w),href:"/pipelines/[pipeline]/runs/[run]",passHref:!0,children:(0,H.jsx)(v.Z,{bold:!0,block:!0,centerAlign:!0,disabled:B,sky:!0,title:z,children:B?"":"".concat(s," / ").concat(o)})},"row_block_runs"),(0,H.jsx)(O.ZP,{default:!0,monospace:!0,children:R},"row_pipeline_uuid")],U||W.push((0,H.jsx)(u(),{as:"/pipelines/".concat(R,"/triggers/").concat(E),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,H.jsx)(v.Z,{bold:!0,sky:!0,children:D})},"row_trigger")),X&&W.push(J),(F=W).push.apply(F,[(0,c.createElement)(O.ZP,K(K({},G),{},{default:!0,key:"row_date",title:x?(0,M._6)(x):null}),x?(0,S.Uc)(x,re):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(O.ZP,K(K({},G),{},{default:!0,key:"row_started_at",title:L?(0,M._6)(L):null}),L?(0,S.Uc)(L,re):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(O.ZP,K(K({},G),{},{default:!0,key:"row_completed_at",title:_?(0,M._6)(_):null}),_?(0,S.Uc)(_,re):(0,H.jsx)(H.Fragment,{children:"\u2014"})),(0,c.createElement)(O.ZP,K(K({},G),{},{default:!0,key:"row_execution_time",title:L&&_?(0,M.Qf)({endDatetime:_,showFullFormat:!0,startDatetime:L}):null}),L&&_?(0,M.Qf)({endDatetime:_,startDatetime:L}):(0,H.jsx)(H.Fragment,{children:"\u2014"}))]));if(t&&!ie&&W.push((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(a.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(e){var n,t,i,r;(0,A.j)(e),he(w),ge((null===(n=le.current[w])||void 0===n||null===(t=n.current)||void 0===t?void 0:t.offsetTop)||0),xe((null===(i=le.current[w])||void 0===i||null===(r=i.current)||void 0===r?void 0:r.offsetLeft)||0)},ref:le.current[w],title:"Delete",children:(0,H.jsx)(Z.Trash,{default:!0,size:k.bL})}),(0,H.jsx)(p.Z,{onClickOutside:function(){return he(null)},open:fe===w,children:(0,H.jsx)(g.Z,{danger:!0,left:(_e||0)-C.nH,onCancel:function(){return he(null)},onClick:function(){he(null),l(w)},title:"Are you sure you want to delete this run (id ".concat(w,' for trigger "').concat(D,'")?'),top:(me||0)-(r<=1?C.oz:C.OK),width:C.Xx})})]})),n){var ue=!(null===$||void 0===$||!$[w]);W.unshift((0,H.jsx)(d.Z,{checked:ue,onClick:function(n){n.stopPropagation(),ee((function(n){return K(K({},n),{},(0,i.Z)({},w,ue?null:e))}))}},"selected-pipeline-run-".concat(w)))}return!y&&Q&&W.push((0,H.jsx)(f.Z,{flex:1,justifyContent:"flex-end",children:(0,H.jsx)(Z.ChevronRight,{default:!0,size:k.bL})})),W})),uuid:Ze})})}},16488:function(e,n,t){t.d(n,{IJ:function(){return v},M8:function(){return P},Uc:function(){return x},XM:function(){return y},_U:function(){return h},eI:function(){return _},gU:function(){return O},lO:function(){return D},ri:function(){return g},tL:function(){return j},vJ:function(){return w},xH:function(){return b}});var i,r=t(82394),l=t(92083),u=t.n(l),o=t(3917),c=t(4383),s=t(30229),a=t(42122),d=t(86735);function p(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function f(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?p(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var h=function(e){return!!e&&!Object.values(s.U5).includes(e)};function v(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var t=n.block_uuid,i=n.completed_at,l=n.started_at,o=n.status,c=null;l&&i&&(c=u()(i).valueOf()-u()(l).valueOf());return f(f({},e),{},(0,r.Z)({},t,{runtime:c,status:o}))}),{})}var m,g=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:s.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:s.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:s.Xm.API}];return e?n.slice(0,1):n};function b(e){var n=(0,a.gR)(e,[s.gm.INTERVAL,s.gm.TYPE]),t=e[s.gm.INTERVAL];t&&(n["schedule_interval[]"]=encodeURIComponent(t));var i=e[s.gm.TYPE];return i&&(n["schedule_type[]"]=i),n}function _(e){return e?new Date(u()(e).valueOf()):null}function x(e,n){return n?(0,o.XG)(e,n):function(e){if("string"!==typeof e)return e;var n=e.split("+")[0];return u()(_(n)).format(o.Nx)}(e)}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(m||(m={}));var j=(i={},(0,r.Z)(i,m.DAY,86400),(0,r.Z)(i,m.HOUR,3600),(0,r.Z)(i,m.MINUTE,60),(0,r.Z)(i,m.SECOND,1),i);function O(e){var n=m.SECOND,t=e;return e%86400===0?(t/=86400,n=m.DAY):e%3600===0?(t/=3600,n=m.HOUR):e%60===0&&(t/=60,n=m.MINUTE),{time:t,unit:n}}function w(e,n){return e*j[n]}function y(e,n,t){var i,r=u()(e);return r.set("hour",+(null===n||void 0===n?void 0:n.hour)||0),r.set("minute",+(null===n||void 0===n?void 0:n.minute)||0),r.set("second",0),i=r.format(o.TD),null!==t&&void 0!==t&&t.includeSeconds&&(i=i.concat(":00")),null!==t&&void 0!==t&&t.localTimezone&&(i=r.format(o.lE),null!==t&&void 0!==t&&t.convertToUtc&&(i=(0,o.d$)(i,{includeSeconds:null===t||void 0===t?void 0:t.includeSeconds,utcFormat:!0}))),i}function P(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t="",i=!0;if(i){var r=(0,c.XF)();n?t="".concat(r,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/api_trigger"):(t="".concat(r,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/pipeline_runs"),null!==e&&void 0!==e&&e.token&&(t="".concat(t,"/").concat(e.token)))}return t}function Z(e,n,t){return e.match(/[*,-/]/)?{additionalOffset:0,cronValue:e}:function(e,n,t){var i=t.indexOf(e),r=0;if(n<0)for(var l=0;l>n;l--)0===i?(i=t.length-1,r-=1):i-=1;else if(n>0)for(var u=0;u<n;u++)i===t.length-1?(i=0,r+=1):i+=1;var o="number"===typeof t[i]?t[i]:e;return{additionalOffset:r,cronValue:String(o)}}(+e,n,t)}var C=(0,d.m5)(60),k=(0,d.m5)(24),E=(0,o.Cs)();function D(e,n){if(!e)return e;var t=u()().local().format("Z"),i=t.split(":"),r="-"===t[0],l=3===i[0].length?Number(i[0].slice(1)):Number(i[0]),o=Number(i[1]);(r&&!n||!r&&n)&&(l=-l,o=-o);var c=e.split(" "),s=c[0],a=c[1],d=c[2],p=Z(s,o,C),f=Z(a,l+p.additionalOffset,k);if(c[0]=p.cronValue,c[1]=f.cronValue,0!==(null===f||void 0===f?void 0:f.additionalOffset)){var h=Z(d,f.additionalOffset,E);c[2]=h.cronValue}return c.join(" ")}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8095],{52729:function(t,e,n){n.d(e,{Z:function(){return V}});var r=n(26304),i=n(21831),o=n(82394),a=n(82684),c=n(26226),l=n(84969),u=n(90948),s=n(65743),d=n(29989),f=n(25976),h=n(61655),p=n(16853),g=n(65376),m=n(48072),v=n(98677),y=n(84181),x=n(55485),b=n(4190),j=n(30160),w=n(94035),O=n(70987),Z=n(79633),k=n(89370),A=n(95363),P=n(61896),S=n(70515),D=n(38469),I=n(6568),C=function(t){return t.slice(0,10)},M=function(t,e){var n=t.toISOString().slice(0,10),r=e.toISOString().slice(0,10);return"".concat(n,":").concat(r)},L=n(79221),T=n(98684),E=n(28598),F=["height","loading","selected","width","xAxisLabel","yAxisLabel"];function N(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function R(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?N(Object(n),!0).forEach((function(e){(0,o.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var J={bottom:S.iI,left:3*S.iI,right:0,top:1*S.iI},K=(0,h.Z)((function(t){var e=t.columnType,n=t.data,r=void 0===n?[]:n,o=t.getBarColor,c=t.getXValue,h=t.getYValue,x=t.height,b=t.hideTooltip,w=t.large,F=t.margin,N=void 0===F?{}:F,K=t.muted,V=t.noPadding,_=t.numberOfXTicks,z=t.renderTooltipContent,B=t.selected,Y=t.showAxisLabels,U=t.showTooltip,X=t.showYAxisLabels,H=t.showZeroes,q=t.sortData,W=t.tooltipData,G=t.tooltipLeft,Q=t.tooltipOpen,$=t.tooltipTop,tt=t.width,et=t.xLabelFormat,nt=t.yLabelFormat,rt=w?P.J5:P.VK,it=(0,a.useCallback)((function(t){return c?c(t):t[0]}),[c]),ot=(0,a.useCallback)((function(t){return h?h(t):t[1]}),[h]),at=(0,a.useContext)(f.ThemeContext),ct=e===k.RL.DATETIME,lt=R(R({},J),N);Y&&(lt=R(R({},lt),{},{left:lt.left+S.iI}));var ut=q?q(r):r.sort((function(t,e){return e[1]-t[1]})),st=ct?r.sort((function(t,e){return new Date(t[0])-new Date(e[0])})).filter((function(t){return!!t[0]})):ut.slice(0,60),dt=tt-(lt.left+lt.right),ft=x-(lt.bottom+lt.top),ht=ct?function(t,e){var n,r=t.map((function(t){return new Date(t[0])})).sort((function(t,e){return t-e}));return(0,I.Z)({domain:(n=r,[(0,D.Z)(n[0]),(0,D.Z)(n[n.length-1])]),nice:!0,range:[0,e]})}(st,dt):null,pt=function(t,e){if(null===e)return{};var n=e.ticks().map((function(t){return t.toISOString()})),r={},i=0,o=1;return t.forEach((function(t){var e=new Date(t[0]),a=t[1],c=n[i],l=n[o];if(c&&l){var u=new Date(c),s=new Date(l),d=M(u,s);if(e>=u&&e<s)r[d]=(r[d]||0)+a;else for(;o<n.length||!r[d];)if(i+=1,o+=1,u=new Date(n[i]),s=new Date(n[o]),d=M(u,s),e>=u&&e<s)return void(r[d]=(r[d]||0)+a)}})),n.reduce((function(t,e,n,r){if(0===n)return t;var i=C(e),o=C(r[n-1]);return t.push("".concat(o,":").concat(i)),t}),[]).forEach((function(t){r[t]=r[t]||0})),r}(st,ht);st=ht?Object.entries(pt).sort((function(t,e){return new Date(C(t[0]))-new Date(C(e[0]))})):st;var gt=ht?Math.max.apply(Math,(0,i.Z)(Object.values(pt))):0,mt=st.reduce((function(t,e){return(0!==ot(e)||ct||H)&&t.push(it(e)),t}),[]),vt=mt.length,yt=function(t,e,n){return n?.05:t>=30&&e<300?.5:t>=15?.3:t>=5?.1:t>2?.05:2===t?.025:0}(vt,tt,ct),xt=(0,v.Z)({domain:mt,paddingInner:V?null:yt,range:[0,dt],round:!1}),bt=(0,y.Z)({domain:[0,Math.max.apply(Math,(0,i.Z)(st.map(ot)))],range:[ft,0],round:!0}),jt=(0,T.K)(at),wt={active:((null===at||void 0===at?void 0:at.content)||O.Z.content).active,default:jt[0],muted:((null===at||void 0===at?void 0:at.monotone)||O.Z.monotone).gray,selected:((null===at||void 0===at?void 0:at.elevation)||O.Z.elevation).visualizationAccent},Ot=wt.default;K?Ot=wt.muted:B&&(Ot=wt.selected);var Zt=vt?ct?gt:Math.max.apply(Math,(0,i.Z)(st.map((function(t){return ot(t)})))):0,kt=Math.floor(Zt/6),At=[0],Pt=0;if(Zt>6)for(;Pt<Zt;)At.push(Pt+kt),Pt+=kt;else for(;Pt<=Zt;)At.push(Pt+1),Pt+=1;Zt>9999?lt=R(R({},lt),{},{left:w?8*S.iI:4.1*S.iI}):Zt>999&&(lt=R(R({},lt),{},{left:w?5*S.iI:3.6*S.iI}));var St=ct?2.25:0,Dt=vt<10||e===k.RL.NUMBER||e===k.RL.NUMBER_WITH_DECIMALS||ct||X,It=(0,a.useCallback)((function(t){var e=(0,m.Z)(t)||{x:0,y:0},n=e.x,r=e.y,i=(n-(Y?lt.left:0))/dt,o=Math.floor(vt*i),a=st[o];"undefined"===typeof a&&(a=st[0]);var c=it(a);c=c.length>15?"".concat(c.slice(0,21)):c;var l=z?z(a):"".concat(c," (").concat(ot(a),")");U({tooltipData:l,tooltipLeft:n-lt.left,tooltipTop:r+lt.top})}),[st,vt,it,ot,lt.left,lt.top,z,Y,U,tt]);return tt<10||!r.length?null:(0,E.jsxs)("div",{children:[(0,E.jsxs)("svg",{height:x+lt.bottom*(ct?7.5:3),width:tt,children:[(0,E.jsx)(d.Z,{left:Y?lt.left:0,top:lt.top+St,children:st.reduce((function(t,e){var n=it(e),r=ot(e);if(0!==r){var i,a=xt.bandwidth(),c=ft-(null!==(i=bt(r))&&void 0!==i?i:0),l=xt(n),u=ft-c;t.push((0,E.jsx)(s.Z,{fill:o?o(e):Ot,height:c,onMouseLeave:function(){return b()},onMouseMove:It,onTouchMove:It,onTouchStart:It,width:a,x:l,y:u},"bar-".concat(n)))}return t}),[])}),Y&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(l.Z,{left:lt.left,scale:bt,stroke:wt.muted,tickFormat:function(t){return nt?nt(t):(0,L.P5)(t)},tickLabelProps:function(){return{fill:wt.active,fontFamily:A.ry,fontSize:rt,textAnchor:"end",transform:"translate(-2,2.5)"}},tickStroke:wt.muted,tickValues:At,top:lt.top+St}),(0,E.jsx)(u.Z,{left:lt.left,numTicks:ct?void 0:_||6,orientation:"top",scale:ht||xt,stroke:wt.muted,tickFormat:function(t){return et?et(String(t)):ct?t.toISOString().slice(0,10):String(t)},tickLabelProps:function(t){return{fill:Dt?wt.active:"transparent",fontFamily:A.ry,fontSize:rt,textAnchor:"middle",transform:ct?"rotate(-90,".concat(ht(t),",0) translate(-33,10)"):"translate(0, ".concat(3*lt.bottom,")")}},tickLineProps:{transform:"translate(0,".concat(S.iI,")")},tickStroke:Dt?wt.muted:"transparent",top:ft+lt.top+St})]})]}),Q&&W&&(0,E.jsx)(p.Z,{left:G,style:g.j,top:$,children:(0,E.jsx)(j.ZP,{color:Z.E5,small:!0,children:W})})]})}));var V=function(t){var e=t.height,n=t.loading,i=t.selected,o=t.width,a=t.xAxisLabel,l=t.yAxisLabel,u=(0,r.Z)(t,F);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)("div",{style:{display:"flex",height:e,marginBottom:S.iI,width:"100%"},children:[l&&(0,E.jsx)(x.ZP,{alignItems:"center",fullHeight:!0,justifyContent:"center",width:28,children:(0,E.jsx)(w.Z,{children:(0,E.jsx)(j.ZP,{center:!0,muted:!0,small:!0,children:l})})}),(0,E.jsxs)("div",{style:{height:e,width:l?0===o?o:o-28:o},children:[n&&(0,E.jsx)(b.Z,{}),!n&&(0,E.jsx)(c.Z,{children:function(t){var e=t.height,n=t.width;return(0,E.jsx)(K,R(R({},u),{},{height:e,selected:i,width:n}))}})]})]}),a&&(0,E.jsx)("div",{style:{paddingLeft:l?36:0,paddingTop:4},children:(0,E.jsx)(j.ZP,{center:!0,muted:!0,small:!0,children:a})})]})}},87862:function(t,e,n){n.d(e,{Z:function(){return S}});var r=n(26304),i=n(82394),o=n(75582),a=n(26226),c=n(28940),l=n(82684),u=n(29989),s=n(25976),d=n(11684),f=n(24903),h=n(30160),p=n(44897),g=n(95363),m=n(61896),v=n(70515),y=n(98684),x=n(28598),b=["height","width","xAxisLabel"];function j(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function w(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?j(Object(n),!0).forEach((function(e){(0,i.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var O={bottom:0,left:0,right:0,top:0},Z=function(t){var e=t.endAngle;return{endAngle:e>Math.PI?2*Math.PI:0,opacity:0,startAngle:e>Math.PI?2*Math.PI:0}},k=function(t){var e=t.startAngle;return{endAngle:t.endAngle,opacity:1,startAngle:e}};function A(t){var e=t.animate,n=t.arcs,r=t.path,i=t.getKey,a=t.getColor,c=t.onClickDatum,l=t.textColor;return(0,d.useTransition)(n,{enter:k,from:e?Z:k,keys:i,leave:e?Z:k,update:k})((function(t,e,n){var u=n.key,s=r.centroid(e),f=(0,o.Z)(s,2),h=f[0],p=f[1],v=e.endAngle-e.startAngle>=.1;return(0,x.jsxs)("g",{children:[(0,x.jsx)(d.animated.path,{d:(0,d.to)([t.startAngle,t.endAngle],(function(t,n){return r(w(w({},e),{},{endAngle:n,startAngle:t}))})),fill:a(e),onClick:function(){return c(e)},onTouchStart:function(){return c(e)}}),v&&(0,x.jsx)(d.animated.g,{style:{opacity:t.opacity},children:(0,x.jsx)("text",{dy:".33em",fill:l,fontFamily:g.ry,fontSize:m.J5,pointerEvents:"none",textAnchor:"middle",x:h,y:p,children:i(e)})})]},u)}))}function P(t){var e=t.animate,n=void 0===e||e,r=t.data,i=t.getX,o=t.getY,a=t.height,d=t.margin,h=void 0===d?O:d,g=t.textColor,m=t.width,b=(0,l.useState)(null),j=b[0],Z=b[1],k=(0,l.useContext)(s.ThemeContext),P=g||(null===k||void 0===k?void 0:k.content.active)||p.Z.content.active;if(m<10)return null;var S=(0,f.Z)({domain:r.map((function(t){return i(t)})),range:(0,y.K)(k)}),D=m-h.left-h.right,I=a-h.top-h.bottom,C=Math.min(D,I)/2,M=I/2,L=D/2,T=Math.min(D/4,12*v.iI);return(0,x.jsx)("svg",{height:a,width:m,children:(0,x.jsx)(u.Z,{left:L+h.left,top:M+h.top,children:(0,x.jsx)(c.Z,{cornerRadius:v.iI/2,data:j?r.filter((function(t){return JSON.stringify(t)===JSON.stringify(j)})):r,innerRadius:Math.max(C-T,12.25),outerRadius:C,padAngle:.005,pieValue:o,children:function(t){return(0,x.jsx)(A,w(w({},t),{},{animate:n,getColor:function(t){var e=t.data;return S(i(e))},getKey:function(t){var e=t.data;return i(e)},onClickDatum:function(t){var e=t.data;return n&&Z(j&&JSON.stringify(j)===JSON.stringify(e)?null:e)},textColor:P}))}})})})}function S(t){var e=t.height,n=t.width,i=t.xAxisLabel,o=(0,r.Z)(t,b),c={};return"undefined"!==typeof e&&(c.height=e),"undefined"!==typeof n&&(c.width=n),(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("div",{style:c,children:(0,x.jsx)(a.Z,{children:function(t){var e=t.width,n=t.height;return(0,x.jsx)(P,w(w({},o),{},{height:n,width:e}))}})}),i&&(0,x.jsx)("div",{style:{paddingTop:4},children:(0,x.jsx)(h.ZP,{center:!0,muted:!0,small:!0,children:i})})]})}},98684:function(t,e,n){n.d(e,{K:function(){return i}});var r=n(70987),i=function(t){var e=t||r.Z,n=e.brand,i=n.earth200,o=n.earth300,a=n.earth400,c=n.energy200,l=n.energy300,u=n.energy400,s=n.fire200,d=n.fire300,f=n.fire400,h=n.water200,p=n.water300,g=n.water400,m=n.wind200,v=n.wind300,y=n.wind400,x=e.chart;return[x.backgroundPrimary,x.backgroundSecondary,x.backgroundTertiary].concat([y,g,f,u,a,v,p,d,l,o,m,h,s,c,i])}},94035:function(t,e,n){var r=n(25976).default.div.withConfig({displayName:"YAxisLabelContainer",componentId:"sc-qwp21x-0"})(["-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-o-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);white-space:nowrap;"]);e.Z=r},79221:function(t,e,n){n.d(e,{P5:function(){return r},Vs:function(){return i}});n(81728);function r(t,e){var n=e||{},r=n.maxFractionDigits,i=n.minAmount,o=Intl.NumberFormat("en-US",{maximumFractionDigits:r||2,notation:"compact"});return"number"!==typeof t?t:t>=(i||1e4)?o.format(t):t.toString()}function i(t,e,n){var r,i;if("undefined"===typeof t||"undefined"===typeof e)return 0;var o=null===t||void 0===t||null===(r=t(e,n))||void 0===r||null===(i=r.props)||void 0===i?void 0:i.children;return(Array.isArray(o)?o:[o]).join("").length}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8146],{58146:function(e,n,i){var t=i(21831),r=i(75582),s=i(82394),l=i(21764),c=i(82684),o=i(69864),d=i(34376),u=i(71180),a=i(70652),E=i(15338),Z=i(97618),x=i(55485),f=i(85854),h=i(65956),m=i(36288),j=i(44085),_=i(28274),I=i(38276),A=i(75499),p=i(30160),v=i(35576),L=i(17488),S=i(69650),D=i(35686),g=i(8193),P=i(72473),T=i(70515),b=i(24755),R=i(48277),O=i(81728),C=i(3917),N=i(76417),B=i(86735),y=i(42122),k=i(72619),W=i(95924),U=i(28598);function w(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function M(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?w(Object(i),!0).forEach((function(n){(0,s.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):w(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var H,Y=2*T.iI;!function(e){e.ROLES="Roles",e.USERS="Users"}(H||(H={})),n.Z=function(e){var n,i=e.contained,s=e.onCancel,w=e.slug,Q=(0,d.useRouter)(),V=(0,c.useState)(!0),F=V[0],K=V[1],G=(0,c.useState)(null),q=G[0],z=G[1],$=(0,c.useState)({}),J=$[0],X=$[1],ee=(0,c.useState)(null),ne=ee[0],ie=ee[1],te=(0,c.useCallback)((function(e,n,i){ie(M(M({},e),{},{rolesMapping:(0,B.HK)(n||[],(function(e){return e.id})),usersMapping:(0,B.HK)(i||[],(function(e){return e.id}))}))}),[ie]),re=(0,c.useCallback)((function(e){X((function(n){return M(M({},n),e)})),ie((function(n){return M(M({},n),e)}))}),[X,ie]),se=D.ZP.permissions.detail(w,{},{revalidateOnFocus:!1}).data,le=(0,c.useMemo)((function(){return null===se||void 0===se?void 0:se.permission}),[se]);(0,c.useEffect)((function(){le&&te(le,null===le||void 0===le?void 0:le.roles,null===le||void 0===le?void 0:le.users)}),[te,le]);var ce=D.ZP.permissions.list({_format:"with_only_entity_options",only_entity_options:!0},{},{pauseFetch:!!le}).data,oe=(0,c.useMemo)((function(){var e;return null===ce||void 0===ce||null===(e=ce.permissions)||void 0===e?void 0:e[0]}),[ce]),de=(0,c.useMemo)((function(){var e;return(null===(e=le||oe)||void 0===e?void 0:e.entity_names)||[]}),[le,oe]),ue=(0,c.useMemo)((function(){var e;return(null===(e=le||oe)||void 0===e?void 0:e.entity_types)||[]}),[le,oe]),ae=(0,o.Db)(le?D.ZP.permissions.useUpdate(null===le||void 0===le?void 0:le.id):D.ZP.permissions.useCreate(),{onSuccess:function(e){return(0,k.wD)(e,{callback:function(e){var n=e.permission;X({}),te(n,null===n||void 0===n?void 0:n.roles,null===n||void 0===n?void 0:n.users),le||Q.push("/settings/workspace/permissions/".concat(null===n||void 0===n?void 0:n.id)),l.Am.success(le?"Permission successfully updated.":"New permission created successfully.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:"permission-mutate-success-".concat(n.id)})},onErrorCallback:function(e){var n=e.error,i=n.errors,t=n.exception,r=n.message,s=n.type;l.Am.error((null===i||void 0===i?void 0:i.error)||t||r,{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:s})}})}}),Ee=(0,r.Z)(ae,2),Ze=Ee[0],xe=Ee[1].isLoading,fe=(0,o.Db)(D.ZP.permissions.useDelete(null===le||void 0===le?void 0:le.id),{onSuccess:function(e){return(0,k.wD)(e,{callback:function(){Q.push("/settings/workspace/permissions"),l.Am.success("Permission successfully delete.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:"permission-delete-success-".concat(null===le||void 0===le?void 0:le.id)})},onErrorCallback:function(e){var n=e.error,i=n.errors,t=n.exception,r=n.message,s=n.type;l.Am.error((null===i||void 0===i?void 0:i.error)||t||r,{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:s})}})}}),he=(0,r.Z)(fe,2),me=he[0],je=he[1].isLoading,_e=(0,c.useMemo)((function(){return(null===ne||void 0===ne?void 0:ne.access)||0}),[ne]),Ie=(0,c.useCallback)((function(e){return e.map((function(e,n){var i=m.K4[e],t=Boolean(_e&Number(e)),r=(0,R.fD)(_e),s=(0,R.fD)(e);return(0,U.jsx)(I.Z,{mt:n>=1?1:0,children:(0,U.jsxs)(x.ZP,{alignItems:"center",children:[(0,U.jsx)(S.Z,{checked:t,compact:!0,onCheck:function(e){return re({access:(0,R.$P)(e(t)?(0,R.vN)(r,s):(0,R.VJ)(r,s))})}}),(0,U.jsx)(I.Z,{mr:T.cd}),(0,U.jsx)(p.ZP,{default:!t,children:i})]})},i)}))}),[_e,re]),Ae=(0,c.useMemo)((function(){return(null===ne||void 0===ne?void 0:ne.conditions)||[]}),[ne]),pe=(0,c.useMemo)((function(){var e=m.WG.DISABLE_UNLESS_CONDITIONS,n=(0,R.fD)(_e),i=(0,R.fD)(e),r=Boolean(_e&Number(e)),s=new Set((0,t.Z)(Ae)),l=s.has(m.m_.HAS_NOTEBOOK_EDIT_ACCESS),c=s.has(m.m_.HAS_PIPELINE_EDIT_ACCESS),o=s.has(m.m_.USER_OWNS_ENTITY),d=r&&l,u=r&&c,a=r&&o;return(0,U.jsxs)(x.ZP,{flexDirection:"column",children:[(0,U.jsx)(I.Z,{mt:1,children:(0,U.jsxs)(x.ZP,{alignItems:"center",children:[(0,U.jsx)(S.Z,{checked:d,compact:!0,onCheck:function(e){var l=n;e(d)?(r||(l=(0,R.vN)(n,i)),s.add(m.m_.HAS_NOTEBOOK_EDIT_ACCESS)):(c||o||(l=(0,R.VJ)(n,i)),s.delete(m.m_.HAS_NOTEBOOK_EDIT_ACCESS)),re({access:(0,R.$P)(l),conditions:(0,t.Z)(s)})}}),(0,U.jsx)(I.Z,{mr:T.cd}),(0,U.jsx)(p.ZP,{default:!d,children:m.ND[m.m_.HAS_NOTEBOOK_EDIT_ACCESS]})]})}),(0,U.jsx)(I.Z,{mt:1,children:(0,U.jsxs)(x.ZP,{alignItems:"center",children:[(0,U.jsx)(S.Z,{checked:u,compact:!0,onCheck:function(e){var c=n;e(u)?(r||(c=(0,R.vN)(n,i)),s.add(m.m_.HAS_PIPELINE_EDIT_ACCESS)):(l||o||(c=(0,R.VJ)(n,i)),s.delete(m.m_.HAS_PIPELINE_EDIT_ACCESS)),re({access:(0,R.$P)(c),conditions:(0,t.Z)(s)})}}),(0,U.jsx)(I.Z,{mr:T.cd}),(0,U.jsx)(p.ZP,{default:!u,children:m.ND[m.m_.HAS_PIPELINE_EDIT_ACCESS]})]})}),(0,U.jsx)(I.Z,{mt:1,children:(0,U.jsxs)(x.ZP,{alignItems:"center",children:[(0,U.jsx)(S.Z,{checked:a,compact:!0,onCheck:function(e){var c=n;e(a)?(r||(c=(0,R.vN)(n,i)),s.add(m.m_.USER_OWNS_ENTITY)):(l||l||(c=(0,R.VJ)(n,i)),s.delete(m.m_.USER_OWNS_ENTITY)),re({access:(0,R.$P)(c),conditions:(0,t.Z)(s)})}}),(0,U.jsx)(I.Z,{mr:T.cd}),(0,U.jsx)(p.ZP,{default:!a,children:m.ND[m.m_.USER_OWNS_ENTITY]})]})})]})}),[_e,Ae,re]),ve=D.ZP.roles.list({},{},{pauseFetch:!le}).data,Le=(0,c.useMemo)((function(){return(0,B.YC)((null===ve||void 0===ve?void 0:ve.roles)||[],"name")}),[ve]),Se=(0,c.useMemo)((function(){return(null===ne||void 0===ne?void 0:ne.rolesMapping)||{}}),[ne]),De=(0,c.useMemo)((function(){return(0,B.YC)(Object.values(Se),"name")}),[Se]),ge=D.ZP.users.list({},{},{pauseFetch:!le}).data,Pe=((0,c.useMemo)((function(){return(0,B.YC)((null===ge||void 0===ge?void 0:ge.users)||[],(function(e){return(0,N.s)(e)}))}),[ge]),(0,c.useMemo)((function(){return(null===ne||void 0===ne?void 0:ne.usersMapping)||{}}),[ne])),Te=(0,c.useMemo)((function(){return(0,B.YC)(Object.values(Pe),(function(e){return(0,N.s)(e)}))}),[Pe]),be=(0,c.useMemo)((function(){return(null===De||void 0===De?void 0:De.length)>=1}),[De]),Re=(0,c.useMemo)((function(){return(0,U.jsx)(u.ZP,{beforeIcon:(0,U.jsx)(P.Add,{}),compact:!0,onClick:function(){z(H.ROLES),K(!1)},primary:!be,secondary:be,small:!0,children:"Add roles"})}),[be,z,K]),Oe=(0,c.useMemo)((function(){return(null===Te||void 0===Te?void 0:Te.length)>=1}),[Te]),Ce=(0,c.useCallback)((function(e,n){return(0,U.jsx)(A.Z,{columnFlex:[null,1],columns:[{label:function(){var n=null===e||void 0===e?void 0:e.every((function(e){var n=e.id;return null===Se||void 0===Se?void 0:Se[n]}));return(0,U.jsx)(a.Z,{checked:n,onClick:function(i){(0,W.j)(i),re(n?{rolesMapping:{}}:{rolesMapping:(0,B.HK)(e,(function(e){return e.id}))})}},"checkbox")},uuid:"actions"},{uuid:"Role"}],onClickRow:n?function(n){var i=e[n];i&&window.open("/settings/workspace/roles/".concat(null===i||void 0===i?void 0:i.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.name,i=e.id,t=!(null===Se||void 0===Se||!Se[i]);return[(0,U.jsx)(a.Z,{checked:t,onClick:function(n){(0,W.j)(n);var r=M({},Se);t?null===r||void 0===r||delete r[i]:r[i]=e,re({rolesMapping:r})}},"checkbox"),(0,U.jsx)(p.ZP,{monospace:!0,children:n},"name")]})),uuid:"roles"})}),[Se,re]),Ne=(0,c.useCallback)((function(e,n){return(0,U.jsx)(A.Z,{columnFlex:[1,1,1],columns:[{uuid:"Username"},{uuid:"First name"},{uuid:"Last name"}],onClickRow:n?function(n){var i=e[n];i&&window.open("/settings/workspace/users/".concat(null===i||void 0===i?void 0:i.id),"_blank").focus()}:null,rows:null===e||void 0===e?void 0:e.map((function(e){var n=e.first_name,i=e.last_name,t=e.username;return[(0,U.jsx)(p.ZP,{children:t},"username"),(0,U.jsx)(p.ZP,{default:!0,children:n},"firstName"),(0,U.jsx)(p.ZP,{default:!0,children:i},"lastName")]})),uuid:"users"})}),[Pe,re]),Be=(0,c.useMemo)((function(){return Ce(Le)}),[Ce,Le]),ye=(0,c.useMemo)((function(){return Ce(De,!0)}),[Ce,De]),ke=(0,c.useMemo)((function(){return Ne(Te,!0)}),[Ne,Te]),We=(0,U.jsxs)(g.N,{children:[(0,U.jsxs)(h.Z,{noPadding:!0,children:[(0,U.jsx)(I.Z,{p:T.cd,children:(0,U.jsx)(f.Z,{level:4,children:le?"Permission ".concat(null===le||void 0===le?void 0:le.id):"New permission"})}),(0,U.jsx)(E.Z,{light:!0}),(0,U.jsx)(I.Z,{p:T.cd,children:(0,U.jsxs)(x.ZP,{alignItems:"center",children:[(0,U.jsxs)(p.ZP,{danger:"entity_name"in J&&!(null!==ne&&void 0!==ne&&ne.entity_name),default:!0,large:!0,children:["Entity ","entity_name"in J&&!(null!==ne&&void 0!==ne&&ne.entity_name)&&(0,U.jsx)(p.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,U.jsx)(I.Z,{mr:T.cd}),(0,U.jsx)(Z.Z,{flex:1,justifyContent:"flex-end",children:(0,U.jsx)(j.Z,{afterIconSize:Y,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,onChange:function(e){return re({entity_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"Select an entity",value:(null===ne||void 0===ne?void 0:ne.entity_name)||"",children:de.map((function(e){return(0,U.jsx)("option",{value:e,children:(0,O.j3)(e)},e)}))})})]})}),(0,U.jsx)(E.Z,{light:!0}),(0,U.jsx)(I.Z,{p:T.cd,children:(0,U.jsxs)(x.ZP,{alignItems:"center",children:[(0,U.jsx)(p.ZP,{default:!0,large:!0,children:"Entity subtype"}),(0,U.jsx)(I.Z,{mr:T.cd}),(0,U.jsx)(Z.Z,{flex:1,justifyContent:"flex-end",children:(0,U.jsxs)(j.Z,{afterIconSize:Y,alignRight:!0,autoComplete:"off",large:!0,monospace:!0,noBackground:!0,noBorder:!0,onChange:function(e){return re({entity_type:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"Select an entity subtype",value:(null===ne||void 0===ne?void 0:ne.entity_type)||"",children:[(0,U.jsx)("option",{value:""}),ue.map((function(e){return(0,U.jsx)("option",{value:e,children:e},e)}))]})})]})}),(0,U.jsx)(E.Z,{light:!0}),(0,U.jsx)(I.Z,{p:T.cd,children:(0,U.jsxs)(x.ZP,{alignItems:"center",children:[(0,U.jsx)(p.ZP,{default:!0,large:!0,children:"Enity UUID"}),(0,U.jsx)(I.Z,{mr:T.cd}),(0,U.jsx)(Z.Z,{flex:1,children:(0,U.jsx)(L.Z,{afterIcon:(0,U.jsx)(P.Edit,{}),afterIconClick:function(e,n){var i;null===n||void 0===n||null===(i=n.current)||void 0===i||i.focus()},afterIconSize:Y,alignRight:!0,autoComplete:"off",large:!0,monospace:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return re({entity_id:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. pipeline_uuid",value:(null===ne||void 0===ne?void 0:ne.entity_id)||""})})]})})]}),(0,U.jsx)(I.Z,{mb:T.HN}),(0,U.jsxs)(h.Z,{noPadding:!0,children:[(0,U.jsx)(I.Z,{p:T.cd,children:(0,U.jsx)(f.Z,{level:4,children:"Access"})}),(0,U.jsx)(E.Z,{light:!0}),(0,U.jsxs)(x.ZP,{alignItems:"center",children:[(0,U.jsx)(Z.Z,{flex:1,children:(0,U.jsxs)(I.Z,{p:T.cd,children:[(0,U.jsx)(I.Z,{mb:T.cd,children:(0,U.jsx)(p.ZP,{default:!0,large:!0,children:"Groups"})}),Ie(m.G9)]})}),(0,U.jsx)(Z.Z,{flex:1,children:(0,U.jsxs)(I.Z,{p:T.cd,children:[(0,U.jsx)(I.Z,{mb:T.cd,children:(0,U.jsx)(p.ZP,{default:!0,large:!0,children:"Special conditions"})}),pe]})})]}),(0,U.jsx)(E.Z,{light:!0}),(0,U.jsxs)(x.ZP,{alignItems:"center",children:[(0,U.jsx)(Z.Z,{flex:1,children:(0,U.jsxs)(I.Z,{p:T.cd,children:[(0,U.jsx)(I.Z,{mb:T.cd,children:(0,U.jsx)(p.ZP,{default:!0,large:!0,children:"Operations"})}),Ie(m.Pt)]})}),(0,U.jsx)(Z.Z,{flex:1,children:(0,U.jsxs)(I.Z,{p:T.cd,children:[(0,U.jsx)(I.Z,{mb:T.cd,children:(0,U.jsx)(p.ZP,{default:!0,large:!0,children:"Disable operations"})}),Ie(m.oO)]})})]}),(0,U.jsx)(E.Z,{light:!0}),(0,U.jsxs)(x.ZP,{alignItems:"flex-start",children:[(0,U.jsx)(Z.Z,{flex:1,children:(0,U.jsxs)(I.Z,{p:T.cd,children:[(0,U.jsx)(I.Z,{mb:T.cd,children:(0,U.jsx)(p.ZP,{default:!0,large:!0,children:"Read attributes"})}),Ie(m.Fy)]})}),(0,U.jsx)(Z.Z,{flex:1,children:(0,U.jsxs)(I.Z,{fullWidth:!0,p:T.cd,children:[(0,U.jsx)(I.Z,{mb:T.cd,children:(0,U.jsx)(p.ZP,{default:!0,large:!0,children:"Readable attributes (comma separated)"})}),(0,U.jsx)(v.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return re({read_attributes:e.target.value})},placeholder:"e.g. email",value:(null===ne||void 0===ne?void 0:ne.read_attributes)||""})]})})]}),(0,U.jsx)(E.Z,{light:!0}),(0,U.jsxs)(x.ZP,{alignItems:"flex-start",children:[(0,U.jsx)(Z.Z,{flex:1,children:(0,U.jsxs)(I.Z,{p:T.cd,children:[(0,U.jsx)(I.Z,{mb:T.cd,children:(0,U.jsx)(p.ZP,{default:!0,large:!0,children:"Write attributes"})}),Ie(m.H1)]})}),(0,U.jsx)(Z.Z,{flex:1,children:(0,U.jsxs)(I.Z,{fullWidth:!0,p:T.cd,children:[(0,U.jsx)(I.Z,{mb:T.cd,children:(0,U.jsx)(p.ZP,{default:!0,large:!0,children:"Writable attributes (comma separated)"})}),(0,U.jsx)(v.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return re({write_attributes:e.target.value})},placeholder:"e.g. password",value:(null===ne||void 0===ne?void 0:ne.write_attributes)||""})]})})]}),(0,U.jsx)(E.Z,{light:!0}),(0,U.jsxs)(x.ZP,{alignItems:"flex-start",children:[(0,U.jsx)(Z.Z,{flex:1,children:(0,U.jsxs)(I.Z,{p:T.cd,children:[(0,U.jsx)(I.Z,{mb:T.cd,children:(0,U.jsx)(p.ZP,{default:!0,large:!0,children:"Query parameters"})}),Ie(m.hl)]})}),(0,U.jsx)(Z.Z,{flex:1,children:(0,U.jsxs)(I.Z,{fullWidth:!0,p:T.cd,children:[(0,U.jsx)(I.Z,{mb:T.cd,children:(0,U.jsx)(p.ZP,{default:!0,large:!0,children:"Parameters that can be queried (comma separated)"})}),(0,U.jsx)(v.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return re({query_attributes:e.target.value})},placeholder:"e.g. include_outputs",value:(null===ne||void 0===ne?void 0:ne.query_attributes)||""})]})})]})]}),(0,U.jsx)(I.Z,{mb:T.HN}),le&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(h.Z,{noPadding:!0,children:[(0,U.jsx)(I.Z,{p:T.cd,children:(0,U.jsxs)(x.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,U.jsx)(f.Z,{level:4,children:"Roles"}),(0,U.jsx)(I.Z,{mr:T.cd}),be&&(0,U.jsx)(x.ZP,{alignItems:"center",children:Re})]})}),(0,U.jsx)(E.Z,{light:!0}),!be&&(0,U.jsxs)(I.Z,{p:T.cd,children:[(0,U.jsx)(I.Z,{mb:T.cd,children:(0,U.jsx)(p.ZP,{default:!0,children:"This permission is currently not attached to any role."})}),(0,U.jsx)(x.ZP,{alignItems:"center",children:Re})]}),be&&(0,U.jsx)(I.Z,{pb:T.Mq,children:ye})]}),(0,U.jsx)(I.Z,{mb:T.HN}),(0,U.jsxs)(h.Z,{noPadding:!0,children:[(0,U.jsx)(I.Z,{p:T.cd,children:(0,U.jsx)(x.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,U.jsx)(f.Z,{level:4,children:"Users"})})}),(0,U.jsx)(E.Z,{light:!0}),!Oe&&(0,U.jsx)(I.Z,{p:T.cd,children:(0,U.jsx)(p.ZP,{default:!0,children:"There are currently no users with this permission."})}),Oe&&(0,U.jsx)(I.Z,{pb:T.Mq,children:ke})]}),(0,U.jsx)(I.Z,{mb:T.HN}),(0,U.jsxs)(h.Z,{noPadding:!0,children:[(0,U.jsx)(I.Z,{p:T.cd,children:(0,U.jsx)(f.Z,{level:4,children:"Metadata"})}),(0,U.jsx)(E.Z,{light:!0}),(0,U.jsx)(I.Z,{p:T.cd,children:(0,U.jsxs)(x.ZP,{alignItems:"center",children:[(0,U.jsx)(p.ZP,{default:!0,large:!0,children:"Last updated"}),(0,U.jsx)(I.Z,{mr:T.cd}),(0,U.jsxs)(Z.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,U.jsx)(p.ZP,{large:!0,monospace:!0,muted:!0,children:(null===ne||void 0===ne?void 0:ne.updated_at)&&(0,C.d$)(null===ne||void 0===ne?void 0:ne.updated_at,{includeSeconds:!0})}),(0,U.jsx)(I.Z,{mr:T.cd}),(0,U.jsx)(P.Schedule,{muted:!0,size:Y}),(0,U.jsx)(I.Z,{mr:1})]})]})}),(0,U.jsx)(E.Z,{light:!0}),(0,U.jsx)(I.Z,{p:T.cd,children:(0,U.jsxs)(x.ZP,{alignItems:"center",children:[(0,U.jsx)(p.ZP,{default:!0,large:!0,children:"Created at"}),(0,U.jsx)(I.Z,{mr:T.cd}),(0,U.jsxs)(Z.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,U.jsx)(p.ZP,{large:!0,monospace:!0,muted:!0,children:(null===ne||void 0===ne?void 0:ne.created_at)&&(0,C.d$)(null===ne||void 0===ne?void 0:ne.created_at,{includeSeconds:!0})}),(0,U.jsx)(I.Z,{mr:T.cd}),(0,U.jsx)(P.Schedule,{muted:!0,size:Y}),(0,U.jsx)(I.Z,{mr:1})]})]})}),(0,U.jsx)(E.Z,{light:!0}),(0,U.jsx)(I.Z,{p:T.cd,children:(0,U.jsxs)(x.ZP,{alignItems:"center",children:[(0,U.jsx)(p.ZP,{default:!0,large:!0,children:"Created by"}),(0,U.jsx)(I.Z,{mr:T.cd}),(0,U.jsxs)(Z.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,U.jsx)(p.ZP,{large:!0,monospace:!0,muted:!0,children:(0,N.s)(null===le||void 0===le?void 0:le.user)}),(0,U.jsx)(I.Z,{mr:T.cd}),(0,U.jsx)(P.Schedule,{muted:!0,size:Y}),(0,U.jsx)(I.Z,{mr:1})]})]})})]}),(0,U.jsx)(I.Z,{mb:T.HN})]}),(0,U.jsxs)(x.ZP,{children:[(0,U.jsx)(u.ZP,{beforeIcon:(0,U.jsx)(P.Save,{}),disabled:!J||!(null!==(n=Object.keys(J))&&void 0!==n&&n.length),loading:xe,onClick:function(){return Ze({permission:M(M({},(0,y.GL)(ne,["access","conditions","entity_id","entity_name","entity_type","query_attributes","read_attributes","write_attributes"],{include_blanks:!0})),le?{role_ids:Object.keys((null===ne||void 0===ne?void 0:ne.rolesMapping)||{}).map((function(e){return Number(e)}))}:{})})},primary:!0,children:le?"Save changes":"Create new permission"}),s&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(I.Z,{mr:T.cd}),(0,U.jsx)(u.ZP,{onClick:function(){return null===s||void 0===s?void 0:s()},secondary:!0,children:"Cancel and go back"})]}),le&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(I.Z,{mr:T.cd}),(0,U.jsx)(u.ZP,{beforeIcon:(0,U.jsx)(P.Trash,{}),danger:!0,loading:je,onClick:function(){return me()},children:"Delete permission"})]})]})]});return i?We:(0,U.jsx)(_.Z,{after:H.ROLES===q?Be:null,afterHeader:(0,U.jsx)(I.Z,{px:T.cd,children:(0,U.jsx)(p.ZP,{bold:!0,children:q})}),afterHidden:F,afterWidth:60*T.iI,appendBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Permissions"},linkProps:{href:"/settings/workspace/permissions"}},{bold:!0,label:function(){return"Permission ".concat(null===le||void 0===le?void 0:le.id)}}],hideAfterCompletely:!0,setAfterHidden:K,title:null!==le&&void 0!==le&&le.id?"Permission ".concat(null===le||void 0===le?void 0:le.id):"New permission",uuidItemSelected:b.B2.PERMISSIONS,uuidWorkspaceSelected:b.Pl.USER_MANAGEMENT,children:le&&We})}},36288:function(e,n,i){i.d(n,{Fy:function(){return x},G9:function(){return u},H1:function(){return f},K4:function(){return o},ND:function(){return d},Pt:function(){return a},WG:function(){return s},hl:function(){return Z},m_:function(){return l},oO:function(){return E}});var t,r,s,l,c=i(82394);!function(e){e[e.OWNER=1]="OWNER",e[e.ADMIN=2]="ADMIN",e[e.EDITOR=4]="EDITOR",e[e.VIEWER=8]="VIEWER",e[e.LIST=16]="LIST",e[e.DETAIL=32]="DETAIL",e[e.CREATE=64]="CREATE",e[e.UPDATE=128]="UPDATE",e[e.DELETE=512]="DELETE",e[e.OPERATION_ALL=1024]="OPERATION_ALL",e[e.QUERY=2048]="QUERY",e[e.QUERY_ALL=4096]="QUERY_ALL",e[e.READ=8192]="READ",e[e.READ_ALL=16384]="READ_ALL",e[e.WRITE=32768]="WRITE",e[e.WRITE_ALL=65536]="WRITE_ALL",e[e.ALL=131072]="ALL",e[e.DISABLE_LIST=262144]="DISABLE_LIST",e[e.DISABLE_DETAIL=524288]="DISABLE_DETAIL",e[e.DISABLE_CREATE=1048576]="DISABLE_CREATE",e[e.DISABLE_UPDATE=2097152]="DISABLE_UPDATE",e[e.DISABLE_DELETE=4194304]="DISABLE_DELETE",e[e.DISABLE_OPERATION_ALL=8388608]="DISABLE_OPERATION_ALL",e[e.DISABLE_QUERY=16777216]="DISABLE_QUERY",e[e.DISABLE_QUERY_ALL=33554432]="DISABLE_QUERY_ALL",e[e.DISABLE_READ=67108864]="DISABLE_READ",e[e.DISABLE_READ_ALL=134217728]="DISABLE_READ_ALL",e[e.DISABLE_WRITE=268435456]="DISABLE_WRITE",e[e.DISABLE_WRITE_ALL=536870912]="DISABLE_WRITE_ALL",e[e.DISABLE_UNLESS_CONDITIONS=1073741824]="DISABLE_UNLESS_CONDITIONS"}(s||(s={})),function(e){e.HAS_NOTEBOOK_EDIT_ACCESS="HAS_NOTEBOOK_EDIT_ACCESS",e.HAS_PIPELINE_EDIT_ACCESS="HAS_PIPELINE_EDIT_ACCESS",e.USER_OWNS_ENTITY="USER_OWNS_ENTITY"}(l||(l={}));var o=(t={},(0,c.Z)(t,s.OWNER,"Owner"),(0,c.Z)(t,s.ADMIN,"Admin"),(0,c.Z)(t,s.EDITOR,"Editor"),(0,c.Z)(t,s.VIEWER,"Viewer"),(0,c.Z)(t,s.LIST,"List"),(0,c.Z)(t,s.DETAIL,"Detail"),(0,c.Z)(t,s.CREATE,"Create"),(0,c.Z)(t,s.UPDATE,"Update"),(0,c.Z)(t,s.DELETE,"Delete"),(0,c.Z)(t,s.OPERATION_ALL,"All operations"),(0,c.Z)(t,s.QUERY,"Query"),(0,c.Z)(t,s.QUERY_ALL,"Query all attributes"),(0,c.Z)(t,s.READ,"Read"),(0,c.Z)(t,s.READ_ALL,"Read all attributes"),(0,c.Z)(t,s.WRITE,"Write"),(0,c.Z)(t,s.WRITE_ALL,"Write all attributes"),(0,c.Z)(t,s.ALL,"All"),(0,c.Z)(t,s.DISABLE_LIST,"Disable list"),(0,c.Z)(t,s.DISABLE_DETAIL,"Disable detail"),(0,c.Z)(t,s.DISABLE_CREATE,"Disable create"),(0,c.Z)(t,s.DISABLE_UPDATE,"Disable update"),(0,c.Z)(t,s.DISABLE_DELETE,"Disable delete"),(0,c.Z)(t,s.DISABLE_OPERATION_ALL,"Disable all operations"),(0,c.Z)(t,s.DISABLE_QUERY,"Disable query"),(0,c.Z)(t,s.DISABLE_QUERY_ALL,"Disable all query parameters"),(0,c.Z)(t,s.DISABLE_READ,"Disable read"),(0,c.Z)(t,s.DISABLE_READ_ALL,"Disable all read attributes"),(0,c.Z)(t,s.DISABLE_WRITE,"Disable write"),(0,c.Z)(t,s.DISABLE_WRITE_ALL,"Disable all write attributes"),t),d=(r={},(0,c.Z)(r,l.HAS_NOTEBOOK_EDIT_ACCESS,"Disable unless user has notebook edit access"),(0,c.Z)(r,l.HAS_PIPELINE_EDIT_ACCESS,"Disable unless user has pipeline edit access"),(0,c.Z)(r,l.USER_OWNS_ENTITY,"Disable unless user owns the current entity"),r),u=[s.OWNER,s.ADMIN,s.EDITOR,s.VIEWER,s.ALL],a=[s.LIST,s.DETAIL,s.CREATE,s.UPDATE,s.DELETE,s.OPERATION_ALL],E=[s.DISABLE_LIST,s.DISABLE_DETAIL,s.DISABLE_CREATE,s.DISABLE_UPDATE,s.DISABLE_DELETE,s.DISABLE_OPERATION_ALL],Z=[s.QUERY,s.QUERY_ALL,s.DISABLE_QUERY,s.DISABLE_QUERY_ALL],x=[s.READ,s.READ_ALL,s.DISABLE_READ,s.DISABLE_READ_ALL],f=[s.WRITE,s.WRITE_ALL,s.DISABLE_WRITE,s.DISABLE_WRITE_ALL]},76417:function(e,n,i){function t(e){return null!==e&&void 0!==e&&e.first_name?[null===e||void 0===e?void 0:e.first_name,null===e||void 0===e?void 0:e.last_name].filter((function(e){return e})).join(" "):null===e||void 0===e?void 0:e.username}i.d(n,{s:function(){return t}})},48277:function(e,n,i){i.d(n,{$P:function(){return d},JI:function(){return s},VJ:function(){return o},fD:function(){return l},uf:function(){return r},vN:function(){return c}});var t=i(75582),r=function(e){var n=String(e).split("."),i=(0,t.Z)(n,2),r=i[0],s=i[1];return"".concat(r.replace(/\B(?=(\d{3})+(?!\d))/g,",")).concat(s?".".concat(s):"")};function s(e){var n=Math.floor(Date.now()/1e3);return e>0?n-e:n}function l(e){return(e>>>0).toString(2)}function c(e,n){return String(BigInt(e)+BigInt(n))}function o(e,n){return String(BigInt(e)-BigInt(n))}function d(e){return parseInt(e,2)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9265],{62072:function(t,n,e){function i(t){return null==t?void 0:t[0]}function r(t){return null==t?void 0:t[1]}e.d(n,{l8:function(){return i},xf:function(){return r}})},59309:function(t,n,e){e.d(n,{ZP:function(){return c}});var i=e(12759),r=e(27500),o=e(82610),a=e(34812),u=e(77944),l={expand:i.Z,diverging:r.Z,none:o.Z,silhouette:a.Z,wiggle:u.Z};Object.keys(l);function c(t){return t&&l[t]||l.none}},18246:function(t,n,e){e.d(n,{ZP:function(){return c}});var i=e(39586),r=e(25516),o=e(54164),a=e(8512),u=e(2010),l={ascending:i.Z,descending:r.Z,insideout:o.Z,none:a.Z,reverse:u.Z};Object.keys(l);function c(t){return t&&l[t]||l.none}},66909:function(t,n,e){e.d(n,{Eh:function(){return c},t0:function(){return d}});var i=e(25976),r=e(2842),o=e(4982),a=e(61896),u=e(47041),l=e(70515),c=(l.iI,o.O$+3*l.iI+a.dN),d=i.default.div.withConfig({displayName:"indexstyle__SidekickContainerStyle",componentId:"sc-15ofupc-0"})([""," overflow:auto;position:absolute;width:100%;"," ",""],u.w5,(function(t){return"\n height: calc(100vh - ".concat(r.uX,"px - ").concat(t.heightOffset,"px);\n ")}),(function(t){return t.overflowHidden&&"\n overflow: hidden;\n "}));i.default.div.withConfig({displayName:"indexstyle__PaddingContainerStyle",componentId:"sc-15ofupc-1"})(["padding:","px;",""],2*l.iI,(function(t){return t.noPadding&&"\n padding: 0;\n "}))},4982:function(t,n,e){e.d(n,{O$:function(){return pt},Fk:function(){return vt}});var i=e(75582),r=e(12691),o=e.n(r),a=e(26304),u=e(21831),l=e(82394),c=e(82684),d=e(26226),s=e(84969),f=e(90948),h=e(65743),m=e(63588),p=e.n(m),v=e(75823),x=e(29989),g=e(62072),y=e(53989),b=e(49894),Z=e(18246),j=e(59309),k=["data","className","top","left","y","x0","x1","xScale","yScale","color","keys","value","order","offset","children"];function S(){return S=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},S.apply(this,arguments)}function w(t){var n=t.data,e=t.className,i=t.top,r=t.left,o=t.y,a=t.x0,u=void 0===a?g.l8:a,l=t.x1,d=void 0===l?g.xf:l,s=t.xScale,f=t.yScale,m=t.color,w=t.keys,L=t.value,T=t.order,M=t.offset,O=t.children,I=function(t,n){if(null==t)return{};var e,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)e=o[i],n.indexOf(e)>=0||(r[e]=t[e]);return r}(t,k),E=(0,v.Z)();w&&E.keys(w),L&&(0,b.Z)(E.value,L),T&&E.order((0,Z.ZP)(T)),M&&E.offset((0,j.ZP)(M));var R=E(n),Y=(0,y.Z)(f),D=R.map((function(t,n){var e=t.key;return{index:n,key:e,bars:t.map((function(n,i){var r=(s(d(n))||0)-(s(u(n))||0),a=s(u(n)),l="bandwidth"in f?f(o(n.data)):Math.max((f(o(n.data))||0)-r/2);return{bar:n,key:e,index:i,height:Y,width:r,x:a||0,y:l||0,color:m(t.key,i)}}))}}));return O?c.createElement(c.Fragment,null,O(D)):c.createElement(x.Z,{className:p()("visx-bar-stack-horizontal",e),top:i,left:r},D.map((function(t){return t.bars.map((function(n){return c.createElement(h.Z,S({key:"bar-stack-"+t.index+"-"+n.index,x:n.x,y:n.y,height:n.height,width:n.width,fill:n.color},I))}))})))}var L=e(79487),T=e(25976),M=e(61655),O=e(16853),I=e(65376),E=e(48072),R=e(24903),Y=e(84181),D=e(98677),P=e(30160),C=e(70987),_=e(79633),A=e(61896),N=e(70515),H=e(95363),F=e(28598),V=["height","width"];function z(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,i)}return e}function U(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?z(Object(e),!0).forEach((function(n){(0,l.Z)(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):z(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var B={bottom:5*N.iI,left:3*N.iI,right:20*N.iI,top:0},Q=function(t){return t.x},W=function(t){return t.y},X=(0,M.Z)((function(t){var n=t.data,e=t.height,i=t.hideTooltip,r=t.large,o=t.margin,a=void 0===o?{}:o,l=t.renderTooltipContent,d=t.showTooltip,m=t.tooltipData,p=t.tooltipLeft,v=t.tooltipOpen,g=t.tooltipTop,y=t.width,b=t.xAxisLabel,Z=t.xNumTicks,j=t.yLabelFormat,k=t.ySerialize,S=j;S||(S=function(t){return t.length>20?"".concat(t.substring(0,20),"..."):t});var M=r?A.iD:A.J5,N=(0,c.useContext)(T.ThemeContext),V=U(U({},B),a),z=n.slice(Math.max(0,n.length-50)),X=Object.keys(z[0]||[]).filter((function(t){return"x"===t})),G=(0,R.Z)({domain:X,range:[_.hM]}),$=(0,Y.Z)({domain:[0,Math.max.apply(Math,(0,u.Z)(z.map(Q)))],nice:!0}),J=(0,D.Z)({domain:z.map(W),padding:.35}),q={active:(null===N||void 0===N?void 0:N.content.default)||C.Z.content.default,backgroundPrimary:(null===N||void 0===N?void 0:N.chart.backgroundPrimary)||C.Z.chart.backgroundPrimary,backgroundSecondary:(null===N||void 0===N?void 0:N.chart.backgroundSecondary)||C.Z.chart.backgroundSecondary,muted:(null===N||void 0===N?void 0:N.content.muted)||C.Z.content.muted,primary:(null===N||void 0===N?void 0:N.chart.primary)||C.Z.chart.primary,tooltipBackground:(null===N||void 0===N?void 0:N.background.navigation)||C.Z.background.navigation},K=z.map(k),tt=Math.min(Math.max.apply(Math,(0,u.Z)(K.map((function(t){return String(t).length})))),20);6*tt>2*V.right?V.right+=5.5*tt:6*tt>=V.right&&(V.right+=3.75*tt);var nt=y-V.left-V.right,et=e-V.top-V.bottom;V.left+=7*tt,$.rangeRound([0,nt]),J.rangeRound([et,0]);var it=z.map(Q).length,rt=J(K[it-1]),ot=(0,c.useCallback)((function(t){var n=(0,E.Z)(t)||{x:0,y:0},e=n.x,i=n.y,r=1-(i-rt/2)/(et-rt),o=Math.floor(r*it),a=z[o];"undefined"===typeof a&&(a=z[o-1]),i>rt&&i<et-rt&&d({tooltipData:a,tooltipLeft:e,tooltipTop:i+V.top})}),[z,it,V.top,d,rt,et]);return y<10?null:(0,F.jsxs)("div",{children:[(0,F.jsxs)("svg",{height:e,width:y,children:[(0,F.jsx)(h.Z,{fill:"transparent",height:e-(V.top+V.bottom),onMouseLeave:function(){return i()},onMouseMove:ot,onTouchMove:ot,onTouchStart:ot,rx:14,width:y-V.left,x:V.left,y:0}),(0,F.jsxs)(x.Z,{left:V.left,top:V.top,children:[(0,F.jsx)(w,{color:G,data:z,height:et,keys:X,pointerEvents:"none",xScale:$,y:k,yScale:J,children:function(t){return t.map((function(t){return t.bars.map((function(n){return(0,F.jsx)("g",{children:(0,F.jsx)(F.Fragment,{children:(0,F.jsx)("rect",{fill:q.backgroundPrimary,height:n.height,pointerEvents:"none",rx:4,width:n.width,x:n.x,y:n.y})})},"barstack-horizontal-".concat(t.index,"-").concat(n.index))}))}))}}),(0,F.jsx)(s.Z,{hideTicks:!0,scale:J,stroke:q.muted,tickFormat:function(t){return S(t)},tickLabelProps:function(){return{fill:q.active,fontFamily:H.ry,fontSize:M,style:{width:"10px"},textAnchor:"end"}},tickStroke:q.muted,tickValues:K,top:2}),(0,F.jsx)(f.Z,{label:b,labelProps:{fill:q.muted,fontFamily:H.ry,fontSize:M,textAnchor:"middle"},numTicks:Z,scale:$,stroke:q.muted,tickLabelProps:function(){return{fill:q.active,fontFamily:H.ry,fontSize:M,textAnchor:"middle"}},tickStroke:q.muted,top:et})]}),m&&(0,F.jsx)("g",{children:(0,F.jsx)(L.Z,{from:{x:V.left,y:g},pointerEvents:"none",stroke:_.Ej,strokeDasharray:"5,2",strokeWidth:1,to:{x:nt+V.left,y:g}})})]}),v&&m&&(0,F.jsx)(O.Z,{left:p,style:U(U({},I.j),{},{backgroundColor:q.tooltipBackground}),top:g,children:(0,F.jsxs)(P.ZP,{black:!0,small:!0,children:[null===l||void 0===l?void 0:l(m),!l&&Q(m).toFixed(4)]})})]})}));var G,$,J,q,K=function(t){var n=t.height,e=t.width,i=(0,a.Z)(t,V);return(0,F.jsx)("div",{style:{height:n,width:"undefined"===typeof e?"100%":e},children:(0,F.jsx)(d.Z,{children:function(t){var n=t.width,e=t.height;return(0,F.jsx)(X,U(U({},i),{},{height:e,width:n}))}})})},tt=e(97618),nt=e(52729),et=e(48670),it=e(87862),rt=e(89370),ot=e(86735),at=(ot.Qj,ot.tS,ot.tS,ot.tS,ot.tS,ot.Qj,ot.Qj,ot.Qj,ot.tS,ot.tS,G={},(0,l.Z)(G,rt.RL.EMAIL,"domain_distribution"),(0,l.Z)(G,rt.RL.TEXT,"word_distribution"),(0,l.Z)(G,rt.RL.LIST,"element_distribution"),(0,l.Z)(G,"default","value_counts"),G),ut=[].concat((0,u.Z)(rt.P_),[rt.RL.TEXT,rt.RL.EMAIL,rt.RL.LIST]),lt=($={},(0,l.Z)($,rt.RL.EMAIL,"Domain distribution"),(0,l.Z)($,rt.RL.TEXT,"Word distribution"),(0,l.Z)($,rt.RL.LIST,"Element distribution"),(0,l.Z)($,"default","Distribution of values"),e(31353));!function(t){t.RANGE="range"}(J||(J={})),function(t){t.BAR_HORIZONTAL="bar_horizontal",t.LINE_CHART="line_chart",t.HISTOGRAM="histogram"}(q||(q={}));var ct=e(48888),dt=e(92083),st=e.n(dt),ft=e(81728);function ht(t,n){var e,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=i||{},o=r.calculateAnomaly,a=r.feature,l=r.getYValue,c=t.x,d=t.x_metadata,s=d.label,f=d.label_type,h=t.y,m=(null===h||void 0===h?void 0:h.map((function(t){return null===l||void 0===l?void 0:l(t)})))||[],p=Math.max.apply(Math,(0,u.Z)(m)),v=Math.max.apply(Math,(0,u.Z)(m)),x=(0,ot.Sm)(m),g=(0,ot.IN)(m),y=x/Math.max(1,m.length),b=n[s]||a,Z=null===b||void 0===b?void 0:b.columnType,j=rt.RL.DATETIME===Z,k=[],S=[],w=c.length,L=c.map((function(t,n){var i,r,a,u,l=t.label,c=t.max,d=t.min,s=h[n];if(J.RANGE===f)if(e||(e=c-d),u=rt.RL.NUMBER===Z&&e<=w)i=Number(d);else if(i=e/2+d,j){var b="M/D/YYYY",L="M/D/YYYY",T="M/D/YYYY";e<=1?(b=e<=.1?"H:mm:ss.SSS":"H:mm:ss",L="H:mm:ss.SSS",T="H:mm:ss.SSS"):e<=60?(b="H:mm",L="H:mm:ss",T="H:mm:ss"):e<=3600?(b="H:mm",L="M/D/YYYY H:mm",T="H:mm"):e<=86400&&(L="M/D/YYYY H:mm",T="M/D/YYYY H:mm"),i=st().unix(i).format(b),r=st().unix(d).format(L),a=st().unix(c).format(T)}else i=(0,ft.QV)(i);else i=l;var M=n>=1?h[n-1]:null,O=!1;o&&(O=o({x:t,y:s,yPrevious:M,yValues:m,yValuesAverage:y,yValuesMax:p,yValuesMin:v,yValuesStandardDeviation:g,yValuesSum:x}));var I={hideRange:u,isUnusual:O,x:t,xLabel:i,xLabelMax:a,xLabelMin:r,y:s};return O&&(u?S.push(I):k.push(I)),I}));return{distribution:{data:L,featureUUID:s},rangedWithUnusualDistribution:(0,ot.YC)(k,(function(t){var n=t.y;return l(n)}),{ascending:!1}),unusualDistribution:(0,ot.YC)(S,(function(t){var n=t.y;return l(n)}),{ascending:!1})}}var mt=e(40489);var pt=12*N.iI;function vt(t){var n=t.columnTypes,e=t.columns,r=t.insightsByFeatureUUID,a=t.insightsOverview,u=t.noColumnLinks,l=void 0!==u&&u,c=t.statistics;return function(t,u,d){var s=d.width,f=e[u],h=n[f],m=lt.T5[h],p=(r[f]||{}).charts,v=a.time_series,x=e.filter((function(t){return n[t]===rt.RL.DATETIME})),g=null===v||void 0===v?void 0:v.map((function(t){return ht(t,{},{feature:{columnType:h,uuid:f}}).distribution})),y={};null===g||void 0===g||g.forEach((function(t,n){var e=t.data;y[x[n]]=(0,F.jsx)(nt.Z,{data:e.map((function(t){var n=t.x,e=t.xLabel,i=t.xLabelMax,r=t.xLabelMin;return[e,t.y.count,r,i,n.min,n.max]})),height:pt,large:!0,margin:{bottom:0,left:0,right:0,top:0},renderTooltipContent:function(t){var n=(0,i.Z)(t,4),e=n[1],r=n[2],o=n[3];return(0,F.jsxs)("p",{children:["Rows: ",e,(0,F.jsx)("br",{}),"Start: ",r,(0,F.jsx)("br",{}),"End: ",o]})},sortData:function(t){return(0,ot.YC)(t,"[4]")}},f)}));var b,Z=null===p||void 0===p?void 0:p.find((function(t){var n=t.type;return q.HISTOGRAM===n})),j=(Z?ht(Z,{},{feature:{columnType:h,uuid:f},getYValue:function(t){return t.value}}):{}).distribution,k=void 0===j?null:j,S=at[h]||at.default,w=null===c||void 0===c?void 0:c["".concat(f,"/").concat(S)],L=Object.entries(w||{}).map((function(t){var n=(0,i.Z)(t,2),e=n[0];return{x:n[1],y:e}})),T=rt.RL.TRUE_OR_FALSE===h;if(rt.RL.DATETIME===h)b=y[f];else if(k&&!T)b=(0,F.jsx)(nt.Z,{data:k.data.map((function(t){var n=t.hideRange,e=t.isUnusual,i=t.x;return[t.xLabel,t.y.value,i.min,i.max,e,n]})),height:pt,margin:{bottom:0,left:0,right:0,top:0},renderTooltipContent:function(t){var n=(0,i.Z)(t,6),e=n[1],r=n[2],o=n[3],a=n[5];return(0,F.jsxs)("p",{children:[a&&(0,F.jsxs)(F.Fragment,{children:["Rows: ",e,(0,F.jsx)("br",{}),"Value: ",r]}),!a&&(0,F.jsxs)(F.Fragment,{children:["Rows: ",e,(0,F.jsx)("br",{}),"Range: ",r," - ",o]})]})},sortData:function(t){return(0,ot.YC)(t,"[2]")},width:s-2*N.iI});else if(ut.includes(h)){var M=(0,ot.YC)((0,ot.YC)(L,"x",{ascending:!1}).slice(0,5),"x");b=(0,F.jsx)(K,{data:M,height:pt,margin:{bottom:0,left:0,right:20,top:0},renderTooltipContent:function(t){var n=t.x,e=t.y;return"".concat(e," appears ").concat((0,ft.x6)(n)," times")},xNumTicks:2,ySerialize:function(t){return t.y}})}else T&&w&&(b=(0,F.jsx)(it.Z,{data:Object.entries(w),getX:function(t){var n=(0,i.Z)(t,2),e=n[0],r=n[1];return"".concat(e," (").concat((0,ft.x6)(r),")")},getY:function(t){return(0,i.Z)(t,2)[1]},height:pt}));return(0,F.jsxs)("div",{style:{padding:N.iI},children:[(0,F.jsxs)("div",{style:{alignItems:"center",display:"flex",marginBottom:N.iI},children:[m&&(0,F.jsx)(tt.Z,{title:rt.Rp[h],children:(0,F.jsx)(m,{size:2*N.iI})}),(0,F.jsx)("div",{style:{marginLeft:.5*N.iI,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:s-4.5*N.iI},children:l?(0,F.jsx)(P.ZP,{bold:!0,default:!0,title:e[u],children:e[u]}):(0,F.jsx)(o(),{as:(0,mt.o_)(ct.oE,u),href:"/datasets/[...slug]",passHref:!0,children:(0,F.jsx)(et.Z,{bold:!0,monospace:!0,secondary:!0,small:!0,title:e[u],children:e[u]})})})]}),b,!b&&(0,F.jsx)("div",{style:{height:pt}})]})}}},9134:function(t,n,e){var i=e(82684),r=e(21124),o=e(68432),a=e(25976),u=e(65292),l=e(44897),c=e(95363),d=e(70515),s=e(28598);n.Z=function(t){var n=t.language,e=t.maxWidth,f=t.showLineNumbers,h=t.small,m=t.source,p=t.wrapLines,v=(0,i.useContext)(a.ThemeContext);function x(t){var i=t.value;return(0,s.jsx)(o.Z,{customStyle:{backgroundColor:(v.background||l.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:c.Vp,fontSize:h?12:14,marginBottom:0,marginTop:0,maxWidth:e,paddingBottom:2*d.iI,paddingTop:2*d.iI},language:n,lineNumberStyle:{color:(v.content||l.Z.content).muted},showLineNumbers:f,style:u._4,useInlineStyles:!0,wrapLines:p,children:i})}return(0,s.jsx)(r.D,{components:{code:function(t){var n=t.children;return(0,s.jsx)(x,{value:n})}},children:m})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9440],{39440:function(e,n,t){t.d(n,{Z:function(){return he}});var o=t(21831),i=t(82394),l=t(75582),r=t(65701),u=t(1254),c=t(82684),a=t(69864),d=t(10975),s=t(14567),f=t(47041),h=t(70515),v=t(28598),m=3*h.iI;var p=function(e){e.blockLayoutItem;var n=e.buildChart,t=e.height,o=e.width,i=(0,c.useMemo)((function(){return t-(f.nn+m)}),[t]),l=(0,c.useMemo)((function(){return null===n||void 0===n?void 0:n({height:i,width:o})}),[n,i,o]);return(0,v.jsx)(v.Fragment,{children:l})},x=t(75399),g=t(71180),b=t(4006),j=t(97618),y=t(55485),Z=t(46732),k=t(72473),_=t(25976),C=t(44897),P=t(42631),I=3*h.iI,w=_.default.div.withConfig({displayName:"indexstyle__DividerStyle",componentId:"sc-17acf36-0"})(["display:flex;position:relative;",";",";"],(function(e){return!e.horizontal&&"\n height: 100%;\n justify-content: center;\n width: ".concat(I,"px;\n ")}),(function(e){return e.horizontal&&"\n align-items: center;\n height: ".concat(I,"px;\n margin-left: ").concat(I,"px;\n margin-right: ").concat(I,"px;\n width: calc(100% - ").concat(2*I,"px);\n ")})),O=_.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-17acf36-1"})(["border-radius:","px;"," ",";",";"],P.Ro,(function(e){return"\n background-color: ".concat((e.theme||C.Z).accent.blueLight,";\n ")}),(function(e){return!e.horizontal&&"\n height: 100%;\n width: ".concat(.5*h.iI,"px;\n ")}),(function(e){return e.horizontal&&"\n height: ".concat(.5*h.iI,"px;\n width: 100%;\n ")})),S=_.default.a.withConfig({displayName:"indexstyle__ButtonStyle",componentId:"sc-17acf36-2"})(["align-items:center;border-radius:50%;display:flex;height:","px;justify-content:center;position:absolute;width:","px;"," ",";",";"],3*h.iI,3*h.iI,(function(e){return"\n background-color: ".concat((e.theme||C.Z).background.page,";\n border: ").concat(P.mP,"px solid ").concat((e.theme||C.Z).accent.blueLight,";\n box-shadow:\n 0 0 0 ").concat(P.mP,"px ").concat((e.theme||C.Z).background.page,";\n\n &:hover {\n background-color: ").concat((e.theme||C.Z).interactive.linkPrimary,";\n border: ").concat(P.mP,"px solid ").concat((e.theme||C.Z).interactive.linkPrimary,";\n cursor: pointer;\n }\n ")}),(function(e){return!e.horizontal&&"\n top: ".concat(3*h.iI,"px;\n ")}),(function(e){return e.horizontal&&"\n left: ".concat(3*h.iI,"px;\n ")}));var M=function(e){var n=e.horizontal,t=e.onClickAdd,o=(0,c.useState)(!1),i=o[0],l=o[1];return(0,v.jsx)(w,{horizontal:n,onMouseEnter:function(){return l(!0)},onMouseLeave:function(){return l(!1)},children:i&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(S,{horizontal:n,href:"#",onClick:function(e){e.preventDefault(),null===t||void 0===t||t()},children:(0,v.jsx)(k.Add,{size:2*h.iI})}),(0,v.jsx)(O,{horizontal:n})]})})},E=t(38276),L=t(4190),N=t(30160),R=t(17488),D=t(35686),B=2*(P.YF+h.cd*h.iI)+I,U=_.default.div.withConfig({displayName:"indexstyle__ItemStyle",componentId:"sc-rcft6g-0"})(["border-radius:","px;padding:","px;",""],P.Ro,h.cd*h.iI,(function(e){return"\n border: ".concat(P.YF,"px ").concat(P.M8," ").concat((e.theme||C.Z).interactive.defaultBorder,";\n background-color: ").concat((e.theme||C.Z).background.chartBlock,";\n ")})),H=t(35058),A=t(23780);function F(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function W(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?F(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):F(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var q=function(e){var n,t,o=e.block,r=e.blockLayoutItem,u=void 0===r?null:r,a=e.blockUUID,f=e.columnIndex,m=e.columnLayoutSettings,_=e.columnsInRow,C=e.createNewBlockItem,P=e.detail,w=e.disableDrag,O=e.first,S=e.height,F=e.isLoading,q=e.onDrop,z=e.onSave,T=e.pageBlockLayoutUUID,J=e.removeBlockLayoutItem,K=e.rowIndex,V=e.setSelectedBlockItem,Y=e.updateLayout,G=e.width,X=(0,c.useRef)(null),Q=(0,c.useState)(!1),$=Q[0],ee=Q[1],ne=(0,c.useState)(!1),te=ne[0],oe=ne[1],ie=(0,c.useState)(!1),le=ie[0],re=ie[1],ue=(0,c.useState)(m)[0],ce=(0,c.useState)(null),ae=ce[0],de=ce[1],se=(0,c.useMemo)((function(){return u||ae}),[u,ae]),fe=(0,c.useState)(null),he=fe[0],ve=fe[1],me=(0,c.useMemo)((function(){return(null===se||void 0===se?void 0:se.data)||he}),[se,he]),pe=(0,A.VI)(null,{},[],{uuid:"BlockLayoutItem/".concat(T,"/").concat(a)}),xe=(0,l.Z)(pe,1)[0],ge=(0,c.useMemo)((function(){var e,n=null===se||void 0===se||null===(e=se.data_source)||void 0===e?void 0:e.refresh_interval;return n?Math.max(n,1e3):n}),[se]),be=D.ZP.block_layout_items.page_block_layouts.detail(!u&&encodeURIComponent(T),!u&&encodeURIComponent(a),{},{refreshInterval:ge,revalidateOnFocus:!ge}).data;(0,c.useEffect)((function(){null!==be&&void 0!==be&&be.error&&xe({response:be})}),[be,xe]),(0,c.useEffect)((function(){se||(o?de(o):null!==be&&void 0!==be&&be.block_layout_item&&de(null===be||void 0===be?void 0:be.block_layout_item))}),[o,se,be]),(0,c.useEffect)((function(){var e,n;null!==be&&void 0!==be&&null!==(e=be.block_layout_item)&&void 0!==e&&e.data&&ve(null===be||void 0===be||null===(n=be.block_layout_item)||void 0===n?void 0:n.data)}),[null===be||void 0===be||null===(n=be.block_layout_item)||void 0===n?void 0:n.data]);var je=(0,c.useCallback)((function(e){var n,t=e.height,o=e.width;if(!me)return null;var l=null===me||void 0===me?void 0:me.render;if(l){var r=null===me||void 0===me?void 0:me.render_type;if(x.hN.JPEG===r||x.hN.JPG===r)return(0,v.jsx)("img",{height:t,src:"data:image/jpeg;base64,".concat(l),width:o});if(x.hN.PNG===r)return(0,v.jsx)("img",{height:t,src:"data:image/png;base64,".concat(l),width:o});if(x.hN.HTML===r)return(0,v.jsx)("iframe",{srcdoc:l,style:{height:t,width:o}})}return(0,v.jsx)(b.Z,{block:W(W({},se),{},{configuration:W(W({},null===se||void 0===se?void 0:se.configuration),{},(0,i.Z)({},H.JJ,t))}),data:me,width:o,xAxisLabel:null===se||void 0===se||null===(n=se.configuration)||void 0===n?void 0:n.x_axis_label})}),[se,me]),ye=(0,d.c)((function(){return{collect:function(e){return{isDragging:!!e.isDragging()}},item:{blockLayoutItem:se,columnIndex:f,rowIndex:K},type:"BlockLayoutItem"}}),[se,f,K]),Ze=(0,l.Z)(ye,2),ke=Ze[0],_e=Ze[1],Ce=(0,s.L)((function(){return{accept:"BlockLayoutItem",drop:function(e){return null===q||void 0===q?void 0:q(e)}}}),[q]),Pe=(0,l.Z)(Ce,2)[1];return P?(0,v.jsx)(p,{blockLayoutItem:se,buildChart:je,height:S,width:G}):(0,v.jsxs)(v.Fragment,{children:[O&&(0,v.jsx)(M,{onClickAdd:function(){return C({columnIndex:f,rowIndex:K})}}),(0,v.jsx)(j.Z,{flex:1,flexDirection:"column",children:(0,v.jsx)("div",{onMouseEnter:function(){return re(!0)},onMouseLeave:function(){return re(!1)},ref:Pe,children:(0,v.jsxs)(U,W(W({},ke),{},{ref:w?null:_e,children:[(0,v.jsx)(E.Z,{mb:1,children:(0,v.jsxs)(y.ZP,{alignContent:"center",justifyContent:"space-between",children:[(0,v.jsx)(E.Z,{py:1,children:(0,v.jsx)(N.ZP,{bold:!0,default:!0,children:(null===se||void 0===se?void 0:se.name)||a})}),(0,v.jsx)("div",{children:(0,v.jsx)(Z.Z,{items:[{label:function(){return"Edit content"},onClick:function(){return null===V||void 0===V?void 0:V(se)},uuid:"Edit content"},{label:function(){return"Change height and/or width"},onClick:function(){return oe(!0)},uuid:"Change"},{label:function(){return"Remove chart"},onClick:function(){return null===J||void 0===J?void 0:J()},uuid:"Remove chart"}],onClickCallback:function(){return ee(!1)},onClickOutside:function(){return ee(!1)},open:$,parentRef:X,rightOffset:0,uuid:"BlockLayoutItem/".concat(a),children:(le||$)&&(0,v.jsx)(g.ZP,{disabled:F,iconOnly:!0,loading:F,noBackground:!0,onClick:function(){ee(!0)},children:(0,v.jsx)(k.Ellipsis,{default:!0,size:2*h.iI})})})})]})}),te&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(y.ZP,{alignItems:"center",fullWidth:!0,children:[(0,v.jsxs)(j.Z,{flex:1,flexDirection:"column",children:[(0,v.jsx)(N.ZP,{bold:!0,muted:!0,small:!0,children:"Width (flex box)"}),(0,v.jsx)(R.Z,{compact:!0,fullWidth:!0,onChange:function(e){return null===Y||void 0===Y?void 0:Y(W(W({},m),{},{width:"undefined"!==typeof e.target.value?Number(e.target.value):e.target.value}))},primary:!0,setContentOnMount:!0,small:!0,type:"number",value:(null===m||void 0===m?void 0:m.width)||""})]}),(0,v.jsx)(E.Z,{mr:1}),(0,v.jsxs)(j.Z,{flex:1,flexDirection:"column",children:[(0,v.jsx)(N.ZP,{bold:!0,muted:!0,small:!0,children:"Max width (%)"}),(0,v.jsx)(R.Z,{compact:!0,fullWidth:!0,label:"Max width percentage",onChange:function(e){return null===Y||void 0===Y?void 0:Y(W(W({},m),{},{max_width_percentage:"undefined"!==typeof e.target.value?Number(e.target.value):e.target.value}))},primary:!0,setContentOnMount:!0,small:!0,type:"number",value:(null===m||void 0===m?void 0:m.max_width_percentage)||""})]}),(0,v.jsx)(E.Z,{mr:1}),(0,v.jsxs)(j.Z,{flex:1,flexDirection:"column",children:[(0,v.jsx)(N.ZP,{bold:!0,muted:!0,small:!0,children:"Height (pixels)"}),(0,v.jsx)(R.Z,{compact:!0,fullWidth:!0,onChange:function(e){return null===Y||void 0===Y?void 0:Y(W(W({},m),{},{height:"undefined"!==typeof e.target.value?Number(e.target.value):e.target.value}))},primary:!0,setContentOnMount:!0,small:!0,type:"number",value:(null===m||void 0===m?void 0:m.height)||""})]})]}),(0,v.jsx)(E.Z,{mt:h.cd,children:(0,v.jsxs)(y.ZP,{alignItems:"center",justifyContent:"flex-end",children:[(0,v.jsx)(g.ZP,{compact:!0,onClick:function(){null===z||void 0===z||z(),oe(!1)},primary:!0,small:!0,children:"Save"}),(0,v.jsx)(E.Z,{mr:1}),(0,v.jsx)(g.ZP,{compact:!0,onClick:function(){oe(!1),null===Y||void 0===Y||Y(ue)},small:!0,children:"Cancel"})]})})]}),!be&&!me&&(0,v.jsx)(L.Z,{inverted:!0}),me&&je({height:S||(null===se||void 0===se||null===(t=se.configuration)||void 0===t?void 0:t[H.JJ]),width:G-(B+1)-(_?I/_:0)})]}))})}),(0,v.jsx)(M,{onClickAdd:function(){return C({columnIndex:f+1,rowIndex:K})}})]})},z=t(44425),T=t(54750),J=t(31882),K=t(10305),V=t(44085),Y=t(85108),G=t(81728),X=t(86735);function Q(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function $(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Q(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Q(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ee=function(e){var n=e.block,t=e.updateConfiguration,o=n||{},r=o.data,u=o.configuration,a=(u||{}).chart_type,d=(r||{}).columns,s=Y.G8[a],f=(0,c.useMemo)((function(){return Object.entries(s||{}).reduce((function(e,n){var o=(0,l.Z)(n,2),r=o[0],c=o[1];return $($({},e),{},(0,i.Z)({},r,c.map((function(e){var n,o=e.autoRun,l=e.label,r=e.monospace,c=e.options,a=e.settings,s=void 0===a?{}:a,f=e.type,h=e.uuid,m={fullWidth:!0,key:h,label:(0,G.kC)(l()),monospace:r,onChange:function(e){return t((0,i.Z)({},h,e.target.value),{autoRun:o})},value:(null===u||void 0===u?void 0:u[h])||""};if(Y.VR.COLUMNS===f){var p=u[h]||[];n=(0,v.jsxs)(v.Fragment,{children:[(!s.maxValues||p.length<s.maxValues)&&(0,v.jsx)(V.Z,$($({},m),{},{onChange:function(e){var n=u[h]||[],l=e.target.value;n.includes(l)?n=(0,X.Od)(n,(function(e){return e===l})):n.push(l),t((0,i.Z)({},h,n),{autoRun:o})},value:null,children:(0,X.YC)((d||[]).filter((function(e){return!p.includes(e)})),(function(e){return e})).map((function(e){return(0,v.jsx)("option",{value:e,children:e},e)}))})),p.map((function(e){return(0,v.jsx)("div",{style:{display:"inline-block",marginRight:2,marginTop:2},children:(0,v.jsx)(J.Z,{label:e,onClick:function(){t((0,i.Z)({},h,(0,X.Od)(p,(function(n){return n===e}))),{autoRun:o})}})},e)}))]})}else if(Y.VR.METRICS===f){var x=u[h]||[];n=(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(N.ZP,{bold:!0,children:"Metrics"}),(0,v.jsx)(N.ZP,{muted:!0,small:!0,children:"Select a column and an aggregation function."}),(0,v.jsxs)(K.Z,{onChange:function(e,n){var l=n.resetValues,r=n.setValues;2===e.filter((function(e){return!!e})).length&&(x.find((function(n){var t=n.aggregation;return n.column===e[1]&&t===e[0]}))||(t((0,i.Z)({},h,x.concat({aggregation:e[0],column:e[1]})),{autoRun:o}),r([null,null]),l()))},children:[(0,v.jsx)(V.Z,$($({},m),{},{label:"aggregation",children:(0,X.YC)(H.bn,(function(e){return e})).map((function(e){return(0,v.jsx)("option",{value:e,children:e},e)}))})),(0,v.jsx)(V.Z,$($({},m),{},{label:"column",children:(0,X.YC)(d||[],(function(e){return e})).map((function(e){return(0,v.jsx)("option",{value:e,children:e},e)}))}))]}),x.map((function(e){var n=e.aggregation,l=e.column;return(0,v.jsx)("div",{style:{display:"inline-block",marginRight:2,marginTop:2},children:(0,v.jsx)(J.Z,{label:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(N.ZP,{inline:!0,monospace:!0,children:[n,"("]}),l,(0,v.jsx)(N.ZP,{inline:!0,monospace:!0,children:")"})]}),onClick:function(){t((0,i.Z)({},h,(0,X.Od)(x,(function(e){var t=e.aggregation,o=e.column;return n===t&&l===o}))),{autoRun:o})}})},"".concat(n,"(").concat(l,")"))}))]})}else n=c?(0,v.jsx)(V.Z,$($({},m),{},{children:c.map((function(e){return(0,v.jsx)("option",{value:e,children:e},e)}))})):(0,v.jsx)(R.Z,$($({},m),{},{type:f}));return(0,v.jsx)(E.Z,{mb:1,children:n},h)}))))}),{noCode:[]})}),[d,u,s,t]),h=(f.code,f.noCode);return(0,v.jsx)(v.Fragment,{children:h})},ne=t(89083),te=t(15338),oe=t(85854),ie=t(48670),le=t(62547),re=t(2842),ue=t(53808),ce=t(42122),ae=t(72619),de=t(19183);function se(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function fe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?se(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):se(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var he=function(e){var n,t=e.leftOffset,d=e.pageBlockLayoutTemplate,s=e.topOffset,m=e.uuid,p=(0,A.VI)(null,{},[],{uuid:"BlockLayout/".concat(m)}),b=(0,l.Z)(p,1)[0],Z=(0,c.useState)({}),_=(Z[0],Z[1],(0,c.useState)(null)),C=_[0],P=_[1],I=(0,c.useState)(!1),w=(I[0],I[1],(0,c.useRef)(null),"block_layout_after_width_".concat(m)),O="block_layout_before_width_".concat(m),S=(0,c.useRef)(null),B=(0,c.useState)((0,ue.U2)(w,40*h.iI)),U=B[0],F=B[1],W=(0,c.useState)(!1),J=W[0],K=W[1],Y=(0,c.useState)(Math.max((0,ue.U2)(O),50*h.iI)),Q=Y[0],$=Y[1],se=(0,c.useState)(!1),he=se[0],ve=se[1],me=(0,c.useRef)(null),pe=(0,de.i)(),xe=(0,c.useState)(null),ge=xe[0],be=xe[1],je=(0,c.useState)(null),ye=je[0],Ze=je[1],ke=(0,c.useMemo)((function(){var e;return null===ge||void 0===ge||null===(e=ge.data_source)||void 0===e?void 0:e.refresh_interval}),[ge]),_e=D.ZP.block_layout_items.page_block_layouts.detail(ge&&encodeURIComponent(m),ge&&encodeURIComponent(null===ge||void 0===ge?void 0:ge.uuid),{configuration_override:encodeURIComponent(JSON.stringify((null===C||void 0===C?void 0:C.configuration)||"")),data_source_override:encodeURIComponent(JSON.stringify((null===C||void 0===C?void 0:C.data_source)||""))},{refreshInterval:ke,revalidateOnFocus:!ke}),Ce=_e.data,Pe=_e.mutate,Ie=(0,c.useMemo)((function(){return null===Ce||void 0===Ce?void 0:Ce.block_layout_item}),[Ce]);(0,c.useEffect)((function(){var e;null!==Ie&&void 0!==Ie&&null!==(e=Ie.data)&&void 0!==e&&e.error&&b({response:null===Ie||void 0===Ie?void 0:Ie.data})}),[Ie,b]);var we=(0,c.useCallback)((function(e){Pe(),P(e)}),[Pe,P]),Oe=(0,c.useCallback)((function(e){we((function(n){var t=fe({},e);return"undefined"===typeof(null===t||void 0===t?void 0:t.name_new)&&(t.name_new=null===t||void 0===t?void 0:t.name),t})),be(e)}),[we,be]),Se=D.ZP.page_block_layouts.detail(encodeURIComponent(m)).data,Me=(0,c.useState)(null),Ee=Me[0],Le=Me[1],Ne=(0,c.useMemo)((function(){return null===Ee||void 0===Ee?void 0:Ee.layout}),[Ee]),Re=(0,c.useCallback)((function(e){Le((function(n){return fe(fe({},n),{},{layout:e})}))}),[Le]);(0,c.useEffect)((function(){null!==Se&&void 0!==Se&&Se.page_block_layout&&Le(null===Se||void 0===Se?void 0:Se.page_block_layout)}),[Se]);var De=(0,a.Db)(D.ZP.page_block_layouts.useUpdate(encodeURIComponent(m)),{onSuccess:function(e){return(0,ae.wD)(e,{callback:function(e){var n=e.page_block_layout,t=n.blocks;Le(n);var o=Object.values(t).find((function(e){return e.name===(null===C||void 0===C?void 0:C.name_new)}));o&&Oe(o),Ze(null),Pe()},onErrorCallback:function(e,n){return b({errors:n,response:e})}})}}),Be=(0,l.Z)(De,2),Ue=Be[0],He=Be[1].isLoading,Ae=(0,c.useCallback)((function(e){return Ue({page_block_layout:{blocks:fe(fe({},null===Ee||void 0===Ee?void 0:Ee.blocks),{},(0,i.Z)({},null===e||void 0===e?void 0:e.uuid,(0,ce.gR)(e,["data"]))),layout:null===Ee||void 0===Ee?void 0:Ee.layout}})}),[Ee,Ue]),Fe=(0,c.useCallback)((function(){return Ue({page_block_layout:{blocks:null===Ee||void 0===Ee?void 0:Ee.blocks,layout:null===Ee||void 0===Ee?void 0:Ee.layout}})}),[Ee,Ue]),We=(0,c.useMemo)((function(){return null===Ee||void 0===Ee?void 0:Ee.blocks}),[Ee]),qe=(0,c.useCallback)((function(e,n,t){var i=(0,o.Z)(Ne);i[e][n]=t,Re(i)}),[Ne,Re]),ze=(0,c.useState)(null),Te=ze[0],Je=ze[1],Ke=(0,c.useState)(null),Ve=Ke[0],Ye=Ke[1];(0,c.useEffect)((function(){var e;null===S||void 0===S||!S.current||J||he||Je(null===S||void 0===S||null===(e=S.current)||void 0===e?void 0:e.getBoundingClientRect())}),[J,he,S,ge,pe]),(0,c.useEffect)((function(){var e;null!==me&&void 0!==me&&me.current&&Ye(null===me||void 0===me||null===(e=me.current)||void 0===e?void 0:e.getBoundingClientRect())}),[me,ge,pe]),(0,c.useEffect)((function(){J||(0,ue.t8)(w,U)}),[J,U,w]),(0,c.useEffect)((function(){he||(0,ue.t8)(O,Q)}),[he,Q,O]);var Ge=(0,c.useCallback)((function(e,n,t){var i=fe({},null===Ee||void 0===Ee?void 0:Ee.blocks);null===i||void 0===i||delete i[e];var l=(0,o.Z)(null===Ee||void 0===Ee?void 0:Ee.layout),r=l[n]||[],u=(0,X.oM)(r,t);0===(null===u||void 0===u?void 0:u.length)?l=(0,X.oM)(l,n):l[n]=u,Ze(e),Ue({page_block_layout:{blocks:i,layout:l}})}),[Ee,Ue]),Xe=(0,c.useCallback)((function(e,n,t,i){var l=(0,o.Z)(Ne||[]),r=l[e]||[],u=r[n];if(e===t&&n!==i){var c=(0,X.oM)(r,n);l[e]=(0,X.Hk)(u,i>n?i:i-1,c)}else{var a=(0,X.oM)(r,n);l[e]=a;var d=(0,X.Hk)(u,i,l[t]);l[t]=d,0===(null===a||void 0===a?void 0:a.length)&&(l=(0,X.oM)(l,e))}e===t&&n===i||Ue({page_block_layout:{blocks:null===Ee||void 0===Ee?void 0:Ee.blocks,layout:l}})}),[Ne,Ee,Ue]),Qe=(0,c.useCallback)((function(e){var n=(0,G.Y6)(),t={name:n,type:z.tf.CHART,uuid:(0,G.kE)(n)},l=(0,o.Z)(Ne||[]),r={block_uuid:t.uuid,width:1};if(e){var u=e||{},c=u.columnIndex,a=void 0===c?0:c,d=u.rowIndex,s=u.rowIndexInsert;"undefined"!==typeof s?l=(0,X.Hk)([r],s,l):l[d]=(0,X.Hk)(r,a,l[d])}else l.push([r]);Ue({page_block_layout:{blocks:fe(fe({},null===Ee||void 0===Ee?void 0:Ee.blocks),{},(0,i.Z)({},t.uuid,t)),layout:l}}),Oe(t)}),[Ne,Ee,Oe,Ue]),$e=(0,c.useMemo)((function(){var e=[];return null===Ne||void 0===Ne||Ne.forEach((function(n,t){var o=[],i=(0,X.Sm)(null===n||void 0===n?void 0:n.map((function(e){return e.width||0})));n.forEach((function(e,l){var r=e.block_uuid,u=e.height,c=e.max_width_percentage,a=e.width,d=null===We||void 0===We?void 0:We[r],s="undefined"!==typeof c&&null!==c?c>=0?c/100:c:null,h=a/i,p=s&&h>s?s:h,x=(null===Te||void 0===Te?void 0:Te.width)-f.nn;o.push((0,v.jsx)(j.Z,{flexBasis:"".concat(Math.floor(100*p),"%"),children:(0,v.jsx)(q,{block:d,blockUUID:r,columnIndex:l,columnLayoutSettings:e,columnsInRow:null===n||void 0===n?void 0:n.length,createNewBlockItem:Qe,first:0===l,height:u,isLoading:ye===r&&He,onDrop:function(e){var n=e.columnIndex,o=e.rowIndex;Xe(o,n,t,l)},onSave:Fe,pageBlockLayoutUUID:m,removeBlockLayoutItem:function(){return Ge(r,t,l)},rowIndex:t,setSelectedBlockItem:Oe,updateLayout:function(e){return qe(t,l,e)},width:Math.floor(p*x)})},"row-".concat(t,"-column-").concat(l,"-").concat(r)))})),0===t&&e.push((0,v.jsx)(M,{horizontal:!0,onClickAdd:function(){return Qe({rowIndexInsert:t})}},"layout-divider-".concat(t,"-top"))),e.push((0,v.jsx)(y.ZP,{children:o},"row-".concat(t))),e.push((0,v.jsx)(M,{horizontal:!0,onClickAdd:function(){return Qe({rowIndexInsert:t+1})}},"layout-divider-".concat(t,"-bottom")))})),e}),[We,Te,Qe,ye,He,Ne,Xe,Ge,Fe,Oe,qe,m]),en=(0,c.useMemo)((function(){return Se&&0===(null===Ne||void 0===Ne?void 0:Ne.length)}),[Se,Ne]),nn=(0,c.useMemo)((function(){return(0,v.jsx)(y.ZP,{justifyContent:"center",children:(0,v.jsxs)(E.Z,{my:3*h.HN,px:h.cd,children:[(0,v.jsxs)(E.Z,{mb:h.Mq,children:[(0,v.jsx)(E.Z,{mb:1,children:(0,v.jsx)(oe.Z,{center:!0,children:"Create a custom dashboard"})}),(0,v.jsx)(N.ZP,{center:!0,default:!0,children:"Add customizable charts with the exact insights you need."}),d&&(0,v.jsx)(N.ZP,{center:!0,default:!0,children:"Start with a recommended set or freely define your own."})]}),(0,v.jsxs)(y.ZP,{alignContent:"center",justifyContent:"center",children:[d&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(g.ZP,{onClick:function(){return Ue({page_block_layout:d})},primary:!0,children:"Add recommended charts"}),(0,v.jsx)(E.Z,{mr:1})]}),(0,v.jsx)(g.ZP,{onClick:function(){return Qe()},primary:!d,secondary:!!d,children:"Create new chart"})]})]})})}),[Qe,d,Ue]),tn=(0,c.useMemo)((function(){return(null===Te||void 0===Te?void 0:Te.height)-(null===Ve||void 0===Ve?void 0:Ve.height)}),[Te,Ve]),on=(0,c.useMemo)((function(){return!ge}),[ge]),ln=D.ZP.pipelines.detail(null===C||void 0===C||null===(n=C.data_source)||void 0===n?void 0:n.pipeline_uuid).data,rn=(0,c.useMemo)((function(){return null===ln||void 0===ln?void 0:ln.pipeline}),[ln]),un=(0,c.useMemo)((function(){return(0,X.YC)((null===rn||void 0===rn?void 0:rn.blocks)||[],"uuid")}),[rn]),cn=D.ZP.pipelines.list().data,an=(0,c.useMemo)((function(){return(0,X.YC)((null===cn||void 0===cn?void 0:cn.pipelines)||[],"uuid")}),[cn]),dn=D.ZP.pipeline_schedules.pipelines.list(null===rn||void 0===rn?void 0:rn.uuid).data,sn=(0,c.useMemo)((function(){return null===dn||void 0===dn?void 0:dn.pipeline_schedules}),[dn]),fn=(0,c.useMemo)((function(){return fe(fe(fe({},ge),C),{},{data:fe(fe(fe({},null===ge||void 0===ge?void 0:ge.data),null===C||void 0===C?void 0:C.data),null===Ie||void 0===Ie?void 0:Ie.data)})}),[Ie,C,ge]),hn=(0,c.useMemo)((function(){var e,n,t,o,i,l,r,u,c,a,d,f,m;return on?null:(0,v.jsxs)("div",{style:{paddingBottom:h.Mq*h.iI,paddingTop:"undefined"===typeof s?re.Wi:0},children:[(0,v.jsxs)(E.Z,{mt:h.Mq,px:h.cd,children:[(0,v.jsxs)(E.Z,{mb:1,children:[(0,v.jsx)(N.ZP,{bold:!0,children:"Chart name"}),(0,v.jsx)(N.ZP,{muted:!0,small:!0,children:"Human readable name for your chart."})]}),(0,v.jsx)(R.Z,{onChange:function(e){return we((function(n){return fe(fe({},n),{},{name_new:e.target.value})}))},placeholder:"Type name for chart...",primary:!0,setContentOnMount:!0,value:(null===C||void 0===C?void 0:C.name_new)||""})]}),(0,v.jsxs)(E.Z,{mt:h.Mq,px:h.cd,children:[(0,v.jsxs)(E.Z,{mb:1,children:[(0,v.jsx)(N.ZP,{bold:!0,children:"Chart type"}),(0,v.jsx)(N.ZP,{muted:!0,small:!0,children:"Choose how you want to display your data."})]}),(0,v.jsx)(V.Z,{onChange:function(e){return we((function(n){return fe(fe({},n),{},{configuration:{chart_type:e.target.value}})}))},placeholder:"Select chart type",primary:!0,value:(null===C||void 0===C||null===(e=C.configuration)||void 0===e?void 0:e.chart_type)||"",children:H.CK.concat(H.oV.CUSTOM).map((function(e){return(0,v.jsx)("option",{value:e,children:(0,G.kC)(e)},e)}))})]}),(0,v.jsx)(E.Z,{mt:h.Mq,children:(0,v.jsx)(te.Z,{light:!0})}),(0,v.jsx)(E.Z,{mt:h.Mq,px:h.cd,children:(0,v.jsx)(oe.Z,{children:"Data source"})}),(0,v.jsxs)(E.Z,{mt:h.Mq,px:h.cd,children:[(0,v.jsxs)(E.Z,{mb:1,children:[(0,v.jsx)(N.ZP,{bold:!0,children:"Data source type"}),(0,v.jsx)(N.ZP,{muted:!0,small:!0,children:"Configure where the data for this chart comes from."})]}),(0,v.jsx)(V.Z,{onChange:function(e){return we((function(n){return fe(fe({},n),{},{data_source:fe(fe({},null===n||void 0===n?void 0:n.data_source),{},{type:e.target.value})})}))},placeholder:"Select data source type",primary:!0,value:(null===C||void 0===C||null===(n=C.data_source)||void 0===n?void 0:n.type)||"",children:x.tW.map((function(e){return(0,v.jsx)("option",{value:e,children:(0,G.kC)(x.Qj[e])},e)}))})]}),[x.XO.BLOCK,x.XO.BLOCK_RUNS,x.XO.PIPELINE_RUNS,x.XO.PIPELINE_SCHEDULES].includes(null===C||void 0===C||null===(t=C.data_source)||void 0===t?void 0:t.type)&&(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)(E.Z,{mt:h.Mq,px:h.cd,children:[(0,v.jsxs)(E.Z,{mb:1,children:[(0,v.jsx)(N.ZP,{bold:!0,children:"Pipeline UUID"}),(0,v.jsx)(N.ZP,{muted:!0,small:!0,children:"Select the pipeline the data source comes from."})]}),(0,v.jsxs)(V.Z,{monospace:!0,onChange:function(e){return we((function(n){return fe(fe({},n),{},{data_source:fe(fe({},null===n||void 0===n?void 0:n.data_source),{},{block_uuid:null,pipeline_schedule_id:null,pipeline_uuid:e.target.value})})}))},primary:!0,value:(null===C||void 0===C||null===(o=C.data_source)||void 0===o?void 0:o.pipeline_uuid)||"",children:[(0,v.jsx)("option",{value:null}),null===an||void 0===an?void 0:an.map((function(e){var n=e.uuid;return(0,v.jsx)("option",{value:n,children:n},n)}))]})]})}),[x.XO.PIPELINE_RUNS].includes(null===C||void 0===C||null===(i=C.data_source)||void 0===i?void 0:i.type)&&(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)(E.Z,{mt:h.Mq,px:h.cd,children:[(0,v.jsxs)(E.Z,{mb:1,children:[(0,v.jsx)(N.ZP,{bold:!0,children:"Trigger"}),(0,v.jsx)(N.ZP,{muted:!0,small:!0,children:"Select the trigger that the pipeline runs should belong to."})]}),(0,v.jsxs)(V.Z,{monospace:!0,onChange:function(e){return we((function(n){return fe(fe({},n),{},{data_source:fe(fe({},null===n||void 0===n?void 0:n.data_source),{},{pipeline_schedule_id:e.target.value})})}))},primary:!0,value:(null===C||void 0===C||null===(l=C.data_source)||void 0===l?void 0:l.pipeline_schedule_id)||"",children:[(0,v.jsx)("option",{value:null}),null===sn||void 0===sn?void 0:sn.map((function(e){var n=e.id,t=e.name;return(0,v.jsx)("option",{value:n,children:t},n)}))]})]})}),x.XO.BLOCK===(null===C||void 0===C||null===(r=C.data_source)||void 0===r?void 0:r.type)&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(E.Z,{mt:h.Mq,px:h.cd,children:[(0,v.jsxs)(E.Z,{mb:1,children:[(0,v.jsx)(N.ZP,{bold:!0,children:"Block UUID"}),(0,v.jsx)(N.ZP,{muted:!0,small:!0,children:"Select the block the data source comes from."})]}),(0,v.jsxs)(V.Z,{monospace:!0,onChange:function(e){return we((function(n){return fe(fe({},n),{},{data_source:fe(fe({},null===n||void 0===n?void 0:n.data_source),{},{block_uuid:e.target.value})})}))},primary:!0,value:(null===C||void 0===C||null===(u=C.data_source)||void 0===u?void 0:u.block_uuid)||"",children:[(0,v.jsx)("option",{value:null}),null===un||void 0===un?void 0:un.map((function(e){var n=e.uuid;return(0,v.jsx)("option",{value:n,children:n},n)}))]})]}),(0,v.jsxs)(E.Z,{mt:h.Mq,px:h.cd,children:[(0,v.jsxs)(E.Z,{mb:1,children:[(0,v.jsx)(N.ZP,{bold:!0,children:"Partitions"}),(0,v.jsx)(N.ZP,{muted:!0,small:!0,children:"Enter a positive or a negative number. If positive, then data from the block will be the most recent N partitions. If negative, then data from the block will be the oldest N partitions."}),(0,v.jsx)(E.Z,{mt:1,children:(0,v.jsx)(N.ZP,{muted:!0,small:!0,children:"Leave blank if you want the chart to execute the block and display the data produced from that ad hoc block execution."})})]}),(0,v.jsx)(R.Z,{monospace:!0,onChange:function(e){return we((function(n){return fe(fe({},n),{},{data_source:fe(fe({},null===n||void 0===n?void 0:n.data_source),{},{partitions:"undefined"!==typeof e.target.value?Number(e.target.value):e.target.value})})}))},placeholder:"Enter number of partitions",primary:!0,setContentOnMount:!0,type:"number",value:(null===C||void 0===C||null===(c=C.data_source)||void 0===c?void 0:c.partitions)||""})]})]}),(0,v.jsxs)(E.Z,{mt:h.Mq,px:h.cd,children:[(0,v.jsxs)(E.Z,{mb:1,children:[(0,v.jsx)(N.ZP,{bold:!0,children:"Refresh interval"}),(0,v.jsx)(N.ZP,{muted:!0,small:!0,children:"How frequent do you want this chart to automatically fetch new data from its data source? Enter a number in milliseconds (e.g. 1000ms is 1 second)."})]}),(0,v.jsx)(R.Z,{monospace:!0,onChange:function(e){return we((function(n){return fe(fe({},n),{},{data_source:fe(fe({},null===n||void 0===n?void 0:n.data_source),{},{refresh_interval:e.target.value})})}))},placeholder:"Enter number for refresh interval",primary:!0,setContentOnMount:!0,type:"number",value:(null===C||void 0===C||null===(a=C.data_source)||void 0===a?void 0:a.refresh_interval)||6e4})]}),(0,v.jsx)(E.Z,{mt:h.Mq,children:(0,v.jsx)(te.Z,{light:!0})}),(0,v.jsx)(E.Z,{mt:h.Mq,px:h.cd,children:(0,v.jsx)(oe.Z,{children:"Chart display settings"})}),(0,v.jsx)(E.Z,{mt:h.Mq,px:h.cd,children:null!==fn&&void 0!==fn&&fn.data_source?(0,v.jsxs)(N.ZP,{default:!0,children:["Number of columns from data source: ","undefined"!==typeof(null===fn||void 0===fn||null===(d=fn.data)||void 0===d?void 0:d.columns)?(0,v.jsx)(N.ZP,{bold:!0,inline:!0,monospace:!0,children:null===fn||void 0===fn||null===(f=fn.data)||void 0===f||null===(m=f.columns)||void 0===m?void 0:m.length}):(0,v.jsx)(E.Z,{mt:1,children:(0,v.jsx)(L.Z,{inverted:!0,small:!0})})]}):(0,v.jsx)(N.ZP,{default:!0,children:"Please select a data source type above."})}),(0,v.jsx)(E.Z,{mt:h.Mq,px:h.cd,children:(0,v.jsx)(ee,{block:fn,updateConfiguration:function(e){we((function(n){return fe(fe({},n),{},{configuration:fe(fe({},null===n||void 0===n?void 0:n.configuration),e)})}))}})})]})}),[on,fn,un,C,sn,an,we,s]),vn=(0,c.useMemo)((function(){return ge&&(0,v.jsxs)(E.Z,{py:h.cd,children:[(0,v.jsxs)(E.Z,{mb:h.Mq,px:h.cd,children:[(0,v.jsx)(E.Z,{mb:1,children:(0,v.jsx)(oe.Z,{children:"Custom code"})}),(0,v.jsxs)(N.ZP,{default:!0,children:["Write code for custom data sources, parsing, etc. For more information on what is possible, please check out the ",(0,v.jsx)(ie.Z,{href:"https://docs.mage.ai/visualizations/dashboards#custom-code-for-chart",openNewWindow:!0,children:"chart documentation"}),"."]})]}),(0,v.jsx)(ne.Z,{autoHeight:!0,block:ge,onChange:function(e){we((function(n){return fe(fe({},n),{},{content:e})}))},value:(null===C||void 0===C?void 0:C.content)||(null===Ie||void 0===Ie?void 0:Ie.content)||"",width:"100%"})]})}),[Ie,C,ge,we]);return(0,v.jsxs)(le.Z,{after:vn,afterHeightOffset:s||0,afterHidden:on,afterMousedownActive:J,afterWidth:U,before:hn,beforeDraggableTopOffset:s?s-re.Wi:0,beforeFooter:!on&&(0,v.jsx)(E.Z,{p:h.cd,children:(0,v.jsxs)(y.ZP,{children:[(0,v.jsx)(g.ZP,{fullWidth:!0,loading:He,onClick:function(){return Ae(C)},primary:!0,children:"Save changes"}),(0,v.jsx)(E.Z,{mr:1}),(0,v.jsx)(g.ZP,{fullWidth:!0,onClick:function(){return Oe(null)},secondary:!0,children:"Back to dashboard"})]})}),beforeHeader:(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(T.Z,{breadcrumbs:[{label:function(){return"Back to dashboard"},onClick:function(){return Oe(null)}},{bold:!0,label:function(){return(null===ge||void 0===ge?void 0:ge.name)||(null===ge||void 0===ge?void 0:ge.uuid)}}]})}),beforeHeaderOffset:6*h.iI,beforeHeightOffset:s||0,beforeHidden:on,beforeMousedownActive:he,beforeWidth:Q,contained:!0,excludeOffsetFromBeforeDraggableLeft:!0,headerOffset:s||0,hideAfterCompletely:!0,hideBeforeCompletely:!0,leftOffset:t||0,mainContainerRef:S,setAfterMousedownActive:K,setAfterWidth:F,setBeforeMousedownActive:ve,setBeforeWidth:$,children:[(0,v.jsx)("div",{ref:me,children:(0,v.jsxs)(y.ZP,{justifyContent:"space-between",children:[(0,v.jsx)(j.Z,{flex:1}),on&&!en&&(0,v.jsx)(E.Z,{p:h.cd,children:(0,v.jsx)(g.ZP,{beforeIcon:(0,v.jsx)(k.Add,{size:2*h.iI}),onClick:function(){return Qe()},primary:!0,children:"Create new chart"})})]})}),(0,v.jsxs)(r.W,{backend:u.PD,children:[ge&&(0,v.jsx)(q,{block:ge,blockLayoutItem:fe(fe({},Ie),{},{configuration:fe(fe({},null===Ie||void 0===Ie?void 0:Ie.configuration),null===C||void 0===C?void 0:C.configuration),data_source:fe(fe({},null===Ie||void 0===Ie?void 0:Ie.data_source),null===C||void 0===C?void 0:C.data_source)}),blockUUID:null===ge||void 0===ge?void 0:ge.uuid,detail:!0,disableDrag:!0,height:tn,pageBlockLayoutUUID:m,setSelectedBlockItem:Oe,width:null===Te||void 0===Te?void 0:Te.width}),!ge&&!en&&$e,!ge&&en&&nn]}),(0,v.jsx)(E.Z,{mb:2})]})}},75399:function(e,n,t){t.d(n,{Qj:function(){return c},XO:function(){return i},hN:function(){return l},tW:function(){return u}});var o,i,l,r=t(82394);!function(e){e.BLOCK="block",e.BLOCK_RUNS="block_runs",e.CHART_CODE="chart_code",e.PIPELINES="pipelines",e.PIPELINE_RUNS="pipeline_runs",e.PIPELINE_SCHEDULES="pipeline_schedules"}(i||(i={})),function(e){e.HTML="html",e.JPEG="jpeg",e.JPG="jpg",e.PNG="png"}(l||(l={}));var u=[i.BLOCK,i.BLOCK_RUNS,i.CHART_CODE,i.PIPELINES,i.PIPELINE_RUNS,i.PIPELINE_SCHEDULES],c=(o={},(0,r.Z)(o,i.BLOCK,"Block data output"),(0,r.Z)(o,i.BLOCK_RUNS,"Block runs"),(0,r.Z)(o,i.CHART_CODE,"Custom code"),(0,r.Z)(o,i.PIPELINES,"Pipelines"),(0,r.Z)(o,i.PIPELINE_RUNS,"Pipeline runs"),(0,r.Z)(o,i.PIPELINE_SCHEDULES,"Triggers"),o)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9624],{29624:function(e,n,i){i.d(n,{Z:function(){return Q}});var t=i(82394),l=i(75582),r=i(12691),u=i.n(r),o=i(82684),c=i(69864),s=i(34376),p=i(71180),d=i(50724),a=i(30160),f=i(44897),h=i(42631),g=i(70515),v=i(25976),_=v.default.div.withConfig({displayName:"indexstyle__ModalStyle",componentId:"sc-qldrgc-0"})(["position:absolute;"," "," display:flex;flex-direction:column;width:","px;overflow:hidden;background-color:",";border:1px solid ",";border-radius:","px;box-shadow:",";"],(function(e){return e.top&&"\n top: ".concat(e.top,"px;\n ")}),(function(e){return e.left&&"\n left: ".concat(e.left,"px;\n ")}),39*g.iI,(function(e){return(e.theme||f.Z).background.dashboard}),(function(e){return(e.theme||f.Z).borders.darkLight}),h.n_,(function(e){return(e.theme||f.Z).shadow.popup})),x=v.default.div.withConfig({displayName:"indexstyle__ContentStyle",componentId:"sc-qldrgc-1"})(["display:flex;flex-direction:column;gap:","px;padding:","px ","px;"],2*g.iI,2.5*g.iI,2*g.iI),j=v.default.div.withConfig({displayName:"indexstyle__ActionsStyle",componentId:"sc-qldrgc-2"})(["display:flex;gap:","px;padding:","px;background-color:",";border-top:1px solid ",";& > *{flex:1;}"],g.iI,2*g.iI,(function(e){return(e.theme||f.Z).background.panel}),(function(e){return(e.theme||f.Z).borders.darkLight})),y=i(72473),b=i(72191),m=i(79633),Z=i(81728),C=i(28598);var P=function(e){var n=e.inProgressRunsCount,i=e.left,t=void 0===i?0:i,l=e.onAllow,r=e.onStop,u=e.pipelineScheduleId,c=e.pipelineUuid,s=e.top,d=void 0===s?0:s,f=e.topOffset,h=void 0===f?0:f,v=(0,o.useRef)(null),P=(0,o.useState)(d+h),k=P[0],w=P[1];return(0,o.useEffect)((function(){var e=null!==v&&void 0!==v&&v.current?v.current.getBoundingClientRect().height:32*g.iI,n=d+h+e>window.innerHeight;w(n?d-e:d+h)}),[t,d,h]),(0,C.jsxs)(_,{left:t,ref:v,top:k,children:[(0,C.jsxs)(x,{children:[(0,C.jsx)(y.AlertTriangle,{fill:m.$R,size:b.nz}),(0,C.jsx)(a.ZP,{bold:!0,large:!0,warning:!0,children:"There ".concat(1===n?"is":"are"," currently ").concat((0,Z._6)("run",n,!0)," in progress.")}),(0,C.jsx)(a.ZP,{large:!0,children:"Do you want to stop or allow the ".concat((0,Z._6)("run",n,!0,!0)," to complete?")})]}),(0,C.jsxs)(j,{children:[(0,C.jsx)(p.ZP,{large:!0,onClick:function(){return r(u,c)},children:"Stop"}),(0,C.jsx)(p.ZP,{large:!0,onClick:function(){return l(u)},children:"Allow"})]})]})},k=i(55485),w=i(48670),O=i(30229),I=i(89515),S=i(38276),R=i(75499),A=i(48381),E=i(69650),D=i(12468),N=i(35686),T=i(77417),q=i(19698),L=i(81655),U=i(41143),z=i(31608),B=i(16488),V=i(3917),F=i(50178),H=i(72619),X=i(95924),$=i(70320),G=i(89538);function K(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function M(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?K(Object(i),!0).forEach((function(n){(0,t.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):K(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var J=1.5*g.iI;var Q=function(e){var n=e.disableActions,i=e.fetchPipelineSchedules,t=e.highlightRowOnHover,r=e.includeCreatedAtColumn,f=e.includePipelineColumn,h=e.pipeline,g=e.pipelineSchedules,v=e.pipelineTriggersByName,_=e.selectedSchedule,x=e.setErrors,j=e.setSelectedSchedule,m=e.stickyHeader,Z=null===h||void 0===h?void 0:h.uuid,K=(0,s.useRouter)(),Q=(0,T.Z)().projectPlatformActivated,W=(0,q.Z)().status,Y=(0,o.useRef)({}),ee=(0,o.useRef)({}),ne=(0,o.useState)(null),ie=ne[0],te=ne[1],le=(0,o.useState)(0),re=le[0],ue=le[1],oe=(0,o.useState)(0),ce=oe[0],se=oe[1],pe=(0,$.qB)(),de=pe?L.O$:{},ae=(0,c.Db)((function(e){return N.ZP.pipelines.useUpdate(e.uuid)({pipeline:e})}),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(){null===i||void 0===i||i()},onErrorCallback:function(e,n){return null===x||void 0===x?void 0:x({errors:n,response:e})}})}}),fe=(0,l.Z)(ae,1)[0],he=(0,c.Db)((function(e){return N.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:e})}),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(){null===i||void 0===i||i()},onErrorCallback:function(e,n){return null===x||void 0===x?void 0:x({errors:n,response:e})}})}}),ge=(0,l.Z)(he,1)[0],ve=(0,c.Db)((function(e){return N.ZP.pipeline_schedules.useDelete(e)()}),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(){null===i||void 0===i||i(),Z?K.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(Z,"/triggers")):null===i||void 0===i||i()},onErrorCallback:function(e,n){return x({errors:n,response:e})}})}}),_e=(0,l.Z)(ve,1)[0],xe=[],je=[];n||(xe.push.apply(xe,[null,null,null]),je.push.apply(je,[{uuid:"Active"},{uuid:"Type"},{center:!0,uuid:"Logs"}])),Q&&(xe.push.apply(xe,[null]),je.push.apply(je,[{uuid:"Project"}])),xe.push.apply(xe,[1,2]),je.push.apply(je,[{uuid:"Name"},{uuid:"Description"}]),n||(xe.push.apply(xe,[null]),je.push({uuid:"Frequency"})),xe.push.apply(xe,[1,1,null]),je.push.apply(je,[M(M({},de),{},{uuid:"Next run date"}),{uuid:"Latest status"},{uuid:"Runs"}]),n||(xe.push.apply(xe,[1]),je.push({uuid:"Tags"})),n||(0,F.Ct)()||(xe.push.apply(xe,[null]),je.push({label:function(){return""},uuid:"edit/delete"})),!n&&f&&(je.splice(2,0,{uuid:"Pipeline"}),xe.splice(2,0,1)),!n&&r&&(je.splice(5,0,M(M({},de),{},{uuid:"Created at"})),xe.splice(5,0,null));var ye=(0,G.dd)((function(e){var n=e.inProgressRunsCount,i=e.left,t=e.pipelineScheduleId,l=e.pipelineUuid,r=e.top,u=e.topOffset;return(0,C.jsx)(P,{inProgressRunsCount:n,left:i,onAllow:function(e){Ze(),ge({id:e,status:O.fq.INACTIVE})},onStop:function(e,n){Ze(),fe({pipeline_schedule_id:e,status:U.V.CANCELLED,uuid:n}),ge({id:e,status:O.fq.INACTIVE})},pipelineScheduleId:t,pipelineUuid:l,top:r,topOffset:u})}),{},[],{background:!0,uuid:"disable_trigger"}),be=(0,l.Z)(ye,2),me=be[0],Ze=be[1];return(0,C.jsx)(z.cl,{overflowVisible:!0,children:0===g.length?(0,C.jsx)(S.Z,{px:3,py:1,children:(0,C.jsx)(a.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No triggers available"})}):(0,C.jsx)(R.Z,{columnFlex:xe,columns:je,highlightRowOnHover:t,isSelectedRow:function(e){return g[e].id===(null===_||void 0===_?void 0:_.id)},onClickRow:j?function(e){return null===j||void 0===j?void 0:j(g[e])}:null,rowVerticalPadding:6,rows:g.map((function(e,i){var t=e.id,l=e.created_at,c=e.description,s=e.next_pipeline_run_date,h=e.pipeline_in_progress_runs_count,g=e.pipeline_runs_count,_=e.pipeline_uuid,x=e.last_pipeline_run_status,j=e.name,m=e.repo_path,P=e.schedule_interval,R=e.status,N=e.tags,T=O.fq.ACTIVE===R,q=(0,B._U)(P),U=Z||_;Y.current[t]=(0,o.createRef)(),ee.current[t]=(0,o.createRef)();var z=null!==v&&void 0!==v&&v[j]?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(S.Z,{mr:1}),(0,C.jsx)(D.Z,{block:!0,label:"This trigger is saved in code.",size:J,widthFitContent:!0,children:(0,C.jsx)(y.Code,{default:!0,size:J})})]}):null,H=[];if(n)H.push.apply(H,[(0,C.jsxs)(k.ZP,{alignItems:"center",children:[(0,C.jsx)(a.ZP,{bold:!0,children:j}),z]},"trigger_name_".concat(i))]);else{var $,G;if(H.push.apply(H,[(0,C.jsx)(D.Z,{block:!0,label:R,size:20,widthFitContent:!0,children:(0,C.jsx)("div",{ref:Y.current[t],style:{position:"relative"},children:(0,C.jsx)(E.Z,{checked:T,compact:!0,onCheck:function(e){return function(e){var n=e.event,i=e.inProgressRunsCount,t=e.pipelineIsActive,l=e.pipelineScheduleId,r=e.pipelineUuid;if((0,X.j)(n),t&&i>0){var u,o=null===(u=Y.current[l])||void 0===u?void 0:u.current,c=null===o||void 0===o?void 0:o.getBoundingClientRect(),s=c.height,p=c.left,d=c.top;me({inProgressRunsCount:i,left:p,pipelineScheduleId:l,pipelineUuid:r,top:d,topOffset:s})}else ge({id:l,status:t?O.fq.INACTIVE:O.fq.ACTIVE})}({event:e,inProgressRunsCount:h,pipelineIsActive:T,pipelineScheduleId:t,pipelineUuid:_})},purpleBackground:!0})})},"trigger_enabled_".concat(i)),(0,C.jsx)(a.ZP,{default:!0,monospace:!0,children:null===($=O.Z4[e.schedule_type])||void 0===$?void 0:$.call(O.Z4)},"trigger_type_".concat(i))]),H.push((0,C.jsx)(p.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return K.push("/pipelines/".concat(U,"/logs?pipeline_schedule_id[]=").concat(t))},children:(0,C.jsx)(y.Logs,{default:!0,size:b.bL})},"logs_button_".concat(i))),Q)H.push.apply(H,[(0,C.jsx)(a.ZP,{default:!0,monospace:!0,children:null===m||void 0===m||null===(G=m.replace((null===W||void 0===W?void 0:W.repo_path_root)||"",""))||void 0===G?void 0:G.slice(1)},"project_".concat(i))]);H.push.apply(H,[(0,C.jsxs)(k.ZP,{alignItems:"center",children:[(0,C.jsx)(u(),{as:"/pipelines/".concat(U,"/triggers/").concat(t),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,C.jsx)(w.Z,{bold:!0,onClick:function(e){(0,X.j)(e),K.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(U,"/triggers/").concat(t))},sky:!0,children:j})}),z]},"trigger_name_".concat(i))])}return H.push.apply(H,[(0,C.jsx)(a.ZP,{default:!0,children:c},"trigger_description_".concat(i))]),n||H.push((0,C.jsx)(a.ZP,{default:!0,monospace:!0,children:pe&&q?(0,B.lO)(P):P},"trigger_frequency_".concat(i))),H.push.apply(H,[(0,C.jsx)(a.ZP,{monospace:!0,small:!0,title:s?"UTC: ".concat(s.slice(0,19)):null,children:s?pe?(0,V.XG)(s,pe):(0,V.d$)(s,{includeSeconds:!0,utcFormat:!0}):(0,C.jsx)(C.Fragment,{children:"\u2014"})},"trigger_next_run_date_".concat(i)),(0,o.createElement)(a.ZP,M(M({},(0,L.NC)(x)),{},{key:"latest_run_status_".concat(i)}),x||"N/A"),(0,C.jsx)(a.ZP,{default:!0,monospace:!0,children:g||"0"},"trigger_run_count_".concat(i))]),n||H.push((0,C.jsx)("div",{children:(0,C.jsx)(A.Z,{tags:null===N||void 0===N?void 0:N.map((function(e){return{uuid:e}}))})},"pipeline_tags_".concat(i))),n||(0,F.Ct)()||H.push((0,C.jsxs)(k.ZP,{children:[(0,C.jsx)(p.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return K.push("/pipelines/".concat(U,"/triggers/").concat(t,"/edit"))},title:"Edit",children:(0,C.jsx)(y.Edit,{default:!0,size:b.bL})}),(0,C.jsx)(S.Z,{mr:1}),(0,C.jsx)(p.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){var e,n,i,l;te(t),ue((null===(e=ee.current[t])||void 0===e||null===(n=e.current)||void 0===n?void 0:n.offsetTop)||0),se((null===(i=ee.current[t])||void 0===i||null===(l=i.current)||void 0===l?void 0:l.offsetLeft)||0)},ref:ee.current[t],title:"Delete",children:(0,C.jsx)(y.Trash,{default:!0,size:b.bL})}),(0,C.jsx)(d.Z,{onClickOutside:function(){return te(null)},open:ie===t,children:(0,C.jsx)(I.Z,{danger:!0,left:(ce||0)-L.nH,onCancel:function(){return te(null)},onClick:function(){te(null),_e(t)},title:"Are you sure you want to delete the trigger ".concat(j,"?"),top:(re||0)-(i<=1?L.oz:L.OK),width:L.Xx})})]},"edit_delete_buttons_".concat(i))),!n&&f&&H.splice(2,0,(0,C.jsx)(a.ZP,{default:!0,monospace:!0,children:U},"pipeline_name_".concat(i))),!n&&r&&H.splice(5,0,(0,C.jsx)(a.ZP,{default:!0,monospace:!0,small:!0,title:l?(0,V._6)(l):null,children:(0,V.XG)(null===l||void 0===l?void 0:l.slice(0,19),pe)},"created_at_".concat(i))),H})),stickyHeader:m,uuid:"pipeline-triggers"})})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9832],{52136:function(t,n,e){e.d(n,{Z:function(){return p}});var i=e(47329),r=e.n(i),o=e(82684),u=e(63588),c=e.n(u),l=e(5237),s=e(29989),a=e(81352),h=e(46119),f=e(38469),d=e(12765),y=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function _(){return _=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},_.apply(this,arguments)}function p(t){var n=t.top,e=void 0===n?0:n,i=t.left,r=void 0===i?0:i,u=t.scale,p=t.height,v=t.stroke,x=void 0===v?"#eaf0f6":v,m=t.strokeWidth,Z=void 0===m?1:m,g=t.strokeDasharray,b=t.className,O=t.numTicks,E=void 0===O?10:O,k=t.lineStyle,w=t.offset,T=t.tickValues,N=t.children,j=function(t,n){if(null==t)return{};var e,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)e=o[i],n.indexOf(e)>=0||(r[e]=t[e]);return r}(t,y),M=null!=T?T:(0,h.Z)(u,E),P=(null!=w?w:0)+(0,d.Z)(u)/2,R=M.map((function(t,n){var e,i=(null!=(e=(0,f.Z)(u(t)))?e:0)+P;return{index:n,from:new a.Z({x:i,y:0}),to:new a.Z({x:i,y:p})}}));return o.createElement(s.Z,{className:c()("visx-columns",b),top:e,left:r},N?N({lines:R}):R.map((function(t){var n=t.from,e=t.to,i=t.index;return o.createElement(l.Z,_({key:"column-line-"+i,from:n,to:e,stroke:x,strokeWidth:Z,strokeDasharray:g,style:k},j))})))}p.propTypes={tickValues:r().array,height:r().number.isRequired}},85587:function(t,n,e){e.d(n,{Z:function(){return s}});var i=e(82684),r=e(63588),o=e.n(r),u=e(39309),c=["children","data","x","y","fill","className","curve","innerRef","defined"];function l(){return l=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},l.apply(this,arguments)}function s(t){var n=t.children,e=t.data,r=void 0===e?[]:e,s=t.x,a=t.y,h=t.fill,f=void 0===h?"transparent":h,d=t.className,y=t.curve,_=t.innerRef,p=t.defined,v=void 0===p?function(){return!0}:p,x=function(t,n){if(null==t)return{};var e,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)e=o[i],n.indexOf(e)>=0||(r[e]=t[e]);return r}(t,c),m=(0,u.jv)({x:s,y:a,defined:v,curve:y});return n?i.createElement(i.Fragment,null,n({path:m})):i.createElement("path",l({ref:_,className:o()("visx-linepath",d),d:m(r)||"",fill:f,strokeLinecap:"round"},x))}},39309:function(t,n,e){e.d(n,{SO:function(){return u},jv:function(){return c}});var i=e(48167),r=e(92201),o=e(49894);function u(t){var n=void 0===t?{}:t,e=n.x,r=n.x0,u=n.x1,c=n.y,l=n.y0,s=n.y1,a=n.defined,h=n.curve,f=(0,i.Z)();return e&&(0,o.Z)(f.x,e),r&&(0,o.Z)(f.x0,r),u&&(0,o.Z)(f.x1,u),c&&(0,o.Z)(f.y,c),l&&(0,o.Z)(f.y0,l),s&&(0,o.Z)(f.y1,s),a&&f.defined(a),h&&f.curve(h),f}function c(t){var n=void 0===t?{}:t,e=n.x,i=n.y,u=n.defined,c=n.curve,l=(0,r.Z)();return e&&(0,o.Z)(l.x,e),i&&(0,o.Z)(l.y,i),u&&l.defined(u),c&&l.curve(c),l}},98889:function(t,n,e){e.d(n,{Z:function(){return p}});var i=e(47329),r=e.n(i),o=e(82684),u=e(63588),c=e.n(u),l=e(39309),s=["children","x","x0","x1","y","y0","y1","data","defined","className","curve","innerRef"];function a(){return a=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},a.apply(this,arguments)}function h(t){var n=t.children,e=t.x,i=t.x0,r=t.x1,u=t.y,h=t.y0,f=t.y1,d=t.data,y=void 0===d?[]:d,_=t.defined,p=void 0===_?function(){return!0}:_,v=t.className,x=t.curve,m=t.innerRef,Z=function(t,n){if(null==t)return{};var e,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)e=o[i],n.indexOf(e)>=0||(r[e]=t[e]);return r}(t,s),g=(0,l.SO)({x:e,x0:i,x1:r,y:u,y0:h,y1:f,defined:p,curve:x});return n?o.createElement(o.Fragment,null,n({path:g})):o.createElement("path",a({ref:m,className:c()("visx-area",v),d:g(y)||""},Z))}var f=["id","children"];function d(){return d=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},d.apply(this,arguments)}function y(t){var n=t.id,e=t.children,i=function(t,n){if(null==t)return{};var e,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)e=o[i],n.indexOf(e)>=0||(r[e]=t[e]);return r}(t,f);return o.createElement("defs",null,o.createElement("clipPath",d({id:n},i),e))}function _(){return _=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},_.apply(this,arguments)}function p(t){var n=t.className,e=t.curve,i=t.clipAboveTo,r=t.clipBelowTo,u=t.data,l=t.defined,s=t.x,a=t.y0,f=t.y1,d=t.aboveAreaProps,p=t.belowAreaProps,v=t.id,x=void 0===v?"":v;return o.createElement("g",{className:c()("visx-threshold",n)},o.createElement(h,{curve:e,data:u,x:s,y1:f,defined:l},(function(t){var n=t.path,e=null,c=null;return e=n.y0(r)(u),c=n.y0(i)(u),o.createElement("g",null,o.createElement(y,{id:"threshold-clip-below-"+x},o.createElement("path",{d:e||""})),o.createElement(y,{id:"threshold-clip-above-"+x},o.createElement("path",{d:c||""})))})),o.createElement(h,_({curve:e,data:u,defined:l,x:s,y0:a,y1:f,strokeWidth:0,clipPath:"url(#threshold-clip-below-"+x+")"},p)),o.createElement(h,_({curve:e,data:u,defined:l,x:s,y0:a,y1:f,strokeWidth:0,clipPath:"url(#threshold-clip-above-"+x+")"},d)))}y.propTypes={id:r().string.isRequired,children:r().node},p.propTypes={className:r().string,clipAboveTo:r().oneOfType([r().func,r().number]).isRequired,clipBelowTo:r().oneOfType([r().func,r().number]).isRequired,id:r().string.isRequired,data:r().array.isRequired,defined:r().func,x:r().oneOfType([r().func,r().number]).isRequired,y0:r().oneOfType([r().func,r().number]).isRequired,y1:r().oneOfType([r().func,r().number]).isRequired}},61655:function(t,n,e){e.d(n,{Z:function(){return u}});var i=e(82684),r=e(29179);function o(){return o=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},o.apply(this,arguments)}function u(t,n,e){void 0===n&&(n={style:{position:"relative",width:"inherit",height:"inherit"}}),void 0===e&&(e=function(t,n){return i.createElement("div",n,t)});return function(u){var c=(0,r.Z)();return e(i.createElement(t,o({},c,u)),n)}}},35681:function(t,n){var e=Math.PI,i=2*e,r=1e-6,o=i-r;function u(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function c(){return new u}u.prototype=c.prototype={constructor:u,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,r,o){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+r)+","+(this._y1=+o)},arcTo:function(t,n,i,o,u){t=+t,n=+n,i=+i,o=+o,u=+u;var c=this._x1,l=this._y1,s=i-t,a=o-n,h=c-t,f=l-n,d=h*h+f*f;if(u<0)throw new Error("negative radius: "+u);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(d>r)if(Math.abs(f*s-a*h)>r&&u){var y=i-c,_=o-l,p=s*s+a*a,v=y*y+_*_,x=Math.sqrt(p),m=Math.sqrt(d),Z=u*Math.tan((e-Math.acos((p+d-v)/(2*x*m)))/2),g=Z/m,b=Z/x;Math.abs(g-1)>r&&(this._+="L"+(t+g*h)+","+(n+g*f)),this._+="A"+u+","+u+",0,0,"+ +(f*y>h*_)+","+(this._x1=t+b*s)+","+(this._y1=n+b*a)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,u,c,l,s){t=+t,n=+n,s=!!s;var a=(u=+u)*Math.cos(c),h=u*Math.sin(c),f=t+a,d=n+h,y=1^s,_=s?c-l:l-c;if(u<0)throw new Error("negative radius: "+u);null===this._x1?this._+="M"+f+","+d:(Math.abs(this._x1-f)>r||Math.abs(this._y1-d)>r)&&(this._+="L"+f+","+d),u&&(_<0&&(_=_%i+i),_>o?this._+="A"+u+","+u+",0,1,"+y+","+(t-a)+","+(n-h)+"A"+u+","+u+",0,1,"+y+","+(this._x1=f)+","+(this._y1=d):_>r&&(this._+="A"+u+","+u+",0,"+ +(_>=e)+","+y+","+(this._x1=t+u*Math.cos(l))+","+(this._y1=n+u*Math.sin(l))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}},n.Z=c},48167:function(t,n,e){e.d(n,{Z:function(){return l}});var i=e(35681),r=e(90875),o=e(23622),u=e(92201),c=e(98930);function l(){var t=c.x,n=null,e=(0,r.Z)(0),l=c.y,s=(0,r.Z)(!0),a=null,h=o.Z,f=null;function d(r){var o,u,c,d,y,_=r.length,p=!1,v=new Array(_),x=new Array(_);for(null==a&&(f=h(y=(0,i.Z)())),o=0;o<=_;++o){if(!(o<_&&s(d=r[o],o,r))===p)if(p=!p)u=o,f.areaStart(),f.lineStart();else{for(f.lineEnd(),f.lineStart(),c=o-1;c>=u;--c)f.point(v[c],x[c]);f.lineEnd(),f.areaEnd()}p&&(v[o]=+t(d,o,r),x[o]=+e(d,o,r),f.point(n?+n(d,o,r):v[o],l?+l(d,o,r):x[o]))}if(y)return f=null,y+""||null}function y(){return(0,u.Z)().defined(s).curve(h).context(a)}return d.x=function(e){return arguments.length?(t="function"===typeof e?e:(0,r.Z)(+e),n=null,d):t},d.x0=function(n){return arguments.length?(t="function"===typeof n?n:(0,r.Z)(+n),d):t},d.x1=function(t){return arguments.length?(n=null==t?null:"function"===typeof t?t:(0,r.Z)(+t),d):n},d.y=function(t){return arguments.length?(e="function"===typeof t?t:(0,r.Z)(+t),l=null,d):e},d.y0=function(t){return arguments.length?(e="function"===typeof t?t:(0,r.Z)(+t),d):e},d.y1=function(t){return arguments.length?(l=null==t?null:"function"===typeof t?t:(0,r.Z)(+t),d):l},d.lineX0=d.lineY0=function(){return y().x(t).y(e)},d.lineY1=function(){return y().x(t).y(l)},d.lineX1=function(){return y().x(n).y(e)},d.defined=function(t){return arguments.length?(s="function"===typeof t?t:(0,r.Z)(!!t),d):s},d.curve=function(t){return arguments.length?(h=t,null!=a&&(f=h(a)),d):h},d.context=function(t){return arguments.length?(null==t?a=f=null:f=h(a=t),d):a},d}},97745:function(t,n,e){function i(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function r(t){this._context=t}function o(t){return new r(t)}e.d(n,{ZP:function(){return o},fE:function(){return r},xm:function(){return i}}),r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:i(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:i(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}}},23622:function(t,n,e){function i(t){this._context=t}function r(t){return new i(t)}e.d(n,{Z:function(){return r}}),i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}}},92201:function(t,n,e){e.d(n,{Z:function(){return c}});var i=e(35681),r=e(90875),o=e(23622),u=e(98930);function c(){var t=u.x,n=u.y,e=(0,r.Z)(!0),c=null,l=o.Z,s=null;function a(r){var o,u,a,h=r.length,f=!1;for(null==c&&(s=l(a=(0,i.Z)())),o=0;o<=h;++o)!(o<h&&e(u=r[o],o,r))===f&&((f=!f)?s.lineStart():s.lineEnd()),f&&s.point(+t(u,o,r),+n(u,o,r));if(a)return s=null,a+""||null}return a.x=function(n){return arguments.length?(t="function"===typeof n?n:(0,r.Z)(+n),a):t},a.y=function(t){return arguments.length?(n="function"===typeof t?t:(0,r.Z)(+t),a):n},a.defined=function(t){return arguments.length?(e="function"===typeof t?t:(0,r.Z)(!!t),a):e},a.curve=function(t){return arguments.length?(l=t,null!=c&&(s=l(c)),a):l},a.context=function(t){return arguments.length?(null==t?c=s=null:s=l(c=t),a):c},a}},98930:function(t,n,e){function i(t){return t[0]}function r(t){return t[1]}e.d(n,{x:function(){return i},y:function(){return r}})}}]);
|