prefect 3.6.12__py3-none-any.whl → 3.6.13.dev2__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 (255) hide show
  1. prefect/_build_info.py +3 -3
  2. prefect/_internal/urls.py +29 -0
  3. prefect/_states.py +4 -1
  4. prefect/client/orchestration/_concurrency_limits/client.py +16 -16
  5. prefect/client/subscriptions.py +1 -1
  6. prefect/events/clients.py +52 -13
  7. prefect/runner/storage.py +3 -23
  8. prefect/server/ui-v2/assets/{artifact-card-Ds2tntMW.js → artifact-card-C8JEQRHl.js} +2 -2
  9. prefect/server/ui-v2/assets/{artifact-card-Ds2tntMW.js.map → artifact-card-C8JEQRHl.js.map} +1 -1
  10. prefect/server/ui-v2/assets/{artifact._id-erPNL0a8.js → artifact._id-67V8kTg9.js} +2 -2
  11. prefect/server/ui-v2/assets/{artifact._id-erPNL0a8.js.map → artifact._id-67V8kTg9.js.map} +1 -1
  12. prefect/server/ui-v2/assets/{automation-wizard-Bx9AQxRV.js → automation-wizard-DuxZ47Nn.js} +2 -2
  13. prefect/server/ui-v2/assets/{automation-wizard-Bx9AQxRV.js.map → automation-wizard-DuxZ47Nn.js.map} +1 -1
  14. prefect/server/ui-v2/assets/automation._id-D8S8r4Ji.js +2 -0
  15. prefect/server/ui-v2/assets/{automation._id-IHh5QJwE.js.map → automation._id-D8S8r4Ji.js.map} +1 -1
  16. prefect/server/ui-v2/assets/{automation_._id.edit-Ds8vO0c5.js → automation_._id.edit-C1fOM0Hx.js} +2 -2
  17. prefect/server/ui-v2/assets/{automation_._id.edit-Ds8vO0c5.js.map → automation_._id.edit-C1fOM0Hx.js.map} +1 -1
  18. prefect/server/ui-v2/assets/{automations-header-C6aUe5Tw.js → automations-header-DrijTNGi.js} +2 -2
  19. prefect/server/ui-v2/assets/{automations-header-C6aUe5Tw.js.map → automations-header-DrijTNGi.js.map} +1 -1
  20. prefect/server/ui-v2/assets/{base-job-template-form-section-a-9TFMcW.js → base-job-template-form-section-BDkqOkpe.js} +2 -2
  21. prefect/server/ui-v2/assets/{base-job-template-form-section-a-9TFMcW.js.map → base-job-template-form-section-BDkqOkpe.js.map} +1 -1
  22. prefect/server/ui-v2/assets/{block-type-details-eq3Wg2ht.js → block-type-details-CrFHWH5D.js} +2 -2
  23. prefect/server/ui-v2/assets/{block-type-details-eq3Wg2ht.js.map → block-type-details-CrFHWH5D.js.map} +1 -1
  24. prefect/server/ui-v2/assets/block-type-logo-WQNm0PzP.js +2 -0
  25. prefect/server/ui-v2/assets/{block-type-logo-B31LJm5H.js.map → block-type-logo-WQNm0PzP.js.map} +1 -1
  26. prefect/server/ui-v2/assets/{block._id-OVdz3htC.js → block._id-C3gN1Ae8.js} +2 -2
  27. prefect/server/ui-v2/assets/{block._id-OVdz3htC.js.map → block._id-C3gN1Ae8.js.map} +1 -1
  28. prefect/server/ui-v2/assets/block_._id.edit-DzPuSvat.js +2 -0
  29. prefect/server/ui-v2/assets/{block_._id.edit-CIhIBJrm.js.map → block_._id.edit-DzPuSvat.js.map} +1 -1
  30. prefect/server/ui-v2/assets/catalog-T-7MqsyE.js +2 -0
  31. prefect/server/ui-v2/assets/{catalog-CfniU0UV.js.map → catalog-T-7MqsyE.js.map} +1 -1
  32. prefect/server/ui-v2/assets/catalog_._slug-DMOI61fc.js +2 -0
  33. prefect/server/ui-v2/assets/{catalog_._slug-C9p86T4s.js.map → catalog_._slug-DMOI61fc.js.map} +1 -1
  34. prefect/server/ui-v2/assets/catalog_._slug_.create-l9bGUPi-.js +2 -0
  35. prefect/server/ui-v2/assets/{catalog_._slug_.create-BhSunL__.js.map → catalog_._slug_.create-l9bGUPi-.js.map} +1 -1
  36. prefect/server/ui-v2/assets/{collapsible-DBD7wjpi.js → collapsible-DM-Ze5-Y.js} +2 -2
  37. prefect/server/ui-v2/assets/{collapsible-DBD7wjpi.js.map → collapsible-DM-Ze5-Y.js.map} +1 -1
  38. prefect/server/ui-v2/assets/{concurrency-limit._id-C-XWq7Tf.js → concurrency-limit._id-BHEt9viF.js} +2 -2
  39. prefect/server/ui-v2/assets/{concurrency-limit._id-C-XWq7Tf.js.map → concurrency-limit._id-BHEt9viF.js.map} +1 -1
  40. prefect/server/ui-v2/assets/{create-Bj2t5YQq.js → create-BMxUOyN5.js} +2 -2
  41. prefect/server/ui-v2/assets/{create-Bj2t5YQq.js.map → create-BMxUOyN5.js.map} +1 -1
  42. prefect/server/ui-v2/assets/{create-noFojqGL.js → create-Cq-EAHVk.js} +2 -2
  43. prefect/server/ui-v2/assets/{create-noFojqGL.js.map → create-Cq-EAHVk.js.map} +1 -1
  44. prefect/server/ui-v2/assets/{data-table-BjFlVIyC.js → data-table-Bw8TZx9D.js} +2 -2
  45. prefect/server/ui-v2/assets/{data-table-BjFlVIyC.js.map → data-table-Bw8TZx9D.js.map} +1 -1
  46. prefect/server/ui-v2/assets/{delete-confirmation-dialog-COdZmNfa.js → delete-confirmation-dialog-CTdWZlGM.js} +2 -2
  47. prefect/server/ui-v2/assets/{delete-confirmation-dialog-COdZmNfa.js.map → delete-confirmation-dialog-CTdWZlGM.js.map} +1 -1
  48. prefect/server/ui-v2/assets/{deployment-action-header-C6v2kZ6V.js → deployment-action-header-BObYqmI_.js} +2 -2
  49. prefect/server/ui-v2/assets/{deployment-action-header-C6v2kZ6V.js.map → deployment-action-header-BObYqmI_.js.map} +1 -1
  50. prefect/server/ui-v2/assets/{deployment-form-D9d5sZM2.js → deployment-form-CntyhRrK.js} +3 -3
  51. prefect/server/ui-v2/assets/{deployment-form-D9d5sZM2.js.map → deployment-form-CntyhRrK.js.map} +1 -1
  52. prefect/server/ui-v2/assets/{deployment-links-Dy-M1Que.js → deployment-links-DBUSCaxB.js} +2 -2
  53. prefect/server/ui-v2/assets/{deployment-links-Dy-M1Que.js.map → deployment-links-DBUSCaxB.js.map} +1 -1
  54. prefect/server/ui-v2/assets/{deployment._id-CZlY9261.js → deployment._id-BXanVFA8.js} +2 -2
  55. prefect/server/ui-v2/assets/{deployment._id-CZlY9261.js.map → deployment._id-BXanVFA8.js.map} +1 -1
  56. prefect/server/ui-v2/assets/deployment._id-Q5cvHMX9.js +2 -0
  57. prefect/server/ui-v2/assets/{deployment._id-DVmqclRz.js.map → deployment._id-Q5cvHMX9.js.map} +1 -1
  58. prefect/server/ui-v2/assets/deployment_._id.duplicate-DB-4hHHc.js +2 -0
  59. prefect/server/ui-v2/assets/{deployment_._id.duplicate-DVMjpk5m.js.map → deployment_._id.duplicate-DB-4hHHc.js.map} +1 -1
  60. prefect/server/ui-v2/assets/deployment_._id.edit-CWf1RIGy.js +2 -0
  61. prefect/server/ui-v2/assets/{deployment_._id.edit-Ck_P6KDn.js.map → deployment_._id.edit-CWf1RIGy.js.map} +1 -1
  62. prefect/server/ui-v2/assets/{deployment_._id.run-Cht7AHDG.js → deployment_._id.run-CoHGXFoM.js} +2 -2
  63. prefect/server/ui-v2/assets/{deployment_._id.run-Cht7AHDG.js.map → deployment_._id.run-CoHGXFoM.js.map} +1 -1
  64. prefect/server/ui-v2/assets/{dropdown-menu-xZ_3w9OP.js → dropdown-menu-CT-s-V7d.js} +2 -2
  65. prefect/server/ui-v2/assets/{dropdown-menu-xZ_3w9OP.js.map → dropdown-menu-CT-s-V7d.js.map} +1 -1
  66. prefect/server/ui-v2/assets/{event._eventDate._eventId-CpexuXd6.js → event._eventDate._eventId-BITo_GYL.js} +2 -2
  67. prefect/server/ui-v2/assets/{event._eventDate._eventId-CpexuXd6.js.map → event._eventDate._eventId-BITo_GYL.js.map} +1 -1
  68. prefect/server/ui-v2/assets/flow-run-graph-DxIl6fzW.js +2 -0
  69. prefect/server/ui-v2/assets/flow-run-graph-DxIl6fzW.js.map +1 -0
  70. prefect/server/ui-v2/assets/{flow-run._id-ZBlKBwPO.js → flow-run._id-Bbm9OpDi.js} +2 -2
  71. prefect/server/ui-v2/assets/{flow-run._id-ZBlKBwPO.js.map → flow-run._id-Bbm9OpDi.js.map} +1 -1
  72. prefect/server/ui-v2/assets/flow-run._id-BtSgRDtA.js +2 -0
  73. prefect/server/ui-v2/assets/{flow-run._id-OL0YhyLW.js.map → flow-run._id-BtSgRDtA.js.map} +1 -1
  74. prefect/server/ui-v2/assets/flow-run._id-DJuMECRh.js +4 -0
  75. prefect/server/ui-v2/assets/flow-run._id-DJuMECRh.js.map +1 -0
  76. prefect/server/ui-v2/assets/flow-runs-pagination-LrU9Aio8.js +2 -0
  77. prefect/server/ui-v2/assets/flow-runs-pagination-LrU9Aio8.js.map +1 -0
  78. prefect/server/ui-v2/assets/flow._id-BJBRokk4.js +2 -0
  79. prefect/server/ui-v2/assets/{flow._id-DhrCicwR.js.map → flow._id-BJBRokk4.js.map} +1 -1
  80. prefect/server/ui-v2/assets/{form-BTub_PhK.js → form-CVSlEnl8.js} +2 -2
  81. prefect/server/ui-v2/assets/{form-BTub_PhK.js.map → form-CVSlEnl8.js.map} +1 -1
  82. prefect/server/ui-v2/assets/{header-Dp9qi8fq.js → header-4plZZheZ.js} +2 -2
  83. prefect/server/ui-v2/assets/{header-Dp9qi8fq.js.map → header-4plZZheZ.js.map} +1 -1
  84. prefect/server/ui-v2/assets/{header-B75eb688.js → header-9rXZ4r39.js} +2 -2
  85. prefect/server/ui-v2/assets/{header-B75eb688.js.map → header-9rXZ4r39.js.map} +1 -1
  86. prefect/server/ui-v2/assets/{header-6wmrKLU3.js → header-D3uM8_xM.js} +2 -2
  87. prefect/server/ui-v2/assets/{header-6wmrKLU3.js.map → header-D3uM8_xM.js.map} +1 -1
  88. prefect/server/ui-v2/assets/{index-BA7ACCoL.js → index-6OsEYhIi.js} +2 -2
  89. prefect/server/ui-v2/assets/{index-BA7ACCoL.js.map → index-6OsEYhIi.js.map} +1 -1
  90. prefect/server/ui-v2/assets/index-B7xsJ-QH.js +2 -0
  91. prefect/server/ui-v2/assets/{index-CT_nG86y.js.map → index-B7xsJ-QH.js.map} +1 -1
  92. prefect/server/ui-v2/assets/{index-CGWoVV2s.js → index-BeoNC2tJ.js} +2 -2
  93. prefect/server/ui-v2/assets/{index-CGWoVV2s.js.map → index-BeoNC2tJ.js.map} +1 -1
  94. prefect/server/ui-v2/assets/index-BfJLUM7N.js +2 -0
  95. prefect/server/ui-v2/assets/index-BfJLUM7N.js.map +1 -0
  96. prefect/server/ui-v2/assets/{index-DzMGV8GV.js → index-Bj0OOguP.js} +2 -2
  97. prefect/server/ui-v2/assets/{index-DzMGV8GV.js.map → index-Bj0OOguP.js.map} +1 -1
  98. prefect/server/ui-v2/assets/{index-zpb5iSCL.js → index-BlpD74iH.js} +2 -2
  99. prefect/server/ui-v2/assets/{index-zpb5iSCL.js.map → index-BlpD74iH.js.map} +1 -1
  100. prefect/server/ui-v2/assets/index-BvSl3DKP.js +17 -0
  101. prefect/server/ui-v2/assets/index-BvSl3DKP.js.map +1 -0
  102. prefect/server/ui-v2/assets/index-CDwJvjUM.js +2 -0
  103. prefect/server/ui-v2/assets/{index-Cs8eFQKw.js.map → index-CDwJvjUM.js.map} +1 -1
  104. prefect/server/ui-v2/assets/{index-UN2Tx4jH.js → index-CDyLkbVG.js} +2 -2
  105. prefect/server/ui-v2/assets/{index-UN2Tx4jH.js.map → index-CDyLkbVG.js.map} +1 -1
  106. prefect/server/ui-v2/assets/{index-D08xgmV0.js → index-ChIrfjIW.js} +2 -2
  107. prefect/server/ui-v2/assets/{index-D08xgmV0.js.map → index-ChIrfjIW.js.map} +1 -1
  108. prefect/server/ui-v2/assets/index-CzCSgCK-.js +2 -0
  109. prefect/server/ui-v2/assets/{index-qPlIYf3i.js.map → index-CzCSgCK-.js.map} +1 -1
  110. prefect/server/ui-v2/assets/index-D5v9S-lB.js +2 -0
  111. prefect/server/ui-v2/assets/{index-B_3f8Hcb.js.map → index-D5v9S-lB.js.map} +1 -1
  112. prefect/server/ui-v2/assets/{index-DfiNsXba.js → index-D6GJ4go1.js} +2 -2
  113. prefect/server/ui-v2/assets/{index-DfiNsXba.js.map → index-D6GJ4go1.js.map} +1 -1
  114. prefect/server/ui-v2/assets/index-DJyKqsFO.js +2 -0
  115. prefect/server/ui-v2/assets/{index-H6bwm6L6.js.map → index-DJyKqsFO.js.map} +1 -1
  116. prefect/server/ui-v2/assets/{index-DSaSov8V.js → index-DODEq1Pi.js} +2 -2
  117. prefect/server/ui-v2/assets/{index-DSaSov8V.js.map → index-DODEq1Pi.js.map} +1 -1
  118. prefect/server/ui-v2/assets/index-DicK6p3K.js +2 -0
  119. prefect/server/ui-v2/assets/{index-7-r4ia_S.js.map → index-DicK6p3K.js.map} +1 -1
  120. prefect/server/ui-v2/assets/{index-DYOACRXY.js → index-DqCPbST9.js} +2 -2
  121. prefect/server/ui-v2/assets/{index-DYOACRXY.js.map → index-DqCPbST9.js.map} +1 -1
  122. prefect/server/ui-v2/assets/{index-DOkFJdYY.js → index-DxPoKag8.js} +2 -2
  123. prefect/server/ui-v2/assets/{index-DOkFJdYY.js.map → index-DxPoKag8.js.map} +1 -1
  124. prefect/server/ui-v2/assets/index-NY089eTx.css +1 -0
  125. prefect/server/ui-v2/assets/{index-HGoNWFfP.js → index-h9-QgNjZ.js} +2 -2
  126. prefect/server/ui-v2/assets/{index-HGoNWFfP.js.map → index-h9-QgNjZ.js.map} +1 -1
  127. prefect/server/ui-v2/assets/{index-D3ILnEzm.js → index-tBdv6kBF.js} +2 -2
  128. prefect/server/ui-v2/assets/{index-D3ILnEzm.js.map → index-tBdv6kBF.js.map} +1 -1
  129. prefect/server/ui-v2/assets/index-udb79rgq.js +2 -0
  130. prefect/server/ui-v2/assets/{index-7ThYp9SY.js.map → index-udb79rgq.js.map} +1 -1
  131. prefect/server/ui-v2/assets/{json-input-9UPGqxTw.js → json-input-Dt1icmrn.js} +2 -2
  132. prefect/server/ui-v2/assets/{json-input-9UPGqxTw.js.map → json-input-Dt1icmrn.js.map} +1 -1
  133. prefect/server/ui-v2/assets/{key._key-CTFfXO_k.js → key._key-Cyh5MBX_.js} +2 -2
  134. prefect/server/ui-v2/assets/{key._key-CTFfXO_k.js.map → key._key-Cyh5MBX_.js.map} +1 -1
  135. prefect/server/ui-v2/assets/{lazy-markdown-BHwIrC8E.js → lazy-markdown-BwIwKFRF.js} +2 -2
  136. prefect/server/ui-v2/assets/{lazy-markdown-BHwIrC8E.js.map → lazy-markdown-BwIwKFRF.js.map} +1 -1
  137. prefect/server/ui-v2/assets/{login-kqmT29n7.js → login-DKXFVSwk.js} +2 -2
  138. prefect/server/ui-v2/assets/{login-kqmT29n7.js.map → login-DKXFVSwk.js.map} +1 -1
  139. prefect/server/ui-v2/assets/{markdown-input-BesmAbLS.js → markdown-input-Dp0mBlkV.js} +2 -2
  140. prefect/server/ui-v2/assets/{markdown-input-BesmAbLS.js.map → markdown-input-Dp0mBlkV.js.map} +1 -1
  141. prefect/server/ui-v2/assets/{python-example-snippet-COTWYn1Y.js → python-example-snippet-BYwPjHI5.js} +3 -3
  142. prefect/server/ui-v2/assets/{python-example-snippet-COTWYn1Y.js.map → python-example-snippet-BYwPjHI5.js.map} +1 -1
  143. prefect/server/ui-v2/assets/{python-input-Bjccebi0.js → python-input-y26XMqXw.js} +2 -2
  144. prefect/server/ui-v2/assets/{python-input-Bjccebi0.js.map → python-input-y26XMqXw.js.map} +1 -1
  145. prefect/server/ui-v2/assets/{radio-group-DkAK0M2h.js → radio-group-D0van45v.js} +2 -2
  146. prefect/server/ui-v2/assets/{radio-group-DkAK0M2h.js.map → radio-group-D0van45v.js.map} +1 -1
  147. prefect/server/ui-v2/assets/route-error-state-CGGpuCGN.js +2 -0
  148. prefect/server/ui-v2/assets/{route-error-state-ALftyvGl.js.map → route-error-state-CGGpuCGN.js.map} +1 -1
  149. prefect/server/ui-v2/assets/{schema-form-BR4E-WXE.js → schema-form-2tg5SXM4.js} +2 -2
  150. prefect/server/ui-v2/assets/{schema-form-BR4E-WXE.js.map → schema-form-2tg5SXM4.js.map} +1 -1
  151. prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-BhL8C5NS.js → schema-form-input-string-format-datetime-CZt6AJ4z.js} +4 -4
  152. prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-BhL8C5NS.js.map → schema-form-input-string-format-datetime-CZt6AJ4z.js.map} +1 -1
  153. prefect/server/ui-v2/assets/settings-DDUadk_N.js +2 -0
  154. prefect/server/ui-v2/assets/settings-DDUadk_N.js.map +1 -0
  155. prefect/server/ui-v2/assets/{sort-filter-BD4vwJXt.js → sort-filter-D9p3cPx9.js} +2 -2
  156. prefect/server/ui-v2/assets/{sort-filter-BD4vwJXt.js.map → sort-filter-D9p3cPx9.js.map} +1 -1
  157. prefect/server/ui-v2/assets/state-colors-CAAf0Eg3.js +2 -0
  158. prefect/server/ui-v2/assets/state-colors-CAAf0Eg3.js.map +1 -0
  159. prefect/server/ui-v2/assets/table-vo9Do8sA.js +2 -0
  160. prefect/server/ui-v2/assets/table-vo9Do8sA.js.map +1 -0
  161. prefect/server/ui-v2/assets/tags-input-Ci2JQ-k3.js +2 -0
  162. prefect/server/ui-v2/assets/tags-input-Ci2JQ-k3.js.map +1 -0
  163. prefect/server/ui-v2/assets/task-run-concurrency-limits-reset-dialog-CJzPc2gw.js +2 -0
  164. prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-CG3den1B.js.map → task-run-concurrency-limits-reset-dialog-CJzPc2gw.js.map} +1 -1
  165. prefect/server/ui-v2/assets/{task-run._id-DOcIzVi0.js → task-run._id-CjevSs79.js} +3 -3
  166. prefect/server/ui-v2/assets/{task-run._id-DOcIzVi0.js.map → task-run._id-CjevSs79.js.map} +1 -1
  167. prefect/server/ui-v2/assets/task-run._id-D8QKG5UZ.js +2 -0
  168. prefect/server/ui-v2/assets/{task-run._id-CnIVqU6v.js.map → task-run._id-D8QKG5UZ.js.map} +1 -1
  169. prefect/server/ui-v2/assets/task-runs-pagination-CifoSGct.js +2 -0
  170. prefect/server/ui-v2/assets/{task-runs-pagination-DLSAz-Ur.js.map → task-runs-pagination-CifoSGct.js.map} +1 -1
  171. prefect/server/ui-v2/assets/{textarea-D8LjlIx7.js → textarea-BAtfAxtV.js} +2 -2
  172. prefect/server/ui-v2/assets/{textarea-D8LjlIx7.js.map → textarea-BAtfAxtV.js.map} +1 -1
  173. prefect/server/ui-v2/assets/{timezone-select-BG3cL3-U.js → timezone-select-QlQTZSsF.js} +2 -2
  174. prefect/server/ui-v2/assets/{timezone-select-BG3cL3-U.js.map → timezone-select-QlQTZSsF.js.map} +1 -1
  175. prefect/server/ui-v2/assets/{toggle-group-D3zeurIL.js → toggle-group-BJN1vjEh.js} +2 -2
  176. prefect/server/ui-v2/assets/{toggle-group-D3zeurIL.js.map → toggle-group-BJN1vjEh.js.map} +1 -1
  177. prefect/server/ui-v2/assets/use-delete-automation-confirmation-dialog-eOWJYPkD.js +2 -0
  178. prefect/server/ui-v2/assets/{use-delete-automation-confirmation-dialog-Bzy2ML2T.js.map → use-delete-automation-confirmation-dialog-eOWJYPkD.js.map} +1 -1
  179. prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-DRAP-Tnu.js → use-delete-block-document-confirmation-dialog-BTwSeHRM.js} +2 -2
  180. prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-DRAP-Tnu.js.map → use-delete-block-document-confirmation-dialog-BTwSeHRM.js.map} +1 -1
  181. prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-D4yWonR8.js → use-flow-runs-selected-rows-BL_Gv9CC.js} +2 -2
  182. prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-D4yWonR8.js.map → use-flow-runs-selected-rows-BL_Gv9CC.js.map} +1 -1
  183. prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-DZeBiVd9.js → use-get-artifacts-flow-task-runs-TSCoomjQ.js} +2 -2
  184. prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-DZeBiVd9.js.map → use-get-artifacts-flow-task-runs-TSCoomjQ.js.map} +1 -1
  185. prefect/server/ui-v2/assets/{use-quick-run-BxAMqZDM.js → use-quick-run-BMnCkwSv.js} +2 -2
  186. prefect/server/ui-v2/assets/{use-quick-run-BxAMqZDM.js.map → use-quick-run-BMnCkwSv.js.map} +1 -1
  187. prefect/server/ui-v2/assets/{use-stepper-T3wAKNvM.js → use-stepper-C1wm66U2.js} +2 -2
  188. prefect/server/ui-v2/assets/{use-stepper-T3wAKNvM.js.map → use-stepper-C1wm66U2.js.map} +1 -1
  189. prefect/server/ui-v2/assets/{utilities-B2JMf8iI.js → utilities-DxRXxFOF.js} +2 -2
  190. prefect/server/ui-v2/assets/{utilities-B2JMf8iI.js.map → utilities-DxRXxFOF.js.map} +1 -1
  191. prefect/server/ui-v2/assets/{work-pool-filter-CZz0AJlt.js → work-pool-filter-PudrkZYj.js} +2 -2
  192. prefect/server/ui-v2/assets/{work-pool-filter-CZz0AJlt.js.map → work-pool-filter-PudrkZYj.js.map} +1 -1
  193. prefect/server/ui-v2/assets/work-pool-queue-toggle-BAOrV_0R.js +2 -0
  194. prefect/server/ui-v2/assets/{work-pool-queue-toggle-D4eeo-hi.js.map → work-pool-queue-toggle-BAOrV_0R.js.map} +1 -1
  195. prefect/server/ui-v2/assets/{work-pool._workPoolName-DrWddu9K.js → work-pool._workPoolName-BOM3849e.js} +2 -2
  196. prefect/server/ui-v2/assets/{work-pool._workPoolName-DrWddu9K.js.map → work-pool._workPoolName-BOM3849e.js.map} +1 -1
  197. prefect/server/ui-v2/assets/work-pool_._workPoolName.edit-CIhcG6yr.js +2 -0
  198. prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-CA0ePjCk.js.map → work-pool_._workPoolName.edit-CIhcG6yr.js.map} +1 -1
  199. prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-DpUnE86v.js → work-pool_._workPoolName.queue._workQueueName-CjoM77tu.js} +2 -2
  200. prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-DpUnE86v.js.map → work-pool_._workPoolName.queue._workQueueName-CjoM77tu.js.map} +1 -1
  201. prefect/server/ui-v2/assets/{work-queue-icon-text-BjiA7vAW.js → work-queue-icon-text-CP4yX3uM.js} +2 -2
  202. prefect/server/ui-v2/assets/{work-queue-icon-text-BjiA7vAW.js.map → work-queue-icon-text-CP4yX3uM.js.map} +1 -1
  203. prefect/server/ui-v2/index.html +2 -2
  204. prefect/task_engine.py +16 -0
  205. prefect/task_worker.py +98 -16
  206. prefect/testing/fixtures.py +18 -1
  207. {prefect-3.6.12.dist-info → prefect-3.6.13.dev2.dist-info}/METADATA +1 -1
  208. {prefect-3.6.12.dist-info → prefect-3.6.13.dev2.dist-info}/RECORD +211 -210
  209. prefect/server/ui-v2/assets/automation._id-IHh5QJwE.js +0 -2
  210. prefect/server/ui-v2/assets/block-type-logo-B31LJm5H.js +0 -2
  211. prefect/server/ui-v2/assets/block_._id.edit-CIhIBJrm.js +0 -2
  212. prefect/server/ui-v2/assets/catalog-CfniU0UV.js +0 -2
  213. prefect/server/ui-v2/assets/catalog_._slug-C9p86T4s.js +0 -2
  214. prefect/server/ui-v2/assets/catalog_._slug_.create-BhSunL__.js +0 -2
  215. prefect/server/ui-v2/assets/deployment._id-DVmqclRz.js +0 -2
  216. prefect/server/ui-v2/assets/deployment_._id.duplicate-DVMjpk5m.js +0 -2
  217. prefect/server/ui-v2/assets/deployment_._id.edit-Ck_P6KDn.js +0 -2
  218. prefect/server/ui-v2/assets/flow-run-graph-CfoPEAgQ.js +0 -2
  219. prefect/server/ui-v2/assets/flow-run-graph-CfoPEAgQ.js.map +0 -1
  220. prefect/server/ui-v2/assets/flow-run._id-C-qxwEBp.js +0 -4
  221. prefect/server/ui-v2/assets/flow-run._id-C-qxwEBp.js.map +0 -1
  222. prefect/server/ui-v2/assets/flow-run._id-OL0YhyLW.js +0 -2
  223. prefect/server/ui-v2/assets/flow-runs-pagination-DnwkJapB.js +0 -2
  224. prefect/server/ui-v2/assets/flow-runs-pagination-DnwkJapB.js.map +0 -1
  225. prefect/server/ui-v2/assets/flow._id-DhrCicwR.js +0 -2
  226. prefect/server/ui-v2/assets/index-7-r4ia_S.js +0 -2
  227. prefect/server/ui-v2/assets/index-7ThYp9SY.js +0 -2
  228. prefect/server/ui-v2/assets/index-B7zHzWQW.css +0 -1
  229. prefect/server/ui-v2/assets/index-B_3f8Hcb.js +0 -2
  230. prefect/server/ui-v2/assets/index-BiCd-Iuz.js +0 -2
  231. prefect/server/ui-v2/assets/index-BiCd-Iuz.js.map +0 -1
  232. prefect/server/ui-v2/assets/index-CT_nG86y.js +0 -2
  233. prefect/server/ui-v2/assets/index-Cs8eFQKw.js +0 -2
  234. prefect/server/ui-v2/assets/index-H6bwm6L6.js +0 -2
  235. prefect/server/ui-v2/assets/index-WYPZo52S.js +0 -17
  236. prefect/server/ui-v2/assets/index-WYPZo52S.js.map +0 -1
  237. prefect/server/ui-v2/assets/index-qPlIYf3i.js +0 -2
  238. prefect/server/ui-v2/assets/route-error-state-ALftyvGl.js +0 -2
  239. prefect/server/ui-v2/assets/settings-BL0X8cDU.js +0 -2
  240. prefect/server/ui-v2/assets/settings-BL0X8cDU.js.map +0 -1
  241. prefect/server/ui-v2/assets/table-CEAx-qHs.js +0 -2
  242. prefect/server/ui-v2/assets/table-CEAx-qHs.js.map +0 -1
  243. prefect/server/ui-v2/assets/tags-input-D1RJZEUA.js +0 -2
  244. prefect/server/ui-v2/assets/tags-input-D1RJZEUA.js.map +0 -1
  245. prefect/server/ui-v2/assets/task-run-concurrency-limits-reset-dialog-CG3den1B.js +0 -2
  246. prefect/server/ui-v2/assets/task-run._id-CnIVqU6v.js +0 -2
  247. prefect/server/ui-v2/assets/task-runs-pagination-DLSAz-Ur.js +0 -2
  248. prefect/server/ui-v2/assets/use-delete-automation-confirmation-dialog-Bzy2ML2T.js +0 -2
  249. prefect/server/ui-v2/assets/use-local-storage-CpxMp5wR.js +0 -2
  250. prefect/server/ui-v2/assets/use-local-storage-CpxMp5wR.js.map +0 -1
  251. prefect/server/ui-v2/assets/work-pool-queue-toggle-D4eeo-hi.js +0 -2
  252. prefect/server/ui-v2/assets/work-pool_._workPoolName.edit-CA0ePjCk.js +0 -2
  253. {prefect-3.6.12.dist-info → prefect-3.6.13.dev2.dist-info}/WHEEL +0 -0
  254. {prefect-3.6.12.dist-info → prefect-3.6.13.dev2.dist-info}/entry_points.txt +0 -0
  255. {prefect-3.6.12.dist-info → prefect-3.6.13.dev2.dist-info}/licenses/LICENSE +0 -0
