mage-ai 0.9.73__py3-none-any.whl → 0.9.75__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 (430) hide show
  1. mage_ai/ai/constants.py +2 -2
  2. mage_ai/ai/llm_pipeline_wizard.py +11 -7
  3. mage_ai/ai/openai_client.py +18 -5
  4. mage_ai/api/constants.py +4 -5
  5. mage_ai/api/oauth_scope.py +2 -2
  6. mage_ai/api/operations/constants.py +2 -2
  7. mage_ai/api/presenters/SyncPresenter.py +4 -1
  8. mage_ai/authentication/oauth/constants.py +2 -2
  9. mage_ai/authentication/operation_history/constants.py +2 -2
  10. mage_ai/authentication/permissions/constants.py +5 -6
  11. mage_ai/cache/constants.py +2 -2
  12. mage_ai/cache/dbt/constants.py +2 -3
  13. mage_ai/cluster_manager/constants.py +2 -2
  14. mage_ai/cluster_manager/kubernetes/workload_manager.py +3 -2
  15. mage_ai/command_center/constants.py +13 -13
  16. mage_ai/data_cleaner/column_types/constants.py +2 -2
  17. mage_ai/data_cleaner/transformer_actions/column.py +19 -7
  18. mage_ai/data_cleaner/transformer_actions/constants.py +10 -9
  19. mage_ai/data_integrations/destinations/constants.py +1 -0
  20. mage_ai/data_integrations/sources/constants.py +2 -0
  21. mage_ai/data_preparation/git/utils.py +4 -1
  22. mage_ai/data_preparation/logging/__init__.py +2 -2
  23. mage_ai/data_preparation/logging/logger.py +3 -3
  24. mage_ai/data_preparation/models/block/__init__.py +6 -0
  25. mage_ai/data_preparation/models/block/data_integration/constants.py +2 -2
  26. mage_ai/data_preparation/models/block/dbt/constants.py +3 -3
  27. mage_ai/data_preparation/models/block/dynamic/factory.py +40 -3
  28. mage_ai/data_preparation/models/block/dynamic/utils.py +31 -33
  29. mage_ai/data_preparation/models/block/dynamic/variables.py +1 -1
  30. mage_ai/data_preparation/models/block/settings/dynamic/constants.py +3 -3
  31. mage_ai/data_preparation/models/block/settings/dynamic/mixins.py +63 -4
  32. mage_ai/data_preparation/models/block/settings/global_data_products/models.py +2 -2
  33. mage_ai/data_preparation/models/constants.py +11 -11
  34. mage_ai/data_preparation/models/global_hooks/constants.py +7 -8
  35. mage_ai/data_preparation/models/global_hooks/models.py +5 -5
  36. mage_ai/data_preparation/models/pipeline.py +5 -0
  37. mage_ai/data_preparation/models/project/constants.py +2 -2
  38. mage_ai/data_preparation/models/triggers/__init__.py +6 -4
  39. mage_ai/data_preparation/models/variables/constants.py +5 -5
  40. mage_ai/data_preparation/models/widget/constants.py +5 -5
  41. mage_ai/data_preparation/preferences.py +9 -16
  42. mage_ai/data_preparation/repo_manager.py +2 -2
  43. mage_ai/data_preparation/sync/__init__.py +2 -2
  44. mage_ai/data_preparation/templates/data_exporters/streaming/elasticsearch.yaml +3 -0
  45. mage_ai/data_preparation/templates/data_exporters/streaming/generic_python.py +1 -1
  46. mage_ai/data_preparation/templates/data_loaders/streaming/nats.yaml +9 -3
  47. mage_ai/errors/constants.py +2 -2
  48. mage_ai/io/base.py +57 -16
  49. mage_ai/io/config.py +3 -3
  50. mage_ai/io/export_utils.py +2 -2
  51. mage_ai/io/google_cloud_storage.py +3 -2
  52. mage_ai/io/io_config.py +3 -2
  53. mage_ai/io/oracledb.py +2 -4
  54. mage_ai/io/postgres.py +40 -20
  55. mage_ai/io/utils.py +18 -0
  56. mage_ai/kernels/magic/constants.py +4 -4
  57. mage_ai/orchestration/constants.py +2 -2
  58. mage_ai/orchestration/db/__init__.py +3 -3
  59. mage_ai/orchestration/db/constants.py +2 -2
  60. mage_ai/orchestration/db/models/oauth.py +5 -5
  61. mage_ai/orchestration/db/models/schedules.py +28 -8
  62. mage_ai/orchestration/db/models/schedules_project_platform.py +10 -8
  63. mage_ai/orchestration/job_manager.py +2 -2
  64. mage_ai/orchestration/monitor/monitor_stats.py +2 -2
  65. mage_ai/orchestration/notification/config.py +2 -2
  66. mage_ai/orchestration/pipeline_scheduler_original.py +4 -12
  67. mage_ai/orchestration/queue/config.py +2 -2
  68. mage_ai/orchestration/queue/process_queue.py +3 -3
  69. mage_ai/presenters/charts/data_sources/constants.py +2 -2
  70. mage_ai/presenters/interactions/constants.py +4 -4
  71. mage_ai/presenters/pages/models/constants.py +4 -4
  72. mage_ai/server/constants.py +1 -1
  73. mage_ai/server/frontend_dist/404.html +3 -3
  74. mage_ai/server/frontend_dist/_next/static/38-PtskJFUTYUpRhT1qF_/_buildManifest.js +1 -0
  75. mage_ai/server/frontend_dist/_next/static/chunks/{1187-839336d276186105.js → 1187-4560c3895e1d7099.js} +1 -1
  76. mage_ai/server/frontend_dist/_next/static/chunks/{1598-0adca9dce3ba4c60.js → 1598-cbf3f5a6078fc3f5.js} +1 -1
  77. mage_ai/server/frontend_dist/_next/static/chunks/2717-638a944d24d5abde.js +1 -0
  78. mage_ai/server/frontend_dist/_next/static/chunks/3548-36f746b1824004f2.js +1 -0
  79. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3763-39a5174f6a3924db.js → frontend_dist/_next/static/chunks/3763-aabe2703076636b0.js} +1 -1
  80. mage_ai/server/frontend_dist/_next/static/chunks/3782-3e2acb5ed45b582b.js +1 -0
  81. mage_ai/server/frontend_dist/_next/static/chunks/449-f689774546860ca4.js +1 -0
  82. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/5627-d5e559859dd0e1e0.js → frontend_dist/_next/static/chunks/5627-10e76bafa5a26f5f.js} +1 -1
  83. mage_ai/server/frontend_dist/_next/static/chunks/{5699-e49718dfc9eb2854.js → 5699-e99379e332bd0b41.js} +1 -1
  84. mage_ai/server/frontend_dist/_next/static/chunks/{7966-163da2621b8c987c.js → 7966-a5a7db345ce81263.js} +1 -1
  85. mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-663c909dcda4c23a.js → _app-13bf3b7dcef50c29.js} +2 -2
  86. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/compute-ed67fa8e81662e8b.js → frontend_dist/_next/static/chunks/pages/compute-9e2dea78024e3bb4.js} +1 -1
  87. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/files-e0ecd7ced09a63b2.js → frontend_dist/_next/static/chunks/pages/files-e08c7fe76f968f9c.js} +1 -1
  88. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/{[...slug]-c7a729477ecda50e.js → [...slug]-30c3807057a4e65b.js} +1 -1
  89. mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-data-products-fd6ae6a358a60a0c.js → global-data-products-8dcb3b31af9e0e39.js} +1 -1
  90. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-8e50243797a7fe59.js → frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-85a64b64d27214b6.js} +1 -1
  91. mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-hooks-d0c003446332dc0d.js → global-hooks-4ff959d51b8a9502.js} +1 -1
  92. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{files-a69ed8e9f814490c.js → files-d08a460641d0efaa.js} +1 -1
  93. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage/overview-1aad7093c6d39257.js → frontend_dist/_next/static/chunks/pages/manage/overview-aae747f487e08d51.js} +1 -1
  94. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{pipeline-runs-528d30e0d13b0cc7.js → pipeline-runs-09a842d64a6ada62.js} +1 -1
  95. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{settings-fb9201d9cf63031d.js → settings-2e98e57d9376a458.js} +1 -1
  96. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/{[user]-000f5a980a07da39.js → [user]-7be6e41ad66089bb.js} +1 -1
  97. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-e4e613f6e817a733.js → frontend_dist/_next/static/chunks/pages/manage/users/new-4c088833063bfa07.js} +1 -1
  98. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{users-a5e9d77ed5b50205.js → users-b99379d0aa6a8c25.js} +1 -1
  99. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/manage-34d718b8a4066c23.js → frontend_dist/_next/static/chunks/pages/manage-868fcd8cbeb265f0.js} +1 -1
  100. mage_ai/server/frontend_dist/_next/static/chunks/pages/{oauth-3bfd1b8d7f036726.js → oauth-6ceceb62191dfe8a.js} +1 -1
  101. mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-e51cd04bd4d1fffe.js +1 -0
  102. mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipeline-runs-5f8c100e648efa8a.js → pipeline-runs-2d0136b51b57de93.js} +1 -1
  103. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-688c652f3296bb9c.js → [...slug]-1ad5238742e25b4c.js} +1 -1
  104. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-bd11e87d026bfbf9.js +1 -0
  105. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{dashboard-1236e36d39b1637d.js → dashboard-0f4f47f721b0723f.js} +1 -1
  106. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-432da20df91511fb.js +1 -0
  107. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-fe91dfb0091f6bc6.js +1 -0
  108. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-0d68d4bf6290fefb.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-cf794b2d22a80f31.js} +1 -1
  109. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-9254358d58f07714.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-a964caef91bed9e1.js} +1 -1
  110. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-821001e690caebe2.js → monitors-80bebb4401eefe25.js} +1 -1
  111. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-2eae7cb017027682.js +1 -0
  112. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-2d4b2a0800a66b33.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-e3d7fdfeb7f806f7.js} +1 -1
  113. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{settings-cd49372ae1702963.js → settings-0abf8a1b7243f93b.js} +1 -1
  114. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-707ed8ca942ca802.js +1 -0
  115. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/{[...slug]-259143ed3cf59e31.js → [...slug]-8429f17d4146e1ec.js} +1 -1
  116. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-193045d9836d8d80.js +1 -0
  117. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-b578b075a8d857e3.js → frontend_dist/_next/static/chunks/pages/pipelines-38187954b6ec4b40.js} +1 -1
  118. mage_ai/server/frontend_dist/_next/static/chunks/pages/platform/global-hooks/{[...slug]-5eeec927e4202b63.js → [...slug]-6834ae87bd668cb2.js} +1 -1
  119. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks-fbe9ad995d46d837.js → frontend_dist/_next/static/chunks/pages/platform/global-hooks-b3f7309a23e592b2.js} +1 -1
  120. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/{profile-fc659962d4015cb3.js → profile-f8b7374385e1f1bf.js} +1 -1
  121. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-8de68502a9afa299.js +1 -0
  122. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-a4f88c334414402b.js → frontend_dist/_next/static/chunks/pages/settings/platform/settings-50fb6a34f3913f1f.js} +1 -1
  123. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-4deb9579ef99a3c6.js → [...slug]-2e5c098c21ea32b7.js} +1 -1
  124. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{permissions-e0cda2f2bfce8d61.js → permissions-54e4b15b9585bfc4.js} +1 -1
  125. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-040f83d75d0f6537.js +1 -0
  126. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-910257d16c604ebd.js → [...slug]-95088f43034e3c95.js} +1 -1
  127. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{roles-4f7a0756806cee34.js → roles-e9149e1fcf218f42.js} +1 -1
  128. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{sync-data-208d6f955204d704.js → sync-data-75b67ae4a00818ef.js} +1 -1
  129. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/{[...slug]-c89dc67e5a1706a8.js → [...slug]-557dda05ca6c6124.js} +1 -1
  130. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-5212c01a9dc558da.js → users-3ee783f5139c76a1.js} +1 -1
  131. mage_ai/server/frontend_dist/_next/static/chunks/pages/{sign-in-054b33312d3193c3.js → sign-in-593c40985d63fcf7.js} +1 -1
  132. mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/{[...slug]-b6ed6a5d818bfd20.js → [...slug]-252c4b6b818345d5.js} +1 -1
  133. mage_ai/server/frontend_dist/_next/static/chunks/pages/{templates-852357bc983af2ea.js → templates-ca528bc607753ab8.js} +1 -1
  134. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/terminal-1f9c56d671bbc67d.js → frontend_dist/_next/static/chunks/pages/terminal-287362c1defcc96b.js} +1 -1
  135. mage_ai/server/frontend_dist/_next/static/chunks/pages/test-2f83af8c9f1378fe.js +1 -0
  136. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-d9de73fb799efed8.js +1 -0
  137. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/version-control-ae3469b992a341d6.js → frontend_dist/_next/static/chunks/pages/version-control-573f0225d7a703ed.js} +1 -1
  138. mage_ai/server/frontend_dist/_next/static/chunks/{webpack-43534cc51fce8644.js → webpack-0bc44da590c7cf85.js} +1 -1
  139. mage_ai/server/frontend_dist/block-layout.html +3 -3
  140. mage_ai/server/frontend_dist/compute.html +6 -6
  141. mage_ai/server/frontend_dist/files.html +6 -6
  142. mage_ai/server/frontend_dist/global-data-products/[...slug].html +6 -6
  143. mage_ai/server/frontend_dist/global-data-products.html +6 -6
  144. mage_ai/server/frontend_dist/global-hooks/[...slug].html +6 -6
  145. mage_ai/server/frontend_dist/global-hooks.html +6 -6
  146. mage_ai/server/frontend_dist/index.html +3 -3
  147. mage_ai/server/frontend_dist/manage/files.html +6 -6
  148. mage_ai/server/frontend_dist/manage/overview.html +6 -6
  149. mage_ai/server/frontend_dist/manage/pipeline-runs.html +6 -6
  150. mage_ai/server/frontend_dist/manage/settings.html +6 -6
  151. mage_ai/server/frontend_dist/manage/users/[user].html +6 -6
  152. mage_ai/server/frontend_dist/manage/users/new.html +6 -6
  153. mage_ai/server/frontend_dist/manage/users.html +6 -6
  154. mage_ai/server/frontend_dist/manage.html +6 -6
  155. mage_ai/server/frontend_dist/oauth.html +4 -4
  156. mage_ai/server/frontend_dist/overview.html +6 -6
  157. mage_ai/server/frontend_dist/pipeline-runs.html +6 -6
  158. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +6 -6
  159. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +6 -6
  160. mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +6 -6
  161. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +3 -3
  162. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +6 -6
  163. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +6 -6
  164. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +6 -6
  165. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +6 -6
  166. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +6 -6
  167. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +6 -6
  168. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +6 -6
  169. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +6 -6
  170. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +6 -6
  171. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +6 -6
  172. mage_ai/server/frontend_dist/pipelines/[pipeline].html +3 -3
  173. mage_ai/server/frontend_dist/pipelines.html +6 -6
  174. mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +6 -6
  175. mage_ai/server/frontend_dist/platform/global-hooks.html +6 -6
  176. mage_ai/server/frontend_dist/settings/account/profile.html +6 -6
  177. mage_ai/server/frontend_dist/settings/platform/preferences.html +6 -6
  178. mage_ai/server/frontend_dist/settings/platform/settings.html +6 -6
  179. mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +6 -6
  180. mage_ai/server/frontend_dist/settings/workspace/permissions.html +6 -6
  181. mage_ai/server/frontend_dist/settings/workspace/preferences.html +6 -6
  182. mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +6 -6
  183. mage_ai/server/frontend_dist/settings/workspace/roles.html +6 -6
  184. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +6 -6
  185. mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +6 -6
  186. mage_ai/server/frontend_dist/settings/workspace/users.html +6 -6
  187. mage_ai/server/frontend_dist/settings.html +3 -3
  188. mage_ai/server/frontend_dist/sign-in.html +7 -7
  189. mage_ai/server/frontend_dist/templates/[...slug].html +6 -6
  190. mage_ai/server/frontend_dist/templates.html +6 -6
  191. mage_ai/server/frontend_dist/terminal.html +6 -6
  192. mage_ai/server/frontend_dist/test.html +3 -3
  193. mage_ai/server/frontend_dist/triggers.html +6 -6
  194. mage_ai/server/frontend_dist/v2/canvas.html +2 -2
  195. mage_ai/server/frontend_dist/v2.html +2 -2
  196. mage_ai/server/frontend_dist/version-control.html +6 -6
  197. mage_ai/server/frontend_dist_base_path_template/404.html +3 -3
  198. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1187-839336d276186105.js → 1187-4560c3895e1d7099.js} +1 -1
  199. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1598-0adca9dce3ba4c60.js → 1598-cbf3f5a6078fc3f5.js} +1 -1
  200. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-638a944d24d5abde.js +1 -0
  201. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-36f746b1824004f2.js +1 -0
  202. mage_ai/server/{frontend_dist/_next/static/chunks/3763-39a5174f6a3924db.js → frontend_dist_base_path_template/_next/static/chunks/3763-aabe2703076636b0.js} +1 -1
  203. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-3e2acb5ed45b582b.js +1 -0
  204. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/449-f689774546860ca4.js +1 -0
  205. mage_ai/server/{frontend_dist/_next/static/chunks/5627-d5e559859dd0e1e0.js → frontend_dist_base_path_template/_next/static/chunks/5627-10e76bafa5a26f5f.js} +1 -1
  206. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{5699-e49718dfc9eb2854.js → 5699-e99379e332bd0b41.js} +1 -1
  207. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{7966-163da2621b8c987c.js → 7966-a5a7db345ce81263.js} +1 -1
  208. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{_app-bb4a0e0d783622a8.js → _app-0392ef723ea2c6f8.js} +2 -2
  209. mage_ai/server/{frontend_dist/_next/static/chunks/pages/compute-ed67fa8e81662e8b.js → frontend_dist_base_path_template/_next/static/chunks/pages/compute-9e2dea78024e3bb4.js} +1 -1
  210. mage_ai/server/{frontend_dist/_next/static/chunks/pages/files-e0ecd7ced09a63b2.js → frontend_dist_base_path_template/_next/static/chunks/pages/files-e08c7fe76f968f9c.js} +1 -1
  211. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/{[...slug]-c7a729477ecda50e.js → [...slug]-30c3807057a4e65b.js} +1 -1
  212. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-data-products-fd6ae6a358a60a0c.js → global-data-products-8dcb3b31af9e0e39.js} +1 -1
  213. mage_ai/server/{frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-8e50243797a7fe59.js → frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-85a64b64d27214b6.js} +1 -1
  214. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-hooks-d0c003446332dc0d.js → global-hooks-4ff959d51b8a9502.js} +1 -1
  215. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{files-a69ed8e9f814490c.js → files-d08a460641d0efaa.js} +1 -1
  216. mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage/overview-1aad7093c6d39257.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage/overview-aae747f487e08d51.js} +1 -1
  217. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{pipeline-runs-528d30e0d13b0cc7.js → pipeline-runs-09a842d64a6ada62.js} +1 -1
  218. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{settings-fb9201d9cf63031d.js → settings-2e98e57d9376a458.js} +1 -1
  219. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/{[user]-000f5a980a07da39.js → [user]-7be6e41ad66089bb.js} +1 -1
  220. mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage/users/new-e4e613f6e817a733.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-4c088833063bfa07.js} +1 -1
  221. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/{users-a5e9d77ed5b50205.js → users-b99379d0aa6a8c25.js} +1 -1
  222. mage_ai/server/{frontend_dist/_next/static/chunks/pages/manage-34d718b8a4066c23.js → frontend_dist_base_path_template/_next/static/chunks/pages/manage-868fcd8cbeb265f0.js} +1 -1
  223. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{oauth-3bfd1b8d7f036726.js → oauth-6ceceb62191dfe8a.js} +1 -1
  224. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-e51cd04bd4d1fffe.js +1 -0
  225. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{pipeline-runs-5f8c100e648efa8a.js → pipeline-runs-2d0136b51b57de93.js} +1 -1
  226. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-688c652f3296bb9c.js → [...slug]-1ad5238742e25b4c.js} +1 -1
  227. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-bd11e87d026bfbf9.js +1 -0
  228. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{dashboard-1236e36d39b1637d.js → dashboard-0f4f47f721b0723f.js} +1 -1
  229. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-432da20df91511fb.js +1 -0
  230. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-fe91dfb0091f6bc6.js +1 -0
  231. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-0d68d4bf6290fefb.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-cf794b2d22a80f31.js} +1 -1
  232. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-9254358d58f07714.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-a964caef91bed9e1.js} +1 -1
  233. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-821001e690caebe2.js → monitors-80bebb4401eefe25.js} +1 -1
  234. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-2eae7cb017027682.js +1 -0
  235. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-2d4b2a0800a66b33.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-e3d7fdfeb7f806f7.js} +1 -1
  236. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{settings-cd49372ae1702963.js → settings-0abf8a1b7243f93b.js} +1 -1
  237. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-707ed8ca942ca802.js +1 -0
  238. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/{[...slug]-259143ed3cf59e31.js → [...slug]-8429f17d4146e1ec.js} +1 -1
  239. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-193045d9836d8d80.js +1 -0
  240. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines-b578b075a8d857e3.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-38187954b6ec4b40.js} +1 -1
  241. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks/{[...slug]-5eeec927e4202b63.js → [...slug]-6834ae87bd668cb2.js} +1 -1
  242. mage_ai/server/{frontend_dist/_next/static/chunks/pages/platform/global-hooks-fbe9ad995d46d837.js → frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks-b3f7309a23e592b2.js} +1 -1
  243. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/{profile-fc659962d4015cb3.js → profile-f8b7374385e1f1bf.js} +1 -1
  244. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-8de68502a9afa299.js +1 -0
  245. mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/platform/settings-a4f88c334414402b.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-50fb6a34f3913f1f.js} +1 -1
  246. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-4deb9579ef99a3c6.js → [...slug]-2e5c098c21ea32b7.js} +1 -1
  247. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{permissions-e0cda2f2bfce8d61.js → permissions-54e4b15b9585bfc4.js} +1 -1
  248. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-040f83d75d0f6537.js +1 -0
  249. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-910257d16c604ebd.js → [...slug]-95088f43034e3c95.js} +1 -1
  250. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{roles-4f7a0756806cee34.js → roles-e9149e1fcf218f42.js} +1 -1
  251. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{sync-data-208d6f955204d704.js → sync-data-75b67ae4a00818ef.js} +1 -1
  252. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/{[...slug]-c89dc67e5a1706a8.js → [...slug]-557dda05ca6c6124.js} +1 -1
  253. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-5212c01a9dc558da.js → users-3ee783f5139c76a1.js} +1 -1
  254. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{sign-in-054b33312d3193c3.js → sign-in-593c40985d63fcf7.js} +1 -1
  255. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/{[...slug]-b6ed6a5d818bfd20.js → [...slug]-252c4b6b818345d5.js} +1 -1
  256. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{templates-852357bc983af2ea.js → templates-ca528bc607753ab8.js} +1 -1
  257. mage_ai/server/{frontend_dist/_next/static/chunks/pages/terminal-1f9c56d671bbc67d.js → frontend_dist_base_path_template/_next/static/chunks/pages/terminal-287362c1defcc96b.js} +1 -1
  258. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/test-2f83af8c9f1378fe.js +1 -0
  259. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-d9de73fb799efed8.js +1 -0
  260. mage_ai/server/{frontend_dist/_next/static/chunks/pages/version-control-ae3469b992a341d6.js → frontend_dist_base_path_template/_next/static/chunks/pages/version-control-573f0225d7a703ed.js} +1 -1
  261. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{webpack-9eb1dd2ee735aaac.js → webpack-12ad70eb5c31aa92.js} +1 -1
  262. mage_ai/server/frontend_dist_base_path_template/_next/static/dxnSzgIvSG4Ke5LM-tPQX/_buildManifest.js +1 -0
  263. mage_ai/server/frontend_dist_base_path_template/block-layout.html +3 -3
  264. mage_ai/server/frontend_dist_base_path_template/compute.html +6 -6
  265. mage_ai/server/frontend_dist_base_path_template/files.html +6 -6
  266. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +6 -6
  267. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +6 -6
  268. mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +6 -6
  269. mage_ai/server/frontend_dist_base_path_template/global-hooks.html +6 -6
  270. mage_ai/server/frontend_dist_base_path_template/index.html +3 -3
  271. mage_ai/server/frontend_dist_base_path_template/manage/files.html +6 -6
  272. mage_ai/server/frontend_dist_base_path_template/manage/overview.html +6 -6
  273. mage_ai/server/frontend_dist_base_path_template/manage/pipeline-runs.html +6 -6
  274. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +6 -6
  275. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +6 -6
  276. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +6 -6
  277. mage_ai/server/frontend_dist_base_path_template/manage/users.html +6 -6
  278. mage_ai/server/frontend_dist_base_path_template/manage.html +6 -6
  279. mage_ai/server/frontend_dist_base_path_template/oauth.html +5 -5
  280. mage_ai/server/frontend_dist_base_path_template/overview.html +6 -6
  281. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +6 -6
  282. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +6 -6
  283. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +6 -6
  284. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +6 -6
  285. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +3 -3
  286. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +6 -6
  287. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +6 -6
  288. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +6 -6
  289. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +6 -6
  290. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +6 -6
  291. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +6 -6
  292. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +6 -6
  293. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +6 -6
  294. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +6 -6
  295. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +6 -6
  296. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +3 -3
  297. mage_ai/server/frontend_dist_base_path_template/pipelines.html +6 -6
  298. mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +6 -6
  299. mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +6 -6
  300. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +6 -6
  301. mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +6 -6
  302. mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +6 -6
  303. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +6 -6
  304. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +6 -6
  305. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +6 -6
  306. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +6 -6
  307. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +6 -6
  308. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +6 -6
  309. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +6 -6
  310. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +6 -6
  311. mage_ai/server/frontend_dist_base_path_template/settings.html +3 -3
  312. mage_ai/server/frontend_dist_base_path_template/sign-in.html +7 -7
  313. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +6 -6
  314. mage_ai/server/frontend_dist_base_path_template/templates.html +6 -6
  315. mage_ai/server/frontend_dist_base_path_template/terminal.html +6 -6
  316. mage_ai/server/frontend_dist_base_path_template/test.html +3 -3
  317. mage_ai/server/frontend_dist_base_path_template/triggers.html +6 -6
  318. mage_ai/server/frontend_dist_base_path_template/v2/canvas.html +2 -2
  319. mage_ai/server/frontend_dist_base_path_template/v2.html +2 -2
  320. mage_ai/server/frontend_dist_base_path_template/version-control.html +6 -6
  321. mage_ai/server/kernel_output_parser.py +2 -3
  322. mage_ai/server/kernels.py +2 -3
  323. mage_ai/server/scheduler_manager.py +2 -2
  324. mage_ai/server/server.py +21 -0
  325. mage_ai/server/websockets/constants.py +4 -4
  326. mage_ai/services/compute/aws/constants.py +2 -2
  327. mage_ai/services/compute/aws/steps.py +16 -10
  328. mage_ai/services/compute/constants.py +4 -4
  329. mage_ai/services/compute/models.py +4 -4
  330. mage_ai/services/k8s/config.py +4 -0
  331. mage_ai/services/k8s/job_manager.py +2 -0
  332. mage_ai/services/spark/constants.py +3 -3
  333. mage_ai/services/spark/models/jobs.py +2 -2
  334. mage_ai/services/spark/models/sqls.py +2 -2
  335. mage_ai/services/spark/models/stages.py +4 -4
  336. mage_ai/services/spark/models/threads.py +2 -2
  337. mage_ai/services/teams/config.py +13 -2
  338. mage_ai/services/teams/teams.py +13 -11
  339. mage_ai/settings/backends.py +3 -2
  340. mage_ai/settings/models/configuration_option.py +3 -3
  341. mage_ai/settings/server.py +5 -0
  342. mage_ai/shared/constants.py +4 -2
  343. mage_ai/shared/custom_logger.py +13 -13
  344. mage_ai/shared/enum.py +8 -0
  345. mage_ai/shared/environments.py +27 -3
  346. mage_ai/shared/logger.py +2 -2
  347. mage_ai/shared/models.py +2 -1
  348. mage_ai/streaming/constants.py +3 -3
  349. mage_ai/streaming/sinks/elasticsearch.py +15 -5
  350. mage_ai/streaming/sinks/kafka.py +2 -2
  351. mage_ai/streaming/sinks/postgres.py +6 -0
  352. mage_ai/streaming/sources/amazon_sqs.py +2 -2
  353. mage_ai/streaming/sources/base.py +2 -2
  354. mage_ai/streaming/sources/kafka.py +20 -4
  355. mage_ai/streaming/sources/nats_js.py +10 -3
  356. mage_ai/streaming/sources/shared.py +3 -2
  357. mage_ai/system/constants.py +2 -2
  358. mage_ai/tests/api/endpoints/test_blocks.py +1 -101
  359. mage_ai/tests/api/endpoints/test_configuration_options.py +1 -48
  360. mage_ai/tests/api/endpoints/test_configuration_options_project_platform.py +68 -0
  361. mage_ai/tests/api/endpoints/test_custom_designs.py +1 -106
  362. mage_ai/tests/api/endpoints/test_custom_designs_project_platform.py +132 -0
  363. mage_ai/tests/api/endpoints/test_dbt_blocks.py +111 -0
  364. mage_ai/tests/api/endpoints/test_file_contents.py +0 -48
  365. mage_ai/tests/api/endpoints/test_file_contents_with_project_platform.py +66 -0
  366. mage_ai/tests/api/endpoints/test_pipelines.py +0 -134
  367. mage_ai/tests/api/endpoints/test_pipelines_with_project_platform.py +143 -0
  368. mage_ai/tests/api/policies/permissions/test_base_policy_with_permissions.py +2 -2
  369. mage_ai/tests/data_cleaner/transformer_actions/test_trim_transformer.py +161 -0
  370. mage_ai/tests/data_preparation/models/block/dbt/test_profiles.py +1 -1
  371. mage_ai/tests/data_preparation/models/block/dynamic/test_combos.py +1 -1
  372. mage_ai/tests/data_preparation/models/block/hook/test_hook_block.py +3 -2
  373. mage_ai/tests/data_preparation/models/test_block.py +7 -0
  374. mage_ai/tests/data_preparation/models/test_blocks_helper.py +1 -1
  375. mage_ai/tests/data_preparation/models/variables/test_summarizer.py +1 -1
  376. mage_ai/tests/data_preparation/sync/test_git_sync.py +6 -6
  377. mage_ai/tests/data_preparation/test_repo_manager.py +0 -63
  378. mage_ai/tests/data_preparation/test_repo_manager_project_platform.py +67 -0
  379. mage_ai/tests/data_preparation/test_variable_manager.py +0 -51
  380. mage_ai/tests/data_preparation/test_variable_manager_project_platform.py +41 -0
  381. mage_ai/tests/io/create_table/test_postgresql.py +27 -0
  382. mage_ai/tests/orchestration/notification/test_config.py +3 -3
  383. mage_ai/tests/orchestration/queue/test_process_queue.py +3 -2
  384. mage_ai/tests/orchestration/test_pipeline_scheduler.py +1 -0
  385. mage_ai/tests/settings/test_platform.py +2 -2
  386. mage_ai/tests/streaming/sinks/test_generic_io.py +25 -21
  387. mage_ai/usage_statistics/constants.py +4 -4
  388. mage_ai-0.9.75.dist-info/METADATA +377 -0
  389. {mage_ai-0.9.73.dist-info → mage_ai-0.9.75.dist-info}/RECORD +397 -388
  390. {mage_ai-0.9.73.dist-info → mage_ai-0.9.75.dist-info}/WHEEL +1 -1
  391. mage_ai/server/frontend_dist/_next/static/chunks/1557-1ad0c64c2d08e569.js +0 -1
  392. mage_ai/server/frontend_dist/_next/static/chunks/2717-d65056b6b5e124eb.js +0 -1
  393. mage_ai/server/frontend_dist/_next/static/chunks/3548-b2c5edfb710886a6.js +0 -1
  394. mage_ai/server/frontend_dist/_next/static/chunks/3782-4b3091e550f809a2.js +0 -1
  395. mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-69af3253ad0d0d89.js +0 -1
  396. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-fe112809feb25b05.js +0 -1
  397. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-e9ca358209cdf93d.js +0 -1
  398. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-a29f1615d2e7d330.js +0 -1
  399. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-6d382ae5bad9745c.js +0 -1
  400. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-135be8974f7f5f2b.js +0 -1
  401. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-3af13e89adff4d6c.js +0 -1
  402. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-058d283ee178c038.js +0 -1
  403. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-7b02bb70462144cb.js +0 -1
  404. mage_ai/server/frontend_dist/_next/static/chunks/pages/test-86b12cc12d4a625f.js +0 -1
  405. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-2481c40b18d5b6d4.js +0 -1
  406. mage_ai/server/frontend_dist/_next/static/kxGpiudO3f9aX6FAiqydf/_buildManifest.js +0 -1
  407. mage_ai/server/frontend_dist_base_path_template/_next/static/H5pcGxWf1BkhXDRs2BqiI/_buildManifest.js +0 -1
  408. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-1ad0c64c2d08e569.js +0 -1
  409. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2717-d65056b6b5e124eb.js +0 -1
  410. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3548-b2c5edfb710886a6.js +0 -1
  411. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-4b3091e550f809a2.js +0 -1
  412. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-69af3253ad0d0d89.js +0 -1
  413. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-fe112809feb25b05.js +0 -1
  414. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-e9ca358209cdf93d.js +0 -1
  415. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-a29f1615d2e7d330.js +0 -1
  416. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-6d382ae5bad9745c.js +0 -1
  417. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/syncs-135be8974f7f5f2b.js +0 -1
  418. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers-3af13e89adff4d6c.js +0 -1
  419. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-058d283ee178c038.js +0 -1
  420. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-7b02bb70462144cb.js +0 -1
  421. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/test-86b12cc12d4a625f.js +0 -1
  422. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-2481c40b18d5b6d4.js +0 -1
  423. mage_ai-0.9.73.dist-info/METADATA +0 -543
  424. /mage_ai/server/frontend_dist/_next/static/{kxGpiudO3f9aX6FAiqydf → 38-PtskJFUTYUpRhT1qF_}/_ssgManifest.js +0 -0
  425. /mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-663c909dcda4c23a.js.LICENSE.txt → _app-13bf3b7dcef50c29.js.LICENSE.txt} +0 -0
  426. /mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{_app-bb4a0e0d783622a8.js.LICENSE.txt → _app-0392ef723ea2c6f8.js.LICENSE.txt} +0 -0
  427. /mage_ai/server/frontend_dist_base_path_template/_next/static/{H5pcGxWf1BkhXDRs2BqiI → dxnSzgIvSG4Ke5LM-tPQX}/_ssgManifest.js +0 -0
  428. {mage_ai-0.9.73.dist-info → mage_ai-0.9.75.dist-info}/LICENSE +0 -0
  429. {mage_ai-0.9.73.dist-info → mage_ai-0.9.75.dist-info}/entry_points.txt +0 -0
  430. {mage_ai-0.9.73.dist-info → mage_ai-0.9.75.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4913],{94629:function(e,n,t){"use strict";t.d(n,{Z:function(){return y}});var r=t(82394),i=t(21831),l=t(82684),o=t(50724),s=t(82555),c=t(97618),u=t(70613),a=t(31557),d=t(68899),f=t(28598);function p(e,n){var t=e.children,r=e.noPadding;return(0,f.jsx)(d.HS,{noPadding:r,ref:n,children:t})}var m=l.forwardRef(p),h=t(62547),j=t(82571),x=t(77417),g=t(46684),v=t(75375);function Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Z(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function P(e,n){e.addProjectBreadcrumbToCustomBreadcrumbs;var t=e.after,r=e.afterHeader,l=e.afterHidden,p=e.afterWidth,Z=e.afterWidthOverride,P=e.appendBreadcrumbs,y=e.before,k=e.beforeHeader,_=e.beforeWidth,O=e.breadcrumbs,C=e.children,S=e.contained,w=e.errors,I=e.headerMenuItems,E=e.headerOffset,M=e.hideAfterCompletely,A=e.mainContainerHeader,B=e.navigationItems,T=e.setAfterHidden,R=e.setAfterWidth,D=e.setBeforeWidth,N=e.setErrors,z=e.subheaderChildren,H=e.subheaderNoPadding,W=e.title,F=e.uuid,L=(0,v.Z)(F,{beforeResizeOffset:v.H,setWidthAfter:R,setWidthBefore:D,widthAfter:p,widthBefore:_,widthOverrideAfter:Z}),V=L.mainContainerRef,U=L.mousedownActiveAfter,G=L.mousedownActiveBefore,X=L.setMousedownActiveAfter,q=L.setMousedownActiveBefore,J=L.setWidthAfter,K=L.setWidthBefore,Y=L.widthAfter,Q=L.widthBefore,$=(0,x.Z)().project,ee=[];return O&&ee.push.apply(ee,(0,i.Z)(O)),null!=O&&O.length&&!P||!$||null!=O&&O.length||ee.unshift({bold:!P,label:function(){return W}}),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Z,{title:W}),(0,f.jsx)(a.Z,{breadcrumbs:ee,menuItems:I}),(0,f.jsxs)(d.Nk,{ref:n,children:[0!==(null==B?void 0:B.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(j.Z,{navigationItems:B,showMore:!0})}),(0,f.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(h.Z,{after:t,afterHeader:r,afterHeightOffset:g.Mz,afterHidden:l,afterMousedownActive:U,afterWidth:Y,before:y,beforeHeader:k,beforeHeightOffset:g.Mz,beforeMousedownActive:G,beforeWidth:y?Q:d.k1,contained:S,headerOffset:E,hideAfterCompletely:!t||M,leftOffset:y?d.k1:null,mainContainerHeader:A,mainContainerRef:V,setAfterHidden:T,setAfterMousedownActive:X,setAfterWidth:J,setBeforeMousedownActive:q,setBeforeWidth:K,children:[z&&(0,f.jsx)(m,{noPadding:H,children:z}),C]})})]}),w&&(0,f.jsx)(o.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null==N?void 0:N(null)},children:(0,f.jsx)(s.Z,b(b({},w),{},{onClose:function(){return null==N?void 0:N(null)}}))})]})}var y=l.forwardRef(P)},93808:function(e,n,t){"use strict";t.d(n,{Z:function(){return C}});var r=t(77837),i=t(26304),l=t(62243),o=t(29385),s=t(80022),c=t(13692),u=t(93189),a=t(15544),d=t(82394),f=t(38860),p=t.n(f),m=t(82684),h=t(56663),j=t.n(h),x=t(40761),g=t(34661),v=t(36105),Z=t(50178),b=t(69419),P=t(28598),y=["auth"];function k(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 _(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?k(Object(t),!0).forEach((function(n){(0,d.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function O(e){var n=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 t,r=(0,a.Z)(e);if(n){var i=(0,a.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,u.Z)(this,t)}}function C(e){return function(n){(0,c.Z)(a,n);var t,u=O(a);function a(){var e;(0,l.Z)(this,a);for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return e=u.call.apply(u,[this].concat(t)),(0,d.Z)((0,s.Z)(e),"state",{auth:new x.Z(e.props.token)}),e}return(0,o.Z)(a,[{key:"componentDidMount",value:function(){this.setState({auth:new x.Z(this.props.token)})}},{key:"render",value:function(){var n=this.props,t=(n.auth,(0,i.Z)(n,y));return(0,P.jsx)(e,_({auth:this.state.auth},t))}}],[{key:"getInitialProps",value:(t=(0,r.Z)(p().mark((function n(t){var r,i,l,o,s,c,u,a,d;return p().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=j()(t),i=(0,Z.ex)(t),l=i.id,o=r[g.Mv],s=r[v.qt],c=new x.Z(o),u=_(_({},t),{},{auth:c,currentGroupId:l,theme:s}),(0,Z.YB)(t)&&c.isExpired&&(console.log("OAuth token has expired."),a=_(_({},t.query),{},{redirect_url:t.asPath}),(0,b.nL)("/sign-in?".concat((0,b.uM)(a)),t.res)),!e.getInitialProps){n.next=12;break}return n.next=10,e.getInitialProps(u);case 10:return d=n.sent,n.abrupt("return",_(_({},d),{},{auth:c,currentGroupId:l,theme:s}));case 12:return n.abrupt("return",u);case 13:case"end":return n.stop()}}),n)}))),function(e){return t.apply(this,arguments)})}]),a}(m.Component)}},4910:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return qe}});var r=t(77837),i=t(38860),l=t.n(i),o=t(82684),s=t(82394),c=t(75582),u=t(83455),a=t(71180),d=t(92083),f=t.n(d),p=t(21764),m=t(28071),h=t(15338),j=t(55485),x=t(85854),g=t(97618),v=t(38276),Z=t(30160),b=t(70515),P=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,s.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 _=function(e){var n=e.rows;return(0,P.jsx)(P.Fragment,{children:null==n?void 0:n.map((function(e){var n=e.key,t=e.textProps,r=e.value;return(0,P.jsxs)("div",{children:[(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsx)(j.ZP,{flexDirection:"column",children:(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:n})}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,justifyContent:"flex-end",children:(0,P.jsx)(Z.ZP,k(k({default:!0,large:!0},t),{},{children:r}))})]})})]},n)}))})},O=t(65956),C=t(4190),S=t(75499),w=t(69650),I=t(35686),E=t(72473),M=t(3917),A=t(9518),B=t(44897),T=A.default.div.withConfig({displayName:"indexstyle__SubheaderStyle",componentId:"sc-169asq7-0"})(["position:sticky;top:0;z-index:1;",""],(function(e){return"\n background-color: ".concat((e.theme.background||B.Z.background).codeArea,";\n ")})),R=t(81728);function D(e){var n;if(null==e||!e.length)return null;var t=null==e?void 0:e[0],r=null===(n=Object.keys(t||{}))||void 0===n?void 0:n.map((function(e){return{uuid:(0,R.vg)(e)}}));return(0,P.jsx)(S.Z,{columnFlex:null==r?void 0:r.map((function(e,n){return 0===n?null:1})),columns:r,rows:null==e?void 0:e.map((function(e){return Object.entries(e||{}).map((function(e){var n=(0,c.Z)(e,2),t=n[0],r=n[1];return[(0,P.jsx)(Z.ZP,{default:!0,monospace:!0,children:r},t)]}))}))})}var N=t(72619),z=t(95924),H=t(42122),W=t(70320),F=t(23780);function L(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function V(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var U=2*b.iI,G={default:!0,monospace:!0};var X=function(e){var n=e.clusters,t=e.computeService,r=e.fetchAll,i=e.includeAllStates,l=e.loading,s=e.setIncludeAllStates,d=(0,o.useMemo)((function(){return"".concat(null==t?void 0:t.uuid,"/clusters")}),[t]),g=(0,W.qB)(),y=(0,o.useState)(null),k=y[0],A=y[1],B=(0,F.VI)(null,{},[],{uuid:d}),L=(0,c.Z)(B,1)[0],X=(0,u.Db)(I.ZP.compute_clusters.compute_services.useCreate(null==t?void 0:t.uuid),{onSuccess:function(e){return(0,N.wD)(e,{callback:function(){r().then((function(){return A(0)}))},onErrorCallback:function(e,n){return L({errors:n,response:e})}})}}),q=(0,c.Z)(X,2),J=q[0],K=q[1].isLoading,Y=(0,u.Db)((function(e){return I.ZP.compute_clusters.compute_services.useDelete(null==t?void 0:t.uuid,null==e?void 0:e.id)()}),{onSuccess:function(e){return(0,N.wD)(e,{callback:function(){r().then((function(){return A(null)}))},onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.exception,i=n.message,l=n.type;p.Am.error((null==t?void 0:t.error)||r||i,{position:p.Am.POSITION.BOTTOM_RIGHT,toastId:l})}})}}),Q=(0,c.Z)(Y,2),$=Q[0],ee=Q[1].isLoading,ne=(0,u.Db)((function(e){return I.ZP.compute_clusters.compute_services.useUpdate(null==t?void 0:t.uuid,null==e?void 0:e.id)({compute_cluster:(0,H.GL)(e,["active"])})}),{onSuccess:function(e){return(0,N.wD)(e,{callback:function(){r()},onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.exception,i=n.message,l=n.type;p.Am.error((null==t?void 0:t.error)||r||i,{position:p.Am.POSITION.BOTTOM_RIGHT,toastId:l})}})}}),te=(0,c.Z)(ne,2),re=te[0],ie=te[1].isLoading,le=(0,o.useMemo)((function(){return(null==n?void 0:n.length)||0}),[n]),oe=(0,o.useMemo)((function(){return(0,P.jsx)(a.ZP,{beforeIcon:(0,P.jsx)(E.WorkspacesUsersIcon,{size:U}),compact:le>=1,loading:K,onClick:function(){return J()},primary:!0,small:le>=1,children:"Launch new cluster"})}),[le,J,K]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(T,{children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,P.jsxs)(j.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,P.jsx)(x.Z,{level:4,children:(0,R._6)("cluster",le,!0)}),s&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(w.Z,{checked:i,compact:!0,onCheck:function(e){return s(e(i))}}),(0,P.jsx)(v.Z,{mr:1}),(0,P.jsx)(Z.ZP,{default:i,muted:!i,small:!0,children:"Include terminated clusters"})]})]}),(0,P.jsx)(v.Z,{mr:b.cd}),le>=1&&oe]})}),(0,P.jsx)(h.Z,{light:!0})]}),(0,P.jsx)(S.Z,{apiForFetchingAfterAction:I.ZP.compute_clusters.compute_services.detail,buildApiOptionsFromObject:function(e){return[null==t?void 0:t.uuid,null==e?void 0:e.id,{},{refreshInterval:3e3,revalidateOnFocus:!0}]},columnFlex:[null,null,null,null,null],columns:[{uuid:"Cluster ID"},{uuid:"Cluster Name"},{uuid:"Status"},{uuid:"Created"},{center:!0,uuid:"Hours"},{label:function(){return""},rightAligned:!0,uuid:"Active"}],onClickRow:function(e,n){A((function(n){return n===e?null:e}))},renderExpandedRowWithObject:function(e,n){var t,r,i,l,o=null==n||null===(t=n.compute_cluster)||void 0===t?void 0:t.cluster;if(!o)return(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(C.Z,{inverted:!0})});var s=o.active,c=o.applications,u=o.ec2_instance_attributes,d=o.name,p=o.status,y=o.tags,k=null==p?void 0:p.state,S=[m.X.TERMINATED,m.X.TERMINATED_WITH_ERRORS,m.X.TERMINATING].includes(k),w=[m.X.RUNNING,m.X.WAITING].includes(k),I=null==p||null===(r=p.timeline)||void 0===r?void 0:r.creation_date_time;return(0,P.jsxs)(v.Z,{p:b.cd,children:[!S&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(x.Z,{level:4,children:"Actions"})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{children:[w&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(a.ZP,{beforeIcon:(0,P.jsx)(E.PowerOnOffButton,{size:U,success:s}),loading:ie,notClickable:s,onClick:s?null:function(){return re(V(V({},o),{},{active:!0}))},primary:!s,children:s?"Activated":"Activate cluster for compute"}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(a.ZP,{loading:ee,onClick:function(){window.confirm("Are you sure you want to terminate this cluster?")&&$(o)},secondary:!0,children:"Terminate cluster"})]}),!w&&(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsx)(C.Z,{inverted:!0,small:!0}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:(null==p||null===(i=p.state_change_reason)||void 0===i?void 0:i.message)||"Cluster is still launching."})]})]})})]}),(0,P.jsx)(v.Z,{mb:b.cd})]}),(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(x.Z,{level:4,children:"Details"})}),(0,P.jsx)(_,{rows:[{key:"ID",textProps:{monospace:!0},value:null==o?void 0:o.id},{key:"Name",value:d},{key:"Master public DNS name",value:(null==o?void 0:o.master_public_dns_name)||"Available after cluster starts."},{key:"Created at",textProps:{monospace:!0},value:I?(0,M.XG)(f()(I).format(M.BL),g):"-"},{key:"Status message",value:(null==p||null===(l=p.state_change_reason)||void 0===l?void 0:l.message)||"None"},{key:"Release label",textProps:{monospace:!0},value:null==o?void 0:o.release_label},{key:"Service role",textProps:{monospace:!0},value:null==o?void 0:o.service_role},{key:"Scale down behavior",value:null!=o&&o.scale_down_behavior?(0,R.vg)(null==o?void 0:o.scale_down_behavior):null==o?void 0:o.scale_down_behavior},{key:"Auto terminate",value:null!=o&&o.auto_terminate?(0,P.jsx)(E.Check,{size:U,success:!0}):(0,P.jsx)(E.Close,{danger:!0,size:U})},{key:"Termination protected",value:null!=o&&o.termination_protected?(0,P.jsx)(E.Check,{size:U,success:!0}):(0,P.jsx)(E.Close,{danger:!0,size:U})},{key:"Visible to all users",value:null!=o&&o.visible_to_all_users?(0,P.jsx)(E.Check,{size:U,success:!0}):(0,P.jsx)(E.Close,{danger:!0,size:U})},{key:"EBS root volume size",textProps:{monospace:!0},value:null==o?void 0:o.ebs_root_volume_size},{key:"Normalized instance hours",textProps:{monospace:!0},value:null==o?void 0:o.normalized_instance_hours},{key:"Step concurrency level",textProps:{monospace:!0},value:null==o?void 0:o.step_concurrency_level}]})]}),(0,P.jsx)(v.Z,{mb:b.cd}),(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(x.Z,{level:4,children:"EC2 instance attributes"})}),(0,P.jsx)(_,{rows:[{key:"Availability zone",textProps:{monospace:!0},value:null==u?void 0:u.ec2_availability_zone},{key:"Master security group",textProps:{monospace:!0},value:null==u?void 0:u.emr_managed_master_security_group},{key:"Slave security group",textProps:{monospace:!0},value:null==u?void 0:u.emr_managed_slave_security_group},{key:"IAM profile",textProps:{monospace:!0},value:null==u?void 0:u.iam_instance_profile}]})]}),(0,P.jsx)(v.Z,{mb:b.cd}),(0,P.jsxs)(j.ZP,{children:[(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{px:b.cd,py:b.cd,children:(0,P.jsx)(x.Z,{level:4,children:"Applications"})}),(0,P.jsx)(h.Z,{light:!0,short:!0}),D(c||[])]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{px:b.cd,py:b.cd,children:(0,P.jsx)(x.Z,{level:4,children:"Tags"})}),(0,P.jsx)(h.Z,{light:!0,short:!0}),D(y||[])]})]})]})},getObjectAtRowIndex:function(e){return null==n?void 0:n[e]},rows:null==n?void 0:n.map((function(e){var n,t,r=e.active,i=e.id,l=e.name,s=e.normalized_instance_hours,c=e.status,u=null==c||null===(n=c.timeline)||void 0===n?void 0:n.creation_date_time,d=null==c?void 0:c.state,p=null==c||null===(t=c.state_change_reason)||void 0===t?void 0:t.message,h=[m.X.BOOTSTRAPPING,m.X.STARTING].includes(d),x=[m.X.TERMINATING].includes(d);return[(0,o.createElement)(Z.ZP,V(V({},G),{},{key:"id",success:r}),i),(0,o.createElement)(Z.ZP,V(V({},G),{},{key:"name",monospace:!1,preWrap:!0}),l),(0,P.jsxs)("div",{children:[(0,P.jsx)(Z.ZP,V(V({},G),{},{danger:[m.X.TERMINATED_WITH_ERRORS].includes(d),default:[m.X.STARTING].includes(d),muted:[m.X.TERMINATED].includes(d),success:[m.X.RUNNING,m.X.WAITING].includes(d),warning:[m.X.TERMINATING].includes(d),children:null!=c&&c.state?(0,R.vg)(null==c?void 0:c.state):null==c?void 0:c.state})),p&&(0,P.jsx)(Z.ZP,{muted:!0,preWrap:!0,small:!0,children:p})]},"state"),(0,o.createElement)(Z.ZP,V(V({},G),{},{key:"created",preWrap:!0}),u?(0,M.XG)(f()(u).format(M.BL),g):"-"),(0,o.createElement)(Z.ZP,V(V({},G),{},{center:!0,key:"normalizedInstanceHours"}),s||0),(0,P.jsx)(j.ZP,{justifyContent:"flex-end",children:h||x?(0,P.jsx)(C.Z,{inverted:h,small:!0}):(0,P.jsx)(a.ZP,{iconOnly:!0,loading:ie,noBackground:!0,noBorder:!0,noPadding:!0,notClickable:r,onClick:r?null:function(n){(0,z.j)(n),re(V(V({},e),{},{active:!0}))},children:(0,P.jsx)(E.PowerOnOffButton,{muted:!r,size:U,success:r})})},"active")]})),selectedRowIndexInternal:k,uuid:d}),l&&(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(C.Z,{inverted:!0})}),!l&&!le&&(0,P.jsx)(v.Z,{p:b.cd,children:oe})]})},q=t(48670),J=t(90299),K=t(89308),Y=t(74521),Q=t(93004),$=t(8970);function ee(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ne(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ee(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ee(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var te="Applications",re="Connections",ie="Jobs",le="SQLs";var oe=function(e){var n,t=e.applications,r=e.computeConnections,i=e.computeService,l=e.connectionsLoading,s=e.fetchAll,c=e.jobs,u=e.loadingApplications,a=e.loadingJobs,d=(e.objectAttributes,e.refButtonTabs),f=(e.selectedComputeService,e.setSelectedSql),p=e.setSelectedTab,m=(0,o.useContext)(A.ThemeContext),j=(0,o.useState)(),x=j[0],g=j[1],y=(0,o.useCallback)((function(e){f((function(){return null})),g(e)}),[f,g]),k=(0,W.qB)(),_=I.ZP.spark_stages.list({details:!0,_format:"with_details"}).data,O=(0,o.useMemo)((function(){return((null==_?void 0:_.spark_stages)||[]).reduce((function(e,n){var t=null==n?void 0:n.application;return(null==t?void 0:t.calculated_id)in e||(e[null==t?void 0:t.calculated_id]={}),e[null==t?void 0:t.calculated_id][null==n?void 0:n.stage_id]=n,e}),{})}),[_]),C=(0,o.useMemo)((function(){return(0,P.jsx)(K.Z,{computeService:i,computeConnections:r,fetchAll:s,onClickStep:function(e){return p((function(){return{main:e}}))}})}),[r,i,s,p]),w=(0,o.useMemo)((function(){return(0,P.jsx)(S.Z,{columnFlex:[null,null,null,null,null,null,null],columns:[{uuid:"ID"},{uuid:"URL"},{uuid:"Name"},{uuid:"Version"},{uuid:"Spark user"},{uuid:"Started at"},{rightAligned:!0,uuid:"Last updated"}],rows:null==t?void 0:t.map((function(e){var n=e.attempts,t=e.id,r=e.name,i=e.spark_ui_url,l=(null==n?void 0:n[0])||{},s=l.app_spark_version,c=l.last_updated_epoch,u=l.start_time_epoch,a=l.spark_user,d=u&&(0,M.JX)(u/1e3,{withSeconds:!0}),f=d&&(0,M.XG)(d,k);return[(0,o.createElement)(Z.ZP,ne(ne({},$.eB),{},{key:"id"}),t),(0,o.createElement)(Z.ZP,ne(ne({},$.eB),{},{key:"sparkUIURL"}),i),(0,o.createElement)(Z.ZP,ne(ne({},$.eB),{},{key:"name"}),r),(0,o.createElement)(Z.ZP,ne(ne({},$.eB),{},{key:"version"}),s),(0,o.createElement)(Z.ZP,ne(ne({},$.eB),{},{key:"sparkUser"}),a),(0,o.createElement)(Z.ZP,ne(ne({},$.eB),{},{key:"startTime"}),f||"-"),(0,o.createElement)(Z.ZP,ne(ne({},$.eB),{},{key:"lastUpdated",rightAligned:!0}),c?(0,M.XG)((0,M.JX)(c/1e3,{withSeconds:!0}),k):"-")]})),uuid:"applications"})}),[t,k]),E=(0,o.useMemo)((function(){var e={};return null==c||c.forEach((function(n){var t,r,i=null==n?void 0:n.application;(null==i?void 0:i.calculated_id)in e||(e[null==i?void 0:i.calculated_id]={application:i,jobs:[]}),null===(t=e[null==i?void 0:i.calculated_id])||void 0===t||null===(r=t.jobs)||void 0===r||r.push(n)})),Object.values(e).map((function(e){var n=e.application,t=e.jobs;return(0,P.jsxs)("div",{children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(Z.ZP,{default:!0,bold:!0,children:["Application ",null==n?void 0:n.calculated_id]})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(Y.Z,{jobs:t,stagesMapping:O})]},null==n?void 0:n.calculated_id)}))}),[c,O]),B=(0,o.useMemo)((function(){return(0,P.jsx)(Q.Z,{setSelectedSql:f,stagesMapping:O})}),[f,O]),T=(0,o.useMemo)((function(){var e=[{label:function(){return(0,P.jsxs)(P.Fragment,{children:[te,"   ",u?"":(null==t?void 0:t.length)||0]})},uuid:te},{label:function(){return(0,P.jsxs)(P.Fragment,{children:[ie,"   ",a?"":(null==c?void 0:c.length)||0]})},uuid:ie},{label:function(){return le},uuid:le}];return(null==r?void 0:r.length)>=1&&e.unshift({label:function(){return re},uuid:re}),e}),[r,s]);return(0,o.useEffect)((function(){x||l||((null==r?void 0:r.length)>=1?y(re):y(te))}),[r,l,x,y]),(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(v.Z,{px:b.cd,children:(0,P.jsx)(J.Z,{noPadding:!0,onClickTab:function(e){var n=e.uuid;return y(n)},ref:d,regularSizeText:!0,selectedTabUUID:x,tabs:T,underlineColor:null==m||null===(n=m.accent)||void 0===n?void 0:n.blue,underlineStyle:!0})}),(0,P.jsx)(h.Z,{light:!0}),re===x&&C,te===x&&w,ie===x&&E,le===x&&B]})},se=t(17488),ce=t(8193);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 ae(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,s.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}var de=function(e){var n=e.addButtonText,t=e.addTextInputPlaceholder,r=e.alreadyExistsMessage,i=e.configurationValuePlaceholder,l=e.configurations,u=e.createButtonText,d=e.description,f=e.emptyState,p=e.setConfigurations,m=e.title,y=(0,o.useRef)(null),k=(0,o.useState)(!1),_=k[0],C=k[1],S=(0,o.useState)(null),w=S[0],I=S[1],M=(0,o.useMemo)((function(){var e;return(null===(e=Object.keys(l||{}))||void 0===e?void 0:e.length)>=1}),[l]),A=(0,o.useMemo)((function(){return w in(l||{})}),[l,w]),B=(0,o.useMemo)((function(){return(0,P.jsxs)(j.ZP,{alignItems:"center",children:[!_&&(0,P.jsx)(a.ZP,{beforeIcon:(0,P.jsx)(E.Add,{}),compact:!0,onClick:function(e){(0,z.j)(e),C(!0),setTimeout((function(){var e;return null==y||null===(e=y.current)||void 0===e?void 0:e.focus()}),1)},secondary:!M,small:!0,children:n||"Add configuration"}),_&&(0,P.jsxs)(P.Fragment,{children:[A&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Z.ZP,{danger:!0,small:!0,children:r||"Already exists"}),(0,P.jsx)(v.Z,{mr:1})]}),(0,P.jsx)(se.Z,{autoComplete:"off",compact:!0,meta:{touched:!!A,error:""},monospace:!0,onClick:function(e){return(0,z.j)(e)},paddingVertical:b.iI/2-2,placeholder:t,onChange:function(e){(0,z.j)(e),I(e.target.value)},ref:y,small:!0,value:w||""}),(0,P.jsx)(v.Z,{mr:1}),(0,P.jsx)(a.ZP,{disabled:A,compact:!0,onClick:function(e){(0,z.j)(e),A||(p(ae(ae({},l),{},(0,s.Z)({},w,""))),C(!1),I(null))},primary:!0,small:!0,children:u||"Create configuration"}),(0,P.jsx)(v.Z,{mr:1}),(0,P.jsx)(a.ZP,{compact:!0,onClick:function(e){(0,z.j)(e),C(!1),I(null)},secondary:!0,small:!0,children:"Cancel"})]})]})}),[n,A,l,M,_,w,y,C,I]),T=(0,o.useMemo)((function(){return Object.entries(l||{}).map((function(e){var n=(0,c.Z)(e,2),t=n[0],r=n[1];return(0,P.jsxs)("div",{children:[(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsx)(a.ZP,{iconOnly:!0,noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){var e=ae({},l);null==e||delete e[t],p(e)},children:(0,P.jsx)(E.Trash,{default:!0,size:ce.Z})}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(Z.ZP,{default:!0,large:!0,monospace:!0,children:t}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,fullWidth:!0,large:!0,monospace:!0,noBackground:!0,noBorder:!0,onChange:function(e){return p(ae(ae({},l),{},(0,s.Z)({},t,e.target.value)))},paddingHorizontal:0,paddingVertical:0,placeholder:i,value:r||""})})]})})]},t)}))}),[l,p]);return(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,P.jsxs)(g.Z,{flex:1,flexDirection:"column",children:[(0,P.jsx)(x.Z,{level:4,children:m}),d&&(0,P.jsx)(v.Z,{mt:1,children:d})]}),(0,P.jsx)(v.Z,{mr:b.cd}),M&&(0,P.jsx)(j.ZP,{alignItems:"center",children:B})]})}),!M&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(h.Z,{light:!0}),(0,P.jsxs)(v.Z,{p:b.cd,children:[f&&(0,P.jsx)(v.Z,{mb:b.cd,children:(0,P.jsx)(Z.ZP,{default:!0,children:f})}),(0,P.jsx)(j.ZP,{alignItems:"center",children:B})]})]}),M&&T]})},fe=t(74260);function pe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function me(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?pe(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):pe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var he=function(e){var n,t=e.attributesTouched,r=e.isLoading,i=e.mutateObject,l=e.objectAttributes,s=e.onCancel,c=e.selectedComputeService,u=e.setObjectAttributes,d=(0,o.useCallback)((function(e){return u({emr_config:me(me({},null==l?void 0:l.emr_config),e)})}),[l,u]),f=(0,o.useCallback)((function(e){return u({spark_config:me(me({},null==l?void 0:l.spark_config),e)})}),[l,u]),p=(0,o.useMemo)((function(){return(null==l?void 0:l.emr_config)||{}}),[l]),m=(0,o.useMemo)((function(){return(null==l?void 0:l.spark_config)||{}}),[l]);return(0,P.jsxs)(ce.N,{children:[(0,P.jsx)(de,{addButtonText:"Add Spark configuration",addTextInputPlaceholder:"e.g. spark.driver.cores",alreadyExistsMessage:"Spark configuration exists",configurationValuePlaceholder:"e.g. 4g",configurations:null==m?void 0:m.others,createButtonText:"Create Spark configuration",description:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(Z.ZP,{muted:!0,children:["List of key-value pairs to be set in ",(0,P.jsx)(Z.ZP,{inline:!0,monospace:!0,muted:!0,children:"SparkConf"}),", e.g. ",(0,P.jsx)(Z.ZP,{inline:!0,monospace:!0,muted:!0,children:"spark.executor.memory=4g"}),"."]}),(0,P.jsxs)(Z.ZP,{muted:!0,children:["For a list of all configurations, see the ",(0,P.jsx)(q.Z,{href:"https://spark.apache.org/docs/latest/configuration.html",inline:!0,openNewWindow:!0,children:"Spark configuration documentation"}),"."]})]}),emptyState:"There are currently no executor Spark configurations.",setConfigurations:function(e){return f({others:e})},title:"Spark configurations"}),(0,P.jsx)(v.Z,{mb:b.HN}),fe.GO.AWS_EMR===c&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(j.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,P.jsxs)(g.Z,{flex:1,flexDirection:"column",children:[(0,P.jsx)(x.Z,{level:4,warning:!(null!=p&&p.ec2_key_name&&null!=p&&p.ec2_key_path),children:"Spark observability"}),(!(null!=p&&p.ec2_key_name)||!(null!=p&&p.ec2_key_path))&&"ec2_key_name"in((null==t?void 0:t.emr_config)||{})&&"ec2_key_path"in((null==t?void 0:t.emr_config)||{})&&(0,P.jsx)(P.Fragment,{children:(0,P.jsx)(v.Z,{mt:1,children:(0,P.jsxs)(Z.ZP,{warning:!0,children:["Without all the fields in this section present and valid, Mage won’t automatically create the SSH tunnel.",(0,P.jsx)("br",{}),"You must manually create the SSH tunnel in order for Mage to retrieve and display the Spark jobs, statuses, metrics, and system information."]})})}),(0,P.jsx)(v.Z,{mt:1,children:(0,P.jsxs)(Z.ZP,{muted:!0,children:["In order to see the Spark jobs, statuses, metrics, and system information, an SSH tunnel to the AWS EMR Master Node must be created.",(0,P.jsx)("br",{}),"Mage can automatically create the SSH tunnel for you if every field in this section is present and valid."]})}),(0,P.jsx)(v.Z,{mt:1,children:(0,P.jsx)(Z.ZP,{muted:!0})})]})})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsxs)(j.ZP,{flexDirection:"column",children:[(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:"EC2 key name"}),(0,P.jsxs)(Z.ZP,{muted:!0,small:!0,children:["SSH tunnel into the EMR cluster using a key pair created from the ",(0,P.jsx)(q.Z,{href:"https://console.aws.amazon.com/ec2/home#KeyPairs",inline:!0,openNewWindow:!0,small:!0,children:"AWS guide"}),"."]})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return d({ec2_key_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. ec2_key_pair_name",value:(null==p?void 0:p.ec2_key_name)||""})})]})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsxs)(j.ZP,{flexDirection:"column",children:[(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:"EC2 key path"}),(0,P.jsx)(Z.ZP,{muted:!0,small:!0,children:"The absolute file path to the EC2 public key that was used when creating a cluster."})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,autoComplete:"off",large:!0,monospace:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return d({ec2_key_path:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. ec2_key_pair_name",value:(null==p?void 0:p.ec2_key_path)||""})})]})})]}),(0,P.jsx)(v.Z,{mb:b.HN}),(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(j.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,P.jsxs)(g.Z,{flex:1,flexDirection:"column",children:[(0,P.jsx)(x.Z,{level:4,children:"EMR instance types"}),(0,P.jsx)(v.Z,{mt:1,children:(0,P.jsxs)(Z.ZP,{muted:!0,children:["Refer to the ",(0,P.jsx)(q.Z,{href:"https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-supported-instance-types.html",openNewWindow:!0,children:"AWS EMR"})," documentation for all supported EMR instance types."]})})]})})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsx)(j.ZP,{flexDirection:"column",children:(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:"Master instance type"})}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return d({master_instance_type:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. r5.4xlarge",value:(null==p?void 0:p.master_instance_type)||""})})]})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsx)(j.ZP,{flexDirection:"column",children:(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:"Slave instance type"})}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return d({slave_instance_type:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. r5.2xlarge",value:(null==p?void 0:p.slave_instance_type)||""})})]})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsx)(j.ZP,{flexDirection:"column",children:(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:"Number of slave instances"})}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){var n=e.target.value||"";(""===n||/^\d+$/.exec(n))&&d({slave_instance_count:n})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. 2",value:(null==p?void 0:p.slave_instance_count)||""})})]})})]}),(0,P.jsx)(v.Z,{mb:b.HN}),(0,P.jsx)(de,{addButtonText:"Add Spark configuration",addTextInputPlaceholder:"e.g. spark.driver.cores",alreadyExistsMessage:"Spark configuration exists",configurationValuePlaceholder:"e.g. 4g",configurations:null==p?void 0:p.master_spark_properties,createButtonText:"Create Spark configuration",description:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(Z.ZP,{muted:!0,children:["List of key-value pairs to be set in ",(0,P.jsx)(Z.ZP,{inline:!0,monospace:!0,muted:!0,children:"SparkConf"})," for the master instance."]}),(0,P.jsxs)(Z.ZP,{muted:!0,children:["For a list of all configurations, see the ",(0,P.jsx)(q.Z,{href:"https://spark.apache.org/docs/latest/configuration.html",inline:!0,openNewWindow:!0,children:"Spark configuration documentation"}),"."]})]}),emptyState:"There are currently no Spark configurations for the master instance.",setConfigurations:function(e){return d({master_spark_properties:e})},title:"Master Spark configurations"}),(0,P.jsx)(v.Z,{mb:b.HN}),(0,P.jsx)(de,{addButtonText:"Add Spark configuration",addTextInputPlaceholder:"e.g. spark.driver.cores",alreadyExistsMessage:"Spark configuration exists",configurationValuePlaceholder:"e.g. 4g",configurations:null==p?void 0:p.slave_spark_properties,createButtonText:"Create Spark configuration",description:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(Z.ZP,{muted:!0,children:["List of key-value pairs to be set in ",(0,P.jsx)(Z.ZP,{inline:!0,monospace:!0,muted:!0,children:"SparkConf"})," for the slave instance."]}),(0,P.jsxs)(Z.ZP,{muted:!0,children:["For a list of all configurations, see the ",(0,P.jsx)(q.Z,{href:"https://spark.apache.org/docs/latest/configuration.html",inline:!0,openNewWindow:!0,children:"Spark configuration documentation"}),"."]})]}),emptyState:"There are currently no Spark configurations for the slave instance.",setConfigurations:function(e){return d({slave_spark_properties:e})},title:"Slave Spark configurations"}),(0,P.jsx)(v.Z,{mb:b.HN}),(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(j.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,P.jsxs)(g.Z,{flex:1,flexDirection:"column",children:[(0,P.jsx)(x.Z,{level:4,children:"Security"}),(0,P.jsx)(v.Z,{mt:1,children:(0,P.jsx)(Z.ZP,{muted:!0,children:"Configure security groups for EMR cluster instances."})})]})})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsxs)(j.ZP,{flexDirection:"column",children:[(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:"Master security group"}),(0,P.jsxs)(Z.ZP,{muted:!0,small:!0,children:["The default managed security group is ",(0,P.jsx)(Z.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:"ElasticMapReduce-master"}),"."]})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return d({master_security_group:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. sg-xxxxxxxxxxxx",value:(null==p?void 0:p.master_security_group)||""})})]})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsxs)(j.ZP,{flexDirection:"column",children:[(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:"Slave security group"}),(0,P.jsxs)(Z.ZP,{muted:!0,small:!0,children:["The default managed security group is ",(0,P.jsx)(Z.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:"ElasticMapReduce-slave"}),"."]})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return d({slave_security_group:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. sg-yyyyyyyyyyyy",value:(null==p?void 0:p.slave_security_group)||""})})]})})]}),(0,P.jsx)(v.Z,{mb:b.HN})]}),(0,P.jsxs)(j.ZP,{children:[(0,P.jsx)(a.ZP,{beforeIcon:(0,P.jsx)(E.Save,{}),disabled:!t||!(null!==(n=Object.keys(t))&&void 0!==n&&n.length),loading:r,onClick:function(){return i()},primary:!0,children:"Save changes"}),s&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(a.ZP,{onClick:function(){return null==s?void 0:s()},secondary:!0,children:"Cancel and go back"})]})]})]})},je=t(77456),xe=t(86735);function ge(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 ve(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ge(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ge(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ze=function(e){var n,t,r=e.attributesTouched,i=e.computeService,l=e.isLoading,s=e.mutateObject,c=e.objectAttributes,u=e.onCancel,d=e.selectedComputeService,f=e.setObjectAttributes,p=(0,o.useCallback)((function(e){return f({emr_config:ve(ve({},null==c?void 0:c.emr_config),e)})}),[c,f]),m=(0,o.useCallback)((function(e){return f({spark_config:ve(ve({},null==c?void 0:c.spark_config),e)})}),[c,f]),y=(0,o.useMemo)((function(){return(null==c?void 0:c.emr_config)||{}}),[c]),k=(0,o.useMemo)((function(){return(null==c?void 0:c.spark_config)||{}}),[c]),_=(0,o.useRef)(null),C=(0,o.useState)(!1),S=C[0],I=C[1],M=(0,o.useState)(null),A=M[0],B=M[1],T=(0,o.useMemo)((function(){return((null==k?void 0:k.spark_jars)||[]).map((function(e){return{config:$.Ts.SPARK,value:e}}))}),[k]),R=(0,o.useMemo)((function(){return((null==y?void 0:y.spark_jars)||[]).map((function(e){return{config:$.Ts.EMR,value:e}}))}),[y]),D=(0,o.useMemo)((function(){return T.concat(R)}),[R,T]),N=(0,o.useMemo)((function(){return(null==D?void 0:D.length)>=1}),[D]),H=(0,o.useMemo)((function(){return(D||[]).some((function(e){return e.value===A}))}),[D,A]),W=(0,o.useMemo)((function(){return(0,P.jsxs)(j.ZP,{alignItems:"center",children:[!S&&(0,P.jsx)(a.ZP,{beforeIcon:(0,P.jsx)(E.Add,{}),compact:!0,onClick:function(e){(0,z.j)(e),I(!0),setTimeout((function(){var e;return null==_||null===(e=_.current)||void 0===e?void 0:e.focus()}),1)},secondary:!N,small:!0,children:"Add JAR file"}),S&&(0,P.jsxs)(P.Fragment,{children:[H&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Z.ZP,{danger:!0,small:!0,children:"JAR file exists"}),(0,P.jsx)(v.Z,{mr:1})]}),(0,P.jsx)(se.Z,{autoComplete:"off",compact:!0,meta:{error:"",touched:!!H},minWidth:30*b.iI,monospace:!0,onChange:function(e){(0,z.j)(e),B(e.target.value)},onClick:function(e){return(0,z.j)(e)},paddingVertical:b.iI/2-2,placeholder:"e.g. /home/path/example1.jar",ref:_,small:!0,value:A||""}),(0,P.jsx)(v.Z,{mr:1}),(0,P.jsx)(a.ZP,{compact:!0,disabled:H,onClick:function(e){if((0,z.j)(e),!H){if(d===fe.GO.AWS_EMR){var n=R.map((function(e){return e.value})).concat(A);p({spark_jars:n})}else{var t=T.map((function(e){return e.value})).concat(A);m({spark_jars:t})}I(!1),B(null)}},primary:!0,small:!0,children:"Add JAR file"}),(0,P.jsx)(v.Z,{mr:1}),(0,P.jsx)(a.ZP,{compact:!0,onClick:function(e){(0,z.j)(e),I(!1),B(null)},secondary:!0,small:!0,children:"Cancel"})]})]})}),[S,N,H,A,R,d,p,T,m]),F=(0,o.useMemo)((function(){return null==D?void 0:D.map((function(e,n){var t=e.config,r=e.value;return(0,P.jsxs)("div",{children:[(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsx)(a.ZP,{iconOnly:!0,noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){if(t===$.Ts.EMR){var e=R.map((function(e){return e.value}));p({spark_jars:(0,xe.oM)(e,n-T.length)})}else{var r=T.map((function(e){return e.value}));m({spark_jars:(0,xe.oM)(r,n)})}},children:(0,P.jsx)(E.Trash,{default:!0,size:ce.Z})}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsxs)(Z.ZP,{default:!0,large:!0,monospace:!0,children:["File ",n+1," (",t,")"]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,justifyContent:"flex-end",children:(0,P.jsx)(Z.ZP,{large:!0,monospace:!0,children:r})})]})})]},r)}))}),[D,R,p,m,T]),L=(0,o.useMemo)((function(){var e="remote_variables_dir",n=null==i?void 0:i.setup_steps,t=null==n?void 0:n.find((function(n){return n.uuid===e}));return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"flex-start",children:[(0,P.jsxs)(j.ZP,{flexDirection:"column",children:[(0,P.jsxs)(Z.ZP,{danger:!(null!=c&&c[e]&&(null==t||!t.error)),default:!0,large:!0,children:["Remote variables directory ",!(null!=c&&c[e])&&(0,P.jsx)(Z.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,P.jsx)(Z.ZP,{muted:!0,small:!0,children:"This S3 bucket will be used by Spark."})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsxs)(g.Z,{flex:1,flexDirection:"column",children:[(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,fullWidth:!0,large:!0,monospace:!0,noBackground:!0,noBorder:!0,onChange:function(e){return f({remote_variables_dir:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. s3://magically-powerful-bucket",value:(null==c?void 0:c.remote_variables_dir)||""}),(null==t?void 0:t.error)&&(0,P.jsx)(j.ZP,{justifyContent:"flex-end",children:(0,P.jsx)(v.Z,{mt:1,children:(0,P.jsx)(je.Z,{error:null==t?void 0:t.error})})})]})]})})]})}),[i,c,f]);return(0,P.jsxs)(ce.N,{children:[(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(x.Z,{level:4,children:"Setup"})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsxs)(Z.ZP,{danger:"app_name"in r&&!(null!=k&&k.app_name),default:!0,large:!0,children:["Application name ","app_name"in r&&!(null!=k&&k.app_name)&&(0,P.jsx)(Z.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,autoComplete:"off",fullWidth:!0,large:!0,noBackground:!0,noBorder:!0,onChange:function(e){return m({app_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Sparkmage",value:(null==k?void 0:k.app_name)||""})})]})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"flex-start",children:[(0,P.jsxs)(j.ZP,{flexDirection:"column",children:[(0,P.jsxs)(Z.ZP,{danger:"spark_master"in r&&!(null!=k&&k.spark_master),default:!0,large:!0,children:["Master URL ","spark_master"in r&&!(null!=k&&k.spark_master)&&(0,P.jsx)(Z.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,P.jsx)(Z.ZP,{muted:!0,small:!0,children:"The URL for connecting to the master."})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,fullWidth:!0,large:!0,noBackground:!0,noBorder:!0,onChange:function(e){return m({spark_master:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. local, yarn, spark://host:port",value:(null==k?void 0:k.spark_master)||""})})]})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"flex-start",children:[(0,P.jsxs)(j.ZP,{flexDirection:"column",children:[(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:"Spark home directory"}),(0,P.jsx)(Z.ZP,{muted:!0,small:!0,children:"Path where Spark is installed on worker nodes."})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,fullWidth:!0,large:!0,monospace:!0,noBackground:!0,noBorder:!0,onChange:function(e){return m({spark_home:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. /usr/lib/spark",value:(null==k?void 0:k.spark_home)||""})})]})}),fe.GO.AWS_EMR===d&&L]}),(0,P.jsx)(v.Z,{mb:b.HN}),(null==i?void 0:i.connection_credentials)&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(x.Z,{level:4,children:"Credentials"})}),null==i||null===(n=i.connection_credentials)||void 0===n?void 0:n.map((function(e){var n=e.description,t=e.error,r=e.name,i=e.required,l=e.uuid,o=e.valid,s=e.value;return(0,P.jsxs)("div",{children:[(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsxs)(j.ZP,{flexDirection:"column",children:[(0,P.jsxs)(Z.ZP,{danger:!o,default:!0,large:!0,monospace:!r,children:[r||l," ",!o&&(0,P.jsx)(Z.ZP,{danger:!0,inline:!0,large:!0,children:"is invalid"})]}),n&&(0,P.jsx)(Z.ZP,{muted:!0,small:!0,children:n})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsxs)(g.Z,{flex:1,justifyContent:"flex-end",children:[!o&&(0,P.jsxs)(P.Fragment,{children:[!t&&i&&(0,P.jsx)(Z.ZP,{large:!0,muted:!0,children:"Required but missing"}),!t&&!i&&(0,P.jsx)(Z.ZP,{large:!0,muted:!0,children:"Invalid"}),t&&(0,P.jsx)(je.Z,{error:t,large:!0})]}),o&&s&&(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:s})]})]})})]},l)}))]}),(0,P.jsx)(v.Z,{mb:b.HN})]}),(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(x.Z,{level:4,children:"Customizations"})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"flex-start",children:[(0,P.jsxs)(j.ZP,{flexDirection:"column",children:[(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:"Use custom session"}),(0,P.jsxs)(Z.ZP,{muted:!0,small:!0,children:["Whether to create custom SparkSession via",(0,P.jsx)("br",{}),"code and set it in ",(0,P.jsx)(Z.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:"kwargs['context']"}),"."]})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,justifyContent:"flex-end",children:(0,P.jsx)(w.Z,{checked:null==k?void 0:k.use_custom_session,compact:!0,onCheck:function(e){return m({use_custom_session:e(null==k?void 0:k.use_custom_session)})}})})]})}),(null==k?void 0:k.use_custom_session)&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"flex-start",children:[(0,P.jsxs)(j.ZP,{flexDirection:"column",children:[(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:"Custom session variable"}),(0,P.jsxs)(Z.ZP,{muted:!0,small:!0,children:["The variable name to set in ",(0,P.jsx)(Z.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:"kwargs['context']"}),",",(0,P.jsx)("br",{}),"e.g. If variable name is ",(0,P.jsx)(Z.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:"spark"})," then the Spark session",(0,P.jsx)("br",{}),"is accessed using ",(0,P.jsx)(Z.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:"kwargs['context']['spark']"}),"."]})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,fullWidth:!0,large:!0,monospace:!0,noBackground:!0,noBorder:!0,onChange:function(e){return m({custom_session_var_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. spark",value:(null==k?void 0:k.custom_session_var_name)||""})})]})})]}),fe.GO.AWS_EMR===d&&(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsxs)(j.ZP,{flexDirection:"column",children:[(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:"Bootstrap script path"}),(0,P.jsx)(Z.ZP,{muted:!0,small:!0,children:"Use a custom script to bootstrap the EMR cluster."})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,autoComplete:"off",fullWidth:!0,large:!0,noBackground:!0,noBorder:!0,onChange:function(e){return p({bootstrap_script_path:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. /path/to/emr_bootstrap.sh",value:(null==y?void 0:y.bootstrap_script_path)||""})})]})})]}),(0,P.jsx)(v.Z,{mb:b.HN}),(0,P.jsx)(de,{addButtonText:"Add environment variable",addTextInputPlaceholder:"e.g. PYTHONPATH",alreadyExistsMessage:"Environment variable exists",configurationValuePlaceholder:"e.g. /home/path",configurations:null==k?void 0:k.executor_env,createButtonText:"Create environment variable",description:(0,P.jsx)(Z.ZP,{muted:!0,children:"Environment variables for the executor."}),emptyState:"There are currently no executor environment variables.",setConfigurations:function(e){return m({executor_env:e})},title:"Environment variables"}),(0,P.jsx)(v.Z,{mb:b.HN}),(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(j.ZP,{alignItems:"flex-start",justifyContent:"space-between",children:(0,P.jsxs)(g.Z,{flex:1,flexDirection:"column",children:[(0,P.jsxs)(j.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,P.jsx)(x.Z,{level:4,children:"JAR files"}),N&&W]}),(0,P.jsx)(v.Z,{mt:1,children:(0,P.jsxs)(Z.ZP,{muted:!0,children:["These files will be uploaded to the cluster and added to the ",(0,P.jsx)(Z.ZP,{inline:!0,monospace:!0,muted:!0,children:"classpath"}),"."]})})]})})}),!N&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(h.Z,{light:!0}),(0,P.jsxs)(v.Z,{p:b.cd,children:[(0,P.jsx)(v.Z,{mb:b.cd,children:(0,P.jsx)(Z.ZP,{default:!0,children:"There are currently no JAR files."})}),(0,P.jsx)(j.ZP,{alignItems:"center",children:W})]})]}),N&&F]}),(0,P.jsx)(v.Z,{mb:b.HN}),(0,P.jsxs)(j.ZP,{children:[(0,P.jsx)(a.ZP,{beforeIcon:(0,P.jsx)(E.Save,{}),disabled:!r||!(null!==(t=Object.keys(r))&&void 0!==t&&t.length),loading:l,onClick:function(){return s()},primary:!0,children:"Save changes"}),u&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(a.ZP,{onClick:function(){return null==u?void 0:u()},secondary:!0,children:"Cancel and go back"})]})]})]})},be=t(35185);var Pe=function(e){var n=e.computeService,t=e.onClick,r=(0,o.useMemo)((function(){var e,t=[],r=0;return null==n||null===(e=n.setup_steps)||void 0===e||e.forEach((function(e){var n=e.group,i=e.required,l=e.status_calculated,o=e.steps;n?null==o||o.forEach((function(e){t.push(e);var n=e.required,i=e.status_calculated;n&&fe.br.COMPLETED!==i||(r+=1)})):(t.push(e),i&&fe.br.COMPLETED!==l||(r+=1))})),{steps:t,stepsCompleted:r}}),[n]),i=r.steps,l=r.stepsCompleted,s=(0,o.useMemo)((function(){return(null==i?void 0:i.length)||1}),[i]),c=(0,o.useMemo)((function(){return l/s}),[l,s]);return(0,P.jsxs)(q.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,onClick:t?function(){return null==t?void 0:t()}:null,preventDefault:!0,children:[(0,P.jsx)(h.Z,{light:!0}),(0,P.jsxs)(v.Z,{p:b.cd,children:[(0,P.jsx)(v.Z,{mb:1,children:(0,P.jsxs)(Z.ZP,{monospace:!0,muted:!0,children:[(0,P.jsx)(Z.ZP,{default:!0,inline:!0,children:l})," / ",(0,P.jsx)(Z.ZP,{default:!0,inline:!0,children:s})," ",(0,R._6)("step",s,!1,!0)," completed"]})}),(0,P.jsx)(be.Z,{progress:100*c})]}),(0,P.jsx)(h.Z,{light:!0})]})},ye=t(78688),ke=t(72748),_e=t(32013),Oe=t(98777);function Ce(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?Ce(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ce(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var we="Environment",Ie="Executors";var Ee=function(e){e.objectAttributes;var n,t=(0,o.useContext)(A.ThemeContext),r=(0,o.useState)(we),i=r[0],l=r[1],s=I.ZP.spark_executors.list().data,u=(0,o.useMemo)((function(){return null==s?void 0:s.spark_executors}),[s]),a=I.ZP.spark_environments.detail("0").data,d=(0,o.useMemo)((function(){return null==a?void 0:a.spark_environment}),[a]),f=(0,o.useMemo)((function(){var e,n,t,r,i,l,s;return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(v.Z,{px:b.cd,children:(0,P.jsxs)(_e.Z,{noBoxShadow:!0,children:[(0,P.jsxs)(Oe.Z,{noPaddingContent:!0,title:"Runtime",children:[(0,P.jsx)(S.Z,{columnFlex:[null,null],columns:[{uuid:"Property"},{uuid:"Value"}],rows:null===(e=Object.entries((null==d?void 0:d.runtime)||{}))||void 0===e?void 0:e.map((function(e){return[(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"property"}),e[0]),(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"value"}),e[1])]}))}),(0,P.jsx)(v.Z,{p:1})]}),(0,P.jsxs)(Oe.Z,{noPaddingContent:!0,title:"Hadoop properties",children:[(0,P.jsx)(S.Z,{columnFlex:[null,null],columns:[{uuid:"Property"},{uuid:"Value"}],rows:null==d||null===(n=d.hadoop_properties)||void 0===n?void 0:n.map((function(e){return[(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"property"}),e[0]),(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"value"}),e[1])]}))}),(0,P.jsx)(v.Z,{p:1})]}),(0,P.jsxs)(Oe.Z,{noPaddingContent:!0,title:"Metrics properties",children:[(0,P.jsx)(S.Z,{columnFlex:[null,null],columns:[{uuid:"Property"},{uuid:"Value"}],rows:null==d||null===(t=d.metrics_properties)||void 0===t?void 0:t.map((function(e){return[(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"property"}),e[0]),(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"value"}),e[1])]}))}),(0,P.jsx)(v.Z,{p:1})]}),(0,P.jsxs)(Oe.Z,{noPaddingContent:!0,title:"Spark properties",children:[(0,P.jsx)(S.Z,{columnFlex:[1,4],columns:[{uuid:"Property"},{uuid:"Value"}],rows:null==d||null===(r=d.spark_properties)||void 0===r?void 0:r.map((function(e){return[(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"property"}),e[0]),(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"value"}),e[1])]}))}),(0,P.jsx)(v.Z,{p:1})]}),(0,P.jsxs)(Oe.Z,{noPaddingContent:!0,title:"System properties",children:[(0,P.jsx)(S.Z,{columnFlex:[null,null],columns:[{uuid:"Property"},{uuid:"Value"}],rows:null==d||null===(i=d.system_properties)||void 0===i?void 0:i.map((function(e){return[(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"property"}),e[0]),(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"value"}),e[1])]}))}),(0,P.jsx)(v.Z,{p:1})]}),(0,P.jsxs)(Oe.Z,{noPaddingContent:!0,title:"Classpath entries",children:[(0,P.jsx)(S.Z,{columnFlex:[null,null],columns:[{uuid:"Type"},{uuid:"Value"}],rows:null==d||null===(l=d.classpath_entries)||void 0===l?void 0:l.map((function(e){return[(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"type"}),e[1]),(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"value"}),e[0])]}))}),(0,P.jsx)(v.Z,{p:1})]})]})}),null==d||null===(s=d.resource_profiles)||void 0===s?void 0:s.map((function(e){var n=e.executor_resources,t=e.id,r=e.task_resources;return(0,P.jsxs)("div",{children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(x.Z,{level:4,children:["Executor resources ID ",t]})}),(0,P.jsx)(v.Z,{px:b.cd,children:(0,P.jsx)(_e.Z,{noBoxShadow:!0,children:Object.entries(n||{}).map((function(e){var n,t=(0,c.Z)(e,2),r=t[0],i=t[1];return(0,P.jsxs)(Oe.Z,{noPaddingContent:!0,title:(0,R.vg)(r),children:[(0,P.jsx)(S.Z,{columnFlex:[1,2],columns:[{uuid:"Property"},{uuid:"Value"}],rows:null===(n=Object.entries(i))||void 0===n?void 0:n.map((function(e){return[(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"property"}),(0,R.vg)(e[0])),(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"value"}),e[1]||"-")]}))}),(0,P.jsx)(v.Z,{p:1})]},r)}))})}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(x.Z,{level:4,children:["Task resources ID ",t]})}),(0,P.jsx)(v.Z,{px:b.cd,children:(0,P.jsx)(_e.Z,{noBoxShadow:!0,children:Object.entries(r||{}).map((function(e){var n,t=(0,c.Z)(e,2),r=t[0],i=t[1];return(0,P.jsxs)(Oe.Z,{noPaddingContent:!0,title:(0,R.vg)(r),children:[(0,P.jsx)(S.Z,{columnFlex:[1,2],columns:[{uuid:"Property"},{uuid:"Value"}],rows:null===(n=Object.entries(i))||void 0===n?void 0:n.map((function(e){return[(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"property"}),(0,R.vg)(e[0])),(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"value"}),e[1]||"-")]}))}),(0,P.jsx)(v.Z,{p:1})]},r)}))})})]},t)}))]})}),[d]),p=(0,o.useMemo)((function(){return null==u?void 0:u.map((function(e){return(0,P.jsxs)("div",{children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(x.Z,{level:4,children:["Executor ",null==e?void 0:e.id]})}),(0,P.jsx)(v.Z,{px:b.cd,children:(0,P.jsxs)(_e.Z,{noBoxShadow:!0,children:[(0,P.jsxs)(Oe.Z,{noPaddingContent:!0,title:"Metrics",children:[(0,P.jsx)(S.Z,{columnFlex:[1,2],columns:[{uuid:"Metric"},{uuid:"Value"}],rows:["active_tasks","add_time","completed_tasks","disk_used","failed_tasks","host_port","is_active","is_blacklisted","is_excluded","max_memory","max_tasks","memory_used","rdd_blocks","resource_profile_id","total_cores","total_duration","total_gc_time","total_input_bytes","total_shuffle_read","total_shuffle_write","total_tasks"].map((function(n){var t=null==e?void 0:e[n];return[(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"property"}),(0,R.vg)(n)),(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"value"}),void 0===t?"-":"boolean"==typeof t?String(t):t)]}))}),(0,P.jsx)(v.Z,{p:1})]}),(0,P.jsxs)(Oe.Z,{noPaddingContent:!0,title:"Memory metrics",children:[(0,P.jsx)(S.Z,{columnFlex:[1,2],columns:[{uuid:"Metric"},{uuid:"Value"}],rows:Object.entries((null==e?void 0:e.memory_metrics)||{}).map((function(e){var n=(0,c.Z)(e,2),t=n[0],r=n[1];return[(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"property"}),(0,R.vg)(t)),(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"value"}),void 0===r?"-":"boolean"==typeof r?String(r):r)]}))}),(0,P.jsx)(v.Z,{p:1})]}),(0,P.jsxs)(Oe.Z,{noPaddingContent:!0,title:"Peak memory metrics",children:[(0,P.jsx)(S.Z,{columnFlex:[1,2],columns:[{uuid:"Metric"},{uuid:"Value"}],rows:Object.entries((null==e?void 0:e.peak_memory_metrics)||{}).map((function(e){var n=(0,c.Z)(e,2),t=n[0],r=n[1];return[(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"property"}),(0,R.vg)(t)),(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"value"}),void 0===r?"-":"boolean"==typeof r?String(r):r)]}))}),(0,P.jsx)(v.Z,{p:1})]})]})})]},null==e?void 0:e.id)}))}),[u]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(v.Z,{px:b.cd,children:(0,P.jsx)(J.Z,{noPadding:!0,onClickTab:function(e){var n=e.uuid;return l(n)},regularSizeText:!0,selectedTabUUID:i,tabs:[{label:function(){return we},uuid:we},{label:function(){return Ie},uuid:Ie}],underlineColor:null==t||null===(n=t.accent)||void 0===n?void 0:n.blue,underlineStyle:!0})}),(0,P.jsx)(v.Z,{mb:b.cd,children:(0,P.jsx)(h.Z,{light:!0})}),we===i&&f,Ie===i&&p]})},Me=t(62547),Ae=t(23657),Be=t(74778),Te=t(75375),Re=t(46684),De=t(53808),Ne=t(10332),ze=t(15610),He=t(69419),We=t(19183);function Fe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Le(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Fe(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Fe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ve=function(e){var n,t=e.contained,r=e.heightOffset,i=e.mainContainerRef,l=(0,We.i)(),d=l.height,f=(l.width,(0,o.useMemo)((function(){return"ComputeManagement/".concat(t?"contained":"open")}),[t])),p=(0,F.VI)(null,{},[],{uuid:f}),m=(0,c.Z)(p,1)[0],h=((0,o.useRef)(null),(0,o.useRef)(null),(0,o.useRef)(null),(0,o.useRef)(null)),y=(0,o.useMemo)((function(){return d-(r||0)}),[r,d]),k=(0,o.useState)(!1),_=k[0],O=k[1],C=(0,o.useState)(null),S=C[0],w=C[1],M=(0,Ae.Z)({clustersRefreshInterval:1e4,includeAllStates:_}),A=M.activeCluster,B=M.clusters,T=M.clustersLoading,R=M.computeService,D=M.connections,z=M.connectionsLoading,W=M.fetchAll,L=M.setupComplete,V=(0,o.useState)(null),U=V[0],G=V[1];(0,o.useEffect)((function(){var e;G(null==h||null===(e=h.current)||void 0===e?void 0:e.getBoundingClientRect())}),[d,h]);var J=(0,o.useMemo)((function(){return"compute_management_after_width_".concat(f)}),[f]),K=(0,o.useMemo)((function(){return"compute_management_before_width_".concat(f)}),[f]),Y=(0,o.useState)((0,De.U2)(J,60*b.iI)),Q=Y[0],ee=Y[1],ne=(0,o.useCallback)((function(e){ee(e),(0,De.t8)(J,Math.max(e,60*b.iI))}),[J,ee]),te=(0,o.useState)(!1),re=te[0],ie=te[1],le=(0,o.useState)(Math.max((0,De.U2)(K),20*b.iI)),se=le[0],ce=le[1],ue=(0,o.useCallback)((function(e){ce((e||20*b.iI)-Te.H),(0,De.t8)(K,e||20*b.iI)}),[K,ce]),ae=(0,o.useState)(!1),de=ae[0],fe=ae[1],pe=(0,o.useState)(!0),me=pe[0],je=pe[1],xe=(0,o.useState)(null),ge=xe[0],ve=xe[1],be=(0,o.useCallback)((function(e){ve((function(n){var t=e(n);return t&&me?je(!1):t||me||!L||je(!0),t}))}),[me,je,ve,L]),_e=(0,o.useState)(null),Oe=_e[0],Ce=_e[1],Se=(0,o.useCallback)((function(e){var n;(0,ze.u)((0,s.Z)({},"tab",null===(n="function"==typeof e?null==e?void 0:e():e)||void 0===n?void 0:n.main)),be((function(){return null}))}),[be]),we=(0,He.iV)();(0,o.useEffect)((function(){var e=null==we?void 0:we.tab;(null==Oe?void 0:Oe.main)!==e&&Ce(e?{main:e}:null)}),[Oe,we]);var Ie=(0,o.useState)(null),Fe=Ie[0],Ve=Ie[1],Ue=(0,o.useState)({}),Ge=Ue[0],Xe=Ue[1],qe=(0,o.useCallback)((function(e){Xe((function(n){return Le(Le({},n),e)})),Ve((function(n){return Le(Le({},n),e)}))}),[Xe,Ve]),Je=((0,o.useCallback)((function(e){return qe({spark_config:Le(Le({},null==Fe?void 0:Fe.spark_config),e)})}),[Fe,qe]),I.ZP.projects.list({},{revalidateOnFocus:!1})),Ke=Je.data,Ye=Je.mutate,Qe=(0,o.useMemo)((function(){var e;return null==Ke||null===(e=Ke.projects)||void 0===e?void 0:e[0]}),[Ke]),$e=(0,o.useMemo)((function(){return null==Qe?void 0:Qe.name}),[Qe]),en=I.ZP.spark_applications.list().data,nn=(0,o.useMemo)((function(){return null==en?void 0:en.spark_applications}),[en]),tn=I.ZP.spark_jobs.list().data,rn=(0,o.useMemo)((function(){return null==tn?void 0:tn.spark_jobs}),[tn]);(0,o.useEffect)((function(){je(L)}),[L]),(0,o.useEffect)((function(){Qe&&(Ve(Qe),w((0,Ne.d)(Qe)))}),[Qe,Ve,w,Se]),(0,o.useEffect)((function(){!Oe&&S&&Se({main:$.uK.SETUP})}),[S,Oe,Se]);var ln=(0,u.Db)(I.ZP.projects.useUpdate($e),{onSuccess:function(e){return(0,N.wD)(e,{callback:function(e){var n=e.project;Xe({}),Ve(n),W(),Ye()},onErrorCallback:function(e,n){return m({errors:n,response:e})}})}}),on=(0,c.Z)(ln,2),sn=on[0],cn=on[1].isLoading,un=(0,o.useCallback)((function(e){return sn({project:(0,H.GL)(Le(Le({},Fe),e),["emr_config","remote_variables_dir","spark_config"])})}),[Fe,sn]),an=(0,o.useMemo)((function(){var e=(0,$.kI)(R).map((function(e){var n,t=e.Icon,r=e.renderStatus,i=e.uuid;return r&&(n=null==r?void 0:r({applications:nn,applicationsLoading:!en,clusters:B,clustersLoading:T,computeConnections:D,computeService:R,jobs:rn,jobsLoading:!tn})),(0,P.jsx)(q.Z,{block:!0,disabled:!S,noHoverUnderline:!0,noOutline:!0,onClick:function(){return Se((function(){return{main:i}}))},preventDefault:!0,children:(0,P.jsx)(Be.bC,{selected:(null==Oe?void 0:Oe.main)===i,children:(0,P.jsxs)(j.ZP,{alignItems:"center",fullHeight:!0,justifyContent:"space-between",children:[(0,P.jsxs)(g.Z,{alignItems:"center",flex:1,children:[(0,P.jsx)(t,{size:2*b.iI}),(0,P.jsx)(v.Z,{mr:2}),(0,P.jsx)(Z.ZP,{bold:!0,large:!0,children:$.TD[i]})]}),n&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(v.Z,{mr:b.cd}),n]})]})})},i)}));if(S){var n=String(S),t=$.l[n],r=$.Eb[n],i=$.LF[n];if(t&&r&&i){var l,o;null!=R&&R.setup_steps&&(o=L?A?null!=A&&A.ready?"Cluster is ready, commence coding.":"Cluster activated and initializing.":"Setup complete but no clusters activated.":"All setup steps have not been completed yet.");var s=[];null!=R&&R.setup_steps&&s.push((0,P.jsx)(v.Z,{py:1,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[L&&(0,P.jsx)(E.PowerOnOffButton,{muted:!(null!=A&&A.ready),size:1.5*b.iI,success:null==A?void 0:A.ready}),!L&&(0,P.jsx)(E.AlertTriangle,{danger:!0,size:1.5*b.iI}),(0,P.jsx)(v.Z,{mr:1}),(0,P.jsxs)(g.Z,{flex:1,flexDirection:"column",children:[(0,P.jsx)(Z.ZP,{default:!L||!A,small:!0,children:L&&A?"Compute service connected":"Compute service unconnected"}),o&&(0,P.jsx)(Z.ZP,{muted:!0,xsmall:!0,children:o})]})]})},"compute-service-setup-steps")),(null==R||null===(l=R.setup_steps)||void 0===l?void 0:l.length)>=1&&!L&&e.unshift((0,P.jsx)(Pe,{computeService:R,onClick:function(){return je(!1)}},"setupProgress")),e.unshift((0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(Be.UE,{inline:!0,children:[(0,P.jsxs)(j.ZP,{alignItems:"flex-start",children:[(0,P.jsx)(g.Z,{flex:1,children:i()}),(0,P.jsx)(a.ZP,{compact:!0,onClick:function(){w(null),Se(null)},secondary:!0,small:!0,children:"Change"})]}),(0,P.jsx)(v.Z,{mt:b.cd,children:(0,P.jsx)(j.ZP,{alignItems:"flex-end",children:(0,P.jsxs)(g.Z,{flex:1,flexDirection:"column",children:[(0,P.jsx)(Z.ZP,{default:!0,monospace:!0,children:r}),(0,P.jsx)(x.Z,{level:5,children:t})]})})}),(null==s?void 0:s.length)>=1&&(0,P.jsx)(v.Z,{mt:b.cd,children:s})]})},"".concat(t,"-").concat(r)))}}return e}),[A,nn,B,T,R,D,en,tn,rn,S,Oe,je,Se,L]),dn=(0,o.useMemo)((function(){var e;return ge?(0,P.jsx)(ke.Z,{height:y-(((null==U?void 0:U.height)||0)+Re.Mz+1),model:ge}):(null==R||null===(e=R.setup_steps)||void 0===e?void 0:e.length)>=1?(0,P.jsx)(ye.Z,{onClickStep:function(e){return Se((function(){return{main:e}}))},setupSteps:null==R?void 0:R.setup_steps}):void 0}),[null==U?void 0:U.height,R,y,ge,Se]),fn=(0,o.useMemo)((function(){return(0,P.jsx)(Ze,{attributesTouched:Ge||{},computeService:R,isLoading:cn,mutateObject:un,objectAttributes:Fe,selectedComputeService:S,setObjectAttributes:qe})}),[Ge,R,cn,Fe,S,qe,un]),pn=(0,o.useMemo)((function(){return(0,P.jsx)(he,{attributesTouched:Ge||{},isLoading:cn,mutateObject:un,objectAttributes:Fe,selectedComputeService:S,setObjectAttributes:qe})}),[Ge,cn,Fe,S,qe,un]),mn=(0,o.useMemo)((function(){if([$.B2.AWS_EMR,$.B2.STANDALONE_CLUSTER].includes(S))return(0,P.jsx)(oe,{applications:nn,computeConnections:D,computeService:R,connectionsLoading:z,fetchAll:W,jobs:rn,loadingApplications:!en,loadingJobs:!tn,objectAttributes:Fe,refButtonTabs:h,selectedComputeService:S,setSelectedSql:be,setSelectedTab:Se})}),[nn,R,D,z,W,en,tn,rn,Fe,h,S,be,Se]),hn=(0,o.useMemo)((function(){if([$.B2.AWS_EMR,$.B2.STANDALONE_CLUSTER].includes(S))return(0,P.jsx)(Ee,{objectAttributes:Fe})}),[Fe,S]),jn=(0,o.useMemo)((function(){return(0,P.jsxs)(v.Z,{mx:1,py:b.cd,children:[(0,P.jsx)(v.Z,{mb:b.cd,px:b.cd,children:(0,P.jsx)(x.Z,{children:"Select a compute service"})}),(0,P.jsx)(j.ZP,{alignItems:"center",flexWrap:"wrap",children:$.sY.map((function(e){var n=e.buildPayload,t=e.displayName,r=e.documentationHref,i=e.kicker,l=e.renderIcon,o=e.uuid;return(0,P.jsxs)(Be.UE,{children:[l(),(0,P.jsxs)(v.Z,{mt:b.cd,children:[(0,P.jsx)(Z.ZP,{default:!0,monospace:!0,children:i}),(0,P.jsx)(x.Z,{level:4,children:t})]}),(0,P.jsx)(v.Z,{mt:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsx)(a.ZP,{loading:cn&&o===S,onClick:function(){w(o),un(n(Fe))},primary:!0,children:"Enable"}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(q.Z,{href:r,default:!0,openNewWindow:!0,children:"View setup documentation"})]})})]},o)}))})]})}),[cn,Fe,S,w,un]),xn=(0,o.useMemo)((function(){return(0,P.jsx)(X,{clusters:B,computeService:R,fetchAll:W,includeAllStates:_,loading:T,setIncludeAllStates:O})}),[B,T,R,W,_,O]),gn=(0,o.useMemo)((function(){if(!S&&Fe)return jn;if(S&&Qe&&null!=Oe&&Oe.main){var e=null==Oe?void 0:Oe.main;if($.uK.SETUP===e)return fn;if($.uK.RESOURCES===e)return pn;if($.uK.MONITORING===e)return mn;if($.uK.SYSTEM===e)return hn;if($.uK.CLUSTERS===e)return xn}}),[xn,jn,mn,Fe,Qe,pn,S,Oe,fn,hn]);return(0,P.jsx)(Me.Z,{after:dn,afterDividerContrast:!0,afterDraggableTopOffset:Re.Mz,afterHeightOffset:Re.Mz,afterHidden:me&&!ge,afterMousedownActive:re,afterWidth:Q,before:an,beforeDividerContrast:!0,beforeHeightOffset:0,beforeHidden:!S,beforeMousedownActive:de,beforeWidth:se,contained:!0,height:y,hideAfterCompletely:!(null!=R&&null!==(n=R.setup_steps)&&void 0!==n&&n.length),hideBeforeCompletely:!S,inline:!0,mainContainerRef:i,setAfterHidden:je,setAfterMousedownActive:ie,setAfterWidth:ne,setBeforeMousedownActive:fe,setBeforeWidth:ue,uuid:f,children:gn})},Ue=t(94629),Ge=t(93808);function Xe(){var e=(0,o.useRef)(null);return(0,P.jsx)(Ue.Z,{title:"Compute management",uuid:"Compute management/index",children:(0,P.jsx)("div",{ref:e,children:(0,P.jsx)(Ve,{heightOffset:Re.Mz,mainContainerRef:e})})})}Xe.getInitialProps=(0,r.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 qe=(0,Ge.Z)(Xe)},42278:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/compute",function(){return t(4910)}])},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 l}});var r=t(12539),i=t(80022);function l(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,[9774,1557,3366,2888,179],(function(){return n=42278,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4913],{94629:function(e,n,t){"use strict";t.d(n,{Z:function(){return y}});var r=t(82394),i=t(21831),l=t(82684),o=t(50724),s=t(82555),c=t(97618),u=t(70613),a=t(92272),d=t(68899),f=t(28598);function p(e,n){var t=e.children,r=e.noPadding;return(0,f.jsx)(d.HS,{noPadding:r,ref:n,children:t})}var m=l.forwardRef(p),h=t(62547),j=t(82571),x=t(77417),g=t(46684),v=t(75375);function Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Z(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function P(e,n){e.addProjectBreadcrumbToCustomBreadcrumbs;var t=e.after,r=e.afterHeader,l=e.afterHidden,p=e.afterWidth,Z=e.afterWidthOverride,P=e.appendBreadcrumbs,y=e.before,k=e.beforeHeader,_=e.beforeWidth,O=e.breadcrumbs,C=e.children,S=e.contained,w=e.errors,I=e.headerMenuItems,E=e.headerOffset,M=e.hideAfterCompletely,A=e.mainContainerHeader,B=e.navigationItems,T=e.setAfterHidden,R=e.setAfterWidth,D=e.setBeforeWidth,N=e.setErrors,z=e.subheaderChildren,H=e.subheaderNoPadding,W=e.title,F=e.uuid,L=(0,v.Z)(F,{beforeResizeOffset:v.H,setWidthAfter:R,setWidthBefore:D,widthAfter:p,widthBefore:_,widthOverrideAfter:Z}),V=L.mainContainerRef,U=L.mousedownActiveAfter,G=L.mousedownActiveBefore,X=L.setMousedownActiveAfter,q=L.setMousedownActiveBefore,J=L.setWidthAfter,K=L.setWidthBefore,Y=L.widthAfter,Q=L.widthBefore,$=(0,x.Z)().project,ee=[];return O&&ee.push.apply(ee,(0,i.Z)(O)),null!=O&&O.length&&!P||!$||null!=O&&O.length||ee.unshift({bold:!P,label:function(){return W}}),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Z,{title:W}),(0,f.jsx)(a.Z,{breadcrumbs:ee,menuItems:I}),(0,f.jsxs)(d.Nk,{ref:n,children:[0!==(null==B?void 0:B.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(j.Z,{navigationItems:B,showMore:!0})}),(0,f.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(h.Z,{after:t,afterHeader:r,afterHeightOffset:g.Mz,afterHidden:l,afterMousedownActive:U,afterWidth:Y,before:y,beforeHeader:k,beforeHeightOffset:g.Mz,beforeMousedownActive:G,beforeWidth:y?Q:d.k1,contained:S,headerOffset:E,hideAfterCompletely:!t||M,leftOffset:y?d.k1:null,mainContainerHeader:A,mainContainerRef:V,setAfterHidden:T,setAfterMousedownActive:X,setAfterWidth:J,setBeforeMousedownActive:q,setBeforeWidth:K,children:[z&&(0,f.jsx)(m,{noPadding:H,children:z}),C]})})]}),w&&(0,f.jsx)(o.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null==N?void 0:N(null)},children:(0,f.jsx)(s.Z,b(b({},w),{},{onClose:function(){return null==N?void 0:N(null)}}))})]})}var y=l.forwardRef(P)},93808:function(e,n,t){"use strict";t.d(n,{Z:function(){return C}});var r=t(77837),i=t(26304),l=t(62243),o=t(29385),s=t(80022),c=t(13692),u=t(93189),a=t(15544),d=t(82394),f=t(38860),p=t.n(f),m=t(82684),h=t(56663),j=t.n(h),x=t(40761),g=t(34661),v=t(36105),Z=t(50178),b=t(69419),P=t(28598),y=["auth"];function k(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 _(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?k(Object(t),!0).forEach((function(n){(0,d.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function O(e){var n=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 t,r=(0,a.Z)(e);if(n){var i=(0,a.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,u.Z)(this,t)}}function C(e){return function(n){(0,c.Z)(a,n);var t,u=O(a);function a(){var e;(0,l.Z)(this,a);for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return e=u.call.apply(u,[this].concat(t)),(0,d.Z)((0,s.Z)(e),"state",{auth:new x.Z(e.props.token)}),e}return(0,o.Z)(a,[{key:"componentDidMount",value:function(){this.setState({auth:new x.Z(this.props.token)})}},{key:"render",value:function(){var n=this.props,t=(n.auth,(0,i.Z)(n,y));return(0,P.jsx)(e,_({auth:this.state.auth},t))}}],[{key:"getInitialProps",value:(t=(0,r.Z)(p().mark((function n(t){var r,i,l,o,s,c,u,a,d;return p().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=j()(t),i=(0,Z.ex)(t),l=i.id,o=r[g.Mv],s=r[v.qt],c=new x.Z(o),u=_(_({},t),{},{auth:c,currentGroupId:l,theme:s}),(0,Z.YB)(t)&&c.isExpired&&(console.log("OAuth token has expired."),a=_(_({},t.query),{},{redirect_url:t.asPath}),(0,b.nL)("/sign-in?".concat((0,b.uM)(a)),t.res)),!e.getInitialProps){n.next=12;break}return n.next=10,e.getInitialProps(u);case 10:return d=n.sent,n.abrupt("return",_(_({},d),{},{auth:c,currentGroupId:l,theme:s}));case 12:return n.abrupt("return",u);case 13:case"end":return n.stop()}}),n)}))),function(e){return t.apply(this,arguments)})}]),a}(m.Component)}},4910:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return qe}});var r=t(77837),i=t(38860),l=t.n(i),o=t(82684),s=t(82394),c=t(75582),u=t(83455),a=t(71180),d=t(92083),f=t.n(d),p=t(21764),m=t(28071),h=t(15338),j=t(55485),x=t(85854),g=t(97618),v=t(38276),Z=t(30160),b=t(70515),P=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,s.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 _=function(e){var n=e.rows;return(0,P.jsx)(P.Fragment,{children:null==n?void 0:n.map((function(e){var n=e.key,t=e.textProps,r=e.value;return(0,P.jsxs)("div",{children:[(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsx)(j.ZP,{flexDirection:"column",children:(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:n})}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,justifyContent:"flex-end",children:(0,P.jsx)(Z.ZP,k(k({default:!0,large:!0},t),{},{children:r}))})]})})]},n)}))})},O=t(65956),C=t(4190),S=t(75499),w=t(69650),I=t(35686),E=t(72473),M=t(3917),A=t(9518),B=t(44897),T=A.default.div.withConfig({displayName:"indexstyle__SubheaderStyle",componentId:"sc-169asq7-0"})(["position:sticky;top:0;z-index:1;",""],(function(e){return"\n background-color: ".concat((e.theme.background||B.Z.background).codeArea,";\n ")})),R=t(81728);function D(e){var n;if(null==e||!e.length)return null;var t=null==e?void 0:e[0],r=null===(n=Object.keys(t||{}))||void 0===n?void 0:n.map((function(e){return{uuid:(0,R.vg)(e)}}));return(0,P.jsx)(S.Z,{columnFlex:null==r?void 0:r.map((function(e,n){return 0===n?null:1})),columns:r,rows:null==e?void 0:e.map((function(e){return Object.entries(e||{}).map((function(e){var n=(0,c.Z)(e,2),t=n[0],r=n[1];return[(0,P.jsx)(Z.ZP,{default:!0,monospace:!0,children:r},t)]}))}))})}var N=t(72619),z=t(95924),H=t(42122),W=t(70320),F=t(23780);function L(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function V(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var U=2*b.iI,G={default:!0,monospace:!0};var X=function(e){var n=e.clusters,t=e.computeService,r=e.fetchAll,i=e.includeAllStates,l=e.loading,s=e.setIncludeAllStates,d=(0,o.useMemo)((function(){return"".concat(null==t?void 0:t.uuid,"/clusters")}),[t]),g=(0,W.qB)(),y=(0,o.useState)(null),k=y[0],A=y[1],B=(0,F.VI)(null,{},[],{uuid:d}),L=(0,c.Z)(B,1)[0],X=(0,u.Db)(I.ZP.compute_clusters.compute_services.useCreate(null==t?void 0:t.uuid),{onSuccess:function(e){return(0,N.wD)(e,{callback:function(){r().then((function(){return A(0)}))},onErrorCallback:function(e,n){return L({errors:n,response:e})}})}}),q=(0,c.Z)(X,2),J=q[0],K=q[1].isLoading,Y=(0,u.Db)((function(e){return I.ZP.compute_clusters.compute_services.useDelete(null==t?void 0:t.uuid,null==e?void 0:e.id)()}),{onSuccess:function(e){return(0,N.wD)(e,{callback:function(){r().then((function(){return A(null)}))},onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.exception,i=n.message,l=n.type;p.Am.error((null==t?void 0:t.error)||r||i,{position:p.Am.POSITION.BOTTOM_RIGHT,toastId:l})}})}}),Q=(0,c.Z)(Y,2),$=Q[0],ee=Q[1].isLoading,ne=(0,u.Db)((function(e){return I.ZP.compute_clusters.compute_services.useUpdate(null==t?void 0:t.uuid,null==e?void 0:e.id)({compute_cluster:(0,H.GL)(e,["active"])})}),{onSuccess:function(e){return(0,N.wD)(e,{callback:function(){r()},onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.exception,i=n.message,l=n.type;p.Am.error((null==t?void 0:t.error)||r||i,{position:p.Am.POSITION.BOTTOM_RIGHT,toastId:l})}})}}),te=(0,c.Z)(ne,2),re=te[0],ie=te[1].isLoading,le=(0,o.useMemo)((function(){return(null==n?void 0:n.length)||0}),[n]),oe=(0,o.useMemo)((function(){return(0,P.jsx)(a.ZP,{beforeIcon:(0,P.jsx)(E.WorkspacesUsersIcon,{size:U}),compact:le>=1,loading:K,onClick:function(){return J()},primary:!0,small:le>=1,children:"Launch new cluster"})}),[le,J,K]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(T,{children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,P.jsxs)(j.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,P.jsx)(x.Z,{level:4,children:(0,R._6)("cluster",le,!0)}),s&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(w.Z,{checked:i,compact:!0,onCheck:function(e){return s(e(i))}}),(0,P.jsx)(v.Z,{mr:1}),(0,P.jsx)(Z.ZP,{default:i,muted:!i,small:!0,children:"Include terminated clusters"})]})]}),(0,P.jsx)(v.Z,{mr:b.cd}),le>=1&&oe]})}),(0,P.jsx)(h.Z,{light:!0})]}),(0,P.jsx)(S.Z,{apiForFetchingAfterAction:I.ZP.compute_clusters.compute_services.detail,buildApiOptionsFromObject:function(e){return[null==t?void 0:t.uuid,null==e?void 0:e.id,{},{refreshInterval:3e3,revalidateOnFocus:!0}]},columnFlex:[null,null,null,null,null],columns:[{uuid:"Cluster ID"},{uuid:"Cluster Name"},{uuid:"Status"},{uuid:"Created"},{center:!0,uuid:"Hours"},{label:function(){return""},rightAligned:!0,uuid:"Active"}],onClickRow:function(e,n){A((function(n){return n===e?null:e}))},renderExpandedRowWithObject:function(e,n){var t,r,i,l,o=null==n||null===(t=n.compute_cluster)||void 0===t?void 0:t.cluster;if(!o)return(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(C.Z,{inverted:!0})});var s=o.active,c=o.applications,u=o.ec2_instance_attributes,d=o.name,p=o.status,y=o.tags,k=null==p?void 0:p.state,S=[m.X.TERMINATED,m.X.TERMINATED_WITH_ERRORS,m.X.TERMINATING].includes(k),w=[m.X.RUNNING,m.X.WAITING].includes(k),I=null==p||null===(r=p.timeline)||void 0===r?void 0:r.creation_date_time;return(0,P.jsxs)(v.Z,{p:b.cd,children:[!S&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(x.Z,{level:4,children:"Actions"})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{children:[w&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(a.ZP,{beforeIcon:(0,P.jsx)(E.PowerOnOffButton,{size:U,success:s}),loading:ie,notClickable:s,onClick:s?null:function(){return re(V(V({},o),{},{active:!0}))},primary:!s,children:s?"Activated":"Activate cluster for compute"}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(a.ZP,{loading:ee,onClick:function(){window.confirm("Are you sure you want to terminate this cluster?")&&$(o)},secondary:!0,children:"Terminate cluster"})]}),!w&&(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsx)(C.Z,{inverted:!0,small:!0}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:(null==p||null===(i=p.state_change_reason)||void 0===i?void 0:i.message)||"Cluster is still launching."})]})]})})]}),(0,P.jsx)(v.Z,{mb:b.cd})]}),(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(x.Z,{level:4,children:"Details"})}),(0,P.jsx)(_,{rows:[{key:"ID",textProps:{monospace:!0},value:null==o?void 0:o.id},{key:"Name",value:d},{key:"Master public DNS name",value:(null==o?void 0:o.master_public_dns_name)||"Available after cluster starts."},{key:"Created at",textProps:{monospace:!0},value:I?(0,M.XG)(f()(I).format(M.BL),g):"-"},{key:"Status message",value:(null==p||null===(l=p.state_change_reason)||void 0===l?void 0:l.message)||"None"},{key:"Release label",textProps:{monospace:!0},value:null==o?void 0:o.release_label},{key:"Service role",textProps:{monospace:!0},value:null==o?void 0:o.service_role},{key:"Scale down behavior",value:null!=o&&o.scale_down_behavior?(0,R.vg)(null==o?void 0:o.scale_down_behavior):null==o?void 0:o.scale_down_behavior},{key:"Auto terminate",value:null!=o&&o.auto_terminate?(0,P.jsx)(E.Check,{size:U,success:!0}):(0,P.jsx)(E.Close,{danger:!0,size:U})},{key:"Termination protected",value:null!=o&&o.termination_protected?(0,P.jsx)(E.Check,{size:U,success:!0}):(0,P.jsx)(E.Close,{danger:!0,size:U})},{key:"Visible to all users",value:null!=o&&o.visible_to_all_users?(0,P.jsx)(E.Check,{size:U,success:!0}):(0,P.jsx)(E.Close,{danger:!0,size:U})},{key:"EBS root volume size",textProps:{monospace:!0},value:null==o?void 0:o.ebs_root_volume_size},{key:"Normalized instance hours",textProps:{monospace:!0},value:null==o?void 0:o.normalized_instance_hours},{key:"Step concurrency level",textProps:{monospace:!0},value:null==o?void 0:o.step_concurrency_level}]})]}),(0,P.jsx)(v.Z,{mb:b.cd}),(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(x.Z,{level:4,children:"EC2 instance attributes"})}),(0,P.jsx)(_,{rows:[{key:"Availability zone",textProps:{monospace:!0},value:null==u?void 0:u.ec2_availability_zone},{key:"Master security group",textProps:{monospace:!0},value:null==u?void 0:u.emr_managed_master_security_group},{key:"Slave security group",textProps:{monospace:!0},value:null==u?void 0:u.emr_managed_slave_security_group},{key:"IAM profile",textProps:{monospace:!0},value:null==u?void 0:u.iam_instance_profile}]})]}),(0,P.jsx)(v.Z,{mb:b.cd}),(0,P.jsxs)(j.ZP,{children:[(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{px:b.cd,py:b.cd,children:(0,P.jsx)(x.Z,{level:4,children:"Applications"})}),(0,P.jsx)(h.Z,{light:!0,short:!0}),D(c||[])]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{px:b.cd,py:b.cd,children:(0,P.jsx)(x.Z,{level:4,children:"Tags"})}),(0,P.jsx)(h.Z,{light:!0,short:!0}),D(y||[])]})]})]})},getObjectAtRowIndex:function(e){return null==n?void 0:n[e]},rows:null==n?void 0:n.map((function(e){var n,t,r=e.active,i=e.id,l=e.name,s=e.normalized_instance_hours,c=e.status,u=null==c||null===(n=c.timeline)||void 0===n?void 0:n.creation_date_time,d=null==c?void 0:c.state,p=null==c||null===(t=c.state_change_reason)||void 0===t?void 0:t.message,h=[m.X.BOOTSTRAPPING,m.X.STARTING].includes(d),x=[m.X.TERMINATING].includes(d);return[(0,o.createElement)(Z.ZP,V(V({},G),{},{key:"id",success:r}),i),(0,o.createElement)(Z.ZP,V(V({},G),{},{key:"name",monospace:!1,preWrap:!0}),l),(0,P.jsxs)("div",{children:[(0,P.jsx)(Z.ZP,V(V({},G),{},{danger:[m.X.TERMINATED_WITH_ERRORS].includes(d),default:[m.X.STARTING].includes(d),muted:[m.X.TERMINATED].includes(d),success:[m.X.RUNNING,m.X.WAITING].includes(d),warning:[m.X.TERMINATING].includes(d),children:null!=c&&c.state?(0,R.vg)(null==c?void 0:c.state):null==c?void 0:c.state})),p&&(0,P.jsx)(Z.ZP,{muted:!0,preWrap:!0,small:!0,children:p})]},"state"),(0,o.createElement)(Z.ZP,V(V({},G),{},{key:"created",preWrap:!0}),u?(0,M.XG)(f()(u).format(M.BL),g):"-"),(0,o.createElement)(Z.ZP,V(V({},G),{},{center:!0,key:"normalizedInstanceHours"}),s||0),(0,P.jsx)(j.ZP,{justifyContent:"flex-end",children:h||x?(0,P.jsx)(C.Z,{inverted:h,small:!0}):(0,P.jsx)(a.ZP,{iconOnly:!0,loading:ie,noBackground:!0,noBorder:!0,noPadding:!0,notClickable:r,onClick:r?null:function(n){(0,z.j)(n),re(V(V({},e),{},{active:!0}))},children:(0,P.jsx)(E.PowerOnOffButton,{muted:!r,size:U,success:r})})},"active")]})),selectedRowIndexInternal:k,uuid:d}),l&&(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(C.Z,{inverted:!0})}),!l&&!le&&(0,P.jsx)(v.Z,{p:b.cd,children:oe})]})},q=t(48670),J=t(90299),K=t(89308),Y=t(74521),Q=t(93004),$=t(8970);function ee(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ne(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ee(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ee(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var te="Applications",re="Connections",ie="Jobs",le="SQLs";var oe=function(e){var n,t=e.applications,r=e.computeConnections,i=e.computeService,l=e.connectionsLoading,s=e.fetchAll,c=e.jobs,u=e.loadingApplications,a=e.loadingJobs,d=(e.objectAttributes,e.refButtonTabs),f=(e.selectedComputeService,e.setSelectedSql),p=e.setSelectedTab,m=(0,o.useContext)(A.ThemeContext),j=(0,o.useState)(),x=j[0],g=j[1],y=(0,o.useCallback)((function(e){f((function(){return null})),g(e)}),[f,g]),k=(0,W.qB)(),_=I.ZP.spark_stages.list({details:!0,_format:"with_details"}).data,O=(0,o.useMemo)((function(){return((null==_?void 0:_.spark_stages)||[]).reduce((function(e,n){var t=null==n?void 0:n.application;return(null==t?void 0:t.calculated_id)in e||(e[null==t?void 0:t.calculated_id]={}),e[null==t?void 0:t.calculated_id][null==n?void 0:n.stage_id]=n,e}),{})}),[_]),C=(0,o.useMemo)((function(){return(0,P.jsx)(K.Z,{computeService:i,computeConnections:r,fetchAll:s,onClickStep:function(e){return p((function(){return{main:e}}))}})}),[r,i,s,p]),w=(0,o.useMemo)((function(){return(0,P.jsx)(S.Z,{columnFlex:[null,null,null,null,null,null,null],columns:[{uuid:"ID"},{uuid:"URL"},{uuid:"Name"},{uuid:"Version"},{uuid:"Spark user"},{uuid:"Started at"},{rightAligned:!0,uuid:"Last updated"}],rows:null==t?void 0:t.map((function(e){var n=e.attempts,t=e.id,r=e.name,i=e.spark_ui_url,l=(null==n?void 0:n[0])||{},s=l.app_spark_version,c=l.last_updated_epoch,u=l.start_time_epoch,a=l.spark_user,d=u&&(0,M.JX)(u/1e3,{withSeconds:!0}),f=d&&(0,M.XG)(d,k);return[(0,o.createElement)(Z.ZP,ne(ne({},$.eB),{},{key:"id"}),t),(0,o.createElement)(Z.ZP,ne(ne({},$.eB),{},{key:"sparkUIURL"}),i),(0,o.createElement)(Z.ZP,ne(ne({},$.eB),{},{key:"name"}),r),(0,o.createElement)(Z.ZP,ne(ne({},$.eB),{},{key:"version"}),s),(0,o.createElement)(Z.ZP,ne(ne({},$.eB),{},{key:"sparkUser"}),a),(0,o.createElement)(Z.ZP,ne(ne({},$.eB),{},{key:"startTime"}),f||"-"),(0,o.createElement)(Z.ZP,ne(ne({},$.eB),{},{key:"lastUpdated",rightAligned:!0}),c?(0,M.XG)((0,M.JX)(c/1e3,{withSeconds:!0}),k):"-")]})),uuid:"applications"})}),[t,k]),E=(0,o.useMemo)((function(){var e={};return null==c||c.forEach((function(n){var t,r,i=null==n?void 0:n.application;(null==i?void 0:i.calculated_id)in e||(e[null==i?void 0:i.calculated_id]={application:i,jobs:[]}),null===(t=e[null==i?void 0:i.calculated_id])||void 0===t||null===(r=t.jobs)||void 0===r||r.push(n)})),Object.values(e).map((function(e){var n=e.application,t=e.jobs;return(0,P.jsxs)("div",{children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(Z.ZP,{default:!0,bold:!0,children:["Application ",null==n?void 0:n.calculated_id]})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(Y.Z,{jobs:t,stagesMapping:O})]},null==n?void 0:n.calculated_id)}))}),[c,O]),B=(0,o.useMemo)((function(){return(0,P.jsx)(Q.Z,{setSelectedSql:f,stagesMapping:O})}),[f,O]),T=(0,o.useMemo)((function(){var e=[{label:function(){return(0,P.jsxs)(P.Fragment,{children:[te,"   ",u?"":(null==t?void 0:t.length)||0]})},uuid:te},{label:function(){return(0,P.jsxs)(P.Fragment,{children:[ie,"   ",a?"":(null==c?void 0:c.length)||0]})},uuid:ie},{label:function(){return le},uuid:le}];return(null==r?void 0:r.length)>=1&&e.unshift({label:function(){return re},uuid:re}),e}),[r,s]);return(0,o.useEffect)((function(){x||l||((null==r?void 0:r.length)>=1?y(re):y(te))}),[r,l,x,y]),(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(v.Z,{px:b.cd,children:(0,P.jsx)(J.Z,{noPadding:!0,onClickTab:function(e){var n=e.uuid;return y(n)},ref:d,regularSizeText:!0,selectedTabUUID:x,tabs:T,underlineColor:null==m||null===(n=m.accent)||void 0===n?void 0:n.blue,underlineStyle:!0})}),(0,P.jsx)(h.Z,{light:!0}),re===x&&C,te===x&&w,ie===x&&E,le===x&&B]})},se=t(17488),ce=t(8193);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 ae(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,s.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}var de=function(e){var n=e.addButtonText,t=e.addTextInputPlaceholder,r=e.alreadyExistsMessage,i=e.configurationValuePlaceholder,l=e.configurations,u=e.createButtonText,d=e.description,f=e.emptyState,p=e.setConfigurations,m=e.title,y=(0,o.useRef)(null),k=(0,o.useState)(!1),_=k[0],C=k[1],S=(0,o.useState)(null),w=S[0],I=S[1],M=(0,o.useMemo)((function(){var e;return(null===(e=Object.keys(l||{}))||void 0===e?void 0:e.length)>=1}),[l]),A=(0,o.useMemo)((function(){return w in(l||{})}),[l,w]),B=(0,o.useMemo)((function(){return(0,P.jsxs)(j.ZP,{alignItems:"center",children:[!_&&(0,P.jsx)(a.ZP,{beforeIcon:(0,P.jsx)(E.Add,{}),compact:!0,onClick:function(e){(0,z.j)(e),C(!0),setTimeout((function(){var e;return null==y||null===(e=y.current)||void 0===e?void 0:e.focus()}),1)},secondary:!M,small:!0,children:n||"Add configuration"}),_&&(0,P.jsxs)(P.Fragment,{children:[A&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Z.ZP,{danger:!0,small:!0,children:r||"Already exists"}),(0,P.jsx)(v.Z,{mr:1})]}),(0,P.jsx)(se.Z,{autoComplete:"off",compact:!0,meta:{touched:!!A,error:""},monospace:!0,onClick:function(e){return(0,z.j)(e)},paddingVertical:b.iI/2-2,placeholder:t,onChange:function(e){(0,z.j)(e),I(e.target.value)},ref:y,small:!0,value:w||""}),(0,P.jsx)(v.Z,{mr:1}),(0,P.jsx)(a.ZP,{disabled:A,compact:!0,onClick:function(e){(0,z.j)(e),A||(p(ae(ae({},l),{},(0,s.Z)({},w,""))),C(!1),I(null))},primary:!0,small:!0,children:u||"Create configuration"}),(0,P.jsx)(v.Z,{mr:1}),(0,P.jsx)(a.ZP,{compact:!0,onClick:function(e){(0,z.j)(e),C(!1),I(null)},secondary:!0,small:!0,children:"Cancel"})]})]})}),[n,A,l,M,_,w,y,C,I]),T=(0,o.useMemo)((function(){return Object.entries(l||{}).map((function(e){var n=(0,c.Z)(e,2),t=n[0],r=n[1];return(0,P.jsxs)("div",{children:[(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsx)(a.ZP,{iconOnly:!0,noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){var e=ae({},l);null==e||delete e[t],p(e)},children:(0,P.jsx)(E.Trash,{default:!0,size:ce.Z})}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(Z.ZP,{default:!0,large:!0,monospace:!0,children:t}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,fullWidth:!0,large:!0,monospace:!0,noBackground:!0,noBorder:!0,onChange:function(e){return p(ae(ae({},l),{},(0,s.Z)({},t,e.target.value)))},paddingHorizontal:0,paddingVertical:0,placeholder:i,value:r||""})})]})})]},t)}))}),[l,p]);return(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,P.jsxs)(g.Z,{flex:1,flexDirection:"column",children:[(0,P.jsx)(x.Z,{level:4,children:m}),d&&(0,P.jsx)(v.Z,{mt:1,children:d})]}),(0,P.jsx)(v.Z,{mr:b.cd}),M&&(0,P.jsx)(j.ZP,{alignItems:"center",children:B})]})}),!M&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(h.Z,{light:!0}),(0,P.jsxs)(v.Z,{p:b.cd,children:[f&&(0,P.jsx)(v.Z,{mb:b.cd,children:(0,P.jsx)(Z.ZP,{default:!0,children:f})}),(0,P.jsx)(j.ZP,{alignItems:"center",children:B})]})]}),M&&T]})},fe=t(74260);function pe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function me(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?pe(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):pe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var he=function(e){var n,t=e.attributesTouched,r=e.isLoading,i=e.mutateObject,l=e.objectAttributes,s=e.onCancel,c=e.selectedComputeService,u=e.setObjectAttributes,d=(0,o.useCallback)((function(e){return u({emr_config:me(me({},null==l?void 0:l.emr_config),e)})}),[l,u]),f=(0,o.useCallback)((function(e){return u({spark_config:me(me({},null==l?void 0:l.spark_config),e)})}),[l,u]),p=(0,o.useMemo)((function(){return(null==l?void 0:l.emr_config)||{}}),[l]),m=(0,o.useMemo)((function(){return(null==l?void 0:l.spark_config)||{}}),[l]);return(0,P.jsxs)(ce.N,{children:[(0,P.jsx)(de,{addButtonText:"Add Spark configuration",addTextInputPlaceholder:"e.g. spark.driver.cores",alreadyExistsMessage:"Spark configuration exists",configurationValuePlaceholder:"e.g. 4g",configurations:null==m?void 0:m.others,createButtonText:"Create Spark configuration",description:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(Z.ZP,{muted:!0,children:["List of key-value pairs to be set in ",(0,P.jsx)(Z.ZP,{inline:!0,monospace:!0,muted:!0,children:"SparkConf"}),", e.g. ",(0,P.jsx)(Z.ZP,{inline:!0,monospace:!0,muted:!0,children:"spark.executor.memory=4g"}),"."]}),(0,P.jsxs)(Z.ZP,{muted:!0,children:["For a list of all configurations, see the ",(0,P.jsx)(q.Z,{href:"https://spark.apache.org/docs/latest/configuration.html",inline:!0,openNewWindow:!0,children:"Spark configuration documentation"}),"."]})]}),emptyState:"There are currently no executor Spark configurations.",setConfigurations:function(e){return f({others:e})},title:"Spark configurations"}),(0,P.jsx)(v.Z,{mb:b.HN}),fe.GO.AWS_EMR===c&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(j.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,P.jsxs)(g.Z,{flex:1,flexDirection:"column",children:[(0,P.jsx)(x.Z,{level:4,warning:!(null!=p&&p.ec2_key_name&&null!=p&&p.ec2_key_path),children:"Spark observability"}),(!(null!=p&&p.ec2_key_name)||!(null!=p&&p.ec2_key_path))&&"ec2_key_name"in((null==t?void 0:t.emr_config)||{})&&"ec2_key_path"in((null==t?void 0:t.emr_config)||{})&&(0,P.jsx)(P.Fragment,{children:(0,P.jsx)(v.Z,{mt:1,children:(0,P.jsxs)(Z.ZP,{warning:!0,children:["Without all the fields in this section present and valid, Mage won’t automatically create the SSH tunnel.",(0,P.jsx)("br",{}),"You must manually create the SSH tunnel in order for Mage to retrieve and display the Spark jobs, statuses, metrics, and system information."]})})}),(0,P.jsx)(v.Z,{mt:1,children:(0,P.jsxs)(Z.ZP,{muted:!0,children:["In order to see the Spark jobs, statuses, metrics, and system information, an SSH tunnel to the AWS EMR Master Node must be created.",(0,P.jsx)("br",{}),"Mage can automatically create the SSH tunnel for you if every field in this section is present and valid."]})}),(0,P.jsx)(v.Z,{mt:1,children:(0,P.jsx)(Z.ZP,{muted:!0})})]})})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsxs)(j.ZP,{flexDirection:"column",children:[(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:"EC2 key name"}),(0,P.jsxs)(Z.ZP,{muted:!0,small:!0,children:["SSH tunnel into the EMR cluster using a key pair created from the ",(0,P.jsx)(q.Z,{href:"https://console.aws.amazon.com/ec2/home#KeyPairs",inline:!0,openNewWindow:!0,small:!0,children:"AWS guide"}),"."]})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return d({ec2_key_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. ec2_key_pair_name",value:(null==p?void 0:p.ec2_key_name)||""})})]})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsxs)(j.ZP,{flexDirection:"column",children:[(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:"EC2 key path"}),(0,P.jsx)(Z.ZP,{muted:!0,small:!0,children:"The absolute file path to the EC2 public key that was used when creating a cluster."})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,autoComplete:"off",large:!0,monospace:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return d({ec2_key_path:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. ec2_key_pair_name",value:(null==p?void 0:p.ec2_key_path)||""})})]})})]}),(0,P.jsx)(v.Z,{mb:b.HN}),(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(j.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,P.jsxs)(g.Z,{flex:1,flexDirection:"column",children:[(0,P.jsx)(x.Z,{level:4,children:"EMR instance types"}),(0,P.jsx)(v.Z,{mt:1,children:(0,P.jsxs)(Z.ZP,{muted:!0,children:["Refer to the ",(0,P.jsx)(q.Z,{href:"https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-supported-instance-types.html",openNewWindow:!0,children:"AWS EMR"})," documentation for all supported EMR instance types."]})})]})})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsx)(j.ZP,{flexDirection:"column",children:(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:"Master instance type"})}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return d({master_instance_type:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. r5.4xlarge",value:(null==p?void 0:p.master_instance_type)||""})})]})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsx)(j.ZP,{flexDirection:"column",children:(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:"Slave instance type"})}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return d({slave_instance_type:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. r5.2xlarge",value:(null==p?void 0:p.slave_instance_type)||""})})]})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsx)(j.ZP,{flexDirection:"column",children:(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:"Number of slave instances"})}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){var n=e.target.value||"";(""===n||/^\d+$/.exec(n))&&d({slave_instance_count:n})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. 2",value:(null==p?void 0:p.slave_instance_count)||""})})]})})]}),(0,P.jsx)(v.Z,{mb:b.HN}),(0,P.jsx)(de,{addButtonText:"Add Spark configuration",addTextInputPlaceholder:"e.g. spark.driver.cores",alreadyExistsMessage:"Spark configuration exists",configurationValuePlaceholder:"e.g. 4g",configurations:null==p?void 0:p.master_spark_properties,createButtonText:"Create Spark configuration",description:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(Z.ZP,{muted:!0,children:["List of key-value pairs to be set in ",(0,P.jsx)(Z.ZP,{inline:!0,monospace:!0,muted:!0,children:"SparkConf"})," for the master instance."]}),(0,P.jsxs)(Z.ZP,{muted:!0,children:["For a list of all configurations, see the ",(0,P.jsx)(q.Z,{href:"https://spark.apache.org/docs/latest/configuration.html",inline:!0,openNewWindow:!0,children:"Spark configuration documentation"}),"."]})]}),emptyState:"There are currently no Spark configurations for the master instance.",setConfigurations:function(e){return d({master_spark_properties:e})},title:"Master Spark configurations"}),(0,P.jsx)(v.Z,{mb:b.HN}),(0,P.jsx)(de,{addButtonText:"Add Spark configuration",addTextInputPlaceholder:"e.g. spark.driver.cores",alreadyExistsMessage:"Spark configuration exists",configurationValuePlaceholder:"e.g. 4g",configurations:null==p?void 0:p.slave_spark_properties,createButtonText:"Create Spark configuration",description:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(Z.ZP,{muted:!0,children:["List of key-value pairs to be set in ",(0,P.jsx)(Z.ZP,{inline:!0,monospace:!0,muted:!0,children:"SparkConf"})," for the slave instance."]}),(0,P.jsxs)(Z.ZP,{muted:!0,children:["For a list of all configurations, see the ",(0,P.jsx)(q.Z,{href:"https://spark.apache.org/docs/latest/configuration.html",inline:!0,openNewWindow:!0,children:"Spark configuration documentation"}),"."]})]}),emptyState:"There are currently no Spark configurations for the slave instance.",setConfigurations:function(e){return d({slave_spark_properties:e})},title:"Slave Spark configurations"}),(0,P.jsx)(v.Z,{mb:b.HN}),(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(j.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,P.jsxs)(g.Z,{flex:1,flexDirection:"column",children:[(0,P.jsx)(x.Z,{level:4,children:"Security"}),(0,P.jsx)(v.Z,{mt:1,children:(0,P.jsx)(Z.ZP,{muted:!0,children:"Configure security groups for EMR cluster instances."})})]})})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsxs)(j.ZP,{flexDirection:"column",children:[(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:"Master security group"}),(0,P.jsxs)(Z.ZP,{muted:!0,small:!0,children:["The default managed security group is ",(0,P.jsx)(Z.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:"ElasticMapReduce-master"}),"."]})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return d({master_security_group:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. sg-xxxxxxxxxxxx",value:(null==p?void 0:p.master_security_group)||""})})]})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsxs)(j.ZP,{flexDirection:"column",children:[(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:"Slave security group"}),(0,P.jsxs)(Z.ZP,{muted:!0,small:!0,children:["The default managed security group is ",(0,P.jsx)(Z.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:"ElasticMapReduce-slave"}),"."]})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,autoComplete:"off",large:!0,noBackground:!0,noBorder:!0,fullWidth:!0,onChange:function(e){return d({slave_security_group:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. sg-yyyyyyyyyyyy",value:(null==p?void 0:p.slave_security_group)||""})})]})})]}),(0,P.jsx)(v.Z,{mb:b.HN})]}),(0,P.jsxs)(j.ZP,{children:[(0,P.jsx)(a.ZP,{beforeIcon:(0,P.jsx)(E.Save,{}),disabled:!t||!(null!==(n=Object.keys(t))&&void 0!==n&&n.length),loading:r,onClick:function(){return i()},primary:!0,children:"Save changes"}),s&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(a.ZP,{onClick:function(){return null==s?void 0:s()},secondary:!0,children:"Cancel and go back"})]})]})]})},je=t(77456),xe=t(86735);function ge(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 ve(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ge(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ge(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ze=function(e){var n,t,r=e.attributesTouched,i=e.computeService,l=e.isLoading,s=e.mutateObject,c=e.objectAttributes,u=e.onCancel,d=e.selectedComputeService,f=e.setObjectAttributes,p=(0,o.useCallback)((function(e){return f({emr_config:ve(ve({},null==c?void 0:c.emr_config),e)})}),[c,f]),m=(0,o.useCallback)((function(e){return f({spark_config:ve(ve({},null==c?void 0:c.spark_config),e)})}),[c,f]),y=(0,o.useMemo)((function(){return(null==c?void 0:c.emr_config)||{}}),[c]),k=(0,o.useMemo)((function(){return(null==c?void 0:c.spark_config)||{}}),[c]),_=(0,o.useRef)(null),C=(0,o.useState)(!1),S=C[0],I=C[1],M=(0,o.useState)(null),A=M[0],B=M[1],T=(0,o.useMemo)((function(){return((null==k?void 0:k.spark_jars)||[]).map((function(e){return{config:$.Ts.SPARK,value:e}}))}),[k]),R=(0,o.useMemo)((function(){return((null==y?void 0:y.spark_jars)||[]).map((function(e){return{config:$.Ts.EMR,value:e}}))}),[y]),D=(0,o.useMemo)((function(){return T.concat(R)}),[R,T]),N=(0,o.useMemo)((function(){return(null==D?void 0:D.length)>=1}),[D]),H=(0,o.useMemo)((function(){return(D||[]).some((function(e){return e.value===A}))}),[D,A]),W=(0,o.useMemo)((function(){return(0,P.jsxs)(j.ZP,{alignItems:"center",children:[!S&&(0,P.jsx)(a.ZP,{beforeIcon:(0,P.jsx)(E.Add,{}),compact:!0,onClick:function(e){(0,z.j)(e),I(!0),setTimeout((function(){var e;return null==_||null===(e=_.current)||void 0===e?void 0:e.focus()}),1)},secondary:!N,small:!0,children:"Add JAR file"}),S&&(0,P.jsxs)(P.Fragment,{children:[H&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Z.ZP,{danger:!0,small:!0,children:"JAR file exists"}),(0,P.jsx)(v.Z,{mr:1})]}),(0,P.jsx)(se.Z,{autoComplete:"off",compact:!0,meta:{error:"",touched:!!H},minWidth:30*b.iI,monospace:!0,onChange:function(e){(0,z.j)(e),B(e.target.value)},onClick:function(e){return(0,z.j)(e)},paddingVertical:b.iI/2-2,placeholder:"e.g. /home/path/example1.jar",ref:_,small:!0,value:A||""}),(0,P.jsx)(v.Z,{mr:1}),(0,P.jsx)(a.ZP,{compact:!0,disabled:H,onClick:function(e){if((0,z.j)(e),!H){if(d===fe.GO.AWS_EMR){var n=R.map((function(e){return e.value})).concat(A);p({spark_jars:n})}else{var t=T.map((function(e){return e.value})).concat(A);m({spark_jars:t})}I(!1),B(null)}},primary:!0,small:!0,children:"Add JAR file"}),(0,P.jsx)(v.Z,{mr:1}),(0,P.jsx)(a.ZP,{compact:!0,onClick:function(e){(0,z.j)(e),I(!1),B(null)},secondary:!0,small:!0,children:"Cancel"})]})]})}),[S,N,H,A,R,d,p,T,m]),F=(0,o.useMemo)((function(){return null==D?void 0:D.map((function(e,n){var t=e.config,r=e.value;return(0,P.jsxs)("div",{children:[(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsx)(a.ZP,{iconOnly:!0,noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){if(t===$.Ts.EMR){var e=R.map((function(e){return e.value}));p({spark_jars:(0,xe.oM)(e,n-T.length)})}else{var r=T.map((function(e){return e.value}));m({spark_jars:(0,xe.oM)(r,n)})}},children:(0,P.jsx)(E.Trash,{default:!0,size:ce.Z})}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsxs)(Z.ZP,{default:!0,large:!0,monospace:!0,children:["File ",n+1," (",t,")"]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,justifyContent:"flex-end",children:(0,P.jsx)(Z.ZP,{large:!0,monospace:!0,children:r})})]})})]},r)}))}),[D,R,p,m,T]),L=(0,o.useMemo)((function(){var e="remote_variables_dir",n=null==i?void 0:i.setup_steps,t=null==n?void 0:n.find((function(n){return n.uuid===e}));return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"flex-start",children:[(0,P.jsxs)(j.ZP,{flexDirection:"column",children:[(0,P.jsxs)(Z.ZP,{danger:!(null!=c&&c[e]&&(null==t||!t.error)),default:!0,large:!0,children:["Remote variables directory ",!(null!=c&&c[e])&&(0,P.jsx)(Z.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,P.jsx)(Z.ZP,{muted:!0,small:!0,children:"This S3 bucket will be used by Spark."})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsxs)(g.Z,{flex:1,flexDirection:"column",children:[(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,fullWidth:!0,large:!0,monospace:!0,noBackground:!0,noBorder:!0,onChange:function(e){return f({remote_variables_dir:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. s3://magically-powerful-bucket",value:(null==c?void 0:c.remote_variables_dir)||""}),(null==t?void 0:t.error)&&(0,P.jsx)(j.ZP,{justifyContent:"flex-end",children:(0,P.jsx)(v.Z,{mt:1,children:(0,P.jsx)(je.Z,{error:null==t?void 0:t.error})})})]})]})})]})}),[i,c,f]);return(0,P.jsxs)(ce.N,{children:[(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(x.Z,{level:4,children:"Setup"})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsxs)(Z.ZP,{danger:"app_name"in r&&!(null!=k&&k.app_name),default:!0,large:!0,children:["Application name ","app_name"in r&&!(null!=k&&k.app_name)&&(0,P.jsx)(Z.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,autoComplete:"off",fullWidth:!0,large:!0,noBackground:!0,noBorder:!0,onChange:function(e){return m({app_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. Sparkmage",value:(null==k?void 0:k.app_name)||""})})]})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"flex-start",children:[(0,P.jsxs)(j.ZP,{flexDirection:"column",children:[(0,P.jsxs)(Z.ZP,{danger:"spark_master"in r&&!(null!=k&&k.spark_master),default:!0,large:!0,children:["Master URL ","spark_master"in r&&!(null!=k&&k.spark_master)&&(0,P.jsx)(Z.ZP,{danger:!0,inline:!0,large:!0,children:"is required"})]}),(0,P.jsx)(Z.ZP,{muted:!0,small:!0,children:"The URL for connecting to the master."})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,fullWidth:!0,large:!0,noBackground:!0,noBorder:!0,onChange:function(e){return m({spark_master:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. local, yarn, spark://host:port",value:(null==k?void 0:k.spark_master)||""})})]})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"flex-start",children:[(0,P.jsxs)(j.ZP,{flexDirection:"column",children:[(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:"Spark home directory"}),(0,P.jsx)(Z.ZP,{muted:!0,small:!0,children:"Path where Spark is installed on worker nodes."})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,fullWidth:!0,large:!0,monospace:!0,noBackground:!0,noBorder:!0,onChange:function(e){return m({spark_home:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. /usr/lib/spark",value:(null==k?void 0:k.spark_home)||""})})]})}),fe.GO.AWS_EMR===d&&L]}),(0,P.jsx)(v.Z,{mb:b.HN}),(null==i?void 0:i.connection_credentials)&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(x.Z,{level:4,children:"Credentials"})}),null==i||null===(n=i.connection_credentials)||void 0===n?void 0:n.map((function(e){var n=e.description,t=e.error,r=e.name,i=e.required,l=e.uuid,o=e.valid,s=e.value;return(0,P.jsxs)("div",{children:[(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsxs)(j.ZP,{flexDirection:"column",children:[(0,P.jsxs)(Z.ZP,{danger:!o,default:!0,large:!0,monospace:!r,children:[r||l," ",!o&&(0,P.jsx)(Z.ZP,{danger:!0,inline:!0,large:!0,children:"is invalid"})]}),n&&(0,P.jsx)(Z.ZP,{muted:!0,small:!0,children:n})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsxs)(g.Z,{flex:1,justifyContent:"flex-end",children:[!o&&(0,P.jsxs)(P.Fragment,{children:[!t&&i&&(0,P.jsx)(Z.ZP,{large:!0,muted:!0,children:"Required but missing"}),!t&&!i&&(0,P.jsx)(Z.ZP,{large:!0,muted:!0,children:"Invalid"}),t&&(0,P.jsx)(je.Z,{error:t,large:!0})]}),o&&s&&(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:s})]})]})})]},l)}))]}),(0,P.jsx)(v.Z,{mb:b.HN})]}),(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(x.Z,{level:4,children:"Customizations"})}),(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"flex-start",children:[(0,P.jsxs)(j.ZP,{flexDirection:"column",children:[(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:"Use custom session"}),(0,P.jsxs)(Z.ZP,{muted:!0,small:!0,children:["Whether to create custom SparkSession via",(0,P.jsx)("br",{}),"code and set it in ",(0,P.jsx)(Z.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:"kwargs['context']"}),"."]})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,justifyContent:"flex-end",children:(0,P.jsx)(w.Z,{checked:null==k?void 0:k.use_custom_session,compact:!0,onCheck:function(e){return m({use_custom_session:e(null==k?void 0:k.use_custom_session)})}})})]})}),(null==k?void 0:k.use_custom_session)&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(h.Z,{light:!0}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"flex-start",children:[(0,P.jsxs)(j.ZP,{flexDirection:"column",children:[(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:"Custom session variable"}),(0,P.jsxs)(Z.ZP,{muted:!0,small:!0,children:["The variable name to set in ",(0,P.jsx)(Z.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:"kwargs['context']"}),",",(0,P.jsx)("br",{}),"e.g. If variable name is ",(0,P.jsx)(Z.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:"spark"})," then the Spark session",(0,P.jsx)("br",{}),"is accessed using ",(0,P.jsx)(Z.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:"kwargs['context']['spark']"}),"."]})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,fullWidth:!0,large:!0,monospace:!0,noBackground:!0,noBorder:!0,onChange:function(e){return m({custom_session_var_name:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. spark",value:(null==k?void 0:k.custom_session_var_name)||""})})]})})]}),fe.GO.AWS_EMR===d&&(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsxs)(j.ZP,{flexDirection:"column",children:[(0,P.jsx)(Z.ZP,{default:!0,large:!0,children:"Bootstrap script path"}),(0,P.jsx)(Z.ZP,{muted:!0,small:!0,children:"Use a custom script to bootstrap the EMR cluster."})]}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(g.Z,{flex:1,children:(0,P.jsx)(se.Z,{afterIcon:(0,P.jsx)(E.Edit,{}),afterIconClick:function(e,n){var t;null==n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:ce.Z,alignRight:!0,autoComplete:"off",fullWidth:!0,large:!0,noBackground:!0,noBorder:!0,onChange:function(e){return p({bootstrap_script_path:e.target.value})},paddingHorizontal:0,paddingVertical:0,placeholder:"e.g. /path/to/emr_bootstrap.sh",value:(null==y?void 0:y.bootstrap_script_path)||""})})]})})]}),(0,P.jsx)(v.Z,{mb:b.HN}),(0,P.jsx)(de,{addButtonText:"Add environment variable",addTextInputPlaceholder:"e.g. PYTHONPATH",alreadyExistsMessage:"Environment variable exists",configurationValuePlaceholder:"e.g. /home/path",configurations:null==k?void 0:k.executor_env,createButtonText:"Create environment variable",description:(0,P.jsx)(Z.ZP,{muted:!0,children:"Environment variables for the executor."}),emptyState:"There are currently no executor environment variables.",setConfigurations:function(e){return m({executor_env:e})},title:"Environment variables"}),(0,P.jsx)(v.Z,{mb:b.HN}),(0,P.jsxs)(O.Z,{noPadding:!0,children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsx)(j.ZP,{alignItems:"flex-start",justifyContent:"space-between",children:(0,P.jsxs)(g.Z,{flex:1,flexDirection:"column",children:[(0,P.jsxs)(j.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,P.jsx)(x.Z,{level:4,children:"JAR files"}),N&&W]}),(0,P.jsx)(v.Z,{mt:1,children:(0,P.jsxs)(Z.ZP,{muted:!0,children:["These files will be uploaded to the cluster and added to the ",(0,P.jsx)(Z.ZP,{inline:!0,monospace:!0,muted:!0,children:"classpath"}),"."]})})]})})}),!N&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(h.Z,{light:!0}),(0,P.jsxs)(v.Z,{p:b.cd,children:[(0,P.jsx)(v.Z,{mb:b.cd,children:(0,P.jsx)(Z.ZP,{default:!0,children:"There are currently no JAR files."})}),(0,P.jsx)(j.ZP,{alignItems:"center",children:W})]})]}),N&&F]}),(0,P.jsx)(v.Z,{mb:b.HN}),(0,P.jsxs)(j.ZP,{children:[(0,P.jsx)(a.ZP,{beforeIcon:(0,P.jsx)(E.Save,{}),disabled:!r||!(null!==(t=Object.keys(r))&&void 0!==t&&t.length),loading:l,onClick:function(){return s()},primary:!0,children:"Save changes"}),u&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(a.ZP,{onClick:function(){return null==u?void 0:u()},secondary:!0,children:"Cancel and go back"})]})]})]})},be=t(35185);var Pe=function(e){var n=e.computeService,t=e.onClick,r=(0,o.useMemo)((function(){var e,t=[],r=0;return null==n||null===(e=n.setup_steps)||void 0===e||e.forEach((function(e){var n=e.group,i=e.required,l=e.status_calculated,o=e.steps;n?null==o||o.forEach((function(e){t.push(e);var n=e.required,i=e.status_calculated;n&&fe.br.COMPLETED!==i||(r+=1)})):(t.push(e),i&&fe.br.COMPLETED!==l||(r+=1))})),{steps:t,stepsCompleted:r}}),[n]),i=r.steps,l=r.stepsCompleted,s=(0,o.useMemo)((function(){return(null==i?void 0:i.length)||1}),[i]),c=(0,o.useMemo)((function(){return l/s}),[l,s]);return(0,P.jsxs)(q.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,onClick:t?function(){return null==t?void 0:t()}:null,preventDefault:!0,children:[(0,P.jsx)(h.Z,{light:!0}),(0,P.jsxs)(v.Z,{p:b.cd,children:[(0,P.jsx)(v.Z,{mb:1,children:(0,P.jsxs)(Z.ZP,{monospace:!0,muted:!0,children:[(0,P.jsx)(Z.ZP,{default:!0,inline:!0,children:l})," / ",(0,P.jsx)(Z.ZP,{default:!0,inline:!0,children:s})," ",(0,R._6)("step",s,!1,!0)," completed"]})}),(0,P.jsx)(be.Z,{progress:100*c})]}),(0,P.jsx)(h.Z,{light:!0})]})},ye=t(78688),ke=t(72748),_e=t(32013),Oe=t(98777);function Ce(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?Ce(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ce(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var we="Environment",Ie="Executors";var Ee=function(e){e.objectAttributes;var n,t=(0,o.useContext)(A.ThemeContext),r=(0,o.useState)(we),i=r[0],l=r[1],s=I.ZP.spark_executors.list().data,u=(0,o.useMemo)((function(){return null==s?void 0:s.spark_executors}),[s]),a=I.ZP.spark_environments.detail("0").data,d=(0,o.useMemo)((function(){return null==a?void 0:a.spark_environment}),[a]),f=(0,o.useMemo)((function(){var e,n,t,r,i,l,s;return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(v.Z,{px:b.cd,children:(0,P.jsxs)(_e.Z,{noBoxShadow:!0,children:[(0,P.jsxs)(Oe.Z,{noPaddingContent:!0,title:"Runtime",children:[(0,P.jsx)(S.Z,{columnFlex:[null,null],columns:[{uuid:"Property"},{uuid:"Value"}],rows:null===(e=Object.entries((null==d?void 0:d.runtime)||{}))||void 0===e?void 0:e.map((function(e){return[(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"property"}),e[0]),(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"value"}),e[1])]}))}),(0,P.jsx)(v.Z,{p:1})]}),(0,P.jsxs)(Oe.Z,{noPaddingContent:!0,title:"Hadoop properties",children:[(0,P.jsx)(S.Z,{columnFlex:[null,null],columns:[{uuid:"Property"},{uuid:"Value"}],rows:null==d||null===(n=d.hadoop_properties)||void 0===n?void 0:n.map((function(e){return[(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"property"}),e[0]),(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"value"}),e[1])]}))}),(0,P.jsx)(v.Z,{p:1})]}),(0,P.jsxs)(Oe.Z,{noPaddingContent:!0,title:"Metrics properties",children:[(0,P.jsx)(S.Z,{columnFlex:[null,null],columns:[{uuid:"Property"},{uuid:"Value"}],rows:null==d||null===(t=d.metrics_properties)||void 0===t?void 0:t.map((function(e){return[(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"property"}),e[0]),(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"value"}),e[1])]}))}),(0,P.jsx)(v.Z,{p:1})]}),(0,P.jsxs)(Oe.Z,{noPaddingContent:!0,title:"Spark properties",children:[(0,P.jsx)(S.Z,{columnFlex:[1,4],columns:[{uuid:"Property"},{uuid:"Value"}],rows:null==d||null===(r=d.spark_properties)||void 0===r?void 0:r.map((function(e){return[(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"property"}),e[0]),(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"value"}),e[1])]}))}),(0,P.jsx)(v.Z,{p:1})]}),(0,P.jsxs)(Oe.Z,{noPaddingContent:!0,title:"System properties",children:[(0,P.jsx)(S.Z,{columnFlex:[null,null],columns:[{uuid:"Property"},{uuid:"Value"}],rows:null==d||null===(i=d.system_properties)||void 0===i?void 0:i.map((function(e){return[(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"property"}),e[0]),(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"value"}),e[1])]}))}),(0,P.jsx)(v.Z,{p:1})]}),(0,P.jsxs)(Oe.Z,{noPaddingContent:!0,title:"Classpath entries",children:[(0,P.jsx)(S.Z,{columnFlex:[null,null],columns:[{uuid:"Type"},{uuid:"Value"}],rows:null==d||null===(l=d.classpath_entries)||void 0===l?void 0:l.map((function(e){return[(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"type"}),e[1]),(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"value"}),e[0])]}))}),(0,P.jsx)(v.Z,{p:1})]})]})}),null==d||null===(s=d.resource_profiles)||void 0===s?void 0:s.map((function(e){var n=e.executor_resources,t=e.id,r=e.task_resources;return(0,P.jsxs)("div",{children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(x.Z,{level:4,children:["Executor resources ID ",t]})}),(0,P.jsx)(v.Z,{px:b.cd,children:(0,P.jsx)(_e.Z,{noBoxShadow:!0,children:Object.entries(n||{}).map((function(e){var n,t=(0,c.Z)(e,2),r=t[0],i=t[1];return(0,P.jsxs)(Oe.Z,{noPaddingContent:!0,title:(0,R.vg)(r),children:[(0,P.jsx)(S.Z,{columnFlex:[1,2],columns:[{uuid:"Property"},{uuid:"Value"}],rows:null===(n=Object.entries(i))||void 0===n?void 0:n.map((function(e){return[(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"property"}),(0,R.vg)(e[0])),(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"value"}),e[1]||"-")]}))}),(0,P.jsx)(v.Z,{p:1})]},r)}))})}),(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(x.Z,{level:4,children:["Task resources ID ",t]})}),(0,P.jsx)(v.Z,{px:b.cd,children:(0,P.jsx)(_e.Z,{noBoxShadow:!0,children:Object.entries(r||{}).map((function(e){var n,t=(0,c.Z)(e,2),r=t[0],i=t[1];return(0,P.jsxs)(Oe.Z,{noPaddingContent:!0,title:(0,R.vg)(r),children:[(0,P.jsx)(S.Z,{columnFlex:[1,2],columns:[{uuid:"Property"},{uuid:"Value"}],rows:null===(n=Object.entries(i))||void 0===n?void 0:n.map((function(e){return[(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"property"}),(0,R.vg)(e[0])),(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"value"}),e[1]||"-")]}))}),(0,P.jsx)(v.Z,{p:1})]},r)}))})})]},t)}))]})}),[d]),p=(0,o.useMemo)((function(){return null==u?void 0:u.map((function(e){return(0,P.jsxs)("div",{children:[(0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(x.Z,{level:4,children:["Executor ",null==e?void 0:e.id]})}),(0,P.jsx)(v.Z,{px:b.cd,children:(0,P.jsxs)(_e.Z,{noBoxShadow:!0,children:[(0,P.jsxs)(Oe.Z,{noPaddingContent:!0,title:"Metrics",children:[(0,P.jsx)(S.Z,{columnFlex:[1,2],columns:[{uuid:"Metric"},{uuid:"Value"}],rows:["active_tasks","add_time","completed_tasks","disk_used","failed_tasks","host_port","is_active","is_blacklisted","is_excluded","max_memory","max_tasks","memory_used","rdd_blocks","resource_profile_id","total_cores","total_duration","total_gc_time","total_input_bytes","total_shuffle_read","total_shuffle_write","total_tasks"].map((function(n){var t=null==e?void 0:e[n];return[(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"property"}),(0,R.vg)(n)),(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"value"}),void 0===t?"-":"boolean"==typeof t?String(t):t)]}))}),(0,P.jsx)(v.Z,{p:1})]}),(0,P.jsxs)(Oe.Z,{noPaddingContent:!0,title:"Memory metrics",children:[(0,P.jsx)(S.Z,{columnFlex:[1,2],columns:[{uuid:"Metric"},{uuid:"Value"}],rows:Object.entries((null==e?void 0:e.memory_metrics)||{}).map((function(e){var n=(0,c.Z)(e,2),t=n[0],r=n[1];return[(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"property"}),(0,R.vg)(t)),(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"value"}),void 0===r?"-":"boolean"==typeof r?String(r):r)]}))}),(0,P.jsx)(v.Z,{p:1})]}),(0,P.jsxs)(Oe.Z,{noPaddingContent:!0,title:"Peak memory metrics",children:[(0,P.jsx)(S.Z,{columnFlex:[1,2],columns:[{uuid:"Metric"},{uuid:"Value"}],rows:Object.entries((null==e?void 0:e.peak_memory_metrics)||{}).map((function(e){var n=(0,c.Z)(e,2),t=n[0],r=n[1];return[(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"property"}),(0,R.vg)(t)),(0,o.createElement)(Z.ZP,Se(Se({},$.eB),{},{key:"value"}),void 0===r?"-":"boolean"==typeof r?String(r):r)]}))}),(0,P.jsx)(v.Z,{p:1})]})]})})]},null==e?void 0:e.id)}))}),[u]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(v.Z,{px:b.cd,children:(0,P.jsx)(J.Z,{noPadding:!0,onClickTab:function(e){var n=e.uuid;return l(n)},regularSizeText:!0,selectedTabUUID:i,tabs:[{label:function(){return we},uuid:we},{label:function(){return Ie},uuid:Ie}],underlineColor:null==t||null===(n=t.accent)||void 0===n?void 0:n.blue,underlineStyle:!0})}),(0,P.jsx)(v.Z,{mb:b.cd,children:(0,P.jsx)(h.Z,{light:!0})}),we===i&&f,Ie===i&&p]})},Me=t(62547),Ae=t(23657),Be=t(74778),Te=t(75375),Re=t(46684),De=t(53808),Ne=t(10332),ze=t(15610),He=t(69419),We=t(19183);function Fe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Le(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Fe(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Fe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ve=function(e){var n,t=e.contained,r=e.heightOffset,i=e.mainContainerRef,l=(0,We.i)(),d=l.height,f=(l.width,(0,o.useMemo)((function(){return"ComputeManagement/".concat(t?"contained":"open")}),[t])),p=(0,F.VI)(null,{},[],{uuid:f}),m=(0,c.Z)(p,1)[0],h=((0,o.useRef)(null),(0,o.useRef)(null),(0,o.useRef)(null),(0,o.useRef)(null)),y=(0,o.useMemo)((function(){return d-(r||0)}),[r,d]),k=(0,o.useState)(!1),_=k[0],O=k[1],C=(0,o.useState)(null),S=C[0],w=C[1],M=(0,Ae.Z)({clustersRefreshInterval:1e4,includeAllStates:_}),A=M.activeCluster,B=M.clusters,T=M.clustersLoading,R=M.computeService,D=M.connections,z=M.connectionsLoading,W=M.fetchAll,L=M.setupComplete,V=(0,o.useState)(null),U=V[0],G=V[1];(0,o.useEffect)((function(){var e;G(null==h||null===(e=h.current)||void 0===e?void 0:e.getBoundingClientRect())}),[d,h]);var J=(0,o.useMemo)((function(){return"compute_management_after_width_".concat(f)}),[f]),K=(0,o.useMemo)((function(){return"compute_management_before_width_".concat(f)}),[f]),Y=(0,o.useState)((0,De.U2)(J,60*b.iI)),Q=Y[0],ee=Y[1],ne=(0,o.useCallback)((function(e){ee(e),(0,De.t8)(J,Math.max(e,60*b.iI))}),[J,ee]),te=(0,o.useState)(!1),re=te[0],ie=te[1],le=(0,o.useState)(Math.max((0,De.U2)(K),20*b.iI)),se=le[0],ce=le[1],ue=(0,o.useCallback)((function(e){ce((e||20*b.iI)-Te.H),(0,De.t8)(K,e||20*b.iI)}),[K,ce]),ae=(0,o.useState)(!1),de=ae[0],fe=ae[1],pe=(0,o.useState)(!0),me=pe[0],je=pe[1],xe=(0,o.useState)(null),ge=xe[0],ve=xe[1],be=(0,o.useCallback)((function(e){ve((function(n){var t=e(n);return t&&me?je(!1):t||me||!L||je(!0),t}))}),[me,je,ve,L]),_e=(0,o.useState)(null),Oe=_e[0],Ce=_e[1],Se=(0,o.useCallback)((function(e){var n;(0,ze.u)((0,s.Z)({},"tab",null===(n="function"==typeof e?null==e?void 0:e():e)||void 0===n?void 0:n.main)),be((function(){return null}))}),[be]),we=(0,He.iV)();(0,o.useEffect)((function(){var e=null==we?void 0:we.tab;(null==Oe?void 0:Oe.main)!==e&&Ce(e?{main:e}:null)}),[Oe,we]);var Ie=(0,o.useState)(null),Fe=Ie[0],Ve=Ie[1],Ue=(0,o.useState)({}),Ge=Ue[0],Xe=Ue[1],qe=(0,o.useCallback)((function(e){Xe((function(n){return Le(Le({},n),e)})),Ve((function(n){return Le(Le({},n),e)}))}),[Xe,Ve]),Je=((0,o.useCallback)((function(e){return qe({spark_config:Le(Le({},null==Fe?void 0:Fe.spark_config),e)})}),[Fe,qe]),I.ZP.projects.list({},{revalidateOnFocus:!1})),Ke=Je.data,Ye=Je.mutate,Qe=(0,o.useMemo)((function(){var e;return null==Ke||null===(e=Ke.projects)||void 0===e?void 0:e[0]}),[Ke]),$e=(0,o.useMemo)((function(){return null==Qe?void 0:Qe.name}),[Qe]),en=I.ZP.spark_applications.list().data,nn=(0,o.useMemo)((function(){return null==en?void 0:en.spark_applications}),[en]),tn=I.ZP.spark_jobs.list().data,rn=(0,o.useMemo)((function(){return null==tn?void 0:tn.spark_jobs}),[tn]);(0,o.useEffect)((function(){je(L)}),[L]),(0,o.useEffect)((function(){Qe&&(Ve(Qe),w((0,Ne.d)(Qe)))}),[Qe,Ve,w,Se]),(0,o.useEffect)((function(){!Oe&&S&&Se({main:$.uK.SETUP})}),[S,Oe,Se]);var ln=(0,u.Db)(I.ZP.projects.useUpdate($e),{onSuccess:function(e){return(0,N.wD)(e,{callback:function(e){var n=e.project;Xe({}),Ve(n),W(),Ye()},onErrorCallback:function(e,n){return m({errors:n,response:e})}})}}),on=(0,c.Z)(ln,2),sn=on[0],cn=on[1].isLoading,un=(0,o.useCallback)((function(e){return sn({project:(0,H.GL)(Le(Le({},Fe),e),["emr_config","remote_variables_dir","spark_config"])})}),[Fe,sn]),an=(0,o.useMemo)((function(){var e=(0,$.kI)(R).map((function(e){var n,t=e.Icon,r=e.renderStatus,i=e.uuid;return r&&(n=null==r?void 0:r({applications:nn,applicationsLoading:!en,clusters:B,clustersLoading:T,computeConnections:D,computeService:R,jobs:rn,jobsLoading:!tn})),(0,P.jsx)(q.Z,{block:!0,disabled:!S,noHoverUnderline:!0,noOutline:!0,onClick:function(){return Se((function(){return{main:i}}))},preventDefault:!0,children:(0,P.jsx)(Be.bC,{selected:(null==Oe?void 0:Oe.main)===i,children:(0,P.jsxs)(j.ZP,{alignItems:"center",fullHeight:!0,justifyContent:"space-between",children:[(0,P.jsxs)(g.Z,{alignItems:"center",flex:1,children:[(0,P.jsx)(t,{size:2*b.iI}),(0,P.jsx)(v.Z,{mr:2}),(0,P.jsx)(Z.ZP,{bold:!0,large:!0,children:$.TD[i]})]}),n&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(v.Z,{mr:b.cd}),n]})]})})},i)}));if(S){var n=String(S),t=$.l[n],r=$.Eb[n],i=$.LF[n];if(t&&r&&i){var l,o;null!=R&&R.setup_steps&&(o=L?A?null!=A&&A.ready?"Cluster is ready, commence coding.":"Cluster activated and initializing.":"Setup complete but no clusters activated.":"All setup steps have not been completed yet.");var s=[];null!=R&&R.setup_steps&&s.push((0,P.jsx)(v.Z,{py:1,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[L&&(0,P.jsx)(E.PowerOnOffButton,{muted:!(null!=A&&A.ready),size:1.5*b.iI,success:null==A?void 0:A.ready}),!L&&(0,P.jsx)(E.AlertTriangle,{danger:!0,size:1.5*b.iI}),(0,P.jsx)(v.Z,{mr:1}),(0,P.jsxs)(g.Z,{flex:1,flexDirection:"column",children:[(0,P.jsx)(Z.ZP,{default:!L||!A,small:!0,children:L&&A?"Compute service connected":"Compute service unconnected"}),o&&(0,P.jsx)(Z.ZP,{muted:!0,xsmall:!0,children:o})]})]})},"compute-service-setup-steps")),(null==R||null===(l=R.setup_steps)||void 0===l?void 0:l.length)>=1&&!L&&e.unshift((0,P.jsx)(Pe,{computeService:R,onClick:function(){return je(!1)}},"setupProgress")),e.unshift((0,P.jsx)(v.Z,{p:b.cd,children:(0,P.jsxs)(Be.UE,{inline:!0,children:[(0,P.jsxs)(j.ZP,{alignItems:"flex-start",children:[(0,P.jsx)(g.Z,{flex:1,children:i()}),(0,P.jsx)(a.ZP,{compact:!0,onClick:function(){w(null),Se(null)},secondary:!0,small:!0,children:"Change"})]}),(0,P.jsx)(v.Z,{mt:b.cd,children:(0,P.jsx)(j.ZP,{alignItems:"flex-end",children:(0,P.jsxs)(g.Z,{flex:1,flexDirection:"column",children:[(0,P.jsx)(Z.ZP,{default:!0,monospace:!0,children:r}),(0,P.jsx)(x.Z,{level:5,children:t})]})})}),(null==s?void 0:s.length)>=1&&(0,P.jsx)(v.Z,{mt:b.cd,children:s})]})},"".concat(t,"-").concat(r)))}}return e}),[A,nn,B,T,R,D,en,tn,rn,S,Oe,je,Se,L]),dn=(0,o.useMemo)((function(){var e;return ge?(0,P.jsx)(ke.Z,{height:y-(((null==U?void 0:U.height)||0)+Re.Mz+1),model:ge}):(null==R||null===(e=R.setup_steps)||void 0===e?void 0:e.length)>=1?(0,P.jsx)(ye.Z,{onClickStep:function(e){return Se((function(){return{main:e}}))},setupSteps:null==R?void 0:R.setup_steps}):void 0}),[null==U?void 0:U.height,R,y,ge,Se]),fn=(0,o.useMemo)((function(){return(0,P.jsx)(Ze,{attributesTouched:Ge||{},computeService:R,isLoading:cn,mutateObject:un,objectAttributes:Fe,selectedComputeService:S,setObjectAttributes:qe})}),[Ge,R,cn,Fe,S,qe,un]),pn=(0,o.useMemo)((function(){return(0,P.jsx)(he,{attributesTouched:Ge||{},isLoading:cn,mutateObject:un,objectAttributes:Fe,selectedComputeService:S,setObjectAttributes:qe})}),[Ge,cn,Fe,S,qe,un]),mn=(0,o.useMemo)((function(){if([$.B2.AWS_EMR,$.B2.STANDALONE_CLUSTER].includes(S))return(0,P.jsx)(oe,{applications:nn,computeConnections:D,computeService:R,connectionsLoading:z,fetchAll:W,jobs:rn,loadingApplications:!en,loadingJobs:!tn,objectAttributes:Fe,refButtonTabs:h,selectedComputeService:S,setSelectedSql:be,setSelectedTab:Se})}),[nn,R,D,z,W,en,tn,rn,Fe,h,S,be,Se]),hn=(0,o.useMemo)((function(){if([$.B2.AWS_EMR,$.B2.STANDALONE_CLUSTER].includes(S))return(0,P.jsx)(Ee,{objectAttributes:Fe})}),[Fe,S]),jn=(0,o.useMemo)((function(){return(0,P.jsxs)(v.Z,{mx:1,py:b.cd,children:[(0,P.jsx)(v.Z,{mb:b.cd,px:b.cd,children:(0,P.jsx)(x.Z,{children:"Select a compute service"})}),(0,P.jsx)(j.ZP,{alignItems:"center",flexWrap:"wrap",children:$.sY.map((function(e){var n=e.buildPayload,t=e.displayName,r=e.documentationHref,i=e.kicker,l=e.renderIcon,o=e.uuid;return(0,P.jsxs)(Be.UE,{children:[l(),(0,P.jsxs)(v.Z,{mt:b.cd,children:[(0,P.jsx)(Z.ZP,{default:!0,monospace:!0,children:i}),(0,P.jsx)(x.Z,{level:4,children:t})]}),(0,P.jsx)(v.Z,{mt:b.cd,children:(0,P.jsxs)(j.ZP,{alignItems:"center",children:[(0,P.jsx)(a.ZP,{loading:cn&&o===S,onClick:function(){w(o),un(n(Fe))},primary:!0,children:"Enable"}),(0,P.jsx)(v.Z,{mr:b.cd}),(0,P.jsx)(q.Z,{href:r,default:!0,openNewWindow:!0,children:"View setup documentation"})]})})]},o)}))})]})}),[cn,Fe,S,w,un]),xn=(0,o.useMemo)((function(){return(0,P.jsx)(X,{clusters:B,computeService:R,fetchAll:W,includeAllStates:_,loading:T,setIncludeAllStates:O})}),[B,T,R,W,_,O]),gn=(0,o.useMemo)((function(){if(!S&&Fe)return jn;if(S&&Qe&&null!=Oe&&Oe.main){var e=null==Oe?void 0:Oe.main;if($.uK.SETUP===e)return fn;if($.uK.RESOURCES===e)return pn;if($.uK.MONITORING===e)return mn;if($.uK.SYSTEM===e)return hn;if($.uK.CLUSTERS===e)return xn}}),[xn,jn,mn,Fe,Qe,pn,S,Oe,fn,hn]);return(0,P.jsx)(Me.Z,{after:dn,afterDividerContrast:!0,afterDraggableTopOffset:Re.Mz,afterHeightOffset:Re.Mz,afterHidden:me&&!ge,afterMousedownActive:re,afterWidth:Q,before:an,beforeDividerContrast:!0,beforeHeightOffset:0,beforeHidden:!S,beforeMousedownActive:de,beforeWidth:se,contained:!0,height:y,hideAfterCompletely:!(null!=R&&null!==(n=R.setup_steps)&&void 0!==n&&n.length),hideBeforeCompletely:!S,inline:!0,mainContainerRef:i,setAfterHidden:je,setAfterMousedownActive:ie,setAfterWidth:ne,setBeforeMousedownActive:fe,setBeforeWidth:ue,uuid:f,children:gn})},Ue=t(94629),Ge=t(93808);function Xe(){var e=(0,o.useRef)(null);return(0,P.jsx)(Ue.Z,{title:"Compute management",uuid:"Compute management/index",children:(0,P.jsx)("div",{ref:e,children:(0,P.jsx)(Ve,{heightOffset:Re.Mz,mainContainerRef:e})})})}Xe.getInitialProps=(0,r.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 qe=(0,Ge.Z)(Xe)},42278:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/compute",function(){return t(4910)}])},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 l}});var r=t(12539),i=t(80022);function l(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,[9774,449,3366,2888,179],(function(){return n=42278,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([[7869],{94629:function(e,t,r){"use strict";r.d(t,{Z:function(){return Z}});var n=r(82394),i=r(21831),o=r(82684),u=r(50724),c=r(82555),s=r(97618),f=r(70613),a=r(31557),d=r(68899),l=r(28598);function h(e,t){var r=e.children,n=e.noPadding;return(0,l.jsx)(d.HS,{noPadding:n,ref:t,children:r})}var p=o.forwardRef(h),b=r(62547),v=r(82571),O=r(77417),y=r(46684),w=r(75375);function j(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 g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function m(e,t){e.addProjectBreadcrumbToCustomBreadcrumbs;var r=e.after,n=e.afterHeader,o=e.afterHidden,h=e.afterWidth,j=e.afterWidthOverride,m=e.appendBreadcrumbs,Z=e.before,P=e.beforeHeader,x=e.beforeWidth,A=e.breadcrumbs,k=e.children,_=e.contained,H=e.errors,B=e.headerMenuItems,C=e.headerOffset,E=e.hideAfterCompletely,M=e.mainContainerHeader,R=e.navigationItems,W=e.setAfterHidden,I=e.setAfterWidth,D=e.setBeforeWidth,S=e.setErrors,q=e.subheaderChildren,F=e.subheaderNoPadding,N=e.title,T=e.uuid,z=(0,w.Z)(T,{beforeResizeOffset:w.H,setWidthAfter:I,setWidthBefore:D,widthAfter:h,widthBefore:x,widthOverrideAfter:j}),G=z.mainContainerRef,X=z.mousedownActiveAfter,L=z.mousedownActiveBefore,V=z.setMousedownActiveAfter,Y=z.setMousedownActiveBefore,J=z.setWidthAfter,K=z.setWidthBefore,Q=z.widthAfter,U=z.widthBefore,$=(0,O.Z)().project,ee=[];return A&&ee.push.apply(ee,(0,i.Z)(A)),null!=A&&A.length&&!m||!$||null!=A&&A.length||ee.unshift({bold:!m,label:function(){return N}}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(f.Z,{title:N}),(0,l.jsx)(a.Z,{breadcrumbs:ee,menuItems:B}),(0,l.jsxs)(d.Nk,{ref:t,children:[0!==(null==R?void 0:R.length)&&(0,l.jsx)(d.lm,{showMore:!0,children:(0,l.jsx)(v.Z,{navigationItems:R,showMore:!0})}),(0,l.jsx)(s.Z,{flex:1,flexDirection:"column",children:(0,l.jsxs)(b.Z,{after:r,afterHeader:n,afterHeightOffset:y.Mz,afterHidden:o,afterMousedownActive:X,afterWidth:Q,before:Z,beforeHeader:P,beforeHeightOffset:y.Mz,beforeMousedownActive:L,beforeWidth:Z?U:d.k1,contained:_,headerOffset:C,hideAfterCompletely:!r||E,leftOffset:Z?d.k1:null,mainContainerHeader:M,mainContainerRef:G,setAfterHidden:W,setAfterMousedownActive:V,setAfterWidth:J,setBeforeMousedownActive:Y,setBeforeWidth:K,children:[q&&(0,l.jsx)(p,{noPadding:F,children:q}),k]})})]}),H&&(0,l.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null==S?void 0:S(null)},children:(0,l.jsx)(c.Z,g(g({},H),{},{onClose:function(){return null==S?void 0:S(null)}}))})]})}var Z=o.forwardRef(m)},93808:function(e,t,r){"use strict";r.d(t,{Z:function(){return k}});var n=r(77837),i=r(26304),o=r(62243),u=r(29385),c=r(80022),s=r(13692),f=r(93189),a=r(15544),d=r(82394),l=r(38860),h=r.n(l),p=r(82684),b=r(56663),v=r.n(b),O=r(40761),y=r(34661),w=r(36105),j=r(50178),g=r(69419),m=r(28598),Z=["auth"];function P(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?P(Object(r),!0).forEach((function(t){(0,d.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function A(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,a.Z)(e);if(t){var i=(0,a.Z)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,f.Z)(this,r)}}function k(e){return function(t){(0,s.Z)(a,t);var r,f=A(a);function a(){var e;(0,o.Z)(this,a);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e=f.call.apply(f,[this].concat(r)),(0,d.Z)((0,c.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,Z));return(0,m.jsx)(e,x({auth:this.state.auth},r))}}],[{key:"getInitialProps",value:(r=(0,n.Z)(h().mark((function t(r){var n,i,o,u,c,s,f,a,d;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=v()(r),i=(0,j.ex)(r),o=i.id,u=n[y.Mv],c=n[w.qt],s=new O.Z(u),f=x(x({},r),{},{auth:s,currentGroupId:o,theme:c}),(0,j.YB)(r)&&s.isExpired&&(console.log("OAuth token has expired."),a=x(x({},r.query),{},{redirect_url:r.asPath}),(0,g.nL)("/sign-in?".concat((0,g.uM)(a)),r.res)),!e.getInitialProps){t.next=12;break}return t.next=10,e.getInitialProps(f);case 10:return d=t.sent,t.abrupt("return",x(x({},d),{},{auth:s,currentGroupId:o,theme:c}));case 12:return t.abrupt("return",f);case 13:case"end":return t.stop()}}),t)}))),function(e){return r.apply(this,arguments)})}]),a}(p.Component)}},98530:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return y}});var n=r(77837),i=r(38860),o=r.n(i),u=r(82684),c=r(94629),s=r(15338),f=r(55485),a=r(38276),d=r(93528),l=r(69616),h=r(46684),p=r(28598);var b=function(e){var t=e.query,r=(0,u.useRef)(null),n=(0,u.useState)(null),i=n[0],o=n[1],b=(0,d.ZP)({query:{include_pipeline_count:!0},selectedFilePath:null==t?void 0:t.file_path,showHiddenFilesSetting:!0,uuid:"Pages/Files"}),v=b.browser,O=b.controller,y=b.filePaths,w=b.menu,j=b.search,g=b.selectedFilePath,m=b.tabs,Z=b.versions,P=b.versionsVisible;return(0,u.useEffect)((function(){setTimeout((function(){var e,t;return o((null==r||null===(e=r.current)||void 0===e||null===(t=e.getBoundingClientRect())||void 0===t?void 0:t.height)||0)}),1)}),[y]),(0,p.jsx)(c.Z,{after:Z,afterHidden:!(P&&g),before:(0,p.jsxs)(p.Fragment,{children:[j,v]}),contained:!0,headerOffset:i+h.Mz,mainContainerHeader:function(e){var t=e.widthOffset;return(0,p.jsxs)("div",{ref:r,style:{position:"relative",zIndex:3},children:[(0,p.jsx)(a.Z,{p:1,children:(0,p.jsx)(f.ZP,{alignItems:"center",children:w})}),(0,p.jsx)(s.Z,{light:!0}),(0,p.jsx)(l.Z,{widthOffset:t,children:m})]})},title:"Files",uuid:"Files/index",children:O})},v=r(93808);function O(e){var t=e.query;return(0,p.jsx)(b,{query:t})}O.getInitialProps=function(){var e=(0,n.Z)(o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{query:t.query});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();var y=(0,v.Z)(O)},99017:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/files",function(){return r(98530)}])},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,9774,2888,179],(function(){return t=99017,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7869],{94629:function(e,t,r){"use strict";r.d(t,{Z:function(){return Z}});var n=r(82394),i=r(21831),o=r(82684),u=r(50724),c=r(82555),s=r(97618),f=r(70613),a=r(92272),d=r(68899),l=r(28598);function h(e,t){var r=e.children,n=e.noPadding;return(0,l.jsx)(d.HS,{noPadding:n,ref:t,children:r})}var p=o.forwardRef(h),b=r(62547),v=r(82571),O=r(77417),y=r(46684),w=r(75375);function j(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 g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function m(e,t){e.addProjectBreadcrumbToCustomBreadcrumbs;var r=e.after,n=e.afterHeader,o=e.afterHidden,h=e.afterWidth,j=e.afterWidthOverride,m=e.appendBreadcrumbs,Z=e.before,P=e.beforeHeader,x=e.beforeWidth,A=e.breadcrumbs,k=e.children,_=e.contained,H=e.errors,B=e.headerMenuItems,C=e.headerOffset,E=e.hideAfterCompletely,M=e.mainContainerHeader,R=e.navigationItems,W=e.setAfterHidden,I=e.setAfterWidth,D=e.setBeforeWidth,S=e.setErrors,q=e.subheaderChildren,F=e.subheaderNoPadding,N=e.title,T=e.uuid,z=(0,w.Z)(T,{beforeResizeOffset:w.H,setWidthAfter:I,setWidthBefore:D,widthAfter:h,widthBefore:x,widthOverrideAfter:j}),G=z.mainContainerRef,X=z.mousedownActiveAfter,L=z.mousedownActiveBefore,V=z.setMousedownActiveAfter,Y=z.setMousedownActiveBefore,J=z.setWidthAfter,K=z.setWidthBefore,Q=z.widthAfter,U=z.widthBefore,$=(0,O.Z)().project,ee=[];return A&&ee.push.apply(ee,(0,i.Z)(A)),null!=A&&A.length&&!m||!$||null!=A&&A.length||ee.unshift({bold:!m,label:function(){return N}}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(f.Z,{title:N}),(0,l.jsx)(a.Z,{breadcrumbs:ee,menuItems:B}),(0,l.jsxs)(d.Nk,{ref:t,children:[0!==(null==R?void 0:R.length)&&(0,l.jsx)(d.lm,{showMore:!0,children:(0,l.jsx)(v.Z,{navigationItems:R,showMore:!0})}),(0,l.jsx)(s.Z,{flex:1,flexDirection:"column",children:(0,l.jsxs)(b.Z,{after:r,afterHeader:n,afterHeightOffset:y.Mz,afterHidden:o,afterMousedownActive:X,afterWidth:Q,before:Z,beforeHeader:P,beforeHeightOffset:y.Mz,beforeMousedownActive:L,beforeWidth:Z?U:d.k1,contained:_,headerOffset:C,hideAfterCompletely:!r||E,leftOffset:Z?d.k1:null,mainContainerHeader:M,mainContainerRef:G,setAfterHidden:W,setAfterMousedownActive:V,setAfterWidth:J,setBeforeMousedownActive:Y,setBeforeWidth:K,children:[q&&(0,l.jsx)(p,{noPadding:F,children:q}),k]})})]}),H&&(0,l.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null==S?void 0:S(null)},children:(0,l.jsx)(c.Z,g(g({},H),{},{onClose:function(){return null==S?void 0:S(null)}}))})]})}var Z=o.forwardRef(m)},93808:function(e,t,r){"use strict";r.d(t,{Z:function(){return k}});var n=r(77837),i=r(26304),o=r(62243),u=r(29385),c=r(80022),s=r(13692),f=r(93189),a=r(15544),d=r(82394),l=r(38860),h=r.n(l),p=r(82684),b=r(56663),v=r.n(b),O=r(40761),y=r(34661),w=r(36105),j=r(50178),g=r(69419),m=r(28598),Z=["auth"];function P(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?P(Object(r),!0).forEach((function(t){(0,d.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function A(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,a.Z)(e);if(t){var i=(0,a.Z)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,f.Z)(this,r)}}function k(e){return function(t){(0,s.Z)(a,t);var r,f=A(a);function a(){var e;(0,o.Z)(this,a);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e=f.call.apply(f,[this].concat(r)),(0,d.Z)((0,c.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,Z));return(0,m.jsx)(e,x({auth:this.state.auth},r))}}],[{key:"getInitialProps",value:(r=(0,n.Z)(h().mark((function t(r){var n,i,o,u,c,s,f,a,d;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=v()(r),i=(0,j.ex)(r),o=i.id,u=n[y.Mv],c=n[w.qt],s=new O.Z(u),f=x(x({},r),{},{auth:s,currentGroupId:o,theme:c}),(0,j.YB)(r)&&s.isExpired&&(console.log("OAuth token has expired."),a=x(x({},r.query),{},{redirect_url:r.asPath}),(0,g.nL)("/sign-in?".concat((0,g.uM)(a)),r.res)),!e.getInitialProps){t.next=12;break}return t.next=10,e.getInitialProps(f);case 10:return d=t.sent,t.abrupt("return",x(x({},d),{},{auth:s,currentGroupId:o,theme:c}));case 12:return t.abrupt("return",f);case 13:case"end":return t.stop()}}),t)}))),function(e){return r.apply(this,arguments)})}]),a}(p.Component)}},98530:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return y}});var n=r(77837),i=r(38860),o=r.n(i),u=r(82684),c=r(94629),s=r(15338),f=r(55485),a=r(38276),d=r(93528),l=r(69616),h=r(46684),p=r(28598);var b=function(e){var t=e.query,r=(0,u.useRef)(null),n=(0,u.useState)(null),i=n[0],o=n[1],b=(0,d.ZP)({query:{include_pipeline_count:!0},selectedFilePath:null==t?void 0:t.file_path,showHiddenFilesSetting:!0,uuid:"Pages/Files"}),v=b.browser,O=b.controller,y=b.filePaths,w=b.menu,j=b.search,g=b.selectedFilePath,m=b.tabs,Z=b.versions,P=b.versionsVisible;return(0,u.useEffect)((function(){setTimeout((function(){var e,t;return o((null==r||null===(e=r.current)||void 0===e||null===(t=e.getBoundingClientRect())||void 0===t?void 0:t.height)||0)}),1)}),[y]),(0,p.jsx)(c.Z,{after:Z,afterHidden:!(P&&g),before:(0,p.jsxs)(p.Fragment,{children:[j,v]}),contained:!0,headerOffset:i+h.Mz,mainContainerHeader:function(e){var t=e.widthOffset;return(0,p.jsxs)("div",{ref:r,style:{position:"relative",zIndex:3},children:[(0,p.jsx)(a.Z,{p:1,children:(0,p.jsx)(f.ZP,{alignItems:"center",children:w})}),(0,p.jsx)(s.Z,{light:!0}),(0,p.jsx)(l.Z,{widthOffset:t,children:m})]})},title:"Files",uuid:"Files/index",children:O})},v=r(93808);function O(e){var t=e.query;return(0,p.jsx)(b,{query:t})}O.getInitialProps=function(){var e=(0,n.Z)(o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{query:t.query});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();var y=(0,v.Z)(O)},99017:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/files",function(){return r(98530)}])},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,[449,9774,2888,179],(function(){return t=99017,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5882],{16529:function(n,t,r){"use strict";r.r(t);var u=r(77837),l=r(38860),e=r.n(l),o=r(82684),a=r(94629),c=r(19396),i=r(93808),d=r(38276),s=r(4190),p=r(35686),f=r(70515),b=r(28598);function _(n){var t=n.project,r=n.slug,u=p.ZP.global_data_products.detail(r,t?{project:t}:{}).data,l=(0,o.useMemo)((function(){return null==u?void 0:u.global_data_product}),[u]),e=(0,o.useMemo)((function(){return(null==r?void 0:r.length)>=21?"".concat(null==r?void 0:r.slice(0,21),"..."):r}),[r]);return(0,b.jsxs)(a.Z,{addProjectBreadcrumbToCustomBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Global data products"},linkProps:{href:"/global-data-products"}},{bold:!0,label:function(){return e}}],title:r,uuid:"GlobalDataProductDetail/index",children:[!u&&(0,b.jsx)(d.Z,{p:f.cd,children:(0,b.jsx)(s.Z,{inverted:!0})}),l&&(0,b.jsx)(c.Z,{globalDataProduct:l})]})}_.getInitialProps=function(){var n=(0,u.Z)(e().mark((function n(t){var r,u,l;return e().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=t.query.slug,u=null==r?void 0:r[(null==r?void 0:r.length)-1],l=(null==r?void 0:r.length)>=2?null==r?void 0:r[0]:null,n.abrupt("return",{project:l,slug:u});case 4:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}(),t.default=(0,i.Z)(_)},49794:function(n,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/global-data-products/[...slug]",function(){return r(16529)}])}},function(n){n.O(0,[1557,7966,9624,3763,9774,2888,179],(function(){return t=49794,n(n.s=t);var t}));var t=n.O();_N_E=t}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5882],{16529:function(n,t,r){"use strict";r.r(t);var u=r(77837),l=r(38860),e=r.n(l),o=r(82684),a=r(94629),c=r(19396),i=r(93808),d=r(38276),s=r(4190),p=r(35686),f=r(70515),b=r(28598);function _(n){var t=n.project,r=n.slug,u=p.ZP.global_data_products.detail(r,t?{project:t}:{}).data,l=(0,o.useMemo)((function(){return null==u?void 0:u.global_data_product}),[u]),e=(0,o.useMemo)((function(){return(null==r?void 0:r.length)>=21?"".concat(null==r?void 0:r.slice(0,21),"..."):r}),[r]);return(0,b.jsxs)(a.Z,{addProjectBreadcrumbToCustomBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Global data products"},linkProps:{href:"/global-data-products"}},{bold:!0,label:function(){return e}}],title:r,uuid:"GlobalDataProductDetail/index",children:[!u&&(0,b.jsx)(d.Z,{p:f.cd,children:(0,b.jsx)(s.Z,{inverted:!0})}),l&&(0,b.jsx)(c.Z,{globalDataProduct:l})]})}_.getInitialProps=function(){var n=(0,u.Z)(e().mark((function n(t){var r,u,l;return e().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=t.query.slug,u=null==r?void 0:r[(null==r?void 0:r.length)-1],l=(null==r?void 0:r.length)>=2?null==r?void 0:r[0]:null,n.abrupt("return",{project:l,slug:u});case 4:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}(),t.default=(0,i.Z)(_)},49794:function(n,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/global-data-products/[...slug]",function(){return r(16529)}])}},function(n){n.O(0,[449,7966,9624,3763,9774,2888,179],(function(){return t=49794,n(n.s=t);var t}));var t=n.O();_N_E=t}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3928],{67355:function(e,t,u){"use strict";var n=u(12691),l=u.n(n),o=u(82684),r=u(34376),a=u(8666),c=u(48670),d=u(38276),s=u(4190),i=u(75499),p=u(30160),b=u(35686),f=u(70515),j=u(95924),h=u(28598);t.Z=function(e){var t=e.globalDataProducts,u=e.onClickRow,n=(0,r.useRouter)(),_=b.ZP.global_data_products.list({},{},{pauseFetch:!!t}).data,v=(0,o.useMemo)((function(){return t||(null==_?void 0:_.global_data_products)||[]}),[_,t]);return _||t?_&&0===(null==v?void 0:v.length)?(0,h.jsx)(d.Z,{p:f.cd,children:(0,h.jsx)(p.ZP,{children:"There are currently no global data products registered."})}):(0,h.jsx)(i.Z,{columnFlex:[null,null,null,null],columns:[{uuid:"UUID"},{uuid:"Object type"},{uuid:"Object UUID"},{uuid:"Project"}],onClickRow:function(e){var t=null==v?void 0:v[e];t&&(u?null==u||u(t):n.push("/global-data-products/[...slug]","/global-data-products".concat(null!=t&&t.project?"/"+(null==t?void 0:t.project):"","/").concat(null==t?void 0:t.uuid)))},rows:null==v?void 0:v.map((function(e){var t=e.object_type,u=e.object_uuid,o=e.project,r=e.uuid,d={as:null,href:null};return a.b.PIPELINE===t&&(d.as="/pipelines/".concat(u,"/edit"),d.href="/pipelines/[pipeline]/edit"),[(0,h.jsx)(p.ZP,{monospace:!0,children:r},"uuid"),(0,h.jsx)(p.ZP,{default:!0,monospace:!0,children:t},"objectType"),(0,h.jsx)(l(),{as:null==d?void 0:d.as,href:(null==d?void 0:d.href)||"",passHref:!0,children:(0,h.jsx)(c.Z,{default:!0,monospace:!0,onClick:function(e){(0,j.j)(e),n.push(d.href,d.as)},preventDefault:!0,children:u})},"objectUUID"),(0,h.jsx)(p.ZP,{default:!0,monospace:!0,children:o},"project")]})),uuid:"global-data-products"}):(0,h.jsx)(d.Z,{p:f.cd,children:(0,h.jsx)(s.Z,{})})}},252:function(e,t,u){"use strict";u.r(t);var n=u(77837),l=u(38860),o=u.n(l),r=u(82684),a=u(71180),c=u(94629),d=u(19396),s=u(67355),i=u(93808),p=u(38276),b=u(72473),f=u(70515),j=u(69419),h=u(28598);function _(){var e=(0,r.useState)(!1),t=e[0],u=e[1],n=(0,r.useState)(null),l=n[0],o=n[1],i=(0,r.useState)(null),_=i[0],v=i[1],x=(0,j.iV)();return(0,r.useEffect)((function(){var e=x.new,t=x.object_type,n=x.object_uuid;t&&v(t),n&&o(n),u(!!e)}),[x]),(0,h.jsxs)(c.Z,{addProjectBreadcrumbToCustomBreadcrumbs:t,breadcrumbs:t?[{label:function(){return"Global data products"},linkProps:{href:"/global-data-products"}},{bold:!0,label:function(){return"New"}}]:null,title:"Global data products",uuid:"GlobalDataProducts/index",children:[(0,h.jsx)(p.Z,{p:f.cd,children:(0,h.jsx)(a.ZP,{beforeIcon:(0,h.jsx)(b.Add,{size:2.5*f.iI}),inline:!0,linkProps:{as:"/global-data-products?new=1",href:"/global-data-products"},noHoverUnderline:!0,primary:!0,sameColorAsText:!0,children:"New global data product"})}),t&&(0,h.jsx)(d.Z,{globalDataProduct:{object_type:_||null,object_uuid:l},isNew:t}),!t&&(0,h.jsx)(s.Z,{})]})}_.getInitialProps=(0,n.Z)(o().mark((function e(){return o().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,i.Z)(_)},42692:function(e,t,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/global-data-products",function(){return u(252)}])}},function(e){e.O(0,[1557,7966,9624,3763,9774,2888,179],(function(){return t=42692,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3928],{67355:function(e,t,u){"use strict";var n=u(12691),l=u.n(n),o=u(82684),r=u(34376),a=u(8666),c=u(48670),d=u(38276),s=u(4190),i=u(75499),p=u(30160),b=u(35686),f=u(70515),j=u(95924),h=u(28598);t.Z=function(e){var t=e.globalDataProducts,u=e.onClickRow,n=(0,r.useRouter)(),_=b.ZP.global_data_products.list({},{},{pauseFetch:!!t}).data,v=(0,o.useMemo)((function(){return t||(null==_?void 0:_.global_data_products)||[]}),[_,t]);return _||t?_&&0===(null==v?void 0:v.length)?(0,h.jsx)(d.Z,{p:f.cd,children:(0,h.jsx)(p.ZP,{children:"There are currently no global data products registered."})}):(0,h.jsx)(i.Z,{columnFlex:[null,null,null,null],columns:[{uuid:"UUID"},{uuid:"Object type"},{uuid:"Object UUID"},{uuid:"Project"}],onClickRow:function(e){var t=null==v?void 0:v[e];t&&(u?null==u||u(t):n.push("/global-data-products/[...slug]","/global-data-products".concat(null!=t&&t.project?"/"+(null==t?void 0:t.project):"","/").concat(null==t?void 0:t.uuid)))},rows:null==v?void 0:v.map((function(e){var t=e.object_type,u=e.object_uuid,o=e.project,r=e.uuid,d={as:null,href:null};return a.b.PIPELINE===t&&(d.as="/pipelines/".concat(u,"/edit"),d.href="/pipelines/[pipeline]/edit"),[(0,h.jsx)(p.ZP,{monospace:!0,children:r},"uuid"),(0,h.jsx)(p.ZP,{default:!0,monospace:!0,children:t},"objectType"),(0,h.jsx)(l(),{as:null==d?void 0:d.as,href:(null==d?void 0:d.href)||"",passHref:!0,children:(0,h.jsx)(c.Z,{default:!0,monospace:!0,onClick:function(e){(0,j.j)(e),n.push(d.href,d.as)},preventDefault:!0,children:u})},"objectUUID"),(0,h.jsx)(p.ZP,{default:!0,monospace:!0,children:o},"project")]})),uuid:"global-data-products"}):(0,h.jsx)(d.Z,{p:f.cd,children:(0,h.jsx)(s.Z,{})})}},252:function(e,t,u){"use strict";u.r(t);var n=u(77837),l=u(38860),o=u.n(l),r=u(82684),a=u(71180),c=u(94629),d=u(19396),s=u(67355),i=u(93808),p=u(38276),b=u(72473),f=u(70515),j=u(69419),h=u(28598);function _(){var e=(0,r.useState)(!1),t=e[0],u=e[1],n=(0,r.useState)(null),l=n[0],o=n[1],i=(0,r.useState)(null),_=i[0],v=i[1],x=(0,j.iV)();return(0,r.useEffect)((function(){var e=x.new,t=x.object_type,n=x.object_uuid;t&&v(t),n&&o(n),u(!!e)}),[x]),(0,h.jsxs)(c.Z,{addProjectBreadcrumbToCustomBreadcrumbs:t,breadcrumbs:t?[{label:function(){return"Global data products"},linkProps:{href:"/global-data-products"}},{bold:!0,label:function(){return"New"}}]:null,title:"Global data products",uuid:"GlobalDataProducts/index",children:[(0,h.jsx)(p.Z,{p:f.cd,children:(0,h.jsx)(a.ZP,{beforeIcon:(0,h.jsx)(b.Add,{size:2.5*f.iI}),inline:!0,linkProps:{as:"/global-data-products?new=1",href:"/global-data-products"},noHoverUnderline:!0,primary:!0,sameColorAsText:!0,children:"New global data product"})}),t&&(0,h.jsx)(d.Z,{globalDataProduct:{object_type:_||null,object_uuid:l},isNew:t}),!t&&(0,h.jsx)(s.Z,{})]})}_.getInitialProps=(0,n.Z)(o().mark((function e(){return o().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,i.Z)(_)},42692:function(e,t,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/global-data-products",function(){return u(252)}])}},function(e){e.O(0,[449,7966,9624,3763,9774,2888,179],(function(){return t=42692,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5618],{40033:function(r,e,t){"use strict";var n=t(82684),o=t(94629),u=t(46866),c=t(81728),i=t(28598);e.Z=function(r){var e=r.operationType,t=r.resourceType,l=r.rootProject,a=r.slug,s=(0,n.useMemo)((function(){var r=[a,t?(0,c.j3)(t):t,e?(0,c.vg)(e):e].filter((function(r){return(null==r?void 0:r.length)>=1})).join(" ");return(null==r?void 0:r.length)>=40?"".concat(null==r?void 0:r.slice(0,40),"..."):r}),[e,t,a]);return(0,i.jsx)(o.Z,{addProjectBreadcrumbToCustomBreadcrumbs:!0,breadcrumbs:[{label:function(){return l?"Platform global hooks":"Global hooks"},linkProps:{href:"/".concat(l?"platform/":"","global-hooks")}},{bold:!0,label:function(){return s}}],title:a,uuid:"GlobalHookDetail/index",children:(0,i.jsx)(u.Z,{operationType:e,resourceType:t,rootProject:l,uuid:a})})}},1368:function(r,e,t){"use strict";t.r(e);var n=t(77837),o=t(82394),u=t(91835),c=t(38860),i=t.n(c),l=t(40033),a=t(93808),s=t(28598);function p(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function f(r){var e=(0,u.Z)({},r);return(0,s.jsx)(l.Z,function(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?p(Object(t),!0).forEach((function(e){(0,o.Z)(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}({},e))}f.getInitialProps=function(){var r=(0,n.Z)(i().mark((function r(e){var t,n,o,u;return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t=e.query,n=t.operation_type,o=t.resource_type,u=t.slug,r.abrupt("return",{operationType:n,resourceType:o,slug:null==u?void 0:u[0]});case 2:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),e.default=(0,a.Z)(f)},98746:function(r,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/global-hooks/[...slug]",function(){return t(1368)}])}},function(r){r.O(0,[1557,1187,9774,2888,179],(function(){return e=98746,r(r.s=e);var e}));var e=r.O();_N_E=e}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5618],{40033:function(r,e,t){"use strict";var n=t(82684),o=t(94629),u=t(46866),c=t(81728),i=t(28598);e.Z=function(r){var e=r.operationType,t=r.resourceType,l=r.rootProject,a=r.slug,s=(0,n.useMemo)((function(){var r=[a,t?(0,c.j3)(t):t,e?(0,c.vg)(e):e].filter((function(r){return(null==r?void 0:r.length)>=1})).join(" ");return(null==r?void 0:r.length)>=40?"".concat(null==r?void 0:r.slice(0,40),"..."):r}),[e,t,a]);return(0,i.jsx)(o.Z,{addProjectBreadcrumbToCustomBreadcrumbs:!0,breadcrumbs:[{label:function(){return l?"Platform global hooks":"Global hooks"},linkProps:{href:"/".concat(l?"platform/":"","global-hooks")}},{bold:!0,label:function(){return s}}],title:a,uuid:"GlobalHookDetail/index",children:(0,i.jsx)(u.Z,{operationType:e,resourceType:t,rootProject:l,uuid:a})})}},1368:function(r,e,t){"use strict";t.r(e);var n=t(77837),o=t(82394),u=t(91835),c=t(38860),i=t.n(c),l=t(40033),a=t(93808),s=t(28598);function p(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function f(r){var e=(0,u.Z)({},r);return(0,s.jsx)(l.Z,function(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?p(Object(t),!0).forEach((function(e){(0,o.Z)(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}({},e))}f.getInitialProps=function(){var r=(0,n.Z)(i().mark((function r(e){var t,n,o,u;return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t=e.query,n=t.operation_type,o=t.resource_type,u=t.slug,r.abrupt("return",{operationType:n,resourceType:o,slug:null==u?void 0:u[0]});case 2:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),e.default=(0,a.Z)(f)},98746:function(r,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/global-hooks/[...slug]",function(){return t(1368)}])}},function(r){r.O(0,[449,1187,9774,2888,179],(function(){return e=98746,r(r.s=e);var e}));var e=r.O();_N_E=e}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3009],{44374:function(e,n,t){"use strict";t.d(n,{Z:function(){return A}});var o=t(82684),l=t(71180),r=t(94629),i=t(46866),u=t(82394),c=t(12691),a=t.n(c),s=t(9518),d=t(34376),p=t(55485),f=t(48670),h=t(75499),v=t(30160),b=t(35686),m=t(72473),j=t(8193),k={default:!0,monospace:!0},g=t(81728),P=t(3917),_=t(55283),w=t(86735),x=t(70320),y=t(28598);function Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Z(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var E=function(e){var n=e.rootProject,t=(0,x.qB)(),l=(0,o.useContext)(s.ThemeContext),r=(0,d.useRouter)(),i=(0,o.useState)(null),u=i[0],c=(i[1],b.ZP.global_hooks.list(O({_format:"with_pipeline_details",include_snapshot_validation:1},n?{root_project:n}:{})).data),Z=(0,o.useMemo)((function(){return(null==c?void 0:c.global_hooks)||[]}),[c]);return(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(h.Z,{columnFlex:[null,null,null,null,1,null,null],columns:[{uuid:"UUID"},{uuid:"Resource"},{uuid:"Operation"},{uuid:"Pipeline"},{uuid:"Outputs"},{center:!0,uuid:"Valid"},{rightAligned:!0,uuid:"Snapshotted at"}],onClickRow:function(e,t){var o=null==Z?void 0:Z[e],l=o.operation_type,i=o.resource_type,u=o.uuid;r.push("/".concat(n?"platform/":"","global-hooks/").concat(u,"?operation_type=").concat(l,"&resource_type=").concat(i))},getObjectAtRowIndex:function(e){return null==Z?void 0:Z[e]},rows:null==Z?void 0:Z.map((function(e){var n,r=e.metadata,i=e.operation_type,u=e.outputs,c=e.pipeline,s=e.pipeline_details,d=e.resource_type,h=e.uuid,b=null==c?void 0:c.uuid,x=b?(0,y.jsx)(a(),{as:"/pipelines/".concat(b,"/edit"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,y.jsx)(f.Z,O(O({},k),{},{openNewWindow:!0,children:b}))},"pipeline"):(0,o.createElement)(v.ZP,O(O({},k),{},{key:"pipeline",muted:!0}),"-"),Z=[];if((null==u?void 0:u.length)>=1&&(null==s||null===(n=s.blocks)||void 0===n?void 0:n.length)>=1){var E=(0,w.HK)((null==s?void 0:s.blocks)||[],(function(e){return e.uuid}));null==u||u.forEach((function(e,n){var t;if(null!=e&&null!==(t=e.block)&&void 0!==t&&t.uuid){var r,i=null==E?void 0:E[null==e||null===(r=e.block)||void 0===r?void 0:r.uuid];i&&(n>=1&&Z.push((0,o.createElement)(v.ZP,O(O({},k),{},{inline:!0,key:"".concat(null==i?void 0:i.uuid,"-").concat(n,"-comma"),muted:!0}),", ")),Z.push((0,y.jsx)(a(),{as:"/pipelines/".concat(b,"/edit?block_uuid=").concat(null==i?void 0:i.uuid),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,y.jsx)(f.Z,O(O({},k),{},{inline:!0,openNewWindow:!0,sameColorAsText:!0,children:(0,y.jsx)(v.ZP,O(O({},k),{},{color:(0,_.qn)(null==i?void 0:i.type,{blockColor:null==i?void 0:i.color,theme:l}).accent,inline:!0,children:null==i?void 0:i.uuid}))}))},"".concat(null==i?void 0:i.uuid,"-").concat(n,"-link"))))}}))}return[(0,o.createElement)(v.ZP,O(O({},k),{},{key:"uuid"}),h),(0,o.createElement)(v.ZP,O(O({},k),{},{key:"resourceType",monospace:!1}),d?(0,g.j3)(d):"-"),(0,o.createElement)(v.ZP,O(O({},k),{},{key:"operationType",monospace:!1}),i?(0,g.vg)(i):"-"),x,(0,y.jsxs)("div",{children:[(null==Z?void 0:Z.length)>=1&&Z,!(null!=Z&&Z.length)&&(0,y.jsx)(v.ZP,O(O({},k),{},{muted:!0,children:"-"}))]},"outputs"),(0,y.jsx)(p.ZP,{justifyContent:"center",children:null!=r&&r.snapshot_valid?(0,y.jsx)(m.Check,{size:j.Z,success:!0}):(0,y.jsx)(m.AlertTriangle,{danger:!0,size:j.Z})},"valid"),(0,o.createElement)(v.ZP,O(O({},k),{},{key:"snapshottedAt",rightAligned:!0}),null!=r&&r.snapshotted_at?(0,P.XG)(null==r?void 0:r.snapshotted_at,t):"-")]})),selectedRowIndexInternal:u,uuid:"GlobalHooks/Table"})})},C=t(70515),T=t(69419);var A=function(e){var n=e.rootProject,t=(0,o.useState)(!1),u=t[0],c=t[1],a=(0,T.iV)();(0,o.useEffect)((function(){var e=a.new;c(!!e)}),[a]);var s=n?"Platform global hooks":"Global hooks";return(0,y.jsxs)(r.Z,{addProjectBreadcrumbToCustomBreadcrumbs:u,breadcrumbs:u?[{label:function(){return s},linkProps:{href:"/".concat(n?"platform/":"","global-hooks")}},{bold:!0,label:function(){return"New"}}]:null,subheaderChildren:!u&&(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(l.ZP,{beforeIcon:(0,y.jsx)(m.Add,{size:2.5*C.iI}),inline:!0,linkProps:{as:"/".concat(n?"platform/":"","global-hooks?new=1"),href:"/".concat(n?"platform/":"","global-hooks")},noHoverUnderline:!0,primary:!0,sameColorAsText:!0,children:"Add new global hook"})}),title:s,uuid:"GlobalHooks/index",children:[u&&(0,y.jsx)(i.Z,{isNew:u,rootProject:n}),!u&&(0,y.jsx)(E,{rootProject:n})]})}},60921:function(e,n,t){"use strict";t.r(n);var o=t(77837),l=t(38860),r=t.n(l),i=t(44374),u=t(93808),c=t(28598);function a(){return(0,c.jsx)(i.Z,{})}a.getInitialProps=(0,o.Z)(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,u.Z)(a)},95140:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/global-hooks",function(){return t(60921)}])}},function(e){e.O(0,[1557,1187,9774,2888,179],(function(){return n=95140,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3009],{44374:function(e,n,t){"use strict";t.d(n,{Z:function(){return A}});var o=t(82684),l=t(71180),r=t(94629),i=t(46866),u=t(82394),c=t(12691),a=t.n(c),s=t(9518),d=t(34376),p=t(55485),f=t(48670),h=t(75499),v=t(30160),b=t(35686),m=t(72473),j=t(8193),k={default:!0,monospace:!0},g=t(81728),P=t(3917),_=t(55283),w=t(86735),x=t(70320),y=t(28598);function Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Z(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var E=function(e){var n=e.rootProject,t=(0,x.qB)(),l=(0,o.useContext)(s.ThemeContext),r=(0,d.useRouter)(),i=(0,o.useState)(null),u=i[0],c=(i[1],b.ZP.global_hooks.list(O({_format:"with_pipeline_details",include_snapshot_validation:1},n?{root_project:n}:{})).data),Z=(0,o.useMemo)((function(){return(null==c?void 0:c.global_hooks)||[]}),[c]);return(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(h.Z,{columnFlex:[null,null,null,null,1,null,null],columns:[{uuid:"UUID"},{uuid:"Resource"},{uuid:"Operation"},{uuid:"Pipeline"},{uuid:"Outputs"},{center:!0,uuid:"Valid"},{rightAligned:!0,uuid:"Snapshotted at"}],onClickRow:function(e,t){var o=null==Z?void 0:Z[e],l=o.operation_type,i=o.resource_type,u=o.uuid;r.push("/".concat(n?"platform/":"","global-hooks/").concat(u,"?operation_type=").concat(l,"&resource_type=").concat(i))},getObjectAtRowIndex:function(e){return null==Z?void 0:Z[e]},rows:null==Z?void 0:Z.map((function(e){var n,r=e.metadata,i=e.operation_type,u=e.outputs,c=e.pipeline,s=e.pipeline_details,d=e.resource_type,h=e.uuid,b=null==c?void 0:c.uuid,x=b?(0,y.jsx)(a(),{as:"/pipelines/".concat(b,"/edit"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,y.jsx)(f.Z,O(O({},k),{},{openNewWindow:!0,children:b}))},"pipeline"):(0,o.createElement)(v.ZP,O(O({},k),{},{key:"pipeline",muted:!0}),"-"),Z=[];if((null==u?void 0:u.length)>=1&&(null==s||null===(n=s.blocks)||void 0===n?void 0:n.length)>=1){var E=(0,w.HK)((null==s?void 0:s.blocks)||[],(function(e){return e.uuid}));null==u||u.forEach((function(e,n){var t;if(null!=e&&null!==(t=e.block)&&void 0!==t&&t.uuid){var r,i=null==E?void 0:E[null==e||null===(r=e.block)||void 0===r?void 0:r.uuid];i&&(n>=1&&Z.push((0,o.createElement)(v.ZP,O(O({},k),{},{inline:!0,key:"".concat(null==i?void 0:i.uuid,"-").concat(n,"-comma"),muted:!0}),", ")),Z.push((0,y.jsx)(a(),{as:"/pipelines/".concat(b,"/edit?block_uuid=").concat(null==i?void 0:i.uuid),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,y.jsx)(f.Z,O(O({},k),{},{inline:!0,openNewWindow:!0,sameColorAsText:!0,children:(0,y.jsx)(v.ZP,O(O({},k),{},{color:(0,_.qn)(null==i?void 0:i.type,{blockColor:null==i?void 0:i.color,theme:l}).accent,inline:!0,children:null==i?void 0:i.uuid}))}))},"".concat(null==i?void 0:i.uuid,"-").concat(n,"-link"))))}}))}return[(0,o.createElement)(v.ZP,O(O({},k),{},{key:"uuid"}),h),(0,o.createElement)(v.ZP,O(O({},k),{},{key:"resourceType",monospace:!1}),d?(0,g.j3)(d):"-"),(0,o.createElement)(v.ZP,O(O({},k),{},{key:"operationType",monospace:!1}),i?(0,g.vg)(i):"-"),x,(0,y.jsxs)("div",{children:[(null==Z?void 0:Z.length)>=1&&Z,!(null!=Z&&Z.length)&&(0,y.jsx)(v.ZP,O(O({},k),{},{muted:!0,children:"-"}))]},"outputs"),(0,y.jsx)(p.ZP,{justifyContent:"center",children:null!=r&&r.snapshot_valid?(0,y.jsx)(m.Check,{size:j.Z,success:!0}):(0,y.jsx)(m.AlertTriangle,{danger:!0,size:j.Z})},"valid"),(0,o.createElement)(v.ZP,O(O({},k),{},{key:"snapshottedAt",rightAligned:!0}),null!=r&&r.snapshotted_at?(0,P.XG)(null==r?void 0:r.snapshotted_at,t):"-")]})),selectedRowIndexInternal:u,uuid:"GlobalHooks/Table"})})},C=t(70515),T=t(69419);var A=function(e){var n=e.rootProject,t=(0,o.useState)(!1),u=t[0],c=t[1],a=(0,T.iV)();(0,o.useEffect)((function(){var e=a.new;c(!!e)}),[a]);var s=n?"Platform global hooks":"Global hooks";return(0,y.jsxs)(r.Z,{addProjectBreadcrumbToCustomBreadcrumbs:u,breadcrumbs:u?[{label:function(){return s},linkProps:{href:"/".concat(n?"platform/":"","global-hooks")}},{bold:!0,label:function(){return"New"}}]:null,subheaderChildren:!u&&(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(l.ZP,{beforeIcon:(0,y.jsx)(m.Add,{size:2.5*C.iI}),inline:!0,linkProps:{as:"/".concat(n?"platform/":"","global-hooks?new=1"),href:"/".concat(n?"platform/":"","global-hooks")},noHoverUnderline:!0,primary:!0,sameColorAsText:!0,children:"Add new global hook"})}),title:s,uuid:"GlobalHooks/index",children:[u&&(0,y.jsx)(i.Z,{isNew:u,rootProject:n}),!u&&(0,y.jsx)(E,{rootProject:n})]})}},60921:function(e,n,t){"use strict";t.r(n);var o=t(77837),l=t(38860),r=t.n(l),i=t(44374),u=t(93808),c=t(28598);function a(){return(0,c.jsx)(i.Z,{})}a.getInitialProps=(0,o.Z)(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,u.Z)(a)},95140:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/global-hooks",function(){return t(60921)}])}},function(e){e.O(0,[449,1187,9774,2888,179],(function(){return n=95140,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([[9015],{83087:function(e,n,t){"use strict";t.r(n);var r=t(77837),u=t(38860),i=t.n(u),o=t(82684),s=t(65557),c=t(78650),a=t(43449),f=t(90758),l=t(93808),d=t(38276),p=t(59533),h=t(35686),b=t(86735),_=t(15610),m=t(69419),y=t(97133),v=t(75083),w=t(28598);function E(){var e=(0,o.useState)(null),n=e[0],t=e[1],r=(0,m.iV)(),u=r.file_path,i=(0,o.useMemo)((function(){var e=r["file_paths[]"]||[];return Array.isArray(e)||(e=[e]),e}),[r]),l=(0,o.useCallback)((function(e,n){var t=encodeURIComponent(e),r=(0,m.iV)()["file_paths[]"]||[];Array.isArray(r)||(r=[r]),r.includes(t)||r.push(t),(0,_.u)({file_path:t,"file_paths[]":r})}),[]),E=h.ZP.files.list(),Z=E.data,j=E.mutate,P=(0,o.useMemo)((function(){return(null==Z?void 0:Z.files)||[]}),[Z]),g=(0,o.useRef)(null),x=(0,o.useState)(null),O=x[0],k=x[1],F=(0,o.useState)([]),S=F[0],C=F[1],N=(0,o.useState)({}),R=N[0],T=N[1],A=(0,o.useMemo)((function(){return(0,w.jsx)(d.Z,{ml:1,mt:1,children:(0,w.jsx)(c.Z,{fetchFiles:j,files:P,openFile:l,ref:g,showError:t,uuid:"pages/manage/files"})})}),[j,P,l,t]);return(0,o.useEffect)((function(){k(u)}),[u]),(0,o.useEffect)((function(){(0,b.fS)(i,S)||C(i)}),[i,S]),(0,w.jsx)(p.Z,{before:A,breadcrumbs:[{label:function(){return"Workspaces"},linkProps:{as:"/manage",href:"/manage"}},{bold:!0,label:function(){return"File browser"}}],errors:n,mainContainerHeader:(0,w.jsx)(y.rK,{secondary:!0,children:(0,w.jsx)(f.ZP,{filePaths:S,filesTouched:R,selectedFilePath:O})}),pageName:v.L6.FILE_BROWSER,children:null==i?void 0:i.map((function(e){return(0,w.jsx)("div",{style:{display:O===e?null:"none"},children:(0,w.jsx)(s.Z,{uuid:"manage/FileEditor/".concat(decodeURIComponent(e)),children:(0,w.jsx)(a.Z,{active:O===e,filePath:e,selectedFilePath:O,setErrors:t,setFilesTouched:T})})},e)}))})}E.getInitialProps=(0,r.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,l.Z)(E)},90205:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage/files",function(){return t(83087)}])},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 u}});var r=t(61049);function u(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 i}});var r=t(12539),u=t(80022);function i(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,u.Z)(e)}}},function(e){e.O(0,[1557,1598,9774,2888,179],(function(){return n=90205,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9015],{83087:function(e,n,t){"use strict";t.r(n);var r=t(77837),u=t(38860),i=t.n(u),o=t(82684),s=t(65557),c=t(78650),a=t(43449),f=t(90758),l=t(93808),d=t(38276),p=t(59533),h=t(35686),b=t(86735),_=t(15610),m=t(69419),y=t(97133),v=t(75083),w=t(28598);function E(){var e=(0,o.useState)(null),n=e[0],t=e[1],r=(0,m.iV)(),u=r.file_path,i=(0,o.useMemo)((function(){var e=r["file_paths[]"]||[];return Array.isArray(e)||(e=[e]),e}),[r]),l=(0,o.useCallback)((function(e,n){var t=encodeURIComponent(e),r=(0,m.iV)()["file_paths[]"]||[];Array.isArray(r)||(r=[r]),r.includes(t)||r.push(t),(0,_.u)({file_path:t,"file_paths[]":r})}),[]),E=h.ZP.files.list(),Z=E.data,j=E.mutate,P=(0,o.useMemo)((function(){return(null==Z?void 0:Z.files)||[]}),[Z]),g=(0,o.useRef)(null),x=(0,o.useState)(null),O=x[0],k=x[1],F=(0,o.useState)([]),S=F[0],C=F[1],N=(0,o.useState)({}),R=N[0],T=N[1],A=(0,o.useMemo)((function(){return(0,w.jsx)(d.Z,{ml:1,mt:1,children:(0,w.jsx)(c.Z,{fetchFiles:j,files:P,openFile:l,ref:g,showError:t,uuid:"pages/manage/files"})})}),[j,P,l,t]);return(0,o.useEffect)((function(){k(u)}),[u]),(0,o.useEffect)((function(){(0,b.fS)(i,S)||C(i)}),[i,S]),(0,w.jsx)(p.Z,{before:A,breadcrumbs:[{label:function(){return"Workspaces"},linkProps:{as:"/manage",href:"/manage"}},{bold:!0,label:function(){return"File browser"}}],errors:n,mainContainerHeader:(0,w.jsx)(y.rK,{secondary:!0,children:(0,w.jsx)(f.ZP,{filePaths:S,filesTouched:R,selectedFilePath:O})}),pageName:v.L6.FILE_BROWSER,children:null==i?void 0:i.map((function(e){return(0,w.jsx)("div",{style:{display:O===e?null:"none"},children:(0,w.jsx)(s.Z,{uuid:"manage/FileEditor/".concat(decodeURIComponent(e)),children:(0,w.jsx)(a.Z,{active:O===e,filePath:e,selectedFilePath:O,setErrors:t,setFilesTouched:T})})},e)}))})}E.getInitialProps=(0,r.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,l.Z)(E)},90205:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage/files",function(){return t(83087)}])},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 u}});var r=t(61049);function u(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 i}});var r=t(12539),u=t(80022);function i(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,u.Z)(e)}}},function(e){e.O(0,[449,1598,9774,2888,179],(function(){return n=90205,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([[8003],{98677:function(n,t,r){"use strict";r.d(t,{Z:function(){return a}});var e=r(8208),u=r(8162);function i(){var n,t,r=(0,u.Z)().unknown(void 0),o=r.domain,a=r.range,c=0,l=1,f=!1,s=0,d=0,v=.5;function p(){var r=o().length,e=l<c,u=e?l:c,i=e?c:l;n=(i-u)/Math.max(1,r-s+2*d),f&&(n=Math.floor(n)),u+=(i-u-n*(r-s))*v,t=n*(1-s),f&&(u=Math.round(u),t=Math.round(t));var p=function(n,t,r){n=+n,t=+t,r=(u=arguments.length)<2?(t=n,n=0,1):u<3?1:+r;for(var e=-1,u=0|Math.max(0,Math.ceil((t-n)/r)),i=new Array(u);++e<u;)i[e]=n+e*r;return i}(r).map((function(t){return u+n*t}));return a(e?p.reverse():p)}return delete r.unknown,r.domain=function(n){return arguments.length?(o(n),p()):o()},r.range=function(n){return arguments.length?([c,l]=n,c=+c,l=+l,p()):[c,l]},r.rangeRound=function(n){return[c,l]=n,c=+c,l=+l,f=!0,p()},r.bandwidth=function(){return t},r.step=function(){return n},r.round=function(n){return arguments.length?(f=!!n,p()):f},r.padding=function(n){return arguments.length?(s=Math.min(1,d=+n),p()):s},r.paddingInner=function(n){return arguments.length?(s=Math.min(1,n),p()):s},r.paddingOuter=function(n){return arguments.length?(d=+n,p()):d},r.align=function(n){return arguments.length?(v=Math.max(0,Math.min(1,n)),p()):v},r.copy=function(){return i(o(),[c,l]).round(f).paddingInner(s).paddingOuter(d).align(v)},e.o.apply(p(),arguments)}var o=(0,r(93342).Z)("domain","range","reverse","align","padding","round");function a(n){return o(i(),n)}},53989:function(n,t,r){"use strict";function e(n){if("bandwidth"in n)return n.bandwidth();var t=n.range(),r=n.domain();return Math.abs(t[t.length-1]-t[0])/r.length}r.d(t,{Z:function(){return e}})},13946:function(n,t,r){"use strict";r.d(t,{t:function(){return e}});var e=Array.prototype.slice},27500:function(n,t,r){"use strict";function e(n,t){if((a=n.length)>0)for(var r,e,u,i,o,a,c=0,l=n[t[0]].length;c<l;++c)for(i=o=0,r=0;r<a;++r)(u=(e=n[t[r]][c])[1]-e[0])>0?(e[0]=i,e[1]=i+=u):u<0?(e[1]=o,e[0]=o+=u):(e[0]=0,e[1]=u)}r.d(t,{Z:function(){return e}})},12759:function(n,t,r){"use strict";r.d(t,{Z:function(){return u}});var e=r(82610);function u(n,t){if((u=n.length)>0){for(var r,u,i,o=0,a=n[0].length;o<a;++o){for(i=r=0;r<u;++r)i+=n[r][o][1]||0;if(i)for(r=0;r<u;++r)n[r][o][1]/=i}(0,e.Z)(n,t)}}},82610:function(n,t,r){"use strict";function e(n,t){if((u=n.length)>1)for(var r,e,u,i=1,o=n[t[0]],a=o.length;i<u;++i)for(e=o,o=n[t[i]],r=0;r<a;++r)o[r][1]+=o[r][0]=isNaN(e[r][1])?e[r][0]:e[r][1]}r.d(t,{Z:function(){return e}})},34812:function(n,t,r){"use strict";r.d(t,{Z:function(){return u}});var e=r(82610);function u(n,t){if((r=n.length)>0){for(var r,u=0,i=n[t[0]],o=i.length;u<o;++u){for(var a=0,c=0;a<r;++a)c+=n[a][u][1]||0;i[u][1]+=i[u][0]=-c/2}(0,e.Z)(n,t)}}},77944:function(n,t,r){"use strict";r.d(t,{Z:function(){return u}});var e=r(82610);function u(n,t){if((i=n.length)>0&&(u=(r=n[t[0]]).length)>0){for(var r,u,i,o=0,a=1;a<u;++a){for(var c=0,l=0,f=0;c<i;++c){for(var s=n[t[c]],d=s[a][1]||0,v=(d-(s[a-1][1]||0))/2,p=0;p<c;++p){var h=n[t[p]];v+=(h[a][1]||0)-(h[a-1][1]||0)}l+=d,f+=v*d}r[a-1][1]+=r[a-1][0]=o,l&&(o-=f/l)}r[a-1][1]+=r[a-1][0]=o,(0,e.Z)(n,t)}}},34128:function(n,t,r){"use strict";r.d(t,{Z:function(){return u}});var e=r(8512);function u(n){var t=n.map(i);return(0,e.Z)(n).sort((function(n,r){return t[n]-t[r]}))}function i(n){for(var t,r=-1,e=0,u=n.length,i=-1/0;++r<u;)(t=+n[r][1])>i&&(i=t,e=r);return e}},39586:function(n,t,r){"use strict";r.d(t,{S:function(){return i},Z:function(){return u}});var e=r(8512);function u(n){var t=n.map(i);return(0,e.Z)(n).sort((function(n,r){return t[n]-t[r]}))}function i(n){for(var t,r=0,e=-1,u=n.length;++e<u;)(t=+n[e][1])&&(r+=t);return r}},25516:function(n,t,r){"use strict";r.d(t,{Z:function(){return u}});var e=r(39586);function u(n){return(0,e.Z)(n).reverse()}},54164:function(n,t,r){"use strict";r.d(t,{Z:function(){return i}});var e=r(34128),u=r(39586);function i(n){var t,r,i=n.length,o=n.map(u.S),a=(0,e.Z)(n),c=0,l=0,f=[],s=[];for(t=0;t<i;++t)r=a[t],c<l?(c+=o[r],f.push(r)):(l+=o[r],s.push(r));return s.reverse().concat(f)}},8512:function(n,t,r){"use strict";function e(n){for(var t=n.length,r=new Array(t);--t>=0;)r[t]=t;return r}r.d(t,{Z:function(){return e}})},2010:function(n,t,r){"use strict";r.d(t,{Z:function(){return u}});var e=r(8512);function u(n){return(0,e.Z)(n).reverse()}},75823:function(n,t,r){"use strict";r.d(t,{Z:function(){return c}});var e=r(13946),u=r(90875),i=r(82610),o=r(8512);function a(n,t){return n[t]}function c(){var n=(0,u.Z)([]),t=o.Z,r=i.Z,c=a;function l(e){var u,i,o=n.apply(this,arguments),a=e.length,l=o.length,f=new Array(l);for(u=0;u<l;++u){for(var s,d=o[u],v=f[u]=new Array(a),p=0;p<a;++p)v[p]=s=[0,+c(e[p],d,p,e)],s.data=e[p];v.key=d}for(u=0,i=t(f);u<l;++u)f[i[u]].index=u;return r(f,i),f}return l.keys=function(t){return arguments.length?(n="function"==typeof t?t:(0,u.Z)(e.t.call(t)),l):n},l.value=function(n){return arguments.length?(c="function"==typeof n?n:(0,u.Z)(+n),l):c},l.order=function(n){return arguments.length?(t=null==n?o.Z:"function"==typeof n?n:(0,u.Z)(e.t.call(n)),l):t},l.offset=function(n){return arguments.length?(r=null==n?i.Z:n,l):r},l}},94035:function(n,t,r){"use strict";var e=r(9518).default.div.withConfig({displayName:"YAxisLabelContainer",componentId:"sc-qwp21x-0"})(["-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-o-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);white-space:nowrap;"]);t.Z=e},79221:function(n,t,r){"use strict";r.d(t,{P5:function(){return e},Vs:function(){return u}});r(81728);function e(n,t){var r=t||{},e=r.maxFractionDigits,u=r.minAmount,i=Intl.NumberFormat("en-US",{maximumFractionDigits:e||2,notation:"compact"});return"number"!=typeof n?n:n>=(u||1e4)?i.format(n):n.toString()}function u(n){var t,r;if(void 0===n)return 0;var e=null==n||null===(t=n())||void 0===t||null===(r=t.props)||void 0===r?void 0:r.children;return(Array.isArray(e)?e:[e]).join("").length}},18682:function(n,t,r){"use strict";r.r(t);var e=r(77837),u=r(82394),i=r(75582),o=r(38860),a=r.n(o),c=r(82684),l=r(83455),f=r(92083),s=r.n(f),d=r(53998),v=r(90299),p=r(55485),h=r(85854),g=r(29241),m=r(93808),Z=r(82359),b=r(38276),y=r(30160),j=r(12468),x=r(67913),w=r(59533),O=r(35686),_=r(44897),k=r(57653),M=r(64657),P=r(53808),D=r(61556),C=r(41143),A=r(39598),E=r(17380),I=r(3917),N=r(50389),T=r(75083),S=r(81728),L=r(48277),R=r(24491),U=r(15610),F=r(72619),Y=r(70320),V=r(28598);function q(n,t){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(n);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.push.apply(r,e)}return r}function X(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?q(Object(r),!0).forEach((function(t){(0,u.Z)(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):q(Object(r)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(r,t))}))}return n}var z={mt:2,mx:3},W={refreshInterval:6e4,revalidateOnFocus:!1};function H(n){var t=n.tab,r=(0,c.useRef)(null),e=(0,c.useRef)(!1),o=(0,c.useRef)(null),a=(0,c.useMemo)((function(){return N.hS}),[]),f=(0,c.useState)(a.find((function(n){var r;return n.uuid===(t||(null===(r=(0,P.U2)(P.Xq))||void 0===r?void 0:r.uuid))}))||N.xM),m=f[0],q=f[1],H=(0,c.useState)(null),B=H[0],G=H[1],J=null==m?void 0:m.uuid,K=(0,c.useMemo)((function(){return(0,I.jV)(J,{isoString:!0})}),[J]),Q=(0,c.useMemo)((function(){return{start_time:K}}),[K]),$=(0,c.useState)(),nn=$[0],tn=$[1],rn=(0,l.Db)((function(){var n,t;return null===(n=O.ZP.monitor_stats)||void 0===n?void 0:n.detailAsync(D.h.PIPELINE_RUN_COUNT,Q,{signal:null==r||null===(t=r.current)||void 0===t?void 0:t.signal})}),{onSuccess:function(n){return(0,F.wD)(n,{callback:function(n){var t=n.monitor_stat.stats;tn(t)}})}}),en=(0,i.Z)(rn,2),un=en[0],on=en[1].isLoading,an=(0,c.useCallback)((function(n){var t;null!==(null==r?void 0:r.current)&&(null==r||null===(t=r.current)||void 0===t||t.abort());r.current=new AbortController,q((function(t){var r="function"==typeof n?n(t):n;return(null==t?void 0:t.uuid)!==(null==r?void 0:r.uuid)&&((0,U.u)((0,u.Z)({},E.i,null==r?void 0:r.uuid),{replaceParams:!0}),un()),(0,P.t8)(P.Xq,r),r}))}),[un]);(0,c.useEffect)((function(){var n;(null!=e&&e.current||(e.current=!0,un()),t)||(0,U.u)((0,u.Z)({},E.i,m?null==m?void 0:m.uuid:null==a||null===(n=a[0])||void 0===n?void 0:n.uuid),{pushHistory:!1})}),[a,un,m,t]);var cn=O.ZP.pipeline_runs.list({_limit:50,include_all_pipeline_schedules:!0,"order_by[]":"created_at desc",start_timestamp:(0,I.A5)(K),status:C.V.FAILED},X({},W)).data,ln=(0,c.useMemo)((function(){return(null==cn?void 0:cn.pipeline_runs)||[]}),[null==cn?void 0:cn.pipeline_runs]),fn=(0,c.useMemo)((function(){return(0,I.Y_)(I.yD[J]+1)}),[J]),sn=(0,c.useMemo)((function(){return(0,R.i)(nn,fn,!0)}),[nn,fn]),dn=sn.totalPipelineRunCount,vn=sn.ungroupedPipelineRunData,pn=(0,c.useMemo)((function(){return(0,I.Ro)(I.yD[J],{endDateOnly:J===I.vk.TODAY})}),[J]),hn=O.ZP.projects.list().data,gn=(0,c.useMemo)((function(){var n;return null==hn||null===(n=hn.projects)||void 0===n?void 0:n[0]}),[hn]),mn=(0,c.useMemo)((function(){var n;return(0,Y.hY)(null==gn||null===(n=gn.features)||void 0===n?void 0:n[Z.d.LOCAL_TIMEZONE])}),[null==gn?void 0:gn.features]),Zn=(0,c.useMemo)((function(){return mn?(0,V.jsx)(b.Z,{ml:"4px",children:(0,V.jsx)(j.Z,X(X({},A.m),{},{label:"Please note that these counts are based on UTC time."}))}):null}),[mn]);return(0,V.jsxs)(w.Z,{breadcrumbs:[{label:function(){return"Workspaces"},linkProps:{as:"/manage",href:"/manage"}},{bold:!0,label:function(){return"Overview"}}],errors:B,pageName:T.L6.OVERVIEW,setErrors:G,children:[(0,V.jsx)(g.Z,{backgroundColor:_.Z.background.panel,ref:o,children:(0,V.jsx)(b.Z,{py:2,children:(0,V.jsx)(p.ZP,{alignItems:"center",children:(0,V.jsx)(v.Z,{onClickTab:function(n){var t=n.uuid;an((function(){return a.find((function(n){return t===n.uuid}))}))},regularSizeText:!0,selectedTabUUID:J,tabs:a})})})}),(0,V.jsxs)(b.Z,{mx:3,my:2,children:[(0,V.jsxs)(h.Z,{level:4,children:[J===I.vk.TODAY&&"".concat((0,S.kC)(I.vk.TODAY)," (UTC): ").concat(pn),J!==I.vk.TODAY&&"".concat((0,S.kC)(I.s8[J])," (UTC): ").concat(pn)]}),(0,V.jsxs)(b.Z,{mt:2,children:[(0,V.jsx)(b.Z,{ml:2,children:(0,V.jsxs)(p.ZP,{alignItems:"center",children:[(0,V.jsxs)(y.ZP,{bold:!0,large:!0,children:[on?"--":(0,L.uf)(dn)," total pipeline runs"]}),Zn]})}),(0,V.jsx)(b.Z,{mt:1,children:(0,V.jsx)(d.Z,{backgroundColor:_.Z.background.panel,colors:M.NU,data:vn,getXValue:function(n){return n.date},height:500,keys:M.hu,margin:{bottom:30,left:35,right:0,top:10},tooltipLeftOffset:M.CD,xLabelFormat:function(n){return s()(n).format("MMM DD")}})})]})]}),(0,V.jsx)(b.Z,X(X({},z),{},{children:(0,V.jsx)(p.ZP,{alignItems:"center",justifyContent:"center",children:(0,V.jsx)(x.Z,{pipelineRuns:ln,pipelineType:k.LM,workspaceFormatting:!0})})})),(0,V.jsx)(b.Z,{mb:2})]})}H.getInitialProps=function(){var n=(0,e.Z)(a().mark((function n(t){var r,e;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",{tab:null!=t&&null!==(r=t.query)&&void 0!==r&&r.tab?null==t||null===(e=t.query)||void 0===e?void 0:e.tab:null});case 1:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}(),t.default=(0,m.Z)(H)},44356:function(n,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage/overview",function(){return r(18682)}])}},function(n){n.O(0,[125,2714,1557,1598,5831,6362,9774,2888,179],(function(){return t=44356,n(n.s=t);var t}));var t=n.O();_N_E=t}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8003],{98677:function(n,t,r){"use strict";r.d(t,{Z:function(){return a}});var e=r(8208),u=r(8162);function i(){var n,t,r=(0,u.Z)().unknown(void 0),o=r.domain,a=r.range,c=0,l=1,f=!1,s=0,d=0,v=.5;function p(){var r=o().length,e=l<c,u=e?l:c,i=e?c:l;n=(i-u)/Math.max(1,r-s+2*d),f&&(n=Math.floor(n)),u+=(i-u-n*(r-s))*v,t=n*(1-s),f&&(u=Math.round(u),t=Math.round(t));var p=function(n,t,r){n=+n,t=+t,r=(u=arguments.length)<2?(t=n,n=0,1):u<3?1:+r;for(var e=-1,u=0|Math.max(0,Math.ceil((t-n)/r)),i=new Array(u);++e<u;)i[e]=n+e*r;return i}(r).map((function(t){return u+n*t}));return a(e?p.reverse():p)}return delete r.unknown,r.domain=function(n){return arguments.length?(o(n),p()):o()},r.range=function(n){return arguments.length?([c,l]=n,c=+c,l=+l,p()):[c,l]},r.rangeRound=function(n){return[c,l]=n,c=+c,l=+l,f=!0,p()},r.bandwidth=function(){return t},r.step=function(){return n},r.round=function(n){return arguments.length?(f=!!n,p()):f},r.padding=function(n){return arguments.length?(s=Math.min(1,d=+n),p()):s},r.paddingInner=function(n){return arguments.length?(s=Math.min(1,n),p()):s},r.paddingOuter=function(n){return arguments.length?(d=+n,p()):d},r.align=function(n){return arguments.length?(v=Math.max(0,Math.min(1,n)),p()):v},r.copy=function(){return i(o(),[c,l]).round(f).paddingInner(s).paddingOuter(d).align(v)},e.o.apply(p(),arguments)}var o=(0,r(93342).Z)("domain","range","reverse","align","padding","round");function a(n){return o(i(),n)}},53989:function(n,t,r){"use strict";function e(n){if("bandwidth"in n)return n.bandwidth();var t=n.range(),r=n.domain();return Math.abs(t[t.length-1]-t[0])/r.length}r.d(t,{Z:function(){return e}})},13946:function(n,t,r){"use strict";r.d(t,{t:function(){return e}});var e=Array.prototype.slice},27500:function(n,t,r){"use strict";function e(n,t){if((a=n.length)>0)for(var r,e,u,i,o,a,c=0,l=n[t[0]].length;c<l;++c)for(i=o=0,r=0;r<a;++r)(u=(e=n[t[r]][c])[1]-e[0])>0?(e[0]=i,e[1]=i+=u):u<0?(e[1]=o,e[0]=o+=u):(e[0]=0,e[1]=u)}r.d(t,{Z:function(){return e}})},12759:function(n,t,r){"use strict";r.d(t,{Z:function(){return u}});var e=r(82610);function u(n,t){if((u=n.length)>0){for(var r,u,i,o=0,a=n[0].length;o<a;++o){for(i=r=0;r<u;++r)i+=n[r][o][1]||0;if(i)for(r=0;r<u;++r)n[r][o][1]/=i}(0,e.Z)(n,t)}}},82610:function(n,t,r){"use strict";function e(n,t){if((u=n.length)>1)for(var r,e,u,i=1,o=n[t[0]],a=o.length;i<u;++i)for(e=o,o=n[t[i]],r=0;r<a;++r)o[r][1]+=o[r][0]=isNaN(e[r][1])?e[r][0]:e[r][1]}r.d(t,{Z:function(){return e}})},34812:function(n,t,r){"use strict";r.d(t,{Z:function(){return u}});var e=r(82610);function u(n,t){if((r=n.length)>0){for(var r,u=0,i=n[t[0]],o=i.length;u<o;++u){for(var a=0,c=0;a<r;++a)c+=n[a][u][1]||0;i[u][1]+=i[u][0]=-c/2}(0,e.Z)(n,t)}}},77944:function(n,t,r){"use strict";r.d(t,{Z:function(){return u}});var e=r(82610);function u(n,t){if((i=n.length)>0&&(u=(r=n[t[0]]).length)>0){for(var r,u,i,o=0,a=1;a<u;++a){for(var c=0,l=0,f=0;c<i;++c){for(var s=n[t[c]],d=s[a][1]||0,v=(d-(s[a-1][1]||0))/2,p=0;p<c;++p){var h=n[t[p]];v+=(h[a][1]||0)-(h[a-1][1]||0)}l+=d,f+=v*d}r[a-1][1]+=r[a-1][0]=o,l&&(o-=f/l)}r[a-1][1]+=r[a-1][0]=o,(0,e.Z)(n,t)}}},34128:function(n,t,r){"use strict";r.d(t,{Z:function(){return u}});var e=r(8512);function u(n){var t=n.map(i);return(0,e.Z)(n).sort((function(n,r){return t[n]-t[r]}))}function i(n){for(var t,r=-1,e=0,u=n.length,i=-1/0;++r<u;)(t=+n[r][1])>i&&(i=t,e=r);return e}},39586:function(n,t,r){"use strict";r.d(t,{S:function(){return i},Z:function(){return u}});var e=r(8512);function u(n){var t=n.map(i);return(0,e.Z)(n).sort((function(n,r){return t[n]-t[r]}))}function i(n){for(var t,r=0,e=-1,u=n.length;++e<u;)(t=+n[e][1])&&(r+=t);return r}},25516:function(n,t,r){"use strict";r.d(t,{Z:function(){return u}});var e=r(39586);function u(n){return(0,e.Z)(n).reverse()}},54164:function(n,t,r){"use strict";r.d(t,{Z:function(){return i}});var e=r(34128),u=r(39586);function i(n){var t,r,i=n.length,o=n.map(u.S),a=(0,e.Z)(n),c=0,l=0,f=[],s=[];for(t=0;t<i;++t)r=a[t],c<l?(c+=o[r],f.push(r)):(l+=o[r],s.push(r));return s.reverse().concat(f)}},8512:function(n,t,r){"use strict";function e(n){for(var t=n.length,r=new Array(t);--t>=0;)r[t]=t;return r}r.d(t,{Z:function(){return e}})},2010:function(n,t,r){"use strict";r.d(t,{Z:function(){return u}});var e=r(8512);function u(n){return(0,e.Z)(n).reverse()}},75823:function(n,t,r){"use strict";r.d(t,{Z:function(){return c}});var e=r(13946),u=r(90875),i=r(82610),o=r(8512);function a(n,t){return n[t]}function c(){var n=(0,u.Z)([]),t=o.Z,r=i.Z,c=a;function l(e){var u,i,o=n.apply(this,arguments),a=e.length,l=o.length,f=new Array(l);for(u=0;u<l;++u){for(var s,d=o[u],v=f[u]=new Array(a),p=0;p<a;++p)v[p]=s=[0,+c(e[p],d,p,e)],s.data=e[p];v.key=d}for(u=0,i=t(f);u<l;++u)f[i[u]].index=u;return r(f,i),f}return l.keys=function(t){return arguments.length?(n="function"==typeof t?t:(0,u.Z)(e.t.call(t)),l):n},l.value=function(n){return arguments.length?(c="function"==typeof n?n:(0,u.Z)(+n),l):c},l.order=function(n){return arguments.length?(t=null==n?o.Z:"function"==typeof n?n:(0,u.Z)(e.t.call(n)),l):t},l.offset=function(n){return arguments.length?(r=null==n?i.Z:n,l):r},l}},94035:function(n,t,r){"use strict";var e=r(9518).default.div.withConfig({displayName:"YAxisLabelContainer",componentId:"sc-qwp21x-0"})(["-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-o-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);white-space:nowrap;"]);t.Z=e},79221:function(n,t,r){"use strict";r.d(t,{P5:function(){return e},Vs:function(){return u}});r(81728);function e(n,t){var r=t||{},e=r.maxFractionDigits,u=r.minAmount,i=Intl.NumberFormat("en-US",{maximumFractionDigits:e||2,notation:"compact"});return"number"!=typeof n?n:n>=(u||1e4)?i.format(n):n.toString()}function u(n){var t,r;if(void 0===n)return 0;var e=null==n||null===(t=n())||void 0===t||null===(r=t.props)||void 0===r?void 0:r.children;return(Array.isArray(e)?e:[e]).join("").length}},18682:function(n,t,r){"use strict";r.r(t);var e=r(77837),u=r(82394),i=r(75582),o=r(38860),a=r.n(o),c=r(82684),l=r(83455),f=r(92083),s=r.n(f),d=r(53998),v=r(90299),p=r(55485),h=r(85854),g=r(29241),m=r(93808),Z=r(82359),b=r(38276),y=r(30160),j=r(12468),x=r(67913),w=r(59533),O=r(35686),_=r(44897),k=r(57653),M=r(64657),P=r(53808),D=r(61556),C=r(41143),A=r(39598),E=r(17380),I=r(3917),N=r(50389),T=r(75083),S=r(81728),L=r(48277),R=r(24491),U=r(15610),F=r(72619),Y=r(70320),V=r(28598);function q(n,t){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(n);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.push.apply(r,e)}return r}function X(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?q(Object(r),!0).forEach((function(t){(0,u.Z)(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):q(Object(r)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(r,t))}))}return n}var z={mt:2,mx:3},W={refreshInterval:6e4,revalidateOnFocus:!1};function H(n){var t=n.tab,r=(0,c.useRef)(null),e=(0,c.useRef)(!1),o=(0,c.useRef)(null),a=(0,c.useMemo)((function(){return N.hS}),[]),f=(0,c.useState)(a.find((function(n){var r;return n.uuid===(t||(null===(r=(0,P.U2)(P.Xq))||void 0===r?void 0:r.uuid))}))||N.xM),m=f[0],q=f[1],H=(0,c.useState)(null),B=H[0],G=H[1],J=null==m?void 0:m.uuid,K=(0,c.useMemo)((function(){return(0,I.jV)(J,{isoString:!0})}),[J]),Q=(0,c.useMemo)((function(){return{start_time:K}}),[K]),$=(0,c.useState)(),nn=$[0],tn=$[1],rn=(0,l.Db)((function(){var n,t;return null===(n=O.ZP.monitor_stats)||void 0===n?void 0:n.detailAsync(D.h.PIPELINE_RUN_COUNT,Q,{signal:null==r||null===(t=r.current)||void 0===t?void 0:t.signal})}),{onSuccess:function(n){return(0,F.wD)(n,{callback:function(n){var t=n.monitor_stat.stats;tn(t)}})}}),en=(0,i.Z)(rn,2),un=en[0],on=en[1].isLoading,an=(0,c.useCallback)((function(n){var t;null!==(null==r?void 0:r.current)&&(null==r||null===(t=r.current)||void 0===t||t.abort());r.current=new AbortController,q((function(t){var r="function"==typeof n?n(t):n;return(null==t?void 0:t.uuid)!==(null==r?void 0:r.uuid)&&((0,U.u)((0,u.Z)({},E.i,null==r?void 0:r.uuid),{replaceParams:!0}),un()),(0,P.t8)(P.Xq,r),r}))}),[un]);(0,c.useEffect)((function(){var n;(null!=e&&e.current||(e.current=!0,un()),t)||(0,U.u)((0,u.Z)({},E.i,m?null==m?void 0:m.uuid:null==a||null===(n=a[0])||void 0===n?void 0:n.uuid),{pushHistory:!1})}),[a,un,m,t]);var cn=O.ZP.pipeline_runs.list({_limit:50,include_all_pipeline_schedules:!0,"order_by[]":"created_at desc",start_timestamp:(0,I.A5)(K),status:C.V.FAILED},X({},W)).data,ln=(0,c.useMemo)((function(){return(null==cn?void 0:cn.pipeline_runs)||[]}),[null==cn?void 0:cn.pipeline_runs]),fn=(0,c.useMemo)((function(){return(0,I.Y_)(I.yD[J]+1)}),[J]),sn=(0,c.useMemo)((function(){return(0,R.i)(nn,fn,!0)}),[nn,fn]),dn=sn.totalPipelineRunCount,vn=sn.ungroupedPipelineRunData,pn=(0,c.useMemo)((function(){return(0,I.Ro)(I.yD[J],{endDateOnly:J===I.vk.TODAY})}),[J]),hn=O.ZP.projects.list().data,gn=(0,c.useMemo)((function(){var n;return null==hn||null===(n=hn.projects)||void 0===n?void 0:n[0]}),[hn]),mn=(0,c.useMemo)((function(){var n;return(0,Y.hY)(null==gn||null===(n=gn.features)||void 0===n?void 0:n[Z.d.LOCAL_TIMEZONE])}),[null==gn?void 0:gn.features]),Zn=(0,c.useMemo)((function(){return mn?(0,V.jsx)(b.Z,{ml:"4px",children:(0,V.jsx)(j.Z,X(X({},A.m),{},{label:"Please note that these counts are based on UTC time."}))}):null}),[mn]);return(0,V.jsxs)(w.Z,{breadcrumbs:[{label:function(){return"Workspaces"},linkProps:{as:"/manage",href:"/manage"}},{bold:!0,label:function(){return"Overview"}}],errors:B,pageName:T.L6.OVERVIEW,setErrors:G,children:[(0,V.jsx)(g.Z,{backgroundColor:_.Z.background.panel,ref:o,children:(0,V.jsx)(b.Z,{py:2,children:(0,V.jsx)(p.ZP,{alignItems:"center",children:(0,V.jsx)(v.Z,{onClickTab:function(n){var t=n.uuid;an((function(){return a.find((function(n){return t===n.uuid}))}))},regularSizeText:!0,selectedTabUUID:J,tabs:a})})})}),(0,V.jsxs)(b.Z,{mx:3,my:2,children:[(0,V.jsxs)(h.Z,{level:4,children:[J===I.vk.TODAY&&"".concat((0,S.kC)(I.vk.TODAY)," (UTC): ").concat(pn),J!==I.vk.TODAY&&"".concat((0,S.kC)(I.s8[J])," (UTC): ").concat(pn)]}),(0,V.jsxs)(b.Z,{mt:2,children:[(0,V.jsx)(b.Z,{ml:2,children:(0,V.jsxs)(p.ZP,{alignItems:"center",children:[(0,V.jsxs)(y.ZP,{bold:!0,large:!0,children:[on?"--":(0,L.uf)(dn)," total pipeline runs"]}),Zn]})}),(0,V.jsx)(b.Z,{mt:1,children:(0,V.jsx)(d.Z,{backgroundColor:_.Z.background.panel,colors:M.NU,data:vn,getXValue:function(n){return n.date},height:500,keys:M.hu,margin:{bottom:30,left:35,right:0,top:10},tooltipLeftOffset:M.CD,xLabelFormat:function(n){return s()(n).format("MMM DD")}})})]})]}),(0,V.jsx)(b.Z,X(X({},z),{},{children:(0,V.jsx)(p.ZP,{alignItems:"center",justifyContent:"center",children:(0,V.jsx)(x.Z,{pipelineRuns:ln,pipelineType:k.LM,workspaceFormatting:!0})})})),(0,V.jsx)(b.Z,{mb:2})]})}H.getInitialProps=function(){var n=(0,e.Z)(a().mark((function n(t){var r,e;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",{tab:null!=t&&null!==(r=t.query)&&void 0!==r&&r.tab?null==t||null===(e=t.query)||void 0===e?void 0:e.tab:null});case 1:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}(),t.default=(0,m.Z)(H)},44356:function(n,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage/overview",function(){return r(18682)}])}},function(n){n.O(0,[125,2714,449,1598,5831,6362,9774,2888,179],(function(){return t=44356,n(n.s=t);var t}));var t=n.O();_N_E=t}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4061],{79239:function(e,t,n){"use strict";n.r(t);var r=n(77837),u=n(82394),i=n(38860),o=n.n(i),s=n(82684),a=n(34376),c=n(55072),l=n(27966),p=n(93808),f=n(82359),d=n(38276),b=n(4190),g=n(85544),h=n(59533),v=n(35686),O=n(44265),P=n(70515),m=n(75083),_=n(69419),j=n(70320),y=n(28598);function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){(0,u.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Z(){var e=(0,a.useRouter)(),t=(0,s.useState)(null),n=t[0],r=t[1],u=(0,_.iV)(),i=null!=u&&u.page?u.page:0,o=(0,s.useMemo)((function(){return(0,_.DQ)(u,[O.P0.PIPELINE_UUID,O.P0.STATUS,O.P0.TAG])}),[u]),p=v.ZP.projects.list().data,w=(0,s.useMemo)((function(){var e;return null==p||null===(e=p.projects)||void 0===e?void 0:e[0]}),[p]),Z=((0,s.useMemo)((function(){var e;return(0,j.hY)(null==w||null===(e=w.features)||void 0===e?void 0:e[f.d.LOCAL_TIMEZONE])}),[null==w?void 0:w.features]),E(E({},o),{},{_limit:c.Q,_offset:i*c.Q,disable_retries_grouping:!0,include_all_pipeline_schedules:!0}));null!=u&&u.status&&(Z.status=u.status);var N=v.ZP.pipeline_runs.list(Z,{refreshInterval:7e3,revalidateOnFocus:!0}),x=N.data,M=N.mutate,k=(0,s.useMemo)((function(){return(null==x?void 0:x.pipeline_runs)||[]}),[x]),D=(0,s.useMemo)((function(){var e;return(null==x||null===(e=x.metadata)||void 0===e?void 0:e.count)||[]}),[x]),I=(0,s.useMemo)((function(){return(0,y.jsx)(g.Z,{filterOptions:{status:O.hn},filterValueLabelMapping:{status:O.Do},onClickFilterDefaults:function(){e.push("/manage/pipeline-runs")},query:o,resetPageOnFilterApply:!0})}),[e]);return(0,y.jsx)(h.Z,{breadcrumbs:[{label:function(){return"Workspaces"},linkProps:{as:"/manage",href:"/manage"}},{bold:!0,label:function(){return"Pipeline runs"}}],errors:n,pageName:m.L6.PIPELINE_RUNS,setErrors:r,subheaderChildren:I,children:x?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(l.Z,{disableRowSelect:!0,fetchPipelineRuns:M,pipelineRuns:k,setErrors:r,workspaceFormatting:!0}),(0,y.jsx)(d.Z,{p:2,children:(0,y.jsx)(c.ZP,{maxPages:c.Et,onUpdate:function(t){var n=Number(t),r=E(E({},u),{},{page:n>=0?n:0});e.push("/manage/pipeline-runs","/manage/pipeline-runs?".concat((0,_.uM)(r)))},page:Number(i),totalPages:Math.ceil(D/c.Q)})})]}):(0,y.jsx)(d.Z,{p:P.Mq,children:(0,y.jsx)(b.Z,{inverted:!0,large:!0})})})}Z.getInitialProps=(0,r.Z)(o().mark((function e(){return o().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,p.Z)(Z)},24014:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage/pipeline-runs",function(){return n(79239)}])},80022:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},15544:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:function(){return r}})},13692:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(61049);function u(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,r.Z)(e,t)}},93189:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(12539),u=n(80022);function i(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,u.Z)(e)}}},function(e){e.O(0,[1557,1598,7966,5544,9774,2888,179],(function(){return t=24014,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4061],{79239:function(e,t,n){"use strict";n.r(t);var r=n(77837),u=n(82394),i=n(38860),o=n.n(i),s=n(82684),a=n(34376),c=n(55072),l=n(27966),p=n(93808),f=n(82359),d=n(38276),b=n(4190),g=n(85544),h=n(59533),v=n(35686),O=n(44265),P=n(70515),m=n(75083),_=n(69419),j=n(70320),y=n(28598);function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){(0,u.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Z(){var e=(0,a.useRouter)(),t=(0,s.useState)(null),n=t[0],r=t[1],u=(0,_.iV)(),i=null!=u&&u.page?u.page:0,o=(0,s.useMemo)((function(){return(0,_.DQ)(u,[O.P0.PIPELINE_UUID,O.P0.STATUS,O.P0.TAG])}),[u]),p=v.ZP.projects.list().data,w=(0,s.useMemo)((function(){var e;return null==p||null===(e=p.projects)||void 0===e?void 0:e[0]}),[p]),Z=((0,s.useMemo)((function(){var e;return(0,j.hY)(null==w||null===(e=w.features)||void 0===e?void 0:e[f.d.LOCAL_TIMEZONE])}),[null==w?void 0:w.features]),E(E({},o),{},{_limit:c.Q,_offset:i*c.Q,disable_retries_grouping:!0,include_all_pipeline_schedules:!0}));null!=u&&u.status&&(Z.status=u.status);var N=v.ZP.pipeline_runs.list(Z,{refreshInterval:7e3,revalidateOnFocus:!0}),x=N.data,M=N.mutate,k=(0,s.useMemo)((function(){return(null==x?void 0:x.pipeline_runs)||[]}),[x]),D=(0,s.useMemo)((function(){var e;return(null==x||null===(e=x.metadata)||void 0===e?void 0:e.count)||[]}),[x]),I=(0,s.useMemo)((function(){return(0,y.jsx)(g.Z,{filterOptions:{status:O.hn},filterValueLabelMapping:{status:O.Do},onClickFilterDefaults:function(){e.push("/manage/pipeline-runs")},query:o,resetPageOnFilterApply:!0})}),[e]);return(0,y.jsx)(h.Z,{breadcrumbs:[{label:function(){return"Workspaces"},linkProps:{as:"/manage",href:"/manage"}},{bold:!0,label:function(){return"Pipeline runs"}}],errors:n,pageName:m.L6.PIPELINE_RUNS,setErrors:r,subheaderChildren:I,children:x?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(l.Z,{disableRowSelect:!0,fetchPipelineRuns:M,pipelineRuns:k,setErrors:r,workspaceFormatting:!0}),(0,y.jsx)(d.Z,{p:2,children:(0,y.jsx)(c.ZP,{maxPages:c.Et,onUpdate:function(t){var n=Number(t),r=E(E({},u),{},{page:n>=0?n:0});e.push("/manage/pipeline-runs","/manage/pipeline-runs?".concat((0,_.uM)(r)))},page:Number(i),totalPages:Math.ceil(D/c.Q)})})]}):(0,y.jsx)(d.Z,{p:P.Mq,children:(0,y.jsx)(b.Z,{inverted:!0,large:!0})})})}Z.getInitialProps=(0,r.Z)(o().mark((function e(){return o().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,p.Z)(Z)},24014:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage/pipeline-runs",function(){return n(79239)}])},80022:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},15544:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:function(){return r}})},13692:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(61049);function u(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,r.Z)(e,t)}},93189:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(12539),u=n(80022);function i(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,u.Z)(e)}}},function(e){e.O(0,[449,1598,7966,5544,9774,2888,179],(function(){return t=24014,e(e.s=t);var t}));var t=e.O();_N_E=t}]);