prefect 3.6.16.dev5__py3-none-any.whl → 3.6.16.dev7__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.
Files changed (286) hide show
  1. prefect/_build_info.py +3 -3
  2. prefect/cli/__init__.py +1 -0
  3. prefect/cli/cloud/asset.py +135 -0
  4. prefect/server/ui-v2/assets/artifact-card-BnPKAfkY.js +2 -0
  5. prefect/server/ui-v2/assets/artifact-card-BnPKAfkY.js.map +1 -0
  6. prefect/server/ui-v2/assets/artifact._id-vDOuIuta.js +2 -0
  7. prefect/server/ui-v2/assets/artifact._id-vDOuIuta.js.map +1 -0
  8. prefect/server/ui-v2/assets/automation-wizard-RlOhF90R.js +2 -0
  9. prefect/server/ui-v2/assets/automation-wizard-RlOhF90R.js.map +1 -0
  10. prefect/server/ui-v2/assets/automation._id-CEHa-X0X.js +2 -0
  11. prefect/server/ui-v2/assets/{automation._id-CMiura1b.js.map → automation._id-CEHa-X0X.js.map} +1 -1
  12. prefect/server/ui-v2/assets/{automation_._id.edit-Cbfcwa-K.js → automation_._id.edit-BRWAsELa.js} +2 -2
  13. prefect/server/ui-v2/assets/{automation_._id.edit-Cbfcwa-K.js.map → automation_._id.edit-BRWAsELa.js.map} +1 -1
  14. prefect/server/ui-v2/assets/{automations-header-BxPCOE-0.js → automations-header-Dr6v5dPp.js} +2 -2
  15. prefect/server/ui-v2/assets/{automations-header-BxPCOE-0.js.map → automations-header-Dr6v5dPp.js.map} +1 -1
  16. prefect/server/ui-v2/assets/base-job-template-form-section-C8_R96gO.js +2 -0
  17. prefect/server/ui-v2/assets/base-job-template-form-section-C8_R96gO.js.map +1 -0
  18. prefect/server/ui-v2/assets/block-type-details-tAkUWqs1.js +2 -0
  19. prefect/server/ui-v2/assets/block-type-details-tAkUWqs1.js.map +1 -0
  20. prefect/server/ui-v2/assets/block-type-logo-scnMsyY5.js +2 -0
  21. prefect/server/ui-v2/assets/{block-type-logo-DuvU7goV.js.map → block-type-logo-scnMsyY5.js.map} +1 -1
  22. prefect/server/ui-v2/assets/block._id-BY42cyjR.js +2 -0
  23. prefect/server/ui-v2/assets/block._id-BY42cyjR.js.map +1 -0
  24. prefect/server/ui-v2/assets/{block_._id.edit-C4SmoQ4y.js → block_._id.edit-n2jwU5yr.js} +2 -2
  25. prefect/server/ui-v2/assets/{block_._id.edit-C4SmoQ4y.js.map → block_._id.edit-n2jwU5yr.js.map} +1 -1
  26. prefect/server/ui-v2/assets/catalog-5_GoCKpb.js +2 -0
  27. prefect/server/ui-v2/assets/catalog-5_GoCKpb.js.map +1 -0
  28. prefect/server/ui-v2/assets/catalog_._slug-sZvt0fDy.js +2 -0
  29. prefect/server/ui-v2/assets/catalog_._slug-sZvt0fDy.js.map +1 -0
  30. prefect/server/ui-v2/assets/{catalog_._slug_.create-CgKL4TS2.js → catalog_._slug_.create-rboQmoyW.js} +2 -2
  31. prefect/server/ui-v2/assets/{catalog_._slug_.create-CgKL4TS2.js.map → catalog_._slug_.create-rboQmoyW.js.map} +1 -1
  32. prefect/server/ui-v2/assets/{collapsible-DZbPzSgr.js → collapsible-Lk7MRvBH.js} +2 -2
  33. prefect/server/ui-v2/assets/{collapsible-DZbPzSgr.js.map → collapsible-Lk7MRvBH.js.map} +1 -1
  34. prefect/server/ui-v2/assets/concurrency-limit._id-D5i9zZJh.js +2 -0
  35. prefect/server/ui-v2/assets/concurrency-limit._id-D5i9zZJh.js.map +1 -0
  36. prefect/server/ui-v2/assets/create-CtsA2QIl.js +2 -0
  37. prefect/server/ui-v2/assets/{create-BrNwbpVu.js.map → create-CtsA2QIl.js.map} +1 -1
  38. prefect/server/ui-v2/assets/{create-DWgkh2HT.js → create-DJPAEZ93.js} +2 -2
  39. prefect/server/ui-v2/assets/create-DJPAEZ93.js.map +1 -0
  40. prefect/server/ui-v2/assets/{data-table-QSHqmTar.js → data-table-bk-0xKWT.js} +2 -2
  41. prefect/server/ui-v2/assets/{data-table-QSHqmTar.js.map → data-table-bk-0xKWT.js.map} +1 -1
  42. prefect/server/ui-v2/assets/{delete-confirmation-dialog-dLycVNo4.js → delete-confirmation-dialog-BZg9EOfN.js} +2 -2
  43. prefect/server/ui-v2/assets/{delete-confirmation-dialog-dLycVNo4.js.map → delete-confirmation-dialog-BZg9EOfN.js.map} +1 -1
  44. prefect/server/ui-v2/assets/{deployment-action-header-CzvBTL6H.js → deployment-action-header-DwuMPgVg.js} +2 -2
  45. prefect/server/ui-v2/assets/{deployment-action-header-CzvBTL6H.js.map → deployment-action-header-DwuMPgVg.js.map} +1 -1
  46. prefect/server/ui-v2/assets/deployment-form-BpKkzEf2.js +3 -0
  47. prefect/server/ui-v2/assets/deployment-form-BpKkzEf2.js.map +1 -0
  48. prefect/server/ui-v2/assets/{deployment-links-CGjJpxJA.js → deployment-links-B67P-6Ph.js} +2 -2
  49. prefect/server/ui-v2/assets/{deployment-links-CGjJpxJA.js.map → deployment-links-B67P-6Ph.js.map} +1 -1
  50. prefect/server/ui-v2/assets/{deployment._id-DXrb6frJ.js → deployment._id-BVOBfMVf.js} +2 -2
  51. prefect/server/ui-v2/assets/deployment._id-BVOBfMVf.js.map +1 -0
  52. prefect/server/ui-v2/assets/deployment._id-KOMC9fpE.js +2 -0
  53. prefect/server/ui-v2/assets/deployment._id-KOMC9fpE.js.map +1 -0
  54. prefect/server/ui-v2/assets/deployment_._id.duplicate-BPk2SchT.js +2 -0
  55. prefect/server/ui-v2/assets/deployment_._id.duplicate-BPk2SchT.js.map +1 -0
  56. prefect/server/ui-v2/assets/deployment_._id.edit-Dv0M_huv.js +2 -0
  57. prefect/server/ui-v2/assets/deployment_._id.edit-Dv0M_huv.js.map +1 -0
  58. prefect/server/ui-v2/assets/deployment_._id.run-DFVA4Xhx.js +2 -0
  59. prefect/server/ui-v2/assets/{deployment_._id.run-CnacOmhY.js.map → deployment_._id.run-DFVA4Xhx.js.map} +1 -1
  60. prefect/server/ui-v2/assets/{dropdown-menu-B9LKPlz7.js → dropdown-menu-fRiq5bS-.js} +2 -2
  61. prefect/server/ui-v2/assets/{dropdown-menu-B9LKPlz7.js.map → dropdown-menu-fRiq5bS-.js.map} +1 -1
  62. prefect/server/ui-v2/assets/{event-resource-display-B42RIaiX.js → event-resource-display-C1ZAey-o.js} +2 -2
  63. prefect/server/ui-v2/assets/{event-resource-display-B42RIaiX.js.map → event-resource-display-C1ZAey-o.js.map} +1 -1
  64. prefect/server/ui-v2/assets/event._eventDate._eventId-CcbtP9Ag.js +2 -0
  65. prefect/server/ui-v2/assets/{event._eventDate._eventId-CKTuT_8S.js.map → event._eventDate._eventId-CcbtP9Ag.js.map} +1 -1
  66. prefect/server/ui-v2/assets/flow-run-graph-CycKStSg.js +2 -0
  67. prefect/server/ui-v2/assets/flow-run-graph-CycKStSg.js.map +1 -0
  68. prefect/server/ui-v2/assets/{flow-run._id-BKv9Meqc.js → flow-run._id-Dn9R_Tjy.js} +2 -2
  69. prefect/server/ui-v2/assets/flow-run._id-Dn9R_Tjy.js.map +1 -0
  70. prefect/server/ui-v2/assets/{flow-run._id-ZTkjj6bM.js → flow-run._id-Dwx7ojcj.js} +2 -2
  71. prefect/server/ui-v2/assets/flow-run._id-Dwx7ojcj.js.map +1 -0
  72. prefect/server/ui-v2/assets/flow-run._id-YzRd5jrC.js +4 -0
  73. prefect/server/ui-v2/assets/flow-run._id-YzRd5jrC.js.map +1 -0
  74. prefect/server/ui-v2/assets/flow-runs-pagination-DMLZFM1m.js +2 -0
  75. prefect/server/ui-v2/assets/flow-runs-pagination-DMLZFM1m.js.map +1 -0
  76. prefect/server/ui-v2/assets/flow._id-V6-Qhkwk.js +2 -0
  77. prefect/server/ui-v2/assets/flow._id-V6-Qhkwk.js.map +1 -0
  78. prefect/server/ui-v2/assets/{form-DOdmIC3A.js → form-Cl5Hk9bq.js} +2 -2
  79. prefect/server/ui-v2/assets/{form-DOdmIC3A.js.map → form-Cl5Hk9bq.js.map} +1 -1
  80. prefect/server/ui-v2/assets/{header-DcIuN5UN.js → header-BuI436ik.js} +2 -2
  81. prefect/server/ui-v2/assets/{header-DcIuN5UN.js.map → header-BuI436ik.js.map} +1 -1
  82. prefect/server/ui-v2/assets/{header-CnBwASd-.js → header-DcAQCxQl.js} +2 -2
  83. prefect/server/ui-v2/assets/{header-CnBwASd-.js.map → header-DcAQCxQl.js.map} +1 -1
  84. prefect/server/ui-v2/assets/{header-DxE-NzAK.js → header-qlcK4NLD.js} +2 -2
  85. prefect/server/ui-v2/assets/{header-DxE-NzAK.js.map → header-qlcK4NLD.js.map} +1 -1
  86. prefect/server/ui-v2/assets/index--Z69UYXV.js +2 -0
  87. prefect/server/ui-v2/assets/index--Z69UYXV.js.map +1 -0
  88. prefect/server/ui-v2/assets/{index-D0R9_LIL.js → index-BO4Qqsm8.js} +2 -2
  89. prefect/server/ui-v2/assets/index-BO4Qqsm8.js.map +1 -0
  90. prefect/server/ui-v2/assets/index-Bg45XS_V.js +2 -0
  91. prefect/server/ui-v2/assets/index-Bg45XS_V.js.map +1 -0
  92. prefect/server/ui-v2/assets/{index-BIBIJufF.js → index-BleYpDoN.js} +2 -2
  93. prefect/server/ui-v2/assets/index-BleYpDoN.js.map +1 -0
  94. prefect/server/ui-v2/assets/{index-DyOAqIOp.js → index-C63VUjOh.js} +2 -2
  95. prefect/server/ui-v2/assets/{index-DyOAqIOp.js.map → index-C63VUjOh.js.map} +1 -1
  96. prefect/server/ui-v2/assets/{index-DfKXdmko.js → index-C6LgWyJb.js} +2 -2
  97. prefect/server/ui-v2/assets/index-C6LgWyJb.js.map +1 -0
  98. prefect/server/ui-v2/assets/index-CE-bVgqj.js +2 -0
  99. prefect/server/ui-v2/assets/{index-DlAHvqFx.js.map → index-CE-bVgqj.js.map} +1 -1
  100. prefect/server/ui-v2/assets/{index-V_xTKaEb.js → index-CPpeVt8m.js} +13 -13
  101. prefect/server/ui-v2/assets/index-CPpeVt8m.js.map +1 -0
  102. prefect/server/ui-v2/assets/index-CYaUe0Ym.js +2 -0
  103. prefect/server/ui-v2/assets/index-CYaUe0Ym.js.map +1 -0
  104. prefect/server/ui-v2/assets/{index-C5RMFRyZ.js → index-Clbms0kg.js} +2 -2
  105. prefect/server/ui-v2/assets/index-Clbms0kg.js.map +1 -0
  106. prefect/server/ui-v2/assets/index-D13YFoYA.js +2 -0
  107. prefect/server/ui-v2/assets/index-D13YFoYA.js.map +1 -0
  108. prefect/server/ui-v2/assets/{index-Cx1qEoCK.js → index-D73a_nGu.js} +2 -2
  109. prefect/server/ui-v2/assets/{index-Cx1qEoCK.js.map → index-D73a_nGu.js.map} +1 -1
  110. prefect/server/ui-v2/assets/index-DJXBzX1E.css +1 -0
  111. prefect/server/ui-v2/assets/{index-BO60ehN6.js → index-DPPPaOr_.js} +2 -2
  112. prefect/server/ui-v2/assets/index-DPPPaOr_.js.map +1 -0
  113. prefect/server/ui-v2/assets/{index-DP8W-xJo.js → index-DU9ShbqW.js} +2 -2
  114. prefect/server/ui-v2/assets/index-DU9ShbqW.js.map +1 -0
  115. prefect/server/ui-v2/assets/index-DdR1lzZk.js +2 -0
  116. prefect/server/ui-v2/assets/index-DdR1lzZk.js.map +1 -0
  117. prefect/server/ui-v2/assets/{index-B9ttjsyu.js → index-ELo08q04.js} +2 -2
  118. prefect/server/ui-v2/assets/{index-B9ttjsyu.js.map → index-ELo08q04.js.map} +1 -1
  119. prefect/server/ui-v2/assets/{index-BTL1xHS9.js → index-cp6PTdHp.js} +2 -2
  120. prefect/server/ui-v2/assets/{index-BTL1xHS9.js.map → index-cp6PTdHp.js.map} +1 -1
  121. prefect/server/ui-v2/assets/{index-D6G96ToY.js → index-kM_g8J0u.js} +2 -2
  122. prefect/server/ui-v2/assets/{index-D6G96ToY.js.map → index-kM_g8J0u.js.map} +1 -1
  123. prefect/server/ui-v2/assets/{index-q5Y3hlDT.js → index-mYcm9Rkr.js} +2 -2
  124. prefect/server/ui-v2/assets/index-mYcm9Rkr.js.map +1 -0
  125. prefect/server/ui-v2/assets/{index-D9cOtoSU.js → index-yavn_NBp.js} +2 -2
  126. prefect/server/ui-v2/assets/index-yavn_NBp.js.map +1 -0
  127. prefect/server/ui-v2/assets/{json-input-YKJMJCcT.js → json-input-iUzf6BvZ.js} +2 -2
  128. prefect/server/ui-v2/assets/{json-input-YKJMJCcT.js.map → json-input-iUzf6BvZ.js.map} +1 -1
  129. prefect/server/ui-v2/assets/{key-value-RPUUqQ6F.js → key-value-DI27Dv4P.js} +2 -2
  130. prefect/server/ui-v2/assets/{key-value-RPUUqQ6F.js.map → key-value-DI27Dv4P.js.map} +1 -1
  131. prefect/server/ui-v2/assets/key._key-C-nk2nld.js +2 -0
  132. prefect/server/ui-v2/assets/key._key-C-nk2nld.js.map +1 -0
  133. prefect/server/ui-v2/assets/{lazy-markdown-B9vEkJ0h.js → lazy-markdown-D_y73qoD.js} +2 -2
  134. prefect/server/ui-v2/assets/{lazy-markdown-B9vEkJ0h.js.map → lazy-markdown-D_y73qoD.js.map} +1 -1
  135. prefect/server/ui-v2/assets/{login-C3PhSGQJ.js → login-DR_xuMmg.js} +2 -2
  136. prefect/server/ui-v2/assets/{login-C3PhSGQJ.js.map → login-DR_xuMmg.js.map} +1 -1
  137. prefect/server/ui-v2/assets/{markdown-input-Dei7u1qp.js → markdown-input-hzlzpUdj.js} +2 -2
  138. prefect/server/ui-v2/assets/{markdown-input-Dei7u1qp.js.map → markdown-input-hzlzpUdj.js.map} +1 -1
  139. prefect/server/ui-v2/assets/{python-example-snippet-DvulFxgw.js → python-example-snippet-d8bTNJ0J.js} +3 -3
  140. prefect/server/ui-v2/assets/{python-example-snippet-DvulFxgw.js.map → python-example-snippet-d8bTNJ0J.js.map} +1 -1
  141. prefect/server/ui-v2/assets/{python-input-niCawr8m.js → python-input-Bxdnzvx3.js} +2 -2
  142. prefect/server/ui-v2/assets/{python-input-niCawr8m.js.map → python-input-Bxdnzvx3.js.map} +1 -1
  143. prefect/server/ui-v2/assets/{radio-group-D55TQZsk.js → radio-group-0oOEMJCS.js} +2 -2
  144. prefect/server/ui-v2/assets/{radio-group-D55TQZsk.js.map → radio-group-0oOEMJCS.js.map} +1 -1
  145. prefect/server/ui-v2/assets/{route-error-state-Cu4m0LTX.js → route-error-state-BqbnZCc-.js} +2 -2
  146. prefect/server/ui-v2/assets/{route-error-state-Cu4m0LTX.js.map → route-error-state-BqbnZCc-.js.map} +1 -1
  147. prefect/server/ui-v2/assets/{schema-form-BQAcWW5k.js → schema-form-BD-WM4S0.js} +2 -2
  148. prefect/server/ui-v2/assets/{schema-form-BQAcWW5k.js.map → schema-form-BD-WM4S0.js.map} +1 -1
  149. prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-Cb4sTJle.js → schema-form-input-string-format-datetime-Dg3zVAp5.js} +4 -4
  150. prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-Cb4sTJle.js.map → schema-form-input-string-format-datetime-Dg3zVAp5.js.map} +1 -1
  151. prefect/server/ui-v2/assets/{settings-DV4ewZ_4.js → settings-Dm6yMLix.js} +2 -2
  152. prefect/server/ui-v2/assets/{settings-DV4ewZ_4.js.map → settings-Dm6yMLix.js.map} +1 -1
  153. prefect/server/ui-v2/assets/{sort-filter-DY7vgl7C.js → sort-filter-X6JyRc0-.js} +2 -2
  154. prefect/server/ui-v2/assets/{sort-filter-DY7vgl7C.js.map → sort-filter-X6JyRc0-.js.map} +1 -1
  155. prefect/server/ui-v2/assets/{table-ChOwO4Pk.js → table-Xyel2BEw.js} +2 -2
  156. prefect/server/ui-v2/assets/{table-ChOwO4Pk.js.map → table-Xyel2BEw.js.map} +1 -1
  157. prefect/server/ui-v2/assets/{tags-input-2KSBvO_K.js → tags-input-DqZ8v99z.js} +2 -2
  158. prefect/server/ui-v2/assets/{tags-input-2KSBvO_K.js.map → tags-input-DqZ8v99z.js.map} +1 -1
  159. prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-CNrP9yPQ.js → task-run-concurrency-limits-reset-dialog-5xFWeoYy.js} +2 -2
  160. prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-CNrP9yPQ.js.map → task-run-concurrency-limits-reset-dialog-5xFWeoYy.js.map} +1 -1
  161. prefect/server/ui-v2/assets/{task-run._id-cqXH0PMU.js → task-run._id-9DcrUEGz.js} +3 -3
  162. prefect/server/ui-v2/assets/{task-run._id-cqXH0PMU.js.map → task-run._id-9DcrUEGz.js.map} +1 -1
  163. prefect/server/ui-v2/assets/{task-run._id-CQGeAiBh.js → task-run._id-DJkoLl_e.js} +2 -2
  164. prefect/server/ui-v2/assets/task-run._id-DJkoLl_e.js.map +1 -0
  165. prefect/server/ui-v2/assets/task-runs-pagination-B2fSdB1t.js +2 -0
  166. prefect/server/ui-v2/assets/task-runs-pagination-B2fSdB1t.js.map +1 -0
  167. prefect/server/ui-v2/assets/{textarea-9v5uTuxg.js → textarea-DFEOJJdc.js} +2 -2
  168. prefect/server/ui-v2/assets/{textarea-9v5uTuxg.js.map → textarea-DFEOJJdc.js.map} +1 -1
  169. prefect/server/ui-v2/assets/{timezone-select-DPtR_b06.js → timezone-select-NViFNNLz.js} +2 -2
  170. prefect/server/ui-v2/assets/{timezone-select-DPtR_b06.js.map → timezone-select-NViFNNLz.js.map} +1 -1
  171. prefect/server/ui-v2/assets/{toggle-group-CBJphTE6.js → toggle-group-EMgSOoYH.js} +2 -2
  172. prefect/server/ui-v2/assets/{toggle-group-CBJphTE6.js.map → toggle-group-EMgSOoYH.js.map} +1 -1
  173. prefect/server/ui-v2/assets/use-delete-automation-confirmation-dialog-BHgDXlwg.js +2 -0
  174. prefect/server/ui-v2/assets/use-delete-automation-confirmation-dialog-BHgDXlwg.js.map +1 -0
  175. prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-BYY1b8yH.js → use-delete-block-document-confirmation-dialog-CxRkBKPg.js} +2 -2
  176. prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-BYY1b8yH.js.map → use-delete-block-document-confirmation-dialog-CxRkBKPg.js.map} +1 -1
  177. prefect/server/ui-v2/assets/use-flow-runs-selected-rows-Ck8nwx2q.js +2 -0
  178. prefect/server/ui-v2/assets/use-flow-runs-selected-rows-Ck8nwx2q.js.map +1 -0
  179. prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-BOTU5FPq.js → use-get-artifacts-flow-task-runs-D7Djt53s.js} +2 -2
  180. prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-BOTU5FPq.js.map → use-get-artifacts-flow-task-runs-D7Djt53s.js.map} +1 -1
  181. prefect/server/ui-v2/assets/{use-quick-run-DzSmbSlu.js → use-quick-run-Cpy0t7dX.js} +2 -2
  182. prefect/server/ui-v2/assets/{use-quick-run-DzSmbSlu.js.map → use-quick-run-Cpy0t7dX.js.map} +1 -1
  183. prefect/server/ui-v2/assets/{use-state-favicon-UFxhmhHr.js → use-state-favicon-CMsL9s6j.js} +2 -2
  184. prefect/server/ui-v2/assets/{use-state-favicon-UFxhmhHr.js.map → use-state-favicon-CMsL9s6j.js.map} +1 -1
  185. prefect/server/ui-v2/assets/use-stepper-CZZEx5js.js +2 -0
  186. prefect/server/ui-v2/assets/use-stepper-CZZEx5js.js.map +1 -0
  187. prefect/server/ui-v2/assets/{utilities-2FfCfMAV.js → utilities-D9BfvLg5.js} +2 -2
  188. prefect/server/ui-v2/assets/{utilities-2FfCfMAV.js.map → utilities-D9BfvLg5.js.map} +1 -1
  189. prefect/server/ui-v2/assets/work-pool-filter-dsJ6xeK6.js +2 -0
  190. prefect/server/ui-v2/assets/work-pool-filter-dsJ6xeK6.js.map +1 -0
  191. prefect/server/ui-v2/assets/{work-pool-queue-toggle-zSWhEFap.js → work-pool-queue-toggle-f_-cTWxB.js} +2 -2
  192. prefect/server/ui-v2/assets/{work-pool-queue-toggle-zSWhEFap.js.map → work-pool-queue-toggle-f_-cTWxB.js.map} +1 -1
  193. prefect/server/ui-v2/assets/{work-pool._workPoolName-BwIVfCIe.js → work-pool._workPoolName-zBqgkYLT.js} +2 -2
  194. prefect/server/ui-v2/assets/{work-pool._workPoolName-BwIVfCIe.js.map → work-pool._workPoolName-zBqgkYLT.js.map} +1 -1
  195. prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-j7cjgoJp.js → work-pool_._workPoolName.edit-B-8_CnfA.js} +2 -2
  196. prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-j7cjgoJp.js.map → work-pool_._workPoolName.edit-B-8_CnfA.js.map} +1 -1
  197. prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-BlFjSdoB.js → work-pool_._workPoolName.queue._workQueueName-DzrY1tMq.js} +2 -2
  198. prefect/server/ui-v2/assets/work-pool_._workPoolName.queue._workQueueName-DzrY1tMq.js.map +1 -0
  199. prefect/server/ui-v2/assets/{work-queue-icon-text-vWlRNW-b.js → work-queue-icon-text-BqqQ413o.js} +2 -2
  200. prefect/server/ui-v2/assets/{work-queue-icon-text-vWlRNW-b.js.map → work-queue-icon-text-BqqQ413o.js.map} +1 -1
  201. prefect/server/ui-v2/index.html +2 -2
  202. prefect/task_engine.py +26 -12
  203. prefect/workers/base.py +18 -1
  204. {prefect-3.6.16.dev5.dist-info → prefect-3.6.16.dev7.dist-info}/METADATA +1 -1
  205. {prefect-3.6.16.dev5.dist-info → prefect-3.6.16.dev7.dist-info}/RECORD +208 -207
  206. prefect/server/ui-v2/assets/artifact-card-DQfjRA2u.js +0 -2
  207. prefect/server/ui-v2/assets/artifact-card-DQfjRA2u.js.map +0 -1
  208. prefect/server/ui-v2/assets/artifact._id-BBhuX3px.js +0 -2
  209. prefect/server/ui-v2/assets/artifact._id-BBhuX3px.js.map +0 -1
  210. prefect/server/ui-v2/assets/automation-wizard-DeT-tz5i.js +0 -2
  211. prefect/server/ui-v2/assets/automation-wizard-DeT-tz5i.js.map +0 -1
  212. prefect/server/ui-v2/assets/automation._id-CMiura1b.js +0 -2
  213. prefect/server/ui-v2/assets/base-job-template-form-section-MeO0M71Y.js +0 -2
  214. prefect/server/ui-v2/assets/base-job-template-form-section-MeO0M71Y.js.map +0 -1
  215. prefect/server/ui-v2/assets/block-type-details-Bcb9qEO8.js +0 -2
  216. prefect/server/ui-v2/assets/block-type-details-Bcb9qEO8.js.map +0 -1
  217. prefect/server/ui-v2/assets/block-type-logo-DuvU7goV.js +0 -2
  218. prefect/server/ui-v2/assets/block._id-DFR6zmOy.js +0 -2
  219. prefect/server/ui-v2/assets/block._id-DFR6zmOy.js.map +0 -1
  220. prefect/server/ui-v2/assets/catalog-CPzaK8QS.js +0 -2
  221. prefect/server/ui-v2/assets/catalog-CPzaK8QS.js.map +0 -1
  222. prefect/server/ui-v2/assets/catalog_._slug-60h4tERz.js +0 -2
  223. prefect/server/ui-v2/assets/catalog_._slug-60h4tERz.js.map +0 -1
  224. prefect/server/ui-v2/assets/concurrency-limit._id-BFfR6_U0.js +0 -2
  225. prefect/server/ui-v2/assets/concurrency-limit._id-BFfR6_U0.js.map +0 -1
  226. prefect/server/ui-v2/assets/create-BrNwbpVu.js +0 -2
  227. prefect/server/ui-v2/assets/create-DWgkh2HT.js.map +0 -1
  228. prefect/server/ui-v2/assets/deployment-form-B33C7F2u.js +0 -3
  229. prefect/server/ui-v2/assets/deployment-form-B33C7F2u.js.map +0 -1
  230. prefect/server/ui-v2/assets/deployment._id-5rPcPD0T.js +0 -2
  231. prefect/server/ui-v2/assets/deployment._id-5rPcPD0T.js.map +0 -1
  232. prefect/server/ui-v2/assets/deployment._id-DXrb6frJ.js.map +0 -1
  233. prefect/server/ui-v2/assets/deployment_._id.duplicate-D7YLydeq.js +0 -2
  234. prefect/server/ui-v2/assets/deployment_._id.duplicate-D7YLydeq.js.map +0 -1
  235. prefect/server/ui-v2/assets/deployment_._id.edit-Daq0J0Ow.js +0 -2
  236. prefect/server/ui-v2/assets/deployment_._id.edit-Daq0J0Ow.js.map +0 -1
  237. prefect/server/ui-v2/assets/deployment_._id.run-CnacOmhY.js +0 -2
  238. prefect/server/ui-v2/assets/event._eventDate._eventId-CKTuT_8S.js +0 -2
  239. prefect/server/ui-v2/assets/flow-run-graph-OrT2Osbu.js +0 -2
  240. prefect/server/ui-v2/assets/flow-run-graph-OrT2Osbu.js.map +0 -1
  241. prefect/server/ui-v2/assets/flow-run._id-BKv9Meqc.js.map +0 -1
  242. prefect/server/ui-v2/assets/flow-run._id-DCYAnq0D.js +0 -4
  243. prefect/server/ui-v2/assets/flow-run._id-DCYAnq0D.js.map +0 -1
  244. prefect/server/ui-v2/assets/flow-run._id-ZTkjj6bM.js.map +0 -1
  245. prefect/server/ui-v2/assets/flow-runs-pagination-CykMKOhv.js +0 -2
  246. prefect/server/ui-v2/assets/flow-runs-pagination-CykMKOhv.js.map +0 -1
  247. prefect/server/ui-v2/assets/flow._id-DhrxqQmD.js +0 -2
  248. prefect/server/ui-v2/assets/flow._id-DhrxqQmD.js.map +0 -1
  249. prefect/server/ui-v2/assets/index-BIBIJufF.js.map +0 -1
  250. prefect/server/ui-v2/assets/index-BO60ehN6.js.map +0 -1
  251. prefect/server/ui-v2/assets/index-BS7fbJ2s.js +0 -2
  252. prefect/server/ui-v2/assets/index-BS7fbJ2s.js.map +0 -1
  253. prefect/server/ui-v2/assets/index-C5RMFRyZ.js.map +0 -1
  254. prefect/server/ui-v2/assets/index-D0R9_LIL.js.map +0 -1
  255. prefect/server/ui-v2/assets/index-D9cOtoSU.js.map +0 -1
  256. prefect/server/ui-v2/assets/index-DEpWUeaO.js +0 -2
  257. prefect/server/ui-v2/assets/index-DEpWUeaO.js.map +0 -1
  258. prefect/server/ui-v2/assets/index-DP8W-xJo.js.map +0 -1
  259. prefect/server/ui-v2/assets/index-DfKXdmko.js.map +0 -1
  260. prefect/server/ui-v2/assets/index-DiVKp6rW.js +0 -2
  261. prefect/server/ui-v2/assets/index-DiVKp6rW.js.map +0 -1
  262. prefect/server/ui-v2/assets/index-DlAHvqFx.js +0 -2
  263. prefect/server/ui-v2/assets/index-VNFzALsC.js +0 -2
  264. prefect/server/ui-v2/assets/index-VNFzALsC.js.map +0 -1
  265. prefect/server/ui-v2/assets/index-V_xTKaEb.js.map +0 -1
  266. prefect/server/ui-v2/assets/index-WIq8QUNT.js +0 -2
  267. prefect/server/ui-v2/assets/index-WIq8QUNT.js.map +0 -1
  268. prefect/server/ui-v2/assets/index-m9O-nIOl.css +0 -1
  269. prefect/server/ui-v2/assets/index-q5Y3hlDT.js.map +0 -1
  270. prefect/server/ui-v2/assets/key._key-CX8FwfwL.js +0 -2
  271. prefect/server/ui-v2/assets/key._key-CX8FwfwL.js.map +0 -1
  272. prefect/server/ui-v2/assets/task-run._id-CQGeAiBh.js.map +0 -1
  273. prefect/server/ui-v2/assets/task-runs-pagination-CYoOghEN.js +0 -2
  274. prefect/server/ui-v2/assets/task-runs-pagination-CYoOghEN.js.map +0 -1
  275. prefect/server/ui-v2/assets/use-delete-automation-confirmation-dialog-DZplMJDW.js +0 -2
  276. prefect/server/ui-v2/assets/use-delete-automation-confirmation-dialog-DZplMJDW.js.map +0 -1
  277. prefect/server/ui-v2/assets/use-flow-runs-selected-rows-1YE-VIgM.js +0 -2
  278. prefect/server/ui-v2/assets/use-flow-runs-selected-rows-1YE-VIgM.js.map +0 -1
  279. prefect/server/ui-v2/assets/use-stepper-CnGJHRLP.js +0 -2
  280. prefect/server/ui-v2/assets/use-stepper-CnGJHRLP.js.map +0 -1
  281. prefect/server/ui-v2/assets/work-pool-filter-CGfXNujK.js +0 -2
  282. prefect/server/ui-v2/assets/work-pool-filter-CGfXNujK.js.map +0 -1
  283. prefect/server/ui-v2/assets/work-pool_._workPoolName.queue._workQueueName-BlFjSdoB.js.map +0 -1
  284. {prefect-3.6.16.dev5.dist-info → prefect-3.6.16.dev7.dist-info}/WHEEL +0 -0
  285. {prefect-3.6.16.dev5.dist-info → prefect-3.6.16.dev7.dist-info}/entry_points.txt +0 -0
  286. {prefect-3.6.16.dev5.dist-info → prefect-3.6.16.dev7.dist-info}/licenses/LICENSE +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index-BTL1xHS9.js","sources":["../../src/components/ui/schedule-badge/index.tsx"],"sourcesContent":["import cronstrue from \"cronstrue\";\nimport { format } from \"date-fns\";\nimport humanizeDuration from \"humanize-duration\";\nimport { useRef } from \"react\";\nimport { rrulestr } from \"rrule\";\nimport type { components } from \"@/api/prefect\";\nimport { Badge, type BadgeProps } from \"@/components/ui/badge\";\nimport {\n\tHoverCard,\n\tHoverCardContent,\n\tHoverCardTrigger,\n} from \"@/components/ui/hover-card\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { useIsOverflowing } from \"@/hooks/use-is-overflowing\";\nimport { capitalize, cn } from \"@/utils\";\n\ntype DeploymentSchedule = components[\"schemas\"][\"DeploymentSchedule\"];\ntype CronSchedule = components[\"schemas\"][\"CronSchedule\"];\ntype IntervalSchedule = components[\"schemas\"][\"IntervalSchedule\"];\ntype RRuleSchedule = components[\"schemas\"][\"RRuleSchedule\"];\n\ntype ScheduleBadgeProps = BadgeProps & {\n\tschedule: DeploymentSchedule;\n};\n\nexport const ScheduleBadge = ({ schedule, ...props }: ScheduleBadgeProps) => {\n\tconst { schedule: innerSchedule } = schedule;\n\tif (\"cron\" in innerSchedule) {\n\t\treturn (\n\t\t\t<CronScheduleBadge\n\t\t\t\tschedule={innerSchedule}\n\t\t\t\tactive={schedule.active}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t}\n\n\tif (\"interval\" in innerSchedule) {\n\t\treturn (\n\t\t\t<IntervalScheduleBadge\n\t\t\t\tschedule={innerSchedule}\n\t\t\t\tactive={schedule.active}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t}\n\n\tif (\"rrule\" in innerSchedule) {\n\t\treturn (\n\t\t\t<RRuleScheduleBadge\n\t\t\t\tschedule={innerSchedule}\n\t\t\t\tactive={schedule.active}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t}\n};\n\nconst CronScheduleBadge = ({\n\tactive,\n\tschedule,\n\t...props\n}: BadgeProps & {\n\tactive: boolean;\n\tschedule: CronSchedule;\n}) => {\n\tconst scheduleText = cronstrue.toString(schedule.cron);\n\tconst detailedScheduleText = `${active ? \"\" : \"(Paused)\"} ${scheduleText} (${schedule.timezone})`;\n\treturn (\n\t\t<TooltipProvider>\n\t\t\t<Tooltip>\n\t\t\t\t<TooltipTrigger>\n\t\t\t\t\t<Badge\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\tclassName={`${!active ? \"opacity-50\" : \"\"}`}\n\t\t\t\t\t\t{...props}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"truncate\">{scheduleText}</span>\n\t\t\t\t\t</Badge>\n\t\t\t\t</TooltipTrigger>\n\t\t\t\t<TooltipContent>{detailedScheduleText}</TooltipContent>\n\t\t\t</Tooltip>\n\t\t</TooltipProvider>\n\t);\n};\n\nconst IntervalScheduleBadge = ({\n\tactive,\n\tschedule,\n\t...props\n}: BadgeProps & {\n\tactive: boolean;\n\tschedule: IntervalSchedule;\n}) => {\n\tconst scheduleText = `Every ${humanizeDuration(schedule.interval * 1000)}`;\n\tlet detailedScheduleText = `${active ? \"\" : \"(Paused)\"} ${scheduleText}`;\n\tif (schedule.anchor_date) {\n\t\tdetailedScheduleText += ` using ${format(\n\t\t\tnew Date(schedule.anchor_date),\n\t\t\t\"MMM do, yyyy 'at' hh:mm:ss aa\",\n\t\t)} (${schedule.timezone}) as the anchor date`;\n\t}\n\treturn (\n\t\t<TooltipProvider>\n\t\t\t<Tooltip>\n\t\t\t\t<TooltipTrigger>\n\t\t\t\t\t<Badge\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\tclassName={`${!active ? \"opacity-50\" : \"\"}`}\n\t\t\t\t\t\t{...props}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"truncate\">{scheduleText}</span>\n\t\t\t\t\t</Badge>\n\t\t\t\t</TooltipTrigger>\n\t\t\t\t<TooltipContent>{detailedScheduleText}</TooltipContent>\n\t\t\t</Tooltip>\n\t\t</TooltipProvider>\n\t);\n};\n\nconst RRuleScheduleBadge = ({\n\tactive,\n\tschedule,\n\t...props\n}: BadgeProps & {\n\tactive: boolean;\n\tschedule: RRuleSchedule;\n}) => {\n\tconst scheduleText = rrulestr(schedule.rrule).toText();\n\tconst capitalizedScheduleText = capitalize(scheduleText);\n\tconst detailedScheduleText = `${active ? \"\" : \"(Paused)\"} ${capitalizedScheduleText} (${schedule.timezone})`;\n\treturn (\n\t\t<TooltipProvider>\n\t\t\t<Tooltip>\n\t\t\t\t<TooltipTrigger>\n\t\t\t\t\t<Badge\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\tclassName={`${!active ? \"opacity-50\" : \"\"}`}\n\t\t\t\t\t\t{...props}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"truncate\">{capitalizedScheduleText}</span>\n\t\t\t\t\t</Badge>\n\t\t\t\t</TooltipTrigger>\n\t\t\t\t<TooltipContent>{detailedScheduleText}</TooltipContent>\n\t\t\t</Tooltip>\n\t\t</TooltipProvider>\n\t);\n};\n\nexport const ScheduleBadgeGroup = ({\n\tschedules,\n\tclassName,\n}: {\n\tschedules: DeploymentSchedule[];\n\tclassName?: string;\n}) => {\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst isOverflowing = useIsOverflowing(containerRef);\n\tif (!schedules || schedules.length === 0) return null;\n\n\tif (isOverflowing) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={cn(\"flex flex-row gap-2 items-center no-wrap\", className)}\n\t\t\t>\n\t\t\t\t<HoverCard>\n\t\t\t\t\t<HoverCardTrigger>\n\t\t\t\t\t\t<Badge variant=\"secondary\" className=\"whitespace-nowrap\">\n\t\t\t\t\t\t\t{schedules.length} schedules\n\t\t\t\t\t\t</Badge>\n\t\t\t\t\t</HoverCardTrigger>\n\t\t\t\t\t<HoverCardContent className=\"flex flex-col flex-wrap gap-1 w-fit\">\n\t\t\t\t\t\t{schedules.map((schedule) => (\n\t\t\t\t\t\t\t<ScheduleBadge key={schedule.id} schedule={schedule} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</HoverCardContent>\n\t\t\t\t</HoverCard>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"flex flex-row gap-2 items-center no-wrap\"\n\t\t\tref={containerRef}\n\t\t>\n\t\t\t{schedules.map((schedule) => (\n\t\t\t\t<ScheduleBadge\n\t\t\t\t\tkey={schedule.id}\n\t\t\t\t\tschedule={schedule}\n\t\t\t\t\tclassName=\"max-w-28\"\n\t\t\t\t/>\n\t\t\t))}\n\t\t</div>\n\t);\n};\n"],"names":["ScheduleBadge","schedule","props","innerSchedule","jsx","CronScheduleBadge","IntervalScheduleBadge","RRuleScheduleBadge","active","scheduleText","cronstrue","detailedScheduleText","TooltipProvider","jsxs","Tooltip","TooltipTrigger","Badge","TooltipContent","humanizeDuration","format","rrulestr","capitalizedScheduleText","capitalize","ScheduleBadgeGroup","schedules","className","containerRef","useRef","isOverflowing","useIsOverflowing","cn","HoverCard","HoverCardTrigger","HoverCardContent"],"mappings":"mUA8BO,MAAMA,EAAgB,CAAC,CAAE,SAAAC,EAAU,GAAGC,KAAgC,CAC5E,KAAM,CAAE,SAAUC,CAAA,EAAkBF,EACpC,GAAI,SAAUE,EACb,OACCC,EAAAA,IAACC,EAAA,CACA,SAAUF,EACV,OAAQF,EAAS,OAChB,GAAGC,CAAA,CAAA,EAKP,GAAI,aAAcC,EACjB,OACCC,EAAAA,IAACE,EAAA,CACA,SAAUH,EACV,OAAQF,EAAS,OAChB,GAAGC,CAAA,CAAA,EAKP,GAAI,UAAWC,EACd,OACCC,EAAAA,IAACG,EAAA,CACA,SAAUJ,EACV,OAAQF,EAAS,OAChB,GAAGC,CAAA,CAAA,CAIR,EAEMG,EAAoB,CAAC,CAC1B,OAAAG,EACA,SAAAP,EACA,GAAGC,CACJ,IAGM,CACL,MAAMO,EAAeC,EAAU,SAAST,EAAS,IAAI,EAC/CU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"file":"index-cp6PTdHp.js","sources":["../../src/components/ui/schedule-badge/index.tsx"],"sourcesContent":["import cronstrue from \"cronstrue\";\nimport { format } from \"date-fns\";\nimport humanizeDuration from \"humanize-duration\";\nimport { useRef } from \"react\";\nimport { rrulestr } from \"rrule\";\nimport type { components } from \"@/api/prefect\";\nimport { Badge, type BadgeProps } from \"@/components/ui/badge\";\nimport {\n\tHoverCard,\n\tHoverCardContent,\n\tHoverCardTrigger,\n} from \"@/components/ui/hover-card\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { useIsOverflowing } from \"@/hooks/use-is-overflowing\";\nimport { capitalize, cn } from \"@/utils\";\n\ntype DeploymentSchedule = components[\"schemas\"][\"DeploymentSchedule\"];\ntype CronSchedule = components[\"schemas\"][\"CronSchedule\"];\ntype IntervalSchedule = components[\"schemas\"][\"IntervalSchedule\"];\ntype RRuleSchedule = components[\"schemas\"][\"RRuleSchedule\"];\n\ntype ScheduleBadgeProps = BadgeProps & {\n\tschedule: DeploymentSchedule;\n};\n\nexport const ScheduleBadge = ({ schedule, ...props }: ScheduleBadgeProps) => {\n\tconst { schedule: innerSchedule } = schedule;\n\tif (\"cron\" in innerSchedule) {\n\t\treturn (\n\t\t\t<CronScheduleBadge\n\t\t\t\tschedule={innerSchedule}\n\t\t\t\tactive={schedule.active}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t}\n\n\tif (\"interval\" in innerSchedule) {\n\t\treturn (\n\t\t\t<IntervalScheduleBadge\n\t\t\t\tschedule={innerSchedule}\n\t\t\t\tactive={schedule.active}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t}\n\n\tif (\"rrule\" in innerSchedule) {\n\t\treturn (\n\t\t\t<RRuleScheduleBadge\n\t\t\t\tschedule={innerSchedule}\n\t\t\t\tactive={schedule.active}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t}\n};\n\nconst CronScheduleBadge = ({\n\tactive,\n\tschedule,\n\t...props\n}: BadgeProps & {\n\tactive: boolean;\n\tschedule: CronSchedule;\n}) => {\n\tconst scheduleText = cronstrue.toString(schedule.cron);\n\tconst detailedScheduleText = `${active ? \"\" : \"(Paused)\"} ${scheduleText} (${schedule.timezone})`;\n\treturn (\n\t\t<TooltipProvider>\n\t\t\t<Tooltip>\n\t\t\t\t<TooltipTrigger>\n\t\t\t\t\t<Badge\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\tclassName={`${!active ? \"opacity-50\" : \"\"}`}\n\t\t\t\t\t\t{...props}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"truncate\">{scheduleText}</span>\n\t\t\t\t\t</Badge>\n\t\t\t\t</TooltipTrigger>\n\t\t\t\t<TooltipContent>{detailedScheduleText}</TooltipContent>\n\t\t\t</Tooltip>\n\t\t</TooltipProvider>\n\t);\n};\n\nconst IntervalScheduleBadge = ({\n\tactive,\n\tschedule,\n\t...props\n}: BadgeProps & {\n\tactive: boolean;\n\tschedule: IntervalSchedule;\n}) => {\n\tconst scheduleText = `Every ${humanizeDuration(schedule.interval * 1000)}`;\n\tlet detailedScheduleText = `${active ? \"\" : \"(Paused)\"} ${scheduleText}`;\n\tif (schedule.anchor_date) {\n\t\tdetailedScheduleText += ` using ${format(\n\t\t\tnew Date(schedule.anchor_date),\n\t\t\t\"MMM do, yyyy 'at' hh:mm:ss aa\",\n\t\t)} (${schedule.timezone}) as the anchor date`;\n\t}\n\treturn (\n\t\t<TooltipProvider>\n\t\t\t<Tooltip>\n\t\t\t\t<TooltipTrigger>\n\t\t\t\t\t<Badge\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\tclassName={`${!active ? \"opacity-50\" : \"\"}`}\n\t\t\t\t\t\t{...props}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"truncate\">{scheduleText}</span>\n\t\t\t\t\t</Badge>\n\t\t\t\t</TooltipTrigger>\n\t\t\t\t<TooltipContent>{detailedScheduleText}</TooltipContent>\n\t\t\t</Tooltip>\n\t\t</TooltipProvider>\n\t);\n};\n\nconst RRuleScheduleBadge = ({\n\tactive,\n\tschedule,\n\t...props\n}: BadgeProps & {\n\tactive: boolean;\n\tschedule: RRuleSchedule;\n}) => {\n\tconst scheduleText = rrulestr(schedule.rrule).toText();\n\tconst capitalizedScheduleText = capitalize(scheduleText);\n\tconst detailedScheduleText = `${active ? \"\" : \"(Paused)\"} ${capitalizedScheduleText} (${schedule.timezone})`;\n\treturn (\n\t\t<TooltipProvider>\n\t\t\t<Tooltip>\n\t\t\t\t<TooltipTrigger>\n\t\t\t\t\t<Badge\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\tclassName={`${!active ? \"opacity-50\" : \"\"}`}\n\t\t\t\t\t\t{...props}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"truncate\">{capitalizedScheduleText}</span>\n\t\t\t\t\t</Badge>\n\t\t\t\t</TooltipTrigger>\n\t\t\t\t<TooltipContent>{detailedScheduleText}</TooltipContent>\n\t\t\t</Tooltip>\n\t\t</TooltipProvider>\n\t);\n};\n\nexport const ScheduleBadgeGroup = ({\n\tschedules,\n\tclassName,\n}: {\n\tschedules: DeploymentSchedule[];\n\tclassName?: string;\n}) => {\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst isOverflowing = useIsOverflowing(containerRef);\n\tif (!schedules || schedules.length === 0) return null;\n\n\tif (isOverflowing) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={cn(\"flex flex-row gap-2 items-center no-wrap\", className)}\n\t\t\t>\n\t\t\t\t<HoverCard>\n\t\t\t\t\t<HoverCardTrigger>\n\t\t\t\t\t\t<Badge variant=\"secondary\" className=\"whitespace-nowrap\">\n\t\t\t\t\t\t\t{schedules.length} schedules\n\t\t\t\t\t\t</Badge>\n\t\t\t\t\t</HoverCardTrigger>\n\t\t\t\t\t<HoverCardContent className=\"flex flex-col flex-wrap gap-1 w-fit\">\n\t\t\t\t\t\t{schedules.map((schedule) => (\n\t\t\t\t\t\t\t<ScheduleBadge key={schedule.id} schedule={schedule} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</HoverCardContent>\n\t\t\t\t</HoverCard>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"flex flex-row gap-2 items-center no-wrap\"\n\t\t\tref={containerRef}\n\t\t>\n\t\t\t{schedules.map((schedule) => (\n\t\t\t\t<ScheduleBadge\n\t\t\t\t\tkey={schedule.id}\n\t\t\t\t\tschedule={schedule}\n\t\t\t\t\tclassName=\"max-w-28\"\n\t\t\t\t/>\n\t\t\t))}\n\t\t</div>\n\t);\n};\n"],"names":["ScheduleBadge","schedule","props","innerSchedule","jsx","CronScheduleBadge","IntervalScheduleBadge","RRuleScheduleBadge","active","scheduleText","cronstrue","detailedScheduleText","TooltipProvider","jsxs","Tooltip","TooltipTrigger","Badge","TooltipContent","humanizeDuration","format","rrulestr","capitalizedScheduleText","capitalize","ScheduleBadgeGroup","schedules","className","containerRef","useRef","isOverflowing","useIsOverflowing","cn","HoverCard","HoverCardTrigger","HoverCardContent"],"mappings":"mUA8BO,MAAMA,EAAgB,CAAC,CAAE,SAAAC,EAAU,GAAGC,KAAgC,CAC5E,KAAM,CAAE,SAAUC,CAAA,EAAkBF,EACpC,GAAI,SAAUE,EACb,OACCC,EAAAA,IAACC,EAAA,CACA,SAAUF,EACV,OAAQF,EAAS,OAChB,GAAGC,CAAA,CAAA,EAKP,GAAI,aAAcC,EACjB,OACCC,EAAAA,IAACE,EAAA,CACA,SAAUH,EACV,OAAQF,EAAS,OAChB,GAAGC,CAAA,CAAA,EAKP,GAAI,UAAWC,EACd,OACCC,EAAAA,IAACG,EAAA,CACA,SAAUJ,EACV,OAAQF,EAAS,OAChB,GAAGC,CAAA,CAAA,CAIR,EAEMG,EAAoB,CAAC,CAC1B,OAAAG,EACA,SAAAP,EACA,GAAGC,CACJ,IA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A,EAAS,EAAA,CAIf,CAAA,CAAA,CAGJ"}