@@ -1,2 +0,0 @@
1
- import{j as a}from"./vendor-tanstack-BK8oseNA.js";import{cm as e}from"./index-WYPZo52S.js";const c=({alt:o,logoUrl:s,size:r="sm"})=>a.jsx("img",{alt:o,src:s??void 0,className:i({size:r})}),i=e("border-4 bg-gray-200 rounded",{variants:{size:{sm:"size-8",lg:"size-14"}}});export{c as B};
2
- //# sourceMappingURL=block-type-logo-B31LJm5H.js.map
@@ -1,2 +0,0 @@
1
- import{j as s,u as g,r as b,L as B,p as k}from"./vendor-tanstack-BK8oseNA.js";import{B as y,g as v,h as c,bq as l,bz as m,bB as _,dJ as N,C as S,p,x as n,dK as E,d0 as L}from"./index-WYPZo52S.js";import{B as w}from"./block-type-details-eq3Wg2ht.js";import{l as C,L as P}from"./schema-form-input-string-format-datetime-BhL8C5NS.js";import"./toggle-group-D3zeurIL.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CznP1SOq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-forms-DxqqmhL5.js";import"./vendor-date-7GxEwcQM.js";import"./block-type-logo-B31LJm5H.js";import"./lazy-markdown-BHwIrC8E.js";import"./zod-DgSl2Nua.js";import"./use-debounce-callback-ClAx-Wwx.js";import"./timezone-select-BG3cL3-U.js";import"./dropdown-menu-xZ_3w9OP.js";import"./form-BTub_PhK.js";const F=({blockDocument:e})=>s.jsx(y,{children:s.jsxs(v,{children:[s.jsx(c,{children:s.jsx(l,{to:"/blocks",className:"text-xl font-semibold",children:"Blocks"})}),s.jsx(m,{}),s.jsx(c,{children:s.jsx(l,{to:"/blocks/block/$id",params:{id:e.id},className:"text-xl font-semibold",children:e.name??e.block_type_name??e.id})}),s.jsx(m,{}),s.jsx(c,{className:"text-xl font-semibold",children:s.jsx(_,{children:"Edit"})})]})}),R=({blockDocument:e})=>{const r=g(),{values:t,setValues:o,errors:x,validateForm:u}=C(),{updateBlockDocument:h,isPending:j}=N();b.useEffect(()=>{e.data&&o(e.data)},[e.data,o]);const f=async i=>{i.preventDefault();try{await u({schema:t}),h({id:e.id,data:t,merge_existing_data:!1},{onSuccess:()=>{n.success("Block updated successfully"),r({to:"/blocks/block/$id",params:{id:e.id}})},onError:d=>{const a="Unknown error while updating block.";n.error(a),console.error(a,d)}})}catch(d){const a="Unknown error while validating block data.";n.error(a),console.error(a,d)}};return s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx(F,{blockDocument:e}),s.jsxs(S,{className:" p-6 grid grid-cols-[minmax(0,_1fr)_250px] gap-4 ",children:[s.jsxs("form",{className:"flex flex-col gap-4",onSubmit:i=>{f(i)},children:[s.jsx(P,{values:t,onValuesChange:o,errors:x,kinds:["json"],schema:e?.block_schema?.fields??{}}),s.jsxs("div",{className:"flex gap-3 justify-end",children:[s.jsx(p,{variant:"secondary",children:s.jsx(B,{to:"/blocks/block/$id",params:{id:e.id},children:"Cancel"})}),s.jsx(p,{loading:j,type:"submit",children:"Save"})]})]}),e.block_type&&s.jsx(w,{blockType:e.block_type})]})]})};function Y(){const{id:e}=E.useParams(),{data:r}=k(L(e));return s.jsx(R,{blockDocument:r})}export{Y as component};
2
- //# sourceMappingURL=block_._id.edit-CIhIBJrm.js.map
@@ -1,2 +0,0 @@
1
- import{j as s,L as o,p as h,r as c}from"./vendor-tanstack-BK8oseNA.js";import{C as m,ak as t,p as i,M as g,N as p,by as j,B as f,g as v,h as n,bq as b,bz as N,bk as k,bA as d}from"./index-WYPZo52S.js";import{B}from"./block-type-logo-B31LJm5H.js";import{L as C}from"./lazy-markdown-BHwIrC8E.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CznP1SOq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-forms-DxqqmhL5.js";import"./vendor-date-7GxEwcQM.js";function S({blockType:e}){return s.jsxs(m,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(B,{size:"lg",logoUrl:e.logo_url}),s.jsx(t,{variant:"h4",children:e.name})]}),e.description&&s.jsx("div",{className:"prose max-w-none h-32 overflow-y-scroll text-sm",children:s.jsx(C,{children:e.description})}),s.jsxs("div",{className:"flex justify-end gap-4",children:[s.jsx(i,{variant:"secondary",size:"sm",children:s.jsx(o,{to:"/blocks/catalog/$slug",params:{slug:e.slug},children:"Details"})}),s.jsx(i,{size:"sm",children:s.jsx(o,{to:"/blocks/catalog/$slug/create",params:{slug:e.slug},children:"Create"})})]})]})}const y=({blockTypes:e,search:a,onSearch:r})=>s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs(t,{variant:"bodySmall",className:"text-muted-foreground",children:[e.length," ",g(e.length,"Block")]}),s.jsx("div",{className:"min-w-40",children:s.jsx(p,{value:a,placeholder:"Search blocks",onChange:l=>r(l.target.value)})})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:e.map(l=>s.jsx(S,{blockType:l},l.id))})]}),L=()=>s.jsx(m,{className:"p-4",children:s.jsxs(t,{variant:"bodySmall",children:["Can't find a block for your service? Check out the"," ",s.jsx("a",{className:"underline text-blue-600 hover:text-blue-800 visited:text-purple-600",href:j["integrations-guide"],children:"docs"})," ","for a full list of integrations in the SDK"]})}),z=()=>s.jsx(f,{children:s.jsxs(v,{children:[s.jsx(n,{children:s.jsx(b,{to:"/blocks",className:"text-xl font-semibold",children:"Blocks"})}),s.jsx(N,{}),s.jsx(n,{className:"text-xl font-semibold",children:"Catalog"})]})}),w=({blockTypes:e,search:a,onSearch:r})=>s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx(z,{}),s.jsx(L,{}),s.jsx(y,{blockTypes:e,search:a,onSearch:r})]});function q(){const[e,a]=M(),{data:r}=h(k({block_types:{name:{like_:e}},offset:0}));return s.jsx(w,{blockTypes:r,search:e,onSearch:a})}function M(){const{blockName:e}=d.useSearch(),a=d.useNavigate(),r=c.useCallback(u=>{a({to:".",search:x=>({...x,blockName:u}),replace:!0})},[a]);return[c.useMemo(()=>e??"",[e]),r]}export{q as component};
2
- //# sourceMappingURL=catalog-CfniU0UV.js.map
@@ -1,2 +0,0 @@
1
- import{j as e,L as l,p as c}from"./vendor-tanstack-BK8oseNA.js";import{B as d,g as m,h as o,bq as t,bz as n,C as x,ak as i,p,dn as u,db as j}from"./index-WYPZo52S.js";import{B as h}from"./block-type-logo-B31LJm5H.js";import{P as f}from"./python-example-snippet-COTWYn1Y.js";import{L as g}from"./lazy-markdown-BHwIrC8E.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CznP1SOq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-forms-DxqqmhL5.js";import"./vendor-date-7GxEwcQM.js";const B=({blockType:s})=>e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx(N,{blockType:s}),e.jsx(v,{blockType:s})]});function N({blockType:s}){return e.jsx(d,{children:e.jsxs(m,{children:[e.jsx(o,{children:e.jsx(t,{to:"/blocks",className:"text-xl font-semibold",children:"Blocks"})}),e.jsx(n,{}),e.jsx(o,{children:e.jsx(t,{to:"/blocks/catalog",className:"text-xl font-semibold",children:"Catalog"})}),e.jsx(n,{}),e.jsx(o,{className:"text-xl font-semibold",children:s.slug})]})})}function v({blockType:s}){return e.jsx("div",{children:e.jsxs(x,{className:"p-6",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(h,{size:"lg",logoUrl:s.logo_url}),e.jsx(i,{variant:"h3",children:s.name})]}),s.description&&e.jsx(b,{description:s.description,documentationUrl:s.documentation_url}),s.code_example&&e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(i,{variant:"h4",children:"Example"}),e.jsx(f,{codeExample:s.code_example,name:s.name})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(p,{children:e.jsx(l,{to:"/blocks/catalog/$slug/create",params:{slug:s.slug},children:"Create"})})})]})})}function b({description:s,documentationUrl:a}){let r=s;return a&&(r=`${r} [Documentation](${a})`),e.jsx("div",{className:"prose max-w-none",children:e.jsx(g,{children:r})})}function S(){const{slug:s}=u.useParams(),{data:a}=c(j(s));return e.jsx(B,{blockType:a})}export{S as component};
2
- //# sourceMappingURL=catalog_._slug-C9p86T4s.js.map
@@ -1,2 +0,0 @@
1
- import{j as e,u as B,L as y,p as h}from"./vendor-tanstack-BK8oseNA.js";import{B as N,g as v,h as l,bq as i,bz as d,bB as F,dd as _,C as S,o as C,p,x as u,dI as L,db as w,dc as E}from"./index-WYPZo52S.js";import{a as D}from"./zod-DgSl2Nua.js";import{c as P,o as A,s as I}from"./vendor-forms-DxqqmhL5.js";import{B as R}from"./block-type-details-eq3Wg2ht.js";import{l as T,L as U}from"./schema-form-input-string-format-datetime-BhL8C5NS.js";import"./toggle-group-D3zeurIL.js";import{F as V,b as z,c as Q,d as G,e as M,a as $}from"./form-BTub_PhK.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CznP1SOq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-date-7GxEwcQM.js";import"./block-type-logo-B31LJm5H.js";import"./lazy-markdown-BHwIrC8E.js";import"./use-debounce-callback-ClAx-Wwx.js";import"./timezone-select-BG3cL3-U.js";import"./dropdown-menu-xZ_3w9OP.js";const q=({blockType:s})=>e.jsx(N,{children:e.jsxs(v,{children:[e.jsx(l,{children:e.jsx(i,{to:"/blocks",className:"text-xl font-semibold",children:"Blocks"})}),e.jsx(d,{}),e.jsx(l,{children:e.jsx(i,{to:"/blocks/catalog",className:"text-xl font-semibold",children:"Catalog"})}),e.jsx(d,{}),e.jsx(l,{children:e.jsx(i,{to:"/blocks/catalog",className:"text-xl font-semibold",children:s.name})}),e.jsx(d,{}),e.jsx(l,{className:"text-xl font-semibold",children:e.jsx(F,{children:"Create"})})]})}),H=/^[a-zA-Z0-9-]+$/,K=A({blockName:I().regex(H,{message:"Name must only contain lowercase letters, numbers, and dashes"})}),O={blockName:""},X=({blockSchema:s,blockType:o})=>{const n=B(),{values:a,setValues:b,errors:x,validateForm:j}=T(),{createBlockDocument:k,isPending:f}=_(),m=P({resolver:D(K),defaultValues:O}),g=async r=>{try{if(await j({schema:a}),x.length>0)return;k({block_schema_id:s.id,block_type_id:o.id,is_anonymous:!1,data:a,name:r.blockName},{onSuccess:t=>{u.success("Block created successfully"),n({to:"/blocks/block/$id",params:{id:t.id}})},onError:t=>{const c="Unknown error while creating block.";u.error(c),console.error(c,t)}})}catch(t){const c="Unknown error while validating block data.";u.error(c),console.error(c,t)}};return e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx(q,{blockType:o}),e.jsxs(S,{className:" p-6 grid grid-cols-[minmax(0,_1fr)_250px] gap-4 ",children:[e.jsx(V,{...m,children:e.jsxs("form",{className:"flex flex-col gap-4",onSubmit:r=>{m.handleSubmit(g)(r)},children:[e.jsx(z,{control:m.control,name:"blockName",render:({field:r})=>e.jsxs(Q,{children:[e.jsx(G,{children:"Name"}),e.jsx(M,{children:e.jsx(C,{...r,value:r.value})}),e.jsx($,{})]})}),e.jsx(U,{values:a,onValuesChange:b,errors:x,kinds:["json"],schema:s.fields}),e.jsxs("div",{className:"flex gap-3 justify-end",children:[e.jsx(p,{variant:"secondary",children:e.jsx(y,{to:"/blocks/catalog",children:"Cancel"})}),e.jsx(p,{loading:f,type:"submit",children:"Save"})]})]})}),e.jsx(R,{blockType:o})]})]})};function xe(){const{slug:s}=L.useParams(),{data:o}=h(w(s)),{data:n}=h(E({block_schemas:{block_type_id:{any_:[o.id]},operator:"and_"},offset:0})),a=n[0];if(!a)throw new Error("Block schema not found");return e.jsx(X,{blockSchema:a,blockType:o})}export{xe as component};
2
- //# sourceMappingURL=catalog_._slug_.create-BhSunL__.js.map
@@ -1,2 +0,0 @@
1
- import{j as e,L as C,s as B,r as c,F as K,C as Oe,G as $e,D as Be,B as Qe,p as de}from"./vendor-tanstack-BK8oseNA.js";import{N as ue,p as j,I,x as F,B as He,g as We,h as ae,bq as Ge,bz as Je,bB as qe,ak as k,L as re,aL as Ke,aa as he,aC as Xe,cz as Ze,cd as J,M as Ye,au as me,av as xe,ax as L,aw as P,V as es,aU as pe,o as je,cA as ge,cB as X,F as U,a2 as Z,bf as Y,Z as fe,_ as ve,$ as Se,a0 as Ce,S as ss,a as ns,b as ts,c as as,e as rs,cC as os,cD as ls,aK as is,cE as cs,cF as ds,aq as us,cG as hs,bS as De,bP as we,bQ as ye,bR as be,C as ms,cH as xs,cI as ps,b3 as js,cJ as gs,cK as fs,aJ as oe,ay as le}from"./index-WYPZo52S.js";import{D as _e}from"./delete-confirmation-dialog-COdZmNfa.js";import{D as ee,a as se,b as ne,c as Ne,d as E,f as vs}from"./dropdown-menu-xZ_3w9OP.js";import{L as Ss}from"./lazy-markdown-BHwIrC8E.js";import{D as Cs,W as Ds}from"./work-pool-filter-CZz0AJlt.js";import{S as ws}from"./sort-filter-BD4vwJXt.js";import{S as ys,a as Te,F as Re}from"./flow-runs-pagination-DnwkJapB.js";import{u as Ee,F as Fe}from"./use-flow-runs-selected-rows-D4yWonR8.js";import{D as bs}from"./data-table-BjFlVIyC.js";import{D as _s}from"./deployment-links-Dy-M1Que.js";import{S as Ns}from"./index-D08xgmV0.js";import{a as ke}from"./zod-DgSl2Nua.js";import{a0 as Ts,$ as Rs}from"./vendor-date-7GxEwcQM.js";import{c as Me,o as b,b as q,s as A,d as Es,e as V,n as z,f as Fs,a as ie}from"./vendor-forms-DxqqmhL5.js";import{c as ks}from"./vendor-recharts-D4imLXNl.js";import{c as Ie}from"./cronstrue-WDy4rv2V.js";import{F as Le,a as f,b as _,c as N,d as T,e as R}from"./form-BTub_PhK.js";import{T as Pe}from"./timezone-select-BG3cL3-U.js";import{ai as Ms}from"./vendor-radix-CznP1SOq.js";import{u as Is}from"./use-delete-confirmation-dialog-CvQEyyhU.js";import{u as Ls,a as Ps}from"./use-quick-run-BxAMqZDM.js";import"./vendor-react-Bce9NwRC.js";import"./table-CEAx-qHs.js";import"./work-queue-icon-text-BjiA7vAW.js";const Ve=({search:s,sort:n,stateFilter:r,deploymentFilter:a,workPoolFilter:t})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 pr-2 border-r-2",children:[e.jsx("div",{className:"min-w-56",children:e.jsx(ue,{"aria-label":"search by run name",placeholder:"Search by run name",value:s.value,onChange:i=>s.onChange(i.target.value)})}),e.jsx("div",{className:"min-w-56",children:e.jsx(ys,{selectedFilters:r.value,onSelectFilter:r.onSelect})}),a&&e.jsx("div",{className:"min-w-56",children:e.jsx(Cs,{selectedDeployments:a.value,onSelectDeployments:a.onSelect})}),t&&e.jsx("div",{className:"min-w-56",children:e.jsx(Ds,{selectedWorkPools:t.value,onSelectWorkPools:t.onSelect})})]}),e.jsx(ws,{value:n.value,onSelect:n.onSelect})]}),Vs=({id:s,onDelete:n})=>{const r=a=>{navigator.clipboard.writeText(a),F.success("ID copied")};return e.jsxs(ee,{children:[e.jsx(se,{asChild:!0,children:e.jsxs(j,{variant:"outline",className:"size-8 p-0",children:[e.jsx("span",{className:"sr-only",children:"Open menu"}),e.jsx(I,{id:"MoreVertical",className:"size-4"})]})}),e.jsxs(ne,{align:"end",children:[e.jsx(Ne,{children:"Actions"}),e.jsx(E,{onClick:()=>r(s),children:"Copy ID"}),e.jsx(C,{to:"/deployments/deployment/$id/edit",params:{id:s},children:e.jsx(E,{children:"Edit"})}),e.jsx(E,{onClick:n,children:"Delete"}),e.jsx(C,{to:"/deployments/deployment/$id/duplicate",params:{id:s},children:e.jsx(E,{children:"Duplicate"})})]})]})},As=({deployment:s})=>e.jsx(He,{children:e.jsxs(We,{children:[e.jsx(ae,{children:e.jsx(Ge,{to:"/deployments",className:"text-xl font-semibold",children:"Deployments"})}),e.jsx(Je,{}),e.jsx(ae,{className:"text-xl font-semibold",children:e.jsx(qe,{children:s.name})})]})}),zs=({deployment:s})=>{const n=JSON.stringify(s.job_variables??{},null,2),r=JSON.stringify(s.pull_steps??[],null,2);return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(k,{variant:"h4",children:"Job Variables"}),e.jsx(re,{copy:!0,disabled:!0,hideLineNumbers:!0,value:n}),e.jsx(k,{variant:"h4",children:"Pull Steps "}),e.jsx(re,{copy:!0,disabled:!0,hideLineNumbers:!0,value:r})]})},Us=({deployment:s})=>e.jsx("div",{className:"prose max-w-none",children:e.jsx(Ss,{children:s.description??""})}),Os=s=>{const{data:n,error:r}=B(Ke(s)),a=c.useMemo(()=>n?n.map(o=>o.flow_id):[],[n]),{data:t,error:i}=B(he({flows:{id:{any_:a},operator:"and_"},offset:0,sort:"CREATED_DESC"},{enabled:a.length>0})),d=c.useMemo(()=>t?new Map(t.map(o=>[o.id,o])):new Map,[t]);return n&&n.length===0?{status:"success",error:null,data:[]}:n&&d.size>0?{status:"success",error:null,data:n.map(o=>{const u=d.get(o.flow_id);return{...o,flow:u}})}:r||i?{status:"error",error:r||i,data:void 0}:{status:"pending",error:null,data:void 0}},Ae=s=>{const{data:n,error:r}=B(Xe(s)),a=c.useMemo(()=>n?n.results.map(o=>o.flow_id):[],[n]),{data:t,error:i}=B(he({flows:{id:{any_:a},operator:"and_"},offset:0,sort:"CREATED_DESC"},{enabled:a.length>0})),d=c.useMemo(()=>t?new Map(t.map(o=>[o.id,o])):new Map,[t]);return n&&n.results.length===0?{status:"success",error:null,data:{...n,results:[]}}:n&&d.size>0?{status:"success",error:null,data:{...n,results:n.results.map(o=>{const u=d.get(o.flow_id);return{...o,flow:u}})}}:r||i?{status:"error",error:r||i,data:void 0}:{status:"pending",error:null,data:void 0}},D=K("/deployments/deployment/$id"),$s=({deployment:s})=>{const[n,r,{clearSet:a,onSelectRow:t}]=Ee(),[i,d]=Hs(),[o,u]=Ws(),[l,m]=Gs(),[h,x]=Js(),y=Qs(),{data:g}=Ae({deployments:{operator:"and_",id:{any_:[s.id]}},flow_runs:{name:{like_:o||void 0},state:{name:{any_:h.length===0?void 0:h},operator:"or_"},operator:"and_"},limit:i.limit,page:i.page,sort:l}),p=c.useMemo(()=>{if(g)return{...g,results:g.results.map(Ue=>({...Ue,deployment:s}))}},[g,s]),Q=y?()=>{y(),a()}:void 0,O=Bs(s);return e.jsxs("div",{className:"flex flex-col gap-2",children:[O&&e.jsxs("div",{className:"flex flex-col gap-2 border-b py-2",children:[e.jsx(k,{variant:"bodyLarge",children:"Next Run"}),e.jsx(Ze,{flowRun:O})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(Fe,{count:p?.count,results:p?.results,selectedRows:n,setSelectedRows:r}),e.jsx(Ve,{search:{value:o,onChange:u},sort:{value:l,onSelect:m},stateFilter:{value:new Set(h),onSelect:x}})]}),e.jsx(Te,{flowRuns:p?.results,selectedRows:n,onSelect:t,onClearFilters:Q}),p&&e.jsx(Re,{count:p.count,pagination:i,onChangePagination:d,pages:p.pages})]})]})};function Bs(s){const{data:n}=Os({deployments:{id:{any_:[s.id]},operator:"and_"},flow_runs:{state:{name:{any_:["Scheduled"]},operator:"and_"},operator:"and_"},sort:"EXPECTED_START_TIME_ASC",limit:1,offset:0});return c.useMemo(()=>{if(!(!n||!n[0]))return{...n[0],deployment:s}},[n,s])}function Qs(){const{runs:s}=D.useSearch(),n=D.useNavigate(),r=c.useCallback(()=>{n({to:".",search:t=>({...t,runs:void 0}),replace:!0})},[n]);return c.useMemo(()=>!!s,[s])?r:void 0}function Hs(){const{runs:s}=D.useSearch(),n=D.useNavigate(),r=c.useCallback(t=>{n({to:".",search:i=>({...i,runs:{...s,...t}}),replace:!0})},[n,s]);return[c.useMemo(()=>({page:s?.page??1,limit:s?.limit??10}),[s?.limit,s?.page]),r]}function Ws(){const{runs:s}=D.useSearch(),n=D.useNavigate(),r=c.useCallback(t=>{n({to:".",search:i=>({...i,runs:{...s,flowRuns:{...s?.flowRuns,name:t}}}),replace:!0})},[n,s]);return[c.useMemo(()=>s?.flowRuns?.name??"",[s?.flowRuns?.name]),r]}function Gs(){const{runs:s}=D.useSearch(),n=D.useNavigate(),r=c.useCallback(t=>{n({to:".",search:i=>({...i,runs:{...s,sort:t}}),replace:!0})},[n,s]);return[c.useMemo(()=>s?.sort??"START_TIME_DESC",[s?.sort]),r]}function Js(){const{runs:s}=D.useSearch(),n=D.useNavigate(),r=c.useCallback(t=>{n({to:".",search:i=>({...i,runs:{...s,flowRuns:{...s?.flowRuns,state:t?Array.from(t):void 0}}}),replace:!0})},[n,s]);return[c.useMemo(()=>s?.flowRuns?.state??J,[s?.flowRuns?.state]),r]}const w=K("/deployments/deployment/$id"),qs=({deployment:s})=>{const[n,r,{clearSet:a,onSelectRow:t}]=Ee(),[i,d]=Xs(),[o,u]=Zs(),[l,m]=Ys(),[h,x]=en(),y=Ks(),{data:g}=Ae({deployments:{operator:"and_",id:{any_:[s.id]}},flow_runs:{name:{like_:o||void 0},state:{name:{any_:h.length===0?void 0:h},operator:"or_"},operator:"and_"},limit:i.limit,page:i.page,sort:l}),p=c.useMemo(()=>{if(g)return{...g,results:g.results.map(O=>({...O,deployment:s}))}},[g,s]),Q=y?()=>{y(),a()}:void 0;return e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(Fe,{count:p?.count,results:p?.results,selectedRows:n,setSelectedRows:r}),e.jsx(Ve,{search:{value:o,onChange:u},sort:{value:l,onSelect:m},stateFilter:{value:new Set(h),onSelect:x}})]}),e.jsx(Te,{flowRuns:p?.results,selectedRows:n,onSelect:t,onClearFilters:Q}),p&&p.results.length>0&&e.jsx(Re,{count:p.count,pagination:i,onChangePagination:d,pages:p.pages})]})};function Ks(){const{upcoming:s}=w.useSearch(),n=w.useNavigate(),r=c.useCallback(()=>{n({to:".",search:t=>({...t,upcoming:void 0}),replace:!0})},[n]);return c.useMemo(()=>!!s,[s])?r:void 0}function Xs(){const{upcoming:s}=w.useSearch(),n=w.useNavigate(),r=c.useCallback(t=>{n({to:".",search:i=>({...i,upcoming:{...s,...t}}),replace:!0})},[n,s]);return[c.useMemo(()=>({page:s?.page??1,limit:s?.limit??5}),[s?.limit,s?.page]),r]}function Zs(){const{upcoming:s}=w.useSearch(),n=w.useNavigate(),r=c.useCallback(t=>{n({to:".",search:i=>({...i,upcoming:{...s,flowRuns:{...s?.flowRuns,name:t}}}),replace:!0})},[n,s]);return[c.useMemo(()=>s?.flowRuns?.name??"",[s?.flowRuns?.name]),r]}function Ys(){const{upcoming:s}=w.useSearch(),n=w.useNavigate(),r=c.useCallback(t=>{n({to:".",search:i=>({...i,upcoming:{...s,sort:t}}),replace:!0})},[n,s]);return[c.useMemo(()=>s?.sort??"START_TIME_ASC",[s?.sort]),r]}function en(){const{upcoming:s}=w.useSearch(),n=w.useNavigate(),r=c.useCallback(t=>{n({to:".",search:i=>({...i,upcoming:{...s,flowRuns:{...s?.flowRuns,state:t?Array.from(t):void 0}}}),replace:!0})},[n,s]);return[c.useMemo(()=>s?.flowRuns?.state??["Scheduled"],[s?.flowRuns?.state]),r]}const $=Qe(),sn=[$.accessor("key",{header:"Key"}),$.accessor("value",{header:"Override"}),$.accessor("defaultValue",{header:"Default"}),$.accessor("type",{header:"Type"})],nn=s=>c.useMemo(()=>{if(!s.parameter_openapi_schema)return[];const n=s.parameter_openapi_schema.properties,r=s.parameters;return Object.keys(n).sort((a,t)=>n[a].position-n[t].position).map(a=>{const t=n[a];return{key:a,value:r[a],defaultValue:t.default,type:t.type}})},[s]),tn=({deployment:s})=>{const[n,r]=c.useState(""),a=nn(s),t=c.useDeferredValue(n),i=c.useMemo(()=>a.filter(o=>o.key.toLowerCase().includes(t.toLowerCase())||o.value?.toString().toLowerCase().includes(t.toLowerCase())||o.defaultValue?.toString().toLowerCase().includes(t.toLowerCase())||o.type?.toString().toLowerCase().includes(t.toLowerCase())),[a,t]),d=Oe({data:i,columns:sn,getCoreRowModel:Be(),defaultColumn:{maxSize:300},getPaginationRowModel:$e()});return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(k,{variant:"bodySmall",className:"text-muted-foreground",children:[i.length," ",Ye(i.length,"parameter")]}),e.jsx("div",{className:"sm:col-span-2 md:col-span-2 lg:col-span-3",children:e.jsx(ue,{className:"sm:col-span-2 md:col-span-2 lg:col-span-3",placeholder:"Search parameters",value:n,onChange:o=>r(o.target.value)})})]}),e.jsx(bs,{table:d})]})},an=K("/deployments/deployment/$id"),rn=({deployment:s})=>{const{tab:n}=an.useSearch(),r=on(s);return e.jsxs(me,{defaultValue:r[0].value,value:n,children:[e.jsx(xe,{children:r.map(({value:a,LinkComponent:t})=>e.jsx(t,{},a))}),r.map(({value:a,ViewComponent:t})=>e.jsx(t,{},a))]})};function on(s){return c.useMemo(()=>[{value:"Runs",LinkComponent:()=>e.jsx(C,{to:".",search:{tab:"Runs"},children:e.jsx(P,{value:"Runs",children:"Runs"})}),ViewComponent:()=>e.jsx(L,{value:"Runs",children:e.jsx($s,{deployment:s})})},{value:"Upcoming",LinkComponent:()=>e.jsx(C,{to:".",search:{tab:"Upcoming"},children:e.jsx(P,{value:"Upcoming",children:"Upcoming"})}),ViewComponent:()=>e.jsx(L,{value:"Upcoming",children:e.jsx(qs,{deployment:s})})},{value:"Parameters",LinkComponent:()=>e.jsx(C,{to:".",search:{tab:"Parameters"},children:e.jsx(P,{value:"Parameters",children:"Parameters"})}),ViewComponent:()=>e.jsx(L,{value:"Parameters",children:e.jsx(tn,{deployment:s})})},{value:"Configuration",LinkComponent:()=>e.jsx(C,{to:".",search:{tab:"Configuration"},children:e.jsx(P,{value:"Configuration",children:"Configuration"})}),ViewComponent:()=>e.jsx(L,{value:"Configuration",children:e.jsx(zs,{deployment:s})})},{value:"Description",LinkComponent:()=>e.jsx(C,{to:".",search:{tab:"Description"},children:e.jsx(P,{value:"Description",children:"Description"})}),ViewComponent:()=>e.jsx(L,{value:"Description",children:e.jsx(Us,{deployment:s})})}],[s])}const v=()=>e.jsx("dd",{className:"text-muted-foreground text-sm",children:"None"}),ce=({children:s})=>e.jsx("dt",{className:"text-sm text-muted-foreground",children:s}),S=({className:s,children:n})=>e.jsx("dd",{className:pe("text-sm",s),children:n}),ln=({deployment:s})=>{const n=[{field:"Status",ComponentValue:()=>s.status?e.jsx("dd",{children:e.jsx(Ns,{status:s.status})}):e.jsx(v,{})},{field:"Created",ComponentValue:()=>s.created?e.jsx(S,{className:"font-mono",children:s.created}):e.jsx(v,{})},{field:"Updated",ComponentValue:()=>s.updated?e.jsx(S,{className:"font-mono",children:s.updated}):e.jsx(v,{})},{field:"Entrypoint",ComponentValue:()=>s.entrypoint?e.jsx(S,{children:s.entrypoint}):e.jsx(v,{})},{field:"Path",ComponentValue:()=>s.path?e.jsx(S,{children:s.path}):e.jsx(v,{})},{field:"Concurrency Limit",ComponentValue:()=>s.global_concurrency_limit?e.jsx(S,{children:s.global_concurrency_limit.limit}):e.jsx(v,{})}],r=[{field:"Flow ID",ComponentValue:()=>e.jsx(S,{children:s.flow_id})},{field:"Deployment ID",ComponentValue:()=>e.jsx(S,{children:s.id})},{field:"Deployment Version",ComponentValue:()=>s.version?e.jsx(S,{children:s.version}):e.jsx(v,{})},{field:"Storage Document ID",ComponentValue:()=>s.storage_document_id?e.jsx(S,{children:s.storage_document_id}):e.jsx(v,{})},{field:"Infrastructure Document ID",ComponentValue:()=>s.infrastructure_document_id?e.jsx(S,{children:s.infrastructure_document_id}):e.jsx(v,{})},{field:"Tags",ComponentValue:()=>s.tags&&s.tags.length>0?e.jsx("dd",{children:e.jsx(es,{tags:s.tags,maxTagsDisplayed:4})}):e.jsx(v,{})}];return e.jsxs("div",{children:[e.jsx("ul",{className:"flex flex-col gap-3",children:n.map(({field:a,ComponentValue:t})=>e.jsx("li",{children:e.jsxs("dl",{children:[e.jsx(ce,{children:a}),e.jsx(t,{})]})},a))}),e.jsx("hr",{className:"my-3"}),e.jsx("ul",{className:"flex flex-col gap-3",children:r.map(({field:a,ComponentValue:t})=>e.jsx("li",{children:e.jsxs("dl",{children:[e.jsx(ce,{children:a}),e.jsx(t,{})]})},a))})]})};var ze=Ts();const H=s=>{let n="",r=!1;try{ze.CronExpressionParser.parse(s),n=Ie.toString(s),r=!0}catch{r=!1,n="Invalid expression"}return{description:n,isCronValid:r}},cn=({onChange:s,...n})=>{const[r,a]=c.useState(H(String(n.value)).description),[t,i]=c.useState(H(String(n.value)).isCronValid),d=o=>{if(s){s(o);const{description:u,isCronValid:l}=H(o.target.value);a(u),i(l)}};return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(je,{...n,onChange:d}),e.jsx(k,{variant:"bodySmall",className:ks(t?"text-muted-foreground":"text-red-500"),children:r})]})},dn=s=>{try{return ze.CronExpressionParser.parse(s),!0}catch{return!1}},un=b({active:q(),schedule:b({cron:A().refine(dn),timezone:A().default("Etc/UTC"),day_or:q().default(!0)})}),W={active:!0,schedule:{cron:"* * * * *",timezone:"Etc/UTC",day_or:!0}},hn=({deployment_id:s,scheduleToEdit:n,onSubmit:r})=>{const{createDeploymentSchedule:a,isPending:t}=ge(),{updateDeploymentSchedule:i,isPending:d}=X(),o=Me({resolver:ke(un),defaultValues:W});c.useEffect(()=>{if(n){const{active:l,schedule:m}=n;if("cron"in m){const{cron:h,day_or:x,timezone:y}=m;o.reset({active:l,schedule:{cron:h,day_or:x,timezone:y??"Etc/UTC"}})}}else o.reset(W)},[o,n]);const u=l=>{const m=()=>{o.reset(W),r()};n?i({deployment_id:s,schedule_id:n.id,...l},{onSuccess:()=>{F.success("Deployment schedule updated")},onError:h=>{const x=h.message||"Unknown error while updating deployment schedule.";o.setError("root",{message:x})},onSettled:m}):a({deployment_id:s,...l},{onSuccess:()=>{F.success("Deployment schedule created")},onError:h=>{const x=h.message||"Unknown error while creating deployment schedule.";o.setError("root",{message:x})},onSettled:m})};return e.jsx(Le,{...o,children:e.jsxs("form",{onSubmit:l=>{o.handleSubmit(u)(l)},className:"space-y-4",children:[e.jsx(f,{children:o.formState.errors.root?.message}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(_,{control:o.control,name:"active",render:({field:l})=>e.jsxs(N,{children:[e.jsx(T,{children:"Active"}),e.jsx(R,{children:e.jsx(U,{className:"block",checked:l.value,onCheckedChange:l.onChange})}),e.jsx(f,{})]})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("div",{className:"w-3/4",children:e.jsx(_,{control:o.control,name:"schedule.cron",render:({field:l})=>e.jsxs(N,{children:[e.jsx(T,{children:"Value"}),e.jsx(R,{children:e.jsx(cn,{...l})}),e.jsx(f,{})]})})}),e.jsx(_,{control:o.control,name:"schedule.day_or",render:({field:l})=>e.jsxs(N,{children:[e.jsxs(T,{"aria-label":"Day Or",children:["Day Or ",e.jsx(mn,{})]}),e.jsx(R,{children:e.jsx(U,{className:"block",checked:l.value,onCheckedChange:l.onChange})}),e.jsx(f,{})]})})]}),e.jsx(_,{control:o.control,name:"schedule.timezone",render:({field:l})=>e.jsxs(N,{children:[e.jsx(T,{children:"Timezone"}),e.jsx(R,{children:e.jsx(Pe,{selectedValue:l.value,onSelect:l.onChange})}),e.jsx(f,{})]})})]}),e.jsxs(Z,{children:[e.jsx(Y,{asChild:!0,children:e.jsx(j,{variant:"outline",children:"Close"})}),e.jsx(j,{type:"submit",loading:t||d,children:"Save"})]})]})})},mn=()=>e.jsxs(fe,{children:[e.jsx(Y,{asChild:!0,children:e.jsx("button",{type:"button",className:"cursor-help",children:e.jsx(I,{id:"Info",className:"size-4 inline"})})}),e.jsxs(ve,{"aria-describedby":void 0,children:[e.jsx(Se,{children:e.jsx(Ce,{children:"Day Or"})}),e.jsx(k,{children:'When the "Day Or" value is off, this schedule will connect day of the month and day of the week entries using OR logic; when on it will connect them using AND logic.'})]})]}),xn=[{label:"Seconds",value:"seconds"},{label:"Minutes",value:"minutes"},{label:"Hours",value:"hours"},{label:"Days",value:"days"}],M={seconds:1,minutes:60,hours:3600,days:24*3600},pn=s=>{let n=s;const r=Math.floor(s/M.days);if(n%=M.days,n===0)return{interval_value:r,interval_time:"days"};const a=Math.floor(s/M.hours);if(n%=M.hours,n===0)return{interval_value:a,interval_time:"hours"};const t=Math.floor(s/M.minutes);return n%=M.minutes,n===0?{interval_value:t,interval_time:"minutes"}:{interval_value:n,interval_time:"seconds"}},jn=b({active:q(),schedule:b({interval_value:z().or(A()).pipe(Fs.number()),interval_time:V(["seconds","minutes","hours","days"]),anchor_date:Es(),timezone:A().default("Etc/UTC")})}),G={active:!0,schedule:{interval_value:60,interval_time:"minutes",anchor_date:new Date,timezone:"Etc/UTC"}},gn=({deployment_id:s,scheduleToEdit:n,onSubmit:r})=>{const{createDeploymentSchedule:a,isPending:t}=ge(),{updateDeploymentSchedule:i,isPending:d}=X(),o=Me({resolver:ke(jn),defaultValues:G});c.useEffect(()=>{if(n){const{active:l,schedule:m}=n;if("interval"in m){const{interval:h,anchor_date:x,timezone:y}=m,{interval_value:g,interval_time:p}=pn(h);o.reset({active:l,schedule:{interval_value:g,interval_time:p,anchor_date:x?new Date(x):new Date,timezone:y??"Etc/UTC"}})}}else o.reset(G)},[o,n]);const u=l=>{const m=()=>{o.reset(G),r()};n?i({deployment_id:s,schedule_id:n.id,active:l.active,schedule:{interval:l.schedule.interval_value*M[l.schedule.interval_time],anchor_date:l.schedule.anchor_date.toISOString(),timezone:l.schedule.timezone}},{onSuccess:()=>{F.success("Deployment schedule updated")},onError:h=>{const x=h.message||"Unknown error while updating deployment schedule.";o.setError("root",{message:x})},onSettled:m}):a({deployment_id:s,active:l.active,schedule:{interval:l.schedule.interval_value*M[l.schedule.interval_time],anchor_date:l.schedule.anchor_date.toISOString(),timezone:l.schedule.timezone}},{onSuccess:()=>{F.success("Deployment schedule created")},onError:h=>{const x=h.message||"Unknown error while creating deployment schedule.";o.setError("root",{message:x})},onSettled:m})};return e.jsx(Le,{...o,children:e.jsxs("form",{onSubmit:l=>{o.handleSubmit(u)(l)},className:"space-y-4",children:[e.jsx(f,{children:o.formState.errors.root?.message}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(_,{control:o.control,name:"active",render:({field:l})=>e.jsxs(N,{children:[e.jsx(T,{children:"Active"}),e.jsx(R,{children:e.jsx(U,{className:"block",checked:l.value,onCheckedChange:l.onChange})}),e.jsx(f,{})]})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("div",{className:"w-3/4",children:e.jsx(_,{control:o.control,name:"schedule.interval_value",render:({field:l})=>e.jsxs(N,{children:[e.jsx(T,{children:"Value"}),e.jsx(R,{children:e.jsx(je,{...l})}),e.jsx(f,{})]})})}),e.jsx(_,{control:o.control,name:"schedule.interval_time",render:({field:l})=>e.jsxs(N,{children:[e.jsx(T,{children:"Interval"}),e.jsxs(ss,{onValueChange:l.onChange,defaultValue:l.value,value:l.value,children:[e.jsx(R,{children:e.jsx(ns,{children:e.jsx(ts,{placeholder:"Select interval"})})}),e.jsx(as,{children:xn.map(({label:m,value:h})=>e.jsx(rs,{value:h,children:m},h))})]}),e.jsx(f,{})]})})]}),e.jsx(_,{control:o.control,name:"schedule.anchor_date",render:({field:l})=>e.jsxs(N,{className:"flex flex-col",children:[e.jsx(T,{children:"Anchor date"}),e.jsxs(os,{children:[e.jsx(ls,{asChild:!0,children:e.jsx(R,{children:e.jsxs(j,{variant:"outline",className:pe("w-full",!l.value&&"text-muted-foreground"),children:[is(l.value,"dateTime"),e.jsx(I,{id:"Calendar",className:"ml-auto size-4 opacity-50"})]})})}),e.jsx(cs,{className:"w-auto p-0",align:"start",children:e.jsx(ds,{mode:"single",selected:l.value,onSelect:l.onChange})})]}),e.jsx(f,{})]})}),e.jsx(_,{control:o.control,name:"schedule.timezone",render:({field:l})=>e.jsxs(N,{children:[e.jsx(T,{children:"Timezone"}),e.jsx(R,{children:e.jsx(Pe,{selectedValue:l.value,onSelect:l.onChange})}),e.jsx(f,{})]})})]}),e.jsxs(Z,{children:[e.jsx(Y,{asChild:!0,children:e.jsx(j,{variant:"outline",children:"Close"})}),e.jsx(j,{type:"submit",loading:t||d,children:"Save"})]})]})})},fn=()=>e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(k,{children:"Sorry, modifying RRule schedules via the UI is currently unsupported; select a different schedule type above or modify your schedule in code."}),e.jsxs(Z,{children:[e.jsx(Ms,{asChild:!0,children:e.jsx(j,{variant:"outline",children:"Close"})}),e.jsx(j,{disabled:!0,children:"Save"})]})]}),vn=({deploymentId:s,onOpenChange:n,open:r,scheduleToEdit:a,onSubmit:t})=>{const[i,d]=c.useState("interval");c.useEffect(()=>{if(!a)return;const{schedule:u}=a;"interval"in u?d("interval"):"cron"in u?d("cron"):d("rrule")},[a]);const o=[{value:"interval",label:"Interval",Component:()=>e.jsx(gn,{deployment_id:s,onSubmit:t,scheduleToEdit:a})},{value:"cron",label:"Cron",Component:()=>e.jsx(hn,{deployment_id:s,onSubmit:t,scheduleToEdit:a})},{value:"rrule",label:"RRule",Component:()=>e.jsx(fn,{})}];return e.jsx(fe,{open:r,onOpenChange:n,children:e.jsxs(ve,{"aria-describedby":void 0,children:[e.jsx(Se,{children:e.jsxs(Ce,{children:[a?"Edit":"Add"," Schedule"]})}),e.jsxs(me,{defaultValue:o[0].value,value:i,children:[e.jsx(xe,{children:o.map(({value:u,label:l})=>e.jsx(P,{value:u,onClick:()=>d(u),children:l},u))}),o.map(({value:u,Component:l})=>e.jsx(L,{value:u,children:e.jsx(l,{})},u))]})]})})},te=s=>{const{schedule:n}=s;return"interval"in n?`Every ${us(n.interval*1e3)}`:"cron"in n?Ie.toString(n.cron):Rs(n.rrule).toText()},Sn=()=>{const[s,n]=Is(),{deleteDeploymentSchedule:r}=hs();return[s,t=>n({title:"Delete Schedule",description:`Are you sure you want to delete ${te(t)} schedule?`,onConfirm:()=>{const{id:i,deployment_id:d}=t;if(!d)throw new Error("'deployment_id' expected");r({deployment_id:d,schedule_id:i},{onSuccess:()=>F.success("Schedule deleted"),onError:o=>{const u=o.message||"Unknown error while deleting schedule.";console.error(u)}})}})]},Cn=({deploymentSchedule:s,onEditSchedule:n})=>{const[r,a]=Sn(),t=o=>{navigator.clipboard.writeText(o),F.success("ID copied")},i=()=>a(s),d=()=>n(s.id);return e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(se,{asChild:!0,children:e.jsxs(j,{variant:"outline",className:"size-8 p-0",children:[e.jsx("span",{className:"sr-only",children:"Open menu"}),e.jsx(I,{id:"MoreVertical",className:"size-4"})]})}),e.jsxs(ne,{align:"end",children:[e.jsx(Ne,{children:"Actions"}),e.jsx(E,{onClick:()=>t(s.id),children:"Copy ID"}),e.jsx(E,{onClick:d,children:"Edit"}),e.jsx(E,{onClick:i,children:"Delete"})]})]}),e.jsx(_e,{...r})]})},Dn=({deploymentSchedule:s,disabled:n})=>{const{updateDeploymentSchedule:r}=X(),a=t=>{const{id:i,deployment_id:d}=s;if(!d)throw new Error("'deployment_id' expected");r({schedule_id:i,deployment_id:d,active:t},{onSuccess:()=>F.success(`Deployment schedule ${t?"active":"paused"}`),onError:o=>{const u=o.message||"Unknown error while updating deployment schedule.";console.error(u)}})};return e.jsx(De,{children:e.jsxs(we,{children:[e.jsx(ye,{asChild:!0,children:e.jsx("div",{children:e.jsx(U,{"aria-label":`toggle ${te(s)}`,checked:s.active,onCheckedChange:a,disabled:n})})}),n&&e.jsx(be,{children:"Pause or resume this schedule"})]})})},wn=({deploymentSchedule:s,disabled:n,onEditSchedule:r})=>e.jsx(ms,{className:"p-3",children:e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx(k,{children:te(s)}),e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx(Dn,{deploymentSchedule:s,disabled:n}),e.jsx(Cn,{deploymentSchedule:s,onEditSchedule:r})]})]})}),yn=({deployment:s})=>{const{updateDeployment:n}=xs(),r=t=>{n({id:s.id,paused:!t},{onSuccess:()=>{F.success(`Deployment ${t?"active":"paused"}`)},onError:i=>{const d=i.message||"Unknown error while updating deployment";console.error(d)}})},a=s.entrypoint===""||s.entrypoint===null;return e.jsx(De,{children:e.jsxs(we,{children:[e.jsx(ye,{asChild:!0,children:e.jsx("div",{children:e.jsx(U,{"aria-label":"Pause or resume all schedules",disabled:a,onCheckedChange:r,checked:!s.paused})})}),e.jsx(be,{children:"Pause or resume all schedules"})]})})},bn=3,_n=({deployment:s,onAddSchedule:n,onEditSchedule:r})=>{const a=c.useMemo(()=>s.schedules?s.schedules.sort((t,i)=>t.created?i.created?Date.parse(t.created)-Date.parse(i.created):1:-1):[],[s.schedules]);return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(k,{variant:"bodySmall",className:"text-muted-foreground",children:"Schedules"}),(a.length>bn||s.paused)&&e.jsx(yn,{deployment:s})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[a.map(t=>e.jsx(wn,{disabled:s.paused,deploymentSchedule:t,onEditSchedule:r},t.id)),e.jsx("div",{children:e.jsxs(j,{size:"sm",onClick:n,children:[e.jsx(I,{id:"Plus",className:"mr-2 size-4"})," Schedule"]})})]})]})},Nn=({deployment:s})=>e.jsx(c.Suspense,{fallback:e.jsx(En,{numSkeletons:2}),children:e.jsx(Tn,{deployment:s})}),Tn=({deployment:s})=>{const{data:n}=de(ps(`prefect.deployment.${s.id}`));return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Triggers"}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(Rn,{automations:n}),e.jsx(C,{to:"/automations/create",search:{actions:{type:"run-deployment",deploymentId:s.id,parameters:s.parameters}},children:e.jsxs(j,{size:"sm",children:[e.jsx(I,{id:"Plus",className:"mr-2 size-4"})," Add"]})})]})]})},Rn=({automations:s})=>e.jsx("ul",{className:"flex flex-col gap-1",children:s.map(n=>e.jsx("li",{children:e.jsxs(C,{to:"/automations/automation/$id",params:{id:n.id},className:"flex items-center text-xs",children:[e.jsx(I,{id:"Bot",className:"mr-1 size-4"}),e.jsx("div",{children:n.name})]})},n.id))}),En=({numSkeletons:s=1})=>e.jsx("ul",{className:"flex flex-col gap-1",children:Array.from({length:s}).map((n,r)=>e.jsx("li",{children:e.jsx(js,{className:"h-4 w-full"})},r))}),Fn=({deployment:s})=>{const{onQuickRun:n,isPending:r}=Ls();return e.jsxs(ee,{children:[e.jsx(se,{asChild:!0,children:e.jsxs(j,{loading:r,children:["Run ",e.jsx(I,{className:"ml-1 size-4",id:"Play"})]})}),e.jsx(ne,{children:e.jsxs(vs,{children:[e.jsx(E,{onClick:()=>n(s.id),children:"Quick run"}),e.jsx(C,{to:"/deployments/deployment/$id/run",params:{id:s.id},search:{parameters:s.parameters},children:e.jsx(E,{children:"Custom run"})})]})})]})},kn=({id:s})=>{const[n,r]=c.useState({open:!1,scheduleIdToEdit:""}),{data:a}=de(gs(s)),[t,i]=Ps(),d=c.useMemo(()=>{if(!(!a.schedules||!n.scheduleIdToEdit))return a.schedules.find(h=>h.id===n.scheduleIdToEdit)},[a.schedules,n.scheduleIdToEdit]),o=()=>r({open:!0,scheduleIdToEdit:""}),u=h=>r({open:!0,scheduleIdToEdit:h}),l=()=>r({open:!1,scheduleIdToEdit:""}),m=h=>{h||l()};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex align-middle justify-between",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(As,{deployment:a}),e.jsx(_s,{deployment:a})]}),e.jsxs("div",{className:"flex align-middle gap-2",children:[e.jsx(Fn,{deployment:a}),e.jsx(Vs,{id:s,onDelete:()=>i(a,{shouldNavigate:!0})})]})]}),e.jsxs("div",{className:"grid gap-4",style:{gridTemplateColumns:"5fr 1fr"},children:[e.jsx("div",{className:"flex flex-col gap-5",children:e.jsx(rn,{deployment:a})}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(_n,{deployment:a,onAddSchedule:o,onEditSchedule:u}),e.jsx(Nn,{deployment:a}),e.jsx("hr",{}),e.jsx(ln,{deployment:a})]})]})]}),e.jsx(vn,{deploymentId:s,open:n.open,onOpenChange:m,scheduleToEdit:d,onSubmit:l}),e.jsx(_e,{...t})]})};b({tab:V(["Runs","Upcoming","Parameters","Configuration","Description"]).default("Runs"),runs:b({flowRuns:b({name:A().optional(),state:ie(V(le)).optional().default(J).catch(J)}).optional(),page:z().int().positive().optional().default(1).catch(1),limit:z().int().positive().optional().default(10).catch(10),sort:V(oe).optional().default("START_TIME_DESC").catch("START_TIME_DESC")}).optional(),upcoming:b({flowRuns:b({name:A().optional(),state:ie(V(le)).optional().default(["Scheduled"]).catch(["Scheduled"])}).optional(),page:z().int().positive().optional().default(1).catch(1),limit:z().int().positive().optional().default(5).catch(5),sort:V(oe).optional().default("START_TIME_ASC").catch("START_TIME_ASC")}).optional()});function at(){const{id:s}=fs.useParams();return e.jsx(kn,{id:s})}export{at as component};
2
- //# sourceMappingURL=deployment._id-DVmqclRz.js.map
@@ -1,2 +0,0 @@
1
- import{p as m,j as o}from"./vendor-tanstack-BK8oseNA.js";import{cJ as p,dH as r}from"./index-WYPZo52S.js";import{D as i}from"./deployment-action-header-C6v2kZ6V.js";import{D as s}from"./deployment-form-D9d5sZM2.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CznP1SOq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-forms-DxqqmhL5.js";import"./vendor-date-7GxEwcQM.js";import"./schema-form-input-string-format-datetime-BhL8C5NS.js";import"./zod-DgSl2Nua.js";import"./use-debounce-callback-ClAx-Wwx.js";import"./toggle-group-D3zeurIL.js";import"./timezone-select-BG3cL3-U.js";import"./dropdown-menu-xZ_3w9OP.js";import"./form-BTub_PhK.js";import"./tags-input-D1RJZEUA.js";const n=({id:t})=>{const{data:e}=m(p(t));return o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsx(i,{deployment:e,action:"Duplicate"}),o.jsx(s,{deployment:e,mode:"duplicate"})]})};function v(){const{id:t}=r.useParams();return o.jsx(n,{id:t})}export{v as component};
2
- //# sourceMappingURL=deployment_._id.duplicate-DVMjpk5m.js.map
@@ -1,2 +0,0 @@
1
- import{p as m,j as o}from"./vendor-tanstack-BK8oseNA.js";import{cJ as r,dE as p}from"./index-WYPZo52S.js";import{D as i}from"./deployment-action-header-C6v2kZ6V.js";import{D as s}from"./deployment-form-D9d5sZM2.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CznP1SOq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-forms-DxqqmhL5.js";import"./vendor-date-7GxEwcQM.js";import"./schema-form-input-string-format-datetime-BhL8C5NS.js";import"./zod-DgSl2Nua.js";import"./use-debounce-callback-ClAx-Wwx.js";import"./toggle-group-D3zeurIL.js";import"./timezone-select-BG3cL3-U.js";import"./dropdown-menu-xZ_3w9OP.js";import"./form-BTub_PhK.js";import"./tags-input-D1RJZEUA.js";const n=({id:t})=>{const{data:e}=m(r(t));return o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsx(i,{deployment:e,action:"Edit"}),o.jsx(s,{deployment:e,mode:"edit"})]})};function v(){const{id:t}=p.useParams();return o.jsx(n,{id:t})}export{v as component};
2
- //# sourceMappingURL=deployment_._id.edit-Ck_P6KDn.js.map
@@ -1,2 +0,0 @@
1
- import{r as a,j as e}from"./vendor-tanstack-BK8oseNA.js";import{A as O,u as c,l as L,h as F,f as M,p as q,m as U,g as $,y as B,_ as z,d as K,a as I,i as Q,v as X,x as J,b as V,c as W,e as A}from"./vendor-graphs-Diy0Lo-N.js";import{da as G,bP as k,bQ as _,p as h,I as S,bR as N,ak as D,i as g,F as b,cC as Y,cD as Z,cE as ee,z as te}from"./index-WYPZo52S.js";import{p as d}from"./vendor-date-7GxEwcQM.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CznP1SOq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-forms-DxqqmhL5.js";async function se(t){const{data:s}=await(await G()).GET("/flow_runs/{id}/graph-v2",{params:{path:{id:t}}});if(!s)throw new Error("No data returned from API");return ae(s)}async function re({since:t,until:s,nodeId:n}){const{data:i}=await(await G()).POST("/events/filter",{body:{filter:{any_resource:{id:[`prefect.flow-run.${n}`]},event:{exclude_prefix:["prefect.log.write","prefect.task-run."]},occurred:{since:t.toISOString(),until:s.toISOString()},order:"ASC"},limit:200}});if(!i)throw new Error("No data returned from API");return ne(i)}function ae(t){if(!t.start_time)throw new Error("Start time is required");return{root_node_ids:t.root_node_ids,start_time:d(t.start_time),end_time:t.end_time?d(t.end_time):null,nodes:new Map(t.nodes.map(s=>ie(s)))}}function ne(t){return t.events.map(s=>{if(!s.received)throw new Error("Received is required");return{id:s.id,received:d(s.received),occurred:d(s.occurred),event:s.event,resource:s.resource,payload:s.payload,related:s.related??[]}})}function ie([t,s]){if(!s.start_time)throw new Error("Start time is required");return[t,{kind:s.kind,id:s.id,label:s.label,state_type:s.state_type,start_time:d(s.start_time),end_time:s.end_time?d(s.end_time):null,parents:s.parents,children:s.children,artifacts:s.artifacts.map(le)}]}function le(t){if(!t.type)throw new Error("Artifact type is required");return t.type==="progress"&&typeof t.data=="number"?{id:t.id,created:d(t.created),key:t.key??void 0,type:t.type,data:t.data}:{id:t.id,created:d(t.created),key:t.key??void 0,type:t.type}}const R={COMPLETED:"var(--state-completed-600)",RUNNING:"var(--state-running-700)",SCHEDULED:"var(--state-scheduled-700)",PENDING:"var(--state-pending-800)",FAILED:"var(--state-failed-700)",CANCELLED:"var(--state-cancelled-600)",CANCELLING:"var(--state-cancelling-600)",CRASHED:"var(--state-crashed-600)",PAUSED:"var(--state-paused-800)"};function H(t){return!t||!(t instanceof HTMLElement)?!1:["INPUT","TEXTAREA","SELECT"].includes(t.tagName)}const T=()=>{O({animate:!0})};function ce(){return a.useEffect(()=>{const t=new AbortController;return document.addEventListener("keydown",s=>{H(s.target)||s.metaKey||s.ctrlKey||s.key==="c"&&T()},{signal:t.signal}),()=>t.abort()},[]),e.jsxs(k,{children:[e.jsx(_,{asChild:!0,children:e.jsx(h,{variant:"outline",size:"icon",onClick:T,children:e.jsx(S,{id:"Crosshair",className:"size-4"})})}),e.jsx(N,{children:"Recenter (c)"})]})}function oe({fullscreen:t,onFullscreenChange:s}){const n=a.useCallback(()=>{s(!t)},[t,s]);return a.useEffect(()=>{const i=new AbortController;return document.addEventListener("keydown",l=>{if(!(H(l.target)||l.metaKey||l.ctrlKey)){if(l.key==="f"){n();return}if(l.key==="Escape"){n();return}}},{signal:i.signal}),()=>i.abort()},[n]),e.jsxs(k,{children:[e.jsx(_,{asChild:!0,children:e.jsx(h,{variant:"outline",size:"icon",onClick:n,children:e.jsx(S,{id:"Expand",className:"size-4"})})}),e.jsx(N,{children:"Fullscreen (f)"})]})}const de=[{label:"Temporal dependency",value:"temporal_nearest-parent"},{label:"Temporal sequence",value:"temporal_waterfall"},{label:"Dependency grid",value:"dependency_nearest-parent"},{label:"Sequential grid",value:"dependency_waterfall"},{label:"Comparative duration",value:"left-aligned_duration-sorted"}],ue=()=>{const t=I+1,s=c.horizontalScaleMultiplier*t;z(s)},he=()=>{const t=Math.abs(I-1),s=c.horizontalScaleMultiplier*t;z(s)},pe=()=>{K()};function fe(t){const[s,n]=t.split("_");return L(s)&&F(n)}function me(){const[t,s]=a.useState(`${c.horizontal}_${c.vertical}`),[n,i]=a.useState(c.disableEdges),[l,v]=a.useState(c.disableArtifacts),[E,y]=a.useState(c.disableEvents),f=a.useCallback(r=>{if(!fe(r))return;const[u,m]=r.split("_");!L(u)||!F(m)||(s(r),M(u),q(m))},[]),p=a.useCallback(r=>{i(r),U(r)},[]),j=a.useCallback(r=>{v(r),$(r)},[]),C=a.useCallback(r=>{y(r),B(r)},[]);return e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(D,{variant:"bodyLarge",children:"Layout"}),e.jsx("div",{className:"flex flex-col gap-2",children:de.map(r=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"radio",id:r.value,name:"layout",value:r.value,checked:t===r.value,onChange:u=>f(u.target.value)}),e.jsx(g,{htmlFor:r.value,children:r.label})]},r.value))})]}),(c.isTemporal()||c.isLeftAligned())&&e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(D,{variant:"bodyLarge",children:"Scaling"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(h,{variant:"outline",size:"sm",onClick:he,title:"Decrease scale (-)",children:"-"}),e.jsx(h,{variant:"outline",size:"sm",onClick:ue,title:"Increase scale (+)",children:"+"}),e.jsx(h,{variant:"outline",size:"sm",onClick:pe,children:"Reset"})]})]}),e.jsx("hr",{className:"my-4"}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(b,{id:"hideEdges",checked:n,onCheckedChange:p}),e.jsx(g,{htmlFor:"hideEdges",children:"Hide dependency arrows"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(b,{id:"hideArtifacts",checked:l,onCheckedChange:j}),e.jsx(g,{htmlFor:"hideArtifacts",children:"Hide artifacts"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(b,{id:"hideEvents",checked:E,onCheckedChange:C}),e.jsx(g,{htmlFor:"hideEvents",children:"Hide events"})]})]})]})}function xe(){return e.jsxs(Y,{children:[e.jsx(Z,{children:e.jsxs(k,{children:[e.jsx(_,{asChild:!0,children:e.jsx(h,{variant:"outline",size:"icon",children:e.jsx(S,{id:"Cog",className:"size-4"})})}),e.jsx(N,{children:"Settings"})]})}),e.jsx(ee,{children:e.jsx(me,{})})]})}function ge({fullscreen:t,onFullscreenChange:s}){return e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ce,{}),e.jsx(oe,{fullscreen:t,onFullscreenChange:s}),e.jsx(xe,{})]})}function _e({flowRunId:t,viewport:s,onViewportChange:n,selected:i,onSelectedChange:l,className:v,style:E,fullscreen:y,onFullscreenChange:f}){const p=a.useRef(null),[j,C]=a.useState(!1),{resolvedTheme:r}=te(),u=y??j,m=a.useCallback(o=>{C(o),f?.(o)},[f]),x=a.useMemo(()=>({runId:t,fetch:se,fetchEvents:re,styles:()=>({node:o=>({background:R[o.state_type]}),state:o=>({background:R[o.type]})}),theme:r==="dark"?"dark":"light"}),[t,r]);return a.useEffect(()=>{Q(x)},[x]),a.useEffect(()=>{if(!p.current)throw new Error("Stage does not exist");return X({stage:p.current,config:x}),()=>{J()}},[x]),a.useEffect(()=>{V(i??null)},[i]),a.useEffect(()=>{W(s)},[s]),a.useEffect(()=>{const o=A.on("itemSelected",w=>l?.(w??void 0)),P=A.on("viewportDateRangeUpdated",w=>n?.(w));return()=>{o(),P()}},[l,n]),e.jsxs("div",{className:`${u?"fixed h-screen w-screen z-20":"relative h-[500px] w-full "} ${v??""}`,style:E,children:[e.jsx("div",{ref:p,className:"size-full [&>canvas]:size-full"}),e.jsx("div",{className:"absolute bottom-0 right-0",children:e.jsx(ge,{fullscreen:u,onFullscreenChange:m})})]})}export{_e as FlowRunGraph};
2
- //# sourceMappingURL=flow-run-graph-CfoPEAgQ.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flow-run-graph-CfoPEAgQ.js","sources":["../../src/components/flow-runs/flow-run-graph/api.ts","../../src/components/flow-runs/flow-run-graph/consts.ts","../../src/components/flow-runs/flow-run-graph/utilities.ts","../../src/components/flow-runs/flow-run-graph/flow-run-graph-center-button.tsx","../../src/components/flow-runs/flow-run-graph/flow-run-graph-fullscreen-button.tsx","../../src/components/flow-runs/flow-run-graph/flow-run-graph-settings.tsx","../../src/components/flow-runs/flow-run-graph/flow-run-graph-settings-button.tsx","../../src/components/flow-runs/flow-run-graph/flow-run-graph-actions.tsx","../../src/components/flow-runs/flow-run-graph/flow-run-graph.tsx"],"sourcesContent":["import type {\n\tEventRelatedResource,\n\tRunGraphArtifact,\n\tRunGraphData,\n\tRunGraphEvent,\n\tRunGraphEventResource,\n\tRunGraphFetchEventsContext,\n\tRunGraphNode,\n} from \"@prefecthq/graphs\";\nimport { parseISO } from \"date-fns\";\nimport type { components } from \"@/api/prefect\";\nimport { getQueryService } from \"@/api/service\";\n\n/**\n * Fetches the graph data for a flow run.\n * @param id - The ID of the flow run.\n * @returns The graph data for the flow run.\n */\nexport async function fetchFlowRunGraph(id: string): Promise<RunGraphData> {\n\tconst { data } = await (await getQueryService()).GET(\n\t\t\"/flow_runs/{id}/graph-v2\",\n\t\t{\n\t\t\tparams: { path: { id } },\n\t\t},\n\t);\n\n\tif (!data) {\n\t\tthrow new Error(\"No data returned from API\");\n\t}\n\n\treturn mapApiResponseToRunGraphData(data);\n}\n\n/**\n * Fetches events for a flow run.\n * @param since - The start date of the events to fetch.\n * @param until - The end date of the events to fetch.\n * @param nodeId - The flowRunId of the node to fetch events for.\n * @returns The events for the flow run.\n */\nexport async function fetchFlowRunEvents({\n\tsince,\n\tuntil,\n\tnodeId,\n}: RunGraphFetchEventsContext): Promise<RunGraphEvent[]> {\n\tconst { data } = await (await getQueryService()).POST(\"/events/filter\", {\n\t\tbody: {\n\t\t\tfilter: {\n\t\t\t\tany_resource: {\n\t\t\t\t\tid: [`prefect.flow-run.${nodeId}`],\n\t\t\t\t},\n\t\t\t\tevent: {\n\t\t\t\t\texclude_prefix: [\"prefect.log.write\", \"prefect.task-run.\"],\n\t\t\t\t},\n\t\t\t\toccurred: {\n\t\t\t\t\tsince: since.toISOString(),\n\t\t\t\t\tuntil: until.toISOString(),\n\t\t\t\t},\n\t\t\t\torder: \"ASC\",\n\t\t\t},\n\t\t\tlimit: 200,\n\t\t},\n\t});\n\n\tif (!data) {\n\t\tthrow new Error(\"No data returned from API\");\n\t}\n\n\treturn mapApiResponseToRunGraphEvents(data);\n}\n\ntype GraphResponse = components[\"schemas\"][\"Graph\"];\ntype GraphResponseNode = GraphResponse[\"nodes\"][number];\ntype GraphResponseArtifact = GraphResponse[\"artifacts\"][number];\ntype EventsResponse = components[\"schemas\"][\"EventPage\"];\n\nfunction mapApiResponseToRunGraphData(response: GraphResponse): RunGraphData {\n\tif (!response.start_time) {\n\t\tthrow new Error(\"Start time is required\");\n\t}\n\n\treturn {\n\t\troot_node_ids: response.root_node_ids,\n\t\tstart_time: parseISO(response.start_time),\n\t\tend_time: response.end_time ? parseISO(response.end_time) : null,\n\t\tnodes: new Map(response.nodes.map((node) => mapNode(node))),\n\t};\n}\n\nexport function mapApiResponseToRunGraphEvents(\n\tresponse: EventsResponse,\n): RunGraphEvent[] {\n\treturn response.events.map((event) => {\n\t\tif (!event.received) {\n\t\t\tthrow new Error(\"Received is required\");\n\t\t}\n\n\t\tconst runGraphEvent: RunGraphEvent = {\n\t\t\tid: event.id,\n\t\t\treceived: parseISO(event.received),\n\t\t\toccurred: parseISO(event.occurred),\n\t\t\tevent: event.event,\n\t\t\tresource: event.resource as RunGraphEventResource,\n\t\t\tpayload: event.payload,\n\t\t\trelated: (event.related ?? []) as EventRelatedResource[],\n\t\t};\n\n\t\treturn runGraphEvent;\n\t});\n}\n\nfunction mapNode([id, node]: GraphResponseNode): [string, RunGraphNode] {\n\tif (!node.start_time) {\n\t\tthrow new Error(\"Start time is required\");\n\t}\n\n\treturn [\n\t\tid,\n\t\t{\n\t\t\tkind: node.kind,\n\t\t\tid: node.id,\n\t\t\tlabel: node.label,\n\t\t\tstate_type: node.state_type,\n\t\t\tstart_time: parseISO(node.start_time),\n\t\t\tend_time: node.end_time ? parseISO(node.end_time) : null,\n\t\t\tparents: node.parents,\n\t\t\tchildren: node.children,\n\t\t\tartifacts: node.artifacts.map(mapArtifact),\n\t\t},\n\t];\n}\n\nfunction mapArtifact(artifact: GraphResponseArtifact): RunGraphArtifact {\n\tif (!artifact.type) {\n\t\tthrow new Error(\"Artifact type is required\");\n\t}\n\n\tif (artifact.type === \"progress\" && typeof artifact.data === \"number\") {\n\t\treturn {\n\t\t\tid: artifact.id,\n\t\t\tcreated: parseISO(artifact.created),\n\t\t\tkey: artifact.key ?? undefined,\n\t\t\ttype: artifact.type,\n\t\t\tdata: artifact.data,\n\t\t};\n\t}\n\n\treturn {\n\t\tid: artifact.id,\n\t\tcreated: parseISO(artifact.created),\n\t\tkey: artifact.key ?? undefined,\n\t\ttype: artifact.type as Exclude<RunGraphArtifact[\"type\"], \"progress\">,\n\t};\n}\n","import type { StateType } from \"@prefecthq/graphs\";\n\nexport const stateTypeColors: Record<StateType, string> = {\n\tCOMPLETED: \"var(--state-completed-600)\",\n\tRUNNING: \"var(--state-running-700)\",\n\tSCHEDULED: \"var(--state-scheduled-700)\",\n\tPENDING: \"var(--state-pending-800)\",\n\tFAILED: \"var(--state-failed-700)\",\n\tCANCELLED: \"var(--state-cancelled-600)\",\n\tCANCELLING: \"var(--state-cancelling-600)\",\n\tCRASHED: \"var(--state-crashed-600)\",\n\tPAUSED: \"var(--state-paused-800)\",\n};\n","export function isEventTargetInput(target: EventTarget | null): boolean {\n\tif (!target || !(target instanceof HTMLElement)) {\n\t\treturn false;\n\t}\n\treturn [\"INPUT\", \"TEXTAREA\", \"SELECT\"].includes(target.tagName);\n}\n","import { centerViewport } from \"@prefecthq/graphs\";\nimport { useEffect } from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport { Icon } from \"@/components/ui/icons/icon\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { isEventTargetInput } from \"./utilities\";\n\nconst center = () => {\n\tvoid centerViewport({ animate: true });\n};\n\nexport function FlowRunGraphCenterButton() {\n\tuseEffect(() => {\n\t\tconst controller = new AbortController();\n\n\t\tdocument.addEventListener(\n\t\t\t\"keydown\",\n\t\t\t(event: KeyboardEvent) => {\n\t\t\t\tif (\n\t\t\t\t\tisEventTargetInput(event.target) ||\n\t\t\t\t\tevent.metaKey ||\n\t\t\t\t\tevent.ctrlKey\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (event.key === \"c\") {\n\t\t\t\t\tcenter();\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ signal: controller.signal },\n\t\t);\n\n\t\treturn () => controller.abort();\n\t}, []);\n\n\treturn (\n\t\t<Tooltip>\n\t\t\t<TooltipTrigger asChild>\n\t\t\t\t<Button variant=\"outline\" size=\"icon\" onClick={center}>\n\t\t\t\t\t<Icon id=\"Crosshair\" className=\"size-4\" />\n\t\t\t\t</Button>\n\t\t\t</TooltipTrigger>\n\t\t\t<TooltipContent>Recenter (c)</TooltipContent>\n\t\t</Tooltip>\n\t);\n}\n","import { useCallback, useEffect } from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport { Icon } from \"@/components/ui/icons/icon\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { isEventTargetInput } from \"./utilities\";\n\ntype FlowRunGraphFullscreenButtonProps = {\n\tfullscreen: boolean;\n\tonFullscreenChange: (fullscreen: boolean) => void;\n};\n\nexport function FlowRunGraphFullscreenButton({\n\tfullscreen,\n\tonFullscreenChange,\n}: FlowRunGraphFullscreenButtonProps) {\n\tconst toggleFullscreen = useCallback(() => {\n\t\tonFullscreenChange(!fullscreen);\n\t}, [fullscreen, onFullscreenChange]);\n\n\tuseEffect(() => {\n\t\tconst controller = new AbortController();\n\n\t\tdocument.addEventListener(\n\t\t\t\"keydown\",\n\t\t\t(event: KeyboardEvent) => {\n\t\t\t\tif (\n\t\t\t\t\tisEventTargetInput(event.target) ||\n\t\t\t\t\tevent.metaKey ||\n\t\t\t\t\tevent.ctrlKey\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (event.key === \"f\") {\n\t\t\t\t\ttoggleFullscreen();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (event.key === \"Escape\") {\n\t\t\t\t\ttoggleFullscreen();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ signal: controller.signal },\n\t\t);\n\n\t\treturn () => controller.abort();\n\t}, [toggleFullscreen]);\n\n\treturn (\n\t\t<Tooltip>\n\t\t\t<TooltipTrigger asChild>\n\t\t\t\t<Button variant=\"outline\" size=\"icon\" onClick={toggleFullscreen}>\n\t\t\t\t\t<Icon id=\"Expand\" className=\"size-4\" />\n\t\t\t\t</Button>\n\t\t\t</TooltipTrigger>\n\t\t\t<TooltipContent>Fullscreen (f)</TooltipContent>\n\t\t</Tooltip>\n\t);\n}\n","import {\n\tDEFAULT_HORIZONTAL_SCALE_MULTIPLIER,\n\ttype HorizontalMode,\n\tisHorizontalMode,\n\tisVerticalMode,\n\tlayout,\n\tresetHorizontalScaleMultiplier,\n\tsetDisabledArtifacts,\n\tsetDisabledEdges,\n\tsetDisabledEvents,\n\tsetHorizontalMode,\n\tsetHorizontalScaleMultiplier,\n\tsetVerticalMode,\n\ttype VerticalMode,\n} from \"@prefecthq/graphs\";\nimport { useCallback, useState } from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport { Label } from \"@/components/ui/label\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { Typography } from \"@/components/ui/typography\";\n\ntype LayoutOption = `${HorizontalMode}_${VerticalMode}`;\n\nconst layoutOptions: { label: string; value: LayoutOption }[] = [\n\t{\n\t\tlabel: \"Temporal dependency\",\n\t\tvalue: \"temporal_nearest-parent\",\n\t},\n\t{\n\t\tlabel: \"Temporal sequence\",\n\t\tvalue: \"temporal_waterfall\",\n\t},\n\t{\n\t\tlabel: \"Dependency grid\",\n\t\tvalue: \"dependency_nearest-parent\",\n\t},\n\t{\n\t\tlabel: \"Sequential grid\",\n\t\tvalue: \"dependency_waterfall\",\n\t},\n\t{\n\t\tlabel: \"Comparative duration\",\n\t\tvalue: \"left-aligned_duration-sorted\",\n\t},\n];\n\nconst increaseScale = () => {\n\tconst multiplier = DEFAULT_HORIZONTAL_SCALE_MULTIPLIER + 1;\n\tconst scale = layout.horizontalScaleMultiplier * multiplier;\n\tsetHorizontalScaleMultiplier(scale);\n};\n\nconst decreaseScale = () => {\n\tconst multiplier = Math.abs(DEFAULT_HORIZONTAL_SCALE_MULTIPLIER - 1);\n\tconst scale = layout.horizontalScaleMultiplier * multiplier;\n\tsetHorizontalScaleMultiplier(scale);\n};\n\nconst resetScale = () => {\n\tresetHorizontalScaleMultiplier();\n};\n\nfunction isLayoutOption(value: string): value is LayoutOption {\n\tconst [horizontal, vertical] = value.split(\"_\");\n\treturn isHorizontalMode(horizontal) && isVerticalMode(vertical);\n}\n\nexport function FlowRunGraphSettings() {\n\tconst [selectedLayoutOption, setSelectedLayoutOption] = useState(\n\t\t`${layout.horizontal}_${layout.vertical}`,\n\t);\n\tconst [hideEdges, setHideEdges] = useState(layout.disableEdges);\n\tconst [hideArtifacts, setHideArtifacts] = useState(layout.disableArtifacts);\n\tconst [hideEvents, setHideEvents] = useState(layout.disableEvents);\n\n\tconst handleLayoutChange = useCallback((value: string) => {\n\t\tif (!isLayoutOption(value)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst [horizontal, vertical] = value.split(\"_\");\n\n\t\tif (!isHorizontalMode(horizontal) || !isVerticalMode(vertical)) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetSelectedLayoutOption(value);\n\t\tsetHorizontalMode(horizontal);\n\t\tsetVerticalMode(vertical);\n\t}, []);\n\n\tconst handleHideEdgesChange = useCallback((value: boolean) => {\n\t\tsetHideEdges(value);\n\t\tsetDisabledEdges(value);\n\t}, []);\n\n\tconst handleHideArtifactsChange = useCallback((value: boolean) => {\n\t\tsetHideArtifacts(value);\n\t\tsetDisabledArtifacts(value);\n\t}, []);\n\n\tconst handleHideEventsChange = useCallback((value: boolean) => {\n\t\tsetHideEvents(value);\n\t\tsetDisabledEvents(value);\n\t}, []);\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t<Typography variant=\"bodyLarge\">Layout</Typography>\n\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t{layoutOptions.map((option) => (\n\t\t\t\t\t\t<div key={option.value} className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\tid={option.value}\n\t\t\t\t\t\t\t\tname=\"layout\"\n\t\t\t\t\t\t\t\tvalue={option.value}\n\t\t\t\t\t\t\t\tchecked={selectedLayoutOption === option.value}\n\t\t\t\t\t\t\t\tonChange={(e) => handleLayoutChange(e.target.value)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Label htmlFor={option.value}>{option.label}</Label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t{(layout.isTemporal() || layout.isLeftAligned()) && (\n\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t<Typography variant=\"bodyLarge\">Scaling</Typography>\n\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\tonClick={decreaseScale}\n\t\t\t\t\t\t\ttitle=\"Decrease scale (-)\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t-\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\tonClick={increaseScale}\n\t\t\t\t\t\t\ttitle=\"Increase scale (+)\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t+\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button variant=\"outline\" size=\"sm\" onClick={resetScale}>\n\t\t\t\t\t\t\tReset\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t<hr className=\"my-4\" />\n\n\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t<Switch\n\t\t\t\t\t\tid=\"hideEdges\"\n\t\t\t\t\t\tchecked={hideEdges}\n\t\t\t\t\t\tonCheckedChange={handleHideEdgesChange}\n\t\t\t\t\t/>\n\t\t\t\t\t<Label htmlFor=\"hideEdges\">Hide dependency arrows</Label>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t<Switch\n\t\t\t\t\t\tid=\"hideArtifacts\"\n\t\t\t\t\t\tchecked={hideArtifacts}\n\t\t\t\t\t\tonCheckedChange={handleHideArtifactsChange}\n\t\t\t\t\t/>\n\t\t\t\t\t<Label htmlFor=\"hideArtifacts\">Hide artifacts</Label>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t<Switch\n\t\t\t\t\t\tid=\"hideEvents\"\n\t\t\t\t\t\tchecked={hideEvents}\n\t\t\t\t\t\tonCheckedChange={handleHideEventsChange}\n\t\t\t\t\t/>\n\t\t\t\t\t<Label htmlFor=\"hideEvents\">Hide events</Label>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","import { Button } from \"@/components/ui/button\";\nimport { Icon } from \"@/components/ui/icons/icon\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { FlowRunGraphSettings } from \"./flow-run-graph-settings\";\n\nexport function FlowRunGraphSettingsButton() {\n\treturn (\n\t\t<Popover>\n\t\t\t<PopoverTrigger>\n\t\t\t\t<Tooltip>\n\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t<Button variant=\"outline\" size=\"icon\">\n\t\t\t\t\t\t\t<Icon id=\"Cog\" className=\"size-4\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t<TooltipContent>Settings</TooltipContent>\n\t\t\t\t</Tooltip>\n\t\t\t</PopoverTrigger>\n\t\t\t<PopoverContent>\n\t\t\t\t<FlowRunGraphSettings />\n\t\t\t</PopoverContent>\n\t\t</Popover>\n\t);\n}\n","import { FlowRunGraphCenterButton } from \"./flow-run-graph-center-button\";\nimport { FlowRunGraphFullscreenButton } from \"./flow-run-graph-fullscreen-button\";\nimport { FlowRunGraphSettingsButton } from \"./flow-run-graph-settings-button\";\n\ntype FlowRunGraphActionsProps = {\n\tfullscreen: boolean;\n\tonFullscreenChange: (fullscreen: boolean) => void;\n};\n\nexport function FlowRunGraphActions({\n\tfullscreen,\n\tonFullscreenChange,\n}: FlowRunGraphActionsProps) {\n\treturn (\n\t\t<div className=\"flex gap-2\">\n\t\t\t<FlowRunGraphCenterButton />\n\t\t\t<FlowRunGraphFullscreenButton\n\t\t\t\tfullscreen={fullscreen}\n\t\t\t\tonFullscreenChange={onFullscreenChange}\n\t\t\t/>\n\t\t\t<FlowRunGraphSettingsButton />\n\t\t</div>\n\t);\n}\n","import {\n\temitter,\n\ttype GraphItemSelection,\n\ttype RunGraphConfig,\n\ttype RunGraphNode,\n\ttype RunGraphStateEvent,\n\tselectItem,\n\tsetConfig,\n\tstart,\n\tstop,\n\tupdateViewportFromDateRange,\n\ttype ViewportDateRange,\n} from \"@prefecthq/graphs\";\nimport { useTheme } from \"next-themes\";\nimport {\n\ttype CSSProperties,\n\tuseCallback,\n\tuseEffect,\n\tuseMemo,\n\tuseRef,\n\tuseState,\n} from \"react\";\nimport { fetchFlowRunEvents, fetchFlowRunGraph } from \"./api\";\nimport { stateTypeColors } from \"./consts\";\nimport { FlowRunGraphActions } from \"./flow-run-graph-actions\";\n\ntype FlowRunGraphProps = {\n\tflowRunId: string;\n\tviewport?: ViewportDateRange;\n\tonViewportChange?: (viewport: ViewportDateRange) => void;\n\tselected?: GraphItemSelection;\n\tonSelectedChange?: (selected: GraphItemSelection | undefined) => void;\n\tfullscreen?: boolean;\n\tonFullscreenChange?: (fullscreen: boolean) => void;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n};\n\nexport function FlowRunGraph({\n\tflowRunId,\n\tviewport,\n\tonViewportChange,\n\tselected,\n\tonSelectedChange,\n\tclassName,\n\tstyle,\n\tfullscreen: controlledFullscreen,\n\tonFullscreenChange,\n}: FlowRunGraphProps) {\n\tconst stageRef = useRef<HTMLDivElement>(null);\n\tconst [internalFullscreen, setInternalFullscreen] = useState(false);\n\tconst { resolvedTheme } = useTheme();\n\n\tconst fullscreen = controlledFullscreen ?? internalFullscreen;\n\n\tconst updateFullscreen = useCallback(\n\t\t(value: boolean) => {\n\t\t\tsetInternalFullscreen(value);\n\t\t\tonFullscreenChange?.(value);\n\t\t},\n\t\t[onFullscreenChange],\n\t);\n\n\tconst config = useMemo<RunGraphConfig>(\n\t\t() => ({\n\t\t\trunId: flowRunId,\n\t\t\tfetch: fetchFlowRunGraph,\n\t\t\tfetchEvents: fetchFlowRunEvents,\n\t\t\tstyles: () => ({\n\t\t\t\tnode: (node: RunGraphNode) => ({\n\t\t\t\t\tbackground: stateTypeColors[node.state_type],\n\t\t\t\t}),\n\t\t\t\tstate: (event: RunGraphStateEvent) => ({\n\t\t\t\t\tbackground: stateTypeColors[event.type],\n\t\t\t\t}),\n\t\t\t}),\n\t\t\ttheme: resolvedTheme === \"dark\" ? \"dark\" : \"light\",\n\t\t}),\n\t\t[flowRunId, resolvedTheme],\n\t);\n\n\tuseEffect(() => {\n\t\tsetConfig(config);\n\t}, [config]);\n\n\tuseEffect(() => {\n\t\tif (!stageRef.current) {\n\t\t\tthrow new Error(\"Stage does not exist\");\n\t\t}\n\n\t\tstart({\n\t\t\tstage: stageRef.current,\n\t\t\tconfig,\n\t\t});\n\n\t\treturn () => {\n\t\t\tstop();\n\t\t};\n\t}, [config]);\n\n\tuseEffect(() => {\n\t\tselectItem(selected ?? null);\n\t}, [selected]);\n\n\tuseEffect(() => {\n\t\tvoid updateViewportFromDateRange(viewport);\n\t}, [viewport]);\n\n\tuseEffect(() => {\n\t\tconst offItemSelected = emitter.on(\"itemSelected\", (nodeId) =>\n\t\t\tonSelectedChange?.(nodeId ?? undefined),\n\t\t);\n\t\tconst offViewportDateRangeUpdated = emitter.on(\n\t\t\t\"viewportDateRangeUpdated\",\n\t\t\t(range) => onViewportChange?.(range),\n\t\t);\n\n\t\treturn () => {\n\t\t\toffItemSelected();\n\t\t\toffViewportDateRangeUpdated();\n\t\t};\n\t}, [onSelectedChange, onViewportChange]);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={`${fullscreen ? \"fixed h-screen w-screen z-20\" : \"relative h-[500px] w-full \"} ${className ?? \"\"}`}\n\t\t\tstyle={style}\n\t\t>\n\t\t\t<div ref={stageRef} className=\"size-full [&>canvas]:size-full\" />\n\t\t\t<div className=\"absolute bottom-0 right-0\">\n\t\t\t\t<FlowRunGraphActions\n\t\t\t\t\tfullscreen={fullscreen}\n\t\t\t\t\tonFullscreenChange={updateFullscreen}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"names":["fetchFlowRunGraph","id","data","getQueryService","mapApiResponseToRunGraphData","fetchFlowRunEvents","since","until","nodeId","mapApiResponseToRunGraphEvents","response","parseISO","node","mapNode","event","mapArtifact","artifact","stateTypeColors","isEventTargetInput","target","center","centerViewport","FlowRunGraphCenterButton","useEffect","controller","Tooltip","jsx","TooltipTrigger","Button","Icon","TooltipContent","FlowRunGraphFullscreenButton","fullscreen","onFullscreenChange","toggleFullscreen","useCallback","layoutOptions","increaseScale","multiplier","DEFAULT_HORIZONTAL_SCALE_MULTIPLIER","scale","layout","setHorizontalScaleMultiplier","decreaseScale","resetScale","resetHorizontalScaleMultiplier","isLayoutOption","value","horizontal","vertical","isHorizontalMode","isVerticalMode","FlowRunGraphSettings","selectedLayoutOption","setSelectedLayoutOption","useState","hideEdges","setHideEdges","hideArtifacts","setHideArtifacts","hideEvents","setHideEvents","handleLayoutChange","setHorizontalMode","setVerticalMode","handleHideEdgesChange","setDisabledEdges","handleHideArtifactsChange","setDisabledArtifacts","handleHideEventsChange","setDisabledEvents","jsxs","Typography","option","e","Label","Switch","FlowRunGraphSettingsButton","Popover","PopoverTrigger","PopoverContent","FlowRunGraphActions","FlowRunGraph","flowRunId","viewport","onViewportChange","selected","onSelectedChange","className","style","controlledFullscreen","stageRef","useRef","internalFullscreen","setInternalFullscreen","resolvedTheme","useTheme","updateFullscreen","config","useMemo","setConfig","start","stop","selectItem","updateViewportFromDateRange","offItemSelected","emitter","offViewportDateRangeUpdated","range"],"mappings":"miBAkBA,eAAsBA,GAAkBC,EAAmC,CAC1E,KAAM,CAAE,KAAAC,CAAA,EAAS,MAAO,MAAMC,KAAmB,IAChD,2BACA,CACC,OAAQ,CAAE,KAAM,CAAE,GAAAF,EAAG,CAAE,CACxB,EAGD,GAAI,CAACC,EACJ,MAAM,IAAI,MAAM,2BAA2B,EAG5C,OAAOE,GAA6BF,CAAI,CACzC,CASA,eAAsBG,GAAmB,CACxC,MAAAC,EACA,MAAAC,EACA,OAAAC,CACD,EAAyD,CACxD,KAAM,CAAE,KAAAN,GAAS,MAAO,MAAMC,EAAA,GAAmB,KAAK,iBAAkB,CACvE,KAAM,CACL,OAAQ,CACP,aAAc,CACb,GAAI,CAAC,oBAAoBK,CAAM,EAAE,CAAA,EAElC,MAAO,CACN,eAAgB,CAAC,oBAAqB,mBAAmB,CAAA,EAE1D,SAAU,CACT,MAAOF,EAAM,YAAA,EACb,MAAOC,EAAM,YAAA,CAAY,EAE1B,MAAO,KAAA,EAER,MAAO,GAAA,CACR,CACA,EAED,GAAI,CAACL,EACJ,MAAM,IAAI,MAAM,2BAA2B,EAG5C,OAAOO,GAA+BP,CAAI,CAC3C,CAOA,SAASE,GAA6BM,EAAuC,CAC5E,GAAI,CAACA,EAAS,WACb,MAAM,IAAI,MAAM,wBAAwB,EAGzC,MAAO,CACN,cAAeA,EAAS,cACxB,WAAYC,EAASD,EAAS,UAAU,EACxC,SAAUA,EA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ACA,mBAAoBiE,CAAA,CAAA,CACrB,CACD,CAAA,CAAA,CAAA,CAGH"}
@@ -1,4 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/flow-run-graph-CfoPEAgQ.js","assets/vendor-tanstack-BK8oseNA.js","assets/vendor-react-Bce9NwRC.js","assets/vendor-graphs-Diy0Lo-N.js","assets/index-WYPZo52S.js","assets/vendor-radix-CznP1SOq.js","assets/vendor-recharts-D4imLXNl.js","assets/vendor-forms-DxqqmhL5.js","assets/vendor-date-7GxEwcQM.js","assets/index-B7zHzWQW.css"])))=>i.map(i=>d[i]);
2
- import{j as e,r,p as R,I as pe,m as U,s as B,f as ge,u as je}from"./vendor-tanstack-BK8oseNA.js";import{b3 as c,ca as fe,cb as ve,p as F,cc as ye,aU as J,bt as be,C as re,n as ne,c4 as Ne,I,x as N,bK as K,V as Se,c6 as _e,S as oe,a as ie,c as ce,e as G,b as we,bL as de,aA as Ce,aC as W,aa as ke,ak as k,N as ue,cd as H,aj as Q,ce as V,ap as q,aB as De,aD as X,am as Fe,cf as Te,cg as Ae,ch as Ee,ci as Le,cj as Pe,L as Y,ck as Ie,B as Re,g as Me,h as Z,bq as ze,bz as Oe,bB as Qe,bO as Ve,au as Be,av as Ge,aw as S,ax as _,cl as ee}from"./index-WYPZo52S.js";import{R as qe,a as Ue,u as Je,C as $e}from"./index-qPlIYf3i.js";import{D as Ke}from"./delete-confirmation-dialog-COdZmNfa.js";import{u as We}from"./use-delete-confirmation-dialog-CvQEyyhU.js";import{D as xe,a as me,b as he,d as D}from"./dropdown-menu-xZ_3w9OP.js";import{A as He}from"./artifact-card-Ds2tntMW.js";import{T as Xe,a as se}from"./toggle-group-D3zeurIL.js";import{S as Ye}from"./sort-filter-BD4vwJXt.js";import{S as Ze,a as es,F as ss}from"./flow-runs-pagination-DnwkJapB.js";import{T as as,b as ts,a as ls}from"./task-runs-pagination-DLSAz-Ur.js";import{T as rs}from"./tags-input-D1RJZEUA.js";import{o as ns,e as os}from"./vendor-forms-DxqqmhL5.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CznP1SOq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-date-7GxEwcQM.js";import"./index-DSaSov8V.js";import"./lazy-markdown-BHwIrC8E.js";const is=r.lazy(()=>fe(()=>import("./flow-run-graph-CfoPEAgQ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(s=>({default:s.FlowRunGraph})));function cs(s){return e.jsx(r.Suspense,{fallback:e.jsx(c,{className:"h-[500px] w-full"}),children:e.jsx(is,{...s})})}class L extends r.Component{constructor(a){super(a),this.state={hasError:!1,error:null}}static getDerivedStateFromError(a){return{hasError:!0,error:a}}render(){if(this.state.hasError){const{fallback:a}=this.props;return typeof a=="function"?a(this.state.error??new Error("Unknown error")):a}return this.props.children}}function P({error:s,onRetry:a,isRetrying:t}){return e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[e.jsx("div",{className:"rounded-full bg-destructive/10 p-2 mb-3",children:e.jsx(ve,{className:"size-6 text-destructive"})}),e.jsxs("div",{className:"space-y-1 mb-4",children:[e.jsx("p",{className:"font-medium",children:s.message}),s.details&&e.jsx("p",{className:"text-xs text-muted-foreground max-w-sm",children:s.details})]}),a&&e.jsxs(F,{variant:"outline",size:"sm",onClick:a,disabled:t,className:"gap-2",children:[e.jsx(ye,{className:J("size-3",t&&"animate-spin")}),t?"Retrying...":"Retry"]})]})}const ds=({flowRun:s})=>{const[a,t]=r.useState("grid"),{data:h}=R(be({artifacts:{operator:"and_",flow_run_id:{any_:[s.id]},type:{not_any_:["result"]}},sort:"ID_DESC",offset:0}));return h.length===0?e.jsx(re,{children:e.jsx(ne,{className:"text-center",children:e.jsxs("p",{children:["This flow run did not produce any artifacts; for more information on creating artifacts, see the"," ",e.jsx("a",{href:"https://docs.prefect.io/v3/develop/artifacts",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500",children:"documentation"}),"."]})})}):e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"flex justify-end",children:e.jsxs(Xe,{type:"single",variant:"outline",value:a,onValueChange:n=>t(n),children:[e.jsx(se,{value:"grid","aria-label":"Grid view",children:e.jsx(Ne,{className:"w-4 h-4"})}),e.jsx(se,{value:"list","aria-label":"List view",children:e.jsx(qe,{className:"w-4 h-4"})})]})}),e.jsx("div",{className:J("grid",a==="grid"?"grid-cols-1 lg:grid-cols-2 xl:grid-cols-3":"grid-cols-1","gap-4"),"data-testid":"flow-run-artifacts-grid",children:h.map(n=>e.jsx(He,{artifact:n,compact:a==="list"},n.id))})]})};function b({label:s,value:a,copyable:t,copyValue:h}){const n=()=>{const u=h??(typeof a=="string"?a:"");navigator.clipboard.writeText(u),N.success(`${s} copied`)};return e.jsxs("dl",{className:"flex flex-col gap-1",children:[e.jsx("dt",{className:"text-muted-foreground text-sm",children:s}),e.jsxs("dd",{className:"text-sm flex items-center gap-2",children:[a,t&&e.jsx(F,{variant:"ghost",size:"icon",onClick:n,children:e.jsx(I,{id:"Copy",className:"size-4"})})]})]})}function ae({flowRun:s}){return s?e.jsxs("div",{className:"space-y-4",children:[e.jsx(b,{label:"Run Count",value:s.run_count}),e.jsx(b,{label:"Created",value:e.jsx(K,{date:s.created})}),s.created_by?.display_value&&e.jsx(b,{label:"Created By",value:s.created_by.display_value}),e.jsx(b,{label:"Last Updated",value:e.jsx(K,{date:s.updated})}),s.idempotency_key&&e.jsx(b,{label:"Idempotency Key",value:s.idempotency_key}),s.tags&&s.tags.length>0&&e.jsx(b,{label:"Tags",value:e.jsx(Se,{tags:s.tags})}),e.jsx(b,{label:"Flow Run ID",value:s.id,copyable:!0}),s.state?.message&&e.jsx(b,{label:"State Message",value:s.state.message}),s.flow_version&&e.jsx(b,{label:"Flow Version",value:s.flow_version}),s.empirical_policy?.retries!=null&&e.jsxs(e.Fragment,{children:[e.jsx(b,{label:"Retries",value:s.empirical_policy.retries}),e.jsx(b,{label:"Retry Delay",value:s.empirical_policy.retry_delay})]})]}):e.jsx("div",{className:"flex flex-col gap-2 bg-gray-100 p-4 rounded-md",children:e.jsx("span",{className:"text-gray-500",children:"No flow run details available"})})}const us=({flowRun:s,virtualize:a=!0})=>{const[t,h]=r.useState(0),[n,u]=r.useState("TIMESTAMP_ASC"),g=r.useMemo(()=>({..._e({limit:50,sort:n,logs:{operator:"and_",level:{ge_:t},flow_run_id:{any_:[s.id]}}}),refetchInterval:s.state_type==="RUNNING"?5e3:!1}),[t,n,s.id,s.state_type]),{data:x,hasNextPage:o,fetchNextPage:v,isFetchingNextPage:l}=pe(g),i=x.pages.length===1&&x.pages[0].length===0;let m="This run did not produce any logs.";return i&&(t>0?m="No logs match your filter criteria":s.state_type==="SCHEDULED"&&s.state_name==="Scheduled"?m="Run has not yet started. Check back soon for logs.":s.state_type==="RUNNING"&&(m="Waiting for logs...")),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-row gap-2 justify-end",children:[e.jsx(xs,{levelFilter:t,setLevelFilter:h}),e.jsx(ms,{sortOrder:n,setSortOrder:u})]}),i?e.jsx("div",{className:"flex flex-col gap-2 text-center bg-muted p-2 rounded-md",children:e.jsx("span",{className:"text-muted-foreground",children:m})}):e.jsx("div",{className:"rounded-md",children:e.jsx(Ue,{logs:x.pages.flat(),onBottomReached:()=>{o&&!l&&v().catch(y=>{console.error(y)})},className:"max-h-[85vh]",virtualize:a})})]})},te=[{label:"All",value:0},{label:"Critical only",value:50},{label:"Error and above",value:40},{label:"Warning and above",value:30},{label:"Info and above",value:20},{label:"Debug and above",value:10}],xs=({levelFilter:s,setLevelFilter:a})=>e.jsxs(oe,{value:s.toString(),onValueChange:t=>a(Number(t)),children:[e.jsx(ie,{"aria-label":"log level filter",children:e.jsx("span",{children:`Level:
3
- ${te.find(t=>t.value===s)?.label}`})}),e.jsx(ce,{children:te.map(t=>e.jsx(G,{value:t.value.toString(),children:t.label},t.value))})]}),ms=({sortOrder:s,setSortOrder:a})=>e.jsxs(oe,{value:s,onValueChange:t=>a(t),children:[e.jsx(ie,{"aria-label":"log sort order",children:e.jsx(we,{placeholder:"Sort log order"})}),e.jsxs(ce,{children:[e.jsx(G,{value:"TIMESTAMP_ASC",children:"Oldest to newest"}),e.jsx(G,{value:"TIMESTAMP_DESC",children:"Newest to oldest"})]})]}),hs=({parentFlowRunId:s})=>{const a=U(),[t,h]=r.useState(""),[n,u]=r.useState(new Set),[g,x]=r.useState("START_TIME_DESC"),[o,v]=r.useState({page:1,limit:10}),l=de(t,300),i=r.useMemo(()=>({flow_runs:{operator:"and_",parent_flow_run_id:{operator:"and_",any_:[s]}}}),[s]),{data:m}=R(Ce(i,3e4)),y=r.useMemo(()=>({page:o.page,limit:o.limit,sort:g,flow_runs:{operator:"and_",parent_flow_run_id:{operator:"and_",any_:[s]},name:l?{like_:l}:void 0,state:n.size>0?{operator:"and_",name:{any_:Array.from(n)}}:void 0}}),[s,o,g,l,n]),{data:j}=B(W(y,3e4)),w=r.useMemo(()=>[...new Set((j?.results??[]).map(d=>d.flow_id))],[j?.results]),{data:C}=B(ke({flows:{operator:"and_",id:{any_:w}},offset:0,sort:"NAME_ASC"},{enabled:w.length>0})),T=r.useMemo(()=>{if(!j?.results)return[];const d=new Map(C?.map(p=>[p.id,p])??[]);return j.results.map(p=>{const $=d.get(p.flow_id);return $?{...p,flow:$}:{...p,flow:void 0}}).filter(p=>p!==null)},[j?.results,C]),A=d=>{h(d.target.value),v(p=>({...p,page:1}))},M=d=>{u(d),v(p=>({...p,page:1}))},z=d=>{x(d),v(p=>({...p,page:1}))},O=()=>{h(""),u(new Set),v(d=>({...d,page:1}))},E=d=>{a.prefetchQuery(W({...y,page:d},3e4))},f=t||n.size>0;return m===0?e.jsx("div",{className:"flex items-center justify-center h-48 border rounded-lg bg-muted/50",children:e.jsx(k,{className:"text-muted-foreground",children:"No subflow runs found for this flow run."})}):e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"grid grid-cols-12 items-center gap-2",children:[e.jsx("div",{className:"flex flex-col gap-1 xl:col-span-3 md:col-span-12 col-span-6 md:order-0 order-2",children:e.jsxs(k,{variant:"bodySmall",className:"text-muted-foreground",children:[m," Subflow run",m!==1?"s":""]})}),e.jsx("div",{className:"xl:col-span-4 col-span-12 md:order-1 order-0",children:e.jsx(ue,{value:t,onChange:A,placeholder:"Search by run name","aria-label":"Search by run name",debounceMs:300})}),e.jsx("div",{className:"xl:col-span-3 md:col-span-6 col-span-12 md:order-2 order-1",children:e.jsx(Ze,{selectedFilters:n,onSelectFilter:M})}),e.jsx("div",{className:"xl:border-l xl:border-border xl:pl-2 xl:col-span-2 md:col-span-6 col-span-6 md:order-3 order-3",children:e.jsx(Ye,{value:g,onSelect:z})})]}),e.jsx(es,{flowRuns:T,onClearFilters:f?O:void 0}),j&&j.pages>0&&e.jsx(ss,{pagination:o,onChangePagination:v,count:j.count,pages:j.pages,onPrefetchPage:E})]})},le=2,ps=({selectedFilters:s,onSelectFilter:a,className:t})=>{const[h,n]=r.useState(!1),u=r.useMemo(()=>{const l=new Set(H);return s.has("Scheduled")||l.size!==s.size?!1:Array.from(s).every(i=>l.has(i))},[s]),g=()=>{a(new Set(H))},x=()=>{a(new Set)},o=l=>{if(u){a(new Set([l]));return}const i=new Set(s);s.has(l)?i.delete(l):i.add(l),a(i)},v=()=>{if(s.size===0)return"All run states";if(u)return"All except scheduled";const l=Array.from(s),i=l.slice(0,le),m=l.length-le;return e.jsxs("div",{className:"flex flex-1 min-w-0 items-center gap-2",children:[e.jsx("div",{className:"flex flex-1 min-w-0 items-center gap-2 overflow-hidden",children:i.map(y=>e.jsx(q,{name:y,type:V[y]},y))}),m>0&&e.jsxs(k,{variant:"bodySmall",className:"shrink-0",children:["+ ",m]})]})};return e.jsxs(xe,{open:h,onOpenChange:n,children:[e.jsx(me,{asChild:!0,children:e.jsxs(F,{variant:"outline",className:J("justify-between w-full",t),children:[e.jsx("span",{className:"flex-1 min-w-0",children:v()}),e.jsx(I,{id:"ChevronDown",className:"ml-2 size-4 shrink-0"})]})}),e.jsxs(he,{className:"max-h-96 overflow-x-hidden overflow-y-auto",children:[e.jsxs(D,{onSelect:l=>{l.preventDefault(),g()},children:[e.jsx(Q,{checked:u,className:"mr-2"}),"All except scheduled"]}),e.jsxs(D,{onSelect:l=>{l.preventDefault(),x()},children:[e.jsx(Q,{checked:s.size===0,className:"mr-2"}),"All run states"]}),Object.keys(V).map(l=>e.jsxs(D,{"aria-label":l,onSelect:i=>{i.preventDefault(),o(l)},children:[e.jsx(Q,{"aria-label":l,className:"mr-2",checked:!u&&s.has(l)}),e.jsx(q,{name:l,type:V[l]})]},l))]})]})},gs=({flowRunId:s})=>{const a=U(),[t,h]=r.useState(""),[n,u]=r.useState(new Set),[g,x]=r.useState(new Set),[o,v]=r.useState("EXPECTED_START_TIME_DESC"),[l,i]=r.useState({page:1,limit:20}),m=de(t,300),{data:y}=R(De({task_runs:{operator:"and_",flow_run_id:{operator:"and_",any_:[s],is_null_:!1},subflow_runs:{exists_:!1}}},3e4)),{data:j}=B(X({task_runs:{operator:"and_",flow_run_id:{operator:"and_",any_:[s],is_null_:!1},subflow_runs:{exists_:!1},name:m?{like_:m}:void 0,state:n.size>0?{operator:"and_",name:{any_:Array.from(n)}}:void 0,tags:g.size>0?{operator:"and_",all_:Array.from(g)}:void 0},sort:o,page:l.page,limit:l.limit},3e4)),w=f=>{h(f.target.value),i(d=>({...d,page:1}))},C=f=>{u(f),i(d=>({...d,page:1}))},T=f=>{v(f),i(d=>({...d,page:1}))},A=f=>{const d=Array.isArray(f)?f:[];x(new Set(d)),i(p=>({...p,page:1}))},M=()=>{h(""),u(new Set),x(new Set),i(f=>({...f,page:1}))},z=f=>{a.prefetchQuery(X({task_runs:{operator:"and_",flow_run_id:{operator:"and_",any_:[s],is_null_:!1},subflow_runs:{exists_:!1},name:m?{like_:m}:void 0,state:n.size>0?{operator:"and_",name:{any_:Array.from(n)}}:void 0,tags:g.size>0?{operator:"and_",all_:Array.from(g)}:void 0},sort:o,page:f,limit:l.limit},3e4))},O=t||n.size>0||g.size>0,E=r.useMemo(()=>{if(!j?.results)return null;const f=new Map;for(const d of j.results){const p=String(d.state?.name??"Unknown");f.set(p,(f.get(p)??0)+1)}return Array.from(f.entries()).map(([d,p])=>`${p} ${d}`).join(", ")},[j?.results]);return y===0?e.jsx("div",{className:"flex items-center justify-center h-48 border rounded-lg bg-muted/50",children:e.jsx(k,{className:"text-muted-foreground",children:"No task runs found for this flow run."})}):e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"grid grid-cols-12 items-center gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-1 xl:col-span-3 md:col-span-12 col-span-6 md:order-0 order-3",children:[e.jsxs(k,{variant:"bodySmall",className:"text-muted-foreground",children:[y," Task run",y!==1?"s":""]}),E&&e.jsxs(k,{variant:"bodySmall",className:"text-muted-foreground text-xs capitalize",children:["(",E,")"]})]}),e.jsx("div",{className:"xl:col-span-3 md:col-span-6 col-span-12 md:order-1 order-0",children:e.jsx(ue,{value:t,onChange:w,placeholder:"Search by run name","aria-label":"Search by run name",debounceMs:300})}),e.jsx("div",{className:"xl:col-span-2 md:col-span-6 col-span-12 md:order-2 order-1",children:e.jsx(ps,{selectedFilters:n,onSelectFilter:C})}),e.jsx("div",{className:"xl:col-span-2 md:col-span-6 col-span-12 md:order-3 order-2",children:e.jsx(rs,{value:Array.from(g),onChange:A,placeholder:"All tags"})}),e.jsx("div",{className:"xl:border-l xl:border-border xl:pl-2 xl:col-span-2 md:col-span-6 col-span-6 md:order-4 order-4",children:e.jsx(as,{value:o,onSelect:T})})]}),e.jsx(ts,{taskRuns:j?.results,onClearFilters:O?M:void 0}),j&&j.pages>0&&e.jsx(ls,{pagination:l,onChangePagination:i,count:j.count,pages:j.pages,onPrefetchPage:z})]})},js=({id:s,tab:a,onTabChange:t})=>{const[h,n]=r.useState(!1),[u,g]=r.useState(!1),x=U(),{data:o}=R({...Fe(s),refetchInterval:h}),{deleteFlowRun:v}=Te(),{navigate:l}=ge(),i=o.state_type==="PENDING";r.useEffect(()=>{o.state_type==="RUNNING"||o.state_type==="PENDING"?n(5e3):n(!1)},[o]);const m=()=>{v(o.id,{onSuccess:()=>{n(!1),N.success("Flow run deleted"),l({to:"/runs",replace:!0})},onError:T=>{const A=T.message||"Unknown error while deleting flow run.";N.error(A)}})},y=r.useCallback(()=>{x.invalidateQueries({queryKey:Ae.all()})},[x]),j=r.useCallback(()=>{x.invalidateQueries({queryKey:Ee.all()})},[x]),w=r.useCallback(()=>{x.invalidateQueries({queryKey:Le.lists()})},[x]),C=r.useCallback(()=>{x.invalidateQueries({queryKey:Pe.all()})},[x]);return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"flex flex-col gap-2",children:e.jsx(fs,{flowRun:o,onDeleteRunClicked:m})}),!i&&e.jsx(re,{children:e.jsx(ne,{className:"p-0",children:e.jsx(cs,{flowRunId:o.id,fullscreen:u,onFullscreenChange:g})})}),e.jsxs("div",{className:"grid lg:grid-cols-[1fr_250px] grid-cols-[1fr] gap-4",children:[e.jsx(vs,{currentTab:a,onTabChange:t,flowRun:o,logsContent:e.jsx(L,{fallback:e.jsx(P,{error:{type:"unknown-error",message:"Failed to load logs",details:"An error occurred while loading log data. Please try again."},onRetry:y}),children:e.jsx(r.Suspense,{fallback:e.jsx(ys,{}),children:e.jsx(us,{flowRun:o})})}),taskRunsContent:e.jsx(L,{fallback:e.jsx(P,{error:{type:"unknown-error",message:"Failed to load task runs",details:"An error occurred while loading task run data. Please try again."},onRetry:j}),children:e.jsx(r.Suspense,{fallback:e.jsx(bs,{}),children:e.jsx(gs,{flowRunId:s})})}),subflowRunsContent:e.jsx(L,{fallback:e.jsx(P,{error:{type:"unknown-error",message:"Failed to load subflow runs",details:"An error occurred while loading subflow run data. Please try again."},onRetry:w}),children:e.jsx(r.Suspense,{fallback:e.jsx(Ss,{}),children:e.jsx(hs,{parentFlowRunId:s})})}),artifactsContent:e.jsx(L,{fallback:e.jsx(P,{error:{type:"unknown-error",message:"Failed to load artifacts",details:"An error occurred while loading artifact data. Please try again."},onRetry:C}),children:e.jsx(r.Suspense,{fallback:e.jsx(Ns,{}),children:e.jsx(ds,{flowRun:o})})}),detailsContent:e.jsx(r.Suspense,{fallback:e.jsx(_s,{}),children:e.jsx(ae,{flowRun:o})}),parametersContent:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex justify-end",children:e.jsxs(F,{variant:"outline",size:"sm",onClick:()=>{N.success("Copied parameters to clipboard"),navigator.clipboard.writeText(JSON.stringify(o.parameters??{},null,2))},children:[e.jsx(I,{id:"Copy",className:"size-4 mr-2"}),"Copy parameters"]})}),e.jsx(Y,{value:JSON.stringify(o.parameters??{},null,2),disabled:!0,className:"min-h-[200px]"})]}),jobVariablesContent:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex justify-end",children:e.jsxs(F,{variant:"outline",size:"sm",onClick:()=>{N.success("Copied job variables to clipboard"),navigator.clipboard.writeText(JSON.stringify(o.job_variables??{},null,2))},children:[e.jsx(I,{id:"Copy",className:"size-4 mr-2"}),"Copy job variables"]})}),e.jsx(Y,{value:JSON.stringify(o.job_variables??{},null,2),disabled:!0,className:"min-h-[200px]"})]})}),e.jsx("div",{className:"hidden lg:block",children:e.jsx(ae,{flowRun:o})})]})]})},fs=({flowRun:s,onDeleteRunClicked:a})=>{const[t,h]=We(),{open:n,onOpenChange:u,openDialog:g}=Je(),{setFlowRunState:x,isPending:o}=Ie(),v=s.state_type&&["COMPLETED","FAILED","CANCELLED","CRASHED"].includes(s.state_type),l=i=>{x({id:s.id,state:{type:i.type,name:i.type.charAt(0)+i.type.slice(1).toLowerCase(),message:i.message},force:!0},{onSuccess:()=>{N.success("Flow run state changed"),u(!1)},onError:m=>{N.error(m.message||"Failed to change state")}})};return e.jsxs("div",{className:"flex flex-row justify-between",children:[e.jsx(Re,{children:e.jsxs(Me,{children:[e.jsx(Z,{children:e.jsx(ze,{to:"/runs",className:"text-xl font-semibold",children:"Runs"})}),e.jsx(Oe,{}),e.jsxs(Z,{className:"text-xl",children:[e.jsx(Qe,{className:"font-semibold",children:s.name}),s.state&&e.jsx(q,{type:s.state.type,name:s.state.name,className:"ml-2"})]})]})}),e.jsxs(xe,{children:[e.jsx(me,{asChild:!0,children:e.jsx(F,{variant:"outline",className:"p-2",children:e.jsx(Ve,{className:"w-4 h-4"})})}),e.jsxs(he,{children:[v&&e.jsx(D,{onClick:g,children:"Change state"}),e.jsx(D,{onClick:()=>{N.success("Copied flow run ID to clipboard"),navigator.clipboard.writeText(s.id)},children:"Copy ID"}),e.jsx(D,{onClick:()=>h({title:"Delete Flow Run",description:`Are you sure you want to delete flow run ${s.name}?`,onConfirm:a}),children:"Delete"})]})]}),e.jsx(Ke,{...t}),e.jsx($e,{open:n,onOpenChange:u,currentState:s.state?{type:s.state.type,name:s.state.name??s.state.type.charAt(0)+s.state.type.slice(1).toLowerCase()}:null,label:"Flow Run",onConfirm:l,isLoading:o})]})},vs=({currentTab:s,onTabChange:a,flowRun:t,logsContent:h,taskRunsContent:n,subflowRunsContent:u,artifactsContent:g,detailsContent:x,parametersContent:o,jobVariablesContent:v})=>(r.useEffect(()=>{const l=getComputedStyle(document.documentElement).getPropertyValue("--breakpoint-lg").trim(),i=window.matchMedia(`(max-width: ${l})`),m=()=>{s==="Details"&&a("Logs")};return i.addEventListener("change",m),()=>i.removeEventListener("change",m)},[s,a]),e.jsxs(Be,{value:s,onValueChange:l=>a(l),children:[e.jsxs(Ge,{children:[e.jsx(S,{value:"Details",className:"lg:hidden",children:"Details"}),e.jsx(S,{value:"Logs",children:"Logs"}),t.state_type!=="PENDING"&&e.jsx(S,{value:"TaskRuns",children:"Task Runs"}),t.state_type!=="PENDING"&&e.jsx(S,{value:"SubflowRuns",children:"Subflow Runs"}),e.jsx(S,{value:"Artifacts",children:"Artifacts"}),e.jsx(S,{value:"Parameters",children:"Parameters"}),e.jsx(S,{value:"JobVariables",children:"Job Variables"})]}),e.jsx(_,{value:"Details",children:x}),e.jsx(_,{value:"Logs",children:h}),e.jsx(_,{value:"TaskRuns",children:n}),e.jsx(_,{value:"SubflowRuns",children:u}),e.jsx(_,{value:"Artifacts",children:g}),e.jsx(_,{value:"Parameters",children:o}),e.jsx(_,{value:"JobVariables",children:v})]})),ys=()=>e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-row gap-2 justify-end",children:[e.jsx(c,{className:"h-8 w-25"}),e.jsx(c,{className:"h-8 w-32"})]}),e.jsx(c,{className:"h-32"})]}),bs=()=>e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(c,{className:"h-4 w-24"})}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[e.jsx(c,{className:"h-9 flex-1"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(c,{className:"h-9 w-48"}),e.jsx(c,{className:"h-9 w-40"})]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(c,{className:"h-24"}),e.jsx(c,{className:"h-24"}),e.jsx(c,{className:"h-24"})]})]}),Ns=()=>e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("div",{className:"flex flex-row justify-end",children:e.jsx(c,{className:"h-8 w-12"})}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2 xl:grid-cols-3",children:[e.jsx(c,{className:"h-40"}),e.jsx(c,{className:"h-40"}),e.jsx(c,{className:"h-40"}),e.jsx(c,{className:"h-40"})]})]}),Ss=()=>e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(c,{className:"h-4 w-24"})}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[e.jsx(c,{className:"h-9 flex-1"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(c,{className:"h-9 w-48"}),e.jsx(c,{className:"h-9 w-40"})]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(c,{className:"h-24"}),e.jsx(c,{className:"h-24"}),e.jsx(c,{className:"h-24"})]})]}),_s=()=>e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(c,{className:"h-4 w-20"}),e.jsx(c,{className:"h-5 w-12"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(c,{className:"h-4 w-16"}),e.jsx(c,{className:"h-5 w-32"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(c,{className:"h-4 w-24"}),e.jsx(c,{className:"h-5 w-32"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(c,{className:"h-4 w-24"}),e.jsx(c,{className:"h-5 w-64"})]})]});ns({tab:os(["Logs","TaskRuns","SubflowRuns","Artifacts","Details","Parameters","JobVariables"]).default("Logs").catch("Logs")});function qs(){const{id:s}=ee.useParams(),{tab:a}=ee.useSearch(),t=je(),h=n=>{t({to:".",search:u=>({...u,tab:n})})};return e.jsx(js,{id:s,tab:a,onTabChange:h})}export{qs as component};
4
- //# sourceMappingURL=flow-run._id-C-qxwEBp.js.map
@@ -1 +0,0 @@
1
- {"version":3,"mappings":";o5CAKA,MAAMA,GAAmBC,OAAK,WAC7B,OAAO,8BAAkB,0CAAE,KAAMC,IAAS,CAAE,QAASA,EAAI,cAAe,CACzE,EAcO,SAASC,GAAaC,EAA0B,CACtD,OACCC,MAACC,WAAA,CAAS,SAAUD,MAACE,EAAA,CAAS,UAAU,mBAAmB,EAC1D,SAAAF,MAACL,GAAA,CAAkB,GAAGI,CAAA,CAAO,EAC9B,CAEF,CCfO,MAAMI,UAAsBC,WAGjC,CACD,YAAYL,EAA2B,CACtC,MAAMA,CAAK,EACX,KAAK,MAAQ,CAAE,SAAU,GAAO,MAAO,KACxC,CAEA,OAAO,yBAAyBM,EAAkC,CACjE,MAAO,CAAE,SAAU,GAAM,MAAAA,CAAA,CAC1B,CAEA,QAAS,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AAM,MAAM,CACf,CAAC,EAmFD,SAASC,IAAiB,CACzB,KAAM,CAAExE,MAAOyE,GAAMC,YACf,CAAEzE,OAAQwE,GAAME,YAChBjE,EAAWkE,KAEX1E,EAAeD,GAAkC,CACjDS,EAAS,CACbmE,GAAI,IACJpK,OAASyB,IAAU,CAClB,GAAGA,EACH+D,OACD,CACA,CACF,EAEA,OAAOlK,MAACgK,GAAA,CAAmB,GAAAC,EAAQ,IAAAC,EAAU,YAAAC,CAAA,CAAyB,CACvE","names":["FlowRunGraphLazy","lazy","mod","FlowRunGraph","props","jsx","Suspense","Skeleton","ErrorBoundary","Component","error","fallback","TabErrorState","onRetry","isRetrying","jsxs","AlertCircle","Button","RefreshCw","cn","FlowRunArtifacts","flowRun","view","setView","useState","artifacts","useSuspenseQuery","buildListArtifactsQuery","Card","CardContent","ToggleGroup","value","ToggleGroupItem","LayoutGrid","Rows3","artifact","ArtifactCard","KeyValue","label","copyable","copyValue","handleCopy","textToCopy","toast","Icon","FlowRunDetails","FormattedDate","TagBadgeGroup","Fragment","FlowRunLogs","virtualize","levelFilter","setLevelFilter","sortOrder","setSortOrder","queryOptions","useMemo","buildInfiniteFilterLogsQuery","logs","hasNextPage","fetchNextPage","isFetchingNextPage","useSuspenseInfiniteQuery","noLogs","message","LogLevelFilter","LogSortOrder","RunLogs","LEVEL_FILTER_OPTIONS","Select","SelectTrigger","option","SelectContent","SelectItem","SelectValue","FlowRunSubflows","parentFlowRunId","queryClient","useQueryClient","search","setSearch","stateFilter","setStateFilter","sort","setSort","pagination","setPagination","debouncedSearch","useDebounce","countFilter","countData","buildCountFlowRunsQuery","paginateFilter","paginatedData","useQuery","buildPaginateFlowRunsQuery","flowIds","flows","buildListFlowsQuery","flowRunsWithFlows","flowMap","flow","handleSearchChange","e","prev","handleStateFilterChange","newFilters","handleSortChange","newSort","handleClearFilters","handlePrefetchPage","page","hasFilters","Typography","SearchInput","StateFilter","SortFilter","FlowRunsList","FlowRunsPagination","MAX_FILTERS_DISPLAYED","TaskRunStateFilter","selectedFilters","onSelectFilter","className","open","setOpen","isAllButScheduled","flowRunStatesNoScheduleSet","FLOW_RUN_STATES_NO_SCHEDULED","filter","handleSelectAllExceptScheduled","handleSelectAllRunState","handleSelectFilter","updatedFilters","renderSelectedTags","selected","visible","extraCount","StateBadge","FLOW_RUN_STATES_MAP","DropdownMenu","DropdownMenuTrigger","DropdownMenuContent","DropdownMenuItem","Checkbox","filterKey","FlowRunTaskRuns","flowRunId","tagsFilter","setTagsFilter","buildCountTaskRunsQuery","buildPaginateTaskRunsQuery","handleTagsFilterChange","tags","newTags","stateSummary","stateCounts","taskRun","stateName","name","count","TagsInput","TaskRunsSortFilter","TaskRunsList","TaskRunsPagination","FlowRunDetailsPage","id","tab","onTabChange","refetchInterval","setRefetchInterval","fullscreen","setFullscreen","buildGetFlowRunDetailsQuery","deleteFlowRun","useDeleteFlowRun","navigate","useRouter","isPending","useEffect","onDeleteRunClicked","retryLogs","useCallback","logsQueryKeyFactory","retryTaskRuns","taskRunsQueryKeyFactory","retrySubflows","flowRunsQueryKeyFactory","retryArtifacts","artifactsQueryKeyFactory","Header","TabsLayout","LogsSkeleton","TaskRunsSkeleton","SubflowsSkeleton","ArtifactsSkeleton","DetailsSkeleton","LazyJsonInput","dialogState","confirmDelete","useDeleteConfirmationDialog","isChangeStateOpen","setChangeStateOpen","openChangeState","useChangeStateDialog","setFlowRunState","isChangingState","useSetFlowRunState","canChangeState","handleChangeState","newState","Breadcrumb","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbSeparator","BreadcrumbPage","MoreVertical","DeleteConfirmationDialog","ChangeStateDialog","currentTab","logsContent","taskRunsContent","subflowRunsContent","artifactsContent","detailsContent","parametersContent","jobVariablesContent","bp","mql","onChange","Tabs","TabsList","TabsTrigger","TabsContent","z","default","catch","RouteComponent","Route","useParams","useSearch","useNavigate","to"],"ignoreList":[],"sources":["../../src/components/flow-runs/flow-run-graph/index.tsx","../../src/components/ui/error-boundary.tsx","../../src/components/ui/tab-error-state.tsx","../../src/components/flow-runs/flow-run-details-page/flow-run-artifacts.tsx","../../src/components/ui/key-value.tsx","../../src/components/flow-runs/flow-run-details-page/flow-run-details.tsx","../../src/components/flow-runs/flow-run-details-page/flow-run-logs.tsx","../../src/components/flow-runs/flow-run-details-page/flow-run-subflows.tsx","../../src/components/task-runs/task-run-state-filter.tsx","../../src/components/flow-runs/flow-run-details-page/flow-run-task-runs.tsx","../../src/components/flow-runs/flow-run-details-page/index.tsx","../../src/routes/runs/flow-run.$id.tsx?tsr-split=component"],"sourcesContent":["import type { GraphItemSelection, ViewportDateRange } from \"@prefecthq/graphs\";\nimport type { CSSProperties } from \"react\";\nimport { lazy, Suspense } from \"react\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\n\nconst FlowRunGraphLazy = lazy(() =>\n\timport(\"./flow-run-graph\").then((mod) => ({ default: mod.FlowRunGraph })),\n);\n\ntype FlowRunGraphProps = {\n\tflowRunId: string;\n\tviewport?: ViewportDateRange;\n\tonViewportChange?: (viewport: ViewportDateRange) => void;\n\tselected?: GraphItemSelection;\n\tonSelectedChange?: (selected: GraphItemSelection | undefined) => void;\n\tfullscreen?: boolean;\n\tonFullscreenChange?: (fullscreen: boolean) => void;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n};\n\nexport function FlowRunGraph(props: FlowRunGraphProps) {\n\treturn (\n\t\t<Suspense fallback={<Skeleton className=\"h-[500px] w-full\" />}>\n\t\t\t<FlowRunGraphLazy {...props} />\n\t\t</Suspense>\n\t);\n}\n\nexport type { GraphItemSelection, ViewportDateRange } from \"@prefecthq/graphs\";\n","import { Component, type ReactNode } from \"react\";\n\ntype ErrorBoundaryProps = {\n\tchildren: ReactNode;\n\tfallback: ReactNode | ((error: Error) => ReactNode);\n};\n\ntype ErrorBoundaryState = {\n\thasError: boolean;\n\terror: Error | null;\n};\n\nexport class ErrorBoundary extends Component<\n\tErrorBoundaryProps,\n\tErrorBoundaryState\n> {\n\tconstructor(props: ErrorBoundaryProps) {\n\t\tsuper(props);\n\t\tthis.state = { hasError: false, error: null };\n\t}\n\n\tstatic getDerivedStateFromError(error: Error): ErrorBoundaryState {\n\t\treturn { hasError: true, error };\n\t}\n\n\trender() {\n\t\tif (this.state.hasError) {\n\t\t\tconst { fallback } = this.props;\n\t\t\tif (typeof fallback === \"function\") {\n\t\t\t\treturn fallback(this.state.error ?? new Error(\"Unknown error\"));\n\t\t\t}\n\t\t\treturn fallback;\n\t\t}\n\t\treturn this.props.children;\n\t}\n}\n","import { AlertCircle, RefreshCw } from \"lucide-react\";\nimport type { ServerError } from \"@/api/error-utils\";\nimport { Button } from \"@/components/ui/button\";\nimport { cn } from \"@/utils\";\n\ntype TabErrorStateProps = {\n\terror: ServerError;\n\tonRetry?: () => void;\n\tisRetrying?: boolean;\n};\n\nexport function TabErrorState({\n\terror,\n\tonRetry,\n\tisRetrying,\n}: TabErrorStateProps) {\n\treturn (\n\t\t<div className=\"flex flex-col items-center justify-center py-8 text-center\">\n\t\t\t<div className=\"rounded-full bg-destructive/10 p-2 mb-3\">\n\t\t\t\t<AlertCircle className=\"size-6 text-destructive\" />\n\t\t\t</div>\n\t\t\t<div className=\"space-y-1 mb-4\">\n\t\t\t\t<p className=\"font-medium\">{error.message}</p>\n\t\t\t\t{error.details && (\n\t\t\t\t\t<p className=\"text-xs text-muted-foreground max-w-sm\">\n\t\t\t\t\t\t{error.details}\n\t\t\t\t\t</p>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{onRetry && (\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\tonClick={onRetry}\n\t\t\t\t\tdisabled={isRetrying}\n\t\t\t\t\tclassName=\"gap-2\"\n\t\t\t\t>\n\t\t\t\t\t<RefreshCw className={cn(\"size-3\", isRetrying && \"animate-spin\")} />\n\t\t\t\t\t{isRetrying ? \"Retrying...\" : \"Retry\"}\n\t\t\t\t</Button>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n","import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { LayoutGrid, Rows3 } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { buildListArtifactsQuery } from \"@/api/artifacts\";\nimport type { FlowRun } from \"@/api/flow-runs\";\nimport { ArtifactCard } from \"@/components/artifacts/artifact-card\";\nimport { Card, CardContent } from \"@/components/ui/card\";\nimport { ToggleGroup, ToggleGroupItem } from \"@/components/ui/toggle-group\";\nimport { cn } from \"@/utils\";\n\ntype FlowRunArtifactsProps = {\n\tflowRun: FlowRun;\n};\n\nexport const FlowRunArtifacts = ({ flowRun }: FlowRunArtifactsProps) => {\n\tconst [view, setView] = useState<\"grid\" | \"list\">(\"grid\");\n\tconst { data: artifacts } = useSuspenseQuery(\n\t\tbuildListArtifactsQuery({\n\t\t\tartifacts: {\n\t\t\t\toperator: \"and_\",\n\t\t\t\tflow_run_id: {\n\t\t\t\t\tany_: [flowRun.id],\n\t\t\t\t},\n\t\t\t\ttype: {\n\t\t\t\t\tnot_any_: [\"result\"],\n\t\t\t\t},\n\t\t\t},\n\t\t\tsort: \"ID_DESC\",\n\t\t\toffset: 0,\n\t\t}),\n\t);\n\tif (artifacts.length === 0) {\n\t\treturn (\n\t\t\t<Card>\n\t\t\t\t<CardContent className=\"text-center\">\n\t\t\t\t\t<p>\n\t\t\t\t\t\tThis flow run did not produce any artifacts; for more information on\n\t\t\t\t\t\tcreating artifacts, see the{\" \"}\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\thref=\"https://docs.prefect.io/v3/develop/artifacts\"\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\tclassName=\"text-blue-500\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tdocumentation\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t.\n\t\t\t\t\t</p>\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<div className=\"flex justify-end\">\n\t\t\t\t<ToggleGroup\n\t\t\t\t\ttype=\"single\"\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tvalue={view}\n\t\t\t\t\tonValueChange={(value) => setView(value as \"grid\" | \"list\")}\n\t\t\t\t>\n\t\t\t\t\t<ToggleGroupItem value=\"grid\" aria-label=\"Grid view\">\n\t\t\t\t\t\t<LayoutGrid className=\"w-4 h-4\" />\n\t\t\t\t\t</ToggleGroupItem>\n\t\t\t\t\t<ToggleGroupItem value=\"list\" aria-label=\"List view\">\n\t\t\t\t\t\t<Rows3 className=\"w-4 h-4\" />\n\t\t\t\t\t</ToggleGroupItem>\n\t\t\t\t</ToggleGroup>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"grid\",\n\t\t\t\t\tview === \"grid\"\n\t\t\t\t\t\t? \"grid-cols-1 lg:grid-cols-2 xl:grid-cols-3\"\n\t\t\t\t\t\t: \"grid-cols-1\",\n\t\t\t\t\t\"gap-4\",\n\t\t\t\t)}\n\t\t\t\tdata-testid=\"flow-run-artifacts-grid\"\n\t\t\t>\n\t\t\t\t{artifacts.map((artifact) => (\n\t\t\t\t\t<ArtifactCard\n\t\t\t\t\t\tkey={artifact.id}\n\t\t\t\t\t\tartifact={artifact}\n\t\t\t\t\t\tcompact={view === \"list\"}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n","import { toast } from \"sonner\";\nimport { Button } from \"@/components/ui/button\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype KeyValueProps = {\n\tlabel: string;\n\tvalue: React.ReactNode;\n\tcopyable?: boolean;\n\tcopyValue?: string;\n};\n\nexport function KeyValue({ label, value, copyable, copyValue }: KeyValueProps) {\n\tconst handleCopy = () => {\n\t\tconst textToCopy = copyValue ?? (typeof value === \"string\" ? value : \"\");\n\t\tvoid navigator.clipboard.writeText(textToCopy);\n\t\ttoast.success(`${label} copied`);\n\t};\n\n\treturn (\n\t\t<dl className=\"flex flex-col gap-1\">\n\t\t\t<dt className=\"text-muted-foreground text-sm\">{label}</dt>\n\t\t\t<dd className=\"text-sm flex items-center gap-2\">\n\t\t\t\t{value}\n\t\t\t\t{copyable && (\n\t\t\t\t\t<Button variant=\"ghost\" size=\"icon\" onClick={handleCopy}>\n\t\t\t\t\t\t<Icon id=\"Copy\" className=\"size-4\" />\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</dd>\n\t\t</dl>\n\t);\n}\n","import type { FlowRun } from \"@/api/flow-runs\";\nimport { FormattedDate } from \"@/components/ui/formatted-date/formatted-date\";\nimport { KeyValue } from \"@/components/ui/key-value\";\nimport { TagBadgeGroup } from \"@/components/ui/tag-badge-group\";\n\ntype FlowRunDetailsProps = {\n\tflowRun: FlowRun | null | undefined;\n};\n\nexport function FlowRunDetails({ flowRun }: FlowRunDetailsProps) {\n\tif (!flowRun) {\n\t\treturn (\n\t\t\t<div className=\"flex flex-col gap-2 bg-gray-100 p-4 rounded-md\">\n\t\t\t\t<span className=\"text-gray-500\">No flow run details available</span>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"space-y-4\">\n\t\t\t<KeyValue label=\"Run Count\" value={flowRun.run_count} />\n\n\t\t\t<KeyValue\n\t\t\t\tlabel=\"Created\"\n\t\t\t\tvalue={<FormattedDate date={flowRun.created} />}\n\t\t\t/>\n\n\t\t\t{flowRun.created_by?.display_value && (\n\t\t\t\t<KeyValue label=\"Created By\" value={flowRun.created_by.display_value} />\n\t\t\t)}\n\n\t\t\t<KeyValue\n\t\t\t\tlabel=\"Last Updated\"\n\t\t\t\tvalue={<FormattedDate date={flowRun.updated} />}\n\t\t\t/>\n\n\t\t\t{flowRun.idempotency_key && (\n\t\t\t\t<KeyValue label=\"Idempotency Key\" value={flowRun.idempotency_key} />\n\t\t\t)}\n\n\t\t\t{flowRun.tags && flowRun.tags.length > 0 && (\n\t\t\t\t<KeyValue label=\"Tags\" value={<TagBadgeGroup tags={flowRun.tags} />} />\n\t\t\t)}\n\n\t\t\t<KeyValue label=\"Flow Run ID\" value={flowRun.id} copyable />\n\n\t\t\t{flowRun.state?.message && (\n\t\t\t\t<KeyValue label=\"State Message\" value={flowRun.state.message} />\n\t\t\t)}\n\n\t\t\t{flowRun.flow_version && (\n\t\t\t\t<KeyValue label=\"Flow Version\" value={flowRun.flow_version} />\n\t\t\t)}\n\n\t\t\t{flowRun.empirical_policy?.retries != null && (\n\t\t\t\t<>\n\t\t\t\t\t<KeyValue label=\"Retries\" value={flowRun.empirical_policy.retries} />\n\t\t\t\t\t<KeyValue\n\t\t\t\t\t\tlabel=\"Retry Delay\"\n\t\t\t\t\t\tvalue={flowRun.empirical_policy.retry_delay}\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n","import { useSuspenseInfiniteQuery } from \"@tanstack/react-query\";\nimport { useMemo, useState } from \"react\";\nimport { buildInfiniteFilterLogsQuery } from \"@/api/logs\";\nimport type { components } from \"@/api/prefect\";\nimport { RunLogs } from \"@/components/ui/run-logs\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\n\ntype FlowRunLogsProps = {\n\tflowRun: components[\"schemas\"][\"FlowRunResponse\"];\n\tvirtualize?: boolean;\n};\n\nexport const FlowRunLogs = ({\n\tflowRun,\n\tvirtualize = true,\n}: FlowRunLogsProps) => {\n\tconst [levelFilter, setLevelFilter] = useState<number>(0);\n\tconst [sortOrder, setSortOrder] = useState<\n\t\t\"TIMESTAMP_ASC\" | \"TIMESTAMP_DESC\"\n\t>(\"TIMESTAMP_ASC\");\n\n\tconst queryOptions = useMemo(\n\t\t() => ({\n\t\t\t...buildInfiniteFilterLogsQuery({\n\t\t\t\tlimit: 50,\n\t\t\t\tsort: sortOrder,\n\t\t\t\tlogs: {\n\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\tlevel: { ge_: levelFilter },\n\t\t\t\t\tflow_run_id: { any_: [flowRun.id] },\n\t\t\t\t},\n\t\t\t}),\n\t\t\trefetchInterval:\n\t\t\t\tflowRun.state_type === \"RUNNING\" ? 5000 : (false as const),\n\t\t}),\n\t\t[levelFilter, sortOrder, flowRun.id, flowRun.state_type],\n\t);\n\n\tconst {\n\t\tdata: logs,\n\t\thasNextPage,\n\t\tfetchNextPage,\n\t\tisFetchingNextPage,\n\t} = useSuspenseInfiniteQuery(queryOptions);\n\n\tconst noLogs = logs.pages.length === 1 && logs.pages[0].length === 0;\n\tlet message = \"This run did not produce any logs.\";\n\tif (noLogs) {\n\t\tif (levelFilter > 0) {\n\t\t\tmessage = \"No logs match your filter criteria\";\n\t\t} else if (\n\t\t\tflowRun.state_type === \"SCHEDULED\" &&\n\t\t\tflowRun.state_name === \"Scheduled\"\n\t\t) {\n\t\t\tmessage = \"Run has not yet started. Check back soon for logs.\";\n\t\t} else if (flowRun.state_type === \"RUNNING\") {\n\t\t\tmessage = \"Waiting for logs...\";\n\t\t}\n\t}\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t<div className=\"flex flex-row gap-2 justify-end\">\n\t\t\t\t<LogLevelFilter\n\t\t\t\t\tlevelFilter={levelFilter}\n\t\t\t\t\tsetLevelFilter={setLevelFilter}\n\t\t\t\t/>\n\t\t\t\t<LogSortOrder sortOrder={sortOrder} setSortOrder={setSortOrder} />\n\t\t\t</div>\n\t\t\t{noLogs ? (\n\t\t\t\t<div className=\"flex flex-col gap-2 text-center bg-muted p-2 rounded-md\">\n\t\t\t\t\t<span className=\"text-muted-foreground\">{message}</span>\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<div className=\"rounded-md\">\n\t\t\t\t\t<RunLogs\n\t\t\t\t\t\tlogs={logs.pages.flat()}\n\t\t\t\t\t\tonBottomReached={() => {\n\t\t\t\t\t\t\tif (hasNextPage && !isFetchingNextPage) {\n\t\t\t\t\t\t\t\tfetchNextPage().catch((error) => {\n\t\t\t\t\t\t\t\t\tconsole.error(error);\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\tclassName=\"max-h-[85vh]\"\n\t\t\t\t\t\tvirtualize={virtualize}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nconst LEVEL_FILTER_OPTIONS = [\n\t{ label: \"All\", value: 0 },\n\t{ label: \"Critical only\", value: 50 },\n\t{ label: \"Error and above\", value: 40 },\n\t{ label: \"Warning and above\", value: 30 },\n\t{ label: \"Info and above\", value: 20 },\n\t{ label: \"Debug and above\", value: 10 },\n] as const;\n\nconst LogLevelFilter = ({\n\tlevelFilter,\n\tsetLevelFilter,\n}: {\n\tlevelFilter: number;\n\tsetLevelFilter: (level: number) => void;\n}) => {\n\treturn (\n\t\t<Select\n\t\t\tvalue={levelFilter.toString()}\n\t\t\tonValueChange={(value) => setLevelFilter(Number(value))}\n\t\t>\n\t\t\t<SelectTrigger aria-label=\"log level filter\">\n\t\t\t\t<span>\n\t\t\t\t\t{`Level:\n\t\t\t\t\t\t\t${\n\t\t\t\t\t\t\t\tLEVEL_FILTER_OPTIONS.find(\n\t\t\t\t\t\t\t\t\t(option) => option.value === levelFilter,\n\t\t\t\t\t\t\t\t)?.label\n\t\t\t\t\t\t\t}`}\n\t\t\t\t</span>\n\t\t\t</SelectTrigger>\n\t\t\t<SelectContent>\n\t\t\t\t{LEVEL_FILTER_OPTIONS.map((option) => (\n\t\t\t\t\t<SelectItem key={option.value} value={option.value.toString()}>\n\t\t\t\t\t\t{option.label}\n\t\t\t\t\t</SelectItem>\n\t\t\t\t))}\n\t\t\t</SelectContent>\n\t\t</Select>\n\t);\n};\n\nconst LogSortOrder = ({\n\tsortOrder,\n\tsetSortOrder,\n}: {\n\tsortOrder: \"TIMESTAMP_ASC\" | \"TIMESTAMP_DESC\";\n\tsetSortOrder: (sortOrder: \"TIMESTAMP_ASC\" | \"TIMESTAMP_DESC\") => void;\n}) => (\n\t<Select\n\t\tvalue={sortOrder}\n\t\tonValueChange={(value) =>\n\t\t\tsetSortOrder(value as \"TIMESTAMP_ASC\" | \"TIMESTAMP_DESC\")\n\t\t}\n\t>\n\t\t<SelectTrigger aria-label=\"log sort order\">\n\t\t\t<SelectValue placeholder=\"Sort log order\" />\n\t\t</SelectTrigger>\n\t\t<SelectContent>\n\t\t\t<SelectItem value=\"TIMESTAMP_ASC\">Oldest to newest</SelectItem>\n\t\t\t<SelectItem value=\"TIMESTAMP_DESC\">Newest to oldest</SelectItem>\n\t\t</SelectContent>\n\t</Select>\n);\n","import {\n\tuseQuery,\n\tuseQueryClient,\n\tuseSuspenseQuery,\n} from \"@tanstack/react-query\";\nimport { useMemo, useState } from \"react\";\nimport {\n\tbuildCountFlowRunsQuery,\n\tbuildPaginateFlowRunsQuery,\n\ttype FlowRunsCountFilter,\n\ttype FlowRunsPaginateFilter,\n\ttype FlowRunWithFlow,\n} from \"@/api/flow-runs\";\nimport { buildListFlowsQuery, type Flow } from \"@/api/flows\";\nimport { FlowRunsList } from \"@/components/flow-runs/flow-runs-list\";\nimport { SortFilter } from \"@/components/flow-runs/flow-runs-list/flow-runs-filters/sort-filter\";\nimport type { SortFilters } from \"@/components/flow-runs/flow-runs-list/flow-runs-filters/sort-filter.constants\";\nimport { StateFilter } from \"@/components/flow-runs/flow-runs-list/flow-runs-filters/state-filter\";\nimport type { FlowRunState } from \"@/components/flow-runs/flow-runs-list/flow-runs-filters/state-filters.constants\";\nimport {\n\tFlowRunsPagination,\n\ttype PaginationState,\n} from \"@/components/flow-runs/flow-runs-list/flow-runs-pagination\";\nimport { SearchInput } from \"@/components/ui/input\";\nimport { Typography } from \"@/components/ui/typography\";\nimport useDebounce from \"@/hooks/use-debounce\";\n\ntype FlowRunSubflowsProps = {\n\tparentFlowRunId: string;\n};\n\nexport const FlowRunSubflows = ({ parentFlowRunId }: FlowRunSubflowsProps) => {\n\tconst queryClient = useQueryClient();\n\tconst [search, setSearch] = useState(\"\");\n\tconst [stateFilter, setStateFilter] = useState<Set<FlowRunState>>(new Set());\n\tconst [sort, setSort] = useState<SortFilters>(\"START_TIME_DESC\");\n\tconst [pagination, setPagination] = useState<PaginationState>({\n\t\tpage: 1,\n\t\tlimit: 10,\n\t});\n\n\tconst debouncedSearch = useDebounce(search, 300);\n\n\tconst countFilter: FlowRunsCountFilter = useMemo(() => {\n\t\treturn {\n\t\t\tflow_runs: {\n\t\t\t\toperator: \"and_\",\n\t\t\t\tparent_flow_run_id: {\n\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\tany_: [parentFlowRunId],\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}, [parentFlowRunId]);\n\n\tconst { data: countData } = useSuspenseQuery(\n\t\tbuildCountFlowRunsQuery(countFilter, 30_000),\n\t);\n\n\tconst paginateFilter: FlowRunsPaginateFilter = useMemo(() => {\n\t\tconst baseFilter: FlowRunsPaginateFilter = {\n\t\t\tpage: pagination.page,\n\t\t\tlimit: pagination.limit,\n\t\t\tsort,\n\t\t\tflow_runs: {\n\t\t\t\toperator: \"and_\",\n\t\t\t\tparent_flow_run_id: {\n\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\tany_: [parentFlowRunId],\n\t\t\t\t},\n\t\t\t\tname: debouncedSearch ? { like_: debouncedSearch } : undefined,\n\t\t\t\tstate:\n\t\t\t\t\tstateFilter.size > 0\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\t\t\t\tname: { any_: Array.from(stateFilter) },\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: undefined,\n\t\t\t},\n\t\t};\n\t\treturn baseFilter;\n\t}, [parentFlowRunId, pagination, sort, debouncedSearch, stateFilter]);\n\n\tconst { data: paginatedData } = useQuery(\n\t\tbuildPaginateFlowRunsQuery(paginateFilter, 30_000),\n\t);\n\n\tconst flowIds = useMemo(\n\t\t() => [\n\t\t\t...new Set(\n\t\t\t\t(paginatedData?.results ?? []).map((flowRun) => flowRun.flow_id),\n\t\t\t),\n\t\t],\n\t\t[paginatedData?.results],\n\t);\n\n\tconst { data: flows } = useQuery(\n\t\tbuildListFlowsQuery(\n\t\t\t{\n\t\t\t\tflows: {\n\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\tid: { any_: flowIds },\n\t\t\t\t},\n\t\t\t\toffset: 0,\n\t\t\t\tsort: \"NAME_ASC\",\n\t\t\t},\n\t\t\t{ enabled: flowIds.length > 0 },\n\t\t),\n\t);\n\n\tconst flowRunsWithFlows = useMemo(() => {\n\t\tif (!paginatedData?.results) return [];\n\t\tconst flowMap = new Map(flows?.map((flow: Flow) => [flow.id, flow]) ?? []);\n\t\treturn paginatedData.results\n\t\t\t.map((flowRun) => {\n\t\t\t\tconst flow = flowMap.get(flowRun.flow_id);\n\t\t\t\tif (!flow) return { ...flowRun, flow: undefined };\n\t\t\t\treturn {\n\t\t\t\t\t...flowRun,\n\t\t\t\t\tflow,\n\t\t\t\t};\n\t\t\t})\n\t\t\t.filter((flowRun) => flowRun !== null) as FlowRunWithFlow[];\n\t}, [paginatedData?.results, flows]);\n\n\tconst handleSearchChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n\t\tsetSearch(e.target.value);\n\t\tsetPagination((prev) => ({ ...prev, page: 1 }));\n\t};\n\n\tconst handleStateFilterChange = (newFilters: Set<FlowRunState>) => {\n\t\tsetStateFilter(newFilters);\n\t\tsetPagination((prev) => ({ ...prev, page: 1 }));\n\t};\n\n\tconst handleSortChange = (newSort: SortFilters) => {\n\t\tsetSort(newSort);\n\t\tsetPagination((prev) => ({ ...prev, page: 1 }));\n\t};\n\n\tconst handleClearFilters = () => {\n\t\tsetSearch(\"\");\n\t\tsetStateFilter(new Set());\n\t\tsetPagination((prev) => ({ ...prev, page: 1 }));\n\t};\n\n\tconst handlePrefetchPage = (page: number) => {\n\t\tvoid queryClient.prefetchQuery(\n\t\t\tbuildPaginateFlowRunsQuery(\n\t\t\t\t{\n\t\t\t\t\t...paginateFilter,\n\t\t\t\t\tpage,\n\t\t\t\t},\n\t\t\t\t30_000,\n\t\t\t),\n\t\t);\n\t};\n\n\tconst hasFilters = search || stateFilter.size > 0;\n\n\tif (countData === 0) {\n\t\treturn (\n\t\t\t<div className=\"flex items-center justify-center h-48 border rounded-lg bg-muted/50\">\n\t\t\t\t<Typography className=\"text-muted-foreground\">\n\t\t\t\t\tNo subflow runs found for this flow run.\n\t\t\t\t</Typography>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<div className=\"grid grid-cols-12 items-center gap-2\">\n\t\t\t\t<div className=\"flex flex-col gap-1 xl:col-span-3 md:col-span-12 col-span-6 md:order-0 order-2\">\n\t\t\t\t\t<Typography variant=\"bodySmall\" className=\"text-muted-foreground\">\n\t\t\t\t\t\t{countData} Subflow run{countData !== 1 ? \"s\" : \"\"}\n\t\t\t\t\t</Typography>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"xl:col-span-4 col-span-12 md:order-1 order-0\">\n\t\t\t\t\t<SearchInput\n\t\t\t\t\t\tvalue={search}\n\t\t\t\t\t\tonChange={handleSearchChange}\n\t\t\t\t\t\tplaceholder=\"Search by run name\"\n\t\t\t\t\t\taria-label=\"Search by run name\"\n\t\t\t\t\t\tdebounceMs={300}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"xl:col-span-3 md:col-span-6 col-span-12 md:order-2 order-1\">\n\t\t\t\t\t<StateFilter\n\t\t\t\t\t\tselectedFilters={stateFilter}\n\t\t\t\t\t\tonSelectFilter={handleStateFilterChange}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"xl:border-l xl:border-border xl:pl-2 xl:col-span-2 md:col-span-6 col-span-6 md:order-3 order-3\">\n\t\t\t\t\t<SortFilter value={sort} onSelect={handleSortChange} />\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<FlowRunsList\n\t\t\t\tflowRuns={flowRunsWithFlows}\n\t\t\t\tonClearFilters={hasFilters ? handleClearFilters : undefined}\n\t\t\t/>\n\n\t\t\t{paginatedData && paginatedData.pages > 0 && (\n\t\t\t\t<FlowRunsPagination\n\t\t\t\t\tpagination={pagination}\n\t\t\t\t\tonChangePagination={setPagination}\n\t\t\t\t\tcount={paginatedData.count}\n\t\t\t\t\tpages={paginatedData.pages}\n\t\t\t\t\tonPrefetchPage={handlePrefetchPage}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n","import { useMemo, useState } from \"react\";\nimport {\n\tFLOW_RUN_STATES_MAP,\n\tFLOW_RUN_STATES_NO_SCHEDULED,\n\ttype FlowRunState,\n} from \"@/components/flow-runs/flow-runs-list/flow-runs-filters/state-filters.constants\";\nimport { Button } from \"@/components/ui/button\";\nimport { Checkbox } from \"@/components/ui/checkbox\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { Icon } from \"@/components/ui/icons\";\nimport { StateBadge } from \"@/components/ui/state-badge\";\nimport { Typography } from \"@/components/ui/typography\";\nimport { cn } from \"@/utils\";\n\nconst MAX_FILTERS_DISPLAYED = 2;\n\ntype TaskRunStateFilterProps = {\n\tselectedFilters: Set<string>;\n\tonSelectFilter: (filters: Set<string>) => void;\n\tclassName?: string;\n};\n\nexport const TaskRunStateFilter = ({\n\tselectedFilters,\n\tonSelectFilter,\n\tclassName,\n}: TaskRunStateFilterProps) => {\n\tconst [open, setOpen] = useState(false);\n\n\tconst isAllButScheduled = useMemo(() => {\n\t\tconst flowRunStatesNoScheduleSet = new Set<string>(\n\t\t\tFLOW_RUN_STATES_NO_SCHEDULED,\n\t\t);\n\t\tif (\n\t\t\tselectedFilters.has(\"Scheduled\") ||\n\t\t\tflowRunStatesNoScheduleSet.size !== selectedFilters.size\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\t\treturn Array.from(selectedFilters).every((filter) =>\n\t\t\tflowRunStatesNoScheduleSet.has(filter),\n\t\t);\n\t}, [selectedFilters]);\n\n\tconst handleSelectAllExceptScheduled = () => {\n\t\tonSelectFilter(new Set(FLOW_RUN_STATES_NO_SCHEDULED));\n\t};\n\n\tconst handleSelectAllRunState = () => {\n\t\tonSelectFilter(new Set());\n\t};\n\n\tconst handleSelectFilter = (filter: string) => {\n\t\tif (isAllButScheduled) {\n\t\t\tonSelectFilter(new Set([filter]));\n\t\t\treturn;\n\t\t}\n\t\tconst updatedFilters = new Set(selectedFilters);\n\t\tif (selectedFilters.has(filter)) {\n\t\t\tupdatedFilters.delete(filter);\n\t\t} else {\n\t\t\tupdatedFilters.add(filter);\n\t\t}\n\t\tonSelectFilter(updatedFilters);\n\t};\n\n\tconst renderSelectedTags = () => {\n\t\tif (selectedFilters.size === 0) {\n\t\t\treturn \"All run states\";\n\t\t}\n\t\tif (isAllButScheduled) {\n\t\t\treturn \"All except scheduled\";\n\t\t}\n\n\t\tconst selected = Array.from(selectedFilters);\n\t\tconst visible = selected.slice(0, MAX_FILTERS_DISPLAYED);\n\t\tconst extraCount = selected.length - MAX_FILTERS_DISPLAYED;\n\n\t\treturn (\n\t\t\t<div className=\"flex flex-1 min-w-0 items-center gap-2\">\n\t\t\t\t<div className=\"flex flex-1 min-w-0 items-center gap-2 overflow-hidden\">\n\t\t\t\t\t{visible.map((filter) => (\n\t\t\t\t\t\t<StateBadge\n\t\t\t\t\t\t\tkey={filter}\n\t\t\t\t\t\t\tname={filter}\n\t\t\t\t\t\t\ttype={FLOW_RUN_STATES_MAP[filter as FlowRunState]}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t\t{extraCount > 0 && (\n\t\t\t\t\t<Typography variant=\"bodySmall\" className=\"shrink-0\">\n\t\t\t\t\t\t+ {extraCount}\n\t\t\t\t\t</Typography>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t};\n\n\treturn (\n\t\t<DropdownMenu open={open} onOpenChange={setOpen}>\n\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tclassName={cn(\"justify-between w-full\", className)}\n\t\t\t\t>\n\t\t\t\t\t<span className=\"flex-1 min-w-0\">{renderSelectedTags()}</span>\n\t\t\t\t\t<Icon id=\"ChevronDown\" className=\"ml-2 size-4 shrink-0\" />\n\t\t\t\t</Button>\n\t\t\t</DropdownMenuTrigger>\n\t\t\t<DropdownMenuContent className=\"max-h-96 overflow-x-hidden overflow-y-auto\">\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tonSelect={(e) => {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\thandleSelectAllExceptScheduled();\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<Checkbox checked={isAllButScheduled} className=\"mr-2\" />\n\t\t\t\t\tAll except scheduled\n\t\t\t\t</DropdownMenuItem>\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tonSelect={(e) => {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\thandleSelectAllRunState();\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<Checkbox checked={selectedFilters.size === 0} className=\"mr-2\" />\n\t\t\t\t\tAll run states\n\t\t\t\t</DropdownMenuItem>\n\t\t\t\t{Object.keys(FLOW_RUN_STATES_MAP).map((filterKey) => (\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\taria-label={filterKey}\n\t\t\t\t\t\tkey={filterKey}\n\t\t\t\t\t\tonSelect={(e) => {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\thandleSelectFilter(filterKey);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Checkbox\n\t\t\t\t\t\t\taria-label={filterKey}\n\t\t\t\t\t\t\tclassName=\"mr-2\"\n\t\t\t\t\t\t\tchecked={!isAllButScheduled && selectedFilters.has(filterKey)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<StateBadge\n\t\t\t\t\t\t\tname={filterKey}\n\t\t\t\t\t\t\ttype={FLOW_RUN_STATES_MAP[filterKey as FlowRunState]}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t))}\n\t\t\t</DropdownMenuContent>\n\t\t</DropdownMenu>\n\t);\n};\n","import {\n\tuseQuery,\n\tuseQueryClient,\n\tuseSuspenseQuery,\n} from \"@tanstack/react-query\";\nimport type { ChangeEvent } from \"react\";\nimport { useMemo, useState } from \"react\";\nimport {\n\tbuildCountTaskRunsQuery,\n\tbuildPaginateTaskRunsQuery,\n} from \"@/api/task-runs\";\nimport { TaskRunStateFilter } from \"@/components/task-runs/task-run-state-filter\";\nimport {\n\ttype TaskRunSortFilters,\n\tTaskRunsList,\n\tTaskRunsPagination,\n\tTaskRunsSortFilter,\n} from \"@/components/task-runs/task-runs-list\";\nimport type { PaginationState } from \"@/components/task-runs/task-runs-list/task-runs-pagination\";\nimport { SearchInput } from \"@/components/ui/input\";\nimport { TagsInput } from \"@/components/ui/tags-input\";\nimport { Typography } from \"@/components/ui/typography\";\nimport useDebounce from \"@/hooks/use-debounce\";\n\ntype FlowRunTaskRunsProps = {\n\tflowRunId: string;\n};\n\nexport const FlowRunTaskRuns = ({ flowRunId }: FlowRunTaskRunsProps) => {\n\tconst queryClient = useQueryClient();\n\tconst [search, setSearch] = useState(\"\");\n\tconst [stateFilter, setStateFilter] = useState<Set<string>>(new Set());\n\tconst [tagsFilter, setTagsFilter] = useState<Set<string>>(new Set());\n\tconst [sort, setSort] = useState<TaskRunSortFilters>(\n\t\t\"EXPECTED_START_TIME_DESC\",\n\t);\n\tconst [pagination, setPagination] = useState<PaginationState>({\n\t\tpage: 1,\n\t\tlimit: 20,\n\t});\n\n\tconst debouncedSearch = useDebounce(search, 300);\n\n\tconst { data: countData } = useSuspenseQuery(\n\t\tbuildCountTaskRunsQuery(\n\t\t\t{\n\t\t\t\ttask_runs: {\n\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\tflow_run_id: { operator: \"and_\", any_: [flowRunId], is_null_: false },\n\t\t\t\t\tsubflow_runs: { exists_: false },\n\t\t\t\t},\n\t\t\t},\n\t\t\t30_000,\n\t\t),\n\t);\n\n\tconst { data: paginatedData } = useQuery(\n\t\tbuildPaginateTaskRunsQuery(\n\t\t\t{\n\t\t\t\ttask_runs: {\n\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\tflow_run_id: { operator: \"and_\", any_: [flowRunId], is_null_: false },\n\t\t\t\t\tsubflow_runs: { exists_: false },\n\t\t\t\t\tname: debouncedSearch ? { like_: debouncedSearch } : undefined,\n\t\t\t\t\tstate:\n\t\t\t\t\t\tstateFilter.size > 0\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\t\t\t\t\tname: { any_: Array.from(stateFilter) },\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\ttags:\n\t\t\t\t\t\ttagsFilter.size > 0\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\t\t\t\t\tall_: Array.from(tagsFilter),\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t},\n\t\t\t\tsort,\n\t\t\t\tpage: pagination.page,\n\t\t\t\tlimit: pagination.limit,\n\t\t\t},\n\t\t\t30_000,\n\t\t),\n\t);\n\n\tconst handleSearchChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n\t\tsetSearch(e.target.value);\n\t\tsetPagination((prev) => ({ ...prev, page: 1 }));\n\t};\n\n\tconst handleStateFilterChange = (newFilters: Set<string>) => {\n\t\tsetStateFilter(newFilters);\n\t\tsetPagination((prev) => ({ ...prev, page: 1 }));\n\t};\n\n\tconst handleSortChange = (newSort: TaskRunSortFilters) => {\n\t\tsetSort(newSort);\n\t\tsetPagination((prev) => ({ ...prev, page: 1 }));\n\t};\n\n\tconst handleTagsFilterChange = (\n\t\ttags: string[] | ChangeEvent<HTMLInputElement>,\n\t) => {\n\t\tconst newTags = Array.isArray(tags) ? tags : [];\n\t\tsetTagsFilter(new Set(newTags));\n\t\tsetPagination((prev) => ({ ...prev, page: 1 }));\n\t};\n\n\tconst handleClearFilters = () => {\n\t\tsetSearch(\"\");\n\t\tsetStateFilter(new Set());\n\t\tsetTagsFilter(new Set());\n\t\tsetPagination((prev) => ({ ...prev, page: 1 }));\n\t};\n\n\tconst handlePrefetchPage = (page: number) => {\n\t\tvoid queryClient.prefetchQuery(\n\t\t\tbuildPaginateTaskRunsQuery(\n\t\t\t\t{\n\t\t\t\t\ttask_runs: {\n\t\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\t\tflow_run_id: {\n\t\t\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\t\t\tany_: [flowRunId],\n\t\t\t\t\t\t\tis_null_: false,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsubflow_runs: { exists_: false },\n\t\t\t\t\t\tname: debouncedSearch ? { like_: debouncedSearch } : undefined,\n\t\t\t\t\t\tstate:\n\t\t\t\t\t\t\tstateFilter.size > 0\n\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\t\t\t\t\t\tname: { any_: Array.from(stateFilter) },\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\ttags:\n\t\t\t\t\t\t\ttagsFilter.size > 0\n\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\t\t\t\t\t\tall_: Array.from(tagsFilter),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t},\n\t\t\t\t\tsort,\n\t\t\t\t\tpage,\n\t\t\t\t\tlimit: pagination.limit,\n\t\t\t\t},\n\t\t\t\t30_000,\n\t\t\t),\n\t\t);\n\t};\n\n\tconst hasFilters = search || stateFilter.size > 0 || tagsFilter.size > 0;\n\n\t// Calculate state summary from paginated results\n\tconst stateSummary = useMemo(() => {\n\t\tif (!paginatedData?.results) return null;\n\t\tconst stateCounts = new Map<string, number>();\n\t\tfor (const taskRun of paginatedData.results) {\n\t\t\tconst stateName = String(taskRun.state?.name ?? \"Unknown\");\n\t\t\tstateCounts.set(stateName, (stateCounts.get(stateName) ?? 0) + 1);\n\t\t}\n\t\treturn Array.from(stateCounts.entries())\n\t\t\t.map(([name, count]) => `${count} ${name}`)\n\t\t\t.join(\", \");\n\t}, [paginatedData?.results]);\n\n\tif (countData === 0) {\n\t\treturn (\n\t\t\t<div className=\"flex items-center justify-center h-48 border rounded-lg bg-muted/50\">\n\t\t\t\t<Typography className=\"text-muted-foreground\">\n\t\t\t\t\tNo task runs found for this flow run.\n\t\t\t\t</Typography>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t{/* Mobile: controls on top, count/sort on bottom. Desktop: count | controls | sort */}\n\t\t\t<div className=\"grid grid-cols-12 items-center gap-2\">\n\t\t\t\t{/* Count - first column */}\n\t\t\t\t<div className=\"flex flex-col gap-1 xl:col-span-3 md:col-span-12 col-span-6 md:order-0 order-3\">\n\t\t\t\t\t<Typography variant=\"bodySmall\" className=\"text-muted-foreground\">\n\t\t\t\t\t\t{countData} Task run{countData !== 1 ? \"s\" : \"\"}\n\t\t\t\t\t</Typography>\n\t\t\t\t\t{stateSummary && (\n\t\t\t\t\t\t<Typography\n\t\t\t\t\t\t\tvariant=\"bodySmall\"\n\t\t\t\t\t\t\tclassName=\"text-muted-foreground text-xs capitalize\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t({stateSummary})\n\t\t\t\t\t\t</Typography>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\n\t\t\t\t{/* Controls - middle column */}\n\t\t\t\t<div className=\"xl:col-span-3 md:col-span-6 col-span-12 md:order-1 order-0\">\n\t\t\t\t\t<SearchInput\n\t\t\t\t\t\tvalue={search}\n\t\t\t\t\t\tonChange={handleSearchChange}\n\t\t\t\t\t\tplaceholder=\"Search by run name\"\n\t\t\t\t\t\taria-label=\"Search by run name\"\n\t\t\t\t\t\tdebounceMs={300}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"xl:col-span-2 md:col-span-6 col-span-12 md:order-2 order-1\">\n\t\t\t\t\t<TaskRunStateFilter\n\t\t\t\t\t\tselectedFilters={stateFilter}\n\t\t\t\t\t\tonSelectFilter={handleStateFilterChange}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"xl:col-span-2 md:col-span-6 col-span-12 md:order-3 order-2\">\n\t\t\t\t\t<TagsInput\n\t\t\t\t\t\tvalue={Array.from(tagsFilter)}\n\t\t\t\t\t\tonChange={handleTagsFilterChange}\n\t\t\t\t\t\tplaceholder=\"All tags\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t{/* Sort - last column with left border on desktop */}\n\t\t\t\t<div className=\"xl:border-l xl:border-border xl:pl-2 xl:col-span-2 md:col-span-6 col-span-6 md:order-4 order-4\">\n\t\t\t\t\t<TaskRunsSortFilter value={sort} onSelect={handleSortChange} />\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<TaskRunsList\n\t\t\t\ttaskRuns={paginatedData?.results}\n\t\t\t\tonClearFilters={hasFilters ? handleClearFilters : undefined}\n\t\t\t/>\n\n\t\t\t{paginatedData && paginatedData.pages > 0 && (\n\t\t\t\t<TaskRunsPagination\n\t\t\t\t\tpagination={pagination}\n\t\t\t\t\tonChangePagination={setPagination}\n\t\t\t\t\tcount={paginatedData.count}\n\t\t\t\t\tpages={paginatedData.pages}\n\t\t\t\t\tonPrefetchPage={handlePrefetchPage}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n","import { useQueryClient, useSuspenseQuery } from \"@tanstack/react-query\";\nimport { useRouter } from \"@tanstack/react-router\";\nimport { MoreVertical } from \"lucide-react\";\nimport { Suspense, useCallback, useEffect, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport { queryKeyFactory as artifactsQueryKeyFactory } from \"@/api/artifacts\";\nimport {\n\tbuildGetFlowRunDetailsQuery,\n\ttype FlowRun,\n\tqueryKeyFactory as flowRunsQueryKeyFactory,\n\tuseDeleteFlowRun,\n\tuseSetFlowRunState,\n} from \"@/api/flow-runs\";\nimport { queryKeyFactory as logsQueryKeyFactory } from \"@/api/logs\";\nimport { queryKeyFactory as taskRunsQueryKeyFactory } from \"@/api/task-runs\";\nimport { FlowRunGraph } from \"@/components/flow-runs/flow-run-graph\";\nimport {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbLink,\n\tBreadcrumbList,\n\tBreadcrumbPage,\n\tBreadcrumbSeparator,\n} from \"@/components/ui/breadcrumb\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent } from \"@/components/ui/card\";\nimport {\n\tChangeStateDialog,\n\tuseChangeStateDialog,\n} from \"@/components/ui/change-state-dialog\";\nimport {\n\tDeleteConfirmationDialog,\n\tuseDeleteConfirmationDialog,\n} from \"@/components/ui/delete-confirmation-dialog\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { ErrorBoundary } from \"@/components/ui/error-boundary\";\nimport { Icon } from \"@/components/ui/icons\";\nimport { LazyJsonInput } from \"@/components/ui/json-input-lazy\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\nimport { StateBadge } from \"@/components/ui/state-badge\";\nimport { TabErrorState } from \"@/components/ui/tab-error-state\";\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@/components/ui/tabs\";\nimport { FlowRunArtifacts } from \"./flow-run-artifacts\";\nimport { FlowRunDetails } from \"./flow-run-details\";\nimport { FlowRunLogs } from \"./flow-run-logs\";\nimport { FlowRunSubflows } from \"./flow-run-subflows\";\nimport { FlowRunTaskRuns } from \"./flow-run-task-runs\";\n\ntype FlowRunDetailsTabOptions =\n\t| \"Logs\"\n\t| \"TaskRuns\"\n\t| \"SubflowRuns\"\n\t| \"Artifacts\"\n\t| \"Details\"\n\t| \"Parameters\"\n\t| \"JobVariables\";\n\ntype FlowRunDetailsPageProps = {\n\tid: string;\n\ttab: FlowRunDetailsTabOptions;\n\tonTabChange: (tab: FlowRunDetailsTabOptions) => void;\n};\n\nexport const FlowRunDetailsPage = ({\n\tid,\n\ttab,\n\tonTabChange,\n}: FlowRunDetailsPageProps) => {\n\tconst [refetchInterval, setRefetchInterval] = useState<number | false>(false);\n\tconst [fullscreen, setFullscreen] = useState(false);\n\tconst queryClient = useQueryClient();\n\tconst { data: flowRun } = useSuspenseQuery({\n\t\t...buildGetFlowRunDetailsQuery(id),\n\t\trefetchInterval,\n\t});\n\tconst { deleteFlowRun } = useDeleteFlowRun();\n\tconst { navigate } = useRouter();\n\tconst isPending = flowRun.state_type === \"PENDING\";\n\n\tuseEffect(() => {\n\t\tif (flowRun.state_type === \"RUNNING\" || flowRun.state_type === \"PENDING\") {\n\t\t\tsetRefetchInterval(5000);\n\t\t} else {\n\t\t\tsetRefetchInterval(false);\n\t\t}\n\t}, [flowRun]);\n\n\tconst onDeleteRunClicked = () => {\n\t\tdeleteFlowRun(flowRun.id, {\n\t\t\tonSuccess: () => {\n\t\t\t\tsetRefetchInterval(false);\n\t\t\t\ttoast.success(\"Flow run deleted\");\n\t\t\t\tvoid navigate({ to: \"/runs\", replace: true });\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 flow run.\";\n\t\t\t\ttoast.error(message);\n\t\t\t},\n\t\t});\n\t};\n\n\tconst retryLogs = useCallback(() => {\n\t\tvoid queryClient.invalidateQueries({\n\t\t\tqueryKey: logsQueryKeyFactory.all(),\n\t\t});\n\t}, [queryClient]);\n\n\tconst retryTaskRuns = useCallback(() => {\n\t\tvoid queryClient.invalidateQueries({\n\t\t\tqueryKey: taskRunsQueryKeyFactory.all(),\n\t\t});\n\t}, [queryClient]);\n\n\tconst retrySubflows = useCallback(() => {\n\t\tvoid queryClient.invalidateQueries({\n\t\t\tqueryKey: flowRunsQueryKeyFactory.lists(),\n\t\t});\n\t}, [queryClient]);\n\n\tconst retryArtifacts = useCallback(() => {\n\t\tvoid queryClient.invalidateQueries({\n\t\t\tqueryKey: artifactsQueryKeyFactory.all(),\n\t\t});\n\t}, [queryClient]);\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t<Header flowRun={flowRun} onDeleteRunClicked={onDeleteRunClicked} />\n\t\t\t</div>\n\t\t\t{!isPending && (\n\t\t\t\t<Card>\n\t\t\t\t\t<CardContent className=\"p-0\">\n\t\t\t\t\t\t<FlowRunGraph\n\t\t\t\t\t\t\tflowRunId={flowRun.id}\n\t\t\t\t\t\t\tfullscreen={fullscreen}\n\t\t\t\t\t\t\tonFullscreenChange={setFullscreen}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</CardContent>\n\t\t\t\t</Card>\n\t\t\t)}\n\t\t\t<div className=\"grid lg:grid-cols-[1fr_250px] grid-cols-[1fr] gap-4\">\n\t\t\t\t<TabsLayout\n\t\t\t\t\tcurrentTab={tab}\n\t\t\t\t\tonTabChange={onTabChange}\n\t\t\t\t\tflowRun={flowRun}\n\t\t\t\t\tlogsContent={\n\t\t\t\t\t\t<ErrorBoundary\n\t\t\t\t\t\t\tfallback={\n\t\t\t\t\t\t\t\t<TabErrorState\n\t\t\t\t\t\t\t\t\terror={{\n\t\t\t\t\t\t\t\t\t\ttype: \"unknown-error\",\n\t\t\t\t\t\t\t\t\t\tmessage: \"Failed to load logs\",\n\t\t\t\t\t\t\t\t\t\tdetails:\n\t\t\t\t\t\t\t\t\t\t\t\"An error occurred while loading log data. Please try again.\",\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonRetry={retryLogs}\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\t<Suspense fallback={<LogsSkeleton />}>\n\t\t\t\t\t\t\t\t<FlowRunLogs flowRun={flowRun} />\n\t\t\t\t\t\t\t</Suspense>\n\t\t\t\t\t\t</ErrorBoundary>\n\t\t\t\t\t}\n\t\t\t\t\ttaskRunsContent={\n\t\t\t\t\t\t<ErrorBoundary\n\t\t\t\t\t\t\tfallback={\n\t\t\t\t\t\t\t\t<TabErrorState\n\t\t\t\t\t\t\t\t\terror={{\n\t\t\t\t\t\t\t\t\t\ttype: \"unknown-error\",\n\t\t\t\t\t\t\t\t\t\tmessage: \"Failed to load task runs\",\n\t\t\t\t\t\t\t\t\t\tdetails:\n\t\t\t\t\t\t\t\t\t\t\t\"An error occurred while loading task run data. Please try again.\",\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonRetry={retryTaskRuns}\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\t<Suspense fallback={<TaskRunsSkeleton />}>\n\t\t\t\t\t\t\t\t<FlowRunTaskRuns flowRunId={id} />\n\t\t\t\t\t\t\t</Suspense>\n\t\t\t\t\t\t</ErrorBoundary>\n\t\t\t\t\t}\n\t\t\t\t\tsubflowRunsContent={\n\t\t\t\t\t\t<ErrorBoundary\n\t\t\t\t\t\t\tfallback={\n\t\t\t\t\t\t\t\t<TabErrorState\n\t\t\t\t\t\t\t\t\terror={{\n\t\t\t\t\t\t\t\t\t\ttype: \"unknown-error\",\n\t\t\t\t\t\t\t\t\t\tmessage: \"Failed to load subflow runs\",\n\t\t\t\t\t\t\t\t\t\tdetails:\n\t\t\t\t\t\t\t\t\t\t\t\"An error occurred while loading subflow run data. Please try again.\",\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonRetry={retrySubflows}\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\t<Suspense fallback={<SubflowsSkeleton />}>\n\t\t\t\t\t\t\t\t<FlowRunSubflows parentFlowRunId={id} />\n\t\t\t\t\t\t\t</Suspense>\n\t\t\t\t\t\t</ErrorBoundary>\n\t\t\t\t\t}\n\t\t\t\t\tartifactsContent={\n\t\t\t\t\t\t<ErrorBoundary\n\t\t\t\t\t\t\tfallback={\n\t\t\t\t\t\t\t\t<TabErrorState\n\t\t\t\t\t\t\t\t\terror={{\n\t\t\t\t\t\t\t\t\t\ttype: \"unknown-error\",\n\t\t\t\t\t\t\t\t\t\tmessage: \"Failed to load artifacts\",\n\t\t\t\t\t\t\t\t\t\tdetails:\n\t\t\t\t\t\t\t\t\t\t\t\"An error occurred while loading artifact data. Please try again.\",\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonRetry={retryArtifacts}\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\t<Suspense fallback={<ArtifactsSkeleton />}>\n\t\t\t\t\t\t\t\t<FlowRunArtifacts flowRun={flowRun} />\n\t\t\t\t\t\t\t</Suspense>\n\t\t\t\t\t\t</ErrorBoundary>\n\t\t\t\t\t}\n\t\t\t\t\tdetailsContent={\n\t\t\t\t\t\t<Suspense fallback={<DetailsSkeleton />}>\n\t\t\t\t\t\t\t<FlowRunDetails flowRun={flowRun} />\n\t\t\t\t\t\t</Suspense>\n\t\t\t\t\t}\n\t\t\t\t\tparametersContent={\n\t\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t\t<div className=\"flex justify-end\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\ttoast.success(\"Copied parameters to clipboard\");\n\t\t\t\t\t\t\t\t\t\tvoid navigator.clipboard.writeText(\n\t\t\t\t\t\t\t\t\t\t\tJSON.stringify(flowRun.parameters ?? {}, null, 2),\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Icon id=\"Copy\" className=\"size-4 mr-2\" />\n\t\t\t\t\t\t\t\t\tCopy parameters\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<LazyJsonInput\n\t\t\t\t\t\t\t\tvalue={JSON.stringify(flowRun.parameters ?? {}, null, 2)}\n\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\tclassName=\"min-h-[200px]\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t\tjobVariablesContent={\n\t\t\t\t\t\t<div className=\"space-y-4\">\n\t\t\t\t\t\t\t<div className=\"flex justify-end\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\ttoast.success(\"Copied job variables to clipboard\");\n\t\t\t\t\t\t\t\t\t\tvoid navigator.clipboard.writeText(\n\t\t\t\t\t\t\t\t\t\t\tJSON.stringify(flowRun.job_variables ?? {}, null, 2),\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Icon id=\"Copy\" className=\"size-4 mr-2\" />\n\t\t\t\t\t\t\t\t\tCopy job variables\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<LazyJsonInput\n\t\t\t\t\t\t\t\tvalue={JSON.stringify(flowRun.job_variables ?? {}, null, 2)}\n\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\tclassName=\"min-h-[200px]\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<div className=\"hidden lg:block\">\n\t\t\t\t\t<FlowRunDetails flowRun={flowRun} />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nconst Header = ({\n\tflowRun,\n\tonDeleteRunClicked,\n}: {\n\tflowRun: FlowRun;\n\tonDeleteRunClicked: () => void;\n}) => {\n\tconst [dialogState, confirmDelete] = useDeleteConfirmationDialog();\n\tconst {\n\t\topen: isChangeStateOpen,\n\t\tonOpenChange: setChangeStateOpen,\n\t\topenDialog: openChangeState,\n\t} = useChangeStateDialog();\n\tconst { setFlowRunState, isPending: isChangingState } = useSetFlowRunState();\n\n\tconst canChangeState =\n\t\tflowRun.state_type &&\n\t\t[\"COMPLETED\", \"FAILED\", \"CANCELLED\", \"CRASHED\"].includes(\n\t\t\tflowRun.state_type,\n\t\t);\n\n\tconst handleChangeState = (newState: { type: string; message?: string }) => {\n\t\tsetFlowRunState(\n\t\t\t{\n\t\t\t\tid: flowRun.id,\n\t\t\t\tstate: {\n\t\t\t\t\ttype: newState.type as\n\t\t\t\t\t\t| \"COMPLETED\"\n\t\t\t\t\t\t| \"FAILED\"\n\t\t\t\t\t\t| \"CANCELLED\"\n\t\t\t\t\t\t| \"CRASHED\",\n\t\t\t\t\tname: newState.type.charAt(0) + newState.type.slice(1).toLowerCase(),\n\t\t\t\t\tmessage: newState.message,\n\t\t\t\t},\n\t\t\t\tforce: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tonSuccess: () => {\n\t\t\t\t\ttoast.success(\"Flow run state changed\");\n\t\t\t\t\tsetChangeStateOpen(false);\n\t\t\t\t},\n\t\t\t\tonError: (error) => {\n\t\t\t\t\ttoast.error(error.message || \"Failed to change state\");\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\t};\n\n\treturn (\n\t\t<div className=\"flex flex-row justify-between\">\n\t\t\t<Breadcrumb>\n\t\t\t\t<BreadcrumbList>\n\t\t\t\t\t<BreadcrumbItem>\n\t\t\t\t\t\t<BreadcrumbLink to=\"/runs\" className=\"text-xl font-semibold\">\n\t\t\t\t\t\t\tRuns\n\t\t\t\t\t\t</BreadcrumbLink>\n\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t\t<BreadcrumbSeparator />\n\t\t\t\t\t<BreadcrumbItem className=\"text-xl\">\n\t\t\t\t\t\t<BreadcrumbPage className=\"font-semibold\">\n\t\t\t\t\t\t\t{flowRun.name}\n\t\t\t\t\t\t</BreadcrumbPage>\n\t\t\t\t\t\t{flowRun.state && (\n\t\t\t\t\t\t\t<StateBadge\n\t\t\t\t\t\t\t\ttype={flowRun.state.type}\n\t\t\t\t\t\t\t\tname={flowRun.state.name}\n\t\t\t\t\t\t\t\tclassName=\"ml-2\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t</BreadcrumbList>\n\t\t\t</Breadcrumb>\n\t\t\t<DropdownMenu>\n\t\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t\t<Button variant=\"outline\" className=\"p-2\">\n\t\t\t\t\t\t<MoreVertical className=\"w-4 h-4\" />\n\t\t\t\t\t</Button>\n\t\t\t\t</DropdownMenuTrigger>\n\t\t\t\t<DropdownMenuContent>\n\t\t\t\t\t{canChangeState && (\n\t\t\t\t\t\t<DropdownMenuItem onClick={openChangeState}>\n\t\t\t\t\t\t\tChange state\n\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t)}\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\ttoast.success(\"Copied flow run ID to clipboard\");\n\t\t\t\t\t\t\tvoid navigator.clipboard.writeText(flowRun.id);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tCopy ID\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\tconfirmDelete({\n\t\t\t\t\t\t\t\ttitle: \"Delete Flow Run\",\n\t\t\t\t\t\t\t\tdescription: `Are you sure you want to delete flow run ${flowRun.name}?`,\n\t\t\t\t\t\t\t\tonConfirm: onDeleteRunClicked,\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\t\tDelete\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t</DropdownMenuContent>\n\t\t\t</DropdownMenu>\n\t\t\t<DeleteConfirmationDialog {...dialogState} />\n\t\t\t<ChangeStateDialog\n\t\t\t\topen={isChangeStateOpen}\n\t\t\t\tonOpenChange={setChangeStateOpen}\n\t\t\t\tcurrentState={\n\t\t\t\t\tflowRun.state\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\ttype: flowRun.state.type,\n\t\t\t\t\t\t\t\tname:\n\t\t\t\t\t\t\t\t\tflowRun.state.name ??\n\t\t\t\t\t\t\t\t\tflowRun.state.type.charAt(0) +\n\t\t\t\t\t\t\t\t\t\tflowRun.state.type.slice(1).toLowerCase(),\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: null\n\t\t\t\t}\n\t\t\t\tlabel=\"Flow Run\"\n\t\t\t\tonConfirm={handleChangeState}\n\t\t\t\tisLoading={isChangingState}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n\nconst TabsLayout = ({\n\tcurrentTab,\n\tonTabChange,\n\tflowRun,\n\tlogsContent,\n\ttaskRunsContent,\n\tsubflowRunsContent,\n\tartifactsContent,\n\tdetailsContent,\n\tparametersContent,\n\tjobVariablesContent,\n}: {\n\tcurrentTab: FlowRunDetailsTabOptions;\n\tonTabChange: (tab: FlowRunDetailsTabOptions) => void;\n\tflowRun: FlowRun;\n\tlogsContent: React.ReactNode;\n\ttaskRunsContent: React.ReactNode;\n\tsubflowRunsContent: React.ReactNode;\n\tartifactsContent: React.ReactNode;\n\tdetailsContent: React.ReactNode;\n\tparametersContent: React.ReactNode;\n\tjobVariablesContent: React.ReactNode;\n}) => {\n\tuseEffect(() => {\n\t\tconst bp = getComputedStyle(document.documentElement)\n\t\t\t.getPropertyValue(\"--breakpoint-lg\")\n\t\t\t.trim();\n\t\tconst mql = window.matchMedia(`(max-width: ${bp})`);\n\t\tconst onChange = () => {\n\t\t\tif (currentTab === \"Details\") {\n\t\t\t\tonTabChange(\"Logs\");\n\t\t\t}\n\t\t};\n\t\tmql.addEventListener(\"change\", onChange);\n\t\treturn () => mql.removeEventListener(\"change\", onChange);\n\t}, [currentTab, onTabChange]);\n\n\treturn (\n\t\t<Tabs\n\t\t\tvalue={currentTab}\n\t\t\tonValueChange={(value) => onTabChange(value as FlowRunDetailsTabOptions)}\n\t\t>\n\t\t\t<TabsList>\n\t\t\t\t<TabsTrigger value=\"Details\" className=\"lg:hidden\">\n\t\t\t\t\tDetails\n\t\t\t\t</TabsTrigger>\n\t\t\t\t<TabsTrigger value=\"Logs\">Logs</TabsTrigger>\n\t\t\t\t{flowRun.state_type !== \"PENDING\" && (\n\t\t\t\t\t<TabsTrigger value=\"TaskRuns\">Task Runs</TabsTrigger>\n\t\t\t\t)}\n\t\t\t\t{flowRun.state_type !== \"PENDING\" && (\n\t\t\t\t\t<TabsTrigger value=\"SubflowRuns\">Subflow Runs</TabsTrigger>\n\t\t\t\t)}\n\t\t\t\t<TabsTrigger value=\"Artifacts\">Artifacts</TabsTrigger>\n\t\t\t\t<TabsTrigger value=\"Parameters\">Parameters</TabsTrigger>\n\t\t\t\t<TabsTrigger value=\"JobVariables\">Job Variables</TabsTrigger>\n\t\t\t</TabsList>\n\t\t\t<TabsContent value=\"Details\">{detailsContent}</TabsContent>\n\t\t\t<TabsContent value=\"Logs\">{logsContent}</TabsContent>\n\t\t\t<TabsContent value=\"TaskRuns\">{taskRunsContent}</TabsContent>\n\t\t\t<TabsContent value=\"SubflowRuns\">{subflowRunsContent}</TabsContent>\n\t\t\t<TabsContent value=\"Artifacts\">{artifactsContent}</TabsContent>\n\t\t\t<TabsContent value=\"Parameters\">{parametersContent}</TabsContent>\n\t\t\t<TabsContent value=\"JobVariables\">{jobVariablesContent}</TabsContent>\n\t\t</Tabs>\n\t);\n};\n\nconst LogsSkeleton = () => {\n\treturn (\n\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t<div className=\"flex flex-row gap-2 justify-end\">\n\t\t\t\t<Skeleton className=\"h-8 w-25\" />\n\t\t\t\t<Skeleton className=\"h-8 w-32\" />\n\t\t\t</div>\n\t\t\t<Skeleton className=\"h-32\" />\n\t\t</div>\n\t);\n};\n\nconst TaskRunsSkeleton = () => {\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t<Skeleton className=\"h-4 w-24\" />\n\t\t\t</div>\n\t\t\t<div className=\"flex flex-col sm:flex-row gap-2\">\n\t\t\t\t<Skeleton className=\"h-9 flex-1\" />\n\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t<Skeleton className=\"h-9 w-48\" />\n\t\t\t\t\t<Skeleton className=\"h-9 w-40\" />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t<Skeleton className=\"h-24\" />\n\t\t\t\t<Skeleton className=\"h-24\" />\n\t\t\t\t<Skeleton className=\"h-24\" />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nconst ArtifactsSkeleton = () => {\n\treturn (\n\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t<div className=\"flex flex-row justify-end\">\n\t\t\t\t<Skeleton className=\"h-8 w-12\" />\n\t\t\t</div>\n\t\t\t<div className=\"grid grid-cols-1 gap-4 lg:grid-cols-2 xl:grid-cols-3\">\n\t\t\t\t<Skeleton className=\"h-40\" />\n\t\t\t\t<Skeleton className=\"h-40\" />\n\t\t\t\t<Skeleton className=\"h-40\" />\n\t\t\t\t<Skeleton className=\"h-40\" />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nconst SubflowsSkeleton = () => {\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t<Skeleton className=\"h-4 w-24\" />\n\t\t\t</div>\n\t\t\t<div className=\"flex flex-col sm:flex-row gap-2\">\n\t\t\t\t<Skeleton className=\"h-9 flex-1\" />\n\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t<Skeleton className=\"h-9 w-48\" />\n\t\t\t\t\t<Skeleton className=\"h-9 w-40\" />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t<Skeleton className=\"h-24\" />\n\t\t\t\t<Skeleton className=\"h-24\" />\n\t\t\t\t<Skeleton className=\"h-24\" />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nconst DetailsSkeleton = () => {\n\treturn (\n\t\t<div className=\"space-y-4\">\n\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t<Skeleton className=\"h-4 w-20\" />\n\t\t\t\t<Skeleton className=\"h-5 w-12\" />\n\t\t\t</div>\n\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t<Skeleton className=\"h-4 w-16\" />\n\t\t\t\t<Skeleton className=\"h-5 w-32\" />\n\t\t\t</div>\n\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t<Skeleton className=\"h-4 w-24\" />\n\t\t\t\t<Skeleton className=\"h-5 w-32\" />\n\t\t\t</div>\n\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t<Skeleton className=\"h-4 w-24\" />\n\t\t\t\t<Skeleton className=\"h-5 w-64\" />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n","import type { ErrorComponentProps } from \"@tanstack/react-router\";\nimport { createFileRoute, notFound, useNavigate } from \"@tanstack/react-router\";\nimport { zodValidator } from \"@tanstack/zod-adapter\";\nimport { z } from \"zod\";\nimport { buildListArtifactsQuery } from \"@/api/artifacts\";\nimport { categorizeError } from \"@/api/error-utils\";\nimport { buildGetFlowRunDetailsQuery } from \"@/api/flow-runs\";\nimport { buildInfiniteFilterLogsQuery } from \"@/api/logs\";\nimport { buildPaginateTaskRunsQuery } from \"@/api/task-runs\";\nimport { FlowRunDetailsPage } from \"@/components/flow-runs/flow-run-details-page\";\nimport { FlowRunNotFound } from \"@/components/flow-runs/flow-run-not-found\";\nimport { RouteErrorState } from \"@/components/ui/route-error-state\";\n\nconst searchParams = z.object({\n\ttab: z\n\t\t.enum([\n\t\t\t\"Logs\",\n\t\t\t\"TaskRuns\",\n\t\t\t\"SubflowRuns\",\n\t\t\t\"Artifacts\",\n\t\t\t\"Details\",\n\t\t\t\"Parameters\",\n\t\t\t\"JobVariables\",\n\t\t])\n\t\t.default(\"Logs\")\n\t\t.catch(\"Logs\"),\n});\n\nexport type FlowRunDetailsTabOptions = z.infer<typeof searchParams>[\"tab\"];\n\nfunction FlowRunErrorComponent({ error, reset }: ErrorComponentProps) {\n\tconst serverError = categorizeError(error, \"Failed to load flow run\");\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\">Flow Run</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(\"/runs/flow-run/$id\")({\n\tvalidateSearch: zodValidator(searchParams),\n\tcomponent: RouteComponent,\n\tloader: async ({ params, context: { queryClient } }) => {\n\t\t// ----- Deferred data\n\t\tvoid queryClient.prefetchInfiniteQuery(\n\t\t\tbuildInfiniteFilterLogsQuery({\n\t\t\t\tlimit: 50,\n\t\t\t\tsort: \"TIMESTAMP_ASC\",\n\t\t\t\tlogs: {\n\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\tlevel: {\n\t\t\t\t\t\tge_: 0,\n\t\t\t\t\t},\n\t\t\t\t\tflow_run_id: {\n\t\t\t\t\t\tany_: [params.id],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}),\n\t\t);\n\n\t\tvoid queryClient.prefetchQuery(\n\t\t\tbuildListArtifactsQuery({\n\t\t\t\tartifacts: {\n\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\tflow_run_id: {\n\t\t\t\t\t\tany_: [params.id],\n\t\t\t\t\t},\n\t\t\t\t\ttype: {\n\t\t\t\t\t\tnot_any_: [\"result\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tsort: \"ID_DESC\",\n\t\t\t\toffset: 0,\n\t\t\t}),\n\t\t);\n\n\t\tvoid queryClient.prefetchQuery(\n\t\t\tbuildPaginateTaskRunsQuery({\n\t\t\t\tpage: 1,\n\t\t\t\tsort: \"EXPECTED_START_TIME_DESC\",\n\t\t\t\tflow_runs: {\n\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\tid: {\n\t\t\t\t\t\tany_: [params.id],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}),\n\t\t);\n\n\t\t// ----- Critical data\n\t\ttry {\n\t\t\tawait queryClient.ensureQueryData(buildGetFlowRunDetailsQuery(params.id));\n\t\t} catch (error) {\n\t\t\t// Only treat \"not found\" errors as 404, rethrow other errors\n\t\t\tif (error instanceof Error && /not found/i.test(error.message)) {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/only-throw-error\n\t\t\t\tthrow notFound();\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t},\n\twrapInSuspense: true,\n\terrorComponent: FlowRunErrorComponent,\n\tnotFoundComponent: FlowRunNotFound,\n});\n\nfunction RouteComponent() {\n\tconst { id } = Route.useParams();\n\tconst { tab } = Route.useSearch();\n\tconst navigate = useNavigate();\n\n\tconst onTabChange = (tab: FlowRunDetailsTabOptions) => {\n\t\tvoid navigate({\n\t\t\tto: \".\",\n\t\t\tsearch: (prev) => ({\n\t\t\t\t...prev,\n\t\t\t\ttab,\n\t\t\t}),\n\t\t});\n\t};\n\n\treturn <FlowRunDetailsPage id={id} tab={tab} onTabChange={onTabChange} />;\n}\n"],"file":"flow-run._id-C-qxwEBp.js"}
@@ -1,2 +0,0 @@
1
- import{j as r}from"./vendor-tanstack-BK8oseNA.js";import{r as s}from"./index-WYPZo52S.js";import{R as a}from"./route-error-state-ALftyvGl.js";import{o as i,e as m}from"./vendor-forms-DxqqmhL5.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CznP1SOq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-date-7GxEwcQM.js";i({tab:m(["Logs","TaskRuns","SubflowRuns","Artifacts","Details","Parameters","JobVariables"]).default("Logs").catch("Logs")});function R({error:o,reset:e}){const t=s(o,"Failed to load flow run");return r.jsxs("div",{className:"flex flex-col gap-4",children:[r.jsx("div",{children:r.jsx("h1",{className:"text-2xl font-semibold",children:"Flow Run"})}),r.jsx(a,{error:t,onRetry:e})]})}export{R as errorComponent};
2
- //# sourceMappingURL=flow-run._id-OL0YhyLW.js.map
@@ -1,2 +0,0 @@
1
- import{r as v,j as e}from"./vendor-tanstack-BK8oseNA.js";import{cd as P,p as E,I as L,aj as N,ce as f,ap as k,ak as M,cz as C,C as y,b3 as h,S as _,a as B,b as O,c as z,e as R,b4 as U,b5 as V,b6 as m,cn as W,b7 as F,b8 as G,co as H}from"./index-WYPZo52S.js";import{D as X,a as Y,b as q,d as g}from"./dropdown-menu-xZ_3w9OP.js";const A=2,ee=({defaultValue:c,selectedFilters:l=c||new Set,onSelectFilter:s})=>{const[n,r]=v.useState(!1),d=v.useMemo(()=>{const a=new Set(P);return l.has("Scheduled")||a.size!==l.size?!1:Array.from(l).every(t=>a.has(t))},[l]),u=()=>{s(new Set(P))},j=()=>{s(new Set)},S=a=>{if(d){s(new Set([a]));return}const t=new Set(l);l.has(a)?t.delete(a):t.add(a),s(t)},p=()=>{if(l.size===0)return"All run states";if(d)return"All except scheduled";const a=Array.from(l),t=a.slice(0,A),o=a.length-A;return e.jsxs("div",{className:"flex flex-1 min-w-0 items-center gap-2",children:[e.jsx("div",{className:"flex flex-1 min-w-0 items-center gap-2 overflow-hidden",children:t.map(i=>e.jsx(k,{name:i,type:f[i]},i))}),o>0&&e.jsxs(M,{variant:"bodySmall",className:"shrink-0",children:["+ ",o]})]})};return e.jsxs(X,{open:n,onOpenChange:r,children:[e.jsx(Y,{asChild:!0,children:e.jsxs(E,{variant:"outline",className:"justify-between w-full",children:[e.jsx("span",{className:"flex-1 min-w-0",children:p()}),e.jsx(L,{id:"ChevronDown",className:"ml-2 size-4 shrink-0"})]})}),e.jsxs(q,{className:"max-h-96 overflow-x-hidden overflow-y-auto",children:[e.jsxs(g,{onSelect:a=>{a.preventDefault(),u()},children:[e.jsx(N,{checked:d,className:"mr-2"}),"All except scheduled"]}),e.jsxs(g,{onSelect:a=>{a.preventDefault(),j()},children:[e.jsx(N,{checked:l.size===0,className:"mr-2"}),"All run states"]}),Object.keys(f).map(a=>e.jsxs(g,{"aria-label":a,onSelect:t=>{t.preventDefault(),S(a)},children:[e.jsx(N,{"aria-label":a,className:"mr-2",checked:!d&&l.has(a)}),e.jsx(k,{name:a,type:f[a]})]},a))]})]})},se=({flowRuns:c,onClearFilters:l,...s})=>c?c.length===0?e.jsx("div",{className:"flex justify-center py-4",children:e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(M,{children:"No runs found"}),l&&e.jsx(E,{onClick:l,children:"Clear Filters"})]})}):e.jsx("ul",{className:"flex flex-col gap-2",children:c.map(n=>"onSelect"in s&&"selectedRows"in s?e.jsx("li",{children:e.jsx(C,{flowRun:n,checked:s.selectedRows.has(n.id),onCheckedChange:r=>s.onSelect(n.id,r)})},n.id):e.jsx("li",{children:e.jsx(C,{flowRun:n})},n.id))}):e.jsx(J,{numSkeletons:5}),J=({numSkeletons:c=1})=>e.jsx("ul",{className:"flex flex-col gap-1",children:Array.from({length:c}).map((l,s)=>e.jsx("li",{children:e.jsxs(y,{className:"flex flex-col gap-2 p-4",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx(h,{className:"h-4 w-[350px]"}),e.jsx(h,{className:"h-4 w-[400px]"})]}),e.jsx(h,{className:"h-4 w-[400px]"}),e.jsx(h,{className:"h-4 w-[200px]"})]})},s))}),Q=[5,10,25,50,100],ae=({count:c,pages:l,pagination:s,onChangePagination:n,onPrefetchPage:r})=>{const d=()=>n({limit:s.limit,page:1}),u=()=>n({limit:s.limit,page:s.page-1}),j=()=>n({limit:s.limit,page:s.page+1}),S=()=>n({limit:s.limit,page:l}),p=()=>{s.page>1&&r?.(1)},a=()=>{s.page>1&&r?.(s.page-1)},t=()=>{s.page<l&&r?.(s.page+1)},o=()=>{s.page<l&&r?.(l)},i=s.page<=1,w=s.page>=l,D=x=>{const b=Number(x),T=Math.ceil(c/b),I=Math.min(s.page,T);n({limit:b,page:I})};return e.jsxs("div",{className:"flex flex-row justify-between items-center",children:[e.jsxs("div",{className:"flex flex-row items-center gap-2 text-xs text-muted-foreground",children:[e.jsx("span",{className:"whitespace-nowrap",children:"Items per page"}),e.jsxs(_,{value:String(s.limit),onValueChange:D,children:[e.jsx(B,{"aria-label":"Items per page",children:e.jsx(O,{placeholder:"Theme"})}),e.jsx(z,{children:Q.map(x=>e.jsx(R,{value:String(x),children:x},x))})]})]}),e.jsx(U,{className:"justify-end",children:e.jsxs(V,{children:[e.jsxs(m,{children:[e.jsx(W,{onClick:d,onMouseEnter:p,disabled:i}),e.jsx(F,{onClick:u,onMouseEnter:a,disabled:i})]}),e.jsxs(m,{className:"text-sm",children:["Page ",l===0?0:s.page," of ",l]}),e.jsx(m,{children:e.jsx(G,{onClick:j,onMouseEnter:t,disabled:w})}),e.jsx(m,{children:e.jsx(H,{onClick:S,onMouseEnter:o,disabled:w})})]})})]})};export{ae as F,ee as S,se as a};
2
- //# sourceMappingURL=flow-runs-pagination-DnwkJapB.js.map