mage-ai 0.9.32__py3-none-any.whl → 0.9.34__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mage-ai might be problematic. Click here for more details.

Files changed (365) hide show
  1. mage_ai/api/constants.py +37 -2
  2. mage_ai/api/errors.py +9 -5
  3. mage_ai/api/middleware.py +2 -2
  4. mage_ai/api/mixins/__init__.py +0 -0
  5. mage_ai/api/mixins/result_set.py +65 -0
  6. mage_ai/api/operations/base.py +41 -11
  7. mage_ai/api/operations/constants.py +7 -6
  8. mage_ai/api/parsers/BaseParser.py +6 -4
  9. mage_ai/api/parsers/PipelineScheduleParser.py +36 -2
  10. mage_ai/api/policies/BackfillPolicy.py +1 -0
  11. mage_ai/api/policies/BasePolicy.py +229 -40
  12. mage_ai/api/policies/PermissionPolicy.py +17 -0
  13. mage_ai/api/policies/PipelineSchedulePolicy.py +18 -2
  14. mage_ai/api/policies/RolePermissionPolicy.py +2 -1
  15. mage_ai/api/policies/RolePolicy.py +3 -0
  16. mage_ai/api/policies/SessionPolicy.py +36 -1
  17. mage_ai/api/policies/StatusPolicy.py +46 -3
  18. mage_ai/api/policies/UserPolicy.py +25 -2
  19. mage_ai/api/policies/mixins/__init__.py +0 -0
  20. mage_ai/api/policies/mixins/user_permissions.py +241 -0
  21. mage_ai/api/presenters/PermissionPresenter.py +35 -8
  22. mage_ai/api/presenters/RolePresenter.py +29 -12
  23. mage_ai/api/presenters/StatusPresenter.py +11 -0
  24. mage_ai/api/presenters/UserPresenter.py +21 -24
  25. mage_ai/api/resources/BaseResource.py +24 -9
  26. mage_ai/api/resources/BlockResource.py +3 -2
  27. mage_ai/api/resources/DatabaseResource.py +2 -2
  28. mage_ai/api/resources/PermissionResource.py +65 -3
  29. mage_ai/api/resources/Resource.py +8 -1
  30. mage_ai/api/resources/RolePermissionResource.py +23 -0
  31. mage_ai/api/resources/RoleResource.py +75 -4
  32. mage_ai/api/resources/StatusResource.py +34 -0
  33. mage_ai/api/resources/UserResource.py +35 -4
  34. mage_ai/api/result_set.py +8 -1
  35. mage_ai/authentication/permissions/constants.py +78 -0
  36. mage_ai/data_integrations/destinations/constants.py +1 -0
  37. mage_ai/data_integrations/utils/config.py +9 -0
  38. mage_ai/data_integrations/utils/scheduler.py +16 -7
  39. mage_ai/data_preparation/models/block/__init__.py +56 -16
  40. mage_ai/data_preparation/models/block/data_integration/mixins.py +92 -1
  41. mage_ai/data_preparation/models/block/data_integration/utils.py +5 -5
  42. mage_ai/data_preparation/models/block/integration/__init__.py +12 -7
  43. mage_ai/data_preparation/models/block/sql/__init__.py +5 -2
  44. mage_ai/data_preparation/models/block/sql/utils/shared.py +15 -1
  45. mage_ai/data_preparation/models/pipelines/interactions.py +15 -0
  46. mage_ai/data_preparation/shared/secrets.py +7 -17
  47. mage_ai/data_preparation/templates/data_exporters/streaming/google_cloud_pubsub.yaml +5 -0
  48. mage_ai/data_preparation/templates/repo/metadata.yaml +5 -0
  49. mage_ai/io/druid.py +9 -5
  50. mage_ai/io/mssql.py +52 -30
  51. mage_ai/io/postgres.py +1 -0
  52. mage_ai/io/sql.py +15 -1
  53. mage_ai/orchestration/db/models/oauth.py +181 -17
  54. mage_ai/orchestration/db/models/schedules.py +11 -0
  55. mage_ai/presenters/interactions/constants.py +1 -0
  56. mage_ai/presenters/pages/loaders/pipeline_schedules.py +9 -3
  57. mage_ai/server/api/base.py +16 -6
  58. mage_ai/server/api/v1.py +2 -1
  59. mage_ai/server/constants.py +1 -1
  60. mage_ai/server/frontend_dist/404.html +2 -2
  61. mage_ai/server/frontend_dist/_next/static/PBVuphyo_muEAj347ZP_b/_buildManifest.js +1 -0
  62. mage_ai/server/frontend_dist/_next/static/chunks/1124-d8fc76201b83b376.js +1 -0
  63. mage_ai/server/frontend_dist/_next/static/chunks/{1749-9ec0f4709f5a9284.js → 1749-a6bdce4ee8a09bce.js} +1 -1
  64. mage_ai/server/frontend_dist/_next/static/chunks/1769-613e23e361eb5bce.js +1 -0
  65. mage_ai/server/frontend_dist/_next/static/chunks/1821-953efd0da290d25f.js +1 -0
  66. mage_ai/server/frontend_dist/_next/static/chunks/2327-1a797c758f8b064a.js +1 -0
  67. mage_ai/server/frontend_dist/_next/static/chunks/2677-a85c5a72bb695304.js +1 -0
  68. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3419-6c8ec8db8c398c12.js → frontend_dist/_next/static/chunks/3419-0df6c5ef72f2e672.js} +1 -1
  69. mage_ai/server/frontend_dist/_next/static/chunks/3684-e1a713b7c16f0151.js +1 -0
  70. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3859-3501cdba0a33f9f2.js → frontend_dist/_next/static/chunks/3859-ba594d21a1260cd2.js} +1 -1
  71. mage_ai/server/frontend_dist/_next/static/chunks/4636-84f545d1d238df13.js +1 -0
  72. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/4839-963da65cea58054f.js → frontend_dist/_next/static/chunks/4839-e5fe343a369734bc.js} +1 -1
  73. mage_ai/server/frontend_dist/_next/static/chunks/5457-97433bc45b42a88a.js +1 -0
  74. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/5499-63667ad5a785dba5.js → frontend_dist/_next/static/chunks/5499-b74459f6be5f9229.js} +1 -1
  75. mage_ai/server/frontend_dist/_next/static/chunks/6043-6ea109833b88eb1d.js +1 -0
  76. mage_ai/server/frontend_dist/_next/static/chunks/6333-ca4cd6a73a597a40.js +1 -0
  77. mage_ai/server/frontend_dist/_next/static/chunks/7022-80d082a1d7fd1234.js +1 -0
  78. mage_ai/server/frontend_dist/_next/static/chunks/7361-25f211ef377e5958.js +1 -0
  79. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/8013-1d6b1f7c13264cb4.js → frontend_dist/_next/static/chunks/8013-e67c71ddea072a20.js} +1 -1
  80. mage_ai/server/frontend_dist/_next/static/chunks/8146-941c5155c3bfcc35.js +1 -0
  81. mage_ai/server/frontend_dist/_next/static/chunks/9161-837b653aa849a76f.js +1 -0
  82. mage_ai/server/frontend_dist/_next/static/chunks/9264-5730e4e059db40a8.js +1 -0
  83. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-752d991f239a128f.js +1 -0
  84. mage_ai/server/frontend_dist/_next/static/chunks/pages/{block-layout-a624972d126a3dbd.js → block-layout-a27a28d2a615e364.js} +1 -1
  85. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-98e27a4d7bd0da47.js +1 -0
  86. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/{[...slug]-a95787fe1695f493.js → [...slug]-9eb5dad57da13efd.js} +1 -1
  87. mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-data-products-0d55711df91a78d0.js → global-data-products-26909dec66f00231.js} +1 -1
  88. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-b9eea6abc676ca81.js +1 -0
  89. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-11c601c6ef07fe86.js +1 -0
  90. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-ae6083077c9c1c41.js +1 -0
  91. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-bfce0ee677d57206.js +1 -0
  92. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-476c921d62f565fc.js +1 -0
  93. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/overview-9bc34ef66d84330a.js → frontend_dist/_next/static/chunks/pages/overview-2ec6b17e45a52be8.js} +1 -1
  94. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-605918f3a5c1aac4.js +1 -0
  95. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-84ec3ab0770bcd68.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ee65a62ed166bd85.js} +1 -1
  96. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-2402004a19a6ad53.js +1 -0
  97. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-9a5b4768a640cd68.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-8781db69f19759a1.js} +1 -1
  98. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-d7fd4857579e2b00.js +1 -0
  99. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-bd4bd009146bab36.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-234007c99efdccf6.js} +1 -1
  100. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-8405a83adeaa8ff5.js → block-runs-da7510d4b277e47b.js} +1 -1
  101. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runtime-98aa0840a00cc661.js → block-runtime-eae853ff34b09481.js} +1 -1
  102. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-0fb48e1cc51f78b2.js → monitors-a057b17847b82468.js} +1 -1
  103. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/{[run]-845c1f010d5ec380.js → [run]-99d11c86f8b15369.js} +1 -1
  104. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-9255f85760e1f57a.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-3f0980d8810a540b.js} +1 -1
  105. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{settings-187ac359020704e1.js → settings-9edf75d03460aaeb.js} +1 -1
  106. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-c52d0c49439ec620.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-e7692e54979f037d.js} +1 -1
  107. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-7b3b57523b226a0e.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-cb6a3bcaf4fa1a81.js} +1 -1
  108. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-5eff96c149584e87.js +1 -0
  109. mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipelines-efc080913a247e99.js → pipelines-270b912e1ac189b5.js} +1 -1
  110. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-2058d022972cdea4.js +1 -0
  111. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/[...slug]-1a95628ea8d0d846.js +1 -0
  112. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions-cb1cdf5f8e5bf9c5.js +1 -0
  113. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-58978256db4efbda.js +1 -0
  114. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/[...slug]-9ddd7eb842d5a911.js +1 -0
  115. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles-1694c5eb1acbcf30.js +1 -0
  116. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-6850e854fbedbb61.js +1 -0
  117. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/[...slug]-5061c073e1c0de07.js +1 -0
  118. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-f551c5665bfd3494.js +1 -0
  119. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-6fe3657070f98aca.js → frontend_dist/_next/static/chunks/pages/sign-in-e779dbab123e626e.js} +1 -1
  120. mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/[...slug]-935113d252ada806.js +1 -0
  121. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/templates-25b6d24cfa81c306.js → frontend_dist/_next/static/chunks/pages/templates-7079d637e396f2a8.js} +1 -1
  122. mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-67fdb4a3be93aa14.js +1 -0
  123. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-9c0374c7c783b34a.js +1 -0
  124. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-ea3a0d48e5822b42.js +1 -0
  125. mage_ai/server/frontend_dist/block-layout.html +2 -2
  126. mage_ai/server/frontend_dist/files.html +2 -2
  127. mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
  128. mage_ai/server/frontend_dist/global-data-products.html +2 -2
  129. mage_ai/server/frontend_dist/index.html +2 -2
  130. mage_ai/server/frontend_dist/manage/settings.html +2 -2
  131. mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
  132. mage_ai/server/frontend_dist/manage/users/new.html +2 -2
  133. mage_ai/server/frontend_dist/manage/users.html +2 -2
  134. mage_ai/server/frontend_dist/manage.html +2 -2
  135. mage_ai/server/frontend_dist/overview.html +2 -2
  136. mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
  137. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  138. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
  139. mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +2 -2
  140. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  141. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
  142. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  143. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  144. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
  145. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
  146. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
  147. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
  148. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
  149. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  150. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
  151. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  152. mage_ai/server/frontend_dist/pipelines.html +2 -2
  153. mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
  154. mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +24 -0
  155. mage_ai/server/frontend_dist/settings/workspace/permissions.html +24 -0
  156. mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
  157. mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +24 -0
  158. mage_ai/server/frontend_dist/settings/workspace/roles.html +24 -0
  159. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
  160. mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +24 -0
  161. mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
  162. mage_ai/server/frontend_dist/settings.html +2 -2
  163. mage_ai/server/frontend_dist/sign-in.html +5 -5
  164. mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
  165. mage_ai/server/frontend_dist/templates.html +2 -2
  166. mage_ai/server/frontend_dist/terminal.html +2 -2
  167. mage_ai/server/frontend_dist/test.html +2 -2
  168. mage_ai/server/frontend_dist/triggers.html +2 -2
  169. mage_ai/server/frontend_dist/version-control.html +2 -2
  170. mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
  171. mage_ai/server/frontend_dist_base_path_template/_next/static/L-IKw5_bRZUs-wyjnpN_j/_buildManifest.js +1 -0
  172. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1124-d8fc76201b83b376.js +1 -0
  173. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1749-9ec0f4709f5a9284.js → 1749-a6bdce4ee8a09bce.js} +1 -1
  174. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1769-613e23e361eb5bce.js +1 -0
  175. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1821-953efd0da290d25f.js +1 -0
  176. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2327-1a797c758f8b064a.js +1 -0
  177. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2677-a85c5a72bb695304.js +1 -0
  178. mage_ai/server/{frontend_dist/_next/static/chunks/3419-6c8ec8db8c398c12.js → frontend_dist_base_path_template/_next/static/chunks/3419-0df6c5ef72f2e672.js} +1 -1
  179. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3684-e1a713b7c16f0151.js +1 -0
  180. mage_ai/server/{frontend_dist/_next/static/chunks/3859-3501cdba0a33f9f2.js → frontend_dist_base_path_template/_next/static/chunks/3859-ba594d21a1260cd2.js} +1 -1
  181. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4636-84f545d1d238df13.js +1 -0
  182. mage_ai/server/{frontend_dist/_next/static/chunks/4839-963da65cea58054f.js → frontend_dist_base_path_template/_next/static/chunks/4839-e5fe343a369734bc.js} +1 -1
  183. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5457-97433bc45b42a88a.js +1 -0
  184. mage_ai/server/{frontend_dist/_next/static/chunks/5499-63667ad5a785dba5.js → frontend_dist_base_path_template/_next/static/chunks/5499-b74459f6be5f9229.js} +1 -1
  185. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6043-6ea109833b88eb1d.js +1 -0
  186. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6333-ca4cd6a73a597a40.js +1 -0
  187. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7022-80d082a1d7fd1234.js +1 -0
  188. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-25f211ef377e5958.js +1 -0
  189. mage_ai/server/{frontend_dist/_next/static/chunks/8013-1d6b1f7c13264cb4.js → frontend_dist_base_path_template/_next/static/chunks/8013-e67c71ddea072a20.js} +1 -1
  190. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8146-941c5155c3bfcc35.js +1 -0
  191. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9161-837b653aa849a76f.js +1 -0
  192. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-5730e4e059db40a8.js +1 -0
  193. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-752d991f239a128f.js +1 -0
  194. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{block-layout-a624972d126a3dbd.js → block-layout-a27a28d2a615e364.js} +1 -1
  195. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-98e27a4d7bd0da47.js +1 -0
  196. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/{[...slug]-a95787fe1695f493.js → [...slug]-9eb5dad57da13efd.js} +1 -1
  197. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-data-products-0d55711df91a78d0.js → global-data-products-26909dec66f00231.js} +1 -1
  198. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-b9eea6abc676ca81.js +1 -0
  199. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-11c601c6ef07fe86.js +1 -0
  200. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-ae6083077c9c1c41.js +1 -0
  201. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-bfce0ee677d57206.js +1 -0
  202. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-476c921d62f565fc.js +1 -0
  203. mage_ai/server/{frontend_dist/_next/static/chunks/pages/overview-9bc34ef66d84330a.js → frontend_dist_base_path_template/_next/static/chunks/pages/overview-2ec6b17e45a52be8.js} +1 -1
  204. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-605918f3a5c1aac4.js +1 -0
  205. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-84ec3ab0770bcd68.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ee65a62ed166bd85.js} +1 -1
  206. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-2402004a19a6ad53.js +1 -0
  207. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-9a5b4768a640cd68.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-8781db69f19759a1.js} +1 -1
  208. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-d7fd4857579e2b00.js +1 -0
  209. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-bd4bd009146bab36.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-234007c99efdccf6.js} +1 -1
  210. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-8405a83adeaa8ff5.js → block-runs-da7510d4b277e47b.js} +1 -1
  211. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runtime-98aa0840a00cc661.js → block-runtime-eae853ff34b09481.js} +1 -1
  212. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-0fb48e1cc51f78b2.js → monitors-a057b17847b82468.js} +1 -1
  213. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/{[run]-845c1f010d5ec380.js → [run]-99d11c86f8b15369.js} +1 -1
  214. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-9255f85760e1f57a.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-3f0980d8810a540b.js} +1 -1
  215. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{settings-187ac359020704e1.js → settings-9edf75d03460aaeb.js} +1 -1
  216. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-c52d0c49439ec620.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-e7692e54979f037d.js} +1 -1
  217. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-7b3b57523b226a0e.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-cb6a3bcaf4fa1a81.js} +1 -1
  218. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-5eff96c149584e87.js +1 -0
  219. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{pipelines-efc080913a247e99.js → pipelines-270b912e1ac189b5.js} +1 -1
  220. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-2058d022972cdea4.js +1 -0
  221. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/[...slug]-1a95628ea8d0d846.js +1 -0
  222. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions-cb1cdf5f8e5bf9c5.js +1 -0
  223. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-58978256db4efbda.js +1 -0
  224. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/[...slug]-9ddd7eb842d5a911.js +1 -0
  225. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles-1694c5eb1acbcf30.js +1 -0
  226. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-6850e854fbedbb61.js +1 -0
  227. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/[...slug]-5061c073e1c0de07.js +1 -0
  228. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users-f551c5665bfd3494.js +1 -0
  229. mage_ai/server/{frontend_dist/_next/static/chunks/pages/sign-in-6fe3657070f98aca.js → frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-e779dbab123e626e.js} +1 -1
  230. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-935113d252ada806.js +1 -0
  231. mage_ai/server/{frontend_dist/_next/static/chunks/pages/templates-25b6d24cfa81c306.js → frontend_dist_base_path_template/_next/static/chunks/pages/templates-7079d637e396f2a8.js} +1 -1
  232. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/terminal-67fdb4a3be93aa14.js +1 -0
  233. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-9c0374c7c783b34a.js +1 -0
  234. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-ea3a0d48e5822b42.js +1 -0
  235. mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
  236. mage_ai/server/frontend_dist_base_path_template/files.html +5 -5
  237. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +5 -5
  238. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +5 -5
  239. mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
  240. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +5 -5
  241. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +5 -5
  242. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +5 -5
  243. mage_ai/server/frontend_dist_base_path_template/manage/users.html +5 -5
  244. mage_ai/server/frontend_dist_base_path_template/manage.html +5 -5
  245. mage_ai/server/frontend_dist_base_path_template/overview.html +5 -5
  246. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +5 -5
  247. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +5 -5
  248. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +5 -5
  249. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +5 -5
  250. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
  251. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +5 -5
  252. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +5 -5
  253. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
  254. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +5 -5
  255. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +5 -5
  256. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +5 -5
  257. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +5 -5
  258. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +5 -5
  259. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +5 -5
  260. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +5 -5
  261. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
  262. mage_ai/server/frontend_dist_base_path_template/pipelines.html +5 -5
  263. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +5 -5
  264. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +24 -0
  265. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +24 -0
  266. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +5 -5
  267. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +24 -0
  268. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +24 -0
  269. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +5 -5
  270. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +24 -0
  271. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +5 -5
  272. mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
  273. mage_ai/server/frontend_dist_base_path_template/sign-in.html +13 -13
  274. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +5 -5
  275. mage_ai/server/frontend_dist_base_path_template/templates.html +5 -5
  276. mage_ai/server/frontend_dist_base_path_template/terminal.html +5 -5
  277. mage_ai/server/frontend_dist_base_path_template/test.html +4 -4
  278. mage_ai/server/frontend_dist_base_path_template/triggers.html +5 -5
  279. mage_ai/server/frontend_dist_base_path_template/version-control.html +5 -5
  280. mage_ai/server/server.py +37 -2
  281. mage_ai/services/aws/__init__.py +19 -8
  282. mage_ai/services/spark/config.py +5 -1
  283. mage_ai/services/spark/spark.py +5 -4
  284. mage_ai/settings/__init__.py +2 -0
  285. mage_ai/streaming/constants.py +1 -0
  286. mage_ai/streaming/sinks/google_cloud_pubsub.py +66 -0
  287. mage_ai/streaming/sinks/sink_factory.py +6 -0
  288. mage_ai/tests/api/operations/test_operations.py +8 -2
  289. mage_ai/tests/api/operations/test_pipeline_schedules.py +3 -0
  290. mage_ai/tests/data_preparation/models/block/sql/utils/test_shared.py +130 -5
  291. mage_ai/tests/factory.py +2 -0
  292. mage_ai/tests/orchestration/test_pipeline_scheduler.py +20 -3
  293. mage_ai/tests/streaming/sinks/test_google_cloud_pubsub.py +28 -0
  294. mage_ai/usage_statistics/logger.py +4 -1
  295. {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/METADATA +1 -1
  296. {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/RECORD +302 -268
  297. mage_ai/api/policies/utils.py +0 -14
  298. mage_ai/server/frontend_dist/_next/static/cbN7L4Ms6UUPoANozEh9w/_buildManifest.js +0 -1
  299. mage_ai/server/frontend_dist/_next/static/chunks/1769-e2efd4df8d09481f.js +0 -1
  300. mage_ai/server/frontend_dist/_next/static/chunks/2327-2d8a1555605cf4af.js +0 -1
  301. mage_ai/server/frontend_dist/_next/static/chunks/2369-cb9cd97052e18d27.js +0 -1
  302. mage_ai/server/frontend_dist/_next/static/chunks/2677-aea54e655c4a727f.js +0 -1
  303. mage_ai/server/frontend_dist/_next/static/chunks/5457-994e1044953f1425.js +0 -1
  304. mage_ai/server/frontend_dist/_next/static/chunks/5597-c034402ee26af3b4.js +0 -1
  305. mage_ai/server/frontend_dist/_next/static/chunks/6333-d1f8db4e7d9656a5.js +0 -1
  306. mage_ai/server/frontend_dist/_next/static/chunks/6648-9bd31397f1d1b551.js +0 -1
  307. mage_ai/server/frontend_dist/_next/static/chunks/9161-0101571a3635a938.js +0 -1
  308. mage_ai/server/frontend_dist/_next/static/chunks/9264-7c4fcfed1200046a.js +0 -1
  309. mage_ai/server/frontend_dist/_next/static/chunks/9696-3e8ab7786f0e3a0e.js +0 -1
  310. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-976b488b8aea327f.js +0 -1
  311. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-1a6c6654bfc953ac.js +0 -1
  312. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-49004d918b04c866.js +0 -1
  313. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-97177740fbb6eb9f.js +0 -1
  314. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-5b6411c9eb8c4ba4.js +0 -1
  315. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-0a7a746cc0998608.js +0 -1
  316. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-606012a580245001.js +0 -1
  317. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-0801de3c9a2976ea.js +0 -1
  318. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-0a5865d4cf012127.js +0 -1
  319. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-87b1a0601c4236cd.js +0 -1
  320. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-77ffaa2d721a0a4e.js +0 -1
  321. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-4e72d40881ac0605.js +0 -1
  322. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-8da8f8e2fdb1c99f.js +0 -1
  323. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-be029347e99fcea2.js +0 -1
  324. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-d4b07df78b3d6037.js +0 -1
  325. mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/[...slug]-87c492e9edc6064e.js +0 -1
  326. mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-2ab9f3d0c50cce81.js +0 -1
  327. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-0ba40243a030ddf4.js +0 -1
  328. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-28a3a43d65074394.js +0 -1
  329. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1769-e2efd4df8d09481f.js +0 -1
  330. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2327-2d8a1555605cf4af.js +0 -1
  331. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2369-cb9cd97052e18d27.js +0 -1
  332. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2677-aea54e655c4a727f.js +0 -1
  333. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5457-994e1044953f1425.js +0 -1
  334. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5597-c034402ee26af3b4.js +0 -1
  335. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6333-d1f8db4e7d9656a5.js +0 -1
  336. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6648-9bd31397f1d1b551.js +0 -1
  337. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9161-0101571a3635a938.js +0 -1
  338. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-7c4fcfed1200046a.js +0 -1
  339. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9696-3e8ab7786f0e3a0e.js +0 -1
  340. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-976b488b8aea327f.js +0 -1
  341. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-1a6c6654bfc953ac.js +0 -1
  342. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-49004d918b04c866.js +0 -1
  343. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-97177740fbb6eb9f.js +0 -1
  344. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-5b6411c9eb8c4ba4.js +0 -1
  345. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-0a7a746cc0998608.js +0 -1
  346. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-606012a580245001.js +0 -1
  347. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-0801de3c9a2976ea.js +0 -1
  348. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-0a5865d4cf012127.js +0 -1
  349. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-87b1a0601c4236cd.js +0 -1
  350. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-77ffaa2d721a0a4e.js +0 -1
  351. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-4e72d40881ac0605.js +0 -1
  352. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-8da8f8e2fdb1c99f.js +0 -1
  353. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-be029347e99fcea2.js +0 -1
  354. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users-d4b07df78b3d6037.js +0 -1
  355. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-87c492e9edc6064e.js +0 -1
  356. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/terminal-2ab9f3d0c50cce81.js +0 -1
  357. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-0ba40243a030ddf4.js +0 -1
  358. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-28a3a43d65074394.js +0 -1
  359. mage_ai/server/frontend_dist_base_path_template/_next/static/o_Yc57jh8Te2SI-VoipGQ/_buildManifest.js +0 -1
  360. /mage_ai/server/frontend_dist/_next/static/{cbN7L4Ms6UUPoANozEh9w → PBVuphyo_muEAj347ZP_b}/_ssgManifest.js +0 -0
  361. /mage_ai/server/frontend_dist_base_path_template/_next/static/{o_Yc57jh8Te2SI-VoipGQ → L-IKw5_bRZUs-wyjnpN_j}/_ssgManifest.js +0 -0
  362. {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/LICENSE +0 -0
  363. {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/WHEEL +0 -0
  364. {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/entry_points.txt +0 -0
  365. {mage_ai-0.9.32.dist-info → mage_ai-0.9.34.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8867],{17717:function(e){!function(){"use strict";var n={114:function(e){function n(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function t(e,n){for(var t,r="",i=0,o=-1,c=0,u=0;u<=e.length;++u){if(u<e.length)t=e.charCodeAt(u);else{if(47===t)break;t=47}if(47===t){if(o===u-1||1===c);else if(o!==u-1&&2===c){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var a=r.lastIndexOf("/");if(a!==r.length-1){-1===a?(r="",i=0):i=(r=r.slice(0,a)).length-1-r.lastIndexOf("/"),o=u,c=0;continue}}else if(2===r.length||1===r.length){r="",i=0,o=u,c=0;continue}n&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(o+1,u):r=e.slice(o+1,u),i=u-o-1;o=u,c=0}else 46===t&&-1!==c?++c:c=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var c;o>=0?c=arguments[o]:(void 0===e&&(e=""),c=e),n(c),0!==c.length&&(r=c+"/"+r,i=47===c.charCodeAt(0))}return r=t(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(n(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=t(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return n(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var i=arguments[t];n(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,t){if(n(e),n(t),e===t)return"";if((e=r.resolve(e))===(t=r.resolve(t)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var o=e.length,c=o-i,u=1;u<t.length&&47===t.charCodeAt(u);++u);for(var a=t.length-u,s=c<a?c:a,l=-1,d=0;d<=s;++d){if(d===s){if(a>s){if(47===t.charCodeAt(u+d))return t.slice(u+d+1);if(0===d)return t.slice(u+d)}else c>s&&(47===e.charCodeAt(i+d)?l=d:0===d&&(l=0));break}var f=e.charCodeAt(i+d);if(f!==t.charCodeAt(u+d))break;47===f&&(l=d)}var h="";for(d=i+l+1;d<=o;++d)d!==o&&47!==e.charCodeAt(d)||(0===h.length?h+="..":h+="/..");return h.length>0?h+t.slice(u+l):(u+=l,47===t.charCodeAt(u)&&++u,t.slice(u))},_makeLong:function(e){return e},dirname:function(e){if(n(e),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,i=-1,o=!0,c=e.length-1;c>=1;--c)if(47===(t=e.charCodeAt(c))){if(!o){i=c;break}}else o=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,t){if(void 0!==t&&"string"!==typeof t)throw new TypeError('"ext" argument must be a string');n(e);var r,i=0,o=-1,c=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var u=t.length-1,a=-1;for(r=e.length-1;r>=0;--r){var s=e.charCodeAt(r);if(47===s){if(!c){i=r+1;break}}else-1===a&&(c=!1,a=r+1),u>=0&&(s===t.charCodeAt(u)?-1===--u&&(o=r):(u=-1,o=a))}return i===o?o=a:-1===o&&(o=e.length),e.slice(i,o)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!c){i=r+1;break}}else-1===o&&(c=!1,o=r+1);return-1===o?"":e.slice(i,o)},extname:function(e){n(e);for(var t=-1,r=0,i=-1,o=!0,c=0,u=e.length-1;u>=0;--u){var a=e.charCodeAt(u);if(47!==a)-1===i&&(o=!1,i=u+1),46===a?-1===t?t=u:1!==c&&(c=1):-1!==t&&(c=-1);else if(!o){r=u+1;break}}return-1===t||-1===i||0===c||1===c&&t===i-1&&t===r+1?"":e.slice(t,i)},format:function(e){if(null===e||"object"!==typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,n){var t=n.dir||n.root,r=n.base||(n.name||"")+(n.ext||"");return t?t===n.root?t+r:t+e+r:r}("/",e)},parse:function(e){n(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var r,i=e.charCodeAt(0),o=47===i;o?(t.root="/",r=1):r=0;for(var c=-1,u=0,a=-1,s=!0,l=e.length-1,d=0;l>=r;--l)if(47!==(i=e.charCodeAt(l)))-1===a&&(s=!1,a=l+1),46===i?-1===c?c=l:1!==d&&(d=1):-1!==c&&(d=-1);else if(!s){u=l+1;break}return-1===c||-1===a||0===d||1===d&&c===a-1&&c===u+1?-1!==a&&(t.base=t.name=0===u&&o?e.slice(1,a):e.slice(u,a)):(0===u&&o?(t.name=e.slice(1,c),t.base=e.slice(1,a)):(t.name=e.slice(u,c),t.base=e.slice(u,a)),t.ext=e.slice(c,a)),u>0?t.dir=e.slice(0,u-1):o&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},t={};function r(e){var i=t[e];if(void 0!==i)return i.exports;var o=t[e]={exports:{}},c=!0;try{n[e](o,o.exports,r),c=!1}finally{c&&delete t[e]}return o.exports}r.ab="//";var i=r(114);e.exports=i}()},59739:function(e,n,t){"use strict";var r=t(56669);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,n,t,i,o,c){if(c!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function n(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:o,resetWarningCache:i};return t.PropTypes=t,t}},47329:function(e,n,t){e.exports=t(59739)()},56669:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},94629:function(e,n,t){"use strict";t.d(n,{Z:function(){return R}});var r=t(82394),i=t(21831),o=t(82684),c=t(50724),u=t(82555),a=t(97618),s=t(70613),l=t(94636),d=t(68899),f=t(28598);function h(e,n){var t=e.children,r=e.noPadding;return(0,f.jsx)(d.HS,{noPadding:r,ref:n,children:t})}var p=o.forwardRef(h),g=t(62547),m=t(82571),v=t(35686),b=t(98464),O=t(46684),A=t(70515),_=t(53808),C=t(19183);function y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function w(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?y(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):y(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function x(e,n){var t,r=e.addProjectBreadcrumbToCustomBreadcrumbs,h=e.after,y=e.afterHeader,x=e.afterHidden,R=e.afterWidth,T=e.afterWidthOverride,E=e.appendBreadcrumbs,S=e.before,Z=e.beforeWidth,j=e.breadcrumbs,k=e.children,P=e.errors,D=e.headerMenuItems,N=e.headerOffset,I=e.mainContainerHeader,M=e.navigationItems,L=e.setAfterHidden,W=e.setErrors,H=e.subheaderChildren,U=e.subheaderNoPadding,B=e.title,F=e.uuid,K=(0,C.i)().width,z="dashboard_after_width_".concat(F),X="dashboard_before_width_".concat(F),Y=(0,o.useRef)(null),G=(0,o.useState)(T?R:(0,_.U2)(z,R)),q=G[0],Q=G[1],V=(0,o.useState)(!1),$=V[0],J=V[1],ee=(0,o.useState)(S?Math.max((0,_.U2)(X,Z),13*A.iI):null),ne=ee[0],te=ee[1],re=(0,o.useState)(!1),ie=re[0],oe=re[1],ce=(0,o.useState)(null)[1],ue=v.ZP.projects.list({},{revalidateOnFocus:!1}).data,ae=null===ue||void 0===ue?void 0:ue.projects,se={label:function(){var e;return null===ae||void 0===ae||null===(e=ae[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},le=[];j&&(r&&le.push(se),le.push.apply(le,(0,i.Z)(j))),(null===j||void 0===j||!j.length||E)&&(null===ae||void 0===ae?void 0:ae.length)>=1&&(null!==j&&void 0!==j&&j.length||le.unshift({bold:!E,label:function(){return B}}),le.unshift(se)),(0,o.useEffect)((function(){null===Y||void 0===Y||!Y.current||$||ie||null===ce||void 0===ce||ce(Y.current.getBoundingClientRect().width)}),[$,q,ie,ne,Y,ce,K]),(0,o.useEffect)((function(){$||(0,_.t8)(z,q)}),[x,$,q,z]),(0,o.useEffect)((function(){ie||(0,_.t8)(X,ne)}),[ie,ne,X]);var de=(0,b.Z)(R);return(0,o.useEffect)((function(){T&&de!==R&&Q(R)}),[T,R,de]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(s.Z,{title:B}),(0,f.jsx)(l.Z,{breadcrumbs:le,menuItems:D,project:null===ae||void 0===ae?void 0:ae[0],version:null===ae||void 0===ae||null===(t=ae[0])||void 0===t?void 0:t.version}),(0,f.jsxs)(d.Nk,{ref:n,children:[0!==(null===M||void 0===M?void 0:M.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(m.Z,{navigationItems:M,showMore:!0})}),(0,f.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(g.Z,{after:h,afterHeader:y,afterHeightOffset:O.Mz,afterHidden:x,afterMousedownActive:$,afterWidth:q,before:S,beforeHeightOffset:O.Mz,beforeMousedownActive:ie,beforeWidth:d.k1+(S?ne:0),headerOffset:N,hideAfterCompletely:!L,leftOffset:S?d.k1:null,mainContainerHeader:I,mainContainerRef:Y,setAfterHidden:L,setAfterMousedownActive:J,setAfterWidth:Q,setBeforeMousedownActive:oe,setBeforeWidth:te,children:[H&&(0,f.jsx)(p,{noPadding:U,children:H}),k]})})]}),P&&(0,f.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===W||void 0===W?void 0:W(null)},children:(0,f.jsx)(u.Z,w(w({},P),{},{onClose:function(){return null===W||void 0===W?void 0:W(null)}}))})]})}var R=o.forwardRef(x)},29480:function(e,n,t){"use strict";t.d(n,{$W:function(){return l},cl:function(){return d},cv:function(){return f},dE:function(){return a},zG:function(){return s}});var r=t(38626),i=t(44897),o=t(42631),c=t(70515),u=t(47041),a=r.default.div.withConfig({displayName:"indexstyle__SectionStyle",componentId:"sc-7a1uhf-0"})(["border-radius:","px;padding:","px;",""],o.n_,c.cd*c.iI,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).popup,";\n ")})),s=r.default.div.withConfig({displayName:"indexstyle__DocsStyle",componentId:"sc-7a1uhf-1"})(["> div{overflow:initial;}> div img{max-width:80%;background:white;padding:1rem;max-height:20vh;}"]),l=r.default.div.withConfig({displayName:"indexstyle__CodeEditorStyle",componentId:"sc-7a1uhf-2"})(["padding-top:","px;",""],c.cd*c.iI,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).codeTextarea,";\n ")})),d=r.default.div.withConfig({displayName:"indexstyle__TableContainerStyle",componentId:"sc-7a1uhf-3"})(["overflow:auto;max-height:90vh;width:100%;"," "," "," "," ",""],u.w5,(function(e){return e.hideHorizontalScrollbar&&"\n overflow-x: hidden;\n "}),(function(e){return e.width&&"\n width: ".concat(e.width,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,";\n ")}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")})),f=r.default.div.withConfig({displayName:"indexstyle__HeaderRowStyle",componentId:"sc-7a1uhf-4"})(["padding:","px;"," "," ",""],2*c.iI,(function(e){return"\n background-color: ".concat((e.theme||i.Z).interactive.defaultBackground,";\n border-bottom: ").concat(o.YF,"px ").concat(o.M8," ").concat((e.theme||i.Z).borders.medium,";\n ")}),(function(e){return e.padding&&"\n padding: ".concat(e.padding,"px;\n ")}),(function(e){return e.rounded&&"\n border-top-left-radius: ".concat(o.n_,"px;\n border-top-right-radius: ").concat(o.n_,"px;\n ")}))},4611:function(e,n,t){"use strict";t.d(n,{f:function(){return u}});var r=t(38626),i=t(44897),o=t(70515),c=t(42631),u=r.default.div.withConfig({displayName:"Tablestyle__PopupContainerStyle",componentId:"sc-8ammqd-0"})(["position:absolute;max-height:","px;z-index:10;border-radius:","px;padding:","px;"," "," "," ",""],58*o.iI,c.TR,2*o.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||i.Z.shadow).popup,";\n background-color: ").concat((e.theme.interactive||i.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 ")}))},75083:function(e,n,t){"use strict";t.d(n,{HF:function(){return c},L6:function(){return r}});var r,i=t(82359),o=t(72473);function c(e,n,t){var c=e.owner,u=(e.roles,[{Icon:o.Vz,id:r.WORKSPACES,isSelected:function(){return r.WORKSPACES===t},label:function(){return"Workspaces"},linkProps:{href:"/manage"}}]);return c&&u.push({Icon:o.NO,id:r.USERS,isSelected:function(){return r.USERS===t},label:function(){return"Users"},linkProps:{href:"/manage/users"}}),n==i.k.MAIN&&u.push({Icon:o.Zr,id:r.SETTINGS,isSelected:function(){return r.SETTINGS===t},label:function(){return"Settings"},linkProps:{href:"/manage/settings"}}),u}!function(e){e.WORKSPACES="workspaces",e.USERS="users",e.SETTINGS="settings"}(r||(r={}))},59533:function(e,n,t){"use strict";var r=t(82684),i=t(94629),o=t(35686),c=t(70515),u=t(75083),a=t(50178),s=t(28598);n.Z=function(e){var n=e.before,t=e.breadcrumbs,l=void 0===t?[]:t,d=e.children,f=e.errors,h=e.pageName,p=e.subheaderChildren,g=o.ZP.statuses.list().data,m=(0,r.useMemo)((function(){var e,n;return null===g||void 0===g||null===(e=g.statuses)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.project_type}),[g]),v=(0,a.PR)()||{};return(0,s.jsx)(i.Z,{before:n,beforeWidth:n?50*c.iI:0,breadcrumbs:l,errors:f,navigationItems:(0,u.HF)(v,m,h),subheaderChildren:p,title:"Workspaces",uuid:"workspaces/index",children:d})}},44425:function(e,n,t){"use strict";t.d(n,{$W:function(){return v},DA:function(){return g},HX:function(){return _},J8:function(){return A},L8:function(){return u},LE:function(){return f},Lk:function(){return w},Lq:function(){return h},M5:function(){return p},Q3:function(){return b},Qj:function(){return C},Ut:function(){return T},V4:function(){return R},VZ:function(){return O},dO:function(){return d},f2:function(){return x},iZ:function(){return y},t6:function(){return a},tf:function(){return l}});var r,i,o,c,u,a,s=t(82394);!function(e){e.CONDITION="condition",e.DBT_SNAPSHOT="snapshot",e.DYNAMIC="dynamic",e.DYNAMIC_CHILD="dynamic_child",e.REDUCE_OUTPUT="reduce_output",e.REPLICA="replica"}(u||(u={})),function(e){e.MARKDOWN="markdown",e.PYTHON="python",e.R="r",e.SQL="sql",e.YAML="yaml"}(a||(a={}));var l,d=(r={},(0,s.Z)(r,a.MARKDOWN,"MD"),(0,s.Z)(r,a.PYTHON,"PY"),(0,s.Z)(r,a.R,"R"),(0,s.Z)(r,a.SQL,"SQL"),(0,s.Z)(r,a.YAML,"YAML"),r),f=(i={},(0,s.Z)(i,a.MARKDOWN,"Markdown"),(0,s.Z)(i,a.PYTHON,"Python"),(0,s.Z)(i,a.R,"R"),(0,s.Z)(i,a.SQL,"SQL"),(0,s.Z)(i,a.YAML,"YAML"),i);!function(e){e.CALLBACK="callback",e.CHART="chart",e.CONDITIONAL="conditional",e.CUSTOM="custom",e.DATA_EXPORTER="data_exporter",e.DATA_LOADER="data_loader",e.DBT="dbt",e.EXTENSION="extension",e.GLOBAL_DATA_PRODUCT="global_data_product",e.SCRATCHPAD="scratchpad",e.SENSOR="sensor",e.MARKDOWN="markdown",e.TRANSFORMER="transformer"}(l||(l={}));var h,p=[l.CALLBACK,l.CONDITIONAL,l.EXTENSION];!function(e){e.BLUE="blue",e.GREY="grey",e.PINK="pink",e.PURPLE="purple",e.TEAL="teal",e.YELLOW="yellow"}(h||(h={}));var g,m,v=[l.CHART,l.CUSTOM,l.DATA_EXPORTER,l.DATA_LOADER,l.SCRATCHPAD,l.SENSOR,l.MARKDOWN,l.TRANSFORMER],b=[l.CUSTOM,l.DATA_EXPORTER,l.DATA_LOADER,l.SCRATCHPAD,l.SENSOR,l.MARKDOWN,l.TRANSFORMER],O=[l.DATA_EXPORTER,l.DATA_LOADER],A=[l.DATA_EXPORTER,l.DATA_LOADER,l.TRANSFORMER],_=[l.DATA_EXPORTER,l.DATA_LOADER,l.DBT,l.TRANSFORMER],C=[l.CHART,l.SCRATCHPAD,l.SENSOR,l.MARKDOWN],y=[l.CALLBACK,l.CHART,l.EXTENSION,l.SCRATCHPAD,l.MARKDOWN],w=[l.CUSTOM,l.DATA_EXPORTER,l.DATA_LOADER,l.SENSOR,l.TRANSFORMER];!function(e){e.EXECUTED="executed",e.FAILED="failed",e.NOT_EXECUTED="not_executed",e.UPDATED="updated"}(g||(g={})),function(e){e.BLOCK_FILE="block_file",e.CUSTOM_BLOCK_TEMPLATE="custom_block_template",e.MAGE_TEMPLATE="mage_template"}(m||(m={}));var x=[l.CUSTOM,l.DATA_EXPORTER,l.DATA_LOADER,l.TRANSFORMER],R=(o={},(0,s.Z)(o,l.CALLBACK,"Callback"),(0,s.Z)(o,l.CHART,"Chart"),(0,s.Z)(o,l.CONDITIONAL,"Conditional"),(0,s.Z)(o,l.CUSTOM,"Custom"),(0,s.Z)(o,l.DATA_EXPORTER,"Data exporter"),(0,s.Z)(o,l.DATA_LOADER,"Data loader"),(0,s.Z)(o,l.DBT,"DBT"),(0,s.Z)(o,l.EXTENSION,"Extension"),(0,s.Z)(o,l.GLOBAL_DATA_PRODUCT,"Global data product"),(0,s.Z)(o,l.MARKDOWN,"Markdown"),(0,s.Z)(o,l.SCRATCHPAD,"Scratchpad"),(0,s.Z)(o,l.SENSOR,"Sensor"),(0,s.Z)(o,l.TRANSFORMER,"Transformer"),o),T=[l.DATA_LOADER,l.TRANSFORMER,l.DATA_EXPORTER,l.SENSOR];c={},(0,s.Z)(c,l.DATA_EXPORTER,"DE"),(0,s.Z)(c,l.DATA_LOADER,"DL"),(0,s.Z)(c,l.SCRATCHPAD,"SP"),(0,s.Z)(c,l.SENSOR,"SR"),(0,s.Z)(c,l.MARKDOWN,"MD"),(0,s.Z)(c,l.TRANSFORMER,"TF")},82359:function(e,n,t){"use strict";var r,i;t.d(n,{d:function(){return r},k:function(){return i}}),function(e){e.ADD_NEW_BLOCK_V2="add_new_block_v2",e.DATA_INTEGRATION_IN_BATCH_PIPELINE="data_integration_in_batch_pipeline",e.INTERACTIONS="interactions",e.LOCAL_TIMEZONE="display_local_timezone",e.OPERATION_HISTORY="operation_history"}(r||(r={})),function(e){e.MAIN="main",e.STANDALONE="standalone",e.SUB="sub"}(i||(i={}))},11074:function(e,n,t){"use strict";t.d(n,{Z:function(){return a}});var r=t(38626),i=t(44897),o=t(42631),c=r.default.div.withConfig({displayName:"indexstyle__PanelStyle",componentId:"sc-1rfr5wd-0"})(["border-radius:","px;"," ",""],o.n_,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).panel,";\n ")}),(function(e){return e.fullWidth&&"\n width: 100%;\n "})),u=t(28598);var a=function(e){var n=e.children,t=e.fullWidth,r=void 0===t||t;return(0,u.jsx)(c,{fullWidth:r,children:n})}},2182:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return q}});var r,i=t(77837),o=t(75582),c=t(38860),u=t.n(c),a=t(82684),s=t(69864),l=t(71180),d=t(50724),f=t(82394),h=t(75810),p=t(55485),g=t(85854),m=t(93369),v=t(11074),b=t(44085),O=t(38276),A=t(30160),_=t(17488),C=t(69650),y=t(35686),w=["ReadWriteOnce","ReadWriteMany","ReadOnlyMany"],x=[{label:"Workspace name",required:!0,uuid:"name"}],R=[{label:"Service account name",uuid:"service_account_name"},{label:"Ingress name",labelDescription:"If you want to add the workspace to an existing ingress, enter the name of the ingress here. Otherwise, the workspace can be accessed through the service.",uuid:"ingress_name"},{label:"Storage class name",labelDescription:"Volume claim parameters",uuid:"storage_class_name"},{label:"Storage request size (in GB)",type:"number",uuid:"storage_request_size"}],T=t(44425);!function(e){e.K8S="k8s",e.ECS="ecs",e.CLOUD_RUN="cloud_run",e.EMR="emr"}(r||(r={}));var E=t(79633),S=t(29480),Z=t(72619),j=t(81728),k=t(28598);function P(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function D(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,f.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 N=function(e){var n=e.clusterType,t=e.onCancel,i=e.onCreate,c=(0,a.useState)(),u=c[0],l=c[1],d=(0,a.useState)(),P=d[0],N=d[1],I=(0,a.useState)(null),M=I[0],L=I[1],W=(0,s.Db)(y.ZP.workspaces.useCreate(),{onSuccess:function(e){return(0,Z.wD)(e,{callback:function(e){e.error_message?l(e.error_message):i()},onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.message;l(r),console.log(t,r)}})}}),H=(0,o.Z)(W,2),U=H[0],B=H[1].isLoading,F=(0,a.useMemo)((function(){return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(g.Z,{level:5,children:"Kubernetes settings (optional)"}),R.map((function(e){var n=e.autoComplete,t=e.disabled,r=e.label,i=e.labelDescription,o=e.required,c=e.type,u=e.uuid;return(0,k.jsxs)(O.Z,{mt:1,children:[i&&(0,k.jsx)(O.Z,{mb:1,children:(0,k.jsx)(A.ZP,{small:!0,children:i})}),(0,k.jsx)(_.Z,{autoComplete:n,disabled:t,label:r,onChange:function(e){L((function(n){return D(D({},n),{},(0,f.Z)({},u,e.target.value))}))},primary:!0,required:o,setContentOnMount:!0,type:c,value:(null===M||void 0===M?void 0:M[u])||""})]},u)})),(0,k.jsx)(O.Z,{mt:1,children:(0,k.jsx)(b.Z,{label:"Access mode",onChange:function(e){e.preventDefault(),L((function(n){return D(D({},n),{},{storage_access_mode:e.target.value})}))},placeholder:"Access mode",value:null===M||void 0===M?void 0:M.storage_access_mode,children:w.map((function(e){return(0,k.jsx)("option",{value:e,children:e},e)}))})}),(0,k.jsx)(O.Z,{mt:2,children:(0,k.jsxs)(p.ZP,{alignItems:"center",children:[(0,k.jsx)(A.ZP,{default:!0,monospace:!0,small:!0,children:"Configure container"}),(0,k.jsx)(O.Z,{ml:1}),(0,k.jsx)(C.Z,{checked:P,onCheck:function(){return N((function(e){return!e}))}})]})}),P&&(0,k.jsx)(O.Z,{mt:1,children:(0,k.jsx)(S.$W,{children:(0,k.jsx)(h.Z,{autoHeight:!0,fontSize:12,language:T.t6.YAML,onChange:function(e){L((function(n){return D(D({},n),{},{container_config:e})}))},tabSize:2,value:null===M||void 0===M?void 0:M.container_config,width:"100%"})})})]})}),[P,M]);return(0,k.jsx)(v.Z,{children:(0,k.jsx)("div",{style:{width:"500px"},children:(0,k.jsxs)(O.Z,{p:2,children:[(0,k.jsx)(p.ZP,{justifyContent:"center",children:(0,k.jsx)(g.Z,{level:4,children:"Create new workspace"})}),(0,k.jsxs)("form",{children:[x.map((function(e){var n=e.autoComplete,t=e.disabled,r=e.label,i=e.required,o=e.type,c=e.uuid;return(0,k.jsx)(O.Z,{mt:2,children:(0,k.jsx)(_.Z,{autoComplete:n,disabled:t,label:r,onChange:function(e){L((function(n){return D(D({},n),{},(0,f.Z)({},c,e.target.value))}))},primary:!0,required:i,setContentOnMount:!0,type:o,value:(null===M||void 0===M?void 0:M[c])||""})},c)})),n===r.K8S&&(0,k.jsx)(O.Z,{mt:2,children:F})]}),B&&(0,k.jsx)(O.Z,{mt:1,children:(0,k.jsx)(A.ZP,{small:!0,warning:!0,children:"This may take up to a few minutes... Once the service is created, it may take another 5-10 minutes for the service to be accessible."})}),!B&&u&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(O.Z,{mt:1,children:(0,k.jsx)(A.ZP,{danger:!0,small:!0,children:"Failed to create instance, see error below."})}),(0,k.jsx)(O.Z,{mt:1,children:(0,k.jsx)(A.ZP,{danger:!0,small:!0,children:u})})]}),(0,k.jsx)(O.Z,{my:2,children:(0,k.jsxs)(p.ZP,{children:[(0,k.jsx)(m.ZP,{background:E.a$,bold:!0,inline:!0,loading:B,onClick:function(){var e=M||{},t=e.name,r=e.container_config;if(t){var i=D({},M);i.name=function(e){return"ecs"===n?(0,j.We)(e,"_"):(0,j.We)(e,"-")}(t),i.container_config=P&&r,U({workspace:D(D({},i),{},{cluster_type:n})})}else l("Please enter a valid name!")},uuid:"workspaces/create",children:"Create"}),(0,k.jsx)(O.Z,{ml:1}),(0,k.jsx)(m.ZP,{bold:!0,inline:!0,onClick:t,uuid:"workspaces/cancel",children:"Cancel"})]})})]})})})},I=t(70374),M=t(93808),L=t(75499),W=t(59533),H=t(72473),U=t(42631),B=t(8059),F=t(4611),K=t(70515),z=t(75083),X=t(89538);function Y(e){var n=e.fetchWorkspaces,t=e.instance,r=e.clusterType,i=(0,a.useRef)(null),c=(0,a.useState)(),u=c[0],f=c[1],h=(0,a.useState)(),g=h[0],m=h[1],v=t.name,b=(t.task_arn,{cluster_type:r}),_=(0,s.Db)(y.ZP.workspaces.useUpdate(v,b),{onSuccess:function(e){return(0,Z.wD)(e,{callback:function(){n(),f(!1)},onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.message;console.log(t,r)}})}}),C=(0,o.Z)(_,1)[0],w=(0,s.Db)(y.ZP.workspaces.useDelete(v,b),{onSuccess:function(e){return(0,Z.wD)(e,{callback:function(){n(),f(!1)},onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.message;console.log(t,r)}})}}),x=(0,o.Z)(w,1)[0],R=(0,a.useMemo)((function(){var e=t.status,n=[{label:function(){return(0,k.jsx)(A.ZP,{children:"Delete workspace"})},onClick:function(){return m(!0)},uuid:"delete_workspace"}];return"ecs"===r&&("STOPPED"===e?n.unshift({label:function(){return(0,k.jsx)(A.ZP,{children:"Resume instance"})},onClick:function(){return C({workspace:{action:"resume",cluster_type:r,name:t.name,task_arn:t.task_arn}})},uuid:"resume_instance"}):"RUNNING"===e&&n.unshift({label:function(){return(0,k.jsx)(A.ZP,{children:"Stop instance"})},onClick:function(){return C({workspace:{action:"stop",cluster_type:r,name:t.name,task_arn:t.task_arn}})},uuid:"stop_instance"})),n}),[r,t,C]);return(0,k.jsx)(k.Fragment,{children:["ecs","k8s"].includes(r)&&(0,k.jsxs)("div",{ref:i,style:{position:"relative",zIndex:"1"},children:[(0,k.jsx)(l.Z,{iconOnly:!0,onClick:function(){return f(!u)},children:(0,k.jsx)(H.mH,{size:2*K.iI})}),(0,k.jsx)(d.Z,{disableEscape:!0,onClickOutside:function(){f(!1),m(!1)},open:u,children:g?(0,k.jsxs)(F.f,{leftOffset:30*-K.iI,topOffset:3*-K.iI,width:30*K.iI,children:[(0,k.jsx)(A.ZP,{children:"Are you sure you want to delete"}),(0,k.jsx)(A.ZP,{children:"this instance? You may not be"}),(0,k.jsx)(A.ZP,{children:"able to recover your data."}),(0,k.jsx)(O.Z,{mt:1}),(0,k.jsxs)(p.ZP,{children:[(0,k.jsx)(l.Z,{danger:!0,onClick:x,children:"Confirm"}),(0,k.jsx)(O.Z,{ml:1}),(0,k.jsx)(l.Z,{default:!0,onClick:function(){return m(!1)},children:"Cancel"})]})]}):(0,k.jsx)(I.Z,{items:R,left:25*-K.iI,open:u,parentRef:i,topOffset:3*-K.iI,uuid:"workspaces/more_actions",width:25*K.iI})})]})})}function G(){var e=y.ZP.statuses.list().data,n=(0,a.useMemo)((function(){var n,t;return(null===e||void 0===e||null===(n=e.statuses)||void 0===n||null===(t=n[0])||void 0===t?void 0:t.instance_type)||"ecs"}),[e]),t=y.ZP.workspaces.list({cluster_type:n},{refreshInterval:1e4,revalidateOnFocus:!0}),r=t.data,i=t.mutate,c=(0,a.useMemo)((function(){var e;return null===r||void 0===r||null===(e=r.workspaces)||void 0===e?void 0:e.filter((function(e){return e.name}))}),[r]),u=(0,X.dd)((function(){return(0,k.jsx)(N,{clusterType:n,onCancel:f,onCreate:function(){i(),f()}})}),{},[n,i],{background:!0,uuid:"configure_workspace"}),s=(0,o.Z)(u,2),d=s[0],f=s[1];return(0,k.jsx)(W.Z,{breadcrumbs:[{bold:!0,label:function(){return"Workspaces"}}],pageName:z.L6.WORKSPACES,subheaderChildren:(0,k.jsx)(m.ZP,{background:B.eW,beforeElement:(0,k.jsx)(H.mm,{size:2.5*K.iI}),bold:!0,inline:!0,onClick:function(){return d()},uuid:"workspaces/new",children:"Create new workspace"}),children:(0,k.jsx)(L.Z,{columnFlex:[2,4,2,3,1,null],columns:[{uuid:"Status"},{uuid:"Instance Name"},{uuid:"Type"},{uuid:"Public IP address"},{uuid:"Open"},{label:function(){return""},uuid:"Actions"}],rows:null===c||void 0===c?void 0:c.map((function(e){var t=e.instance,r=t.ip,o=t.name,c=t.status,u=t.type,a="http://".concat(r);return"ecs"===n&&(a="http://".concat(r,":6789")),[(0,k.jsx)(l.Z,{borderRadius:U.D7,danger:"STOPPED"===c,default:"PROVISIONING"===c,notClickable:!0,padding:"6px",primary:"RUNNING"===c,warning:"PENDING"===c,children:(0,j.vg)(c)},"status"),(0,k.jsx)(A.ZP,{children:o},"name"),(0,k.jsx)(A.ZP,{children:(0,j.vg)(u)},"type"),(0,k.jsx)(A.ZP,{children:r},"ip"),(0,k.jsx)(l.Z,{disabled:!r,iconOnly:!0,onClick:function(){return window.open(a)},children:(0,k.jsx)(H.M0,{size:2*K.iI})},"open_button"),(0,k.jsx)(Y,{clusterType:n,fetchWorkspaces:i,instance:t},"more_actions")]}))})})}G.getInitialProps=(0,i.Z)(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var q=(0,M.Z)(G)},81728:function(e,n,t){"use strict";t.d(n,{RA:function(){return h},j3:function(){return C},kC:function(){return p},vg:function(){return _},kE:function(){return S},Mp:function(){return g},Pb:function(){return l},HW:function(){return w},HD:function(){return d},wX:function(){return m},x6:function(){return v},_6:function(){return b},zf:function(){return y},Y6:function(){return T},Lo:function(){return E},wE:function(){return Z},Tz:function(){return x},J3:function(){return O},We:function(){return f},QV:function(){return R},C5:function(){return A}});var r=t(75582),i=t(17717),o=["aged","ancient","autumn","billowing","bitter","black","blue","bold","broken","cold","cool","crimson","damp","dark","dawn","delicate","divine","dry","empty","falling","floral","fragrant","frosty","green","hidden","holy","icy","late","lingering","little","lively","long","misty","morning","muddy","nameless","old","patient","polished","proud","purple","quiet","red","restless","rough","shy","silent","small","snowy","solitary","sparkling","spring","still","summer","throbbing","twilight","wandering","weathered","white","wild","winter","wispy","withered","young"],c=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],u=(t(92083),["bird","breeze","brook","bush","butterfly","cherry","cloud","darkness","dawn","dew","dream","dust","feather","field","fire","firefly","flower","fog","forest","frog","frost","glade","glitter","grass","haze","hill","lake","leaf","meadow","moon","morning","mountain","night","paper","pine","pond","rain","resonance","river","sea","shadow","shape","silence","sky","smoke","snow","snowflake","sound","star","sun","sun","sunset","surf","thunder","tree","violet","voice","water","water","waterfall","wave","wildflower","wind","wood"]),a=["0","1","2","3","4","5","6","7","8","9"],s=t(86735);function l(e){if(!e)return!1;try{JSON.parse(e)}catch(n){return!1}return!0}function d(e){return"string"===typeof e}function f(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return e.split(" ").join(n)}function h(e){return e.split(" ").join("_")}function p(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return String((new Date).getTime()*e)}function m(e){return e.charAt(0).toLowerCase()+e.slice(1)}function v(e){if(null===e||"undefined"===typeof e)return"";var n=e.toString().split("."),t=(0,r.Z)(n,2),i=t[0],o=t[1],c=i.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");return o?"".concat(c,".").concat(o):c}function b(e,n){var t,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=n,c=void 0!==o&&null!==o;if(c||(o=2),1===o)t=e;else{var u=e.length,a=e[u-1];t="y"===a&&"day"!==e?"".concat(e.slice(0,u-1),"ies"):"".concat(e,"s"===a?"es":"s")}if(c&&!i){var s=r?v(o):o;return"".concat(s," ").concat(t)}return t}function O(e){return null===e||void 0===e?void 0:e.replace(/_/g," ")}function A(e){var n=e.length;return"ies"===e.slice(n-3,n)?"".concat(e.slice(0,n-3),"y"):"es"===e.slice(n-2,n)&&"ces"!==e.slice(n-3,n)?e.slice(0,n-2):e.slice(0,n-1)}function _(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return p(O(e.toLowerCase()))}function C(e){return e.replace(/([A-Z])/g," $1")}function y(e){var n,t=[["second",60],["minute",60],["hour",24],["day",7],["week",4],["month",12],["year",null]];return t.forEach((function(i,o){if(!n){var c=(0,r.Z)(i,2),u=c[0],a=c[1],s=t.slice(0,o).reduce((function(e,n){return e*Number(n[1])}),1);e<Number(a)*s&&(n=b(u,Math.round(e/s)))}})),n}function w(e){return"undefined"!==typeof e&&null!==e&&!isNaN(e)}function x(e){var n,t=e.match(/\d+(\.?\d*)%/)||[];return Number(null===(n=t[0])||void 0===n?void 0:n.slice(0,-1))}function R(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,t=Math.pow(10,n);return Math.round((e||0)*t)/t}function T(){return"".concat((0,s.mp)(o)," ").concat((0,s.mp)(u))}function E(){return"".concat((0,s.mp)(c)).concat((0,s.mp)(a))}function S(e){return null===e||void 0===e?void 0:e.toLowerCase().replace(/\W+/g,"_")}function Z(e){var n,t=e.split(i.sep),r=t[t.length-1].split(".");return n=1===r.length?r[0]:r.slice(0,-1).join("."),t.slice(0,t.length-1).concat(n).join(i.sep)}},13157:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage",function(){return t(2182)}])},80022:function(e,n,t){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,{Z:function(){return r}})},15544:function(e,n,t){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}t.d(n,{Z:function(){return r}})},99177:function(e,n,t){"use strict";function r(e,n){return r=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},r(e,n)}function i(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&r(e,n)}t.d(n,{Z:function(){return i}})},93189:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(12539),i=t(80022);function o(e,n){if(n&&("object"===r(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}}},function(e){e.O(0,[844,2083,8789,8013,600,4636,8264,4666,5499,5810,9774,2888,179],(function(){return n=13157,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1709],{81354:function(e,n,t){"use strict";t.d(n,{Z:function(){return b}});var r=t(82684),i=t(63588),o=t.n(i),c=t(75823),a=t(29989),u=t(62072),l=t(53989),d=t(49894),s=t(18246),p=t(59309),f=t(65743),h=["data","className","top","left","x","y0","y1","xScale","yScale","color","keys","value","order","offset","children"];function m(){return m=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},m.apply(this,arguments)}function b(e){var n=e.data,t=e.className,i=e.top,b=e.left,g=e.x,x=e.y0,v=void 0===x?u.l8:x,y=e.y1,j=void 0===y?u.xf:y,Z=e.xScale,_=e.yScale,O=e.color,P=e.keys,w=e.value,k=e.order,C=e.offset,I=e.children,T=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,h),E=(0,c.Z)();P&&E.keys(P),w&&(0,d.Z)(E.value,w),k&&E.order((0,s.ZP)(k)),C&&E.offset((0,p.ZP)(C));var N=E(n),L=(0,l.Z)(Z),S=N.map((function(e,n){var t=e.key;return{index:n,key:t,bars:e.map((function(n,r){var i=(_(v(n))||0)-(_(j(n))||0),o=_(j(n)),c="bandwidth"in Z?Z(g(n.data)):Math.max((Z(g(n.data))||0)-L/2);return{bar:n,key:t,index:r,height:i,width:L,x:c||0,y:o||0,color:O(e.key,r)}}))}}));return I?r.createElement(r.Fragment,null,I(S)):r.createElement(a.Z,{className:o()("visx-bar-stack",t),top:i,left:b},S.map((function(e){return e.bars.map((function(n){return r.createElement(f.Z,m({key:"bar-stack-"+e.index+"-"+n.index,x:n.x,y:n.y,height:n.height,width:n.width,fill:n.color},T))}))})))}},62072:function(e,n,t){"use strict";function r(e){return null==e?void 0:e[0]}function i(e){return null==e?void 0:e[1]}t.d(n,{l8:function(){return r},xf:function(){return i}})},59309:function(e,n,t){"use strict";t.d(n,{ZP:function(){return l}});var r=t(12759),i=t(27500),o=t(82610),c=t(34812),a=t(77944),u={expand:r.Z,diverging:i.Z,none:o.Z,silhouette:c.Z,wiggle:a.Z};Object.keys(u);function l(e){return e&&u[e]||u.none}},18246:function(e,n,t){"use strict";t.d(n,{ZP:function(){return l}});var r=t(39586),i=t(25516),o=t(54164),c=t(8512),a=t(2010),u={ascending:r.Z,descending:i.Z,insideout:o.Z,none:c.Z,reverse:a.Z};Object.keys(u);function l(e){return e&&u[e]||u.none}},64657:function(e,n,t){"use strict";t.d(n,{CD:function(){return a},NU:function(){return o},a_:function(){return r},hu:function(){return c}});var r,i=t(44897);!function(e){e.BLOCK_RUNS="block_runs",e.BLOCK_RUNTIME="block_runtime",e.PIPELINE_RUNS="pipeline_runs"}(r||(r={}));var o=[i.Z.accent.warning,i.Z.background.success,i.Z.accent.negative,i.Z.content.active,i.Z.interactive.linkPrimary],c=["cancelled","completed","failed","initial","running"],a=-50},24491:function(e,n,t){"use strict";t.d(n,{i:function(){return p},p:function(){return l}});var r=t(82394),i=t(75582),o=t(61556),c=t(57653);function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var l=function(e,n){if(!e)return[];var t=Object.entries(e).reduce((function(e,n){var t=(0,i.Z)(n,2),r=(t[0],t[1].data),o={};return Object.entries(r).forEach((function(n){var t=(0,i.Z)(n,2),r=t[0],c=t[1],a={};r in e&&(a=e[r]);var l={};Object.entries(c).forEach((function(e){var n,t=(0,i.Z)(e,2),r=t[0],o=t[1],c=null!==(n=a)&&void 0!==n&&n[r]?a[r]:0;l[r]=c+o})),o[r]=u(u({},a),l)})),u(u({},e),o)}),{});return n.map((function(e){return u({date:e},t[e]||{})}))},d=o.E.reduce((function(e,n){return u(u({},e),{},(0,r.Z)({},n,0))}),{}),s=new Set(o.E),p=function(e,n){var t;if(!e)return{groupedPipelineRunData:[],pipelineRunCountByPipelineType:{},totalPipelineRunCount:0,ungroupedPipelineRunData:[]};var o=(t={},(0,r.Z)(t,c.qL.INTEGRATION,u({},d)),(0,r.Z)(t,c.qL.PYSPARK,{}),(0,r.Z)(t,c.qL.PYTHON,u({},d)),(0,r.Z)(t,c.qL.STREAMING,u({},d)),t),a=0,l=Object.entries(e).reduce((function(e,n){var t=(0,i.Z)(n,2),r=(t[0],t[1].data),c={},l={};return Object.entries(r).forEach((function(n){var t=(0,i.Z)(n,2),r=t[0],d=t[1],p={},f={};r in e.grouped?(p=u({},e.grouped[r]),c[r]=u({},p)):c[r]={},r in e.ungrouped&&(f=u({},e.ungrouped[r]));var h={},m={};Object.entries(d).forEach((function(n){var t=(0,i.Z)(n,2),d=t[0],b=t[1];"null"===d||null===d||(r in e.grouped&&d in e.grouped[r]&&(p[d]=u({},e.grouped[r][d])),h[d]={},Object.entries(b).forEach((function(e){var n,t,r,c=(0,i.Z)(e,2),u=c[0],l=c[1],b=null!==(n=p)&&void 0!==n&&null!==(t=n[d])&&void 0!==t&&t[u]?p[d][u]:0;h[d][u]=b+l;var g=null!==(r=f)&&void 0!==r&&r[u]?f[u]:0;m[u]=null!==m&&void 0!==m&&m[u]?m[u]+l:g+l,s.has(u)&&(o[d][u]=(o[d][u]||0)+l),a+=l})),c[r][d]=u(u({},p[d]),h[d]),l[r]=u(u({},f),m))}))})),{grouped:u(u({},e.grouped),c),ungrouped:u(u({},e.ungrouped),l)}}),{grouped:{},ungrouped:{}}),p=[],f=[];return n.forEach((function(e){p.push(u({date:e},l.grouped[e]||{})),f.push(u({date:e},l.ungrouped[e]||{}))})),{groupedPipelineRunData:p,pipelineRunCountByPipelineType:o,totalPipelineRunCount:a,ungroupedPipelineRunData:f}}},29584:function(e,n,t){"use strict";var r=t(26304),i=t(82394),o=t(21831),c=(t(82684),t(84969)),a=t(90948),u=t(81354),l=t(67778),d=t(29989),s=t(17066),p=t(29179),f=t(65376),h=t(48072),m=t(98677),b=t(84181),g=t(24903),x=t(55485),v=t(26226),y=t(30160),j=t(94035),Z=t(44897),_=t(42631),O=t(95363),P=t(70515),w=t(79221),k=t(28598),C=["height","width","xAxisLabel","yAxisLabel"];function I(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function T(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?I(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):I(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function E(e){var n=e.backgroundColor,t=e.colors,r=e.data,i=e.getXValue,x=(e.getYValue,e.height),v=e.keys,j=e.margin,P=e.numYTicks,C=e.showLegend,I=e.tooltipLeftOffset,E=void 0===I?0:I,N=e.width,L=e.xLabelFormat,S=e.yLabelFormat,D=(0,p.Z)(),R=D.hideTooltip,M=D.showTooltip,A=D.tooltipData,B=D.tooltipLeft,H=D.tooltipOpen,U=D.tooltipTop,Y=N-(j.left+j.right),F=x-(j.bottom+j.top),V=r.reduce((function(e,n){var t=n,r=v.reduce((function(e,n){return Number(t[n])&&(e+=Number(t[n])),e}),0);return e.push(r),e}),[]),q=(0,m.Z)({domain:r.map(i),padding:.4,range:[0,Y],round:!1}),G=(0,b.Z)({domain:[0,Math.max.apply(Math,(0,o.Z)(V))],range:[F,0],round:!0}),z=(0,g.Z)({domain:v,range:t});return(0,k.jsxs)("div",{style:{position:"relative",zIndex:2},children:[(0,k.jsxs)("svg",{height:x,width:N,children:[(0,k.jsx)("rect",{fill:n||Z.Z.background.chartBlock,height:x,rx:14,width:N,x:0,y:0}),(0,k.jsx)(l.Z,{height:F,left:j.left,scale:G,stroke:"black",strokeOpacity:.2,top:j.top,width:Y}),(0,k.jsx)(d.Z,{left:j.left,top:j.top,children:(0,k.jsx)(u.Z,{color:z,data:r,keys:v,value:function(e,n){return e[n]||0},x:i,xScale:q,yScale:G,children:function(e){return e.map((function(e){return e.bars.map((function(n){return(0,k.jsx)("rect",{fill:n.color,height:n.height,onMouseLeave:R,onMouseMove:function(e){var t=(0,h.Z)(e),r=n.x+n.width/2+E;M({tooltipData:n,tooltipLeft:r,tooltipTop:(null===t||void 0===t?void 0:t.y)+10})},width:n.width,x:n.x,y:n.y},"bar-stack-".concat(e.index,"-").concat(n.index))}))}))}})}),(0,k.jsx)(c.Z,{hideTicks:!0,left:j.left,numTicks:P,scale:G,stroke:Z.Z.content.muted,tickFormat:function(e){return S?S(e):(0,w.P5)(e)},tickLabelProps:function(){return{fill:Z.Z.content.muted,fontFamily:O.ry,fontSize:11,textAnchor:"end",transform:"translate(0,2.5)"}},top:j.top}),(0,k.jsx)(a.Z,{hideTicks:!0,left:j.left,scale:q,stroke:Z.Z.content.muted,tickFormat:L,tickLabelProps:function(){return{fill:Z.Z.content.muted,fontFamily:O.ry,fontSize:11,textAnchor:"middle"}},top:F+j.top})]}),C&&(0,k.jsx)("div",{style:{display:"flex",fontSize:"14px",justifyContent:"center",position:"absolute",top:j.top/2-10,width:"100%"},children:(0,k.jsx)(s.Z,{direction:"row",labelMargin:"0 15px 0 0",scale:z})}),H&&A&&(0,k.jsxs)(f.Z,{left:B,style:T(T({},f.j),{},{backgroundColor:Z.Z.background.page,borderRadius:"".concat(_.TR,"px"),padding:".3rem .4rem"}),top:U,children:[(0,k.jsx)(y.ZP,{bold:!0,color:z(A.key),children:A.key}),(0,k.jsx)(y.ZP,{children:A.bar.data[A.key]}),(0,k.jsx)(y.ZP,{children:i(A.bar.data)})]})]})}n.Z=function(e){var n=e.height,t=e.width,i=e.xAxisLabel,o=e.yAxisLabel,c=(0,r.Z)(e,C);return(0,k.jsx)(k.Fragment,{children:(0,k.jsxs)("div",{style:{height:n,marginBottom:P.iI,width:t},children:[o&&(0,k.jsx)(x.ZP,{alignItems:"center",fullHeight:!0,justifyContent:"center",width:28,children:(0,k.jsx)(j.Z,{children:(0,k.jsx)(y.ZP,{center:!0,muted:!0,small:!0,children:o})})}),(0,k.jsx)("div",{style:{height:n,width:o?0===t?t:t-28:t},children:(0,k.jsx)(v.Z,{children:function(e){var n=e.height,t=e.width;return(0,k.jsx)(E,T(T({},c),{},{height:n,width:t}))}})}),i&&(0,k.jsx)("div",{style:{paddingLeft:o?36:0,paddingTop:4},children:(0,k.jsx)(y.ZP,{center:!0,muted:!0,small:!0,children:i})})]})})}},29241:function(e,n,t){"use strict";var r=t(38626),i=t(44897),o=r.default.div.withConfig({displayName:"PageSectionHeader",componentId:"sc-1wznrcv-0"})(["left:0;position:sticky;top:0;width:100%;z-index:3;",""],(function(e){return"\n background-color: ".concat(e.backgroundColor||(e.theme.background||i.Z.background).page,";\n border-bottom: 1px solid ").concat((e.theme.borders||i.Z.borders).medium,";\n ")}));n.Z=o},61556:function(e,n,t){"use strict";t.d(n,{E:function(){return o},h:function(){return r}});t(57653);var r,i=t(41143);!function(e){e.BLOCK_RUN_COUNT="block_run_count",e.BLOCK_RUN_TIME="block_run_time",e.PIPELINE_RUN_COUNT="pipeline_run_count",e.PIPELINE_RUN_TIME="pipeline_run_time"}(r||(r={}));var o=[i.V.RUNNING,i.V.COMPLETED,i.V.FAILED]},96348:function(e,n,t){"use strict";t.d(n,{g:function(){return g},Z:function(){return x}});var r=t(82684),i=t(38626),o=t(44897),c=t(42631),a=t(47041),u=t(70515),l=1.5*u.iI,d=1.5*u.iI,s=i.default.div.withConfig({displayName:"indexstyle__TableStyle",componentId:"sc-13p7y8j-0"})(["border-radius:","px;overflow:hidden;width:100%;"," "," "," ",""],c.n_,(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")}),(function(e){return"\n background-color: ".concat((e.theme||o.Z).background.page,";\n border: ").concat(c.YF,"px ").concat(c.M8," ").concat((e.theme||o.Z).interactive.defaultBorder,";\n box-shadow: ").concat((e.theme||o.Z).shadow.frame,";\n ")}),(function(e){return e.noBackground&&"\n background-color: transparent;\n "}),(function(e){return e.noBoxShadow&&"\n box-shadow: none;\n "})),p=i.default.div.withConfig({displayName:"indexstyle__RowContainerStyle",componentId:"sc-13p7y8j-1"})(["overflow:auto;border-bottom-left-radius:","px;border-bottom-right-radius:","px;"," "," "," ",""],c.n_,c.n_,a.w5,(function(e){return e.maxHeight>0&&"\n max-height: ".concat(e.maxHeight,"px;\n ")}),(function(e){return e.minHeight>0&&"\n min-height: ".concat(e.minHeight,"px;\n ")}),(function(e){return e.scrollable&&"\n margin-bottom: ".concat(u.iI,"px;\n overflow-y: auto;\n padding-top: ").concat(3,"px;\n padding-left: ").concat(3,"px;\n padding-right: ").concat(3,"px;\n ")})),f=i.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-13p7y8j-2"})(["border-top-left-radius:","px;border-top-right-radius:","px;padding:","px ","px;",""],c.n_,c.n_,l,2*u.iI,(function(e){return"\n border-bottom: ".concat(c.YF,"px ").concat(c.M8," ").concat((e.theme.interactive||o.Z.interactive).defaultBorder,";\n ")})),h=i.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-13p7y8j-3"})(["padding:","px ","px;"," "," "," "," "," ",""],d,2*u.iI,(function(e){return"\n border-bottom: ".concat(c.YF,"px ").concat(c.M8," ").concat((e.theme||o.Z).borders.medium2,";\n ")}),(function(e){return e.sameColorBorders&&"\n border-bottom-color: ".concat((e.theme||o.Z).interactive.defaultBorder,";\n ")}),(function(e){return e.noHorizontalPadding&&"\n padding-left: 0;\n padding-right: 0;\n "}),(function(e){return e.condensed&&"\n padding-top: ".concat(9,"px;\n padding-bottom: ").concat(9,"px;\n ")}),(function(e){return e.secondary&&"\n background-color: ".concat((e.theme.background||o.Z.background).row2,";\n ")}),(function(e){return e.last&&e.noBorder&&"\n border-bottom-left-radius: ".concat(c.n_,"px;\n border-bottom-right-radius: ").concat(c.n_,"px;\n border-bottom: none;\n ")})),m=i.default.div.withConfig({displayName:"indexstyle__FooterStyle",componentId:"sc-13p7y8j-4"})(["border-bottom-left-radius:","px;border-bottom-right-radius:","px;padding:","px ","px;",""],c.n_,c.n_,l,2*u.iI,(function(e){return"\n border-top: ".concat(c.YF,"px ").concat(c.M8," ").concat((e.theme||o.Z).borders.medium2,";\n ")})),b=t(28598),g=h;var x=function(e){var n=e.alternating,t=e.children,i=e.footer,o=e.header,c=e.maxHeight,a=e.minHeight,u=e.noBackground,l=e.noBoxShadow,d=e.sameColorBorders,h=e.scrollable,g=e.width,x=[].concat(t).filter((function(e){return null!==e}));return(0,b.jsxs)(s,{noBackground:u,noBoxShadow:l,width:g,children:[o&&(0,b.jsx)(f,{children:o}),(0,b.jsx)(p,{maxHeight:c,minHeight:a,scrollable:h,children:r.Children.map(x,(function(e,t){return e&&r.cloneElement(e,{last:t===x.length-1,sameColorBorders:d,secondary:n&&t%2===1})}))}),i&&(0,b.jsx)(m,{children:i})]})}},17380:function(e,n,t){"use strict";t.d(n,{i:function(){return d}});t(82684);var r=t(38626),i=(t(97618),t(55485),t(48670),t(38276),t(47329)),o=t.n(i);o().node,o().node,o().node.isRequired,o().bool,o().string.isRequired;t(30160);var c=t(70987),a=t(95363),u=t(70515),l=t(42631),d=(t(28598),"tab");r.default.div.withConfig({displayName:"Tabs__TabHeaderContainerStyle",componentId:"sc-rojme5-0"})(["",""],(function(e){return e.containerWidthPercentage&&"\n width: ".concat(e.containerWidthPercentage,"%;\n ")})),r.default.div.withConfig({displayName:"Tabs__TabHeader",componentId:"sc-rojme5-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;margin-right:","px;position:relative;z-index:2;"," "," ",""],l.BG,l.BG,6*u.iI,(function(e){return e.noBottomBorder&&"\n border-bottom: none;\n "}),(function(e){return e.active&&"\n border-bottom: ".concat(u.cd,"px solid;\n border-color: ").concat((e.theme.interactive||c.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.fullWidth&&"\n width: 100%;\n "})),r.default.div.withConfig({displayName:"Tabs__LinkStyle",componentId:"sc-rojme5-2"})(["align-items:center;display:flex;"," "," ",""],(function(e){return e.bold&&"\n font-family: ".concat(a.nF,";\n ")}),(function(e){return e.fullWidth&&"\n justify-content: center;\n "}),(function(e){return!e.disabled&&"\n &:hover {\n path {\n fill: ".concat((e.theme.content||c.Z.interactive).linkPrimary," !important;\n }\n }\n ")}))},98941:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return He}});var r=t(77837),i=t(75582),o=t(82394),c=t(38860),a=t.n(c),u=t(69864),l=t(82684),d=t(34376),s=t(92083),p=t.n(s),f=t(52749),h=t(81066),m=t(29584),b=t(39440),g=t(60523),x=t(90299),v=t(94629),y=t(55485),j=t(85854),Z=t(48670),_=t(97618),O=t(38276),P=t(30160),w=t(38626),k=t(44897),C=t(42631),I=t(70515),T=12.5*I.iI,E=8*I.iI,N=5*I.iI,L=3*I.iI,S=w.default.div.withConfig({displayName:"indexstyle__TileContainerStyle",componentId:"sc-c3nc3q-0"})(["padding:","px;border-radius:","px;height:","px;width:","px;"," ",""],2.5*I.iI,C.TR,T,T,(function(e){return"\n background-color: ".concat((e.theme||k.Z).background.chartBlock,";\n ")}),(function(e){return e.compact&&"\n height: ".concat(E,"px;\n width: ").concat(E,"px;\n ")})),D=t(28598);var R=function(e){var n=e.Icon,t=e.compact,r=e.label;return(0,D.jsx)(S,{compact:t,children:(0,D.jsxs)(y.ZP,{alignItems:"center",flexDirection:"column",justifyContent:"center",children:[(0,D.jsx)(n,{size:t?L:N}),(0,D.jsx)(O.Z,{mb:"4px"}),(0,D.jsx)(P.ZP,{bold:!0,small:t,children:r})]})})},M=t(12468),A=w.default.div.withConfig({displayName:"indexstyle__MetricsSummaryContainerStyle",componentId:"sc-nu65g1-0"})(["width:100%;padding:","px;border-radius:","px;",""],2*I.iI,C.n_,(function(e){return"\n border: ".concat(C.YF,"px ").concat(C.M8," ").concat((e.theme||k.Z).interactive.defaultBorder,";\n box-shadow: ").concat((e.theme||k.Z).shadow.frame,";\n ")})),B=t(57653),H=t(41143),U={muted:!0,size:t(72191)._k,widthFitContent:!0},Y=t(81728),F=t(48277),V=t(70320),q=t(86735);function G(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?G(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):G(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var X=function(e){var n=e.pipelineRunCountByPipelineType,t=(0,V.q)(),r=(0,l.useMemo)((function(){if(!n)return[];var e=JSON.parse(JSON.stringify(n)),t=e[B.qL.PYTHON]||{};return Object.entries(e[B.qL.PYSPARK]||{}).forEach((function(e){var n=(0,i.Z)(e,2),r=n[0],o=n[1];t[r]?t[r]+=o:t[r]=o})),e[B.qL.PYTHON]=t,delete e[B.qL.PYSPARK],(0,q.mr)(Object.entries(e).filter((function(e){var n=(0,i.Z)(e,2),t=(n[0],n[1]);return 0!==Object.keys(t).length})))}),[n]),o=(0,l.useMemo)((function(){return t?(0,D.jsx)(O.Z,{ml:"4px",children:(0,D.jsx)(M.Z,z(z({},U),{},{label:"Please note that these metrics are based on UTC time."}))}):null}),[t]);return(0,D.jsxs)(A,{children:[(0,D.jsxs)(y.ZP,{alignItems:"center",children:[(0,D.jsx)(P.ZP,{bold:!0,large:!0,children:"Pipeline run metrics"}),o]}),(0,D.jsx)(O.Z,{mb:2}),(0,D.jsx)(y.ZP,{alignItems:"center",justifyContent:"space-between",children:r.map((function(e,n){var t=(0,i.Z)(e,2),o=t[0],c=t[1];return(0,D.jsxs)(_.Z,{alignItems:"center",flex:"1",justifyContent:"space-between",style:0!==n?{borderLeft:"1px solid ".concat(k.Z.interactive.defaultBorder)}:null,children:[(0,D.jsx)(O.Z,{pl:0!==n?3:0,children:(0,D.jsx)(R,{Icon:B.Mj[o],label:B.G7[o]})}),(0,q.mr)(Object.entries(c)).map((function(e,n){var t=(0,i.Z)(e,2),r=t[0],o=t[1];return(0,D.jsxs)(_.Z,{flexDirection:"column",children:[(0,D.jsx)(P.ZP,{children:(0,Y.kC)(r)}),(0,D.jsx)(P.ZP,{bold:!0,danger:r===H.V.FAILED&&o>0,xlarge:!0,children:(0,F.uf)(o)})]},"".concat(r,"_").concat(n))})),(0,D.jsx)(O.Z,{pr:n!==r.length-1?2:0})]},"".concat(o,"_metric"))}))})]})},K=t(29241),W=t(65956),J=t(55729),$=t(93808),Q=t(82359),ee=t(4190),ne=t(12691),te=t.n(ne),re=t(71180),ie=t(96348),oe=t(68899),ce=t(17380),ae=t(3917),ue=t(69419);function le(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function de(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?le(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):le(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var se=40*I.iI,pe=40*I.iI;var fe=function(e){var n=e.pipelineType,t=e.pipelineRuns,r=void 0===t?[]:t,i=(0,d.useRouter)(),o=(0,ue.iV)(),c=(null===o||void 0===o?void 0:o[ce.i])||ae.vk.TODAY,a=(0,V.q)(),u=n===B.LM,s=u?B.LM:B.G7[n],p=B.Mj[n],f=r.length,h=0===f?"":"(".concat(f,")"),m=(0,l.useMemo)((function(){return a?(0,D.jsx)(O.Z,{ml:"4px",children:(0,D.jsx)(M.Z,de(de({},U),{},{label:"The pipeline run failures are displayed in local time.",maxWidth:24*I.iI,widthFitContent:!1}))}):null}),[a]);return(0,D.jsx)(ie.Z,{footer:(0,D.jsx)(y.ZP,{alignItems:"center",justifyContent:"center",children:(0,D.jsx)(te(),{as:"/pipeline-runs?status=failed",href:"/pipeline-runs",passHref:!0,children:(0,D.jsx)(Z.Z,{sameColorAsText:!0,children:"View more"})})}),header:(0,D.jsxs)(y.ZP,{alignItems:"center",children:[(0,D.jsx)(re.Z,{beforeIcon:(0,D.jsx)(p,{size:2.5*I.iI}),compact:!0,notClickable:!0,children:(0,Y.kC)(s)}),(0,D.jsx)(O.Z,{ml:2}),(0,D.jsxs)(P.ZP,{bold:!0,children:["Latest ",u?"":"".concat((0,Y.wX)(s)," "),"pipeline run failures ",h]}),m]}),maxHeight:se,minHeight:pe,children:0===f?(0,D.jsx)(y.ZP,{alignItems:"center",fullWidth:!0,justifyContent:"center",children:(0,D.jsx)(O.Z,{px:5,py:10,children:(0,D.jsxs)(y.ZP,{alignItems:"center",flexDirection:"column",children:[(0,D.jsx)(oe.Hn,{imageUrl:"".concat(i.basePath,"/images/blocks/grey_block.webp")}),(0,D.jsx)(O.Z,{mb:3}),(0,D.jsxs)(P.ZP,{large:!0,children:["No ",u?"":"".concat((0,Y.wX)(s)," "),"pipeline run failures for ",ae.s8[c]]})]})})}):r.map((function(e){var n=e.created_at,t=e.id,r=e.pipeline_uuid;return(0,D.jsx)(ie.g,{children:(0,D.jsxs)(y.ZP,{alignItems:"center",children:[(0,D.jsx)(te(),{as:"/pipelines/".concat(r),href:"/pipelines/[pipeline]",passHref:!0,children:(0,D.jsx)(Z.Z,{monospace:!0,sameColorAsText:!0,small:!0,children:r})}),(0,D.jsx)(P.ZP,{monospace:!0,small:!0,children:"\xa0>\xa0"}),(0,D.jsx)(te(),{as:"/pipelines/".concat(r,"/runs/").concat(t),href:"/pipelines/[pipeline]/runs/[run]",passHref:!0,children:(0,D.jsxs)(Z.Z,{danger:!0,monospace:!0,sameColorAsText:!0,small:!0,children:["Run created on\xa0",a?(0,ae.XG)(n,a):n]})})]})},"pipeline_run_".concat(t))}))})},he=t(35686),me=t(98464),be=t(35058),ge=t(64657),xe=t(44425),ve=t(75399),ye=t(23780),je=t(46684),Ze=t(61556),_e=t(32929),Oe=t(72473),Pe={Icon:Oe.LE,label:function(){return(0,Y.kC)(ae.s8[ae.vk.TODAY])},uuid:ae.vk.TODAY},we={Icon:Oe.ks,label:function(){return(0,Y.kC)(ae.s8[ae.vk.WEEK])},uuid:ae.vk.WEEK},ke={Icon:Oe.zE,label:function(){return(0,Y.kC)(ae.s8[ae.vk.MONTH])},uuid:ae.vk.MONTH},Ce={Icon:Oe.G6,label:function(){return"Dashboard"},uuid:"Dashboard"},Ie=[Pe,we,ke],Te=t(24491),Ee=t(65458),Ne=t(15610),Le=t(72619),Se=t(89538);function De(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Re(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?De(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):De(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Me={mt:2,mx:3},Ae={refreshInterval:6e4,revalidateOnFocus:!1};function Be(){var e,n,t,r=(0,l.useRef)(null),c=(0,ue.iV)(),a=(0,d.useRouter)(),s=(0,l.useRef)(null),_=(0,l.useState)(Pe),w=_[0],C=_[1],T=(0,l.useState)(!1),E=T[0],N=T[1],L=(0,l.useState)(null),S=L[0],R=L[1],A=null===w||void 0===w?void 0:w.uuid,F=(0,l.useMemo)((function(){return Ie.concat(Ce)}),[]),G=(0,me.Z)(w);(0,l.useEffect)((function(){var e=c[ce.i];e&&C(F.find((function(n){return n.uuid===e})))}),[F,c,w,G]);var z=(0,l.useMemo)((function(){return(0,ae.jV)(A,{isoString:!0})}),[A]),$=(0,l.useMemo)((function(){return{group_by_pipeline_type:1,start_time:z}}),[z]),ne=he.ZP.monitor_stats.detail(Ze.h.PIPELINE_RUN_COUNT,$,Re({},Ae)),te=ne.data,re=ne.isValidating,ie=ne.mutate,oe=he.ZP.pipeline_runs.list({_limit:50,include_pipeline_type:1,"order_by[]":"created_at desc",start_timestamp:(0,ae.A5)(z),status:H.V.FAILED},Re({},Ae)).data,le=(0,l.useMemo)((function(){return((null===oe||void 0===oe?void 0:oe.pipeline_runs)||[]).filter((function(e){return null!==e.pipeline_type}))}),[null===oe||void 0===oe?void 0:oe.pipeline_runs]),de=(0,l.useMemo)((function(){return(0,q.vM)(le,(function(e){return e.pipeline_type}))}),[le]),se=de.integration,pe=void 0===se?[]:se,Oe=de.python,we=void 0===Oe?[]:Oe,ke=de.streaming,De=void 0===ke?[]:ke;(0,l.useEffect)((function(){G&&(null===w||void 0===w?void 0:w.uuid)!==(null===G||void 0===G?void 0:G.uuid)&&ie()}),[ie,w,G]);var Be,He=(0,l.useMemo)((function(){return(0,ae.Y_)(ae.yD[A]+1)}),[A]),Ue=(0,l.useMemo)((function(){var e,n=(null===te||void 0===te||null===(e=te.monitor_stat)||void 0===e?void 0:e.stats)||{};return(0,Te.i)(n,He)}),[null===te||void 0===te||null===(e=te.monitor_stat)||void 0===e?void 0:e.stats,He]),Ye=Ue.pipelineRunCountByPipelineType,Fe=Ue.totalPipelineRunCount,Ve=Ue.ungroupedPipelineRunData,qe=(0,l.useMemo)((function(){return(0,ae.Ro)(ae.yD[A],{endDateOnly:A===ae.vk.TODAY})}),[A]),Ge=(Be=function(e){return a.push("/pipelines/[pipeline]/edit","/pipelines/".concat(e,"/edit"))},(0,u.Db)(he.ZP.pipelines.useCreate(),{onSuccess:function(e){return(0,Le.wD)(e,{callback:function(e){var n=e.pipeline.uuid;null===Be||void 0===Be||Be(n)},onErrorCallback:function(e,n){return R({errors:n,response:e})}})}})),ze=(0,i.Z)(Ge,2),Xe=ze[0],Ke=ze[1].isLoading,We=he.ZP.projects.list(),Je=We.data,$e=We.mutate,Qe=(0,l.useMemo)((function(){var e;return null===Je||void 0===Je||null===(e=Je.projects)||void 0===e?void 0:e[0]}),[Je]),en=(0,l.useMemo)((function(){var e;return(0,V.h)(null===Qe||void 0===Qe||null===(e=Qe.features)||void 0===e?void 0:e[Q.d.LOCAL_TIMEZONE])}),[null===Qe||void 0===Qe?void 0:Qe.features]),nn=(0,Se.dd)((function(){return(0,D.jsx)(ye.BC,{children:(0,D.jsx)(g.Z,{contained:!0,onClickCustomTemplate:function(e){Xe({pipeline:{custom_template_uuid:null===e||void 0===e?void 0:e.template_uuid,name:(0,Y.Y6)()}}).then((function(){on()}))},showBreadcrumbs:!0,tabs:[_e.A2]})})}),{},[],{background:!0,uuid:"browse_templates"}),tn=(0,i.Z)(nn,2),rn=tn[0],on=tn[1],cn=(0,Se.dd)((function(e){var n=e.cancelButtonText,t=(e.header,e.onCancel),r=e.onSaveSuccess;return(0,D.jsx)(ye.BC,{children:(0,D.jsx)(J.Z,{cancelButtonText:n,contained:!0,header:(0,D.jsx)(O.Z,{mb:I.HN,children:(0,D.jsxs)(W.Z,{children:[(0,D.jsx)(P.ZP,{warning:!0,children:"You need to add an OpenAI API key to your project before you can generate pipelines using AI."}),(0,D.jsx)(O.Z,{mt:1,children:(0,D.jsxs)(P.ZP,{warning:!0,children:["Read ",(0,D.jsx)(Z.Z,{href:"https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key",openNewWindow:!0,children:"OpenAI\u2019s documentation"})," to get your API key."]})})]})}),onCancel:function(){null===t||void 0===t||t(),ln()},onSaveSuccess:function(e){$e(),ln(),null===r||void 0===r||r(e)}})})}),{},[$e],{background:!0,uuid:"configure_project"}),an=(0,i.Z)(cn,2),un=an[0],ln=an[1],dn=(0,Se.dd)((function(){return(0,D.jsx)(ye.BC,{children:(0,D.jsx)(f.Z,{createPipeline:Xe,isLoading:Ke,onClose:fn})})}),{},[Xe,Ke],{background:!0,disableClickOutside:!0,disableCloseButton:!0,uuid:"AI_modal"}),sn=(0,i.Z)(dn,2),pn=sn[0],fn=sn[1],hn=(0,l.useMemo)((function(){return(0,Ee.d)(Xe,{showAIModal:function(){null!==Qe&&void 0!==Qe&&Qe.openai_api_key?pn():un({onSaveSuccess:function(){pn()}})},showBrowseTemplates:rn})}),[Xe,Qe,pn,rn,un]),mn=(0,l.useMemo)((function(){return(0,D.jsx)(h.Z,{addButtonMenuOpen:E,addButtonMenuRef:s,isLoading:Ke,label:"New pipeline",menuItems:hn,onClick:function(){return N((function(e){return!e}))},onClickCallback:function(){return N(!1)}})}),[E,Ke,hn]),bn=(0,l.useMemo)((function(){return en?(0,D.jsx)(O.Z,{ml:"4px",children:(0,D.jsx)(M.Z,Re(Re({},U),{},{label:"Please note that these counts are based on UTC time."}))}):null}),[en]),gn=(0,l.useMemo)((function(){var e,n,t,r,i,c,a="Pipelines",u=(0,Y.kE)("".concat(a,"_overview_dashboard_").concat((0,Y.Lo)())),l="Trigger active status",d=(0,Y.kE)("".concat(l,"_overview_dashboard_").concat((0,Y.Lo)())),s="Pipeline run status",p=(0,Y.kE)("".concat(s,"_overview_dashboard_").concat((0,Y.Lo)())),f="Pipeline runs daily",h=(0,Y.kE)("".concat(f,"_overview_dashboard_").concat((0,Y.Lo)())),m="Completed pipeline runs daily",b=(0,Y.kE)("".concat(m,"_overview_dashboard_").concat((0,Y.Lo)())),g="Failed pipeline runs daily",x=(0,Y.kE)("".concat(g,"_overview_dashboard_").concat((0,Y.Lo)())),v="Running pipelines",y=(0,Y.kE)("".concat(v,"_overview_dashboard_").concat((0,Y.Lo)())),j={type:ve.XO.PIPELINE_SCHEDULES},Z={type:ve.XO.PIPELINE_RUNS},_={configuration:(e={},(0,o.Z)(e,be.eN,["execution_date"]),(0,o.Z)(e,be.bE,[{aggregation:be.os.COUNT_DISTINCT,column:"id"}]),(0,o.Z)(e,be.Yg,be.aE.DAY),(0,o.Z)(e,"chart_type",be.oV.TIME_SERIES_LINE_CHART),e),data_source:Z,type:xe.tf.CHART};return{blocks:(c={},(0,o.Z)(c,u,{configuration:(n={},(0,o.Z)(n,be.eN,["type"]),(0,o.Z)(n,be.bE,[{aggregation:be.os.COUNT_DISTINCT,column:"uuid"}]),(0,o.Z)(n,be.$1,be.MP.DESCENDING),(0,o.Z)(n,"chart_style",be.JT.HORIZONTAL),(0,o.Z)(n,"chart_type",be.oV.BAR_CHART),n),data_source:{type:ve.XO.PIPELINES},name:a,type:xe.tf.CHART,uuid:u}),(0,o.Z)(c,d,{configuration:(t={},(0,o.Z)(t,be.eN,["status"]),(0,o.Z)(t,be.bE,[{aggregation:be.os.COUNT_DISTINCT,column:"id"}]),(0,o.Z)(t,be.$1,be.MP.DESCENDING),(0,o.Z)(t,"chart_type",be.oV.BAR_CHART),t),data_source:j,name:l,type:xe.tf.CHART,uuid:d}),(0,o.Z)(c,p,{configuration:(r={},(0,o.Z)(r,be.eN,["status"]),(0,o.Z)(r,be.bE,[{aggregation:be.os.COUNT_DISTINCT,column:"id"}]),(0,o.Z)(r,be.$1,be.MP.DESCENDING),(0,o.Z)(r,"chart_style",be.JT.HORIZONTAL),(0,o.Z)(r,"chart_type",be.oV.BAR_CHART),r),data_source:Z,name:s,type:xe.tf.CHART,uuid:p}),(0,o.Z)(c,h,Re(Re({},_),{},{name:f,uuid:h})),(0,o.Z)(c,b,Re(Re({},_),{},{content:"\n@data_source\ndef d(df):\n return df[df['status'] == '".concat(H.V.COMPLETED,"']\n"),name:m,uuid:b})),(0,o.Z)(c,x,Re(Re({},_),{},{content:"\n@data_source\ndef d(df):\n return df[df['status'] == '".concat(H.V.FAILED,"']\n"),name:g,uuid:x})),(0,o.Z)(c,y,{configuration:(i={},(0,o.Z)(i,be.eN,["backfill_id","completed_at","created_at","execution_date","executor_type","id","pipeline_schedule_id","pipeline_uuid","started_at","status"]),(0,o.Z)(i,"chart_type",be.oV.TABLE),i),content:"\n@data_source\ndef d(df):\n return df[df['status'] == '".concat(H.V.RUNNING,"']\n"),data_source:Z,name:v,type:xe.tf.CHART,uuid:y}),c),layout:[[{block_uuid:u,width:1},{block_uuid:d,width:1}],[{block_uuid:p,width:1},{block_uuid:h,width:2}],[{block_uuid:b,width:1},{block_uuid:x,width:1}],[{block_uuid:y,width:1}]]}}),[]);return(0,D.jsxs)(v.Z,{errors:S,setErrors:R,title:"Overview",uuid:"overview/index",children:[(0,D.jsx)(K.Z,{backgroundColor:k.Z.background.panel,ref:r,children:(0,D.jsx)(O.Z,{py:2,children:(0,D.jsxs)(y.ZP,{alignItems:"center",children:[(0,D.jsx)(O.Z,{ml:3,children:mn}),(0,D.jsx)(x.Z,{onClickTab:function(e){var n=e.uuid;(0,Ne.u7)((0,o.Z)({},ce.i,n),{replaceParams:!0})},regularSizeText:!0,selectedTabUUID:A,tabs:F})]})})}),Ce.uuid===(null===w||void 0===w?void 0:w.uuid)&&(0,D.jsx)(b.Z,{leftOffset:9*I.iI,pageBlockLayoutTemplate:gn,topOffset:je.Mz+(null===r||void 0===r||null===(n=r.current)||void 0===n||null===(t=n.getBoundingClientRect())||void 0===t?void 0:t.height),uuid:"overview/dashboard"}),Ce.uuid!==(null===w||void 0===w?void 0:w.uuid)&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(O.Z,{mx:3,my:2,children:[(0,D.jsxs)(j.Z,{level:4,children:[A===ae.vk.TODAY&&"".concat((0,Y.kC)(ae.vk.TODAY)," (UTC): ").concat(qe),A!==ae.vk.TODAY&&"".concat((0,Y.kC)(ae.s8[A])," (UTC): ").concat(qe)]}),(0,D.jsx)(O.Z,{mt:2,children:re?(0,D.jsx)(O.Z,{mx:2,my:11,children:(0,D.jsx)(ee.Z,{inverted:!0})}):(0,D.jsx)(X,{pipelineRunCountByPipelineType:Ye})}),(0,D.jsxs)(O.Z,{mt:2,children:[(0,D.jsx)(O.Z,{ml:2,children:(0,D.jsxs)(y.ZP,{alignItems:"center",children:[(0,D.jsxs)(P.ZP,{bold:!0,large:!0,children:[re?"--":Fe," total pipeline runs"]}),bn]})}),(0,D.jsx)(O.Z,{mt:1,children:(0,D.jsx)(m.Z,{backgroundColor:k.Z.background.panel,colors:ge.NU,data:Ve,getXValue:function(e){return e.date},height:200,keys:ge.hu,margin:{bottom:30,left:35,right:0,top:10},tooltipLeftOffset:ge.CD,xLabelFormat:function(e){return p()(e).format("MMM DD")}})})]})]}),(0,D.jsx)(O.Z,Re(Re({},Me),{},{children:(0,D.jsxs)(y.ZP,{alignItems:"center",justifyContent:"center",children:[(0,D.jsx)(fe,{pipelineRuns:le,pipelineType:B.LM}),(0,D.jsx)(O.Z,{ml:2}),(0,D.jsx)(fe,{pipelineRuns:we,pipelineType:B.qL.PYTHON})]})})),(0,D.jsx)(O.Z,Re(Re({},Me),{},{children:(0,D.jsxs)(y.ZP,{alignItems:"center",justifyContent:"center",children:[(0,D.jsx)(fe,{pipelineRuns:pe,pipelineType:B.qL.INTEGRATION}),(0,D.jsx)(O.Z,{ml:2}),(0,D.jsx)(fe,{pipelineRuns:De,pipelineType:B.qL.STREAMING})]})})),(0,D.jsx)(O.Z,{mb:2})]})]})}Be.getInitialProps=(0,r.Z)(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var He=(0,$.Z)(Be)},48277:function(e,n,t){"use strict";t.d(n,{JI:function(){return o},uf:function(){return i}});var r=t(75582),i=function(e){var n=String(e).split("."),t=(0,r.Z)(n,2),i=t[0],o=t[1];return"".concat(i.replace(/\B(?=(\d{3})+(?!\d))/g,",")).concat(o?".".concat(o):"")};function o(e){var n=Math.floor(Date.now()/1e3);return e>0?n-e:n}},56655:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overview",function(){return t(98941)}])}},function(e){e.O(0,[3662,844,2083,2851,2369,341,8789,4913,5896,2714,2631,6648,4783,8013,600,9696,8264,4666,5499,4839,7055,5810,1769,3859,9264,976,9440,2677,9774,2888,179],(function(){return n=56655,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1709],{81354:function(e,n,t){"use strict";t.d(n,{Z:function(){return b}});var r=t(82684),i=t(63588),o=t.n(i),c=t(75823),u=t(29989),a=t(62072),l=t(53989),d=t(49894),s=t(18246),p=t(59309),f=t(65743),h=["data","className","top","left","x","y0","y1","xScale","yScale","color","keys","value","order","offset","children"];function m(){return m=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},m.apply(this,arguments)}function b(e){var n=e.data,t=e.className,i=e.top,b=e.left,g=e.x,x=e.y0,v=void 0===x?a.l8:x,y=e.y1,j=void 0===y?a.xf:y,Z=e.xScale,_=e.yScale,O=e.color,P=e.keys,w=e.value,k=e.order,I=e.offset,C=e.children,T=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,h),E=(0,c.Z)();P&&E.keys(P),w&&(0,d.Z)(E.value,w),k&&E.order((0,s.ZP)(k)),I&&E.offset((0,p.ZP)(I));var N=E(n),S=(0,l.Z)(Z),D=N.map((function(e,n){var t=e.key;return{index:n,key:t,bars:e.map((function(n,r){var i=(_(v(n))||0)-(_(j(n))||0),o=_(j(n)),c="bandwidth"in Z?Z(g(n.data)):Math.max((Z(g(n.data))||0)-S/2);return{bar:n,key:t,index:r,height:i,width:S,x:c||0,y:o||0,color:O(e.key,r)}}))}}));return C?r.createElement(r.Fragment,null,C(D)):r.createElement(u.Z,{className:o()("visx-bar-stack",t),top:i,left:b},D.map((function(e){return e.bars.map((function(n){return r.createElement(f.Z,m({key:"bar-stack-"+e.index+"-"+n.index,x:n.x,y:n.y,height:n.height,width:n.width,fill:n.color},T))}))})))}},62072:function(e,n,t){"use strict";function r(e){return null==e?void 0:e[0]}function i(e){return null==e?void 0:e[1]}t.d(n,{l8:function(){return r},xf:function(){return i}})},59309:function(e,n,t){"use strict";t.d(n,{ZP:function(){return l}});var r=t(12759),i=t(27500),o=t(82610),c=t(34812),u=t(77944),a={expand:r.Z,diverging:i.Z,none:o.Z,silhouette:c.Z,wiggle:u.Z};Object.keys(a);function l(e){return e&&a[e]||a.none}},18246:function(e,n,t){"use strict";t.d(n,{ZP:function(){return l}});var r=t(39586),i=t(25516),o=t(54164),c=t(8512),u=t(2010),a={ascending:r.Z,descending:i.Z,insideout:o.Z,none:c.Z,reverse:u.Z};Object.keys(a);function l(e){return e&&a[e]||a.none}},64657:function(e,n,t){"use strict";t.d(n,{CD:function(){return u},NU:function(){return o},a_:function(){return r},hu:function(){return c}});var r,i=t(44897);!function(e){e.BLOCK_RUNS="block_runs",e.BLOCK_RUNTIME="block_runtime",e.PIPELINE_RUNS="pipeline_runs"}(r||(r={}));var o=[i.Z.accent.warning,i.Z.background.success,i.Z.accent.negative,i.Z.content.active,i.Z.interactive.linkPrimary],c=["cancelled","completed","failed","initial","running"],u=-50},24491:function(e,n,t){"use strict";t.d(n,{i:function(){return p},p:function(){return l}});var r=t(82394),i=t(75582),o=t(61556),c=t(57653);function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var l=function(e,n){if(!e)return[];var t=Object.entries(e).reduce((function(e,n){var t=(0,i.Z)(n,2),r=(t[0],t[1].data),o={};return Object.entries(r).forEach((function(n){var t=(0,i.Z)(n,2),r=t[0],c=t[1],u={};r in e&&(u=e[r]);var l={};Object.entries(c).forEach((function(e){var n,t=(0,i.Z)(e,2),r=t[0],o=t[1],c=null!==(n=u)&&void 0!==n&&n[r]?u[r]:0;l[r]=c+o})),o[r]=a(a({},u),l)})),a(a({},e),o)}),{});return n.map((function(e){return a({date:e},t[e]||{})}))},d=o.E.reduce((function(e,n){return a(a({},e),{},(0,r.Z)({},n,0))}),{}),s=new Set(o.E),p=function(e,n){var t;if(!e)return{groupedPipelineRunData:[],pipelineRunCountByPipelineType:{},totalPipelineRunCount:0,ungroupedPipelineRunData:[]};var o=(t={},(0,r.Z)(t,c.qL.INTEGRATION,a({},d)),(0,r.Z)(t,c.qL.PYSPARK,{}),(0,r.Z)(t,c.qL.PYTHON,a({},d)),(0,r.Z)(t,c.qL.STREAMING,a({},d)),t),u=0,l=Object.entries(e).reduce((function(e,n){var t=(0,i.Z)(n,2),r=(t[0],t[1].data),c={},l={};return Object.entries(r).forEach((function(n){var t=(0,i.Z)(n,2),r=t[0],d=t[1],p={},f={};r in e.grouped?(p=a({},e.grouped[r]),c[r]=a({},p)):c[r]={},r in e.ungrouped&&(f=a({},e.ungrouped[r]));var h={},m={};Object.entries(d).forEach((function(n){var t=(0,i.Z)(n,2),d=t[0],b=t[1];"null"===d||null===d||(r in e.grouped&&d in e.grouped[r]&&(p[d]=a({},e.grouped[r][d])),h[d]={},Object.entries(b).forEach((function(e){var n,t,r,c=(0,i.Z)(e,2),a=c[0],l=c[1],b=null!==(n=p)&&void 0!==n&&null!==(t=n[d])&&void 0!==t&&t[a]?p[d][a]:0;h[d][a]=b+l;var g=null!==(r=f)&&void 0!==r&&r[a]?f[a]:0;m[a]=null!==m&&void 0!==m&&m[a]?m[a]+l:g+l,s.has(a)&&(o[d][a]=(o[d][a]||0)+l),u+=l})),c[r][d]=a(a({},p[d]),h[d]),l[r]=a(a({},f),m))}))})),{grouped:a(a({},e.grouped),c),ungrouped:a(a({},e.ungrouped),l)}}),{grouped:{},ungrouped:{}}),p=[],f=[];return n.forEach((function(e){p.push(a({date:e},l.grouped[e]||{})),f.push(a({date:e},l.ungrouped[e]||{}))})),{groupedPipelineRunData:p,pipelineRunCountByPipelineType:o,totalPipelineRunCount:u,ungroupedPipelineRunData:f}}},29584:function(e,n,t){"use strict";var r=t(26304),i=t(82394),o=t(21831),c=(t(82684),t(84969)),u=t(90948),a=t(81354),l=t(67778),d=t(29989),s=t(17066),p=t(29179),f=t(65376),h=t(48072),m=t(98677),b=t(84181),g=t(24903),x=t(55485),v=t(26226),y=t(30160),j=t(94035),Z=t(44897),_=t(42631),O=t(95363),P=t(70515),w=t(79221),k=t(28598),I=["height","width","xAxisLabel","yAxisLabel"];function C(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function T(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?C(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):C(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function E(e){var n=e.backgroundColor,t=e.colors,r=e.data,i=e.getXValue,x=(e.getYValue,e.height),v=e.keys,j=e.margin,P=e.numYTicks,I=e.showLegend,C=e.tooltipLeftOffset,E=void 0===C?0:C,N=e.width,S=e.xLabelFormat,D=e.yLabelFormat,L=(0,p.Z)(),R=L.hideTooltip,M=L.showTooltip,A=L.tooltipData,B=L.tooltipLeft,H=L.tooltipOpen,U=L.tooltipTop,Y=N-(j.left+j.right),F=x-(j.bottom+j.top),V=r.reduce((function(e,n){var t=n,r=v.reduce((function(e,n){return Number(t[n])&&(e+=Number(t[n])),e}),0);return e.push(r),e}),[]),q=(0,m.Z)({domain:r.map(i),padding:.4,range:[0,Y],round:!1}),G=(0,b.Z)({domain:[0,Math.max.apply(Math,(0,o.Z)(V))],range:[F,0],round:!0}),z=(0,g.Z)({domain:v,range:t});return(0,k.jsxs)("div",{style:{position:"relative",zIndex:2},children:[(0,k.jsxs)("svg",{height:x,width:N,children:[(0,k.jsx)("rect",{fill:n||Z.Z.background.chartBlock,height:x,rx:14,width:N,x:0,y:0}),(0,k.jsx)(l.Z,{height:F,left:j.left,scale:G,stroke:"black",strokeOpacity:.2,top:j.top,width:Y}),(0,k.jsx)(d.Z,{left:j.left,top:j.top,children:(0,k.jsx)(a.Z,{color:z,data:r,keys:v,value:function(e,n){return e[n]||0},x:i,xScale:q,yScale:G,children:function(e){return e.map((function(e){return e.bars.map((function(n){return(0,k.jsx)("rect",{fill:n.color,height:n.height,onMouseLeave:R,onMouseMove:function(e){var t=(0,h.Z)(e),r=n.x+n.width/2+E;M({tooltipData:n,tooltipLeft:r,tooltipTop:(null===t||void 0===t?void 0:t.y)+10})},width:n.width,x:n.x,y:n.y},"bar-stack-".concat(e.index,"-").concat(n.index))}))}))}})}),(0,k.jsx)(c.Z,{hideTicks:!0,left:j.left,numTicks:P,scale:G,stroke:Z.Z.content.muted,tickFormat:function(e){return D?D(e):(0,w.P5)(e)},tickLabelProps:function(){return{fill:Z.Z.content.muted,fontFamily:O.ry,fontSize:11,textAnchor:"end",transform:"translate(0,2.5)"}},top:j.top}),(0,k.jsx)(u.Z,{hideTicks:!0,left:j.left,scale:q,stroke:Z.Z.content.muted,tickFormat:S,tickLabelProps:function(){return{fill:Z.Z.content.muted,fontFamily:O.ry,fontSize:11,textAnchor:"middle"}},top:F+j.top})]}),I&&(0,k.jsx)("div",{style:{display:"flex",fontSize:"14px",justifyContent:"center",position:"absolute",top:j.top/2-10,width:"100%"},children:(0,k.jsx)(s.Z,{direction:"row",labelMargin:"0 15px 0 0",scale:z})}),H&&A&&(0,k.jsxs)(f.Z,{left:B,style:T(T({},f.j),{},{backgroundColor:Z.Z.background.page,borderRadius:"".concat(_.TR,"px"),padding:".3rem .4rem"}),top:U,children:[(0,k.jsx)(y.ZP,{bold:!0,color:z(A.key),children:A.key}),(0,k.jsx)(y.ZP,{children:A.bar.data[A.key]}),(0,k.jsx)(y.ZP,{children:i(A.bar.data)})]})]})}n.Z=function(e){var n=e.height,t=e.width,i=e.xAxisLabel,o=e.yAxisLabel,c=(0,r.Z)(e,I);return(0,k.jsx)(k.Fragment,{children:(0,k.jsxs)("div",{style:{height:n,marginBottom:P.iI,width:t},children:[o&&(0,k.jsx)(x.ZP,{alignItems:"center",fullHeight:!0,justifyContent:"center",width:28,children:(0,k.jsx)(j.Z,{children:(0,k.jsx)(y.ZP,{center:!0,muted:!0,small:!0,children:o})})}),(0,k.jsx)("div",{style:{height:n,width:o?0===t?t:t-28:t},children:(0,k.jsx)(v.Z,{children:function(e){var n=e.height,t=e.width;return(0,k.jsx)(E,T(T({},c),{},{height:n,width:t}))}})}),i&&(0,k.jsx)("div",{style:{paddingLeft:o?36:0,paddingTop:4},children:(0,k.jsx)(y.ZP,{center:!0,muted:!0,small:!0,children:i})})]})})}},29241:function(e,n,t){"use strict";var r=t(38626),i=t(44897),o=r.default.div.withConfig({displayName:"PageSectionHeader",componentId:"sc-1wznrcv-0"})(["left:0;position:sticky;top:0;width:100%;z-index:3;",""],(function(e){return"\n background-color: ".concat(e.backgroundColor||(e.theme.background||i.Z.background).page,";\n border-bottom: 1px solid ").concat((e.theme.borders||i.Z.borders).medium,";\n ")}));n.Z=o},61556:function(e,n,t){"use strict";t.d(n,{E:function(){return o},h:function(){return r}});t(57653);var r,i=t(41143);!function(e){e.BLOCK_RUN_COUNT="block_run_count",e.BLOCK_RUN_TIME="block_run_time",e.PIPELINE_RUN_COUNT="pipeline_run_count",e.PIPELINE_RUN_TIME="pipeline_run_time"}(r||(r={}));var o=[i.V.RUNNING,i.V.COMPLETED,i.V.FAILED]},96348:function(e,n,t){"use strict";t.d(n,{g:function(){return g},Z:function(){return x}});var r=t(82684),i=t(38626),o=t(44897),c=t(42631),u=t(47041),a=t(70515),l=1.5*a.iI,d=1.5*a.iI,s=i.default.div.withConfig({displayName:"indexstyle__TableStyle",componentId:"sc-13p7y8j-0"})(["border-radius:","px;overflow:hidden;width:100%;"," "," "," ",""],c.n_,(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")}),(function(e){return"\n background-color: ".concat((e.theme||o.Z).background.page,";\n border: ").concat(c.YF,"px ").concat(c.M8," ").concat((e.theme||o.Z).interactive.defaultBorder,";\n box-shadow: ").concat((e.theme||o.Z).shadow.frame,";\n ")}),(function(e){return e.noBackground&&"\n background-color: transparent;\n "}),(function(e){return e.noBoxShadow&&"\n box-shadow: none;\n "})),p=i.default.div.withConfig({displayName:"indexstyle__RowContainerStyle",componentId:"sc-13p7y8j-1"})(["overflow:auto;border-bottom-left-radius:","px;border-bottom-right-radius:","px;"," "," "," ",""],c.n_,c.n_,u.w5,(function(e){return e.maxHeight>0&&"\n max-height: ".concat(e.maxHeight,"px;\n ")}),(function(e){return e.minHeight>0&&"\n min-height: ".concat(e.minHeight,"px;\n ")}),(function(e){return e.scrollable&&"\n margin-bottom: ".concat(a.iI,"px;\n overflow-y: auto;\n padding-top: ").concat(3,"px;\n padding-left: ").concat(3,"px;\n padding-right: ").concat(3,"px;\n ")})),f=i.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-13p7y8j-2"})(["border-top-left-radius:","px;border-top-right-radius:","px;padding:","px ","px;",""],c.n_,c.n_,l,2*a.iI,(function(e){return"\n border-bottom: ".concat(c.YF,"px ").concat(c.M8," ").concat((e.theme.interactive||o.Z.interactive).defaultBorder,";\n ")})),h=i.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-13p7y8j-3"})(["padding:","px ","px;"," "," "," "," "," ",""],d,2*a.iI,(function(e){return"\n border-bottom: ".concat(c.YF,"px ").concat(c.M8," ").concat((e.theme||o.Z).borders.medium2,";\n ")}),(function(e){return e.sameColorBorders&&"\n border-bottom-color: ".concat((e.theme||o.Z).interactive.defaultBorder,";\n ")}),(function(e){return e.noHorizontalPadding&&"\n padding-left: 0;\n padding-right: 0;\n "}),(function(e){return e.condensed&&"\n padding-top: ".concat(9,"px;\n padding-bottom: ").concat(9,"px;\n ")}),(function(e){return e.secondary&&"\n background-color: ".concat((e.theme.background||o.Z.background).row2,";\n ")}),(function(e){return e.last&&e.noBorder&&"\n border-bottom-left-radius: ".concat(c.n_,"px;\n border-bottom-right-radius: ").concat(c.n_,"px;\n border-bottom: none;\n ")})),m=i.default.div.withConfig({displayName:"indexstyle__FooterStyle",componentId:"sc-13p7y8j-4"})(["border-bottom-left-radius:","px;border-bottom-right-radius:","px;padding:","px ","px;",""],c.n_,c.n_,l,2*a.iI,(function(e){return"\n border-top: ".concat(c.YF,"px ").concat(c.M8," ").concat((e.theme||o.Z).borders.medium2,";\n ")})),b=t(28598),g=h;var x=function(e){var n=e.alternating,t=e.children,i=e.footer,o=e.header,c=e.maxHeight,u=e.minHeight,a=e.noBackground,l=e.noBoxShadow,d=e.sameColorBorders,h=e.scrollable,g=e.width,x=[].concat(t).filter((function(e){return null!==e}));return(0,b.jsxs)(s,{noBackground:a,noBoxShadow:l,width:g,children:[o&&(0,b.jsx)(f,{children:o}),(0,b.jsx)(p,{maxHeight:c,minHeight:u,scrollable:h,children:r.Children.map(x,(function(e,t){return e&&r.cloneElement(e,{last:t===x.length-1,sameColorBorders:d,secondary:n&&t%2===1})}))}),i&&(0,b.jsx)(m,{children:i})]})}},17380:function(e,n,t){"use strict";t.d(n,{i:function(){return d}});t(82684);var r=t(38626),i=(t(97618),t(55485),t(48670),t(38276),t(47329)),o=t.n(i);o().node,o().node,o().node.isRequired,o().bool,o().string.isRequired;t(30160);var c=t(70987),u=t(95363),a=t(70515),l=t(42631),d=(t(28598),"tab");r.default.div.withConfig({displayName:"Tabs__TabHeaderContainerStyle",componentId:"sc-rojme5-0"})(["",""],(function(e){return e.containerWidthPercentage&&"\n width: ".concat(e.containerWidthPercentage,"%;\n ")})),r.default.div.withConfig({displayName:"Tabs__TabHeader",componentId:"sc-rojme5-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;margin-right:","px;position:relative;z-index:2;"," "," ",""],l.BG,l.BG,6*a.iI,(function(e){return e.noBottomBorder&&"\n border-bottom: none;\n "}),(function(e){return e.active&&"\n border-bottom: ".concat(a.cd,"px solid;\n border-color: ").concat((e.theme.interactive||c.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.fullWidth&&"\n width: 100%;\n "})),r.default.div.withConfig({displayName:"Tabs__LinkStyle",componentId:"sc-rojme5-2"})(["align-items:center;display:flex;"," "," ",""],(function(e){return e.bold&&"\n font-family: ".concat(u.nF,";\n ")}),(function(e){return e.fullWidth&&"\n justify-content: center;\n "}),(function(e){return!e.disabled&&"\n &:hover {\n path {\n fill: ".concat((e.theme.content||c.Z.interactive).linkPrimary," !important;\n }\n }\n ")}))},98941:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return He}});var r=t(77837),i=t(75582),o=t(82394),c=t(38860),u=t.n(c),a=t(69864),l=t(82684),d=t(34376),s=t(92083),p=t.n(s),f=t(52749),h=t(81066),m=t(29584),b=t(39440),g=t(60523),x=t(90299),v=t(94629),y=t(55485),j=t(85854),Z=t(48670),_=t(97618),O=t(38276),P=t(30160),w=t(38626),k=t(44897),I=t(42631),C=t(70515),T=12.5*C.iI,E=8*C.iI,N=5*C.iI,S=3*C.iI,D=w.default.div.withConfig({displayName:"indexstyle__TileContainerStyle",componentId:"sc-c3nc3q-0"})(["padding:","px;border-radius:","px;height:","px;width:","px;"," ",""],2.5*C.iI,I.TR,T,T,(function(e){return"\n background-color: ".concat((e.theme||k.Z).background.chartBlock,";\n ")}),(function(e){return e.compact&&"\n height: ".concat(E,"px;\n width: ").concat(E,"px;\n ")})),L=t(28598);var R=function(e){var n=e.Icon,t=e.compact,r=e.label;return(0,L.jsx)(D,{compact:t,children:(0,L.jsxs)(y.ZP,{alignItems:"center",flexDirection:"column",justifyContent:"center",children:[(0,L.jsx)(n,{size:t?S:N}),(0,L.jsx)(O.Z,{mb:"4px"}),(0,L.jsx)(P.ZP,{bold:!0,small:t,children:r})]})})},M=t(12468),A=w.default.div.withConfig({displayName:"indexstyle__MetricsSummaryContainerStyle",componentId:"sc-nu65g1-0"})(["width:100%;padding:","px;border-radius:","px;",""],2*C.iI,I.n_,(function(e){return"\n border: ".concat(I.YF,"px ").concat(I.M8," ").concat((e.theme||k.Z).interactive.defaultBorder,";\n box-shadow: ").concat((e.theme||k.Z).shadow.frame,";\n ")})),B=t(57653),H=t(41143),U={muted:!0,size:t(72191)._k,widthFitContent:!0},Y=t(81728),F=t(48277),V=t(70320),q=t(86735);function G(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?G(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):G(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var X=function(e){var n=e.pipelineRunCountByPipelineType,t=(0,V.q)(),r=(0,l.useMemo)((function(){if(!n)return[];var e=JSON.parse(JSON.stringify(n)),t=e[B.qL.PYTHON]||{};return Object.entries(e[B.qL.PYSPARK]||{}).forEach((function(e){var n=(0,i.Z)(e,2),r=n[0],o=n[1];t[r]?t[r]+=o:t[r]=o})),e[B.qL.PYTHON]=t,delete e[B.qL.PYSPARK],(0,q.mr)(Object.entries(e).filter((function(e){var n=(0,i.Z)(e,2),t=(n[0],n[1]);return 0!==Object.keys(t).length})))}),[n]),o=(0,l.useMemo)((function(){return t?(0,L.jsx)(O.Z,{ml:"4px",children:(0,L.jsx)(M.Z,z(z({},U),{},{label:"Please note that these metrics are based on UTC time."}))}):null}),[t]);return(0,L.jsxs)(A,{children:[(0,L.jsxs)(y.ZP,{alignItems:"center",children:[(0,L.jsx)(P.ZP,{bold:!0,large:!0,children:"Pipeline run metrics"}),o]}),(0,L.jsx)(O.Z,{mb:2}),(0,L.jsx)(y.ZP,{alignItems:"center",justifyContent:"space-between",children:r.map((function(e,n){var t=(0,i.Z)(e,2),o=t[0],c=t[1];return(0,L.jsxs)(_.Z,{alignItems:"center",flex:"1",justifyContent:"space-between",style:0!==n?{borderLeft:"1px solid ".concat(k.Z.interactive.defaultBorder)}:null,children:[(0,L.jsx)(O.Z,{pl:0!==n?3:0,children:(0,L.jsx)(R,{Icon:B.Mj[o],label:B.G7[o]})}),(0,q.mr)(Object.entries(c)).map((function(e,n){var t=(0,i.Z)(e,2),r=t[0],o=t[1];return(0,L.jsxs)(_.Z,{flexDirection:"column",children:[(0,L.jsx)(P.ZP,{children:(0,Y.kC)(r)}),(0,L.jsx)(P.ZP,{bold:!0,danger:r===H.V.FAILED&&o>0,xlarge:!0,children:(0,F.uf)(o)})]},"".concat(r,"_").concat(n))})),(0,L.jsx)(O.Z,{pr:n!==r.length-1?2:0})]},"".concat(o,"_metric"))}))})]})},K=t(29241),W=t(65956),J=t(55729),$=t(93808),Q=t(82359),ee=t(4190),ne=t(12691),te=t.n(ne),re=t(71180),ie=t(96348),oe=t(68899),ce=t(17380),ue=t(3917),ae=t(69419);function le(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function de(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?le(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):le(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var se=40*C.iI,pe=40*C.iI;var fe=function(e){var n=e.pipelineType,t=e.pipelineRuns,r=void 0===t?[]:t,i=(0,d.useRouter)(),o=(0,ae.iV)(),c=(null===o||void 0===o?void 0:o[ce.i])||ue.vk.TODAY,u=(0,V.q)(),a=n===B.LM,s=a?B.LM:B.G7[n],p=B.Mj[n],f=r.length,h=0===f?"":"(".concat(f,")"),m=(0,l.useMemo)((function(){return u?(0,L.jsx)(O.Z,{ml:"4px",children:(0,L.jsx)(M.Z,de(de({},U),{},{label:"The pipeline run failures are displayed in local time.",maxWidth:24*C.iI,widthFitContent:!1}))}):null}),[u]);return(0,L.jsx)(ie.Z,{footer:(0,L.jsx)(y.ZP,{alignItems:"center",justifyContent:"center",children:(0,L.jsx)(te(),{as:"/pipeline-runs?status=failed",href:"/pipeline-runs",passHref:!0,children:(0,L.jsx)(Z.Z,{sameColorAsText:!0,children:"View more"})})}),header:(0,L.jsxs)(y.ZP,{alignItems:"center",children:[(0,L.jsx)(re.Z,{beforeIcon:(0,L.jsx)(p,{size:2.5*C.iI}),compact:!0,notClickable:!0,children:(0,Y.kC)(s)}),(0,L.jsx)(O.Z,{ml:2}),(0,L.jsxs)(P.ZP,{bold:!0,children:["Latest ",a?"":"".concat((0,Y.wX)(s)," "),"pipeline run failures ",h]}),m]}),maxHeight:se,minHeight:pe,children:0===f?(0,L.jsx)(y.ZP,{alignItems:"center",fullWidth:!0,justifyContent:"center",children:(0,L.jsx)(O.Z,{px:5,py:10,children:(0,L.jsxs)(y.ZP,{alignItems:"center",flexDirection:"column",children:[(0,L.jsx)(oe.Hn,{imageUrl:"".concat(i.basePath,"/images/blocks/grey_block.webp")}),(0,L.jsx)(O.Z,{mb:3}),(0,L.jsxs)(P.ZP,{large:!0,children:["No ",a?"":"".concat((0,Y.wX)(s)," "),"pipeline run failures for ",ue.s8[c]]})]})})}):r.map((function(e){var n=e.created_at,t=e.id,r=e.pipeline_uuid;return(0,L.jsx)(ie.g,{children:(0,L.jsxs)(y.ZP,{alignItems:"center",children:[(0,L.jsx)(te(),{as:"/pipelines/".concat(r),href:"/pipelines/[pipeline]",passHref:!0,children:(0,L.jsx)(Z.Z,{monospace:!0,sameColorAsText:!0,small:!0,children:r})}),(0,L.jsx)(P.ZP,{monospace:!0,small:!0,children:"\xa0>\xa0"}),(0,L.jsx)(te(),{as:"/pipelines/".concat(r,"/runs/").concat(t),href:"/pipelines/[pipeline]/runs/[run]",passHref:!0,children:(0,L.jsxs)(Z.Z,{danger:!0,monospace:!0,sameColorAsText:!0,small:!0,children:["Run created on\xa0",u?(0,ue.XG)(n,u):n]})})]})},"pipeline_run_".concat(t))}))})},he=t(35686),me=t(98464),be=t(35058),ge=t(64657),xe=t(44425),ve=t(75399),ye=t(23780),je=t(46684),Ze=t(61556),_e=t(32929),Oe=t(72473),Pe={Icon:Oe.LE,label:function(){return(0,Y.kC)(ue.s8[ue.vk.TODAY])},uuid:ue.vk.TODAY},we={Icon:Oe.ks,label:function(){return(0,Y.kC)(ue.s8[ue.vk.WEEK])},uuid:ue.vk.WEEK},ke={Icon:Oe.zE,label:function(){return(0,Y.kC)(ue.s8[ue.vk.MONTH])},uuid:ue.vk.MONTH},Ie={Icon:Oe.G6,label:function(){return"Dashboard"},uuid:"Dashboard"},Ce=[Pe,we,ke],Te=t(24491),Ee=t(65458),Ne=t(15610),Se=t(72619),De=t(89538);function Le(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Re(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Le(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Le(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Me={mt:2,mx:3},Ae={refreshInterval:6e4,revalidateOnFocus:!1};function Be(){var e,n,t,r=(0,l.useRef)(null),c=(0,ae.iV)(),u=(0,d.useRouter)(),s=(0,l.useRef)(null),_=(0,l.useState)(Pe),w=_[0],I=_[1],T=(0,l.useState)(!1),E=T[0],N=T[1],S=(0,l.useState)(null),D=S[0],R=S[1],A=null===w||void 0===w?void 0:w.uuid,F=(0,l.useMemo)((function(){return Ce.concat(Ie)}),[]),G=(0,me.Z)(w);(0,l.useEffect)((function(){var e=c[ce.i];e&&I(F.find((function(n){return n.uuid===e})))}),[F,c,w,G]);var z=(0,l.useMemo)((function(){return(0,ue.jV)(A,{isoString:!0})}),[A]),$=(0,l.useMemo)((function(){return{group_by_pipeline_type:1,start_time:z}}),[z]),ne=he.ZP.monitor_stats.detail(Ze.h.PIPELINE_RUN_COUNT,$,Re({},Ae)),te=ne.data,re=ne.isValidating,ie=ne.mutate,oe=he.ZP.pipeline_runs.list({_limit:50,include_pipeline_type:1,"order_by[]":"created_at desc",start_timestamp:(0,ue.A5)(z),status:H.V.FAILED},Re({},Ae)).data,le=(0,l.useMemo)((function(){return((null===oe||void 0===oe?void 0:oe.pipeline_runs)||[]).filter((function(e){return null!==e.pipeline_type}))}),[null===oe||void 0===oe?void 0:oe.pipeline_runs]),de=(0,l.useMemo)((function(){return(0,q.vM)(le,(function(e){return e.pipeline_type}))}),[le]),se=de.integration,pe=void 0===se?[]:se,Oe=de.python,we=void 0===Oe?[]:Oe,ke=de.streaming,Le=void 0===ke?[]:ke;(0,l.useEffect)((function(){G&&(null===w||void 0===w?void 0:w.uuid)!==(null===G||void 0===G?void 0:G.uuid)&&ie()}),[ie,w,G]);var Be,He=(0,l.useMemo)((function(){return(0,ue.Y_)(ue.yD[A]+1)}),[A]),Ue=(0,l.useMemo)((function(){var e,n=(null===te||void 0===te||null===(e=te.monitor_stat)||void 0===e?void 0:e.stats)||{};return(0,Te.i)(n,He)}),[null===te||void 0===te||null===(e=te.monitor_stat)||void 0===e?void 0:e.stats,He]),Ye=Ue.pipelineRunCountByPipelineType,Fe=Ue.totalPipelineRunCount,Ve=Ue.ungroupedPipelineRunData,qe=(0,l.useMemo)((function(){return(0,ue.Ro)(ue.yD[A],{endDateOnly:A===ue.vk.TODAY})}),[A]),Ge=(Be=function(e){return u.push("/pipelines/[pipeline]/edit","/pipelines/".concat(e,"/edit"))},(0,a.Db)(he.ZP.pipelines.useCreate(),{onSuccess:function(e){return(0,Se.wD)(e,{callback:function(e){var n=e.pipeline.uuid;null===Be||void 0===Be||Be(n)},onErrorCallback:function(e,n){return R({errors:n,response:e})}})}})),ze=(0,i.Z)(Ge,2),Xe=ze[0],Ke=ze[1].isLoading,We=he.ZP.projects.list(),Je=We.data,$e=We.mutate,Qe=(0,l.useMemo)((function(){var e;return null===Je||void 0===Je||null===(e=Je.projects)||void 0===e?void 0:e[0]}),[Je]),en=(0,l.useMemo)((function(){var e;return(0,V.h)(null===Qe||void 0===Qe||null===(e=Qe.features)||void 0===e?void 0:e[Q.d.LOCAL_TIMEZONE])}),[null===Qe||void 0===Qe?void 0:Qe.features]),nn=(0,De.dd)((function(){return(0,L.jsx)(ye.BC,{children:(0,L.jsx)(g.Z,{contained:!0,onClickCustomTemplate:function(e){Xe({pipeline:{custom_template_uuid:null===e||void 0===e?void 0:e.template_uuid,name:(0,Y.Y6)()}}).then((function(){on()}))},showBreadcrumbs:!0,tabs:[_e.A2]})})}),{},[],{background:!0,uuid:"browse_templates"}),tn=(0,i.Z)(nn,2),rn=tn[0],on=tn[1],cn=(0,De.dd)((function(e){var n=e.cancelButtonText,t=(e.header,e.onCancel),r=e.onSaveSuccess;return(0,L.jsx)(ye.BC,{children:(0,L.jsx)(J.Z,{cancelButtonText:n,contained:!0,header:(0,L.jsx)(O.Z,{mb:C.HN,children:(0,L.jsxs)(W.Z,{children:[(0,L.jsx)(P.ZP,{warning:!0,children:"You need to add an OpenAI API key to your project before you can generate pipelines using AI."}),(0,L.jsx)(O.Z,{mt:1,children:(0,L.jsxs)(P.ZP,{warning:!0,children:["Read ",(0,L.jsx)(Z.Z,{href:"https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key",openNewWindow:!0,children:"OpenAI\u2019s documentation"})," to get your API key."]})})]})}),onCancel:function(){null===t||void 0===t||t(),ln()},onSaveSuccess:function(e){$e(),ln(),null===r||void 0===r||r(e)}})})}),{},[$e],{background:!0,uuid:"configure_project"}),un=(0,i.Z)(cn,2),an=un[0],ln=un[1],dn=(0,De.dd)((function(){return(0,L.jsx)(ye.BC,{children:(0,L.jsx)(f.Z,{createPipeline:Xe,isLoading:Ke,onClose:fn})})}),{},[Xe,Ke],{background:!0,disableClickOutside:!0,disableCloseButton:!0,uuid:"AI_modal"}),sn=(0,i.Z)(dn,2),pn=sn[0],fn=sn[1],hn=(0,l.useMemo)((function(){return(0,Ee.d)(Xe,{showAIModal:function(){null!==Qe&&void 0!==Qe&&Qe.openai_api_key?pn():an({onSaveSuccess:function(){pn()}})},showBrowseTemplates:rn})}),[Xe,Qe,pn,rn,an]),mn=(0,l.useMemo)((function(){return(0,L.jsx)(h.Z,{addButtonMenuOpen:E,addButtonMenuRef:s,isLoading:Ke,label:"New pipeline",menuItems:hn,onClick:function(){return N((function(e){return!e}))},onClickCallback:function(){return N(!1)}})}),[E,Ke,hn]),bn=(0,l.useMemo)((function(){return en?(0,L.jsx)(O.Z,{ml:"4px",children:(0,L.jsx)(M.Z,Re(Re({},U),{},{label:"Please note that these counts are based on UTC time."}))}):null}),[en]),gn=(0,l.useMemo)((function(){var e,n,t,r,i,c,u="Pipelines",a=(0,Y.kE)("".concat(u,"_overview_dashboard_").concat((0,Y.Lo)())),l="Trigger active status",d=(0,Y.kE)("".concat(l,"_overview_dashboard_").concat((0,Y.Lo)())),s="Pipeline run status",p=(0,Y.kE)("".concat(s,"_overview_dashboard_").concat((0,Y.Lo)())),f="Pipeline runs daily",h=(0,Y.kE)("".concat(f,"_overview_dashboard_").concat((0,Y.Lo)())),m="Completed pipeline runs daily",b=(0,Y.kE)("".concat(m,"_overview_dashboard_").concat((0,Y.Lo)())),g="Failed pipeline runs daily",x=(0,Y.kE)("".concat(g,"_overview_dashboard_").concat((0,Y.Lo)())),v="Running pipelines",y=(0,Y.kE)("".concat(v,"_overview_dashboard_").concat((0,Y.Lo)())),j={type:ve.XO.PIPELINE_SCHEDULES},Z={type:ve.XO.PIPELINE_RUNS},_={configuration:(e={},(0,o.Z)(e,be.eN,["execution_date"]),(0,o.Z)(e,be.bE,[{aggregation:be.os.COUNT_DISTINCT,column:"id"}]),(0,o.Z)(e,be.Yg,be.aE.DAY),(0,o.Z)(e,"chart_type",be.oV.TIME_SERIES_LINE_CHART),e),data_source:Z,type:xe.tf.CHART};return{blocks:(c={},(0,o.Z)(c,a,{configuration:(n={},(0,o.Z)(n,be.eN,["type"]),(0,o.Z)(n,be.bE,[{aggregation:be.os.COUNT_DISTINCT,column:"uuid"}]),(0,o.Z)(n,be.$1,be.MP.DESCENDING),(0,o.Z)(n,"chart_style",be.JT.HORIZONTAL),(0,o.Z)(n,"chart_type",be.oV.BAR_CHART),n),data_source:{type:ve.XO.PIPELINES},name:u,type:xe.tf.CHART,uuid:a}),(0,o.Z)(c,d,{configuration:(t={},(0,o.Z)(t,be.eN,["status"]),(0,o.Z)(t,be.bE,[{aggregation:be.os.COUNT_DISTINCT,column:"id"}]),(0,o.Z)(t,be.$1,be.MP.DESCENDING),(0,o.Z)(t,"chart_type",be.oV.BAR_CHART),t),data_source:j,name:l,type:xe.tf.CHART,uuid:d}),(0,o.Z)(c,p,{configuration:(r={},(0,o.Z)(r,be.eN,["status"]),(0,o.Z)(r,be.bE,[{aggregation:be.os.COUNT_DISTINCT,column:"id"}]),(0,o.Z)(r,be.$1,be.MP.DESCENDING),(0,o.Z)(r,"chart_style",be.JT.HORIZONTAL),(0,o.Z)(r,"chart_type",be.oV.BAR_CHART),r),data_source:Z,name:s,type:xe.tf.CHART,uuid:p}),(0,o.Z)(c,h,Re(Re({},_),{},{name:f,uuid:h})),(0,o.Z)(c,b,Re(Re({},_),{},{content:"\n@data_source\ndef d(df):\n return df[df['status'] == '".concat(H.V.COMPLETED,"']\n"),name:m,uuid:b})),(0,o.Z)(c,x,Re(Re({},_),{},{content:"\n@data_source\ndef d(df):\n return df[df['status'] == '".concat(H.V.FAILED,"']\n"),name:g,uuid:x})),(0,o.Z)(c,y,{configuration:(i={},(0,o.Z)(i,be.eN,["backfill_id","completed_at","created_at","execution_date","executor_type","id","pipeline_schedule_id","pipeline_uuid","started_at","status"]),(0,o.Z)(i,"chart_type",be.oV.TABLE),i),content:"\n@data_source\ndef d(df):\n return df[df['status'] == '".concat(H.V.RUNNING,"']\n"),data_source:Z,name:v,type:xe.tf.CHART,uuid:y}),c),layout:[[{block_uuid:a,width:1},{block_uuid:d,width:1}],[{block_uuid:p,width:1},{block_uuid:h,width:2}],[{block_uuid:b,width:1},{block_uuid:x,width:1}],[{block_uuid:y,width:1}]]}}),[]);return(0,L.jsxs)(v.Z,{errors:D,setErrors:R,title:"Overview",uuid:"overview/index",children:[(0,L.jsx)(K.Z,{backgroundColor:k.Z.background.panel,ref:r,children:(0,L.jsx)(O.Z,{py:2,children:(0,L.jsxs)(y.ZP,{alignItems:"center",children:[(0,L.jsx)(O.Z,{ml:3,children:mn}),(0,L.jsx)(x.Z,{onClickTab:function(e){var n=e.uuid;(0,Ne.u7)((0,o.Z)({},ce.i,n),{replaceParams:!0})},regularSizeText:!0,selectedTabUUID:A,tabs:F})]})})}),Ie.uuid===(null===w||void 0===w?void 0:w.uuid)&&(0,L.jsx)(b.Z,{leftOffset:9*C.iI,pageBlockLayoutTemplate:gn,topOffset:je.Mz+(null===r||void 0===r||null===(n=r.current)||void 0===n||null===(t=n.getBoundingClientRect())||void 0===t?void 0:t.height),uuid:"overview/dashboard"}),Ie.uuid!==(null===w||void 0===w?void 0:w.uuid)&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(O.Z,{mx:3,my:2,children:[(0,L.jsxs)(j.Z,{level:4,children:[A===ue.vk.TODAY&&"".concat((0,Y.kC)(ue.vk.TODAY)," (UTC): ").concat(qe),A!==ue.vk.TODAY&&"".concat((0,Y.kC)(ue.s8[A])," (UTC): ").concat(qe)]}),(0,L.jsx)(O.Z,{mt:2,children:re?(0,L.jsx)(O.Z,{mx:2,my:11,children:(0,L.jsx)(ee.Z,{inverted:!0})}):(0,L.jsx)(X,{pipelineRunCountByPipelineType:Ye})}),(0,L.jsxs)(O.Z,{mt:2,children:[(0,L.jsx)(O.Z,{ml:2,children:(0,L.jsxs)(y.ZP,{alignItems:"center",children:[(0,L.jsxs)(P.ZP,{bold:!0,large:!0,children:[re?"--":Fe," total pipeline runs"]}),bn]})}),(0,L.jsx)(O.Z,{mt:1,children:(0,L.jsx)(m.Z,{backgroundColor:k.Z.background.panel,colors:ge.NU,data:Ve,getXValue:function(e){return e.date},height:200,keys:ge.hu,margin:{bottom:30,left:35,right:0,top:10},tooltipLeftOffset:ge.CD,xLabelFormat:function(e){return p()(e).format("MMM DD")}})})]})]}),(0,L.jsx)(O.Z,Re(Re({},Me),{},{children:(0,L.jsxs)(y.ZP,{alignItems:"center",justifyContent:"center",children:[(0,L.jsx)(fe,{pipelineRuns:le,pipelineType:B.LM}),(0,L.jsx)(O.Z,{ml:2}),(0,L.jsx)(fe,{pipelineRuns:we,pipelineType:B.qL.PYTHON})]})})),(0,L.jsx)(O.Z,Re(Re({},Me),{},{children:(0,L.jsxs)(y.ZP,{alignItems:"center",justifyContent:"center",children:[(0,L.jsx)(fe,{pipelineRuns:pe,pipelineType:B.qL.INTEGRATION}),(0,L.jsx)(O.Z,{ml:2}),(0,L.jsx)(fe,{pipelineRuns:Le,pipelineType:B.qL.STREAMING})]})})),(0,L.jsx)(O.Z,{mb:2})]})]})}Be.getInitialProps=(0,r.Z)(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var He=(0,$.Z)(Be)},48277:function(e,n,t){"use strict";t.d(n,{$P:function(){return l},JI:function(){return o},VJ:function(){return a},fD:function(){return c},uf:function(){return i},vN:function(){return u}});var r=t(75582),i=function(e){var n=String(e).split("."),t=(0,r.Z)(n,2),i=t[0],o=t[1];return"".concat(i.replace(/\B(?=(\d{3})+(?!\d))/g,",")).concat(o?".".concat(o):"")};function o(e){var n=Math.floor(Date.now()/1e3);return e>0?n-e:n}function c(e){return(e>>>0).toString(2)}function u(e,n){return String(BigInt(e)+BigInt(n))}function a(e,n){return String(BigInt(e)-BigInt(n))}function l(e){return parseInt(e,2)}},56655:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/overview",function(){return t(98941)}])}},function(e){e.O(0,[3662,844,2083,2851,1124,341,8789,4913,5896,2714,1821,2631,4783,8013,600,4636,8264,4666,5499,4839,7055,5810,1769,3859,9264,976,9440,2677,9774,2888,179],(function(){return n=56655,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1009],{94629:function(e,n,t){"use strict";t.d(n,{Z:function(){return w}});var r=t(82394),i=t(21831),o=t(82684),u=t(50724),s=t(82555),c=t(97618),l=t(70613),a=t(94636),d=t(68899),f=t(28598);function p(e,n){var t=e.children,r=e.noPadding;return(0,f.jsx)(d.HS,{noPadding:r,ref:n,children:t})}var h=o.forwardRef(p),v=t(62547),b=t(82571),j=t(35686),O=t(98464),g=t(46684),m=t(70515),_=t(53808),x=t(19183);function P(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Z(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}function y(e,n){var t,r=e.addProjectBreadcrumbToCustomBreadcrumbs,p=e.after,P=e.afterHeader,y=e.afterHidden,w=e.afterWidth,E=e.afterWidthOverride,I=e.appendBreadcrumbs,C=e.before,A=e.beforeWidth,k=e.breadcrumbs,N=e.children,M=e.errors,D=e.headerMenuItems,T=e.headerOffset,S=e.mainContainerHeader,L=e.navigationItems,R=e.setAfterHidden,B=e.setErrors,H=e.subheaderChildren,F=e.subheaderNoPadding,U=e.title,W=e.uuid,z=(0,x.i)().width,Q="dashboard_after_width_".concat(W),K="dashboard_before_width_".concat(W),V=(0,o.useRef)(null),G=(0,o.useState)(E?w:(0,_.U2)(Q,w)),X=G[0],q=G[1],Y=(0,o.useState)(!1),$=Y[0],J=Y[1],ee=(0,o.useState)(C?Math.max((0,_.U2)(K,A),13*m.iI):null),ne=ee[0],te=ee[1],re=(0,o.useState)(!1),ie=re[0],oe=re[1],ue=(0,o.useState)(null)[1],se=j.ZP.projects.list({},{revalidateOnFocus:!1}).data,ce=null===se||void 0===se?void 0:se.projects,le={label:function(){var e;return null===ce||void 0===ce||null===(e=ce[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},ae=[];k&&(r&&ae.push(le),ae.push.apply(ae,(0,i.Z)(k))),(null===k||void 0===k||!k.length||I)&&(null===ce||void 0===ce?void 0:ce.length)>=1&&(null!==k&&void 0!==k&&k.length||ae.unshift({bold:!I,label:function(){return U}}),ae.unshift(le)),(0,o.useEffect)((function(){null===V||void 0===V||!V.current||$||ie||null===ue||void 0===ue||ue(V.current.getBoundingClientRect().width)}),[$,X,ie,ne,V,ue,z]),(0,o.useEffect)((function(){$||(0,_.t8)(Q,X)}),[y,$,X,Q]),(0,o.useEffect)((function(){ie||(0,_.t8)(K,ne)}),[ie,ne,K]);var de=(0,O.Z)(w);return(0,o.useEffect)((function(){E&&de!==w&&q(w)}),[E,w,de]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(l.Z,{title:U}),(0,f.jsx)(a.Z,{breadcrumbs:ae,menuItems:D,project:null===ce||void 0===ce?void 0:ce[0],version:null===ce||void 0===ce||null===(t=ce[0])||void 0===t?void 0:t.version}),(0,f.jsxs)(d.Nk,{ref:n,children:[0!==(null===L||void 0===L?void 0:L.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(b.Z,{navigationItems:L,showMore:!0})}),(0,f.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(v.Z,{after:p,afterHeader:P,afterHeightOffset:g.Mz,afterHidden:y,afterMousedownActive:$,afterWidth:X,before:C,beforeHeightOffset:g.Mz,beforeMousedownActive:ie,beforeWidth:d.k1+(C?ne:0),headerOffset:T,hideAfterCompletely:!R,leftOffset:C?d.k1:null,mainContainerHeader:S,mainContainerRef:V,setAfterHidden:R,setAfterMousedownActive:J,setAfterWidth:q,setBeforeMousedownActive:oe,setBeforeWidth:te,children:[H&&(0,f.jsx)(h,{noPadding:F,children:H}),N]})})]}),M&&(0,f.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===B||void 0===B?void 0:B(null)},children:(0,f.jsx)(s.Z,Z(Z({},M),{},{onClose:function(){return null===B||void 0===B?void 0:B(null)}}))})]})}var w=o.forwardRef(y)},70320:function(e,n,t){"use strict";t.d(n,{h:function(){return u},q:function(){return o}});var r=t(78419),i=t(53808);function o(){return(0,i.U2)(r.am,null)||!1}function u(e){return"undefined"!==typeof e&&(0,i.t8)(r.am,e),e}},55072:function(e,n,t){"use strict";t.d(n,{Et:function(){return f},Q:function(){return d}});t(82684);var r=t(71180),i=t(55485),o=t(38276),u=t(31748),s=t(72473),c=t(79633),l=t(70515),a=t(28598),d=30,f=9;n.ZP=function(e){var n=e.page,t=e.maxPages,d=e.onUpdate,f=e.totalPages,p=[],h=t;if(h>f)p=Array.from({length:f},(function(e,n){return n}));else{var v=Math.floor(h/2),b=n-v;n+v>=f?(b=f-h+2,h-=2):n-v<=0?(b=0,h-=2):(h-=4,b=n-Math.floor(h/2)),p=Array.from({length:h},(function(e,n){return n+b}))}return(0,a.jsx)(a.Fragment,{children:f>0&&(0,a.jsxs)(i.ZP,{alignItems:"center",children:[(0,a.jsx)(r.Z,{disabled:0===n,onClick:function(){return d(n-1)},children:(0,a.jsx)(s.Hd,{size:1.5*l.iI,stroke:u.Av})}),!p.includes(0)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.Z,{ml:1,children:(0,a.jsx)(r.Z,{borderLess:!0,noBackground:!0,onClick:function(){return d(0)},children:1})},0),!p.includes(1)&&(0,a.jsx)(o.Z,{ml:1,children:(0,a.jsx)(r.Z,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0)]}),p.map((function(e){return(0,a.jsx)(o.Z,{ml:1,children:(0,a.jsx)(r.Z,{backgroundColor:e===n&&c.a$,borderLess:!0,noBackground:!0,notClickable:e===n,onClick:function(){e!==n&&d(e)},children:e+1})},e)})),!p.includes(f-1)&&(0,a.jsxs)(a.Fragment,{children:[!p.includes(f-2)&&(0,a.jsx)(o.Z,{ml:1,children:(0,a.jsx)(r.Z,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0),(0,a.jsx)(o.Z,{ml:1,children:(0,a.jsx)(r.Z,{borderLess:!0,noBackground:!0,onClick:function(){return d(f-1)},children:f})},f-1)]}),(0,a.jsx)(o.Z,{ml:1}),(0,a.jsx)(r.Z,{disabled:n===f-1,onClick:function(){return d(n+1)},children:(0,a.jsx)(s.Kw,{size:1.5*l.iI,stroke:u.Av})})]})})}},41143:function(e,n,t){"use strict";var r;t.d(n,{V:function(){return r}}),function(e){e.CANCELLED="cancelled",e.COMPLETED="completed",e.FAILED="failed",e.INITIAL="initial",e.RUNNING="running",e.UPSTREAM_FAILED="upstream_failed",e.CONDITION_FAILED="condition_failed"}(r||(r={}))},82359:function(e,n,t){"use strict";var r,i;t.d(n,{d:function(){return r},k:function(){return i}}),function(e){e.ADD_NEW_BLOCK_V2="add_new_block_v2",e.DATA_INTEGRATION_IN_BATCH_PIPELINE="data_integration_in_batch_pipeline",e.INTERACTIONS="interactions",e.LOCAL_TIMEZONE="display_local_timezone",e.OPERATION_HISTORY="operation_history"}(r||(r={})),function(e){e.MAIN="main",e.STANDALONE="standalone",e.SUB="sub"}(i||(i={}))},78234:function(e,n,t){"use strict";t.r(n);var r=t(77837),i=t(82394),o=t(38860),u=t.n(o),s=t(82684),c=t(34376),l=t(94629),a=t(55485),d=t(55072),f=t(53943),p=t(93808),h=t(82359),v=t(44085),b=t(38276),j=t(30160),O=t(35686),g=t(44265),m=t(70515),_=t(15610),x=t(69419),P=t(70320),Z=t(28598);function y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function w(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?y(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):y(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function E(){var e=(0,c.useRouter)(),n=(0,s.useState)(null),t=n[0],r=n[1],i=(0,x.iV)(),o=null!==i&&void 0!==i&&i.page?i.page:0,u=O.ZP.projects.list().data,p=(0,s.useMemo)((function(){var e;return null===u||void 0===u||null===(e=u.projects)||void 0===e?void 0:e[0]}),[u]),y=((0,s.useMemo)((function(){var e;return(0,P.h)(null===p||void 0===p||null===(e=p.features)||void 0===e?void 0:e[h.d.LOCAL_TIMEZONE])}),[null===p||void 0===p?void 0:p.features]),{_limit:d.Q,_offset:o*d.Q,disable_retries_grouping:!0});null!==i&&void 0!==i&&i.status&&(y.status=i.status);var E=O.ZP.pipeline_runs.list(y,{refreshInterval:3e3,revalidateOnFocus:!0}),I=E.data,C=E.mutate,A=(0,s.useMemo)((function(){return(null===I||void 0===I?void 0:I.pipeline_runs)||[]}),[I]),k=(0,s.useMemo)((function(){var e;return(null===I||void 0===I||null===(e=I.metadata)||void 0===e?void 0:e.count)||[]}),[I]);return(0,Z.jsxs)(l.Z,{errors:t,setErrors:r,title:"Pipeline runs",uuid:"pipeline_runs/index",children:[(0,Z.jsx)(b.Z,{mx:2,my:1,children:(0,Z.jsxs)(a.ZP,{alignItems:"center",children:[(0,Z.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Filter runs by status:"}),(0,Z.jsx)(b.Z,{mr:1}),(0,Z.jsxs)(v.Z,{compact:!0,defaultColor:!0,fitContent:!0,onChange:function(n){n.preventDefault(),"all"===n.target.value?e.push("/pipeline-runs"):(0,_.u7)({page:0,status:n.target.value})},paddingRight:4*m.iI,placeholder:"Select run status",value:(null===i||void 0===i?void 0:i.status)||"all",children:[(0,Z.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),g.IK.map((function(e){return(0,Z.jsx)("option",{value:e,children:g.Do[e]},e)}))]})]})}),(0,Z.jsx)(f.Z,{fetchPipelineRuns:C,pipelineRuns:A,setErrors:r}),(0,Z.jsx)(b.Z,{p:2,children:(0,Z.jsx)(d.ZP,{maxPages:d.Et,onUpdate:function(n){var t=Number(n),r=w(w({},i),{},{page:t>=0?t:0});e.push("/pipeline-runs","/pipeline-runs?".concat((0,x.uM)(r)))},page:Number(o),totalPages:Math.ceil(k/d.Q)})})]})}E.getInitialProps=(0,r.Z)(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,p.Z)(E)},60710:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipeline-runs",function(){return t(78234)}])},80022:function(e,n,t){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,{Z:function(){return r}})},15544:function(e,n,t){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}t.d(n,{Z:function(){return r}})},99177:function(e,n,t){"use strict";function r(e,n){return r=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},r(e,n)}function i(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&r(e,n)}t.d(n,{Z:function(){return i}})},93189:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(12539),i=t(80022);function o(e,n){if(n&&("object"===r(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}}},function(e){e.O(0,[844,2083,8013,600,4636,8264,4666,5499,3943,9774,2888,179],(function(){return n=60710,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6780],{74395:function(e,n,t){"use strict";t.d(n,{M:function(){return c},W:function(){return l}});var r=t(38626),i=t(46684),l=34*t(70515).iI,c=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},8955:function(e,n,t){"use strict";t.d(n,{G7:function(){return P},ZP:function(){return y},u$:function(){return x}});var r=t(75582),i=t(82394),l=t(26304),c=t(90299),s=t(9134),a=t(17586),o=t(38276),u=t(30160),d=t(75499),p=t(70515),f=t(16488),b=t(42122),h=t(28598),v=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var x=76,g={uuid:"Run details"},Z={uuid:"Dependency tree"},P=[Z,g];function y(e){var n=e.height,t=e.heightOffset,i=e.pipeline,m=e.selectedRun,y=e.selectedTab,k=e.setSelectedTab,O=j({},(0,l.Z)(e,v));m?O.blockStatus=(0,f.IJ)(null===m||void 0===m?void 0:m.block_runs):O.noStatus=!0;var _=(0,b.Kn)(null===m||void 0===m?void 0:m.variables)?j({},null===m||void 0===m?void 0:m.variables):(null===m||void 0===m?void 0:m.variables)||{},I=null===m||void 0===m?void 0:m.event_variables;if(I&&(0,b.Kn)(I)&&!(0,b.Qr)(I))if((0,b.Kn)(_)&&_.hasOwnProperty("event")){var w=(0,b.Kn)(_.event)?_.event:{};_.event=j(j({},w),I)}else _.event=j({},I);var D=[];_&&JSON.stringify(_,null,2).split("\n").forEach((function(e){D.push(" ".concat(e))}));var S=m&&[["Run ID",null===m||void 0===m?void 0:m.id],["Variables",(0,h.jsx)(s.Z,{language:"json",small:!0,source:D.join("\n")},"variable_value")]],E=m&&(0,h.jsx)(o.Z,{pb:p.cd,px:p.cd,children:(0,h.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:S.map((function(e,n){var t=(0,r.Z)(e,2),i=t[0],l=t[1];return[(0,h.jsx)(u.ZP,{monospace:!0,muted:!0,children:i},"key_".concat(n)),(0,h.jsx)(u.ZP,{monospace:!0,textOverflow:!0,children:l},"val_".concat(n))]})),uuid:"LogDetail"})}),C=y&&k;return(0,h.jsxs)(h.Fragment,{children:[C&&(0,h.jsx)(o.Z,{py:p.cd,children:(0,h.jsx)(c.Z,{onClickTab:k,selectedTabUUID:null===y||void 0===y?void 0:y.uuid,tabs:P})}),(!C||Z.uuid===(null===y||void 0===y?void 0:y.uuid))&&(0,h.jsx)(a.Z,j(j({},O),{},{height:n,heightOffset:(t||0)+(C?x:0),pipeline:i})),g.uuid===(null===y||void 0===y?void 0:y.uuid)&&E]})}},8916:function(e,n,t){"use strict";t.d(n,{FS:function(){return a},JZ:function(){return u},e7:function(){return d},wx:function(){return o}});var r=t(75582),i=t(82394),l=t(30229);function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function a(e){return"string"===typeof e?e:JSON.stringify(e)}function o(e,n){var t,r;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(r=t.variables)||void 0===r?void 0:r.map((function(e){var n=e.value;return s(s({},e),{},{value:a(n)})}))}function u(e,n){return n===l.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===l.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function d(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),l=t[0],c=t[1],a=c;try{a=JSON.parse(c)}catch(o){}return s(s({},e),{},(0,i.Z)({},l,a))}),{}):e}},88785:function(e,n,t){"use strict";t.d(n,{J:function(){return a},U:function(){return s}});var r=t(38626),i=t(44897),l=t(42631),c=t(70515),s=r.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],l.TR,14*c.iI,c.cd*c.iI,c.cd*c.iI,40*c.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||i.Z.interactive).linkPrimary,";\n ")})),a=r.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],l.n_,c.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*c.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*c.iI,"px;\n ")}))},55072:function(e,n,t){"use strict";t.d(n,{Et:function(){return p},Q:function(){return d}});t(82684);var r=t(71180),i=t(55485),l=t(38276),c=t(31748),s=t(72473),a=t(79633),o=t(70515),u=t(28598),d=30,p=9;n.ZP=function(e){var n=e.page,t=e.maxPages,d=e.onUpdate,p=e.totalPages,f=[],b=t;if(b>p)f=Array.from({length:p},(function(e,n){return n}));else{var h=Math.floor(b/2),v=n-h;n+h>=p?(v=p-b+2,b-=2):n-h<=0?(v=0,b-=2):(b-=4,v=n-Math.floor(b/2)),f=Array.from({length:b},(function(e,n){return n+v}))}return(0,u.jsx)(u.Fragment,{children:p>0&&(0,u.jsxs)(i.ZP,{alignItems:"center",children:[(0,u.jsx)(r.Z,{disabled:0===n,onClick:function(){return d(n-1)},children:(0,u.jsx)(s.Hd,{size:1.5*o.iI,stroke:c.Av})}),!f.includes(0)&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(l.Z,{ml:1,children:(0,u.jsx)(r.Z,{borderLess:!0,noBackground:!0,onClick:function(){return d(0)},children:1})},0),!f.includes(1)&&(0,u.jsx)(l.Z,{ml:1,children:(0,u.jsx)(r.Z,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0)]}),f.map((function(e){return(0,u.jsx)(l.Z,{ml:1,children:(0,u.jsx)(r.Z,{backgroundColor:e===n&&a.a$,borderLess:!0,noBackground:!0,notClickable:e===n,onClick:function(){e!==n&&d(e)},children:e+1})},e)})),!f.includes(p-1)&&(0,u.jsxs)(u.Fragment,{children:[!f.includes(p-2)&&(0,u.jsx)(l.Z,{ml:1,children:(0,u.jsx)(r.Z,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0),(0,u.jsx)(l.Z,{ml:1,children:(0,u.jsx)(r.Z,{borderLess:!0,noBackground:!0,onClick:function(){return d(p-1)},children:p})},p-1)]}),(0,u.jsx)(l.Z,{ml:1}),(0,u.jsx)(r.Z,{disabled:n===p-1,onClick:function(){return d(n+1)},children:(0,u.jsx)(s.Kw,{size:1.5*o.iI,stroke:c.Av})})]})})}},83641:function(e,n,t){"use strict";t.d(n,{I7:function(){return r},IB:function(){return a},VV:function(){return l},_7:function(){return c},rn:function(){return s}});var r,i=t(41143),l="datetime",c="code",s=i.V;!function(e){e.SECOND="second",e.MINUTE="minute",e.HOUR="hour",e.DAY="day",e.WEEK="week",e.MONTH="month",e.YEAR="year",e.CUSTOM="custom"}(r||(r={}));var a=[r.MINUTE,r.HOUR,r.DAY,r.WEEK,r.MONTH,r.YEAR,r.CUSTOM]},83784:function(e,n,t){"use strict";t.d(n,{C:function(){return r}});var r="global"},14805:function(e,n,t){"use strict";var r=t(82394),i=t(44495),l=t(55485),c=t(44085),s=t(38276),a=t(30160),o=t(88785),u=t(70515),d=t(86735),p=t(28598);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.localTime,t=e.selectedDate,r=e.selectedTime,f=e.setSelectedDate,h=e.setSelectedTime,v=e.topPosition;return(0,p.jsxs)(o.J,{absolute:!0,topPosition:v,children:[(0,p.jsx)(i.ZP,{onChange:f,value:t}),(0,p.jsx)(s.Z,{mb:2}),(0,p.jsxs)(l.ZP,{alignItems:"center",children:[(0,p.jsxs)(a.ZP,{default:!0,large:!0,children:["Time (",n?"Local":"UTC","):"]}),(0,p.jsx)(s.Z,{pr:2}),(0,p.jsx)(c.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),h((function(n){return b(b({},n),{},{hour:e.target.value})}))},paddingRight:5*u.iI,placeholder:"HH",value:null===r||void 0===r?void 0:r.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(s.Z,{px:1,children:(0,p.jsx)(a.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(c.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),h((function(n){return b(b({},n),{},{minute:e.target.value})}))},paddingRight:5*u.iI,placeholder:"MM",value:null===r||void 0===r?void 0:r.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},79500:function(e,n,t){"use strict";t.d(n,{a:function(){return l}});var r=t(16488),i=t(3917);function l(e,n){var t,l;if(null!==n&&void 0!==n&&n.localTimezone)t=(0,i.n$)(e),l={hour:(0,i.lJ)(String(t.getHours())),minute:(0,i.lJ)(String(t.getMinutes()))};else{var c=e.split(" ")[1];t=(0,r.eI)(e),l={hour:c.substring(0,2),minute:c.substring(3,5)}}return{date:t,time:l}}},9134:function(e,n,t){"use strict";var r=t(82684),i=t(62369),l=t(68432),c=t(38626),s=t(65292),a=t(44897),o=t(95363),u=t(70515),d=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,p=e.showLineNumbers,f=e.small,b=e.source,h=e.wrapLines,v=(0,r.useContext)(c.ThemeContext);function m(e){var r=e.value;return(0,d.jsx)(l.Z,{customStyle:{backgroundColor:(v.background||a.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:o.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,maxWidth:t,paddingBottom:2*u.iI,paddingTop:2*u.iI},language:n,lineNumberStyle:{color:(v.content||a.Z.content).muted},showLineNumbers:p,style:s._4,useInlineStyles:!0,wrapLines:h,children:r})}return(0,d.jsx)(i.D,{components:{code:function(e){var n=e.children;return(0,d.jsx)(m,{value:n})}},children:b})}},51532:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return se}});var r=t(75582),i=t(77837),l=t(82394),c=t(38860),s=t.n(c),a=t(82684),o=t(69864),u=t(34376),d=t(83641),p=t(71180),f=t(15338),b=t(55485),h=t(85854),v=t(55072),m=t(75457),j=t(53943),x=t(44265),g=t(83784),Z=t(44085),P=t(38276),y=t(4190),k=t(75499),O=t(30160),_=t(35686),I=t(8955),w=t(72473),D=t(74395),S=t(70515),E=t(28795),C=t(81728),T=t(3917),M=t(8916),N=t(16488),L=t(15610),A=t(42122),F=t(50178),U=t(72619),R=t(3314),B=t(69419),z=t(70320),H=t(28598);function V(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?V(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):V(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var K=function(e){var n=e.backfill,t=e.errors,i=e.fetchBackfill,l=e.pipeline,c=e.setErrors,s=e.variables,V=(0,F.Ct)(),K=(0,z.q)(),J=(0,u.useRouter)(),X=n||{},W=X.block_uuid,G=X.end_datetime,q=X.id,Q=X.interval_type,$=X.interval_units,ee=X.name,ne=X.pipeline_run_dates,te=X.start_datetime,re=X.status,ie=X.total_run_count,le=X.variables,ce=void 0===le?{}:le,se=l.uuid,ae=(0,B.iV)(),oe={_limit:40,_offset:40*(null!==ae&&void 0!==ae&&ae.page?ae.page:0)};null!==ae&&void 0!==ae&&ae.status&&(oe.status=ae.status);var ue=_.ZP.pipeline_runs.list(Y(Y({},oe),{},{backfill_id:q}),{refreshInterval:3e3,revalidateOnFocus:!0},{pauseFetch:!q}),de=ue.data,pe=ue.mutate,fe=!(te&&G&&Q&&$),be=!re,he=(0,a.useMemo)((function(){return(be?ne:null===de||void 0===de?void 0:de.pipeline_runs)||[]}),[de,ne,be]),ve=(0,a.useMemo)((function(){var e;return(null===de||void 0===de||null===(e=de.metadata)||void 0===e?void 0:e.count)||[]}),[de]),me=(0,a.useState)(null),je=me[0],xe=me[1],ge=(0,a.useMemo)((function(){var e=null!==ae&&void 0!==ae&&ae.page?ae.page:0;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(j.Z,{disableRowSelect:be,emptyMessage:null!==ae&&void 0!==ae&&ae.status?"No runs available":'No runs available. Please complete backfill configuration by clicking "Edit backfill" above.',fetchPipelineRuns:pe,onClickRow:function(e){return xe((function(n){var t=he[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:he,selectedRun:je,setErrors:c}),(0,H.jsx)(P.Z,{p:2,children:(0,H.jsx)(v.ZP,{maxPages:9,onUpdate:function(e){var n=Number(e),t=Y(Y({},ae),{},{page:n>=0?n:0});J.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(se,"/backfills/").concat(q,"?").concat((0,B.uM)(t)))},page:Number(e),totalPages:Math.ceil(ve/40)})})]})}),[pe,q,he,se,ae,J,je,c,be,ve]),Ze=(0,a.useState)(I.G7[0]),Pe=Ze[0],ye=Ze[1],ke=(0,o.Db)(_.ZP.backfills.useUpdate(q),{onSuccess:function(e){return(0,U.wD)(e,{callback:function(){i(),pe()},onErrorCallback:function(e,n){return c({errors:n,response:e})}})}}),Oe=(0,r.Z)(ke,2),_e=Oe[0],Ie=Oe[1].isLoading,we=(0,a.useMemo)((function(){return!!re&&(d.rn.CANCELLED!==re&&d.rn.FAILED!==re)}),[re]),De=(0,a.useMemo)((function(){return re&&d.rn.CANCELLED!==re&&d.rn.FAILED!==re&&d.rn.INITIAL!==re&&d.rn.RUNNING!==re}),[re]),Se=(0,a.useMemo)((function(){var e={default:!0,size:1.5*S.iI},n=[[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.VW,Y({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"Backfill type"})]},"backfill_type_label"),(0,H.jsx)(O.ZP,{monospace:!0,children:W?d._7:d.VV},"backfill_type")],[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.rs,Y({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"Status"})]},"backfill_status_label"),(0,H.jsx)(O.ZP,{danger:d.rn.CANCELLED===re||d.rn.FAILED==re,default:d.rn.INITIAL===re,monospace:!0,muted:!re,success:d.rn.RUNNING===re||d.rn.COMPLETED===re,children:re||"inactive"},"backfill_status")]];return W||n.push.apply(n,[[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.aw,Y({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"Start date and time"})]},"backfill_start_date_label"),(0,H.jsx)(O.ZP,{monospace:!0,small:!0,children:K?(0,T.XG)(te,K):(0,N.Vx)(te)},"backfill_start_date")],[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.aw,Y({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"End date and time"})]},"backfill_end_date_label"),(0,H.jsx)(O.ZP,{monospace:!0,small:!0,children:K?(0,T.XG)(G,K):(0,N.Vx)(G)},"backfill_end_date")],[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.Pf,Y({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"Interval type"})]},"interval_type_label"),(0,H.jsx)(O.ZP,{monospace:!0,children:Q&&(0,C.kC)(Q)},"interval_type")],[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.Pf,Y({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"Interval units"})]},"interval_units_label"),(0,H.jsx)(O.ZP,{monospace:!0,children:$},"interval_units")],[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.qZ,Y({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"Total runs"})]},"total_runs_label"),(0,H.jsx)(O.ZP,{monospace:!0,children:ie},"total_runs")]]),(0,H.jsx)(k.Z,{columnFlex:[null,1],rows:n})}),[W,K,G,Q,$,te,re,ie]),Ee=(0,a.useMemo)((function(){return ce||{}}),[ce]),Ce=(0,a.useMemo)((function(){var e,n=[];return(0,A.Qr)(Ee)?n=(0,M.wx)(s,(function(e){return e.uuid===g.C})):Object.entries(Ee).forEach((function(e){var t=(0,r.Z)(e,2),i=t[0],l=t[1];n.push({uuid:i,value:(0,M.FS)(l)})})),"undefined"!==typeof n&&null!==(e=n)&&void 0!==e&&e.length?(0,H.jsx)(k.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,t=e.value;return[(0,H.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:n},"settings_variable_label_".concat(n)),(0,H.jsx)(O.ZP,{monospace:!0,small:!0,children:t},"settings_variable_".concat(n))]}))}):null}),[Ee,s]);return(0,H.jsx)(H.Fragment,{children:(0,H.jsxs)(m.Z,{afterHidden:!je,before:(0,H.jsxs)(D.M,{children:[(0,H.jsxs)(P.Z,{mb:S.HN,pt:S.cd,px:S.cd,children:[(0,H.jsx)(P.Z,{mb:S.cd,children:(0,H.jsx)(w.yg,{size:5*S.iI})}),(0,H.jsx)(h.Z,{children:ee})]}),(0,H.jsx)(P.Z,{px:S.cd,children:(0,H.jsx)(h.Z,{level:5,children:"Settings"})}),(0,H.jsx)(f.Z,{light:!0,mt:1,short:!0}),Se,Ce&&(0,H.jsxs)(P.Z,{my:S.HN,children:[(0,H.jsx)(P.Z,{px:S.cd,children:(0,H.jsx)(h.Z,{level:5,children:"Runtime variables"})}),(0,H.jsx)(f.Z,{light:!0,mt:1,short:!0}),Ce]})]}),beforeWidth:34*S.iI,breadcrumbs:[{label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(se,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{label:function(){return ee},linkProps:{as:"/pipelines/".concat(se,"/backfills/").concat(q),href:"/pipelines/[pipeline]/backfills/[...slug]"}}],buildSidekick:function(e){return(0,I.ZP)(Y(Y({},e),{},{selectedRun:je,selectedTab:Pe,setSelectedTab:ye}))},errors:t,pageName:E.M.BACKFILLS,pipeline:l,setErrors:c,subheader:(0,H.jsxs)(b.ZP,{alignItems:"center",children:[!De&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(p.Z,{beforeIcon:we?(0,H.jsx)(w.dz,{size:2*S.iI}):(0,H.jsx)(w.Py,{inverted:!(d.rn.CANCELLED===re||d.rn.FAILED===re),size:2*S.iI}),danger:we,disabled:fe,loading:Ie,onClick:function(e){(0,R.j)(e),_e({backfill:{status:we?d.rn.CANCELLED:d.rn.INITIAL}})},outline:!0,success:!we&&!(d.rn.CANCELLED===re||d.rn.FAILED===re)&&!fe,children:we?"Cancel backfill":d.rn.CANCELLED===re||d.rn.FAILED===re?"Retry backfill":"Start backfill"}),(0,H.jsx)(P.Z,{mr:S.cd})]}),!V&&(0,H.jsxs)(H.Fragment,{children:[re===x.VO.COMPLETED?(0,H.jsx)(O.ZP,{bold:!0,default:!0,large:!0,children:"Filter runs by status:"}):(0,H.jsx)(p.Z,{linkProps:{as:"/pipelines/".concat(se,"/backfills/").concat(q,"/edit"),href:"/pipelines/[pipeline]/backfills/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit backfill"}),(0,H.jsx)(P.Z,{mr:S.cd})]}),!be&&(0,H.jsxs)(Z.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?J.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(se,"/backfills/").concat(q)):(0,L.u7)({page:0,status:e.target.value})},paddingRight:4*S.iI,placeholder:"Select run status",value:(null===ae||void 0===ae?void 0:ae.status)||"all",children:[(0,H.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),x.IK.map((function(e){return(0,H.jsx)("option",{value:e,children:x.Do[e]},e)}))]})]}),title:function(){return ee},uuid:"backfill/detail",children:[(0,H.jsx)(P.Z,{mt:S.cd,px:S.cd,children:(0,H.jsx)(h.Z,{level:5,children:"Runs for this backfill"})}),(0,H.jsx)(f.Z,{light:!0,mt:S.cd,short:!0}),de?ge:(0,H.jsx)(P.Z,{m:2,children:(0,H.jsx)(y.Z,{inverted:!0})})]})})},J=t(14805),X=t(50724),W=t(97618),G=t(17488),q=[{label:function(){return"Date and time window"},description:function(){return"Backfill between a date and time range."},uuid:d.VV}],Q=t(88785),$=t(79500);function ee(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ne(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ee(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ee(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var te=function(e){var n=e.backfill,t=e.errors,i=e.fetchBackfill,l=e.pipeline,c=e.setErrors,s=(e.variables,(0,u.useRouter)()),v=(0,z.q)(),j=(0,a.useState)(),x=j[0],g=j[1],y=x||{},I=y.block_uuid,D=y.id,T=y.interval_type,L=y.interval_units,F=y.name,R=l.uuid,B=(0,a.useState)({}),V=B[0],Y=(B[1],(0,a.useState)(I?d._7:d.VV)),K=Y[0],ee=Y[1],te=(0,a.useState)(!1),re=te[0],ie=te[1],le=(0,a.useState)(!1),ce=le[0],se=le[1],ae=(0,a.useState)(null),oe=ae[0],ue=ae[1],de=(0,a.useState)(null),pe=de[0],fe=de[1],be=(0,a.useState)({hour:"00",minute:"00"}),he=be[0],ve=be[1],me=(0,a.useState)({hour:"00",minute:"00"}),je=me[0],xe=me[1];(0,a.useEffect)((function(){if(n){g(n);var e=n.start_datetime;if(e){var t=(0,$.a)(e,{localTimezone:v});fe(null===t||void 0===t?void 0:t.date),xe(t.time)}var r=n.end_datetime;if(r){var i=(0,$.a)(r,{localTimezone:v});ue(null===i||void 0===i?void 0:i.date),ve(null===i||void 0===i?void 0:i.time)}}}),[v,n]);var ge=(0,a.useMemo)((function(){var e=[[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.KJ,{default:!0,size:1.5*S.iI}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"Backfill name"})]},"model_name_detail"),(0,H.jsx)(G.Z,{monospace:!0,onChange:function(e){e.preventDefault(),g((function(n){return ne(ne({},n),{},{name:e.target.value})}))},placeholder:"Name this backfill",value:F},"model_name_input_detail")]];return d.VV===K&&e.push.apply(e,[[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.aw,{default:!0,size:1.5*S.iI}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,H.jsxs)("div",{style:{minHeight:"".concat(5.75*S.iI,"px")},children:[!re&&(0,H.jsx)(G.Z,{monospace:!0,onClick:function(){return ie((function(e){return!e}))},onFocus:function(){return ie(!0)},placeholder:"YYYY-MM-DD HH:MM",value:pe?(0,N.XM)(pe,je,{localTimezone:v}):""}),(0,H.jsx)("div",{style:{width:"400px"},children:(0,H.jsx)(X.Z,{disableEscape:!0,onClickOutside:function(){return ie(!1)},open:re,style:{position:"relative"},children:(0,H.jsx)(J.Z,{localTime:v,selectedDate:pe,selectedTime:je,setSelectedDate:fe,setSelectedTime:xe,topPosition:!0})})})]},"start_time_input")],[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.aw,{default:!0,size:1.5*S.iI}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"End date and time"})]},"end_time"),(0,H.jsxs)("div",{style:{minHeight:"".concat(5.75*S.iI,"px")},children:[!ce&&(0,H.jsx)(G.Z,{monospace:!0,onClick:function(){return se((function(e){return!e}))},onFocus:function(){return se(!0)},placeholder:"YYYY-MM-DD HH:MM",value:oe?(0,N.XM)(oe,he,{localTimezone:v}):""}),(0,H.jsx)("div",{style:{width:"400px"},children:(0,H.jsx)(X.Z,{disableEscape:!0,onClickOutside:function(){return se(!1)},open:ce,style:{position:"relative"},children:(0,H.jsx)(J.Z,{localTime:v,selectedDate:oe,selectedTime:he,setSelectedDate:ue,setSelectedTime:ve,topPosition:!0})})})]},"end_time_input")],[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.Pf,{default:!0,size:1.5*S.iI}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"Interval type"})]},"interval_type"),(0,H.jsx)(Z.Z,{monospace:!0,onChange:function(e){e.preventDefault(),g((function(n){return ne(ne({},n),{},{interval_type:e.target.value})}))},placeholder:"Time spacing between each backfill",value:T,children:d.IB.map((function(e){return(0,H.jsx)("option",{value:e,children:(0,C.kC)(e)},e)}))},"interval_type_input")],[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.Pf,{default:!0,size:1.5*S.iI}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"Interval units"})]},"interval_units"),(0,H.jsx)(G.Z,{disabled:!T,monospace:!0,onChange:function(e){e.preventDefault(),g((function(n){return ne(ne({},n),{},{interval_units:e.target.value})}))},placeholder:T?"Number of ".concat(T).concat(T!==d.I7.CUSTOM?"s":""," between each backfill"):"Interval type is required",type:"number",value:L},"interval_unit_input")]]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(P.Z,{mb:2,px:S.cd,children:(0,H.jsx)(h.Z,{children:"Settings"})}),(0,H.jsx)(f.Z,{light:!0,short:!0}),(0,H.jsx)(k.Z,{columnFlex:[null,1],rows:e})]})}),[oe,pe,v,T,L,F,K,re,ce,he,je]),Ze=(0,o.Db)(_.ZP.backfills.useUpdate(D),{onSuccess:function(e){return(0,U.wD)(e,{callback:function(){i(),s.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(R,"/backfills/").concat(D))},onErrorCallback:function(e,n){return c({errors:n,response:e})}})}}),Pe=(0,r.Z)(Ze,2),ye=Pe[0],ke=Pe[1].isLoading,Oe=(0,a.useCallback)((function(){var e=ne(ne({},(0,A.GL)(x,["name"])),{},{end_datetime:null,interval_type:null,interval_units:null,start_datetime:null,variables:(0,M.e7)(V)});return d._7===K||(e.interval_type=T,e.interval_units=L,e.end_datetime=oe&&null!==he&&void 0!==he&&he.hour&&null!==he&&void 0!==he&&he.minute?(0,N.XM)(oe,he,{convertToUtc:v,includeSeconds:!0,localTimezone:v}):null,e.start_datetime=pe&&null!==je&&void 0!==je&&je.hour&&null!==je&&void 0!==je&&je.minute?(0,N.XM)(pe,je,{convertToUtc:v,includeSeconds:!0,localTimezone:v}):null),ye({backfill:e})}),[oe,pe,v,T,L,x,V,K,he,je,ye]),_e=(0,a.useMemo)((function(){return d._7===K?!I:!(oe&&pe&&T&&L)}),[I,oe,pe,T,L,K]);return(0,H.jsxs)(m.Z,{breadcrumbs:[{label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(R,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{label:function(){return null===x||void 0===x?void 0:x.name},linkProps:{as:"/pipelines/".concat(R,"/backfills/").concat(D),href:"/pipelines/[pipeline]/backfills/[...slug]"}}],errors:t,pageName:E.M.BACKFILLS,pipeline:l,setErrors:c,subheader:(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(p.Z,{disabled:_e,loading:ke,onClick:Oe,outline:!0,primary:!0,children:"Save changes"}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(p.Z,{linkProps:{href:"/pipelines/[pipeline]/backfills/[...slug]",as:"/pipelines/".concat(R,"/backfills/").concat(D)},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"})]}),title:function(){return"Edit ".concat(null===x||void 0===x?void 0:x.name)},uuid:"backfill/edit",children:[(0,H.jsxs)(P.Z,{p:S.cd,children:[(0,H.jsxs)(P.Z,{mb:2,children:[(0,H.jsx)(h.Z,{children:"Backfill type"}),(0,H.jsx)(O.ZP,{muted:!0,children:"How would you like this pipeline to be backfilled?"})]}),(0,H.jsx)(b.ZP,{children:q.map((function(e){var n=e.label,t=e.description,r=e.uuid,i=K===r,l=K&&!i;return(0,H.jsx)(p.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){ee(r)},children:(0,H.jsx)(Q.U,{selected:i,children:(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(W.Z,{children:(0,H.jsx)("input",{checked:i,type:"radio"})}),(0,H.jsx)(P.Z,{mr:S.cd}),(0,H.jsxs)(W.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,H.jsx)(h.Z,{bold:!0,default:!i&&!l,level:5,muted:!i&&l,children:n()}),(0,H.jsx)(O.ZP,{default:!i&&!l,leftAligned:!0,muted:l,children:t()})]})]})})},r)}))})]}),(0,H.jsx)(P.Z,{mt:5,children:ge})]})},re=t(93808);function ie(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function le(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ie(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ie(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function ce(e){var n=e.backfillId,t=e.pipelineUUID,r=e.subpath,i=(0,a.useState)(null),l=i[0],c=i[1],s=_.ZP.variables.pipelines.list(t,{},{revalidateOnFocus:!1}).data,o=(0,a.useMemo)((function(){return null===s||void 0===s?void 0:s.variables}),[s]),u=_.ZP.pipelines.detail(t,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,d=(0,a.useMemo)((function(){return le(le({},null===u||void 0===u?void 0:u.pipeline),{},{uuid:t})}),[u,t]),p=_.ZP.backfills.detail(n,{include_preview_runs:!0}),f=p.data,b=p.mutate,h=(0,a.useMemo)((function(){return null===f||void 0===f?void 0:f.backfill}),[f]);return"edit"===r?(0,H.jsx)(te,{backfill:h,errors:l,fetchBackfill:b,pipeline:d,setErrors:c,variables:o}):(0,H.jsx)(K,{backfill:h,errors:l,fetchBackfill:b,pipeline:d,setErrors:c,variables:o})}ce.getInitialProps=function(){var e=(0,i.Z)(s().mark((function e(n){var t,i,l,c,a,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.query,i=t.pipeline,l=t.slug,!Array.isArray(l)){e.next=4;break}return c=(0,r.Z)(l,2),a=c[0],o=c[1],e.abrupt("return",{backfillId:a,pipelineUUID:i,subpath:o});case 4:return e.abrupt("return",{pipelineUUID:i});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var se=(0,re.Z)(ce)},53664:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/backfills/[...slug]",function(){return t(51532)}])}},function(e){e.O(0,[844,2083,2851,2369,9161,4495,8013,600,9696,8264,4666,5499,4839,5457,7055,3943,9774,2888,179],(function(){return n=53664,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6780],{74395:function(e,n,t){"use strict";t.d(n,{M:function(){return c},W:function(){return l}});var r=t(38626),i=t(46684),l=34*t(70515).iI,c=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},8955:function(e,n,t){"use strict";t.d(n,{G7:function(){return P},ZP:function(){return y},u$:function(){return x}});var r=t(75582),i=t(82394),l=t(26304),c=t(90299),s=t(9134),a=t(17586),o=t(38276),u=t(30160),d=t(75499),p=t(70515),f=t(16488),b=t(42122),h=t(28598),v=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var x=76,g={uuid:"Run details"},Z={uuid:"Dependency tree"},P=[Z,g];function y(e){var n=e.height,t=e.heightOffset,i=e.pipeline,m=e.selectedRun,y=e.selectedTab,k=e.setSelectedTab,O=j({},(0,l.Z)(e,v));m?O.blockStatus=(0,f.IJ)(null===m||void 0===m?void 0:m.block_runs):O.noStatus=!0;var _=(0,b.Kn)(null===m||void 0===m?void 0:m.variables)?j({},null===m||void 0===m?void 0:m.variables):(null===m||void 0===m?void 0:m.variables)||{},I=null===m||void 0===m?void 0:m.event_variables;if(I&&(0,b.Kn)(I)&&!(0,b.Qr)(I))if((0,b.Kn)(_)&&_.hasOwnProperty("event")){var w=(0,b.Kn)(_.event)?_.event:{};_.event=j(j({},w),I)}else _.event=j({},I);var D=[];_&&JSON.stringify(_,null,2).split("\n").forEach((function(e){D.push(" ".concat(e))}));var S=m&&[["Run ID",null===m||void 0===m?void 0:m.id],["Variables",(0,h.jsx)(s.Z,{language:"json",small:!0,source:D.join("\n")},"variable_value")]],E=m&&(0,h.jsx)(o.Z,{pb:p.cd,px:p.cd,children:(0,h.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:S.map((function(e,n){var t=(0,r.Z)(e,2),i=t[0],l=t[1];return[(0,h.jsx)(u.ZP,{monospace:!0,muted:!0,children:i},"key_".concat(n)),(0,h.jsx)(u.ZP,{monospace:!0,textOverflow:!0,children:l},"val_".concat(n))]})),uuid:"LogDetail"})}),C=y&&k;return(0,h.jsxs)(h.Fragment,{children:[C&&(0,h.jsx)(o.Z,{py:p.cd,children:(0,h.jsx)(c.Z,{onClickTab:k,selectedTabUUID:null===y||void 0===y?void 0:y.uuid,tabs:P})}),(!C||Z.uuid===(null===y||void 0===y?void 0:y.uuid))&&(0,h.jsx)(a.Z,j(j({},O),{},{height:n,heightOffset:(t||0)+(C?x:0),pipeline:i})),g.uuid===(null===y||void 0===y?void 0:y.uuid)&&E]})}},8916:function(e,n,t){"use strict";t.d(n,{FS:function(){return a},JZ:function(){return u},e7:function(){return d},wx:function(){return o}});var r=t(75582),i=t(82394),l=t(30229);function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function a(e){return"string"===typeof e?e:JSON.stringify(e)}function o(e,n){var t,r;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(r=t.variables)||void 0===r?void 0:r.map((function(e){var n=e.value;return s(s({},e),{},{value:a(n)})}))}function u(e,n){return n===l.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===l.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function d(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),l=t[0],c=t[1],a=c;try{a=JSON.parse(c)}catch(o){}return s(s({},e),{},(0,i.Z)({},l,a))}),{}):e}},88785:function(e,n,t){"use strict";t.d(n,{J:function(){return a},U:function(){return s}});var r=t(38626),i=t(44897),l=t(42631),c=t(70515),s=r.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],l.TR,14*c.iI,c.cd*c.iI,c.cd*c.iI,40*c.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||i.Z.interactive).linkPrimary,";\n ")})),a=r.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],l.n_,c.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*c.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*c.iI,"px;\n ")}))},55072:function(e,n,t){"use strict";t.d(n,{Et:function(){return p},Q:function(){return d}});t(82684);var r=t(71180),i=t(55485),l=t(38276),c=t(31748),s=t(72473),a=t(79633),o=t(70515),u=t(28598),d=30,p=9;n.ZP=function(e){var n=e.page,t=e.maxPages,d=e.onUpdate,p=e.totalPages,f=[],b=t;if(b>p)f=Array.from({length:p},(function(e,n){return n}));else{var h=Math.floor(b/2),v=n-h;n+h>=p?(v=p-b+2,b-=2):n-h<=0?(v=0,b-=2):(b-=4,v=n-Math.floor(b/2)),f=Array.from({length:b},(function(e,n){return n+v}))}return(0,u.jsx)(u.Fragment,{children:p>0&&(0,u.jsxs)(i.ZP,{alignItems:"center",children:[(0,u.jsx)(r.Z,{disabled:0===n,onClick:function(){return d(n-1)},children:(0,u.jsx)(s.Hd,{size:1.5*o.iI,stroke:c.Av})}),!f.includes(0)&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(l.Z,{ml:1,children:(0,u.jsx)(r.Z,{borderLess:!0,noBackground:!0,onClick:function(){return d(0)},children:1})},0),!f.includes(1)&&(0,u.jsx)(l.Z,{ml:1,children:(0,u.jsx)(r.Z,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0)]}),f.map((function(e){return(0,u.jsx)(l.Z,{ml:1,children:(0,u.jsx)(r.Z,{backgroundColor:e===n&&a.a$,borderLess:!0,noBackground:!0,notClickable:e===n,onClick:function(){e!==n&&d(e)},children:e+1})},e)})),!f.includes(p-1)&&(0,u.jsxs)(u.Fragment,{children:[!f.includes(p-2)&&(0,u.jsx)(l.Z,{ml:1,children:(0,u.jsx)(r.Z,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0),(0,u.jsx)(l.Z,{ml:1,children:(0,u.jsx)(r.Z,{borderLess:!0,noBackground:!0,onClick:function(){return d(p-1)},children:p})},p-1)]}),(0,u.jsx)(l.Z,{ml:1}),(0,u.jsx)(r.Z,{disabled:n===p-1,onClick:function(){return d(n+1)},children:(0,u.jsx)(s.Kw,{size:1.5*o.iI,stroke:c.Av})})]})})}},83641:function(e,n,t){"use strict";t.d(n,{I7:function(){return r},IB:function(){return a},VV:function(){return l},_7:function(){return c},rn:function(){return s}});var r,i=t(41143),l="datetime",c="code",s=i.V;!function(e){e.SECOND="second",e.MINUTE="minute",e.HOUR="hour",e.DAY="day",e.WEEK="week",e.MONTH="month",e.YEAR="year",e.CUSTOM="custom"}(r||(r={}));var a=[r.MINUTE,r.HOUR,r.DAY,r.WEEK,r.MONTH,r.YEAR,r.CUSTOM]},83784:function(e,n,t){"use strict";t.d(n,{C:function(){return r}});var r="global"},14805:function(e,n,t){"use strict";var r=t(82394),i=t(44495),l=t(55485),c=t(44085),s=t(38276),a=t(30160),o=t(88785),u=t(70515),d=t(86735),p=t(28598);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.localTime,t=e.selectedDate,r=e.selectedTime,f=e.setSelectedDate,h=e.setSelectedTime,v=e.topPosition;return(0,p.jsxs)(o.J,{absolute:!0,topPosition:v,children:[(0,p.jsx)(i.ZP,{onChange:f,value:t}),(0,p.jsx)(s.Z,{mb:2}),(0,p.jsxs)(l.ZP,{alignItems:"center",children:[(0,p.jsxs)(a.ZP,{default:!0,large:!0,children:["Time (",n?"Local":"UTC","):"]}),(0,p.jsx)(s.Z,{pr:2}),(0,p.jsx)(c.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),h((function(n){return b(b({},n),{},{hour:e.target.value})}))},paddingRight:5*u.iI,placeholder:"HH",value:null===r||void 0===r?void 0:r.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(s.Z,{px:1,children:(0,p.jsx)(a.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(c.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),h((function(n){return b(b({},n),{},{minute:e.target.value})}))},paddingRight:5*u.iI,placeholder:"MM",value:null===r||void 0===r?void 0:r.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},79500:function(e,n,t){"use strict";t.d(n,{a:function(){return l}});var r=t(16488),i=t(3917);function l(e,n){var t,l;if(null!==n&&void 0!==n&&n.localTimezone)t=(0,i.n$)(e),l={hour:(0,i.lJ)(String(t.getHours())),minute:(0,i.lJ)(String(t.getMinutes()))};else{var c=e.split(" ")[1];t=(0,r.eI)(e),l={hour:c.substring(0,2),minute:c.substring(3,5)}}return{date:t,time:l}}},9134:function(e,n,t){"use strict";var r=t(82684),i=t(21124),l=t(68432),c=t(38626),s=t(65292),a=t(44897),o=t(95363),u=t(70515),d=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,p=e.showLineNumbers,f=e.small,b=e.source,h=e.wrapLines,v=(0,r.useContext)(c.ThemeContext);function m(e){var r=e.value;return(0,d.jsx)(l.Z,{customStyle:{backgroundColor:(v.background||a.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:o.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,maxWidth:t,paddingBottom:2*u.iI,paddingTop:2*u.iI},language:n,lineNumberStyle:{color:(v.content||a.Z.content).muted},showLineNumbers:p,style:s._4,useInlineStyles:!0,wrapLines:h,children:r})}return(0,d.jsx)(i.D,{components:{code:function(e){var n=e.children;return(0,d.jsx)(m,{value:n})}},children:b})}},51532:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return se}});var r=t(75582),i=t(77837),l=t(82394),c=t(38860),s=t.n(c),a=t(82684),o=t(69864),u=t(34376),d=t(83641),p=t(71180),f=t(15338),b=t(55485),h=t(85854),v=t(55072),m=t(75457),j=t(53943),x=t(44265),g=t(83784),Z=t(44085),P=t(38276),y=t(4190),k=t(75499),O=t(30160),_=t(35686),I=t(8955),w=t(72473),D=t(74395),S=t(70515),E=t(28795),C=t(81728),T=t(3917),M=t(8916),N=t(16488),L=t(15610),A=t(42122),F=t(50178),U=t(72619),R=t(3314),B=t(69419),z=t(70320),H=t(28598);function V(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?V(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):V(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var K=function(e){var n=e.backfill,t=e.errors,i=e.fetchBackfill,l=e.pipeline,c=e.setErrors,s=e.variables,V=(0,F.Ct)(),K=(0,z.q)(),J=(0,u.useRouter)(),X=n||{},W=X.block_uuid,G=X.end_datetime,q=X.id,Q=X.interval_type,$=X.interval_units,ee=X.name,ne=X.pipeline_run_dates,te=X.start_datetime,re=X.status,ie=X.total_run_count,le=X.variables,ce=void 0===le?{}:le,se=l.uuid,ae=(0,B.iV)(),oe={_limit:40,_offset:40*(null!==ae&&void 0!==ae&&ae.page?ae.page:0)};null!==ae&&void 0!==ae&&ae.status&&(oe.status=ae.status);var ue=_.ZP.pipeline_runs.list(Y(Y({},oe),{},{backfill_id:q}),{refreshInterval:3e3,revalidateOnFocus:!0},{pauseFetch:!q}),de=ue.data,pe=ue.mutate,fe=!(te&&G&&Q&&$),be=!re,he=(0,a.useMemo)((function(){return(be?ne:null===de||void 0===de?void 0:de.pipeline_runs)||[]}),[de,ne,be]),ve=(0,a.useMemo)((function(){var e;return(null===de||void 0===de||null===(e=de.metadata)||void 0===e?void 0:e.count)||[]}),[de]),me=(0,a.useState)(null),je=me[0],xe=me[1],ge=(0,a.useMemo)((function(){var e=null!==ae&&void 0!==ae&&ae.page?ae.page:0;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(j.Z,{disableRowSelect:be,emptyMessage:null!==ae&&void 0!==ae&&ae.status?"No runs available":'No runs available. Please complete backfill configuration by clicking "Edit backfill" above.',fetchPipelineRuns:pe,onClickRow:function(e){return xe((function(n){var t=he[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:he,selectedRun:je,setErrors:c}),(0,H.jsx)(P.Z,{p:2,children:(0,H.jsx)(v.ZP,{maxPages:9,onUpdate:function(e){var n=Number(e),t=Y(Y({},ae),{},{page:n>=0?n:0});J.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(se,"/backfills/").concat(q,"?").concat((0,B.uM)(t)))},page:Number(e),totalPages:Math.ceil(ve/40)})})]})}),[pe,q,he,se,ae,J,je,c,be,ve]),Ze=(0,a.useState)(I.G7[0]),Pe=Ze[0],ye=Ze[1],ke=(0,o.Db)(_.ZP.backfills.useUpdate(q),{onSuccess:function(e){return(0,U.wD)(e,{callback:function(){i(),pe()},onErrorCallback:function(e,n){return c({errors:n,response:e})}})}}),Oe=(0,r.Z)(ke,2),_e=Oe[0],Ie=Oe[1].isLoading,we=(0,a.useMemo)((function(){return!!re&&(d.rn.CANCELLED!==re&&d.rn.FAILED!==re)}),[re]),De=(0,a.useMemo)((function(){return re&&d.rn.CANCELLED!==re&&d.rn.FAILED!==re&&d.rn.INITIAL!==re&&d.rn.RUNNING!==re}),[re]),Se=(0,a.useMemo)((function(){var e={default:!0,size:1.5*S.iI},n=[[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.VW,Y({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"Backfill type"})]},"backfill_type_label"),(0,H.jsx)(O.ZP,{monospace:!0,children:W?d._7:d.VV},"backfill_type")],[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.rs,Y({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"Status"})]},"backfill_status_label"),(0,H.jsx)(O.ZP,{danger:d.rn.CANCELLED===re||d.rn.FAILED==re,default:d.rn.INITIAL===re,monospace:!0,muted:!re,success:d.rn.RUNNING===re||d.rn.COMPLETED===re,children:re||"inactive"},"backfill_status")]];return W||n.push.apply(n,[[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.aw,Y({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"Start date and time"})]},"backfill_start_date_label"),(0,H.jsx)(O.ZP,{monospace:!0,small:!0,children:K?(0,T.XG)(te,K):(0,N.Vx)(te)},"backfill_start_date")],[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.aw,Y({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"End date and time"})]},"backfill_end_date_label"),(0,H.jsx)(O.ZP,{monospace:!0,small:!0,children:K?(0,T.XG)(G,K):(0,N.Vx)(G)},"backfill_end_date")],[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.Pf,Y({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"Interval type"})]},"interval_type_label"),(0,H.jsx)(O.ZP,{monospace:!0,children:Q&&(0,C.kC)(Q)},"interval_type")],[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.Pf,Y({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"Interval units"})]},"interval_units_label"),(0,H.jsx)(O.ZP,{monospace:!0,children:$},"interval_units")],[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.qZ,Y({},e)),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"Total runs"})]},"total_runs_label"),(0,H.jsx)(O.ZP,{monospace:!0,children:ie},"total_runs")]]),(0,H.jsx)(k.Z,{columnFlex:[null,1],rows:n})}),[W,K,G,Q,$,te,re,ie]),Ee=(0,a.useMemo)((function(){return ce||{}}),[ce]),Ce=(0,a.useMemo)((function(){var e,n=[];return(0,A.Qr)(Ee)?n=(0,M.wx)(s,(function(e){return e.uuid===g.C})):Object.entries(Ee).forEach((function(e){var t=(0,r.Z)(e,2),i=t[0],l=t[1];n.push({uuid:i,value:(0,M.FS)(l)})})),"undefined"!==typeof n&&null!==(e=n)&&void 0!==e&&e.length?(0,H.jsx)(k.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,t=e.value;return[(0,H.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:n},"settings_variable_label_".concat(n)),(0,H.jsx)(O.ZP,{monospace:!0,small:!0,children:t},"settings_variable_".concat(n))]}))}):null}),[Ee,s]);return(0,H.jsx)(H.Fragment,{children:(0,H.jsxs)(m.Z,{afterHidden:!je,before:(0,H.jsxs)(D.M,{children:[(0,H.jsxs)(P.Z,{mb:S.HN,pt:S.cd,px:S.cd,children:[(0,H.jsx)(P.Z,{mb:S.cd,children:(0,H.jsx)(w.yg,{size:5*S.iI})}),(0,H.jsx)(h.Z,{children:ee})]}),(0,H.jsx)(P.Z,{px:S.cd,children:(0,H.jsx)(h.Z,{level:5,children:"Settings"})}),(0,H.jsx)(f.Z,{light:!0,mt:1,short:!0}),Se,Ce&&(0,H.jsxs)(P.Z,{my:S.HN,children:[(0,H.jsx)(P.Z,{px:S.cd,children:(0,H.jsx)(h.Z,{level:5,children:"Runtime variables"})}),(0,H.jsx)(f.Z,{light:!0,mt:1,short:!0}),Ce]})]}),beforeWidth:34*S.iI,breadcrumbs:[{label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(se,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{label:function(){return ee},linkProps:{as:"/pipelines/".concat(se,"/backfills/").concat(q),href:"/pipelines/[pipeline]/backfills/[...slug]"}}],buildSidekick:function(e){return(0,I.ZP)(Y(Y({},e),{},{selectedRun:je,selectedTab:Pe,setSelectedTab:ye}))},errors:t,pageName:E.M.BACKFILLS,pipeline:l,setErrors:c,subheader:(0,H.jsxs)(b.ZP,{alignItems:"center",children:[!De&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(p.Z,{beforeIcon:we?(0,H.jsx)(w.dz,{size:2*S.iI}):(0,H.jsx)(w.Py,{inverted:!(d.rn.CANCELLED===re||d.rn.FAILED===re),size:2*S.iI}),danger:we,disabled:fe,loading:Ie,onClick:function(e){(0,R.j)(e),_e({backfill:{status:we?d.rn.CANCELLED:d.rn.INITIAL}})},outline:!0,success:!we&&!(d.rn.CANCELLED===re||d.rn.FAILED===re)&&!fe,children:we?"Cancel backfill":d.rn.CANCELLED===re||d.rn.FAILED===re?"Retry backfill":"Start backfill"}),(0,H.jsx)(P.Z,{mr:S.cd})]}),!V&&(0,H.jsxs)(H.Fragment,{children:[re===x.VO.COMPLETED?(0,H.jsx)(O.ZP,{bold:!0,default:!0,large:!0,children:"Filter runs by status:"}):(0,H.jsx)(p.Z,{linkProps:{as:"/pipelines/".concat(se,"/backfills/").concat(q,"/edit"),href:"/pipelines/[pipeline]/backfills/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit backfill"}),(0,H.jsx)(P.Z,{mr:S.cd})]}),!be&&(0,H.jsxs)(Z.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?J.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(se,"/backfills/").concat(q)):(0,L.u7)({page:0,status:e.target.value})},paddingRight:4*S.iI,placeholder:"Select run status",value:(null===ae||void 0===ae?void 0:ae.status)||"all",children:[(0,H.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),x.IK.map((function(e){return(0,H.jsx)("option",{value:e,children:x.Do[e]},e)}))]})]}),title:function(){return ee},uuid:"backfill/detail",children:[(0,H.jsx)(P.Z,{mt:S.cd,px:S.cd,children:(0,H.jsx)(h.Z,{level:5,children:"Runs for this backfill"})}),(0,H.jsx)(f.Z,{light:!0,mt:S.cd,short:!0}),de?ge:(0,H.jsx)(P.Z,{m:2,children:(0,H.jsx)(y.Z,{inverted:!0})})]})})},J=t(14805),X=t(50724),W=t(97618),G=t(17488),q=[{label:function(){return"Date and time window"},description:function(){return"Backfill between a date and time range."},uuid:d.VV}],Q=t(88785),$=t(79500);function ee(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ne(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ee(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ee(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var te=function(e){var n=e.backfill,t=e.errors,i=e.fetchBackfill,l=e.pipeline,c=e.setErrors,s=(e.variables,(0,u.useRouter)()),v=(0,z.q)(),j=(0,a.useState)(),x=j[0],g=j[1],y=x||{},I=y.block_uuid,D=y.id,T=y.interval_type,L=y.interval_units,F=y.name,R=l.uuid,B=(0,a.useState)({}),V=B[0],Y=(B[1],(0,a.useState)(I?d._7:d.VV)),K=Y[0],ee=Y[1],te=(0,a.useState)(!1),re=te[0],ie=te[1],le=(0,a.useState)(!1),ce=le[0],se=le[1],ae=(0,a.useState)(null),oe=ae[0],ue=ae[1],de=(0,a.useState)(null),pe=de[0],fe=de[1],be=(0,a.useState)({hour:"00",minute:"00"}),he=be[0],ve=be[1],me=(0,a.useState)({hour:"00",minute:"00"}),je=me[0],xe=me[1];(0,a.useEffect)((function(){if(n){g(n);var e=n.start_datetime;if(e){var t=(0,$.a)(e,{localTimezone:v});fe(null===t||void 0===t?void 0:t.date),xe(t.time)}var r=n.end_datetime;if(r){var i=(0,$.a)(r,{localTimezone:v});ue(null===i||void 0===i?void 0:i.date),ve(null===i||void 0===i?void 0:i.time)}}}),[v,n]);var ge=(0,a.useMemo)((function(){var e=[[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.KJ,{default:!0,size:1.5*S.iI}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"Backfill name"})]},"model_name_detail"),(0,H.jsx)(G.Z,{monospace:!0,onChange:function(e){e.preventDefault(),g((function(n){return ne(ne({},n),{},{name:e.target.value})}))},placeholder:"Name this backfill",value:F},"model_name_input_detail")]];return d.VV===K&&e.push.apply(e,[[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.aw,{default:!0,size:1.5*S.iI}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,H.jsxs)("div",{style:{minHeight:"".concat(5.75*S.iI,"px")},children:[!re&&(0,H.jsx)(G.Z,{monospace:!0,onClick:function(){return ie((function(e){return!e}))},onFocus:function(){return ie(!0)},placeholder:"YYYY-MM-DD HH:MM",value:pe?(0,N.XM)(pe,je,{localTimezone:v}):""}),(0,H.jsx)("div",{style:{width:"400px"},children:(0,H.jsx)(X.Z,{disableEscape:!0,onClickOutside:function(){return ie(!1)},open:re,style:{position:"relative"},children:(0,H.jsx)(J.Z,{localTime:v,selectedDate:pe,selectedTime:je,setSelectedDate:fe,setSelectedTime:xe,topPosition:!0})})})]},"start_time_input")],[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.aw,{default:!0,size:1.5*S.iI}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"End date and time"})]},"end_time"),(0,H.jsxs)("div",{style:{minHeight:"".concat(5.75*S.iI,"px")},children:[!ce&&(0,H.jsx)(G.Z,{monospace:!0,onClick:function(){return se((function(e){return!e}))},onFocus:function(){return se(!0)},placeholder:"YYYY-MM-DD HH:MM",value:oe?(0,N.XM)(oe,he,{localTimezone:v}):""}),(0,H.jsx)("div",{style:{width:"400px"},children:(0,H.jsx)(X.Z,{disableEscape:!0,onClickOutside:function(){return se(!1)},open:ce,style:{position:"relative"},children:(0,H.jsx)(J.Z,{localTime:v,selectedDate:oe,selectedTime:he,setSelectedDate:ue,setSelectedTime:ve,topPosition:!0})})})]},"end_time_input")],[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.Pf,{default:!0,size:1.5*S.iI}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"Interval type"})]},"interval_type"),(0,H.jsx)(Z.Z,{monospace:!0,onChange:function(e){e.preventDefault(),g((function(n){return ne(ne({},n),{},{interval_type:e.target.value})}))},placeholder:"Time spacing between each backfill",value:T,children:d.IB.map((function(e){return(0,H.jsx)("option",{value:e,children:(0,C.kC)(e)},e)}))},"interval_type_input")],[(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(w.Pf,{default:!0,size:1.5*S.iI}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(O.ZP,{default:!0,children:"Interval units"})]},"interval_units"),(0,H.jsx)(G.Z,{disabled:!T,monospace:!0,onChange:function(e){e.preventDefault(),g((function(n){return ne(ne({},n),{},{interval_units:e.target.value})}))},placeholder:T?"Number of ".concat(T).concat(T!==d.I7.CUSTOM?"s":""," between each backfill"):"Interval type is required",type:"number",value:L},"interval_unit_input")]]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(P.Z,{mb:2,px:S.cd,children:(0,H.jsx)(h.Z,{children:"Settings"})}),(0,H.jsx)(f.Z,{light:!0,short:!0}),(0,H.jsx)(k.Z,{columnFlex:[null,1],rows:e})]})}),[oe,pe,v,T,L,F,K,re,ce,he,je]),Ze=(0,o.Db)(_.ZP.backfills.useUpdate(D),{onSuccess:function(e){return(0,U.wD)(e,{callback:function(){i(),s.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(R,"/backfills/").concat(D))},onErrorCallback:function(e,n){return c({errors:n,response:e})}})}}),Pe=(0,r.Z)(Ze,2),ye=Pe[0],ke=Pe[1].isLoading,Oe=(0,a.useCallback)((function(){var e=ne(ne({},(0,A.GL)(x,["name"])),{},{end_datetime:null,interval_type:null,interval_units:null,start_datetime:null,variables:(0,M.e7)(V)});return d._7===K||(e.interval_type=T,e.interval_units=L,e.end_datetime=oe&&null!==he&&void 0!==he&&he.hour&&null!==he&&void 0!==he&&he.minute?(0,N.XM)(oe,he,{convertToUtc:v,includeSeconds:!0,localTimezone:v}):null,e.start_datetime=pe&&null!==je&&void 0!==je&&je.hour&&null!==je&&void 0!==je&&je.minute?(0,N.XM)(pe,je,{convertToUtc:v,includeSeconds:!0,localTimezone:v}):null),ye({backfill:e})}),[oe,pe,v,T,L,x,V,K,he,je,ye]),_e=(0,a.useMemo)((function(){return d._7===K?!I:!(oe&&pe&&T&&L)}),[I,oe,pe,T,L,K]);return(0,H.jsxs)(m.Z,{breadcrumbs:[{label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(R,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{label:function(){return null===x||void 0===x?void 0:x.name},linkProps:{as:"/pipelines/".concat(R,"/backfills/").concat(D),href:"/pipelines/[pipeline]/backfills/[...slug]"}}],errors:t,pageName:E.M.BACKFILLS,pipeline:l,setErrors:c,subheader:(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(p.Z,{disabled:_e,loading:ke,onClick:Oe,outline:!0,primary:!0,children:"Save changes"}),(0,H.jsx)(P.Z,{mr:1}),(0,H.jsx)(p.Z,{linkProps:{href:"/pipelines/[pipeline]/backfills/[...slug]",as:"/pipelines/".concat(R,"/backfills/").concat(D)},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"})]}),title:function(){return"Edit ".concat(null===x||void 0===x?void 0:x.name)},uuid:"backfill/edit",children:[(0,H.jsxs)(P.Z,{p:S.cd,children:[(0,H.jsxs)(P.Z,{mb:2,children:[(0,H.jsx)(h.Z,{children:"Backfill type"}),(0,H.jsx)(O.ZP,{muted:!0,children:"How would you like this pipeline to be backfilled?"})]}),(0,H.jsx)(b.ZP,{children:q.map((function(e){var n=e.label,t=e.description,r=e.uuid,i=K===r,l=K&&!i;return(0,H.jsx)(p.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){ee(r)},children:(0,H.jsx)(Q.U,{selected:i,children:(0,H.jsxs)(b.ZP,{alignItems:"center",children:[(0,H.jsx)(W.Z,{children:(0,H.jsx)("input",{checked:i,type:"radio"})}),(0,H.jsx)(P.Z,{mr:S.cd}),(0,H.jsxs)(W.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,H.jsx)(h.Z,{bold:!0,default:!i&&!l,level:5,muted:!i&&l,children:n()}),(0,H.jsx)(O.ZP,{default:!i&&!l,leftAligned:!0,muted:l,children:t()})]})]})})},r)}))})]}),(0,H.jsx)(P.Z,{mt:5,children:ge})]})},re=t(93808);function ie(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function le(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ie(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ie(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function ce(e){var n=e.backfillId,t=e.pipelineUUID,r=e.subpath,i=(0,a.useState)(null),l=i[0],c=i[1],s=_.ZP.variables.pipelines.list(t,{},{revalidateOnFocus:!1}).data,o=(0,a.useMemo)((function(){return null===s||void 0===s?void 0:s.variables}),[s]),u=_.ZP.pipelines.detail(t,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,d=(0,a.useMemo)((function(){return le(le({},null===u||void 0===u?void 0:u.pipeline),{},{uuid:t})}),[u,t]),p=_.ZP.backfills.detail(n,{include_preview_runs:!0}),f=p.data,b=p.mutate,h=(0,a.useMemo)((function(){return null===f||void 0===f?void 0:f.backfill}),[f]);return"edit"===r?(0,H.jsx)(te,{backfill:h,errors:l,fetchBackfill:b,pipeline:d,setErrors:c,variables:o}):(0,H.jsx)(K,{backfill:h,errors:l,fetchBackfill:b,pipeline:d,setErrors:c,variables:o})}ce.getInitialProps=function(){var e=(0,i.Z)(s().mark((function e(n){var t,i,l,c,a,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.query,i=t.pipeline,l=t.slug,!Array.isArray(l)){e.next=4;break}return c=(0,r.Z)(l,2),a=c[0],o=c[1],e.abrupt("return",{backfillId:a,pipelineUUID:i,subpath:o});case 4:return e.abrupt("return",{pipelineUUID:i});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var se=(0,re.Z)(ce)},53664:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/backfills/[...slug]",function(){return t(51532)}])}},function(e){e.O(0,[844,2083,2851,1124,9161,4495,8013,600,4636,8264,4666,5499,4839,5457,7055,3943,9774,2888,179],(function(){return n=53664,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8450],{17717:function(n){!function(){"use strict";var e={114:function(n){function e(n){if("string"!==typeof n)throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}function t(n,e){for(var t,r="",i=0,o=-1,u=0,c=0;c<=n.length;++c){if(c<n.length)t=n.charCodeAt(c);else{if(47===t)break;t=47}if(47===t){if(o===c-1||1===u);else if(o!==c-1&&2===u){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var l=r.lastIndexOf("/");if(l!==r.length-1){-1===l?(r="",i=0):i=(r=r.slice(0,l)).length-1-r.lastIndexOf("/"),o=c,u=0;continue}}else if(2===r.length||1===r.length){r="",i=0,o=c,u=0;continue}e&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+n.slice(o+1,c):r=n.slice(o+1,c),i=c-o-1;o=c,u=0}else 46===t&&-1!==u?++u:u=-1}return r}var r={resolve:function(){for(var n,r="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var u;o>=0?u=arguments[o]:(void 0===n&&(n=""),u=n),e(u),0!==u.length&&(r=u+"/"+r,i=47===u.charCodeAt(0))}return r=t(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(n){if(e(n),0===n.length)return".";var r=47===n.charCodeAt(0),i=47===n.charCodeAt(n.length-1);return 0!==(n=t(n,!r)).length||r||(n="."),n.length>0&&i&&(n+="/"),r?"/"+n:n},isAbsolute:function(n){return e(n),n.length>0&&47===n.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var n,t=0;t<arguments.length;++t){var i=arguments[t];e(i),i.length>0&&(void 0===n?n=i:n+="/"+i)}return void 0===n?".":r.normalize(n)},relative:function(n,t){if(e(n),e(t),n===t)return"";if((n=r.resolve(n))===(t=r.resolve(t)))return"";for(var i=1;i<n.length&&47===n.charCodeAt(i);++i);for(var o=n.length,u=o-i,c=1;c<t.length&&47===t.charCodeAt(c);++c);for(var l=t.length-c,a=u<l?u:l,s=-1,f=0;f<=a;++f){if(f===a){if(l>a){if(47===t.charCodeAt(c+f))return t.slice(c+f+1);if(0===f)return t.slice(c+f)}else u>a&&(47===n.charCodeAt(i+f)?s=f:0===f&&(s=0));break}var d=n.charCodeAt(i+f);if(d!==t.charCodeAt(c+f))break;47===d&&(s=f)}var p="";for(f=i+s+1;f<=o;++f)f!==o&&47!==n.charCodeAt(f)||(0===p.length?p+="..":p+="/..");return p.length>0?p+t.slice(c+s):(c+=s,47===t.charCodeAt(c)&&++c,t.slice(c))},_makeLong:function(n){return n},dirname:function(n){if(e(n),0===n.length)return".";for(var t=n.charCodeAt(0),r=47===t,i=-1,o=!0,u=n.length-1;u>=1;--u)if(47===(t=n.charCodeAt(u))){if(!o){i=u;break}}else o=!1;return-1===i?r?"/":".":r&&1===i?"//":n.slice(0,i)},basename:function(n,t){if(void 0!==t&&"string"!==typeof t)throw new TypeError('"ext" argument must be a string');e(n);var r,i=0,o=-1,u=!0;if(void 0!==t&&t.length>0&&t.length<=n.length){if(t.length===n.length&&t===n)return"";var c=t.length-1,l=-1;for(r=n.length-1;r>=0;--r){var a=n.charCodeAt(r);if(47===a){if(!u){i=r+1;break}}else-1===l&&(u=!1,l=r+1),c>=0&&(a===t.charCodeAt(c)?-1===--c&&(o=r):(c=-1,o=l))}return i===o?o=l:-1===o&&(o=n.length),n.slice(i,o)}for(r=n.length-1;r>=0;--r)if(47===n.charCodeAt(r)){if(!u){i=r+1;break}}else-1===o&&(u=!1,o=r+1);return-1===o?"":n.slice(i,o)},extname:function(n){e(n);for(var t=-1,r=0,i=-1,o=!0,u=0,c=n.length-1;c>=0;--c){var l=n.charCodeAt(c);if(47!==l)-1===i&&(o=!1,i=c+1),46===l?-1===t?t=c:1!==u&&(u=1):-1!==t&&(u=-1);else if(!o){r=c+1;break}}return-1===t||-1===i||0===u||1===u&&t===i-1&&t===r+1?"":n.slice(t,i)},format:function(n){if(null===n||"object"!==typeof n)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof n);return function(n,e){var t=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return t?t===e.root?t+r:t+n+r:r}("/",n)},parse:function(n){e(n);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===n.length)return t;var r,i=n.charCodeAt(0),o=47===i;o?(t.root="/",r=1):r=0;for(var u=-1,c=0,l=-1,a=!0,s=n.length-1,f=0;s>=r;--s)if(47!==(i=n.charCodeAt(s)))-1===l&&(a=!1,l=s+1),46===i?-1===u?u=s:1!==f&&(f=1):-1!==u&&(f=-1);else if(!a){c=s+1;break}return-1===u||-1===l||0===f||1===f&&u===l-1&&u===c+1?-1!==l&&(t.base=t.name=0===c&&o?n.slice(1,l):n.slice(c,l)):(0===c&&o?(t.name=n.slice(1,u),t.base=n.slice(1,l)):(t.name=n.slice(c,u),t.base=n.slice(c,l)),t.ext=n.slice(u,l)),c>0?t.dir=n.slice(0,c-1):o&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,n.exports=r}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}},u=!0;try{e[n](o,o.exports,r),u=!1}finally{u&&delete t[n]}return o.exports}r.ab="//";var i=r(114);n.exports=i}()},16488:function(n,e,t){"use strict";t.d(e,{IJ:function(){return v},M8:function(){return k},Vx:function(){return y},XM:function(){return C},_U:function(){return h},eI:function(){return E},gU:function(){return w},lO:function(){return j},ri:function(){return m},tL:function(){return O},vJ:function(){return A},xH:function(){return b}});var r,i=t(82394),o=t(92083),u=t.n(o),c=t(3917),l=t(4383),a=t(30229),s=t(42122),f=t(86735);function d(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function p(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?d(Object(t),!0).forEach((function(e){(0,i.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var h=function(n){return!!n&&!Object.values(a.U5).includes(n)};function v(n){return null===n||void 0===n?void 0:n.reduce((function(n,e){var t=e.block_uuid,r=e.completed_at,o=e.started_at,c=e.status,l=null;o&&r&&(l=u()(r).valueOf()-u()(o).valueOf());return p(p({},n),{},(0,i.Z)({},t,{runtime:l,status:c}))}),{})}var g,m=function(n){var e=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:a.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:a.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:a.Xm.API}];return n?e.slice(0,1):e};function b(n){var e=(0,s.gR)(n,[a.gm.INTERVAL,a.gm.TYPE]),t=n[a.gm.INTERVAL];t&&(e["schedule_interval[]"]=encodeURIComponent(t));var r=n[a.gm.TYPE];return r&&(e["schedule_type[]"]=r),e}function E(n){if(!n)return null;var e=new Date(u()(n).valueOf()),t=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());return new Date(t)}function y(n){return"string"!==typeof n?n:E(n.split("+")[0]).toISOString().split(".")[0]}!function(n){n.DAY="day",n.HOUR="hour",n.MINUTE="minute",n.SECOND="second"}(g||(g={}));var O=(r={},(0,i.Z)(r,g.DAY,86400),(0,i.Z)(r,g.HOUR,3600),(0,i.Z)(r,g.MINUTE,60),(0,i.Z)(r,g.SECOND,1),r);function w(n){var e=g.SECOND,t=n;return n%86400===0?(t/=86400,e=g.DAY):n%3600===0?(t/=3600,e=g.HOUR):n%60===0&&(t/=60,e=g.MINUTE),{time:t,unit:e}}function A(n,e){return n*O[e]}function C(n,e,t){var r="".concat(n.toISOString().split("T")[0]," ").concat(null===e||void 0===e?void 0:e.hour,":").concat(null===e||void 0===e?void 0:e.minute);if(null!==t&&void 0!==t&&t.includeSeconds&&(r=r.concat(":00")),null!==t&&void 0!==t&&t.localTimezone){var i=u()(n);i.set("hour",+(null===e||void 0===e?void 0:e.hour)||0),i.set("minute",+(null===e||void 0===e?void 0:e.minute)||0),i.set("second",0),r=i.format(c.lE),null!==t&&void 0!==t&&t.convertToUtc&&(r=(0,c.d$)(r,{includeSeconds:null===t||void 0===t?void 0:t.includeSeconds,utcFormat:!0}))}return r}function k(n){var e,t="";return t="".concat(window.origin,"/api/pipeline_schedules/").concat(null===n||void 0===n?void 0:n.id,"/pipeline_runs"),null!==n&&void 0!==n&&n.token&&(t="".concat(t,"/").concat(n.token)),(e=window.location.port)&&(t=t.replace(e,l.QT)),t}function T(n,e,t){return n.match(/[*,-/]/)?{additionalOffset:0,cronValue:n}:function(n,e,t){var r=t.indexOf(n),i=0;if(e<0)for(var o=0;o>e;o--)0===r?(r=t.length-1,i-=1):r-=1;else if(e>0)for(var u=0;u<e;u++)r===t.length-1?(r=0,i+=1):r+=1;return{additionalOffset:i,cronValue:String(t[r]||n)}}(+n,e,t)}var _=(0,f.m5)(60),N=(0,f.m5)(24),I=(0,c.Cs)();function j(n,e){if(!n)return n;var t=u()().local().format("Z"),r=t.split(":"),i="-"===t[0],o=3===r[0].length?Number(r[0].slice(1)):Number(r[0]),c=Number(r[1]);(i&&!e||!i&&e)&&(o=-o,c=-c);var l=n.split(" "),a=l[0],s=l[1],f=l[2],d=T(a,c,_),p=T(s,o+d.additionalOffset,N);if(l[0]=d.cronValue,l[1]=p.cronValue,0!==(null===p||void 0===p?void 0:p.additionalOffset)){var h=T(f,p.additionalOffset,I);l[2]=h.cronValue}return l.join(" ")}},70320:function(n,e,t){"use strict";t.d(e,{h:function(){return u},q:function(){return o}});var r=t(78419),i=t(53808);function o(){return(0,i.U2)(r.am,null)||!1}function u(n){return"undefined"!==typeof n&&(0,i.t8)(r.am,n),n}},83641:function(n,e,t){"use strict";t.d(e,{I7:function(){return r},IB:function(){return l},VV:function(){return o},_7:function(){return u},rn:function(){return c}});var r,i=t(41143),o="datetime",u="code",c=i.V;!function(n){n.SECOND="second",n.MINUTE="minute",n.HOUR="hour",n.DAY="day",n.WEEK="week",n.MONTH="month",n.YEAR="year",n.CUSTOM="custom"}(r||(r={}));var l=[r.MINUTE,r.HOUR,r.DAY,r.WEEK,r.MONTH,r.YEAR,r.CUSTOM]},41143:function(n,e,t){"use strict";var r;t.d(e,{V:function(){return r}}),function(n){n.CANCELLED="cancelled",n.COMPLETED="completed",n.FAILED="failed",n.INITIAL="initial",n.RUNNING="running",n.UPSTREAM_FAILED="upstream_failed",n.CONDITION_FAILED="condition_failed"}(r||(r={}))},44265:function(n,e,t){"use strict";t.d(e,{Az:function(){return l},BF:function(){return c},Do:function(){return s},IK:function(){return u},VO:function(){return o},sZ:function(){return a}});var r,i=t(82394),o=t(41143).V,u=[o.FAILED,o.COMPLETED,o.RUNNING,o.CANCELLED,o.INITIAL],c=[o.INITIAL,o.RUNNING],l=[o.CANCELLED,o.COMPLETED,o.FAILED],a="__mage_variables",s=(r={},(0,i.Z)(r,o.CANCELLED,"Cancelled"),(0,i.Z)(r,o.COMPLETED,"Done"),(0,i.Z)(r,o.FAILED,"Failed"),(0,i.Z)(r,o.INITIAL,"Ready"),(0,i.Z)(r,o.RUNNING,"Running"),r)},30229:function(n,e,t){"use strict";t.d(e,{TR:function(){return p},U5:function(){return l},Wb:function(){return d},Xm:function(){return o},Z4:function(){return a},fq:function(){return c},gm:function(){return s},kJ:function(){return f}});var r,i,o,u=t(82394);!function(n){n.API="api",n.EVENT="event",n.TIME="time"}(o||(o={}));var c,l,a=(r={},(0,u.Z)(r,o.API,(function(){return"API"})),(0,u.Z)(r,o.EVENT,(function(){return"event"})),(0,u.Z)(r,o.TIME,(function(){return"schedule"})),r);!function(n){n.ACTIVE="active",n.INACTIVE="inactive"}(c||(c={})),function(n){n.ONCE="@once",n.HOURLY="@hourly",n.DAILY="@daily",n.WEEKLY="@weekly",n.MONTHLY="@monthly",n.ALWAYS_ON="@always_on"}(l||(l={}));var s,f,d=[l.ONCE,l.HOURLY,l.DAILY,l.WEEKLY,l.MONTHLY];!function(n){n.INTERVAL="frequency[]",n.STATUS="status[]",n.TAG="tag[]",n.TYPE="type[]"}(s||(s={})),function(n){n.CREATED_AT="created_at",n.NAME="name",n.PIPELINE="pipeline_uuid",n.STATUS="status",n.TYPE="schedule_type"}(f||(f={}));var p=(i={},(0,u.Z)(i,f.CREATED_AT,"Created at"),(0,u.Z)(i,f.NAME,"Name"),(0,u.Z)(i,f.PIPELINE,"Pipeline"),(0,u.Z)(i,f.STATUS,"Active"),(0,u.Z)(i,f.TYPE,"Type"),i)},11650:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return Y}});var r=t(77837),i=t(75582),o=t(38860),u=t.n(o),c=t(82684),l=t(69864),a=t(34376),s=t(82394),f=t(12691),d=t.n(f),p=t(83641),h=t(71180),v=t(48670),g=t(75499),m=t(30160),b=t(72473),E=t(44265),y=t(81655),O=t(70515),w=t(3917),A=t(16488),C=t(50178),k=t(70320),T=t(28598);function _(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function N(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?_(Object(t),!0).forEach((function(e){(0,s.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):_(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var I=function(n){var e=n.models,t=n.onClickRow,r=n.pipeline,i=n.selectedRow,o=(0,C.Ct)(),u=(0,k.q)(),c=null===r||void 0===r?void 0:r.uuid,l=u?y.O$:{},a=[{uuid:"Status"},{uuid:"Name"},{uuid:"Type"},{uuid:"Runs"},N(N({},l),{},{uuid:"Backfill"}),N(N({},l),{},{uuid:"Started at"}),N(N({},l),{},{uuid:"Completed at"})];return o||a.push({label:function(){return""},uuid:"edit"}),(0,T.jsx)(g.Z,{columnFlex:[null,1,null,null,null,1,1,null],columns:a,isSelectedRow:function(n){return e[n].id===(null===i||void 0===i?void 0:i.id)},onClickRow:function(n){return t(e[n])},rows:e.map((function(n,e){var t=n.block_uuid,r=n.completed_at,i=n.end_datetime,l=n.id,a=n.name,s=n.start_datetime,f=n.started_at,g=n.status,y=n.total_run_count,C=[(0,T.jsx)(m.ZP,{default:!0,monospace:!0,children:g||"inactive"},"status"),(0,T.jsx)(d(),{as:"/pipelines/".concat(c,"/backfills/").concat(l),href:"/pipelines/[pipeline]/backfills/[...slug]",passHref:!0,children:(0,T.jsx)(v.Z,{bold:!0,sameColorAsText:!0,children:a})},"name"),(0,T.jsx)(m.ZP,{default:!0,monospace:!0,children:t?p._7:p.VV},"type"),(0,T.jsx)(m.ZP,{default:!0,monospace:!0,children:y||0},"runs"),(0,T.jsxs)(m.ZP,{default:!0,monospace:!0,small:!0,children:[s&&i&&(0,T.jsxs)(T.Fragment,{children:[u?(0,w.XG)(s,u):(0,A.Vx)(s),"\xa0-\xa0",u?(0,w.XG)(i,u):(0,A.Vx)(i)]}),!(s&&i)&&(0,T.jsx)(T.Fragment,{children:"\u2014"})]},"backfill"),(0,T.jsx)(m.ZP,{default:!0,monospace:!0,small:!0,title:f?"UTC: ".concat(f.slice(0,19)):null,children:f?u?(0,w.XG)(f,u):(0,A.Vx)(f):(0,T.jsx)(T.Fragment,{children:"\u2014"})},"started_at"),(0,T.jsx)(m.ZP,{default:!0,monospace:!0,small:!0,title:r?"UTC: ".concat(r.slice(0,19)):null,children:r?u?(0,w.XG)(r,u):(0,A.Vx)(r):(0,T.jsx)(T.Fragment,{children:"\u2014"})},"completed_at")];return o||C.push((0,T.jsx)(h.Z,{default:!0,disabled:g===E.VO.COMPLETED,iconOnly:!0,linkProps:{as:"/pipelines/".concat(c,"/backfills/").concat(l,"/edit"),href:"/pipelines/[pipeline]/backfills/[...slug]"},noBackground:!0,title:"Edit",children:(0,T.jsx)(b.I8,{default:!0,size:2*O.iI})},"".concat(e,"_edit_button"))),C})),uuid:"pipeline-runs"})},j=t(93369),P=t(75457),x=t(93808),Z=t(38276),D=t(35686),L=t(28795),S=t(15610),R=t(72619),M=t(69419),U=t(81728);function V(n){var e=n.pipeline,t=(0,a.useRouter)(),r=e.uuid,o=D.ZP.backfills.list({_limit:20,_offset:0,include_run_count:!0,pipeline_uuid:r},{refreshInterval:6e4}).data,u=(0,c.useMemo)((function(){return(null===o||void 0===o?void 0:o.backfills)||[]}),[o]),s=(0,M.iV)(),f=(0,c.useState)(null),d=f[0],p=f[1],h=(0,c.useState)(null),v=h[0],g=h[1];(0,c.useEffect)((function(){null!==s&&void 0!==s&&s.backfill_id?p(null===u||void 0===u?void 0:u.find((function(n){return n.id===Number(s.backfill_id)}))):d&&p(null)}),[u,s,d]);var E=(0,c.useMemo)((function(){var n="/pipelines/".concat(r,"/backfills"),e=[{label:function(){return"Backfills"},linkProps:d?{as:n,href:"/pipelines/[pipeline]/backfills"}:null}];return d&&e.push({label:function(){return d.name}}),e}),[r,d]),y=(0,l.Db)(D.ZP.backfills.pipelines.useCreate(r),{onSuccess:function(n){return(0,R.wD)(n,{callback:function(n){var e=n.backfill.id;t.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(r,"/backfills/").concat(e,"/edit"))},onErrorCallback:function(n,e){return g({errors:e,response:n})}})}}),w=(0,i.Z)(y,2),A=w[0],C=w[1].isLoading;return(0,T.jsxs)(P.Z,{breadcrumbs:E,errors:v,pageName:L.M.BACKFILLS,pipeline:e,setErrors:g,title:function(n){var e=n.name;return"".concat(e," backfills")},uuid:"".concat(L.M.BACKFILLS,"_").concat(r),children:[(0,T.jsx)(Z.Z,{p:O.cd,children:(0,T.jsx)(j.ZP,{beforeElement:(0,T.jsx)(b.mm,{size:2.5*O.iI}),blackBorder:!0,inline:!0,loading:C,noHoverUnderline:!0,onClick:function(){return A({backfill:{name:(0,U.Y6)()}})},sameColorAsText:!0,uuid:"PipelineDetailPage/Backfills/add_new_backfill",children:"Create new backfill"})}),u&&0===u.length&&(0,T.jsx)(Z.Z,{p:O.cd,children:(0,T.jsx)(m.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No backfills available"})}),(null===u||void 0===u?void 0:u.length)>=1&&(0,T.jsx)(I,{models:u,onClickRow:function(n){var e=n.id;return(0,S.u7)({backfill_id:e})},pipeline:e,selectedRow:d})]})}V.getInitialProps=function(){var n=(0,r.Z)(u().mark((function n(e){var t;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.query.pipeline,n.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}();var Y=(0,x.Z)(V)},81728:function(n,e,t){"use strict";t.d(e,{RA:function(){return p},j3:function(){return w},kC:function(){return h},vg:function(){return O},kE:function(){return I},Mp:function(){return v},Pb:function(){return s},HW:function(){return C},HD:function(){return f},wX:function(){return g},x6:function(){return m},_6:function(){return b},zf:function(){return A},Y6:function(){return _},Lo:function(){return N},wE:function(){return j},Tz:function(){return k},J3:function(){return E},We:function(){return d},QV:function(){return T},C5:function(){return y}});var r=t(75582),i=t(17717),o=["aged","ancient","autumn","billowing","bitter","black","blue","bold","broken","cold","cool","crimson","damp","dark","dawn","delicate","divine","dry","empty","falling","floral","fragrant","frosty","green","hidden","holy","icy","late","lingering","little","lively","long","misty","morning","muddy","nameless","old","patient","polished","proud","purple","quiet","red","restless","rough","shy","silent","small","snowy","solitary","sparkling","spring","still","summer","throbbing","twilight","wandering","weathered","white","wild","winter","wispy","withered","young"],u=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],c=(t(92083),["bird","breeze","brook","bush","butterfly","cherry","cloud","darkness","dawn","dew","dream","dust","feather","field","fire","firefly","flower","fog","forest","frog","frost","glade","glitter","grass","haze","hill","lake","leaf","meadow","moon","morning","mountain","night","paper","pine","pond","rain","resonance","river","sea","shadow","shape","silence","sky","smoke","snow","snowflake","sound","star","sun","sun","sunset","surf","thunder","tree","violet","voice","water","water","waterfall","wave","wildflower","wind","wood"]),l=["0","1","2","3","4","5","6","7","8","9"],a=t(86735);function s(n){if(!n)return!1;try{JSON.parse(n)}catch(e){return!1}return!0}function f(n){return"string"===typeof n}function d(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return n.split(" ").join(e)}function p(n){return n.split(" ").join("_")}function h(n){return n?n.charAt(0).toUpperCase()+n.slice(1):""}function v(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return String((new Date).getTime()*n)}function g(n){return n.charAt(0).toLowerCase()+n.slice(1)}function m(n){if(null===n||"undefined"===typeof n)return"";var e=n.toString().split("."),t=(0,r.Z)(e,2),i=t[0],o=t[1],u=i.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");return o?"".concat(u,".").concat(o):u}function b(n,e){var t,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=e,u=void 0!==o&&null!==o;if(u||(o=2),1===o)t=n;else{var c=n.length,l=n[c-1];t="y"===l&&"day"!==n?"".concat(n.slice(0,c-1),"ies"):"".concat(n,"s"===l?"es":"s")}if(u&&!i){var a=r?m(o):o;return"".concat(a," ").concat(t)}return t}function E(n){return null===n||void 0===n?void 0:n.replace(/_/g," ")}function y(n){var e=n.length;return"ies"===n.slice(e-3,e)?"".concat(n.slice(0,e-3),"y"):"es"===n.slice(e-2,e)&&"ces"!==n.slice(e-3,e)?n.slice(0,e-2):n.slice(0,e-1)}function O(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return h(E(n.toLowerCase()))}function w(n){return n.replace(/([A-Z])/g," $1")}function A(n){var e,t=[["second",60],["minute",60],["hour",24],["day",7],["week",4],["month",12],["year",null]];return t.forEach((function(i,o){if(!e){var u=(0,r.Z)(i,2),c=u[0],l=u[1],a=t.slice(0,o).reduce((function(n,e){return n*Number(e[1])}),1);n<Number(l)*a&&(e=b(c,Math.round(n/a)))}})),e}function C(n){return"undefined"!==typeof n&&null!==n&&!isNaN(n)}function k(n){var e,t=n.match(/\d+(\.?\d*)%/)||[];return Number(null===(e=t[0])||void 0===e?void 0:e.slice(0,-1))}function T(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,t=Math.pow(10,e);return Math.round((n||0)*t)/t}function _(){return"".concat((0,a.mp)(o)," ").concat((0,a.mp)(c))}function N(){return"".concat((0,a.mp)(u)).concat((0,a.mp)(l))}function I(n){return null===n||void 0===n?void 0:n.toLowerCase().replace(/\W+/g,"_")}function j(n){var e,t=n.split(i.sep),r=t[t.length-1].split(".");return e=1===r.length?r[0]:r.slice(0,-1).join("."),t.slice(0,t.length-1).concat(e).join(i.sep)}},37459:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/backfills",function(){return t(11650)}])},80022:function(n,e,t){"use strict";function r(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}t.d(e,{Z:function(){return r}})},15544:function(n,e,t){"use strict";function r(n){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},r(n)}t.d(e,{Z:function(){return r}})},99177:function(n,e,t){"use strict";function r(n,e){return r=Object.setPrototypeOf||function(n,e){return n.__proto__=e,n},r(n,e)}function i(n,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&r(n,e)}t.d(e,{Z:function(){return i}})},93189:function(n,e,t){"use strict";t.d(e,{Z:function(){return o}});var r=t(12539),i=t(80022);function o(n,e){if(e&&("object"===r(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(n)}}},function(n){n.O(0,[844,2083,8013,600,4636,8264,4666,5499,5457,9774,2888,179],(function(){return e=37459,n(n.s=e);var e}));var e=n.O();_N_E=e}]);