mage-ai 0.9.69__py3-none-any.whl → 0.9.70__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 (243) hide show
  1. mage_ai/api/policies/BackfillPolicy.py +1 -0
  2. mage_ai/api/policies/PipelinePolicy.py +1 -0
  3. mage_ai/api/policies/WorkspacePolicy.py +1 -0
  4. mage_ai/api/presenters/BackfillPresenter.py +1 -0
  5. mage_ai/api/resources/GitBranchResource.py +56 -23
  6. mage_ai/api/resources/GitCustomBranchResource.py +29 -1
  7. mage_ai/api/resources/OauthResource.py +1 -1
  8. mage_ai/api/resources/PipelineResource.py +11 -5
  9. mage_ai/api/resources/PipelineRunResource.py +41 -4
  10. mage_ai/api/resources/PipelineScheduleResource.py +4 -0
  11. mage_ai/api/resources/PullRequestResource.py +6 -4
  12. mage_ai/api/resources/WorkspaceResource.py +5 -4
  13. mage_ai/cache/block_action_object/__init__.py +1 -1
  14. mage_ai/cluster_manager/kubernetes/workload_manager.py +52 -1
  15. mage_ai/cluster_manager/workspace/base.py +6 -0
  16. mage_ai/cluster_manager/workspace/kubernetes.py +22 -1
  17. mage_ai/command_center/applications/utils.py +2 -2
  18. mage_ai/command_center/presenters/text.py +1 -1
  19. mage_ai/data_preparation/executors/k8s_block_executor.py +30 -7
  20. mage_ai/data_preparation/executors/k8s_pipeline_executor.py +30 -7
  21. mage_ai/data_preparation/executors/streaming_pipeline_executor.py +1 -1
  22. mage_ai/data_preparation/git/__init__.py +50 -22
  23. mage_ai/data_preparation/git/api.py +62 -7
  24. mage_ai/data_preparation/git/utils.py +45 -21
  25. mage_ai/data_preparation/models/block/__init__.py +24 -5
  26. mage_ai/data_preparation/models/block/dynamic/utils.py +9 -4
  27. mage_ai/data_preparation/models/block/global_data_product/__init__.py +25 -2
  28. mage_ai/data_preparation/models/block/remote/__init__.py +0 -0
  29. mage_ai/data_preparation/models/block/remote/models.py +58 -0
  30. mage_ai/data_preparation/models/block/utils.py +38 -0
  31. mage_ai/data_preparation/models/constants.py +2 -0
  32. mage_ai/data_preparation/models/global_data_product/__init__.py +12 -0
  33. mage_ai/data_preparation/models/pipeline.py +9 -5
  34. mage_ai/data_preparation/models/triggers/__init__.py +4 -2
  35. mage_ai/data_preparation/storage/local_storage.py +12 -6
  36. mage_ai/orchestration/db/migrations/versions/42a14d6143f1_update_token_column_type.py +54 -0
  37. mage_ai/orchestration/db/models/oauth.py +10 -9
  38. mage_ai/orchestration/db/models/schedules.py +21 -0
  39. mage_ai/orchestration/notification/sender.py +37 -15
  40. mage_ai/orchestration/pipeline_scheduler_original.py +32 -25
  41. mage_ai/orchestration/triggers/api.py +29 -1
  42. mage_ai/orchestration/triggers/global_data_product.py +9 -4
  43. mage_ai/orchestration/triggers/utils.py +10 -1
  44. mage_ai/orchestration/utils/resources.py +3 -0
  45. mage_ai/server/api/downloads.py +4 -1
  46. mage_ai/server/api/runs.py +151 -0
  47. mage_ai/server/constants.py +1 -1
  48. mage_ai/server/frontend_dist/404.html +6 -6
  49. mage_ai/server/frontend_dist/_next/static/{_krrrgup_C-dPOpX36S8I → RhDiJSkcjCsh4xxX4BFBk}/_buildManifest.js +1 -1
  50. mage_ai/server/frontend_dist/_next/static/chunks/1557-b3502f3f1aa92ac7.js +1 -0
  51. mage_ai/server/frontend_dist/_next/static/chunks/{3548-fa0792ddb88f4646.js → 3548-9d26185b3fb663b1.js} +1 -1
  52. mage_ai/server/frontend_dist/_next/static/chunks/7966-b9b85ba10667e654.js +1 -0
  53. mage_ai/server/frontend_dist/_next/static/chunks/9624-8b8e100079ab69e1.js +1 -0
  54. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-2a69553d8c6eeb53.js +1 -0
  55. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-4bfc84ff07d7656f.js +1 -0
  56. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-3edc6270c5b0e962.js → frontend_dist/_next/static/chunks/pages/pipeline-runs-6d183f91a2ff6668.js} +1 -1
  57. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-7181b086c93784d2.js +1 -0
  58. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-38e1fbcfbfc1014e.js +1 -0
  59. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-b645a6d13ab9fe3a.js +1 -0
  60. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-eb11c5390c982b49.js +1 -0
  61. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-1bdfda8edc9cf4a8.js → triggers-4612d15a65c35912.js} +1 -1
  62. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-32985f3f7c7dd3ab.js +1 -0
  63. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-349af617d05f001b.js +1 -0
  64. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-60d01d3887e31136.js +1 -0
  65. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/triggers-9cba3211434a8966.js → frontend_dist/_next/static/chunks/pages/triggers-a599c6ac89be8c8d.js} +1 -1
  66. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-3433c8b22e8342aa.js +1 -0
  67. mage_ai/server/frontend_dist/block-layout.html +2 -2
  68. mage_ai/server/frontend_dist/compute.html +2 -2
  69. mage_ai/server/frontend_dist/files.html +2 -2
  70. mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
  71. mage_ai/server/frontend_dist/global-data-products.html +2 -2
  72. mage_ai/server/frontend_dist/global-hooks/[...slug].html +2 -2
  73. mage_ai/server/frontend_dist/global-hooks.html +2 -2
  74. mage_ai/server/frontend_dist/index.html +2 -2
  75. mage_ai/server/frontend_dist/manage/files.html +2 -2
  76. mage_ai/server/frontend_dist/manage/settings.html +2 -2
  77. mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
  78. mage_ai/server/frontend_dist/manage/users/new.html +2 -2
  79. mage_ai/server/frontend_dist/manage/users.html +2 -2
  80. mage_ai/server/frontend_dist/manage.html +2 -2
  81. mage_ai/server/frontend_dist/oauth.html +2 -2
  82. mage_ai/server/frontend_dist/overview.html +2 -2
  83. mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
  84. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  85. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
  86. mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +2 -2
  87. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  88. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
  89. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  90. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  91. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
  92. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
  93. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
  94. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
  95. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
  96. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  97. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
  98. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  99. mage_ai/server/frontend_dist/pipelines.html +2 -2
  100. mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +2 -2
  101. mage_ai/server/frontend_dist/platform/global-hooks.html +2 -2
  102. mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
  103. mage_ai/server/frontend_dist/settings/platform/preferences.html +2 -2
  104. mage_ai/server/frontend_dist/settings/platform/settings.html +2 -2
  105. mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +2 -2
  106. mage_ai/server/frontend_dist/settings/workspace/permissions.html +2 -2
  107. mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
  108. mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +2 -2
  109. mage_ai/server/frontend_dist/settings/workspace/roles.html +2 -2
  110. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
  111. mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +2 -2
  112. mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
  113. mage_ai/server/frontend_dist/settings.html +2 -2
  114. mage_ai/server/frontend_dist/sign-in.html +6 -6
  115. mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
  116. mage_ai/server/frontend_dist/templates.html +2 -2
  117. mage_ai/server/frontend_dist/terminal.html +2 -2
  118. mage_ai/server/frontend_dist/test.html +2 -2
  119. mage_ai/server/frontend_dist/triggers.html +2 -2
  120. mage_ai/server/frontend_dist/version-control.html +2 -2
  121. mage_ai/server/frontend_dist_base_path_template/404.html +6 -6
  122. mage_ai/server/frontend_dist_base_path_template/_next/static/{KLL5mirre9d7_ZeEpaw3s → TdpLLFome13qvM0gXvpHs}/_buildManifest.js +1 -1
  123. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-b3502f3f1aa92ac7.js +1 -0
  124. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{3548-fa0792ddb88f4646.js → 3548-9d26185b3fb663b1.js} +1 -1
  125. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7966-b9b85ba10667e654.js +1 -0
  126. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-8b8e100079ab69e1.js +1 -0
  127. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-2a69553d8c6eeb53.js +1 -0
  128. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-4bfc84ff07d7656f.js +1 -0
  129. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipeline-runs-3edc6270c5b0e962.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-6d183f91a2ff6668.js} +1 -1
  130. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-7181b086c93784d2.js +1 -0
  131. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-38e1fbcfbfc1014e.js +1 -0
  132. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-b645a6d13ab9fe3a.js +1 -0
  133. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-eb11c5390c982b49.js +1 -0
  134. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-1bdfda8edc9cf4a8.js → triggers-4612d15a65c35912.js} +1 -1
  135. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-32985f3f7c7dd3ab.js +1 -0
  136. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-349af617d05f001b.js +1 -0
  137. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-60d01d3887e31136.js +1 -0
  138. mage_ai/server/{frontend_dist/_next/static/chunks/pages/triggers-9cba3211434a8966.js → frontend_dist_base_path_template/_next/static/chunks/pages/triggers-a599c6ac89be8c8d.js} +1 -1
  139. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-3433c8b22e8342aa.js +1 -0
  140. mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
  141. mage_ai/server/frontend_dist_base_path_template/compute.html +2 -2
  142. mage_ai/server/frontend_dist_base_path_template/files.html +2 -2
  143. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +2 -2
  144. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +2 -2
  145. mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +2 -2
  146. mage_ai/server/frontend_dist_base_path_template/global-hooks.html +2 -2
  147. mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
  148. mage_ai/server/frontend_dist_base_path_template/manage/files.html +2 -2
  149. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +2 -2
  150. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +2 -2
  151. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +2 -2
  152. mage_ai/server/frontend_dist_base_path_template/manage/users.html +2 -2
  153. mage_ai/server/frontend_dist_base_path_template/manage.html +2 -2
  154. mage_ai/server/frontend_dist_base_path_template/oauth.html +2 -2
  155. mage_ai/server/frontend_dist_base_path_template/overview.html +2 -2
  156. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +2 -2
  157. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  158. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +2 -2
  159. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +2 -2
  160. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
  161. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +2 -2
  162. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  163. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  164. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +2 -2
  165. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +2 -2
  166. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +2 -2
  167. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +2 -2
  168. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +2 -2
  169. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  170. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +2 -2
  171. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
  172. mage_ai/server/frontend_dist_base_path_template/pipelines.html +2 -2
  173. mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +2 -2
  174. mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +2 -2
  175. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +2 -2
  176. mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +2 -2
  177. mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +2 -2
  178. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +2 -2
  179. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +2 -2
  180. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +2 -2
  181. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +2 -2
  182. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +2 -2
  183. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +2 -2
  184. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +2 -2
  185. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +2 -2
  186. mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
  187. mage_ai/server/frontend_dist_base_path_template/sign-in.html +6 -6
  188. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +2 -2
  189. mage_ai/server/frontend_dist_base_path_template/templates.html +2 -2
  190. mage_ai/server/frontend_dist_base_path_template/terminal.html +2 -2
  191. mage_ai/server/frontend_dist_base_path_template/test.html +2 -2
  192. mage_ai/server/frontend_dist_base_path_template/triggers.html +2 -2
  193. mage_ai/server/frontend_dist_base_path_template/version-control.html +2 -2
  194. mage_ai/server/scheduler_manager.py +3 -1
  195. mage_ai/server/server.py +35 -12
  196. mage_ai/server/utils/output_display.py +2 -2
  197. mage_ai/services/aws/ecs/ecs.py +1 -0
  198. mage_ai/services/k8s/config.py +4 -4
  199. mage_ai/services/k8s/utils.py +97 -0
  200. mage_ai/shared/parsers.py +6 -1
  201. mage_ai/tests/api/operations/base/mixins.py +1 -1
  202. mage_ai/tests/api/resources/test_pipeline_resource.py +2 -2
  203. mage_ai/tests/authentication/oauth/test_utils.py +1 -1
  204. mage_ai/tests/data_preparation/models/block/test_global_data_product.py +2 -0
  205. mage_ai/tests/orchestration/triggers/test_global_data_product.py +138 -136
  206. mage_ai/tests/server/test_server.py +19 -0
  207. mage_ai/tests/services/k8s/test_job_manager.py +9 -6
  208. mage_ai/version_control/branch/utils.py +2 -1
  209. mage_ai/version_control/models.py +3 -2
  210. {mage_ai-0.9.69.dist-info → mage_ai-0.9.70.dist-info}/METADATA +2 -2
  211. {mage_ai-0.9.69.dist-info → mage_ai-0.9.70.dist-info}/RECORD +217 -212
  212. mage_ai/server/frontend_dist/_next/static/chunks/1557-df144fbd8b2208c3.js +0 -1
  213. mage_ai/server/frontend_dist/_next/static/chunks/7966-f07b2913f7326b50.js +0 -1
  214. mage_ai/server/frontend_dist/_next/static/chunks/9624-59b2f803f9c88cd6.js +0 -1
  215. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-d9c89527266296f7.js +0 -1
  216. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-852d403c7bda21b3.js +0 -1
  217. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js +0 -1
  218. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +0 -1
  219. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +0 -1
  220. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-f028ef3880ed856c.js +0 -1
  221. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +0 -1
  222. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +0 -1
  223. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.js +0 -1
  224. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-5753fac7c1bfdc88.js +0 -1
  225. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-df144fbd8b2208c3.js +0 -1
  226. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7966-f07b2913f7326b50.js +0 -1
  227. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-59b2f803f9c88cd6.js +0 -1
  228. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-d9c89527266296f7.js +0 -1
  229. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-852d403c7bda21b3.js +0 -1
  230. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js +0 -1
  231. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +0 -1
  232. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +0 -1
  233. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-f028ef3880ed856c.js +0 -1
  234. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +0 -1
  235. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +0 -1
  236. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.js +0 -1
  237. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-5753fac7c1bfdc88.js +0 -1
  238. /mage_ai/server/frontend_dist/_next/static/{_krrrgup_C-dPOpX36S8I → RhDiJSkcjCsh4xxX4BFBk}/_ssgManifest.js +0 -0
  239. /mage_ai/server/frontend_dist_base_path_template/_next/static/{KLL5mirre9d7_ZeEpaw3s → TdpLLFome13qvM0gXvpHs}/_ssgManifest.js +0 -0
  240. {mage_ai-0.9.69.dist-info → mage_ai-0.9.70.dist-info}/LICENSE +0 -0
  241. {mage_ai-0.9.69.dist-info → mage_ai-0.9.70.dist-info}/WHEEL +0 -0
  242. {mage_ai-0.9.69.dist-info → mage_ai-0.9.70.dist-info}/entry_points.txt +0 -0
  243. {mage_ai-0.9.69.dist-info → mage_ai-0.9.70.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8867],{53779:function(e,n,t){"use strict";t.d(n,{C:function(){return f},X$:function(){return h},eD:function(){return d}});var r=t(25976),i=t(44897),o=t(42631),s=t(70515),c=t(47041),l=t(91437),a=6.25*s.iI,u=100*s.iI,d=r.default.div.withConfig({displayName:"indexstyle__WindowContainerStyle",componentId:"sc-g0cszf-0"})(["border-radius:","px;width:100%;max-width:","px;z-index:101;position:absolute;overflow:hidden;top:50%;left:50%;transform:translate(-50%,-50%);",""],o.n_,u,(function(e){return"\n box-shadow: ".concat((e.theme||i.Z).shadow.window,";\n background-color: ").concat((e.theme||i.Z).background.panel,";\n ")})),p=(0,r.css)(["display:flex;align-items:center;justify-content:space-between;height:","px;padding:","px ","px;",""],a,s.iI,s.cd*s.iI,(function(e){return"\n background-color: ".concat((e.theme||i.Z).background.output,";\n ")})),h=r.default.div.withConfig({displayName:"indexstyle__WindowHeaderStyle",componentId:"sc-g0cszf-1"})([""," border-top-left-radius:","px;border-top-right-radius:","px;",""],p,o.n_,o.n_,(function(e){return"\n border-bottom: ".concat(o.YF,"px ").concat(o.M8," ").concat((e.theme||i.Z).borders.medium,";\n ")})),f=r.default.div.withConfig({displayName:"indexstyle__WindowContentStyle",componentId:"sc-g0cszf-2"})(["overflow:auto;padding:","px 0;"," "," "," ",""],s.iI,c.w5,(0,l.eR)(),(function(e){return e.minMaxHeight&&"\n max-height: ".concat(7*s.iI,"px;\n ")}),(function(e){return!e.minMaxHeight&&"\n max-height: calc(100vh - ".concat(6.5*a,"px);\n ")}))},29480:function(e,n,t){"use strict";t.d(n,{$W:function(){return u},cl:function(){return d},cv:function(){return p},dE:function(){return l},zG:function(){return a}});var r=t(25976),i=t(44897),o=t(42631),s=t(70515),c=t(47041),l=r.default.div.withConfig({displayName:"indexstyle__SectionStyle",componentId:"sc-7a1uhf-0"})(["border-radius:","px;padding:","px;",""],o.n_,s.cd*s.iI,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).popup,";\n ")})),a=r.default.div.withConfig({displayName:"indexstyle__DocsStyle",componentId:"sc-7a1uhf-1"})(["> div{overflow:initial;}> div img{max-width:80%;background:white;padding:1rem;max-height:20vh;}"]),u=r.default.div.withConfig({displayName:"indexstyle__CodeEditorStyle",componentId:"sc-7a1uhf-2"})(["padding-top:","px;",""],s.cd*s.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%;"," "," "," "," ",""],c.w5,(function(e){return e.hideHorizontalScrollbar&&"\n overflow-x: hidden;\n "}),(function(e){return e.width&&"\n width: ".concat(e.width,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,";\n ")}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")})),p=r.default.div.withConfig({displayName:"indexstyle__HeaderRowStyle",componentId:"sc-7a1uhf-4"})(["padding:","px;"," "," ",""],2*s.iI,(function(e){return"\n background-color: ".concat((e.theme||i.Z).interactive.defaultBackground,";\n border-bottom: ").concat(o.YF,"px ").concat(o.M8," ").concat((e.theme||i.Z).borders.medium,";\n ")}),(function(e){return e.padding&&"\n padding: ".concat(e.padding,"px;\n ")}),(function(e){return e.rounded&&"\n border-top-left-radius: ".concat(o.n_,"px;\n border-top-right-radius: ").concat(o.n_,"px;\n ")}))},11074:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(25976),i=t(44897),o=t(42631),s=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 "})),c=t(28598);var l=function(e){var n=e.children,t=e.fullWidth,r=void 0===t||t;return(0,c.jsx)(s,{fullWidth:r,children:n})}},42765:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Ze}});var r,i=t(77837),o=t(75582),s=t(82394),c=t(38860),l=t.n(c),a=t(82684),u=t(34376),d=t(71180),p=t(69864),h=t(32013),f=t(98777),m=t(89083),x=t(15338),j=t(78650),g=t(97618),v=t(55485),Z=t(85854),b=t(68562),y=t(11074),_=t(44085),w=t(38276),k=t(30160),P=t(17488),C=t(69650),O=t(12468),S=t(35686),I=["ReadWriteOnce","ReadWriteMany","ReadOnlyMany"],D=["Retain","Delete"],E=[{label:"Workspace name",required:!0,uuid:"name"}],N=[{label:"Namespace",labelDescription:"The namespace where the workspace resources will be deployed. Defaults to the value of the KUBE_NAMESPACE environment variable.",uuid:"namespace"},{label:"Service account name",placeholder:"default",uuid:"service_account_name"},{label:"Ingress name",labelDescription:"If you want to add the workspace to an existing ingress, enter the name of the ingress here. Otherwise, the workspace can be accessed through the service.",placeholder:"my-ingress",uuid:"ingress_name"}],M=[{label:"Storage class name",placeholder:"default",uuid:"storage_class_name"},{label:"Storage request size (in GB)",type:"number",uuid:"storage_request_size"}],F=t(44425),R=t(72473);!function(e){e.K8S="k8s",e.ECS="ecs",e.CLOUD_RUN="cloud_run",e.EMR="emr"}(r||(r={}));var A={ingress_name:"Ingress",namespace:"Namespace",pvc_retention_policy:"PVC retention policy",service_account_name:"Service account name",storage_access_mode:"Storage access mode",storage_class_name:"Storage class name",storage_request_size:"Storage request size (in GB)",url:"Access URL"},W={"termination_policy.enable_auto_termination":"Termination policy: auto-terminate","termination_policy.max_idle_seconds":"Termination policy: max idle seconds",pre_start_script_path:"Pre start: script path","post_start.command":"Post start: command","post_start.hook_path":"Post start: path to hook"},L=t(29480),z=t(79633),T=t(53779),U=t(72619),B=t(81728),G=t(89538),H=t(28598);function q(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function V(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?q(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):q(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var K=function(e){var n=e.clusterType,t=e.onCancel,i=e.onCreate,c=e.project,l=e.workspace,u=l||{},A=u.lifecycle_config,W=void 0===A?{}:A,q=u.container_config,K=(0,a.useState)(),$=K[0],Y=K[1],Q=(0,a.useState)(!!q),X=Q[0],J=Q[1],ee=(0,a.useState)(!1),ne=ee[0],te=ee[1],re=(0,a.useState)(l),ie=re[0],oe=re[1],se=(0,a.useState)(W),ce=se[0],le=se[1],ae=!!l,ue=(0,a.useMemo)((function(){return null===c||void 0===c?void 0:c.workspace_config_defaults}),[c]);(0,a.useEffect)((function(){if(ue&&(ce||le(null===ue||void 0===ue?void 0:ue.lifecycle_config),!ie)){var e=V(V({},null===ue||void 0===ue?void 0:ue.k8s),{},{name:null===ue||void 0===ue?void 0:ue.name});oe(e)}}),[ue,ce,ie]);var de=(0,p.Db)(S.ZP.workspaces.useUpdate(null===l||void 0===l?void 0:l.name,{cluster_type:n}),{onSuccess:function(e){return(0,U.wD)(e,{callback:function(e){e.error_message?Y(e.error_message):i()},onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.message;Y(r),console.log(t,r)}})}}),pe=(0,o.Z)(de,2),he=pe[0],fe=pe[1].isLoading,me=(0,p.Db)(S.ZP.workspaces.useCreate(),{onSuccess:function(e){return(0,U.wD)(e,{callback:function(e){e.error_message?Y(e.error_message):i()},onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.message;Y(r),console.log(t,r)}})}}),xe=(0,o.Z)(me,2),je=xe[0],ge=xe[1].isLoading,ve=S.ZP.files.list(),Ze=ve.data,be=ve.mutate,ye=(0,a.useMemo)((function(){return(null===Ze||void 0===Ze?void 0:Ze.files)||[]}),[Ze]),_e=(0,G.dd)((function(e){return(0,H.jsxs)(T.eD,{children:[(0,H.jsxs)(T.X$,{children:[(0,H.jsx)(g.Z,{alignItems:"center",children:(0,H.jsx)(k.ZP,{disableWordBreak:!0,monospace:!0,children:"Select file"})}),(0,H.jsx)(d.ZP,{iconOnly:!0,onClick:Pe,children:(0,H.jsx)(R.Close,{muted:!0})})]}),(0,H.jsx)(T.C,{children:(0,H.jsx)(j.Z,{disableContextMenu:!0,fetchFiles:be,files:ye,isFileDisabled:null===e||void 0===e?void 0:e.isFileDisabled,openFile:e.onFileOpen,uuid:"ConfigureWorkspace/FileBrowser"})})]})}),{},[ye,be],{background:!0,uuid:"file_selector"}),we=(0,o.Z)(_e,2),ke=we[0],Pe=we[1],Ce=(0,a.useCallback)((function(e){var n=e.autoComplete,t=e.disabled,r=e.label,i=e.labelDescription,o=e.placeholder,c=e.required,l=e.type,a=e.uuid;return(0,H.jsxs)("div",{children:[(0,H.jsx)(x.Z,{muted:!0}),(0,H.jsx)(w.Z,{ml:3,mr:2,my:1,children:(0,H.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,H.jsxs)(g.Z,{flex:2,flexDirection:"column",children:[(0,H.jsx)(k.ZP,{children:r}),i&&(0,H.jsx)(k.ZP,{muted:!0,children:i})]}),(0,H.jsx)(g.Z,{flex:1}),(0,H.jsx)(g.Z,{flex:1,children:(0,H.jsx)(P.Z,{autoComplete:n,disabled:t,onChange:function(e){oe((function(n){return V(V({},n),{},(0,s.Z)({},a,e.target.value))}))},placeholder:o,required:c,setContentOnMount:!0,type:l,value:(null===ie||void 0===ie?void 0:ie[a])||""})})]})})]},a)}),[ie,oe]),Oe=(0,a.useMemo)((function(){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(v.ZP,{children:(0,H.jsx)(w.Z,{ml:2,my:2,children:(0,H.jsx)(k.ZP,{bold:!0,sky:!0,children:"General"})})}),N.map((function(e){return Ce(e)})),(0,H.jsx)(x.Z,{muted:!0}),(0,H.jsx)(v.ZP,{children:(0,H.jsx)(w.Z,{ml:2,my:2,children:(0,H.jsx)(k.ZP,{bold:!0,sky:!0,children:"Volume claim params"})})}),M.map((function(e){return Ce(e)})),(0,H.jsx)(x.Z,{muted:!0}),(0,H.jsx)(w.Z,{ml:3,mr:2,my:1,children:(0,H.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,H.jsx)(g.Z,{flex:3,children:(0,H.jsx)(k.ZP,{children:"Access mode"})}),(0,H.jsx)(g.Z,{flex:1,children:(0,H.jsx)(_.Z,{fullWidth:!0,label:"Access mode",onChange:function(e){e.preventDefault(),oe((function(n){return V(V({},n),{},{storage_access_mode:e.target.value})}))},placeholder:"Access mode",value:null===ie||void 0===ie?void 0:ie.storage_access_mode,children:I.map((function(e){return(0,H.jsx)("option",{value:e,children:e},e)}))})})]})}),(0,H.jsx)(x.Z,{muted:!0}),(0,H.jsx)(w.Z,{ml:3,mr:2,my:1,children:(0,H.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,H.jsx)(g.Z,{flex:3,children:(0,H.jsx)(O.Z,{block:!0,description:(0,H.jsxs)(k.ZP,{default:!0,inline:!0,children:["Configure the retention policy for the stateful set PVC.",(0,H.jsx)("br",{}),"Retain will keep the PVC after the workspace is deleted.",(0,H.jsx)("br",{}),"Delete will delete the PVC when the workspace is deleted."]}),size:null,widthFitContent:!0,children:(0,H.jsx)(k.ZP,{children:"Retention policy (default: Retain)"})})}),(0,H.jsx)(g.Z,{flex:1,children:(0,H.jsx)(_.Z,{fullWidth:!0,label:"Retention policy",onChange:function(e){e.preventDefault(),oe((function(n){return V(V({},n),{},{pvc_retention_policy:e.target.value})}))},placeholder:"Retention policy",value:null===ie||void 0===ie?void 0:ie.pvc_retention_policy,children:D.map((function(e){return(0,H.jsx)("option",{value:e,children:e},e)}))})})]})}),(0,H.jsx)(x.Z,{muted:!0}),(0,H.jsx)(w.Z,{ml:2,my:2,children:(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(C.Z,{checked:X,compact:!0,onCheck:function(){return J((function(e){return!e}))}}),(0,H.jsx)(w.Z,{ml:1,children:(0,H.jsx)(k.ZP,{bold:!0,sky:!0,children:"Configure container"})})]})}),X&&(0,H.jsx)(w.Z,{ml:3,mr:2,my:1,children:(0,H.jsx)(L.$W,{children:(0,H.jsx)(m.Z,{autoHeight:!0,fontSize:12,language:F.t6.YAML,onChange:function(e){oe((function(n){return V(V({},n),{},{container_config:e})}))},tabSize:2,value:null===ie||void 0===ie?void 0:ie.container_config,width:"100%"})})}),(0,H.jsx)(x.Z,{muted:!0})]})}),[Ce,X,ie]),Se=(0,a.useMemo)((function(){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(w.Z,{ml:3,mr:2,my:1,children:(0,H.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,H.jsxs)(g.Z,{flex:2,flexDirection:"column",children:[(0,H.jsx)(k.ZP,{children:"Update workspace settings"}),(0,H.jsx)(k.ZP,{muted:!0,children:"Set this to true to update the workspace environment variable settings with values from this Kubernetes deployment."})]}),(0,H.jsx)(g.Z,{flex:1}),(0,H.jsx)(g.Z,{flex:1,children:(0,H.jsxs)(_.Z,{fullWidth:!0,onChange:function(e){e.preventDefault(),te("true"===e.target.value)},value:(null===ne||void 0===ne?void 0:ne.toString())||"false",children:[(0,H.jsx)("option",{value:"true",children:"True"},"true"),(0,H.jsx)("option",{value:"false",children:"False"},"false")]})})]})}),(0,H.jsx)(x.Z,{muted:!0}),(0,H.jsx)(w.Z,{ml:2,my:2,children:(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(C.Z,{checked:X,compact:!0,onCheck:function(){return J((function(e){return!e}))}}),(0,H.jsx)(w.Z,{ml:1,children:(0,H.jsx)(k.ZP,{bold:!0,sky:!0,children:"Configure container"})})]})}),X&&(0,H.jsx)(w.Z,{ml:3,mr:2,my:1,children:(0,H.jsx)(L.$W,{children:(0,H.jsx)(m.Z,{autoHeight:!0,fontSize:12,language:F.t6.YAML,onChange:function(e){oe((function(n){return V(V({},n),{},{container_config:e})}))},tabSize:2,value:null===ie||void 0===ie?void 0:ie.container_config,width:"100%"})})}),(0,H.jsx)(x.Z,{muted:!0})]})}),[X,ne,ie]),Ie=(0,a.useMemo)((function(){var e,n,t,r;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(v.ZP,{children:(0,H.jsx)(w.Z,{ml:2,my:2,children:(0,H.jsx)(k.ZP,{bold:!0,sky:!0,children:"Termination policy"})})}),(0,H.jsx)(x.Z,{muted:!0}),(0,H.jsx)(w.Z,{ml:3,mr:2,my:1,children:(0,H.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,H.jsx)(g.Z,{flex:3,children:(0,H.jsx)(k.ZP,{children:"Enable auto termination"})}),(0,H.jsx)(g.Z,{flex:1,children:(0,H.jsxs)(_.Z,{fullWidth:!0,onChange:function(e){e.preventDefault(),le((function(n){return V(V({},n),{},{termination_policy:V(V({},null===n||void 0===n?void 0:n.termination_policy),{},{enable_auto_termination:"true"===e.target.value})})}))},value:(null===ce||void 0===ce||null===(e=ce.termination_policy)||void 0===e?void 0:e.enable_auto_termination)||"false",children:[(0,H.jsx)("option",{value:"true",children:"True"},"true"),(0,H.jsx)("option",{value:"false",children:"False"},"false")]})})]})}),(0,H.jsx)(x.Z,{muted:!0}),(0,H.jsx)(w.Z,{ml:3,mr:2,my:1,children:(0,H.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,H.jsx)(g.Z,{flex:3,children:(0,H.jsx)(k.ZP,{children:"Max idle time (in seconds)"})}),(0,H.jsx)(g.Z,{flex:1,children:(0,H.jsx)(P.Z,{onChange:function(e){le((function(n){return V(V({},n),{},{termination_policy:V(V({},null===n||void 0===n?void 0:n.termination_policy),{},{max_idle_seconds:e.target.value})})}))},setContentOnMount:!0,type:"number",value:(null===ce||void 0===ce||null===(n=ce.termination_policy)||void 0===n?void 0:n.max_idle_seconds)||""})})]})}),(0,H.jsx)(x.Z,{muted:!0}),(0,H.jsx)(v.ZP,{children:(0,H.jsx)(w.Z,{ml:2,my:2,children:(0,H.jsx)(k.ZP,{bold:!0,sky:!0,children:"Pre start"})})}),(0,H.jsx)(x.Z,{muted:!0}),(0,H.jsx)(w.Z,{ml:3,mr:2,my:1,children:(0,H.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,H.jsxs)(g.Z,{flex:3,justifyContent:"space-between",children:[(0,H.jsx)(k.ZP,{children:"Path to pre start script"}),(0,H.jsx)(w.Z,{mr:1,children:(0,H.jsx)(d.ZP,{iconOnly:!0,noBackground:!0,noBorder:!0,onClick:function(){return ke({isFileDisabled:function(e,n){return!n&&!e.endsWith(".py")},onFileOpen:function(e,n){le((function(n){return V(V({},n),{},{pre_start_script_path:e})})),Pe()}})},children:(0,H.jsx)(R.Folder,{})})})]}),(0,H.jsx)(g.Z,{flex:1,children:(0,H.jsx)(P.Z,{onChange:function(e){le((function(n){return V(V({},n),{},{pre_start_script_path:e.target.value})}))},placeholder:"/",setContentOnMount:!0,value:(null===ce||void 0===ce?void 0:ce.pre_start_script_path)||""})})]})}),(0,H.jsx)(x.Z,{muted:!0}),(0,H.jsx)(v.ZP,{children:(0,H.jsx)(w.Z,{ml:2,my:2,children:(0,H.jsx)(k.ZP,{bold:!0,sky:!0,children:"Post start"})})}),(0,H.jsx)(x.Z,{muted:!0}),(0,H.jsx)(w.Z,{ml:3,mr:2,my:1,children:(0,H.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,H.jsx)(g.Z,{flex:3,children:(0,H.jsx)(k.ZP,{children:"Command"})}),(0,H.jsx)(g.Z,{flex:1,children:(0,H.jsx)(P.Z,{monospace:!0,onChange:function(e){le((function(n){return V(V({},n),{},{post_start:V(V({},null===n||void 0===n?void 0:n.post_start),{},{command:e.target.value})})}))},setContentOnMount:!0,value:(null===ce||void 0===ce||null===(t=ce.post_start)||void 0===t?void 0:t.command)||""})})]})}),(0,H.jsx)(x.Z,{muted:!0}),(0,H.jsx)(w.Z,{ml:3,mr:2,my:1,children:(0,H.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,H.jsxs)(g.Z,{flex:3,justifyContent:"space-between",children:[(0,H.jsx)(k.ZP,{children:"Path to hook (optional)"}),(0,H.jsx)(w.Z,{mr:1,children:(0,H.jsx)(d.ZP,{iconOnly:!0,noBackground:!0,noBorder:!0,onClick:function(){return ke({onFileOpen:function(e,n){le((function(n){return V(V({},n),{},{post_start:V(V({},null===n||void 0===n?void 0:n.post_start),{},{hook_path:e})})})),Pe()}})},children:(0,H.jsx)(R.Folder,{})})})]}),(0,H.jsx)(g.Z,{flex:1,children:(0,H.jsx)(P.Z,{onChange:function(e){le((function(n){return V(V({},n),{},{post_start:V(V({},null===n||void 0===n?void 0:n.post_start),{},{hook_path:e.target.value})})}))},placeholder:"/",setContentOnMount:!0,value:(null===ce||void 0===ce||null===(r=ce.post_start)||void 0===r?void 0:r.hook_path)||""})})]})}),(0,H.jsx)(x.Z,{muted:!0})]})}),[Pe,ce,le,ke]);return(0,H.jsx)(y.Z,{children:(0,H.jsx)("div",{style:{width:"750px"},children:(0,H.jsxs)(w.Z,{p:2,children:[(0,H.jsxs)(Z.Z,{level:4,children:[ae?"Update":"Create"," workspace"]}),(0,H.jsxs)("form",{children:[E.map((function(e){var n=e.autoComplete,t=e.disabled,r=e.label,i=e.required,o=e.type,c=e.uuid;return(0,H.jsx)(w.Z,{mt:2,children:(0,H.jsx)(P.Z,{autoComplete:n,disabled:t,label:r,onChange:function(e){oe((function(n){return V(V({},n),{},(0,s.Z)({},c,e.target.value))}))},required:i,setContentOnMount:!0,type:o,value:(null===ie||void 0===ie?void 0:ie[c])||""})},c)})),(0,H.jsx)(w.Z,{mt:2,children:(0,H.jsxs)(h.Z,{noPaddingContent:!0,children:[n===r.K8S&&(0,H.jsx)(f.Z,{title:"Kubernetes",children:ae?Se:Oe}),!ae&&(0,H.jsx)(f.Z,{title:"Lifecycle (optional)",children:Ie})]})})]}),ge&&(0,H.jsx)(w.Z,{mt:1,children:(0,H.jsx)(k.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."})}),!ge&&$&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(w.Z,{mt:1,children:(0,H.jsx)(k.ZP,{danger:!0,small:!0,children:"Failed to create instance, see error below."})}),(0,H.jsx)(w.Z,{mt:1,children:(0,H.jsx)(k.ZP,{danger:!0,small:!0,children:$})})]}),(0,H.jsx)(w.Z,{my:2,children:(0,H.jsxs)(v.ZP,{flexDirection:"row-reverse",children:[(0,H.jsx)(b.ZP,{background:z.a$,bold:!0,inline:!0,loading:ge||fe,onClick:function(){var e=ie||{},t=e.name,r=e.container_config;if(t){var i=V({},ie);i.name=function(e){return"ecs"===n?(0,B.We)(e,"_"):(0,B.We)(e,"-")}(t),X&&(i.container_config=r),i.update_workspace_settings=ne,ae?he({workspace:V(V({},i),{},{action:"patch",cluster_type:n})}):je({workspace:V(V({},i),{},{cluster_type:n,lifecycle_config:ce})})}else Y("Please enter a valid name!")},uuid:"workspaces/create",children:ae?"Update":"Create"}),(0,H.jsx)(w.Z,{ml:1}),(0,H.jsx)(b.ZP,{bold:!0,inline:!0,onClick:t,uuid:"workspaces/cancel",children:"Cancel"})]})})]})})})},$=t(65956),Y=t(93808),Q=t(75499),X=t(85544),J=t(59533),ee=t(25976),ne=t(44897),te=ee.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-19701zd-0"})(["border:1px solid;border-radius:8px;",""],(function(e){return"\n border-color: ".concat((e.theme.monotone||ne.Z.monotone).grey500,";\n ")})),re=t(70515);function ie(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function oe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ie(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ie(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var se,ce=function(e){var n=e.clusterType,t=e.fetchWorkspaces,i=e.onSuccess,s=e.setErrors,c=e.showUpdateModal,l=e.workspace,u=l.instance,h=l.lifecycle_config,f=(u.ip,u.name),j=u.status,b=(u.type,{cluster_type:n}),y=(0,p.Db)(S.ZP.workspaces.useUpdate(f,b),{onSuccess:function(e){return(0,U.wD)(e,{callback:function(){t(),i()},onErrorCallback:function(e,n){return s({errors:n,response:e})}})}}),_=(0,o.Z)(y,2),P=_[0],C=_[1].isLoading,O=(0,p.Db)(S.ZP.workspaces.useDelete(f,b),{onSuccess:function(e){return(0,U.wD)(e,{callback:function(){t(),i()},onErrorCallback:function(e,n){return s({errors:n,response:e})}})}}),I=(0,o.Z)(O,2),D=I[0],E=I[1].isLoading,N=(0,a.useMemo)((function(){if(h){var e={};return Object.entries(h).map((function(n){var t=(0,o.Z)(n,2),r=t[0],i=t[1];i&&"object"===typeof i?Object.entries(i).map((function(n){var t=(0,o.Z)(n,2),i=t[0],s=t[1];e["".concat(r,".").concat(i)]=s})):e[r]=i})),e}}),[h]),M=(0,a.useMemo)((function(){var e=u.status,t=[];return"ecs"===n&&("STOPPED"===e?t.unshift({label:"Resume instance",onClick:function(){return P({workspace:{action:"resume",cluster_type:n,name:u.name,task_arn:u.task_arn}})},props:{loading:C,primary:!0},uuid:"resume_instance"}):"RUNNING"===e&&t.unshift({label:"Stop instance",onClick:function(){return P({workspace:{action:"stop",cluster_type:n,name:u.name,task_arn:u.task_arn}})},props:{loading:C,warning:!0},uuid:"stop_instance"})),"k8s"===n&&("STOPPED"===e?t.unshift({label:"Resume instance",onClick:function(){return P({workspace:{action:"resume",cluster_type:n,name:u.name}})},props:{loading:C,primary:!0},uuid:"resume_instance"}):"RUNNING"===e&&t.unshift({label:"Stop instance",onClick:function(){return P({workspace:{action:"stop",cluster_type:n,name:u.name}})},props:{loading:C,warning:!0},uuid:"stop_instance"}),t.push({label:"Update",onClick:function(){i(),c()},props:{},uuid:"update_instance"})),null===l||void 0===l||!l.ingress_name||null!==l&&void 0!==l&&l.url||t.push({label:"Add to ingress",onClick:function(){return P({workspace:{action:"add_to_ingress",cluster_type:n,name:u.name}})},props:{default:!0,loading:C},uuid:"re_add_to_ingress"}),t}),[n,u,C,i,c,P,l]),z=(0,a.useMemo)((function(){return(0,H.jsx)(d.ZP,{danger:!0,loading:E,onClick:function(){window.confirm("Are you sure you want to delete workspace ".concat(f,"?"))&&D()},children:"Delete workspace"})}),[D,E,f]);return(0,H.jsx)(H.Fragment,{children:(0,H.jsxs)(w.Z,{p:2,children:[(0,H.jsx)(w.Z,{mb:2,children:(0,H.jsxs)(v.ZP,{alignItems:"center",children:[(0,H.jsx)(R.Folder,{size:2*re.iI}),(0,H.jsx)(w.Z,{mr:1}),(0,H.jsx)(Z.Z,{level:3,children:null===l||void 0===l?void 0:l.name})]})}),(0,H.jsx)(w.Z,{mb:2,children:(0,H.jsxs)(k.ZP,{children:["Status: ",(0,H.jsx)(k.ZP,{bold:!0,danger:"STOPPED"===j,default:"PROVISIONING"===j,inline:!0,success:"RUNNING"===j,warning:"PENDING"===j,children:j})]})}),!M||0==M.length&&(0,H.jsx)(w.Z,{mb:2,children:z}),M&&M.length>0&&(0,H.jsx)(w.Z,{mb:2,children:(0,H.jsxs)(v.ZP,{justifyContent:"space-between",children:[(0,H.jsx)(g.Z,{children:M.map((function(e){var n=e.label,t=e.onClick,r=e.uuid,i=e.props;return(0,H.jsx)(w.Z,{mr:1,children:(0,H.jsx)(d.ZP,oe(oe({},i),{},{onClick:t,children:n}))},r)}))}),z]})}),n===r.K8S&&(0,H.jsxs)(te,{children:[Object.entries(A).map((function(e,n){var t=(0,o.Z)(e,2),r=t[0],i=t[1];return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(w.Z,{mx:2,my:2,children:(0,H.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,H.jsx)(g.Z,{flex:4,children:(0,H.jsx)(k.ZP,{muted:!0,children:i})}),(0,H.jsx)(g.Z,{flex:2,flexDirection:"row-reverse",children:(0,H.jsx)(k.ZP,{bold:!0,children:(null===l||void 0===l?void 0:l[r])||"N/A"})})]})},r),n!==Object.entries(A).length-1&&(0,H.jsx)(x.Z,{muted:!0})]})})),(null===l||void 0===l?void 0:l.container_config)&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(x.Z,{muted:!0}),(0,H.jsxs)(w.Z,{mx:2,my:2,children:[(0,H.jsx)(k.ZP,{muted:!0,children:"Container config"}),(0,H.jsx)(w.Z,{mt:1}),(0,H.jsx)(L.$W,{children:(0,H.jsx)(m.Z,{autoHeight:!0,fontSize:12,language:F.t6.YAML,readOnly:!0,tabSize:2,value:null===l||void 0===l?void 0:l.container_config,width:"100%"})})]})]})]}),N&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(w.Z,{my:2,children:(0,H.jsx)(Z.Z,{default:!0,level:5,children:"Lifecycle Properties"})}),(0,H.jsx)(te,{children:Object.entries(W).map((function(e,n){var t,r=(0,o.Z)(e,2),i=r[0],s=r[1];return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(w.Z,{mx:2,my:2,children:(0,H.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,H.jsx)(g.Z,{flex:3,children:(0,H.jsx)(k.ZP,{muted:!0,children:s})}),(0,H.jsx)(g.Z,{flex:1,flexDirection:"row-reverse",children:(0,H.jsx)(k.ZP,{bold:!0,children:null===(t=N[i])||void 0===t?void 0:t.toString()})})]})},i),n!==Object.entries(W).length-1&&(0,H.jsx)(x.Z,{muted:!0})]})}))})]})]})})};!function(e){e.ALL="__all__",e.NAMESPACE="namespace[]"}(se||(se={}));var le=t(42631),ae=t(11498),ue=t(75083),de=t(69419),pe=t(53808),he="workspace_list_filters";function fe(e){return(0,pe.t8)(he,e),e}var me=t(15610),xe=t(42122);function je(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ge(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?je(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):je(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function ve(){var e=(0,u.useRouter)(),n=S.ZP.statuses.list().data,t=(0,a.useState)(null),i=t[0],c=t[1],l=(0,de.iV)(),p=(0,a.useMemo)((function(){return ge({},(0,de.DQ)(l,[se.NAMESPACE]))}),[l]),h=(0,a.useMemo)((function(){var e,t;return(null===n||void 0===n||null===(e=n.statuses)||void 0===e||null===(t=e[0])||void 0===t?void 0:t.instance_type)||"ecs"}),[n]),f=S.ZP.projects.list({},{revalidateOnFocus:!1}).data,m=(0,a.useMemo)((function(){var e;return null===f||void 0===f||null===(e=f.projects)||void 0===e?void 0:e[0]}),[f]),x=S.ZP.workspaces.list(ge(ge({},p),{},{cluster_type:h}),{revalidateOnFocus:!1}),j=x.data,g=x.isValidating,v=x.mutate,Z=(0,a.useMemo)((function(){var e;return null===j||void 0===j||null===(e=j.workspaces)||void 0===e?void 0:e.filter((function(e){return e.name}))}),[j]),b=(0,G.dd)((function(e){var n=e.workspace;return(0,H.jsx)(K,{clusterType:h,onCancel:w,onCreate:function(){v(),w()},project:m,workspace:n})}),{},[h,v,m],{background:!0,disableClickOutside:!0,disableEscape:!0,uuid:"configure_workspace"}),y=(0,o.Z)(b,2),_=y[0],w=y[1],P=(0,G.dd)((function(e){var n=e.workspace;return(0,H.jsx)($.Z,{children:(0,H.jsx)("div",{style:{width:"750px"},children:(0,H.jsx)(ce,{clusterType:h,fetchWorkspaces:v,onSuccess:I,setErrors:c,showUpdateModal:function(){return _({workspace:n})},workspace:n})})})}),{},[h,v,c,Z],{background:!0,uuid:"workspace_detail"}),C=(0,o.Z)(P,2),O=C[0],I=C[1],D=(0,a.useCallback)((function(e){var n=null===Z||void 0===Z?void 0:Z[e];O({workspace:n})}),[O,Z]);(0,a.useEffect)((function(){var e={};if((0,xe.Qr)(p)){var n={},t=(0,pe.U2)(he,{});t&&Object.entries(t).forEach((function(e){var t=(0,o.Z)(e,2),r=t[0],i=t[1];"undefined"!==typeof i&&null!==i&&(ae.RG.includes(r)?n[r]=i:(n[r]=[],Object.entries(i).forEach((function(e){var t=(0,o.Z)(e,2),i=t[0];t[1]&&n[r].push(i)}))))})),(0,xe.Qr)(n)||(e={},Object.entries(ge(ge({},e),n)||{}).forEach((function(n){var t=(0,o.Z)(n,2),r=t[0],i=t[1];"undefined"!==typeof i&&null!==i&&(e[r]=i)})))}else{var r={};Object.entries(p).forEach((function(e){var n=(0,o.Z)(e,2),t=n[0],i=n[1];r[t]={};var s,c=i;"undefined"!==typeof i&&null!==i&&(ae.RG.includes(t)?r[t]=c:(Array.isArray(c)||(c=[c]),c&&Array.isArray(c)&&(null===(s=c)||void 0===s||s.forEach((function(e){r[t][e]=!0})))))})),fe((0,xe.hB)(r))}(0,xe.Qr)(e)||(0,me.u)((0,xe.hB)(e),{pushHistory:!1})}),[p]);var E=(0,a.useMemo)((function(){var n={},t={};return h===r.K8S&&(n={namespace:[se.ALL]},t={namespace:(0,s.Z)({},se.ALL,"All namespaces")}),(0,H.jsx)(X.Z,{addButtonProps:{label:"Create new workspace",onClick:_},extraActionButtonProps:{Icon:R.Refresh,disabled:!1,isLoading:g,onClick:v,tooltip:"Refresh workspaces"},filterOptions:n,filterValueLabelMapping:t,onClickFilterDefaults:function(){fe({}),e.push("/manage")},onFilterApply:function(e,n){Object.values(n).every((function(e){return!(null!==e&&void 0!==e&&e.length)}))&&fe({})},query:p})}),[h,v,g,p,e,_]);return(0,H.jsx)(J.Z,{breadcrumbs:[{bold:!0,label:function(){return"Workspaces"}}],errors:i,pageName:ue.L6.WORKSPACES,setErrors:c,subheaderChildren:E,children:(0,H.jsx)(Q.Z,{columnFlex:[2,4,2,3,1,null],columns:[{uuid:"Status"},{uuid:"Instance Name"},{uuid:"Type"},{uuid:"URL/IP"},{uuid:"Open"}],onClickRow:["ecs","k8s"].includes(h)&&D,rows:null===Z||void 0===Z?void 0:Z.map((function(e){var n=e.instance,t=e.url,r=n.ip,i=n.name,o=n.status,s=n.type,c=t||r,l=c;return c&&!c.includes("http")&&(l="http://".concat(c),"ecs"===h&&(l="http://".concat(c,":6789"))),[(0,H.jsx)(d.ZP,{borderRadius:"".concat(le.D7,"px"),danger:"STOPPED"===o,default:"PROVISIONING"===o,notClickable:!0,padding:"6px",success:"RUNNING"===o,warning:"PENDING"===o,children:(0,B.vg)(o)},"status"),(0,H.jsx)(k.ZP,{children:i},"name"),(0,H.jsx)(k.ZP,{children:(0,B.vg)(s)},"type"),(0,H.jsx)(k.ZP,{children:c||"N/A"},"ip"),(0,H.jsx)(d.ZP,{disabled:!c,iconOnly:!0,onClick:function(){return window.open(l)},children:(0,H.jsx)(R.Expand,{size:2*re.iI})},"open_button")]}))})})}ve.getInitialProps=(0,i.Z)(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var Ze=(0,Y.Z)(ve)},13157:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage",function(){return t(42765)}])}},function(e){e.O(0,[1557,1598,5544,9774,2888,179],(function(){return n=13157,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1009],{94629:function(e,t,r){"use strict";r.d(t,{Z:function(){return P}});var n=r(82394),i=r(21831),o=r(82684),u=r(50724),s=r(1402),c=r(97618),a=r(70613),f=r(31557),l=r(68899),d=r(28598);function p(e,t){var r=e.children,n=e.noPadding;return(0,d.jsx)(l.HS,{noPadding:n,ref:t,children:r})}var h=o.forwardRef(p),v=r(62547),b=r(82571),O=r(77417),j=r(46684),y=r(75375);function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function w(e,t){e.addProjectBreadcrumbToCustomBreadcrumbs;var r=e.after,n=e.afterHeader,o=e.afterHidden,p=e.afterWidth,g=e.afterWidthOverride,w=e.appendBreadcrumbs,P=e.before,Z=e.beforeHeader,x=e.beforeWidth,_=e.breadcrumbs,A=e.children,M=e.contained,E=e.errors,k=e.headerMenuItems,D=e.headerOffset,C=e.hideAfterCompletely,I=e.mainContainerHeader,B=e.navigationItems,H=e.setAfterHidden,R=e.setAfterWidth,W=e.setBeforeWidth,S=e.setErrors,N=e.subheaderChildren,T=e.subheaderNoPadding,F=e.title,L=e.uuid,q=(0,y.Z)(L,{beforeResizeOffset:y.H,setWidthAfter:R,setWidthBefore:W,widthAfter:p,widthBefore:x,widthOverrideAfter:g}),Q=q.mainContainerRef,U=q.mousedownActiveAfter,z=q.mousedownActiveBefore,G=q.setMousedownActiveAfter,Y=q.setMousedownActiveBefore,V=q.setWidthAfter,X=q.setWidthBefore,K=q.widthAfter,J=q.widthBefore,$=(0,O.Z)().project,ee=[];return _&&ee.push.apply(ee,(0,i.Z)(_)),null!==_&&void 0!==_&&_.length&&!w||!$||null!==_&&void 0!==_&&_.length||ee.unshift({bold:!w,label:function(){return F}}),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(a.Z,{title:F}),(0,d.jsx)(f.Z,{breadcrumbs:ee,menuItems:k}),(0,d.jsxs)(l.Nk,{ref:t,children:[0!==(null===B||void 0===B?void 0:B.length)&&(0,d.jsx)(l.lm,{showMore:!0,children:(0,d.jsx)(b.Z,{navigationItems:B,showMore:!0})}),(0,d.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,d.jsxs)(v.Z,{after:r,afterHeader:n,afterHeightOffset:j.Mz,afterHidden:o,afterMousedownActive:U,afterWidth:K,before:P,beforeHeader:Z,beforeHeightOffset:j.Mz,beforeMousedownActive:z,beforeWidth:P?J:l.k1,contained:M,headerOffset:D,hideAfterCompletely:!r||C,leftOffset:P?l.k1:null,mainContainerHeader:I,mainContainerRef:Q,setAfterHidden:H,setAfterMousedownActive:G,setAfterWidth:V,setBeforeMousedownActive:Y,setBeforeWidth:X,children:[N&&(0,d.jsx)(h,{noPadding:T,children:N}),A]})})]}),E&&(0,d.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===S||void 0===S?void 0:S(null)},children:(0,d.jsx)(s.Z,m(m({},E),{},{onClose:function(){return null===S||void 0===S?void 0:S(null)}}))})]})}var P=o.forwardRef(w)},93808:function(e,t,r){"use strict";r.d(t,{Z:function(){return A}});var n=r(77837),i=r(26304),o=r(62243),u=r(29385),s=r(80022),c=r(13692),a=r(93189),f=r(15544),l=r(82394),d=r(38860),p=r.n(d),h=r(82684),v=r(56663),b=r.n(v),O=r(40761),j=r(34661),y=r(36105),g=r(50178),m=r(69419),w=r(28598),P=["auth"];function Z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach((function(t){(0,l.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.Z)(e);if(t){var i=(0,f.Z)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,a.Z)(this,r)}}function A(e){return function(t){(0,c.Z)(a,t);var r=_(a);function a(){var e;(0,o.Z)(this,a);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return e=r.call.apply(r,[this].concat(n)),(0,l.Z)((0,s.Z)(e),"state",{auth:new O.Z(e.props.token)}),e}return(0,u.Z)(a,[{key:"componentDidMount",value:function(){this.setState({auth:new O.Z(this.props.token)})}},{key:"render",value:function(){var t=this.props,r=(t.auth,(0,i.Z)(t,P));return(0,w.jsx)(e,x({auth:this.state.auth},r))}}],[{key:"getInitialProps",value:function(){var t=(0,n.Z)(p().mark((function t(r){var n,i,o,u,s,c,a,f,l;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=b()(r),i=(0,g.ex)(r),o=i.id,u=n[j.Mv],s=n[y.qt],c=new O.Z(u),a=x(x({},r),{},{auth:c,currentGroupId:o,theme:s}),(0,g.YB)(r)&&c.isExpired&&(console.log("OAuth token has expired."),f=x(x({},r.query),{},{redirect_url:r.asPath}),(0,m.nL)("/sign-in?".concat((0,m.uM)(f)),r.res)),!e.getInitialProps){t.next=12;break}return t.next=10,e.getInitialProps(a);case 10:return l=t.sent,t.abrupt("return",x(x({},l),{},{auth:c,currentGroupId:o,theme:s}));case 12:return t.abrupt("return",a);case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}]),a}(h.Component)}},78234:function(e,t,r){"use strict";r.r(t);var n=r(77837),i=r(82394),o=r(38860),u=r.n(o),s=r(82684),c=r(34376),a=r(94629),f=r(55072),l=r(27966),d=r(93808),p=r(82359),h=r(38276),v=r(4190),b=r(85544),O=r(35686),j=r(44265),y=r(70515),g=r(69419),m=r(86735),w=r(70320),P=r(28598);function Z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach((function(t){(0,i.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _(){var e=(0,c.useRouter)(),t=(0,s.useState)(null),r=t[0],n=t[1],o=(0,g.iV)(),u=null!==o&&void 0!==o&&o.page?o.page:0,d=(0,s.useMemo)((function(){return(0,g.DQ)(o,[j.P0.PIPELINE_UUID,j.P0.STATUS,j.P0.TAG])}),[o]),Z=O.ZP.projects.list().data,_=(0,s.useMemo)((function(){var e;return null===Z||void 0===Z||null===(e=Z.projects)||void 0===e?void 0:e[0]}),[Z]),A=((0,s.useMemo)((function(){var e;return(0,w.hY)(null===_||void 0===_||null===(e=_.features)||void 0===e?void 0:e[p.d.LOCAL_TIMEZONE])}),[null===_||void 0===_?void 0:_.features]),x(x({},d),{},{_limit:f.Q,_offset:u*f.Q,disable_retries_grouping:!0,include_pipeline_tags:!0,include_pipeline_uuids:!0}));null!==o&&void 0!==o&&o.status&&(A.status=o.status);var M=O.ZP.pipeline_runs.list(A,{refreshInterval:3e3,revalidateOnFocus:!0}),E=M.data,k=M.mutate,D=O.ZP.tags.list().data,C=(0,s.useMemo)((function(){return(0,m.YC)((null===D||void 0===D?void 0:D.tags)||[],(function(e){return e.uuid}))}),[D]),I=(0,s.useMemo)((function(){return(null===E||void 0===E?void 0:E.pipeline_runs)||[]}),[E]),B=(0,s.useMemo)((function(){var e;return(null===E||void 0===E||null===(e=E.metadata)||void 0===e?void 0:e.count)||[]}),[E]),H=(0,s.useMemo)((function(){var e;return(null===E||void 0===E||null===(e=E.metadata)||void 0===e?void 0:e.pipeline_uuids)||[]}),[E]),R=(0,s.useMemo)((function(){return(0,P.jsx)(b.Z,{filterOptions:{pipeline_tag:C.map((function(e){return e.uuid})),pipeline_uuid:H,status:j.IK},filterValueLabelMapping:{pipeline_tag:C.reduce((function(e,t){var r=t.uuid;return x(x({},e),{},(0,i.Z)({},r,r))}),{}),status:j.Do},onClickFilterDefaults:function(){e.push("/pipeline-runs")},query:d,resetPageOnFilterApply:!0})}),[H,e,C]);return(0,P.jsx)(a.Z,{errors:r,setErrors:n,subheaderChildren:R,title:"Pipeline runs",uuid:"pipeline_runs/index",children:E?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(l.Z,{fetchPipelineRuns:k,includePipelineTags:!0,pipelineRuns:I,setErrors:n}),(0,P.jsx)(h.Z,{p:2,children:(0,P.jsx)(f.ZP,{maxPages:f.Et,onUpdate:function(t){var r=Number(t),n=x(x({},o),{},{page:r>=0?r:0});e.push("/pipeline-runs","/pipeline-runs?".concat((0,g.uM)(n)))},page:Number(u),totalPages:Math.ceil(B/f.Q)})})]}):(0,P.jsx)(h.Z,{p:y.Mq,children:(0,P.jsx)(v.Z,{inverted:!0,large:!0})})})}_.getInitialProps=(0,n.Z)(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,d.Z)(_)},60710:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipeline-runs",function(){return r(78234)}])},80022:function(e,t,r){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{Z:function(){return n}})},15544:function(e,t,r){"use strict";function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}r.d(t,{Z:function(){return n}})},13692:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(61049);function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,n.Z)(e,t)}},93189:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(12539),i=r(80022);function o(e,t){if(t&&("object"===n(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}}},function(e){e.O(0,[1557,7966,5544,9774,2888,179],(function(){return t=60710,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1009],{94629:function(e,t,r){"use strict";r.d(t,{Z:function(){return P}});var n=r(82394),i=r(21831),o=r(82684),u=r(50724),s=r(1402),c=r(97618),a=r(70613),f=r(31557),l=r(68899),d=r(28598);function p(e,t){var r=e.children,n=e.noPadding;return(0,d.jsx)(l.HS,{noPadding:n,ref:t,children:r})}var h=o.forwardRef(p),v=r(62547),b=r(82571),O=r(77417),j=r(46684),y=r(75375);function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function w(e,t){e.addProjectBreadcrumbToCustomBreadcrumbs;var r=e.after,n=e.afterHeader,o=e.afterHidden,p=e.afterWidth,g=e.afterWidthOverride,w=e.appendBreadcrumbs,P=e.before,Z=e.beforeHeader,x=e.beforeWidth,_=e.breadcrumbs,A=e.children,M=e.contained,E=e.errors,k=e.headerMenuItems,D=e.headerOffset,C=e.hideAfterCompletely,B=e.mainContainerHeader,I=e.navigationItems,H=e.setAfterHidden,R=e.setAfterWidth,W=e.setBeforeWidth,S=e.setErrors,N=e.subheaderChildren,T=e.subheaderNoPadding,F=e.title,L=e.uuid,q=(0,y.Z)(L,{beforeResizeOffset:y.H,setWidthAfter:R,setWidthBefore:W,widthAfter:p,widthBefore:x,widthOverrideAfter:g}),Q=q.mainContainerRef,U=q.mousedownActiveAfter,z=q.mousedownActiveBefore,G=q.setMousedownActiveAfter,Y=q.setMousedownActiveBefore,V=q.setWidthAfter,X=q.setWidthBefore,J=q.widthAfter,K=q.widthBefore,$=(0,O.Z)().project,ee=[];return _&&ee.push.apply(ee,(0,i.Z)(_)),null!==_&&void 0!==_&&_.length&&!w||!$||null!==_&&void 0!==_&&_.length||ee.unshift({bold:!w,label:function(){return F}}),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(a.Z,{title:F}),(0,d.jsx)(f.Z,{breadcrumbs:ee,menuItems:k}),(0,d.jsxs)(l.Nk,{ref:t,children:[0!==(null===I||void 0===I?void 0:I.length)&&(0,d.jsx)(l.lm,{showMore:!0,children:(0,d.jsx)(b.Z,{navigationItems:I,showMore:!0})}),(0,d.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,d.jsxs)(v.Z,{after:r,afterHeader:n,afterHeightOffset:j.Mz,afterHidden:o,afterMousedownActive:U,afterWidth:J,before:P,beforeHeader:Z,beforeHeightOffset:j.Mz,beforeMousedownActive:z,beforeWidth:P?K:l.k1,contained:M,headerOffset:D,hideAfterCompletely:!r||C,leftOffset:P?l.k1:null,mainContainerHeader:B,mainContainerRef:Q,setAfterHidden:H,setAfterMousedownActive:G,setAfterWidth:V,setBeforeMousedownActive:Y,setBeforeWidth:X,children:[N&&(0,d.jsx)(h,{noPadding:T,children:N}),A]})})]}),E&&(0,d.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===S||void 0===S?void 0:S(null)},children:(0,d.jsx)(s.Z,m(m({},E),{},{onClose:function(){return null===S||void 0===S?void 0:S(null)}}))})]})}var P=o.forwardRef(w)},93808:function(e,t,r){"use strict";r.d(t,{Z:function(){return A}});var n=r(77837),i=r(26304),o=r(62243),u=r(29385),s=r(80022),c=r(13692),a=r(93189),f=r(15544),l=r(82394),d=r(38860),p=r.n(d),h=r(82684),v=r(56663),b=r.n(v),O=r(40761),j=r(34661),y=r(36105),g=r(50178),m=r(69419),w=r(28598),P=["auth"];function Z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach((function(t){(0,l.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.Z)(e);if(t){var i=(0,f.Z)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,a.Z)(this,r)}}function A(e){return function(t){(0,c.Z)(a,t);var r=_(a);function a(){var e;(0,o.Z)(this,a);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return e=r.call.apply(r,[this].concat(n)),(0,l.Z)((0,s.Z)(e),"state",{auth:new O.Z(e.props.token)}),e}return(0,u.Z)(a,[{key:"componentDidMount",value:function(){this.setState({auth:new O.Z(this.props.token)})}},{key:"render",value:function(){var t=this.props,r=(t.auth,(0,i.Z)(t,P));return(0,w.jsx)(e,x({auth:this.state.auth},r))}}],[{key:"getInitialProps",value:function(){var t=(0,n.Z)(p().mark((function t(r){var n,i,o,u,s,c,a,f,l;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=b()(r),i=(0,g.ex)(r),o=i.id,u=n[j.Mv],s=n[y.qt],c=new O.Z(u),a=x(x({},r),{},{auth:c,currentGroupId:o,theme:s}),(0,g.YB)(r)&&c.isExpired&&(console.log("OAuth token has expired."),f=x(x({},r.query),{},{redirect_url:r.asPath}),(0,m.nL)("/sign-in?".concat((0,m.uM)(f)),r.res)),!e.getInitialProps){t.next=12;break}return t.next=10,e.getInitialProps(a);case 10:return l=t.sent,t.abrupt("return",x(x({},l),{},{auth:c,currentGroupId:o,theme:s}));case 12:return t.abrupt("return",a);case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}]),a}(h.Component)}},78234:function(e,t,r){"use strict";r.r(t);var n=r(77837),i=r(82394),o=r(38860),u=r.n(o),s=r(82684),c=r(34376),a=r(94629),f=r(55072),l=r(27966),d=r(93808),p=r(82359),h=r(38276),v=r(4190),b=r(85544),O=r(35686),j=r(44265),y=r(70515),g=r(69419),m=r(86735),w=r(70320),P=r(28598);function Z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach((function(t){(0,i.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _(){var e=(0,c.useRouter)(),t=(0,s.useState)(null),r=t[0],n=t[1],o=(0,g.iV)(),u=null!==o&&void 0!==o&&o.page?o.page:0,d=(0,s.useMemo)((function(){return(0,g.DQ)(o,[j.P0.PIPELINE_UUID,j.P0.STATUS,j.P0.TAG])}),[o]),Z=O.ZP.projects.list().data,_=(0,s.useMemo)((function(){var e;return null===Z||void 0===Z||null===(e=Z.projects)||void 0===e?void 0:e[0]}),[Z]),A=((0,s.useMemo)((function(){var e;return(0,w.hY)(null===_||void 0===_||null===(e=_.features)||void 0===e?void 0:e[p.d.LOCAL_TIMEZONE])}),[null===_||void 0===_?void 0:_.features]),x(x({},d),{},{_limit:f.Q,_offset:u*f.Q,disable_retries_grouping:!0,include_pipeline_tags:!0,include_pipeline_uuids:!0}));null!==o&&void 0!==o&&o.status&&(A.status=o.status);var M=O.ZP.pipeline_runs.list(A,{refreshInterval:3e3,revalidateOnFocus:!0}),E=M.data,k=M.mutate,D=O.ZP.tags.list().data,C=(0,s.useMemo)((function(){return(0,m.YC)((null===D||void 0===D?void 0:D.tags)||[],(function(e){return e.uuid}))}),[D]),B=(0,s.useMemo)((function(){return(null===E||void 0===E?void 0:E.pipeline_runs)||[]}),[E]),I=(0,s.useMemo)((function(){var e;return(null===E||void 0===E||null===(e=E.metadata)||void 0===e?void 0:e.count)||[]}),[E]),H=(0,s.useMemo)((function(){var e;return(null===E||void 0===E||null===(e=E.metadata)||void 0===e?void 0:e.pipeline_uuids)||[]}),[E]),R=(0,s.useMemo)((function(){return(0,P.jsx)(b.Z,{filterOptions:{pipeline_tag:C.map((function(e){return e.uuid})),pipeline_uuid:H,status:j.hn},filterValueLabelMapping:{pipeline_tag:C.reduce((function(e,t){var r=t.uuid;return x(x({},e),{},(0,i.Z)({},r,r))}),{}),status:j.Do},onClickFilterDefaults:function(){e.push("/pipeline-runs")},query:d,resetPageOnFilterApply:!0})}),[H,e,C]);return(0,P.jsx)(a.Z,{errors:r,setErrors:n,subheaderChildren:R,title:"Pipeline runs",uuid:"pipeline_runs/index",children:E?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(l.Z,{fetchPipelineRuns:k,includePipelineTags:!0,pipelineRuns:B,setErrors:n}),(0,P.jsx)(h.Z,{p:2,children:(0,P.jsx)(f.ZP,{maxPages:f.Et,onUpdate:function(t){var r=Number(t),n=x(x({},o),{},{page:r>=0?r:0});e.push("/pipeline-runs","/pipeline-runs?".concat((0,g.uM)(n)))},page:Number(u),totalPages:Math.ceil(I/f.Q)})})]}):(0,P.jsx)(h.Z,{p:y.Mq,children:(0,P.jsx)(v.Z,{inverted:!0,large:!0})})})}_.getInitialProps=(0,n.Z)(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,d.Z)(_)},60710:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipeline-runs",function(){return r(78234)}])},80022:function(e,t,r){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{Z:function(){return n}})},15544:function(e,t,r){"use strict";function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}r.d(t,{Z:function(){return n}})},13692:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(61049);function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,n.Z)(e,t)}},93189:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(12539),i=r(80022);function o(e,t){if(t&&("object"===n(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}}},function(e){e.O(0,[1557,7966,5544,9774,2888,179],(function(){return t=60710,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6780],{74395:function(e,n,t){"use strict";t.d(n,{M:function(){return a},W:function(){return l}});var r=t(25976),i=t(46684),l=34*t(70515).iI,a=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},8955:function(e,n,t){"use strict";t.d(n,{G7:function(){return P},ZP:function(){return O},u$:function(){return x}});var r=t(75582),i=t(82394),l=t(26304),a=t(90299),c=t(9134),u=t(24138),s=t(38276),o=t(30160),d=t(75499),p=t(70515),f=t(16488),v=t(42122),b=t(28598),h=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var x=44,g={uuid:"Run details"},Z={uuid:"Dependency tree"},P=[Z,g];function O(e){var n=e.height,t=e.heightOffset,i=e.pipeline,m=e.selectedRun,O=e.selectedTab,y=e.setSelectedTab,k=j({},(0,l.Z)(e,h));m?k.blockStatus=(0,f.IJ)(null===m||void 0===m?void 0:m.block_runs):k.noStatus=!0;var _=(0,v.Kn)(null===m||void 0===m?void 0:m.variables)?j({},null===m||void 0===m?void 0:m.variables):(null===m||void 0===m?void 0:m.variables)||{},w=null===m||void 0===m?void 0:m.event_variables;if(w&&(0,v.Kn)(w)&&!(0,v.Qr)(w))if((0,v.Kn)(_)&&_.hasOwnProperty("event")){var S=(0,v.Kn)(_.event)?_.event:{};_.event=j(j({},S),w)}else _.event=j({},w);var I=[];_&&JSON.stringify(_,null,2).split("\n").forEach((function(e){I.push(" ".concat(e))}));var D=m&&[["Run ID",null===m||void 0===m?void 0:m.id],["Variables",(0,b.jsx)(c.Z,{language:"json",small:!0,source:I.join("\n")},"variable_value")]],C=m&&(0,b.jsx)(s.Z,{pb:p.cd,px:p.cd,children:(0,b.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:D.map((function(e,n){var t=(0,r.Z)(e,2),i=t[0],l=t[1];return[(0,b.jsx)(o.ZP,{monospace:!0,muted:!0,children:i},"key_".concat(n)),(0,b.jsx)(o.ZP,{monospace:!0,textOverflow:!0,children:l},"val_".concat(n))]})),uuid:"LogDetail"})}),E=O&&y;return(0,b.jsxs)(b.Fragment,{children:[E&&(0,b.jsx)(a.Z,{onClickTab:y,selectedTabUUID:null===O||void 0===O?void 0:O.uuid,tabs:P,underlineStyle:!0}),(!E||Z.uuid===(null===O||void 0===O?void 0:O.uuid))&&(0,b.jsx)(u.ZP,j(j({},k),{},{height:n,heightOffset:(t||0)+(E?x:0),pipeline:i})),g.uuid===(null===O||void 0===O?void 0:O.uuid)&&C]})}},8916:function(e,n,t){"use strict";t.d(n,{FS:function(){return s},JZ:function(){return p},Tt:function(){return d},e7:function(){return f},wx:function(){return o}});var r=t(75582),i=t(82394),l=t(83784),a=t(30229);function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e){return"string"===typeof e?e:JSON.stringify(e)}function o(e,n){var t,r;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(r=t.variables)||void 0===r?void 0:r.map((function(e){var n=e.value;return u(u({},e),{},{value:s(n)})}))}function d(e){var n;return null===(n=o(e,(function(e){return e.uuid===l.C})))||void 0===n?void 0:n.reduce((function(e,n){var t=n.uuid,r=n.value;return u(u({},e),{},(0,i.Z)({},t,r))}),{})}function p(e,n){return n===a.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===a.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function f(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),l=t[0],a=t[1],c=a;try{c=JSON.parse(a)}catch(s){}return u(u({},e),{},(0,i.Z)({},l,c))}),{}):e}},88785:function(e,n,t){"use strict";t.d(n,{J:function(){return u},U:function(){return c}});var r=t(25976),i=t(44897),l=t(42631),a=t(70515),c=r.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],l.TR,14*a.iI,a.cd*a.iI,a.cd*a.iI,40*a.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||i.Z.interactive).linkPrimary,";\n ")})),u=r.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],l.n_,a.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*a.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*a.iI,"px;\n ")}))},37899:function(e,n,t){"use strict";var r=t(82394),i=t(75582),l=t(82684),a=t(71180),c=t(15338),u=t(97618),s=t(55485),o=t(38276),d=t(75499),p=t(30160),f=t(35576),v=t(17488),b=t(72473),h=t(70515),m=t(42122),j=t(81728),x=t(28598);function g(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?g(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){e.borderless,e.compact;var n=e.enableVariablesOverwrite,t=e.originalVariables,g=e.runtimeVariables,P=(e.setEnableVariablesOverwrite,e.setRuntimeVariables),O=(0,l.useState)({}),y=O[0],k=O[1],_=(0,l.useState)(null),w=_[0],S=_[1],I=(0,l.useState)(null),D=I[0],C=I[1];(0,l.useEffect)((function(){var e=Object.entries(g||{}).reduce((function(e,n){var t=(0,i.Z)(n,2),l=t[0],a=t[1],c=(0,j.Pb)(a)&&"object"===typeof JSON.parse(a)&&!Array.isArray(JSON.parse(a))&&null!==JSON.parse(a);return Z(Z({},e),{},(0,r.Z)({},l,c))}),{});k(e)}),[]);var E=function(e,n){var t={borderless:!0,key:"variable_uuid_input_".concat(e),monospace:!0,onChange:function(n){n.preventDefault(),P((function(t){return Z(Z({},t),{},(0,r.Z)({},e,n.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:n};return y[e]?(0,x.jsx)(f.Z,Z(Z({},t),{},{rows:1,value:n})):(0,x.jsx)(v.Z,Z({},t))};return(0,x.jsxs)(x.Fragment,{children:[n&&g&&Object.entries(g).length>0&&(0,x.jsx)(d.Z,{columnFlex:[null,1,null],columns:[{uuid:"Variable"},{uuid:"Value"},{label:function(){return""},uuid:"Action"}],rows:Object.entries(g).map((function(e){var n=(0,i.Z)(e,2),r=n[0],l=n[1];return[(0,x.jsx)(p.ZP,{default:!0,monospace:!0,children:r},"variable_".concat(r)),E(r,l),!(null!==t&&void 0!==t&&t[r])&&(0,x.jsx)(a.ZP,{iconOnly:!0,onClick:function(){P((function(e){return(0,m.gR)(e,[r])}))},children:(0,x.jsx)(b.Trash,{default:!0})})]}))}),(0,x.jsx)(o.Z,{p:h.cd,children:(0,x.jsxs)(s.ZP,{alignItems:"center",children:[(0,x.jsx)(u.Z,{flex:1,children:(0,x.jsx)(v.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return S(e.target.value)},placeholder:"New variable UUID",value:w||""})}),(0,x.jsx)(o.Z,{mr:1}),(0,x.jsx)(u.Z,{flex:1,children:(0,x.jsx)(v.Z,{fullWidth:!0,monospace:!0,onChange:function(e){return C(e.target.value)},placeholder:"Variable value",value:D||""})}),(0,x.jsx)(o.Z,{mr:1}),(0,x.jsx)(a.ZP,{beforeIcon:(0,x.jsx)(b.Add,{}),disabled:!w||!D,onClick:function(){P((function(e){return Z(Z({},e),{},(0,r.Z)({},w,D))})),S(null),C(null)},children:"Add runtime variable"})]})}),(0,x.jsx)(c.Z,{light:!0})]})}},55072:function(e,n,t){"use strict";t.d(n,{Et:function(){return p},Q:function(){return d}});t(82684);var r=t(71180),i=t(55485),l=t(38276),a=t(31748),c=t(72473),u=t(79633),s=t(70515),o=t(28598),d=30,p=9;n.ZP=function(e){var n=e.page,t=e.maxPages,d=e.onUpdate,p=e.totalPages,f=[],v=t;if(v>p)f=Array.from({length:p},(function(e,n){return n}));else{var b=Math.floor(v/2),h=n-b;n+b>=p?(h=p-v+2,v-=2):n-b<=0?(h=0,v-=2):(v-=4,h=n-Math.floor(v/2)),f=Array.from({length:v},(function(e,n){return n+h}))}return(0,o.jsx)(o.Fragment,{children:p>0&&(0,o.jsxs)(i.ZP,{alignItems:"center",children:[(0,o.jsx)(r.ZP,{disabled:0===n,onClick:function(){return d(n-1)},children:(0,o.jsx)(c.PaginateArrowLeft,{size:1.5*s.iI,stroke:a.Av})}),!f.includes(0)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(l.Z,{ml:1,children:(0,o.jsx)(r.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return d(0)},children:1})},0),!f.includes(1)&&(0,o.jsx)(l.Z,{ml:1,children:(0,o.jsx)(r.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0)]}),f.map((function(e){return(0,o.jsx)(l.Z,{ml:1,children:(0,o.jsx)(r.ZP,{backgroundColor:e===n&&u.a$,borderLess:!0,noBackground:!0,notClickable:e===n,onClick:function(){e!==n&&d(e)},children:e+1})},e)})),!f.includes(p-1)&&(0,o.jsxs)(o.Fragment,{children:[!f.includes(p-2)&&(0,o.jsx)(l.Z,{ml:1,children:(0,o.jsx)(r.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0),(0,o.jsx)(l.Z,{ml:1,children:(0,o.jsx)(r.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return d(p-1)},children:p})},p-1)]}),(0,o.jsx)(l.Z,{ml:1}),(0,o.jsx)(r.ZP,{disabled:n===p-1,onClick:function(){return d(n+1)},children:(0,o.jsx)(c.PaginateArrowRight,{size:1.5*s.iI,stroke:a.Av})})]})})}},83641:function(e,n,t){"use strict";t.d(n,{I7:function(){return r},IB:function(){return u},VV:function(){return l},_7:function(){return a},rn:function(){return c}});var r,i=t(41143),l="datetime",a="code",c=i.V;!function(e){e.SECOND="second",e.MINUTE="minute",e.HOUR="hour",e.DAY="day",e.WEEK="week",e.MONTH="month",e.YEAR="year",e.CUSTOM="custom"}(r||(r={}));var u=[r.MINUTE,r.HOUR,r.DAY,r.WEEK,r.MONTH,r.YEAR]},83784:function(e,n,t){"use strict";t.d(n,{C:function(){return r}});var r="global"},14805:function(e,n,t){"use strict";var r=t(82394),i=t(44495),l=t(55485),a=t(44085),c=t(38276),u=t(30160),s=t(88785),o=t(70515),d=t(86735),p=t(28598);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function v(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.localTime,t=e.selectedDate,r=e.selectedTime,f=e.setSelectedDate,b=e.setSelectedTime,h=e.topPosition;return(0,p.jsxs)(s.J,{absolute:!0,topPosition:h,children:[(0,p.jsx)(i.ZP,{onChange:f,value:t}),(0,p.jsx)(c.Z,{mb:2}),(0,p.jsxs)(l.ZP,{alignItems:"center",children:[(0,p.jsxs)(u.ZP,{default:!0,large:!0,children:["Time (",n?"Local":"UTC","):"]}),(0,p.jsx)(c.Z,{pr:2}),(0,p.jsx)(a.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),b((function(n){return v(v({},n),{},{hour:e.target.value})}))},paddingRight:5*o.iI,placeholder:"HH",value:null===r||void 0===r?void 0:r.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(c.Z,{px:1,children:(0,p.jsx)(u.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(a.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),b((function(n){return v(v({},n),{},{minute:e.target.value})}))},paddingRight:5*o.iI,placeholder:"MM",value:null===r||void 0===r?void 0:r.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},79500:function(e,n,t){"use strict";t.d(n,{a:function(){return l}});var r=t(16488),i=t(3917);function l(e,n){var t,l;if(null!==n&&void 0!==n&&n.localTimezone)t=(0,i.n$)(e),l={hour:(0,i.lJ)(String(t.getHours())),minute:(0,i.lJ)(String(t.getMinutes()))};else{var a=e.split(" ")[1];t=(0,r.eI)(e),l={hour:a.substring(0,2),minute:a.substring(3,5)}}return{date:t,time:l}}},9134:function(e,n,t){"use strict";var r=t(82684),i=t(21124),l=t(68432),a=t(25976),c=t(65292),u=t(44897),s=t(95363),o=t(70515),d=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,p=e.showLineNumbers,f=e.small,v=e.source,b=e.wrapLines,h=(0,r.useContext)(a.ThemeContext);function m(e){var r=e.value;return(0,d.jsx)(l.Z,{customStyle:{backgroundColor:(h.background||u.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:s.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,maxWidth:t,paddingBottom:2*o.iI,paddingTop:2*o.iI},language:n,lineNumberStyle:{color:(h.content||u.Z.content).muted},showLineNumbers:p,style:c._4,useInlineStyles:!0,wrapLines:b,children:r})}return(0,d.jsx)(i.D,{components:{code:function(e){var n=e.children;return(0,d.jsx)(m,{value:n})}},children:v})}},51532:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return de}});var r=t(75582),i=t(77837),l=t(82394),a=t(38860),c=t.n(a),u=t(82684),s=t(69864),o=t(34376),d=t(83641),p=t(71180),f=t(15338),v=t(55485),b=t(85854),h=t(55072),m=t(75457),j=t(27966),x=t(44265),g=t(83784),Z=t(44085),P=t(38276),O=t(4190),y=t(75499),k=t(30160),_=t(12468),w=t(35686),S=t(8955),I=t(72473),D=t(74395),C=t(72191),E=t(70515),T=t(28795),M=t(81728),N=t(16488),A=t(8916),F=t(81655),L=t(15610),V=t(42122),R=t(50178),B=t(72619),U=t(95924),H=t(69419),z=t(70320),J=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 K(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,l.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}var W=function(e){var n=e.backfill,t=e.errors,i=e.fetchBackfill,l=e.pipeline,a=e.setErrors,c=e.variables,Y=(0,R.Ct)(),W=(0,z.qB)(),X=(0,o.useRouter)(),Q=n||{},q=Q.block_uuid,G=Q.end_datetime,$=Q.id,ee=Q.interval_type,ne=Q.interval_units,te=Q.name,re=Q.pipeline_run_dates,ie=Q.start_datetime,le=Q.started_at,ae=Q.status,ce=Q.total_run_count,ue=Q.variables,se=void 0===ue?{}:ue,oe=l.uuid,de=(0,H.iV)(),pe={_limit:40,_offset:40*(null!==de&&void 0!==de&&de.page?de.page:0)};null!==de&&void 0!==de&&de.status&&(pe.status=de.status);var fe=w.ZP.pipeline_runs.list(K(K({},pe),{},{backfill_id:$}),{refreshInterval:3e3,revalidateOnFocus:!0},{pauseFetch:!$}),ve=fe.data,be=fe.mutate,he=!(ie&&G&&ee&&ne),me=!ae,je=(0,u.useMemo)((function(){return(me?re:null===ve||void 0===ve?void 0:ve.pipeline_runs)||[]}),[ve,re,me]),xe=(0,u.useMemo)((function(){var e;return me?ce:null===ve||void 0===ve||null===(e=ve.metadata)||void 0===e?void 0:e.count}),[ve,me,ce]),ge=(0,u.useState)(null),Ze=ge[0],Pe=ge[1],Oe=(0,u.useMemo)((function(){var e=null!==de&&void 0!==de&&de.page?de.page:0;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(j.Z,{disableRowSelect:me,emptyMessage:null!==de&&void 0!==de&&de.status||ae?"No runs available":'No runs available. Please complete backfill configuration by clicking "Edit backfill" above.',fetchPipelineRuns:be,hidePipelineColumn:!0,onClickRow:function(e){return Pe((function(n){var t=je[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:je,selectedRun:Ze,setErrors:a,setSelectedRun:Pe}),(0,J.jsx)(P.Z,{p:2,children:(0,J.jsx)(h.ZP,{maxPages:9,onUpdate:function(e){var n=Number(e),t=K(K({},de),{},{page:n>=0?n:0});X.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(oe,"/backfills/").concat($,"?").concat((0,H.uM)(t)))},page:Number(e),totalPages:Math.ceil(xe/40)})})]})}),[be,$,je,oe,de,X,Ze,a,me,ae,xe]),ye=(0,u.useState)(S.G7[0]),ke=ye[0],_e=ye[1],we=(0,s.Db)(w.ZP.backfills.useUpdate($),{onSuccess:function(e){return(0,B.wD)(e,{callback:function(){i(),be()},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),Se=(0,r.Z)(we,2),Ie=Se[0],De=Se[1].isLoading,Ce=(0,u.useMemo)((function(){return!!ae&&(d.rn.CANCELLED!==ae&&d.rn.FAILED!==ae)}),[ae]),Ee=(0,u.useMemo)((function(){return ae&&d.rn.CANCELLED!==ae&&d.rn.FAILED!==ae&&d.rn.INITIAL!==ae&&d.rn.RUNNING!==ae}),[ae]),Te=(0,u.useMemo)((function(){var e={default:!0,size:1.5*E.iI},n=[[(0,J.jsxs)(v.ZP,{alignItems:"center",children:[(0,J.jsx)(I.MultiShare,K({},e)),(0,J.jsx)(P.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Backfill type"})]},"backfill_type_label"),(0,J.jsx)(k.ZP,{monospace:!0,children:q?d._7:d.VV},"backfill_type")],[(0,J.jsxs)(v.ZP,{alignItems:"center",children:[(0,J.jsx)(I.Switch,K({},e)),(0,J.jsx)(P.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Status"})]},"backfill_status_label"),(0,u.createElement)(k.ZP,K(K({},(0,F.NC)(ae)),{},{key:"backfill_status"}),ae||"inactive")]];return q||n.push.apply(n,[[(0,J.jsxs)(v.ZP,{alignItems:"center",children:[(0,J.jsx)(I.CalendarDate,K({},e)),(0,J.jsx)(P.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Start date and time"})]},"backfill_start_date_label"),(0,J.jsx)(k.ZP,{monospace:!0,small:!0,children:(0,N.Uc)(ie,W)},"backfill_start_date")],[(0,J.jsxs)(v.ZP,{alignItems:"center",children:[(0,J.jsx)(I.CalendarDate,K({},e)),(0,J.jsx)(P.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"End date and time"})]},"backfill_end_date_label"),(0,J.jsx)(k.ZP,{monospace:!0,small:!0,children:(0,N.Uc)(G,W)},"backfill_end_date")],[(0,J.jsxs)(v.ZP,{alignItems:"center",children:[(0,J.jsx)(I.Schedule,K({},e)),(0,J.jsx)(P.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Interval type"})]},"interval_type_label"),(0,J.jsx)(k.ZP,{monospace:!0,children:ee&&(0,M.kC)(ee)},"interval_type")],[(0,J.jsxs)(v.ZP,{alignItems:"center",children:[(0,J.jsx)(I.Schedule,K({},e)),(0,J.jsx)(P.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Interval units"})]},"interval_units_label"),(0,J.jsx)(k.ZP,{monospace:!0,children:ne},"interval_units")],[(0,J.jsxs)(v.ZP,{alignItems:"center",children:[(0,J.jsx)(I.NumberHash,K({},e)),(0,J.jsx)(P.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Total runs"}),(0,J.jsx)(P.Z,{mr:1}),(0,J.jsx)(_.Z,{default:!0,label:"This count does not include retries.",size:C.gt,widthFitContent:!0})]},"total_runs_label"),(0,J.jsx)(k.ZP,{monospace:!0,children:ce},"total_runs")]]),(0,J.jsx)(y.Z,{columnFlex:[null,1],rows:n})}),[q,W,G,ee,ne,ie,ae,ce]),Me=(0,u.useMemo)((function(){return se||{}}),[se]),Ne=(0,u.useMemo)((function(){var e=(0,A.wx)(c,(function(e){return e.uuid===g.C}))||[];return(0,V.Qr)(Me)||Object.entries(Me).forEach((function(n){var t=(0,r.Z)(n,2),i=t[0],l=t[1],a=e.findIndex((function(e){return(null===e||void 0===e?void 0:e.uuid)===i}));-1!==a?e.splice(a,1,{uuid:i,value:(0,A.FS)(l)}):e.push({uuid:i,value:(0,A.FS)(l)})})),"undefined"!==typeof e&&null!==e&&void 0!==e&&e.length?(0,J.jsx)(y.Z,{columnFlex:[null,1],rows:e.map((function(e){var n=e.uuid,t=e.value;return[(0,J.jsx)(k.ZP,{default:!0,monospace:!0,small:!0,children:n},"settings_variable_label_".concat(n)),(0,J.jsx)(k.ZP,{monospace:!0,small:!0,children:t},"settings_variable_".concat(n))]}))}):null}),[Me,c]);return(0,J.jsx)(J.Fragment,{children:(0,J.jsxs)(m.Z,{afterHidden:!Ze,before:(0,J.jsxs)(D.M,{children:[(0,J.jsxs)(P.Z,{mb:E.HN,pt:E.cd,px:E.cd,children:[(0,J.jsx)(P.Z,{mb:E.cd,children:(0,J.jsx)(I.Backfill,{size:5*E.iI})}),(0,J.jsx)(b.Z,{children:te})]}),(0,J.jsx)(P.Z,{px:E.cd,children:(0,J.jsx)(b.Z,{level:5,children:"Settings"})}),(0,J.jsx)(f.Z,{light:!0,mt:1,short:!0}),Te,Ne&&(0,J.jsxs)(P.Z,{my:E.HN,children:[(0,J.jsx)(P.Z,{px:E.cd,children:(0,J.jsx)(b.Z,{level:5,children:"Runtime variables"})}),(0,J.jsx)(f.Z,{light:!0,mt:1,short:!0}),Ne]})]}),beforeWidth:34*E.iI,breadcrumbs:[{label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(oe,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{label:function(){return te},linkProps:{as:"/pipelines/".concat(oe,"/backfills/").concat($),href:"/pipelines/[pipeline]/backfills/[...slug]"}}],buildSidekick:function(e){return(0,S.ZP)(K(K({},e),{},{selectedRun:Ze,selectedTab:ke,setSelectedTab:_e}))},errors:t,pageName:T.M.BACKFILLS,pipeline:l,setErrors:a,subheader:(0,J.jsxs)(v.ZP,{alignItems:"center",children:[!Ee&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(p.ZP,{beforeIcon:Ce?(0,J.jsx)(I.Pause,{size:2*E.iI}):(0,J.jsx)(I.PlayButtonFilled,{inverted:!(d.rn.CANCELLED===ae||d.rn.FAILED===ae),size:2*E.iI}),danger:Ce,disabled:he,loading:De,onClick:function(e){(0,U.j)(e),Ie({backfill:{status:Ce?d.rn.CANCELLED:d.rn.INITIAL}})},outline:!0,success:!Ce&&!(d.rn.CANCELLED===ae||d.rn.FAILED===ae)&&!he,children:Ce?"Cancel backfill":d.rn.CANCELLED===ae||d.rn.FAILED===ae?"Retry backfill":"Start backfill"}),(0,J.jsx)(P.Z,{mr:E.cd})]}),!Y&&!le&&(0,J.jsx)(p.ZP,{linkProps:{as:"/pipelines/".concat(oe,"/backfills/").concat($,"/edit"),href:"/pipelines/[pipeline]/backfills/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,title:"Backfills cannot be edited once they've been started.",children:"Edit backfill"}),!me&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(k.ZP,{bold:!0,default:!0,large:!0,children:"Filter runs by status:"}),(0,J.jsx)(P.Z,{mr:E.cd}),(0,J.jsxs)(Z.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?X.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(oe,"/backfills/").concat($)):(0,L.u)({page:0,status:e.target.value})},paddingRight:4*E.iI,placeholder:"Select run status",value:(null===de||void 0===de?void 0:de.status)||"all",children:[(0,J.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),x.IK.map((function(e){return(0,J.jsx)("option",{value:e,children:x.Do[e]},e)}))]})]})]}),title:function(){return te},uuid:"backfill/detail",children:[(0,J.jsx)(P.Z,{mt:E.cd,px:E.cd,children:(0,J.jsx)(b.Z,{level:5,children:"Runs for this backfill"})}),(0,J.jsx)(f.Z,{light:!0,mt:E.cd,short:!0}),ve?Oe:(0,J.jsx)(P.Z,{m:2,children:(0,J.jsx)(O.Z,{inverted:!0})})]})})},X=t(14805),Q=t(50724),q=t(97618),G=t(37899),$=t(17488),ee=[{label:function(){return"Date and time window"},description:function(){return"Backfill between a date and time range."},uuid:d.VV}],ne=t(88785),te=t(79500);function re(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 ie(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?re(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):re(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var le=function(e){var n=e.backfill,t=e.errors,i=e.fetchBackfill,l=e.pipeline,a=e.setErrors,c=e.variables,h=(0,o.useRouter)(),j=(0,z.qB)(),x=(0,u.useState)(),g=x[0],O=x[1],_=(0,u.useState)(),S=_[0],D=_[1],C=g||{},F=C.block_uuid,L=C.id,R=C.interval_type,U=C.interval_units,H=C.name,Y=l.uuid,K=(0,u.useMemo)((function(){return(0,V.Qr)((null===n||void 0===n?void 0:n.variables)||{})?(0,A.Tt)(c)||{}:(0,V.Xc)(n.variables,(function(e){return(0,A.FS)(e)}))}),[null===n||void 0===n?void 0:n.variables,c]),W=(0,u.useState)(!0),re=W[0],le=W[1],ae=(0,u.useState)(K),ce=ae[0],ue=ae[1],se=(0,u.useState)(F?d._7:d.VV),oe=se[0],de=se[1],pe=(0,u.useState)(!1),fe=pe[0],ve=pe[1],be=(0,u.useState)(!1),he=be[0],me=be[1],je=(0,u.useState)(null),xe=je[0],ge=je[1],Ze=(0,u.useState)(null),Pe=Ze[0],Oe=Ze[1],ye=(0,u.useState)({hour:"00",minute:"00"}),ke=ye[0],_e=ye[1],we=(0,u.useState)({hour:"00",minute:"00"}),Se=we[0],Ie=we[1];(0,u.useEffect)((function(){if(n){O(n);var e=n.start_datetime;if(e){var t=(0,te.a)(e,{localTimezone:j});Oe(null===t||void 0===t?void 0:t.date),Ie(t.time)}var r=n.end_datetime;if(r){var i=(0,te.a)(r,{localTimezone:j});ge(null===i||void 0===i?void 0:i.date),_e(null===i||void 0===i?void 0:i.time)}}}),[j,n]),(0,u.useEffect)((function(){!S&&null!==g&&void 0!==g&&g.settings&&D(g.settings)}),[S,null===g||void 0===g?void 0:g.settings]);var De=(0,u.useMemo)((function(){var e=[[(0,J.jsxs)(v.ZP,{alignItems:"center",children:[(0,J.jsx)(I.Alphabet,{default:!0}),(0,J.jsx)(P.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Backfill name"})]},"model_name_detail"),(0,J.jsx)($.Z,{monospace:!0,onChange:function(e){e.preventDefault(),O((function(n){return ie(ie({},n),{},{name:e.target.value})}))},placeholder:"Name this backfill",value:H},"model_name_input_detail")]];return d.VV===oe&&e.push.apply(e,[[(0,J.jsxs)(v.ZP,{alignItems:"center",children:[(0,J.jsx)(I.CalendarDate,{default:!0}),(0,J.jsx)(P.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,J.jsxs)("div",{style:{minHeight:"".concat(5.75*E.iI,"px")},children:[!fe&&(0,J.jsx)($.Z,{monospace:!0,onClick:function(){return ve((function(e){return!e}))},onFocus:function(){return ve(!0)},placeholder:"YYYY-MM-DD HH:MM",value:Pe?(0,N.XM)(Pe,Se,{localTimezone:j}):""}),(0,J.jsx)("div",{style:{width:"400px"},children:(0,J.jsx)(Q.Z,{disableEscape:!0,onClickOutside:function(){return ve(!1)},open:fe,style:{position:"relative"},children:(0,J.jsx)(X.Z,{localTime:j,selectedDate:Pe,selectedTime:Se,setSelectedDate:Oe,setSelectedTime:Ie,topPosition:!0})})})]},"start_time_input")],[(0,J.jsxs)(v.ZP,{alignItems:"center",children:[(0,J.jsx)(I.CalendarDate,{default:!0}),(0,J.jsx)(P.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"End date and time"})]},"end_time"),(0,J.jsxs)("div",{style:{minHeight:"".concat(5.75*E.iI,"px")},children:[!he&&(0,J.jsx)($.Z,{monospace:!0,onClick:function(){return me((function(e){return!e}))},onFocus:function(){return me(!0)},placeholder:"YYYY-MM-DD HH:MM",value:xe?(0,N.XM)(xe,ke,{localTimezone:j}):""}),(0,J.jsx)("div",{style:{width:"400px"},children:(0,J.jsx)(Q.Z,{disableEscape:!0,onClickOutside:function(){return me(!1)},open:he,style:{position:"relative"},children:(0,J.jsx)(X.Z,{localTime:j,selectedDate:xe,selectedTime:ke,setSelectedDate:ge,setSelectedTime:_e,topPosition:!0})})})]},"end_time_input")],[(0,J.jsxs)(v.ZP,{alignItems:"center",children:[(0,J.jsx)(I.Schedule,{default:!0}),(0,J.jsx)(P.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Interval type"})]},"interval_type"),(0,J.jsx)(Z.Z,{monospace:!0,onChange:function(e){e.preventDefault(),O((function(n){return ie(ie({},n),{},{interval_type:e.target.value})}))},placeholder:"Time spacing between each backfill",value:R,children:d.IB.map((function(e){return(0,J.jsx)("option",{value:e,children:(0,M.kC)(e)},e)}))},"interval_type_input")],[(0,J.jsxs)(v.ZP,{alignItems:"center",children:[(0,J.jsx)(I.Schedule,{default:!0}),(0,J.jsx)(P.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Interval units"})]},"interval_units"),(0,J.jsx)($.Z,{disabled:!R,minValue:1,monospace:!0,onChange:function(e){e.preventDefault();var n=+e.target.value;O((function(e){return ie(ie({},e),{},{interval_units:n<1?1:n})}))},placeholder:R?"Number of ".concat(R).concat(R!==d.I7.CUSTOM?"s":""," between each backfill"):"Interval type is required",type:"number",value:U},"interval_unit_input")]]),(0,V.Qr)(K)||e.push([(0,J.jsxs)(v.ZP,{alignItems:"center",children:[(0,J.jsx)(I.Variables,{default:!0}),(0,J.jsx)(P.Z,{mr:1}),(0,J.jsx)(k.ZP,{default:!0,children:"Runtime variables"})]},"overwrite_runtime_variables"),(0,J.jsx)(G.Z,{borderless:!0,compact:!0,enableVariablesOverwrite:re,runtimeVariables:ce,setEnableVariablesOverwrite:le,setRuntimeVariables:ue},"overwrite_runtime_variables_table")]),e.push([(0,J.jsx)(v.ZP,{alignItems:"center",children:(0,J.jsx)(k.ZP,{default:!0,children:"Max concurrent runs"})},"concurrency"),(0,J.jsx)($.Z,{minValue:1,monospace:!0,onChange:function(e){e.preventDefault(),D((function(n){return ie(ie({},n),{},{pipeline_run_limit:e.target.value})}))},type:"number",value:null===S||void 0===S?void 0:S.pipeline_run_limit},"concurrency_input")]),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(P.Z,{mb:2,px:E.cd,children:(0,J.jsx)(b.Z,{children:"Settings"})}),(0,J.jsx)(f.Z,{light:!0,short:!0}),(0,J.jsx)(y.Z,{columnFlex:[null,1],rows:e})]})}),[xe,Pe,j,re,R,U,H,ce,K,null===S||void 0===S?void 0:S.pipeline_run_limit,oe,fe,he,ke,Se]),Ce=(0,s.Db)(w.ZP.backfills.useUpdate(L),{onSuccess:function(e){return(0,B.wD)(e,{callback:function(){i(),h.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(Y,"/backfills/").concat(L))},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),Ee=(0,r.Z)(Ce,2),Te=Ee[0],Me=Ee[1].isLoading,Ne=(0,u.useCallback)((function(){var e=ie(ie({},(0,V.GL)(g,["name"])),{},{end_datetime:null,interval_type:null,interval_units:null,settings:S,start_datetime:null,variables:re?(0,A.e7)(ce):{}});return d._7===oe||(e.interval_type=R,e.interval_units=U,e.end_datetime=xe&&null!==ke&&void 0!==ke&&ke.hour&&null!==ke&&void 0!==ke&&ke.minute?(0,N.XM)(xe,ke,{convertToUtc:j,includeSeconds:!0,localTimezone:j}):null,e.start_datetime=Pe&&null!==Se&&void 0!==Se&&Se.hour&&null!==Se&&void 0!==Se&&Se.minute?(0,N.XM)(Pe,Se,{convertToUtc:j,includeSeconds:!0,localTimezone:j}):null),Te({backfill:e})}),[xe,Pe,j,re,R,U,g,ce,S,oe,ke,Se,Te]),Ae=(0,u.useMemo)((function(){return d._7===oe?!F:!(xe&&Pe&&R&&U)}),[F,xe,Pe,R,U,oe]);return(0,J.jsxs)(m.Z,{breadcrumbs:[{label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(Y,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{label:function(){return null===g||void 0===g?void 0:g.name},linkProps:{as:"/pipelines/".concat(Y,"/backfills/").concat(L),href:"/pipelines/[pipeline]/backfills/[...slug]"}}],errors:t,pageName:T.M.BACKFILLS,pipeline:l,setErrors:a,subheader:(0,J.jsxs)(v.ZP,{alignItems:"center",children:[(0,J.jsx)(p.ZP,{disabled:Ae,loading:Me,onClick:Ne,outline:!0,primary:!0,children:"Save changes"}),(0,J.jsx)(P.Z,{mr:1}),(0,J.jsx)(p.ZP,{linkProps:{href:"/pipelines/[pipeline]/backfills/[...slug]",as:"/pipelines/".concat(Y,"/backfills/").concat(L)},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"})]}),title:function(){return"Edit ".concat(null===g||void 0===g?void 0:g.name)},uuid:"backfill/edit",children:[(0,J.jsxs)(P.Z,{p:E.cd,children:[(0,J.jsxs)(P.Z,{mb:2,children:[(0,J.jsx)(b.Z,{children:"Backfill type"}),(0,J.jsx)(k.ZP,{muted:!0,children:"How would you like this pipeline to be backfilled?"})]}),(0,J.jsx)(v.ZP,{children:ee.map((function(e){var n=e.label,t=e.description,r=e.uuid,i=oe===r,l=oe&&!i;return(0,J.jsx)(p.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){de(r)},children:(0,J.jsx)(ne.U,{selected:i,children:(0,J.jsxs)(v.ZP,{alignItems:"center",children:[(0,J.jsx)(q.Z,{children:(0,J.jsx)("input",{checked:i,type:"radio"})}),(0,J.jsx)(P.Z,{mr:E.cd}),(0,J.jsxs)(q.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,J.jsx)(b.Z,{bold:!0,default:!i&&!l,level:5,muted:!i&&l,children:n()}),(0,J.jsx)(k.ZP,{default:!i&&!l,leftAligned:!0,muted:l,children:t()})]})]})})},r)}))})]}),(0,J.jsx)(P.Z,{mt:5,children:De})]})},ae=t(93808),ce=t(98464);function ue(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 se(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ue(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ue(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function oe(e){var n=e.backfillId,t=e.pipelineUUID,r=e.subpath,i=(0,u.useState)(null),l=i[0],a=i[1],c=w.ZP.variables.pipelines.list(t,{},{revalidateOnFocus:!1}).data,s=(0,u.useMemo)((function(){return null===c||void 0===c?void 0:c.variables}),[c]),o=w.ZP.pipelines.detail(t,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,d=(0,u.useMemo)((function(){return se(se({},null===o||void 0===o?void 0:o.pipeline),{},{uuid:t})}),[o,t]),p=(0,H.iV)(),f={_limit:40,_offset:40*(null!==p&&void 0!==p&&p.page?p.page:0),include_preview_runs:!0},v=w.ZP.backfills.detail(n,se({},f),{revalidateOnFocus:!0}),b=v.data,h=v.mutate,m=(0,u.useMemo)((function(){return null===b||void 0===b?void 0:b.backfill}),[b]),j=(0,ce.Z)(p);return(0,u.useEffect)((function(){(null===j||void 0===j?void 0:j.page)!==(null===p||void 0===p?void 0:p.page)&&h()}),[h,p,j]),"edit"===r?(0,J.jsx)(le,{backfill:m,errors:l,fetchBackfill:h,pipeline:d,setErrors:a,variables:s}):(0,J.jsx)(W,{backfill:m,errors:l,fetchBackfill:h,pipeline:d,setErrors:a,variables:s})}oe.getInitialProps=function(){var e=(0,i.Z)(c().mark((function e(n){var t,i,l,a,u,s;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.query,i=t.pipeline,l=t.slug,!Array.isArray(l)){e.next=4;break}return a=(0,r.Z)(l,2),u=a[0],s=a[1],e.abrupt("return",{backfillId:u,pipelineUUID:i,subpath:s});case 4:return e.abrupt("return",{pipelineUUID:i});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var de=(0,ae.Z)(oe)},53664:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/backfills/[...slug]",function(){return t(51532)}])}},function(e){e.O(0,[9161,7674,1557,3782,7966,9774,2888,179],(function(){return n=53664,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8450],{16488:function(e,n,t){"use strict";t.d(n,{IJ:function(){return b},M8:function(){return P},Uc:function(){return k},XM:function(){return g},_U:function(){return v},eI:function(){return _},gU:function(){return y},lO:function(){return C},ri:function(){return O},tL:function(){return E},vJ:function(){return j},xH:function(){return h}});var r,i=t(82394),u=t(92083),c=t.n(u),l=t(3917),o=t(4383),a=t(30229),s=t(42122),f=t(86735);function d(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function p(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?d(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var v=function(e){return!!e&&!Object.values(a.U5).includes(e)};function b(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var t=n.block_uuid,r=n.completed_at,u=n.started_at,l=n.status,o=null;u&&r&&(o=c()(r).valueOf()-c()(u).valueOf());return p(p({},e),{},(0,i.Z)({},t,{runtime:o,status:l}))}),{})}var m,O=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:a.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:a.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:a.Xm.API}];return e?n.slice(0,1):n};function h(e){var n=(0,s.gR)(e,[a.gm.INTERVAL,a.gm.TYPE]),t=e[a.gm.INTERVAL];t&&(n["schedule_interval[]"]=encodeURIComponent(t));var r=e[a.gm.TYPE];return r&&(n["schedule_type[]"]=r),n}function _(e){return e?new Date(c()(e).valueOf()):null}function k(e,n){return n?(0,l.XG)(e,n):function(e){if("string"!==typeof e)return e;var n=e.split("+")[0];return c()(_(n)).format(l.Nx)}(e)}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(m||(m={}));var E=(r={},(0,i.Z)(r,m.DAY,86400),(0,i.Z)(r,m.HOUR,3600),(0,i.Z)(r,m.MINUTE,60),(0,i.Z)(r,m.SECOND,1),r);function y(e){var n=m.SECOND,t=e;return e%86400===0?(t/=86400,n=m.DAY):e%3600===0?(t/=3600,n=m.HOUR):e%60===0&&(t/=60,n=m.MINUTE),{time:t,unit:n}}function j(e,n){return e*E[n]}function g(e,n,t){var r,i=c()(e);return i.set("hour",+(null===n||void 0===n?void 0:n.hour)||0),i.set("minute",+(null===n||void 0===n?void 0:n.minute)||0),i.set("second",0),r=i.format(l.TD),null!==t&&void 0!==t&&t.includeSeconds&&(r=r.concat(":00")),null!==t&&void 0!==t&&t.localTimezone&&(r=i.format(l.lE),null!==t&&void 0!==t&&t.convertToUtc&&(r=(0,l.d$)(r,{includeSeconds:null===t||void 0===t?void 0:t.includeSeconds,utcFormat:!0}))),r}function P(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t="",r=!0;if(r){var i=(0,o.XF)();n?t="".concat(i,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/api_trigger"):(t="".concat(i,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/pipeline_runs"),null!==e&&void 0!==e&&e.token&&(t="".concat(t,"/").concat(e.token)))}return t}function Z(e,n,t){return e.match(/[*,-/]/)?{additionalOffset:0,cronValue:e}:function(e,n,t){var r=t.indexOf(e),i=0;if(n<0)for(var u=0;u>n;u--)0===r?(r=t.length-1,i-=1):r-=1;else if(n>0)for(var c=0;c<n;c++)r===t.length-1?(r=0,i+=1):r+=1;var l="number"===typeof t[r]?t[r]:e;return{additionalOffset:i,cronValue:String(l)}}(+e,n,t)}var w=(0,f.m5)(60),N=(0,f.m5)(24),I=(0,l.Cs)();function C(e,n){if(!e)return e;var t=c()().local().format("Z"),r=t.split(":"),i="-"===t[0],u=3===r[0].length?Number(r[0].slice(1)):Number(r[0]),l=Number(r[1]);(i&&!n||!i&&n)&&(u=-u,l=-l);var o=e.split(" "),a=o[0],s=o[1],f=o[2],d=Z(a,l,w),p=Z(s,u+d.additionalOffset,N);if(o[0]=d.cronValue,o[1]=p.cronValue,0!==(null===p||void 0===p?void 0:p.additionalOffset)){var v=Z(f,p.additionalOffset,I);o[2]=v.cronValue}return o.join(" ")}},83641:function(e,n,t){"use strict";t.d(n,{I7:function(){return r},IB:function(){return o},VV:function(){return u},_7:function(){return c},rn:function(){return l}});var r,i=t(41143),u="datetime",c="code",l=i.V;!function(e){e.SECOND="second",e.MINUTE="minute",e.HOUR="hour",e.DAY="day",e.WEEK="week",e.MONTH="month",e.YEAR="year",e.CUSTOM="custom"}(r||(r={}));var o=[r.MINUTE,r.HOUR,r.DAY,r.WEEK,r.MONTH,r.YEAR]},4303:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return K}});var r=t(77837),i=t(75582),u=t(38860),c=t.n(u),l=t(82684),o=t(69864),a=t(34376),s=t(82394),f=t(12691),d=t.n(f),p=t(83641),v=t(71180),b=t(55485),m=t(48670),O=t(75499),h=t(30160),_=t(35686),k=t(50724),E=t(89515),y=t(38276),j=t(81655),g=t(72191),P=t(72473),Z=t(72619),w=t(23780),N=t(28598);var I=function(e){var n=e.fetchItems,t=e.mutationFn,r=e.path,u=e.pipelineUUID,c=(0,a.useRouter)(),s=(0,l.useRef)({}),f=(0,l.useState)(null),d=f[0],p=f[1],b=(0,l.useState)(0),m=b[0],O=b[1],h=(0,l.useState)(0),_=h[0],I=h[1],C=(0,w.VI)(null,{},[],{uuid:"".concat(r,"/").concat(u,"/delete/error")}),D=(0,i.Z)(C,1)[0],x=(0,o.Db)((function(e){return t(e)()}),{onSuccess:function(e){return(0,Z.wD)(e,{callback:function(){null===n||void 0===n||n(),u&&c.push("/pipelines/[pipeline]/".concat(r),"/pipelines/".concat(u,"/").concat(r))},onErrorCallback:function(e,n){return D({errors:n,response:e})}})}}),T=(0,i.Z)(x,1)[0];return{deleteButton:function(e,n,t){return s.current[e]=(0,l.createRef)(),(0,N.jsxs)(y.Z,{mr:1,children:[(0,N.jsx)(v.ZP,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){var n,t,r,i;p(e),O((null===(n=s.current[e])||void 0===n||null===(t=n.current)||void 0===t?void 0:t.offsetTop)||0),I((null===(r=s.current[e])||void 0===r||null===(i=r.current)||void 0===i?void 0:i.offsetLeft)||0)},ref:s.current[e],title:"Delete",children:(0,N.jsx)(P.Trash,{default:!0,size:g.bL})}),(0,N.jsx)(k.Z,{onClickOutside:function(){return p(null)},open:d===e,children:(0,N.jsx)(E.Z,{danger:!0,left:(_||0)-j.nH,onCancel:function(){return p(null)},onClick:function(){p(null),T(e)},title:t,top:(m||0)-(n<=1?j.oz:j.OK),width:j.Xx})})]})}}},C=t(44265),D=t(70515),x=t(16488),T=t(50178),U=t(70320),S=t(3917);function R(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function V(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?R(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):R(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var A={default:!0,monospace:!0};var L=function(e){var n=e.fetchBackfills,t=e.models,r=e.onClickRow,i=e.pipeline,u=e.selectedRow,c=(0,T.Ct)(),o=(0,U.qB)(),a=null===i||void 0===i?void 0:i.uuid,s=o?j.O$:{},f=I({fetchItems:n,mutationFn:_.ZP.backfills.useDelete,path:"backfills",pipelineUUID:a}).deleteButton,k=[{uuid:"Status"},{uuid:"Name"},V(V({},s),{},{uuid:"Backfill"}),{uuid:"Ready"},{uuid:"Running"},{uuid:"Cancelled"},{uuid:"Completed"},{uuid:"Failed"},{uuid:"Total runs"},V(V({},s),{},{uuid:"Started at"}),V(V({},s),{},{uuid:"Completed at"}),{uuid:"Interval"},{uuid:"Interval units"},{uuid:"Type"}];return c||k.push({label:function(){return""},uuid:"edit_delete_backfill"}),(0,N.jsx)(O.Z,{columnFlex:[null,1,1,null,null,null,null,null,null,1,1,null,null,null,null],columns:k,isSelectedRow:function(e){return t[e].id===(null===u||void 0===u?void 0:u.id)},onClickRow:function(e){return null===r||void 0===r?void 0:r(t[e])},rows:t.map((function(e,n){var t=e.block_uuid,r=e.completed_at,i=e.end_datetime,u=e.id,s=e.interval_type,O=e.interval_units,_=e.name,k=e.run_status_counts,E=void 0===k?{}:k,y=e.start_datetime,g=e.started_at,Z=e.status,w=e.total_run_count,I=[(0,l.createElement)(h.ZP,V(V({},(0,j.NC)(Z)),{},{key:"status_".concat(n)}),Z||"inactive"),(0,N.jsx)(d(),{as:"/pipelines/".concat(a,"/backfills/").concat(u),href:"/pipelines/[pipeline]/backfills/[...slug]",passHref:!0,children:(0,N.jsx)(m.Z,{bold:!0,sameColorAsText:!0,children:_})},"name_".concat(n)),(0,l.createElement)(h.ZP,V(V({},A),{},{key:"backfill_".concat(n),small:!0}),y&&i&&(0,N.jsxs)(N.Fragment,{children:[(0,x.Uc)(y,o),"\xa0-\xa0",(0,x.Uc)(i,o)]}),!(y&&i)&&(0,N.jsx)(N.Fragment,{children:"\u2014"})),(0,l.createElement)(h.ZP,V(V({},A),{},{key:"ready_".concat(n)}),E[C.VO.INITIAL]||0),(0,l.createElement)(h.ZP,V(V({},A),{},{info:E[C.VO.RUNNING]>0,key:"running_".concat(n)}),E[C.VO.RUNNING]||0),(0,l.createElement)(h.ZP,V(V({},A),{},{key:"cancelled_".concat(n),warning:E[C.VO.CANCELLED]>0}),E[C.VO.CANCELLED]||0),(0,l.createElement)(h.ZP,V(V({},A),{},{key:"completed_".concat(n),success:E[C.VO.COMPLETED]>0}),E[C.VO.COMPLETED]||0),(0,l.createElement)(h.ZP,V(V({},A),{},{danger:E[C.VO.FAILED]>0,key:"failed_".concat(n)}),E[C.VO.FAILED]||0),(0,l.createElement)(h.ZP,V(V({},A),{},{bold:!0,key:"total_runs_".concat(n)}),w||0),(0,l.createElement)(h.ZP,V(V({},A),{},{key:"started_at_".concat(n),small:!0,title:g?(0,S._6)(g):null}),g?(0,x.Uc)(g,o):(0,N.jsx)(N.Fragment,{children:"\u2014"})),(0,l.createElement)(h.ZP,V(V({},A),{},{key:"completed_at_".concat(n),small:!0,title:r?(0,S._6)(r):null}),r?(0,x.Uc)(r,o):(0,N.jsx)(N.Fragment,{children:"\u2014"})),(0,l.createElement)(h.ZP,V(V({},A),{},{key:"interval_".concat(n)}),s||(0,N.jsx)(N.Fragment,{children:"\u2014"})),(0,l.createElement)(h.ZP,V(V({},A),{},{key:"interval_units_".concat(n)}),O||(0,N.jsx)(N.Fragment,{children:"\u2014"})),(0,l.createElement)(h.ZP,V(V({},A),{},{key:"type_".concat(n)}),t?p._7:p.VV)];return c||I.push((0,N.jsxs)(b.ZP,{children:[(0,N.jsx)(v.ZP,{default:!0,disabled:!!g,iconOnly:!0,linkProps:{as:"/pipelines/".concat(a,"/backfills/").concat(u,"/edit"),href:"/pipelines/[pipeline]/backfills/[...slug]"},noBackground:!0,title:"Edit",children:(0,N.jsx)(P.Edit,{default:!0,size:2*D.iI})},"".concat(n,"_edit_button")),f(u,n,'Are you sure you want to delete the backfill "'.concat(_,'?"'))]},"edit_delete_backfill_".concat(n))),I})),uuid:"pipeline-runs"})},M=t(68562),F=t(75457),B=t(93808),H=t(28795),Y=t(69419),X=t(81728);function z(e){var n=e.pipeline,t=(0,a.useRouter)(),r=n.uuid,u=_.ZP.backfills.list({_limit:20,_offset:0,include_run_count:!0,pipeline_uuid:r},{refreshInterval:6e4}),c=u.data,s=u.mutate,f=(0,l.useMemo)((function(){return(null===c||void 0===c?void 0:c.backfills)||[]}),[c]),d=(0,Y.iV)(),p=(0,l.useState)(null),v=p[0],b=p[1],m=(0,l.useState)(null),O=m[0],k=m[1];(0,l.useEffect)((function(){null!==d&&void 0!==d&&d.backfill_id?b(null===f||void 0===f?void 0:f.find((function(e){return e.id===Number(d.backfill_id)}))):v&&b(null)}),[f,d,v]);var E=(0,l.useMemo)((function(){var e="/pipelines/".concat(r,"/backfills"),n=[{label:function(){return"Backfills"},linkProps:v?{as:e,href:"/pipelines/[pipeline]/backfills"}:null}];return v&&n.push({label:function(){return v.name}}),n}),[r,v]),j=(0,o.Db)(_.ZP.backfills.pipelines.useCreate(r),{onSuccess:function(e){return(0,Z.wD)(e,{callback:function(e){var n=e.backfill.id;t.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(r,"/backfills/").concat(n,"/edit"))},onErrorCallback:function(e,n){return k({errors:n,response:e})}})}}),g=(0,i.Z)(j,2),w=g[0],I=g[1].isLoading;return(0,N.jsxs)(F.Z,{breadcrumbs:E,errors:O,pageName:H.M.BACKFILLS,pipeline:n,setErrors:k,title:function(e){var n=e.name;return"".concat(n," backfills")},uuid:"".concat(H.M.BACKFILLS,"_").concat(r),children:[(0,N.jsx)(y.Z,{p:D.cd,children:(0,N.jsx)(M.ZP,{beforeElement:(0,N.jsx)(P.Add,{size:2.5*D.iI}),blackBorder:!0,inline:!0,loading:I,noHoverUnderline:!0,onClick:function(){return w({backfill:{name:(0,X.Y6)()}})},sameColorAsText:!0,uuid:"PipelineDetailPage/Backfills/add_new_backfill",children:"Create new backfill"})}),f&&0===f.length&&(0,N.jsx)(y.Z,{p:D.cd,children:(0,N.jsx)(h.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No backfills available"})}),(null===f||void 0===f?void 0:f.length)>=1&&(0,N.jsx)(L,{fetchBackfills:s,models:f,pipeline:n,selectedRow:v})]})}z.getInitialProps=function(){var e=(0,r.Z)(c().mark((function e(n){var t;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var K=(0,B.Z)(z)},37459:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/backfills",function(){return t(4303)}])},80022:function(e,n,t){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,{Z:function(){return r}})},15544:function(e,n,t){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}t.d(n,{Z:function(){return r}})},13692:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});var r=t(61049);function i(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&(0,r.Z)(e,n)}},93189:function(e,n,t){"use strict";t.d(n,{Z:function(){return u}});var r=t(12539),i=t(80022);function u(e,n){if(n&&("object"===r(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}}},function(e){e.O(0,[1557,3782,9774,2888,179],(function(){return n=37459,e(e.s=n);var n}));var n=e.O();_N_E=n}]);