@@ -1,2 +1,2 @@
1
- import{j as e,F as N,r as y,C as Q,G as W,D as X,B as Y,L as he}from"./vendor-tanstack-BdLtprmr.js";import{q as d,I as k,y as v,bj as Z,G as ee,V as se,E as ne,t as ae,v as re,w as te,x as oe,D as ce,B as _,g as V,h as E,bk as xe,a2 as G,a3 as M,a4 as F,a5 as I,p as C,a7 as P,bl as O,bm as je,a6 as ge,bn as pe,bo as ye,bp as be,aA as Ce,aB as ve,aC as U,aD as $}from"./index-V_xTKaEb.js";import{D as ie}from"./data-table-QSHqmTar.js";import{D as fe,a as we,b as Le,c as Se,d as T}from"./dropdown-menu-B9LKPlz7.js";import{F as le,a as u,b as x,c as j,d as g,e as p}from"./form-DOdmIC3A.js";import{a as de}from"./zod-B1GLD-Zc.js";import{c as ue,o as z,n as L,s as h,b as ke,f as S,e as De}from"./vendor-forms-BlFSCfFw.js";import{T as Re,a as Te,b as Ae}from"./task-run-concurrency-limits-reset-dialog-CNrP9yPQ.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-radix-CJc458uP.js";import"./vendor-recharts-CY3PKigC.js";import"./vendor-date-Cl1Jav-N.js";import"./table-ChOwO4Pk.js";const Ne=({onEditRow:s,onDeleteRow:n,...a})=>{const r=i=>{navigator.clipboard.writeText(i),v.success("ID copied")},t=a.row.original;return e.jsxs(fe,{children:[e.jsx(we,{asChild:!0,children:e.jsxs(d,{variant:"outline",className:"size-8 p-0",children:[e.jsx("span",{className:"sr-only",children:"Open menu"}),e.jsx(k,{id:"MoreVertical",className:"size-4"})]})}),e.jsxs(Le,{align:"end",children:[e.jsx(Se,{children:"Actions"}),e.jsx(T,{onClick:()=>r(t.id),children:"Copy ID"}),e.jsx(T,{onClick:()=>n(t),children:"Delete"}),e.jsx(T,{onClick:()=>s(t),children:"Edit"})]})]})},_e=s=>{const{updateGlobalConcurrencyLimit:n}=Z(),a=(i,o)=>{n({id_or_name:o,active:i},{onSuccess:()=>{v.success("Concurrency limit updated")},onError:c=>{const l=c.message||"Unknown error while updating active field.";console.error(l)}})},r=s.getValue(),t=s.row.original.id;return e.jsx(ee,{"aria-label":"toggle active",checked:r,onCheckedChange:i=>a(i,t)})},B=N("/concurrency-limits/"),b=Y(),Ve=({onEditRow:s,onDeleteRow:n})=>[b.accessor("name",{header:"Name"}),b.accessor("limit",{header:"Limit"}),b.accessor("active_slots",{header:"Active Slots"}),b.accessor("slot_decay_per_second",{header:"Slots Decay Per Second"}),b.accessor("active",{header:"Active",cell:_e}),b.display({id:"actions",cell:a=>e.jsx("div",{className:"flex flex-row justify-end",children:e.jsx(Ne,{...a,onEditRow:s,onDeleteRow:n})})})],Ee=({data:s,onEditRow:n,onDeleteRow:a})=>{const r=B.useNavigate(),{search:t}=B.useSearch(),i=y.useDeferredValue(t??""),o=y.useMemo(()=>s.filter(c=>c.name.toLowerCase().includes(i.toLowerCase())),[s,i]);return e.jsx(Ge,{data:o,onDeleteRow:a,onEditRow:n,searchValue:t,onSearchChange:c=>{r({to:".",search:l=>({...l,search:c})})}})};function Ge({data:s,onDeleteRow:n,onEditRow:a,onSearchChange:r,searchValue:t}){const i=Q({data:s,columns:Ve({onDeleteRow:n,onEditRow:a}),getCoreRowModel:X(),getPaginationRowModel:W()});return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(se,{className:"max-w-72",placeholder:"Search global concurrency limit",value:t,onChange:o=>r(o.target.value)}),e.jsx(ie,{table:i})]})}const Me=({onAdd:s})=>e.jsxs(ne,{children:[e.jsx(ae,{id:"AlignVerticalJustifyStart"}),e.jsx(re,{children:"Add a concurrency limit"}),e.jsx(te,{children:"Global concurrency limits can be applied to flow runs, task runs and any operation where you want to control concurrency."}),e.jsxs(oe,{children:[e.jsxs(d,{onClick:s,children:["Add Concurrency Limit ",e.jsx(k,{id:"Plus",className:"size-4 ml-2"})]}),e.jsx(ce,{id:"global-concurrency-guide"})]})]}),Fe=({onAdd:s})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{children:e.jsx(V,{children:e.jsx(E,{className:"text-xl font-semibold",children:"Global Concurrency Limits"})})}),e.jsx(d,{onClick:s,size:"icon",className:"size-7",variant:"outline","aria-label":"add global concurrency limit",children:e.jsx(k,{id:"Plus",className:"size-4"})})]}),Ie=z({active:ke().default(!0),denied_slots:L().default(0).or(h()).pipe(S.number()),limit:L().default(0).or(h()).pipe(S.number()),name:h().min(2,{message:"Name must be at least 2 characters"}).default(""),slot_decay_per_second:L().default(0).or(h()).pipe(S.number()),active_slots:L().default(0).or(h()).pipe(S.number())}),A={active:!0,name:"",limit:0,slot_decay_per_second:0,denied_slots:0,active_slots:0},Pe=({limitToUpdate:s,onSubmit:n})=>{const{createGlobalConcurrencyLimit:a,status:r}=xe(),{updateGlobalConcurrencyLimit:t,status:i}=Z(),o=ue({resolver:de(Ie),defaultValues:A});return y.useEffect(()=>{if(s){const{active:l,name:D,limit:f,slot_decay_per_second:w,active_slots:me}=s;o.reset({active:l,name:D,limit:f,slot_decay_per_second:w,active_slots:me})}else o.reset(A)},[o,s]),{form:o,saveOrUpdate:l=>{const D=()=>{o.reset(A),n()};s?.id?t({id_or_name:s.id,...l},{onSuccess:()=>{v.success("Limit updated")},onError:f=>{const w=f.message||"Unknown error while updating limit.";o.setError("root",{message:w})},onSettled:D}):a(l,{onSuccess:()=>{v.success("Limit created")},onError:f=>{const w=f.message||"Unknown error while creating variable.";o.setError("root",{message:w})},onSettled:D})},isLoading:r==="pending"||i==="pending"}},H=({limitToUpdate:s,onOpenChange:n,onSubmit:a})=>{const{form:r,isLoading:t,saveOrUpdate:i}=Pe({limitToUpdate:s,onSubmit:a}),o=s?`Update ${s.name}`:"Add Concurrency Limit";return e.jsx(G,{open:!0,onOpenChange:n,children:e.jsxs(M,{"aria-describedby":void 0,children:[e.jsx(F,{children:e.jsx(I,{children:o})}),e.jsx(le,{...r,children:e.jsxs("form",{onSubmit:c=>{r.handleSubmit(i)(c)},className:"space-y-4",children:[e.jsx(u,{children:r.formState.errors.root?.message}),e.jsx(x,{control:r.control,name:"name",render:({field:c})=>e.jsxs(j,{children:[e.jsx(g,{children:"Name"}),e.jsx(p,{children:e.jsx(C,{type:"text",autoComplete:"off",...c})}),e.jsx(u,{})]})}),e.jsx(x,{control:r.control,name:"limit",render:({field:c})=>e.jsxs(j,{children:[e.jsx(g,{children:"Concurrency Limit"}),e.jsx(p,{children:e.jsx(C,{type:"number",...c})}),e.jsx(u,{})]})}),e.jsx(x,{control:r.control,name:"slot_decay_per_second",render:({field:c})=>e.jsxs(j,{children:[e.jsx(g,{children:"Slot Decay Per Second"}),e.jsx(p,{children:e.jsx(C,{type:"number",...c})}),e.jsx(u,{})]})}),s&&e.jsx(x,{control:r.control,name:"active_slots",render:({field:c})=>e.jsxs(j,{children:[e.jsx(g,{children:"Active Slots"}),e.jsx(p,{children:e.jsx(C,{type:"number",...c})}),e.jsx(u,{})]})}),e.jsx(x,{control:r.control,name:"active",render:({field:c})=>e.jsxs(j,{children:[e.jsx(g,{children:"Active"}),e.jsx(p,{children:e.jsx(ee,{className:"block",checked:c.value,onCheckedChange:c.onChange})}),e.jsx(u,{})]})}),e.jsxs(P,{children:[e.jsx(O,{asChild:!0,children:e.jsx(d,{variant:"outline",children:"Close"})}),e.jsx(d,{type:"submit",loading:t,children:s?"Update":"Save"})]})]})})]})})},Oe=({limit:s,onOpenChange:n,onDelete:a})=>{const{deleteGlobalConcurrencyLimit:r,isPending:t}=je(),i=o=>{r(o,{onSuccess:()=>{v.success("Concurrency limit deleted")},onError:c=>{const l=c.message||"Unknown error while deleting concurrency limit.";console.error(l)},onSettled:a})};return e.jsx(G,{open:!0,onOpenChange:n,children:e.jsxs(M,{children:[e.jsx(F,{children:e.jsx(I,{children:"Delete Concurrency Limit"})}),e.jsxs(ge,{children:["Are you sure you want to delete ",s.name]}),e.jsxs(P,{children:[e.jsx(O,{asChild:!0,children:e.jsx(d,{variant:"outline",children:"Close"})}),e.jsx(d,{variant:"destructive",onClick:()=>i(s.id),loading:t,children:"Delete"})]})]})})},ze=({openDialog:s,onCloseDialog:n,onOpenChange:a})=>{const{dialog:r,data:t}=s;switch(r){case"create":return e.jsx(H,{onOpenChange:a,onSubmit:n});case"delete":return e.jsx(Oe,{limit:t,onOpenChange:a,onDelete:n});case"edit":return e.jsx(H,{onOpenChange:a,limitToUpdate:t,onSubmit:n});default:return null}},Ue=()=>{const[s,n]=y.useState({dialog:null,data:void 0}),{data:a}=pe(),r=()=>n({dialog:"create",data:void 0}),t=l=>n({dialog:"edit",data:l}),i=l=>n({dialog:"delete",data:l}),o=()=>n({dialog:null,data:void 0}),c=l=>{l||o()};return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(Fe,{onAdd:r}),a.length===0?e.jsx(Me,{onAdd:r}):e.jsx(Ee,{data:a,onEditRow:t,onDeleteRow:i}),e.jsx(ze,{openDialog:s,onCloseDialog:o,onOpenChange:c})]})},$e=s=>{const a=s.getValue().length;return a===0?"None":a},Be=s=>{const n=s.getValue(),a=s.row.original.id;return e.jsx(he,{params:{id:a},to:"/concurrency-limits/concurrency-limit/$id",children:n})},q=N("/concurrency-limits/"),R=Y(),He=({onDeleteRow:s,onResetRow:n})=>[R.accessor("tag",{header:"Tag",cell:Be}),R.accessor("concurrency_limit",{header:"Slots"}),R.accessor("active_slots",{header:"Active Task Runs",cell:$e}),R.display({id:"actions",cell:a=>{const r=a.row.original;return e.jsx("div",{className:"flex flex-row justify-end",children:e.jsx(Re,{id:r.id,onDelete:()=>s(r),onReset:()=>n(r)})})}})],qe=({data:s,onDeleteRow:n,onResetRow:a})=>{const r=q.useNavigate(),{search:t}=q.useSearch(),i=y.useDeferredValue(t??""),o=y.useMemo(()=>s.filter(c=>c.tag.toLowerCase().includes(i.toLowerCase())),[s,i]);return e.jsx(Je,{data:o,onDeleteRow:n,onResetRow:a,searchValue:t,onSearchChange:c=>{r({to:".",search:l=>({...l,search:c})})}})};function Je({data:s,onDeleteRow:n,onResetRow:a,onSearchChange:r,searchValue:t}){const i=Q({data:s,columns:He({onDeleteRow:n,onResetRow:a}),getCoreRowModel:X(),getPaginationRowModel:W()});return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(se,{className:"max-w-72",placeholder:"Search active task limit",value:t,onChange:o=>r(o.target.value)}),e.jsx(ie,{table:i})]})}const Ke=({onAdd:s})=>e.jsxs(ne,{children:[e.jsx(ae,{id:"CircleArrowOutUpRight"}),e.jsx(re,{children:"Add a concurrency limit for your task runs"}),e.jsx(te,{children:"Creating a limit allows you to limit the number of tasks running simultaneously with a given tag."}),e.jsxs(oe,{children:[e.jsxs(d,{onClick:s,children:["Add Concurrency Limit ",e.jsx(k,{id:"Plus",className:"size-4 ml-2"})]}),e.jsx(ce,{id:"task-concurrency-guide"})]})]}),Qe=({onAdd:s})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{children:e.jsx(V,{children:e.jsx(E,{className:"text-xl font-semibold",children:"Task Run Concurrency Limits"})})}),e.jsx(d,{onClick:s,size:"icon",className:"size-7",variant:"outline","aria-label":"add task run concurrency limit",children:e.jsx(k,{id:"Plus",className:"size-4"})})]}),We=z({tag:h().min(1),concurrency_limit:L().default(0).or(h()).pipe(S.number())}),J={tag:"",concurrency_limit:0},Xe=({onOpenChange:s,onSubmit:n})=>{const{createTaskRunConcurrencyLimit:a,isPending:r}=ye(),t=ue({resolver:de(We),defaultValues:J}),i=o=>{a(o,{onSuccess:()=>{v.success("Concurrency limit added")},onError:c=>{const l=c.message||"Unknown error while updating limit.";t.setError("root",{message:l})},onSettled:()=>{t.reset(J),n()}})};return e.jsx(G,{open:!0,onOpenChange:s,children:e.jsxs(M,{"aria-describedby":void 0,children:[e.jsx(F,{children:e.jsx(I,{children:"Add Task Run Concurrency Limit"})}),e.jsx(le,{...t,children:e.jsxs("form",{onSubmit:o=>{t.handleSubmit(i)(o)},className:"space-y-4",children:[e.jsx(u,{children:t.formState.errors.root?.message}),e.jsx(x,{control:t.control,name:"tag",render:({field:o})=>e.jsxs(j,{children:[e.jsx(g,{children:"Tag"}),e.jsx(p,{children:e.jsx(C,{type:"text",autoComplete:"off",...o})}),e.jsx(u,{})]})}),e.jsx(x,{control:t.control,name:"concurrency_limit",render:({field:o})=>e.jsxs(j,{children:[e.jsx(g,{children:"Concurrency Limit"}),e.jsx(p,{children:e.jsx(C,{type:"number",...o})}),e.jsx(u,{})]})}),e.jsxs(P,{children:[e.jsx(O,{asChild:!0,children:e.jsx(d,{variant:"outline",children:"Close"})}),e.jsx(d,{type:"submit",loading:r,children:"Add"})]})]})})]})})},Ye=({openDialog:s,onCloseDialog:n,onOpenChange:a})=>{const{dialog:r,data:t}=s;switch(r){case"create":return e.jsx(Xe,{onOpenChange:a,onSubmit:n});case"reset":return e.jsx(Ae,{data:t,onOpenChange:a,onReset:n});case"delete":return e.jsx(Te,{data:t,onOpenChange:a,onDelete:n});default:return null}},Ze=()=>{const[s,n]=y.useState({dialog:null,data:void 0}),{data:a}=be(),r=()=>n({dialog:"create",data:void 0}),t=l=>n({dialog:"delete",data:l}),i=l=>n({dialog:"reset",data:l}),o=()=>n({dialog:null,data:void 0}),c=l=>{l||o()};return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(Qe,{onAdd:r}),a.length===0?e.jsx(Ke,{onAdd:r}):e.jsx(qe,{data:a,onDeleteRow:t,onResetRow:i}),e.jsx(Ye,{openDialog:s,onCloseDialog:o,onOpenChange:c})]})},K=N("/concurrency-limits/"),m={global:{tabSearchValue:"global",displayValue:"Global"},"task-run":{tabSearchValue:"task-run",displayValue:"Task Run"}},es=({globalView:s,taskRunView:n})=>{const{tab:a}=K.useSearch(),r=K.useNavigate();return e.jsxs(Ce,{defaultValue:"Global",value:a,children:[e.jsxs(ve,{children:[e.jsx(U,{value:m.global.tabSearchValue,onClick:()=>{r({to:"/concurrency-limits",search:{tab:m.global.tabSearchValue}})},children:m.global.displayValue}),e.jsx(U,{value:m["task-run"].tabSearchValue,onClick:()=>{r({to:"/concurrency-limits",search:{tab:m["task-run"].tabSearchValue}})},children:m["task-run"].displayValue})]}),e.jsx($,{value:m.global.tabSearchValue,children:s}),e.jsx($,{value:m["task-run"].tabSearchValue,children:n})]})},ss=()=>e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(ns,{}),e.jsx(es,{globalView:e.jsx(Ue,{}),taskRunView:e.jsx(Ze,{})})]}),ns=()=>e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(_,{children:e.jsx(V,{children:e.jsx(E,{className:"text-xl font-semibold",children:"Concurrency"})})})});z({search:h().optional(),tab:De(["global","task-run"]).default("global")});const gs=ss;export{gs as component};
2
- //# sourceMappingURL=index-D6G96ToY.js.map
1
+ import{j as e,F as N,r as y,C as Q,G as W,D as X,B as Y,L as he}from"./vendor-tanstack-BdLtprmr.js";import{q as d,I as k,y as v,bi as Z,G as ee,V as se,E as ne,t as ae,v as re,w as te,x as oe,D as ce,B as _,g as V,h as E,bj as xe,a2 as G,a3 as M,a4 as F,a5 as I,p as C,a7 as P,bk as O,bl as je,a6 as ge,bm as pe,bn as ye,bo as be,az as Ce,aA as ve,aB as U,aC as $}from"./index-CPpeVt8m.js";import{D as ie}from"./data-table-bk-0xKWT.js";import{D as fe,a as we,b as Le,c as Se,d as T}from"./dropdown-menu-fRiq5bS-.js";import{F as le,a as u,b as x,c as j,d as g,e as p}from"./form-Cl5Hk9bq.js";import{a as de}from"./zod-B1GLD-Zc.js";import{c as ue,o as z,n as L,s as h,b as ke,f as S,e as De}from"./vendor-forms-BlFSCfFw.js";import{T as Re,a as Te,b as Ae}from"./task-run-concurrency-limits-reset-dialog-5xFWeoYy.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-radix-CJc458uP.js";import"./vendor-recharts-CY3PKigC.js";import"./vendor-date-Cl1Jav-N.js";import"./table-Xyel2BEw.js";const Ne=({onEditRow:s,onDeleteRow:n,...a})=>{const r=i=>{navigator.clipboard.writeText(i),v.success("ID copied")},t=a.row.original;return e.jsxs(fe,{children:[e.jsx(we,{asChild:!0,children:e.jsxs(d,{variant:"outline",className:"size-8 p-0",children:[e.jsx("span",{className:"sr-only",children:"Open menu"}),e.jsx(k,{id:"MoreVertical",className:"size-4"})]})}),e.jsxs(Le,{align:"end",children:[e.jsx(Se,{children:"Actions"}),e.jsx(T,{onClick:()=>r(t.id),children:"Copy ID"}),e.jsx(T,{onClick:()=>n(t),children:"Delete"}),e.jsx(T,{onClick:()=>s(t),children:"Edit"})]})]})},_e=s=>{const{updateGlobalConcurrencyLimit:n}=Z(),a=(i,o)=>{n({id_or_name:o,active:i},{onSuccess:()=>{v.success("Concurrency limit updated")},onError:c=>{const l=c.message||"Unknown error while updating active field.";console.error(l)}})},r=s.getValue(),t=s.row.original.id;return e.jsx(ee,{"aria-label":"toggle active",checked:r,onCheckedChange:i=>a(i,t)})},B=N("/concurrency-limits/"),b=Y(),Ve=({onEditRow:s,onDeleteRow:n})=>[b.accessor("name",{header:"Name"}),b.accessor("limit",{header:"Limit"}),b.accessor("active_slots",{header:"Active Slots"}),b.accessor("slot_decay_per_second",{header:"Slots Decay Per Second"}),b.accessor("active",{header:"Active",cell:_e}),b.display({id:"actions",cell:a=>e.jsx("div",{className:"flex flex-row justify-end",children:e.jsx(Ne,{...a,onEditRow:s,onDeleteRow:n})})})],Ee=({data:s,onEditRow:n,onDeleteRow:a})=>{const r=B.useNavigate(),{search:t}=B.useSearch(),i=y.useDeferredValue(t??""),o=y.useMemo(()=>s.filter(c=>c.name.toLowerCase().includes(i.toLowerCase())),[s,i]);return e.jsx(Ge,{data:o,onDeleteRow:a,onEditRow:n,searchValue:t,onSearchChange:c=>{r({to:".",search:l=>({...l,search:c})})}})};function Ge({data:s,onDeleteRow:n,onEditRow:a,onSearchChange:r,searchValue:t}){const i=Q({data:s,columns:Ve({onDeleteRow:n,onEditRow:a}),getCoreRowModel:X(),getPaginationRowModel:W()});return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(se,{className:"max-w-72",placeholder:"Search global concurrency limit",value:t,onChange:o=>r(o.target.value)}),e.jsx(ie,{table:i})]})}const Me=({onAdd:s})=>e.jsxs(ne,{children:[e.jsx(ae,{id:"AlignVerticalJustifyStart"}),e.jsx(re,{children:"Add a concurrency limit"}),e.jsx(te,{children:"Global concurrency limits can be applied to flow runs, task runs and any operation where you want to control concurrency."}),e.jsxs(oe,{children:[e.jsxs(d,{onClick:s,children:["Add Concurrency Limit ",e.jsx(k,{id:"Plus",className:"size-4 ml-2"})]}),e.jsx(ce,{id:"global-concurrency-guide"})]})]}),Fe=({onAdd:s})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{children:e.jsx(V,{children:e.jsx(E,{className:"text-xl font-semibold",children:"Global Concurrency Limits"})})}),e.jsx(d,{onClick:s,size:"icon",className:"size-7",variant:"outline","aria-label":"add global concurrency limit",children:e.jsx(k,{id:"Plus",className:"size-4"})})]}),Ie=z({active:ke().default(!0),denied_slots:L().default(0).or(h()).pipe(S.number()),limit:L().default(0).or(h()).pipe(S.number()),name:h().min(2,{message:"Name must be at least 2 characters"}).default(""),slot_decay_per_second:L().default(0).or(h()).pipe(S.number()),active_slots:L().default(0).or(h()).pipe(S.number())}),A={active:!0,name:"",limit:0,slot_decay_per_second:0,denied_slots:0,active_slots:0},Pe=({limitToUpdate:s,onSubmit:n})=>{const{createGlobalConcurrencyLimit:a,status:r}=xe(),{updateGlobalConcurrencyLimit:t,status:i}=Z(),o=ue({resolver:de(Ie),defaultValues:A});return y.useEffect(()=>{if(s){const{active:l,name:D,limit:f,slot_decay_per_second:w,active_slots:me}=s;o.reset({active:l,name:D,limit:f,slot_decay_per_second:w,active_slots:me})}else o.reset(A)},[o,s]),{form:o,saveOrUpdate:l=>{const D=()=>{o.reset(A),n()};s?.id?t({id_or_name:s.id,...l},{onSuccess:()=>{v.success("Limit updated")},onError:f=>{const w=f.message||"Unknown error while updating limit.";o.setError("root",{message:w})},onSettled:D}):a(l,{onSuccess:()=>{v.success("Limit created")},onError:f=>{const w=f.message||"Unknown error while creating variable.";o.setError("root",{message:w})},onSettled:D})},isLoading:r==="pending"||i==="pending"}},H=({limitToUpdate:s,onOpenChange:n,onSubmit:a})=>{const{form:r,isLoading:t,saveOrUpdate:i}=Pe({limitToUpdate:s,onSubmit:a}),o=s?`Update ${s.name}`:"Add Concurrency Limit";return e.jsx(G,{open:!0,onOpenChange:n,children:e.jsxs(M,{"aria-describedby":void 0,children:[e.jsx(F,{children:e.jsx(I,{children:o})}),e.jsx(le,{...r,children:e.jsxs("form",{onSubmit:c=>{r.handleSubmit(i)(c)},className:"space-y-4",children:[e.jsx(u,{children:r.formState.errors.root?.message}),e.jsx(x,{control:r.control,name:"name",render:({field:c})=>e.jsxs(j,{children:[e.jsx(g,{children:"Name"}),e.jsx(p,{children:e.jsx(C,{type:"text",autoComplete:"off",...c})}),e.jsx(u,{})]})}),e.jsx(x,{control:r.control,name:"limit",render:({field:c})=>e.jsxs(j,{children:[e.jsx(g,{children:"Concurrency Limit"}),e.jsx(p,{children:e.jsx(C,{type:"number",...c})}),e.jsx(u,{})]})}),e.jsx(x,{control:r.control,name:"slot_decay_per_second",render:({field:c})=>e.jsxs(j,{children:[e.jsx(g,{children:"Slot Decay Per Second"}),e.jsx(p,{children:e.jsx(C,{type:"number",...c})}),e.jsx(u,{})]})}),s&&e.jsx(x,{control:r.control,name:"active_slots",render:({field:c})=>e.jsxs(j,{children:[e.jsx(g,{children:"Active Slots"}),e.jsx(p,{children:e.jsx(C,{type:"number",...c})}),e.jsx(u,{})]})}),e.jsx(x,{control:r.control,name:"active",render:({field:c})=>e.jsxs(j,{children:[e.jsx(g,{children:"Active"}),e.jsx(p,{children:e.jsx(ee,{className:"block",checked:c.value,onCheckedChange:c.onChange})}),e.jsx(u,{})]})}),e.jsxs(P,{children:[e.jsx(O,{asChild:!0,children:e.jsx(d,{variant:"outline",children:"Close"})}),e.jsx(d,{type:"submit",loading:t,children:s?"Update":"Save"})]})]})})]})})},Oe=({limit:s,onOpenChange:n,onDelete:a})=>{const{deleteGlobalConcurrencyLimit:r,isPending:t}=je(),i=o=>{r(o,{onSuccess:()=>{v.success("Concurrency limit deleted")},onError:c=>{const l=c.message||"Unknown error while deleting concurrency limit.";console.error(l)},onSettled:a})};return e.jsx(G,{open:!0,onOpenChange:n,children:e.jsxs(M,{children:[e.jsx(F,{children:e.jsx(I,{children:"Delete Concurrency Limit"})}),e.jsxs(ge,{children:["Are you sure you want to delete ",s.name]}),e.jsxs(P,{children:[e.jsx(O,{asChild:!0,children:e.jsx(d,{variant:"outline",children:"Close"})}),e.jsx(d,{variant:"destructive",onClick:()=>i(s.id),loading:t,children:"Delete"})]})]})})},ze=({openDialog:s,onCloseDialog:n,onOpenChange:a})=>{const{dialog:r,data:t}=s;switch(r){case"create":return e.jsx(H,{onOpenChange:a,onSubmit:n});case"delete":return e.jsx(Oe,{limit:t,onOpenChange:a,onDelete:n});case"edit":return e.jsx(H,{onOpenChange:a,limitToUpdate:t,onSubmit:n});default:return null}},Ue=()=>{const[s,n]=y.useState({dialog:null,data:void 0}),{data:a}=pe(),r=()=>n({dialog:"create",data:void 0}),t=l=>n({dialog:"edit",data:l}),i=l=>n({dialog:"delete",data:l}),o=()=>n({dialog:null,data:void 0}),c=l=>{l||o()};return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(Fe,{onAdd:r}),a.length===0?e.jsx(Me,{onAdd:r}):e.jsx(Ee,{data:a,onEditRow:t,onDeleteRow:i}),e.jsx(ze,{openDialog:s,onCloseDialog:o,onOpenChange:c})]})},$e=s=>{const a=s.getValue().length;return a===0?"None":a},Be=s=>{const n=s.getValue(),a=s.row.original.id;return e.jsx(he,{params:{id:a},to:"/concurrency-limits/concurrency-limit/$id",children:n})},q=N("/concurrency-limits/"),R=Y(),He=({onDeleteRow:s,onResetRow:n})=>[R.accessor("tag",{header:"Tag",cell:Be}),R.accessor("concurrency_limit",{header:"Slots"}),R.accessor("active_slots",{header:"Active Task Runs",cell:$e}),R.display({id:"actions",cell:a=>{const r=a.row.original;return e.jsx("div",{className:"flex flex-row justify-end",children:e.jsx(Re,{id:r.id,onDelete:()=>s(r),onReset:()=>n(r)})})}})],qe=({data:s,onDeleteRow:n,onResetRow:a})=>{const r=q.useNavigate(),{search:t}=q.useSearch(),i=y.useDeferredValue(t??""),o=y.useMemo(()=>s.filter(c=>c.tag.toLowerCase().includes(i.toLowerCase())),[s,i]);return e.jsx(Je,{data:o,onDeleteRow:n,onResetRow:a,searchValue:t,onSearchChange:c=>{r({to:".",search:l=>({...l,search:c})})}})};function Je({data:s,onDeleteRow:n,onResetRow:a,onSearchChange:r,searchValue:t}){const i=Q({data:s,columns:He({onDeleteRow:n,onResetRow:a}),getCoreRowModel:X(),getPaginationRowModel:W()});return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(se,{className:"max-w-72",placeholder:"Search active task limit",value:t,onChange:o=>r(o.target.value)}),e.jsx(ie,{table:i})]})}const Ke=({onAdd:s})=>e.jsxs(ne,{children:[e.jsx(ae,{id:"CircleArrowOutUpRight"}),e.jsx(re,{children:"Add a concurrency limit for your task runs"}),e.jsx(te,{children:"Creating a limit allows you to limit the number of tasks running simultaneously with a given tag."}),e.jsxs(oe,{children:[e.jsxs(d,{onClick:s,children:["Add Concurrency Limit ",e.jsx(k,{id:"Plus",className:"size-4 ml-2"})]}),e.jsx(ce,{id:"task-concurrency-guide"})]})]}),Qe=({onAdd:s})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{children:e.jsx(V,{children:e.jsx(E,{className:"text-xl font-semibold",children:"Task Run Concurrency Limits"})})}),e.jsx(d,{onClick:s,size:"icon",className:"size-7",variant:"outline","aria-label":"add task run concurrency limit",children:e.jsx(k,{id:"Plus",className:"size-4"})})]}),We=z({tag:h().min(1),concurrency_limit:L().default(0).or(h()).pipe(S.number())}),J={tag:"",concurrency_limit:0},Xe=({onOpenChange:s,onSubmit:n})=>{const{createTaskRunConcurrencyLimit:a,isPending:r}=ye(),t=ue({resolver:de(We),defaultValues:J}),i=o=>{a(o,{onSuccess:()=>{v.success("Concurrency limit added")},onError:c=>{const l=c.message||"Unknown error while updating limit.";t.setError("root",{message:l})},onSettled:()=>{t.reset(J),n()}})};return e.jsx(G,{open:!0,onOpenChange:s,children:e.jsxs(M,{"aria-describedby":void 0,children:[e.jsx(F,{children:e.jsx(I,{children:"Add Task Run Concurrency Limit"})}),e.jsx(le,{...t,children:e.jsxs("form",{onSubmit:o=>{t.handleSubmit(i)(o)},className:"space-y-4",children:[e.jsx(u,{children:t.formState.errors.root?.message}),e.jsx(x,{control:t.control,name:"tag",render:({field:o})=>e.jsxs(j,{children:[e.jsx(g,{children:"Tag"}),e.jsx(p,{children:e.jsx(C,{type:"text",autoComplete:"off",...o})}),e.jsx(u,{})]})}),e.jsx(x,{control:t.control,name:"concurrency_limit",render:({field:o})=>e.jsxs(j,{children:[e.jsx(g,{children:"Concurrency Limit"}),e.jsx(p,{children:e.jsx(C,{type:"number",...o})}),e.jsx(u,{})]})}),e.jsxs(P,{children:[e.jsx(O,{asChild:!0,children:e.jsx(d,{variant:"outline",children:"Close"})}),e.jsx(d,{type:"submit",loading:r,children:"Add"})]})]})})]})})},Ye=({openDialog:s,onCloseDialog:n,onOpenChange:a})=>{const{dialog:r,data:t}=s;switch(r){case"create":return e.jsx(Xe,{onOpenChange:a,onSubmit:n});case"reset":return e.jsx(Ae,{data:t,onOpenChange:a,onReset:n});case"delete":return e.jsx(Te,{data:t,onOpenChange:a,onDelete:n});default:return null}},Ze=()=>{const[s,n]=y.useState({dialog:null,data:void 0}),{data:a}=be(),r=()=>n({dialog:"create",data:void 0}),t=l=>n({dialog:"delete",data:l}),i=l=>n({dialog:"reset",data:l}),o=()=>n({dialog:null,data:void 0}),c=l=>{l||o()};return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(Qe,{onAdd:r}),a.length===0?e.jsx(Ke,{onAdd:r}):e.jsx(qe,{data:a,onDeleteRow:t,onResetRow:i}),e.jsx(Ye,{openDialog:s,onCloseDialog:o,onOpenChange:c})]})},K=N("/concurrency-limits/"),m={global:{tabSearchValue:"global",displayValue:"Global"},"task-run":{tabSearchValue:"task-run",displayValue:"Task Run"}},es=({globalView:s,taskRunView:n})=>{const{tab:a}=K.useSearch(),r=K.useNavigate();return e.jsxs(Ce,{defaultValue:"Global",value:a,children:[e.jsxs(ve,{children:[e.jsx(U,{value:m.global.tabSearchValue,onClick:()=>{r({to:"/concurrency-limits",search:{tab:m.global.tabSearchValue}})},children:m.global.displayValue}),e.jsx(U,{value:m["task-run"].tabSearchValue,onClick:()=>{r({to:"/concurrency-limits",search:{tab:m["task-run"].tabSearchValue}})},children:m["task-run"].displayValue})]}),e.jsx($,{value:m.global.tabSearchValue,children:s}),e.jsx($,{value:m["task-run"].tabSearchValue,children:n})]})},ss=()=>e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(ns,{}),e.jsx(es,{globalView:e.jsx(Ue,{}),taskRunView:e.jsx(Ze,{})})]}),ns=()=>e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(_,{children:e.jsx(V,{children:e.jsx(E,{className:"text-xl font-semibold",children:"Concurrency"})})})});z({search:h().optional(),tab:De(["global","task-run"]).default("global")});const gs=ss;export{gs as component};
2
+ //# sourceMappingURL=index-kM_g8J0u.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-D6G96ToY.js","sources":["../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/actions-cell.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/active-cell.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/global-concurrency-limits-data-table.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-empty-state/global-concurrency-limits-empty-state.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-header/global-concurrency-limits-header.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-create-or-edit-dialog/use-create-or-edit-global-concurrency-limit-form.ts","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-create-or-edit-dialog/global-concurrency-limits-create-or-edit-dialog.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-delete-dialog/global-concurrency-limits-delete-dialog.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-view/global-conccurency-limits-dialog.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-view/index.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/active-task-runs-cell.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/tag-cell.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/task-run-concurrency-limits-data-table.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-empty-state/task-run-concurrency-limits-empty-state.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-header/task-run-concurrency-limits-header.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-create-dialog/task-run-concurrency-limits-create-dialog.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-view/task-run-concurrency-limit-dialog.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-view/index.tsx","../../src/components/concurrency/concurrency-limits-tabs.tsx","../../src/components/concurrency/concurrency-limits-page.tsx","../../src/routes/concurrency-limits/index.tsx?tsr-split=component"],"sourcesContent":["import type { CellContext } from \"@tanstack/react-table\";\nimport { toast } from \"sonner\";\nimport type { GlobalConcurrencyLimit } from \"@/api/global-concurrency-limits\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype ActionsCellProps = CellContext<GlobalConcurrencyLimit, unknown> & {\n\tonEditRow: (row: GlobalConcurrencyLimit) => void;\n\tonDeleteRow: (row: GlobalConcurrencyLimit) => void;\n};\n\nexport const ActionsCell = ({\n\tonEditRow,\n\tonDeleteRow,\n\t...props\n}: ActionsCellProps) => {\n\tconst handleCopyId = (id: string) => {\n\t\tvoid navigator.clipboard.writeText(id);\n\t\ttoast.success(\"ID copied\");\n\t};\n\n\tconst row = props.row.original;\n\n\treturn (\n\t\t<DropdownMenu>\n\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t<Button variant=\"outline\" className=\"size-8 p-0\">\n\t\t\t\t\t<span className=\"sr-only\">Open menu</span>\n\t\t\t\t\t<Icon id=\"MoreVertical\" className=\"size-4\" />\n\t\t\t\t</Button>\n\t\t\t</DropdownMenuTrigger>\n\t\t\t<DropdownMenuContent align=\"end\">\n\t\t\t\t<DropdownMenuLabel>Actions</DropdownMenuLabel>\n\t\t\t\t<DropdownMenuItem onClick={() => handleCopyId(row.id)}>\n\t\t\t\t\tCopy ID\n\t\t\t\t</DropdownMenuItem>\n\t\t\t\t<DropdownMenuItem onClick={() => onDeleteRow(row)}>\n\t\t\t\t\tDelete\n\t\t\t\t</DropdownMenuItem>\n\t\t\t\t<DropdownMenuItem onClick={() => onEditRow(row)}>Edit</DropdownMenuItem>\n\t\t\t</DropdownMenuContent>\n\t\t</DropdownMenu>\n\t);\n};\n","import type { CellContext } from \"@tanstack/react-table\";\nimport { toast } from \"sonner\";\nimport {\n\ttype GlobalConcurrencyLimit,\n\tuseUpdateGlobalConcurrencyLimit,\n} from \"@/api/global-concurrency-limits\";\nimport { Switch } from \"@/components/ui/switch\";\n\nexport const ActiveCell = (\n\tprops: CellContext<GlobalConcurrencyLimit, boolean>,\n) => {\n\tconst { updateGlobalConcurrencyLimit } = useUpdateGlobalConcurrencyLimit();\n\n\tconst handleCheckedChange = (checked: boolean, id: string) => {\n\t\tupdateGlobalConcurrencyLimit(\n\t\t\t{\n\t\t\t\tid_or_name: id,\n\t\t\t\tactive: checked,\n\t\t\t},\n\t\t\t{\n\t\t\t\tonSuccess: () => {\n\t\t\t\t\ttoast.success(\"Concurrency limit updated\");\n\t\t\t\t},\n\t\t\t\tonError: (error) => {\n\t\t\t\t\tconst message =\n\t\t\t\t\t\terror.message || \"Unknown error while updating active field.\";\n\t\t\t\t\tconsole.error(message);\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\t};\n\n\tconst rowActive = props.getValue();\n\tconst rowId = props.row.original.id;\n\n\treturn (\n\t\t<Switch\n\t\t\taria-label=\"toggle active\"\n\t\t\tchecked={rowActive}\n\t\t\tonCheckedChange={(checked) => handleCheckedChange(checked, rowId)}\n\t\t/>\n\t);\n};\n","import { getRouteApi } from \"@tanstack/react-router\";\nimport {\n\tcreateColumnHelper,\n\tgetCoreRowModel,\n\tgetPaginationRowModel,\n\tuseReactTable,\n} from \"@tanstack/react-table\";\nimport { useDeferredValue, useMemo } from \"react\";\nimport type { GlobalConcurrencyLimit } from \"@/api/global-concurrency-limits\";\nimport { DataTable } from \"@/components/ui/data-table\";\nimport { SearchInput } from \"@/components/ui/input\";\nimport { ActionsCell } from \"./actions-cell\";\nimport { ActiveCell } from \"./active-cell\";\n\nconst routeApi = getRouteApi(\"/concurrency-limits/\");\n\nconst columnHelper = createColumnHelper<GlobalConcurrencyLimit>();\n\nconst createColumns = ({\n\tonEditRow,\n\tonDeleteRow,\n}: {\n\tonEditRow: (row: GlobalConcurrencyLimit) => void;\n\tonDeleteRow: (row: GlobalConcurrencyLimit) => void;\n}) => [\n\tcolumnHelper.accessor(\"name\", {\n\t\theader: \"Name\",\n\t}),\n\tcolumnHelper.accessor(\"limit\", {\n\t\theader: \"Limit\",\n\t}),\n\tcolumnHelper.accessor(\"active_slots\", {\n\t\theader: \"Active Slots\",\n\t}),\n\tcolumnHelper.accessor(\"slot_decay_per_second\", {\n\t\theader: \"Slots Decay Per Second\",\n\t}),\n\tcolumnHelper.accessor(\"active\", {\n\t\theader: \"Active\",\n\t\tcell: ActiveCell,\n\t}),\n\tcolumnHelper.display({\n\t\tid: \"actions\",\n\t\tcell: (props) => (\n\t\t\t<div className=\"flex flex-row justify-end\">\n\t\t\t\t<ActionsCell\n\t\t\t\t\t{...props}\n\t\t\t\t\tonEditRow={onEditRow}\n\t\t\t\t\tonDeleteRow={onDeleteRow}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t),\n\t}),\n];\n\ntype GlobalConcurrencyLimitsDataTableProps = {\n\tdata: Array<GlobalConcurrencyLimit>;\n\tonEditRow: (row: GlobalConcurrencyLimit) => void;\n\tonDeleteRow: (row: GlobalConcurrencyLimit) => void;\n};\n\nexport const GlobalConcurrencyLimitsDataTable = ({\n\tdata,\n\tonEditRow,\n\tonDeleteRow,\n}: GlobalConcurrencyLimitsDataTableProps) => {\n\tconst navigate = routeApi.useNavigate();\n\tconst { search } = routeApi.useSearch();\n\tconst deferredSearch = useDeferredValue(search ?? \"\");\n\n\tconst filteredData = useMemo(() => {\n\t\treturn data.filter((row) =>\n\t\t\trow.name.toLowerCase().includes(deferredSearch.toLowerCase()),\n\t\t);\n\t}, [data, deferredSearch]);\n\n\treturn (\n\t\t<Table\n\t\t\tdata={filteredData}\n\t\t\tonDeleteRow={onDeleteRow}\n\t\t\tonEditRow={onEditRow}\n\t\t\tsearchValue={search}\n\t\t\tonSearchChange={(value) =>\n\t\t\t\tvoid navigate({\n\t\t\t\t\tto: \".\",\n\t\t\t\t\tsearch: (prev) => ({ ...prev, search: value }),\n\t\t\t\t})\n\t\t\t}\n\t\t/>\n\t);\n};\n\ntype TableProps = {\n\tdata: Array<GlobalConcurrencyLimit>;\n\tonDeleteRow: (row: GlobalConcurrencyLimit) => void;\n\tonEditRow: (row: GlobalConcurrencyLimit) => void;\n\tonSearchChange: (value: string) => void;\n\tsearchValue: string | undefined;\n};\n\nexport function Table({\n\tdata,\n\tonDeleteRow,\n\tonEditRow,\n\tonSearchChange,\n\tsearchValue,\n}: TableProps) {\n\tconst table = useReactTable({\n\t\tdata,\n\t\tcolumns: createColumns({ onDeleteRow, onEditRow }),\n\t\tgetCoreRowModel: getCoreRowModel(),\n\t\tgetPaginationRowModel: getPaginationRowModel(), //load client-side pagination code\n\t});\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<SearchInput\n\t\t\t\tclassName=\"max-w-72\"\n\t\t\t\tplaceholder=\"Search global concurrency limit\"\n\t\t\t\tvalue={searchValue}\n\t\t\t\tonChange={(e) => onSearchChange(e.target.value)}\n\t\t\t/>\n\t\t\t<DataTable table={table} />\n\t\t</div>\n\t);\n}\n","import { Button } from \"@/components/ui/button\";\nimport { DocsLink } from \"@/components/ui/docs-link\";\nimport {\n\tEmptyState,\n\tEmptyStateActions,\n\tEmptyStateDescription,\n\tEmptyStateIcon,\n\tEmptyStateTitle,\n} from \"@/components/ui/empty-state\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype GlobalConcurrencyLimitsEmptyStateProps = {\n\tonAdd: () => void;\n};\nexport const GlobalConcurrencyLimitsEmptyState = ({\n\tonAdd,\n}: GlobalConcurrencyLimitsEmptyStateProps) => (\n\t<EmptyState>\n\t\t<EmptyStateIcon id=\"AlignVerticalJustifyStart\" />\n\t\t<EmptyStateTitle>Add a concurrency limit</EmptyStateTitle>\n\t\t<EmptyStateDescription>\n\t\t\tGlobal concurrency limits can be applied to flow runs, task runs and any\n\t\t\toperation where you want to control concurrency.\n\t\t</EmptyStateDescription>\n\t\t<EmptyStateActions>\n\t\t\t<Button onClick={onAdd}>\n\t\t\t\tAdd Concurrency Limit <Icon id=\"Plus\" className=\"size-4 ml-2\" />\n\t\t\t</Button>\n\t\t\t<DocsLink id=\"global-concurrency-guide\" />\n\t\t</EmptyStateActions>\n\t</EmptyState>\n);\n","import {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbList,\n} from \"@/components/ui/breadcrumb\";\nimport { Button } from \"@/components/ui/button\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype GlobalConcurrencyLimitsHeaderProps = {\n\tonAdd: () => void;\n};\n\nexport const GlobalConcurrencyLimitsHeader = ({\n\tonAdd,\n}: GlobalConcurrencyLimitsHeaderProps) => {\n\treturn (\n\t\t<div className=\"flex items-center gap-2\">\n\t\t\t<Breadcrumb>\n\t\t\t\t<BreadcrumbList>\n\t\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t\tGlobal Concurrency Limits\n\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t</BreadcrumbList>\n\t\t\t</Breadcrumb>\n\t\t\t<Button\n\t\t\t\tonClick={onAdd}\n\t\t\t\tsize=\"icon\"\n\t\t\t\tclassName=\"size-7\"\n\t\t\t\tvariant=\"outline\"\n\t\t\t\taria-label=\"add global concurrency limit\"\n\t\t\t>\n\t\t\t\t<Icon id=\"Plus\" className=\"size-4\" />\n\t\t\t</Button>\n\t\t</div>\n\t);\n};\n","import { zodResolver } from \"@hookform/resolvers/zod\";\nimport { useEffect } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport {\n\ttype GlobalConcurrencyLimit,\n\tuseCreateGlobalConcurrencyLimit,\n\tuseUpdateGlobalConcurrencyLimit,\n} from \"@/api/global-concurrency-limits\";\n\nconst formSchema = z.object({\n\tactive: z.boolean().default(true),\n\t/** Coerce to solve common issue of transforming a string number to a number type */\n\tdenied_slots: z.number().default(0).or(z.string()).pipe(z.coerce.number()),\n\t/** Coerce to solve common issue of transforming a string number to a number type */\n\tlimit: z.number().default(0).or(z.string()).pipe(z.coerce.number()),\n\tname: z\n\t\t.string()\n\t\t.min(2, { message: \"Name must be at least 2 characters\" })\n\t\t.default(\"\"),\n\t/** Coerce to solve common issue of transforming a string number to a number type */\n\tslot_decay_per_second: z\n\t\t.number()\n\t\t.default(0)\n\t\t.or(z.string())\n\t\t.pipe(z.coerce.number()),\n\t/** Additional fields post creation. Coerce to solve common issue of transforming a string number to a number type */\n\tactive_slots: z.number().default(0).or(z.string()).pipe(z.coerce.number()),\n});\n\nconst DEFAULT_VALUES = {\n\tactive: true,\n\tname: \"\",\n\tlimit: 0,\n\tslot_decay_per_second: 0,\n\tdenied_slots: 0,\n\tactive_slots: 0,\n} as const;\n\ntype UseCreateOrEditGlobalConcurrencyLimitFormOptions = {\n\t/** Limit to edit. Pass undefined if creating a new limit */\n\tlimitToUpdate: GlobalConcurrencyLimit | undefined;\n\t/** Callback after hitting Save or Update */\n\tonSubmit: () => void;\n};\n\nexport const useCreateOrEditGlobalConcurrencyLimitForm = ({\n\tlimitToUpdate,\n\tonSubmit,\n}: UseCreateOrEditGlobalConcurrencyLimitFormOptions) => {\n\tconst { createGlobalConcurrencyLimit, status: createStatus } =\n\t\tuseCreateGlobalConcurrencyLimit();\n\tconst { updateGlobalConcurrencyLimit, status: updateStatus } =\n\t\tuseUpdateGlobalConcurrencyLimit();\n\n\tconst form = useForm({\n\t\tresolver: zodResolver(formSchema),\n\t\tdefaultValues: DEFAULT_VALUES,\n\t});\n\n\t// Sync form data with limit-to-edit data\n\tuseEffect(() => {\n\t\tif (limitToUpdate) {\n\t\t\tconst { active, name, limit, slot_decay_per_second, active_slots } =\n\t\t\t\tlimitToUpdate;\n\t\t\tform.reset({ active, name, limit, slot_decay_per_second, active_slots });\n\t\t} else {\n\t\t\tform.reset(DEFAULT_VALUES);\n\t\t}\n\t}, [form, limitToUpdate]);\n\n\tconst saveOrUpdate = (values: z.infer<typeof formSchema>) => {\n\t\tconst onSettled = () => {\n\t\t\tform.reset(DEFAULT_VALUES);\n\t\t\tonSubmit();\n\t\t};\n\n\t\tif (limitToUpdate?.id) {\n\t\t\tupdateGlobalConcurrencyLimit(\n\t\t\t\t{\n\t\t\t\t\tid_or_name: limitToUpdate.id,\n\t\t\t\t\t...values,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tonSuccess: () => {\n\t\t\t\t\t\ttoast.success(\"Limit updated\");\n\t\t\t\t\t},\n\t\t\t\t\tonError: (error) => {\n\t\t\t\t\t\tconst message =\n\t\t\t\t\t\t\terror.message || \"Unknown error while updating limit.\";\n\t\t\t\t\t\tform.setError(\"root\", { message });\n\t\t\t\t\t},\n\t\t\t\t\tonSettled,\n\t\t\t\t},\n\t\t\t);\n\t\t} else {\n\t\t\tcreateGlobalConcurrencyLimit(values, {\n\t\t\t\tonSuccess: () => {\n\t\t\t\t\ttoast.success(\"Limit created\");\n\t\t\t\t},\n\t\t\t\tonError: (error) => {\n\t\t\t\t\tconst message =\n\t\t\t\t\t\terror.message || \"Unknown error while creating variable.\";\n\t\t\t\t\tform.setError(\"root\", {\n\t\t\t\t\t\tmessage,\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tonSettled,\n\t\t\t});\n\t\t}\n\t};\n\n\treturn {\n\t\tform,\n\t\tsaveOrUpdate,\n\t\tisLoading: createStatus === \"pending\" || updateStatus === \"pending\",\n\t};\n};\n","import type { GlobalConcurrencyLimit } from \"@/api/global-concurrency-limits\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Switch } from \"@/components/ui/switch\";\n\nimport { useCreateOrEditGlobalConcurrencyLimitForm } from \"./use-create-or-edit-global-concurrency-limit-form\";\n\ntype GlobalConcurrencyLimitsCreateOrEditDialogProps = {\n\tlimitToUpdate?: GlobalConcurrencyLimit;\n\tonOpenChange: (open: boolean) => void;\n\tonSubmit: () => void;\n};\n\nexport const GlobalConcurrencyLimitsCreateOrEditDialog = ({\n\tlimitToUpdate,\n\tonOpenChange,\n\tonSubmit,\n}: GlobalConcurrencyLimitsCreateOrEditDialogProps) => {\n\tconst { form, isLoading, saveOrUpdate } =\n\t\tuseCreateOrEditGlobalConcurrencyLimitForm({\n\t\t\tlimitToUpdate,\n\t\t\tonSubmit,\n\t\t});\n\n\tconst dialogTitle = limitToUpdate\n\t\t? `Update ${limitToUpdate.name}`\n\t\t: \"Add Concurrency Limit\";\n\n\treturn (\n\t\t<Dialog open onOpenChange={onOpenChange}>\n\t\t\t<DialogContent aria-describedby={undefined}>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>{dialogTitle}</DialogTitle>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={(e) => void form.handleSubmit(saveOrUpdate)(e)}\n\t\t\t\t\t\tclassName=\"space-y-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormMessage>{form.formState.errors.root?.message}</FormMessage>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input type=\"text\" autoComplete=\"off\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"limit\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Concurrency Limit</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input type=\"number\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"slot_decay_per_second\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Slot Decay Per Second</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input type=\"number\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{limitToUpdate && (\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"active_slots\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Active Slots</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input type=\"number\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"active\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Active</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"block\"\n\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t\t\t\t<Button variant=\"outline\">Close</Button>\n\t\t\t\t\t\t\t</DialogTrigger>\n\t\t\t\t\t\t\t<Button type=\"submit\" loading={isLoading}>\n\t\t\t\t\t\t\t\t{limitToUpdate ? \"Update\" : \"Save\"}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n","import { toast } from \"sonner\";\nimport {\n\ttype GlobalConcurrencyLimit,\n\tuseDeleteGlobalConcurrencyLimit,\n} from \"@/api/global-concurrency-limits\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\n\ntype GlobalConcurrencyLimitsDeleteDialogProps = {\n\tlimit: GlobalConcurrencyLimit;\n\tonOpenChange: (open: boolean) => void;\n\tonDelete: () => void;\n};\n\nexport const GlobalConcurrencyLimitsDeleteDialog = ({\n\tlimit,\n\tonOpenChange,\n\tonDelete,\n}: GlobalConcurrencyLimitsDeleteDialogProps) => {\n\tconst { deleteGlobalConcurrencyLimit, isPending } =\n\t\tuseDeleteGlobalConcurrencyLimit();\n\n\tconst handleOnClick = (id: string) => {\n\t\tdeleteGlobalConcurrencyLimit(id, {\n\t\t\tonSuccess: () => {\n\t\t\t\ttoast.success(\"Concurrency limit deleted\");\n\t\t\t},\n\t\t\tonError: (error) => {\n\t\t\t\tconst message =\n\t\t\t\t\terror.message || \"Unknown error while deleting concurrency limit.\";\n\t\t\t\tconsole.error(message);\n\t\t\t},\n\t\t\tonSettled: onDelete,\n\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open onOpenChange={onOpenChange}>\n\t\t\t<DialogContent>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Delete Concurrency Limit</DialogTitle>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<DialogDescription>\n\t\t\t\t\tAre you sure you want to delete {limit.name}\n\t\t\t\t</DialogDescription>\n\t\t\t\t<DialogFooter>\n\t\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t\t<Button variant=\"outline\">Close</Button>\n\t\t\t\t\t</DialogTrigger>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\tonClick={() => handleOnClick(limit.id)}\n\t\t\t\t\t\tloading={isPending}\n\t\t\t\t\t>\n\t\t\t\t\t\tDelete\n\t\t\t\t\t</Button>\n\t\t\t\t</DialogFooter>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n","import type { GlobalConcurrencyLimit } from \"@/api/global-concurrency-limits\";\n\nimport { GlobalConcurrencyLimitsCreateOrEditDialog } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-create-or-edit-dialog\";\nimport { GlobalConcurrencyLimitsDeleteDialog } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-delete-dialog\";\n\nexport type DialogState =\n\t| { dialog: null | \"create\"; data: undefined }\n\t| {\n\t\t\tdialog: \"delete\" | \"edit\";\n\t\t\tdata: GlobalConcurrencyLimit;\n\t };\n\nexport const GlobalConcurrencyLimitsDialog = ({\n\topenDialog,\n\tonCloseDialog,\n\tonOpenChange,\n}: {\n\topenDialog: DialogState;\n\tonOpenChange: (open: boolean) => void;\n\tonCloseDialog: () => void;\n}) => {\n\tconst { dialog, data } = openDialog;\n\tswitch (dialog) {\n\t\tcase \"create\":\n\t\t\treturn (\n\t\t\t\t<GlobalConcurrencyLimitsCreateOrEditDialog\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tonSubmit={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"delete\":\n\t\t\treturn (\n\t\t\t\t<GlobalConcurrencyLimitsDeleteDialog\n\t\t\t\t\tlimit={data}\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tonDelete={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"edit\":\n\t\t\treturn (\n\t\t\t\t<GlobalConcurrencyLimitsCreateOrEditDialog\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tlimitToUpdate={data}\n\t\t\t\t\tonSubmit={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tdefault:\n\t\t\treturn null;\n\t}\n};\n","import { useState } from \"react\";\nimport {\n\ttype GlobalConcurrencyLimit,\n\tuseListGlobalConcurrencyLimits,\n} from \"@/api/global-concurrency-limits\";\n\nimport { GlobalConcurrencyLimitsDataTable } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table\";\nimport { GlobalConcurrencyLimitsEmptyState } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-empty-state\";\nimport { GlobalConcurrencyLimitsHeader } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-header\";\n\nimport {\n\ttype DialogState,\n\tGlobalConcurrencyLimitsDialog,\n} from \"./global-conccurency-limits-dialog\";\n\nexport const GlobalConcurrencyLimitsView = () => {\n\tconst [openDialog, setOpenDialog] = useState<DialogState>({\n\t\tdialog: null,\n\t\tdata: undefined,\n\t});\n\n\tconst { data } = useListGlobalConcurrencyLimits();\n\n\tconst handleAddRow = () =>\n\t\tsetOpenDialog({ dialog: \"create\", data: undefined });\n\n\tconst handleEditRow = (data: GlobalConcurrencyLimit) =>\n\t\tsetOpenDialog({ dialog: \"edit\", data });\n\n\tconst handleDeleteRow = (data: GlobalConcurrencyLimit) =>\n\t\tsetOpenDialog({ dialog: \"delete\", data });\n\n\tconst handleCloseDialog = () =>\n\t\tsetOpenDialog({ dialog: null, data: undefined });\n\n\t// Because all modals will be rendered, only control the closing logic\n\tconst handleOpenChange = (open: boolean) => {\n\t\tif (!open) {\n\t\t\thandleCloseDialog();\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<GlobalConcurrencyLimitsHeader onAdd={handleAddRow} />\n\t\t\t{data.length === 0 ? (\n\t\t\t\t<GlobalConcurrencyLimitsEmptyState onAdd={handleAddRow} />\n\t\t\t) : (\n\t\t\t\t<GlobalConcurrencyLimitsDataTable\n\t\t\t\t\tdata={data}\n\t\t\t\t\tonEditRow={handleEditRow}\n\t\t\t\t\tonDeleteRow={handleDeleteRow}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<GlobalConcurrencyLimitsDialog\n\t\t\t\topenDialog={openDialog}\n\t\t\t\tonCloseDialog={handleCloseDialog}\n\t\t\t\tonOpenChange={handleOpenChange}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n","import type { CellContext } from \"@tanstack/react-table\";\nimport type { TaskRunConcurrencyLimit } from \"@/api/task-run-concurrency-limits\";\n\ntype ActiveTaskRunCellsProps = CellContext<\n\tTaskRunConcurrencyLimit,\n\tArray<string>\n>;\n\nexport const ActiveTaskRunCells = (props: ActiveTaskRunCellsProps) => {\n\tconst activeTaskRuns = props.getValue();\n\tconst numActiveTaskRuns = activeTaskRuns.length;\n\tif (numActiveTaskRuns === 0) {\n\t\treturn \"None\";\n\t}\n\treturn numActiveTaskRuns;\n};\n","import { Link } from \"@tanstack/react-router\";\nimport type { CellContext } from \"@tanstack/react-table\";\nimport type { TaskRunConcurrencyLimit } from \"@/api/task-run-concurrency-limits\";\n\ntype TagCellProps = CellContext<TaskRunConcurrencyLimit, string>;\n\nexport const TagCell = (props: TagCellProps) => {\n\tconst tag = props.getValue();\n\tconst id = props.row.original.id;\n\treturn (\n\t\t<Link params={{ id }} to={\"/concurrency-limits/concurrency-limit/$id\"}>\n\t\t\t{tag}\n\t\t</Link>\n\t);\n};\n","import { getRouteApi } from \"@tanstack/react-router\";\nimport {\n\tcreateColumnHelper,\n\tgetCoreRowModel,\n\tgetPaginationRowModel,\n\tuseReactTable,\n} from \"@tanstack/react-table\";\nimport { useDeferredValue, useMemo } from \"react\";\nimport type { TaskRunConcurrencyLimit } from \"@/api/task-run-concurrency-limits\";\nimport { TaskRunConcurrencyLimitsActionsMenu } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-actions-menu\";\nimport { DataTable } from \"@/components/ui/data-table\";\nimport { SearchInput } from \"@/components/ui/input\";\n\nimport { ActiveTaskRunCells } from \"./active-task-runs-cell\";\nimport { TagCell } from \"./tag-cell\";\n\nconst routeApi = getRouteApi(\"/concurrency-limits/\");\nconst columnHelper = createColumnHelper<TaskRunConcurrencyLimit>();\n\nconst createColumns = ({\n\tonDeleteRow,\n\tonResetRow,\n}: {\n\tonDeleteRow: (row: TaskRunConcurrencyLimit) => void;\n\tonResetRow: (row: TaskRunConcurrencyLimit) => void;\n}) => [\n\tcolumnHelper.accessor(\"tag\", {\n\t\theader: \"Tag\",\n\t\tcell: TagCell,\n\t}),\n\tcolumnHelper.accessor(\"concurrency_limit\", {\n\t\theader: \"Slots\",\n\t}),\n\tcolumnHelper.accessor(\"active_slots\", {\n\t\theader: \"Active Task Runs\",\n\t\tcell: ActiveTaskRunCells,\n\t}),\n\tcolumnHelper.display({\n\t\tid: \"actions\",\n\t\tcell: (props) => {\n\t\t\tconst row = props.row.original;\n\t\t\treturn (\n\t\t\t\t<div className=\"flex flex-row justify-end\">\n\t\t\t\t\t<TaskRunConcurrencyLimitsActionsMenu\n\t\t\t\t\t\tid={row.id}\n\t\t\t\t\t\tonDelete={() => onDeleteRow(row)}\n\t\t\t\t\t\tonReset={() => onResetRow(row)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t}),\n];\n\ntype TaskRunConcurrencyLimitsDataTableProps = {\n\tdata: Array<TaskRunConcurrencyLimit>;\n\tonDeleteRow: (row: TaskRunConcurrencyLimit) => void;\n\tonResetRow: (row: TaskRunConcurrencyLimit) => void;\n};\n\nexport const TaskRunConcurrencyLimitsDataTable = ({\n\tdata,\n\tonDeleteRow,\n\tonResetRow,\n}: TaskRunConcurrencyLimitsDataTableProps) => {\n\tconst navigate = routeApi.useNavigate();\n\tconst { search } = routeApi.useSearch();\n\tconst deferredSearch = useDeferredValue(search ?? \"\");\n\n\tconst filteredData = useMemo(() => {\n\t\treturn data.filter((row) =>\n\t\t\trow.tag.toLowerCase().includes(deferredSearch.toLowerCase()),\n\t\t);\n\t}, [data, deferredSearch]);\n\n\treturn (\n\t\t<Table\n\t\t\tdata={filteredData}\n\t\t\tonDeleteRow={onDeleteRow}\n\t\t\tonResetRow={onResetRow}\n\t\t\tsearchValue={search}\n\t\t\tonSearchChange={(value) =>\n\t\t\t\tvoid navigate({\n\t\t\t\t\tto: \".\",\n\t\t\t\t\tsearch: (prev) => ({ ...prev, search: value }),\n\t\t\t\t})\n\t\t\t}\n\t\t/>\n\t);\n};\n\ntype TableProps = {\n\tdata: Array<TaskRunConcurrencyLimit>;\n\tonDeleteRow: (row: TaskRunConcurrencyLimit) => void;\n\tonResetRow: (row: TaskRunConcurrencyLimit) => void;\n\tonSearchChange: (value: string) => void;\n\tsearchValue: string | undefined;\n};\n\nexport function Table({\n\tdata,\n\tonDeleteRow,\n\tonResetRow,\n\tonSearchChange,\n\tsearchValue,\n}: TableProps) {\n\tconst table = useReactTable({\n\t\tdata,\n\t\tcolumns: createColumns({ onDeleteRow, onResetRow }),\n\t\tgetCoreRowModel: getCoreRowModel(),\n\t\tgetPaginationRowModel: getPaginationRowModel(), //load client-side pagination code\n\t});\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<SearchInput\n\t\t\t\tclassName=\"max-w-72\"\n\t\t\t\tplaceholder=\"Search active task limit\"\n\t\t\t\tvalue={searchValue}\n\t\t\t\tonChange={(e) => onSearchChange(e.target.value)}\n\t\t\t/>\n\t\t\t<DataTable table={table} />\n\t\t</div>\n\t);\n}\n","import { Button } from \"@/components/ui/button\";\nimport { DocsLink } from \"@/components/ui/docs-link\";\nimport {\n\tEmptyState,\n\tEmptyStateActions,\n\tEmptyStateDescription,\n\tEmptyStateIcon,\n\tEmptyStateTitle,\n} from \"@/components/ui/empty-state\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype TaskRunConcurrencyLimitsEmptyStateProps = {\n\tonAdd: () => void;\n};\nexport const TaskRunConcurrencyLimitsEmptyState = ({\n\tonAdd,\n}: TaskRunConcurrencyLimitsEmptyStateProps) => (\n\t<EmptyState>\n\t\t<EmptyStateIcon id=\"CircleArrowOutUpRight\" />\n\t\t<EmptyStateTitle>\n\t\t\tAdd a concurrency limit for your task runs\n\t\t</EmptyStateTitle>\n\t\t<EmptyStateDescription>\n\t\t\tCreating a limit allows you to limit the number of tasks running\n\t\t\tsimultaneously with a given tag.\n\t\t</EmptyStateDescription>\n\t\t<EmptyStateActions>\n\t\t\t<Button onClick={onAdd}>\n\t\t\t\tAdd Concurrency Limit <Icon id=\"Plus\" className=\"size-4 ml-2\" />\n\t\t\t</Button>\n\t\t\t<DocsLink id=\"task-concurrency-guide\" />\n\t\t</EmptyStateActions>\n\t</EmptyState>\n);\n","import {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbList,\n} from \"@/components/ui/breadcrumb\";\nimport { Button } from \"@/components/ui/button\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype TaskRunConcurrencyLimitsHeaderProps = {\n\tonAdd: () => void;\n};\n\nexport const TaskRunConcurrencyLimitsHeader = ({\n\tonAdd,\n}: TaskRunConcurrencyLimitsHeaderProps) => {\n\treturn (\n\t\t<div className=\"flex items-center gap-2\">\n\t\t\t<Breadcrumb>\n\t\t\t\t<BreadcrumbList>\n\t\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t\tTask Run Concurrency Limits\n\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t</BreadcrumbList>\n\t\t\t</Breadcrumb>\n\t\t\t<Button\n\t\t\t\tonClick={onAdd}\n\t\t\t\tsize=\"icon\"\n\t\t\t\tclassName=\"size-7\"\n\t\t\t\tvariant=\"outline\"\n\t\t\t\taria-label=\"add task run concurrency limit\"\n\t\t\t>\n\t\t\t\t<Icon id=\"Plus\" className=\"size-4\" />\n\t\t\t</Button>\n\t\t</div>\n\t);\n};\n","import { zodResolver } from \"@hookform/resolvers/zod\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { useCreateTaskRunConcurrencyLimit } from \"@/api/task-run-concurrency-limits\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\n\nconst formSchema = z.object({\n\ttag: z.string().min(1),\n\t/** Coerce to solve common issue of transforming a string number to a number type */\n\tconcurrency_limit: z\n\t\t.number()\n\t\t.default(0)\n\t\t.or(z.string())\n\t\t.pipe(z.coerce.number()),\n});\n\nconst DEFAULT_VALUES = {\n\ttag: \"\",\n\tconcurrency_limit: 0,\n} as const;\n\ntype TaskRunConcurrencyLimitsCreateDialogProps = {\n\tonOpenChange: (open: boolean) => void;\n\tonSubmit: () => void;\n};\n\nexport const TaskRunConcurrencyLimitsCreateDialog = ({\n\tonOpenChange,\n\tonSubmit,\n}: TaskRunConcurrencyLimitsCreateDialogProps) => {\n\tconst { createTaskRunConcurrencyLimit, isPending } =\n\t\tuseCreateTaskRunConcurrencyLimit();\n\n\tconst form = useForm({\n\t\tresolver: zodResolver(formSchema),\n\t\tdefaultValues: DEFAULT_VALUES,\n\t});\n\n\tconst handleAddLimit = (values: z.infer<typeof formSchema>) => {\n\t\tcreateTaskRunConcurrencyLimit(values, {\n\t\t\tonSuccess: () => {\n\t\t\t\ttoast.success(\"Concurrency limit added\");\n\t\t\t},\n\t\t\tonError: (error) => {\n\t\t\t\tconst message = error.message || \"Unknown error while updating limit.\";\n\t\t\t\tform.setError(\"root\", { message });\n\t\t\t},\n\t\t\tonSettled: () => {\n\t\t\t\tform.reset(DEFAULT_VALUES);\n\t\t\t\tonSubmit();\n\t\t\t},\n\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open onOpenChange={onOpenChange}>\n\t\t\t<DialogContent aria-describedby={undefined}>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Add Task Run Concurrency Limit</DialogTitle>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={(e) => void form.handleSubmit(handleAddLimit)(e)}\n\t\t\t\t\t\tclassName=\"space-y-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormMessage>{form.formState.errors.root?.message}</FormMessage>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"tag\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Tag</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input type=\"text\" autoComplete=\"off\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"concurrency_limit\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Concurrency Limit</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input type=\"number\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t\t\t\t<Button variant=\"outline\">Close</Button>\n\t\t\t\t\t\t\t</DialogTrigger>\n\t\t\t\t\t\t\t<Button type=\"submit\" loading={isPending}>\n\t\t\t\t\t\t\t\tAdd\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n","import type { TaskRunConcurrencyLimit } from \"@/api/task-run-concurrency-limits\";\nimport { TaskRunConcurrencyLimitsCreateDialog } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-create-dialog\";\nimport { TaskRunConcurrencyLimitsDeleteDialog } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-delete-dialog\";\nimport { TaskRunConcurrencyLimitsResetDialog } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-reset-dialog\";\n\nexport type DialogState =\n\t| { dialog: null | \"create\"; data: undefined }\n\t| {\n\t\t\tdialog: \"reset\" | \"delete\";\n\t\t\tdata: TaskRunConcurrencyLimit;\n\t };\n\nexport const TaskRunConcurrencyLimitDialog = ({\n\topenDialog,\n\tonCloseDialog,\n\tonOpenChange,\n}: {\n\topenDialog: DialogState;\n\tonOpenChange: (open: boolean) => void;\n\tonCloseDialog: () => void;\n}) => {\n\tconst { dialog, data } = openDialog;\n\tswitch (dialog) {\n\t\tcase \"create\":\n\t\t\treturn (\n\t\t\t\t<TaskRunConcurrencyLimitsCreateDialog\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tonSubmit={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"reset\":\n\t\t\treturn (\n\t\t\t\t<TaskRunConcurrencyLimitsResetDialog\n\t\t\t\t\tdata={data}\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tonReset={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"delete\":\n\t\t\treturn (\n\t\t\t\t<TaskRunConcurrencyLimitsDeleteDialog\n\t\t\t\t\tdata={data}\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tonDelete={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tdefault:\n\t\t\treturn null;\n\t}\n};\n","import { useState } from \"react\";\nimport {\n\ttype TaskRunConcurrencyLimit,\n\tuseListTaskRunConcurrencyLimits,\n} from \"@/api/task-run-concurrency-limits\";\n\nimport { TaskRunConcurrencyLimitsDataTable } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table\";\nimport { TaskRunConcurrencyLimitsEmptyState } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-empty-state\";\nimport { TaskRunConcurrencyLimitsHeader } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-header\";\nimport {\n\ttype DialogState,\n\tTaskRunConcurrencyLimitDialog,\n} from \"./task-run-concurrency-limit-dialog\";\n\nexport const TaskRunConcurrencyLimitsView = () => {\n\tconst [openDialog, setOpenDialog] = useState<DialogState>({\n\t\tdialog: null,\n\t\tdata: undefined,\n\t});\n\n\tconst { data } = useListTaskRunConcurrencyLimits();\n\n\tconst handleAddRow = () =>\n\t\tsetOpenDialog({ dialog: \"create\", data: undefined });\n\n\tconst handleDeleteRow = (data: TaskRunConcurrencyLimit) =>\n\t\tsetOpenDialog({ dialog: \"delete\", data });\n\n\tconst handleResetRow = (data: TaskRunConcurrencyLimit) =>\n\t\tsetOpenDialog({ dialog: \"reset\", data });\n\n\tconst handleCloseDialog = () =>\n\t\tsetOpenDialog({ dialog: null, data: undefined });\n\n\t// Because all modals will be rendered, only control the closing logic\n\tconst handleOpenChange = (open: boolean) => {\n\t\tif (!open) {\n\t\t\thandleCloseDialog();\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<TaskRunConcurrencyLimitsHeader onAdd={handleAddRow} />\n\t\t\t{data.length === 0 ? (\n\t\t\t\t<TaskRunConcurrencyLimitsEmptyState onAdd={handleAddRow} />\n\t\t\t) : (\n\t\t\t\t<TaskRunConcurrencyLimitsDataTable\n\t\t\t\t\tdata={data}\n\t\t\t\t\tonDeleteRow={handleDeleteRow}\n\t\t\t\t\tonResetRow={handleResetRow}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<TaskRunConcurrencyLimitDialog\n\t\t\t\topenDialog={openDialog}\n\t\t\t\tonCloseDialog={handleCloseDialog}\n\t\t\t\tonOpenChange={handleOpenChange}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n","import { getRouteApi } from \"@tanstack/react-router\";\nimport type { JSX } from \"react\";\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@/components/ui/tabs\";\nimport type { TabOptions } from \"@/routes/concurrency-limits\";\n\nconst routeApi = getRouteApi(\"/concurrency-limits/\");\n\ntype TabOptionValues = {\n\t/** Value of search value in url */\n\ttabSearchValue: TabOptions;\n\t/** Display value for the UI */\n\tdisplayValue: string;\n};\n\n/** Maps url tab option to visual name */\nconst TAB_OPTIONS: Record<TabOptions, TabOptionValues> = {\n\tglobal: {\n\t\ttabSearchValue: \"global\",\n\t\tdisplayValue: \"Global\",\n\t},\n\t\"task-run\": {\n\t\ttabSearchValue: \"task-run\",\n\t\tdisplayValue: \"Task Run\",\n\t},\n} as const;\n\ntype ConcurrencyLimitsTabsProps = {\n\tglobalView: React.ReactNode;\n\ttaskRunView: React.ReactNode;\n};\n\n// TODO: Move Tabs for navigation to a generic styled component\n\nexport const ConcurrencyLimitsTabs = ({\n\tglobalView,\n\ttaskRunView,\n}: ConcurrencyLimitsTabsProps): JSX.Element => {\n\tconst { tab } = routeApi.useSearch();\n\tconst navigate = routeApi.useNavigate();\n\n\treturn (\n\t\t<Tabs defaultValue=\"Global\" value={tab}>\n\t\t\t<TabsList>\n\t\t\t\t<TabsTrigger\n\t\t\t\t\tvalue={TAB_OPTIONS.global.tabSearchValue}\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tvoid navigate({\n\t\t\t\t\t\t\tto: \"/concurrency-limits\",\n\t\t\t\t\t\t\tsearch: {\n\t\t\t\t\t\t\t\ttab: TAB_OPTIONS.global.tabSearchValue,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{TAB_OPTIONS.global.displayValue}\n\t\t\t\t</TabsTrigger>\n\t\t\t\t<TabsTrigger\n\t\t\t\t\tvalue={TAB_OPTIONS[\"task-run\"].tabSearchValue}\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tvoid navigate({\n\t\t\t\t\t\t\tto: \"/concurrency-limits\",\n\t\t\t\t\t\t\tsearch: {\n\t\t\t\t\t\t\t\ttab: TAB_OPTIONS[\"task-run\"].tabSearchValue,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{TAB_OPTIONS[\"task-run\"].displayValue}\n\t\t\t\t</TabsTrigger>\n\t\t\t</TabsList>\n\t\t\t<TabsContent value={TAB_OPTIONS.global.tabSearchValue}>\n\t\t\t\t{globalView}\n\t\t\t</TabsContent>\n\t\t\t<TabsContent value={TAB_OPTIONS[\"task-run\"].tabSearchValue}>\n\t\t\t\t{taskRunView}\n\t\t\t</TabsContent>\n\t\t</Tabs>\n\t);\n};\n","import { GlobalConcurrencyLimitsView } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-view\";\nimport { TaskRunConcurrencyLimitsView } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-view\";\nimport {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbList,\n} from \"@/components/ui/breadcrumb\";\n\nimport { ConcurrencyLimitsTabs } from \"./concurrency-limits-tabs\";\n\nexport const ConcurrencyLimitsPage = () => {\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<ConcurrencyLimitTitle />\n\t\t\t<ConcurrencyLimitsTabs\n\t\t\t\tglobalView={<GlobalConcurrencyLimitsView />}\n\t\t\t\ttaskRunView={<TaskRunConcurrencyLimitsView />}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n\nconst ConcurrencyLimitTitle = () => (\n\t<div className=\"flex items-center gap-2\">\n\t\t<Breadcrumb>\n\t\t\t<BreadcrumbList>\n\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\tConcurrency\n\t\t\t\t</BreadcrumbItem>\n\t\t\t</BreadcrumbList>\n\t\t</Breadcrumb>\n\t</div>\n);\n","import { createFileRoute } from \"@tanstack/react-router\";\nimport { zodValidator } from \"@tanstack/zod-adapter\";\nimport { z } from \"zod\";\nimport { buildListGlobalConcurrencyLimitsQuery } from \"@/api/global-concurrency-limits\";\nimport { buildListTaskRunConcurrencyLimitsQuery } from \"@/api/task-run-concurrency-limits\";\nimport { ConcurrencyLimitsPage } from \"@/components/concurrency/concurrency-limits-page\";\n\n/**\n * Schema for validating URL search parameters for the Concurrency Limits page.\n * @property {string} search used to filter data table\n * @property {'global' | 'task-run'} tab used designate which tab view to display\n */\nconst searchParams = z.object({\n\tsearch: z.string().optional(),\n\ttab: z.enum([\"global\", \"task-run\"]).default(\"global\"),\n});\n\nexport type TabOptions = z.infer<typeof searchParams>[\"tab\"];\n\nexport const Route = createFileRoute(\"/concurrency-limits/\")({\n\tvalidateSearch: zodValidator(searchParams),\n\tcomponent: ConcurrencyLimitsPage,\n\twrapInSuspense: true,\n\tloader: ({ context }) =>\n\t\tPromise.all([\n\t\t\tcontext.queryClient.ensureQueryData(\n\t\t\t\tbuildListGlobalConcurrencyLimitsQuery(),\n\t\t\t),\n\t\t\tcontext.queryClient.ensureQueryData(\n\t\t\t\tbuildListTaskRunConcurrencyLimitsQuery(),\n\t\t\t),\n\t\t]),\n});\n"],"names":["ActionsCell","onEditRow","onDeleteRow","props","handleCopyId","id","toast","row","DropdownMenu","jsx","DropdownMenuTrigger","jsxs","Button","Icon","DropdownMenuContent","DropdownMenuLabel","DropdownMenuItem","ActiveCell","updateGlobalConcurrencyLimit","useUpdateGlobalConcurrencyLimit","handleCheckedChange","checked","error","message","rowActive","rowId","Switch","routeApi","getRouteApi","columnHelper","createColumnHelper","createColumns","GlobalConcurrencyLimitsDataTable","data","navigate","search","deferredSearch","useDeferredValue","filteredData","useMemo","Table","value","prev","onSearchChange","searchValue","table","useReactTable","getCoreRowModel","getPaginationRowModel","SearchInput","e","DataTable","GlobalConcurrencyLimitsEmptyState","onAdd","EmptyState","EmptyStateIcon","EmptyStateTitle","EmptyStateDescription","EmptyStateActions","DocsLink","GlobalConcurrencyLimitsHeader","Breadcrumb","BreadcrumbList","BreadcrumbItem","formSchema","z.object","z.boolean","z.number","z.string","z.coerce","DEFAULT_VALUES","useCreateOrEditGlobalConcurrencyLimitForm","limitToUpdate","onSubmit","createGlobalConcurrencyLimit","createStatus","useCreateGlobalConcurrencyLimit","updateStatus","form","useForm","zodResolver","useEffect","active","name","limit","slot_decay_per_second","active_slots","values","onSettled","GlobalConcurrencyLimitsCreateOrEditDialog","onOpenChange","isLoading","saveOrUpdate","dialogTitle","Dialog","DialogContent","DialogHeader","DialogTitle","Form","FormMessage","FormField","field","FormItem","FormLabel","FormControl","Input","DialogFooter","DialogTrigger","GlobalConcurrencyLimitsDeleteDialog","onDelete","deleteGlobalConcurrencyLimit","isPending","useDeleteGlobalConcurrencyLimit","handleOnClick","DialogDescription","GlobalConcurrencyLimitsDialog","openDialog","onCloseDialog","dialog","GlobalConcurrencyLimitsView","setOpenDialog","useState","useListGlobalConcurrencyLimits","handleAddRow","handleEditRow","handleDeleteRow","handleCloseDialog","handleOpenChange","open","ActiveTaskRunCells","numActiveTaskRuns","TagCell","tag","Link","onResetRow","TaskRunConcurrencyLimitsActionsMenu","TaskRunConcurrencyLimitsDataTable","TaskRunConcurrencyLimitsEmptyState","TaskRunConcurrencyLimitsHeader","TaskRunConcurrencyLimitsCreateDialog","createTaskRunConcurrencyLimit","useCreateTaskRunConcurrencyLimit","handleAddLimit","TaskRunConcurrencyLimitDialog","TaskRunConcurrencyLimitsResetDialog","TaskRunConcurrencyLimitsDeleteDialog","TaskRunConcurrencyLimitsView","useListTaskRunConcurrencyLimits","handleResetRow","TAB_OPTIONS","ConcurrencyLimitsTabs","globalView","taskRunView","tab","Tabs","TabsList","TabsTrigger","TabsContent","ConcurrencyLimitsPage","ConcurrencyLimitTitle","z","string","optional","default","SplitComponent"],"mappings":"w9BAkBO,MAAMA,GAAc,CAAC,CAC3B,UAAAC,EACA,YAAAC,EACA,GAAGC,CACJ,IAAwB,CACvB,MAAMC,EAAgBC,GAAe,CAC/B,UAAU,UAAU,UAAUA,CAAE,EACrCC,EAAM,QAAQ,WAAW,CAC1B,EAEMC,EAAMJ,EAAM,IAAI,SAEtB,cACEK,GAAA,CACA,SAAA,CAAAC,EAAAA,IAACC,GAAA,CAAoB,QAAO,GAC3B,SAAAC,EAAAA,KAACC,GAAO,QAAQ,UAAU,UAAU,aACnC,SAAA,CAAAH,EAAAA,IAAC,OAAA,CAAK,UAAU,UAAU,SAAA,YAAS,EACnCA,EAAAA,IAACI,EAAA,CAAK,GAAG,eAAe,UAAU,QAAA,CAAS,CAAA,CAAA,CAC5C,CAAA,CACD,EACAF,EAAAA,KAACG,GAAA,CAAo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ACnBT,IAAKO,GAAO,CAAC,SAAU,UAAU,CAAC,EAAEG,QAAQ,QAAQ,CACrD,CAAC,EAE4D,MAAAC,GAZpDN"}
1
+ {"version":3,"file":"index-kM_g8J0u.js","sources":["../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/actions-cell.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/active-cell.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/global-concurrency-limits-data-table.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-empty-state/global-concurrency-limits-empty-state.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-header/global-concurrency-limits-header.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-create-or-edit-dialog/use-create-or-edit-global-concurrency-limit-form.ts","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-create-or-edit-dialog/global-concurrency-limits-create-or-edit-dialog.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-delete-dialog/global-concurrency-limits-delete-dialog.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-view/global-conccurency-limits-dialog.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-view/index.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/active-task-runs-cell.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/tag-cell.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/task-run-concurrency-limits-data-table.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-empty-state/task-run-concurrency-limits-empty-state.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-header/task-run-concurrency-limits-header.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-create-dialog/task-run-concurrency-limits-create-dialog.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-view/task-run-concurrency-limit-dialog.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-view/index.tsx","../../src/components/concurrency/concurrency-limits-tabs.tsx","../../src/components/concurrency/concurrency-limits-page.tsx","../../src/routes/concurrency-limits/index.tsx?tsr-split=component"],"sourcesContent":["import type { CellContext } from \"@tanstack/react-table\";\nimport { toast } from \"sonner\";\nimport type { GlobalConcurrencyLimit } from \"@/api/global-concurrency-limits\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype ActionsCellProps = CellContext<GlobalConcurrencyLimit, unknown> & {\n\tonEditRow: (row: GlobalConcurrencyLimit) => void;\n\tonDeleteRow: (row: GlobalConcurrencyLimit) => void;\n};\n\nexport const ActionsCell = ({\n\tonEditRow,\n\tonDeleteRow,\n\t...props\n}: ActionsCellProps) => {\n\tconst handleCopyId = (id: string) => {\n\t\tvoid navigator.clipboard.writeText(id);\n\t\ttoast.success(\"ID copied\");\n\t};\n\n\tconst row = props.row.original;\n\n\treturn (\n\t\t<DropdownMenu>\n\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t<Button variant=\"outline\" className=\"size-8 p-0\">\n\t\t\t\t\t<span className=\"sr-only\">Open menu</span>\n\t\t\t\t\t<Icon id=\"MoreVertical\" className=\"size-4\" />\n\t\t\t\t</Button>\n\t\t\t</DropdownMenuTrigger>\n\t\t\t<DropdownMenuContent align=\"end\">\n\t\t\t\t<DropdownMenuLabel>Actions</DropdownMenuLabel>\n\t\t\t\t<DropdownMenuItem onClick={() => handleCopyId(row.id)}>\n\t\t\t\t\tCopy ID\n\t\t\t\t</DropdownMenuItem>\n\t\t\t\t<DropdownMenuItem onClick={() => onDeleteRow(row)}>\n\t\t\t\t\tDelete\n\t\t\t\t</DropdownMenuItem>\n\t\t\t\t<DropdownMenuItem onClick={() => onEditRow(row)}>Edit</DropdownMenuItem>\n\t\t\t</DropdownMenuContent>\n\t\t</DropdownMenu>\n\t);\n};\n","import type { CellContext } from \"@tanstack/react-table\";\nimport { toast } from \"sonner\";\nimport {\n\ttype GlobalConcurrencyLimit,\n\tuseUpdateGlobalConcurrencyLimit,\n} from \"@/api/global-concurrency-limits\";\nimport { Switch } from \"@/components/ui/switch\";\n\nexport const ActiveCell = (\n\tprops: CellContext<GlobalConcurrencyLimit, boolean>,\n) => {\n\tconst { updateGlobalConcurrencyLimit } = useUpdateGlobalConcurrencyLimit();\n\n\tconst handleCheckedChange = (checked: boolean, id: string) => {\n\t\tupdateGlobalConcurrencyLimit(\n\t\t\t{\n\t\t\t\tid_or_name: id,\n\t\t\t\tactive: checked,\n\t\t\t},\n\t\t\t{\n\t\t\t\tonSuccess: () => {\n\t\t\t\t\ttoast.success(\"Concurrency limit updated\");\n\t\t\t\t},\n\t\t\t\tonError: (error) => {\n\t\t\t\t\tconst message =\n\t\t\t\t\t\terror.message || \"Unknown error while updating active field.\";\n\t\t\t\t\tconsole.error(message);\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\t};\n\n\tconst rowActive = props.getValue();\n\tconst rowId = props.row.original.id;\n\n\treturn (\n\t\t<Switch\n\t\t\taria-label=\"toggle active\"\n\t\t\tchecked={rowActive}\n\t\t\tonCheckedChange={(checked) => handleCheckedChange(checked, rowId)}\n\t\t/>\n\t);\n};\n","import { getRouteApi } from \"@tanstack/react-router\";\nimport {\n\tcreateColumnHelper,\n\tgetCoreRowModel,\n\tgetPaginationRowModel,\n\tuseReactTable,\n} from \"@tanstack/react-table\";\nimport { useDeferredValue, useMemo } from \"react\";\nimport type { GlobalConcurrencyLimit } from \"@/api/global-concurrency-limits\";\nimport { DataTable } from \"@/components/ui/data-table\";\nimport { SearchInput } from \"@/components/ui/input\";\nimport { ActionsCell } from \"./actions-cell\";\nimport { ActiveCell } from \"./active-cell\";\n\nconst routeApi = getRouteApi(\"/concurrency-limits/\");\n\nconst columnHelper = createColumnHelper<GlobalConcurrencyLimit>();\n\nconst createColumns = ({\n\tonEditRow,\n\tonDeleteRow,\n}: {\n\tonEditRow: (row: GlobalConcurrencyLimit) => void;\n\tonDeleteRow: (row: GlobalConcurrencyLimit) => void;\n}) => [\n\tcolumnHelper.accessor(\"name\", {\n\t\theader: \"Name\",\n\t}),\n\tcolumnHelper.accessor(\"limit\", {\n\t\theader: \"Limit\",\n\t}),\n\tcolumnHelper.accessor(\"active_slots\", {\n\t\theader: \"Active Slots\",\n\t}),\n\tcolumnHelper.accessor(\"slot_decay_per_second\", {\n\t\theader: \"Slots Decay Per Second\",\n\t}),\n\tcolumnHelper.accessor(\"active\", {\n\t\theader: \"Active\",\n\t\tcell: ActiveCell,\n\t}),\n\tcolumnHelper.display({\n\t\tid: \"actions\",\n\t\tcell: (props) => (\n\t\t\t<div className=\"flex flex-row justify-end\">\n\t\t\t\t<ActionsCell\n\t\t\t\t\t{...props}\n\t\t\t\t\tonEditRow={onEditRow}\n\t\t\t\t\tonDeleteRow={onDeleteRow}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t),\n\t}),\n];\n\ntype GlobalConcurrencyLimitsDataTableProps = {\n\tdata: Array<GlobalConcurrencyLimit>;\n\tonEditRow: (row: GlobalConcurrencyLimit) => void;\n\tonDeleteRow: (row: GlobalConcurrencyLimit) => void;\n};\n\nexport const GlobalConcurrencyLimitsDataTable = ({\n\tdata,\n\tonEditRow,\n\tonDeleteRow,\n}: GlobalConcurrencyLimitsDataTableProps) => {\n\tconst navigate = routeApi.useNavigate();\n\tconst { search } = routeApi.useSearch();\n\tconst deferredSearch = useDeferredValue(search ?? \"\");\n\n\tconst filteredData = useMemo(() => {\n\t\treturn data.filter((row) =>\n\t\t\trow.name.toLowerCase().includes(deferredSearch.toLowerCase()),\n\t\t);\n\t}, [data, deferredSearch]);\n\n\treturn (\n\t\t<Table\n\t\t\tdata={filteredData}\n\t\t\tonDeleteRow={onDeleteRow}\n\t\t\tonEditRow={onEditRow}\n\t\t\tsearchValue={search}\n\t\t\tonSearchChange={(value) =>\n\t\t\t\tvoid navigate({\n\t\t\t\t\tto: \".\",\n\t\t\t\t\tsearch: (prev) => ({ ...prev, search: value }),\n\t\t\t\t})\n\t\t\t}\n\t\t/>\n\t);\n};\n\ntype TableProps = {\n\tdata: Array<GlobalConcurrencyLimit>;\n\tonDeleteRow: (row: GlobalConcurrencyLimit) => void;\n\tonEditRow: (row: GlobalConcurrencyLimit) => void;\n\tonSearchChange: (value: string) => void;\n\tsearchValue: string | undefined;\n};\n\nexport function Table({\n\tdata,\n\tonDeleteRow,\n\tonEditRow,\n\tonSearchChange,\n\tsearchValue,\n}: TableProps) {\n\tconst table = useReactTable({\n\t\tdata,\n\t\tcolumns: createColumns({ onDeleteRow, onEditRow }),\n\t\tgetCoreRowModel: getCoreRowModel(),\n\t\tgetPaginationRowModel: getPaginationRowModel(), //load client-side pagination code\n\t});\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<SearchInput\n\t\t\t\tclassName=\"max-w-72\"\n\t\t\t\tplaceholder=\"Search global concurrency limit\"\n\t\t\t\tvalue={searchValue}\n\t\t\t\tonChange={(e) => onSearchChange(e.target.value)}\n\t\t\t/>\n\t\t\t<DataTable table={table} />\n\t\t</div>\n\t);\n}\n","import { Button } from \"@/components/ui/button\";\nimport { DocsLink } from \"@/components/ui/docs-link\";\nimport {\n\tEmptyState,\n\tEmptyStateActions,\n\tEmptyStateDescription,\n\tEmptyStateIcon,\n\tEmptyStateTitle,\n} from \"@/components/ui/empty-state\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype GlobalConcurrencyLimitsEmptyStateProps = {\n\tonAdd: () => void;\n};\nexport const GlobalConcurrencyLimitsEmptyState = ({\n\tonAdd,\n}: GlobalConcurrencyLimitsEmptyStateProps) => (\n\t<EmptyState>\n\t\t<EmptyStateIcon id=\"AlignVerticalJustifyStart\" />\n\t\t<EmptyStateTitle>Add a concurrency limit</EmptyStateTitle>\n\t\t<EmptyStateDescription>\n\t\t\tGlobal concurrency limits can be applied to flow runs, task runs and any\n\t\t\toperation where you want to control concurrency.\n\t\t</EmptyStateDescription>\n\t\t<EmptyStateActions>\n\t\t\t<Button onClick={onAdd}>\n\t\t\t\tAdd Concurrency Limit <Icon id=\"Plus\" className=\"size-4 ml-2\" />\n\t\t\t</Button>\n\t\t\t<DocsLink id=\"global-concurrency-guide\" />\n\t\t</EmptyStateActions>\n\t</EmptyState>\n);\n","import {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbList,\n} from \"@/components/ui/breadcrumb\";\nimport { Button } from \"@/components/ui/button\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype GlobalConcurrencyLimitsHeaderProps = {\n\tonAdd: () => void;\n};\n\nexport const GlobalConcurrencyLimitsHeader = ({\n\tonAdd,\n}: GlobalConcurrencyLimitsHeaderProps) => {\n\treturn (\n\t\t<div className=\"flex items-center gap-2\">\n\t\t\t<Breadcrumb>\n\t\t\t\t<BreadcrumbList>\n\t\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t\tGlobal Concurrency Limits\n\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t</BreadcrumbList>\n\t\t\t</Breadcrumb>\n\t\t\t<Button\n\t\t\t\tonClick={onAdd}\n\t\t\t\tsize=\"icon\"\n\t\t\t\tclassName=\"size-7\"\n\t\t\t\tvariant=\"outline\"\n\t\t\t\taria-label=\"add global concurrency limit\"\n\t\t\t>\n\t\t\t\t<Icon id=\"Plus\" className=\"size-4\" />\n\t\t\t</Button>\n\t\t</div>\n\t);\n};\n","import { zodResolver } from \"@hookform/resolvers/zod\";\nimport { useEffect } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport {\n\ttype GlobalConcurrencyLimit,\n\tuseCreateGlobalConcurrencyLimit,\n\tuseUpdateGlobalConcurrencyLimit,\n} from \"@/api/global-concurrency-limits\";\n\nconst formSchema = z.object({\n\tactive: z.boolean().default(true),\n\t/** Coerce to solve common issue of transforming a string number to a number type */\n\tdenied_slots: z.number().default(0).or(z.string()).pipe(z.coerce.number()),\n\t/** Coerce to solve common issue of transforming a string number to a number type */\n\tlimit: z.number().default(0).or(z.string()).pipe(z.coerce.number()),\n\tname: z\n\t\t.string()\n\t\t.min(2, { message: \"Name must be at least 2 characters\" })\n\t\t.default(\"\"),\n\t/** Coerce to solve common issue of transforming a string number to a number type */\n\tslot_decay_per_second: z\n\t\t.number()\n\t\t.default(0)\n\t\t.or(z.string())\n\t\t.pipe(z.coerce.number()),\n\t/** Additional fields post creation. Coerce to solve common issue of transforming a string number to a number type */\n\tactive_slots: z.number().default(0).or(z.string()).pipe(z.coerce.number()),\n});\n\nconst DEFAULT_VALUES = {\n\tactive: true,\n\tname: \"\",\n\tlimit: 0,\n\tslot_decay_per_second: 0,\n\tdenied_slots: 0,\n\tactive_slots: 0,\n} as const;\n\ntype UseCreateOrEditGlobalConcurrencyLimitFormOptions = {\n\t/** Limit to edit. Pass undefined if creating a new limit */\n\tlimitToUpdate: GlobalConcurrencyLimit | undefined;\n\t/** Callback after hitting Save or Update */\n\tonSubmit: () => void;\n};\n\nexport const useCreateOrEditGlobalConcurrencyLimitForm = ({\n\tlimitToUpdate,\n\tonSubmit,\n}: UseCreateOrEditGlobalConcurrencyLimitFormOptions) => {\n\tconst { createGlobalConcurrencyLimit, status: createStatus } =\n\t\tuseCreateGlobalConcurrencyLimit();\n\tconst { updateGlobalConcurrencyLimit, status: updateStatus } =\n\t\tuseUpdateGlobalConcurrencyLimit();\n\n\tconst form = useForm({\n\t\tresolver: zodResolver(formSchema),\n\t\tdefaultValues: DEFAULT_VALUES,\n\t});\n\n\t// Sync form data with limit-to-edit data\n\tuseEffect(() => {\n\t\tif (limitToUpdate) {\n\t\t\tconst { active, name, limit, slot_decay_per_second, active_slots } =\n\t\t\t\tlimitToUpdate;\n\t\t\tform.reset({ active, name, limit, slot_decay_per_second, active_slots });\n\t\t} else {\n\t\t\tform.reset(DEFAULT_VALUES);\n\t\t}\n\t}, [form, limitToUpdate]);\n\n\tconst saveOrUpdate = (values: z.infer<typeof formSchema>) => {\n\t\tconst onSettled = () => {\n\t\t\tform.reset(DEFAULT_VALUES);\n\t\t\tonSubmit();\n\t\t};\n\n\t\tif (limitToUpdate?.id) {\n\t\t\tupdateGlobalConcurrencyLimit(\n\t\t\t\t{\n\t\t\t\t\tid_or_name: limitToUpdate.id,\n\t\t\t\t\t...values,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tonSuccess: () => {\n\t\t\t\t\t\ttoast.success(\"Limit updated\");\n\t\t\t\t\t},\n\t\t\t\t\tonError: (error) => {\n\t\t\t\t\t\tconst message =\n\t\t\t\t\t\t\terror.message || \"Unknown error while updating limit.\";\n\t\t\t\t\t\tform.setError(\"root\", { message });\n\t\t\t\t\t},\n\t\t\t\t\tonSettled,\n\t\t\t\t},\n\t\t\t);\n\t\t} else {\n\t\t\tcreateGlobalConcurrencyLimit(values, {\n\t\t\t\tonSuccess: () => {\n\t\t\t\t\ttoast.success(\"Limit created\");\n\t\t\t\t},\n\t\t\t\tonError: (error) => {\n\t\t\t\t\tconst message =\n\t\t\t\t\t\terror.message || \"Unknown error while creating variable.\";\n\t\t\t\t\tform.setError(\"root\", {\n\t\t\t\t\t\tmessage,\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tonSettled,\n\t\t\t});\n\t\t}\n\t};\n\n\treturn {\n\t\tform,\n\t\tsaveOrUpdate,\n\t\tisLoading: createStatus === \"pending\" || updateStatus === \"pending\",\n\t};\n};\n","import type { GlobalConcurrencyLimit } from \"@/api/global-concurrency-limits\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Switch } from \"@/components/ui/switch\";\n\nimport { useCreateOrEditGlobalConcurrencyLimitForm } from \"./use-create-or-edit-global-concurrency-limit-form\";\n\ntype GlobalConcurrencyLimitsCreateOrEditDialogProps = {\n\tlimitToUpdate?: GlobalConcurrencyLimit;\n\tonOpenChange: (open: boolean) => void;\n\tonSubmit: () => void;\n};\n\nexport const GlobalConcurrencyLimitsCreateOrEditDialog = ({\n\tlimitToUpdate,\n\tonOpenChange,\n\tonSubmit,\n}: GlobalConcurrencyLimitsCreateOrEditDialogProps) => {\n\tconst { form, isLoading, saveOrUpdate } =\n\t\tuseCreateOrEditGlobalConcurrencyLimitForm({\n\t\t\tlimitToUpdate,\n\t\t\tonSubmit,\n\t\t});\n\n\tconst dialogTitle = limitToUpdate\n\t\t? `Update ${limitToUpdate.name}`\n\t\t: \"Add Concurrency Limit\";\n\n\treturn (\n\t\t<Dialog open onOpenChange={onOpenChange}>\n\t\t\t<DialogContent aria-describedby={undefined}>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>{dialogTitle}</DialogTitle>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={(e) => void form.handleSubmit(saveOrUpdate)(e)}\n\t\t\t\t\t\tclassName=\"space-y-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormMessage>{form.formState.errors.root?.message}</FormMessage>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input type=\"text\" autoComplete=\"off\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"limit\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Concurrency Limit</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input type=\"number\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"slot_decay_per_second\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Slot Decay Per Second</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input type=\"number\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{limitToUpdate && (\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"active_slots\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Active Slots</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input type=\"number\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"active\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Active</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"block\"\n\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t\t\t\t<Button variant=\"outline\">Close</Button>\n\t\t\t\t\t\t\t</DialogTrigger>\n\t\t\t\t\t\t\t<Button type=\"submit\" loading={isLoading}>\n\t\t\t\t\t\t\t\t{limitToUpdate ? \"Update\" : \"Save\"}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n","import { toast } from \"sonner\";\nimport {\n\ttype GlobalConcurrencyLimit,\n\tuseDeleteGlobalConcurrencyLimit,\n} from \"@/api/global-concurrency-limits\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\n\ntype GlobalConcurrencyLimitsDeleteDialogProps = {\n\tlimit: GlobalConcurrencyLimit;\n\tonOpenChange: (open: boolean) => void;\n\tonDelete: () => void;\n};\n\nexport const GlobalConcurrencyLimitsDeleteDialog = ({\n\tlimit,\n\tonOpenChange,\n\tonDelete,\n}: GlobalConcurrencyLimitsDeleteDialogProps) => {\n\tconst { deleteGlobalConcurrencyLimit, isPending } =\n\t\tuseDeleteGlobalConcurrencyLimit();\n\n\tconst handleOnClick = (id: string) => {\n\t\tdeleteGlobalConcurrencyLimit(id, {\n\t\t\tonSuccess: () => {\n\t\t\t\ttoast.success(\"Concurrency limit deleted\");\n\t\t\t},\n\t\t\tonError: (error) => {\n\t\t\t\tconst message =\n\t\t\t\t\terror.message || \"Unknown error while deleting concurrency limit.\";\n\t\t\t\tconsole.error(message);\n\t\t\t},\n\t\t\tonSettled: onDelete,\n\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open onOpenChange={onOpenChange}>\n\t\t\t<DialogContent>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Delete Concurrency Limit</DialogTitle>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<DialogDescription>\n\t\t\t\t\tAre you sure you want to delete {limit.name}\n\t\t\t\t</DialogDescription>\n\t\t\t\t<DialogFooter>\n\t\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t\t<Button variant=\"outline\">Close</Button>\n\t\t\t\t\t</DialogTrigger>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\tonClick={() => handleOnClick(limit.id)}\n\t\t\t\t\t\tloading={isPending}\n\t\t\t\t\t>\n\t\t\t\t\t\tDelete\n\t\t\t\t\t</Button>\n\t\t\t\t</DialogFooter>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n","import type { GlobalConcurrencyLimit } from \"@/api/global-concurrency-limits\";\n\nimport { GlobalConcurrencyLimitsCreateOrEditDialog } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-create-or-edit-dialog\";\nimport { GlobalConcurrencyLimitsDeleteDialog } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-delete-dialog\";\n\nexport type DialogState =\n\t| { dialog: null | \"create\"; data: undefined }\n\t| {\n\t\t\tdialog: \"delete\" | \"edit\";\n\t\t\tdata: GlobalConcurrencyLimit;\n\t };\n\nexport const GlobalConcurrencyLimitsDialog = ({\n\topenDialog,\n\tonCloseDialog,\n\tonOpenChange,\n}: {\n\topenDialog: DialogState;\n\tonOpenChange: (open: boolean) => void;\n\tonCloseDialog: () => void;\n}) => {\n\tconst { dialog, data } = openDialog;\n\tswitch (dialog) {\n\t\tcase \"create\":\n\t\t\treturn (\n\t\t\t\t<GlobalConcurrencyLimitsCreateOrEditDialog\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tonSubmit={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"delete\":\n\t\t\treturn (\n\t\t\t\t<GlobalConcurrencyLimitsDeleteDialog\n\t\t\t\t\tlimit={data}\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tonDelete={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"edit\":\n\t\t\treturn (\n\t\t\t\t<GlobalConcurrencyLimitsCreateOrEditDialog\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tlimitToUpdate={data}\n\t\t\t\t\tonSubmit={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tdefault:\n\t\t\treturn null;\n\t}\n};\n","import { useState } from \"react\";\nimport {\n\ttype GlobalConcurrencyLimit,\n\tuseListGlobalConcurrencyLimits,\n} from \"@/api/global-concurrency-limits\";\n\nimport { GlobalConcurrencyLimitsDataTable } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table\";\nimport { GlobalConcurrencyLimitsEmptyState } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-empty-state\";\nimport { GlobalConcurrencyLimitsHeader } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-header\";\n\nimport {\n\ttype DialogState,\n\tGlobalConcurrencyLimitsDialog,\n} from \"./global-conccurency-limits-dialog\";\n\nexport const GlobalConcurrencyLimitsView = () => {\n\tconst [openDialog, setOpenDialog] = useState<DialogState>({\n\t\tdialog: null,\n\t\tdata: undefined,\n\t});\n\n\tconst { data } = useListGlobalConcurrencyLimits();\n\n\tconst handleAddRow = () =>\n\t\tsetOpenDialog({ dialog: \"create\", data: undefined });\n\n\tconst handleEditRow = (data: GlobalConcurrencyLimit) =>\n\t\tsetOpenDialog({ dialog: \"edit\", data });\n\n\tconst handleDeleteRow = (data: GlobalConcurrencyLimit) =>\n\t\tsetOpenDialog({ dialog: \"delete\", data });\n\n\tconst handleCloseDialog = () =>\n\t\tsetOpenDialog({ dialog: null, data: undefined });\n\n\t// Because all modals will be rendered, only control the closing logic\n\tconst handleOpenChange = (open: boolean) => {\n\t\tif (!open) {\n\t\t\thandleCloseDialog();\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<GlobalConcurrencyLimitsHeader onAdd={handleAddRow} />\n\t\t\t{data.length === 0 ? (\n\t\t\t\t<GlobalConcurrencyLimitsEmptyState onAdd={handleAddRow} />\n\t\t\t) : (\n\t\t\t\t<GlobalConcurrencyLimitsDataTable\n\t\t\t\t\tdata={data}\n\t\t\t\t\tonEditRow={handleEditRow}\n\t\t\t\t\tonDeleteRow={handleDeleteRow}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<GlobalConcurrencyLimitsDialog\n\t\t\t\topenDialog={openDialog}\n\t\t\t\tonCloseDialog={handleCloseDialog}\n\t\t\t\tonOpenChange={handleOpenChange}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n","import type { CellContext } from \"@tanstack/react-table\";\nimport type { TaskRunConcurrencyLimit } from \"@/api/task-run-concurrency-limits\";\n\ntype ActiveTaskRunCellsProps = CellContext<\n\tTaskRunConcurrencyLimit,\n\tArray<string>\n>;\n\nexport const ActiveTaskRunCells = (props: ActiveTaskRunCellsProps) => {\n\tconst activeTaskRuns = props.getValue();\n\tconst numActiveTaskRuns = activeTaskRuns.length;\n\tif (numActiveTaskRuns === 0) {\n\t\treturn \"None\";\n\t}\n\treturn numActiveTaskRuns;\n};\n","import { Link } from \"@tanstack/react-router\";\nimport type { CellContext } from \"@tanstack/react-table\";\nimport type { TaskRunConcurrencyLimit } from \"@/api/task-run-concurrency-limits\";\n\ntype TagCellProps = CellContext<TaskRunConcurrencyLimit, string>;\n\nexport const TagCell = (props: TagCellProps) => {\n\tconst tag = props.getValue();\n\tconst id = props.row.original.id;\n\treturn (\n\t\t<Link params={{ id }} to={\"/concurrency-limits/concurrency-limit/$id\"}>\n\t\t\t{tag}\n\t\t</Link>\n\t);\n};\n","import { getRouteApi } from \"@tanstack/react-router\";\nimport {\n\tcreateColumnHelper,\n\tgetCoreRowModel,\n\tgetPaginationRowModel,\n\tuseReactTable,\n} from \"@tanstack/react-table\";\nimport { useDeferredValue, useMemo } from \"react\";\nimport type { TaskRunConcurrencyLimit } from \"@/api/task-run-concurrency-limits\";\nimport { TaskRunConcurrencyLimitsActionsMenu } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-actions-menu\";\nimport { DataTable } from \"@/components/ui/data-table\";\nimport { SearchInput } from \"@/components/ui/input\";\n\nimport { ActiveTaskRunCells } from \"./active-task-runs-cell\";\nimport { TagCell } from \"./tag-cell\";\n\nconst routeApi = getRouteApi(\"/concurrency-limits/\");\nconst columnHelper = createColumnHelper<TaskRunConcurrencyLimit>();\n\nconst createColumns = ({\n\tonDeleteRow,\n\tonResetRow,\n}: {\n\tonDeleteRow: (row: TaskRunConcurrencyLimit) => void;\n\tonResetRow: (row: TaskRunConcurrencyLimit) => void;\n}) => [\n\tcolumnHelper.accessor(\"tag\", {\n\t\theader: \"Tag\",\n\t\tcell: TagCell,\n\t}),\n\tcolumnHelper.accessor(\"concurrency_limit\", {\n\t\theader: \"Slots\",\n\t}),\n\tcolumnHelper.accessor(\"active_slots\", {\n\t\theader: \"Active Task Runs\",\n\t\tcell: ActiveTaskRunCells,\n\t}),\n\tcolumnHelper.display({\n\t\tid: \"actions\",\n\t\tcell: (props) => {\n\t\t\tconst row = props.row.original;\n\t\t\treturn (\n\t\t\t\t<div className=\"flex flex-row justify-end\">\n\t\t\t\t\t<TaskRunConcurrencyLimitsActionsMenu\n\t\t\t\t\t\tid={row.id}\n\t\t\t\t\t\tonDelete={() => onDeleteRow(row)}\n\t\t\t\t\t\tonReset={() => onResetRow(row)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t}),\n];\n\ntype TaskRunConcurrencyLimitsDataTableProps = {\n\tdata: Array<TaskRunConcurrencyLimit>;\n\tonDeleteRow: (row: TaskRunConcurrencyLimit) => void;\n\tonResetRow: (row: TaskRunConcurrencyLimit) => void;\n};\n\nexport const TaskRunConcurrencyLimitsDataTable = ({\n\tdata,\n\tonDeleteRow,\n\tonResetRow,\n}: TaskRunConcurrencyLimitsDataTableProps) => {\n\tconst navigate = routeApi.useNavigate();\n\tconst { search } = routeApi.useSearch();\n\tconst deferredSearch = useDeferredValue(search ?? \"\");\n\n\tconst filteredData = useMemo(() => {\n\t\treturn data.filter((row) =>\n\t\t\trow.tag.toLowerCase().includes(deferredSearch.toLowerCase()),\n\t\t);\n\t}, [data, deferredSearch]);\n\n\treturn (\n\t\t<Table\n\t\t\tdata={filteredData}\n\t\t\tonDeleteRow={onDeleteRow}\n\t\t\tonResetRow={onResetRow}\n\t\t\tsearchValue={search}\n\t\t\tonSearchChange={(value) =>\n\t\t\t\tvoid navigate({\n\t\t\t\t\tto: \".\",\n\t\t\t\t\tsearch: (prev) => ({ ...prev, search: value }),\n\t\t\t\t})\n\t\t\t}\n\t\t/>\n\t);\n};\n\ntype TableProps = {\n\tdata: Array<TaskRunConcurrencyLimit>;\n\tonDeleteRow: (row: TaskRunConcurrencyLimit) => void;\n\tonResetRow: (row: TaskRunConcurrencyLimit) => void;\n\tonSearchChange: (value: string) => void;\n\tsearchValue: string | undefined;\n};\n\nexport function Table({\n\tdata,\n\tonDeleteRow,\n\tonResetRow,\n\tonSearchChange,\n\tsearchValue,\n}: TableProps) {\n\tconst table = useReactTable({\n\t\tdata,\n\t\tcolumns: createColumns({ onDeleteRow, onResetRow }),\n\t\tgetCoreRowModel: getCoreRowModel(),\n\t\tgetPaginationRowModel: getPaginationRowModel(), //load client-side pagination code\n\t});\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<SearchInput\n\t\t\t\tclassName=\"max-w-72\"\n\t\t\t\tplaceholder=\"Search active task limit\"\n\t\t\t\tvalue={searchValue}\n\t\t\t\tonChange={(e) => onSearchChange(e.target.value)}\n\t\t\t/>\n\t\t\t<DataTable table={table} />\n\t\t</div>\n\t);\n}\n","import { Button } from \"@/components/ui/button\";\nimport { DocsLink } from \"@/components/ui/docs-link\";\nimport {\n\tEmptyState,\n\tEmptyStateActions,\n\tEmptyStateDescription,\n\tEmptyStateIcon,\n\tEmptyStateTitle,\n} from \"@/components/ui/empty-state\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype TaskRunConcurrencyLimitsEmptyStateProps = {\n\tonAdd: () => void;\n};\nexport const TaskRunConcurrencyLimitsEmptyState = ({\n\tonAdd,\n}: TaskRunConcurrencyLimitsEmptyStateProps) => (\n\t<EmptyState>\n\t\t<EmptyStateIcon id=\"CircleArrowOutUpRight\" />\n\t\t<EmptyStateTitle>\n\t\t\tAdd a concurrency limit for your task runs\n\t\t</EmptyStateTitle>\n\t\t<EmptyStateDescription>\n\t\t\tCreating a limit allows you to limit the number of tasks running\n\t\t\tsimultaneously with a given tag.\n\t\t</EmptyStateDescription>\n\t\t<EmptyStateActions>\n\t\t\t<Button onClick={onAdd}>\n\t\t\t\tAdd Concurrency Limit <Icon id=\"Plus\" className=\"size-4 ml-2\" />\n\t\t\t</Button>\n\t\t\t<DocsLink id=\"task-concurrency-guide\" />\n\t\t</EmptyStateActions>\n\t</EmptyState>\n);\n","import {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbList,\n} from \"@/components/ui/breadcrumb\";\nimport { Button } from \"@/components/ui/button\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype TaskRunConcurrencyLimitsHeaderProps = {\n\tonAdd: () => void;\n};\n\nexport const TaskRunConcurrencyLimitsHeader = ({\n\tonAdd,\n}: TaskRunConcurrencyLimitsHeaderProps) => {\n\treturn (\n\t\t<div className=\"flex items-center gap-2\">\n\t\t\t<Breadcrumb>\n\t\t\t\t<BreadcrumbList>\n\t\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t\tTask Run Concurrency Limits\n\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t</BreadcrumbList>\n\t\t\t</Breadcrumb>\n\t\t\t<Button\n\t\t\t\tonClick={onAdd}\n\t\t\t\tsize=\"icon\"\n\t\t\t\tclassName=\"size-7\"\n\t\t\t\tvariant=\"outline\"\n\t\t\t\taria-label=\"add task run concurrency limit\"\n\t\t\t>\n\t\t\t\t<Icon id=\"Plus\" className=\"size-4\" />\n\t\t\t</Button>\n\t\t</div>\n\t);\n};\n","import { zodResolver } from \"@hookform/resolvers/zod\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { useCreateTaskRunConcurrencyLimit } from \"@/api/task-run-concurrency-limits\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\n\nconst formSchema = z.object({\n\ttag: z.string().min(1),\n\t/** Coerce to solve common issue of transforming a string number to a number type */\n\tconcurrency_limit: z\n\t\t.number()\n\t\t.default(0)\n\t\t.or(z.string())\n\t\t.pipe(z.coerce.number()),\n});\n\nconst DEFAULT_VALUES = {\n\ttag: \"\",\n\tconcurrency_limit: 0,\n} as const;\n\ntype TaskRunConcurrencyLimitsCreateDialogProps = {\n\tonOpenChange: (open: boolean) => void;\n\tonSubmit: () => void;\n};\n\nexport const TaskRunConcurrencyLimitsCreateDialog = ({\n\tonOpenChange,\n\tonSubmit,\n}: TaskRunConcurrencyLimitsCreateDialogProps) => {\n\tconst { createTaskRunConcurrencyLimit, isPending } =\n\t\tuseCreateTaskRunConcurrencyLimit();\n\n\tconst form = useForm({\n\t\tresolver: zodResolver(formSchema),\n\t\tdefaultValues: DEFAULT_VALUES,\n\t});\n\n\tconst handleAddLimit = (values: z.infer<typeof formSchema>) => {\n\t\tcreateTaskRunConcurrencyLimit(values, {\n\t\t\tonSuccess: () => {\n\t\t\t\ttoast.success(\"Concurrency limit added\");\n\t\t\t},\n\t\t\tonError: (error) => {\n\t\t\t\tconst message = error.message || \"Unknown error while updating limit.\";\n\t\t\t\tform.setError(\"root\", { message });\n\t\t\t},\n\t\t\tonSettled: () => {\n\t\t\t\tform.reset(DEFAULT_VALUES);\n\t\t\t\tonSubmit();\n\t\t\t},\n\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open onOpenChange={onOpenChange}>\n\t\t\t<DialogContent aria-describedby={undefined}>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Add Task Run Concurrency Limit</DialogTitle>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={(e) => void form.handleSubmit(handleAddLimit)(e)}\n\t\t\t\t\t\tclassName=\"space-y-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormMessage>{form.formState.errors.root?.message}</FormMessage>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"tag\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Tag</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input type=\"text\" autoComplete=\"off\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"concurrency_limit\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Concurrency Limit</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input type=\"number\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t\t\t\t<Button variant=\"outline\">Close</Button>\n\t\t\t\t\t\t\t</DialogTrigger>\n\t\t\t\t\t\t\t<Button type=\"submit\" loading={isPending}>\n\t\t\t\t\t\t\t\tAdd\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n","import type { TaskRunConcurrencyLimit } from \"@/api/task-run-concurrency-limits\";\nimport { TaskRunConcurrencyLimitsCreateDialog } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-create-dialog\";\nimport { TaskRunConcurrencyLimitsDeleteDialog } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-delete-dialog\";\nimport { TaskRunConcurrencyLimitsResetDialog } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-reset-dialog\";\n\nexport type DialogState =\n\t| { dialog: null | \"create\"; data: undefined }\n\t| {\n\t\t\tdialog: \"reset\" | \"delete\";\n\t\t\tdata: TaskRunConcurrencyLimit;\n\t };\n\nexport const TaskRunConcurrencyLimitDialog = ({\n\topenDialog,\n\tonCloseDialog,\n\tonOpenChange,\n}: {\n\topenDialog: DialogState;\n\tonOpenChange: (open: boolean) => void;\n\tonCloseDialog: () => void;\n}) => {\n\tconst { dialog, data } = openDialog;\n\tswitch (dialog) {\n\t\tcase \"create\":\n\t\t\treturn (\n\t\t\t\t<TaskRunConcurrencyLimitsCreateDialog\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tonSubmit={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"reset\":\n\t\t\treturn (\n\t\t\t\t<TaskRunConcurrencyLimitsResetDialog\n\t\t\t\t\tdata={data}\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tonReset={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"delete\":\n\t\t\treturn (\n\t\t\t\t<TaskRunConcurrencyLimitsDeleteDialog\n\t\t\t\t\tdata={data}\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tonDelete={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tdefault:\n\t\t\treturn null;\n\t}\n};\n","import { useState } from \"react\";\nimport {\n\ttype TaskRunConcurrencyLimit,\n\tuseListTaskRunConcurrencyLimits,\n} from \"@/api/task-run-concurrency-limits\";\n\nimport { TaskRunConcurrencyLimitsDataTable } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table\";\nimport { TaskRunConcurrencyLimitsEmptyState } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-empty-state\";\nimport { TaskRunConcurrencyLimitsHeader } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-header\";\nimport {\n\ttype DialogState,\n\tTaskRunConcurrencyLimitDialog,\n} from \"./task-run-concurrency-limit-dialog\";\n\nexport const TaskRunConcurrencyLimitsView = () => {\n\tconst [openDialog, setOpenDialog] = useState<DialogState>({\n\t\tdialog: null,\n\t\tdata: undefined,\n\t});\n\n\tconst { data } = useListTaskRunConcurrencyLimits();\n\n\tconst handleAddRow = () =>\n\t\tsetOpenDialog({ dialog: \"create\", data: undefined });\n\n\tconst handleDeleteRow = (data: TaskRunConcurrencyLimit) =>\n\t\tsetOpenDialog({ dialog: \"delete\", data });\n\n\tconst handleResetRow = (data: TaskRunConcurrencyLimit) =>\n\t\tsetOpenDialog({ dialog: \"reset\", data });\n\n\tconst handleCloseDialog = () =>\n\t\tsetOpenDialog({ dialog: null, data: undefined });\n\n\t// Because all modals will be rendered, only control the closing logic\n\tconst handleOpenChange = (open: boolean) => {\n\t\tif (!open) {\n\t\t\thandleCloseDialog();\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<TaskRunConcurrencyLimitsHeader onAdd={handleAddRow} />\n\t\t\t{data.length === 0 ? (\n\t\t\t\t<TaskRunConcurrencyLimitsEmptyState onAdd={handleAddRow} />\n\t\t\t) : (\n\t\t\t\t<TaskRunConcurrencyLimitsDataTable\n\t\t\t\t\tdata={data}\n\t\t\t\t\tonDeleteRow={handleDeleteRow}\n\t\t\t\t\tonResetRow={handleResetRow}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<TaskRunConcurrencyLimitDialog\n\t\t\t\topenDialog={openDialog}\n\t\t\t\tonCloseDialog={handleCloseDialog}\n\t\t\t\tonOpenChange={handleOpenChange}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n","import { getRouteApi } from \"@tanstack/react-router\";\nimport type { JSX } from \"react\";\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@/components/ui/tabs\";\nimport type { TabOptions } from \"@/routes/concurrency-limits\";\n\nconst routeApi = getRouteApi(\"/concurrency-limits/\");\n\ntype TabOptionValues = {\n\t/** Value of search value in url */\n\ttabSearchValue: TabOptions;\n\t/** Display value for the UI */\n\tdisplayValue: string;\n};\n\n/** Maps url tab option to visual name */\nconst TAB_OPTIONS: Record<TabOptions, TabOptionValues> = {\n\tglobal: {\n\t\ttabSearchValue: \"global\",\n\t\tdisplayValue: \"Global\",\n\t},\n\t\"task-run\": {\n\t\ttabSearchValue: \"task-run\",\n\t\tdisplayValue: \"Task Run\",\n\t},\n} as const;\n\ntype ConcurrencyLimitsTabsProps = {\n\tglobalView: React.ReactNode;\n\ttaskRunView: React.ReactNode;\n};\n\n// TODO: Move Tabs for navigation to a generic styled component\n\nexport const ConcurrencyLimitsTabs = ({\n\tglobalView,\n\ttaskRunView,\n}: ConcurrencyLimitsTabsProps): JSX.Element => {\n\tconst { tab } = routeApi.useSearch();\n\tconst navigate = routeApi.useNavigate();\n\n\treturn (\n\t\t<Tabs defaultValue=\"Global\" value={tab}>\n\t\t\t<TabsList>\n\t\t\t\t<TabsTrigger\n\t\t\t\t\tvalue={TAB_OPTIONS.global.tabSearchValue}\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tvoid navigate({\n\t\t\t\t\t\t\tto: \"/concurrency-limits\",\n\t\t\t\t\t\t\tsearch: {\n\t\t\t\t\t\t\t\ttab: TAB_OPTIONS.global.tabSearchValue,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{TAB_OPTIONS.global.displayValue}\n\t\t\t\t</TabsTrigger>\n\t\t\t\t<TabsTrigger\n\t\t\t\t\tvalue={TAB_OPTIONS[\"task-run\"].tabSearchValue}\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tvoid navigate({\n\t\t\t\t\t\t\tto: \"/concurrency-limits\",\n\t\t\t\t\t\t\tsearch: {\n\t\t\t\t\t\t\t\ttab: TAB_OPTIONS[\"task-run\"].tabSearchValue,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{TAB_OPTIONS[\"task-run\"].displayValue}\n\t\t\t\t</TabsTrigger>\n\t\t\t</TabsList>\n\t\t\t<TabsContent value={TAB_OPTIONS.global.tabSearchValue}>\n\t\t\t\t{globalView}\n\t\t\t</TabsContent>\n\t\t\t<TabsContent value={TAB_OPTIONS[\"task-run\"].tabSearchValue}>\n\t\t\t\t{taskRunView}\n\t\t\t</TabsContent>\n\t\t</Tabs>\n\t);\n};\n","import { GlobalConcurrencyLimitsView } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-view\";\nimport { TaskRunConcurrencyLimitsView } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-view\";\nimport {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbList,\n} from \"@/components/ui/breadcrumb\";\n\nimport { ConcurrencyLimitsTabs } from \"./concurrency-limits-tabs\";\n\nexport const ConcurrencyLimitsPage = () => {\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<ConcurrencyLimitTitle />\n\t\t\t<ConcurrencyLimitsTabs\n\t\t\t\tglobalView={<GlobalConcurrencyLimitsView />}\n\t\t\t\ttaskRunView={<TaskRunConcurrencyLimitsView />}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n\nconst ConcurrencyLimitTitle = () => (\n\t<div className=\"flex items-center gap-2\">\n\t\t<Breadcrumb>\n\t\t\t<BreadcrumbList>\n\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\tConcurrency\n\t\t\t\t</BreadcrumbItem>\n\t\t\t</BreadcrumbList>\n\t\t</Breadcrumb>\n\t</div>\n);\n","import { createFileRoute } from \"@tanstack/react-router\";\nimport { zodValidator } from \"@tanstack/zod-adapter\";\nimport { z } from \"zod\";\nimport { buildListGlobalConcurrencyLimitsQuery } from \"@/api/global-concurrency-limits\";\nimport { buildListTaskRunConcurrencyLimitsQuery } from \"@/api/task-run-concurrency-limits\";\nimport { ConcurrencyLimitsPage } from \"@/components/concurrency/concurrency-limits-page\";\nimport { PrefectLoading } from \"@/components/ui/loading\";\n\n/**\n * Schema for validating URL search parameters for the Concurrency Limits page.\n * @property {string} search used to filter data table\n * @property {'global' | 'task-run'} tab used designate which tab view to display\n */\nconst searchParams = z.object({\n\tsearch: z.string().optional(),\n\ttab: z.enum([\"global\", \"task-run\"]).default(\"global\"),\n});\n\nexport type TabOptions = z.infer<typeof searchParams>[\"tab\"];\n\nexport const Route = createFileRoute(\"/concurrency-limits/\")({\n\tvalidateSearch: zodValidator(searchParams),\n\tcomponent: ConcurrencyLimitsPage,\n\twrapInSuspense: true,\n\tpendingComponent: PrefectLoading,\n\tloader: ({ context }) =>\n\t\tPromise.all([\n\t\t\tcontext.queryClient.ensureQueryData(\n\t\t\t\tbuildListGlobalConcurrencyLimitsQuery(),\n\t\t\t),\n\t\t\tcontext.queryClient.ensureQueryData(\n\t\t\t\tbuildListTaskRunConcurrencyLimitsQuery(),\n\t\t\t),\n\t\t]),\n});\n"],"names":["ActionsCell","onEditRow","onDeleteRow","props","handleCopyId","id","toast","row","DropdownMenu","jsx","DropdownMenuTrigger","jsxs","Button","Icon","DropdownMenuContent","DropdownMenuLabel","DropdownMenuItem","ActiveCell","updateGlobalConcurrencyLimit","useUpdateGlobalConcurrencyLimit","handleCheckedChange","checked","error","message","rowActive","rowId","Switch","routeApi","getRouteApi","columnHelper","createColumnHelper","createColumns","GlobalConcurrencyLimitsDataTable","data","navigate","search","deferredSearch","useDeferredValue","filteredData","useMemo","Table","value","prev","onSearchChange","searchValue","table","useReactTable","getCoreRowModel","getPaginationRowModel","SearchInput","e","DataTable","GlobalConcurrencyLimitsEmptyState","onAdd","EmptyState","EmptyStateIcon","EmptyStateTitle","EmptyStateDescription","EmptyStateActions","DocsLink","GlobalConcurrencyLimitsHeader","Breadcrumb","BreadcrumbList","BreadcrumbItem","formSchema","z.object","z.boolean","z.number","z.string","z.coerce","DEFAULT_VALUES","useCreateOrEditGlobalConcurrencyLimitForm","limitToUpdate","onSubmit","createGlobalConcurrencyLimit","createStatus","useCreateGlobalConcurrencyLimit","updateStatus","form","useForm","zodResolver","useEffect","active","name","limit","slot_decay_per_second","active_slots","values","onSettled","GlobalConcurrencyLimitsCreateOrEditDialog","onOpenChange","isLoading","saveOrUpdate","dialogTitle","Dialog","DialogContent","DialogHeader","DialogTitle","Form","FormMessage","FormField","field","FormItem","FormLabel","FormControl","Input","DialogFooter","DialogTrigger","GlobalConcurrencyLimitsDeleteDialog","onDelete","deleteGlobalConcurrencyLimit","isPending","useDeleteGlobalConcurrencyLimit","handleOnClick","DialogDescription","GlobalConcurrencyLimitsDialog","openDialog","onCloseDialog","dialog","GlobalConcurrencyLimitsView","setOpenDialog","useState","useListGlobalConcurrencyLimits","handleAddRow","handleEditRow","handleDeleteRow","handleCloseDialog","handleOpenChange","open","ActiveTaskRunCells","numActiveTaskRuns","TagCell","tag","Link","onResetRow","TaskRunConcurrencyLimitsActionsMenu","TaskRunConcurrencyLimitsDataTable","TaskRunConcurrencyLimitsEmptyState","TaskRunConcurrencyLimitsHeader","TaskRunConcurrencyLimitsCreateDialog","createTaskRunConcurrencyLimit","useCreateTaskRunConcurrencyLimit","handleAddLimit","TaskRunConcurrencyLimitDialog","TaskRunConcurrencyLimitsResetDialog","TaskRunConcurrencyLimitsDeleteDialog","TaskRunConcurrencyLimitsView","useListTaskRunConcurrencyLimits","handleResetRow","TAB_OPTIONS","ConcurrencyLimitsTabs","globalView","taskRunView","tab","Tabs","TabsList","TabsTrigger","TabsContent","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AAAE,EACF,QACCM,EAAA,CAAY,MAAOR,EAAY,UAAU,EAAE,eAC1C,SAAAG,CAAA,CACF,CAAA,EACD,CAEF,ECpEaM,GAAwB,IAEnCnJ,EAAAA,KAAC,MAAA,CAAI,UAAU,sBACd,SAAA,CAAAF,EAAAA,IAACsJ,GAAA,EAAsB,EACvBtJ,EAAAA,IAAC6I,GAAA,CACA,iBAAa/B,GAAA,EAA4B,EACzC,kBAAc2B,GAAA,CAAA,CAA6B,CAAA,CAAA,CAC5C,EACD,EAIIa,GAAwB,IAC7BtJ,EAAAA,IAAC,MAAA,CAAI,UAAU,0BACd,SAAAA,EAAAA,IAACoD,EAAA,CACA,SAAApD,EAAAA,IAACqD,EAAA,CACA,eAACC,EAAA,CAAe,UAAU,wBAAwB,SAAA,aAAA,CAElD,EACD,EACD,CAAA,CACD,EClBoBiG,EAAS,CAC7B7H,OAAQ6H,EAAEC,EAASC,SAAAA,EACnBT,IAAKO,GAAO,CAAC,SAAU,UAAU,CAAC,EAAEG,QAAQ,QAAQ,CACrD,CAAC,EAE4D,MAAAC,GAbpDN"}
@@ -1,2 +1,2 @@
1
- import{j as o}from"./vendor-tanstack-BdLtprmr.js";import{s}from"./index-V_xTKaEb.js";import{R as i}from"./route-error-state-Cu4m0LTX.js";import{W as m}from"./header-DcIuN5UN.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-radix-CJc458uP.js";import"./vendor-recharts-CY3PKigC.js";import"./vendor-forms-BlFSCfFw.js";import"./vendor-date-Cl1Jav-N.js";function E({error:e,reset:t}){const r=s(e,"Failed to load work pools");if(r.type!=="server-error"&&r.type!=="client-error")throw e;return o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsx(m,{}),o.jsx(i,{error:r,onRetry:t})]})}export{E as errorComponent};
2
- //# sourceMappingURL=index-q5Y3hlDT.js.map
1
+ import{j as o}from"./vendor-tanstack-BdLtprmr.js";import{s}from"./index-CPpeVt8m.js";import{R as i}from"./route-error-state-BqbnZCc-.js";import{W as m}from"./header-BuI436ik.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-radix-CJc458uP.js";import"./vendor-recharts-CY3PKigC.js";import"./vendor-forms-BlFSCfFw.js";import"./vendor-date-Cl1Jav-N.js";function E({error:e,reset:t}){const r=s(e,"Failed to load work pools");if(r.type!=="server-error"&&r.type!=="client-error")throw e;return o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsx(m,{}),o.jsx(i,{error:r,onRetry:t})]})}export{E as errorComponent};
2
+ //# sourceMappingURL=index-mYcm9Rkr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-mYcm9Rkr.js","sources":["../../src/routes/work-pools/index.tsx?tsr-split=errorComponent"],"sourcesContent":["import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport type { ErrorComponentProps } from \"@tanstack/react-router\";\nimport { createFileRoute } from \"@tanstack/react-router\";\nimport { useMemo, useState } from \"react\";\nimport { categorizeError } from \"@/api/error-utils\";\nimport {\n\tbuildCountWorkPoolsQuery,\n\tbuildFilterWorkPoolsQuery,\n} from \"@/api/work-pools\";\nimport { SearchInput } from \"@/components/ui/input\";\nimport { PrefectLoading } from \"@/components/ui/loading\";\nimport { RouteErrorState } from \"@/components/ui/route-error-state\";\nimport { WorkPoolsEmptyState } from \"@/components/work-pools/empty-state\";\nimport { WorkPoolsPageHeader } from \"@/components/work-pools/header\";\nimport { WorkPoolCard } from \"@/components/work-pools/work-pool-card/work-pool-card\";\nimport { pluralize } from \"@/utils\";\n\nfunction WorkPoolsErrorComponent({ error, reset }: ErrorComponentProps) {\n\tconst serverError = categorizeError(error, \"Failed to load work pools\");\n\n\t// Only handle API errors (server-error, client-error) at route level\n\t// Let network errors and unknown errors bubble up to root error component\n\tif (\n\t\tserverError.type !== \"server-error\" &&\n\t\tserverError.type !== \"client-error\"\n\t) {\n\t\tthrow error;\n\t}\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<WorkPoolsPageHeader />\n\t\t\t<RouteErrorState error={serverError} onRetry={reset} />\n\t\t</div>\n\t);\n}\n\nexport const Route = createFileRoute(\"/work-pools/\")({\n\tcomponent: RouteComponent,\n\terrorComponent: WorkPoolsErrorComponent,\n\tloader: ({ context }) => {\n\t\tvoid context.queryClient.ensureQueryData(buildCountWorkPoolsQuery());\n\t\tvoid context.queryClient.ensureQueryData(\n\t\t\tbuildFilterWorkPoolsQuery({\n\t\t\t\tlimit: 200,\n\t\t\t\toffset: 0,\n\t\t\t}),\n\t\t);\n\t},\n\twrapInSuspense: true,\n\tpendingComponent: PrefectLoading,\n});\n\nfunction RouteComponent() {\n\tconst [searchTerm, setSearchTerm] = useState(\"\");\n\n\tconst { data: workPoolCount = 0 } = useSuspenseQuery(\n\t\tbuildCountWorkPoolsQuery(),\n\t);\n\n\tconst { data: workPools = [] } = useSuspenseQuery(\n\t\tbuildFilterWorkPoolsQuery({\n\t\t\tlimit: 200,\n\t\t\toffset: 0,\n\t\t}),\n\t);\n\n\tconst filteredWorkPools = useMemo(() => {\n\t\treturn workPools.filter((workPool) =>\n\t\t\t[\n\t\t\t\tworkPool.name,\n\t\t\t\tworkPool.description,\n\t\t\t\tworkPool.type,\n\t\t\t\tJSON.stringify(workPool.base_job_template),\n\t\t\t\tworkPool.id,\n\t\t\t\tworkPool.default_queue_id,\n\t\t\t\tworkPool.status,\n\t\t\t]\n\t\t\t\t.join(\" \")\n\t\t\t\t.toLowerCase()\n\t\t\t\t.includes(searchTerm.toLowerCase()),\n\t\t);\n\t}, [workPools, searchTerm]);\n\n\tconst handleSearchChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n\t\tsetSearchTerm(event.target.value);\n\t};\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<WorkPoolsPageHeader />\n\t\t\t{workPoolCount < 1 ? (\n\t\t\t\t<WorkPoolsEmptyState />\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<div className=\"flex items-end justify-between\">\n\t\t\t\t\t\t<div className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t{workPoolCount} {pluralize(workPoolCount, \"work pool\")}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t<SearchInput\n\t\t\t\t\t\t\t\tplaceholder=\"Search work pools...\"\n\t\t\t\t\t\t\t\tvalue={searchTerm}\n\t\t\t\t\t\t\t\tonChange={handleSearchChange}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t{filteredWorkPools.map((workPool) => (\n\t\t\t\t\t\t\t<WorkPoolCard key={workPool.id} workPool={workPool} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t</>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"names":["WorkPoolsErrorComponent","error","reset","serverError","categorizeError","type","jsxs","jsx","WorkPoolsPageHeader","RouteErrorState"],"mappings":"mWAiBA,SAASA,EAAwB,CAAEC,MAAAA,EAAOC,MAAAA,CAA2B,EAAG,CACvE,MAAMC,EAAcC,EAAgBH,EAAO,2BAA2B,EAItE,GACCE,EAAYE,OAAS,gBACrBF,EAAYE,OAAS,eAErB,MAAMJ,EAGP,OACCK,EAAAA,KAAC,MAAA,CAAI,UAAU,sBACd,SAAA,CAAAC,EAAAA,IAACC,EAAA,EAAmB,EACpBD,EAAAA,IAACE,EAAA,CAAgB,MAAON,EAAa,QAASD,CAAAA,CAAM,CAAA,EACrD,CAEF"}
@@ -1,2 +1,2 @@
1
- import{j as o}from"./vendor-tanstack-BdLtprmr.js";import{s}from"./index-V_xTKaEb.js";import{R as p}from"./route-error-state-Cu4m0LTX.js";import{o as n,e as l,a as m,n as e,s as a}from"./vendor-forms-BlFSCfFw.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-radix-CJc458uP.js";import"./vendor-recharts-CY3PKigC.js";import"./vendor-date-Cl1Jav-N.js";n({name:a().optional(),page:e().int().positive().optional().default(1).catch(1),limit:e().int().positive().max(100).optional().default(10).catch(10),tags:m(a()).optional(),sort:l(["CREATED_DESC","UPDATED_DESC","NAME_ASC","NAME_DESC"]).optional().default("NAME_ASC")}).optional().default({});function h({error:t,reset:i}){const r=s(t,"Failed to load flows");if(r.type!=="server-error"&&r.type!=="client-error")throw t;return o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsx("div",{children:o.jsx("h1",{className:"text-2xl font-semibold",children:"Flows"})}),o.jsx(p,{error:r,onRetry:i})]})}export{h as errorComponent};
2
- //# sourceMappingURL=index-D9cOtoSU.js.map
1
+ import{j as o}from"./vendor-tanstack-BdLtprmr.js";import{s}from"./index-CPpeVt8m.js";import{R as p}from"./route-error-state-BqbnZCc-.js";import{o as n,e as l,a as m,n as e,s as a}from"./vendor-forms-BlFSCfFw.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-radix-CJc458uP.js";import"./vendor-recharts-CY3PKigC.js";import"./vendor-date-Cl1Jav-N.js";n({name:a().optional(),page:e().int().positive().optional().default(1).catch(1),limit:e().int().positive().max(100).optional().default(10).catch(10),tags:m(a()).optional(),sort:l(["CREATED_DESC","UPDATED_DESC","NAME_ASC","NAME_DESC"]).optional().default("NAME_ASC")}).optional().default({});function h({error:t,reset:i}){const r=s(t,"Failed to load flows");if(r.type!=="server-error"&&r.type!=="client-error")throw t;return o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsx("div",{children:o.jsx("h1",{className:"text-2xl font-semibold",children:"Flows"})}),o.jsx(p,{error:r,onRetry:i})]})}export{h as errorComponent};
2
+ //# sourceMappingURL=index-yavn_NBp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-yavn_NBp.js","sources":["../../src/routes/flows/index.tsx?tsr-split=errorComponent"],"sourcesContent":["import {\n\tuseQuery,\n\tuseQueryClient,\n\tuseSuspenseQuery,\n} from \"@tanstack/react-query\";\nimport type { ErrorComponentProps } from \"@tanstack/react-router\";\nimport { createFileRoute } from \"@tanstack/react-router\";\nimport type {\n\tColumnFiltersState,\n\tPaginationState,\n} from \"@tanstack/react-table\";\nimport { zodValidator } from \"@tanstack/zod-adapter\";\nimport { useCallback, useMemo } from \"react\";\nimport { z } from \"zod\";\nimport { categorizeError } from \"@/api/error-utils\";\nimport { buildFilterFlowRunsQuery } from \"@/api/flow-runs\";\nimport {\n\tbuildCountFlowsFilteredQuery,\n\tbuildDeploymentsCountByFlowQuery,\n\tbuildNextRunsByFlowQuery,\n\tbuildPaginateFlowsQuery,\n\ttype FlowsPaginateFilter,\n} from \"@/api/flows\";\nimport FlowsPage from \"@/components/flows/flows-page\";\nimport { PrefectLoading } from \"@/components/ui/loading\";\nimport { RouteErrorState } from \"@/components/ui/route-error-state\";\n\n// Route for /flows/\n\nconst searchParams = z\n\t.object({\n\t\tname: z.string().optional(),\n\t\tpage: z.number().int().positive().optional().default(1).catch(1),\n\t\tlimit: z\n\t\t\t.number()\n\t\t\t.int()\n\t\t\t.positive()\n\t\t\t.max(100)\n\t\t\t.optional()\n\t\t\t.default(10)\n\t\t\t.catch(10),\n\t\ttags: z.array(z.string()).optional(),\n\t\tsort: z\n\t\t\t.enum([\"CREATED_DESC\", \"UPDATED_DESC\", \"NAME_ASC\", \"NAME_DESC\"])\n\t\t\t.optional()\n\t\t\t.default(\"NAME_ASC\"),\n\t})\n\t.optional()\n\t.default({});\n\ntype SearchParams = z.infer<typeof searchParams>;\n\nconst buildPaginationBody = (search?: SearchParams): FlowsPaginateFilter => {\n\tconst hasNameFilter = Boolean(search?.name);\n\tconst hasTagsFilter = Boolean(search?.tags?.length);\n\n\tif (!hasNameFilter && !hasTagsFilter) {\n\t\treturn {\n\t\t\tpage: search?.page ?? 1,\n\t\t\tlimit: search?.limit ?? 10,\n\t\t\tsort: search?.sort ?? \"NAME_ASC\",\n\t\t};\n\t}\n\n\treturn {\n\t\tpage: search?.page ?? 1,\n\t\tlimit: search?.limit ?? 10,\n\t\tsort: search?.sort ?? \"NAME_ASC\",\n\t\tflows: {\n\t\t\toperator: \"and_\",\n\t\t\t...(hasNameFilter && { name: { like_: search?.name } }),\n\t\t\t...(hasTagsFilter && {\n\t\t\t\ttags: { operator: \"and_\", all_: search?.tags },\n\t\t\t}),\n\t\t},\n\t};\n};\n\nconst NUMBER_OF_ACTIVITY_BARS = 16;\n\nfunction FlowsErrorComponent({ error, reset }: ErrorComponentProps) {\n\tconst serverError = categorizeError(error, \"Failed to load flows\");\n\n\t// Only handle API errors (server-error, client-error) at route level\n\t// Let network errors and unknown errors bubble up to root error component\n\tif (\n\t\tserverError.type !== \"server-error\" &&\n\t\tserverError.type !== \"client-error\"\n\t) {\n\t\tthrow error;\n\t}\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<div>\n\t\t\t\t<h1 className=\"text-2xl font-semibold\">Flows</h1>\n\t\t\t</div>\n\t\t\t<RouteErrorState error={serverError} onRetry={reset} />\n\t\t</div>\n\t);\n}\n\nexport const Route = createFileRoute(\"/flows/\")({\n\tvalidateSearch: zodValidator(searchParams),\n\tcomponent: FlowsRoute,\n\terrorComponent: FlowsErrorComponent,\n\tloaderDeps: ({ search }) => buildPaginationBody(search),\n\tloader: ({ deps, context }) => {\n\t\t// Prefetch current page queries without blocking the loader\n\t\tvoid context.queryClient.prefetchQuery(\n\t\t\tbuildPaginateFlowsQuery(deps, 30_000),\n\t\t);\n\t\tvoid context.queryClient.prefetchQuery(\n\t\t\tbuildCountFlowsFilteredQuery({\n\t\t\t\toffset: 0,\n\t\t\t\tsort: deps.sort,\n\t\t\t\tflows: deps.flows ?? undefined,\n\t\t\t}),\n\t\t);\n\t\t// Prefetch total count for empty state check\n\t\tvoid context.queryClient.prefetchQuery(\n\t\t\tbuildCountFlowsFilteredQuery({\n\t\t\t\toffset: 0,\n\t\t\t\tsort: \"NAME_ASC\",\n\t\t\t}),\n\t\t);\n\t},\n\twrapInSuspense: true,\n\tpendingComponent: PrefectLoading,\n});\n\nconst usePagination = () => {\n\tconst search = Route.useSearch();\n\tconst navigate = Route.useNavigate();\n\n\t// Convert URL params (1-based page) to TanStack Table's PaginationState (0-based pageIndex)\n\tconst pagination: PaginationState = useMemo(\n\t\t() => ({\n\t\t\tpageIndex: (search.page ?? 1) - 1,\n\t\t\tpageSize: search.limit ?? 10,\n\t\t}),\n\t\t[search.page, search.limit],\n\t);\n\n\tconst onPaginationChange = useCallback(\n\t\t(newPagination: PaginationState) => {\n\t\t\tvoid navigate({\n\t\t\t\tto: \".\",\n\t\t\t\tsearch: (prev) => ({\n\t\t\t\t\t...prev,\n\t\t\t\t\t// Convert TanStack Table's 0-based pageIndex back to 1-based page for URL\n\t\t\t\t\tpage: newPagination.pageIndex + 1,\n\t\t\t\t\tlimit: newPagination.pageSize,\n\t\t\t\t}),\n\t\t\t\treplace: true,\n\t\t\t});\n\t\t},\n\t\t[navigate],\n\t);\n\n\treturn [pagination, onPaginationChange] as const;\n};\n\ntype FlowSort = \"CREATED_DESC\" | \"UPDATED_DESC\" | \"NAME_ASC\" | \"NAME_DESC\";\n\nconst useSort = () => {\n\tconst search = Route.useSearch();\n\tconst navigate = Route.useNavigate();\n\n\tconst onSortChange = useCallback(\n\t\t(sort: FlowSort) => {\n\t\t\tvoid navigate({\n\t\t\t\tto: \".\",\n\t\t\t\tsearch: (prev) => ({ ...prev, sort }),\n\t\t\t\treplace: true,\n\t\t\t});\n\t\t},\n\t\t[navigate],\n\t);\n\n\treturn [search.sort, onSortChange] as const;\n};\n\nconst useFlowsColumnFilters = () => {\n\tconst search = Route.useSearch();\n\tconst navigate = Route.useNavigate();\n\tconst columnFilters: ColumnFiltersState = useMemo(\n\t\t() => [\n\t\t\t{ id: \"name\", value: search.name },\n\t\t\t{ id: \"tags\", value: search.tags },\n\t\t],\n\t\t[search.name, search.tags],\n\t);\n\n\tconst onColumnFiltersChange = useCallback(\n\t\t(newColumnFilters: ColumnFiltersState) => {\n\t\t\tvoid navigate({\n\t\t\t\tto: \".\",\n\t\t\t\tsearch: (prev) => {\n\t\t\t\t\tconst name = newColumnFilters.find((filter) => filter.id === \"name\")\n\t\t\t\t\t\t?.value as string | undefined;\n\t\t\t\t\tconst tags = newColumnFilters.find((filter) => filter.id === \"tags\")\n\t\t\t\t\t\t?.value as string[] | undefined;\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...prev,\n\t\t\t\t\t\tpage: 1,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\ttags,\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\treplace: true,\n\t\t\t});\n\t\t},\n\t\t[navigate],\n\t);\n\n\treturn [columnFilters, onColumnFiltersChange] as const;\n};\n\nfunction FlowsRoute() {\n\tconst search = Route.useSearch();\n\tconst queryClient = useQueryClient();\n\tconst [pagination, onPaginationChange] = usePagination();\n\tconst [sort, onSortChange] = useSort();\n\tconst [columnFilters, onColumnFiltersChange] = useFlowsColumnFilters();\n\n\tconst paginationBody = buildPaginationBody(search);\n\n\t// Use useSuspenseQuery for count (stable key, won't cause suspense on search change)\n\tconst { data: count } = useSuspenseQuery(\n\t\tbuildCountFlowsFilteredQuery({\n\t\t\toffset: 0,\n\t\t\tsort: search.sort,\n\t\t\tflows: paginationBody.flows ?? undefined,\n\t\t}),\n\t);\n\n\t// Get total count of all flows (without filters) to determine if empty state should be shown\n\tconst { data: totalCount } = useSuspenseQuery(\n\t\tbuildCountFlowsFilteredQuery({\n\t\t\toffset: 0,\n\t\t\tsort: \"NAME_ASC\",\n\t\t}),\n\t);\n\n\t// Use useQuery for paginated flows to leverage placeholderData: keepPreviousData\n\t// This prevents the page from suspending when search/filter changes\n\tconst { data: flowsPage } = useQuery(\n\t\tbuildPaginateFlowsQuery(paginationBody, 30_000),\n\t);\n\n\tconst flows = flowsPage?.results ?? [];\n\n\t// Prefetch a page and its child component data when user hovers over pagination buttons\n\tconst onPrefetchPage = useCallback(\n\t\t(page: number) => {\n\t\t\tconst pageDeps = { ...paginationBody, page };\n\t\t\tvoid queryClient\n\t\t\t\t.prefetchQuery(buildPaginateFlowsQuery(pageDeps, 30_000))\n\t\t\t\t.then(() => {\n\t\t\t\t\t// Get the prefetched page data from cache\n\t\t\t\t\tconst pageData = queryClient.getQueryData<{\n\t\t\t\t\t\tresults?: Array<{ id?: string }>;\n\t\t\t\t\t}>(buildPaginateFlowsQuery(pageDeps, 30_000).queryKey);\n\n\t\t\t\t\tconst flowIds =\n\t\t\t\t\t\tpageData?.results\n\t\t\t\t\t\t\t?.map((flow) => flow.id)\n\t\t\t\t\t\t\t.filter((id): id is string => Boolean(id)) ?? [];\n\n\t\t\t\t\tif (flowIds.length === 0) return;\n\n\t\t\t\t\t// Prefetch child component queries for each flow individually\n\t\t\t\t\t// Using individual flow IDs ensures query keys match what components use\n\t\t\t\t\tfor (const flowId of flowIds) {\n\t\t\t\t\t\t// FlowNextRun query - uses single flow ID array for query key matching\n\t\t\t\t\t\tvoid queryClient.prefetchQuery(buildNextRunsByFlowQuery([flowId]));\n\n\t\t\t\t\t\t// FlowDeploymentCount query - uses single flow ID array for query key matching\n\t\t\t\t\t\tvoid queryClient.prefetchQuery(\n\t\t\t\t\t\t\tbuildDeploymentsCountByFlowQuery([flowId]),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t// FlowLastRun query - last completed run\n\t\t\t\t\t\tvoid queryClient.prefetchQuery(\n\t\t\t\t\t\t\tbuildFilterFlowRunsQuery({\n\t\t\t\t\t\t\t\tflows: { operator: \"and_\", id: { any_: [flowId] } },\n\t\t\t\t\t\t\t\tflow_runs: {\n\t\t\t\t\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\t\t\t\t\tstart_time: { is_null_: false },\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\t\t\tlimit: 1,\n\t\t\t\t\t\t\t\tsort: \"START_TIME_DESC\",\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// FlowActivity query - recent runs for activity chart\n\t\t\t\t\t\tvoid queryClient.prefetchQuery(\n\t\t\t\t\t\t\tbuildFilterFlowRunsQuery({\n\t\t\t\t\t\t\t\tflows: { operator: \"and_\", id: { any_: [flowId] } },\n\t\t\t\t\t\t\t\tflow_runs: {\n\t\t\t\t\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\t\t\t\t\tstart_time: { is_null_: false },\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\t\t\tlimit: NUMBER_OF_ACTIVITY_BARS,\n\t\t\t\t\t\t\t\tsort: \"START_TIME_DESC\",\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t},\n\t\t[queryClient, paginationBody],\n\t);\n\n\treturn (\n\t\t<FlowsPage\n\t\t\tflows={flows}\n\t\t\tcount={count ?? 0}\n\t\t\ttotalCount={totalCount ?? 0}\n\t\t\tpageCount={flowsPage?.pages ?? 0}\n\t\t\tsort={sort as \"NAME_ASC\" | \"NAME_DESC\" | \"CREATED_DESC\"}\n\t\t\tpagination={pagination}\n\t\t\tonPaginationChange={onPaginationChange}\n\t\t\tonSortChange={onSortChange}\n\t\t\tcolumnFilters={columnFilters}\n\t\t\tonColumnFiltersChange={onColumnFiltersChange}\n\t\t\tonPrefetchPage={onPrefetchPage}\n\t\t/>\n\t);\n}\n"],"names":["z","name","string","optional","page","number","int","positive","default","catch","limit","max","tags","sort","FlowsErrorComponent","error","reset","serverError","categorizeError","type","jsxs","jsx","RouteErrorState"],"mappings":"kWA6BqBA,EACZ,CACPC,KAAMD,EAAEE,EAASC,SAAAA,EACjBC,KAAMJ,EAAEK,EAASC,MAAMC,SAAAA,EAAWJ,SAAAA,EAAWK,QAAQ,CAAC,EAAEC,MAAM,CAAC,EAC/DC,MAAOV,EACLK,EACAC,IAAAA,EACAC,SAAAA,EACAI,IAAI,GAAG,EACPR,SAAAA,EACAK,QAAQ,EAAE,EACVC,MAAM,EAAE,EACVG,KAAMZ,EAAQA,EAAEE,CAAQ,EAAEC,SAAAA,EAC1BU,KAAMb,EACC,CAAC,eAAgB,eAAgB,WAAY,WAAW,CAAC,EAC9DG,WACAK,QAAQ,UAAU,CACrB,CAAC,EACAL,WACAK,QAAQ,CAAA,CAAE,EAgCZ,SAASM,EAAoB,CAAEC,MAAAA,EAAOC,MAAAA,CAA2B,EAAG,CACnE,MAAMC,EAAcC,EAAgBH,EAAO,sBAAsB,EAIjE,GACCE,EAAYE,OAAS,gBACrBF,EAAYE,OAAS,eAErB,MAAMJ,EAGP,OACCK,EAAAA,KAAC,MAAA,CAAI,UAAU,sBACd,SAAA,CAAAC,EAAAA,IAAC,OACA,SAAAA,EAAAA,IAAC,KAAA,CAAG,UAAU,yBAAyB,iBAAK,CAAA,CAC7C,EACAA,EAAAA,IAACC,EAAA,CAAgB,MAAOL,EAAa,QAASD,CAAAA,CAAM,CAAA,EACrD,CAEF"}
@@ -1,2 +1,2 @@
1
- import{c as g,r as c,j as o}from"./vendor-tanstack-BdLtprmr.js";import{u as x,j as b,E as j}from"./vendor-codemirror-DDrdK9VD.js";import{z as v,a_ as y,q as C,I as w,y as E}from"./index-V_xTKaEb.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-radix-CJc458uP.js";import"./vendor-recharts-CY3PKigC.js";import"./vendor-forms-BlFSCfFw.js";import"./vendor-date-Cl1Jav-N.js";const N=[b(),j.lineWrapping],z=g.forwardRef(({className:l,value:s,onChange:u,copy:p=!1,onBlur:I,disabled:r,hideLineNumbers:h=!1,...f},i)=>{const e=c.useRef(null),{resolvedTheme:m}=v();let n;r&&(n={lineNumbers:!h,highlightActiveLine:!1,foldGutter:!1,highlightActiveLineGutter:!1});const{setContainer:a}=x({container:e.current,extensions:N,value:s,onChange:u,indentWithTab:!1,editable:!r,basicSetup:n,theme:m==="dark"?"dark":"light",height:"100%"});c.useEffect(()=>{e.current&&a(e.current)},[a]);const d=t=>{E.success("Copied to clipboard"),navigator.clipboard.writeText(t)};return o.jsx("div",{className:y("rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative",l),ref:t=>{e.current=t,typeof i=="function"?i(t):i&&(i.current=t)},...f,children:p&&s&&o.jsx(C,{onClick:()=>d(s),variant:"ghost",size:"icon",className:"absolute top-0 right-0 z-10","aria-label":"copy",children:o.jsx(w,{id:"Copy",className:"size-2"})})})});z.displayName="JsonInput";export{z as JsonInput};
2
- //# sourceMappingURL=json-input-YKJMJCcT.js.map
1
+ import{c as g,r as c,j as o}from"./vendor-tanstack-BdLtprmr.js";import{u as x,j as b,E as j}from"./vendor-codemirror-DDrdK9VD.js";import{z as v,aZ as y,q as C,I as w,y as E}from"./index-CPpeVt8m.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-radix-CJc458uP.js";import"./vendor-recharts-CY3PKigC.js";import"./vendor-forms-BlFSCfFw.js";import"./vendor-date-Cl1Jav-N.js";const N=[b(),j.lineWrapping],z=g.forwardRef(({className:l,value:s,onChange:u,copy:p=!1,onBlur:I,disabled:r,hideLineNumbers:h=!1,...f},i)=>{const e=c.useRef(null),{resolvedTheme:m}=v();let n;r&&(n={lineNumbers:!h,highlightActiveLine:!1,foldGutter:!1,highlightActiveLineGutter:!1});const{setContainer:a}=x({container:e.current,extensions:N,value:s,onChange:u,indentWithTab:!1,editable:!r,basicSetup:n,theme:m==="dark"?"dark":"light",height:"100%"});c.useEffect(()=>{e.current&&a(e.current)},[a]);const d=t=>{E.success("Copied to clipboard"),navigator.clipboard.writeText(t)};return o.jsx("div",{className:y("rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative",l),ref:t=>{e.current=t,typeof i=="function"?i(t):i&&(i.current=t)},...f,children:p&&s&&o.jsx(C,{onClick:()=>d(s),variant:"ghost",size:"icon",className:"absolute top-0 right-0 z-10","aria-label":"copy",children:o.jsx(w,{id:"Copy",className:"size-2"})})})});z.displayName="JsonInput";export{z as JsonInput};
2
+ //# sourceMappingURL=json-input-iUzf6BvZ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"json-input-YKJMJCcT.js","sources":["../../src/components/ui/json-input.tsx"],"sourcesContent":["import { json } from \"@codemirror/lang-json\";\nimport {\n\ttype BasicSetupOptions,\n\tEditorView,\n\tuseCodeMirror,\n} from \"@uiw/react-codemirror\";\nimport { useTheme } from \"next-themes\";\nimport React, { useEffect, useRef } from \"react\";\nimport { toast } from \"sonner\";\nimport { cn } from \"@/utils\";\nimport { Button } from \"./button\";\nimport { Icon } from \"./icons\";\n\nconst extensions = [json(), EditorView.lineWrapping];\n\ntype JsonInputProps = React.ComponentProps<\"div\"> & {\n\tvalue?: string;\n\tonChange?: (value: string) => void;\n\tonBlur?: () => void;\n\tdisabled?: boolean;\n\tclassName?: string;\n\thideLineNumbers?: boolean;\n\tcopy?: boolean;\n};\n\n// the JsonInput's types for onChange are probably wrong but this makes it work\nexport type JsonInputOnChange = React.FormEventHandler<HTMLDivElement> &\n\t((value: string) => void);\n\nexport const JsonInput = React.forwardRef<HTMLDivElement, JsonInputProps>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tcopy = false,\n\t\t\tonBlur,\n\t\t\tdisabled,\n\t\t\thideLineNumbers = false,\n\t\t\t...props\n\t\t},\n\t\tforwardedRef,\n\t) => {\n\t\tconst editor = useRef<HTMLDivElement | null>(null);\n\t\tconst { resolvedTheme } = useTheme();\n\t\t// Setting `basicSetup` messes up the tab order. We only change the basic setup\n\t\t// if the input is disabled, so we leave it undefined to maintain the tab order.\n\t\tlet basicSetup: BasicSetupOptions | undefined;\n\t\tif (disabled) {\n\t\t\tbasicSetup = {\n\t\t\t\tlineNumbers: !hideLineNumbers,\n\t\t\t\thighlightActiveLine: false,\n\t\t\t\tfoldGutter: false,\n\t\t\t\thighlightActiveLineGutter: false,\n\t\t\t};\n\t\t}\n\t\tconst { setContainer } = useCodeMirror({\n\t\t\tcontainer: editor.current,\n\t\t\textensions,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tonBlur,\n\t\t\tindentWithTab: false,\n\t\t\teditable: !disabled,\n\t\t\tbasicSetup,\n\t\t\ttheme: resolvedTheme === \"dark\" ? \"dark\" : \"light\",\n\t\t\theight: \"100%\",\n\t\t});\n\n\t\tuseEffect(() => {\n\t\t\tif (editor.current) {\n\t\t\t\tsetContainer(editor.current);\n\t\t\t}\n\t\t}, [setContainer]);\n\n\t\tconst handleCopy = (_value: string) => {\n\t\t\ttoast.success(\"Copied to clipboard\");\n\t\t\tvoid navigator.clipboard.writeText(_value);\n\t\t};\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={(node) => {\n\t\t\t\t\teditor.current = node;\n\t\t\t\t\tif (typeof forwardedRef === \"function\") {\n\t\t\t\t\t\tforwardedRef(node);\n\t\t\t\t\t} else if (forwardedRef) {\n\t\t\t\t\t\tforwardedRef.current = node;\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{copy && value && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={() => handleCopy(value)}\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"absolute top-0 right-0 z-10\"\n\t\t\t\t\t\taria-label=\"copy\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon id=\"Copy\" className=\"size-2\" />\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nJsonInput.displayName = \"JsonInput\";\n"],"names":["extensions","json","EditorView","JsonInput","React","className","value","onChange","copy","onBlur","disabled","hideLineNumbers","props","forwardedRef","editor","useRef","resolvedTheme","useTheme","basicSetup","setContainer","useCod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AAA,CAIJ,CACD,EAEA1B,EAAU,YAAc"}
1
+ {"version":3,"file":"json-input-iUzf6BvZ.js","sources":["../../src/components/ui/json-input.tsx"],"sourcesContent":["import { json } from \"@codemirror/lang-json\";\nimport {\n\ttype BasicSetupOptions,\n\tEditorView,\n\tuseCodeMirror,\n} from \"@uiw/react-codemirror\";\nimport { useTheme } from \"next-themes\";\nimport React, { useEffect, useRef } from \"react\";\nimport { toast } from \"sonner\";\nimport { cn } from \"@/utils\";\nimport { Button } from \"./button\";\nimport { Icon } from \"./icons\";\n\nconst extensions = [json(), EditorView.lineWrapping];\n\ntype JsonInputProps = React.ComponentProps<\"div\"> & {\n\tvalue?: string;\n\tonChange?: (value: string) => void;\n\tonBlur?: () => void;\n\tdisabled?: boolean;\n\tclassName?: string;\n\thideLineNumbers?: boolean;\n\tcopy?: boolean;\n};\n\n// the JsonInput's types for onChange are probably wrong but this makes it work\nexport type JsonInputOnChange = React.FormEventHandler<HTMLDivElement> &\n\t((value: string) => void);\n\nexport const JsonInput = React.forwardRef<HTMLDivElement, JsonInputProps>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tcopy = false,\n\t\t\tonBlur,\n\t\t\tdisabled,\n\t\t\thideLineNumbers = false,\n\t\t\t...props\n\t\t},\n\t\tforwardedRef,\n\t) => {\n\t\tconst editor = useRef<HTMLDivElement | null>(null);\n\t\tconst { resolvedTheme } = useTheme();\n\t\t// Setting `basicSetup` messes up the tab order. We only change the basic setup\n\t\t// if the input is disabled, so we leave it undefined to maintain the tab order.\n\t\tlet basicSetup: BasicSetupOptions | undefined;\n\t\tif (disabled) {\n\t\t\tbasicSetup = {\n\t\t\t\tlineNumbers: !hideLineNumbers,\n\t\t\t\thighlightActiveLine: false,\n\t\t\t\tfoldGutter: false,\n\t\t\t\thighlightActiveLineGutter: false,\n\t\t\t};\n\t\t}\n\t\tconst { setContainer } = useCodeMirror({\n\t\t\tcontainer: editor.current,\n\t\t\textensions,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tonBlur,\n\t\t\tindentWithTab: false,\n\t\t\teditable: !disabled,\n\t\t\tbasicSetup,\n\t\t\ttheme: resolvedTheme === \"dark\" ? \"dark\" : \"light\",\n\t\t\theight: \"100%\",\n\t\t});\n\n\t\tuseEffect(() => {\n\t\t\tif (editor.current) {\n\t\t\t\tsetContainer(editor.current);\n\t\t\t}\n\t\t}, [setContainer]);\n\n\t\tconst handleCopy = (_value: string) => {\n\t\t\ttoast.success(\"Copied to clipboard\");\n\t\t\tvoid navigator.clipboard.writeText(_value);\n\t\t};\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={(node) => {\n\t\t\t\t\teditor.current = node;\n\t\t\t\t\tif (typeof forwardedRef === \"function\") {\n\t\t\t\t\t\tforwardedRef(node);\n\t\t\t\t\t} else if (forwardedRef) {\n\t\t\t\t\t\tforwardedRef.current = node;\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{copy && value && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={() => handleCopy(value)}\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"absolute top-0 right-0 z-10\"\n\t\t\t\t\t\taria-label=\"copy\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon id=\"Copy\" className=\"size-2\" />\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nJsonInput.displayName = \"JsonInput\";\n"],"names":["extensions","json","EditorView","JsonInput","React","className","value","onChange","copy","onBlur","disabled","hideLineNumbers","props","forwardedRef","editor","useRef","resolvedTheme","useTheme","basicSetup","setContainer","useCodeMirror","useEffect","handleCopy","_value","toast","jsx","cn","node","Button","Icon"],"mappings":"wXAaA,MAAMA,EAAa,CAACC,IAAQC,EAAW,YAAY,EAgBtCC,EAAYC,EAAM,WAC9B,CACC,CACC,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,KAAAC,EAAO,GACP,OAAAC,EACA,SAAAC,EACA,gBAAAC,EAAkB,GAClB,GAAGC,CAAA,EAEJC,IACI,CACJ,MAAMC,EAASC,EAAAA,OAA8B,IAAI,EAC3C,CAAE,cAAAC,CAAA,EAAkBC,EAAA,EAG1B,IAAIC,EACAR,IACHQ,EAAa,CACZ,YAAa,CAACP,EACd,oBAAqB,GACrB,WAAY,GACZ,0BAA2B,EAAA,GAG7B,KAAM,CAAE,aAAAQ,CAAA,EAAiBC,EAAc,CACtC,UAAWN,EAAO,QAClB,WAAAd,EACA,MAAAM,EACA,SAAAC,EAEA,cAAe,GACf,SAAU,CAACG,EACX,WAAAQ,EACA,MAAOF,IAAkB,OAAS,OAAS,QAC3C,OAAQ,MAAA,CACR,EAEDK,EAAAA,UAAU,IAAM,CACXP,EAAO,SACVK,EAAaL,EAAO,OAAO,CAE7B,EAAG,CAACK,CAAY,CAAC,EAEjB,MAAMG,EAAcC,GAAmB,CACtCC,EAAM,QAAQ,qBAAqB,EAC9B,UAAU,UAAU,UAAUD,CAAM,CAC1C,EAEA,OACCE,EAAAA,IAAC,MAAA,CACA,UAAWC,EACV,8HACArB,CAAA,EAED,IAAMsB,GAAS,CACdb,EAAO,QAAUa,EACb,OAAOd,GAAiB,WAC3BA,EAAac,CAAI,EACPd,IACVA,EAAa,QAAUc,EAEzB,EACC,GAAGf,EAEH,YAAQN,GACRmB,EAAAA,IAACG,EAAA,CACA,QAAS,IAAMN,EAAWhB,CAAK,EAC/B,QAAQ,QACR,KAAK,OACL,UAAU,8BACV,aAAW,OAEX,SAAAmB,EAAAA,IAACI,EAAA,CAAK,GAAG,OAAO,UAAU,QAAA,CAAS,CAAA,CAAA,CACpC,CAAA,CAIJ,CACD,EAEA1B,EAAU,YAAc"}
@@ -1,2 +1,2 @@
1
- import{j as s}from"./vendor-tanstack-BdLtprmr.js";import{q as n,I as r,y as x}from"./index-V_xTKaEb.js";function m({label:e,value:t,copyable:o,copyValue:i}){const a=()=>{const c=i??(typeof t=="string"?t:"");navigator.clipboard.writeText(c),x.success(`${e} copied`)};return s.jsxs("dl",{className:"flex flex-col gap-1",children:[s.jsx("dt",{className:"text-muted-foreground text-sm",children:e}),s.jsxs("dd",{className:"text-sm flex items-center gap-2",children:[t,o&&s.jsx(n,{variant:"ghost",size:"icon",onClick:a,children:s.jsx(r,{id:"Copy",className:"size-4"})})]})]})}export{m as K};
2
- //# sourceMappingURL=key-value-RPUUqQ6F.js.map
1
+ import{j as s}from"./vendor-tanstack-BdLtprmr.js";import{q as n,I as r,y as x}from"./index-CPpeVt8m.js";function m({label:e,value:t,copyable:o,copyValue:i}){const a=()=>{const c=i??(typeof t=="string"?t:"");navigator.clipboard.writeText(c),x.success(`${e} copied`)};return s.jsxs("dl",{className:"flex flex-col gap-1",children:[s.jsx("dt",{className:"text-muted-foreground text-sm",children:e}),s.jsxs("dd",{className:"text-sm flex items-center gap-2",children:[t,o&&s.jsx(n,{variant:"ghost",size:"icon",onClick:a,children:s.jsx(r,{id:"Copy",className:"size-4"})})]})]})}export{m as K};
2
+ //# sourceMappingURL=key-value-DI27Dv4P.js.map