mage-ai 0.9.14__py3-none-any.whl → 0.9.15__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.

Files changed (138) hide show
  1. mage_ai/api/resources/PipelineRunResource.py +8 -5
  2. mage_ai/data_preparation/executors/block_executor.py +5 -7
  3. mage_ai/data_preparation/templates/constants.py +16 -0
  4. mage_ai/data_preparation/templates/data_exporters/mssql.py +32 -0
  5. mage_ai/data_preparation/templates/data_loaders/mssql.py +27 -0
  6. mage_ai/io/base.py +5 -0
  7. mage_ai/io/mssql.py +1 -0
  8. mage_ai/orchestration/db/models/base.py +15 -15
  9. mage_ai/orchestration/db/models/oauth.py +35 -4
  10. mage_ai/orchestration/pipeline_scheduler.py +12 -6
  11. mage_ai/server/constants.py +1 -1
  12. mage_ai/server/frontend_dist/404.html +2 -2
  13. mage_ai/server/frontend_dist/404.html.html +2 -2
  14. mage_ai/server/frontend_dist/_next/static/chunks/{2786-f71862671f66d948.js → 2786-756b3834d10b8711.js} +1 -1
  15. mage_ai/server/frontend_dist/_next/static/chunks/3391-e1578fe1bdb5a557.js +1 -0
  16. mage_ai/server/frontend_dist/_next/static/chunks/6299-9b785c07dacf22b3.js +1 -0
  17. mage_ai/server/frontend_dist/_next/static/chunks/8952-050e60a8b1eaa32a.js +1 -0
  18. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-03841b6dd7d240f6.js +1 -0
  19. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-6e2c0e3f818fd4de.js +1 -0
  20. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-6e59dc4e57dd2680.js +1 -0
  21. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-02295848c811e26a.js +1 -0
  22. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/{[...slug]-ce11db27e4af7869.js → [...slug]-91889109af36a793.js} +1 -1
  23. mage_ai/server/frontend_dist/_next/static/{CNjkRIWPaAu1yJUmIaX_q → h5mR3pjfn_EQy348CZ_ok}/_buildManifest.js +1 -1
  24. mage_ai/server/frontend_dist/files.html +2 -2
  25. mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
  26. mage_ai/server/frontend_dist/global-data-products.html +2 -2
  27. mage_ai/server/frontend_dist/index.html +2 -2
  28. mage_ai/server/frontend_dist/manage/settings.html +2 -2
  29. mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
  30. mage_ai/server/frontend_dist/manage/users/new.html +2 -2
  31. mage_ai/server/frontend_dist/manage/users.html +2 -2
  32. mage_ai/server/frontend_dist/manage.html +2 -2
  33. mage_ai/server/frontend_dist/overview.html +2 -2
  34. mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
  35. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  36. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
  37. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  38. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
  39. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  40. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  41. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
  42. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
  43. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
  44. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
  45. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
  46. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  47. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
  48. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  49. mage_ai/server/frontend_dist/pipelines.html +2 -2
  50. mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
  51. mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
  52. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
  53. mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
  54. mage_ai/server/frontend_dist/settings.html +2 -2
  55. mage_ai/server/frontend_dist/sign-in.html +2 -2
  56. mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
  57. mage_ai/server/frontend_dist/templates.html +2 -2
  58. mage_ai/server/frontend_dist/terminal.html +2 -2
  59. mage_ai/server/frontend_dist/test.html +2 -2
  60. mage_ai/server/frontend_dist/triggers.html +2 -2
  61. mage_ai/server/frontend_dist/version-control.html +2 -2
  62. mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
  63. mage_ai/server/frontend_dist_base_path_template/404.html.html +2 -2
  64. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{2786-f71862671f66d948.js → 2786-756b3834d10b8711.js} +1 -1
  65. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3391-e1578fe1bdb5a557.js +1 -0
  66. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6299-9b785c07dacf22b3.js +1 -0
  67. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8952-050e60a8b1eaa32a.js +1 -0
  68. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-03841b6dd7d240f6.js +1 -0
  69. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-6e2c0e3f818fd4de.js +1 -0
  70. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-6e59dc4e57dd2680.js +1 -0
  71. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-02295848c811e26a.js +1 -0
  72. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/{[...slug]-ce11db27e4af7869.js → [...slug]-91889109af36a793.js} +1 -1
  73. mage_ai/server/frontend_dist_base_path_template/_next/static/{yJvL-3bfsNF3WCStZ10Dm → xykYLW_ARw5SevdiponLI}/_buildManifest.js +1 -1
  74. mage_ai/server/frontend_dist_base_path_template/files.html +2 -2
  75. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +2 -2
  76. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +2 -2
  77. mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
  78. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +2 -2
  79. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +2 -2
  80. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +2 -2
  81. mage_ai/server/frontend_dist_base_path_template/manage/users.html +2 -2
  82. mage_ai/server/frontend_dist_base_path_template/manage.html +2 -2
  83. mage_ai/server/frontend_dist_base_path_template/overview.html +2 -2
  84. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +2 -2
  85. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  86. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +2 -2
  87. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
  88. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +2 -2
  89. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  90. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  91. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +2 -2
  92. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +2 -2
  93. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +2 -2
  94. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +2 -2
  95. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +2 -2
  96. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  97. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +2 -2
  98. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
  99. mage_ai/server/frontend_dist_base_path_template/pipelines.html +2 -2
  100. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +2 -2
  101. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +2 -2
  102. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +2 -2
  103. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +2 -2
  104. mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
  105. mage_ai/server/frontend_dist_base_path_template/sign-in.html +2 -2
  106. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +2 -2
  107. mage_ai/server/frontend_dist_base_path_template/templates.html +2 -2
  108. mage_ai/server/frontend_dist_base_path_template/terminal.html +2 -2
  109. mage_ai/server/frontend_dist_base_path_template/test.html +2 -2
  110. mage_ai/server/frontend_dist_base_path_template/triggers.html +2 -2
  111. mage_ai/server/frontend_dist_base_path_template/version-control.html +2 -2
  112. mage_ai/server/server.py +12 -1
  113. mage_ai/shared/retry.py +1 -1
  114. {mage_ai-0.9.14.dist-info → mage_ai-0.9.15.dist-info}/METADATA +1 -1
  115. {mage_ai-0.9.14.dist-info → mage_ai-0.9.15.dist-info}/RECORD +123 -122
  116. mage_ai/server/frontend_dist/_next/static/chunks/3391-6f0a0a5c254cd7f2.js +0 -1
  117. mage_ai/server/frontend_dist/_next/static/chunks/6299-fcb702d0f3d3291b.js +0 -1
  118. mage_ai/server/frontend_dist/_next/static/chunks/8952-9d6fa18fa9378989.js +0 -1
  119. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-2dc2a0dfc0ff620d.js +0 -1
  120. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-6577159a0af52a78.js +0 -1
  121. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-54cb4936accdd2d9.js +0 -1
  122. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-d331e98ad103b13e.js +0 -1
  123. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3391-6f0a0a5c254cd7f2.js +0 -1
  124. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6299-fcb702d0f3d3291b.js +0 -1
  125. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8952-9d6fa18fa9378989.js +0 -1
  126. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-2dc2a0dfc0ff620d.js +0 -1
  127. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-6577159a0af52a78.js +0 -1
  128. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-54cb4936accdd2d9.js +0 -1
  129. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-d331e98ad103b13e.js +0 -1
  130. mage_ai/tests/orchestration/db/test_models.py +0 -710
  131. /mage_ai/server/frontend_dist/_next/static/{CNjkRIWPaAu1yJUmIaX_q → h5mR3pjfn_EQy348CZ_ok}/_middlewareManifest.js +0 -0
  132. /mage_ai/server/frontend_dist/_next/static/{CNjkRIWPaAu1yJUmIaX_q → h5mR3pjfn_EQy348CZ_ok}/_ssgManifest.js +0 -0
  133. /mage_ai/server/frontend_dist_base_path_template/_next/static/{yJvL-3bfsNF3WCStZ10Dm → xykYLW_ARw5SevdiponLI}/_middlewareManifest.js +0 -0
  134. /mage_ai/server/frontend_dist_base_path_template/_next/static/{yJvL-3bfsNF3WCStZ10Dm → xykYLW_ARw5SevdiponLI}/_ssgManifest.js +0 -0
  135. {mage_ai-0.9.14.dist-info → mage_ai-0.9.15.dist-info}/LICENSE +0 -0
  136. {mage_ai-0.9.14.dist-info → mage_ai-0.9.15.dist-info}/WHEEL +0 -0
  137. {mage_ai-0.9.14.dist-info → mage_ai-0.9.15.dist-info}/entry_points.txt +0 -0
  138. {mage_ai-0.9.14.dist-info → mage_ai-0.9.15.dist-info}/top_level.txt +0 -0
@@ -60,12 +60,15 @@ class PipelineRunResource(DatabaseResource):
60
60
  else:
61
61
  order_by.append((parts[0], 'asc'))
62
62
 
63
+ repo_pipeline_schedule_ids = [s.id for s in PipelineSchedule.repo_query]
64
+
63
65
  results = (
64
- PipelineRun.
65
- query.
66
- options(selectinload(PipelineRun.block_runs)).
67
- options(selectinload(PipelineRun.pipeline_schedule)).
68
- join(PipelineSchedule, PipelineRun.pipeline_schedule_id == PipelineSchedule.id)
66
+ PipelineRun
67
+ .query
68
+ .filter(PipelineRun.pipeline_schedule_id.in_(repo_pipeline_schedule_ids))
69
+ .options(selectinload(PipelineRun.block_runs))
70
+ .options(selectinload(PipelineRun.pipeline_schedule))
71
+ .join(PipelineSchedule, PipelineRun.pipeline_schedule_id == PipelineSchedule.id)
69
72
  )
70
73
 
71
74
  if global_data_product_uuid is not None:
@@ -252,20 +252,18 @@ class BlockExecutor:
252
252
  )
253
253
 
254
254
  result = __execute_with_retry()
255
- except Exception as e:
255
+ except Exception as error:
256
256
  self.logger.exception(
257
257
  f'Failed to execute block {self.block.uuid}',
258
258
  **merge_dict(tags, dict(
259
- block_type=self.block.type,
260
- block_uuid=self.block.uuid,
261
- error=e
259
+ error=error,
262
260
  )),
263
261
  )
264
262
  if on_failure is not None:
265
263
  on_failure(
266
264
  self.block_uuid,
267
265
  error=dict(
268
- error=str(e),
266
+ error=error,
269
267
  errors=traceback.format_stack(),
270
268
  message=traceback.format_exc(),
271
269
  ),
@@ -285,7 +283,7 @@ class BlockExecutor:
285
283
  logging_tags=tags,
286
284
  pipeline_run=pipeline_run,
287
285
  )
288
- raise e
286
+ raise error
289
287
  self.logger.info(f'Finish executing block with {self.__class__.__name__}.', **tags)
290
288
  if on_complete is not None:
291
289
  on_complete(self.block_uuid)
@@ -537,7 +535,7 @@ class BlockExecutor:
537
535
  tags: Dict = None,
538
536
  ):
