prefect 3.6.14.dev3__py3-none-any.whl → 3.6.14.dev5__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/_build_info.py +3 -3
- prefect/events/clients.py +36 -3
- prefect/futures.py +17 -4
- prefect/runner/runner.py +113 -29
- prefect/server/api/events.py +3 -2
- prefect/server/ui-v2/assets/{artifact-card-CNabu-6j.js → artifact-card-DprxJzPy.js} +2 -2
- prefect/server/ui-v2/assets/{artifact-card-CNabu-6j.js.map → artifact-card-DprxJzPy.js.map} +1 -1
- prefect/server/ui-v2/assets/{artifact._id-Emkhr_0h.js → artifact._id-CXcnU7_U.js} +2 -2
- prefect/server/ui-v2/assets/{artifact._id-Emkhr_0h.js.map → artifact._id-CXcnU7_U.js.map} +1 -1
- prefect/server/ui-v2/assets/{automation-schema-CRKJHa4q.js → automation-schema-crrFcHTg.js} +2 -2
- prefect/server/ui-v2/assets/{automation-schema-CRKJHa4q.js.map → automation-schema-crrFcHTg.js.map} +1 -1
- prefect/server/ui-v2/assets/{automation-wizard-Cej8aik5.js → automation-wizard-DPKDA6ji.js} +2 -2
- prefect/server/ui-v2/assets/{automation-wizard-Cej8aik5.js.map → automation-wizard-DPKDA6ji.js.map} +1 -1
- prefect/server/ui-v2/assets/automation._id-BvFFkDrn.js +2 -0
- prefect/server/ui-v2/assets/{automation._id-Bm1T3_NO.js.map → automation._id-BvFFkDrn.js.map} +1 -1
- prefect/server/ui-v2/assets/{automation_._id.edit-C5NIVfxR.js → automation_._id.edit-vpFy8Znl.js} +2 -2
- prefect/server/ui-v2/assets/{automation_._id.edit-C5NIVfxR.js.map → automation_._id.edit-vpFy8Znl.js.map} +1 -1
- prefect/server/ui-v2/assets/{automations-header-CdJSlWw8.js → automations-header-eG-shDxp.js} +2 -2
- prefect/server/ui-v2/assets/{automations-header-CdJSlWw8.js.map → automations-header-eG-shDxp.js.map} +1 -1
- prefect/server/ui-v2/assets/{base-job-template-form-section-DX_X28oU.js → base-job-template-form-section-du3c8HMM.js} +2 -2
- prefect/server/ui-v2/assets/{base-job-template-form-section-DX_X28oU.js.map → base-job-template-form-section-du3c8HMM.js.map} +1 -1
- prefect/server/ui-v2/assets/{block-type-details-BcpcwaJS.js → block-type-details-CIGWaz9i.js} +2 -2
- prefect/server/ui-v2/assets/{block-type-details-BcpcwaJS.js.map → block-type-details-CIGWaz9i.js.map} +1 -1
- prefect/server/ui-v2/assets/block-type-logo-B3oMH8dS.js +2 -0
- prefect/server/ui-v2/assets/{block-type-logo-ox5VqJuy.js.map → block-type-logo-B3oMH8dS.js.map} +1 -1
- prefect/server/ui-v2/assets/{block._id-BD6wu3yC.js → block._id-Cay2vm3g.js} +2 -2
- prefect/server/ui-v2/assets/{block._id-BD6wu3yC.js.map → block._id-Cay2vm3g.js.map} +1 -1
- prefect/server/ui-v2/assets/{block_._id.edit-aneXPzUW.js → block_._id.edit-bNSemu_v.js} +2 -2
- prefect/server/ui-v2/assets/{block_._id.edit-aneXPzUW.js.map → block_._id.edit-bNSemu_v.js.map} +1 -1
- prefect/server/ui-v2/assets/{catalog-C7ttFKuv.js → catalog-B3SdxUVJ.js} +2 -2
- prefect/server/ui-v2/assets/{catalog-C7ttFKuv.js.map → catalog-B3SdxUVJ.js.map} +1 -1
- prefect/server/ui-v2/assets/{catalog_._slug-CrcphBbo.js → catalog_._slug-BfQw_9GK.js} +2 -2
- prefect/server/ui-v2/assets/{catalog_._slug-CrcphBbo.js.map → catalog_._slug-BfQw_9GK.js.map} +1 -1
- prefect/server/ui-v2/assets/{catalog_._slug_.create-Dd7ATIKq.js → catalog_._slug_.create-k_HRDFv7.js} +2 -2
- prefect/server/ui-v2/assets/{catalog_._slug_.create-Dd7ATIKq.js.map → catalog_._slug_.create-k_HRDFv7.js.map} +1 -1
- prefect/server/ui-v2/assets/{collapsible-D5U2XK4R.js → collapsible-CjJyAdbn.js} +2 -2
- prefect/server/ui-v2/assets/{collapsible-D5U2XK4R.js.map → collapsible-CjJyAdbn.js.map} +1 -1
- prefect/server/ui-v2/assets/{concurrency-limit._id-D-xV_tiF.js → concurrency-limit._id-B3Gnqcjc.js} +2 -2
- prefect/server/ui-v2/assets/{concurrency-limit._id-D-xV_tiF.js.map → concurrency-limit._id-B3Gnqcjc.js.map} +1 -1
- prefect/server/ui-v2/assets/create-AIgXW0ut.js +2 -0
- prefect/server/ui-v2/assets/{create-Da7OBOa5.js.map → create-AIgXW0ut.js.map} +1 -1
- prefect/server/ui-v2/assets/create-CWAzl36x.js +2 -0
- prefect/server/ui-v2/assets/{create-CiMo25er.js.map → create-CWAzl36x.js.map} +1 -1
- prefect/server/ui-v2/assets/cronstrue-IJcBJ9tZ.js +2 -0
- prefect/server/ui-v2/assets/cronstrue-IJcBJ9tZ.js.map +1 -0
- prefect/server/ui-v2/assets/{data-table-Bfa8_ZJd.js → data-table-B3EtpFhV.js} +2 -2
- prefect/server/ui-v2/assets/{data-table-Bfa8_ZJd.js.map → data-table-B3EtpFhV.js.map} +1 -1
- prefect/server/ui-v2/assets/{delete-confirmation-dialog-D18TITKv.js → delete-confirmation-dialog-DyUMWSB-.js} +2 -2
- prefect/server/ui-v2/assets/{delete-confirmation-dialog-D18TITKv.js.map → delete-confirmation-dialog-DyUMWSB-.js.map} +1 -1
- prefect/server/ui-v2/assets/deployment-action-header-BJ8WZ6O0.js +2 -0
- prefect/server/ui-v2/assets/{deployment-action-header-AamGn0qI.js.map → deployment-action-header-BJ8WZ6O0.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment-form-QIRH-pew.js → deployment-form-DXZUK11h.js} +3 -3
- prefect/server/ui-v2/assets/{deployment-form-QIRH-pew.js.map → deployment-form-DXZUK11h.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment-links-yTRvIDd3.js → deployment-links-bbtRf3OX.js} +2 -2
- prefect/server/ui-v2/assets/{deployment-links-yTRvIDd3.js.map → deployment-links-bbtRf3OX.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment._id-m4luvPWl.js → deployment._id-DFzzDIAz.js} +2 -2
- prefect/server/ui-v2/assets/{deployment._id-m4luvPWl.js.map → deployment._id-DFzzDIAz.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment._id-CCBPOCfw.js → deployment._id-GmnYU2jN.js} +2 -2
- prefect/server/ui-v2/assets/{deployment._id-CCBPOCfw.js.map → deployment._id-GmnYU2jN.js.map} +1 -1
- prefect/server/ui-v2/assets/deployment_._id.duplicate--_rm26pJ.js +2 -0
- prefect/server/ui-v2/assets/{deployment_._id.duplicate-DFjSeYn4.js.map → deployment_._id.duplicate--_rm26pJ.js.map} +1 -1
- prefect/server/ui-v2/assets/deployment_._id.edit-BS799pF4.js +2 -0
- prefect/server/ui-v2/assets/{deployment_._id.edit-5-mFOphJ.js.map → deployment_._id.edit-BS799pF4.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment_._id.run-CwVe5hPJ.js → deployment_._id.run-c02Fu6v1.js} +2 -2
- prefect/server/ui-v2/assets/{deployment_._id.run-CwVe5hPJ.js.map → deployment_._id.run-c02Fu6v1.js.map} +1 -1
- prefect/server/ui-v2/assets/{dropdown-menu-g64QiYKu.js → dropdown-menu-6cSdnzsr.js} +2 -2
- prefect/server/ui-v2/assets/{dropdown-menu-g64QiYKu.js.map → dropdown-menu-6cSdnzsr.js.map} +1 -1
- prefect/server/ui-v2/assets/{event-resource-display-BqqHFc0B.js → event-resource-display-DeFGeJR9.js} +2 -2
- prefect/server/ui-v2/assets/{event-resource-display-BqqHFc0B.js.map → event-resource-display-DeFGeJR9.js.map} +1 -1
- prefect/server/ui-v2/assets/{event._eventDate._eventId-BR0eukkm.js → event._eventDate._eventId-CKnfHNoF.js} +2 -2
- prefect/server/ui-v2/assets/{event._eventDate._eventId-BR0eukkm.js.map → event._eventDate._eventId-CKnfHNoF.js.map} +1 -1
- prefect/server/ui-v2/assets/{flow-run-graph-kZfaIevn.js → flow-run-graph-aynL8fbE.js} +2 -2
- prefect/server/ui-v2/assets/{flow-run-graph-kZfaIevn.js.map → flow-run-graph-aynL8fbE.js.map} +1 -1
- prefect/server/ui-v2/assets/flow-run._id-4lwBtUgU.js +2 -0
- prefect/server/ui-v2/assets/{flow-run._id-DiA0_X5m.js.map → flow-run._id-4lwBtUgU.js.map} +1 -1
- prefect/server/ui-v2/assets/flow-run._id-CT2imMDV.js +2 -0
- prefect/server/ui-v2/assets/{flow-run._id-Caq--9Lr.js.map → flow-run._id-CT2imMDV.js.map} +1 -1
- prefect/server/ui-v2/assets/{flow-run._id-BX0UeXTj.js → flow-run._id-s3t6dDIS.js} +4 -4
- prefect/server/ui-v2/assets/{flow-run._id-BX0UeXTj.js.map → flow-run._id-s3t6dDIS.js.map} +1 -1
- prefect/server/ui-v2/assets/{flow-runs-pagination-CoZZ-ed_.js → flow-runs-pagination-DvDLs5GM.js} +2 -2
- prefect/server/ui-v2/assets/{flow-runs-pagination-CoZZ-ed_.js.map → flow-runs-pagination-DvDLs5GM.js.map} +1 -1
- prefect/server/ui-v2/assets/{flow._id-nRzTWzLb.js → flow._id-U31aNcVQ.js} +2 -2
- prefect/server/ui-v2/assets/{flow._id-nRzTWzLb.js.map → flow._id-U31aNcVQ.js.map} +1 -1
- prefect/server/ui-v2/assets/{form-CdcF42XZ.js → form-DvAgEGjn.js} +2 -2
- prefect/server/ui-v2/assets/{form-CdcF42XZ.js.map → form-DvAgEGjn.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-DkJo9Uge.js → header-Bq61DIIv.js} +2 -2
- prefect/server/ui-v2/assets/{header-DkJo9Uge.js.map → header-Bq61DIIv.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-DijI5Lcu.js → header-QiKDPn2b.js} +2 -2
- prefect/server/ui-v2/assets/{header-DijI5Lcu.js.map → header-QiKDPn2b.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-DV0gMQER.js → header-YbYlGgAg.js} +2 -2
- prefect/server/ui-v2/assets/{header-DV0gMQER.js.map → header-YbYlGgAg.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-BZ9TDxSy.js → index--QEAQOap.js} +2 -2
- prefect/server/ui-v2/assets/{index-BZ9TDxSy.js.map → index--QEAQOap.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-VUajxmNL.js → index-BJJn5VNO.js} +2 -2
- prefect/server/ui-v2/assets/{index-VUajxmNL.js.map → index-BJJn5VNO.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-DYKO0qOd.js → index-BToZEh2M.js} +2 -2
- prefect/server/ui-v2/assets/{index-DYKO0qOd.js.map → index-BToZEh2M.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-BmUvoLOK.js → index-BzE5jxe7.js} +2 -2
- prefect/server/ui-v2/assets/{index-BmUvoLOK.js.map → index-BzE5jxe7.js.map} +1 -1
- prefect/server/ui-v2/assets/index-C-uTnVrI.js +2 -0
- prefect/server/ui-v2/assets/{index-BCKNs_w7.js.map → index-C-uTnVrI.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-yTjygRmH.js → index-C19BICb6.js} +2 -2
- prefect/server/ui-v2/assets/{index-yTjygRmH.js.map → index-C19BICb6.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-Cuh3BwlA.js → index-C84_3iOG.js} +2 -2
- prefect/server/ui-v2/assets/{index-Cuh3BwlA.js.map → index-C84_3iOG.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-Chtop8D8.js → index-CGt_907f.js} +2 -2
- prefect/server/ui-v2/assets/{index-Chtop8D8.js.map → index-CGt_907f.js.map} +1 -1
- prefect/server/ui-v2/assets/index-COtFm673.js +2 -0
- prefect/server/ui-v2/assets/{index-CqvGvZOq.js.map → index-COtFm673.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-BZqccBpn.js → index-CQlQauOE.js} +6 -6
- prefect/server/ui-v2/assets/index-CQlQauOE.js.map +1 -0
- prefect/server/ui-v2/assets/{index-BGZtCgRR.js → index-CovPzmtX.js} +2 -2
- prefect/server/ui-v2/assets/{index-BGZtCgRR.js.map → index-CovPzmtX.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-BV3WqCCv.js → index-CzZJA-g2.js} +2 -2
- prefect/server/ui-v2/assets/{index-BV3WqCCv.js.map → index-CzZJA-g2.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-CUZXozY8.js → index-D9O_iUny.js} +2 -2
- prefect/server/ui-v2/assets/{index-CUZXozY8.js.map → index-D9O_iUny.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-AXV1ellj.js → index-DBhG-F3c.js} +2 -2
- prefect/server/ui-v2/assets/{index-AXV1ellj.js.map → index-DBhG-F3c.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-KlV75baW.js → index-DEijvsFf.js} +2 -2
- prefect/server/ui-v2/assets/{index-KlV75baW.js.map → index-DEijvsFf.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-DO_c3_A_.js → index-DJx6_wL3.js} +2 -2
- prefect/server/ui-v2/assets/{index-DO_c3_A_.js.map → index-DJx6_wL3.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-faXvGo5k.js → index-DzylsDQg.js} +2 -2
- prefect/server/ui-v2/assets/{index-faXvGo5k.js.map → index-DzylsDQg.js.map} +1 -1
- prefect/server/ui-v2/assets/index-MqrX6o60.js +2 -0
- prefect/server/ui-v2/assets/{index-BijfHkUE.js.map → index-MqrX6o60.js.map} +1 -1
- prefect/server/ui-v2/assets/index-Xbikq0U9.js +2 -0
- prefect/server/ui-v2/assets/{index-CUJoNEgb.js.map → index-Xbikq0U9.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-BfuGBXBN.js → index-xd6ftCzl.js} +2 -2
- prefect/server/ui-v2/assets/{index-BfuGBXBN.js.map → index-xd6ftCzl.js.map} +1 -1
- prefect/server/ui-v2/assets/{json-input-DFgWdLGv.js → json-input-CUdR2ooF.js} +2 -2
- prefect/server/ui-v2/assets/{json-input-DFgWdLGv.js.map → json-input-CUdR2ooF.js.map} +1 -1
- prefect/server/ui-v2/assets/{key._key-CpeWM0mN.js → key._key-Dkjl-3EA.js} +2 -2
- prefect/server/ui-v2/assets/{key._key-CpeWM0mN.js.map → key._key-Dkjl-3EA.js.map} +1 -1
- prefect/server/ui-v2/assets/{lazy-markdown-Bzi0YUUV.js → lazy-markdown-B5J5jhCs.js} +3 -3
- prefect/server/ui-v2/assets/{lazy-markdown-Bzi0YUUV.js.map → lazy-markdown-B5J5jhCs.js.map} +1 -1
- prefect/server/ui-v2/assets/{login-CM0nuDdd.js → login-DzDO0DVR.js} +2 -2
- prefect/server/ui-v2/assets/{login-CM0nuDdd.js.map → login-DzDO0DVR.js.map} +1 -1
- prefect/server/ui-v2/assets/{markdown-input-CGOAnaWz.js → markdown-input-BYRT3e1M.js} +2 -2
- prefect/server/ui-v2/assets/{markdown-input-CGOAnaWz.js.map → markdown-input-BYRT3e1M.js.map} +1 -1
- prefect/server/ui-v2/assets/{python-example-snippet-CyJ28Tm-.js → python-example-snippet-BMLiEUYL.js} +3 -3
- prefect/server/ui-v2/assets/{python-example-snippet-CyJ28Tm-.js.map → python-example-snippet-BMLiEUYL.js.map} +1 -1
- prefect/server/ui-v2/assets/{python-input-D8_x22t4.js → python-input-xovZoSSG.js} +2 -2
- prefect/server/ui-v2/assets/{python-input-D8_x22t4.js.map → python-input-xovZoSSG.js.map} +1 -1
- prefect/server/ui-v2/assets/{radio-group-Dgu38qwz.js → radio-group-B4HH3BMW.js} +2 -2
- prefect/server/ui-v2/assets/{radio-group-Dgu38qwz.js.map → radio-group-B4HH3BMW.js.map} +1 -1
- prefect/server/ui-v2/assets/{route-error-state-CVHTggxQ.js → route-error-state-BI1VOaRa.js} +2 -2
- prefect/server/ui-v2/assets/{route-error-state-CVHTggxQ.js.map → route-error-state-BI1VOaRa.js.map} +1 -1
- prefect/server/ui-v2/assets/schema-form-DvPKoIJV.js +2 -0
- prefect/server/ui-v2/assets/schema-form-DvPKoIJV.js.map +1 -0
- prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-DuEmswz-.js → schema-form-input-string-format-datetime-FBLeet2k.js} +4 -4
- prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-DuEmswz-.js.map → schema-form-input-string-format-datetime-FBLeet2k.js.map} +1 -1
- prefect/server/ui-v2/assets/{settings-CtKmYnoo.js → settings-LiwgpMzF.js} +2 -2
- prefect/server/ui-v2/assets/{settings-CtKmYnoo.js.map → settings-LiwgpMzF.js.map} +1 -1
- prefect/server/ui-v2/assets/{sort-filter-BNQ6rjAG.js → sort-filter-BdZ0BjdE.js} +2 -2
- prefect/server/ui-v2/assets/{sort-filter-BNQ6rjAG.js.map → sort-filter-BdZ0BjdE.js.map} +1 -1
- prefect/server/ui-v2/assets/{table-CJS-5Aky.js → table--kjjs3jN.js} +2 -2
- prefect/server/ui-v2/assets/{table-CJS-5Aky.js.map → table--kjjs3jN.js.map} +1 -1
- prefect/server/ui-v2/assets/{tags-input-CDvuqe9B.js → tags-input-9pBchAz7.js} +2 -2
- prefect/server/ui-v2/assets/{tags-input-CDvuqe9B.js.map → tags-input-9pBchAz7.js.map} +1 -1
- prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-DMqNFEVn.js → task-run-concurrency-limits-reset-dialog-B3XhJqIQ.js} +2 -2
- prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-DMqNFEVn.js.map → task-run-concurrency-limits-reset-dialog-B3XhJqIQ.js.map} +1 -1
- prefect/server/ui-v2/assets/task-run._id-BdlPyINB.js +2 -0
- prefect/server/ui-v2/assets/{task-run._id-CiVsXKpy.js.map → task-run._id-BdlPyINB.js.map} +1 -1
- prefect/server/ui-v2/assets/{task-run._id-CV5t0LR0.js → task-run._id-BnZwcX9a.js} +3 -3
- prefect/server/ui-v2/assets/{task-run._id-CV5t0LR0.js.map → task-run._id-BnZwcX9a.js.map} +1 -1
- prefect/server/ui-v2/assets/task-runs-pagination-ClbepGWu.js +2 -0
- prefect/server/ui-v2/assets/{task-runs-pagination-DGjxL4DO.js.map → task-runs-pagination-ClbepGWu.js.map} +1 -1
- prefect/server/ui-v2/assets/{textarea-Mne2s-1n.js → textarea-CjmPCtZi.js} +2 -2
- prefect/server/ui-v2/assets/{textarea-Mne2s-1n.js.map → textarea-CjmPCtZi.js.map} +1 -1
- prefect/server/ui-v2/assets/{timezone-select-CPBtT8tA.js → timezone-select-5WxUFUXB.js} +2 -2
- prefect/server/ui-v2/assets/{timezone-select-CPBtT8tA.js.map → timezone-select-5WxUFUXB.js.map} +1 -1
- prefect/server/ui-v2/assets/{toggle-group-CvPe0UY1.js → toggle-group-DjbSsHsv.js} +2 -2
- prefect/server/ui-v2/assets/{toggle-group-CvPe0UY1.js.map → toggle-group-DjbSsHsv.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-debounce-callback-Dcf0d0U7.js → use-debounce-callback-CVfZS_LP.js} +2 -2
- prefect/server/ui-v2/assets/{use-debounce-callback-Dcf0d0U7.js.map → use-debounce-callback-CVfZS_LP.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-delete-automation-confirmation-dialog-DnRkM1Cj.js → use-delete-automation-confirmation-dialog-C7nas8eR.js} +2 -2
- prefect/server/ui-v2/assets/{use-delete-automation-confirmation-dialog-DnRkM1Cj.js.map → use-delete-automation-confirmation-dialog-C7nas8eR.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-CMHtwDvb.js → use-delete-block-document-confirmation-dialog-Cz3znU4m.js} +2 -2
- prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-CMHtwDvb.js.map → use-delete-block-document-confirmation-dialog-Cz3znU4m.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-delete-confirmation-dialog-Bka9YDdO.js → use-delete-confirmation-dialog-C5d6hPL-.js} +2 -2
- prefect/server/ui-v2/assets/{use-delete-confirmation-dialog-Bka9YDdO.js.map → use-delete-confirmation-dialog-C5d6hPL-.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-DB4pe2_m.js → use-flow-runs-selected-rows-B_7PiPKo.js} +2 -2
- prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-DB4pe2_m.js.map → use-flow-runs-selected-rows-B_7PiPKo.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-DUPrB7V9.js → use-get-artifacts-flow-task-runs-BitcuQLc.js} +2 -2
- prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-DUPrB7V9.js.map → use-get-artifacts-flow-task-runs-BitcuQLc.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-is-overflowing-Cc-Qm0vx.js → use-is-overflowing-CyVH32I2.js} +2 -2
- prefect/server/ui-v2/assets/{use-is-overflowing-Cc-Qm0vx.js.map → use-is-overflowing-CyVH32I2.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-page-title-ELpQMkBC.js → use-page-title-CImKMV-D.js} +2 -2
- prefect/server/ui-v2/assets/{use-page-title-ELpQMkBC.js.map → use-page-title-CImKMV-D.js.map} +1 -1
- prefect/server/ui-v2/assets/use-quick-run-IfBGzpj9.js +2 -0
- prefect/server/ui-v2/assets/{use-quick-run-uAasMmAv.js.map → use-quick-run-IfBGzpj9.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-state-favicon-CzOUYzQe.js → use-state-favicon-kNCf3RcS.js} +2 -2
- prefect/server/ui-v2/assets/{use-state-favicon-CzOUYzQe.js.map → use-state-favicon-kNCf3RcS.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-stepper-DvHmfROo.js → use-stepper-DRdSNO1_.js} +2 -2
- prefect/server/ui-v2/assets/{use-stepper-DvHmfROo.js.map → use-stepper-DRdSNO1_.js.map} +1 -1
- prefect/server/ui-v2/assets/{utilities-XA-1-LhA.js → utilities-B74wofJY.js} +2 -2
- prefect/server/ui-v2/assets/{utilities-XA-1-LhA.js.map → utilities-B74wofJY.js.map} +1 -1
- prefect/server/ui-v2/assets/{vendor-codemirror-Dn73yRFx.js → vendor-codemirror-OTxfneaa.js} +2 -2
- prefect/server/ui-v2/assets/{vendor-codemirror-Dn73yRFx.js.map → vendor-codemirror-OTxfneaa.js.map} +1 -1
- prefect/server/ui-v2/assets/{vendor-date-Bxa7CHB1.js → vendor-date-CRz8gtWZ.js} +2 -2
- prefect/server/ui-v2/assets/{vendor-date-Bxa7CHB1.js.map → vendor-date-CRz8gtWZ.js.map} +1 -1
- prefect/server/ui-v2/assets/{vendor-forms-mroZAMaw.js → vendor-forms-D-iybWES.js} +2 -2
- prefect/server/ui-v2/assets/{vendor-forms-mroZAMaw.js.map → vendor-forms-D-iybWES.js.map} +1 -1
- prefect/server/ui-v2/assets/{vendor-markdown-BV905mMk.js → vendor-markdown-TdbL8FCd.js} +2 -2
- prefect/server/ui-v2/assets/{vendor-markdown-BV905mMk.js.map → vendor-markdown-TdbL8FCd.js.map} +1 -1
- prefect/server/ui-v2/assets/{vendor-radix-CP6hQtRc.js → vendor-radix-DRMjKWJW.js} +5 -5
- prefect/server/ui-v2/assets/{vendor-radix-CP6hQtRc.js.map → vendor-radix-DRMjKWJW.js.map} +1 -1
- prefect/server/ui-v2/assets/{vendor-recharts-BOcghvr2.js → vendor-recharts-BGjDGXVf.js} +2 -2
- prefect/server/ui-v2/assets/{vendor-recharts-BOcghvr2.js.map → vendor-recharts-BGjDGXVf.js.map} +1 -1
- prefect/server/ui-v2/assets/{vendor-tanstack-CLpbOGYv.js → vendor-tanstack-CWDKYA_B.js} +2 -2
- prefect/server/ui-v2/assets/{vendor-tanstack-CLpbOGYv.js.map → vendor-tanstack-CWDKYA_B.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool-filter-D4DI4Hd5.js → work-pool-filter-BD0cywQF.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool-filter-D4DI4Hd5.js.map → work-pool-filter-BD0cywQF.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool-queue-toggle--tVsqhDi.js → work-pool-queue-toggle-Dd3mOecD.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool-queue-toggle--tVsqhDi.js.map → work-pool-queue-toggle-Dd3mOecD.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool._workPoolName-Ba0XSN4m.js → work-pool._workPoolName-Dxf0Y-lV.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool._workPoolName-Ba0XSN4m.js.map → work-pool._workPoolName-Dxf0Y-lV.js.map} +1 -1
- prefect/server/ui-v2/assets/work-pool_._workPoolName.edit-B0Y9VwYX.js +2 -0
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-CeYLESXS.js.map → work-pool_._workPoolName.edit-B0Y9VwYX.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-CHvlnO-U.js → work-pool_._workPoolName.queue._workQueueName-ZHSn4vVg.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-CHvlnO-U.js.map → work-pool_._workPoolName.queue._workQueueName-ZHSn4vVg.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-queue-icon-text-DnQAtUi_.js → work-queue-icon-text-GE7b8Ro1.js} +2 -2
- prefect/server/ui-v2/assets/{work-queue-icon-text-DnQAtUi_.js.map → work-queue-icon-text-GE7b8Ro1.js.map} +1 -1
- prefect/server/ui-v2/assets/{zod-cc-7bk3x.js → zod-CjGf5GIv.js} +2 -2
- prefect/server/ui-v2/assets/{zod-cc-7bk3x.js.map → zod-CjGf5GIv.js.map} +1 -1
- prefect/server/ui-v2/index.html +6 -6
- prefect/server/utilities/subscriptions.py +25 -8
- prefect/testing/fixtures.py +31 -1
- {prefect-3.6.14.dev3.dist-info → prefect-3.6.14.dev5.dist-info}/METADATA +2 -2
- {prefect-3.6.14.dev3.dist-info → prefect-3.6.14.dev5.dist-info}/RECORD +235 -235
- prefect/server/ui-v2/assets/automation._id-Bm1T3_NO.js +0 -2
- prefect/server/ui-v2/assets/block-type-logo-ox5VqJuy.js +0 -2
- prefect/server/ui-v2/assets/create-CiMo25er.js +0 -2
- prefect/server/ui-v2/assets/create-Da7OBOa5.js +0 -2
- prefect/server/ui-v2/assets/cronstrue-CeanGOEE.js +0 -2
- prefect/server/ui-v2/assets/cronstrue-CeanGOEE.js.map +0 -1
- prefect/server/ui-v2/assets/deployment-action-header-AamGn0qI.js +0 -2
- prefect/server/ui-v2/assets/deployment_._id.duplicate-DFjSeYn4.js +0 -2
- prefect/server/ui-v2/assets/deployment_._id.edit-5-mFOphJ.js +0 -2
- prefect/server/ui-v2/assets/flow-run._id-Caq--9Lr.js +0 -2
- prefect/server/ui-v2/assets/flow-run._id-DiA0_X5m.js +0 -2
- prefect/server/ui-v2/assets/index-BCKNs_w7.js +0 -2
- prefect/server/ui-v2/assets/index-BZqccBpn.js.map +0 -1
- prefect/server/ui-v2/assets/index-BijfHkUE.js +0 -2
- prefect/server/ui-v2/assets/index-CUJoNEgb.js +0 -2
- prefect/server/ui-v2/assets/index-CqvGvZOq.js +0 -2
- prefect/server/ui-v2/assets/schema-form-DqRLX--T.js +0 -2
- prefect/server/ui-v2/assets/schema-form-DqRLX--T.js.map +0 -1
- prefect/server/ui-v2/assets/task-run._id-CiVsXKpy.js +0 -2
- prefect/server/ui-v2/assets/task-runs-pagination-DGjxL4DO.js +0 -2
- prefect/server/ui-v2/assets/use-quick-run-uAasMmAv.js +0 -2
- prefect/server/ui-v2/assets/work-pool_._workPoolName.edit-CeYLESXS.js +0 -2
- {prefect-3.6.14.dev3.dist-info → prefect-3.6.14.dev5.dist-info}/WHEEL +0 -0
- {prefect-3.6.14.dev3.dist-info → prefect-3.6.14.dev5.dist-info}/entry_points.txt +0 -0
- {prefect-3.6.14.dev3.dist-info → prefect-3.6.14.dev5.dist-info}/licenses/LICENSE +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-runs-pagination-CoZZ-ed_.js","sources":["../../src/components/flow-runs/flow-runs-list/flow-runs-filters/state-filter.tsx","../../src/components/flow-runs/flow-runs-list/flow-runs-list.tsx","../../src/components/flow-runs/flow-runs-list/flow-runs-pagination.tsx"],"sourcesContent":["import { useMemo, useState } from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport { Checkbox } from \"@/components/ui/checkbox\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { Icon } from \"@/components/ui/icons\";\nimport { StateBadge } from \"@/components/ui/state-badge\";\nimport { Typography } from \"@/components/ui/typography\";\nimport {\n\tFLOW_RUN_STATES_MAP,\n\tFLOW_RUN_STATES_NO_SCHEDULED,\n\ttype FlowRunState,\n} from \"./state-filters.constants\";\n\nconst MAX_FILTERS_DISPLAYED = 2;\n\ntype StateFilterProps = {\n\tdefaultValue?: Set<FlowRunState>;\n\tselectedFilters: Set<FlowRunState> | undefined;\n\tonSelectFilter: (filters: Set<FlowRunState>) => void;\n};\n\nexport const StateFilter = ({\n\tdefaultValue,\n\tselectedFilters = defaultValue || new Set(),\n\tonSelectFilter,\n}: StateFilterProps) => {\n\tconst [open, setOpen] = useState(false);\n\n\tconst isAllButScheduled = useMemo(() => {\n\t\tconst flowRunStatesNoScheduleSet = new Set<FlowRunState>(\n\t\t\tFLOW_RUN_STATES_NO_SCHEDULED,\n\t\t);\n\t\tif (\n\t\t\tselectedFilters.has(\"Scheduled\") ||\n\t\t\tflowRunStatesNoScheduleSet.size !== selectedFilters.size\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\t\treturn Array.from(selectedFilters).every((filter) =>\n\t\t\tflowRunStatesNoScheduleSet.has(filter),\n\t\t);\n\t}, [selectedFilters]);\n\n\tconst handleSelectAllExceptScheduled = () => {\n\t\tonSelectFilter(new Set(FLOW_RUN_STATES_NO_SCHEDULED));\n\t};\n\n\tconst handleSelectAllRunState = () => {\n\t\tonSelectFilter(new Set());\n\t};\n\n\tconst handleSelectFilter = (filter: FlowRunState) => {\n\t\t// if all but scheduled is already selected, create a new set with the single filter\n\t\tif (isAllButScheduled) {\n\t\t\tonSelectFilter(new Set([filter]));\n\t\t\treturn;\n\t\t}\n\t\tconst updatedFilters = new Set(selectedFilters);\n\t\tif (selectedFilters.has(filter)) {\n\t\t\tupdatedFilters.delete(filter);\n\t\t} else {\n\t\t\tupdatedFilters.add(filter);\n\t\t}\n\t\tonSelectFilter(updatedFilters);\n\t};\n\n\tconst renderSelectedTags = () => {\n\t\tif (selectedFilters.size === 0) {\n\t\t\treturn \"All run states\";\n\t\t}\n\t\tif (isAllButScheduled) {\n\t\t\treturn \"All except scheduled\";\n\t\t}\n\n\t\tconst selected = Array.from(selectedFilters);\n\t\tconst visible = selected.slice(0, MAX_FILTERS_DISPLAYED);\n\t\tconst extraCount = selected.length - MAX_FILTERS_DISPLAYED;\n\n\t\treturn (\n\t\t\t<div className=\"flex flex-1 min-w-0 items-center gap-2\">\n\t\t\t\t<div className=\"flex flex-1 min-w-0 items-center gap-2 overflow-hidden\">\n\t\t\t\t\t{visible.map((filter) => (\n\t\t\t\t\t\t<StateBadge\n\t\t\t\t\t\t\tkey={filter}\n\t\t\t\t\t\t\tname={filter}\n\t\t\t\t\t\t\ttype={FLOW_RUN_STATES_MAP[filter]}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t\t{extraCount > 0 && (\n\t\t\t\t\t<Typography variant=\"bodySmall\" className=\"shrink-0\">\n\t\t\t\t\t\t+ {extraCount}\n\t\t\t\t\t</Typography>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t};\n\n\treturn (\n\t\t<DropdownMenu open={open} onOpenChange={setOpen}>\n\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tclassName=\"justify-between w-full bg-card dark:bg-background\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"flex-1 min-w-0\">{renderSelectedTags()}</span>\n\t\t\t\t\t<Icon id=\"ChevronDown\" className=\"ml-2 size-4 shrink-0\" />\n\t\t\t\t</Button>\n\t\t\t</DropdownMenuTrigger>\n\t\t\t<DropdownMenuContent className=\"max-h-96 overflow-x-hidden overflow-y-auto\">\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tonSelect={(e) => {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\thandleSelectAllExceptScheduled();\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<Checkbox checked={isAllButScheduled} className=\"mr-2\" />\n\t\t\t\t\tAll except scheduled\n\t\t\t\t</DropdownMenuItem>\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tonSelect={(e) => {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\thandleSelectAllRunState();\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<Checkbox checked={selectedFilters.size === 0} className=\"mr-2\" />\n\t\t\t\t\tAll run states\n\t\t\t\t</DropdownMenuItem>\n\t\t\t\t{Object.keys(FLOW_RUN_STATES_MAP).map((filterKey) => (\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\taria-label={filterKey}\n\t\t\t\t\t\tkey={filterKey}\n\t\t\t\t\t\tonSelect={(e) => {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\thandleSelectFilter(filterKey as FlowRunState);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Checkbox\n\t\t\t\t\t\t\taria-label={filterKey}\n\t\t\t\t\t\t\tclassName=\"mr-2\"\n\t\t\t\t\t\t\tchecked={\n\t\t\t\t\t\t\t\t!isAllButScheduled &&\n\t\t\t\t\t\t\t\tselectedFilters.has(filterKey as FlowRunState)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<StateBadge\n\t\t\t\t\t\t\tname={filterKey}\n\t\t\t\t\t\t\ttype={FLOW_RUN_STATES_MAP[filterKey as FlowRunState]}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t))}\n\t\t\t</DropdownMenuContent>\n\t\t</DropdownMenu>\n\t);\n};\n","import {\n\tFlowRunCard,\n\ttype FlowRunCardData,\n} from \"@/components/flow-runs/flow-run-card\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card } from \"@/components/ui/card\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\nimport { Typography } from \"@/components/ui/typography\";\n\ntype FlowRunCardProps =\n\t| {\n\t\t\tflowRuns: Array<FlowRunCardData> | undefined;\n\t\t\tonClearFilters?: () => void;\n\t }\n\t| {\n\t\t\tflowRuns: Array<FlowRunCardData> | undefined;\n\t\t\tonSelect: (id: string, checked: boolean) => void;\n\t\t\tselectedRows: Set<string>;\n\t\t\tonClearFilters?: () => void;\n\t };\n\nexport const FlowRunsList = ({\n\tflowRuns,\n\tonClearFilters,\n\t...props\n}: FlowRunCardProps) => {\n\tif (!flowRuns) {\n\t\treturn <LoadingSkeleton numSkeletons={5} />;\n\t}\n\n\tif (flowRuns.length === 0) {\n\t\treturn (\n\t\t\t<div className=\"flex justify-center py-4\">\n\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t<Typography>No runs found</Typography>\n\t\t\t\t\t{onClearFilters && (\n\t\t\t\t\t\t<Button onClick={onClearFilters}>Clear Filters</Button>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<ul className=\"flex flex-col gap-2\">\n\t\t\t{flowRuns.map((flowRun) => {\n\t\t\t\t// Variant for selectable list\n\t\t\t\tif (\"onSelect\" in props && \"selectedRows\" in props) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<li key={flowRun.id}>\n\t\t\t\t\t\t\t<FlowRunCard\n\t\t\t\t\t\t\t\tflowRun={flowRun}\n\t\t\t\t\t\t\t\tchecked={props.selectedRows.has(flowRun.id)}\n\t\t\t\t\t\t\t\tonCheckedChange={(checked) =>\n\t\t\t\t\t\t\t\t\tprops.onSelect(flowRun.id, checked)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<li key={flowRun.id}>\n\t\t\t\t\t\t<FlowRunCard flowRun={flowRun} />\n\t\t\t\t\t</li>\n\t\t\t\t);\n\t\t\t})}\n\t\t</ul>\n\t);\n};\n\ntype LoadingSkeletonProps = {\n\tnumSkeletons?: number;\n};\nconst LoadingSkeleton = ({ numSkeletons = 1 }: LoadingSkeletonProps) => (\n\t<ul className=\"flex flex-col gap-1\">\n\t\t{Array.from({ length: numSkeletons }).map((_, i) => (\n\t\t\t// biome-ignore lint/suspicious/noArrayIndexKey: okay for static skeleton list\n\t\t\t<li key={i}>\n\t\t\t\t<Card className=\"flex flex-col gap-2 p-4\">\n\t\t\t\t\t<div className=\"flex justify-between\">\n\t\t\t\t\t\t<Skeleton className=\"h-4 w-[350px]\" />\n\t\t\t\t\t\t<Skeleton className=\"h-4 w-[400px]\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<Skeleton className=\"h-4 w-[400px]\" />\n\t\t\t\t\t<Skeleton className=\"h-4 w-[200px]\" />\n\t\t\t\t</Card>\n\t\t\t</li>\n\t\t))}\n\t</ul>\n);\n","import {\n\tPagination,\n\tPaginationContent,\n\tPaginationFirstButton,\n\tPaginationItem,\n\tPaginationLastButton,\n\tPaginationNextButton,\n\tPaginationPreviousButton,\n} from \"@/components/ui/pagination\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\n\nconst PAGINATION_INCREMENTS = [5, 10, 25, 50, 100];\n\nexport type PaginationState = {\n\tlimit: number;\n\tpage: number;\n};\nexport type PaginationStateUpdater = (\n\tprevState: PaginationState,\n) => PaginationState;\n\ntype FlowRunsPaginationProps = {\n\tcount: number;\n\tpages: number;\n\tpagination: PaginationState;\n\tonChangePagination: (pagination: PaginationState) => void;\n\tonPrefetchPage?: (page: number) => void;\n};\nexport const FlowRunsPagination = ({\n\tcount,\n\tpages,\n\tpagination,\n\tonChangePagination,\n\tonPrefetchPage,\n}: FlowRunsPaginationProps) => {\n\tconst handleFirstPage = () =>\n\t\tonChangePagination({ limit: pagination.limit, page: 1 });\n\tconst handlePreviousPage = () =>\n\t\tonChangePagination({ limit: pagination.limit, page: pagination.page - 1 });\n\tconst handleNextPage = () =>\n\t\tonChangePagination({ limit: pagination.limit, page: pagination.page + 1 });\n\n\tconst handleLastPage = () =>\n\t\tonChangePagination({ limit: pagination.limit, page: pages });\n\n\tconst handlePrefetchFirstPage = () => {\n\t\tif (pagination.page > 1) onPrefetchPage?.(1);\n\t};\n\tconst handlePrefetchPreviousPage = () => {\n\t\tif (pagination.page > 1) onPrefetchPage?.(pagination.page - 1);\n\t};\n\tconst handlePrefetchNextPage = () => {\n\t\tif (pagination.page < pages) onPrefetchPage?.(pagination.page + 1);\n\t};\n\tconst handlePrefetchLastPage = () => {\n\t\tif (pagination.page < pages) onPrefetchPage?.(pages);\n\t};\n\n\tconst disablePreviousPage = pagination.page <= 1;\n\tconst disableNextPage = pagination.page >= pages;\n\n\tconst handleChangeLimit = (value: string) => {\n\t\tconst newLimit = Number(value);\n\t\tconst newTotalPages = Math.ceil(count / newLimit);\n\t\tconst newPage = Math.min(pagination.page, newTotalPages);\n\t\tonChangePagination({\n\t\t\tlimit: newLimit,\n\t\t\tpage: newPage,\n\t\t});\n\t};\n\n\treturn (\n\t\t<div className=\"flex flex-row justify-between items-center\">\n\t\t\t<div className=\"flex flex-row items-center gap-2 text-xs text-muted-foreground\">\n\t\t\t\t<span className=\"whitespace-nowrap\">Items per page</span>\n\t\t\t\t<Select\n\t\t\t\t\tvalue={String(pagination.limit)}\n\t\t\t\t\tonValueChange={handleChangeLimit}\n\t\t\t\t>\n\t\t\t\t\t<SelectTrigger aria-label=\"Items per page\">\n\t\t\t\t\t\t<SelectValue placeholder=\"Theme\" />\n\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t{PAGINATION_INCREMENTS.map((increment) => (\n\t\t\t\t\t\t\t<SelectItem key={increment} value={String(increment)}>\n\t\t\t\t\t\t\t\t{increment}\n\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</SelectContent>\n\t\t\t\t</Select>\n\t\t\t</div>\n\t\t\t<Pagination className=\"justify-end\">\n\t\t\t\t<PaginationContent>\n\t\t\t\t\t<PaginationItem>\n\t\t\t\t\t\t<PaginationFirstButton\n\t\t\t\t\t\t\tonClick={handleFirstPage}\n\t\t\t\t\t\t\tonMouseEnter={handlePrefetchFirstPage}\n\t\t\t\t\t\t\tdisabled={disablePreviousPage}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<PaginationPreviousButton\n\t\t\t\t\t\t\tonClick={handlePreviousPage}\n\t\t\t\t\t\t\tonMouseEnter={handlePrefetchPreviousPage}\n\t\t\t\t\t\t\tdisabled={disablePreviousPage}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PaginationItem>\n\t\t\t\t\t<PaginationItem className=\"text-sm\">\n\t\t\t\t\t\tPage {pages === 0 ? 0 : pagination.page} of {pages}\n\t\t\t\t\t</PaginationItem>\n\t\t\t\t\t<PaginationItem>\n\t\t\t\t\t\t<PaginationNextButton\n\t\t\t\t\t\t\tonClick={handleNextPage}\n\t\t\t\t\t\t\tonMouseEnter={handlePrefetchNextPage}\n\t\t\t\t\t\t\tdisabled={disableNextPage}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PaginationItem>\n\t\t\t\t\t<PaginationItem>\n\t\t\t\t\t\t<PaginationLastButton\n\t\t\t\t\t\t\tonClick={handleLastPage}\n\t\t\t\t\t\t\tonMouseEnter={handlePrefetchLastPage}\n\t\t\t\t\t\t\tdisabled={disableNextPage}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PaginationItem>\n\t\t\t\t</PaginationContent>\n\t\t\t</Pagination>\n\t\t</div>\n\t);\n};\n"],"names":["MAX_FILTERS_DISPLAYED","StateFilter","defaultValue","selectedFilters","onSelectFilter","open","setOpen","useState","isAllButScheduled","useMemo","flowRunStatesNoScheduleSet","FLOW_RUN_STATES_NO_SCHEDULED","filter","handleSelectAllExceptScheduled","handleSelectAllRunState","handleSelectFilter","updatedFilters","renderSelectedTags","selected","visible","extraCount","jsxs","jsx","StateBadge","FLOW_RUN_STATES_MAP","Typography","DropdownMenu","DropdownMenuTrigger","Button","Icon","DropdownMenuContent","DropdownMenuItem","e","Checkbox","filterKey","FlowRunsList","flowRuns","onClearFilters","props","flowRun","FlowRunCard","checked","LoadingSkeleton","numSkeletons","_","i","Card","Skeleton","PAGINATION_INCREMENTS","FlowRunsPagination","count","pages","pagination","onChangePagination","onPrefetchPage","handleFirstPage","handlePreviousPage","handleNextPage","handleLastPage","handlePrefetchFirstPage","handlePrefetchPreviousPage","handlePrefetchNextPage","handlePrefetchLastPage","disablePreviousPage","disableNextPage","handleChangeLimit","value","newLimit","newTotalPages","newPage","Select","SelectTrigger","SelectValue","SelectContent","increment","SelectItem","Pagination","PaginationContent","PaginationItem","PaginationFirstButton","PaginationPreviousButton","PaginationNextButton","PaginationLastButton"],"mappings":"uUAkBA,MAAMA,EAAwB,EAQjBC,GAAc,CAAC,CAC3B,aAAAC,EACA,gBAAAC,EAAkBD,GAAgB,IAAI,IACtC,eAAAE,CACD,IAAwB,CACvB,KAAM,CAACC,EAAMC,CAAO,EAAIC,EAAAA,SAAS,EAAK,EAEhCC,EAAoBC,EAAAA,QAAQ,IAAM,CACvC,MAAMC,EAA6B,IAAI,IACtCC,CAAA,EAED,OACCR,EAAgB,IAAI,WAAW,GAC/BO,EAA2B,OAASP,EAAgB,KAE7C,GAED,MAAM,KAAKA,CAAe,EAAE,MAAOS,GACzCF,EAA2B,IAAIE,CAAM,CAAA,CAEvC,EAAG,CAACT,CAAe,CAAC,EAEdU,EAAiC,IAAM,CAC5CT,EAAe,IAAI,IAAIO,CAA4B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OAACyD,EAAA,CACA,SAAA,CAAAxD,EAAAA,IAACyD,EAAA,CACA,QAASxB,EACT,aAAcI,EACd,SAAUI,CAAA,CAAA,EAEXzC,EAAAA,IAAC0D,EAAA,CACA,QAASxB,EACT,aAAcI,EACd,SAAUG,CAAA,CAAA,CACX,EACD,EACA1C,EAAAA,KAACyD,EAAA,CAAe,UAAU,UAAU,SAAA,CAAA,QAC7B3B,IAAU,EAAI,EAAIC,EAAW,KAAK,OAAKD,CAAA,EAC9C,QACC2B,EAAA,CACA,SAAAxD,EAAAA,IAAC2D,EAAA,CACA,QAASxB,EACT,aAAcI,EACd,SAAUG,CAAA,CAAA,EAEZ,QACCc,EAAA,CACA,SAAAxD,EAAAA,IAAC4D,EAAA,CACA,QAASxB,EACT,aAAcI,EACd,SAAUE,CAAA,CAAA,CACX,CACD,CAAA,CAAA,CACD,CAAA,CACD,CAAA,EACD,CAEF"}
|
|
1
|
+
{"version":3,"file":"flow-runs-pagination-DvDLs5GM.js","sources":["../../src/components/flow-runs/flow-runs-list/flow-runs-filters/state-filter.tsx","../../src/components/flow-runs/flow-runs-list/flow-runs-list.tsx","../../src/components/flow-runs/flow-runs-list/flow-runs-pagination.tsx"],"sourcesContent":["import { useMemo, useState } from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport { Checkbox } from \"@/components/ui/checkbox\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { Icon } from \"@/components/ui/icons\";\nimport { StateBadge } from \"@/components/ui/state-badge\";\nimport { Typography } from \"@/components/ui/typography\";\nimport {\n\tFLOW_RUN_STATES_MAP,\n\tFLOW_RUN_STATES_NO_SCHEDULED,\n\ttype FlowRunState,\n} from \"./state-filters.constants\";\n\nconst MAX_FILTERS_DISPLAYED = 2;\n\ntype StateFilterProps = {\n\tdefaultValue?: Set<FlowRunState>;\n\tselectedFilters: Set<FlowRunState> | undefined;\n\tonSelectFilter: (filters: Set<FlowRunState>) => void;\n};\n\nexport const StateFilter = ({\n\tdefaultValue,\n\tselectedFilters = defaultValue || new Set(),\n\tonSelectFilter,\n}: StateFilterProps) => {\n\tconst [open, setOpen] = useState(false);\n\n\tconst isAllButScheduled = useMemo(() => {\n\t\tconst flowRunStatesNoScheduleSet = new Set<FlowRunState>(\n\t\t\tFLOW_RUN_STATES_NO_SCHEDULED,\n\t\t);\n\t\tif (\n\t\t\tselectedFilters.has(\"Scheduled\") ||\n\t\t\tflowRunStatesNoScheduleSet.size !== selectedFilters.size\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\t\treturn Array.from(selectedFilters).every((filter) =>\n\t\t\tflowRunStatesNoScheduleSet.has(filter),\n\t\t);\n\t}, [selectedFilters]);\n\n\tconst handleSelectAllExceptScheduled = () => {\n\t\tonSelectFilter(new Set(FLOW_RUN_STATES_NO_SCHEDULED));\n\t};\n\n\tconst handleSelectAllRunState = () => {\n\t\tonSelectFilter(new Set());\n\t};\n\n\tconst handleSelectFilter = (filter: FlowRunState) => {\n\t\t// if all but scheduled is already selected, create a new set with the single filter\n\t\tif (isAllButScheduled) {\n\t\t\tonSelectFilter(new Set([filter]));\n\t\t\treturn;\n\t\t}\n\t\tconst updatedFilters = new Set(selectedFilters);\n\t\tif (selectedFilters.has(filter)) {\n\t\t\tupdatedFilters.delete(filter);\n\t\t} else {\n\t\t\tupdatedFilters.add(filter);\n\t\t}\n\t\tonSelectFilter(updatedFilters);\n\t};\n\n\tconst renderSelectedTags = () => {\n\t\tif (selectedFilters.size === 0) {\n\t\t\treturn \"All run states\";\n\t\t}\n\t\tif (isAllButScheduled) {\n\t\t\treturn \"All except scheduled\";\n\t\t}\n\n\t\tconst selected = Array.from(selectedFilters);\n\t\tconst visible = selected.slice(0, MAX_FILTERS_DISPLAYED);\n\t\tconst extraCount = selected.length - MAX_FILTERS_DISPLAYED;\n\n\t\treturn (\n\t\t\t<div className=\"flex flex-1 min-w-0 items-center gap-2\">\n\t\t\t\t<div className=\"flex flex-1 min-w-0 items-center gap-2 overflow-hidden\">\n\t\t\t\t\t{visible.map((filter) => (\n\t\t\t\t\t\t<StateBadge\n\t\t\t\t\t\t\tkey={filter}\n\t\t\t\t\t\t\tname={filter}\n\t\t\t\t\t\t\ttype={FLOW_RUN_STATES_MAP[filter]}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t\t{extraCount > 0 && (\n\t\t\t\t\t<Typography variant=\"bodySmall\" className=\"shrink-0\">\n\t\t\t\t\t\t+ {extraCount}\n\t\t\t\t\t</Typography>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t};\n\n\treturn (\n\t\t<DropdownMenu open={open} onOpenChange={setOpen}>\n\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tclassName=\"justify-between w-full bg-card dark:bg-background\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"flex-1 min-w-0\">{renderSelectedTags()}</span>\n\t\t\t\t\t<Icon id=\"ChevronDown\" className=\"ml-2 size-4 shrink-0\" />\n\t\t\t\t</Button>\n\t\t\t</DropdownMenuTrigger>\n\t\t\t<DropdownMenuContent className=\"max-h-96 overflow-x-hidden overflow-y-auto\">\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tonSelect={(e) => {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\thandleSelectAllExceptScheduled();\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<Checkbox checked={isAllButScheduled} className=\"mr-2\" />\n\t\t\t\t\tAll except scheduled\n\t\t\t\t</DropdownMenuItem>\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tonSelect={(e) => {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\thandleSelectAllRunState();\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<Checkbox checked={selectedFilters.size === 0} className=\"mr-2\" />\n\t\t\t\t\tAll run states\n\t\t\t\t</DropdownMenuItem>\n\t\t\t\t{Object.keys(FLOW_RUN_STATES_MAP).map((filterKey) => (\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\taria-label={filterKey}\n\t\t\t\t\t\tkey={filterKey}\n\t\t\t\t\t\tonSelect={(e) => {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\thandleSelectFilter(filterKey as FlowRunState);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Checkbox\n\t\t\t\t\t\t\taria-label={filterKey}\n\t\t\t\t\t\t\tclassName=\"mr-2\"\n\t\t\t\t\t\t\tchecked={\n\t\t\t\t\t\t\t\t!isAllButScheduled &&\n\t\t\t\t\t\t\t\tselectedFilters.has(filterKey as FlowRunState)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<StateBadge\n\t\t\t\t\t\t\tname={filterKey}\n\t\t\t\t\t\t\ttype={FLOW_RUN_STATES_MAP[filterKey as FlowRunState]}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t))}\n\t\t\t</DropdownMenuContent>\n\t\t</DropdownMenu>\n\t);\n};\n","import {\n\tFlowRunCard,\n\ttype FlowRunCardData,\n} from \"@/components/flow-runs/flow-run-card\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card } from \"@/components/ui/card\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\nimport { Typography } from \"@/components/ui/typography\";\n\ntype FlowRunCardProps =\n\t| {\n\t\t\tflowRuns: Array<FlowRunCardData> | undefined;\n\t\t\tonClearFilters?: () => void;\n\t }\n\t| {\n\t\t\tflowRuns: Array<FlowRunCardData> | undefined;\n\t\t\tonSelect: (id: string, checked: boolean) => void;\n\t\t\tselectedRows: Set<string>;\n\t\t\tonClearFilters?: () => void;\n\t };\n\nexport const FlowRunsList = ({\n\tflowRuns,\n\tonClearFilters,\n\t...props\n}: FlowRunCardProps) => {\n\tif (!flowRuns) {\n\t\treturn <LoadingSkeleton numSkeletons={5} />;\n\t}\n\n\tif (flowRuns.length === 0) {\n\t\treturn (\n\t\t\t<div className=\"flex justify-center py-4\">\n\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t<Typography>No runs found</Typography>\n\t\t\t\t\t{onClearFilters && (\n\t\t\t\t\t\t<Button onClick={onClearFilters}>Clear Filters</Button>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<ul className=\"flex flex-col gap-2\">\n\t\t\t{flowRuns.map((flowRun) => {\n\t\t\t\t// Variant for selectable list\n\t\t\t\tif (\"onSelect\" in props && \"selectedRows\" in props) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<li key={flowRun.id}>\n\t\t\t\t\t\t\t<FlowRunCard\n\t\t\t\t\t\t\t\tflowRun={flowRun}\n\t\t\t\t\t\t\t\tchecked={props.selectedRows.has(flowRun.id)}\n\t\t\t\t\t\t\t\tonCheckedChange={(checked) =>\n\t\t\t\t\t\t\t\t\tprops.onSelect(flowRun.id, checked)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<li key={flowRun.id}>\n\t\t\t\t\t\t<FlowRunCard flowRun={flowRun} />\n\t\t\t\t\t</li>\n\t\t\t\t);\n\t\t\t})}\n\t\t</ul>\n\t);\n};\n\ntype LoadingSkeletonProps = {\n\tnumSkeletons?: number;\n};\nconst LoadingSkeleton = ({ numSkeletons = 1 }: LoadingSkeletonProps) => (\n\t<ul className=\"flex flex-col gap-1\">\n\t\t{Array.from({ length: numSkeletons }).map((_, i) => (\n\t\t\t// biome-ignore lint/suspicious/noArrayIndexKey: okay for static skeleton list\n\t\t\t<li key={i}>\n\t\t\t\t<Card className=\"flex flex-col gap-2 p-4\">\n\t\t\t\t\t<div className=\"flex justify-between\">\n\t\t\t\t\t\t<Skeleton className=\"h-4 w-[350px]\" />\n\t\t\t\t\t\t<Skeleton className=\"h-4 w-[400px]\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<Skeleton className=\"h-4 w-[400px]\" />\n\t\t\t\t\t<Skeleton className=\"h-4 w-[200px]\" />\n\t\t\t\t</Card>\n\t\t\t</li>\n\t\t))}\n\t</ul>\n);\n","import {\n\tPagination,\n\tPaginationContent,\n\tPaginationFirstButton,\n\tPaginationItem,\n\tPaginationLastButton,\n\tPaginationNextButton,\n\tPaginationPreviousButton,\n} from \"@/components/ui/pagination\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\n\nconst PAGINATION_INCREMENTS = [5, 10, 25, 50, 100];\n\nexport type PaginationState = {\n\tlimit: number;\n\tpage: number;\n};\nexport type PaginationStateUpdater = (\n\tprevState: PaginationState,\n) => PaginationState;\n\ntype FlowRunsPaginationProps = {\n\tcount: number;\n\tpages: number;\n\tpagination: PaginationState;\n\tonChangePagination: (pagination: PaginationState) => void;\n\tonPrefetchPage?: (page: number) => void;\n};\nexport const FlowRunsPagination = ({\n\tcount,\n\tpages,\n\tpagination,\n\tonChangePagination,\n\tonPrefetchPage,\n}: FlowRunsPaginationProps) => {\n\tconst handleFirstPage = () =>\n\t\tonChangePagination({ limit: pagination.limit, page: 1 });\n\tconst handlePreviousPage = () =>\n\t\tonChangePagination({ limit: pagination.limit, page: pagination.page - 1 });\n\tconst handleNextPage = () =>\n\t\tonChangePagination({ limit: pagination.limit, page: pagination.page + 1 });\n\n\tconst handleLastPage = () =>\n\t\tonChangePagination({ limit: pagination.limit, page: pages });\n\n\tconst handlePrefetchFirstPage = () => {\n\t\tif (pagination.page > 1) onPrefetchPage?.(1);\n\t};\n\tconst handlePrefetchPreviousPage = () => {\n\t\tif (pagination.page > 1) onPrefetchPage?.(pagination.page - 1);\n\t};\n\tconst handlePrefetchNextPage = () => {\n\t\tif (pagination.page < pages) onPrefetchPage?.(pagination.page + 1);\n\t};\n\tconst handlePrefetchLastPage = () => {\n\t\tif (pagination.page < pages) onPrefetchPage?.(pages);\n\t};\n\n\tconst disablePreviousPage = pagination.page <= 1;\n\tconst disableNextPage = pagination.page >= pages;\n\n\tconst handleChangeLimit = (value: string) => {\n\t\tconst newLimit = Number(value);\n\t\tconst newTotalPages = Math.ceil(count / newLimit);\n\t\tconst newPage = Math.min(pagination.page, newTotalPages);\n\t\tonChangePagination({\n\t\t\tlimit: newLimit,\n\t\t\tpage: newPage,\n\t\t});\n\t};\n\n\treturn (\n\t\t<div className=\"flex flex-row justify-between items-center\">\n\t\t\t<div className=\"flex flex-row items-center gap-2 text-xs text-muted-foreground\">\n\t\t\t\t<span className=\"whitespace-nowrap\">Items per page</span>\n\t\t\t\t<Select\n\t\t\t\t\tvalue={String(pagination.limit)}\n\t\t\t\t\tonValueChange={handleChangeLimit}\n\t\t\t\t>\n\t\t\t\t\t<SelectTrigger aria-label=\"Items per page\">\n\t\t\t\t\t\t<SelectValue placeholder=\"Theme\" />\n\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t{PAGINATION_INCREMENTS.map((increment) => (\n\t\t\t\t\t\t\t<SelectItem key={increment} value={String(increment)}>\n\t\t\t\t\t\t\t\t{increment}\n\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</SelectContent>\n\t\t\t\t</Select>\n\t\t\t</div>\n\t\t\t<Pagination className=\"justify-end\">\n\t\t\t\t<PaginationContent>\n\t\t\t\t\t<PaginationItem>\n\t\t\t\t\t\t<PaginationFirstButton\n\t\t\t\t\t\t\tonClick={handleFirstPage}\n\t\t\t\t\t\t\tonMouseEnter={handlePrefetchFirstPage}\n\t\t\t\t\t\t\tdisabled={disablePreviousPage}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<PaginationPreviousButton\n\t\t\t\t\t\t\tonClick={handlePreviousPage}\n\t\t\t\t\t\t\tonMouseEnter={handlePrefetchPreviousPage}\n\t\t\t\t\t\t\tdisabled={disablePreviousPage}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PaginationItem>\n\t\t\t\t\t<PaginationItem className=\"text-sm\">\n\t\t\t\t\t\tPage {pages === 0 ? 0 : pagination.page} of {pages}\n\t\t\t\t\t</PaginationItem>\n\t\t\t\t\t<PaginationItem>\n\t\t\t\t\t\t<PaginationNextButton\n\t\t\t\t\t\t\tonClick={handleNextPage}\n\t\t\t\t\t\t\tonMouseEnter={handlePrefetchNextPage}\n\t\t\t\t\t\t\tdisabled={disableNextPage}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PaginationItem>\n\t\t\t\t\t<PaginationItem>\n\t\t\t\t\t\t<PaginationLastButton\n\t\t\t\t\t\t\tonClick={handleLastPage}\n\t\t\t\t\t\t\tonMouseEnter={handlePrefetchLastPage}\n\t\t\t\t\t\t\tdisabled={disableNextPage}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PaginationItem>\n\t\t\t\t</PaginationContent>\n\t\t\t</Pagination>\n\t\t</div>\n\t);\n};\n"],"names":["MAX_FILTERS_DISPLAYED","StateFilter","defaultValue","selectedFilters","onSelectFilter","open","setOpen","useState","isAllButScheduled","useMemo","flowRunStatesNoScheduleSet","FLOW_RUN_STATES_NO_SCHEDULED","filter","handleSelectAllExceptScheduled","handleSelectAllRunState","handleSelectFilter","updatedFilters","renderSelectedTags","selected","visible","extraCount","jsxs","jsx","StateBadge","FLOW_RUN_STATES_MAP","Typography","DropdownMenu","DropdownMenuTrigger","Button","Icon","DropdownMenuContent","DropdownMenuItem","e","Checkbox","filterKey","FlowRunsList","flowRuns","onClearFilters","props","flowRun","FlowRunCard","checked","LoadingSkeleton","numSkeletons","_","i","Card","Skeleton","PAGINATION_INCREMENTS","FlowRunsPagination","count","pages","pagination","onChangePagination","onPrefetchPage","handleFirstPage","handlePreviousPage","handleNextPage","handleLastPage","handlePrefetchFirstPage","handlePrefetchPreviousPage","handlePrefetchNextPage","handlePrefetchLastPage","disablePreviousPage","disableNextPage","handleChangeLimit","value","newLimit","newTotalPages","newPage","Select","SelectTrigger","SelectValue","SelectContent","increment","SelectItem","Pagination","PaginationContent","PaginationItem","PaginationFirstButton","PaginationPreviousButton","PaginationNextButton","PaginationLastButton"],"mappings":"uUAkBA,MAAMA,EAAwB,EAQjBC,GAAc,CAAC,CAC3B,aAAAC,EACA,gBAAAC,EAAkBD,GAAgB,IAAI,IACtC,eAAAE,CACD,IAAwB,CACvB,KAAM,CAACC,EAAMC,CAAO,EAAIC,EAAAA,SAAS,EAAK,EAEhCC,EAAoBC,EAAAA,QAAQ,IAAM,CACvC,MAAMC,EAA6B,IAAI,IACtCC,CAAA,EAED,OACCR,EAAgB,IAAI,WAAW,GAC/BO,EAA2B,OAASP,EAAgB,KAE7C,GAED,MAAM,KAAKA,CAAe,EAAE,MAAOS,GACzCF,EAA2B,IAAIE,CAAM,CAAA,CAEvC,EAAG,CAACT,CAAe,CAAC,EAEdU,EAAiC,IAAM,CAC5CT,EAAe,IAAI,IAAIO,CAA4B,CAAC,CACrD,EAEMG,EAA0B,IAAM,CACrCV,EAAe,IAAI,GAAK,CACzB,EAEMW,EAAsBH,GAAyB,CAEpD,GAAIJ,EAAmB,CACtBJ,EAAe,IAAI,IAAI,CAACQ,CAAM,CAAC,CAAC,EAChC,MACD,CACA,MAAMI,EAAiB,IAAI,IAAIb,CAAe,EAC1CA,EAAgB,IAAIS,CAAM,EAC7BI,EAAe,OAAOJ,CAAM,EAE5BI,EAAe,IAAIJ,CAAM,EAE1BR,EAAeY,CAAc,CAC9B,EAEMC,EAAqB,IAAM,CAChC,GAAId,EAAgB,OAAS,EAC5B,MAAO,iBAER,GAAIK,EACH,MAAO,uBAGR,MAAMU,EAAW,MAAM,KAAKf,CAAe,EACrCgB,EAAUD,EAAS,MAAM,EAAGlB,CAAqB,EACjDoB,EAAaF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ACX,CACD,CAAA,CAAA,CACD,CAAA,CACD,CAAA,EACD,CAEF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as oe,j as e,r as o,s as z,C as Se,D as we,E as G,m as Ne}from"./vendor-tanstack-CLpbOGYv.js";import{aS as Re,y as H,bN as re,aN as ie,aR as ce,ak as V,q as E,I as de,cu as Fe,al as q,bO as Te,O as ue,S as ke,a as _e,b as Ae,c as Ee,e as Be,c4 as me,_ as Oe,$ as Pe,a0 as Me,a1 as Ie,a2 as Le,a3 as ze,bM as U,B as He,g as Qe,h as Y,bs as Ge,bB as We,bD as Ke,aD as O,cv as $e,cw as Ve,cx as qe,cy as Ue,cz as Ye,cA as Ze,C as pe,m as he,n as ge,o as xe,aX as Xe,aC as Je,cB as es,cC as ss,b5 as as,aw as ts,ax as ns,ay as I,az as L,cD as m,ao as ls,be as os,aE as Z,aH as X,aL as rs}from"./index-BZqccBpn.js";import{S as is}from"./sort-filter-BNQ6rjAG.js";import{S as cs,a as ds,F as us}from"./flow-runs-pagination-CoZZ-ed_.js";import{u as ms,F as ps}from"./use-flow-runs-selected-rows-DB4pe2_m.js";import{D as hs}from"./delete-confirmation-dialog-D18TITKv.js";import{D as gs}from"./data-table-Bfa8_ZJd.js";import{T as xs}from"./tags-input-CDvuqe9B.js";import{D as fe,a as ye,b as je,d as Q,c as fs}from"./dropdown-menu-g64QiYKu.js";import{S as ys}from"./index-Cuh3BwlA.js";import{S as js}from"./index-faXvGo5k.js";import{s as bs,U as vs,_ as Cs}from"./vendor-date-Bxa7CHB1.js";import{A as Ds,b as J}from"./vendor-recharts-BOcghvr2.js";import{u as Ss}from"./use-page-title-ELpQMkBC.js";import{o as ws,e as P,a as ee,s as M,n as _,d as se}from"./vendor-forms-mroZAMaw.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CP6hQtRc.js";import"./use-delete-confirmation-dialog-Bka9YDdO.js";import"./table-CJS-5Aky.js";import"./cronstrue-CeanGOEE.js";import"./use-is-overflowing-Cc-Qm0vx.js";const Ns=({flow:s,open:a,onOpenChange:t,onDeleted:n})=>{const l=oe(),{deleteFlow:r,isPending:c}=Re(),d=()=>{r(s.id,{onSuccess:()=>{H.success("Flow deleted"),n?.(),l({to:"/flows"})},onError:()=>{H.error("Failed to delete flow")}})};return e.jsx(hs,{isOpen:a,title:"Delete Flow",description:`Are you sure you want to delete ${s.name}? This action cannot be undone.`,isLoading:c,loadingText:"Deleting...",onConfirm:d,onClose:()=>t(!1)})},ae=4,Rs=2,Fs=({deploymentId:s})=>{const[a,t]=o.useState(0),n=re(a,150),l=o.useCallback(u=>{if(!u)return;const p=()=>{const h=u.getBoundingClientRect().width;t(Math.floor(h/(ae+Rs)))};p();const x=new ResizeObserver(p);return x.observe(u),()=>{x.disconnect()}},[]),r=n||a,{data:c}=z(ie({deployments:{operator:"and_",id:{any_:[s]}},limit:Math.min(60,r||60),sort:"START_TIME_DESC",offset:0})),d=c?.map(u=>({...u}))??[];return e.jsx("div",{className:"w-full",ref:l,children:e.jsx(ce,{enrichedFlowRuns:d,startDate:bs(new Date,vs),endDate:new Date,barWidth:ae,numberOfBars:r,className:"h-8 w-full",chartId:`deployment-${s}`})})},Ts=[{id:"select",header:({table:s})=>e.jsx(V,{checked:s.getIsAllPageRowsSelected(),onCheckedChange:a=>s.toggleAllPageRowsSelected(!!a),"aria-label":"Select all"}),cell:({row:s})=>e.jsx(V,{checked:s.getIsSelected(),onCheckedChange:a=>s.toggleSelected(!!a),"aria-label":"Select row"}),enableSorting:!1,enableHiding:!1,maxSize:20,minSize:20},{accessorKey:"name",header:"Name",cell:({row:s})=>s.original.name},{accessorKey:"status",header:"Status",cell:({row:s})=>{const a=s.original.paused?"PAUSED":s.original.status??"NOT_READY";return e.jsx(js,{status:a})}},{accessorKey:"tags",header:"Tags",cell:({row:s})=>e.jsx("div",{className:"flex flex-wrap gap-1",children:s.original.tags?.map(a=>e.jsx("span",{className:"bg-gray-100 text-gray-800 text-xs font-medium px-2 py-0.5 rounded",children:a},a))})},{accessorKey:"schedules",header:"Schedules",cell:({row:s})=>{const a=s.original.schedules;return!a||a.length===0?null:e.jsx(ys,{schedules:a})},size:150},{accessorKey:"activity",header:"Activity",cell:({row:s})=>s.original.id?e.jsx(Fs,{deploymentId:s.original.id}):null},{id:"actions",cell:({row:s})=>s.original.id?e.jsxs(fe,{children:[e.jsx(ye,{asChild:!0,children:e.jsxs(E,{variant:"ghost",className:"size-8 p-0",children:[e.jsx("span",{className:"sr-only",children:"Open menu"}),e.jsx(de,{id:"MoreHorizontal",className:"size-4"})]})}),e.jsx(je,{align:"end",children:e.jsx(Q,{onClick:()=>{navigator.clipboard.writeText(s.original.id)},children:"Copy ID"})})]}):null,minSize:30,maxSize:30}],ks=[{label:"Created",value:"CREATED_DESC"},{label:"A to Z",value:"NAME_ASC"},{label:"Z to A",value:"NAME_DESC"}],_s=({deployments:s,deploymentsCount:a,deploymentsPages:t,deploymentSearch:n,onDeploymentSearchChange:l,deploymentTags:r,onDeploymentTagsChange:c,deploymentSort:d,onDeploymentSortChange:u,deploymentPagination:p,onDeploymentPaginationChange:x})=>{const[h,y]=o.useState({}),[g,f]=o.useState(!1),{deleteDeployment:j}=Fe(),b=o.useCallback(i=>{const v={pageIndex:p.page-1,pageSize:p.limit},w=typeof i=="function"?i(v):i;x({page:w.pageIndex+1,limit:w.pageSize}),y({})},[p,x]),R=Se({data:s,columns:Ts,getCoreRowModel:we(),manualPagination:!0,pageCount:t,state:{rowSelection:h,pagination:{pageIndex:p.page-1,pageSize:p.limit}},onRowSelectionChange:y,onPaginationChange:b,getRowId:i=>i.id}),C=Object.keys(h).length,D=o.useCallback(()=>{const i=Object.keys(h);for(const v of i)j(v);y({}),f(!1)},[h,j]),S=o.useCallback(i=>{Array.isArray(i)&&c(i)},[c]);return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"grid grid-cols-12 items-center gap-2",children:[e.jsx("div",{className:"flex flex-col gap-1 xl:col-span-3 md:col-span-12 col-span-6 md:order-0 order-3",children:C>0?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(q,{variant:"bodySmall",className:"text-muted-foreground",children:[C," selected"]}),e.jsx(E,{variant:"ghost",size:"icon",className:"h-6 w-6 text-destructive hover:text-destructive",onClick:()=>f(!0),"aria-label":"Delete selected deployments",children:e.jsx(Te,{className:"h-4 w-4"})})]}):e.jsxs(q,{variant:"bodySmall",className:"text-muted-foreground",children:[a," Deployment",a!==1?"s":""]})}),e.jsx("div",{className:"xl:col-span-4 md:col-span-6 col-span-12 md:order-1 order-0",children:e.jsx(ue,{placeholder:"Search deployments...",value:n??"",onChange:i=>l(i.target.value),"aria-label":"Search deployments",debounceMs:300})}),e.jsx("div",{className:"xl:col-span-3 md:col-span-6 col-span-12 md:order-2 order-1",children:e.jsx(xs,{placeholder:"Filter by tags",value:r,onChange:S})}),e.jsx("div",{className:"xl:border-l xl:border-border xl:pl-2 xl:col-span-2 md:col-span-6 col-span-6 md:order-3 order-2",children:e.jsxs(ke,{value:d,onValueChange:i=>u(i),children:[e.jsx(_e,{className:"w-full","aria-label":"Sort deployments",children:e.jsx(Ae,{placeholder:"Sort by"})}),e.jsx(Ee,{children:ks.map(i=>e.jsx(Be,{value:i.value,children:i.label},i.value))})]})})]}),e.jsx(me,{children:e.jsx("div",{className:"[&_[data-slot=table-container]]:overflow-visible",children:e.jsx(gs,{table:R})})}),e.jsx(Oe,{open:g,onOpenChange:f,children:e.jsxs(Pe,{children:[e.jsxs(Me,{children:[e.jsx(Ie,{children:"Delete Deployments"}),e.jsxs(Le,{children:["Are you sure you want to delete ",C," deployment",C!==1?"s":"","? This action cannot be undone."]})]}),e.jsxs(ze,{children:[e.jsx(E,{variant:"outline",onClick:()=>f(!1),children:"Cancel"}),e.jsx(E,{variant:"destructive",onClick:D,children:"Delete"})]})]})})]})},As=({flow:s})=>e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("dl",{className:"flex flex-col gap-2",children:[e.jsx("dt",{className:"text-muted-foreground",children:"Flow ID"}),e.jsx("dd",{className:"text-sm font-medium leading-none font-mono",children:s.id})]}),e.jsxs("dl",{className:"flex flex-col gap-2",children:[e.jsx("dt",{className:"text-muted-foreground",children:"Created"}),e.jsx("dd",{className:"text-sm font-medium leading-none font-mono",children:s.created?e.jsx(U,{date:s.created,format:"absolute"}):"N/A"})]}),e.jsxs("dl",{className:"flex flex-col gap-2",children:[e.jsx("dt",{className:"text-muted-foreground",children:"Updated"}),e.jsx("dd",{className:"text-sm font-medium leading-none font-mono",children:s.updated?e.jsx(U,{date:s.updated,format:"absolute"}):"N/A"})]})]}),Es=({flow:s,onDelete:a})=>{const t=()=>{navigator.clipboard.writeText(s.id),H.success("ID copied")};return e.jsxs(fe,{children:[e.jsx(ye,{asChild:!0,children:e.jsxs(E,{variant:"outline",className:"size-8 p-0",children:[e.jsx("span",{className:"sr-only",children:"Open menu"}),e.jsx(de,{id:"MoreVertical",className:"size-4"})]})}),e.jsxs(je,{align:"end",children:[e.jsx(fs,{children:"Actions"}),e.jsx(Q,{onClick:t,children:"Copy ID"}),e.jsx(Q,{variant:"destructive",onClick:a,children:"Delete"})]})]})};function Bs({flow:s,onDelete:a}){return e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(He,{children:e.jsxs(Qe,{children:[e.jsx(Y,{children:e.jsx(Ge,{to:"/flows",className:"text-xl font-semibold",children:"Flows"})}),e.jsx(We,{}),e.jsx(Y,{className:"text-xl font-semibold",children:e.jsx(Ke,{children:s.name})})]})}),e.jsx(Es,{flow:s,onDelete:a})]})}const A=3e4,Os={completed:{label:"Completed",color:"hsl(142.1 76.2% 36.3%)"},failed:{label:"Failed",color:"hsl(0 84.2% 60.2%)"}},Ps=s=>{const a=[];let t=0,n=0;for(const l of s){let r=0,c=0;for(const d of l.states)d.state_type==="COMPLETED"?r+=d.count_runs:(d.state_type==="FAILED"||d.state_type==="CRASHED")&&(c+=d.count_runs);t+=r,n+=c,a.push({timestamp:l.interval_start,completed:t,failed:n})}return a};function Ms({flowId:s}){const[{data:a},{data:t},{data:n},{data:l},{data:r}]=G({queries:[O(Ve(s),A),O(qe(s),A),O(Ue(s),A),O(Ye(s),A),$e(Ze(s),A)]}),c=o.useMemo(()=>Ps(r),[r]),d=c.some(h=>h.failed>0),u=a-l,p=u>0?(t/u*100).toFixed(0):"0",x=u>0?(n/u*100).toFixed(1):"0";return e.jsxs(pe,{className:"flex-1 relative overflow-hidden pb-20",children:[e.jsx(he,{className:"pb-2",children:e.jsx(ge,{children:"Task Runs"})}),e.jsx(xe,{children:e.jsxs("div",{className:"grid gap-1",children:[e.jsx("div",{className:"inline-flex items-end gap-1 text-base",children:e.jsx("span",{className:"font-semibold",children:a})}),l>0&&e.jsxs("div",{className:"inline-flex items-end gap-1 text-sm",children:[e.jsx("span",{className:"font-semibold text-blue-600",children:l}),e.jsx("span",{className:"text-muted-foreground",children:"Running"})]}),e.jsxs("div",{className:"inline-flex items-end gap-1 text-sm",children:[e.jsx("span",{className:"font-semibold text-green-600",children:t}),e.jsx("span",{className:"text-muted-foreground",children:"Completed"}),e.jsxs("span",{className:"text-green-600",children:[p,"%"]})]}),n>0&&e.jsxs("div",{className:"inline-flex items-end gap-1 text-sm",children:[e.jsx("span",{className:"font-semibold text-red-600",children:n}),e.jsx("span",{className:"text-muted-foreground",children:"Failed"}),e.jsxs("span",{className:"text-red-600",children:[x,"%"]})]})]})}),e.jsx("div",{className:"absolute bottom-4 left-0 right-0 h-16",children:e.jsx(Xe,{config:Os,className:"h-full w-full",children:e.jsxs(Ds,{data:c,margin:{top:0,right:0,bottom:0,left:0},children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"completedGradientFlow",x1:"0",y1:"1",x2:"0",y2:"0",children:[e.jsx("stop",{offset:"0%",stopColor:"var(--color-completed)",stopOpacity:0}),e.jsx("stop",{offset:"100%",stopColor:"var(--color-completed)",stopOpacity:.3})]}),e.jsxs("linearGradient",{id:"failedGradientFlow",x1:"0",y1:"1",x2:"0",y2:"0",children:[e.jsx("stop",{offset:"0%",stopColor:"var(--color-failed)",stopOpacity:0}),e.jsx("stop",{offset:"100%",stopColor:"var(--color-failed)",stopOpacity:.3})]})]}),d&&e.jsx(J,{type:"monotone",dataKey:"failed",stroke:"var(--color-failed)",strokeWidth:2,activeDot:!1,fill:"url(#failedGradientFlow)",dot:!1,isAnimationActive:!1}),e.jsx(J,{type:"monotone",dataKey:"completed",stroke:"var(--color-completed)",strokeWidth:2,activeDot:!1,fill:"url(#completedGradientFlow)",dot:!1,isAnimationActive:!1})]})})})]})}const te=8,Is=4,ne=3e4;function Ls({flowId:s,flow:a}){const[t,n]=o.useState(0),l=re(t,150),r=o.useCallback(g=>{if(!g)return;const f=()=>{const b=g.getBoundingClientRect().width;n(Math.floor(b/(te+Is)))};f();const j=new ResizeObserver(f);return j.observe(g),()=>j.disconnect()},[]),c=l||t,d=60,[{data:u},{data:p}]=G({queries:[ie(es(s,d),ne),Je(ss(s),ne)]}),x=o.useMemo(()=>u.map(g=>({...g,flow:a})),[u,a]),{startDate:h,endDate:y}=o.useMemo(()=>{const g=new Date;return{startDate:Cs(g),endDate:g}},[]);return e.jsxs(pe,{className:"flex-1",children:[e.jsxs(he,{className:"flex flex-row items-center justify-between pb-2",children:[e.jsx(ge,{children:"Flow Runs"}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:[p," total"]})]}),e.jsx(xe,{children:e.jsx("div",{className:"h-24",ref:r,children:c===0?e.jsx(as,{className:"h-full w-full"}):e.jsx(me,{children:e.jsx(ce,{enrichedFlowRuns:x,startDate:h,endDate:y,numberOfBars:c,barWidth:te,className:"h-full w-full"})})})})]})}function zs({flowId:s,flow:a}){return e.jsxs("div",{className:"grid gap-5 md:grid-cols-[2fr_1fr]",children:[e.jsx(Ls,{flowId:s,flow:a}),e.jsx(Ms,{flowId:s})]})}function Hs({flow:s,flowRuns:a,flowRunsCount:t,flowRunsPages:n,deployments:l,deploymentsCount:r,deploymentsPages:c,tab:d="runs",pagination:u,onPaginationChange:p,onPrefetchPage:x,sort:h,onSortChange:y,flowRunSearch:g,onFlowRunSearchChange:f,selectedStates:j,onSelectFilter:b,deploymentSearch:R,onDeploymentSearchChange:C,deploymentTags:D,onDeploymentTagsChange:S,deploymentSort:i,onDeploymentSortChange:v,deploymentPagination:w,onDeploymentPaginationChange:N}){const F=oe(),[W,T]=o.useState(!1),[B,be,{onSelectRow:ve,clearSet:K}]=ms(),$=a.map(k=>({...k,flow:s})),Ce=o.useCallback(()=>{f(""),b(new Set),K()},[f,b,K]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"container mx-auto flex flex-col gap-4",children:[e.jsx(Bs,{flow:s,onDelete:()=>T(!0)}),e.jsx(zs,{flowId:s.id,flow:s}),e.jsxs(ts,{value:d,onValueChange:k=>{F({to:".",search:De=>({...De,tab:k})})},children:[e.jsxs(ns,{children:[e.jsx(I,{value:"runs",children:"Runs"}),e.jsx(I,{value:"deployments",children:"Deployments"}),e.jsx(I,{value:"details",children:"Details"})]}),e.jsxs(L,{value:"runs",className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(ps,{count:t,results:$,selectedRows:B,setSelectedRows:be}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(ue,{placeholder:"Search by run name",value:g??"",onChange:k=>f(k.target.value),className:"w-64"}),e.jsx(cs,{selectedFilters:j,onSelectFilter:b}),e.jsx(is,{value:h,onSelect:y})]})]}),e.jsx(ds,{flowRuns:$,selectedRows:B,onSelect:ve,onClearFilters:Ce}),e.jsx(us,{count:t,pages:n,pagination:u,onChangePagination:p,onPrefetchPage:x})]}),e.jsx(L,{value:"deployments",children:e.jsx(_s,{deployments:l,deploymentsCount:r,deploymentsPages:c,deploymentSearch:R,onDeploymentSearchChange:C,deploymentTags:D,onDeploymentTagsChange:S,deploymentSort:i,onDeploymentSortChange:v,deploymentPagination:w,onDeploymentPaginationChange:N})}),e.jsx(L,{value:"details",children:e.jsx(As,{flow:s})})]})]}),e.jsx(Ns,{flow:s,open:W,onOpenChange:T})]})}ws({tab:P(["runs","deployments","details"]).optional().default("runs"),"runs.page":_().int().positive().optional().default(1),"runs.limit":_().int().positive().max(100).optional().default(10),"runs.sort":P(rs).optional().default("START_TIME_DESC"),"runs.flowRuns.nameLike":M().optional().default(""),"runs.flowRuns.state.name":ee(M()).optional(),type:P(["span","range"]).optional(),seconds:_().int().positive().optional(),startDateTime:se().optional(),endDateTime:se().optional(),"deployments.page":_().int().positive().optional().default(1),"deployments.limit":_().int().positive().optional().default(10),"deployments.nameLike":M().optional(),"deployments.tags":ee(M()).optional(),"deployments.sort":P(["CREATED_DESC","UPDATED_DESC","NAME_ASC","NAME_DESC"]).optional().default("NAME_ASC")}).optional().default({});const le=(s,a)=>{const t=s["runs.flowRuns.nameLike"],n=s["runs.flowRuns.state.name"]??[],r=t||n.length>0?{operator:"and_",...t&&{name:{like_:t}},...n.length>0&&{state:{operator:"and_",name:{any_:n}}}}:void 0;return{page:s["runs.page"],limit:s["runs.limit"],sort:s["runs.sort"],flow_runs:r,flows:{operator:"and_",id:{any_:[a]}}}},Qs=()=>{const s=m.useSearch(),a=m.useNavigate(),t=o.useMemo(()=>({page:s["runs.page"],limit:s["runs.limit"]}),[s["runs.page"],s["runs.limit"]]),n=o.useCallback(l=>{a({to:".",search:r=>({...r,"runs.page":l.page,"runs.limit":l.limit}),replace:!0})},[a]);return[t,n]},Gs=()=>{const s=m.useSearch(),a=m.useNavigate(),t=o.useCallback(n=>{a({to:".",search:l=>({...l,"runs.sort":n,"runs.page":1}),replace:!0})},[a]);return[s["runs.sort"],t]},Ws=()=>{const s=m.useSearch(),a=m.useNavigate(),t=o.useCallback(n=>{a({to:".",search:l=>({...l,"runs.flowRuns.nameLike":n,"runs.page":1}),replace:!0})},[a]);return[s["runs.flowRuns.nameLike"],t]},Ks=()=>{const s=m.useSearch(),a=m.useNavigate(),t=o.useMemo(()=>new Set(s["runs.flowRuns.state.name"]||[]),[s["runs.flowRuns.state.name"]]),n=o.useCallback(l=>{a({to:".",search:r=>({...r,"runs.flowRuns.state.name":Array.from(l),"runs.page":1}),replace:!0})},[a]);return{selectedStates:t,onSelectFilter:n}},$s=()=>{const s=m.useSearch(),a=m.useNavigate(),t=o.useCallback(n=>{a({to:".",search:l=>({...l,"deployments.nameLike":n||void 0,"deployments.page":1}),replace:!0})},[a]);return[s["deployments.nameLike"],t]},Vs=()=>{const s=m.useSearch(),a=m.useNavigate(),t=o.useCallback(n=>{a({to:".",search:l=>({...l,"deployments.tags":n.length>0?n:void 0,"deployments.page":1}),replace:!0})},[a]);return[s["deployments.tags"]??[],t]},qs=()=>{const s=m.useSearch(),a=m.useNavigate(),t=o.useCallback(n=>{a({to:".",search:l=>({...l,"deployments.sort":n,"deployments.page":1}),replace:!0})},[a]);return[s["deployments.sort"],t]},Us=()=>{const s=m.useSearch(),a=m.useNavigate(),t=o.useMemo(()=>({page:s["deployments.page"],limit:s["deployments.limit"]}),[s["deployments.page"],s["deployments.limit"]]),n=o.useCallback(l=>{a({to:".",search:r=>({...r,"deployments.page":l.page,"deployments.limit":l.limit}),replace:!0})},[a]);return[t,n]},fa=()=>{const s=Ne(),{id:a}=m.useParams(),t=m.useSearch(),[n,l]=Qs(),[r,c]=Gs(),[d,u]=Ws(),{selectedStates:p,onSelectFilter:x}=Ks(),[h,y]=$s(),[g,f]=Vs(),[j,b]=qs(),[R,C]=Us(),[{data:D}]=G({queries:[ls(a)]}),{data:S}=z(os({sort:t["deployments.sort"],page:t["deployments.page"],limit:t["deployments.limit"],flows:{operator:"and_",id:{any_:[a]}},deployments:{operator:"and_",flow_or_deployment_name:{like_:t["deployments.nameLike"]},tags:{operator:"and_",all_:t["deployments.tags"]||[]}}}));Ss(D?.name?`Flow: ${D.name}`:"Flow");const{data:i}=z(Z(le(t,a),3e4)),v=i?.results??[];o.useEffect(()=>{const N=v.map(F=>F.id);N.length>0&&s.prefetchQuery(X(N))},[s,v]);const w=o.useCallback(N=>{const F=le({...t,"runs.page":N},a);(async()=>{const T=(await s.ensureQueryData(Z(F,3e4)))?.results?.map(B=>B.id)??[];T.length>0&&s.prefetchQuery(X(T))})()},[s,t,a]);return e.jsx(Hs,{flow:D,flowRuns:v,flowRunsCount:i?.count??0,flowRunsPages:i?.pages??0,deployments:S?.results??[],deploymentsCount:S?.count??0,deploymentsPages:S?.pages??0,tab:t.tab,pagination:n,onPaginationChange:l,onPrefetchPage:w,sort:r,onSortChange:c,flowRunSearch:d,onFlowRunSearchChange:u,selectedStates:p,onSelectFilter:x,deploymentSearch:h,onDeploymentSearchChange:y,deploymentTags:g,onDeploymentTagsChange:f,deploymentSort:j,onDeploymentSortChange:b,deploymentPagination:R,onDeploymentPaginationChange:C})};export{fa as component};
|
|
2
|
-
//# sourceMappingURL=flow._id-
|
|
1
|
+
import{d as oe,j as e,r as o,u as z,C as Se,D as we,E as G,n as Ne}from"./vendor-tanstack-CWDKYA_B.js";import{aS as Re,y as H,bN as re,aN as ie,aR as ce,ak as V,q as E,I as de,cu as Fe,al as q,bO as Te,O as ue,S as ke,a as _e,b as Ae,c as Ee,e as Be,c4 as me,_ as Oe,$ as Pe,a0 as Me,a1 as Ie,a2 as Le,a3 as ze,bM as U,B as He,g as Qe,h as Y,bs as Ge,bB as We,bD as Ke,aD as O,cv as $e,cw as Ve,cx as qe,cy as Ue,cz as Ye,cA as Ze,C as pe,m as he,n as ge,o as xe,aX as Xe,aC as Je,cB as es,cC as ss,b5 as as,aw as ts,ax as ns,ay as I,az as L,cD as m,ao as ls,be as os,aE as Z,aH as X,aL as rs}from"./index-CQlQauOE.js";import{S as is}from"./sort-filter-BdZ0BjdE.js";import{S as cs,a as ds,F as us}from"./flow-runs-pagination-DvDLs5GM.js";import{u as ms,F as ps}from"./use-flow-runs-selected-rows-B_7PiPKo.js";import{D as hs}from"./delete-confirmation-dialog-DyUMWSB-.js";import{D as gs}from"./data-table-B3EtpFhV.js";import{T as xs}from"./tags-input-9pBchAz7.js";import{D as fe,a as ye,b as je,d as Q,c as fs}from"./dropdown-menu-6cSdnzsr.js";import{S as ys}from"./index-C84_3iOG.js";import{S as js}from"./index-DzylsDQg.js";import{s as bs,U as vs,_ as Cs}from"./vendor-date-CRz8gtWZ.js";import{A as Ds,b as J}from"./vendor-recharts-BGjDGXVf.js";import{u as Ss}from"./use-page-title-CImKMV-D.js";import{o as ws,e as P,a as ee,s as M,n as _,d as se}from"./vendor-forms-D-iybWES.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-DRMjKWJW.js";import"./use-delete-confirmation-dialog-C5d6hPL-.js";import"./table--kjjs3jN.js";import"./cronstrue-IJcBJ9tZ.js";import"./use-is-overflowing-CyVH32I2.js";const Ns=({flow:s,open:a,onOpenChange:t,onDeleted:n})=>{const l=oe(),{deleteFlow:r,isPending:c}=Re(),d=()=>{r(s.id,{onSuccess:()=>{H.success("Flow deleted"),n?.(),l({to:"/flows"})},onError:()=>{H.error("Failed to delete flow")}})};return e.jsx(hs,{isOpen:a,title:"Delete Flow",description:`Are you sure you want to delete ${s.name}? This action cannot be undone.`,isLoading:c,loadingText:"Deleting...",onConfirm:d,onClose:()=>t(!1)})},ae=4,Rs=2,Fs=({deploymentId:s})=>{const[a,t]=o.useState(0),n=re(a,150),l=o.useCallback(u=>{if(!u)return;const p=()=>{const h=u.getBoundingClientRect().width;t(Math.floor(h/(ae+Rs)))};p();const x=new ResizeObserver(p);return x.observe(u),()=>{x.disconnect()}},[]),r=n||a,{data:c}=z(ie({deployments:{operator:"and_",id:{any_:[s]}},limit:Math.min(60,r||60),sort:"START_TIME_DESC",offset:0})),d=c?.map(u=>({...u}))??[];return e.jsx("div",{className:"w-full",ref:l,children:e.jsx(ce,{enrichedFlowRuns:d,startDate:bs(new Date,vs),endDate:new Date,barWidth:ae,numberOfBars:r,className:"h-8 w-full",chartId:`deployment-${s}`})})},Ts=[{id:"select",header:({table:s})=>e.jsx(V,{checked:s.getIsAllPageRowsSelected(),onCheckedChange:a=>s.toggleAllPageRowsSelected(!!a),"aria-label":"Select all"}),cell:({row:s})=>e.jsx(V,{checked:s.getIsSelected(),onCheckedChange:a=>s.toggleSelected(!!a),"aria-label":"Select row"}),enableSorting:!1,enableHiding:!1,maxSize:20,minSize:20},{accessorKey:"name",header:"Name",cell:({row:s})=>s.original.name},{accessorKey:"status",header:"Status",cell:({row:s})=>{const a=s.original.paused?"PAUSED":s.original.status??"NOT_READY";return e.jsx(js,{status:a})}},{accessorKey:"tags",header:"Tags",cell:({row:s})=>e.jsx("div",{className:"flex flex-wrap gap-1",children:s.original.tags?.map(a=>e.jsx("span",{className:"bg-gray-100 text-gray-800 text-xs font-medium px-2 py-0.5 rounded",children:a},a))})},{accessorKey:"schedules",header:"Schedules",cell:({row:s})=>{const a=s.original.schedules;return!a||a.length===0?null:e.jsx(ys,{schedules:a})},size:150},{accessorKey:"activity",header:"Activity",cell:({row:s})=>s.original.id?e.jsx(Fs,{deploymentId:s.original.id}):null},{id:"actions",cell:({row:s})=>s.original.id?e.jsxs(fe,{children:[e.jsx(ye,{asChild:!0,children:e.jsxs(E,{variant:"ghost",className:"size-8 p-0",children:[e.jsx("span",{className:"sr-only",children:"Open menu"}),e.jsx(de,{id:"MoreHorizontal",className:"size-4"})]})}),e.jsx(je,{align:"end",children:e.jsx(Q,{onClick:()=>{navigator.clipboard.writeText(s.original.id)},children:"Copy ID"})})]}):null,minSize:30,maxSize:30}],ks=[{label:"Created",value:"CREATED_DESC"},{label:"A to Z",value:"NAME_ASC"},{label:"Z to A",value:"NAME_DESC"}],_s=({deployments:s,deploymentsCount:a,deploymentsPages:t,deploymentSearch:n,onDeploymentSearchChange:l,deploymentTags:r,onDeploymentTagsChange:c,deploymentSort:d,onDeploymentSortChange:u,deploymentPagination:p,onDeploymentPaginationChange:x})=>{const[h,y]=o.useState({}),[g,f]=o.useState(!1),{deleteDeployment:j}=Fe(),b=o.useCallback(i=>{const v={pageIndex:p.page-1,pageSize:p.limit},w=typeof i=="function"?i(v):i;x({page:w.pageIndex+1,limit:w.pageSize}),y({})},[p,x]),R=Se({data:s,columns:Ts,getCoreRowModel:we(),manualPagination:!0,pageCount:t,state:{rowSelection:h,pagination:{pageIndex:p.page-1,pageSize:p.limit}},onRowSelectionChange:y,onPaginationChange:b,getRowId:i=>i.id}),C=Object.keys(h).length,D=o.useCallback(()=>{const i=Object.keys(h);for(const v of i)j(v);y({}),f(!1)},[h,j]),S=o.useCallback(i=>{Array.isArray(i)&&c(i)},[c]);return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"grid grid-cols-12 items-center gap-2",children:[e.jsx("div",{className:"flex flex-col gap-1 xl:col-span-3 md:col-span-12 col-span-6 md:order-0 order-3",children:C>0?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(q,{variant:"bodySmall",className:"text-muted-foreground",children:[C," selected"]}),e.jsx(E,{variant:"ghost",size:"icon",className:"h-6 w-6 text-destructive hover:text-destructive",onClick:()=>f(!0),"aria-label":"Delete selected deployments",children:e.jsx(Te,{className:"h-4 w-4"})})]}):e.jsxs(q,{variant:"bodySmall",className:"text-muted-foreground",children:[a," Deployment",a!==1?"s":""]})}),e.jsx("div",{className:"xl:col-span-4 md:col-span-6 col-span-12 md:order-1 order-0",children:e.jsx(ue,{placeholder:"Search deployments...",value:n??"",onChange:i=>l(i.target.value),"aria-label":"Search deployments",debounceMs:300})}),e.jsx("div",{className:"xl:col-span-3 md:col-span-6 col-span-12 md:order-2 order-1",children:e.jsx(xs,{placeholder:"Filter by tags",value:r,onChange:S})}),e.jsx("div",{className:"xl:border-l xl:border-border xl:pl-2 xl:col-span-2 md:col-span-6 col-span-6 md:order-3 order-2",children:e.jsxs(ke,{value:d,onValueChange:i=>u(i),children:[e.jsx(_e,{className:"w-full","aria-label":"Sort deployments",children:e.jsx(Ae,{placeholder:"Sort by"})}),e.jsx(Ee,{children:ks.map(i=>e.jsx(Be,{value:i.value,children:i.label},i.value))})]})})]}),e.jsx(me,{children:e.jsx("div",{className:"[&_[data-slot=table-container]]:overflow-visible",children:e.jsx(gs,{table:R})})}),e.jsx(Oe,{open:g,onOpenChange:f,children:e.jsxs(Pe,{children:[e.jsxs(Me,{children:[e.jsx(Ie,{children:"Delete Deployments"}),e.jsxs(Le,{children:["Are you sure you want to delete ",C," deployment",C!==1?"s":"","? This action cannot be undone."]})]}),e.jsxs(ze,{children:[e.jsx(E,{variant:"outline",onClick:()=>f(!1),children:"Cancel"}),e.jsx(E,{variant:"destructive",onClick:D,children:"Delete"})]})]})})]})},As=({flow:s})=>e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("dl",{className:"flex flex-col gap-2",children:[e.jsx("dt",{className:"text-muted-foreground",children:"Flow ID"}),e.jsx("dd",{className:"text-sm font-medium leading-none font-mono",children:s.id})]}),e.jsxs("dl",{className:"flex flex-col gap-2",children:[e.jsx("dt",{className:"text-muted-foreground",children:"Created"}),e.jsx("dd",{className:"text-sm font-medium leading-none font-mono",children:s.created?e.jsx(U,{date:s.created,format:"absolute"}):"N/A"})]}),e.jsxs("dl",{className:"flex flex-col gap-2",children:[e.jsx("dt",{className:"text-muted-foreground",children:"Updated"}),e.jsx("dd",{className:"text-sm font-medium leading-none font-mono",children:s.updated?e.jsx(U,{date:s.updated,format:"absolute"}):"N/A"})]})]}),Es=({flow:s,onDelete:a})=>{const t=()=>{navigator.clipboard.writeText(s.id),H.success("ID copied")};return e.jsxs(fe,{children:[e.jsx(ye,{asChild:!0,children:e.jsxs(E,{variant:"outline",className:"size-8 p-0",children:[e.jsx("span",{className:"sr-only",children:"Open menu"}),e.jsx(de,{id:"MoreVertical",className:"size-4"})]})}),e.jsxs(je,{align:"end",children:[e.jsx(fs,{children:"Actions"}),e.jsx(Q,{onClick:t,children:"Copy ID"}),e.jsx(Q,{variant:"destructive",onClick:a,children:"Delete"})]})]})};function Bs({flow:s,onDelete:a}){return e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(He,{children:e.jsxs(Qe,{children:[e.jsx(Y,{children:e.jsx(Ge,{to:"/flows",className:"text-xl font-semibold",children:"Flows"})}),e.jsx(We,{}),e.jsx(Y,{className:"text-xl font-semibold",children:e.jsx(Ke,{children:s.name})})]})}),e.jsx(Es,{flow:s,onDelete:a})]})}const A=3e4,Os={completed:{label:"Completed",color:"hsl(142.1 76.2% 36.3%)"},failed:{label:"Failed",color:"hsl(0 84.2% 60.2%)"}},Ps=s=>{const a=[];let t=0,n=0;for(const l of s){let r=0,c=0;for(const d of l.states)d.state_type==="COMPLETED"?r+=d.count_runs:(d.state_type==="FAILED"||d.state_type==="CRASHED")&&(c+=d.count_runs);t+=r,n+=c,a.push({timestamp:l.interval_start,completed:t,failed:n})}return a};function Ms({flowId:s}){const[{data:a},{data:t},{data:n},{data:l},{data:r}]=G({queries:[O(Ve(s),A),O(qe(s),A),O(Ue(s),A),O(Ye(s),A),$e(Ze(s),A)]}),c=o.useMemo(()=>Ps(r),[r]),d=c.some(h=>h.failed>0),u=a-l,p=u>0?(t/u*100).toFixed(0):"0",x=u>0?(n/u*100).toFixed(1):"0";return e.jsxs(pe,{className:"flex-1 relative overflow-hidden pb-20",children:[e.jsx(he,{className:"pb-2",children:e.jsx(ge,{children:"Task Runs"})}),e.jsx(xe,{children:e.jsxs("div",{className:"grid gap-1",children:[e.jsx("div",{className:"inline-flex items-end gap-1 text-base",children:e.jsx("span",{className:"font-semibold",children:a})}),l>0&&e.jsxs("div",{className:"inline-flex items-end gap-1 text-sm",children:[e.jsx("span",{className:"font-semibold text-blue-600",children:l}),e.jsx("span",{className:"text-muted-foreground",children:"Running"})]}),e.jsxs("div",{className:"inline-flex items-end gap-1 text-sm",children:[e.jsx("span",{className:"font-semibold text-green-600",children:t}),e.jsx("span",{className:"text-muted-foreground",children:"Completed"}),e.jsxs("span",{className:"text-green-600",children:[p,"%"]})]}),n>0&&e.jsxs("div",{className:"inline-flex items-end gap-1 text-sm",children:[e.jsx("span",{className:"font-semibold text-red-600",children:n}),e.jsx("span",{className:"text-muted-foreground",children:"Failed"}),e.jsxs("span",{className:"text-red-600",children:[x,"%"]})]})]})}),e.jsx("div",{className:"absolute bottom-4 left-0 right-0 h-16",children:e.jsx(Xe,{config:Os,className:"h-full w-full",children:e.jsxs(Ds,{data:c,margin:{top:0,right:0,bottom:0,left:0},children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"completedGradientFlow",x1:"0",y1:"1",x2:"0",y2:"0",children:[e.jsx("stop",{offset:"0%",stopColor:"var(--color-completed)",stopOpacity:0}),e.jsx("stop",{offset:"100%",stopColor:"var(--color-completed)",stopOpacity:.3})]}),e.jsxs("linearGradient",{id:"failedGradientFlow",x1:"0",y1:"1",x2:"0",y2:"0",children:[e.jsx("stop",{offset:"0%",stopColor:"var(--color-failed)",stopOpacity:0}),e.jsx("stop",{offset:"100%",stopColor:"var(--color-failed)",stopOpacity:.3})]})]}),d&&e.jsx(J,{type:"monotone",dataKey:"failed",stroke:"var(--color-failed)",strokeWidth:2,activeDot:!1,fill:"url(#failedGradientFlow)",dot:!1,isAnimationActive:!1}),e.jsx(J,{type:"monotone",dataKey:"completed",stroke:"var(--color-completed)",strokeWidth:2,activeDot:!1,fill:"url(#completedGradientFlow)",dot:!1,isAnimationActive:!1})]})})})]})}const te=8,Is=4,ne=3e4;function Ls({flowId:s,flow:a}){const[t,n]=o.useState(0),l=re(t,150),r=o.useCallback(g=>{if(!g)return;const f=()=>{const b=g.getBoundingClientRect().width;n(Math.floor(b/(te+Is)))};f();const j=new ResizeObserver(f);return j.observe(g),()=>j.disconnect()},[]),c=l||t,d=60,[{data:u},{data:p}]=G({queries:[ie(es(s,d),ne),Je(ss(s),ne)]}),x=o.useMemo(()=>u.map(g=>({...g,flow:a})),[u,a]),{startDate:h,endDate:y}=o.useMemo(()=>{const g=new Date;return{startDate:Cs(g),endDate:g}},[]);return e.jsxs(pe,{className:"flex-1",children:[e.jsxs(he,{className:"flex flex-row items-center justify-between pb-2",children:[e.jsx(ge,{children:"Flow Runs"}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:[p," total"]})]}),e.jsx(xe,{children:e.jsx("div",{className:"h-24",ref:r,children:c===0?e.jsx(as,{className:"h-full w-full"}):e.jsx(me,{children:e.jsx(ce,{enrichedFlowRuns:x,startDate:h,endDate:y,numberOfBars:c,barWidth:te,className:"h-full w-full"})})})})]})}function zs({flowId:s,flow:a}){return e.jsxs("div",{className:"grid gap-5 md:grid-cols-[2fr_1fr]",children:[e.jsx(Ls,{flowId:s,flow:a}),e.jsx(Ms,{flowId:s})]})}function Hs({flow:s,flowRuns:a,flowRunsCount:t,flowRunsPages:n,deployments:l,deploymentsCount:r,deploymentsPages:c,tab:d="runs",pagination:u,onPaginationChange:p,onPrefetchPage:x,sort:h,onSortChange:y,flowRunSearch:g,onFlowRunSearchChange:f,selectedStates:j,onSelectFilter:b,deploymentSearch:R,onDeploymentSearchChange:C,deploymentTags:D,onDeploymentTagsChange:S,deploymentSort:i,onDeploymentSortChange:v,deploymentPagination:w,onDeploymentPaginationChange:N}){const F=oe(),[W,T]=o.useState(!1),[B,be,{onSelectRow:ve,clearSet:K}]=ms(),$=a.map(k=>({...k,flow:s})),Ce=o.useCallback(()=>{f(""),b(new Set),K()},[f,b,K]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"container mx-auto flex flex-col gap-4",children:[e.jsx(Bs,{flow:s,onDelete:()=>T(!0)}),e.jsx(zs,{flowId:s.id,flow:s}),e.jsxs(ts,{value:d,onValueChange:k=>{F({to:".",search:De=>({...De,tab:k})})},children:[e.jsxs(ns,{children:[e.jsx(I,{value:"runs",children:"Runs"}),e.jsx(I,{value:"deployments",children:"Deployments"}),e.jsx(I,{value:"details",children:"Details"})]}),e.jsxs(L,{value:"runs",className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(ps,{count:t,results:$,selectedRows:B,setSelectedRows:be}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(ue,{placeholder:"Search by run name",value:g??"",onChange:k=>f(k.target.value),className:"w-64"}),e.jsx(cs,{selectedFilters:j,onSelectFilter:b}),e.jsx(is,{value:h,onSelect:y})]})]}),e.jsx(ds,{flowRuns:$,selectedRows:B,onSelect:ve,onClearFilters:Ce}),e.jsx(us,{count:t,pages:n,pagination:u,onChangePagination:p,onPrefetchPage:x})]}),e.jsx(L,{value:"deployments",children:e.jsx(_s,{deployments:l,deploymentsCount:r,deploymentsPages:c,deploymentSearch:R,onDeploymentSearchChange:C,deploymentTags:D,onDeploymentTagsChange:S,deploymentSort:i,onDeploymentSortChange:v,deploymentPagination:w,onDeploymentPaginationChange:N})}),e.jsx(L,{value:"details",children:e.jsx(As,{flow:s})})]})]}),e.jsx(Ns,{flow:s,open:W,onOpenChange:T})]})}ws({tab:P(["runs","deployments","details"]).optional().default("runs"),"runs.page":_().int().positive().optional().default(1),"runs.limit":_().int().positive().max(100).optional().default(10),"runs.sort":P(rs).optional().default("START_TIME_DESC"),"runs.flowRuns.nameLike":M().optional().default(""),"runs.flowRuns.state.name":ee(M()).optional(),type:P(["span","range"]).optional(),seconds:_().int().positive().optional(),startDateTime:se().optional(),endDateTime:se().optional(),"deployments.page":_().int().positive().optional().default(1),"deployments.limit":_().int().positive().optional().default(10),"deployments.nameLike":M().optional(),"deployments.tags":ee(M()).optional(),"deployments.sort":P(["CREATED_DESC","UPDATED_DESC","NAME_ASC","NAME_DESC"]).optional().default("NAME_ASC")}).optional().default({});const le=(s,a)=>{const t=s["runs.flowRuns.nameLike"],n=s["runs.flowRuns.state.name"]??[],r=t||n.length>0?{operator:"and_",...t&&{name:{like_:t}},...n.length>0&&{state:{operator:"and_",name:{any_:n}}}}:void 0;return{page:s["runs.page"],limit:s["runs.limit"],sort:s["runs.sort"],flow_runs:r,flows:{operator:"and_",id:{any_:[a]}}}},Qs=()=>{const s=m.useSearch(),a=m.useNavigate(),t=o.useMemo(()=>({page:s["runs.page"],limit:s["runs.limit"]}),[s["runs.page"],s["runs.limit"]]),n=o.useCallback(l=>{a({to:".",search:r=>({...r,"runs.page":l.page,"runs.limit":l.limit}),replace:!0})},[a]);return[t,n]},Gs=()=>{const s=m.useSearch(),a=m.useNavigate(),t=o.useCallback(n=>{a({to:".",search:l=>({...l,"runs.sort":n,"runs.page":1}),replace:!0})},[a]);return[s["runs.sort"],t]},Ws=()=>{const s=m.useSearch(),a=m.useNavigate(),t=o.useCallback(n=>{a({to:".",search:l=>({...l,"runs.flowRuns.nameLike":n,"runs.page":1}),replace:!0})},[a]);return[s["runs.flowRuns.nameLike"],t]},Ks=()=>{const s=m.useSearch(),a=m.useNavigate(),t=o.useMemo(()=>new Set(s["runs.flowRuns.state.name"]||[]),[s["runs.flowRuns.state.name"]]),n=o.useCallback(l=>{a({to:".",search:r=>({...r,"runs.flowRuns.state.name":Array.from(l),"runs.page":1}),replace:!0})},[a]);return{selectedStates:t,onSelectFilter:n}},$s=()=>{const s=m.useSearch(),a=m.useNavigate(),t=o.useCallback(n=>{a({to:".",search:l=>({...l,"deployments.nameLike":n||void 0,"deployments.page":1}),replace:!0})},[a]);return[s["deployments.nameLike"],t]},Vs=()=>{const s=m.useSearch(),a=m.useNavigate(),t=o.useCallback(n=>{a({to:".",search:l=>({...l,"deployments.tags":n.length>0?n:void 0,"deployments.page":1}),replace:!0})},[a]);return[s["deployments.tags"]??[],t]},qs=()=>{const s=m.useSearch(),a=m.useNavigate(),t=o.useCallback(n=>{a({to:".",search:l=>({...l,"deployments.sort":n,"deployments.page":1}),replace:!0})},[a]);return[s["deployments.sort"],t]},Us=()=>{const s=m.useSearch(),a=m.useNavigate(),t=o.useMemo(()=>({page:s["deployments.page"],limit:s["deployments.limit"]}),[s["deployments.page"],s["deployments.limit"]]),n=o.useCallback(l=>{a({to:".",search:r=>({...r,"deployments.page":l.page,"deployments.limit":l.limit}),replace:!0})},[a]);return[t,n]},fa=()=>{const s=Ne(),{id:a}=m.useParams(),t=m.useSearch(),[n,l]=Qs(),[r,c]=Gs(),[d,u]=Ws(),{selectedStates:p,onSelectFilter:x}=Ks(),[h,y]=$s(),[g,f]=Vs(),[j,b]=qs(),[R,C]=Us(),[{data:D}]=G({queries:[ls(a)]}),{data:S}=z(os({sort:t["deployments.sort"],page:t["deployments.page"],limit:t["deployments.limit"],flows:{operator:"and_",id:{any_:[a]}},deployments:{operator:"and_",flow_or_deployment_name:{like_:t["deployments.nameLike"]},tags:{operator:"and_",all_:t["deployments.tags"]||[]}}}));Ss(D?.name?`Flow: ${D.name}`:"Flow");const{data:i}=z(Z(le(t,a),3e4)),v=i?.results??[];o.useEffect(()=>{const N=v.map(F=>F.id);N.length>0&&s.prefetchQuery(X(N))},[s,v]);const w=o.useCallback(N=>{const F=le({...t,"runs.page":N},a);(async()=>{const T=(await s.ensureQueryData(Z(F,3e4)))?.results?.map(B=>B.id)??[];T.length>0&&s.prefetchQuery(X(T))})()},[s,t,a]);return e.jsx(Hs,{flow:D,flowRuns:v,flowRunsCount:i?.count??0,flowRunsPages:i?.pages??0,deployments:S?.results??[],deploymentsCount:S?.count??0,deploymentsPages:S?.pages??0,tab:t.tab,pagination:n,onPaginationChange:l,onPrefetchPage:w,sort:r,onSortChange:c,flowRunSearch:d,onFlowRunSearchChange:u,selectedStates:p,onSelectFilter:x,deploymentSearch:h,onDeploymentSearchChange:y,deploymentTags:g,onDeploymentTagsChange:f,deploymentSort:j,onDeploymentSortChange:b,deploymentPagination:R,onDeploymentPaginationChange:C})};export{fa as component};
|
|
2
|
+
//# sourceMappingURL=flow._id-U31aNcVQ.js.map
|