prefect 3.6.14.dev6__py3-none-any.whl → 3.6.15__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 (218) hide show
  1. prefect/_build_info.py +3 -3
  2. prefect/events/clients.py +40 -21
  3. prefect/server/api/concurrency_limits_v2.py +5 -3
  4. prefect/server/ui-v2/assets/{artifact-card-fXxwNG3f.js → artifact-card-BBzQR-Cj.js} +2 -2
  5. prefect/server/ui-v2/assets/{artifact-card-fXxwNG3f.js.map → artifact-card-BBzQR-Cj.js.map} +1 -1
  6. prefect/server/ui-v2/assets/artifact._id-BFdf1WUA.js +2 -0
  7. prefect/server/ui-v2/assets/artifact._id-BFdf1WUA.js.map +1 -0
  8. prefect/server/ui-v2/assets/{automation-wizard-bDZICLpV.js → automation-wizard-EYSfXlQ7.js} +2 -2
  9. prefect/server/ui-v2/assets/{automation-wizard-bDZICLpV.js.map → automation-wizard-EYSfXlQ7.js.map} +1 -1
  10. prefect/server/ui-v2/assets/{automation._id-CmDL_Eta.js → automation._id-Dn7jABys.js} +2 -2
  11. prefect/server/ui-v2/assets/{automation._id-CmDL_Eta.js.map → automation._id-Dn7jABys.js.map} +1 -1
  12. prefect/server/ui-v2/assets/{automation_._id.edit-DY7_SAuk.js → automation_._id.edit-COrqswD3.js} +2 -2
  13. prefect/server/ui-v2/assets/{automation_._id.edit-DY7_SAuk.js.map → automation_._id.edit-COrqswD3.js.map} +1 -1
  14. prefect/server/ui-v2/assets/{automations-header-CgxOgR53.js → automations-header-DN_dmMXW.js} +2 -2
  15. prefect/server/ui-v2/assets/{automations-header-CgxOgR53.js.map → automations-header-DN_dmMXW.js.map} +1 -1
  16. prefect/server/ui-v2/assets/{base-job-template-form-section-DilLn1Ul.js → base-job-template-form-section-De2ACYbw.js} +2 -2
  17. prefect/server/ui-v2/assets/{base-job-template-form-section-DilLn1Ul.js.map → base-job-template-form-section-De2ACYbw.js.map} +1 -1
  18. prefect/server/ui-v2/assets/{block-type-details-Cx4npO8Y.js → block-type-details-Cklc7TkK.js} +2 -2
  19. prefect/server/ui-v2/assets/{block-type-details-Cx4npO8Y.js.map → block-type-details-Cklc7TkK.js.map} +1 -1
  20. prefect/server/ui-v2/assets/block-type-logo-Cbpfxded.js +2 -0
  21. prefect/server/ui-v2/assets/{block-type-logo-FrtMLMYr.js.map → block-type-logo-Cbpfxded.js.map} +1 -1
  22. prefect/server/ui-v2/assets/{block._id-CWi9g5N3.js → block._id-tuz1Bcj2.js} +2 -2
  23. prefect/server/ui-v2/assets/{block._id-CWi9g5N3.js.map → block._id-tuz1Bcj2.js.map} +1 -1
  24. prefect/server/ui-v2/assets/{block_._id.edit-wf0QVPUL.js → block_._id.edit-CFEYhF5R.js} +2 -2
  25. prefect/server/ui-v2/assets/{block_._id.edit-wf0QVPUL.js.map → block_._id.edit-CFEYhF5R.js.map} +1 -1
  26. prefect/server/ui-v2/assets/{catalog-Iv1gLDUd.js → catalog-CCPRo7nY.js} +2 -2
  27. prefect/server/ui-v2/assets/{catalog-Iv1gLDUd.js.map → catalog-CCPRo7nY.js.map} +1 -1
  28. prefect/server/ui-v2/assets/{catalog_._slug-DEHFXZzp.js → catalog_._slug-Bl2J2oI3.js} +2 -2
  29. prefect/server/ui-v2/assets/{catalog_._slug-DEHFXZzp.js.map → catalog_._slug-Bl2J2oI3.js.map} +1 -1
  30. prefect/server/ui-v2/assets/{catalog_._slug_.create-C-vFPUOy.js → catalog_._slug_.create-9UD_SxDN.js} +2 -2
  31. prefect/server/ui-v2/assets/{catalog_._slug_.create-C-vFPUOy.js.map → catalog_._slug_.create-9UD_SxDN.js.map} +1 -1
  32. prefect/server/ui-v2/assets/{collapsible-BlEqjqQu.js → collapsible-BVQTBG_U.js} +2 -2
  33. prefect/server/ui-v2/assets/{collapsible-BlEqjqQu.js.map → collapsible-BVQTBG_U.js.map} +1 -1
  34. prefect/server/ui-v2/assets/{concurrency-limit._id-VfgyonlO.js → concurrency-limit._id-CsgRxA0a.js} +2 -2
  35. prefect/server/ui-v2/assets/{concurrency-limit._id-VfgyonlO.js.map → concurrency-limit._id-CsgRxA0a.js.map} +1 -1
  36. prefect/server/ui-v2/assets/{create-CC32TiFK.js → create-BycfZHGQ.js} +2 -2
  37. prefect/server/ui-v2/assets/{create-CC32TiFK.js.map → create-BycfZHGQ.js.map} +1 -1
  38. prefect/server/ui-v2/assets/{create-fSiDZ1kD.js → create-D--LHaji.js} +2 -2
  39. prefect/server/ui-v2/assets/{create-fSiDZ1kD.js.map → create-D--LHaji.js.map} +1 -1
  40. prefect/server/ui-v2/assets/{data-table-B2NqBPUR.js → data-table-rlbkLcrY.js} +2 -2
  41. prefect/server/ui-v2/assets/{data-table-B2NqBPUR.js.map → data-table-rlbkLcrY.js.map} +1 -1
  42. prefect/server/ui-v2/assets/delete-confirmation-dialog-DHkm2p8m.js +2 -0
  43. prefect/server/ui-v2/assets/{delete-confirmation-dialog-jlBI67Pk.js.map → delete-confirmation-dialog-DHkm2p8m.js.map} +1 -1
  44. prefect/server/ui-v2/assets/{deployment-action-header-C203ndcC.js → deployment-action-header-D5GOooPm.js} +2 -2
  45. prefect/server/ui-v2/assets/{deployment-action-header-C203ndcC.js.map → deployment-action-header-D5GOooPm.js.map} +1 -1
  46. prefect/server/ui-v2/assets/{deployment-form-DB4i73UE.js → deployment-form-wfg6HeAJ.js} +3 -3
  47. prefect/server/ui-v2/assets/{deployment-form-DB4i73UE.js.map → deployment-form-wfg6HeAJ.js.map} +1 -1
  48. prefect/server/ui-v2/assets/{deployment-links-UZYTtmnK.js → deployment-links-6iugOgDh.js} +2 -2
  49. prefect/server/ui-v2/assets/{deployment-links-UZYTtmnK.js.map → deployment-links-6iugOgDh.js.map} +1 -1
  50. prefect/server/ui-v2/assets/{deployment._id-Drmf70gG.js → deployment._id-Ci9zge5n.js} +2 -2
  51. prefect/server/ui-v2/assets/{deployment._id-Drmf70gG.js.map → deployment._id-Ci9zge5n.js.map} +1 -1
  52. prefect/server/ui-v2/assets/{deployment._id-Bk44iuUn.js → deployment._id-whsGcHdu.js} +2 -2
  53. prefect/server/ui-v2/assets/{deployment._id-Bk44iuUn.js.map → deployment._id-whsGcHdu.js.map} +1 -1
  54. prefect/server/ui-v2/assets/deployment_._id.duplicate-D9ZWkh8H.js +2 -0
  55. prefect/server/ui-v2/assets/{deployment_._id.duplicate-aUHtHuNO.js.map → deployment_._id.duplicate-D9ZWkh8H.js.map} +1 -1
  56. prefect/server/ui-v2/assets/deployment_._id.edit-CS7sObzC.js +2 -0
  57. prefect/server/ui-v2/assets/{deployment_._id.edit-CPRKkA-W.js.map → deployment_._id.edit-CS7sObzC.js.map} +1 -1
  58. prefect/server/ui-v2/assets/{deployment_._id.run-C8EGDJeT.js → deployment_._id.run-g7SZuDFi.js} +2 -2
  59. prefect/server/ui-v2/assets/{deployment_._id.run-C8EGDJeT.js.map → deployment_._id.run-g7SZuDFi.js.map} +1 -1
  60. prefect/server/ui-v2/assets/{dropdown-menu-CT6uZu-V.js → dropdown-menu-0atiOSFo.js} +2 -2
  61. prefect/server/ui-v2/assets/{dropdown-menu-CT6uZu-V.js.map → dropdown-menu-0atiOSFo.js.map} +1 -1
  62. prefect/server/ui-v2/assets/{event-resource-display-DmCKu0PD.js → event-resource-display-DHiAb1Up.js} +2 -2
  63. prefect/server/ui-v2/assets/{event-resource-display-DmCKu0PD.js.map → event-resource-display-DHiAb1Up.js.map} +1 -1
  64. prefect/server/ui-v2/assets/{event._eventDate._eventId-DqO9viGu.js → event._eventDate._eventId-D7Twzb22.js} +2 -2
  65. prefect/server/ui-v2/assets/{event._eventDate._eventId-DqO9viGu.js.map → event._eventDate._eventId-D7Twzb22.js.map} +1 -1
  66. prefect/server/ui-v2/assets/flow-run-graph-BhzuSJLm.js +2 -0
  67. prefect/server/ui-v2/assets/{flow-run-graph-CIvkp1kl.js.map → flow-run-graph-BhzuSJLm.js.map} +1 -1
  68. prefect/server/ui-v2/assets/{flow-run._id-DyUEsBSd.js → flow-run._id-CqpH6bvx.js} +2 -2
  69. prefect/server/ui-v2/assets/{flow-run._id-DyUEsBSd.js.map → flow-run._id-CqpH6bvx.js.map} +1 -1
  70. prefect/server/ui-v2/assets/flow-run._id-RLy2kBh0.js +4 -0
  71. prefect/server/ui-v2/assets/flow-run._id-RLy2kBh0.js.map +1 -0
  72. prefect/server/ui-v2/assets/{flow-run._id-xahYswsG.js → flow-run._id-lIIQBD7H.js} +2 -2
  73. prefect/server/ui-v2/assets/{flow-run._id-xahYswsG.js.map → flow-run._id-lIIQBD7H.js.map} +1 -1
  74. prefect/server/ui-v2/assets/{flow-runs-pagination--FfnMca3.js → flow-runs-pagination-BATUweRV.js} +2 -2
  75. prefect/server/ui-v2/assets/{flow-runs-pagination--FfnMca3.js.map → flow-runs-pagination-BATUweRV.js.map} +1 -1
  76. prefect/server/ui-v2/assets/{flow._id-C_ho4p55.js → flow._id-BdQGWPKP.js} +2 -2
  77. prefect/server/ui-v2/assets/{flow._id-C_ho4p55.js.map → flow._id-BdQGWPKP.js.map} +1 -1
  78. prefect/server/ui-v2/assets/{form-CxD6-5Qf.js → form-DLrbC7rV.js} +2 -2
  79. prefect/server/ui-v2/assets/{form-CxD6-5Qf.js.map → form-DLrbC7rV.js.map} +1 -1
  80. prefect/server/ui-v2/assets/{header-CYjjmMrB.js → header-BTAWyeXv.js} +2 -2
  81. prefect/server/ui-v2/assets/{header-CYjjmMrB.js.map → header-BTAWyeXv.js.map} +1 -1
  82. prefect/server/ui-v2/assets/{header-Cjet3B6Z.js → header-ChFAx5uR.js} +2 -2
  83. prefect/server/ui-v2/assets/{header-Cjet3B6Z.js.map → header-ChFAx5uR.js.map} +1 -1
  84. prefect/server/ui-v2/assets/{header-iN9gVtk7.js → header-CyQqOj1w.js} +2 -2
  85. prefect/server/ui-v2/assets/{header-iN9gVtk7.js.map → header-CyQqOj1w.js.map} +1 -1
  86. prefect/server/ui-v2/assets/{index-C2ayqOiQ.js → index-7i4X9TeK.js} +2 -2
  87. prefect/server/ui-v2/assets/{index-C2ayqOiQ.js.map → index-7i4X9TeK.js.map} +1 -1
  88. prefect/server/ui-v2/assets/{index-ltOkPb3X.js → index-BaWDC4da.js} +2 -2
  89. prefect/server/ui-v2/assets/{index-ltOkPb3X.js.map → index-BaWDC4da.js.map} +1 -1
  90. prefect/server/ui-v2/assets/{index-d9_i_klL.js → index-BkiGTHwU.js} +2 -2
  91. prefect/server/ui-v2/assets/{index-d9_i_klL.js.map → index-BkiGTHwU.js.map} +1 -1
  92. prefect/server/ui-v2/assets/{index-B5eJQPOP.js → index-Btb_-PDp.js} +2 -2
  93. prefect/server/ui-v2/assets/{index-B5eJQPOP.js.map → index-Btb_-PDp.js.map} +1 -1
  94. prefect/server/ui-v2/assets/{index-Cwd5Gvad.js → index-BwCLKpNb.js} +2 -2
  95. prefect/server/ui-v2/assets/{index-Cwd5Gvad.js.map → index-BwCLKpNb.js.map} +1 -1
  96. prefect/server/ui-v2/assets/{index-CT2kL3dS.js → index-CHf6xi9j.js} +2 -2
  97. prefect/server/ui-v2/assets/{index-CT2kL3dS.js.map → index-CHf6xi9j.js.map} +1 -1
  98. prefect/server/ui-v2/assets/{index-DQOPH4Rq.js → index-CKGj5lSu.js} +2 -2
  99. prefect/server/ui-v2/assets/{index-DQOPH4Rq.js.map → index-CKGj5lSu.js.map} +1 -1
  100. prefect/server/ui-v2/assets/index-COouj_0-.css +1 -0
  101. prefect/server/ui-v2/assets/{index-D0ANIqVp.js → index-CQnWiUE5.js} +2 -2
  102. prefect/server/ui-v2/assets/{index-D0ANIqVp.js.map → index-CQnWiUE5.js.map} +1 -1
  103. prefect/server/ui-v2/assets/{index-D4df3B9r.js → index-CiSFHkhI.js} +2 -2
  104. prefect/server/ui-v2/assets/{index-D4df3B9r.js.map → index-CiSFHkhI.js.map} +1 -1
  105. prefect/server/ui-v2/assets/{index-CSQa2wYx.js → index-CnlN-VC_.js} +2 -2
  106. prefect/server/ui-v2/assets/{index-CSQa2wYx.js.map → index-CnlN-VC_.js.map} +1 -1
  107. prefect/server/ui-v2/assets/{index-BfXKkd3I.js → index-CxUfZRkN.js} +2 -2
  108. prefect/server/ui-v2/assets/{index-BfXKkd3I.js.map → index-CxUfZRkN.js.map} +1 -1
  109. prefect/server/ui-v2/assets/{index-DI-aZXNg.js → index-D5RT-SAp.js} +2 -2
  110. prefect/server/ui-v2/assets/{index-DI-aZXNg.js.map → index-D5RT-SAp.js.map} +1 -1
  111. prefect/server/ui-v2/assets/{index-CTeNzxT9.js → index-DATPYZfT.js} +2 -2
  112. prefect/server/ui-v2/assets/{index-CTeNzxT9.js.map → index-DATPYZfT.js.map} +1 -1
  113. prefect/server/ui-v2/assets/{index-CfMaY6sy.js → index-DNh9ZBy4.js} +2 -2
  114. prefect/server/ui-v2/assets/{index-CfMaY6sy.js.map → index-DNh9ZBy4.js.map} +1 -1
  115. prefect/server/ui-v2/assets/{index-C3A0XavU.js → index-DQGif3jm.js} +2 -2
  116. prefect/server/ui-v2/assets/{index-C3A0XavU.js.map → index-DQGif3jm.js.map} +1 -1
  117. prefect/server/ui-v2/assets/{index-BF3HB5BS.js → index-Eqdr6Ff7.js} +2 -2
  118. prefect/server/ui-v2/assets/{index-BF3HB5BS.js.map → index-Eqdr6Ff7.js.map} +1 -1
  119. prefect/server/ui-v2/assets/{index-D8SbV2Tp.js → index-VH4TnZ4e.js} +2 -2
  120. prefect/server/ui-v2/assets/{index-D8SbV2Tp.js.map → index-VH4TnZ4e.js.map} +1 -1
  121. prefect/server/ui-v2/assets/{index-0opjCZAR.js → index-kP_I5Qfd.js} +2 -2
  122. prefect/server/ui-v2/assets/{index-0opjCZAR.js.map → index-kP_I5Qfd.js.map} +1 -1
  123. prefect/server/ui-v2/assets/{index-D-yYhKPg.js → index-lyQav_XM.js} +2 -2
  124. prefect/server/ui-v2/assets/{index-D-yYhKPg.js.map → index-lyQav_XM.js.map} +1 -1
  125. prefect/server/ui-v2/assets/{index-nxDkMXcY.js → index-m48E4KcG.js} +13 -13
  126. prefect/server/ui-v2/assets/index-m48E4KcG.js.map +1 -0
  127. prefect/server/ui-v2/assets/{json-input-BGfZindW.js → json-input-Ba-BeBcw.js} +2 -2
  128. prefect/server/ui-v2/assets/{json-input-BGfZindW.js.map → json-input-Ba-BeBcw.js.map} +1 -1
  129. prefect/server/ui-v2/assets/key-value-DkSKn6jE.js +2 -0
  130. prefect/server/ui-v2/assets/key-value-DkSKn6jE.js.map +1 -0
  131. prefect/server/ui-v2/assets/{key._key-mnO405kp.js → key._key-Cjx57ymg.js} +2 -2
  132. prefect/server/ui-v2/assets/{key._key-mnO405kp.js.map → key._key-Cjx57ymg.js.map} +1 -1
  133. prefect/server/ui-v2/assets/{lazy-markdown-CLclUkkd.js → lazy-markdown-Du2Xu3Yp.js} +2 -2
  134. prefect/server/ui-v2/assets/{lazy-markdown-CLclUkkd.js.map → lazy-markdown-Du2Xu3Yp.js.map} +1 -1
  135. prefect/server/ui-v2/assets/{login-ST_-h2GY.js → login-DxMF9Jvj.js} +2 -2
  136. prefect/server/ui-v2/assets/{login-ST_-h2GY.js.map → login-DxMF9Jvj.js.map} +1 -1
  137. prefect/server/ui-v2/assets/{markdown-input-DemuemAs.js → markdown-input-DPi8zyRr.js} +2 -2
  138. prefect/server/ui-v2/assets/{markdown-input-DemuemAs.js.map → markdown-input-DPi8zyRr.js.map} +1 -1
  139. prefect/server/ui-v2/assets/{python-example-snippet-BUllaeTS.js → python-example-snippet-DfCFYPN_.js} +3 -3
  140. prefect/server/ui-v2/assets/{python-example-snippet-BUllaeTS.js.map → python-example-snippet-DfCFYPN_.js.map} +1 -1
  141. prefect/server/ui-v2/assets/{python-input-DTpMdYLs.js → python-input-mr6GD840.js} +2 -2
  142. prefect/server/ui-v2/assets/{python-input-DTpMdYLs.js.map → python-input-mr6GD840.js.map} +1 -1
  143. prefect/server/ui-v2/assets/{radio-group-CJhtPDwC.js → radio-group-Co3cN0Kv.js} +2 -2
  144. prefect/server/ui-v2/assets/{radio-group-CJhtPDwC.js.map → radio-group-Co3cN0Kv.js.map} +1 -1
  145. prefect/server/ui-v2/assets/{route-error-state-D0wedcpP.js → route-error-state-DnBaNT2T.js} +2 -2
  146. prefect/server/ui-v2/assets/{route-error-state-D0wedcpP.js.map → route-error-state-DnBaNT2T.js.map} +1 -1
  147. prefect/server/ui-v2/assets/{schema-form-Cx-6swYW.js → schema-form-CWDHSME9.js} +2 -2
  148. prefect/server/ui-v2/assets/{schema-form-Cx-6swYW.js.map → schema-form-CWDHSME9.js.map} +1 -1
  149. prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-CZkUje5U.js → schema-form-input-string-format-datetime-BSWlW_aQ.js} +4 -4
  150. prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-CZkUje5U.js.map → schema-form-input-string-format-datetime-BSWlW_aQ.js.map} +1 -1
  151. prefect/server/ui-v2/assets/{settings-nHtCkknH.js → settings-DU5y6tJE.js} +2 -2
  152. prefect/server/ui-v2/assets/{settings-nHtCkknH.js.map → settings-DU5y6tJE.js.map} +1 -1
  153. prefect/server/ui-v2/assets/{sort-filter-QjOHFWPI.js → sort-filter-DpuWNkQo.js} +2 -2
  154. prefect/server/ui-v2/assets/{sort-filter-QjOHFWPI.js.map → sort-filter-DpuWNkQo.js.map} +1 -1
  155. prefect/server/ui-v2/assets/{table-Bx2Ol4j-.js → table-bBL6C0ZK.js} +2 -2
  156. prefect/server/ui-v2/assets/{table-Bx2Ol4j-.js.map → table-bBL6C0ZK.js.map} +1 -1
  157. prefect/server/ui-v2/assets/{tags-input-C7cxdTyV.js → tags-input-BLPMVWpZ.js} +2 -2
  158. prefect/server/ui-v2/assets/{tags-input-C7cxdTyV.js.map → tags-input-BLPMVWpZ.js.map} +1 -1
  159. prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-CG2F0Ufy.js → task-run-concurrency-limits-reset-dialog-S69sih55.js} +2 -2
  160. prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-CG2F0Ufy.js.map → task-run-concurrency-limits-reset-dialog-S69sih55.js.map} +1 -1
  161. prefect/server/ui-v2/assets/{task-run._id-CapS5wad.js → task-run._id-B_tIDm4K.js} +2 -2
  162. prefect/server/ui-v2/assets/{task-run._id-CapS5wad.js.map → task-run._id-B_tIDm4K.js.map} +1 -1
  163. prefect/server/ui-v2/assets/{task-run._id-CevQxX-E.js → task-run._id-Dl3Azs8t.js} +2 -2
  164. prefect/server/ui-v2/assets/{task-run._id-CevQxX-E.js.map → task-run._id-Dl3Azs8t.js.map} +1 -1
  165. prefect/server/ui-v2/assets/{task-runs-pagination-Dbwa2yPe.js → task-runs-pagination-VdR-LO4r.js} +2 -2
  166. prefect/server/ui-v2/assets/{task-runs-pagination-Dbwa2yPe.js.map → task-runs-pagination-VdR-LO4r.js.map} +1 -1
  167. prefect/server/ui-v2/assets/{textarea-vy4DM6KG.js → textarea-B3_TtPRi.js} +2 -2
  168. prefect/server/ui-v2/assets/{textarea-vy4DM6KG.js.map → textarea-B3_TtPRi.js.map} +1 -1
  169. prefect/server/ui-v2/assets/{timezone-select-DDUTUy-L.js → timezone-select-BuPYznge.js} +2 -2
  170. prefect/server/ui-v2/assets/{timezone-select-DDUTUy-L.js.map → timezone-select-BuPYznge.js.map} +1 -1
  171. prefect/server/ui-v2/assets/{toggle-group-Dx_fy9WJ.js → toggle-group-Cn07UIim.js} +2 -2
  172. prefect/server/ui-v2/assets/{toggle-group-Dx_fy9WJ.js.map → toggle-group-Cn07UIim.js.map} +1 -1
  173. prefect/server/ui-v2/assets/{use-delete-automation-confirmation-dialog-ClQsotEa.js → use-delete-automation-confirmation-dialog-DpdsLH4t.js} +2 -2
  174. prefect/server/ui-v2/assets/{use-delete-automation-confirmation-dialog-ClQsotEa.js.map → use-delete-automation-confirmation-dialog-DpdsLH4t.js.map} +1 -1
  175. prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-DM0Dy1PL.js → use-delete-block-document-confirmation-dialog-Cq5nGhzr.js} +2 -2
  176. prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-DM0Dy1PL.js.map → use-delete-block-document-confirmation-dialog-Cq5nGhzr.js.map} +1 -1
  177. prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-UhMaQqzZ.js → use-flow-runs-selected-rows-DmQSWBTu.js} +2 -2
  178. prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-UhMaQqzZ.js.map → use-flow-runs-selected-rows-DmQSWBTu.js.map} +1 -1
  179. prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-P8C-ARMZ.js → use-get-artifacts-flow-task-runs-DTwcWiqW.js} +2 -2
  180. prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-P8C-ARMZ.js.map → use-get-artifacts-flow-task-runs-DTwcWiqW.js.map} +1 -1
  181. prefect/server/ui-v2/assets/{use-quick-run-DT0VEa9Z.js → use-quick-run-CPempwLh.js} +2 -2
  182. prefect/server/ui-v2/assets/{use-quick-run-DT0VEa9Z.js.map → use-quick-run-CPempwLh.js.map} +1 -1
  183. prefect/server/ui-v2/assets/{use-state-favicon-DfEAuEQL.js → use-state-favicon-M09DmrNy.js} +2 -2
  184. prefect/server/ui-v2/assets/{use-state-favicon-DfEAuEQL.js.map → use-state-favicon-M09DmrNy.js.map} +1 -1
  185. prefect/server/ui-v2/assets/{use-stepper-1OG0a_eo.js → use-stepper-CDucnvzp.js} +2 -2
  186. prefect/server/ui-v2/assets/{use-stepper-1OG0a_eo.js.map → use-stepper-CDucnvzp.js.map} +1 -1
  187. prefect/server/ui-v2/assets/{utilities-DabzLyXd.js → utilities-BRCNRcQl.js} +2 -2
  188. prefect/server/ui-v2/assets/{utilities-DabzLyXd.js.map → utilities-BRCNRcQl.js.map} +1 -1
  189. prefect/server/ui-v2/assets/{work-pool-filter-CTTGgdIN.js → work-pool-filter-C2tpSS-w.js} +2 -2
  190. prefect/server/ui-v2/assets/{work-pool-filter-CTTGgdIN.js.map → work-pool-filter-C2tpSS-w.js.map} +1 -1
  191. prefect/server/ui-v2/assets/{work-pool-queue-toggle-B9KQxNdY.js → work-pool-queue-toggle-BQ9b-Wxy.js} +2 -2
  192. prefect/server/ui-v2/assets/{work-pool-queue-toggle-B9KQxNdY.js.map → work-pool-queue-toggle-BQ9b-Wxy.js.map} +1 -1
  193. prefect/server/ui-v2/assets/{work-pool._workPoolName-CGqG95Pv.js → work-pool._workPoolName-C_LiL3SE.js} +2 -2
  194. prefect/server/ui-v2/assets/{work-pool._workPoolName-CGqG95Pv.js.map → work-pool._workPoolName-C_LiL3SE.js.map} +1 -1
  195. prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-CcFrethu.js → work-pool_._workPoolName.edit-DBHlrVVx.js} +2 -2
  196. prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-CcFrethu.js.map → work-pool_._workPoolName.edit-DBHlrVVx.js.map} +1 -1
  197. prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-CwPnpSI9.js → work-pool_._workPoolName.queue._workQueueName-DkITxJOP.js} +2 -2
  198. prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-CwPnpSI9.js.map → work-pool_._workPoolName.queue._workQueueName-DkITxJOP.js.map} +1 -1
  199. prefect/server/ui-v2/assets/{work-queue-icon-text-Bix0rRM1.js → work-queue-icon-text-D4BWBVDN.js} +2 -2
  200. prefect/server/ui-v2/assets/{work-queue-icon-text-Bix0rRM1.js.map → work-queue-icon-text-D4BWBVDN.js.map} +1 -1
  201. prefect/server/ui-v2/index.html +2 -2
  202. prefect/testing/fixtures.py +14 -13
  203. {prefect-3.6.14.dev6.dist-info → prefect-3.6.15.dist-info}/METADATA +2 -2
  204. {prefect-3.6.14.dev6.dist-info → prefect-3.6.15.dist-info}/RECORD +207 -205
  205. prefect/server/ui-v2/assets/artifact._id-BIyzb0Jb.js +0 -2
  206. prefect/server/ui-v2/assets/artifact._id-BIyzb0Jb.js.map +0 -1
  207. prefect/server/ui-v2/assets/block-type-logo-FrtMLMYr.js +0 -2
  208. prefect/server/ui-v2/assets/delete-confirmation-dialog-jlBI67Pk.js +0 -2
  209. prefect/server/ui-v2/assets/deployment_._id.duplicate-aUHtHuNO.js +0 -2
  210. prefect/server/ui-v2/assets/deployment_._id.edit-CPRKkA-W.js +0 -2
  211. prefect/server/ui-v2/assets/flow-run-graph-CIvkp1kl.js +0 -2
  212. prefect/server/ui-v2/assets/flow-run._id-BT3wztDF.js +0 -4
  213. prefect/server/ui-v2/assets/flow-run._id-BT3wztDF.js.map +0 -1
  214. prefect/server/ui-v2/assets/index-CYc_PWA3.css +0 -1
  215. prefect/server/ui-v2/assets/index-nxDkMXcY.js.map +0 -1
  216. {prefect-3.6.14.dev6.dist-info → prefect-3.6.15.dist-info}/WHEEL +0 -0
  217. {prefect-3.6.14.dev6.dist-info → prefect-3.6.15.dist-info}/entry_points.txt +0 -0
  218. {prefect-3.6.14.dev6.dist-info → prefect-3.6.15.dist-info}/licenses/LICENSE +0 -0