539
537
  """
540
- Update the status of block run by edither updating the BlockRun db object or making
538
+ Update the status of block run by either updating the BlockRun db object or making
541
539
  API call
542
540
 
543
541
  Args:
@@ -51,6 +51,14 @@ TEMPLATES = [
51
51
  name='MongoDB',
52
52
  path='data_loaders/mongodb.py',
53
53
  ),
54
+ dict(
55
+ block_type=BlockType.DATA_LOADER,
56
+ description='Load data from MSSQL.',
57
+ groups=[GROUP_DATABASES],
58
+ language=BlockLanguage.PYTHON,
59
+ name='MSSQL',
60
+ path='data_loaders/mssql.py',
61
+ ),
54
62
  dict(
55
63
  block_type=BlockType.DATA_EXPORTER,
56
64
  description='Export data to a Delta Table in Amazon S3.',
@@ -82,6 +90,14 @@ TEMPLATES = [
82
90
  name='MongoDB',
83
91
  path='data_exporters/mongodb.py',
84
92
  ),
93
+ dict(
94
+ block_type=BlockType.DATA_EXPORTER,
95
+ description='Export data to MSSQL.',
96
+ groups=[GROUP_DATABASES],
97
+ language=BlockLanguage.PYTHON,
98
+ name='MSSQL',
99
+ path='data_exporters/mssql.py',
100
+ ),
85
101
  dict(
86
102
  block_type=BlockType.DATA_LOADER,
87
103
  description='Trigger another pipeline to run.',
@@ -0,0 +1,32 @@
1
+ from mage_ai.settings.repo import get_repo_path
2
+ from mage_ai.io.config import ConfigFileLoader
3
+ from mage_ai.io.mssql import MSSQL
4
+ from pandas import DataFrame
5
+ from os import path
6
+
7
+ if 'data_exporter' not in globals():
8
+ from mage_ai.data_preparation.decorators import data_exporter
9
+
10
+
11
+ @data_exporter
12
+ def export_data_to_mssql(df: DataFrame, **kwargs) -> None:
13
+ """
14
+ Template for exporting data to a MSSQL database.
15
+ Specify your configuration settings in 'io_config.yaml'.
16
+ Set the following in your io_config:
17
+
18
+ Docs: https://docs.mage.ai/integrations/databases/MicrosoftSQLServer
19
+ """
20
+ schema_name = 'dbo' # Specify the name of the schema to export data to
21
+ table_name = 'your_table_name' # Specify the name of the table to export data to
22
+ config_path = path.join(get_repo_path(), 'io_config.yaml')
23
+ config_profile = 'default'
24
+
25
+ with MSSQL.with_config(ConfigFileLoader(config_path, config_profile)) as loader:
26
+ loader.export(
27
+ df,
28
+ schema_name,
29
+ table_name,
30
+ index=False, # Specifies whether to include index in exported table
31
+ if_exists='replace', # Specify resolution policy if table name already exists
32
+ )
@@ -0,0 +1,27 @@
1
+ {% extends "data_loaders/default.jinja" %}
2
+ {% block imports %}
3
+ from mage_ai.settings.repo import get_repo_path
4
+ from mage_ai.io.config import ConfigFileLoader
5
+ from mage_ai.io.mssql import MSSQL
6
+ from os import path
7
+ {{ super() -}}
8
+ {% endblock %}
9
+
10
+
11
+ {% block content %}
12
+ @data_loader
13
+ def load_data_from_mssql(*args, **kwargs):
14
+ """
15
+ Template for loading data from a MSSQL database.
16
+ Specify your configuration settings in 'io_config.yaml'.
17
+ Set the following in your io_config:
18
+
19
+ Docs: https://docs.mage.ai/integrations/databases/MicrosoftSQLServer
20
+ """
21
+ query = 'Your MSSQL query' # Specify your SQL query here
22
+ config_path = path.join(get_repo_path(), 'io_config.yaml')
23
+ config_profile = 'default'
24
+
25
+ with MSSQL.with_config(ConfigFileLoader(config_path, config_profile)) as loader:
26
+ return loader.load(query)
27
+ {% endblock %}
mage_ai/io/base.py CHANGED
@@ -35,6 +35,7 @@ class FileFormat(str, Enum):
35
35
  JSON = 'json'
36
36
  PARQUET = 'parquet'
37
37
  HDF5 = 'hdf5'
38
+ XML = 'xml'
38
39
 
39
40
 
40
41
  class ExportWritePolicy(str, Enum):
@@ -137,6 +138,8 @@ class BaseFile(BaseIO):
137
138
  return pd.read_parquet
138
139
  elif format == FileFormat.HDF5:
139
140
  return pd.read_hdf
141
+ elif format == FileFormat.XML:
142
+ return pd.read_xml
140
143
  else:
141
144
  raise ValueError(f'Invalid format \'{format}\' specified.')
142
145
 
@@ -226,6 +229,8 @@ class BaseFile(BaseIO):
226
229
  return df.to_json
227
230
  elif format == FileFormat.HDF5:
228
231
  return df.to_hdf
232
+ elif format == FileFormat.XML:
233
+ return df.to_xml
229
234
  return df.to_parquet
230
235
 
231
236
  def __del__(self):
mage_ai/io/mssql.py CHANGED
@@ -142,6 +142,7 @@ class MSSQL(BaseSQL):
142
142
  # Remove extraneous surrounding double quotes
143
143
  # that get added while performing conversion to string.
144
144
  df_[col] = df_[col].apply(lambda x: x.strip('"') if x and isinstance(x, str) else x)
145
+ df_.replace({np.NaN: None}, inplace=True)
145
146
  for _, row in df_.iterrows():
146
147
  values.append(tuple(row))
147
148
 
@@ -1,15 +1,13 @@
1
1
  from datetime import datetime
2
- from mage_ai.orchestration.db import db_connection, safe_db_query
3
- from mage_ai.shared.strings import camel_to_snake_case
4
- from sqlalchemy import (
5
- Column,
6
- DateTime,
7
- Integer,
8
- )
9
- from sqlalchemy.ext.declarative import declared_attr, declarative_base
2
+ from typing import Dict
3
+
4
+ from sqlalchemy import Column, DateTime, Integer
5
+ from sqlalchemy.ext.declarative import declarative_base, declared_attr
10
6
  from sqlalchemy.orm.collections import InstrumentedList
11
7
  from sqlalchemy.sql import func
12
- from typing import Dict
8
+
9
+ from mage_ai.orchestration.db import db_connection, safe_db_query
10
+ from mage_ai.shared.strings import camel_to_snake_case
13
11
 
14
12
  Base = declarative_base()
15
13
 
@@ -76,14 +74,16 @@ class BaseModel(Base):
76
74
  raise e
77
75
 
78
76
  def update(self, **kwargs) -> None:
77
+ commit = kwargs.pop('commit', True)
79
78
  for key, value in kwargs.items():
80
79
  if hasattr(self, key):
81
80
  setattr(self, key, value)
82
- try:
83
- self.session.commit()
84
- except Exception as e:
85
- self.session.rollback()
86
- raise e
81
+ if commit:
82
+ try:
83
+ self.session.commit()
84
+ except Exception as e:
85
+ self.session.rollback()
86
+ raise e
87
87
 
88
88
  def delete(self, commit: bool = True) -> None:
89
89
  self.session.delete(self)
@@ -97,7 +97,7 @@ class BaseModel(Base):
97
97
  def refresh(self):
98
98
  self.session.refresh(self)
99
99
 
100
- def to_dict(self, include_attributes=[]) -> Dict:
100
+ def to_dict(self, include_attributes=None) -> Dict:
101
101
  def __format_value(value):
102
102
  if type(value) is datetime:
103
103
  return str(value)
@@ -21,6 +21,7 @@ from mage_ai.orchestration.db import db_connection, safe_db_query
21
21
  from mage_ai.orchestration.db.errors import ValidationError
22
22
  from mage_ai.orchestration.db.models.base import BaseModel
23
23
  from mage_ai.settings.repo import get_repo_path
24
+ from mage_ai.shared.array import find
24
25
 
25
26
 
26
27
  class User(BaseModel):
@@ -161,10 +162,19 @@ class Role(BaseModel):
161
162
  entity: Entity = None,
162
163
  entity_id: str = None,
163
164
  prefix: str = None,
164
- ):
165
+ ) -> None:
166
+ """
167
+ Create default roles with associated permissions for a given entity and entity_id.
168
+
169
+ Args:
170
+ entity (Entity): The entity for which roles and permissions are being created
171
+ (default: Entity.GLOBAL).
172
+ entity_id (str): The unique identifier for the entity.
173
+ prefix (str): A prefix to prepend to the default role names (optional).
174
+ """
165
175
  if entity is None:
166
176
  entity = Entity.GLOBAL
167
- Permission.create_default_permissions(entity=entity, entity_id=entity_id)
177
+ permissions = Permission.create_default_permissions(entity=entity, entity_id=entity_id)
168
178
  mapping = {
169
179
  self.DefaultRole.OWNER: Permission.Access.OWNER,
170
180
  self.DefaultRole.ADMIN: Permission.Access.ADMIN,
@@ -188,6 +198,14 @@ class Role(BaseModel):
188
198
  ],
189
199
  commit=False,
190
200
  )
201
+ elif permissions:
202
+ permission = find(lambda p, a=access: p.access == a.value, permissions)
203
+ if permission:
204
+ role.update(
205
+ permissions=role.permissions + [permission],
206
+ commit=False,
207
+ )
208
+
191
209
  db_connection.session.commit()
192
210
 
193
211
  @classmethod
@@ -279,15 +297,28 @@ class Permission(BaseModel):
279
297
  entity: Entity = None,
280
298
  entity_id: str = None,
281
299
  ) -> List['Permission']:
300
+ """
301
+ Create default permissions for the given entity and entitiy_id. The permissions
302
+ will only be created if they do not exist already.
303
+
304
+ Args:
305
+ entity (Entity): The entity for which permissions are being created.
306
+ entity_id (str): The unique identifier for the entity.
307
+
308
+ Returns:
309
+ List[Permission]: The list of permissions created. The list will be empty if
310
+ the permissions already exist.
311
+ """
282
312
  if entity is None:
283
313
  entity = Entity.GLOBAL
284
314
  permissions = self.query.filter(
285
315
  self.entity == entity,
286
316
  self.entity_id == entity_id,
287
317
  ).all()
318
+ new_permissions = []
288
319
  if len(permissions) == 0:
289
320
  for access in [a.value for a in Permission.Access]:
290
- permissions.append(
321
+ new_permissions.append(
291
322
  self.create(
292
323
  entity=entity,
293
324
  entity_id=entity_id,
@@ -296,7 +327,7 @@ class Permission(BaseModel):
296
327
  )
297
328
  )
298
329
  db_connection.session.commit()
299
- return permissions
330
+ return new_permissions
300
331
 
301
332
 
302
333
  class Oauth2Application(BaseModel):
@@ -305,17 +305,23 @@ class PipelineScheduler:
305
305
  status=BlockRun.BlockRunStatus.FAILED,
306
306
  )
307
307
 
308
- update_status()
308
+ error = kwargs.get('error', {})
309
+ if error:
310
+ metrics['error'] = dict(
311
+ error=str(error.get('error')),
312
+ errors=error.get('errors'),
313
+ message=error.get('message')
314
+ )
309
315
 
310
- if 'error' in kwargs:
311
- metrics['error'] = kwargs['error']
316
+ update_status()
312
317
 
313
318
  tags = self.build_tags(
314
319
  block_run_id=block_run.id,
315
320
  block_uuid=block_run.block_uuid,
321
+ error=error.get('error')
316
322
  )
317
323
 
318
- self.logger.info(
324
+ self.logger.exception(
319
325
  f'BlockRun {block_run.id} (block_uuid: {block_uuid}) failed.',
320
326
  **tags,
321
327
  )
@@ -866,11 +872,11 @@ def run_integration_stream(
866
872
  data_exporter_uuid = f'{data_exporter_block.uuid}:{tap_stream_id}:{idx}'
867
873
 
868
874
  data_loader_block_run = find(
869
- lambda b: b.block_uuid == data_loader_uuid,
875
+ lambda b, u=data_loader_uuid: b.block_uuid == u,
870
876
  all_block_runs,
871
877
  )
872
878
  data_exporter_block_run = find(
873
- lambda b: b.block_uuid == data_exporter_uuid,
879
+ lambda b, u=data_exporter_uuid: b.block_uuid == u,
874
880
  block_runs_for_stream,
875
881
  )
876
882
  if not data_loader_block_run or not data_exporter_block_run:
@@ -12,4 +12,4 @@ DATAFRAME_OUTPUT_SAMPLE_COUNT = 10
12
12
  # Dockerfile depends on it because it runs ./scripts/install_mage.sh and uses
13
13
  # the last line to determine the version to install.
14
14
  VERSION = \
15
- '0.9.14'
15
+ '0.9.15'
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=0" name="viewport"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link href="/favicon.ico" rel="icon"/><link rel="preload" href="/_next/static/css/d1e8e64d0b07af2f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/d1e8e64d0b07af2f.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-5cd94c89d3acac5f.js"></script><script src="/_next/static/chunks/webpack-8f51011a10b384a1.js" defer=""></script><script src="/_next/static/chunks/framework-7c365855dab1bf41.js" defer=""></script><script src="/_next/static/chunks/main-714e8aae7672e1fc.js" defer=""></script><script src="/_next/static/chunks/pages/_app-9dae6fa5126cf001.js" defer=""></script><script src="/_next/static/chunks/pages/_error-235304e5badb19eb.js" defer=""></script><script src="/_next/static/CNjkRIWPaAu1yJUmIaX_q/_buildManifest.js" defer=""></script><script src="/_next/static/CNjkRIWPaAu1yJUmIaX_q/_ssgManifest.js" defer=""></script><script src="/_next/static/CNjkRIWPaAu1yJUmIaX_q/_middlewareManifest.js" defer=""></script><style data-styled="" data-styled-version="5.3.6">html{-webkit-box-sizing:border-box;box-sizing:border-box;-ms-overflow-style:scrollbar;}/*!sc*/
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=0" name="viewport"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link href="/favicon.ico" rel="icon"/><link rel="preload" href="/_next/static/css/d1e8e64d0b07af2f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/d1e8e64d0b07af2f.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-5cd94c89d3acac5f.js"></script><script src="/_next/static/chunks/webpack-8f51011a10b384a1.js" defer=""></script><script src="/_next/static/chunks/framework-7c365855dab1bf41.js" defer=""></script><script src="/_next/static/chunks/main-714e8aae7672e1fc.js" defer=""></script><script src="/_next/static/chunks/pages/_app-9dae6fa5126cf001.js" defer=""></script><script src="/_next/static/chunks/pages/_error-235304e5badb19eb.js" defer=""></script><script src="/_next/static/h5mR3pjfn_EQy348CZ_ok/_buildManifest.js" defer=""></script><script src="/_next/static/h5mR3pjfn_EQy348CZ_ok/_ssgManifest.js" defer=""></script><script src="/_next/static/h5mR3pjfn_EQy348CZ_ok/_middlewareManifest.js" defer=""></script><style data-styled="" data-styled-version="5.3.6">html{-webkit-box-sizing:border-box;box-sizing:border-box;-ms-overflow-style:scrollbar;}/*!sc*/
2
2
  *,*::before,*::after{-webkit-box-sizing:inherit;box-sizing:inherit;}/*!sc*/
3
3
  data-styled.g4[id="sc-global-czSCUT1"]{content:"sc-global-czSCUT1,"}/*!sc*/
4
4
  .kOVcuR .Toastify__toast-container{margin-top:24px;padding:0 !important;width:500px !important;}/*!sc*/
@@ -19,4 +19,4 @@ data-styled.g5[id="ToastWrapper-sc-1a33ph1-0"]{content:"kOVcuR,"}/*!sc*/
19
19
  .next-error-h1 {
20
20
  border-right: 1px solid rgba(255, 255, 255, .3);
21
21
  }
22
- }</style><h1 class="next-error-h1" style="display:inline-block;margin:0;margin-right:20px;padding:10px 23px 10px 0;font-size:24px;font-weight:500;vertical-align:top">404<!-- --></h1><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0">This page could not be found<!-- -->.<!-- --></h2></div></div></div><div></div><div></div><div></div><div class="ToastWrapper-sc-1a33ph1-0 kOVcuR"><div class="Toastify"></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404},"currentTheme":{"accent":{"alert":"#F6540B","blue":"#4877FF","blueLight":"rgba(72, 119, 255, 0.5)","contentDefaultTransparent":"rgba(174, 174, 174, 0.5)","cyan":"#65E3FF","cyanLight":"rgba(101, 227, 255, 0.3)","cyanTransparent":"rgba(101, 227, 255, 0.12)","dbt":"#fc6949","dbtLight":"rgba(252, 105, 73, 0.5)","info":"#00ABFF","infoTransparent":"rgba(0, 171, 255, 0.5)","negative":"#FF1E59","negativeTransparent":"rgba(255, 30, 89, 0.3)","pink":"#FF4FF8","pinkLight":"rgb(255, 79, 248, 0.5)","positive":"#00A81A","primaryTransparent":"rgba(155, 108, 167, 0.5)","purple":"#7D55EC","purpleLight":"rgba(125, 85, 236, 0.5)","rose":"#D1A2AB","roseLight":"rgba(209, 162, 171, 0.5)","sky":"#6AA1E0","skyLight":"rgba(106, 161, 224, 0.05)","teal":"#00B4CC","tealLight":"rgba(0, 180, 204, 0.5)","warning":"#DD9900","warningTransparent":"rgba(221, 153, 0, 0.5)","yellow":"#FFCC19","yellowLight":"rgba(255, 204, 25, 0.5)"},"background":{"chartBlock":"#2E3036","codeArea":"#1E1F24","codeTextarea":"#000000","content":"#1B1C20","danger":"#FFD0DB","dark":"#B1B8C3","dashboard":"#18181C","header":"#1B1B1B","menu":"#0F4CFF","muted":"#F9FAFC","navigation":"#EDEDED","output":"#2E3036","page":"#1E1F24","panel":"#232429","popup":"#27292E","row":"#2C2C2C","row2":"#51535C","scrollbarThumb":"rgba(100, 100, 100, 0.5)","scrollbarThumbHover":"rgba(255, 255, 255, 0.3)","scrollbarTrack":"#2E3036","success":"#8ADE00","successLight":"rgb(138, 222, 0, 0.3)","table":"#292A2F","tag":"#3A4550"},"borders":{"button":"#454850","contrast":"#FFFFFF","danger":"#FF144D","dark":"#000000","info":"#FFCC19","light":"#2F3034","medium":"#1C1C1C","medium2":"#141414","success":"#2FCB52"},"brand":{"earth100":"#C6EEDB","earth200":"#9DDFBF","earth300":"#6BBF96","earth400":"#37A46F","earth400Transparent":"rgba(55, 164, 111, 0.4)","earth500":"#00954C","energy100":"#FFF4BA","energy200":"#FFED92","energy300":"#FFE662","energy400":"#FFDA19","energy400Transparent":"rgba(255, 218, 25, 0.04)","energy500":"#F6C000","fire100":"#FFD7E0","fire200":"#FFA3B9","fire300":"#FF547D","fire400":"#FF144D","fire400Transparent":"rgba(255, 20, 77, 0.4)","fire500":"#EB0032","stone100":"#F3E6D7","stone200":"#E3D4C2","stone400":"#BFA78B","stone500":"#AF8859","water100":"#BDCEFF","water200":"#81A1FF","water300":"#517DFF","water400":"#2A60FE","water400Transparent":"rgba(42, 96, 254, 0.4)","water500":"#0F4CFF","wind100":"#EEEAFF","wind200":"#CCC1F4","wind300":"#A698DD","wind400":"#6B50D7","wind400SuperTransparent":"rgba(107, 80, 215, 0.12)","wind400Transparent":"rgba(107, 80, 215, 0.4)","wind500":"#4E32BC"},"chart":{"backgroundPrimary":"#7D55EC","backgroundSecondary":"#FF144D","backgroundTertiary":"#86E2FF","button1":"#4877FF","button2":"#FFCC19","button3":"#8ADE00","button4":"#FF4FF8","button5":"#B98D95","lines":"#9B6CA7","primary":"#6B50D7","secondary":"#FF144D","tertiary":"#2A60FE"},"content":{"active":"#FFFFFF","default":"#AEAEAE","disabled":"rgba(255, 255, 255, 0.3)","inverted":"#2C2C2C","muted":"#787A85"},"elevation":{"visualizationAccent":"#996CFF","visualizationAccentAlt":"#C1ACF7"},"feature":{"active":"rgba(250, 248, 254, 0.14)","disabled":"rgba(201, 206, 218, 0.12)"},"icons":{"neutral":"#787878"},"interactive":{"activeBorder":"#060606","checked":"#060606","dangerBorder":"#FF144D","defaultBackground":"#36383F","defaultBorder":"#2E3036","disabledBorder":"#B1B8C3","focusBackground":"#B1B8C3","focusBorder":"#86E2FF","hoverBackground":"#4E4E4E","hoverBorder":"#B9BFCA","hoverOverlay":"rgba(255, 255, 255, 0.1)","linkPrimary":"#1752FF","linkPrimaryHover":"#4877FF","linkPrimaryLight":"#5982ff","linkSecondary":"#6B50D7","linkSecondaryDisabled":"#C4B9EF","linkText":"#6AA1E0","linkTextLight":"#9ECBFF","rowHoverBackground":"rgba(0, 0, 0, 0.1)","transparent":"rgba(255, 255, 255, 0)"},"loader":{"color":"#EB0032","colorInverted":"#8ADE00"},"logo":{"color":"#FFFFFF"},"monotone":{"black":"#060606","blackTransparent":"rgba(0, 0, 0, 0.6)","gray":"#B1B8C3","grey100":"#F2F2F2","grey200":"#D5D7DC","grey300":"#B4B8C0","grey400":"#70747C","grey500":"#51535C","purple":"#6B50D7","white":"#FFFFFF","whiteTransparent":"rgba(255, 255, 255, 0.6)"},"neutral":{"n100":"#E7E8EA","n200":"#D8DADE","n300":"#CBCCD0","n400":"#BCBEC4","n500":"#AEB0B6"},"progress":{"negative":"#FF144D","positive":"#6B50D7"},"shadow":{"base":"12px 40px 120px rgba(106, 117, 139, 0.4)","frame":"0px 10px 40px rgba(0, 0, 0, 0.26)","menu":"4px 10px 20px rgba(6, 6, 6, 0.12)","popup":"10px 20px 40px rgba(0, 0, 0, 0.2)","small":"0px, 4px, rgba(0, 0, 0, 0.25)","window":"0px 10px 60px rgba(0, 0, 0, 0.7)"},"status":{"negative":"#FF144D","positive":"#24B400"},"text":{"fileBrowser":"#787A85"}}},"page":"/_error","query":{},"buildId":"CNjkRIWPaAu1yJUmIaX_q","nextExport":true,"isFallback":false,"gip":true,"appGip":true,"scriptLoader":[]}</script></body></html>
22
+ }</style><h1 class="next-error-h1" style="display:inline-block;margin:0;margin-right:20px;padding:10px 23px 10px 0;font-size:24px;font-weight:500;vertical-align:top">404<!-- --></h1><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0">This page could not be found<!-- -->.<!-- --></h2></div></div></div><div></div><div></div><div></div><div class="ToastWrapper-sc-1a33ph1-0 kOVcuR"><div class="Toastify"></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404},"currentTheme":{"accent":{"alert":"#F6540B","blue":"#4877FF","blueLight":"rgba(72, 119, 255, 0.5)","contentDefaultTransparent":"rgba(174, 174, 174, 0.5)","cyan":"#65E3FF","cyanLight":"rgba(101, 227, 255, 0.3)","cyanTransparent":"rgba(101, 227, 255, 0.12)","dbt":"#fc6949","dbtLight":"rgba(252, 105, 73, 0.5)","info":"#00ABFF","infoTransparent":"rgba(0, 171, 255, 0.5)","negative":"#FF1E59","negativeTransparent":"rgba(255, 30, 89, 0.3)","pink":"#FF4FF8","pinkLight":"rgb(255, 79, 248, 0.5)","positive":"#00A81A","primaryTransparent":"rgba(155, 108, 167, 0.5)","purple":"#7D55EC","purpleLight":"rgba(125, 85, 236, 0.5)","rose":"#D1A2AB","roseLight":"rgba(209, 162, 171, 0.5)","sky":"#6AA1E0","skyLight":"rgba(106, 161, 224, 0.05)","teal":"#00B4CC","tealLight":"rgba(0, 180, 204, 0.5)","warning":"#DD9900","warningTransparent":"rgba(221, 153, 0, 0.5)","yellow":"#FFCC19","yellowLight":"rgba(255, 204, 25, 0.5)"},"background":{"chartBlock":"#2E3036","codeArea":"#1E1F24","codeTextarea":"#000000","content":"#1B1C20","danger":"#FFD0DB","dark":"#B1B8C3","dashboard":"#18181C","header":"#1B1B1B","menu":"#0F4CFF","muted":"#F9FAFC","navigation":"#EDEDED","output":"#2E3036","page":"#1E1F24","panel":"#232429","popup":"#27292E","row":"#2C2C2C","row2":"#51535C","scrollbarThumb":"rgba(100, 100, 100, 0.5)","scrollbarThumbHover":"rgba(255, 255, 255, 0.3)","scrollbarTrack":"#2E3036","success":"#8ADE00","successLight":"rgb(138, 222, 0, 0.3)","table":"#292A2F","tag":"#3A4550"},"borders":{"button":"#454850","contrast":"#FFFFFF","danger":"#FF144D","dark":"#000000","info":"#FFCC19","light":"#2F3034","medium":"#1C1C1C","medium2":"#141414","success":"#2FCB52"},"brand":{"earth100":"#C6EEDB","earth200":"#9DDFBF","earth300":"#6BBF96","earth400":"#37A46F","earth400Transparent":"rgba(55, 164, 111, 0.4)","earth500":"#00954C","energy100":"#FFF4BA","energy200":"#FFED92","energy300":"#FFE662","energy400":"#FFDA19","energy400Transparent":"rgba(255, 218, 25, 0.04)","energy500":"#F6C000","fire100":"#FFD7E0","fire200":"#FFA3B9","fire300":"#FF547D","fire400":"#FF144D","fire400Transparent":"rgba(255, 20, 77, 0.4)","fire500":"#EB0032","stone100":"#F3E6D7","stone200":"#E3D4C2","stone400":"#BFA78B","stone500":"#AF8859","water100":"#BDCEFF","water200":"#81A1FF","water300":"#517DFF","water400":"#2A60FE","water400Transparent":"rgba(42, 96, 254, 0.4)","water500":"#0F4CFF","wind100":"#EEEAFF","wind200":"#CCC1F4","wind300":"#A698DD","wind400":"#6B50D7","wind400SuperTransparent":"rgba(107, 80, 215, 0.12)","wind400Transparent":"rgba(107, 80, 215, 0.4)","wind500":"#4E32BC"},"chart":{"backgroundPrimary":"#7D55EC","backgroundSecondary":"#FF144D","backgroundTertiary":"#86E2FF","button1":"#4877FF","button2":"#FFCC19","button3":"#8ADE00","button4":"#FF4FF8","button5":"#B98D95","lines":"#9B6CA7","primary":"#6B50D7","secondary":"#FF144D","tertiary":"#2A60FE"},"content":{"active":"#FFFFFF","default":"#AEAEAE","disabled":"rgba(255, 255, 255, 0.3)","inverted":"#2C2C2C","muted":"#787A85"},"elevation":{"visualizationAccent":"#996CFF","visualizationAccentAlt":"#C1ACF7"},"feature":{"active":"rgba(250, 248, 254, 0.14)","disabled":"rgba(201, 206, 218, 0.12)"},"icons":{"neutral":"#787878"},"interactive":{"activeBorder":"#060606","checked":"#060606","dangerBorder":"#FF144D","defaultBackground":"#36383F","defaultBorder":"#2E3036","disabledBorder":"#B1B8C3","focusBackground":"#B1B8C3","focusBorder":"#86E2FF","hoverBackground":"#4E4E4E","hoverBorder":"#B9BFCA","hoverOverlay":"rgba(255, 255, 255, 0.1)","linkPrimary":"#1752FF","linkPrimaryHover":"#4877FF","linkPrimaryLight":"#5982ff","linkSecondary":"#6B50D7","linkSecondaryDisabled":"#C4B9EF","linkText":"#6AA1E0","linkTextLight":"#9ECBFF","rowHoverBackground":"rgba(0, 0, 0, 0.1)","transparent":"rgba(255, 255, 255, 0)"},"loader":{"color":"#EB0032","colorInverted":"#8ADE00"},"logo":{"color":"#FFFFFF"},"monotone":{"black":"#060606","blackTransparent":"rgba(0, 0, 0, 0.6)","gray":"#B1B8C3","grey100":"#F2F2F2","grey200":"#D5D7DC","grey300":"#B4B8C0","grey400":"#70747C","grey500":"#51535C","purple":"#6B50D7","white":"#FFFFFF","whiteTransparent":"rgba(255, 255, 255, 0.6)"},"neutral":{"n100":"#E7E8EA","n200":"#D8DADE","n300":"#CBCCD0","n400":"#BCBEC4","n500":"#AEB0B6"},"progress":{"negative":"#FF144D","positive":"#6B50D7"},"shadow":{"base":"12px 40px 120px rgba(106, 117, 139, 0.4)","frame":"0px 10px 40px rgba(0, 0, 0, 0.26)","menu":"4px 10px 20px rgba(6, 6, 6, 0.12)","popup":"10px 20px 40px rgba(0, 0, 0, 0.2)","small":"0px, 4px, rgba(0, 0, 0, 0.25)","window":"0px 10px 60px rgba(0, 0, 0, 0.7)"},"status":{"negative":"#FF144D","positive":"#24B400"},"text":{"fileBrowser":"#787A85"}}},"page":"/_error","query":{},"buildId":"h5mR3pjfn_EQy348CZ_ok","nextExport":true,"isFallback":false,"gip":true,"appGip":true,"scriptLoader":[]}</script></body></html>
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=0" name="viewport"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link href="/favicon.ico" rel="icon"/><link rel="preload" href="/_next/static/css/d1e8e64d0b07af2f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/d1e8e64d0b07af2f.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-5cd94c89d3acac5f.js"></script><script src="/_next/static/chunks/webpack-8f51011a10b384a1.js" defer=""></script><script src="/_next/static/chunks/framework-7c365855dab1bf41.js" defer=""></script><script src="/_next/static/chunks/main-714e8aae7672e1fc.js" defer=""></script><script src="/_next/static/chunks/pages/_app-9dae6fa5126cf001.js" defer=""></script><script src="/_next/static/chunks/pages/_error-235304e5badb19eb.js" defer=""></script><script src="/_next/static/CNjkRIWPaAu1yJUmIaX_q/_buildManifest.js" defer=""></script><script src="/_next/static/CNjkRIWPaAu1yJUmIaX_q/_ssgManifest.js" defer=""></script><script src="/_next/static/CNjkRIWPaAu1yJUmIaX_q/_middlewareManifest.js" defer=""></script><style data-styled="" data-styled-version="5.3.6">html{-webkit-box-sizing:border-box;box-sizing:border-box;-ms-overflow-style:scrollbar;}/*!sc*/
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=0" name="viewport"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link href="/favicon.ico" rel="icon"/><link rel="preload" href="/_next/static/css/d1e8e64d0b07af2f.css" as="style"/><link rel="stylesheet" href="/_next/static/css/d1e8e64d0b07af2f.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-5cd94c89d3acac5f.js"></script><script src="/_next/static/chunks/webpack-8f51011a10b384a1.js" defer=""></script><script src="/_next/static/chunks/framework-7c365855dab1bf41.js" defer=""></script><script src="/_next/static/chunks/main-714e8aae7672e1fc.js" defer=""></script><script src="/_next/static/chunks/pages/_app-9dae6fa5126cf001.js" defer=""></script><script src="/_next/static/chunks/pages/_error-235304e5badb19eb.js" defer=""></script><script src="/_next/static/h5mR3pjfn_EQy348CZ_ok/_buildManifest.js" defer=""></script><script src="/_next/static/h5mR3pjfn_EQy348CZ_ok/_ssgManifest.js" defer=""></script><script src="/_next/static/h5mR3pjfn_EQy348CZ_ok/_middlewareManifest.js" defer=""></script><style data-styled="" data-styled-version="5.3.6">html{-webkit-box-sizing:border-box;box-sizing:border-box;-ms-overflow-style:scrollbar;}/*!sc*/
2
2
  *,*::before,*::after{-webkit-box-sizing:inherit;box-sizing:inherit;}/*!sc*/
3
3
  data-styled.g4[id="sc-global-czSCUT1"]{content:"sc-global-czSCUT1,"}/*!sc*/
4
4
  .kOVcuR .Toastify__toast-container{margin-top:24px;padding:0 !important;width:500px !important;}/*!sc*/
@@ -19,4 +19,4 @@ data-styled.g5[id="ToastWrapper-sc-1a33ph1-0"]{content:"kOVcuR,"}/*!sc*/
19
19
  .next-error-h1 {
20
20
  border-right: 1px solid rgba(255, 255, 255, .3);
21
21
  }
22
- }</style><h1 class="next-error-h1" style="display:inline-block;margin:0;margin-right:20px;padding:10px 23px 10px 0;font-size:24px;font-weight:500;vertical-align:top">404<!-- --></h1><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0">This page could not be found<!-- -->.<!-- --></h2></div></div></div><div></div><div></div><div></div><div class="ToastWrapper-sc-1a33ph1-0 kOVcuR"><div class="Toastify"></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404},"currentTheme":{"accent":{"alert":"#F6540B","blue":"#4877FF","blueLight":"rgba(72, 119, 255, 0.5)","contentDefaultTransparent":"rgba(174, 174, 174, 0.5)","cyan":"#65E3FF","cyanLight":"rgba(101, 227, 255, 0.3)","cyanTransparent":"rgba(101, 227, 255, 0.12)","dbt":"#fc6949","dbtLight":"rgba(252, 105, 73, 0.5)","info":"#00ABFF","infoTransparent":"rgba(0, 171, 255, 0.5)","negative":"#FF1E59","negativeTransparent":"rgba(255, 30, 89, 0.3)","pink":"#FF4FF8","pinkLight":"rgb(255, 79, 248, 0.5)","positive":"#00A81A","primaryTransparent":"rgba(155, 108, 167, 0.5)","purple":"#7D55EC","purpleLight":"rgba(125, 85, 236, 0.5)","rose":"#D1A2AB","roseLight":"rgba(209, 162, 171, 0.5)","sky":"#6AA1E0","skyLight":"rgba(106, 161, 224, 0.05)","teal":"#00B4CC","tealLight":"rgba(0, 180, 204, 0.5)","warning":"#DD9900","warningTransparent":"rgba(221, 153, 0, 0.5)","yellow":"#FFCC19","yellowLight":"rgba(255, 204, 25, 0.5)"},"background":{"chartBlock":"#2E3036","codeArea":"#1E1F24","codeTextarea":"#000000","content":"#1B1C20","danger":"#FFD0DB","dark":"#B1B8C3","dashboard":"#18181C","header":"#1B1B1B","menu":"#0F4CFF","muted":"#F9FAFC","navigation":"#EDEDED","output":"#2E3036","page":"#1E1F24","panel":"#232429","popup":"#27292E","row":"#2C2C2C","row2":"#51535C","scrollbarThumb":"rgba(100, 100, 100, 0.5)","scrollbarThumbHover":"rgba(255, 255, 255, 0.3)","scrollbarTrack":"#2E3036","success":"#8ADE00","successLight":"rgb(138, 222, 0, 0.3)","table":"#292A2F","tag":"#3A4550"},"borders":{"button":"#454850","contrast":"#FFFFFF","danger":"#FF144D","dark":"#000000","info":"#FFCC19","light":"#2F3034","medium":"#1C1C1C","medium2":"#141414","success":"#2FCB52"},"brand":{"earth100":"#C6EEDB","earth200":"#9DDFBF","earth300":"#6BBF96","earth400":"#37A46F","earth400Transparent":"rgba(55, 164, 111, 0.4)","earth500":"#00954C","energy100":"#FFF4BA","energy200":"#FFED92","energy300":"#FFE662","energy400":"#FFDA19","energy400Transparent":"rgba(255, 218, 25, 0.04)","energy500":"#F6C000","fire100":"#FFD7E0","fire200":"#FFA3B9","fire300":"#FF547D","fire400":"#FF144D","fire400Transparent":"rgba(255, 20, 77, 0.4)","fire500":"#EB0032","stone100":"#F3E6D7","stone200":"#E3D4C2","stone400":"#BFA78B","stone500":"#AF8859","water100":"#BDCEFF","water200":"#81A1FF","water300":"#517DFF","water400":"#2A60FE","water400Transparent":"rgba(42, 96, 254, 0.4)","water500":"#0F4CFF","wind100":"#EEEAFF","wind200":"#CCC1F4","wind300":"#A698DD","wind400":"#6B50D7","wind400SuperTransparent":"rgba(107, 80, 215, 0.12)","wind400Transparent":"rgba(107, 80, 215, 0.4)","wind500":"#4E32BC"},"chart":{"backgroundPrimary":"#7D55EC","backgroundSecondary":"#FF144D","backgroundTertiary":"#86E2FF","button1":"#4877FF","button2":"#FFCC19","button3":"#8ADE00","button4":"#FF4FF8","button5":"#B98D95","lines":"#9B6CA7","primary":"#6B50D7","secondary":"#FF144D","tertiary":"#2A60FE"},"content":{"active":"#FFFFFF","default":"#AEAEAE","disabled":"rgba(255, 255, 255, 0.3)","inverted":"#2C2C2C","muted":"#787A85"},"elevation":{"visualizationAccent":"#996CFF","visualizationAccentAlt":"#C1ACF7"},"feature":{"active":"rgba(250, 248, 254, 0.14)","disabled":"rgba(201, 206, 218, 0.12)"},"icons":{"neutral":"#787878"},"interactive":{"activeBorder":"#060606","checked":"#060606","dangerBorder":"#FF144D","defaultBackground":"#36383F","defaultBorder":"#2E3036","disabledBorder":"#B1B8C3","focusBackground":"#B1B8C3","focusBorder":"#86E2FF","hoverBackground":"#4E4E4E","hoverBorder":"#B9BFCA","hoverOverlay":"rgba(255, 255, 255, 0.1)","linkPrimary":"#1752FF","linkPrimaryHover":"#4877FF","linkPrimaryLight":"#5982ff","linkSecondary":"#6B50D7","linkSecondaryDisabled":"#C4B9EF","linkText":"#6AA1E0","linkTextLight":"#9ECBFF","rowHoverBackground":"rgba(0, 0, 0, 0.1)","transparent":"rgba(255, 255, 255, 0)"},"loader":{"color":"#EB0032","colorInverted":"#8ADE00"},"logo":{"color":"#FFFFFF"},"monotone":{"black":"#060606","blackTransparent":"rgba(0, 0, 0, 0.6)","gray":"#B1B8C3","grey100":"#F2F2F2","grey200":"#D5D7DC","grey300":"#B4B8C0","grey400":"#70747C","grey500":"#51535C","purple":"#6B50D7","white":"#FFFFFF","whiteTransparent":"rgba(255, 255, 255, 0.6)"},"neutral":{"n100":"#E7E8EA","n200":"#D8DADE","n300":"#CBCCD0","n400":"#BCBEC4","n500":"#AEB0B6"},"progress":{"negative":"#FF144D","positive":"#6B50D7"},"shadow":{"base":"12px 40px 120px rgba(106, 117, 139, 0.4)","frame":"0px 10px 40px rgba(0, 0, 0, 0.26)","menu":"4px 10px 20px rgba(6, 6, 6, 0.12)","popup":"10px 20px 40px rgba(0, 0, 0, 0.2)","small":"0px, 4px, rgba(0, 0, 0, 0.25)","window":"0px 10px 60px rgba(0, 0, 0, 0.7)"},"status":{"negative":"#FF144D","positive":"#24B400"},"text":{"fileBrowser":"#787A85"}}},"page":"/_error","query":{},"buildId":"CNjkRIWPaAu1yJUmIaX_q","nextExport":true,"isFallback":false,"gip":true,"appGip":true,"scriptLoader":[]}</script></body></html>
22
+ }</style><h1 class="next-error-h1" style="display:inline-block;margin:0;margin-right:20px;padding:10px 23px 10px 0;font-size:24px;font-weight:500;vertical-align:top">404<!-- --></h1><div style="display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle"><h2 style="font-size:14px;font-weight:normal;line-height:inherit;margin:0;padding:0">This page could not be found<!-- -->.<!-- --></h2></div></div></div><div></div><div></div><div></div><div class="ToastWrapper-sc-1a33ph1-0 kOVcuR"><div class="Toastify"></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404},"currentTheme":{"accent":{"alert":"#F6540B","blue":"#4877FF","blueLight":"rgba(72, 119, 255, 0.5)","contentDefaultTransparent":"rgba(174, 174, 174, 0.5)","cyan":"#65E3FF","cyanLight":"rgba(101, 227, 255, 0.3)","cyanTransparent":"rgba(101, 227, 255, 0.12)","dbt":"#fc6949","dbtLight":"rgba(252, 105, 73, 0.5)","info":"#00ABFF","infoTransparent":"rgba(0, 171, 255, 0.5)","negative":"#FF1E59","negativeTransparent":"rgba(255, 30, 89, 0.3)","pink":"#FF4FF8","pinkLight":"rgb(255, 79, 248, 0.5)","positive":"#00A81A","primaryTransparent":"rgba(155, 108, 167, 0.5)","purple":"#7D55EC","purpleLight":"rgba(125, 85, 236, 0.5)","rose":"#D1A2AB","roseLight":"rgba(209, 162, 171, 0.5)","sky":"#6AA1E0","skyLight":"rgba(106, 161, 224, 0.05)","teal":"#00B4CC","tealLight":"rgba(0, 180, 204, 0.5)","warning":"#DD9900","warningTransparent":"rgba(221, 153, 0, 0.5)","yellow":"#FFCC19","yellowLight":"rgba(255, 204, 25, 0.5)"},"background":{"chartBlock":"#2E3036","codeArea":"#1E1F24","codeTextarea":"#000000","content":"#1B1C20","danger":"#FFD0DB","dark":"#B1B8C3","dashboard":"#18181C","header":"#1B1B1B","menu":"#0F4CFF","muted":"#F9FAFC","navigation":"#EDEDED","output":"#2E3036","page":"#1E1F24","panel":"#232429","popup":"#27292E","row":"#2C2C2C","row2":"#51535C","scrollbarThumb":"rgba(100, 100, 100, 0.5)","scrollbarThumbHover":"rgba(255, 255, 255, 0.3)","scrollbarTrack":"#2E3036","success":"#8ADE00","successLight":"rgb(138, 222, 0, 0.3)","table":"#292A2F","tag":"#3A4550"},"borders":{"button":"#454850","contrast":"#FFFFFF","danger":"#FF144D","dark":"#000000","info":"#FFCC19","light":"#2F3034","medium":"#1C1C1C","medium2":"#141414","success":"#2FCB52"},"brand":{"earth100":"#C6EEDB","earth200":"#9DDFBF","earth300":"#6BBF96","earth400":"#37A46F","earth400Transparent":"rgba(55, 164, 111, 0.4)","earth500":"#00954C","energy100":"#FFF4BA","energy200":"#FFED92","energy300":"#FFE662","energy400":"#FFDA19","energy400Transparent":"rgba(255, 218, 25, 0.04)","energy500":"#F6C000","fire100":"#FFD7E0","fire200":"#FFA3B9","fire300":"#FF547D","fire400":"#FF144D","fire400Transparent":"rgba(255, 20, 77, 0.4)","fire500":"#EB0032","stone100":"#F3E6D7","stone200":"#E3D4C2","stone400":"#BFA78B","stone500":"#AF8859","water100":"#BDCEFF","water200":"#81A1FF","water300":"#517DFF","water400":"#2A60FE","water400Transparent":"rgba(42, 96, 254, 0.4)","water500":"#0F4CFF","wind100":"#EEEAFF","wind200":"#CCC1F4","wind300":"#A698DD","wind400":"#6B50D7","wind400SuperTransparent":"rgba(107, 80, 215, 0.12)","wind400Transparent":"rgba(107, 80, 215, 0.4)","wind500":"#4E32BC"},"chart":{"backgroundPrimary":"#7D55EC","backgroundSecondary":"#FF144D","backgroundTertiary":"#86E2FF","button1":"#4877FF","button2":"#FFCC19","button3":"#8ADE00","button4":"#FF4FF8","button5":"#B98D95","lines":"#9B6CA7","primary":"#6B50D7","secondary":"#FF144D","tertiary":"#2A60FE"},"content":{"active":"#FFFFFF","default":"#AEAEAE","disabled":"rgba(255, 255, 255, 0.3)","inverted":"#2C2C2C","muted":"#787A85"},"elevation":{"visualizationAccent":"#996CFF","visualizationAccentAlt":"#C1ACF7"},"feature":{"active":"rgba(250, 248, 254, 0.14)","disabled":"rgba(201, 206, 218, 0.12)"},"icons":{"neutral":"#787878"},"interactive":{"activeBorder":"#060606","checked":"#060606","dangerBorder":"#FF144D","defaultBackground":"#36383F","defaultBorder":"#2E3036","disabledBorder":"#B1B8C3","focusBackground":"#B1B8C3","focusBorder":"#86E2FF","hoverBackground":"#4E4E4E","hoverBorder":"#B9BFCA","hoverOverlay":"rgba(255, 255, 255, 0.1)","linkPrimary":"#1752FF","linkPrimaryHover":"#4877FF","linkPrimaryLight":"#5982ff","linkSecondary":"#6B50D7","linkSecondaryDisabled":"#C4B9EF","linkText":"#6AA1E0","linkTextLight":"#9ECBFF","rowHoverBackground":"rgba(0, 0, 0, 0.1)","transparent":"rgba(255, 255, 255, 0)"},"loader":{"color":"#EB0032","colorInverted":"#8ADE00"},"logo":{"color":"#FFFFFF"},"monotone":{"black":"#060606","blackTransparent":"rgba(0, 0, 0, 0.6)","gray":"#B1B8C3","grey100":"#F2F2F2","grey200":"#D5D7DC","grey300":"#B4B8C0","grey400":"#70747C","grey500":"#51535C","purple":"#6B50D7","white":"#FFFFFF","whiteTransparent":"rgba(255, 255, 255, 0.6)"},"neutral":{"n100":"#E7E8EA","n200":"#D8DADE","n300":"#CBCCD0","n400":"#BCBEC4","n500":"#AEB0B6"},"progress":{"negative":"#FF144D","positive":"#6B50D7"},"shadow":{"base":"12px 40px 120px rgba(106, 117, 139, 0.4)","frame":"0px 10px 40px rgba(0, 0, 0, 0.26)","menu":"4px 10px 20px rgba(6, 6, 6, 0.12)","popup":"10px 20px 40px rgba(0, 0, 0, 0.2)","small":"0px, 4px, rgba(0, 0, 0, 0.25)","window":"0px 10px 60px rgba(0, 0, 0, 0.7)"},"status":{"negative":"#FF144D","positive":"#24B400"},"text":{"fileBrowser":"#787A85"}}},"page":"/_error","query":{},"buildId":"h5mR3pjfn_EQy348CZ_ok","nextExport":true,"isFallback":false,"gip":true,"appGip":true,"scriptLoader":[]}</script></body></html>
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2786],{27125:function(n,e,t){var o=t(75582),u=t(82684),i=t(12691),r=t.n(i),c=t(34376),l=t.n(c),a=t(38626),s=t(83455),d=t(35490),p=t(66050),f=t(60328),v=t(16634),b=t(67971),h=t(10919),O=t(98781),j=t(86673),m=t(87815),g=t(19711),Z=t(46261),y=t(82531),x=t(73828),_=t(94353),P=t(22341),k=t(49125),L=t(44162),w=t(24224),S=t(96510),T=t(43482),D=t(28598);e.Z=function(n){var e=n.blockRuns,t=n.onClickRow,i=n.pipeline,c=n.selectedRun,C=n.setErrors,R=(0,u.useContext)(a.ThemeContext),M=(0,u.useState)(null),E=M[0],N=M[1],I=(0,u.useState)(null),Y=I[0],A=I[1],U=i||{},V=U.uuid,Q=U.type,F=(0,u.useMemo)((function(){return i.blocks||[]}),[i]),H=(0,u.useMemo)((function(){return(0,w.HK)(F,(function(n){return n.uuid}))}),[F]),J=(0,u.useMemo)((function(){return O.qL.INTEGRATION===Q}),[Q]),K=(0,u.useMemo)((function(){return O.qL.PYTHON===Q}),[Q]),B=(0,u.useMemo)((function(){var n,e;return null===(n=new d.Z)||void 0===n||null===(e=n.decodedToken)||void 0===e?void 0:e.token}),[]),q=(0,s.Db)((function(n){var e=n.blockUUID,t=n.pipelineRunId;return y.ZP.block_outputs.pipelines.downloads.detailAsync(null===i||void 0===i?void 0:i.uuid,e,{pipeline_run_id:t,token:B},{onDownloadProgress:function(n){return N((Number((null===n||void 0===n?void 0:n.loaded)||0)/1e6).toFixed(3))},responseType:_.E.BLOB})}),{onSuccess:function(n){return(0,S.wD)(n,{callback:function(n){A(null),(0,T.uS)(n,"block_output.".concat(x.Lu.CSV))},onErrorCallback:function(n,e){return null===C||void 0===C?void 0:C({errors:e,response:n})}})}}),X=(0,o.Z)(q,2),z=X[0],W=X[1].isLoading,G=[{uuid:"Status"},{uuid:"Block"},{uuid:"Trigger"},{uuid:"Created at"},{uuid:"Completed at"},{uuid:"Logs"}];return K&&G.push({uuid:"Output"}),(0,D.jsx)(m.Z,{columnFlex:[1,2,2,1,1,null,null],columns:G,isSelectedRow:function(n){return e[n].id===(null===c||void 0===c?void 0:c.id)},onClickRow:t,rows:null===e||void 0===e?void 0:e.map((function(n){var e,t,o,u,i=n||{},c=i.block_uuid,a=i.completed_at,s=i.created_at,d=i.id,O=i.pipeline_run_id,m=i.pipeline_schedule_id,y=i.pipeline_schedule_name,x=i.status,_=c,w=_.split(":"),S=Y===d&&W;J&&(_=w[0],o=w[1],u=w[2]);var T=H[_];T||(T=H[w[0]]);var C=[(0,D.jsx)(g.ZP,{danger:p.V.FAILED===x,default:p.V.CANCELLED===x,info:p.V.INITIAL===x,monospace:!0,success:p.V.COMPLETED===x,warning:p.V.RUNNING===x,children:x},"".concat(d,"_status")),(0,D.jsx)(r(),{as:"/pipelines/".concat(V,"/edit?block_uuid=").concat(_),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,D.jsxs)(h.Z,{bold:!0,fitContentWidth:!0,verticalAlignContent:!0,children:[(0,D.jsx)(v.Z,{color:(0,L.qn)(null===(e=T)||void 0===e?void 0:e.type,{blockColor:null===(t=T)||void 0===t?void 0:t.color,theme:R}).accent,size:1.5*k.iI,square:!0}),(0,D.jsx)(j.Z,{mr:1}),(0,D.jsxs)(g.ZP,{monospace:!0,sky:!0,children:[_,o&&": ",o&&(0,D.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:o}),u>=0&&": ",u>=0&&(0,D.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:u})]})]})},"".concat(d,"_block_uuid")),(0,D.jsx)(r(),{as:"/pipelines/".concat(V,"/triggers/").concat(m),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,D.jsx)(h.Z,{bold:!0,sky:!0,children:y})},"".concat(d,"_trigger")),(0,D.jsx)(g.ZP,{default:!0,monospace:!0,small:!0,children:s},"".concat(d,"_created_at")),(0,D.jsx)(g.ZP,{default:!0,monospace:!0,small:!0,children:(null===a||void 0===a?void 0:a.slice(0,19))||"-"},"".concat(d,"_completed_at")),(0,D.jsx)(f.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return l().push("/pipelines/".concat(V,"/logs?block_run_id[]=").concat(d))},children:(0,D.jsx)(P.UL,{default:!0,size:2*k.iI})},"".concat(d,"_logs"))];return K&&C.push((0,D.jsx)(b.ZP,{alignItems:"center",justifyContent:"center",children:(0,D.jsx)(Z.Z,{appearBefore:!0,autoHide:!S,block:!0,forceVisible:S,label:S?"".concat(E||0,"mb downloaded..."):"Save block run output as CSV file",size:null,widthFitContent:!0,children:(0,D.jsx)(f.Z,{default:!0,disabled:!K||!(p.V.COMPLETED===x)||W,iconOnly:!0,loading:S,noBackground:!0,onClick:function(){N(null),A(d),z({blockUUID:_,pipelineRunId:O})},children:(0,D.jsx)(P.vc,{default:!0,size:2*k.iI})})})},"".concat(d,"_save_output"))),C})),uuid:"block-runs"})}},43482:function(n,e,t){t.d(e,{Dp:function(){return f},OF:function(){return v},Q9:function(){return h},Rt:function(){return s},h8:function(){return b},k1:function(){return d},uS:function(){return O}});var o=t(21831),u=t(82394),i=t(91427),r=t(24224),c=t(90211);function l(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,o)}return t}function a(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?l(Object(t),!0).forEach((function(e){(0,u.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function s(n){var e={},t={};return null===n||void 0===n||n.forEach((function(n){var o=n.content,u=n.outputs,i=n.type,r=n.uuid;(null===u||void 0===u?void 0:u.length)>=1&&(e[r]=u.map((function(n){var e=n||{},t=e.sample_data,o=e.shape,u=e.text_data,i=e.type;return t?{data:a({shape:o},t),type:i}:u&&(0,c.Pb)(u)?JSON.parse(u):u}))),t[i]||(t[i]={}),t[i][r]=o})),{content:t,messages:e}}function d(n,e,t){n.forEach((function(n){(0,i.t8)("".concat(t,"/").concat(n.uuid,"/codeCollapsed"),(0,i.Od)("".concat(e,"/").concat(n.uuid,"/codeCollapsed"))),(0,i.t8)("".concat(t,"/").concat(n.uuid,"/outputCollapsed"),(0,i.Od)("".concat(e,"/").concat(n.uuid,"/outputCollapsed")))}))}function p(n){return"".concat(n,"/").concat(i.kP)}function f(n){return(0,i.U2)(p(n),[])}function v(n,e){var t=f(n);t.includes(e)||(0,i.t8)(p(n),[].concat((0,o.Z)(t),[e]))}function b(n,e){var t=f(n).filter((function(n){return n!==e}));(0,i.t8)(p(n),t)}function h(n,e){var t=(0,r.HK)(e,(function(n){return n.uuid}));return n.map((function(n){return t[n]})).filter((function(n){return!!n}))}var O=function(n,e){var t=window.URL.createObjectURL(n),o=document.createElement("a");o.href=t,o.download=e,document.body.appendChild(o),o.click(),o.remove()}},56681:function(n,e,t){t.d(e,{G7:function(){return y},ZP:function(){return x},u$:function(){return m}});var o=t(75582),u=t(82394),i=t(26304),r=t(32316),c=t(22673),l=t(48952),a=t(86673),s=t(19711),d=t(87815),p=t(49125),f=t(19395),v=t(7715),b=t(28598),h=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function O(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,o)}return t}function j(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?O(Object(t),!0).forEach((function(e){(0,u.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var m=76,g={uuid:"Run details"},Z={uuid:"Dependency tree"},y=[Z,g];function x(n){var e=n.height,t=n.heightOffset,u=n.pipeline,O=n.selectedRun,x=n.selectedTab,_=n.setSelectedTab,P=j({},(0,i.Z)(n,h));O?P.blockStatus=(0,f.IJ)(null===O||void 0===O?void 0:O.block_runs):P.noStatus=!0;var k=(0,v.Kn)(null===O||void 0===O?void 0:O.variables)?j({},null===O||void 0===O?void 0:O.variables):(null===O||void 0===O?void 0:O.variables)||{},L=null===O||void 0===O?void 0:O.event_variables;if(L&&(0,v.Kn)(L)&&!(0,v.Qr)(L))if((0,v.Kn)(k)&&k.hasOwnProperty("event")){var w=(0,v.Kn)(k.event)?k.event:{};k.event=j(j({},w),L)}else k.event=j({},L);var S=[];k&&JSON.stringify(k,null,2).split("\n").forEach((function(n){S.push(" ".concat(n))}));var T=O&&[["Run ID",null===O||void 0===O?void 0:O.id],["Variables",(0,b.jsx)(c.Z,{language:"json",small:!0,source:S.join("\n")},"variable_value")]],D=O&&(0,b.jsx)(a.Z,{pb:p.cd,px:p.cd,children:(0,b.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(n){return 1===n?"100px":null},rows:T.map((function(n,e){var t=(0,o.Z)(n,2),u=t[0],i=t[1];return[(0,b.jsx)(s.ZP,{monospace:!0,muted:!0,children:u},"key_".concat(e)),(0,b.jsx)(s.ZP,{monospace:!0,textOverflow:!0,children:i},"val_".concat(e))]})),uuid:"LogDetail"})}),C=x&&_;return(0,b.jsxs)(b.Fragment,{children:[C&&(0,b.jsx)(a.Z,{py:p.cd,children:(0,b.jsx)(r.Z,{onClickTab:_,selectedTabUUID:null===x||void 0===x?void 0:x.uuid,tabs:y})}),(!C||Z.uuid===(null===x||void 0===x?void 0:x.uuid))&&(0,b.jsx)(l.Z,j(j({},P),{},{height:e,heightOffset:(t||0)+(C?m:0),pipeline:u})),g.uuid===(null===x||void 0===x?void 0:x.uuid)&&D]})}},73828:function(n,e,t){t.d(e,{JD:function(){return h},Lu:function(){return i},PF:function(){return f},d2:function(){return p},dT:function(){return r},n6:function(){return a},nB:function(){return b},oy:function(){return v},xF:function(){return d}});var o,u,i,r,c=t(82394),l=t(86422);!function(n){n.CSV="csv",n.JSON="json",n.MD="md",n.PY="py",n.R="r",n.SQL="sql",n.TXT="txt",n.YAML="yaml",n.YML="yml"}(i||(i={})),function(n){n.INIT_PY="__init__.py",n.METADATA_YAML="metadata.yaml",n.REQS_TXT="requirements.txt"}(r||(r={}));var a=[i.PY,i.SQL],s=[i.JSON,i.MD,i.PY,i.R,i.SQL,i.TXT,i.YAML,i.YML],d=new RegExp(s.map((function(n){return".".concat(n,"$")})).join("|")),p=new RegExp(s.map((function(n){return".".concat(n,"$")})).join("|")),f="charts",v="pipelines",b=(o={},(0,c.Z)(o,i.MD,l.t6.MARKDOWN),(0,c.Z)(o,i.JSON,i.JSON),(0,c.Z)(o,i.PY,l.t6.PYTHON),(0,c.Z)(o,i.R,l.t6.R),(0,c.Z)(o,i.SQL,l.t6.SQL),(0,c.Z)(o,i.TXT,"text"),(0,c.Z)(o,i.YAML,l.t6.YAML),(0,c.Z)(o,i.YML,l.t6.YAML),o),h=(u={},(0,c.Z)(u,l.t6.MARKDOWN,i.MD),(0,c.Z)(u,l.t6.PYTHON,i.PY),(0,c.Z)(u,l.t6.R,i.R),(0,c.Z)(u,l.t6.SQL,i.SQL),(0,c.Z)(u,l.t6.YAML,i.YAML),(0,c.Z)(u,"text",i.TXT),u)}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2786],{27125:function(n,e,t){var o=t(75582),u=t(82684),i=t(12691),r=t.n(i),c=t(34376),l=t.n(c),a=t(38626),s=t(83455),d=t(35490),p=t(66050),f=t(60328),v=t(16634),b=t(67971),h=t(10919),O=t(98781),j=t(86673),m=t(87815),g=t(19711),Z=t(46261),y=t(82531),x=t(73828),_=t(94353),P=t(22341),k=t(49125),L=t(44162),w=t(24224),S=t(96510),T=t(43482),D=t(28598);e.Z=function(n){var e=n.blockRuns,t=n.onClickRow,i=n.pipeline,c=n.selectedRun,C=n.setErrors,R=(0,u.useContext)(a.ThemeContext),M=(0,u.useState)(null),E=M[0],N=M[1],I=(0,u.useState)(null),Y=I[0],A=I[1],U=i||{},V=U.uuid,Q=U.type,F=(0,u.useMemo)((function(){return i.blocks||[]}),[i]),H=(0,u.useMemo)((function(){return(0,w.HK)(F,(function(n){return n.uuid}))}),[F]),J=(0,u.useMemo)((function(){return O.qL.INTEGRATION===Q}),[Q]),K=(0,u.useMemo)((function(){return O.qL.PYTHON===Q}),[Q]),B=(0,u.useMemo)((function(){var n,e;return null===(n=new d.Z)||void 0===n||null===(e=n.decodedToken)||void 0===e?void 0:e.token}),[]),q=(0,s.Db)((function(n){var e=n.blockUUID,t=n.pipelineRunId;return y.ZP.block_outputs.pipelines.downloads.detailAsync(null===i||void 0===i?void 0:i.uuid,e,{pipeline_run_id:t,token:B},{onDownloadProgress:function(n){return N((Number((null===n||void 0===n?void 0:n.loaded)||0)/1e6).toFixed(3))},responseType:_.E.BLOB})}),{onSuccess:function(n){return(0,S.wD)(n,{callback:function(n){A(null),(0,T.uS)(n,"block_output.".concat(x.Lu.CSV))},onErrorCallback:function(n,e){return null===C||void 0===C?void 0:C({errors:e,response:n})}})}}),X=(0,o.Z)(q,2),z=X[0],W=X[1].isLoading,G=[{uuid:"Status"},{uuid:"Block"},{uuid:"Trigger"},{uuid:"Created at"},{uuid:"Completed at"},{uuid:"Logs"}];return K&&G.push({uuid:"Output"}),(0,D.jsx)(m.Z,{columnFlex:[1,2,2,1,1,null,null],columns:G,isSelectedRow:function(n){return e[n].id===(null===c||void 0===c?void 0:c.id)},onClickRow:t,rows:null===e||void 0===e?void 0:e.map((function(n){var e,t,o,u,i=n||{},c=i.block_uuid,a=i.completed_at,s=i.created_at,d=i.id,O=i.pipeline_run_id,m=i.pipeline_schedule_id,y=i.pipeline_schedule_name,x=i.status,_=c,w=_.split(":"),S=Y===d&&W;J&&(_=w[0],o=w[1],u=w[2]);var T=H[_];T||(T=H[w[0]]);var C=[(0,D.jsx)(g.ZP,{danger:p.V.FAILED===x,default:p.V.CANCELLED===x,info:p.V.INITIAL===x,monospace:!0,success:p.V.COMPLETED===x,warning:p.V.RUNNING===x,children:x},"".concat(d,"_status")),(0,D.jsx)(r(),{as:"/pipelines/".concat(V,"/edit?block_uuid=").concat(_),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,D.jsxs)(h.Z,{bold:!0,fitContentWidth:!0,verticalAlignContent:!0,children:[(0,D.jsx)(v.Z,{color:(0,L.qn)(null===(e=T)||void 0===e?void 0:e.type,{blockColor:null===(t=T)||void 0===t?void 0:t.color,theme:R}).accent,size:1.5*k.iI,square:!0}),(0,D.jsx)(j.Z,{mr:1}),(0,D.jsxs)(g.ZP,{monospace:!0,sky:!0,children:[_,o&&": ",o&&(0,D.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:o}),u>=0&&": ",u>=0&&(0,D.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:u})]})]})},"".concat(d,"_block_uuid")),(0,D.jsx)(r(),{as:"/pipelines/".concat(V,"/triggers/").concat(m),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,D.jsx)(h.Z,{bold:!0,sky:!0,children:y})},"".concat(d,"_trigger")),(0,D.jsx)(g.ZP,{default:!0,monospace:!0,small:!0,children:s},"".concat(d,"_created_at")),(0,D.jsx)(g.ZP,{default:!0,monospace:!0,small:!0,children:(null===a||void 0===a?void 0:a.slice(0,19))||"-"},"".concat(d,"_completed_at")),(0,D.jsx)(f.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return l().push("/pipelines/".concat(V,"/logs?block_run_id[]=").concat(d))},children:(0,D.jsx)(P.UL,{default:!0,size:2*k.iI})},"".concat(d,"_logs"))];return K&&C.push((0,D.jsx)(b.ZP,{alignItems:"center",justifyContent:"center",children:(0,D.jsx)(Z.Z,{appearBefore:!0,autoHide:!S,block:!0,forceVisible:S,label:S?"".concat(E||0,"mb downloaded..."):"Save block run output as CSV file",size:null,widthFitContent:!0,children:(0,D.jsx)(f.Z,{default:!0,disabled:!K||!(p.V.COMPLETED===x)||W,iconOnly:!0,loading:S,noBackground:!0,onClick:function(){N(null),A(d),z({blockUUID:_,pipelineRunId:O})},children:(0,D.jsx)(P.vc,{default:!0,size:2*k.iI})})})},"".concat(d,"_save_output"))),C})),uuid:"block-runs"})}},43482:function(n,e,t){t.d(e,{Dp:function(){return f},OF:function(){return v},Q9:function(){return h},Rt:function(){return s},h8:function(){return b},k1:function(){return d},uS:function(){return O}});var o=t(21831),u=t(82394),i=t(91427),r=t(24224),c=t(90211);function l(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,o)}return t}function a(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?l(Object(t),!0).forEach((function(e){(0,u.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function s(n){var e={},t={};return null===n||void 0===n||n.forEach((function(n){var o=n.content,u=n.outputs,i=n.type,r=n.uuid;(null===u||void 0===u?void 0:u.length)>=1&&(e[r]=u.map((function(n){var e=n||{},t=e.sample_data,o=e.shape,u=e.text_data,i=e.type;return t?{data:a({shape:o},t),type:i}:u&&(0,c.Pb)(u)?JSON.parse(u):u}))),t[i]||(t[i]={}),t[i][r]=o})),{content:t,messages:e}}function d(n,e,t){n.forEach((function(n){(0,i.t8)("".concat(t,"/").concat(n.uuid,"/codeCollapsed"),(0,i.Od)("".concat(e,"/").concat(n.uuid,"/codeCollapsed"))),(0,i.t8)("".concat(t,"/").concat(n.uuid,"/outputCollapsed"),(0,i.Od)("".concat(e,"/").concat(n.uuid,"/outputCollapsed")))}))}function p(n){return"".concat(n,"/").concat(i.kP)}function f(n){return(0,i.U2)(p(n),[])}function v(n,e){var t=f(n);t.includes(e)||(0,i.t8)(p(n),[].concat((0,o.Z)(t),[e]))}function b(n,e){var t=f(n).filter((function(n){return n!==e}));(0,i.t8)(p(n),t)}function h(n,e){var t=(0,r.HK)(e,(function(n){return n.uuid}));return n.map((function(n){return t[n]})).filter((function(n){return!!n}))}var O=function(n,e){var t=window.URL.createObjectURL(n),o=document.createElement("a");o.href=t,o.download=e,document.body.appendChild(o),o.click(),o.remove()}},56681:function(n,e,t){t.d(e,{G7:function(){return y},ZP:function(){return x},u$:function(){return m}});var o=t(75582),u=t(82394),i=t(26304),r=t(32316),c=t(22673),l=t(48952),a=t(86673),s=t(19711),d=t(87815),p=t(49125),f=t(19395),v=t(7715),b=t(28598),h=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function O(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,o)}return t}function j(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?O(Object(t),!0).forEach((function(e){(0,u.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var m=76,g={uuid:"Run details"},Z={uuid:"Dependency tree"},y=[Z,g];function x(n){var e=n.height,t=n.heightOffset,u=n.pipeline,O=n.selectedRun,x=n.selectedTab,_=n.setSelectedTab,P=j({},(0,i.Z)(n,h));O?P.blockStatus=(0,f.IJ)(null===O||void 0===O?void 0:O.block_runs):P.noStatus=!0;var k=(0,v.Kn)(null===O||void 0===O?void 0:O.variables)?j({},null===O||void 0===O?void 0:O.variables):(null===O||void 0===O?void 0:O.variables)||{},L=null===O||void 0===O?void 0:O.event_variables;if(L&&(0,v.Kn)(L)&&!(0,v.Qr)(L))if((0,v.Kn)(k)&&k.hasOwnProperty("event")){var w=(0,v.Kn)(k.event)?k.event:{};k.event=j(j({},w),L)}else k.event=j({},L);var S=[];k&&JSON.stringify(k,null,2).split("\n").forEach((function(n){S.push(" ".concat(n))}));var T=O&&[["Run ID",null===O||void 0===O?void 0:O.id],["Variables",(0,b.jsx)(c.Z,{language:"json",small:!0,source:S.join("\n")},"variable_value")]],D=O&&(0,b.jsx)(a.Z,{pb:p.cd,px:p.cd,children:(0,b.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(n){return 1===n?"100px":null},rows:T.map((function(n,e){var t=(0,o.Z)(n,2),u=t[0],i=t[1];return[(0,b.jsx)(s.ZP,{monospace:!0,muted:!0,children:u},"key_".concat(e)),(0,b.jsx)(s.ZP,{monospace:!0,textOverflow:!0,children:i},"val_".concat(e))]})),uuid:"LogDetail"})}),C=x&&_;return(0,b.jsxs)(b.Fragment,{children:[C&&(0,b.jsx)(a.Z,{py:p.cd,children:(0,b.jsx)(r.Z,{onClickTab:_,selectedTabUUID:null===x||void 0===x?void 0:x.uuid,tabs:y})}),(!C||Z.uuid===(null===x||void 0===x?void 0:x.uuid))&&(0,b.jsx)(l.Z,j(j({},P),{},{height:e,heightOffset:(t||0)+(C?m:0),pipeline:u})),g.uuid===(null===x||void 0===x?void 0:x.uuid)&&D]})}},73828:function(n,e,t){t.d(e,{JD:function(){return b},Lu:function(){return i},PF:function(){return p},dT:function(){return r},n6:function(){return a},nB:function(){return v},oy:function(){return f},xF:function(){return d}});var o,u,i,r,c=t(82394),l=t(86422);!function(n){n.CSV="csv",n.JSON="json",n.MD="md",n.PY="py",n.R="r",n.SQL="sql",n.TXT="txt",n.YAML="yaml",n.YML="yml"}(i||(i={})),function(n){n.INIT_PY="__init__.py",n.METADATA_YAML="metadata.yaml",n.REQS_TXT="requirements.txt"}(r||(r={}));var a=[i.PY,i.SQL],s=[i.JSON,i.MD,i.PY,i.R,i.SQL,i.TXT,i.YAML,i.YML],d=new RegExp(s.map((function(n){return".".concat(n,"$")})).join("|")),p=(new RegExp(s.map((function(n){return".".concat(n,"$")})).join("|")),"charts"),f="pipelines",v=(o={},(0,c.Z)(o,i.MD,l.t6.MARKDOWN),(0,c.Z)(o,i.JSON,i.JSON),(0,c.Z)(o,i.PY,l.t6.PYTHON),(0,c.Z)(o,i.R,l.t6.R),(0,c.Z)(o,i.SQL,l.t6.SQL),(0,c.Z)(o,i.TXT,"text"),(0,c.Z)(o,i.YAML,l.t6.YAML),(0,c.Z)(o,i.YML,l.t6.YAML),o),b=(u={},(0,c.Z)(u,l.t6.MARKDOWN,i.MD),(0,c.Z)(u,l.t6.PYTHON,i.PY),(0,c.Z)(u,l.t6.R,i.R),(0,c.Z)(u,l.t6.SQL,i.SQL),(0,c.Z)(u,l.t6.YAML,i.YAML),(0,c.Z)(u,"text",i.TXT),u)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3391],{73828:function(n,e,t){t.d(e,{JD:function(){return g},Lu:function(){return o},PF:function(){return f},dT:function(){return c},n6:function(){return d},nB:function(){return p},oy:function(){return h},xF:function(){return s}});var i,r,o,c,a=t(82394),l=t(86422);!function(n){n.CSV="csv",n.JSON="json",n.MD="md",n.PY="py",n.R="r",n.SQL="sql",n.TXT="txt",n.YAML="yaml",n.YML="yml"}(o||(o={})),function(n){n.INIT_PY="__init__.py",n.METADATA_YAML="metadata.yaml",n.REQS_TXT="requirements.txt"}(c||(c={}));var d=[o.PY,o.SQL],u=[o.JSON,o.MD,o.PY,o.R,o.SQL,o.TXT,o.YAML,o.YML],s=new RegExp(u.map((function(n){return".".concat(n,"$")})).join("|")),f=(new RegExp(u.map((function(n){return".".concat(n,"$")})).join("|")),"charts"),h="pipelines",p=(i={},(0,a.Z)(i,o.MD,l.t6.MARKDOWN),(0,a.Z)(i,o.JSON,o.JSON),(0,a.Z)(i,o.PY,l.t6.PYTHON),(0,a.Z)(i,o.R,l.t6.R),(0,a.Z)(i,o.SQL,l.t6.SQL),(0,a.Z)(i,o.TXT,"text"),(0,a.Z)(i,o.YAML,l.t6.YAML),(0,a.Z)(i,o.YML,l.t6.YAML),i),g=(r={},(0,a.Z)(r,l.t6.MARKDOWN,o.MD),(0,a.Z)(r,l.t6.PYTHON,o.PY),(0,a.Z)(r,l.t6.R,o.R),(0,a.Z)(r,l.t6.SQL,o.SQL),(0,a.Z)(r,l.t6.YAML,o.YAML),(0,a.Z)(r,"text",o.TXT),r)},29237:function(n,e,t){var i=t(38626),r=t(67971),o=t(86673),c=t(19711),a=t(23831),l=t(73942),d=t(37391),u=t(49125),s=t(28598),f=(0,i.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*u.iI,1.5*u.iI,1.5*u.iI),h=i.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],l.n_,(function(n){return n.fullWidth&&"\n width: 100%;\n "}),(function(n){return!n.borderless&&"\n border: 1px solid ".concat((n.theme.interactive||a.Z.interactive).defaultBorder,";\n ")}),(function(n){return n.success&&"\n background-color: ".concat((n.theme.background||a.Z.background).successLight,";\n ")}),(function(n){return n.success&&!n.borderless&&"\n border: 1px solid ".concat((n.theme.background||a.Z.background).success,";\n ")}),(function(n){return!n.dark&&!n.success&&"\n background-color: ".concat((n.theme.background||a.Z.background).panel,";\n ")}),(function(n){return n.dark&&"\n background-color: ".concat((n.theme.background||a.Z.background).content,";\n ")}),(function(n){return!n.fullHeight&&"\n height: fit-content;\n "}),(function(n){return n.maxHeight&&"\n max-height: ".concat(n.maxHeight,";\n ")}),(function(n){return n.maxWidth&&"\n max-width: ".concat(n.maxWidth,"px;\n ")}),(function(n){return n.minWidth&&"\n min-width: ".concat(n.minWidth,"px;\n\n @media (max-width: ").concat(n.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(n){return n.borderless&&"\n border: none;\n "}),(function(n){return n.overflowVisible&&"\n overflow: visible;\n "})),p=i.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],l.n_,l.n_,(function(n){return"\n background-color: ".concat((n.theme.background||a.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((n.theme.interactive||a.Z.interactive).defaultBorder,";\n ")}),(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")}),f,(function(n){return n.headerPaddingVertical&&"\n padding-bottom: ".concat(n.headerPaddingVertical,"px;\n padding-top: ").concat(n.headerPaddingVertical,"px;\n ")})),g=i.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*u.iI,d.w5,(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")}),(function(n){return n.maxHeight&&"\n max-height: calc(".concat(n.maxHeight," - ").concat(15*u.iI,"px);\n ")}),(function(n){return n.noPadding&&"\n padding: 0;\n "}),(function(n){return n.overflowVisible&&"\n overflow: visible;\n "})),m=i.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],l.M8,l.YF,1.75*u.iI);e.Z=function(n){var e=n.borderless,t=n.children,i=n.containerRef,a=n.contentContainerRef,l=n.dark,d=n.footer,u=n.fullHeight,f=void 0===u||u,b=n.fullWidth,x=void 0===b||b,y=n.header,w=n.headerHeight,v=n.headerIcon,j=n.headerPaddingVertical,P=n.headerTitle,Z=n.maxHeight,_=n.maxWidth,S=n.minWidth,O=n.noPadding,N=n.overflowVisible,I=n.subtitle,H=n.success;return(0,s.jsxs)(h,{borderless:e,dark:l,fullHeight:f,fullWidth:x,maxHeight:Z,maxWidth:_,minWidth:S,overflowVisible:N,ref:i,success:H,children:[(y||P)&&(0,s.jsxs)(p,{headerPaddingVertical:j,height:w,children:[y&&y,P&&(0,s.jsx)(r.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(r.ZP,{alignItems:"center",children:[v&&v,(0,s.jsx)(o.Z,{ml:v?1:0,children:(0,s.jsx)(c.ZP,{bold:!0,default:!0,children:P})})]})})]}),(0,s.jsxs)(g,{maxHeight:Z,noPadding:O,overflowVisible:N,ref:a,children:[I&&(0,s.jsx)(o.Z,{mb:2,children:(0,s.jsx)(c.ZP,{default:!0,children:I})}),t]}),d&&(0,s.jsx)(m,{children:d})]})}},66176:function(n,e,t){var i=t(82394),r=t(91835),o=(t(82684),t(38626)),c=t(23831),a=t(73942),l=t(49125),d=t(28598);function u(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,i)}return t}function s(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?u(Object(t),!0).forEach((function(e){(0,i.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var f=o.default.div.withConfig({displayName:"ProgressBar__ProgressBarContainerStyle",componentId:"sc-10x9ojc-0"})(["border-radius:","px;height:","px;overflow:hidden;position:relative;width:100%;",""],a.BG,.75*l.iI,(function(n){return"\n background-color: ".concat((n.theme.monotone||c.Z.monotone).grey200,";\n ")})),h=o.default.div.withConfig({displayName:"ProgressBar__ProgressBarStyle",componentId:"sc-10x9ojc-1"})(["height:inherit;position:absolute;"," "," "," ",""],(function(n){return!n.danger&&"\n background-color: ".concat((n.theme.progress||c.Z.progress).positive,";\n ")}),(function(n){return n.progress&&"\n width: ".concat(n.progress,"%;\n ")}),(function(n){return n.danger&&"\n background-color: ".concat((n.theme.progress||c.Z.progress).negative,";\n ")}),(function(n){return n.animateProgress&&"\n animation: animate-progress ".concat(n.animateProgress.duration,"ms linear forwards;\n\n @keyframes animate-progress {\n 0% {\n width: ").concat(n.animateProgress.start,"%;\n }\n\n 100% {\n width: ").concat(n.animateProgress.end,"%;\n }\n }\n ")}));e.Z=function(n){var e=(0,r.Z)({},n);return(0,d.jsx)(f,s(s({},e),{},{children:(0,d.jsx)(h,s({},e))}))}},87372:function(n,e,t){var i,r,o,c,a,l,d,u,s=t(82394),f=t(26304),h=t(26653),p=t(38626),g=t(33591),m=t(23831),b=t(2005),x=t(31012),y=t(19711),w=t(49125),v=t(86673),j=t(28598),P=["children","condensed","inline","level","marketing","spacingBelow"];function Z(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,i)}return t}function _(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?Z(Object(t),!0).forEach((function(e){(0,s.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Z(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var S=(0,p.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," ",""],y.IH,(function(n){return n.color&&"\n color: ".concat(n.color,"\n ")}),(function(n){return n.yellow&&"\n color: ".concat((n.theme.accent||m.Z.accent).yellow,";\n ")}),(function(n){return n.center&&"\n text-align: center;\n "}),(function(n){return!n.monospace&&0===Number(n.weightStyle)&&"\n font-family: ".concat(b.iI,";\n ")}),(function(n){return!n.monospace&&1===Number(n.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(n){return!n.monospace&&2===Number(n.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(n){return!n.monospace&&3===Number(n.weightStyle)&&"\n font-family: ".concat(b.ry,";\n ")}),(function(n){return!n.monospace&&4===Number(n.weightStyle)&&"\n font-family: ".concat(b.YC,";\n ")}),(function(n){return!n.monospace&&5===Number(n.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(n){return!n.monospace&&(6===Number(n.weightStyle)||n.bold)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(n){return!n.monospace&&7===Number(n.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(n){return!n.monospace&&8===Number(n.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(n){return n.lineHeightAuto&&"\n line-height: normal !important;\n "})),O=p.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(n){return"\n color: ".concat((n.theme.content||m.Z.content).active,";\n ")})),N=p.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],S,g.media.md(i||(i=(0,h.Z)(["\n ","\n "])),x.aQ),g.media.lg(r||(r=(0,h.Z)(["\n ","\n "])),x.aQ),g.media.xl(o||(o=(0,h.Z)(["\n ","\n "])),x.aQ)),I=p.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],S,x.MJ),H=p.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],S,g.media.xs(c||(c=(0,h.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI),g.media.sm(a||(a=(0,h.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI),g.media.md(l||(l=(0,h.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI),g.media.lg(d||(d=(0,h.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI),g.media.xl(u||(u=(0,h.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*w.iI,7*w.iI)),k=p.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],S,x.BL),C=p.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],S),L=p.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],S),M=p.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],S),Y=p.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],S,(function(n){return 1===n.level&&"\n ".concat(x.MJ,"\n ")}),(function(n){return 2===n.level&&"\n ".concat(x.BL,"\n ")}),(function(n){return 3===n.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(n){return 4===n.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),z=function(n){var e,t=n.children,i=n.condensed,r=n.inline,o=n.level,c=n.marketing,a=n.spacingBelow,l=(0,f.Z)(n,P);r?e=Y:0===Number(o)?e=N:1===Number(o)?e=c?H:I:2===Number(o)?e=k:3===Number(o)?e=C:4===Number(o)?e=L:5===Number(o)&&(e=M);var d=(0,j.jsxs)(e,_(_({},l),{},{level:o,children:[a&&(0,j.jsx)(v.Z,{mb:i?2:3,children:t}),!a&&t]}));return r?d:(0,j.jsx)(O,{children:d})};z.defaultProps={level:3,weightStyle:6},e.Z=z}}]);