prefect 3.6.15__py3-none-any.whl → 3.6.16.dev3__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.
- prefect/__init__.py +20 -0
- prefect/_build_info.py +3 -3
- prefect/_internal/analytics/__init__.py +80 -0
- prefect/_internal/analytics/_config.py +2 -0
- prefect/_internal/analytics/ci_detection.py +39 -0
- prefect/_internal/analytics/client.py +132 -0
- prefect/_internal/analytics/device_id.py +55 -0
- prefect/_internal/analytics/emit.py +90 -0
- prefect/_internal/analytics/enabled.py +33 -0
- prefect/_internal/analytics/events.py +14 -0
- prefect/_internal/analytics/milestones.py +177 -0
- prefect/_internal/analytics/notice.py +60 -0
- prefect/_internal/analytics/service.py +238 -0
- prefect/analytics/__init__.py +67 -0
- prefect/deployments/runner.py +20 -0
- prefect/flow_engine.py +16 -0
- prefect/flows.py +8 -0
- prefect/logging/formatters.py +24 -1
- prefect/server/ui-v2/assets/{artifact-card-BBzQR-Cj.js → artifact-card-BclosG8t.js} +2 -2
- prefect/server/ui-v2/assets/{artifact-card-BBzQR-Cj.js.map → artifact-card-BclosG8t.js.map} +1 -1
- prefect/server/ui-v2/assets/artifact._id-C0r4BJr2.js +2 -0
- prefect/server/ui-v2/assets/artifact._id-C0r4BJr2.js.map +1 -0
- prefect/server/ui-v2/assets/{automation-wizard-EYSfXlQ7.js → automation-wizard-Bmgt6nn8.js} +2 -2
- prefect/server/ui-v2/assets/{automation-wizard-EYSfXlQ7.js.map → automation-wizard-Bmgt6nn8.js.map} +1 -1
- prefect/server/ui-v2/assets/automation._id-Ccke3KJz.js +2 -0
- prefect/server/ui-v2/assets/{automation._id-Dn7jABys.js.map → automation._id-Ccke3KJz.js.map} +1 -1
- prefect/server/ui-v2/assets/{automation_._id.edit-COrqswD3.js → automation_._id.edit-BlKPUTVf.js} +2 -2
- prefect/server/ui-v2/assets/{automation_._id.edit-COrqswD3.js.map → automation_._id.edit-BlKPUTVf.js.map} +1 -1
- prefect/server/ui-v2/assets/{automations-header-DN_dmMXW.js → automations-header-Df2zw3SC.js} +2 -2
- prefect/server/ui-v2/assets/{automations-header-DN_dmMXW.js.map → automations-header-Df2zw3SC.js.map} +1 -1
- prefect/server/ui-v2/assets/{base-job-template-form-section-De2ACYbw.js → base-job-template-form-section-oZD6U-RW.js} +2 -2
- prefect/server/ui-v2/assets/{base-job-template-form-section-De2ACYbw.js.map → base-job-template-form-section-oZD6U-RW.js.map} +1 -1
- prefect/server/ui-v2/assets/{block-type-details-Cklc7TkK.js → block-type-details-CYrdaLot.js} +2 -2
- prefect/server/ui-v2/assets/{block-type-details-Cklc7TkK.js.map → block-type-details-CYrdaLot.js.map} +1 -1
- prefect/server/ui-v2/assets/block-type-logo-CyAWq7mC.js +2 -0
- prefect/server/ui-v2/assets/block-type-logo-CyAWq7mC.js.map +1 -0
- prefect/server/ui-v2/assets/{block._id-tuz1Bcj2.js → block._id-CBgHrpTP.js} +2 -2
- prefect/server/ui-v2/assets/{block._id-tuz1Bcj2.js.map → block._id-CBgHrpTP.js.map} +1 -1
- prefect/server/ui-v2/assets/{block_._id.edit-CFEYhF5R.js → block_._id.edit-CW-kdi4O.js} +2 -2
- prefect/server/ui-v2/assets/{block_._id.edit-CFEYhF5R.js.map → block_._id.edit-CW-kdi4O.js.map} +1 -1
- prefect/server/ui-v2/assets/{catalog-CCPRo7nY.js → catalog-Brh0kn1I.js} +2 -2
- prefect/server/ui-v2/assets/{catalog-CCPRo7nY.js.map → catalog-Brh0kn1I.js.map} +1 -1
- prefect/server/ui-v2/assets/catalog_._slug-MCgzguIZ.js +2 -0
- prefect/server/ui-v2/assets/{catalog_._slug-Bl2J2oI3.js.map → catalog_._slug-MCgzguIZ.js.map} +1 -1
- prefect/server/ui-v2/assets/{catalog_._slug_.create-9UD_SxDN.js → catalog_._slug_.create-DBaeHi9Q.js} +2 -2
- prefect/server/ui-v2/assets/{catalog_._slug_.create-9UD_SxDN.js.map → catalog_._slug_.create-DBaeHi9Q.js.map} +1 -1
- prefect/server/ui-v2/assets/{collapsible-BVQTBG_U.js → collapsible-B_NJS0uJ.js} +2 -2
- prefect/server/ui-v2/assets/{collapsible-BVQTBG_U.js.map → collapsible-B_NJS0uJ.js.map} +1 -1
- prefect/server/ui-v2/assets/{concurrency-limit._id-CsgRxA0a.js → concurrency-limit._id-qzNUQzQa.js} +2 -2
- prefect/server/ui-v2/assets/{concurrency-limit._id-CsgRxA0a.js.map → concurrency-limit._id-qzNUQzQa.js.map} +1 -1
- prefect/server/ui-v2/assets/create-BwXG6EIb.js +2 -0
- prefect/server/ui-v2/assets/{create-D--LHaji.js.map → create-BwXG6EIb.js.map} +1 -1
- prefect/server/ui-v2/assets/{create-BycfZHGQ.js → create-MoiIE9Ms.js} +2 -2
- prefect/server/ui-v2/assets/{create-BycfZHGQ.js.map → create-MoiIE9Ms.js.map} +1 -1
- prefect/server/ui-v2/assets/data-table-CPkppyg6.js +2 -0
- prefect/server/ui-v2/assets/data-table-CPkppyg6.js.map +1 -0
- prefect/server/ui-v2/assets/delete-confirmation-dialog-CwDK_2QS.js +2 -0
- prefect/server/ui-v2/assets/{delete-confirmation-dialog-DHkm2p8m.js.map → delete-confirmation-dialog-CwDK_2QS.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment-action-header-D5GOooPm.js → deployment-action-header-Vp9YsCJO.js} +2 -2
- prefect/server/ui-v2/assets/{deployment-action-header-D5GOooPm.js.map → deployment-action-header-Vp9YsCJO.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment-form-wfg6HeAJ.js → deployment-form-CJcg_6DJ.js} +3 -3
- prefect/server/ui-v2/assets/{deployment-form-wfg6HeAJ.js.map → deployment-form-CJcg_6DJ.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment-links-6iugOgDh.js → deployment-links-CIkJIuHh.js} +2 -2
- prefect/server/ui-v2/assets/{deployment-links-6iugOgDh.js.map → deployment-links-CIkJIuHh.js.map} +1 -1
- prefect/server/ui-v2/assets/deployment._id-C6XrGMp_.js +2 -0
- prefect/server/ui-v2/assets/{deployment._id-Ci9zge5n.js.map → deployment._id-C6XrGMp_.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment._id-whsGcHdu.js → deployment._id-CWgTYmTG.js} +2 -2
- prefect/server/ui-v2/assets/{deployment._id-whsGcHdu.js.map → deployment._id-CWgTYmTG.js.map} +1 -1
- prefect/server/ui-v2/assets/deployment_._id.duplicate-Bg0s0ZJn.js +2 -0
- prefect/server/ui-v2/assets/{deployment_._id.duplicate-D9ZWkh8H.js.map → deployment_._id.duplicate-Bg0s0ZJn.js.map} +1 -1
- prefect/server/ui-v2/assets/deployment_._id.edit-CnoB0UeG.js +2 -0
- prefect/server/ui-v2/assets/{deployment_._id.edit-CS7sObzC.js.map → deployment_._id.edit-CnoB0UeG.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment_._id.run-g7SZuDFi.js → deployment_._id.run-BqPK6rTB.js} +2 -2
- prefect/server/ui-v2/assets/{deployment_._id.run-g7SZuDFi.js.map → deployment_._id.run-BqPK6rTB.js.map} +1 -1
- prefect/server/ui-v2/assets/{dropdown-menu-0atiOSFo.js → dropdown-menu-D7Gwbd15.js} +2 -2
- prefect/server/ui-v2/assets/{dropdown-menu-0atiOSFo.js.map → dropdown-menu-D7Gwbd15.js.map} +1 -1
- prefect/server/ui-v2/assets/{event-resource-display-DHiAb1Up.js → event-resource-display-CDRgVKd4.js} +2 -2
- prefect/server/ui-v2/assets/{event-resource-display-DHiAb1Up.js.map → event-resource-display-CDRgVKd4.js.map} +1 -1
- prefect/server/ui-v2/assets/event._eventDate._eventId-C73GMDkK.js +2 -0
- prefect/server/ui-v2/assets/{event._eventDate._eventId-D7Twzb22.js.map → event._eventDate._eventId-C73GMDkK.js.map} +1 -1
- prefect/server/ui-v2/assets/{flow-run-graph-BhzuSJLm.js → flow-run-graph-ckiE3mA9.js} +2 -2
- prefect/server/ui-v2/assets/{flow-run-graph-BhzuSJLm.js.map → flow-run-graph-ckiE3mA9.js.map} +1 -1
- prefect/server/ui-v2/assets/{flow-run._id-CqpH6bvx.js → flow-run._id-BukrNCAq.js} +2 -2
- prefect/server/ui-v2/assets/{flow-run._id-CqpH6bvx.js.map → flow-run._id-BukrNCAq.js.map} +1 -1
- prefect/server/ui-v2/assets/{flow-run._id-lIIQBD7H.js → flow-run._id-CtI5VZ2M.js} +2 -2
- prefect/server/ui-v2/assets/{flow-run._id-lIIQBD7H.js.map → flow-run._id-CtI5VZ2M.js.map} +1 -1
- prefect/server/ui-v2/assets/flow-run._id-s1UJuakA.js +4 -0
- prefect/server/ui-v2/assets/{flow-run._id-RLy2kBh0.js.map → flow-run._id-s1UJuakA.js.map} +1 -1
- prefect/server/ui-v2/assets/{flow-runs-pagination-BATUweRV.js → flow-runs-pagination-SLbYtvaR.js} +2 -2
- prefect/server/ui-v2/assets/{flow-runs-pagination-BATUweRV.js.map → flow-runs-pagination-SLbYtvaR.js.map} +1 -1
- prefect/server/ui-v2/assets/flow._id-CZ5P0v4N.js +2 -0
- prefect/server/ui-v2/assets/{flow._id-BdQGWPKP.js.map → flow._id-CZ5P0v4N.js.map} +1 -1
- prefect/server/ui-v2/assets/{form-DLrbC7rV.js → form-mws4law8.js} +2 -2
- prefect/server/ui-v2/assets/{form-DLrbC7rV.js.map → form-mws4law8.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-BTAWyeXv.js → header-Bes1LmY7.js} +2 -2
- prefect/server/ui-v2/assets/{header-BTAWyeXv.js.map → header-Bes1LmY7.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-ChFAx5uR.js → header-Bj_zBR-a.js} +2 -2
- prefect/server/ui-v2/assets/{header-ChFAx5uR.js.map → header-Bj_zBR-a.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-CyQqOj1w.js → header-CPxTHSvz.js} +2 -2
- prefect/server/ui-v2/assets/{header-CyQqOj1w.js.map → header-CPxTHSvz.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-m48E4KcG.js → index-B8vo2Lrg.js} +5 -5
- prefect/server/ui-v2/assets/{index-m48E4KcG.js.map → index-B8vo2Lrg.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-D5RT-SAp.js → index-BBeh-3Nh.js} +2 -2
- prefect/server/ui-v2/assets/{index-D5RT-SAp.js.map → index-BBeh-3Nh.js.map} +1 -1
- prefect/server/ui-v2/assets/index-BLnEvHia.js +2 -0
- prefect/server/ui-v2/assets/{index-7i4X9TeK.js.map → index-BLnEvHia.js.map} +1 -1
- prefect/server/ui-v2/assets/index-BpKoubXu.js +2 -0
- prefect/server/ui-v2/assets/index-BpKoubXu.js.map +1 -0
- prefect/server/ui-v2/assets/index-By6YGqR3.js +2 -0
- prefect/server/ui-v2/assets/index-By6YGqR3.js.map +1 -0
- prefect/server/ui-v2/assets/index-CEi3BlKI.js +2 -0
- prefect/server/ui-v2/assets/index-CEi3BlKI.js.map +1 -0
- prefect/server/ui-v2/assets/{index-BaWDC4da.js → index-CS-zxv7Z.js} +2 -2
- prefect/server/ui-v2/assets/{index-BaWDC4da.js.map → index-CS-zxv7Z.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-kP_I5Qfd.js → index-CToHKh4q.js} +2 -2
- prefect/server/ui-v2/assets/{index-kP_I5Qfd.js.map → index-CToHKh4q.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-CKGj5lSu.js → index-CUVvZndW.js} +2 -2
- prefect/server/ui-v2/assets/{index-CKGj5lSu.js.map → index-CUVvZndW.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-CxUfZRkN.js → index-CYVn-I3i.js} +2 -2
- prefect/server/ui-v2/assets/{index-CxUfZRkN.js.map → index-CYVn-I3i.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-CnlN-VC_.js → index-Cun0JN4t.js} +2 -2
- prefect/server/ui-v2/assets/{index-CnlN-VC_.js.map → index-Cun0JN4t.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-BwCLKpNb.js → index-D6ynV6U7.js} +2 -2
- prefect/server/ui-v2/assets/{index-BwCLKpNb.js.map → index-D6ynV6U7.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-CHf6xi9j.js → index-DdNUJLRW.js} +2 -2
- prefect/server/ui-v2/assets/{index-CHf6xi9j.js.map → index-DdNUJLRW.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-CQnWiUE5.js → index-DlHOXQhu.js} +2 -2
- prefect/server/ui-v2/assets/{index-CQnWiUE5.js.map → index-DlHOXQhu.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-Eqdr6Ff7.js → index-DyVw8YE8.js} +2 -2
- prefect/server/ui-v2/assets/{index-Eqdr6Ff7.js.map → index-DyVw8YE8.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-Btb_-PDp.js → index-DzRz7D2P.js} +2 -2
- prefect/server/ui-v2/assets/{index-Btb_-PDp.js.map → index-DzRz7D2P.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-DQGif3jm.js → index-DzUcVNZg.js} +2 -2
- prefect/server/ui-v2/assets/{index-DQGif3jm.js.map → index-DzUcVNZg.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-DNh9ZBy4.js → index-IBvMMs6S.js} +2 -2
- prefect/server/ui-v2/assets/{index-DNh9ZBy4.js.map → index-IBvMMs6S.js.map} +1 -1
- prefect/server/ui-v2/assets/index-_kpA__te.js +2 -0
- prefect/server/ui-v2/assets/{index-CiSFHkhI.js.map → index-_kpA__te.js.map} +1 -1
- prefect/server/ui-v2/assets/index-m9O-nIOl.css +1 -0
- prefect/server/ui-v2/assets/{index-lyQav_XM.js → index-wOvyf10b.js} +2 -2
- prefect/server/ui-v2/assets/{index-lyQav_XM.js.map → index-wOvyf10b.js.map} +1 -1
- prefect/server/ui-v2/assets/{json-input-Ba-BeBcw.js → json-input-Ce-HlRqa.js} +2 -2
- prefect/server/ui-v2/assets/{json-input-Ba-BeBcw.js.map → json-input-Ce-HlRqa.js.map} +1 -1
- prefect/server/ui-v2/assets/{key-value-DkSKn6jE.js → key-value-XHEZOtZX.js} +2 -2
- prefect/server/ui-v2/assets/{key-value-DkSKn6jE.js.map → key-value-XHEZOtZX.js.map} +1 -1
- prefect/server/ui-v2/assets/{key._key-Cjx57ymg.js → key._key-LpsMf3zD.js} +2 -2
- prefect/server/ui-v2/assets/{key._key-Cjx57ymg.js.map → key._key-LpsMf3zD.js.map} +1 -1
- prefect/server/ui-v2/assets/{lazy-markdown-Du2Xu3Yp.js → lazy-markdown-1Hz0xzca.js} +2 -2
- prefect/server/ui-v2/assets/{lazy-markdown-Du2Xu3Yp.js.map → lazy-markdown-1Hz0xzca.js.map} +1 -1
- prefect/server/ui-v2/assets/{login-DxMF9Jvj.js → login-D5uepl9L.js} +2 -2
- prefect/server/ui-v2/assets/{login-DxMF9Jvj.js.map → login-D5uepl9L.js.map} +1 -1
- prefect/server/ui-v2/assets/{markdown-input-DPi8zyRr.js → markdown-input-CG6M9zD0.js} +2 -2
- prefect/server/ui-v2/assets/{markdown-input-DPi8zyRr.js.map → markdown-input-CG6M9zD0.js.map} +1 -1
- prefect/server/ui-v2/assets/python-example-snippet-DRHcUlCX.js +3 -0
- prefect/server/ui-v2/assets/{python-example-snippet-DfCFYPN_.js.map → python-example-snippet-DRHcUlCX.js.map} +1 -1
- prefect/server/ui-v2/assets/{python-input-mr6GD840.js → python-input-BsUS8fw1.js} +2 -2
- prefect/server/ui-v2/assets/{python-input-mr6GD840.js.map → python-input-BsUS8fw1.js.map} +1 -1
- prefect/server/ui-v2/assets/{radio-group-Co3cN0Kv.js → radio-group-BUsmwdrt.js} +2 -2
- prefect/server/ui-v2/assets/{radio-group-Co3cN0Kv.js.map → radio-group-BUsmwdrt.js.map} +1 -1
- prefect/server/ui-v2/assets/{route-error-state-DnBaNT2T.js → route-error-state-BFBpiIhD.js} +2 -2
- prefect/server/ui-v2/assets/{route-error-state-DnBaNT2T.js.map → route-error-state-BFBpiIhD.js.map} +1 -1
- prefect/server/ui-v2/assets/{schema-form-CWDHSME9.js → schema-form-BwTmkvJk.js} +2 -2
- prefect/server/ui-v2/assets/schema-form-BwTmkvJk.js.map +1 -0
- prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-BSWlW_aQ.js → schema-form-input-string-format-datetime-nrb3g-JJ.js} +4 -4
- prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-BSWlW_aQ.js.map → schema-form-input-string-format-datetime-nrb3g-JJ.js.map} +1 -1
- prefect/server/ui-v2/assets/{settings-DU5y6tJE.js → settings-CUBtK5aW.js} +2 -2
- prefect/server/ui-v2/assets/{settings-DU5y6tJE.js.map → settings-CUBtK5aW.js.map} +1 -1
- prefect/server/ui-v2/assets/{sort-filter-DpuWNkQo.js → sort-filter-Cv8zAXMp.js} +2 -2
- prefect/server/ui-v2/assets/{sort-filter-DpuWNkQo.js.map → sort-filter-Cv8zAXMp.js.map} +1 -1
- prefect/server/ui-v2/assets/{table-bBL6C0ZK.js → table-BBNGfPra.js} +2 -2
- prefect/server/ui-v2/assets/{table-bBL6C0ZK.js.map → table-BBNGfPra.js.map} +1 -1
- prefect/server/ui-v2/assets/{tags-input-BLPMVWpZ.js → tags-input-DHrnkwjQ.js} +2 -2
- prefect/server/ui-v2/assets/{tags-input-BLPMVWpZ.js.map → tags-input-DHrnkwjQ.js.map} +1 -1
- prefect/server/ui-v2/assets/task-run-concurrency-limits-reset-dialog-Z8-yFZ2_.js +2 -0
- prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-S69sih55.js.map → task-run-concurrency-limits-reset-dialog-Z8-yFZ2_.js.map} +1 -1
- prefect/server/ui-v2/assets/{task-run._id-Dl3Azs8t.js → task-run._id-BY58gqs2.js} +2 -2
- prefect/server/ui-v2/assets/{task-run._id-Dl3Azs8t.js.map → task-run._id-BY58gqs2.js.map} +1 -1
- prefect/server/ui-v2/assets/{task-run._id-B_tIDm4K.js → task-run._id-u73Jxfqw.js} +3 -3
- prefect/server/ui-v2/assets/{task-run._id-B_tIDm4K.js.map → task-run._id-u73Jxfqw.js.map} +1 -1
- prefect/server/ui-v2/assets/task-runs-pagination-DUy3147A.js +2 -0
- prefect/server/ui-v2/assets/{task-runs-pagination-VdR-LO4r.js.map → task-runs-pagination-DUy3147A.js.map} +1 -1
- prefect/server/ui-v2/assets/{textarea-B3_TtPRi.js → textarea-DUhh6-kq.js} +2 -2
- prefect/server/ui-v2/assets/{textarea-B3_TtPRi.js.map → textarea-DUhh6-kq.js.map} +1 -1
- prefect/server/ui-v2/assets/timezone-select-D4Q6VBtD.js +2 -0
- prefect/server/ui-v2/assets/{timezone-select-BuPYznge.js.map → timezone-select-D4Q6VBtD.js.map} +1 -1
- prefect/server/ui-v2/assets/{toggle-group-Cn07UIim.js → toggle-group-7WUJn2Tx.js} +2 -2
- prefect/server/ui-v2/assets/{toggle-group-Cn07UIim.js.map → toggle-group-7WUJn2Tx.js.map} +1 -1
- prefect/server/ui-v2/assets/use-delete-automation-confirmation-dialog-D4AD5Ndf.js +2 -0
- prefect/server/ui-v2/assets/{use-delete-automation-confirmation-dialog-DpdsLH4t.js.map → use-delete-automation-confirmation-dialog-D4AD5Ndf.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-Cq5nGhzr.js → use-delete-block-document-confirmation-dialog-DnwWEGUY.js} +2 -2
- prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-Cq5nGhzr.js.map → use-delete-block-document-confirmation-dialog-DnwWEGUY.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-DmQSWBTu.js → use-flow-runs-selected-rows-C-tehPRB.js} +2 -2
- prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-DmQSWBTu.js.map → use-flow-runs-selected-rows-C-tehPRB.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-DTwcWiqW.js → use-get-artifacts-flow-task-runs-DRWRrmrb.js} +2 -2
- prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-DTwcWiqW.js.map → use-get-artifacts-flow-task-runs-DRWRrmrb.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-quick-run-CPempwLh.js → use-quick-run-B4Xj-YQQ.js} +2 -2
- prefect/server/ui-v2/assets/{use-quick-run-CPempwLh.js.map → use-quick-run-B4Xj-YQQ.js.map} +1 -1
- prefect/server/ui-v2/assets/use-state-favicon-au2TZdMV.js +2 -0
- prefect/server/ui-v2/assets/{use-state-favicon-M09DmrNy.js.map → use-state-favicon-au2TZdMV.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-stepper-CDucnvzp.js → use-stepper-DyIb3vlq.js} +2 -2
- prefect/server/ui-v2/assets/{use-stepper-CDucnvzp.js.map → use-stepper-DyIb3vlq.js.map} +1 -1
- prefect/server/ui-v2/assets/{utilities-BRCNRcQl.js → utilities-D9Y2wo66.js} +2 -2
- prefect/server/ui-v2/assets/{utilities-BRCNRcQl.js.map → utilities-D9Y2wo66.js.map} +1 -1
- prefect/server/ui-v2/assets/vendor-recharts-BvvJP9Po.js +34 -0
- prefect/server/ui-v2/assets/vendor-recharts-BvvJP9Po.js.map +1 -0
- prefect/server/ui-v2/assets/{work-pool-filter-C2tpSS-w.js → work-pool-filter-CSOATj2D.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool-filter-C2tpSS-w.js.map → work-pool-filter-CSOATj2D.js.map} +1 -1
- prefect/server/ui-v2/assets/work-pool-queue-toggle-Dh7B1zMo.js +2 -0
- prefect/server/ui-v2/assets/{work-pool-queue-toggle-BQ9b-Wxy.js.map → work-pool-queue-toggle-Dh7B1zMo.js.map} +1 -1
- prefect/server/ui-v2/assets/work-pool._workPoolName-B_NFWXKS.js +2 -0
- prefect/server/ui-v2/assets/{work-pool._workPoolName-C_LiL3SE.js.map → work-pool._workPoolName-B_NFWXKS.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-DBHlrVVx.js → work-pool_._workPoolName.edit-Cyzn8g-S.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-DBHlrVVx.js.map → work-pool_._workPoolName.edit-Cyzn8g-S.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-DkITxJOP.js → work-pool_._workPoolName.queue._workQueueName-DQzqQWPT.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-DkITxJOP.js.map → work-pool_._workPoolName.queue._workQueueName-DQzqQWPT.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-queue-icon-text-D4BWBVDN.js → work-queue-icon-text-BOpcJ8YU.js} +2 -2
- prefect/server/ui-v2/assets/{work-queue-icon-text-D4BWBVDN.js.map → work-queue-icon-text-BOpcJ8YU.js.map} +1 -1
- prefect/server/ui-v2/index.html +3 -3
- {prefect-3.6.15.dist-info → prefect-3.6.16.dev3.dist-info}/METADATA +2 -1
- {prefect-3.6.15.dist-info → prefect-3.6.16.dev3.dist-info}/RECORD +223 -211
- prefect/server/ui-v2/assets/artifact._id-BFdf1WUA.js +0 -2
- prefect/server/ui-v2/assets/artifact._id-BFdf1WUA.js.map +0 -1
- prefect/server/ui-v2/assets/automation._id-Dn7jABys.js +0 -2
- prefect/server/ui-v2/assets/block-type-logo-Cbpfxded.js +0 -2
- prefect/server/ui-v2/assets/block-type-logo-Cbpfxded.js.map +0 -1
- prefect/server/ui-v2/assets/catalog_._slug-Bl2J2oI3.js +0 -2
- prefect/server/ui-v2/assets/create-D--LHaji.js +0 -2
- prefect/server/ui-v2/assets/data-table-rlbkLcrY.js +0 -2
- prefect/server/ui-v2/assets/data-table-rlbkLcrY.js.map +0 -1
- prefect/server/ui-v2/assets/delete-confirmation-dialog-DHkm2p8m.js +0 -2
- prefect/server/ui-v2/assets/deployment._id-Ci9zge5n.js +0 -2
- prefect/server/ui-v2/assets/deployment_._id.duplicate-D9ZWkh8H.js +0 -2
- prefect/server/ui-v2/assets/deployment_._id.edit-CS7sObzC.js +0 -2
- prefect/server/ui-v2/assets/event._eventDate._eventId-D7Twzb22.js +0 -2
- prefect/server/ui-v2/assets/flow-run._id-RLy2kBh0.js +0 -4
- prefect/server/ui-v2/assets/flow._id-BdQGWPKP.js +0 -2
- prefect/server/ui-v2/assets/index-7i4X9TeK.js +0 -2
- prefect/server/ui-v2/assets/index-BkiGTHwU.js +0 -2
- prefect/server/ui-v2/assets/index-BkiGTHwU.js.map +0 -1
- prefect/server/ui-v2/assets/index-COouj_0-.css +0 -1
- prefect/server/ui-v2/assets/index-CiSFHkhI.js +0 -2
- prefect/server/ui-v2/assets/index-DATPYZfT.js +0 -2
- prefect/server/ui-v2/assets/index-DATPYZfT.js.map +0 -1
- prefect/server/ui-v2/assets/index-VH4TnZ4e.js +0 -2
- prefect/server/ui-v2/assets/index-VH4TnZ4e.js.map +0 -1
- prefect/server/ui-v2/assets/python-example-snippet-DfCFYPN_.js +0 -3
- prefect/server/ui-v2/assets/schema-form-CWDHSME9.js.map +0 -1
- prefect/server/ui-v2/assets/task-run-concurrency-limits-reset-dialog-S69sih55.js +0 -2
- prefect/server/ui-v2/assets/task-runs-pagination-VdR-LO4r.js +0 -2
- prefect/server/ui-v2/assets/timezone-select-BuPYznge.js +0 -2
- prefect/server/ui-v2/assets/use-delete-automation-confirmation-dialog-DpdsLH4t.js +0 -2
- prefect/server/ui-v2/assets/use-state-favicon-M09DmrNy.js +0 -2
- prefect/server/ui-v2/assets/vendor-recharts-BAN776s_.js +0 -34
- prefect/server/ui-v2/assets/vendor-recharts-BAN776s_.js.map +0 -1
- prefect/server/ui-v2/assets/work-pool-queue-toggle-BQ9b-Wxy.js +0 -2
- prefect/server/ui-v2/assets/work-pool._workPoolName-C_LiL3SE.js +0 -2
- {prefect-3.6.15.dist-info → prefect-3.6.16.dev3.dist-info}/WHEEL +0 -0
- {prefect-3.6.15.dist-info → prefect-3.6.16.dev3.dist-info}/entry_points.txt +0 -0
- {prefect-3.6.15.dist-info → prefect-3.6.16.dev3.dist-info}/licenses/LICENSE +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-7i4X9TeK.js","sources":["../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/actions-cell.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/active-cell.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/global-concurrency-limits-data-table.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-empty-state/global-concurrency-limits-empty-state.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-header/global-concurrency-limits-header.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-create-or-edit-dialog/use-create-or-edit-global-concurrency-limit-form.ts","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-create-or-edit-dialog/global-concurrency-limits-create-or-edit-dialog.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-delete-dialog/global-concurrency-limits-delete-dialog.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-view/global-conccurency-limits-dialog.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-view/index.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/active-task-runs-cell.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/tag-cell.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/task-run-concurrency-limits-data-table.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-empty-state/task-run-concurrency-limits-empty-state.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-header/task-run-concurrency-limits-header.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-create-dialog/task-run-concurrency-limits-create-dialog.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-view/task-run-concurrency-limit-dialog.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-view/index.tsx","../../src/components/concurrency/concurrency-limits-tabs.tsx","../../src/components/concurrency/concurrency-limits-page.tsx","../../src/routes/concurrency-limits/index.tsx?tsr-split=component"],"sourcesContent":["import type { CellContext } from \"@tanstack/react-table\";\nimport { toast } from \"sonner\";\nimport type { GlobalConcurrencyLimit } from \"@/api/global-concurrency-limits\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype ActionsCellProps = CellContext<GlobalConcurrencyLimit, unknown> & {\n\tonEditRow: (row: GlobalConcurrencyLimit) => void;\n\tonDeleteRow: (row: GlobalConcurrencyLimit) => void;\n};\n\nexport const ActionsCell = ({\n\tonEditRow,\n\tonDeleteRow,\n\t...props\n}: ActionsCellProps) => {\n\tconst handleCopyId = (id: string) => {\n\t\tvoid navigator.clipboard.writeText(id);\n\t\ttoast.success(\"ID copied\");\n\t};\n\n\tconst row = props.row.original;\n\n\treturn (\n\t\t<DropdownMenu>\n\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t<Button variant=\"outline\" className=\"size-8 p-0\">\n\t\t\t\t\t<span className=\"sr-only\">Open menu</span>\n\t\t\t\t\t<Icon id=\"MoreVertical\" className=\"size-4\" />\n\t\t\t\t</Button>\n\t\t\t</DropdownMenuTrigger>\n\t\t\t<DropdownMenuContent align=\"end\">\n\t\t\t\t<DropdownMenuLabel>Actions</DropdownMenuLabel>\n\t\t\t\t<DropdownMenuItem onClick={() => handleCopyId(row.id)}>\n\t\t\t\t\tCopy ID\n\t\t\t\t</DropdownMenuItem>\n\t\t\t\t<DropdownMenuItem onClick={() => onDeleteRow(row)}>\n\t\t\t\t\tDelete\n\t\t\t\t</DropdownMenuItem>\n\t\t\t\t<DropdownMenuItem onClick={() => onEditRow(row)}>Edit</DropdownMenuItem>\n\t\t\t</DropdownMenuContent>\n\t\t</DropdownMenu>\n\t);\n};\n","import type { CellContext } from \"@tanstack/react-table\";\nimport { toast } from \"sonner\";\nimport {\n\ttype GlobalConcurrencyLimit,\n\tuseUpdateGlobalConcurrencyLimit,\n} from \"@/api/global-concurrency-limits\";\nimport { Switch } from \"@/components/ui/switch\";\n\nexport const ActiveCell = (\n\tprops: CellContext<GlobalConcurrencyLimit, boolean>,\n) => {\n\tconst { updateGlobalConcurrencyLimit } = useUpdateGlobalConcurrencyLimit();\n\n\tconst handleCheckedChange = (checked: boolean, id: string) => {\n\t\tupdateGlobalConcurrencyLimit(\n\t\t\t{\n\t\t\t\tid_or_name: id,\n\t\t\t\tactive: checked,\n\t\t\t},\n\t\t\t{\n\t\t\t\tonSuccess: () => {\n\t\t\t\t\ttoast.success(\"Concurrency limit updated\");\n\t\t\t\t},\n\t\t\t\tonError: (error) => {\n\t\t\t\t\tconst message =\n\t\t\t\t\t\terror.message || \"Unknown error while updating active field.\";\n\t\t\t\t\tconsole.error(message);\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\t};\n\n\tconst rowActive = props.getValue();\n\tconst rowId = props.row.original.id;\n\n\treturn (\n\t\t<Switch\n\t\t\taria-label=\"toggle active\"\n\t\t\tchecked={rowActive}\n\t\t\tonCheckedChange={(checked) => handleCheckedChange(checked, rowId)}\n\t\t/>\n\t);\n};\n","import { getRouteApi } from \"@tanstack/react-router\";\nimport {\n\tcreateColumnHelper,\n\tgetCoreRowModel,\n\tgetPaginationRowModel,\n\tuseReactTable,\n} from \"@tanstack/react-table\";\nimport { useDeferredValue, useMemo } from \"react\";\nimport type { GlobalConcurrencyLimit } from \"@/api/global-concurrency-limits\";\nimport { DataTable } from \"@/components/ui/data-table\";\nimport { SearchInput } from \"@/components/ui/input\";\nimport { ActionsCell } from \"./actions-cell\";\nimport { ActiveCell } from \"./active-cell\";\n\nconst routeApi = getRouteApi(\"/concurrency-limits/\");\n\nconst columnHelper = createColumnHelper<GlobalConcurrencyLimit>();\n\nconst createColumns = ({\n\tonEditRow,\n\tonDeleteRow,\n}: {\n\tonEditRow: (row: GlobalConcurrencyLimit) => void;\n\tonDeleteRow: (row: GlobalConcurrencyLimit) => void;\n}) => [\n\tcolumnHelper.accessor(\"name\", {\n\t\theader: \"Name\",\n\t}),\n\tcolumnHelper.accessor(\"limit\", {\n\t\theader: \"Limit\",\n\t}),\n\tcolumnHelper.accessor(\"active_slots\", {\n\t\theader: \"Active Slots\",\n\t}),\n\tcolumnHelper.accessor(\"slot_decay_per_second\", {\n\t\theader: \"Slots Decay Per Second\",\n\t}),\n\tcolumnHelper.accessor(\"active\", {\n\t\theader: \"Active\",\n\t\tcell: ActiveCell,\n\t}),\n\tcolumnHelper.display({\n\t\tid: \"actions\",\n\t\tcell: (props) => (\n\t\t\t<div className=\"flex flex-row justify-end\">\n\t\t\t\t<ActionsCell\n\t\t\t\t\t{...props}\n\t\t\t\t\tonEditRow={onEditRow}\n\t\t\t\t\tonDeleteRow={onDeleteRow}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t),\n\t}),\n];\n\ntype GlobalConcurrencyLimitsDataTableProps = {\n\tdata: Array<GlobalConcurrencyLimit>;\n\tonEditRow: (row: GlobalConcurrencyLimit) => void;\n\tonDeleteRow: (row: GlobalConcurrencyLimit) => void;\n};\n\nexport const GlobalConcurrencyLimitsDataTable = ({\n\tdata,\n\tonEditRow,\n\tonDeleteRow,\n}: GlobalConcurrencyLimitsDataTableProps) => {\n\tconst navigate = routeApi.useNavigate();\n\tconst { search } = routeApi.useSearch();\n\tconst deferredSearch = useDeferredValue(search ?? \"\");\n\n\tconst filteredData = useMemo(() => {\n\t\treturn data.filter((row) =>\n\t\t\trow.name.toLowerCase().includes(deferredSearch.toLowerCase()),\n\t\t);\n\t}, [data, deferredSearch]);\n\n\treturn (\n\t\t<Table\n\t\t\tdata={filteredData}\n\t\t\tonDeleteRow={onDeleteRow}\n\t\t\tonEditRow={onEditRow}\n\t\t\tsearchValue={search}\n\t\t\tonSearchChange={(value) =>\n\t\t\t\tvoid navigate({\n\t\t\t\t\tto: \".\",\n\t\t\t\t\tsearch: (prev) => ({ ...prev, search: value }),\n\t\t\t\t})\n\t\t\t}\n\t\t/>\n\t);\n};\n\ntype TableProps = {\n\tdata: Array<GlobalConcurrencyLimit>;\n\tonDeleteRow: (row: GlobalConcurrencyLimit) => void;\n\tonEditRow: (row: GlobalConcurrencyLimit) => void;\n\tonSearchChange: (value: string) => void;\n\tsearchValue: string | undefined;\n};\n\nexport function Table({\n\tdata,\n\tonDeleteRow,\n\tonEditRow,\n\tonSearchChange,\n\tsearchValue,\n}: TableProps) {\n\tconst table = useReactTable({\n\t\tdata,\n\t\tcolumns: createColumns({ onDeleteRow, onEditRow }),\n\t\tgetCoreRowModel: getCoreRowModel(),\n\t\tgetPaginationRowModel: getPaginationRowModel(), //load client-side pagination code\n\t});\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<SearchInput\n\t\t\t\tclassName=\"max-w-72\"\n\t\t\t\tplaceholder=\"Search global concurrency limit\"\n\t\t\t\tvalue={searchValue}\n\t\t\t\tonChange={(e) => onSearchChange(e.target.value)}\n\t\t\t/>\n\t\t\t<DataTable table={table} />\n\t\t</div>\n\t);\n}\n","import { Button } from \"@/components/ui/button\";\nimport { DocsLink } from \"@/components/ui/docs-link\";\nimport {\n\tEmptyState,\n\tEmptyStateActions,\n\tEmptyStateDescription,\n\tEmptyStateIcon,\n\tEmptyStateTitle,\n} from \"@/components/ui/empty-state\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype GlobalConcurrencyLimitsEmptyStateProps = {\n\tonAdd: () => void;\n};\nexport const GlobalConcurrencyLimitsEmptyState = ({\n\tonAdd,\n}: GlobalConcurrencyLimitsEmptyStateProps) => (\n\t<EmptyState>\n\t\t<EmptyStateIcon id=\"AlignVerticalJustifyStart\" />\n\t\t<EmptyStateTitle>Add a concurrency limit</EmptyStateTitle>\n\t\t<EmptyStateDescription>\n\t\t\tGlobal concurrency limits can be applied to flow runs, task runs and any\n\t\t\toperation where you want to control concurrency.\n\t\t</EmptyStateDescription>\n\t\t<EmptyStateActions>\n\t\t\t<Button onClick={onAdd}>\n\t\t\t\tAdd Concurrency Limit <Icon id=\"Plus\" className=\"size-4 ml-2\" />\n\t\t\t</Button>\n\t\t\t<DocsLink id=\"global-concurrency-guide\" />\n\t\t</EmptyStateActions>\n\t</EmptyState>\n);\n","import {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbList,\n} from \"@/components/ui/breadcrumb\";\nimport { Button } from \"@/components/ui/button\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype GlobalConcurrencyLimitsHeaderProps = {\n\tonAdd: () => void;\n};\n\nexport const GlobalConcurrencyLimitsHeader = ({\n\tonAdd,\n}: GlobalConcurrencyLimitsHeaderProps) => {\n\treturn (\n\t\t<div className=\"flex items-center gap-2\">\n\t\t\t<Breadcrumb>\n\t\t\t\t<BreadcrumbList>\n\t\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t\tGlobal Concurrency Limits\n\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t</BreadcrumbList>\n\t\t\t</Breadcrumb>\n\t\t\t<Button\n\t\t\t\tonClick={onAdd}\n\t\t\t\tsize=\"icon\"\n\t\t\t\tclassName=\"size-7\"\n\t\t\t\tvariant=\"outline\"\n\t\t\t\taria-label=\"add global concurrency limit\"\n\t\t\t>\n\t\t\t\t<Icon id=\"Plus\" className=\"size-4\" />\n\t\t\t</Button>\n\t\t</div>\n\t);\n};\n","import { zodResolver } from \"@hookform/resolvers/zod\";\nimport { useEffect } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport {\n\ttype GlobalConcurrencyLimit,\n\tuseCreateGlobalConcurrencyLimit,\n\tuseUpdateGlobalConcurrencyLimit,\n} from \"@/api/global-concurrency-limits\";\n\nconst formSchema = z.object({\n\tactive: z.boolean().default(true),\n\t/** Coerce to solve common issue of transforming a string number to a number type */\n\tdenied_slots: z.number().default(0).or(z.string()).pipe(z.coerce.number()),\n\t/** Coerce to solve common issue of transforming a string number to a number type */\n\tlimit: z.number().default(0).or(z.string()).pipe(z.coerce.number()),\n\tname: z\n\t\t.string()\n\t\t.min(2, { message: \"Name must be at least 2 characters\" })\n\t\t.default(\"\"),\n\t/** Coerce to solve common issue of transforming a string number to a number type */\n\tslot_decay_per_second: z\n\t\t.number()\n\t\t.default(0)\n\t\t.or(z.string())\n\t\t.pipe(z.coerce.number()),\n\t/** Additional fields post creation. Coerce to solve common issue of transforming a string number to a number type */\n\tactive_slots: z.number().default(0).or(z.string()).pipe(z.coerce.number()),\n});\n\nconst DEFAULT_VALUES = {\n\tactive: true,\n\tname: \"\",\n\tlimit: 0,\n\tslot_decay_per_second: 0,\n\tdenied_slots: 0,\n\tactive_slots: 0,\n} as const;\n\ntype UseCreateOrEditGlobalConcurrencyLimitFormOptions = {\n\t/** Limit to edit. Pass undefined if creating a new limit */\n\tlimitToUpdate: GlobalConcurrencyLimit | undefined;\n\t/** Callback after hitting Save or Update */\n\tonSubmit: () => void;\n};\n\nexport const useCreateOrEditGlobalConcurrencyLimitForm = ({\n\tlimitToUpdate,\n\tonSubmit,\n}: UseCreateOrEditGlobalConcurrencyLimitFormOptions) => {\n\tconst { createGlobalConcurrencyLimit, status: createStatus } =\n\t\tuseCreateGlobalConcurrencyLimit();\n\tconst { updateGlobalConcurrencyLimit, status: updateStatus } =\n\t\tuseUpdateGlobalConcurrencyLimit();\n\n\tconst form = useForm({\n\t\tresolver: zodResolver(formSchema),\n\t\tdefaultValues: DEFAULT_VALUES,\n\t});\n\n\t// Sync form data with limit-to-edit data\n\tuseEffect(() => {\n\t\tif (limitToUpdate) {\n\t\t\tconst { active, name, limit, slot_decay_per_second, active_slots } =\n\t\t\t\tlimitToUpdate;\n\t\t\tform.reset({ active, name, limit, slot_decay_per_second, active_slots });\n\t\t} else {\n\t\t\tform.reset(DEFAULT_VALUES);\n\t\t}\n\t}, [form, limitToUpdate]);\n\n\tconst saveOrUpdate = (values: z.infer<typeof formSchema>) => {\n\t\tconst onSettled = () => {\n\t\t\tform.reset(DEFAULT_VALUES);\n\t\t\tonSubmit();\n\t\t};\n\n\t\tif (limitToUpdate?.id) {\n\t\t\tupdateGlobalConcurrencyLimit(\n\t\t\t\t{\n\t\t\t\t\tid_or_name: limitToUpdate.id,\n\t\t\t\t\t...values,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tonSuccess: () => {\n\t\t\t\t\t\ttoast.success(\"Limit updated\");\n\t\t\t\t\t},\n\t\t\t\t\tonError: (error) => {\n\t\t\t\t\t\tconst message =\n\t\t\t\t\t\t\terror.message || \"Unknown error while updating limit.\";\n\t\t\t\t\t\tform.setError(\"root\", { message });\n\t\t\t\t\t},\n\t\t\t\t\tonSettled,\n\t\t\t\t},\n\t\t\t);\n\t\t} else {\n\t\t\tcreateGlobalConcurrencyLimit(values, {\n\t\t\t\tonSuccess: () => {\n\t\t\t\t\ttoast.success(\"Limit created\");\n\t\t\t\t},\n\t\t\t\tonError: (error) => {\n\t\t\t\t\tconst message =\n\t\t\t\t\t\terror.message || \"Unknown error while creating variable.\";\n\t\t\t\t\tform.setError(\"root\", {\n\t\t\t\t\t\tmessage,\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tonSettled,\n\t\t\t});\n\t\t}\n\t};\n\n\treturn {\n\t\tform,\n\t\tsaveOrUpdate,\n\t\tisLoading: createStatus === \"pending\" || updateStatus === \"pending\",\n\t};\n};\n","import type { GlobalConcurrencyLimit } from \"@/api/global-concurrency-limits\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Switch } from \"@/components/ui/switch\";\n\nimport { useCreateOrEditGlobalConcurrencyLimitForm } from \"./use-create-or-edit-global-concurrency-limit-form\";\n\ntype GlobalConcurrencyLimitsCreateOrEditDialogProps = {\n\tlimitToUpdate?: GlobalConcurrencyLimit;\n\tonOpenChange: (open: boolean) => void;\n\tonSubmit: () => void;\n};\n\nexport const GlobalConcurrencyLimitsCreateOrEditDialog = ({\n\tlimitToUpdate,\n\tonOpenChange,\n\tonSubmit,\n}: GlobalConcurrencyLimitsCreateOrEditDialogProps) => {\n\tconst { form, isLoading, saveOrUpdate } =\n\t\tuseCreateOrEditGlobalConcurrencyLimitForm({\n\t\t\tlimitToUpdate,\n\t\t\tonSubmit,\n\t\t});\n\n\tconst dialogTitle = limitToUpdate\n\t\t? `Update ${limitToUpdate.name}`\n\t\t: \"Add Concurrency Limit\";\n\n\treturn (\n\t\t<Dialog open onOpenChange={onOpenChange}>\n\t\t\t<DialogContent aria-describedby={undefined}>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>{dialogTitle}</DialogTitle>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={(e) => void form.handleSubmit(saveOrUpdate)(e)}\n\t\t\t\t\t\tclassName=\"space-y-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormMessage>{form.formState.errors.root?.message}</FormMessage>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input type=\"text\" autoComplete=\"off\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"limit\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Concurrency Limit</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input type=\"number\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"slot_decay_per_second\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Slot Decay Per Second</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input type=\"number\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{limitToUpdate && (\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"active_slots\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Active Slots</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input type=\"number\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"active\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Active</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"block\"\n\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t\t\t\t<Button variant=\"outline\">Close</Button>\n\t\t\t\t\t\t\t</DialogTrigger>\n\t\t\t\t\t\t\t<Button type=\"submit\" loading={isLoading}>\n\t\t\t\t\t\t\t\t{limitToUpdate ? \"Update\" : \"Save\"}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n","import { toast } from \"sonner\";\nimport {\n\ttype GlobalConcurrencyLimit,\n\tuseDeleteGlobalConcurrencyLimit,\n} from \"@/api/global-concurrency-limits\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\n\ntype GlobalConcurrencyLimitsDeleteDialogProps = {\n\tlimit: GlobalConcurrencyLimit;\n\tonOpenChange: (open: boolean) => void;\n\tonDelete: () => void;\n};\n\nexport const GlobalConcurrencyLimitsDeleteDialog = ({\n\tlimit,\n\tonOpenChange,\n\tonDelete,\n}: GlobalConcurrencyLimitsDeleteDialogProps) => {\n\tconst { deleteGlobalConcurrencyLimit, isPending } =\n\t\tuseDeleteGlobalConcurrencyLimit();\n\n\tconst handleOnClick = (id: string) => {\n\t\tdeleteGlobalConcurrencyLimit(id, {\n\t\t\tonSuccess: () => {\n\t\t\t\ttoast.success(\"Concurrency limit deleted\");\n\t\t\t},\n\t\t\tonError: (error) => {\n\t\t\t\tconst message =\n\t\t\t\t\terror.message || \"Unknown error while deleting concurrency limit.\";\n\t\t\t\tconsole.error(message);\n\t\t\t},\n\t\t\tonSettled: onDelete,\n\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open onOpenChange={onOpenChange}>\n\t\t\t<DialogContent>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Delete Concurrency Limit</DialogTitle>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<DialogDescription>\n\t\t\t\t\tAre you sure you want to delete {limit.name}\n\t\t\t\t</DialogDescription>\n\t\t\t\t<DialogFooter>\n\t\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t\t<Button variant=\"outline\">Close</Button>\n\t\t\t\t\t</DialogTrigger>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\tonClick={() => handleOnClick(limit.id)}\n\t\t\t\t\t\tloading={isPending}\n\t\t\t\t\t>\n\t\t\t\t\t\tDelete\n\t\t\t\t\t</Button>\n\t\t\t\t</DialogFooter>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n","import type { GlobalConcurrencyLimit } from \"@/api/global-concurrency-limits\";\n\nimport { GlobalConcurrencyLimitsCreateOrEditDialog } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-create-or-edit-dialog\";\nimport { GlobalConcurrencyLimitsDeleteDialog } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-delete-dialog\";\n\nexport type DialogState =\n\t| { dialog: null | \"create\"; data: undefined }\n\t| {\n\t\t\tdialog: \"delete\" | \"edit\";\n\t\t\tdata: GlobalConcurrencyLimit;\n\t };\n\nexport const GlobalConcurrencyLimitsDialog = ({\n\topenDialog,\n\tonCloseDialog,\n\tonOpenChange,\n}: {\n\topenDialog: DialogState;\n\tonOpenChange: (open: boolean) => void;\n\tonCloseDialog: () => void;\n}) => {\n\tconst { dialog, data } = openDialog;\n\tswitch (dialog) {\n\t\tcase \"create\":\n\t\t\treturn (\n\t\t\t\t<GlobalConcurrencyLimitsCreateOrEditDialog\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tonSubmit={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"delete\":\n\t\t\treturn (\n\t\t\t\t<GlobalConcurrencyLimitsDeleteDialog\n\t\t\t\t\tlimit={data}\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tonDelete={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"edit\":\n\t\t\treturn (\n\t\t\t\t<GlobalConcurrencyLimitsCreateOrEditDialog\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tlimitToUpdate={data}\n\t\t\t\t\tonSubmit={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tdefault:\n\t\t\treturn null;\n\t}\n};\n","import { useState } from \"react\";\nimport {\n\ttype GlobalConcurrencyLimit,\n\tuseListGlobalConcurrencyLimits,\n} from \"@/api/global-concurrency-limits\";\n\nimport { GlobalConcurrencyLimitsDataTable } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table\";\nimport { GlobalConcurrencyLimitsEmptyState } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-empty-state\";\nimport { GlobalConcurrencyLimitsHeader } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-header\";\n\nimport {\n\ttype DialogState,\n\tGlobalConcurrencyLimitsDialog,\n} from \"./global-conccurency-limits-dialog\";\n\nexport const GlobalConcurrencyLimitsView = () => {\n\tconst [openDialog, setOpenDialog] = useState<DialogState>({\n\t\tdialog: null,\n\t\tdata: undefined,\n\t});\n\n\tconst { data } = useListGlobalConcurrencyLimits();\n\n\tconst handleAddRow = () =>\n\t\tsetOpenDialog({ dialog: \"create\", data: undefined });\n\n\tconst handleEditRow = (data: GlobalConcurrencyLimit) =>\n\t\tsetOpenDialog({ dialog: \"edit\", data });\n\n\tconst handleDeleteRow = (data: GlobalConcurrencyLimit) =>\n\t\tsetOpenDialog({ dialog: \"delete\", data });\n\n\tconst handleCloseDialog = () =>\n\t\tsetOpenDialog({ dialog: null, data: undefined });\n\n\t// Because all modals will be rendered, only control the closing logic\n\tconst handleOpenChange = (open: boolean) => {\n\t\tif (!open) {\n\t\t\thandleCloseDialog();\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<GlobalConcurrencyLimitsHeader onAdd={handleAddRow} />\n\t\t\t{data.length === 0 ? (\n\t\t\t\t<GlobalConcurrencyLimitsEmptyState onAdd={handleAddRow} />\n\t\t\t) : (\n\t\t\t\t<GlobalConcurrencyLimitsDataTable\n\t\t\t\t\tdata={data}\n\t\t\t\t\tonEditRow={handleEditRow}\n\t\t\t\t\tonDeleteRow={handleDeleteRow}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<GlobalConcurrencyLimitsDialog\n\t\t\t\topenDialog={openDialog}\n\t\t\t\tonCloseDialog={handleCloseDialog}\n\t\t\t\tonOpenChange={handleOpenChange}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n","import type { CellContext } from \"@tanstack/react-table\";\nimport type { TaskRunConcurrencyLimit } from \"@/api/task-run-concurrency-limits\";\n\ntype ActiveTaskRunCellsProps = CellContext<\n\tTaskRunConcurrencyLimit,\n\tArray<string>\n>;\n\nexport const ActiveTaskRunCells = (props: ActiveTaskRunCellsProps) => {\n\tconst activeTaskRuns = props.getValue();\n\tconst numActiveTaskRuns = activeTaskRuns.length;\n\tif (numActiveTaskRuns === 0) {\n\t\treturn \"None\";\n\t}\n\treturn numActiveTaskRuns;\n};\n","import { Link } from \"@tanstack/react-router\";\nimport type { CellContext } from \"@tanstack/react-table\";\nimport type { TaskRunConcurrencyLimit } from \"@/api/task-run-concurrency-limits\";\n\ntype TagCellProps = CellContext<TaskRunConcurrencyLimit, string>;\n\nexport const TagCell = (props: TagCellProps) => {\n\tconst tag = props.getValue();\n\tconst id = props.row.original.id;\n\treturn (\n\t\t<Link params={{ id }} to={\"/concurrency-limits/concurrency-limit/$id\"}>\n\t\t\t{tag}\n\t\t</Link>\n\t);\n};\n","import { getRouteApi } from \"@tanstack/react-router\";\nimport {\n\tcreateColumnHelper,\n\tgetCoreRowModel,\n\tgetPaginationRowModel,\n\tuseReactTable,\n} from \"@tanstack/react-table\";\nimport { useDeferredValue, useMemo } from \"react\";\nimport type { TaskRunConcurrencyLimit } from \"@/api/task-run-concurrency-limits\";\nimport { TaskRunConcurrencyLimitsActionsMenu } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-actions-menu\";\nimport { DataTable } from \"@/components/ui/data-table\";\nimport { SearchInput } from \"@/components/ui/input\";\n\nimport { ActiveTaskRunCells } from \"./active-task-runs-cell\";\nimport { TagCell } from \"./tag-cell\";\n\nconst routeApi = getRouteApi(\"/concurrency-limits/\");\nconst columnHelper = createColumnHelper<TaskRunConcurrencyLimit>();\n\nconst createColumns = ({\n\tonDeleteRow,\n\tonResetRow,\n}: {\n\tonDeleteRow: (row: TaskRunConcurrencyLimit) => void;\n\tonResetRow: (row: TaskRunConcurrencyLimit) => void;\n}) => [\n\tcolumnHelper.accessor(\"tag\", {\n\t\theader: \"Tag\",\n\t\tcell: TagCell,\n\t}),\n\tcolumnHelper.accessor(\"concurrency_limit\", {\n\t\theader: \"Slots\",\n\t}),\n\tcolumnHelper.accessor(\"active_slots\", {\n\t\theader: \"Active Task Runs\",\n\t\tcell: ActiveTaskRunCells,\n\t}),\n\tcolumnHelper.display({\n\t\tid: \"actions\",\n\t\tcell: (props) => {\n\t\t\tconst row = props.row.original;\n\t\t\treturn (\n\t\t\t\t<div className=\"flex flex-row justify-end\">\n\t\t\t\t\t<TaskRunConcurrencyLimitsActionsMenu\n\t\t\t\t\t\tid={row.id}\n\t\t\t\t\t\tonDelete={() => onDeleteRow(row)}\n\t\t\t\t\t\tonReset={() => onResetRow(row)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t}),\n];\n\ntype TaskRunConcurrencyLimitsDataTableProps = {\n\tdata: Array<TaskRunConcurrencyLimit>;\n\tonDeleteRow: (row: TaskRunConcurrencyLimit) => void;\n\tonResetRow: (row: TaskRunConcurrencyLimit) => void;\n};\n\nexport const TaskRunConcurrencyLimitsDataTable = ({\n\tdata,\n\tonDeleteRow,\n\tonResetRow,\n}: TaskRunConcurrencyLimitsDataTableProps) => {\n\tconst navigate = routeApi.useNavigate();\n\tconst { search } = routeApi.useSearch();\n\tconst deferredSearch = useDeferredValue(search ?? \"\");\n\n\tconst filteredData = useMemo(() => {\n\t\treturn data.filter((row) =>\n\t\t\trow.tag.toLowerCase().includes(deferredSearch.toLowerCase()),\n\t\t);\n\t}, [data, deferredSearch]);\n\n\treturn (\n\t\t<Table\n\t\t\tdata={filteredData}\n\t\t\tonDeleteRow={onDeleteRow}\n\t\t\tonResetRow={onResetRow}\n\t\t\tsearchValue={search}\n\t\t\tonSearchChange={(value) =>\n\t\t\t\tvoid navigate({\n\t\t\t\t\tto: \".\",\n\t\t\t\t\tsearch: (prev) => ({ ...prev, search: value }),\n\t\t\t\t})\n\t\t\t}\n\t\t/>\n\t);\n};\n\ntype TableProps = {\n\tdata: Array<TaskRunConcurrencyLimit>;\n\tonDeleteRow: (row: TaskRunConcurrencyLimit) => void;\n\tonResetRow: (row: TaskRunConcurrencyLimit) => void;\n\tonSearchChange: (value: string) => void;\n\tsearchValue: string | undefined;\n};\n\nexport function Table({\n\tdata,\n\tonDeleteRow,\n\tonResetRow,\n\tonSearchChange,\n\tsearchValue,\n}: TableProps) {\n\tconst table = useReactTable({\n\t\tdata,\n\t\tcolumns: createColumns({ onDeleteRow, onResetRow }),\n\t\tgetCoreRowModel: getCoreRowModel(),\n\t\tgetPaginationRowModel: getPaginationRowModel(), //load client-side pagination code\n\t});\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<SearchInput\n\t\t\t\tclassName=\"max-w-72\"\n\t\t\t\tplaceholder=\"Search active task limit\"\n\t\t\t\tvalue={searchValue}\n\t\t\t\tonChange={(e) => onSearchChange(e.target.value)}\n\t\t\t/>\n\t\t\t<DataTable table={table} />\n\t\t</div>\n\t);\n}\n","import { Button } from \"@/components/ui/button\";\nimport { DocsLink } from \"@/components/ui/docs-link\";\nimport {\n\tEmptyState,\n\tEmptyStateActions,\n\tEmptyStateDescription,\n\tEmptyStateIcon,\n\tEmptyStateTitle,\n} from \"@/components/ui/empty-state\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype TaskRunConcurrencyLimitsEmptyStateProps = {\n\tonAdd: () => void;\n};\nexport const TaskRunConcurrencyLimitsEmptyState = ({\n\tonAdd,\n}: TaskRunConcurrencyLimitsEmptyStateProps) => (\n\t<EmptyState>\n\t\t<EmptyStateIcon id=\"CircleArrowOutUpRight\" />\n\t\t<EmptyStateTitle>\n\t\t\tAdd a concurrency limit for your task runs\n\t\t</EmptyStateTitle>\n\t\t<EmptyStateDescription>\n\t\t\tCreating a limit allows you to limit the number of tasks running\n\t\t\tsimultaneously with a given tag.\n\t\t</EmptyStateDescription>\n\t\t<EmptyStateActions>\n\t\t\t<Button onClick={onAdd}>\n\t\t\t\tAdd Concurrency Limit <Icon id=\"Plus\" className=\"size-4 ml-2\" />\n\t\t\t</Button>\n\t\t\t<DocsLink id=\"task-concurrency-guide\" />\n\t\t</EmptyStateActions>\n\t</EmptyState>\n);\n","import {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbList,\n} from \"@/components/ui/breadcrumb\";\nimport { Button } from \"@/components/ui/button\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype TaskRunConcurrencyLimitsHeaderProps = {\n\tonAdd: () => void;\n};\n\nexport const TaskRunConcurrencyLimitsHeader = ({\n\tonAdd,\n}: TaskRunConcurrencyLimitsHeaderProps) => {\n\treturn (\n\t\t<div className=\"flex items-center gap-2\">\n\t\t\t<Breadcrumb>\n\t\t\t\t<BreadcrumbList>\n\t\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t\tTask Run Concurrency Limits\n\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t</BreadcrumbList>\n\t\t\t</Breadcrumb>\n\t\t\t<Button\n\t\t\t\tonClick={onAdd}\n\t\t\t\tsize=\"icon\"\n\t\t\t\tclassName=\"size-7\"\n\t\t\t\tvariant=\"outline\"\n\t\t\t\taria-label=\"add task run concurrency limit\"\n\t\t\t>\n\t\t\t\t<Icon id=\"Plus\" className=\"size-4\" />\n\t\t\t</Button>\n\t\t</div>\n\t);\n};\n","import { zodResolver } from \"@hookform/resolvers/zod\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { useCreateTaskRunConcurrencyLimit } from \"@/api/task-run-concurrency-limits\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\n\nconst formSchema = z.object({\n\ttag: z.string().min(1),\n\t/** Coerce to solve common issue of transforming a string number to a number type */\n\tconcurrency_limit: z\n\t\t.number()\n\t\t.default(0)\n\t\t.or(z.string())\n\t\t.pipe(z.coerce.number()),\n});\n\nconst DEFAULT_VALUES = {\n\ttag: \"\",\n\tconcurrency_limit: 0,\n} as const;\n\ntype TaskRunConcurrencyLimitsCreateDialogProps = {\n\tonOpenChange: (open: boolean) => void;\n\tonSubmit: () => void;\n};\n\nexport const TaskRunConcurrencyLimitsCreateDialog = ({\n\tonOpenChange,\n\tonSubmit,\n}: TaskRunConcurrencyLimitsCreateDialogProps) => {\n\tconst { createTaskRunConcurrencyLimit, isPending } =\n\t\tuseCreateTaskRunConcurrencyLimit();\n\n\tconst form = useForm({\n\t\tresolver: zodResolver(formSchema),\n\t\tdefaultValues: DEFAULT_VALUES,\n\t});\n\n\tconst handleAddLimit = (values: z.infer<typeof formSchema>) => {\n\t\tcreateTaskRunConcurrencyLimit(values, {\n\t\t\tonSuccess: () => {\n\t\t\t\ttoast.success(\"Concurrency limit added\");\n\t\t\t},\n\t\t\tonError: (error) => {\n\t\t\t\tconst message = error.message || \"Unknown error while updating limit.\";\n\t\t\t\tform.setError(\"root\", { message });\n\t\t\t},\n\t\t\tonSettled: () => {\n\t\t\t\tform.reset(DEFAULT_VALUES);\n\t\t\t\tonSubmit();\n\t\t\t},\n\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open onOpenChange={onOpenChange}>\n\t\t\t<DialogContent aria-describedby={undefined}>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Add Task Run Concurrency Limit</DialogTitle>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={(e) => void form.handleSubmit(handleAddLimit)(e)}\n\t\t\t\t\t\tclassName=\"space-y-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormMessage>{form.formState.errors.root?.message}</FormMessage>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"tag\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Tag</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input type=\"text\" autoComplete=\"off\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"concurrency_limit\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Concurrency Limit</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input type=\"number\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t\t\t\t<Button variant=\"outline\">Close</Button>\n\t\t\t\t\t\t\t</DialogTrigger>\n\t\t\t\t\t\t\t<Button type=\"submit\" loading={isPending}>\n\t\t\t\t\t\t\t\tAdd\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n","import type { TaskRunConcurrencyLimit } from \"@/api/task-run-concurrency-limits\";\nimport { TaskRunConcurrencyLimitsCreateDialog } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-create-dialog\";\nimport { TaskRunConcurrencyLimitsDeleteDialog } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-delete-dialog\";\nimport { TaskRunConcurrencyLimitsResetDialog } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-reset-dialog\";\n\nexport type DialogState =\n\t| { dialog: null | \"create\"; data: undefined }\n\t| {\n\t\t\tdialog: \"reset\" | \"delete\";\n\t\t\tdata: TaskRunConcurrencyLimit;\n\t };\n\nexport const TaskRunConcurrencyLimitDialog = ({\n\topenDialog,\n\tonCloseDialog,\n\tonOpenChange,\n}: {\n\topenDialog: DialogState;\n\tonOpenChange: (open: boolean) => void;\n\tonCloseDialog: () => void;\n}) => {\n\tconst { dialog, data } = openDialog;\n\tswitch (dialog) {\n\t\tcase \"create\":\n\t\t\treturn (\n\t\t\t\t<TaskRunConcurrencyLimitsCreateDialog\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tonSubmit={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"reset\":\n\t\t\treturn (\n\t\t\t\t<TaskRunConcurrencyLimitsResetDialog\n\t\t\t\t\tdata={data}\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tonReset={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"delete\":\n\t\t\treturn (\n\t\t\t\t<TaskRunConcurrencyLimitsDeleteDialog\n\t\t\t\t\tdata={data}\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tonDelete={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tdefault:\n\t\t\treturn null;\n\t}\n};\n","import { useState } from \"react\";\nimport {\n\ttype TaskRunConcurrencyLimit,\n\tuseListTaskRunConcurrencyLimits,\n} from \"@/api/task-run-concurrency-limits\";\n\nimport { TaskRunConcurrencyLimitsDataTable } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table\";\nimport { TaskRunConcurrencyLimitsEmptyState } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-empty-state\";\nimport { TaskRunConcurrencyLimitsHeader } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-header\";\nimport {\n\ttype DialogState,\n\tTaskRunConcurrencyLimitDialog,\n} from \"./task-run-concurrency-limit-dialog\";\n\nexport const TaskRunConcurrencyLimitsView = () => {\n\tconst [openDialog, setOpenDialog] = useState<DialogState>({\n\t\tdialog: null,\n\t\tdata: undefined,\n\t});\n\n\tconst { data } = useListTaskRunConcurrencyLimits();\n\n\tconst handleAddRow = () =>\n\t\tsetOpenDialog({ dialog: \"create\", data: undefined });\n\n\tconst handleDeleteRow = (data: TaskRunConcurrencyLimit) =>\n\t\tsetOpenDialog({ dialog: \"delete\", data });\n\n\tconst handleResetRow = (data: TaskRunConcurrencyLimit) =>\n\t\tsetOpenDialog({ dialog: \"reset\", data });\n\n\tconst handleCloseDialog = () =>\n\t\tsetOpenDialog({ dialog: null, data: undefined });\n\n\t// Because all modals will be rendered, only control the closing logic\n\tconst handleOpenChange = (open: boolean) => {\n\t\tif (!open) {\n\t\t\thandleCloseDialog();\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<TaskRunConcurrencyLimitsHeader onAdd={handleAddRow} />\n\t\t\t{data.length === 0 ? (\n\t\t\t\t<TaskRunConcurrencyLimitsEmptyState onAdd={handleAddRow} />\n\t\t\t) : (\n\t\t\t\t<TaskRunConcurrencyLimitsDataTable\n\t\t\t\t\tdata={data}\n\t\t\t\t\tonDeleteRow={handleDeleteRow}\n\t\t\t\t\tonResetRow={handleResetRow}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<TaskRunConcurrencyLimitDialog\n\t\t\t\topenDialog={openDialog}\n\t\t\t\tonCloseDialog={handleCloseDialog}\n\t\t\t\tonOpenChange={handleOpenChange}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n","import { getRouteApi } from \"@tanstack/react-router\";\nimport type { JSX } from \"react\";\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@/components/ui/tabs\";\nimport type { TabOptions } from \"@/routes/concurrency-limits\";\n\nconst routeApi = getRouteApi(\"/concurrency-limits/\");\n\ntype TabOptionValues = {\n\t/** Value of search value in url */\n\ttabSearchValue: TabOptions;\n\t/** Display value for the UI */\n\tdisplayValue: string;\n};\n\n/** Maps url tab option to visual name */\nconst TAB_OPTIONS: Record<TabOptions, TabOptionValues> = {\n\tglobal: {\n\t\ttabSearchValue: \"global\",\n\t\tdisplayValue: \"Global\",\n\t},\n\t\"task-run\": {\n\t\ttabSearchValue: \"task-run\",\n\t\tdisplayValue: \"Task Run\",\n\t},\n} as const;\n\ntype ConcurrencyLimitsTabsProps = {\n\tglobalView: React.ReactNode;\n\ttaskRunView: React.ReactNode;\n};\n\n// TODO: Move Tabs for navigation to a generic styled component\n\nexport const ConcurrencyLimitsTabs = ({\n\tglobalView,\n\ttaskRunView,\n}: ConcurrencyLimitsTabsProps): JSX.Element => {\n\tconst { tab } = routeApi.useSearch();\n\tconst navigate = routeApi.useNavigate();\n\n\treturn (\n\t\t<Tabs defaultValue=\"Global\" value={tab}>\n\t\t\t<TabsList>\n\t\t\t\t<TabsTrigger\n\t\t\t\t\tvalue={TAB_OPTIONS.global.tabSearchValue}\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tvoid navigate({\n\t\t\t\t\t\t\tto: \"/concurrency-limits\",\n\t\t\t\t\t\t\tsearch: {\n\t\t\t\t\t\t\t\ttab: TAB_OPTIONS.global.tabSearchValue,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{TAB_OPTIONS.global.displayValue}\n\t\t\t\t</TabsTrigger>\n\t\t\t\t<TabsTrigger\n\t\t\t\t\tvalue={TAB_OPTIONS[\"task-run\"].tabSearchValue}\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tvoid navigate({\n\t\t\t\t\t\t\tto: \"/concurrency-limits\",\n\t\t\t\t\t\t\tsearch: {\n\t\t\t\t\t\t\t\ttab: TAB_OPTIONS[\"task-run\"].tabSearchValue,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{TAB_OPTIONS[\"task-run\"].displayValue}\n\t\t\t\t</TabsTrigger>\n\t\t\t</TabsList>\n\t\t\t<TabsContent value={TAB_OPTIONS.global.tabSearchValue}>\n\t\t\t\t{globalView}\n\t\t\t</TabsContent>\n\t\t\t<TabsContent value={TAB_OPTIONS[\"task-run\"].tabSearchValue}>\n\t\t\t\t{taskRunView}\n\t\t\t</TabsContent>\n\t\t</Tabs>\n\t);\n};\n","import { GlobalConcurrencyLimitsView } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-view\";\nimport { TaskRunConcurrencyLimitsView } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-view\";\nimport {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbList,\n} from \"@/components/ui/breadcrumb\";\n\nimport { ConcurrencyLimitsTabs } from \"./concurrency-limits-tabs\";\n\nexport const ConcurrencyLimitsPage = () => {\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<ConcurrencyLimitTitle />\n\t\t\t<ConcurrencyLimitsTabs\n\t\t\t\tglobalView={<GlobalConcurrencyLimitsView />}\n\t\t\t\ttaskRunView={<TaskRunConcurrencyLimitsView />}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n\nconst ConcurrencyLimitTitle = () => (\n\t<div className=\"flex items-center gap-2\">\n\t\t<Breadcrumb>\n\t\t\t<BreadcrumbList>\n\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\tConcurrency\n\t\t\t\t</BreadcrumbItem>\n\t\t\t</BreadcrumbList>\n\t\t</Breadcrumb>\n\t</div>\n);\n","import { createFileRoute } from \"@tanstack/react-router\";\nimport { zodValidator } from \"@tanstack/zod-adapter\";\nimport { z } from \"zod\";\nimport { buildListGlobalConcurrencyLimitsQuery } from \"@/api/global-concurrency-limits\";\nimport { buildListTaskRunConcurrencyLimitsQuery } from \"@/api/task-run-concurrency-limits\";\nimport { ConcurrencyLimitsPage } from \"@/components/concurrency/concurrency-limits-page\";\n\n/**\n * Schema for validating URL search parameters for the Concurrency Limits page.\n * @property {string} search used to filter data table\n * @property {'global' | 'task-run'} tab used designate which tab view to display\n */\nconst searchParams = z.object({\n\tsearch: z.string().optional(),\n\ttab: z.enum([\"global\", \"task-run\"]).default(\"global\"),\n});\n\nexport type TabOptions = z.infer<typeof searchParams>[\"tab\"];\n\nexport const Route = createFileRoute(\"/concurrency-limits/\")({\n\tvalidateSearch: zodValidator(searchParams),\n\tcomponent: ConcurrencyLimitsPage,\n\twrapInSuspense: true,\n\tloader: ({ context }) =>\n\t\tPromise.all([\n\t\t\tcontext.queryClient.ensureQueryData(\n\t\t\t\tbuildListGlobalConcurrencyLimitsQuery(),\n\t\t\t),\n\t\t\tcontext.queryClient.ensureQueryData(\n\t\t\t\tbuildListTaskRunConcurrencyLimitsQuery(),\n\t\t\t),\n\t\t]),\n});\n"],"names":["ActionsCell","onEditRow","onDeleteRow","props","handleCopyId","id","toast","row","DropdownMenu","jsx","DropdownMenuTrigger","jsxs","Button","Icon","DropdownMenuContent","DropdownMenuLabel","DropdownMenuItem","ActiveCell","updateGlobalConcurrencyLimit","useUpdateGlobalConcurrencyLimit","handleCheckedChange","checked","error","message","rowActive","rowId","Switch","routeApi","getRouteApi","columnHelper","createColumnHelper","createColumns","GlobalConcurrencyLimitsDataTable","data","navigate","search","deferredSearch","useDeferredValue","filteredData","useMemo","Table","value","prev","onSearchChange","searchValue","table","useReactTable","getCoreRowModel","getPaginationRowModel","SearchInput","e","DataTable","GlobalConcurrencyLimitsEmptyState","onAdd","EmptyState","EmptyStateIcon","EmptyStateTitle","EmptyStateDescription","EmptyStateActions","DocsLink","GlobalConcurrencyLimitsHeader","Breadcrumb","BreadcrumbList","BreadcrumbItem","formSchema","z.object","z.boolean","z.number","z.string","z.coerce","DEFAULT_VALUES","useCreateOrEditGlobalConcurrencyLimitForm","limitToUpdate","onSubmit","createGlobalConcurrencyLimit","createStatus","useCreateGlobalConcurrencyLimit","updateStatus","form","useForm","zodResolver","useEffect","active","name","limit","slot_decay_per_second","active_slots","values","onSettled","GlobalConcurrencyLimitsCreateOrEditDialog","onOpenChange","isLoading","saveOrUpdate","dialogTitle","Dialog","DialogContent","DialogHeader","DialogTitle","Form","FormMessage","FormField","field","FormItem","FormLabel","FormControl","Input","DialogFooter","DialogTrigger","GlobalConcurrencyLimitsDeleteDialog","onDelete","deleteGlobalConcurrencyLimit","isPending","useDeleteGlobalConcurrencyLimit","handleOnClick","DialogDescription","GlobalConcurrencyLimitsDialog","openDialog","onCloseDialog","dialog","GlobalConcurrencyLimitsView","setOpenDialog","useState","useListGlobalConcurrencyLimits","handleAddRow","handleEditRow","handleDeleteRow","handleCloseDialog","handleOpenChange","open","ActiveTaskRunCells","numActiveTaskRuns","TagCell","tag","Link","onResetRow","TaskRunConcurrencyLimitsActionsMenu","TaskRunConcurrencyLimitsDataTable","TaskRunConcurrencyLimitsEmptyState","TaskRunConcurrencyLimitsHeader","TaskRunConcurrencyLimitsCreateDialog","createTaskRunConcurrencyLimit","useCreateTaskRunConcurrencyLimit","handleAddLimit","TaskRunConcurrencyLimitDialog","TaskRunConcurrencyLimitsResetDialog","TaskRunConcurrencyLimitsDeleteDialog","TaskRunConcurrencyLimitsView","useListTaskRunConcurrencyLimits","handleResetRow","TAB_OPTIONS","ConcurrencyLimitsTabs","globalView","taskRunView","tab","Tabs","TabsList","TabsTrigger","TabsContent","ConcurrencyLimitsPage","ConcurrencyLimitTitle","z","string","optional","default","SplitComponent"],"mappings":"s9BAkBO,MAAMA,GAAc,CAAC,CAC3B,UAAAC,EACA,YAAAC,EACA,GAAGC,CACJ,IAAwB,CACvB,MAA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AU,sBACd,SAAA,CAAAF,EAAAA,IAACsJ,GAAA,EAAsB,EACvBtJ,EAAAA,IAAC6I,GAAA,CACA,iBAAa/B,GAAA,EAA4B,EACzC,kBAAc2B,GAAA,CAAA,CAA6B,CAAA,CAAA,CAC5C,EACD,EAIIa,GAAwB,IAC7BtJ,EAAAA,IAAC,MAAA,CAAI,UAAU,0BACd,SAAAA,EAAAA,IAACoD,EAAA,CACA,SAAApD,EAAAA,IAACqD,EAAA,CACA,eAACC,EAAA,CAAe,UAAU,wBAAwB,SAAA,aAAA,CAElD,EACD,EACD,CAAA,CACD,ECnBoBiG,EAAS,CAC7B7H,OAAQ6H,EAAEC,EAASC,SAAAA,EACnBT,IAAKO,GAAO,CAAC,SAAU,UAAU,CAAC,EAAEG,QAAQ,QAAQ,CACrD,CAAC,EAE4D,MAAAC,GAZpDN"}
|
|
1
|
+
{"version":3,"file":"index-BLnEvHia.js","sources":["../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/actions-cell.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/active-cell.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table/global-concurrency-limits-data-table.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-empty-state/global-concurrency-limits-empty-state.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-header/global-concurrency-limits-header.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-create-or-edit-dialog/use-create-or-edit-global-concurrency-limit-form.ts","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-create-or-edit-dialog/global-concurrency-limits-create-or-edit-dialog.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-delete-dialog/global-concurrency-limits-delete-dialog.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-view/global-conccurency-limits-dialog.tsx","../../src/components/concurrency/global-concurrency-limits/global-concurrency-limits-view/index.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/active-task-runs-cell.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/tag-cell.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table/task-run-concurrency-limits-data-table.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-empty-state/task-run-concurrency-limits-empty-state.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-header/task-run-concurrency-limits-header.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-create-dialog/task-run-concurrency-limits-create-dialog.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-view/task-run-concurrency-limit-dialog.tsx","../../src/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-view/index.tsx","../../src/components/concurrency/concurrency-limits-tabs.tsx","../../src/components/concurrency/concurrency-limits-page.tsx","../../src/routes/concurrency-limits/index.tsx?tsr-split=component"],"sourcesContent":["import type { CellContext } from \"@tanstack/react-table\";\nimport { toast } from \"sonner\";\nimport type { GlobalConcurrencyLimit } from \"@/api/global-concurrency-limits\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype ActionsCellProps = CellContext<GlobalConcurrencyLimit, unknown> & {\n\tonEditRow: (row: GlobalConcurrencyLimit) => void;\n\tonDeleteRow: (row: GlobalConcurrencyLimit) => void;\n};\n\nexport const ActionsCell = ({\n\tonEditRow,\n\tonDeleteRow,\n\t...props\n}: ActionsCellProps) => {\n\tconst handleCopyId = (id: string) => {\n\t\tvoid navigator.clipboard.writeText(id);\n\t\ttoast.success(\"ID copied\");\n\t};\n\n\tconst row = props.row.original;\n\n\treturn (\n\t\t<DropdownMenu>\n\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t<Button variant=\"outline\" className=\"size-8 p-0\">\n\t\t\t\t\t<span className=\"sr-only\">Open menu</span>\n\t\t\t\t\t<Icon id=\"MoreVertical\" className=\"size-4\" />\n\t\t\t\t</Button>\n\t\t\t</DropdownMenuTrigger>\n\t\t\t<DropdownMenuContent align=\"end\">\n\t\t\t\t<DropdownMenuLabel>Actions</DropdownMenuLabel>\n\t\t\t\t<DropdownMenuItem onClick={() => handleCopyId(row.id)}>\n\t\t\t\t\tCopy ID\n\t\t\t\t</DropdownMenuItem>\n\t\t\t\t<DropdownMenuItem onClick={() => onDeleteRow(row)}>\n\t\t\t\t\tDelete\n\t\t\t\t</DropdownMenuItem>\n\t\t\t\t<DropdownMenuItem onClick={() => onEditRow(row)}>Edit</DropdownMenuItem>\n\t\t\t</DropdownMenuContent>\n\t\t</DropdownMenu>\n\t);\n};\n","import type { CellContext } from \"@tanstack/react-table\";\nimport { toast } from \"sonner\";\nimport {\n\ttype GlobalConcurrencyLimit,\n\tuseUpdateGlobalConcurrencyLimit,\n} from \"@/api/global-concurrency-limits\";\nimport { Switch } from \"@/components/ui/switch\";\n\nexport const ActiveCell = (\n\tprops: CellContext<GlobalConcurrencyLimit, boolean>,\n) => {\n\tconst { updateGlobalConcurrencyLimit } = useUpdateGlobalConcurrencyLimit();\n\n\tconst handleCheckedChange = (checked: boolean, id: string) => {\n\t\tupdateGlobalConcurrencyLimit(\n\t\t\t{\n\t\t\t\tid_or_name: id,\n\t\t\t\tactive: checked,\n\t\t\t},\n\t\t\t{\n\t\t\t\tonSuccess: () => {\n\t\t\t\t\ttoast.success(\"Concurrency limit updated\");\n\t\t\t\t},\n\t\t\t\tonError: (error) => {\n\t\t\t\t\tconst message =\n\t\t\t\t\t\terror.message || \"Unknown error while updating active field.\";\n\t\t\t\t\tconsole.error(message);\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\t};\n\n\tconst rowActive = props.getValue();\n\tconst rowId = props.row.original.id;\n\n\treturn (\n\t\t<Switch\n\t\t\taria-label=\"toggle active\"\n\t\t\tchecked={rowActive}\n\t\t\tonCheckedChange={(checked) => handleCheckedChange(checked, rowId)}\n\t\t/>\n\t);\n};\n","import { getRouteApi } from \"@tanstack/react-router\";\nimport {\n\tcreateColumnHelper,\n\tgetCoreRowModel,\n\tgetPaginationRowModel,\n\tuseReactTable,\n} from \"@tanstack/react-table\";\nimport { useDeferredValue, useMemo } from \"react\";\nimport type { GlobalConcurrencyLimit } from \"@/api/global-concurrency-limits\";\nimport { DataTable } from \"@/components/ui/data-table\";\nimport { SearchInput } from \"@/components/ui/input\";\nimport { ActionsCell } from \"./actions-cell\";\nimport { ActiveCell } from \"./active-cell\";\n\nconst routeApi = getRouteApi(\"/concurrency-limits/\");\n\nconst columnHelper = createColumnHelper<GlobalConcurrencyLimit>();\n\nconst createColumns = ({\n\tonEditRow,\n\tonDeleteRow,\n}: {\n\tonEditRow: (row: GlobalConcurrencyLimit) => void;\n\tonDeleteRow: (row: GlobalConcurrencyLimit) => void;\n}) => [\n\tcolumnHelper.accessor(\"name\", {\n\t\theader: \"Name\",\n\t}),\n\tcolumnHelper.accessor(\"limit\", {\n\t\theader: \"Limit\",\n\t}),\n\tcolumnHelper.accessor(\"active_slots\", {\n\t\theader: \"Active Slots\",\n\t}),\n\tcolumnHelper.accessor(\"slot_decay_per_second\", {\n\t\theader: \"Slots Decay Per Second\",\n\t}),\n\tcolumnHelper.accessor(\"active\", {\n\t\theader: \"Active\",\n\t\tcell: ActiveCell,\n\t}),\n\tcolumnHelper.display({\n\t\tid: \"actions\",\n\t\tcell: (props) => (\n\t\t\t<div className=\"flex flex-row justify-end\">\n\t\t\t\t<ActionsCell\n\t\t\t\t\t{...props}\n\t\t\t\t\tonEditRow={onEditRow}\n\t\t\t\t\tonDeleteRow={onDeleteRow}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t),\n\t}),\n];\n\ntype GlobalConcurrencyLimitsDataTableProps = {\n\tdata: Array<GlobalConcurrencyLimit>;\n\tonEditRow: (row: GlobalConcurrencyLimit) => void;\n\tonDeleteRow: (row: GlobalConcurrencyLimit) => void;\n};\n\nexport const GlobalConcurrencyLimitsDataTable = ({\n\tdata,\n\tonEditRow,\n\tonDeleteRow,\n}: GlobalConcurrencyLimitsDataTableProps) => {\n\tconst navigate = routeApi.useNavigate();\n\tconst { search } = routeApi.useSearch();\n\tconst deferredSearch = useDeferredValue(search ?? \"\");\n\n\tconst filteredData = useMemo(() => {\n\t\treturn data.filter((row) =>\n\t\t\trow.name.toLowerCase().includes(deferredSearch.toLowerCase()),\n\t\t);\n\t}, [data, deferredSearch]);\n\n\treturn (\n\t\t<Table\n\t\t\tdata={filteredData}\n\t\t\tonDeleteRow={onDeleteRow}\n\t\t\tonEditRow={onEditRow}\n\t\t\tsearchValue={search}\n\t\t\tonSearchChange={(value) =>\n\t\t\t\tvoid navigate({\n\t\t\t\t\tto: \".\",\n\t\t\t\t\tsearch: (prev) => ({ ...prev, search: value }),\n\t\t\t\t})\n\t\t\t}\n\t\t/>\n\t);\n};\n\ntype TableProps = {\n\tdata: Array<GlobalConcurrencyLimit>;\n\tonDeleteRow: (row: GlobalConcurrencyLimit) => void;\n\tonEditRow: (row: GlobalConcurrencyLimit) => void;\n\tonSearchChange: (value: string) => void;\n\tsearchValue: string | undefined;\n};\n\nexport function Table({\n\tdata,\n\tonDeleteRow,\n\tonEditRow,\n\tonSearchChange,\n\tsearchValue,\n}: TableProps) {\n\tconst table = useReactTable({\n\t\tdata,\n\t\tcolumns: createColumns({ onDeleteRow, onEditRow }),\n\t\tgetCoreRowModel: getCoreRowModel(),\n\t\tgetPaginationRowModel: getPaginationRowModel(), //load client-side pagination code\n\t});\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<SearchInput\n\t\t\t\tclassName=\"max-w-72\"\n\t\t\t\tplaceholder=\"Search global concurrency limit\"\n\t\t\t\tvalue={searchValue}\n\t\t\t\tonChange={(e) => onSearchChange(e.target.value)}\n\t\t\t/>\n\t\t\t<DataTable table={table} />\n\t\t</div>\n\t);\n}\n","import { Button } from \"@/components/ui/button\";\nimport { DocsLink } from \"@/components/ui/docs-link\";\nimport {\n\tEmptyState,\n\tEmptyStateActions,\n\tEmptyStateDescription,\n\tEmptyStateIcon,\n\tEmptyStateTitle,\n} from \"@/components/ui/empty-state\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype GlobalConcurrencyLimitsEmptyStateProps = {\n\tonAdd: () => void;\n};\nexport const GlobalConcurrencyLimitsEmptyState = ({\n\tonAdd,\n}: GlobalConcurrencyLimitsEmptyStateProps) => (\n\t<EmptyState>\n\t\t<EmptyStateIcon id=\"AlignVerticalJustifyStart\" />\n\t\t<EmptyStateTitle>Add a concurrency limit</EmptyStateTitle>\n\t\t<EmptyStateDescription>\n\t\t\tGlobal concurrency limits can be applied to flow runs, task runs and any\n\t\t\toperation where you want to control concurrency.\n\t\t</EmptyStateDescription>\n\t\t<EmptyStateActions>\n\t\t\t<Button onClick={onAdd}>\n\t\t\t\tAdd Concurrency Limit <Icon id=\"Plus\" className=\"size-4 ml-2\" />\n\t\t\t</Button>\n\t\t\t<DocsLink id=\"global-concurrency-guide\" />\n\t\t</EmptyStateActions>\n\t</EmptyState>\n);\n","import {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbList,\n} from \"@/components/ui/breadcrumb\";\nimport { Button } from \"@/components/ui/button\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype GlobalConcurrencyLimitsHeaderProps = {\n\tonAdd: () => void;\n};\n\nexport const GlobalConcurrencyLimitsHeader = ({\n\tonAdd,\n}: GlobalConcurrencyLimitsHeaderProps) => {\n\treturn (\n\t\t<div className=\"flex items-center gap-2\">\n\t\t\t<Breadcrumb>\n\t\t\t\t<BreadcrumbList>\n\t\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t\tGlobal Concurrency Limits\n\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t</BreadcrumbList>\n\t\t\t</Breadcrumb>\n\t\t\t<Button\n\t\t\t\tonClick={onAdd}\n\t\t\t\tsize=\"icon\"\n\t\t\t\tclassName=\"size-7\"\n\t\t\t\tvariant=\"outline\"\n\t\t\t\taria-label=\"add global concurrency limit\"\n\t\t\t>\n\t\t\t\t<Icon id=\"Plus\" className=\"size-4\" />\n\t\t\t</Button>\n\t\t</div>\n\t);\n};\n","import { zodResolver } from \"@hookform/resolvers/zod\";\nimport { useEffect } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport {\n\ttype GlobalConcurrencyLimit,\n\tuseCreateGlobalConcurrencyLimit,\n\tuseUpdateGlobalConcurrencyLimit,\n} from \"@/api/global-concurrency-limits\";\n\nconst formSchema = z.object({\n\tactive: z.boolean().default(true),\n\t/** Coerce to solve common issue of transforming a string number to a number type */\n\tdenied_slots: z.number().default(0).or(z.string()).pipe(z.coerce.number()),\n\t/** Coerce to solve common issue of transforming a string number to a number type */\n\tlimit: z.number().default(0).or(z.string()).pipe(z.coerce.number()),\n\tname: z\n\t\t.string()\n\t\t.min(2, { message: \"Name must be at least 2 characters\" })\n\t\t.default(\"\"),\n\t/** Coerce to solve common issue of transforming a string number to a number type */\n\tslot_decay_per_second: z\n\t\t.number()\n\t\t.default(0)\n\t\t.or(z.string())\n\t\t.pipe(z.coerce.number()),\n\t/** Additional fields post creation. Coerce to solve common issue of transforming a string number to a number type */\n\tactive_slots: z.number().default(0).or(z.string()).pipe(z.coerce.number()),\n});\n\nconst DEFAULT_VALUES = {\n\tactive: true,\n\tname: \"\",\n\tlimit: 0,\n\tslot_decay_per_second: 0,\n\tdenied_slots: 0,\n\tactive_slots: 0,\n} as const;\n\ntype UseCreateOrEditGlobalConcurrencyLimitFormOptions = {\n\t/** Limit to edit. Pass undefined if creating a new limit */\n\tlimitToUpdate: GlobalConcurrencyLimit | undefined;\n\t/** Callback after hitting Save or Update */\n\tonSubmit: () => void;\n};\n\nexport const useCreateOrEditGlobalConcurrencyLimitForm = ({\n\tlimitToUpdate,\n\tonSubmit,\n}: UseCreateOrEditGlobalConcurrencyLimitFormOptions) => {\n\tconst { createGlobalConcurrencyLimit, status: createStatus } =\n\t\tuseCreateGlobalConcurrencyLimit();\n\tconst { updateGlobalConcurrencyLimit, status: updateStatus } =\n\t\tuseUpdateGlobalConcurrencyLimit();\n\n\tconst form = useForm({\n\t\tresolver: zodResolver(formSchema),\n\t\tdefaultValues: DEFAULT_VALUES,\n\t});\n\n\t// Sync form data with limit-to-edit data\n\tuseEffect(() => {\n\t\tif (limitToUpdate) {\n\t\t\tconst { active, name, limit, slot_decay_per_second, active_slots } =\n\t\t\t\tlimitToUpdate;\n\t\t\tform.reset({ active, name, limit, slot_decay_per_second, active_slots });\n\t\t} else {\n\t\t\tform.reset(DEFAULT_VALUES);\n\t\t}\n\t}, [form, limitToUpdate]);\n\n\tconst saveOrUpdate = (values: z.infer<typeof formSchema>) => {\n\t\tconst onSettled = () => {\n\t\t\tform.reset(DEFAULT_VALUES);\n\t\t\tonSubmit();\n\t\t};\n\n\t\tif (limitToUpdate?.id) {\n\t\t\tupdateGlobalConcurrencyLimit(\n\t\t\t\t{\n\t\t\t\t\tid_or_name: limitToUpdate.id,\n\t\t\t\t\t...values,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tonSuccess: () => {\n\t\t\t\t\t\ttoast.success(\"Limit updated\");\n\t\t\t\t\t},\n\t\t\t\t\tonError: (error) => {\n\t\t\t\t\t\tconst message =\n\t\t\t\t\t\t\terror.message || \"Unknown error while updating limit.\";\n\t\t\t\t\t\tform.setError(\"root\", { message });\n\t\t\t\t\t},\n\t\t\t\t\tonSettled,\n\t\t\t\t},\n\t\t\t);\n\t\t} else {\n\t\t\tcreateGlobalConcurrencyLimit(values, {\n\t\t\t\tonSuccess: () => {\n\t\t\t\t\ttoast.success(\"Limit created\");\n\t\t\t\t},\n\t\t\t\tonError: (error) => {\n\t\t\t\t\tconst message =\n\t\t\t\t\t\terror.message || \"Unknown error while creating variable.\";\n\t\t\t\t\tform.setError(\"root\", {\n\t\t\t\t\t\tmessage,\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tonSettled,\n\t\t\t});\n\t\t}\n\t};\n\n\treturn {\n\t\tform,\n\t\tsaveOrUpdate,\n\t\tisLoading: createStatus === \"pending\" || updateStatus === \"pending\",\n\t};\n};\n","import type { GlobalConcurrencyLimit } from \"@/api/global-concurrency-limits\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Switch } from \"@/components/ui/switch\";\n\nimport { useCreateOrEditGlobalConcurrencyLimitForm } from \"./use-create-or-edit-global-concurrency-limit-form\";\n\ntype GlobalConcurrencyLimitsCreateOrEditDialogProps = {\n\tlimitToUpdate?: GlobalConcurrencyLimit;\n\tonOpenChange: (open: boolean) => void;\n\tonSubmit: () => void;\n};\n\nexport const GlobalConcurrencyLimitsCreateOrEditDialog = ({\n\tlimitToUpdate,\n\tonOpenChange,\n\tonSubmit,\n}: GlobalConcurrencyLimitsCreateOrEditDialogProps) => {\n\tconst { form, isLoading, saveOrUpdate } =\n\t\tuseCreateOrEditGlobalConcurrencyLimitForm({\n\t\t\tlimitToUpdate,\n\t\t\tonSubmit,\n\t\t});\n\n\tconst dialogTitle = limitToUpdate\n\t\t? `Update ${limitToUpdate.name}`\n\t\t: \"Add Concurrency Limit\";\n\n\treturn (\n\t\t<Dialog open onOpenChange={onOpenChange}>\n\t\t\t<DialogContent aria-describedby={undefined}>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>{dialogTitle}</DialogTitle>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={(e) => void form.handleSubmit(saveOrUpdate)(e)}\n\t\t\t\t\t\tclassName=\"space-y-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormMessage>{form.formState.errors.root?.message}</FormMessage>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"name\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Name</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input type=\"text\" autoComplete=\"off\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"limit\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Concurrency Limit</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input type=\"number\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"slot_decay_per_second\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Slot Decay Per Second</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input type=\"number\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{limitToUpdate && (\n\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\tname=\"active_slots\"\n\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t<FormLabel>Active Slots</FormLabel>\n\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<Input type=\"number\" {...field} />\n\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"active\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Active</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Switch\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"block\"\n\t\t\t\t\t\t\t\t\t\t\tchecked={field.value}\n\t\t\t\t\t\t\t\t\t\t\tonCheckedChange={field.onChange}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t\t\t\t<Button variant=\"outline\">Close</Button>\n\t\t\t\t\t\t\t</DialogTrigger>\n\t\t\t\t\t\t\t<Button type=\"submit\" loading={isLoading}>\n\t\t\t\t\t\t\t\t{limitToUpdate ? \"Update\" : \"Save\"}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n","import { toast } from \"sonner\";\nimport {\n\ttype GlobalConcurrencyLimit,\n\tuseDeleteGlobalConcurrencyLimit,\n} from \"@/api/global-concurrency-limits\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\n\ntype GlobalConcurrencyLimitsDeleteDialogProps = {\n\tlimit: GlobalConcurrencyLimit;\n\tonOpenChange: (open: boolean) => void;\n\tonDelete: () => void;\n};\n\nexport const GlobalConcurrencyLimitsDeleteDialog = ({\n\tlimit,\n\tonOpenChange,\n\tonDelete,\n}: GlobalConcurrencyLimitsDeleteDialogProps) => {\n\tconst { deleteGlobalConcurrencyLimit, isPending } =\n\t\tuseDeleteGlobalConcurrencyLimit();\n\n\tconst handleOnClick = (id: string) => {\n\t\tdeleteGlobalConcurrencyLimit(id, {\n\t\t\tonSuccess: () => {\n\t\t\t\ttoast.success(\"Concurrency limit deleted\");\n\t\t\t},\n\t\t\tonError: (error) => {\n\t\t\t\tconst message =\n\t\t\t\t\terror.message || \"Unknown error while deleting concurrency limit.\";\n\t\t\t\tconsole.error(message);\n\t\t\t},\n\t\t\tonSettled: onDelete,\n\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open onOpenChange={onOpenChange}>\n\t\t\t<DialogContent>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Delete Concurrency Limit</DialogTitle>\n\t\t\t\t</DialogHeader>\n\t\t\t\t<DialogDescription>\n\t\t\t\t\tAre you sure you want to delete {limit.name}\n\t\t\t\t</DialogDescription>\n\t\t\t\t<DialogFooter>\n\t\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t\t<Button variant=\"outline\">Close</Button>\n\t\t\t\t\t</DialogTrigger>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"destructive\"\n\t\t\t\t\t\tonClick={() => handleOnClick(limit.id)}\n\t\t\t\t\t\tloading={isPending}\n\t\t\t\t\t>\n\t\t\t\t\t\tDelete\n\t\t\t\t\t</Button>\n\t\t\t\t</DialogFooter>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n","import type { GlobalConcurrencyLimit } from \"@/api/global-concurrency-limits\";\n\nimport { GlobalConcurrencyLimitsCreateOrEditDialog } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-create-or-edit-dialog\";\nimport { GlobalConcurrencyLimitsDeleteDialog } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-delete-dialog\";\n\nexport type DialogState =\n\t| { dialog: null | \"create\"; data: undefined }\n\t| {\n\t\t\tdialog: \"delete\" | \"edit\";\n\t\t\tdata: GlobalConcurrencyLimit;\n\t };\n\nexport const GlobalConcurrencyLimitsDialog = ({\n\topenDialog,\n\tonCloseDialog,\n\tonOpenChange,\n}: {\n\topenDialog: DialogState;\n\tonOpenChange: (open: boolean) => void;\n\tonCloseDialog: () => void;\n}) => {\n\tconst { dialog, data } = openDialog;\n\tswitch (dialog) {\n\t\tcase \"create\":\n\t\t\treturn (\n\t\t\t\t<GlobalConcurrencyLimitsCreateOrEditDialog\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tonSubmit={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"delete\":\n\t\t\treturn (\n\t\t\t\t<GlobalConcurrencyLimitsDeleteDialog\n\t\t\t\t\tlimit={data}\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tonDelete={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"edit\":\n\t\t\treturn (\n\t\t\t\t<GlobalConcurrencyLimitsCreateOrEditDialog\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tlimitToUpdate={data}\n\t\t\t\t\tonSubmit={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tdefault:\n\t\t\treturn null;\n\t}\n};\n","import { useState } from \"react\";\nimport {\n\ttype GlobalConcurrencyLimit,\n\tuseListGlobalConcurrencyLimits,\n} from \"@/api/global-concurrency-limits\";\n\nimport { GlobalConcurrencyLimitsDataTable } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-data-table\";\nimport { GlobalConcurrencyLimitsEmptyState } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-empty-state\";\nimport { GlobalConcurrencyLimitsHeader } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-header\";\n\nimport {\n\ttype DialogState,\n\tGlobalConcurrencyLimitsDialog,\n} from \"./global-conccurency-limits-dialog\";\n\nexport const GlobalConcurrencyLimitsView = () => {\n\tconst [openDialog, setOpenDialog] = useState<DialogState>({\n\t\tdialog: null,\n\t\tdata: undefined,\n\t});\n\n\tconst { data } = useListGlobalConcurrencyLimits();\n\n\tconst handleAddRow = () =>\n\t\tsetOpenDialog({ dialog: \"create\", data: undefined });\n\n\tconst handleEditRow = (data: GlobalConcurrencyLimit) =>\n\t\tsetOpenDialog({ dialog: \"edit\", data });\n\n\tconst handleDeleteRow = (data: GlobalConcurrencyLimit) =>\n\t\tsetOpenDialog({ dialog: \"delete\", data });\n\n\tconst handleCloseDialog = () =>\n\t\tsetOpenDialog({ dialog: null, data: undefined });\n\n\t// Because all modals will be rendered, only control the closing logic\n\tconst handleOpenChange = (open: boolean) => {\n\t\tif (!open) {\n\t\t\thandleCloseDialog();\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<GlobalConcurrencyLimitsHeader onAdd={handleAddRow} />\n\t\t\t{data.length === 0 ? (\n\t\t\t\t<GlobalConcurrencyLimitsEmptyState onAdd={handleAddRow} />\n\t\t\t) : (\n\t\t\t\t<GlobalConcurrencyLimitsDataTable\n\t\t\t\t\tdata={data}\n\t\t\t\t\tonEditRow={handleEditRow}\n\t\t\t\t\tonDeleteRow={handleDeleteRow}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<GlobalConcurrencyLimitsDialog\n\t\t\t\topenDialog={openDialog}\n\t\t\t\tonCloseDialog={handleCloseDialog}\n\t\t\t\tonOpenChange={handleOpenChange}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n","import type { CellContext } from \"@tanstack/react-table\";\nimport type { TaskRunConcurrencyLimit } from \"@/api/task-run-concurrency-limits\";\n\ntype ActiveTaskRunCellsProps = CellContext<\n\tTaskRunConcurrencyLimit,\n\tArray<string>\n>;\n\nexport const ActiveTaskRunCells = (props: ActiveTaskRunCellsProps) => {\n\tconst activeTaskRuns = props.getValue();\n\tconst numActiveTaskRuns = activeTaskRuns.length;\n\tif (numActiveTaskRuns === 0) {\n\t\treturn \"None\";\n\t}\n\treturn numActiveTaskRuns;\n};\n","import { Link } from \"@tanstack/react-router\";\nimport type { CellContext } from \"@tanstack/react-table\";\nimport type { TaskRunConcurrencyLimit } from \"@/api/task-run-concurrency-limits\";\n\ntype TagCellProps = CellContext<TaskRunConcurrencyLimit, string>;\n\nexport const TagCell = (props: TagCellProps) => {\n\tconst tag = props.getValue();\n\tconst id = props.row.original.id;\n\treturn (\n\t\t<Link params={{ id }} to={\"/concurrency-limits/concurrency-limit/$id\"}>\n\t\t\t{tag}\n\t\t</Link>\n\t);\n};\n","import { getRouteApi } from \"@tanstack/react-router\";\nimport {\n\tcreateColumnHelper,\n\tgetCoreRowModel,\n\tgetPaginationRowModel,\n\tuseReactTable,\n} from \"@tanstack/react-table\";\nimport { useDeferredValue, useMemo } from \"react\";\nimport type { TaskRunConcurrencyLimit } from \"@/api/task-run-concurrency-limits\";\nimport { TaskRunConcurrencyLimitsActionsMenu } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-actions-menu\";\nimport { DataTable } from \"@/components/ui/data-table\";\nimport { SearchInput } from \"@/components/ui/input\";\n\nimport { ActiveTaskRunCells } from \"./active-task-runs-cell\";\nimport { TagCell } from \"./tag-cell\";\n\nconst routeApi = getRouteApi(\"/concurrency-limits/\");\nconst columnHelper = createColumnHelper<TaskRunConcurrencyLimit>();\n\nconst createColumns = ({\n\tonDeleteRow,\n\tonResetRow,\n}: {\n\tonDeleteRow: (row: TaskRunConcurrencyLimit) => void;\n\tonResetRow: (row: TaskRunConcurrencyLimit) => void;\n}) => [\n\tcolumnHelper.accessor(\"tag\", {\n\t\theader: \"Tag\",\n\t\tcell: TagCell,\n\t}),\n\tcolumnHelper.accessor(\"concurrency_limit\", {\n\t\theader: \"Slots\",\n\t}),\n\tcolumnHelper.accessor(\"active_slots\", {\n\t\theader: \"Active Task Runs\",\n\t\tcell: ActiveTaskRunCells,\n\t}),\n\tcolumnHelper.display({\n\t\tid: \"actions\",\n\t\tcell: (props) => {\n\t\t\tconst row = props.row.original;\n\t\t\treturn (\n\t\t\t\t<div className=\"flex flex-row justify-end\">\n\t\t\t\t\t<TaskRunConcurrencyLimitsActionsMenu\n\t\t\t\t\t\tid={row.id}\n\t\t\t\t\t\tonDelete={() => onDeleteRow(row)}\n\t\t\t\t\t\tonReset={() => onResetRow(row)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t}),\n];\n\ntype TaskRunConcurrencyLimitsDataTableProps = {\n\tdata: Array<TaskRunConcurrencyLimit>;\n\tonDeleteRow: (row: TaskRunConcurrencyLimit) => void;\n\tonResetRow: (row: TaskRunConcurrencyLimit) => void;\n};\n\nexport const TaskRunConcurrencyLimitsDataTable = ({\n\tdata,\n\tonDeleteRow,\n\tonResetRow,\n}: TaskRunConcurrencyLimitsDataTableProps) => {\n\tconst navigate = routeApi.useNavigate();\n\tconst { search } = routeApi.useSearch();\n\tconst deferredSearch = useDeferredValue(search ?? \"\");\n\n\tconst filteredData = useMemo(() => {\n\t\treturn data.filter((row) =>\n\t\t\trow.tag.toLowerCase().includes(deferredSearch.toLowerCase()),\n\t\t);\n\t}, [data, deferredSearch]);\n\n\treturn (\n\t\t<Table\n\t\t\tdata={filteredData}\n\t\t\tonDeleteRow={onDeleteRow}\n\t\t\tonResetRow={onResetRow}\n\t\t\tsearchValue={search}\n\t\t\tonSearchChange={(value) =>\n\t\t\t\tvoid navigate({\n\t\t\t\t\tto: \".\",\n\t\t\t\t\tsearch: (prev) => ({ ...prev, search: value }),\n\t\t\t\t})\n\t\t\t}\n\t\t/>\n\t);\n};\n\ntype TableProps = {\n\tdata: Array<TaskRunConcurrencyLimit>;\n\tonDeleteRow: (row: TaskRunConcurrencyLimit) => void;\n\tonResetRow: (row: TaskRunConcurrencyLimit) => void;\n\tonSearchChange: (value: string) => void;\n\tsearchValue: string | undefined;\n};\n\nexport function Table({\n\tdata,\n\tonDeleteRow,\n\tonResetRow,\n\tonSearchChange,\n\tsearchValue,\n}: TableProps) {\n\tconst table = useReactTable({\n\t\tdata,\n\t\tcolumns: createColumns({ onDeleteRow, onResetRow }),\n\t\tgetCoreRowModel: getCoreRowModel(),\n\t\tgetPaginationRowModel: getPaginationRowModel(), //load client-side pagination code\n\t});\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<SearchInput\n\t\t\t\tclassName=\"max-w-72\"\n\t\t\t\tplaceholder=\"Search active task limit\"\n\t\t\t\tvalue={searchValue}\n\t\t\t\tonChange={(e) => onSearchChange(e.target.value)}\n\t\t\t/>\n\t\t\t<DataTable table={table} />\n\t\t</div>\n\t);\n}\n","import { Button } from \"@/components/ui/button\";\nimport { DocsLink } from \"@/components/ui/docs-link\";\nimport {\n\tEmptyState,\n\tEmptyStateActions,\n\tEmptyStateDescription,\n\tEmptyStateIcon,\n\tEmptyStateTitle,\n} from \"@/components/ui/empty-state\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype TaskRunConcurrencyLimitsEmptyStateProps = {\n\tonAdd: () => void;\n};\nexport const TaskRunConcurrencyLimitsEmptyState = ({\n\tonAdd,\n}: TaskRunConcurrencyLimitsEmptyStateProps) => (\n\t<EmptyState>\n\t\t<EmptyStateIcon id=\"CircleArrowOutUpRight\" />\n\t\t<EmptyStateTitle>\n\t\t\tAdd a concurrency limit for your task runs\n\t\t</EmptyStateTitle>\n\t\t<EmptyStateDescription>\n\t\t\tCreating a limit allows you to limit the number of tasks running\n\t\t\tsimultaneously with a given tag.\n\t\t</EmptyStateDescription>\n\t\t<EmptyStateActions>\n\t\t\t<Button onClick={onAdd}>\n\t\t\t\tAdd Concurrency Limit <Icon id=\"Plus\" className=\"size-4 ml-2\" />\n\t\t\t</Button>\n\t\t\t<DocsLink id=\"task-concurrency-guide\" />\n\t\t</EmptyStateActions>\n\t</EmptyState>\n);\n","import {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbList,\n} from \"@/components/ui/breadcrumb\";\nimport { Button } from \"@/components/ui/button\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype TaskRunConcurrencyLimitsHeaderProps = {\n\tonAdd: () => void;\n};\n\nexport const TaskRunConcurrencyLimitsHeader = ({\n\tonAdd,\n}: TaskRunConcurrencyLimitsHeaderProps) => {\n\treturn (\n\t\t<div className=\"flex items-center gap-2\">\n\t\t\t<Breadcrumb>\n\t\t\t\t<BreadcrumbList>\n\t\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t\tTask Run Concurrency Limits\n\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t</BreadcrumbList>\n\t\t\t</Breadcrumb>\n\t\t\t<Button\n\t\t\t\tonClick={onAdd}\n\t\t\t\tsize=\"icon\"\n\t\t\t\tclassName=\"size-7\"\n\t\t\t\tvariant=\"outline\"\n\t\t\t\taria-label=\"add task run concurrency limit\"\n\t\t\t>\n\t\t\t\t<Icon id=\"Plus\" className=\"size-4\" />\n\t\t\t</Button>\n\t\t</div>\n\t);\n};\n","import { zodResolver } from \"@hookform/resolvers/zod\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\nimport { useCreateTaskRunConcurrencyLimit } from \"@/api/task-run-concurrency-limits\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\n\nconst formSchema = z.object({\n\ttag: z.string().min(1),\n\t/** Coerce to solve common issue of transforming a string number to a number type */\n\tconcurrency_limit: z\n\t\t.number()\n\t\t.default(0)\n\t\t.or(z.string())\n\t\t.pipe(z.coerce.number()),\n});\n\nconst DEFAULT_VALUES = {\n\ttag: \"\",\n\tconcurrency_limit: 0,\n} as const;\n\ntype TaskRunConcurrencyLimitsCreateDialogProps = {\n\tonOpenChange: (open: boolean) => void;\n\tonSubmit: () => void;\n};\n\nexport const TaskRunConcurrencyLimitsCreateDialog = ({\n\tonOpenChange,\n\tonSubmit,\n}: TaskRunConcurrencyLimitsCreateDialogProps) => {\n\tconst { createTaskRunConcurrencyLimit, isPending } =\n\t\tuseCreateTaskRunConcurrencyLimit();\n\n\tconst form = useForm({\n\t\tresolver: zodResolver(formSchema),\n\t\tdefaultValues: DEFAULT_VALUES,\n\t});\n\n\tconst handleAddLimit = (values: z.infer<typeof formSchema>) => {\n\t\tcreateTaskRunConcurrencyLimit(values, {\n\t\t\tonSuccess: () => {\n\t\t\t\ttoast.success(\"Concurrency limit added\");\n\t\t\t},\n\t\t\tonError: (error) => {\n\t\t\t\tconst message = error.message || \"Unknown error while updating limit.\";\n\t\t\t\tform.setError(\"root\", { message });\n\t\t\t},\n\t\t\tonSettled: () => {\n\t\t\t\tform.reset(DEFAULT_VALUES);\n\t\t\t\tonSubmit();\n\t\t\t},\n\t\t});\n\t};\n\n\treturn (\n\t\t<Dialog open onOpenChange={onOpenChange}>\n\t\t\t<DialogContent aria-describedby={undefined}>\n\t\t\t\t<DialogHeader>\n\t\t\t\t\t<DialogTitle>Add Task Run Concurrency Limit</DialogTitle>\n\t\t\t\t</DialogHeader>\n\n\t\t\t\t<Form {...form}>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={(e) => void form.handleSubmit(handleAddLimit)(e)}\n\t\t\t\t\t\tclassName=\"space-y-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FormMessage>{form.formState.errors.root?.message}</FormMessage>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"tag\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Tag</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input type=\"text\" autoComplete=\"off\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\tname=\"concurrency_limit\"\n\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t<FormLabel>Concurrency Limit</FormLabel>\n\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t<Input type=\"number\" {...field} />\n\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t\t\t\t<Button variant=\"outline\">Close</Button>\n\t\t\t\t\t\t\t</DialogTrigger>\n\t\t\t\t\t\t\t<Button type=\"submit\" loading={isPending}>\n\t\t\t\t\t\t\t\tAdd\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t</form>\n\t\t\t\t</Form>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n","import type { TaskRunConcurrencyLimit } from \"@/api/task-run-concurrency-limits\";\nimport { TaskRunConcurrencyLimitsCreateDialog } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-create-dialog\";\nimport { TaskRunConcurrencyLimitsDeleteDialog } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-delete-dialog\";\nimport { TaskRunConcurrencyLimitsResetDialog } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-reset-dialog\";\n\nexport type DialogState =\n\t| { dialog: null | \"create\"; data: undefined }\n\t| {\n\t\t\tdialog: \"reset\" | \"delete\";\n\t\t\tdata: TaskRunConcurrencyLimit;\n\t };\n\nexport const TaskRunConcurrencyLimitDialog = ({\n\topenDialog,\n\tonCloseDialog,\n\tonOpenChange,\n}: {\n\topenDialog: DialogState;\n\tonOpenChange: (open: boolean) => void;\n\tonCloseDialog: () => void;\n}) => {\n\tconst { dialog, data } = openDialog;\n\tswitch (dialog) {\n\t\tcase \"create\":\n\t\t\treturn (\n\t\t\t\t<TaskRunConcurrencyLimitsCreateDialog\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tonSubmit={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"reset\":\n\t\t\treturn (\n\t\t\t\t<TaskRunConcurrencyLimitsResetDialog\n\t\t\t\t\tdata={data}\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tonReset={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"delete\":\n\t\t\treturn (\n\t\t\t\t<TaskRunConcurrencyLimitsDeleteDialog\n\t\t\t\t\tdata={data}\n\t\t\t\t\tonOpenChange={onOpenChange}\n\t\t\t\t\tonDelete={onCloseDialog}\n\t\t\t\t/>\n\t\t\t);\n\t\tdefault:\n\t\t\treturn null;\n\t}\n};\n","import { useState } from \"react\";\nimport {\n\ttype TaskRunConcurrencyLimit,\n\tuseListTaskRunConcurrencyLimits,\n} from \"@/api/task-run-concurrency-limits\";\n\nimport { TaskRunConcurrencyLimitsDataTable } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-data-table\";\nimport { TaskRunConcurrencyLimitsEmptyState } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-empty-state\";\nimport { TaskRunConcurrencyLimitsHeader } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-header\";\nimport {\n\ttype DialogState,\n\tTaskRunConcurrencyLimitDialog,\n} from \"./task-run-concurrency-limit-dialog\";\n\nexport const TaskRunConcurrencyLimitsView = () => {\n\tconst [openDialog, setOpenDialog] = useState<DialogState>({\n\t\tdialog: null,\n\t\tdata: undefined,\n\t});\n\n\tconst { data } = useListTaskRunConcurrencyLimits();\n\n\tconst handleAddRow = () =>\n\t\tsetOpenDialog({ dialog: \"create\", data: undefined });\n\n\tconst handleDeleteRow = (data: TaskRunConcurrencyLimit) =>\n\t\tsetOpenDialog({ dialog: \"delete\", data });\n\n\tconst handleResetRow = (data: TaskRunConcurrencyLimit) =>\n\t\tsetOpenDialog({ dialog: \"reset\", data });\n\n\tconst handleCloseDialog = () =>\n\t\tsetOpenDialog({ dialog: null, data: undefined });\n\n\t// Because all modals will be rendered, only control the closing logic\n\tconst handleOpenChange = (open: boolean) => {\n\t\tif (!open) {\n\t\t\thandleCloseDialog();\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<TaskRunConcurrencyLimitsHeader onAdd={handleAddRow} />\n\t\t\t{data.length === 0 ? (\n\t\t\t\t<TaskRunConcurrencyLimitsEmptyState onAdd={handleAddRow} />\n\t\t\t) : (\n\t\t\t\t<TaskRunConcurrencyLimitsDataTable\n\t\t\t\t\tdata={data}\n\t\t\t\t\tonDeleteRow={handleDeleteRow}\n\t\t\t\t\tonResetRow={handleResetRow}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<TaskRunConcurrencyLimitDialog\n\t\t\t\topenDialog={openDialog}\n\t\t\t\tonCloseDialog={handleCloseDialog}\n\t\t\t\tonOpenChange={handleOpenChange}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n","import { getRouteApi } from \"@tanstack/react-router\";\nimport type { JSX } from \"react\";\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@/components/ui/tabs\";\nimport type { TabOptions } from \"@/routes/concurrency-limits\";\n\nconst routeApi = getRouteApi(\"/concurrency-limits/\");\n\ntype TabOptionValues = {\n\t/** Value of search value in url */\n\ttabSearchValue: TabOptions;\n\t/** Display value for the UI */\n\tdisplayValue: string;\n};\n\n/** Maps url tab option to visual name */\nconst TAB_OPTIONS: Record<TabOptions, TabOptionValues> = {\n\tglobal: {\n\t\ttabSearchValue: \"global\",\n\t\tdisplayValue: \"Global\",\n\t},\n\t\"task-run\": {\n\t\ttabSearchValue: \"task-run\",\n\t\tdisplayValue: \"Task Run\",\n\t},\n} as const;\n\ntype ConcurrencyLimitsTabsProps = {\n\tglobalView: React.ReactNode;\n\ttaskRunView: React.ReactNode;\n};\n\n// TODO: Move Tabs for navigation to a generic styled component\n\nexport const ConcurrencyLimitsTabs = ({\n\tglobalView,\n\ttaskRunView,\n}: ConcurrencyLimitsTabsProps): JSX.Element => {\n\tconst { tab } = routeApi.useSearch();\n\tconst navigate = routeApi.useNavigate();\n\n\treturn (\n\t\t<Tabs defaultValue=\"Global\" value={tab}>\n\t\t\t<TabsList>\n\t\t\t\t<TabsTrigger\n\t\t\t\t\tvalue={TAB_OPTIONS.global.tabSearchValue}\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tvoid navigate({\n\t\t\t\t\t\t\tto: \"/concurrency-limits\",\n\t\t\t\t\t\t\tsearch: {\n\t\t\t\t\t\t\t\ttab: TAB_OPTIONS.global.tabSearchValue,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{TAB_OPTIONS.global.displayValue}\n\t\t\t\t</TabsTrigger>\n\t\t\t\t<TabsTrigger\n\t\t\t\t\tvalue={TAB_OPTIONS[\"task-run\"].tabSearchValue}\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tvoid navigate({\n\t\t\t\t\t\t\tto: \"/concurrency-limits\",\n\t\t\t\t\t\t\tsearch: {\n\t\t\t\t\t\t\t\ttab: TAB_OPTIONS[\"task-run\"].tabSearchValue,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{TAB_OPTIONS[\"task-run\"].displayValue}\n\t\t\t\t</TabsTrigger>\n\t\t\t</TabsList>\n\t\t\t<TabsContent value={TAB_OPTIONS.global.tabSearchValue}>\n\t\t\t\t{globalView}\n\t\t\t</TabsContent>\n\t\t\t<TabsContent value={TAB_OPTIONS[\"task-run\"].tabSearchValue}>\n\t\t\t\t{taskRunView}\n\t\t\t</TabsContent>\n\t\t</Tabs>\n\t);\n};\n","import { GlobalConcurrencyLimitsView } from \"@/components/concurrency/global-concurrency-limits/global-concurrency-limits-view\";\nimport { TaskRunConcurrencyLimitsView } from \"@/components/concurrency/task-run-concurrency-limits/task-run-concurrency-limits-view\";\nimport {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbList,\n} from \"@/components/ui/breadcrumb\";\n\nimport { ConcurrencyLimitsTabs } from \"./concurrency-limits-tabs\";\n\nexport const ConcurrencyLimitsPage = () => {\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<ConcurrencyLimitTitle />\n\t\t\t<ConcurrencyLimitsTabs\n\t\t\t\tglobalView={<GlobalConcurrencyLimitsView />}\n\t\t\t\ttaskRunView={<TaskRunConcurrencyLimitsView />}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n\nconst ConcurrencyLimitTitle = () => (\n\t<div className=\"flex items-center gap-2\">\n\t\t<Breadcrumb>\n\t\t\t<BreadcrumbList>\n\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\tConcurrency\n\t\t\t\t</BreadcrumbItem>\n\t\t\t</BreadcrumbList>\n\t\t</Breadcrumb>\n\t</div>\n);\n","import { createFileRoute } from \"@tanstack/react-router\";\nimport { zodValidator } from \"@tanstack/zod-adapter\";\nimport { z } from \"zod\";\nimport { buildListGlobalConcurrencyLimitsQuery } from \"@/api/global-concurrency-limits\";\nimport { buildListTaskRunConcurrencyLimitsQuery } from \"@/api/task-run-concurrency-limits\";\nimport { ConcurrencyLimitsPage } from \"@/components/concurrency/concurrency-limits-page\";\n\n/**\n * Schema for validating URL search parameters for the Concurrency Limits page.\n * @property {string} search used to filter data table\n * @property {'global' | 'task-run'} tab used designate which tab view to display\n */\nconst searchParams = z.object({\n\tsearch: z.string().optional(),\n\ttab: z.enum([\"global\", \"task-run\"]).default(\"global\"),\n});\n\nexport type TabOptions = z.infer<typeof searchParams>[\"tab\"];\n\nexport const Route = createFileRoute(\"/concurrency-limits/\")({\n\tvalidateSearch: zodValidator(searchParams),\n\tcomponent: ConcurrencyLimitsPage,\n\twrapInSuspense: true,\n\tloader: ({ context }) =>\n\t\tPromise.all([\n\t\t\tcontext.queryClient.ensureQueryData(\n\t\t\t\tbuildListGlobalConcurrencyLimitsQuery(),\n\t\t\t),\n\t\t\tcontext.queryClient.ensureQueryData(\n\t\t\t\tbuildListTaskRunConcurrencyLimitsQuery(),\n\t\t\t),\n\t\t]),\n});\n"],"names":["ActionsCell","onEditRow","onDeleteRow","props","handleCopyId","id","toast","row","DropdownMenu","jsx","DropdownMenuTrigger","jsxs","Button","Icon","DropdownMenuContent","DropdownMenuLabel","DropdownMenuItem","ActiveCell","updateGlobalConcurrencyLimit","useUpdateGlobalConcurrencyLimit","handleCheckedChange","checked","error","message","rowActive","rowId","Switch","routeApi","getRouteApi","columnHelper","createColumnHelper","createColumns","GlobalConcurrencyLimitsDataTable","data","navigate","search","deferredSearch","useDeferredValue","filteredData","useMemo","Table","value","prev","onSearchChange","searchValue","table","useReactTable","getCoreRowModel","getPaginationRowModel","SearchInput","e","DataTable","GlobalConcurrencyLimitsEmptyState","onAdd","EmptyState","EmptyStateIcon","EmptyStateTitle","EmptyStateDescription","EmptyStateActions","DocsLink","GlobalConcurrencyLimitsHeader","Breadcrumb","BreadcrumbList","BreadcrumbItem","formSchema","z.object","z.boolean","z.number","z.string","z.coerce","DEFAULT_VALUES","useCreateOrEditGlobalConcurrencyLimitForm","limitToUpdate","onSubmit","createGlobalConcurrencyLimit","createStatus","useCreateGlobalConcurrencyLimit","updateStatus","form","useForm","zodResolver","useEffect","active","name","limit","slot_decay_per_second","active_slots","values","onSettled","GlobalConcurrencyLimitsCreateOrEditDialog","onOpenChange","isLoading","saveOrUpdate","dialogTitle","Dialog","DialogContent","DialogHeader","DialogTitle","Form","FormMessage","FormField","field","FormItem","FormLabel","FormControl","Input","DialogFooter","DialogTrigger","GlobalConcurrencyLimitsDeleteDialog","onDelete","deleteGlobalConcurrencyLimit","isPending","useDeleteGlobalConcurrencyLimit","handleOnClick","DialogDescription","GlobalConcurrencyLimitsDialog","openDialog","onCloseDialog","dialog","GlobalConcurrencyLimitsView","setOpenDialog","useState","useListGlobalConcurrencyLimits","handleAddRow","handleEditRow","handleDeleteRow","handleCloseDialog","handleOpenChange","open","ActiveTaskRunCells","numActiveTaskRuns","TagCell","tag","Link","onResetRow","TaskRunConcurrencyLimitsActionsMenu","TaskRunConcurrencyLimitsDataTable","TaskRunConcurrencyLimitsEmptyState","TaskRunConcurrencyLimitsHeader","TaskRunConcurrencyLimitsCreateDialog","createTaskRunConcurrencyLimit","useCreateTaskRunConcurrencyLimit","handleAddLimit","TaskRunConcurrencyLimitDialog","TaskRunConcurrencyLimitsResetDialog","TaskRunConcurrencyLimitsDeleteDialog","TaskRunConcurrencyLimitsView","useListTaskRunConcurrencyLimits","handleResetRow","TAB_OPTIONS","ConcurrencyLimitsTabs","globalView","taskRunView","tab","Tabs","TabsList","TabsTrigger","TabsContent","ConcurrencyLimitsPage","ConcurrencyLimitTitle","z","string","optional","default","SplitComponent"],"mappings":"w9BAkBO,MAAMA,GAAc,CAAC,CAC3B,UAAAC,EACA,YAAAC,EACA,GAAGC,CACJ,IAAwB,CACvB,MAAMC,EAAgBC,GAAe,CAC/B,UAAU,UAAU,UAAUA,CAAE,EACrCC,EAAM,QAAQ,WAAW,CAC1B,EAEMC,EAAMJ,EAAM,IAAI,SAEtB,cACEK,GAAA,CACA,SAAA,CAAAC,EAAAA,IAACC,GAAA,CAAoB,QAAO,GAC3B,SAAAC,EAAAA,KAACC,GAAO,QAAQ,UAAU,UAAU,aACnC,SAAA,CAAAH,EAAAA,IAAC,OAAA,CAAK,UAAU,UAAU,SAAA,YAAS,EACnCA,EAAAA,IAACI,EAAA,CAAK,GAAG,eAAe,UAAU,QAAA,CAAS,CAAA,CAAA,CAC5C,CAAA,CACD,EACAF,EAAAA,KAACG,GAAA,CAAoB,MAAM,MAC1B,SAAA,CAAAL,EAAAA,IAACM,IAAkB,SAAA,SAAA,CAAO,EAC1BN,MAACO,GAAiB,QAAS,IAAMZ,EAAaG,EAAI,EAAE,EAAG,SAAA,UAEvD,QACCS,EAAA,CAAiB,QAAS,IAAMd,EAAYK,CAAG,EAAG,SAAA,SAEnD,QACCS,EAAA,CAAiB,QAAS,IAAMf,EAAUM,CAAG,EAAG,SAAA,MAAA,CAAI,CA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,CACb,GAAI,sBACJ,OAAQ,CACP,IAAKmH,EAAY,OAAO,cAAA,CACzB,CACA,CACF,EAEC,WAAY,OAAO,YAAA,CAAA,EAErB5I,EAAAA,IAACmJ,EAAA,CACA,MAAOP,EAAY,UAAU,EAAE,eAC/B,QAAS,IAAM,CACTnH,EAAS,CACb,GAAI,sBACJ,OAAQ,CACP,IAAKmH,EAAY,UAAU,EAAE,cAAA,CAC9B,CACA,CACF,EAEC,SAAAA,EAAY,UAAU,EAAE,YAAA,CAAA,CAC1B,EACD,QACCQ,EAAA,CAAY,MAAOR,EAAY,OAAO,eACrC,SAAAE,EACF,QACCM,EAAA,CAAY,MAAOR,EAAY,UAAU,EAAE,eAC1C,SAAAG,CAAA,CACF,CAAA,EACD,CAEF,ECpEaM,GAAwB,IAEnCnJ,EAAAA,KAAC,MAAA,CAAI,UAAU,sBACd,SAAA,CAAAF,EAAAA,IAACsJ,GAAA,EAAsB,EACvBtJ,EAAAA,IAAC6I,GAAA,CACA,iBAAa/B,GAAA,EAA4B,EACzC,kBAAc2B,GAAA,CAAA,CAA6B,CAAA,CAAA,CAC5C,EACD,EAIIa,GAAwB,IAC7BtJ,EAAAA,IAAC,MAAA,CAAI,UAAU,0BACd,SAAAA,EAAAA,IAACoD,EAAA,CACA,SAAApD,EAAAA,IAACqD,EAAA,CACA,eAACC,EAAA,CAAe,UAAU,wBAAwB,SAAA,aAAA,CAElD,EACD,EACD,CAAA,CACD,ECnBoBiG,EAAS,CAC7B7H,OAAQ6H,EAAEC,EAASC,SAAAA,EACnBT,IAAKO,GAAO,CAAC,SAAU,UAAU,CAAC,EAAEG,QAAQ,QAAQ,CACrD,CAAC,EAE4D,MAAAC,GAZpDN"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as i,j as s,t as R,L as Ee,F as qe,n as it,E as ct}from"./vendor-tanstack-BcZfOOfy.js";import{ac as Xe,ad as ut,ae as dt,af as Re,ag as mt,ah as ft,ai as gt,aj as ht,ak as pt,al as xt,am as wt,an as Ae,ao as K,ap as J,aq as St,y as Q,U as Ke,q as Z,I as _,ar as vt,as as kt,at as yt,au as Ft,av as Ct,aw as jt,ax as Tt,a2 as Rt,a3 as bt,a4 as Dt,a5 as _t,a6 as Nt,p as Et,a7 as At,ay as ee,az as Mt,i as D,aA as Pt,aB as It,aC as Me,aD as Pe,C as Lt,o as zt,G as Ot,V as Ie,B as Ut,g as Vt,h as Ht,E as Bt,t as Wt,v as $t,w as Qt,x as Yt,D as Gt,aE as Je,aF as S,aG as qt,aH as Xt,aI as Le,aJ as ze,aK as Kt,aL as Oe,aM as Jt,aN as Zt,aO as es,aP as ts}from"./index-B8vo2Lrg.js";import{D as ss,W as as}from"./work-pool-filter-CSOATj2D.js";import{S as ns}from"./sort-filter-Cv8zAXMp.js";import{S as os,F as rs,a as ls}from"./flow-runs-pagination-SLbYtvaR.js";import{u as is,F as cs}from"./use-flow-runs-selected-rows-C-tehPRB.js";import{D as Ze}from"./delete-confirmation-dialog-CwDK_2QS.js";import{D as us,a as ds,b as ms,d as Y,e as fs}from"./dropdown-menu-D7Gwbd15.js";import{g as Ue,S as Ve}from"./state-colors-CAAf0Eg3.js";import{R as gs,S as hs,d as ps,X as xs,Y as ws,T as Ss,e as vs}from"./vendor-recharts-BvvJP9Po.js";import{T as ks,a as ys,b as Fs}from"./task-runs-pagination-DUy3147A.js";import{u as Cs}from"./use-delete-confirmation-dialog-CUdii6Lo.js";import{T as js}from"./tags-input-DHrnkwjQ.js";import{a as Ts}from"./zod-Cuos7J7w.js";import{c as Rs,o as et,s as T,e as G,n as q,b as bs}from"./vendor-forms-ClCIacbh.js";import{F as Ds,b as _s,c as Ns,d as Es,e as As,a as Ms}from"./form-mws4law8.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-BTiKGWfR.js";import"./vendor-date-wwuDAncJ.js";const Ps=({value:e,onValueChange:t,className:n})=>{const a=i.useMemo(()=>Xe(e),[e]),o=r=>{t(dt(r))};return s.jsx(ut,{value:a,onValueChange:o,placeholder:"All time",clearable:!0,className:n})},He=2,Is=({selectedFlows:e,onSelectFlows:t})=>{const[n,a]=i.useState(""),o=i.useDeferredValue(n),{data:r=[]}=R(Re({flows:o?{operator:"and_",name:{like_:o}}:void 0,limit:100,offset:0,sort:"NAME_ASC"})),{data:c=[]}=R(Re({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})),l=m=>{const f=new Set(e);e.has(m)?f.delete(m):f.add(m),t(f)},u=()=>{t(new Set)},g=()=>{if(e.size===0)return"All flows";const m=c.filter(w=>e.has(w.id)).map(w=>w.name),f=m.slice(0,He),h=m.length-He;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:f.join(", ")})}),h>0&&s.jsxs(J,{variant:"bodySmall",className:"shrink-0",children:["+ ",h]})]})},d=i.useMemo(()=>r.filter(m=>!o||m.name.toLowerCase().includes(o.toLowerCase())),[r,o]);return s.jsxs(mt,{children:[s.jsx(ft,{"aria-label":"Filter by flow",selected:e.size===0,children:g()}),s.jsxs(gt,{children:[s.jsx(ht,{value:n,onValueChange:a,placeholder:"Search flows..."}),s.jsxs(pt,{children:[s.jsx(xt,{children:"No flows found"}),s.jsxs(wt,{children:[s.jsxs(Ae,{"aria-label":"All flows",onSelect:u,closeOnSelect:!1,value:"__all__",children:[s.jsx(K,{checked:e.size===0}),"All flows"]}),d.map(m=>s.jsxs(Ae,{"aria-label":m.name,onSelect:()=>l(m.id),closeOnSelect:!1,value:m.id,children:[s.jsx(K,{checked:e.has(m.id)}),m.name]},m.id))]})]})]})]})},Ls=()=>{const[e,t]=Cs(),{mutateAsync:n}=St(),a=async(r,c=()=>{})=>{try{const l=await Promise.allSettled(r.map(d=>n({id:d}))),{numFails:u,numSuccess:g}=l.reduce((d,m)=>(m.status==="rejected"?d.numFails+=1:d.numSuccess+=1,d),{numFails:0,numSuccess:0});u>1?Q.error(`${u} task runs failed to delete`):u===1?Q.error("Task run failed to delete"):g>1?Q.success(`${g} task runs deleted`):Q.success("Task run deleted")}catch(l){console.error("Unknown error while deleting task run.",l)}finally{c()}};return[e,(r,c=()=>{})=>t({title:"Delete Task Runs",description:"Are you sure you want to delete selected task runs?",onConfirm:()=>{a(r,c)}})]},zs=({count:e=0,...t})=>"results"in t&&"setSelectedRows"in t&&"selectedRows"in t?s.jsx(Os,{count:e,...t}):s.jsxs(J,{variant:"bodySmall",className:"text-muted-foreground",children:[e," ",Ke(e,"Task run")]});function Os({count:e=0,results:t=[],setSelectedRows:n,selectedRows:a}){const[o,r]=Ls(),c=i.useMemo(()=>t.map(({id:g})=>g),[t]),l=Array.from(a),u=()=>{const g=c.every(f=>a.has(f)),d=c.some(f=>a.has(f));let m=!1;return g?m=!0:d&&(m="indeterminate"),s.jsx(K,{className:"block",checked:m,onCheckedChange:f=>{n(f?new Set(c):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(u,{}),s.jsxs(J,{variant:"bodySmall",className:"text-muted-foreground",children:[l.length," selected"]}),s.jsx(Z,{"aria-label":"Delete rows",size:"icon",variant:"secondary",onClick:()=>{r(l,()=>n(new Set))},children:s.jsx(_,{id:"Trash2",className:"size-4"})})]}),s.jsx(Ze,{...o})]}):s.jsxs("div",{className:"flex items-center gap-2",children:[t&&n&&a&&s.jsx(K,{className:"block",checked:!1,onCheckedChange:g=>{n(new Set(g?c:void 0))},"aria-label":"Toggle all"}),s.jsxs(J,{variant:"bodySmall",className:"text-muted-foreground",children:[e," ",Ke(e,"Task run")]})]})}const Us=e=>{const[t,n]=i.useState(new Set(e)),a=u=>n(g=>new Set(g).add(u)),o=u=>n(g=>{const d=new Set(g);return d.delete(u),d});return[t,n,{addRow:a,removeRow:o,onSelectRow:(u,g)=>{g?a(u):o(u)},clearSet:()=>n(new Set)}]},tt="Custom",Vs="Unsaved";function Hs(e){return e?e.name===tt||e.name===Vs:!0}const Bs=({currentFilter:e,savedFilters:t,onSelect:n,onSave:a,onDelete:o,onSetDefault:r,onRemoveDefault:c,permissions:l={canSave:!0,canDelete:!0}})=>{const[u,g]=i.useState(!1),d=e?.name??tt,m=Hs(e),f=m&&l.canSave,h=e?.id&&l.canDelete,w=!m,v=()=>{e?.id&&(o(e.id),g(!1))},x=()=>{e?.id&&(e.isDefault?c(e.id):r(e.id))};return s.jsxs(s.Fragment,{children:[s.jsxs(us,{children:[s.jsx(ds,{asChild:!0,children:s.jsxs(Z,{variant:"outline",className:"gap-2",children:[s.jsx(_,{id:"SlidersVertical",className:"size-4"}),s.jsx("span",{children:d}),s.jsx(_,{id:"ChevronDown",className:"size-4"})]})}),s.jsxs(ms,{align:"start",className:"min-w-[200px]",children:[t.map(p=>s.jsxs(Y,{onClick:()=>n(p),className:"flex items-center justify-between",children:[s.jsx("span",{children:p.name}),p.isDefault&&s.jsx(_,{id:"CircleCheck",className:"size-4 text-green-500"})]},p.id??p.name)),(f||h||w)&&s.jsx(fs,{}),f&&s.jsxs(Y,{onClick:a,children:[s.jsx(_,{id:"Plus",className:"mr-2 size-4"}),"Save current filters"]}),h&&s.jsxs(Y,{variant:"destructive",onClick:()=>g(!0),children:[s.jsx(_,{id:"Trash2",className:"mr-2 size-4"}),"Delete"]}),w&&s.jsxs(Y,{onClick:x,children:[s.jsx(_,{id:"CircleCheck",className:"mr-2 size-4"}),e?.isDefault?"Remove as default":"Set as default"]})]})]}),s.jsx(Ze,{isOpen:u,title:"Delete saved filter",description:`Are you sure you want to delete "${e?.name}"? This action cannot be undone.`,onConfirm:v,onClose:()=>g(!1)})]})},Ws=e=>{if(e===0)return"0s";if(e<1)return`${e.toFixed(2)}s`;const t=31536e3,n=86400,a=3600,o=60,r=Math.floor(e/t);if(r>0)return`${r}y`;const c=Math.floor(e/n);if(c>0)return`${c}d`;const l=Math.floor(e/a);if(l>0)return`${l}h`;const u=Math.floor(e/o);return u>0?`${u}m`:`${Math.ceil(e)}s`},Be=[{ms:1e3,name:"second"},{ms:5*1e3,name:"5seconds"},{ms:15*1e3,name:"15seconds"},{ms:30*1e3,name:"30seconds"},{ms:60*1e3,name:"minute"},{ms:300*1e3,name:"5minutes"},{ms:900*1e3,name:"15minutes"},{ms:1800*1e3,name:"30minutes"},{ms:3600*1e3,name:"hour"},{ms:10800*1e3,name:"3hours"},{ms:360*60*1e3,name:"6hours"},{ms:720*60*1e3,name:"12hours"},{ms:1440*60*1e3,name:"day"},{ms:10080*60*1e3,name:"week"},{ms:720*60*60*1e3,name:"month"}],$s=(e,t,n)=>{const a=t-e;if(a<=0)return[e];const o=a/n;let r=Be[0].ms;for(const u of Be){if(u.ms>=o){r=u.ms;break}r=u.ms}const c=Math.ceil(e/r)*r,l=[];for(let u=c;u<=t;u+=r)l.push(u);return l.length===0&&l.push(e),l},Qs=()=>e=>{const t=new Date(e),n=new Date(t);if(n.setMilliseconds(0),n.getTime()<t.getTime())return`.${t.getMilliseconds().toString().padStart(3,"0").slice(0,3)}`;const a=new Date(t);if(a.setSeconds(0,0),a.getTime()<t.getTime())return`:${t.getSeconds().toString().padStart(2,"0")}`;const o=new Date(t);if(o.setMinutes(0,0,0),o.getTime()<t.getTime())return t.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"});const r=new Date(t);if(r.setHours(0,0,0,0),r.getTime()<t.getTime())return t.toLocaleTimeString(void 0,{hour:"numeric",hour12:!0});const c=new Date(t);if(c.setDate(1),c.setHours(0,0,0,0),c.getTime()<t.getTime())return t.toLocaleDateString(void 0,{weekday:"short",day:"numeric"});const l=new Date(t);return l.setMonth(0,1),l.setHours(0,0,0,0),l.getTime()<t.getTime()?t.toLocaleDateString(void 0,{month:"long"}):t.getFullYear().toString()},Ys=({cx:e,cy:t,payload:n})=>{if(e===void 0||t===void 0||!n)return null;const a=Ue(n.stateType,500)||Ve[n.stateType]||"#6b7280",o=Ue(n.stateType,600)||Ve[n.stateType]||"#6b7280";return s.jsx("circle",{cx:e,cy:t,r:8,fill:a,stroke:o,strokeWidth:1,opacity:.5,className:"hover:opacity-100 transition-opacity cursor-pointer"})},Gs=({active:e,payload:t})=>{const a=t?.[0]?.payload,o=a?.id,{data:r}=R({...vt(o??""),enabled:e&&!!o,staleTime:300*1e3}),{data:c}=R({...kt(r?.flow_id??""),enabled:!!r?.flow_id,staleTime:300*1e3});if(!e||!t||t.length===0||!a)return null;const l=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:[r?.flow_id&&s.jsxs(s.Fragment,{children:[s.jsx(Ee,{to:"/flows/flow/$id",params:{id:r.flow_id},className:"font-semibold hover:underline truncate max-w-32",children:c?.name??"..."}),s.jsx(yt,{className:"size-3 flex-shrink-0"})]}),s.jsx(Ee,{to:"/runs/flow-run/$id",params:{id:a.id},className:"hover:underline truncate max-w-32",children:r?.name??a.id.slice(0,8)})]}),s.jsx("div",{children:s.jsx(Ft,{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(jt,{className:"size-4"}),Ct(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(Tt,{className:"size-4"}),l.toLocaleString()]})]})]})},qs=({history:e,startDate:t,endDate:n})=>{const a=i.useMemo(()=>e.map(l=>({x:new Date(l.timestamp).getTime(),y:l.duration,stateType:l.state_type,id:l.id,duration:l.duration,lateness:l.lateness,timestamp:l.timestamp})),[e]),o=i.useMemo(()=>{if(t&&n)return[t.getTime(),n.getTime()];if(a.length===0){const d=Date.now();return[d-1440*60*1e3,d]}const l=a.map(d=>d.x),u=Math.min(...l),g=Math.max(...l);return[u,g]},[t,n,a]),r=i.useMemo(()=>Qs(),[]),c=i.useMemo(()=>$s(o[0],o[1],10),[o]);return e.length===0?null:s.jsx("div",{className:"hidden md:block w-full h-72","data-testid":"scatter-plot",children:s.jsx(gs,{width:"100%",height:"100%",children:s.jsxs(hs,{children:[s.jsx(ps,{horizontal:!0,vertical:!1,stroke:"#cacccf",strokeDasharray:""}),s.jsx(xs,{type:"number",dataKey:"x",scale:"time",domain:o,ticks:c,tickFormatter:r,tick:{fontSize:12},tickLine:!1,axisLine:{stroke:"#e5e7eb"}}),s.jsx(ws,{type:"number",dataKey:"y",tickFormatter:Ws,tick:{fontSize:12},tickLine:!1,axisLine:{stroke:"#e5e7eb"},width:60}),s.jsx(Ss,{content:s.jsx(Gs,{}),cursor:{strokeDasharray:"3 3"},animationDuration:0}),s.jsx(vs,{data:a,shape:s.jsx(Ys,{}),isAnimationActive:!1})]})})})},Xs=et({name:T().min(1,{message:"Name is required"}).max(100,{message:"Name must be 100 characters or less"})}),Ks=({open:e,onOpenChange:t,onSave:n})=>{const a=Rs({resolver:Ts(Xs),defaultValues:{name:""}});i.useEffect(()=>{e&&a.reset({name:""})},[e,a]);const o=r=>{n(r.name),t(!1)};return s.jsx(Rt,{open:e,onOpenChange:t,children:s.jsxs(bt,{children:[s.jsx(Dt,{children:s.jsx(_t,{children:"Save Filter"})}),s.jsx(Nt,{children:"Save your current filter configuration for quick access later."}),s.jsx(Ds,{...a,children:s.jsxs("form",{onSubmit:r=>{a.handleSubmit(o)(r)},className:"space-y-4",children:[s.jsx(_s,{control:a.control,name:"name",render:({field:r})=>s.jsxs(Ns,{children:[s.jsx(Es,{children:"Filter Name"}),s.jsx(As,{children:s.jsx(Et,{autoComplete:"off",placeholder:"e.g., Failed runs this week",...r})}),s.jsx(Ms,{})]})}),s.jsxs(At,{children:[s.jsx(Z,{type:"button",variant:"outline",onClick:()=>t(!1),children:"Cancel"}),s.jsx(Z,{type:"submit",children:"Save"})]})]})})]})})},Js="prefect-ui-v2-saved-filters",Zs="prefect-ui-v2-default-filter-id",st="system-past-week",at="system-hide-scheduled";function ea(e){return e===st||e===at}const nt=[{id:st,name:"Past week",filters:{range:"past-7-days"}},{id:at,name:"Hide scheduled runs",filters:{range:"past-7-days",state:[...Mt]}}],ta=nt[0];function sa(){return`${Date.now()}-${Math.random().toString(36).substring(2,9)}`}function aa(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 r=[...a].sort(),c=[...o].sort();return r.every((l,u)=>l===c[u])};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 ot(){const[e,t]=ee(Js,[]),[n,a]=ee(Zs,null),o=i.useMemo(()=>[...nt,...e],[e]),r=i.useCallback(f=>{const h={id:sa(),name:f.name,filters:f.filters};return t(w=>[...w,h]),h},[t]),c=i.useCallback(f=>{t(h=>h.filter(w=>w.id!==f)),a(h=>h===f?null:h)},[t,a]),l=i.useCallback((f,h)=>{t(w=>w.map(v=>v.id===f?{...v,...h.name!==void 0&&{name:h.name},...h.filters!==void 0&&{filters:h.filters}}:v))},[t]),u=i.useCallback(f=>{a(f)},[a]),g=i.useCallback(f=>o.find(h=>h.id===f),[o]),d=i.useCallback(f=>o.find(h=>aa(h.filters,f)),[o]),m=i.useMemo(()=>f=>n===f,[n]);return{savedFilters:o,defaultFilterId:n,saveFilter:r,deleteFilter:c,updateFilter:l,setDefaultFilter:u,getFilterById:g,findMatchingFilter:d,isDefaultFilter:m}}const na=({tab:e,onTabChange:t,flowRunsCount:n,taskRunsCount:a,hasAnyFlowRuns:o,hasAnyTaskRuns:r,flowRuns:c,flowRunsPages:l,pagination:u,onPaginationChange:g,onPrefetchPage:d,sort:m,onSortChange:f,hideSubflows:h,onHideSubflowsChange:w,flowRunSearch:v,onFlowRunSearchChange:x,selectedStates:p,onStateFilterChange:y,selectedFlows:E,onFlowFilterChange:A,selectedDeployments:F,onDeploymentFilterChange:N,selectedTags:M,onTagsFilterChange:b,selectedWorkPools:ae,onWorkPoolFilterChange:ne,dateRange:oe,onDateRangeChange:re,flowRunHistory:le,scatterPlotDateRange:U,taskRuns:V,taskRunsPages:ie,taskRunsPagination:ce,onTaskRunsPaginationChange:ue,onTaskRunsPrefetchPage:P,taskRunsSort:de,onTaskRunsSortChange:me,taskRunSearch:fe,onTaskRunSearchChange:ge,onClearTaskRunFilters:he,currentFilter:H,savedFilters:pe,onSelectFilter:xe,onSaveFilter:we,onDeleteFilter:Se,onSetDefault:ve,onRemoveDefault:ke,isSaveDialogOpen:I,onCloseSaveDialog:L,onConfirmSave:ye})=>{const z=!o&&!r,[B,Fe,{onSelectRow:Ce}]=is(),[W,je,{onSelectRow:k}]=Us(),j=[...new Set(c.map(C=>C.flow_id))],{data:$}=R(Re({flows:{operator:"and_",id:{any_:j}},offset:0,sort:"NAME_ASC"},{enabled:j.length>0})),O=c.map(C=>({...C,flow:$?.find(Te=>Te.id===C.flow_id)}));return z?s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsx(We,{}),s.jsx(oa,{})]}):s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(We,{}),s.jsx(Bs,{currentFilter:H,savedFilters:pe,onSelect:xe,onSave:we,onDelete:Se,onSetDefault:ve,onRemoveDefault:ke,permissions:{canSave:!0,canDelete:!ea(H?.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(D,{className:"text-xs text-muted-foreground",children:"Date Range"}),s.jsx(Ps,{value:oe,onValueChange:re})]}),s.jsxs("div",{className:"flex flex-col gap-1 w-full lg:w-auto",children:[s.jsx(D,{className:"text-xs text-muted-foreground",children:"States"}),s.jsx(os,{selectedFilters:p,onSelectFilter:y})]})]}),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(D,{className:"text-xs text-muted-foreground",children:"Flows"}),s.jsx(Is,{selectedFlows:E,onSelectFlows:A})]}),s.jsxs("div",{className:"flex flex-col gap-1 w-full lg:w-auto",children:[s.jsx(D,{className:"text-xs text-muted-foreground",children:"Deployments"}),s.jsx(ss,{selectedDeployments:F,onSelectDeployments:N})]}),s.jsxs("div",{className:"flex flex-col gap-1 w-full lg:w-auto",children:[s.jsx(D,{className:"text-xs text-muted-foreground",children:"Work Pools"}),s.jsx(as,{selectedWorkPools:ae,onSelectWorkPools:ne})]}),s.jsxs("div",{className:"flex flex-col gap-1 w-full lg:w-auto",children:[s.jsx(D,{className:"text-xs text-muted-foreground",children:"Tags"}),s.jsx(js,{value:Array.from(M),onChange:C=>{const Te=Array.isArray(C)?C:[];b(new Set(Te))},placeholder:"All tags"})]})]})]}),s.jsx(Ks,{open:I,onOpenChange:L,onSave:ye}),s.jsxs(Pt,{value:e,onValueChange:t,children:[s.jsxs(It,{children:[s.jsx(Me,{value:"flow-runs",children:"Flow Runs"}),s.jsx(Me,{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(Lt,{children:s.jsx(zt,{children:s.jsx(qs,{history:le,startDate:U.startDate,endDate:U.endDate})})}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(cs,{count:n,results:O,selectedRows:B,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(Ot,{id:"hide-subflows",checked:h,onCheckedChange:w}),s.jsx(D,{htmlFor:"hide-subflows",children:"Hide subflows"})]}),s.jsx(Ie,{value:v,onChange:C=>x(C.target.value),placeholder:"Search by flow run name","aria-label":"Search by flow run name",className:"w-64",debounceMs:1200}),s.jsx(ns,{value:m,onSelect:f})]})]}),s.jsx(rs,{count:n,pages:l,pagination:u,onChangePagination:g,onPrefetchPage:d}),s.jsx(ls,{flowRuns:O,selectedRows:B,onSelect:Ce})]})}),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(zs,{count:a,results:V,selectedRows:W,setSelectedRows:je}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(Ie,{value:fe,onChange:C=>ge(C.target.value),placeholder:"Search by task run name","aria-label":"Search by task run name",className:"w-64",debounceMs:1200}),s.jsx(ks,{value:de,onSelect:me})]})]}),s.jsx(ys,{count:a,pages:ie,pagination:ce,onChangePagination:ue,onPrefetchPage:P}),s.jsx(Fs,{taskRuns:V,selectedRows:W,onSelect:k,onClearFilters:he})]})})]})]})},We=()=>s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(Ut,{children:s.jsx(Vt,{children:s.jsx(Ht,{className:"text-xl font-semibold",children:"Runs"})})})}),oa=()=>s.jsxs(Bt,{children:[s.jsx(Wt,{id:"Workflow"}),s.jsx($t,{children:"Run a task or flow to get started"}),s.jsx(Qt,{children:"Runs store the state history for each execution of a task or flow."}),s.jsx(Yt,{children:s.jsx(Gt,{id:"getting-started"})})]}),te=qe("/runs/");function ra(e){const t=l=>l?l.split(",").filter(u=>u.trim().length>0):[],n=t(e.state),a=t(e.flows),o=t(e.deployments),r=t(e["work-pools"]),c=t(e.tags);return{...n.length>0&&{state:n},...a.length>0&&{flows:a},...o.length>0&&{deployments:o},...r.length>0&&{workPools:r},...c.length>0&&{tags:c},...e.range&&{range:e.range},...e.start&&{start:e.start},...e.end&&{end:e.end}}}function rt(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 $e(e,t){return{id:e.id,name:e.name,isDefault:e.id===t}}function la(){const e=te.useSearch(),t=te.useNavigate(),{savedFilters:n,defaultFilterId:a,saveFilter:o,deleteFilter:r,setDefaultFilter:c,findMatchingFilter:l}=ot(),[u,g]=i.useState(!1),d=i.useMemo(()=>ra(e),[e]),m=i.useMemo(()=>l(d),[l,d]),f=i.useMemo(()=>n.map(F=>$e(F,a)),[n,a]),h=i.useMemo(()=>m?$e(m,a):d.state?.length||d.flows?.length||d.deployments?.length||d.workPools?.length||d.tags?.length||d.range||d.start||d.end?{id:null,name:"Unsaved",isDefault:!1}:{id:null,name:"Custom",isDefault:!1},[m,a,d]),w=i.useCallback(F=>{const N=n.find(b=>b.id===F.id);if(!N)return;const M=rt(N.filters);t({to:".",search:b=>({...b,...M,page:1}),replace:!0})},[t,n]),v=i.useCallback(()=>{g(!0)},[]),x=i.useCallback(F=>{o({name:F,filters:d}),g(!1)},[o,d]),p=i.useCallback(()=>{g(!1)},[]),y=i.useCallback(F=>{r(F)},[r]),E=i.useCallback(F=>{c(F)},[c]),A=i.useCallback(()=>{c(null)},[c]);return{currentFilter:h,savedFiltersForMenu:f,onSelectFilter:w,onSaveFilter:v,onDeleteFilter:y,onSetDefault:E,onRemoveDefault:A,isSaveDialogOpen:u,closeSaveDialog:p,confirmSave:x}}function ia(){const e=te.useNavigate(),t=te.useSearch(),{defaultFilterId:n,getFilterById:a}=ot(),o=i.useRef(!1),r=i.useMemo(()=>!!(t.state||t.flows||t.deployments||t["work-pools"]||t.tags||t.range||t.start||t.end),[t]);i.useEffect(()=>{if(o.current||r)return;let c;n&&(c=a(n)),c||(c=ta),o.current=!0;const l=rt(c.filters);e({to:".",search:u=>({...u,...l,page:1}),replace:!0})},[n,r,a,e])}const Qe=qe("/runs/"),ca=e=>e?e.split(",").filter(t=>Je.includes(t)):[],X=e=>e?e.split(",").filter(t=>t.trim().length>0):[];function ua(){const e=Qe.useSearch(),t=Qe.useNavigate(),n=i.useMemo(()=>new Set(ca(e.state??"")),[e.state]),a=i.useMemo(()=>new Set(X(e.flows??"")),[e.flows]),o=i.useMemo(()=>new Set(X(e.deployments??"")),[e.deployments]),r=i.useMemo(()=>new Set(X(e["work-pools"]??"")),[e["work-pools"]]),c=i.useMemo(()=>new Set(X(e.tags??"")),[e.tags]),l=i.useMemo(()=>({range:e.range,start:e.start,end:e.end}),[e.range,e.start,e.end]),u=i.useCallback(x=>{const p=Array.from(x);t({to:".",search:y=>({...y,state:p.length>0?p.join(","):"",page:1}),replace:!0})},[t]),g=i.useCallback(x=>{const p=Array.from(x);t({to:".",search:y=>({...y,flows:p.length>0?p.join(","):"",page:1}),replace:!0})},[t]),d=i.useCallback(x=>{const p=Array.from(x);t({to:".",search:y=>({...y,deployments:p.length>0?p.join(","):"",page:1}),replace:!0})},[t]),m=i.useCallback(x=>{const p=Array.from(x);t({to:".",search:y=>({...y,"work-pools":p.length>0?p.join(","):"",page:1}),replace:!0})},[t]),f=i.useCallback(x=>{const p=Array.from(x);t({to:".",search:y=>({...y,tags:p.length>0?p.join(","):"",page:1}),replace:!0})},[t]),h=i.useCallback(x=>{t({to:".",search:p=>({...p,range:x.range,start:x.start,end:x.end,page:1}),replace:!0})},[t]),w=i.useMemo(()=>n.size>0||a.size>0||o.size>0||r.size>0||c.size>0||l.range!==void 0||l.start!==void 0||l.end!==void 0,[n,a,o,r,c,l]),v=i.useCallback(()=>{t({to:".",search:x=>({...x,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:r,tags:c,dateRange:l,onStatesChange:u,onFlowsChange:g,onDeploymentsChange:d,onWorkPoolsChange:m,onTagsChange:f,onDateRangeChange:h,clearAllFilters:v,hasActiveFilters:w}}et({tab:G(["flow-runs","task-runs"]).optional().default("flow-runs"),page:q().int().positive().optional().default(1).catch(1),limit:q().int().positive().optional().catch(void 0),sort:G(ts).optional().default("START_TIME_DESC"),"hide-subflows":bs().optional().default(!1),"flow-run-search":T().optional().default(""),state:T().optional().default(""),flows:T().optional().default(""),deployments:T().optional().default(""),"work-pools":T().optional().default(""),tags:T().optional().default(""),range:G(es).optional(),start:T().optional(),end:T().optional(),"task-runs-page":q().int().positive().optional().default(1).catch(1),"task-runs-limit":q().int().positive().optional().catch(void 0),"task-runs-sort":G(Zt).optional().default("EXPECTED_START_TIME_DESC"),"task-run-search":T().optional().default("")});const be=e=>e?e.split(",").filter(t=>Je.includes(t)):[],se=e=>{if(!e)return;const t={range:e.range,start:e.start,end:e.end},n=Xe(t);if(!n)return;const a=Jt(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):[],lt=e=>e?e.split(",").filter(t=>t.trim().length>0):[],Ne=e=>e?e.split(",").filter(t=>t.trim().length>0):[],Ye=e=>{const t=e?.["hide-subflows"],n=e?.["flow-run-search"],a=be(e?.state??""),o=De(e?.flows??""),r=_e(e?.deployments??""),c=lt(e?.["work-pools"]??""),l=Ne(e?.tags??""),u=se(e),g=a.length>0?a:void 0,d=o.length>0?o:void 0,m=r.length>0?r:void 0,f=c.length>0?c:void 0,w=t||n||g||d||m||l.length>0||u?{operator:"and_",...t&&{parent_task_run_id:{operator:"and_",is_null_:!0}},...n&&{name:{like_:n}},...g&&{state:{operator:"and_",name:{any_:g}}},...l.length>0&&{tags:{operator:"and_",any_:l}},...u&&{expected_start_time:u}}:void 0,v=d?{operator:"and_",id:{any_:d}}:void 0,x=m?{operator:"and_",id:{any_:m}}:void 0,p=f?{operator:"and_",name:{any_:f}}:void 0;return{page:e?.page??1,limit:e?.limit??100,sort:e?.sort??"START_TIME_DESC",flow_runs:w,flows:v,deployments:x,work_pools:p}},Ge=e=>{const t=e?.["task-run-search"],n=be(e?.state??""),a=De(e?.flows??""),o=_e(e?.deployments??""),r=Ne(e?.tags??""),c=se(e),l=t?{operator:"and_",name:{like_:t}}:void 0,u=n.length>0?n:void 0,d=u||r.length>0||c?{operator:"and_",...u&&{state:{operator:"and_",name:{any_:u}}},...r.length>0&&{tags:{operator:"and_",any_:r}},...c&&{expected_start_time:c}}:void 0,m=a.length>0?a:void 0,f=m?{operator:"and_",id:{any_:m}}:void 0,h=o.length>0?o:void 0,w=h?{operator:"and_",id:{any_:h}}: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:l,flow_runs:d,flows:f,deployments:w}},da=e=>{const t=e?.["hide-subflows"],n=be(e?.state??""),a=De(e?.flows??""),o=_e(e?.deployments??""),r=lt(e?.["work-pools"]??""),c=Ne(e?.tags??""),l=se(e),u=n.length>0?n:void 0,g=a.length>0?a:void 0,d=o.length>0?o:void 0,m=r.length>0?r:void 0;return{sort:"EXPECTED_START_TIME_DESC",limit:1e3,offset:0,flow_runs:t||u||c.length>0||l?{operator:"and_",...t&&{parent_task_run_id:{operator:"and_",is_null_:!0}},...u&&{state:{operator:"and_",name:{any_:u}}},...c.length>0&&{tags:{operator:"and_",any_:c}},...l&&{expected_start_time:l}}:void 0,flows:g?{operator:"and_",id:{any_:g}}:void 0,deployments:d?{operator:"and_",id:{any_:d}}:void 0,work_pools:m?{operator:"and_",name:{any_:m}}:void 0}},ma=()=>{const e=S.useSearch(),t=S.useNavigate(),n=i.useMemo(()=>({page:e.page??1,limit:e.limit??100}),[e.page,e.limit]),a=i.useCallback(o=>{t({to:".",search:r=>({...r,page:o.page,limit:o.limit}),replace:!0})},[t]);return[n,a]},fa=()=>{const e=S.useSearch(),t=S.useNavigate(),n=i.useCallback(a=>{t({to:".",search:o=>({...o,sort:a,page:1}),replace:!0})},[t]);return[e.sort,n]},ga=()=>{const e=S.useSearch(),t=S.useNavigate(),n=i.useCallback(a=>{t({to:".",search:o=>({...o,"hide-subflows":a,page:1}),replace:!0})},[t]);return[e["hide-subflows"],n]},ha=()=>{const e=S.useSearch(),t=S.useNavigate(),n=i.useCallback(a=>{t({to:".",search:o=>({...o,tab:a,page:1}),replace:!0})},[t]);return[e.tab,n]},pa=()=>{const e=S.useSearch(),t=S.useNavigate(),n=i.useCallback(a=>{t({to:".",search:o=>({...o,"flow-run-search":a,page:1}),replace:!0})},[t]);return[e["flow-run-search"],n]},xa=()=>{const e=S.useSearch(),t=S.useNavigate(),n=i.useMemo(()=>({page:e["task-runs-page"]??1,limit:e["task-runs-limit"]??100}),[e["task-runs-page"],e["task-runs-limit"]]),a=i.useCallback(o=>{t({to:".",search:r=>({...r,"task-runs-page":o.page,"task-runs-limit":o.limit}),replace:!0})},[t]);return[n,a]},wa=()=>{const e=S.useSearch(),t=S.useNavigate(),n=i.useCallback(a=>{t({to:".",search:o=>({...o,"task-runs-sort":a,"task-runs-page":1}),replace:!0})},[t]);return[e["task-runs-sort"],n]},Sa=()=>{const e=S.useSearch(),t=S.useNavigate(),n=i.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 Oa(){const e=it(),t=S.useSearch(),n=S.useNavigate(),[a,o]=ee("workspace-flow-runs-list-limit",100),[r,c]=ee("workspace-task-runs-list-limit",100),l=i.useRef(!1);i.useEffect(()=>{if(l.current)return;l.current=!0;const k=t.limit===void 0,j=t["task-runs-limit"]===void 0;(k||j)&&n({to:".",search:$=>({...$,...k&&{limit:a},...j&&{"task-runs-limit":r}}),replace:!0})},[n,t.limit,t["task-runs-limit"],a,r]),i.useEffect(()=>{t.limit!==void 0&&t.limit!==a&&o(t.limit)},[t.limit,a,o]),i.useEffect(()=>{t["task-runs-limit"]!==void 0&&t["task-runs-limit"]!==r&&c(t["task-runs-limit"])},[t["task-runs-limit"],r,c]);const[u,g]=ma(),[d,m]=fa(),[f,h]=ga(),[w,v]=ha(),[x,p]=pa(),{states:y,flows:E,deployments:A,workPools:F,tags:N,dateRange:M,onStatesChange:b,onFlowsChange:ae,onDeploymentsChange:ne,onWorkPoolsChange:oe,onTagsChange:re,onDateRangeChange:le}=ua(),[U,V]=xa(),[ie,ce]=wa(),[ue,P]=Sa(),{currentFilter:de,savedFiltersForMenu:me,onSelectFilter:fe,onSaveFilter:ge,onDeleteFilter:he,onSetDefault:H,onRemoveDefault:pe,isSaveDialogOpen:xe,closeSaveDialog:we,confirmSave:Se}=la();ia();const[{data:ve},{data:ke}]=ct({queries:[qt(),Xt()]}),{data:I}=R(Le(Ye(t),3e4)),{data:L}=R(ze(Ge(t),3e4)),{data:ye}=R(Kt(da(t),3e4)),z=I?.results??[],B=L?.results??[],Fe=i.useMemo(()=>{const k=se(t);return{startDate:k?.after_?new Date(k.after_):void 0,endDate:k?.before_?new Date(k.before_):void 0}},[t]);i.useEffect(()=>{const k=z.map(j=>j.id);k.length>0&&e.prefetchQuery(Oe(k))},[e,z]);const Ce=i.useCallback(k=>{const j=Ye({...t,page:k});(async()=>{const O=(await e.ensureQueryData(Le(j,3e4)))?.results?.map(C=>C.id)??[];O.length>0&&e.prefetchQuery(Oe(O))})()},[e,t]),W=i.useCallback(k=>{const j=Ge({...t,"task-runs-page":k});e.prefetchQuery(ze(j,3e4))},[e,t]),je=i.useCallback(()=>{P("")},[P]);return s.jsx(na,{tab:w,onTabChange:v,flowRunsCount:I?.count??0,taskRunsCount:L?.count??0,hasAnyFlowRuns:(ve??0)>0,hasAnyTaskRuns:(ke??0)>0,flowRuns:z,flowRunsPages:I?.pages??0,pagination:u,onPaginationChange:g,onPrefetchPage:Ce,sort:d,onSortChange:m,hideSubflows:f,onHideSubflowsChange:h,flowRunSearch:x,onFlowRunSearchChange:p,selectedStates:y,onStateFilterChange:b,selectedFlows:E,onFlowFilterChange:ae,selectedDeployments:A,onDeploymentFilterChange:ne,selectedTags:N,onTagsFilterChange:re,selectedWorkPools:F,onWorkPoolFilterChange:oe,dateRange:M,onDateRangeChange:le,flowRunHistory:ye??[],scatterPlotDateRange:Fe,taskRuns:B,taskRunsPages:L?.pages??0,taskRunsPagination:U,onTaskRunsPaginationChange:V,onTaskRunsPrefetchPage:W,taskRunsSort:ie,onTaskRunsSortChange:ce,taskRunSearch:ue,onTaskRunSearchChange:P,onClearTaskRunFilters:je,currentFilter:de,savedFilters:me,onSelectFilter:fe,onSaveFilter:ge,onDeleteFilter:he,onSetDefault:H,onRemoveDefault:pe,isSaveDialogOpen:xe,onCloseSaveDialog:we,onConfirmSave:Se})}export{Oa as component};
|
|
2
|
+
//# sourceMappingURL=index-BpKoubXu.js.map
|