@@ -1,2 +1,2 @@
1
- import{r as l,j as s,t as E,L as Me,F as $e,n as ot,E as rt}from"./vendor-tanstack-BcZfOOfy.js";import{a8 as Ye,a9 as lt,aa as it,ab as be,ac as ct,ad as ut,ae as dt,af as mt,ag as ft,ah as gt,ai as ht,aj as Ee,ak as oe,al as re,am as pt,y as ee,N as qe,q as le,I as V,an as xt,ao as wt,ap as St,aq as vt,ar as kt,as as yt,at as Ft,_ as jt,$ as Ct,a0 as Rt,a1 as bt,a2 as Tt,p as Dt,a3 as _t,au as ie,av as Nt,i as O,aw as Mt,ax as Et,ay as Ae,az as Pe,C as At,o as Pt,G as It,O as Ie,B as Lt,g as zt,h as Ot,E as Vt,t as Ht,v as Wt,w as Bt,x as Ut,D as Qt,aA as Ge,aB as j,aC as $t,aD as Yt,aE as Le,aF as ze,aG as qt,aH as Oe,aI as Gt,aJ as Xt,aK as Kt,aL as Jt}from"./index-nxDkMXcY.js";import{D as Zt,W as es}from"./work-pool-filter-CTTGgdIN.js";import{S as ts}from"./sort-filter-QjOHFWPI.js";import{S as ss,F as as,a as ns}from"./flow-runs-pagination--FfnMca3.js";import{u as os,F as rs}from"./use-flow-runs-selected-rows-UhMaQqzZ.js";import{D as Xe}from"./delete-confirmation-dialog-jlBI67Pk.js";import{D as ls,a as is,b as cs,d as te,e as us}from"./dropdown-menu-CT6uZu-V.js";import{g as ds,S as ms}from"./state-colors-CAAf0Eg3.js";import{R as fs,S as gs,X as hs,Y as ps,T as xs,d as ws}from"./vendor-recharts-BAN776s_.js";import{c as Ss}from"./vendor-date-wwuDAncJ.js";import{T as vs,a as ks,b as ys}from"./task-runs-pagination-Dbwa2yPe.js";import{u as Fs}from"./use-delete-confirmation-dialog-CUdii6Lo.js";import{T as js}from"./tags-input-C7cxdTyV.js";import{a as Cs}from"./zod-Cuos7J7w.js";import{c as Rs,o as Ke,s as _,e as se,n as ae,b as bs}from"./vendor-forms-ClCIacbh.js";import{F as Ts,b as Ds,c as _s,d as Ns,e as Ms,a as Es}from"./form-CxD6-5Qf.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-BTiKGWfR.js";const As=({value:e,onValueChange:t,className:n})=>{const a=l.useMemo(()=>Ye(e),[e]),o=i=>{t(it(i))};return s.jsx(lt,{value:a,onValueChange:o,placeholder:"All time",clearable:!0,className:n})},Ve=2,Ps=({selectedFlows:e,onSelectFlows:t})=>{const[n,a]=l.useState(""),o=l.useDeferredValue(n),{data:i=[]}=E(be({flows:o?{operator:"and_",name:{like_:o}}:void 0,limit:100,offset:0,sort:"NAME_ASC"})),{data:r=[]}=E(be({flows:e.size>0?{operator:"and_",id:{any_:Array.from(e)}}:void 0,limit:e.size||1,offset:0,sort:"NAME_ASC"},{enabled:e.size>0})),u=m=>{const h=new Set(e);e.has(m)?h.delete(m):h.add(m),t(h)},c=()=>{t(new Set)},d=()=>{if(e.size===0)return"All flows";const m=r.filter(S=>e.has(S.id)).map(S=>S.name),h=m.slice(0,Ve),x=m.length-Ve;return s.jsxs("div",{className:"flex flex-1 min-w-0 items-center gap-2",children:[s.jsx("div",{className:"flex flex-1 min-w-0 items-center gap-2 overflow-hidden",children:s.jsx("span",{className:"truncate",children:h.join(", ")})}),x>0&&s.jsxs(re,{variant:"bodySmall",className:"shrink-0",children:["+ ",x]})]})},f=l.useMemo(()=>i.filter(m=>!o||m.name.toLowerCase().includes(o.toLowerCase())),[i,o]);return s.jsxs(ct,{children:[s.jsx(ut,{"aria-label":"Filter by flow",selected:e.size===0,children:d()}),s.jsxs(dt,{children:[s.jsx(mt,{value:n,onValueChange:a,placeholder:"Search flows..."}),s.jsxs(ft,{children:[s.jsx(gt,{children:"No flows found"}),s.jsxs(ht,{children:[s.jsxs(Ee,{"aria-label":"All flows",onSelect:c,closeOnSelect:!1,value:"__all__",children:[s.jsx(oe,{checked:e.size===0}),"All flows"]}),f.map(m=>s.jsxs(Ee,{"aria-label":m.name,onSelect:()=>u(m.id),closeOnSelect:!1,value:m.id,children:[s.jsx(oe,{checked:e.has(m.id)}),m.name]},m.id))]})]})]})]})},Is=()=>{const[e,t]=Fs(),{mutateAsync:n}=pt(),a=async(i,r=()=>{})=>{try{const u=await Promise.allSettled(i.map(f=>n({id:f}))),{numFails:c,numSuccess:d}=u.reduce((f,m)=>(m.status==="rejected"?f.numFails+=1:f.numSuccess+=1,f),{numFails:0,numSuccess:0});c>1?ee.error(`${c} task runs failed to delete`):c===1?ee.error("Task run failed to delete"):d>1?ee.success(`${d} task runs deleted`):ee.success("Task run deleted")}catch(u){console.error("Unknown error while deleting task run.",u)}finally{r()}};return[e,(i,r=()=>{})=>t({title:"Delete Task Runs",description:"Are you sure you want to delete selected task runs?",onConfirm:()=>{a(i,r)}})]},Ls=({count:e=0,...t})=>"results"in t&&"setSelectedRows"in t&&"selectedRows"in t?s.jsx(zs,{count:e,...t}):s.jsxs(re,{variant:"bodySmall",className:"text-muted-foreground",children:[e," ",qe(e,"Task run")]});function zs({count:e=0,results:t=[],setSelectedRows:n,selectedRows:a}){const[o,i]=Is(),r=l.useMemo(()=>t.map(({id:d})=>d),[t]),u=Array.from(a),c=()=>{const d=r.every(h=>a.has(h)),f=r.some(h=>a.has(h));let m=!1;return d?m=!0:f&&(m="indeterminate"),s.jsx(oe,{className:"block",checked:m,onCheckedChange:h=>{n(h?new Set(r):new Set)},"aria-label":"Toggle all"})};return a.size>0?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(c,{}),s.jsxs(re,{variant:"bodySmall",className:"text-muted-foreground",children:[u.length," selected"]}),s.jsx(le,{"aria-label":"Delete rows",size:"icon",variant:"secondary",onClick:()=>{i(u,()=>n(new Set))},children:s.jsx(V,{id:"Trash2",className:"size-4"})})]}),s.jsx(Xe,{...o})]}):s.jsxs("div",{className:"flex items-center gap-2",children:[t&&n&&a&&s.jsx(oe,{className:"block",checked:!1,onCheckedChange:d=>{n(new Set(d?r:void 0))},"aria-label":"Toggle all"}),s.jsxs(re,{variant:"bodySmall",className:"text-muted-foreground",children:[e," ",qe(e,"Task run")]})]})}const Os=e=>{const[t,n]=l.useState(new Set(e)),a=c=>n(d=>new Set(d).add(c)),o=c=>n(d=>{const f=new Set(d);return f.delete(c),f});return[t,n,{addRow:a,removeRow:o,onSelectRow:(c,d)=>{d?a(c):o(c)},clearSet:()=>n(new Set)}]},Je="Custom",Vs="Unsaved";function Hs(e){return e?e.name===Je||e.name===Vs:!0}const Ws=({currentFilter:e,savedFilters:t,onSelect:n,onSave:a,onDelete:o,onSetDefault:i,onRemoveDefault:r,permissions:u={canSave:!0,canDelete:!0}})=>{const[c,d]=l.useState(!1),f=e?.name??Je,m=Hs(e),h=m&&u.canSave,x=e?.id&&u.canDelete,S=!m,y=()=>{e?.id&&(o(e.id),d(!1))},g=()=>{e?.id&&(e.isDefault?r(e.id):i(e.id))};return s.jsxs(s.Fragment,{children:[s.jsxs(ls,{children:[s.jsx(is,{asChild:!0,children:s.jsxs(le,{variant:"outline",className:"gap-2",children:[s.jsx(V,{id:"SlidersVertical",className:"size-4"}),s.jsx("span",{children:f}),s.jsx(V,{id:"ChevronDown",className:"size-4"})]})}),s.jsxs(cs,{align:"start",className:"min-w-[200px]",children:[t.map(p=>s.jsxs(te,{onClick:()=>n(p),className:"flex items-center justify-between",children:[s.jsx("span",{children:p.name}),p.isDefault&&s.jsx(V,{id:"CircleCheck",className:"size-4 text-green-500"})]},p.id??p.name)),(h||x||S)&&s.jsx(us,{}),h&&s.jsxs(te,{onClick:a,children:[s.jsx(V,{id:"Plus",className:"mr-2 size-4"}),"Save current filters"]}),x&&s.jsxs(te,{variant:"destructive",onClick:()=>d(!0),children:[s.jsx(V,{id:"Trash2",className:"mr-2 size-4"}),"Delete"]}),S&&s.jsxs(te,{onClick:g,children:[s.jsx(V,{id:"CircleCheck",className:"mr-2 size-4"}),e?.isDefault?"Remove as default":"Set as default"]})]})]}),s.jsx(Xe,{isOpen:c,title:"Delete saved filter",description:`Are you sure you want to delete "${e?.name}"? This action cannot be undone.`,onConfirm:y,onClose:()=>d(!1)})]})},Bs=({cx:e,cy:t,payload:n})=>{if(e===void 0||t===void 0||!n)return null;const a=ds(n.stateType)||ms[n.stateType]||"#6b7280";return s.jsx("circle",{cx:e,cy:t,r:6,fill:a,stroke:a,strokeWidth:1,opacity:.7,className:"hover:opacity-100 transition-opacity cursor-pointer"})},Us=({active:e,payload:t})=>{const a=t?.[0]?.payload,o=a?.id,{data:i}=E({...xt(o??""),enabled:e&&!!o,staleTime:300*1e3}),{data:r}=E({...wt(i?.flow_id??""),enabled:!!i?.flow_id,staleTime:300*1e3});if(!e||!t||t.length===0||!a)return null;const u=new Date(a.timestamp);return s.jsxs("div",{className:"bg-background border rounded-lg p-3 shadow-lg flex flex-col gap-2 min-w-48",children:[s.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[i?.flow_id&&s.jsxs(s.Fragment,{children:[s.jsx(Me,{to:"/flows/flow/$id",params:{id:i.flow_id},className:"font-semibold hover:underline truncate max-w-32",children:r?.name??"..."}),s.jsx(St,{className:"size-3 flex-shrink-0"})]}),s.jsx(Me,{to:"/runs/flow-run/$id",params:{id:a.id},className:"hover:underline truncate max-w-32",children:i?.name??a.id.slice(0,8)})]}),s.jsx("div",{children:s.jsx(vt,{type:a.stateType})}),s.jsx("hr",{className:"border-border"}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsxs("span",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(yt,{className:"size-4"}),kt(Math.ceil(a.duration*1e3),{largest:2,round:!0})]}),s.jsxs("span",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(Ft,{className:"size-4"}),u.toLocaleString()]})]})]})},Qs=e=>t=>t===0?"0s":e<1?`${Math.round(t*1e3)}ms`:e<10?`${t.toFixed(1)}s`:e<60?`${Math.round(t)}s`:Ss(0,t*1e3,{addSuffix:!1}),$s=(e,t)=>i=>{const r=new Date(i);if(t<1e3||e<1e4){const u=r.getSeconds(),c=r.getMilliseconds();return`${r.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}:${u.toString().padStart(2,"0")}.${Math.floor(c/100)}`}return t<6e4||e<10*6e4?r.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}):e>=864e5?r.getHours()===0&&r.getMinutes()===0&&r.getSeconds()===0&&r.getMilliseconds()===0?r.toLocaleDateString(void 0,{weekday:"short",day:"numeric"}):r.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):r.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})},Ys=({history:e,startDate:t,endDate:n})=>{const a=l.useRef(null),[o,i]=l.useState(0);l.useEffect(()=>{const g=a.current;if(!g)return;const p=new ResizeObserver(w=>{for(const k of w)i(k.contentRect.width)});return p.observe(g),i(g.getBoundingClientRect().width),()=>p.disconnect()},[]);const r=l.useMemo(()=>e.map(g=>({x:new Date(g.timestamp).getTime(),y:g.duration,stateType:g.state_type,id:g.id,duration:g.duration,lateness:g.lateness,timestamp:g.timestamp})),[e]),{xDomain:u,xDomainMin:c,xDomainMax:d}=l.useMemo(()=>{if(t&&n)return{xDomain:[t.getTime(),n.getTime()],xDomainMin:t.getTime(),xDomainMax:n.getTime()};if(r.length===0){const k=Date.now(),b=k-1440*60*1e3;return{xDomain:[b,k],xDomainMin:b,xDomainMax:k}}const g=r.map(k=>k.x),p=Math.min(...g),w=Math.max(...g);return{xDomain:[p,w],xDomainMin:p,xDomainMax:w}},[t,n,r]),f=l.useMemo(()=>r.length===0?60:Math.max(...r.map(g=>g.y)),[r]),m=l.useMemo(()=>{if(r.length<2)return Number.POSITIVE_INFINITY;const g=r.map(w=>w.x).sort((w,k)=>w-k);let p=Number.POSITIVE_INFINITY;for(let w=1;w<g.length;w++){const k=g[w]-g[w-1];k>0&&k<p&&(p=k)}return p},[r]),h=d-c,x=l.useMemo(()=>$s(h,m),[h,m]),S=l.useMemo(()=>Qs(f),[f]),y=l.useMemo(()=>{const w=o-60,k=Math.max(2,Math.ceil(w/100)),b=1440*60*1e3,F=d-c;if(F>=b){const v=[],W=new Date(c),H=new Date(W);H.setHours(24,0,0,0),v.push(c);let P=H.getTime();for(;P<d;)v.push(P),P+=b;const B=v[v.length-1];if(d-B>F/k/2&&v.push(d),v.length<k){const M=[];for(let T=0;T<v.length-1;T++){M.push(v[T]);const I=v[T+1]-v[T],L=Math.max(1,Math.floor(I/(F/k)));if(L>1){const U=I/L;for(let z=1;z<L;z++)M.push(v[T]+U*z)}}return M.push(v[v.length-1]),M}return v}const N=[],A=(d-c)/(k-1);for(let v=0;v<k;v++)N.push(c+A*v);return N},[o,c,d]);return e.length===0?null:s.jsx("div",{ref:a,className:"hidden md:block w-full h-64","data-testid":"scatter-plot",children:s.jsx(fs,{width:"100%",height:"100%",children:s.jsxs(gs,{children:[s.jsx(hs,{type:"number",dataKey:"x",scale:"time",domain:u,ticks:y,tickFormatter:x,tick:{fontSize:12},tickLine:!1,axisLine:{stroke:"#e5e7eb"}}),s.jsx(ps,{type:"number",dataKey:"y",tickFormatter:S,tick:{fontSize:12},tickLine:!1,axisLine:{stroke:"#e5e7eb"},width:60}),s.jsx(xs,{content:s.jsx(Us,{}),cursor:{strokeDasharray:"3 3"},animationDuration:0}),s.jsx(ws,{data:r,shape:s.jsx(Bs,{}),isAnimationActive:!1})]})})})},qs=Ke({name:_().min(1,{message:"Name is required"}).max(100,{message:"Name must be 100 characters or less"})}),Gs=({open:e,onOpenChange:t,onSave:n})=>{const a=Rs({resolver:Cs(qs),defaultValues:{name:""}});l.useEffect(()=>{e&&a.reset({name:""})},[e,a]);const o=i=>{n(i.name),t(!1)};return s.jsx(jt,{open:e,onOpenChange:t,children:s.jsxs(Ct,{children:[s.jsx(Rt,{children:s.jsx(bt,{children:"Save Filter"})}),s.jsx(Tt,{children:"Save your current filter configuration for quick access later."}),s.jsx(Ts,{...a,children:s.jsxs("form",{onSubmit:i=>{a.handleSubmit(o)(i)},className:"space-y-4",children:[s.jsx(Ds,{control:a.control,name:"name",render:({field:i})=>s.jsxs(_s,{children:[s.jsx(Ns,{children:"Filter Name"}),s.jsx(Ms,{children:s.jsx(Dt,{autoComplete:"off",placeholder:"e.g., Failed runs this week",...i})}),s.jsx(Es,{})]})}),s.jsxs(_t,{children:[s.jsx(le,{type:"button",variant:"outline",onClick:()=>t(!1),children:"Cancel"}),s.jsx(le,{type:"submit",children:"Save"})]})]})})]})})},Xs="prefect-ui-v2-saved-filters",Ks="prefect-ui-v2-default-filter-id",Ze="system-past-week",et="system-hide-scheduled";function Js(e){return e===Ze||e===et}const tt=[{id:Ze,name:"Past week",filters:{range:"past-7-days"}},{id:et,name:"Hide scheduled runs",filters:{range:"past-7-days",state:[...Nt]}}],Zs=tt[0];function ea(){return`${Date.now()}-${Math.random().toString(36).substring(2,9)}`}function ta(e,t){const n=(a,o)=>{if(a===void 0&&o===void 0)return!0;if(a===void 0||o===void 0||a.length!==o.length)return!1;const i=[...a].sort(),r=[...o].sort();return i.every((u,c)=>u===r[c])};return n(e.state,t.state)&&n(e.flows,t.flows)&&n(e.deployments,t.deployments)&&n(e.workPools,t.workPools)&&n(e.tags,t.tags)&&e.range===t.range&&e.start===t.start&&e.end===t.end}function st(){const[e,t]=ie(Xs,[]),[n,a]=ie(Ks,null),o=l.useMemo(()=>[...tt,...e],[e]),i=l.useCallback(h=>{const x={id:ea(),name:h.name,filters:h.filters};return t(S=>[...S,x]),x},[t]),r=l.useCallback(h=>{t(x=>x.filter(S=>S.id!==h)),a(x=>x===h?null:x)},[t,a]),u=l.useCallback((h,x)=>{t(S=>S.map(y=>y.id===h?{...y,...x.name!==void 0&&{name:x.name},...x.filters!==void 0&&{filters:x.filters}}:y))},[t]),c=l.useCallback(h=>{a(h)},[a]),d=l.useCallback(h=>o.find(x=>x.id===h),[o]),f=l.useCallback(h=>o.find(x=>ta(x.filters,h)),[o]),m=l.useMemo(()=>h=>n===h,[n]);return{savedFilters:o,defaultFilterId:n,saveFilter:i,deleteFilter:r,updateFilter:u,setDefaultFilter:c,getFilterById:d,findMatchingFilter:f,isDefaultFilter:m}}const sa=({tab:e,onTabChange:t,flowRunsCount:n,taskRunsCount:a,hasAnyFlowRuns:o,hasAnyTaskRuns:i,flowRuns:r,flowRunsPages:u,pagination:c,onPaginationChange:d,onPrefetchPage:f,sort:m,onSortChange:h,hideSubflows:x,onHideSubflowsChange:S,flowRunSearch:y,onFlowRunSearchChange:g,selectedStates:p,onStateFilterChange:w,selectedFlows:k,onFlowFilterChange:b,selectedDeployments:F,onDeploymentFilterChange:N,selectedTags:A,onTagsFilterChange:v,selectedWorkPools:W,onWorkPoolFilterChange:H,dateRange:P,onDateRangeChange:B,flowRunHistory:M,scatterPlotDateRange:T,taskRuns:I,taskRunsPages:L,taskRunsPagination:U,onTaskRunsPaginationChange:z,onTaskRunsPrefetchPage:Q,taskRunsSort:de,onTaskRunsSortChange:me,taskRunSearch:fe,onTaskRunSearchChange:ge,onClearTaskRunFilters:he,currentFilter:X,savedFilters:pe,onSelectFilter:xe,onSaveFilter:we,onDeleteFilter:Se,onSetDefault:ve,onRemoveDefault:ke,isSaveDialogOpen:$,onCloseSaveDialog:Y,onConfirmSave:ye})=>{const q=!o&&!i,[K,Fe,{onSelectRow:je}]=os(),[J,Ce,{onSelectRow:C}]=Os(),D=[...new Set(r.map(R=>R.flow_id))],{data:Z}=E(be({flows:{operator:"and_",id:{any_:D}},offset:0,sort:"NAME_ASC"},{enabled:D.length>0})),G=r.map(R=>({...R,flow:Z?.find(Re=>Re.id===R.flow_id)}));return q?s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsx(He,{}),s.jsx(aa,{})]}):s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(He,{}),s.jsx(Ws,{currentFilter:X,savedFilters:pe,onSelect:xe,onSave:we,onDelete:Se,onSetDefault:ve,onRemoveDefault:ke,permissions:{canSave:!0,canDelete:!Js(X?.id??null)}})]}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsxs("div",{className:"flex flex-wrap gap-2 lg:grid lg:grid-flow-col lg:auto-cols-fr",children:[s.jsxs("div",{className:"flex flex-col gap-1 w-full lg:w-auto",children:[s.jsx(O,{className:"text-xs text-muted-foreground",children:"Date Range"}),s.jsx(As,{value:P,onValueChange:B})]}),s.jsxs("div",{className:"flex flex-col gap-1 w-full lg:w-auto",children:[s.jsx(O,{className:"text-xs text-muted-foreground",children:"States"}),s.jsx(ss,{selectedFilters:p,onSelectFilter:w})]})]}),s.jsxs("div",{className:"flex flex-wrap gap-2 lg:grid lg:grid-flow-col lg:auto-cols-fr",children:[s.jsxs("div",{className:"flex flex-col gap-1 w-full lg:w-auto",children:[s.jsx(O,{className:"text-xs text-muted-foreground",children:"Flows"}),s.jsx(Ps,{selectedFlows:k,onSelectFlows:b})]}),s.jsxs("div",{className:"flex flex-col gap-1 w-full lg:w-auto",children:[s.jsx(O,{className:"text-xs text-muted-foreground",children:"Deployments"}),s.jsx(Zt,{selectedDeployments:F,onSelectDeployments:N})]}),s.jsxs("div",{className:"flex flex-col gap-1 w-full lg:w-auto",children:[s.jsx(O,{className:"text-xs text-muted-foreground",children:"Work Pools"}),s.jsx(es,{selectedWorkPools:W,onSelectWorkPools:H})]}),s.jsxs("div",{className:"flex flex-col gap-1 w-full lg:w-auto",children:[s.jsx(O,{className:"text-xs text-muted-foreground",children:"Tags"}),s.jsx(js,{value:Array.from(A),onChange:R=>{const Re=Array.isArray(R)?R:[];v(new Set(Re))},placeholder:"All tags"})]})]})]}),s.jsx(Gs,{open:$,onOpenChange:Y,onSave:ye}),s.jsxs(Mt,{value:e,onValueChange:t,children:[s.jsxs(Et,{children:[s.jsx(Ae,{value:"flow-runs",children:"Flow Runs"}),s.jsx(Ae,{value:"task-runs",children:"Task Runs"})]}),s.jsx(Pe,{value:"flow-runs",children:s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsx(At,{children:s.jsx(Pt,{children:s.jsx(Ys,{history:M,startDate:T.startDate,endDate:T.endDate})})}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(rs,{count:n,results:G,selectedRows:K,setSelectedRows:Fe}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2 whitespace-nowrap",children:[s.jsx(It,{id:"hide-subflows",checked:x,onCheckedChange:S}),s.jsx(O,{htmlFor:"hide-subflows",children:"Hide subflows"})]}),s.jsx(Ie,{value:y,onChange:R=>g(R.target.value),placeholder:"Search by flow run name","aria-label":"Search by flow run name",className:"w-64",debounceMs:1200}),s.jsx(ts,{value:m,onSelect:h})]})]}),s.jsx(as,{count:n,pages:u,pagination:c,onChangePagination:d,onPrefetchPage:f}),s.jsx(ns,{flowRuns:G,selectedRows:K,onSelect:je})]})}),s.jsx(Pe,{value:"task-runs",children:s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(Ls,{count:a,results:I,selectedRows:J,setSelectedRows:Ce}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(Ie,{value:fe,onChange:R=>ge(R.target.value),placeholder:"Search by task run name","aria-label":"Search by task run name",className:"w-64",debounceMs:1200}),s.jsx(vs,{value:de,onSelect:me})]})]}),s.jsx(ks,{count:a,pages:L,pagination:U,onChangePagination:z,onPrefetchPage:Q}),s.jsx(ys,{taskRuns:I,selectedRows:J,onSelect:C,onClearFilters:he})]})})]})]})},He=()=>s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(Lt,{children:s.jsx(zt,{children:s.jsx(Ot,{className:"text-xl font-semibold",children:"Runs"})})})}),aa=()=>s.jsxs(Vt,{children:[s.jsx(Ht,{id:"Workflow"}),s.jsx(Wt,{children:"Run a task or flow to get started"}),s.jsx(Bt,{children:"Runs store the state history for each execution of a task or flow."}),s.jsx(Ut,{children:s.jsx(Qt,{id:"getting-started"})})]}),ce=$e("/runs/");function na(e){const t=u=>u?u.split(",").filter(c=>c.trim().length>0):[],n=t(e.state),a=t(e.flows),o=t(e.deployments),i=t(e["work-pools"]),r=t(e.tags);return{...n.length>0&&{state:n},...a.length>0&&{flows:a},...o.length>0&&{deployments:o},...i.length>0&&{workPools:i},...r.length>0&&{tags:r},...e.range&&{range:e.range},...e.start&&{start:e.start},...e.end&&{end:e.end}}}function at(e){return{state:e.state?.join(",")??"",flows:e.flows?.join(",")??"",deployments:e.deployments?.join(",")??"","work-pools":e.workPools?.join(",")??"",tags:e.tags?.join(",")??"",range:e.range,start:e.start,end:e.end}}function We(e,t){return{id:e.id,name:e.name,isDefault:e.id===t}}function oa(){const e=ce.useSearch(),t=ce.useNavigate(),{savedFilters:n,defaultFilterId:a,saveFilter:o,deleteFilter:i,setDefaultFilter:r,findMatchingFilter:u}=st(),[c,d]=l.useState(!1),f=l.useMemo(()=>na(e),[e]),m=l.useMemo(()=>u(f),[u,f]),h=l.useMemo(()=>n.map(F=>We(F,a)),[n,a]),x=l.useMemo(()=>m?We(m,a):f.state?.length||f.flows?.length||f.deployments?.length||f.workPools?.length||f.tags?.length||f.range||f.start||f.end?{id:null,name:"Unsaved",isDefault:!1}:{id:null,name:"Custom",isDefault:!1},[m,a,f]),S=l.useCallback(F=>{const N=n.find(v=>v.id===F.id);if(!N)return;const A=at(N.filters);t({to:".",search:v=>({...v,...A,page:1}),replace:!0})},[t,n]),y=l.useCallback(()=>{d(!0)},[]),g=l.useCallback(F=>{o({name:F,filters:f}),d(!1)},[o,f]),p=l.useCallback(()=>{d(!1)},[]),w=l.useCallback(F=>{i(F)},[i]),k=l.useCallback(F=>{r(F)},[r]),b=l.useCallback(()=>{r(null)},[r]);return{currentFilter:x,savedFiltersForMenu:h,onSelectFilter:S,onSaveFilter:y,onDeleteFilter:w,onSetDefault:k,onRemoveDefault:b,isSaveDialogOpen:c,closeSaveDialog:p,confirmSave:g}}function ra(){const e=ce.useNavigate(),t=ce.useSearch(),{defaultFilterId:n,getFilterById:a}=st(),o=l.useRef(!1),i=l.useMemo(()=>!!(t.state||t.flows||t.deployments||t["work-pools"]||t.tags||t.range||t.start||t.end),[t]);l.useEffect(()=>{if(o.current||i)return;let r;n&&(r=a(n)),r||(r=Zs),o.current=!0;const u=at(r.filters);e({to:".",search:c=>({...c,...u,page:1}),replace:!0})},[n,i,a,e])}const Be=$e("/runs/"),la=e=>e?e.split(",").filter(t=>Ge.includes(t)):[],ne=e=>e?e.split(",").filter(t=>t.trim().length>0):[];function ia(){const e=Be.useSearch(),t=Be.useNavigate(),n=l.useMemo(()=>new Set(la(e.state??"")),[e.state]),a=l.useMemo(()=>new Set(ne(e.flows??"")),[e.flows]),o=l.useMemo(()=>new Set(ne(e.deployments??"")),[e.deployments]),i=l.useMemo(()=>new Set(ne(e["work-pools"]??"")),[e["work-pools"]]),r=l.useMemo(()=>new Set(ne(e.tags??"")),[e.tags]),u=l.useMemo(()=>({range:e.range,start:e.start,end:e.end}),[e.range,e.start,e.end]),c=l.useCallback(g=>{const p=Array.from(g);t({to:".",search:w=>({...w,state:p.length>0?p.join(","):"",page:1}),replace:!0})},[t]),d=l.useCallback(g=>{const p=Array.from(g);t({to:".",search:w=>({...w,flows:p.length>0?p.join(","):"",page:1}),replace:!0})},[t]),f=l.useCallback(g=>{const p=Array.from(g);t({to:".",search:w=>({...w,deployments:p.length>0?p.join(","):"",page:1}),replace:!0})},[t]),m=l.useCallback(g=>{const p=Array.from(g);t({to:".",search:w=>({...w,"work-pools":p.length>0?p.join(","):"",page:1}),replace:!0})},[t]),h=l.useCallback(g=>{const p=Array.from(g);t({to:".",search:w=>({...w,tags:p.length>0?p.join(","):"",page:1}),replace:!0})},[t]),x=l.useCallback(g=>{t({to:".",search:p=>({...p,range:g.range,start:g.start,end:g.end,page:1}),replace:!0})},[t]),S=l.useMemo(()=>n.size>0||a.size>0||o.size>0||i.size>0||r.size>0||u.range!==void 0||u.start!==void 0||u.end!==void 0,[n,a,o,i,r,u]),y=l.useCallback(()=>{t({to:".",search:g=>({...g,state:"",flows:"",deployments:"","work-pools":"",tags:"",range:void 0,start:void 0,end:void 0,page:1}),replace:!0})},[t]);return{states:n,flows:a,deployments:o,workPools:i,tags:r,dateRange:u,onStatesChange:c,onFlowsChange:d,onDeploymentsChange:f,onWorkPoolsChange:m,onTagsChange:h,onDateRangeChange:x,clearAllFilters:y,hasActiveFilters:S}}Ke({tab:se(["flow-runs","task-runs"]).optional().default("flow-runs"),page:ae().int().positive().optional().default(1).catch(1),limit:ae().int().positive().optional().catch(void 0),sort:se(Jt).optional().default("START_TIME_DESC"),"hide-subflows":bs().optional().default(!1),"flow-run-search":_().optional().default(""),state:_().optional().default(""),flows:_().optional().default(""),deployments:_().optional().default(""),"work-pools":_().optional().default(""),tags:_().optional().default(""),range:se(Kt).optional(),start:_().optional(),end:_().optional(),"task-runs-page":ae().int().positive().optional().default(1).catch(1),"task-runs-limit":ae().int().positive().optional().catch(void 0),"task-runs-sort":se(Xt).optional().default("EXPECTED_START_TIME_DESC"),"task-run-search":_().optional().default("")});const Te=e=>e?e.split(",").filter(t=>Ge.includes(t)):[],ue=e=>{if(!e)return;const t={range:e.range,start:e.start,end:e.end},n=Ye(t);if(!n)return;const a=Gt(n);if(a)return{after_:a.startDate.toISOString(),before_:a.endDate.toISOString()}},De=e=>e?e.split(",").filter(t=>t.trim().length>0):[],_e=e=>e?e.split(",").filter(t=>t.trim().length>0):[],nt=e=>e?e.split(",").filter(t=>t.trim().length>0):[],Ne=e=>e?e.split(",").filter(t=>t.trim().length>0):[],Ue=e=>{const t=e?.["hide-subflows"],n=e?.["flow-run-search"],a=Te(e?.state??""),o=De(e?.flows??""),i=_e(e?.deployments??""),r=nt(e?.["work-pools"]??""),u=Ne(e?.tags??""),c=ue(e),d=a.length>0?a:void 0,f=o.length>0?o:void 0,m=i.length>0?i:void 0,h=r.length>0?r:void 0,S=t||n||d||f||m||u.length>0||c?{operator:"and_",...t&&{parent_task_run_id:{operator:"and_",is_null_:!0}},...n&&{name:{like_:n}},...d&&{state:{operator:"and_",name:{any_:d}}},...u.length>0&&{tags:{operator:"and_",any_:u}},...c&&{expected_start_time:c}}:void 0,y=f?{operator:"and_",id:{any_:f}}:void 0,g=m?{operator:"and_",id:{any_:m}}:void 0,p=h?{operator:"and_",name:{any_:h}}:void 0;return{page:e?.page??1,limit:e?.limit??100,sort:e?.sort??"START_TIME_DESC",flow_runs:S,flows:y,deployments:g,work_pools:p}},Qe=e=>{const t=e?.["task-run-search"],n=Te(e?.state??""),a=De(e?.flows??""),o=_e(e?.deployments??""),i=Ne(e?.tags??""),r=ue(e),u=t?{operator:"and_",name:{like_:t}}:void 0,c=n.length>0?n:void 0,f=c||i.length>0||r?{operator:"and_",...c&&{state:{operator:"and_",name:{any_:c}}},...i.length>0&&{tags:{operator:"and_",any_:i}},...r&&{expected_start_time:r}}:void 0,m=a.length>0?a:void 0,h=m?{operator:"and_",id:{any_:m}}:void 0,x=o.length>0?o:void 0,S=x?{operator:"and_",id:{any_:x}}:void 0;return{page:e?.["task-runs-page"]??1,limit:e?.["task-runs-limit"]??100,sort:e?.["task-runs-sort"]??"EXPECTED_START_TIME_DESC",task_runs:u,flow_runs:f,flows:h,deployments:S}},ca=e=>{const t=e?.["hide-subflows"],n=Te(e?.state??""),a=De(e?.flows??""),o=_e(e?.deployments??""),i=nt(e?.["work-pools"]??""),r=Ne(e?.tags??""),u=ue(e),c=n.length>0?n:void 0,d=a.length>0?a:void 0,f=o.length>0?o:void 0,m=i.length>0?i:void 0;return{sort:"EXPECTED_START_TIME_DESC",limit:1e3,offset:0,flow_runs:t||c||r.length>0||u?{operator:"and_",...t&&{parent_task_run_id:{operator:"and_",is_null_:!0}},...c&&{state:{operator:"and_",name:{any_:c}}},...r.length>0&&{tags:{operator:"and_",any_:r}},...u&&{expected_start_time:u}}:void 0,flows:d?{operator:"and_",id:{any_:d}}:void 0,deployments:f?{operator:"and_",id:{any_:f}}:void 0,work_pools:m?{operator:"and_",name:{any_:m}}:void 0}},ua=()=>{const e=j.useSearch(),t=j.useNavigate(),n=l.useMemo(()=>({page:e.page??1,limit:e.limit??100}),[e.page,e.limit]),a=l.useCallback(o=>{t({to:".",search:i=>({...i,page:o.page,limit:o.limit}),replace:!0})},[t]);return[n,a]},da=()=>{const e=j.useSearch(),t=j.useNavigate(),n=l.useCallback(a=>{t({to:".",search:o=>({...o,sort:a,page:1}),replace:!0})},[t]);return[e.sort,n]},ma=()=>{const e=j.useSearch(),t=j.useNavigate(),n=l.useCallback(a=>{t({to:".",search:o=>({...o,"hide-subflows":a,page:1}),replace:!0})},[t]);return[e["hide-subflows"],n]},fa=()=>{const e=j.useSearch(),t=j.useNavigate(),n=l.useCallback(a=>{t({to:".",search:o=>({...o,tab:a,page:1}),replace:!0})},[t]);return[e.tab,n]},ga=()=>{const e=j.useSearch(),t=j.useNavigate(),n=l.useCallback(a=>{t({to:".",search:o=>({...o,"flow-run-search":a,page:1}),replace:!0})},[t]);return[e["flow-run-search"],n]},ha=()=>{const e=j.useSearch(),t=j.useNavigate(),n=l.useMemo(()=>({page:e["task-runs-page"]??1,limit:e["task-runs-limit"]??100}),[e["task-runs-page"],e["task-runs-limit"]]),a=l.useCallback(o=>{t({to:".",search:i=>({...i,"task-runs-page":o.page,"task-runs-limit":o.limit}),replace:!0})},[t]);return[n,a]},pa=()=>{const e=j.useSearch(),t=j.useNavigate(),n=l.useCallback(a=>{t({to:".",search:o=>({...o,"task-runs-sort":a,"task-runs-page":1}),replace:!0})},[t]);return[e["task-runs-sort"],n]},xa=()=>{const e=j.useSearch(),t=j.useNavigate(),n=l.useCallback(a=>{t({to:".",search:o=>({...o,"task-run-search":a,"task-runs-page":1}),replace:!0})},[t]);return[e["task-run-search"],n]};function La(){const e=ot(),t=j.useSearch(),n=j.useNavigate(),[a,o]=ie("workspace-flow-runs-list-limit",100),[i,r]=ie("workspace-task-runs-list-limit",100),u=l.useRef(!1);l.useEffect(()=>{if(u.current)return;u.current=!0;const C=t.limit===void 0,D=t["task-runs-limit"]===void 0;(C||D)&&n({to:".",search:Z=>({...Z,...C&&{limit:a},...D&&{"task-runs-limit":i}}),replace:!0})},[n,t.limit,t["task-runs-limit"],a,i]),l.useEffect(()=>{t.limit!==void 0&&t.limit!==a&&o(t.limit)},[t.limit,a,o]),l.useEffect(()=>{t["task-runs-limit"]!==void 0&&t["task-runs-limit"]!==i&&r(t["task-runs-limit"])},[t["task-runs-limit"],i,r]);const[c,d]=ua(),[f,m]=da(),[h,x]=ma(),[S,y]=fa(),[g,p]=ga(),{states:w,flows:k,deployments:b,workPools:F,tags:N,dateRange:A,onStatesChange:v,onFlowsChange:W,onDeploymentsChange:H,onWorkPoolsChange:P,onTagsChange:B,onDateRangeChange:M}=ia(),[T,I]=ha(),[L,U]=pa(),[z,Q]=xa(),{currentFilter:de,savedFiltersForMenu:me,onSelectFilter:fe,onSaveFilter:ge,onDeleteFilter:he,onSetDefault:X,onRemoveDefault:pe,isSaveDialogOpen:xe,closeSaveDialog:we,confirmSave:Se}=oa();ra();const[{data:ve},{data:ke}]=rt({queries:[$t(),Yt()]}),{data:$}=E(Le(Ue(t),3e4)),{data:Y}=E(ze(Qe(t),3e4)),{data:ye}=E(qt(ca(t),3e4)),q=$?.results??[],K=Y?.results??[],Fe=l.useMemo(()=>{const C=ue(t);return{startDate:C?.after_?new Date(C.after_):void 0,endDate:C?.before_?new Date(C.before_):void 0}},[t]);l.useEffect(()=>{const C=q.map(D=>D.id);C.length>0&&e.prefetchQuery(Oe(C))},[e,q]);const je=l.useCallback(C=>{const D=Ue({...t,page:C});(async()=>{const G=(await e.ensureQueryData(Le(D,3e4)))?.results?.map(R=>R.id)??[];G.length>0&&e.prefetchQuery(Oe(G))})()},[e,t]),J=l.useCallback(C=>{const D=Qe({...t,"task-runs-page":C});e.prefetchQuery(ze(D,3e4))},[e,t]),Ce=l.useCallback(()=>{Q("")},[Q]);return s.jsx(sa,{tab:S,onTabChange:y,flowRunsCount:$?.count??0,taskRunsCount:Y?.count??0,hasAnyFlowRuns:(ve??0)>0,hasAnyTaskRuns:(ke??0)>0,flowRuns:q,flowRunsPages:$?.pages??0,pagination:c,onPaginationChange:d,onPrefetchPage:je,sort:f,onSortChange:m,hideSubflows:h,onHideSubflowsChange:x,flowRunSearch:g,onFlowRunSearchChange:p,selectedStates:w,onStateFilterChange:v,selectedFlows:k,onFlowFilterChange:W,selectedDeployments:b,onDeploymentFilterChange:H,selectedTags:N,onTagsFilterChange:B,selectedWorkPools:F,onWorkPoolFilterChange:P,dateRange:A,onDateRangeChange:M,flowRunHistory:ye??[],scatterPlotDateRange:Fe,taskRuns:K,taskRunsPages:Y?.pages??0,taskRunsPagination:T,onTaskRunsPaginationChange:I,onTaskRunsPrefetchPage:J,taskRunsSort:L,onTaskRunsSortChange:U,taskRunSearch:z,onTaskRunSearchChange:Q,onClearTaskRunFilters:Ce,currentFilter:de,savedFilters:me,onSelectFilter:fe,onSaveFilter:ge,onDeleteFilter:he,onSetDefault:X,onRemoveDefault:pe,isSaveDialogOpen:xe,onCloseSaveDialog:we,onConfirmSave:Se})}export{La as component};
2
- //# sourceMappingURL=index-d9_i_klL.js.map
1
+ import{r as l,j as s,t as E,L as Me,F as $e,n as ot,E as rt}from"./vendor-tanstack-BcZfOOfy.js";import{a8 as Ye,a9 as lt,aa as it,ab as be,ac as ct,ad as ut,ae as dt,af as mt,ag as ft,ah as gt,ai as ht,aj as Ee,ak as oe,al as re,am as pt,y as ee,N as qe,q as le,I as V,an as xt,ao as wt,ap as St,aq as vt,ar as kt,as as yt,at as Ft,_ as jt,$ as Ct,a0 as Rt,a1 as bt,a2 as Tt,p as Dt,a3 as _t,au as ie,av as Nt,i as O,aw as Mt,ax as Et,ay as Ae,az as Pe,C as At,o as Pt,G as It,O as Ie,B as Lt,g as zt,h as Ot,E as Vt,t as Ht,v as Wt,w as Bt,x as Ut,D as Qt,aA as Ge,aB as j,aC as $t,aD as Yt,aE as Le,aF as ze,aG as qt,aH as Oe,aI as Gt,aJ as Xt,aK as Kt,aL as Jt}from"./index-m48E4KcG.js";import{D as Zt,W as es}from"./work-pool-filter-C2tpSS-w.js";import{S as ts}from"./sort-filter-DpuWNkQo.js";import{S as ss,F as as,a as ns}from"./flow-runs-pagination-BATUweRV.js";import{u as os,F as rs}from"./use-flow-runs-selected-rows-DmQSWBTu.js";import{D as Xe}from"./delete-confirmation-dialog-DHkm2p8m.js";import{D as ls,a as is,b as cs,d as te,e as us}from"./dropdown-menu-0atiOSFo.js";import{g as ds,S as ms}from"./state-colors-CAAf0Eg3.js";import{R as fs,S as gs,X as hs,Y as ps,T as xs,d as ws}from"./vendor-recharts-BAN776s_.js";import{c as Ss}from"./vendor-date-wwuDAncJ.js";import{T as vs,a as ks,b as ys}from"./task-runs-pagination-VdR-LO4r.js";import{u as Fs}from"./use-delete-confirmation-dialog-CUdii6Lo.js";import{T as js}from"./tags-input-BLPMVWpZ.js";import{a as Cs}from"./zod-Cuos7J7w.js";import{c as Rs,o as Ke,s as _,e as se,n as ae,b as bs}from"./vendor-forms-ClCIacbh.js";import{F as Ts,b as Ds,c as _s,d as Ns,e as Ms,a as Es}from"./form-DLrbC7rV.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-BTiKGWfR.js";const As=({value:e,onValueChange:t,className:n})=>{const a=l.useMemo(()=>Ye(e),[e]),o=i=>{t(it(i))};return s.jsx(lt,{value:a,onValueChange:o,placeholder:"All time",clearable:!0,className:n})},Ve=2,Ps=({selectedFlows:e,onSelectFlows:t})=>{const[n,a]=l.useState(""),o=l.useDeferredValue(n),{data:i=[]}=E(be({flows:o?{operator:"and_",name:{like_:o}}:void 0,limit:100,offset:0,sort:"NAME_ASC"})),{data:r=[]}=E(be({flows:e.size>0?{operator:"and_",id:{any_:Array.from(e)}}:void 0,limit:e.size||1,offset:0,sort:"NAME_ASC"},{enabled:e.size>0})),u=m=>{const h=new Set(e);e.has(m)?h.delete(m):h.add(m),t(h)},c=()=>{t(new Set)},d=()=>{if(e.size===0)return"All flows";const m=r.filter(S=>e.has(S.id)).map(S=>S.name),h=m.slice(0,Ve),x=m.length-Ve;return s.jsxs("div",{className:"flex flex-1 min-w-0 items-center gap-2",children:[s.jsx("div",{className:"flex flex-1 min-w-0 items-center gap-2 overflow-hidden",children:s.jsx("span",{className:"truncate",children:h.join(", ")})}),x>0&&s.jsxs(re,{variant:"bodySmall",className:"shrink-0",children:["+ ",x]})]})},f=l.useMemo(()=>i.filter(m=>!o||m.name.toLowerCase().includes(o.toLowerCase())),[i,o]);return s.jsxs(ct,{children:[s.jsx(ut,{"aria-label":"Filter by flow",selected:e.size===0,children:d()}),s.jsxs(dt,{children:[s.jsx(mt,{value:n,onValueChange:a,placeholder:"Search flows..."}),s.jsxs(ft,{children:[s.jsx(gt,{children:"No flows found"}),s.jsxs(ht,{children:[s.jsxs(Ee,{"aria-label":"All flows",onSelect:c,closeOnSelect:!1,value:"__all__",children:[s.jsx(oe,{checked:e.size===0}),"All flows"]}),f.map(m=>s.jsxs(Ee,{"aria-label":m.name,onSelect:()=>u(m.id),closeOnSelect:!1,value:m.id,children:[s.jsx(oe,{checked:e.has(m.id)}),m.name]},m.id))]})]})]})]})},Is=()=>{const[e,t]=Fs(),{mutateAsync:n}=pt(),a=async(i,r=()=>{})=>{try{const u=await Promise.allSettled(i.map(f=>n({id:f}))),{numFails:c,numSuccess:d}=u.reduce((f,m)=>(m.status==="rejected"?f.numFails+=1:f.numSuccess+=1,f),{numFails:0,numSuccess:0});c>1?ee.error(`${c} task runs failed to delete`):c===1?ee.error("Task run failed to delete"):d>1?ee.success(`${d} task runs deleted`):ee.success("Task run deleted")}catch(u){console.error("Unknown error while deleting task run.",u)}finally{r()}};return[e,(i,r=()=>{})=>t({title:"Delete Task Runs",description:"Are you sure you want to delete selected task runs?",onConfirm:()=>{a(i,r)}})]},Ls=({count:e=0,...t})=>"results"in t&&"setSelectedRows"in t&&"selectedRows"in t?s.jsx(zs,{count:e,...t}):s.jsxs(re,{variant:"bodySmall",className:"text-muted-foreground",children:[e," ",qe(e,"Task run")]});function zs({count:e=0,results:t=[],setSelectedRows:n,selectedRows:a}){const[o,i]=Is(),r=l.useMemo(()=>t.map(({id:d})=>d),[t]),u=Array.from(a),c=()=>{const d=r.every(h=>a.has(h)),f=r.some(h=>a.has(h));let m=!1;return d?m=!0:f&&(m="indeterminate"),s.jsx(oe,{className:"block",checked:m,onCheckedChange:h=>{n(h?new Set(r):new Set)},"aria-label":"Toggle all"})};return a.size>0?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(c,{}),s.jsxs(re,{variant:"bodySmall",className:"text-muted-foreground",children:[u.length," selected"]}),s.jsx(le,{"aria-label":"Delete rows",size:"icon",variant:"secondary",onClick:()=>{i(u,()=>n(new Set))},children:s.jsx(V,{id:"Trash2",className:"size-4"})})]}),s.jsx(Xe,{...o})]}):s.jsxs("div",{className:"flex items-center gap-2",children:[t&&n&&a&&s.jsx(oe,{className:"block",checked:!1,onCheckedChange:d=>{n(new Set(d?r:void 0))},"aria-label":"Toggle all"}),s.jsxs(re,{variant:"bodySmall",className:"text-muted-foreground",children:[e," ",qe(e,"Task run")]})]})}const Os=e=>{const[t,n]=l.useState(new Set(e)),a=c=>n(d=>new Set(d).add(c)),o=c=>n(d=>{const f=new Set(d);return f.delete(c),f});return[t,n,{addRow:a,removeRow:o,onSelectRow:(c,d)=>{d?a(c):o(c)},clearSet:()=>n(new Set)}]},Je="Custom",Vs="Unsaved";function Hs(e){return e?e.name===Je||e.name===Vs:!0}const Ws=({currentFilter:e,savedFilters:t,onSelect:n,onSave:a,onDelete:o,onSetDefault:i,onRemoveDefault:r,permissions:u={canSave:!0,canDelete:!0}})=>{const[c,d]=l.useState(!1),f=e?.name??Je,m=Hs(e),h=m&&u.canSave,x=e?.id&&u.canDelete,S=!m,y=()=>{e?.id&&(o(e.id),d(!1))},g=()=>{e?.id&&(e.isDefault?r(e.id):i(e.id))};return s.jsxs(s.Fragment,{children:[s.jsxs(ls,{children:[s.jsx(is,{asChild:!0,children:s.jsxs(le,{variant:"outline",className:"gap-2",children:[s.jsx(V,{id:"SlidersVertical",className:"size-4"}),s.jsx("span",{children:f}),s.jsx(V,{id:"ChevronDown",className:"size-4"})]})}),s.jsxs(cs,{align:"start",className:"min-w-[200px]",children:[t.map(p=>s.jsxs(te,{onClick:()=>n(p),className:"flex items-center justify-between",children:[s.jsx("span",{children:p.name}),p.isDefault&&s.jsx(V,{id:"CircleCheck",className:"size-4 text-green-500"})]},p.id??p.name)),(h||x||S)&&s.jsx(us,{}),h&&s.jsxs(te,{onClick:a,children:[s.jsx(V,{id:"Plus",className:"mr-2 size-4"}),"Save current filters"]}),x&&s.jsxs(te,{variant:"destructive",onClick:()=>d(!0),children:[s.jsx(V,{id:"Trash2",className:"mr-2 size-4"}),"Delete"]}),S&&s.jsxs(te,{onClick:g,children:[s.jsx(V,{id:"CircleCheck",className:"mr-2 size-4"}),e?.isDefault?"Remove as default":"Set as default"]})]})]}),s.jsx(Xe,{isOpen:c,title:"Delete saved filter",description:`Are you sure you want to delete "${e?.name}"? This action cannot be undone.`,onConfirm:y,onClose:()=>d(!1)})]})},Bs=({cx:e,cy:t,payload:n})=>{if(e===void 0||t===void 0||!n)return null;const a=ds(n.stateType)||ms[n.stateType]||"#6b7280";return s.jsx("circle",{cx:e,cy:t,r:6,fill:a,stroke:a,strokeWidth:1,opacity:.7,className:"hover:opacity-100 transition-opacity cursor-pointer"})},Us=({active:e,payload:t})=>{const a=t?.[0]?.payload,o=a?.id,{data:i}=E({...xt(o??""),enabled:e&&!!o,staleTime:300*1e3}),{data:r}=E({...wt(i?.flow_id??""),enabled:!!i?.flow_id,staleTime:300*1e3});if(!e||!t||t.length===0||!a)return null;const u=new Date(a.timestamp);return s.jsxs("div",{className:"bg-background border rounded-lg p-3 shadow-lg flex flex-col gap-2 min-w-48",children:[s.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[i?.flow_id&&s.jsxs(s.Fragment,{children:[s.jsx(Me,{to:"/flows/flow/$id",params:{id:i.flow_id},className:"font-semibold hover:underline truncate max-w-32",children:r?.name??"..."}),s.jsx(St,{className:"size-3 flex-shrink-0"})]}),s.jsx(Me,{to:"/runs/flow-run/$id",params:{id:a.id},className:"hover:underline truncate max-w-32",children:i?.name??a.id.slice(0,8)})]}),s.jsx("div",{children:s.jsx(vt,{type:a.stateType})}),s.jsx("hr",{className:"border-border"}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsxs("span",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(yt,{className:"size-4"}),kt(Math.ceil(a.duration*1e3),{largest:2,round:!0})]}),s.jsxs("span",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(Ft,{className:"size-4"}),u.toLocaleString()]})]})]})},Qs=e=>t=>t===0?"0s":e<1?`${Math.round(t*1e3)}ms`:e<10?`${t.toFixed(1)}s`:e<60?`${Math.round(t)}s`:Ss(0,t*1e3,{addSuffix:!1}),$s=(e,t)=>i=>{const r=new Date(i);if(t<1e3||e<1e4){const u=r.getSeconds(),c=r.getMilliseconds();return`${r.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}:${u.toString().padStart(2,"0")}.${Math.floor(c/100)}`}return t<6e4||e<10*6e4?r.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}):e>=864e5?r.getHours()===0&&r.getMinutes()===0&&r.getSeconds()===0&&r.getMilliseconds()===0?r.toLocaleDateString(void 0,{weekday:"short",day:"numeric"}):r.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):r.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})},Ys=({history:e,startDate:t,endDate:n})=>{const a=l.useRef(null),[o,i]=l.useState(0);l.useEffect(()=>{const g=a.current;if(!g)return;const p=new ResizeObserver(w=>{for(const k of w)i(k.contentRect.width)});return p.observe(g),i(g.getBoundingClientRect().width),()=>p.disconnect()},[]);const r=l.useMemo(()=>e.map(g=>({x:new Date(g.timestamp).getTime(),y:g.duration,stateType:g.state_type,id:g.id,duration:g.duration,lateness:g.lateness,timestamp:g.timestamp})),[e]),{xDomain:u,xDomainMin:c,xDomainMax:d}=l.useMemo(()=>{if(t&&n)return{xDomain:[t.getTime(),n.getTime()],xDomainMin:t.getTime(),xDomainMax:n.getTime()};if(r.length===0){const k=Date.now(),b=k-1440*60*1e3;return{xDomain:[b,k],xDomainMin:b,xDomainMax:k}}const g=r.map(k=>k.x),p=Math.min(...g),w=Math.max(...g);return{xDomain:[p,w],xDomainMin:p,xDomainMax:w}},[t,n,r]),f=l.useMemo(()=>r.length===0?60:Math.max(...r.map(g=>g.y)),[r]),m=l.useMemo(()=>{if(r.length<2)return Number.POSITIVE_INFINITY;const g=r.map(w=>w.x).sort((w,k)=>w-k);let p=Number.POSITIVE_INFINITY;for(let w=1;w<g.length;w++){const k=g[w]-g[w-1];k>0&&k<p&&(p=k)}return p},[r]),h=d-c,x=l.useMemo(()=>$s(h,m),[h,m]),S=l.useMemo(()=>Qs(f),[f]),y=l.useMemo(()=>{const w=o-60,k=Math.max(2,Math.ceil(w/100)),b=1440*60*1e3,F=d-c;if(F>=b){const v=[],W=new Date(c),H=new Date(W);H.setHours(24,0,0,0),v.push(c);let P=H.getTime();for(;P<d;)v.push(P),P+=b;const B=v[v.length-1];if(d-B>F/k/2&&v.push(d),v.length<k){const M=[];for(let T=0;T<v.length-1;T++){M.push(v[T]);const I=v[T+1]-v[T],L=Math.max(1,Math.floor(I/(F/k)));if(L>1){const U=I/L;for(let z=1;z<L;z++)M.push(v[T]+U*z)}}return M.push(v[v.length-1]),M}return v}const N=[],A=(d-c)/(k-1);for(let v=0;v<k;v++)N.push(c+A*v);return N},[o,c,d]);return e.length===0?null:s.jsx("div",{ref:a,className:"hidden md:block w-full h-64","data-testid":"scatter-plot",children:s.jsx(fs,{width:"100%",height:"100%",children:s.jsxs(gs,{children:[s.jsx(hs,{type:"number",dataKey:"x",scale:"time",domain:u,ticks:y,tickFormatter:x,tick:{fontSize:12},tickLine:!1,axisLine:{stroke:"#e5e7eb"}}),s.jsx(ps,{type:"number",dataKey:"y",tickFormatter:S,tick:{fontSize:12},tickLine:!1,axisLine:{stroke:"#e5e7eb"},width:60}),s.jsx(xs,{content:s.jsx(Us,{}),cursor:{strokeDasharray:"3 3"},animationDuration:0}),s.jsx(ws,{data:r,shape:s.jsx(Bs,{}),isAnimationActive:!1})]})})})},qs=Ke({name:_().min(1,{message:"Name is required"}).max(100,{message:"Name must be 100 characters or less"})}),Gs=({open:e,onOpenChange:t,onSave:n})=>{const a=Rs({resolver:Cs(qs),defaultValues:{name:""}});l.useEffect(()=>{e&&a.reset({name:""})},[e,a]);const o=i=>{n(i.name),t(!1)};return s.jsx(jt,{open:e,onOpenChange:t,children:s.jsxs(Ct,{children:[s.jsx(Rt,{children:s.jsx(bt,{children:"Save Filter"})}),s.jsx(Tt,{children:"Save your current filter configuration for quick access later."}),s.jsx(Ts,{...a,children:s.jsxs("form",{onSubmit:i=>{a.handleSubmit(o)(i)},className:"space-y-4",children:[s.jsx(Ds,{control:a.control,name:"name",render:({field:i})=>s.jsxs(_s,{children:[s.jsx(Ns,{children:"Filter Name"}),s.jsx(Ms,{children:s.jsx(Dt,{autoComplete:"off",placeholder:"e.g., Failed runs this week",...i})}),s.jsx(Es,{})]})}),s.jsxs(_t,{children:[s.jsx(le,{type:"button",variant:"outline",onClick:()=>t(!1),children:"Cancel"}),s.jsx(le,{type:"submit",children:"Save"})]})]})})]})})},Xs="prefect-ui-v2-saved-filters",Ks="prefect-ui-v2-default-filter-id",Ze="system-past-week",et="system-hide-scheduled";function Js(e){return e===Ze||e===et}const tt=[{id:Ze,name:"Past week",filters:{range:"past-7-days"}},{id:et,name:"Hide scheduled runs",filters:{range:"past-7-days",state:[...Nt]}}],Zs=tt[0];function ea(){return`${Date.now()}-${Math.random().toString(36).substring(2,9)}`}function ta(e,t){const n=(a,o)=>{if(a===void 0&&o===void 0)return!0;if(a===void 0||o===void 0||a.length!==o.length)return!1;const i=[...a].sort(),r=[...o].sort();return i.every((u,c)=>u===r[c])};return n(e.state,t.state)&&n(e.flows,t.flows)&&n(e.deployments,t.deployments)&&n(e.workPools,t.workPools)&&n(e.tags,t.tags)&&e.range===t.range&&e.start===t.start&&e.end===t.end}function st(){const[e,t]=ie(Xs,[]),[n,a]=ie(Ks,null),o=l.useMemo(()=>[...tt,...e],[e]),i=l.useCallback(h=>{const x={id:ea(),name:h.name,filters:h.filters};return t(S=>[...S,x]),x},[t]),r=l.useCallback(h=>{t(x=>x.filter(S=>S.id!==h)),a(x=>x===h?null:x)},[t,a]),u=l.useCallback((h,x)=>{t(S=>S.map(y=>y.id===h?{...y,...x.name!==void 0&&{name:x.name},...x.filters!==void 0&&{filters:x.filters}}:y))},[t]),c=l.useCallback(h=>{a(h)},[a]),d=l.useCallback(h=>o.find(x=>x.id===h),[o]),f=l.useCallback(h=>o.find(x=>ta(x.filters,h)),[o]),m=l.useMemo(()=>h=>n===h,[n]);return{savedFilters:o,defaultFilterId:n,saveFilter:i,deleteFilter:r,updateFilter:u,setDefaultFilter:c,getFilterById:d,findMatchingFilter:f,isDefaultFilter:m}}const sa=({tab:e,onTabChange:t,flowRunsCount:n,taskRunsCount:a,hasAnyFlowRuns:o,hasAnyTaskRuns:i,flowRuns:r,flowRunsPages:u,pagination:c,onPaginationChange:d,onPrefetchPage:f,sort:m,onSortChange:h,hideSubflows:x,onHideSubflowsChange:S,flowRunSearch:y,onFlowRunSearchChange:g,selectedStates:p,onStateFilterChange:w,selectedFlows:k,onFlowFilterChange:b,selectedDeployments:F,onDeploymentFilterChange:N,selectedTags:A,onTagsFilterChange:v,selectedWorkPools:W,onWorkPoolFilterChange:H,dateRange:P,onDateRangeChange:B,flowRunHistory:M,scatterPlotDateRange:T,taskRuns:I,taskRunsPages:L,taskRunsPagination:U,onTaskRunsPaginationChange:z,onTaskRunsPrefetchPage:Q,taskRunsSort:de,onTaskRunsSortChange:me,taskRunSearch:fe,onTaskRunSearchChange:ge,onClearTaskRunFilters:he,currentFilter:X,savedFilters:pe,onSelectFilter:xe,onSaveFilter:we,onDeleteFilter:Se,onSetDefault:ve,onRemoveDefault:ke,isSaveDialogOpen:$,onCloseSaveDialog:Y,onConfirmSave:ye})=>{const q=!o&&!i,[K,Fe,{onSelectRow:je}]=os(),[J,Ce,{onSelectRow:C}]=Os(),D=[...new Set(r.map(R=>R.flow_id))],{data:Z}=E(be({flows:{operator:"and_",id:{any_:D}},offset:0,sort:"NAME_ASC"},{enabled:D.length>0})),G=r.map(R=>({...R,flow:Z?.find(Re=>Re.id===R.flow_id)}));return q?s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsx(He,{}),s.jsx(aa,{})]}):s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(He,{}),s.jsx(Ws,{currentFilter:X,savedFilters:pe,onSelect:xe,onSave:we,onDelete:Se,onSetDefault:ve,onRemoveDefault:ke,permissions:{canSave:!0,canDelete:!Js(X?.id??null)}})]}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsxs("div",{className:"flex flex-wrap gap-2 lg:grid lg:grid-flow-col lg:auto-cols-fr",children:[s.jsxs("div",{className:"flex flex-col gap-1 w-full lg:w-auto",children:[s.jsx(O,{className:"text-xs text-muted-foreground",children:"Date Range"}),s.jsx(As,{value:P,onValueChange:B})]}),s.jsxs("div",{className:"flex flex-col gap-1 w-full lg:w-auto",children:[s.jsx(O,{className:"text-xs text-muted-foreground",children:"States"}),s.jsx(ss,{selectedFilters:p,onSelectFilter:w})]})]}),s.jsxs("div",{className:"flex flex-wrap gap-2 lg:grid lg:grid-flow-col lg:auto-cols-fr",children:[s.jsxs("div",{className:"flex flex-col gap-1 w-full lg:w-auto",children:[s.jsx(O,{className:"text-xs text-muted-foreground",children:"Flows"}),s.jsx(Ps,{selectedFlows:k,onSelectFlows:b})]}),s.jsxs("div",{className:"flex flex-col gap-1 w-full lg:w-auto",children:[s.jsx(O,{className:"text-xs text-muted-foreground",children:"Deployments"}),s.jsx(Zt,{selectedDeployments:F,onSelectDeployments:N})]}),s.jsxs("div",{className:"flex flex-col gap-1 w-full lg:w-auto",children:[s.jsx(O,{className:"text-xs text-muted-foreground",children:"Work Pools"}),s.jsx(es,{selectedWorkPools:W,onSelectWorkPools:H})]}),s.jsxs("div",{className:"flex flex-col gap-1 w-full lg:w-auto",children:[s.jsx(O,{className:"text-xs text-muted-foreground",children:"Tags"}),s.jsx(js,{value:Array.from(A),onChange:R=>{const Re=Array.isArray(R)?R:[];v(new Set(Re))},placeholder:"All tags"})]})]})]}),s.jsx(Gs,{open:$,onOpenChange:Y,onSave:ye}),s.jsxs(Mt,{value:e,onValueChange:t,children:[s.jsxs(Et,{children:[s.jsx(Ae,{value:"flow-runs",children:"Flow Runs"}),s.jsx(Ae,{value:"task-runs",children:"Task Runs"})]}),s.jsx(Pe,{value:"flow-runs",children:s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsx(At,{children:s.jsx(Pt,{children:s.jsx(Ys,{history:M,startDate:T.startDate,endDate:T.endDate})})}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(rs,{count:n,results:G,selectedRows:K,setSelectedRows:Fe}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2 whitespace-nowrap",children:[s.jsx(It,{id:"hide-subflows",checked:x,onCheckedChange:S}),s.jsx(O,{htmlFor:"hide-subflows",children:"Hide subflows"})]}),s.jsx(Ie,{value:y,onChange:R=>g(R.target.value),placeholder:"Search by flow run name","aria-label":"Search by flow run name",className:"w-64",debounceMs:1200}),s.jsx(ts,{value:m,onSelect:h})]})]}),s.jsx(as,{count:n,pages:u,pagination:c,onChangePagination:d,onPrefetchPage:f}),s.jsx(ns,{flowRuns:G,selectedRows:K,onSelect:je})]})}),s.jsx(Pe,{value:"task-runs",children:s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(Ls,{count:a,results:I,selectedRows:J,setSelectedRows:Ce}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(Ie,{value:fe,onChange:R=>ge(R.target.value),placeholder:"Search by task run name","aria-label":"Search by task run name",className:"w-64",debounceMs:1200}),s.jsx(vs,{value:de,onSelect:me})]})]}),s.jsx(ks,{count:a,pages:L,pagination:U,onChangePagination:z,onPrefetchPage:Q}),s.jsx(ys,{taskRuns:I,selectedRows:J,onSelect:C,onClearFilters:he})]})})]})]})},He=()=>s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(Lt,{children:s.jsx(zt,{children:s.jsx(Ot,{className:"text-xl font-semibold",children:"Runs"})})})}),aa=()=>s.jsxs(Vt,{children:[s.jsx(Ht,{id:"Workflow"}),s.jsx(Wt,{children:"Run a task or flow to get started"}),s.jsx(Bt,{children:"Runs store the state history for each execution of a task or flow."}),s.jsx(Ut,{children:s.jsx(Qt,{id:"getting-started"})})]}),ce=$e("/runs/");function na(e){const t=u=>u?u.split(",").filter(c=>c.trim().length>0):[],n=t(e.state),a=t(e.flows),o=t(e.deployments),i=t(e["work-pools"]),r=t(e.tags);return{...n.length>0&&{state:n},...a.length>0&&{flows:a},...o.length>0&&{deployments:o},...i.length>0&&{workPools:i},...r.length>0&&{tags:r},...e.range&&{range:e.range},...e.start&&{start:e.start},...e.end&&{end:e.end}}}function at(e){return{state:e.state?.join(",")??"",flows:e.flows?.join(",")??"",deployments:e.deployments?.join(",")??"","work-pools":e.workPools?.join(",")??"",tags:e.tags?.join(",")??"",range:e.range,start:e.start,end:e.end}}function We(e,t){return{id:e.id,name:e.name,isDefault:e.id===t}}function oa(){const e=ce.useSearch(),t=ce.useNavigate(),{savedFilters:n,defaultFilterId:a,saveFilter:o,deleteFilter:i,setDefaultFilter:r,findMatchingFilter:u}=st(),[c,d]=l.useState(!1),f=l.useMemo(()=>na(e),[e]),m=l.useMemo(()=>u(f),[u,f]),h=l.useMemo(()=>n.map(F=>We(F,a)),[n,a]),x=l.useMemo(()=>m?We(m,a):f.state?.length||f.flows?.length||f.deployments?.length||f.workPools?.length||f.tags?.length||f.range||f.start||f.end?{id:null,name:"Unsaved",isDefault:!1}:{id:null,name:"Custom",isDefault:!1},[m,a,f]),S=l.useCallback(F=>{const N=n.find(v=>v.id===F.id);if(!N)return;const A=at(N.filters);t({to:".",search:v=>({...v,...A,page:1}),replace:!0})},[t,n]),y=l.useCallback(()=>{d(!0)},[]),g=l.useCallback(F=>{o({name:F,filters:f}),d(!1)},[o,f]),p=l.useCallback(()=>{d(!1)},[]),w=l.useCallback(F=>{i(F)},[i]),k=l.useCallback(F=>{r(F)},[r]),b=l.useCallback(()=>{r(null)},[r]);return{currentFilter:x,savedFiltersForMenu:h,onSelectFilter:S,onSaveFilter:y,onDeleteFilter:w,onSetDefault:k,onRemoveDefault:b,isSaveDialogOpen:c,closeSaveDialog:p,confirmSave:g}}function ra(){const e=ce.useNavigate(),t=ce.useSearch(),{defaultFilterId:n,getFilterById:a}=st(),o=l.useRef(!1),i=l.useMemo(()=>!!(t.state||t.flows||t.deployments||t["work-pools"]||t.tags||t.range||t.start||t.end),[t]);l.useEffect(()=>{if(o.current||i)return;let r;n&&(r=a(n)),r||(r=Zs),o.current=!0;const u=at(r.filters);e({to:".",search:c=>({...c,...u,page:1}),replace:!0})},[n,i,a,e])}const Be=$e("/runs/"),la=e=>e?e.split(",").filter(t=>Ge.includes(t)):[],ne=e=>e?e.split(",").filter(t=>t.trim().length>0):[];function ia(){const e=Be.useSearch(),t=Be.useNavigate(),n=l.useMemo(()=>new Set(la(e.state??"")),[e.state]),a=l.useMemo(()=>new Set(ne(e.flows??"")),[e.flows]),o=l.useMemo(()=>new Set(ne(e.deployments??"")),[e.deployments]),i=l.useMemo(()=>new Set(ne(e["work-pools"]??"")),[e["work-pools"]]),r=l.useMemo(()=>new Set(ne(e.tags??"")),[e.tags]),u=l.useMemo(()=>({range:e.range,start:e.start,end:e.end}),[e.range,e.start,e.end]),c=l.useCallback(g=>{const p=Array.from(g);t({to:".",search:w=>({...w,state:p.length>0?p.join(","):"",page:1}),replace:!0})},[t]),d=l.useCallback(g=>{const p=Array.from(g);t({to:".",search:w=>({...w,flows:p.length>0?p.join(","):"",page:1}),replace:!0})},[t]),f=l.useCallback(g=>{const p=Array.from(g);t({to:".",search:w=>({...w,deployments:p.length>0?p.join(","):"",page:1}),replace:!0})},[t]),m=l.useCallback(g=>{const p=Array.from(g);t({to:".",search:w=>({...w,"work-pools":p.length>0?p.join(","):"",page:1}),replace:!0})},[t]),h=l.useCallback(g=>{const p=Array.from(g);t({to:".",search:w=>({...w,tags:p.length>0?p.join(","):"",page:1}),replace:!0})},[t]),x=l.useCallback(g=>{t({to:".",search:p=>({...p,range:g.range,start:g.start,end:g.end,page:1}),replace:!0})},[t]),S=l.useMemo(()=>n.size>0||a.size>0||o.size>0||i.size>0||r.size>0||u.range!==void 0||u.start!==void 0||u.end!==void 0,[n,a,o,i,r,u]),y=l.useCallback(()=>{t({to:".",search:g=>({...g,state:"",flows:"",deployments:"","work-pools":"",tags:"",range:void 0,start:void 0,end:void 0,page:1}),replace:!0})},[t]);return{states:n,flows:a,deployments:o,workPools:i,tags:r,dateRange:u,onStatesChange:c,onFlowsChange:d,onDeploymentsChange:f,onWorkPoolsChange:m,onTagsChange:h,onDateRangeChange:x,clearAllFilters:y,hasActiveFilters:S}}Ke({tab:se(["flow-runs","task-runs"]).optional().default("flow-runs"),page:ae().int().positive().optional().default(1).catch(1),limit:ae().int().positive().optional().catch(void 0),sort:se(Jt).optional().default("START_TIME_DESC"),"hide-subflows":bs().optional().default(!1),"flow-run-search":_().optional().default(""),state:_().optional().default(""),flows:_().optional().default(""),deployments:_().optional().default(""),"work-pools":_().optional().default(""),tags:_().optional().default(""),range:se(Kt).optional(),start:_().optional(),end:_().optional(),"task-runs-page":ae().int().positive().optional().default(1).catch(1),"task-runs-limit":ae().int().positive().optional().catch(void 0),"task-runs-sort":se(Xt).optional().default("EXPECTED_START_TIME_DESC"),"task-run-search":_().optional().default("")});const Te=e=>e?e.split(",").filter(t=>Ge.includes(t)):[],ue=e=>{if(!e)return;const t={range:e.range,start:e.start,end:e.end},n=Ye(t);if(!n)return;const a=Gt(n);if(a)return{after_:a.startDate.toISOString(),before_:a.endDate.toISOString()}},De=e=>e?e.split(",").filter(t=>t.trim().length>0):[],_e=e=>e?e.split(",").filter(t=>t.trim().length>0):[],nt=e=>e?e.split(",").filter(t=>t.trim().length>0):[],Ne=e=>e?e.split(",").filter(t=>t.trim().length>0):[],Ue=e=>{const t=e?.["hide-subflows"],n=e?.["flow-run-search"],a=Te(e?.state??""),o=De(e?.flows??""),i=_e(e?.deployments??""),r=nt(e?.["work-pools"]??""),u=Ne(e?.tags??""),c=ue(e),d=a.length>0?a:void 0,f=o.length>0?o:void 0,m=i.length>0?i:void 0,h=r.length>0?r:void 0,S=t||n||d||f||m||u.length>0||c?{operator:"and_",...t&&{parent_task_run_id:{operator:"and_",is_null_:!0}},...n&&{name:{like_:n}},...d&&{state:{operator:"and_",name:{any_:d}}},...u.length>0&&{tags:{operator:"and_",any_:u}},...c&&{expected_start_time:c}}:void 0,y=f?{operator:"and_",id:{any_:f}}:void 0,g=m?{operator:"and_",id:{any_:m}}:void 0,p=h?{operator:"and_",name:{any_:h}}:void 0;return{page:e?.page??1,limit:e?.limit??100,sort:e?.sort??"START_TIME_DESC",flow_runs:S,flows:y,deployments:g,work_pools:p}},Qe=e=>{const t=e?.["task-run-search"],n=Te(e?.state??""),a=De(e?.flows??""),o=_e(e?.deployments??""),i=Ne(e?.tags??""),r=ue(e),u=t?{operator:"and_",name:{like_:t}}:void 0,c=n.length>0?n:void 0,f=c||i.length>0||r?{operator:"and_",...c&&{state:{operator:"and_",name:{any_:c}}},...i.length>0&&{tags:{operator:"and_",any_:i}},...r&&{expected_start_time:r}}:void 0,m=a.length>0?a:void 0,h=m?{operator:"and_",id:{any_:m}}:void 0,x=o.length>0?o:void 0,S=x?{operator:"and_",id:{any_:x}}:void 0;return{page:e?.["task-runs-page"]??1,limit:e?.["task-runs-limit"]??100,sort:e?.["task-runs-sort"]??"EXPECTED_START_TIME_DESC",task_runs:u,flow_runs:f,flows:h,deployments:S}},ca=e=>{const t=e?.["hide-subflows"],n=Te(e?.state??""),a=De(e?.flows??""),o=_e(e?.deployments??""),i=nt(e?.["work-pools"]??""),r=Ne(e?.tags??""),u=ue(e),c=n.length>0?n:void 0,d=a.length>0?a:void 0,f=o.length>0?o:void 0,m=i.length>0?i:void 0;return{sort:"EXPECTED_START_TIME_DESC",limit:1e3,offset:0,flow_runs:t||c||r.length>0||u?{operator:"and_",...t&&{parent_task_run_id:{operator:"and_",is_null_:!0}},...c&&{state:{operator:"and_",name:{any_:c}}},...r.length>0&&{tags:{operator:"and_",any_:r}},...u&&{expected_start_time:u}}:void 0,flows:d?{operator:"and_",id:{any_:d}}:void 0,deployments:f?{operator:"and_",id:{any_:f}}:void 0,work_pools:m?{operator:"and_",name:{any_:m}}:void 0}},ua=()=>{const e=j.useSearch(),t=j.useNavigate(),n=l.useMemo(()=>({page:e.page??1,limit:e.limit??100}),[e.page,e.limit]),a=l.useCallback(o=>{t({to:".",search:i=>({...i,page:o.page,limit:o.limit}),replace:!0})},[t]);return[n,a]},da=()=>{const e=j.useSearch(),t=j.useNavigate(),n=l.useCallback(a=>{t({to:".",search:o=>({...o,sort:a,page:1}),replace:!0})},[t]);return[e.sort,n]},ma=()=>{const e=j.useSearch(),t=j.useNavigate(),n=l.useCallback(a=>{t({to:".",search:o=>({...o,"hide-subflows":a,page:1}),replace:!0})},[t]);return[e["hide-subflows"],n]},fa=()=>{const e=j.useSearch(),t=j.useNavigate(),n=l.useCallback(a=>{t({to:".",search:o=>({...o,tab:a,page:1}),replace:!0})},[t]);return[e.tab,n]},ga=()=>{const e=j.useSearch(),t=j.useNavigate(),n=l.useCallback(a=>{t({to:".",search:o=>({...o,"flow-run-search":a,page:1}),replace:!0})},[t]);return[e["flow-run-search"],n]},ha=()=>{const e=j.useSearch(),t=j.useNavigate(),n=l.useMemo(()=>({page:e["task-runs-page"]??1,limit:e["task-runs-limit"]??100}),[e["task-runs-page"],e["task-runs-limit"]]),a=l.useCallback(o=>{t({to:".",search:i=>({...i,"task-runs-page":o.page,"task-runs-limit":o.limit}),replace:!0})},[t]);return[n,a]},pa=()=>{const e=j.useSearch(),t=j.useNavigate(),n=l.useCallback(a=>{t({to:".",search:o=>({...o,"task-runs-sort":a,"task-runs-page":1}),replace:!0})},[t]);return[e["task-runs-sort"],n]},xa=()=>{const e=j.useSearch(),t=j.useNavigate(),n=l.useCallback(a=>{t({to:".",search:o=>({...o,"task-run-search":a,"task-runs-page":1}),replace:!0})},[t]);return[e["task-run-search"],n]};function La(){const e=ot(),t=j.useSearch(),n=j.useNavigate(),[a,o]=ie("workspace-flow-runs-list-limit",100),[i,r]=ie("workspace-task-runs-list-limit",100),u=l.useRef(!1);l.useEffect(()=>{if(u.current)return;u.current=!0;const C=t.limit===void 0,D=t["task-runs-limit"]===void 0;(C||D)&&n({to:".",search:Z=>({...Z,...C&&{limit:a},...D&&{"task-runs-limit":i}}),replace:!0})},[n,t.limit,t["task-runs-limit"],a,i]),l.useEffect(()=>{t.limit!==void 0&&t.limit!==a&&o(t.limit)},[t.limit,a,o]),l.useEffect(()=>{t["task-runs-limit"]!==void 0&&t["task-runs-limit"]!==i&&r(t["task-runs-limit"])},[t["task-runs-limit"],i,r]);const[c,d]=ua(),[f,m]=da(),[h,x]=ma(),[S,y]=fa(),[g,p]=ga(),{states:w,flows:k,deployments:b,workPools:F,tags:N,dateRange:A,onStatesChange:v,onFlowsChange:W,onDeploymentsChange:H,onWorkPoolsChange:P,onTagsChange:B,onDateRangeChange:M}=ia(),[T,I]=ha(),[L,U]=pa(),[z,Q]=xa(),{currentFilter:de,savedFiltersForMenu:me,onSelectFilter:fe,onSaveFilter:ge,onDeleteFilter:he,onSetDefault:X,onRemoveDefault:pe,isSaveDialogOpen:xe,closeSaveDialog:we,confirmSave:Se}=oa();ra();const[{data:ve},{data:ke}]=rt({queries:[$t(),Yt()]}),{data:$}=E(Le(Ue(t),3e4)),{data:Y}=E(ze(Qe(t),3e4)),{data:ye}=E(qt(ca(t),3e4)),q=$?.results??[],K=Y?.results??[],Fe=l.useMemo(()=>{const C=ue(t);return{startDate:C?.after_?new Date(C.after_):void 0,endDate:C?.before_?new Date(C.before_):void 0}},[t]);l.useEffect(()=>{const C=q.map(D=>D.id);C.length>0&&e.prefetchQuery(Oe(C))},[e,q]);const je=l.useCallback(C=>{const D=Ue({...t,page:C});(async()=>{const G=(await e.ensureQueryData(Le(D,3e4)))?.results?.map(R=>R.id)??[];G.length>0&&e.prefetchQuery(Oe(G))})()},[e,t]),J=l.useCallback(C=>{const D=Qe({...t,"task-runs-page":C});e.prefetchQuery(ze(D,3e4))},[e,t]),Ce=l.useCallback(()=>{Q("")},[Q]);return s.jsx(sa,{tab:S,onTabChange:y,flowRunsCount:$?.count??0,taskRunsCount:Y?.count??0,hasAnyFlowRuns:(ve??0)>0,hasAnyTaskRuns:(ke??0)>0,flowRuns:q,flowRunsPages:$?.pages??0,pagination:c,onPaginationChange:d,onPrefetchPage:je,sort:f,onSortChange:m,hideSubflows:h,onHideSubflowsChange:x,flowRunSearch:g,onFlowRunSearchChange:p,selectedStates:w,onStateFilterChange:v,selectedFlows:k,onFlowFilterChange:W,selectedDeployments:b,onDeploymentFilterChange:H,selectedTags:N,onTagsFilterChange:B,selectedWorkPools:F,onWorkPoolFilterChange:P,dateRange:A,onDateRangeChange:M,flowRunHistory:ye??[],scatterPlotDateRange:Fe,taskRuns:K,taskRunsPages:Y?.pages??0,taskRunsPagination:T,onTaskRunsPaginationChange:I,onTaskRunsPrefetchPage:J,taskRunsSort:L,onTaskRunsSortChange:U,taskRunSearch:z,onTaskRunSearchChange:Q,onClearTaskRunFilters:Ce,currentFilter:de,savedFilters:me,onSelectFilter:fe,onSaveFilter:ge,onDeleteFilter:he,onSetDefault:X,onRemoveDefault:pe,isSaveDialogOpen:xe,onCloseSaveDialog:we,onConfirmSave:Se})}export{La as component};
2
+ //# sourceMappingURL=index-BkiGTHwU.js.map