prefect 3.6.16.dev5__py3-none-any.whl → 3.6.16.dev6__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/cli/__init__.py +1 -0
- prefect/cli/cloud/asset.py +135 -0
- prefect/server/ui-v2/assets/artifact-card-BnPKAfkY.js +2 -0
- prefect/server/ui-v2/assets/artifact-card-BnPKAfkY.js.map +1 -0
- prefect/server/ui-v2/assets/artifact._id-vDOuIuta.js +2 -0
- prefect/server/ui-v2/assets/artifact._id-vDOuIuta.js.map +1 -0
- prefect/server/ui-v2/assets/automation-wizard-RlOhF90R.js +2 -0
- prefect/server/ui-v2/assets/automation-wizard-RlOhF90R.js.map +1 -0
- prefect/server/ui-v2/assets/automation._id-CEHa-X0X.js +2 -0
- prefect/server/ui-v2/assets/{automation._id-CMiura1b.js.map → automation._id-CEHa-X0X.js.map} +1 -1
- prefect/server/ui-v2/assets/{automation_._id.edit-Cbfcwa-K.js → automation_._id.edit-BRWAsELa.js} +2 -2
- prefect/server/ui-v2/assets/{automation_._id.edit-Cbfcwa-K.js.map → automation_._id.edit-BRWAsELa.js.map} +1 -1
- prefect/server/ui-v2/assets/{automations-header-BxPCOE-0.js → automations-header-Dr6v5dPp.js} +2 -2
- prefect/server/ui-v2/assets/{automations-header-BxPCOE-0.js.map → automations-header-Dr6v5dPp.js.map} +1 -1
- prefect/server/ui-v2/assets/base-job-template-form-section-C8_R96gO.js +2 -0
- prefect/server/ui-v2/assets/base-job-template-form-section-C8_R96gO.js.map +1 -0
- prefect/server/ui-v2/assets/block-type-details-tAkUWqs1.js +2 -0
- prefect/server/ui-v2/assets/block-type-details-tAkUWqs1.js.map +1 -0
- prefect/server/ui-v2/assets/block-type-logo-scnMsyY5.js +2 -0
- prefect/server/ui-v2/assets/{block-type-logo-DuvU7goV.js.map → block-type-logo-scnMsyY5.js.map} +1 -1
- prefect/server/ui-v2/assets/block._id-BY42cyjR.js +2 -0
- prefect/server/ui-v2/assets/block._id-BY42cyjR.js.map +1 -0
- prefect/server/ui-v2/assets/{block_._id.edit-C4SmoQ4y.js → block_._id.edit-n2jwU5yr.js} +2 -2
- prefect/server/ui-v2/assets/{block_._id.edit-C4SmoQ4y.js.map → block_._id.edit-n2jwU5yr.js.map} +1 -1
- prefect/server/ui-v2/assets/catalog-5_GoCKpb.js +2 -0
- prefect/server/ui-v2/assets/catalog-5_GoCKpb.js.map +1 -0
- prefect/server/ui-v2/assets/catalog_._slug-sZvt0fDy.js +2 -0
- prefect/server/ui-v2/assets/catalog_._slug-sZvt0fDy.js.map +1 -0
- prefect/server/ui-v2/assets/{catalog_._slug_.create-CgKL4TS2.js → catalog_._slug_.create-rboQmoyW.js} +2 -2
- prefect/server/ui-v2/assets/{catalog_._slug_.create-CgKL4TS2.js.map → catalog_._slug_.create-rboQmoyW.js.map} +1 -1
- prefect/server/ui-v2/assets/{collapsible-DZbPzSgr.js → collapsible-Lk7MRvBH.js} +2 -2
- prefect/server/ui-v2/assets/{collapsible-DZbPzSgr.js.map → collapsible-Lk7MRvBH.js.map} +1 -1
- prefect/server/ui-v2/assets/concurrency-limit._id-D5i9zZJh.js +2 -0
- prefect/server/ui-v2/assets/concurrency-limit._id-D5i9zZJh.js.map +1 -0
- prefect/server/ui-v2/assets/create-CtsA2QIl.js +2 -0
- prefect/server/ui-v2/assets/{create-BrNwbpVu.js.map → create-CtsA2QIl.js.map} +1 -1
- prefect/server/ui-v2/assets/{create-DWgkh2HT.js → create-DJPAEZ93.js} +2 -2
- prefect/server/ui-v2/assets/create-DJPAEZ93.js.map +1 -0
- prefect/server/ui-v2/assets/{data-table-QSHqmTar.js → data-table-bk-0xKWT.js} +2 -2
- prefect/server/ui-v2/assets/{data-table-QSHqmTar.js.map → data-table-bk-0xKWT.js.map} +1 -1
- prefect/server/ui-v2/assets/{delete-confirmation-dialog-dLycVNo4.js → delete-confirmation-dialog-BZg9EOfN.js} +2 -2
- prefect/server/ui-v2/assets/{delete-confirmation-dialog-dLycVNo4.js.map → delete-confirmation-dialog-BZg9EOfN.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment-action-header-CzvBTL6H.js → deployment-action-header-DwuMPgVg.js} +2 -2
- prefect/server/ui-v2/assets/{deployment-action-header-CzvBTL6H.js.map → deployment-action-header-DwuMPgVg.js.map} +1 -1
- prefect/server/ui-v2/assets/deployment-form-BpKkzEf2.js +3 -0
- prefect/server/ui-v2/assets/deployment-form-BpKkzEf2.js.map +1 -0
- prefect/server/ui-v2/assets/{deployment-links-CGjJpxJA.js → deployment-links-B67P-6Ph.js} +2 -2
- prefect/server/ui-v2/assets/{deployment-links-CGjJpxJA.js.map → deployment-links-B67P-6Ph.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment._id-DXrb6frJ.js → deployment._id-BVOBfMVf.js} +2 -2
- prefect/server/ui-v2/assets/deployment._id-BVOBfMVf.js.map +1 -0
- prefect/server/ui-v2/assets/deployment._id-KOMC9fpE.js +2 -0
- prefect/server/ui-v2/assets/deployment._id-KOMC9fpE.js.map +1 -0
- prefect/server/ui-v2/assets/deployment_._id.duplicate-BPk2SchT.js +2 -0
- prefect/server/ui-v2/assets/deployment_._id.duplicate-BPk2SchT.js.map +1 -0
- prefect/server/ui-v2/assets/deployment_._id.edit-Dv0M_huv.js +2 -0
- prefect/server/ui-v2/assets/deployment_._id.edit-Dv0M_huv.js.map +1 -0
- prefect/server/ui-v2/assets/deployment_._id.run-DFVA4Xhx.js +2 -0
- prefect/server/ui-v2/assets/{deployment_._id.run-CnacOmhY.js.map → deployment_._id.run-DFVA4Xhx.js.map} +1 -1
- prefect/server/ui-v2/assets/{dropdown-menu-B9LKPlz7.js → dropdown-menu-fRiq5bS-.js} +2 -2
- prefect/server/ui-v2/assets/{dropdown-menu-B9LKPlz7.js.map → dropdown-menu-fRiq5bS-.js.map} +1 -1
- prefect/server/ui-v2/assets/{event-resource-display-B42RIaiX.js → event-resource-display-C1ZAey-o.js} +2 -2
- prefect/server/ui-v2/assets/{event-resource-display-B42RIaiX.js.map → event-resource-display-C1ZAey-o.js.map} +1 -1
- prefect/server/ui-v2/assets/event._eventDate._eventId-CcbtP9Ag.js +2 -0
- prefect/server/ui-v2/assets/{event._eventDate._eventId-CKTuT_8S.js.map → event._eventDate._eventId-CcbtP9Ag.js.map} +1 -1
- prefect/server/ui-v2/assets/flow-run-graph-CycKStSg.js +2 -0
- prefect/server/ui-v2/assets/flow-run-graph-CycKStSg.js.map +1 -0
- prefect/server/ui-v2/assets/{flow-run._id-BKv9Meqc.js → flow-run._id-Dn9R_Tjy.js} +2 -2
- prefect/server/ui-v2/assets/flow-run._id-Dn9R_Tjy.js.map +1 -0
- prefect/server/ui-v2/assets/{flow-run._id-ZTkjj6bM.js → flow-run._id-Dwx7ojcj.js} +2 -2
- prefect/server/ui-v2/assets/flow-run._id-Dwx7ojcj.js.map +1 -0
- prefect/server/ui-v2/assets/flow-run._id-YzRd5jrC.js +4 -0
- prefect/server/ui-v2/assets/flow-run._id-YzRd5jrC.js.map +1 -0
- prefect/server/ui-v2/assets/flow-runs-pagination-DMLZFM1m.js +2 -0
- prefect/server/ui-v2/assets/flow-runs-pagination-DMLZFM1m.js.map +1 -0
- prefect/server/ui-v2/assets/flow._id-V6-Qhkwk.js +2 -0
- prefect/server/ui-v2/assets/flow._id-V6-Qhkwk.js.map +1 -0
- prefect/server/ui-v2/assets/{form-DOdmIC3A.js → form-Cl5Hk9bq.js} +2 -2
- prefect/server/ui-v2/assets/{form-DOdmIC3A.js.map → form-Cl5Hk9bq.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-DcIuN5UN.js → header-BuI436ik.js} +2 -2
- prefect/server/ui-v2/assets/{header-DcIuN5UN.js.map → header-BuI436ik.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-CnBwASd-.js → header-DcAQCxQl.js} +2 -2
- prefect/server/ui-v2/assets/{header-CnBwASd-.js.map → header-DcAQCxQl.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-DxE-NzAK.js → header-qlcK4NLD.js} +2 -2
- prefect/server/ui-v2/assets/{header-DxE-NzAK.js.map → header-qlcK4NLD.js.map} +1 -1
- prefect/server/ui-v2/assets/index--Z69UYXV.js +2 -0
- prefect/server/ui-v2/assets/index--Z69UYXV.js.map +1 -0
- prefect/server/ui-v2/assets/{index-D0R9_LIL.js → index-BO4Qqsm8.js} +2 -2
- prefect/server/ui-v2/assets/index-BO4Qqsm8.js.map +1 -0
- prefect/server/ui-v2/assets/index-Bg45XS_V.js +2 -0
- prefect/server/ui-v2/assets/index-Bg45XS_V.js.map +1 -0
- prefect/server/ui-v2/assets/{index-BIBIJufF.js → index-BleYpDoN.js} +2 -2
- prefect/server/ui-v2/assets/index-BleYpDoN.js.map +1 -0
- prefect/server/ui-v2/assets/{index-DyOAqIOp.js → index-C63VUjOh.js} +2 -2
- prefect/server/ui-v2/assets/{index-DyOAqIOp.js.map → index-C63VUjOh.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-DfKXdmko.js → index-C6LgWyJb.js} +2 -2
- prefect/server/ui-v2/assets/index-C6LgWyJb.js.map +1 -0
- prefect/server/ui-v2/assets/index-CE-bVgqj.js +2 -0
- prefect/server/ui-v2/assets/{index-DlAHvqFx.js.map → index-CE-bVgqj.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-V_xTKaEb.js → index-CPpeVt8m.js} +13 -13
- prefect/server/ui-v2/assets/index-CPpeVt8m.js.map +1 -0
- prefect/server/ui-v2/assets/index-CYaUe0Ym.js +2 -0
- prefect/server/ui-v2/assets/index-CYaUe0Ym.js.map +1 -0
- prefect/server/ui-v2/assets/{index-C5RMFRyZ.js → index-Clbms0kg.js} +2 -2
- prefect/server/ui-v2/assets/index-Clbms0kg.js.map +1 -0
- prefect/server/ui-v2/assets/index-D13YFoYA.js +2 -0
- prefect/server/ui-v2/assets/index-D13YFoYA.js.map +1 -0
- prefect/server/ui-v2/assets/{index-Cx1qEoCK.js → index-D73a_nGu.js} +2 -2
- prefect/server/ui-v2/assets/{index-Cx1qEoCK.js.map → index-D73a_nGu.js.map} +1 -1
- prefect/server/ui-v2/assets/index-DJXBzX1E.css +1 -0
- prefect/server/ui-v2/assets/{index-BO60ehN6.js → index-DPPPaOr_.js} +2 -2
- prefect/server/ui-v2/assets/index-DPPPaOr_.js.map +1 -0
- prefect/server/ui-v2/assets/{index-DP8W-xJo.js → index-DU9ShbqW.js} +2 -2
- prefect/server/ui-v2/assets/index-DU9ShbqW.js.map +1 -0
- prefect/server/ui-v2/assets/index-DdR1lzZk.js +2 -0
- prefect/server/ui-v2/assets/index-DdR1lzZk.js.map +1 -0
- prefect/server/ui-v2/assets/{index-B9ttjsyu.js → index-ELo08q04.js} +2 -2
- prefect/server/ui-v2/assets/{index-B9ttjsyu.js.map → index-ELo08q04.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-BTL1xHS9.js → index-cp6PTdHp.js} +2 -2
- prefect/server/ui-v2/assets/{index-BTL1xHS9.js.map → index-cp6PTdHp.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-D6G96ToY.js → index-kM_g8J0u.js} +2 -2
- prefect/server/ui-v2/assets/{index-D6G96ToY.js.map → index-kM_g8J0u.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-q5Y3hlDT.js → index-mYcm9Rkr.js} +2 -2
- prefect/server/ui-v2/assets/index-mYcm9Rkr.js.map +1 -0
- prefect/server/ui-v2/assets/{index-D9cOtoSU.js → index-yavn_NBp.js} +2 -2
- prefect/server/ui-v2/assets/index-yavn_NBp.js.map +1 -0
- prefect/server/ui-v2/assets/{json-input-YKJMJCcT.js → json-input-iUzf6BvZ.js} +2 -2
- prefect/server/ui-v2/assets/{json-input-YKJMJCcT.js.map → json-input-iUzf6BvZ.js.map} +1 -1
- prefect/server/ui-v2/assets/{key-value-RPUUqQ6F.js → key-value-DI27Dv4P.js} +2 -2
- prefect/server/ui-v2/assets/{key-value-RPUUqQ6F.js.map → key-value-DI27Dv4P.js.map} +1 -1
- prefect/server/ui-v2/assets/key._key-C-nk2nld.js +2 -0
- prefect/server/ui-v2/assets/key._key-C-nk2nld.js.map +1 -0
- prefect/server/ui-v2/assets/{lazy-markdown-B9vEkJ0h.js → lazy-markdown-D_y73qoD.js} +2 -2
- prefect/server/ui-v2/assets/{lazy-markdown-B9vEkJ0h.js.map → lazy-markdown-D_y73qoD.js.map} +1 -1
- prefect/server/ui-v2/assets/{login-C3PhSGQJ.js → login-DR_xuMmg.js} +2 -2
- prefect/server/ui-v2/assets/{login-C3PhSGQJ.js.map → login-DR_xuMmg.js.map} +1 -1
- prefect/server/ui-v2/assets/{markdown-input-Dei7u1qp.js → markdown-input-hzlzpUdj.js} +2 -2
- prefect/server/ui-v2/assets/{markdown-input-Dei7u1qp.js.map → markdown-input-hzlzpUdj.js.map} +1 -1
- prefect/server/ui-v2/assets/{python-example-snippet-DvulFxgw.js → python-example-snippet-d8bTNJ0J.js} +3 -3
- prefect/server/ui-v2/assets/{python-example-snippet-DvulFxgw.js.map → python-example-snippet-d8bTNJ0J.js.map} +1 -1
- prefect/server/ui-v2/assets/{python-input-niCawr8m.js → python-input-Bxdnzvx3.js} +2 -2
- prefect/server/ui-v2/assets/{python-input-niCawr8m.js.map → python-input-Bxdnzvx3.js.map} +1 -1
- prefect/server/ui-v2/assets/{radio-group-D55TQZsk.js → radio-group-0oOEMJCS.js} +2 -2
- prefect/server/ui-v2/assets/{radio-group-D55TQZsk.js.map → radio-group-0oOEMJCS.js.map} +1 -1
- prefect/server/ui-v2/assets/{route-error-state-Cu4m0LTX.js → route-error-state-BqbnZCc-.js} +2 -2
- prefect/server/ui-v2/assets/{route-error-state-Cu4m0LTX.js.map → route-error-state-BqbnZCc-.js.map} +1 -1
- prefect/server/ui-v2/assets/{schema-form-BQAcWW5k.js → schema-form-BD-WM4S0.js} +2 -2
- prefect/server/ui-v2/assets/{schema-form-BQAcWW5k.js.map → schema-form-BD-WM4S0.js.map} +1 -1
- prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-Cb4sTJle.js → schema-form-input-string-format-datetime-Dg3zVAp5.js} +4 -4
- prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-Cb4sTJle.js.map → schema-form-input-string-format-datetime-Dg3zVAp5.js.map} +1 -1
- prefect/server/ui-v2/assets/{settings-DV4ewZ_4.js → settings-Dm6yMLix.js} +2 -2
- prefect/server/ui-v2/assets/{settings-DV4ewZ_4.js.map → settings-Dm6yMLix.js.map} +1 -1
- prefect/server/ui-v2/assets/{sort-filter-DY7vgl7C.js → sort-filter-X6JyRc0-.js} +2 -2
- prefect/server/ui-v2/assets/{sort-filter-DY7vgl7C.js.map → sort-filter-X6JyRc0-.js.map} +1 -1
- prefect/server/ui-v2/assets/{table-ChOwO4Pk.js → table-Xyel2BEw.js} +2 -2
- prefect/server/ui-v2/assets/{table-ChOwO4Pk.js.map → table-Xyel2BEw.js.map} +1 -1
- prefect/server/ui-v2/assets/{tags-input-2KSBvO_K.js → tags-input-DqZ8v99z.js} +2 -2
- prefect/server/ui-v2/assets/{tags-input-2KSBvO_K.js.map → tags-input-DqZ8v99z.js.map} +1 -1
- prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-CNrP9yPQ.js → task-run-concurrency-limits-reset-dialog-5xFWeoYy.js} +2 -2
- prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-CNrP9yPQ.js.map → task-run-concurrency-limits-reset-dialog-5xFWeoYy.js.map} +1 -1
- prefect/server/ui-v2/assets/{task-run._id-cqXH0PMU.js → task-run._id-9DcrUEGz.js} +3 -3
- prefect/server/ui-v2/assets/{task-run._id-cqXH0PMU.js.map → task-run._id-9DcrUEGz.js.map} +1 -1
- prefect/server/ui-v2/assets/{task-run._id-CQGeAiBh.js → task-run._id-DJkoLl_e.js} +2 -2
- prefect/server/ui-v2/assets/task-run._id-DJkoLl_e.js.map +1 -0
- prefect/server/ui-v2/assets/task-runs-pagination-B2fSdB1t.js +2 -0
- prefect/server/ui-v2/assets/task-runs-pagination-B2fSdB1t.js.map +1 -0
- prefect/server/ui-v2/assets/{textarea-9v5uTuxg.js → textarea-DFEOJJdc.js} +2 -2
- prefect/server/ui-v2/assets/{textarea-9v5uTuxg.js.map → textarea-DFEOJJdc.js.map} +1 -1
- prefect/server/ui-v2/assets/{timezone-select-DPtR_b06.js → timezone-select-NViFNNLz.js} +2 -2
- prefect/server/ui-v2/assets/{timezone-select-DPtR_b06.js.map → timezone-select-NViFNNLz.js.map} +1 -1
- prefect/server/ui-v2/assets/{toggle-group-CBJphTE6.js → toggle-group-EMgSOoYH.js} +2 -2
- prefect/server/ui-v2/assets/{toggle-group-CBJphTE6.js.map → toggle-group-EMgSOoYH.js.map} +1 -1
- prefect/server/ui-v2/assets/use-delete-automation-confirmation-dialog-BHgDXlwg.js +2 -0
- prefect/server/ui-v2/assets/use-delete-automation-confirmation-dialog-BHgDXlwg.js.map +1 -0
- prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-BYY1b8yH.js → use-delete-block-document-confirmation-dialog-CxRkBKPg.js} +2 -2
- prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-BYY1b8yH.js.map → use-delete-block-document-confirmation-dialog-CxRkBKPg.js.map} +1 -1
- prefect/server/ui-v2/assets/use-flow-runs-selected-rows-Ck8nwx2q.js +2 -0
- prefect/server/ui-v2/assets/use-flow-runs-selected-rows-Ck8nwx2q.js.map +1 -0
- prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-BOTU5FPq.js → use-get-artifacts-flow-task-runs-D7Djt53s.js} +2 -2
- prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-BOTU5FPq.js.map → use-get-artifacts-flow-task-runs-D7Djt53s.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-quick-run-DzSmbSlu.js → use-quick-run-Cpy0t7dX.js} +2 -2
- prefect/server/ui-v2/assets/{use-quick-run-DzSmbSlu.js.map → use-quick-run-Cpy0t7dX.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-state-favicon-UFxhmhHr.js → use-state-favicon-CMsL9s6j.js} +2 -2
- prefect/server/ui-v2/assets/{use-state-favicon-UFxhmhHr.js.map → use-state-favicon-CMsL9s6j.js.map} +1 -1
- prefect/server/ui-v2/assets/use-stepper-CZZEx5js.js +2 -0
- prefect/server/ui-v2/assets/use-stepper-CZZEx5js.js.map +1 -0
- prefect/server/ui-v2/assets/{utilities-2FfCfMAV.js → utilities-D9BfvLg5.js} +2 -2
- prefect/server/ui-v2/assets/{utilities-2FfCfMAV.js.map → utilities-D9BfvLg5.js.map} +1 -1
- prefect/server/ui-v2/assets/work-pool-filter-dsJ6xeK6.js +2 -0
- prefect/server/ui-v2/assets/work-pool-filter-dsJ6xeK6.js.map +1 -0
- prefect/server/ui-v2/assets/{work-pool-queue-toggle-zSWhEFap.js → work-pool-queue-toggle-f_-cTWxB.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool-queue-toggle-zSWhEFap.js.map → work-pool-queue-toggle-f_-cTWxB.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool._workPoolName-BwIVfCIe.js → work-pool._workPoolName-zBqgkYLT.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool._workPoolName-BwIVfCIe.js.map → work-pool._workPoolName-zBqgkYLT.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-j7cjgoJp.js → work-pool_._workPoolName.edit-B-8_CnfA.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-j7cjgoJp.js.map → work-pool_._workPoolName.edit-B-8_CnfA.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-BlFjSdoB.js → work-pool_._workPoolName.queue._workQueueName-DzrY1tMq.js} +2 -2
- prefect/server/ui-v2/assets/work-pool_._workPoolName.queue._workQueueName-DzrY1tMq.js.map +1 -0
- prefect/server/ui-v2/assets/{work-queue-icon-text-vWlRNW-b.js → work-queue-icon-text-BqqQ413o.js} +2 -2
- prefect/server/ui-v2/assets/{work-queue-icon-text-vWlRNW-b.js.map → work-queue-icon-text-BqqQ413o.js.map} +1 -1
- prefect/server/ui-v2/index.html +2 -2
- prefect/task_engine.py +26 -12
- prefect/workers/base.py +18 -1
- {prefect-3.6.16.dev5.dist-info → prefect-3.6.16.dev6.dist-info}/METADATA +1 -1
- {prefect-3.6.16.dev5.dist-info → prefect-3.6.16.dev6.dist-info}/RECORD +208 -207
- prefect/server/ui-v2/assets/artifact-card-DQfjRA2u.js +0 -2
- prefect/server/ui-v2/assets/artifact-card-DQfjRA2u.js.map +0 -1
- prefect/server/ui-v2/assets/artifact._id-BBhuX3px.js +0 -2
- prefect/server/ui-v2/assets/artifact._id-BBhuX3px.js.map +0 -1
- prefect/server/ui-v2/assets/automation-wizard-DeT-tz5i.js +0 -2
- prefect/server/ui-v2/assets/automation-wizard-DeT-tz5i.js.map +0 -1
- prefect/server/ui-v2/assets/automation._id-CMiura1b.js +0 -2
- prefect/server/ui-v2/assets/base-job-template-form-section-MeO0M71Y.js +0 -2
- prefect/server/ui-v2/assets/base-job-template-form-section-MeO0M71Y.js.map +0 -1
- prefect/server/ui-v2/assets/block-type-details-Bcb9qEO8.js +0 -2
- prefect/server/ui-v2/assets/block-type-details-Bcb9qEO8.js.map +0 -1
- prefect/server/ui-v2/assets/block-type-logo-DuvU7goV.js +0 -2
- prefect/server/ui-v2/assets/block._id-DFR6zmOy.js +0 -2
- prefect/server/ui-v2/assets/block._id-DFR6zmOy.js.map +0 -1
- prefect/server/ui-v2/assets/catalog-CPzaK8QS.js +0 -2
- prefect/server/ui-v2/assets/catalog-CPzaK8QS.js.map +0 -1
- prefect/server/ui-v2/assets/catalog_._slug-60h4tERz.js +0 -2
- prefect/server/ui-v2/assets/catalog_._slug-60h4tERz.js.map +0 -1
- prefect/server/ui-v2/assets/concurrency-limit._id-BFfR6_U0.js +0 -2
- prefect/server/ui-v2/assets/concurrency-limit._id-BFfR6_U0.js.map +0 -1
- prefect/server/ui-v2/assets/create-BrNwbpVu.js +0 -2
- prefect/server/ui-v2/assets/create-DWgkh2HT.js.map +0 -1
- prefect/server/ui-v2/assets/deployment-form-B33C7F2u.js +0 -3
- prefect/server/ui-v2/assets/deployment-form-B33C7F2u.js.map +0 -1
- prefect/server/ui-v2/assets/deployment._id-5rPcPD0T.js +0 -2
- prefect/server/ui-v2/assets/deployment._id-5rPcPD0T.js.map +0 -1
- prefect/server/ui-v2/assets/deployment._id-DXrb6frJ.js.map +0 -1
- prefect/server/ui-v2/assets/deployment_._id.duplicate-D7YLydeq.js +0 -2
- prefect/server/ui-v2/assets/deployment_._id.duplicate-D7YLydeq.js.map +0 -1
- prefect/server/ui-v2/assets/deployment_._id.edit-Daq0J0Ow.js +0 -2
- prefect/server/ui-v2/assets/deployment_._id.edit-Daq0J0Ow.js.map +0 -1
- prefect/server/ui-v2/assets/deployment_._id.run-CnacOmhY.js +0 -2
- prefect/server/ui-v2/assets/event._eventDate._eventId-CKTuT_8S.js +0 -2
- prefect/server/ui-v2/assets/flow-run-graph-OrT2Osbu.js +0 -2
- prefect/server/ui-v2/assets/flow-run-graph-OrT2Osbu.js.map +0 -1
- prefect/server/ui-v2/assets/flow-run._id-BKv9Meqc.js.map +0 -1
- prefect/server/ui-v2/assets/flow-run._id-DCYAnq0D.js +0 -4
- prefect/server/ui-v2/assets/flow-run._id-DCYAnq0D.js.map +0 -1
- prefect/server/ui-v2/assets/flow-run._id-ZTkjj6bM.js.map +0 -1
- prefect/server/ui-v2/assets/flow-runs-pagination-CykMKOhv.js +0 -2
- prefect/server/ui-v2/assets/flow-runs-pagination-CykMKOhv.js.map +0 -1
- prefect/server/ui-v2/assets/flow._id-DhrxqQmD.js +0 -2
- prefect/server/ui-v2/assets/flow._id-DhrxqQmD.js.map +0 -1
- prefect/server/ui-v2/assets/index-BIBIJufF.js.map +0 -1
- prefect/server/ui-v2/assets/index-BO60ehN6.js.map +0 -1
- prefect/server/ui-v2/assets/index-BS7fbJ2s.js +0 -2
- prefect/server/ui-v2/assets/index-BS7fbJ2s.js.map +0 -1
- prefect/server/ui-v2/assets/index-C5RMFRyZ.js.map +0 -1
- prefect/server/ui-v2/assets/index-D0R9_LIL.js.map +0 -1
- prefect/server/ui-v2/assets/index-D9cOtoSU.js.map +0 -1
- prefect/server/ui-v2/assets/index-DEpWUeaO.js +0 -2
- prefect/server/ui-v2/assets/index-DEpWUeaO.js.map +0 -1
- prefect/server/ui-v2/assets/index-DP8W-xJo.js.map +0 -1
- prefect/server/ui-v2/assets/index-DfKXdmko.js.map +0 -1
- prefect/server/ui-v2/assets/index-DiVKp6rW.js +0 -2
- prefect/server/ui-v2/assets/index-DiVKp6rW.js.map +0 -1
- prefect/server/ui-v2/assets/index-DlAHvqFx.js +0 -2
- prefect/server/ui-v2/assets/index-VNFzALsC.js +0 -2
- prefect/server/ui-v2/assets/index-VNFzALsC.js.map +0 -1
- prefect/server/ui-v2/assets/index-V_xTKaEb.js.map +0 -1
- prefect/server/ui-v2/assets/index-WIq8QUNT.js +0 -2
- prefect/server/ui-v2/assets/index-WIq8QUNT.js.map +0 -1
- prefect/server/ui-v2/assets/index-m9O-nIOl.css +0 -1
- prefect/server/ui-v2/assets/index-q5Y3hlDT.js.map +0 -1
- prefect/server/ui-v2/assets/key._key-CX8FwfwL.js +0 -2
- prefect/server/ui-v2/assets/key._key-CX8FwfwL.js.map +0 -1
- prefect/server/ui-v2/assets/task-run._id-CQGeAiBh.js.map +0 -1
- prefect/server/ui-v2/assets/task-runs-pagination-CYoOghEN.js +0 -2
- prefect/server/ui-v2/assets/task-runs-pagination-CYoOghEN.js.map +0 -1
- prefect/server/ui-v2/assets/use-delete-automation-confirmation-dialog-DZplMJDW.js +0 -2
- prefect/server/ui-v2/assets/use-delete-automation-confirmation-dialog-DZplMJDW.js.map +0 -1
- prefect/server/ui-v2/assets/use-flow-runs-selected-rows-1YE-VIgM.js +0 -2
- prefect/server/ui-v2/assets/use-flow-runs-selected-rows-1YE-VIgM.js.map +0 -1
- prefect/server/ui-v2/assets/use-stepper-CnGJHRLP.js +0 -2
- prefect/server/ui-v2/assets/use-stepper-CnGJHRLP.js.map +0 -1
- prefect/server/ui-v2/assets/work-pool-filter-CGfXNujK.js +0 -2
- prefect/server/ui-v2/assets/work-pool-filter-CGfXNujK.js.map +0 -1
- prefect/server/ui-v2/assets/work-pool_._workPoolName.queue._workQueueName-BlFjSdoB.js.map +0 -1
- {prefect-3.6.16.dev5.dist-info → prefect-3.6.16.dev6.dist-info}/WHEEL +0 -0
- {prefect-3.6.16.dev5.dist-info → prefect-3.6.16.dev6.dist-info}/entry_points.txt +0 -0
- {prefect-3.6.16.dev5.dist-info → prefect-3.6.16.dev6.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as l,j as e,L as J,t as N}from"./vendor-tanstack-BdLtprmr.js";import{aZ as b,a_ as W,a$ as q,ag as T,ah as I,ai as _,aj as O,al as F,ak as M,am as A,an as S,C as B,m as z,q as U,b0 as X,o as Y,I as Q,H as K,b1 as Z,ao as C,b2 as ee,b3 as te,b4 as se,b5 as ne,b6 as E,b7 as ae,B as re,g as oe,h as le,i as P,b8 as v,ad as ce,E as ie,t as de,v as ue,w as me,b9 as xe,ba as fe,bb as w,bc as he,bd as pe,be as k}from"./index-CPpeVt8m.js";import{A as ge,X as je,Y as ve,b as be}from"./vendor-recharts-CY3PKigC.js";import{f as y}from"./vendor-date-Cl1Jav-N.js";import{u as Ne,C as ye,a as we,b as Se}from"./collapsible-Lk7MRvBH.js";import{J as Ce,f as Ee,g as Pe}from"./utilities-D9BfvLg5.js";import{E as ke,p as V,R as $,a as Re,b as De}from"./event-resource-display-C1ZAey-o.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-radix-CJc458uP.js";import"./vendor-forms-BlFSCfFw.js";const Le=({active:t,payload:s})=>{if(!t||!s||!s.length)return null;const n=s[0]?.payload;return!n||typeof n.time!="number"||typeof n.count!="number"?null:e.jsxs("div",{className:"bg-popover border rounded-lg p-2 shadow-md",children:[e.jsxs("div",{className:"text-sm font-medium",children:[n.count," events"]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:y(new Date(n.time),"PPp")})]})},Te={count:{label:"Events",color:"hsl(262.1 83.3% 57.8%)"}},Ie=l.forwardRef(function({data:s,className:a,showAxis:n=!0,startDate:o,endDate:c,onCursorChange:m},d){const x=l.useRef(null);l.useImperativeHandle(d,()=>({clearSelection:()=>{}}));const i=l.useMemo(()=>{const r=s.map(u=>({time:new Date(u.start_time).getTime(),count:u.count,label:u.label}));if(o&&c){const u=o.getTime(),j=c.getTime();(r.length===0||r[0].time>u)&&r.unshift({time:u,count:0,label:""}),(r.length===0||r[r.length-1].time<j)&&r.push({time:j,count:0,label:""})}return r},[s,o,c]),f=r=>{if(r.activeLabel!==void 0&&m){const u=typeof r.activeLabel=="number"?r.activeLabel:Number(r.activeLabel);Number.isNaN(u)||m(new Date(u))}},h=()=>{m?.(null)};return e.jsx("div",{ref:x,className:b("relative",a),children:e.jsx(W,{config:Te,className:"h-full w-[calc(100%+3rem)] -mx-6",children:e.jsxs(ge,{data:i,margin:{top:0,right:0,bottom:0,left:0},onMouseMove:f,onMouseLeave:h,children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:"eventsGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:"var(--color-count)",stopOpacity:.3}),e.jsx("stop",{offset:"100%",stopColor:"var(--color-count)",stopOpacity:0})]})}),e.jsx(je,{dataKey:"time",tickFormatter:r=>y(new Date(r),"HH:mm"),tick:{fontSize:12},axisLine:!1,tickLine:!1,domain:["dataMin","dataMax"],hide:!n}),e.jsx(ve,{hide:!0,domain:[0,r=>Math.max(1,r)]}),e.jsx(q,{content:e.jsx(Le,{})}),e.jsx(be,{type:"monotone",dataKey:"count",stroke:"var(--color-count)",strokeWidth:2,fill:"url(#eventsGradient)",dot:!1,activeDot:!1,isAnimationActive:!1})]})})})});function _e({data:t,className:s,startDate:a,endDate:n}){return e.jsx("div",{className:b("relative",s),children:e.jsx(Ie,{data:t,className:"h-full w-full",showAxis:!1,startDate:a,endDate:n})})}const Oe={automation:"Automation",block:"Block",deployment:"Deployment",flow:"Flow","work-pool":"Work Pool","work-queue":"Work Queue"};function Fe(t){return e.jsx(l.Suspense,{children:e.jsx(Me,{...t})})}function Me({selectedResourceIds:t,onResourceIdsChange:s}){const[a,n]=l.useState(""),o=l.useDeferredValue(a),{resourceOptions:c}=Ne(),m=l.useMemo(()=>o?c.filter(i=>i.name.toLowerCase().includes(o.toLowerCase())):c,[c,o]),d=l.useMemo(()=>{const i={automation:[],block:[],deployment:[],flow:[],"work-pool":[],"work-queue":[]};for(const f of m)i[f.type].push(f);return i},[m]),x=i=>{const f=t.includes(i);s(f?t.filter(h=>h!==i):[...t,i]),n("")};return e.jsxs(T,{children:[e.jsx(I,{"aria-label":"Filter by resource",selected:t.length>0,children:t.length>0?`${t.length} resource${t.length===1?"":"s"} selected`:"All resources"}),e.jsxs(_,{children:[e.jsx(O,{value:a,onValueChange:n,placeholder:"Search resources..."}),e.jsx(F,{children:"No resources found"}),e.jsx(M,{children:Object.entries(d).map(([i,f])=>f.length>0?e.jsx(A,{heading:Oe[i],children:f.map(h=>e.jsx(S,{value:h.resourceId,selected:t.includes(h.resourceId),onSelect:x,closeOnSelect:!1,children:h.name},h.resourceId))},i):null)})]})]})}function Ae({occurred:t}){const s=new Date(t),a=y(s,"h:mm:ss a"),n=y(s,"MMM do, yyyy");return e.jsxs("div",{className:"flex flex-col text-right text-sm w-24 shrink-0",children:[e.jsx("span",{children:a}),e.jsx("span",{className:"text-xs text-muted-foreground",children:n})]})}function Be({event:t,isLast:s}){const a=t.resource["prefect.resource.id"]||"",n=V(a),o=$[n];return e.jsxs("div",{className:"relative flex items-start justify-center w-10 h-full",children:[e.jsx("div",{className:b("absolute left-1/2 w-px -translate-x-1/2 bg-border",s?"top-0 h-5":"top-0 bottom-0"),style:{top:"-1rem",bottom:s?"auto":"-1rem"}}),e.jsx("div",{className:"relative flex items-center justify-center w-10 h-10 rounded-full bg-background border border-border",children:e.jsx(Q,{id:o,className:"h-5 w-5 text-muted-foreground"})})]})}function Ye(t){const s=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0");return`${s}-${a}-${n}`}function Qe({eventId:t,eventName:s,occurred:a}){const n=Ee(s),o=Ye(new Date(a));return e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx(J,{to:"/events/event/$eventDate/$eventId",params:{eventDate:o,eventId:t},className:"text-left font-medium hover:underline",children:n}),e.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:s})]})}function Ve(t){return t["prefect.resource.role"]}function R(t){return t["prefect.resource.id"]||""}function D(t){return t["prefect.resource.name"]||t["prefect.name"]||t["prefect-cloud.name"]||null}function $e({related:t}){if(!t||t.length===0)return null;const s=[],a=[];for(const n of t)Ve(n)==="tag"?s.push(n):a.push(n);return e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:"Related Resources"}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.map(n=>{const o=R(n),m=D(n)||o,d=V(o),x=De[d],i=$[d];return e.jsxs(Re,{resource:n,relatedResources:t,className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground hover:underline",children:[x&&e.jsx("span",{children:x}),e.jsx(Q,{id:i,className:"h-4 w-4"}),e.jsx("span",{children:m})]},o)}),s.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1",children:s.map(n=>{const o=R(n),c=D(n)||o.split(".").pop();return e.jsx(K,{variant:"secondary",children:c},o)})})]})]})}function He({event:t,isLast:s}){const[a,n]=l.useState(!1);return e.jsxs("div",{className:"grid grid-cols-[6rem_2.5rem_1fr] gap-4 items-start py-4",children:[e.jsx(Ae,{occurred:t.occurred}),e.jsx(Be,{event:t,isLast:s}),e.jsx(ye,{open:a,onOpenChange:n,children:e.jsxs(B,{className:"py-4",children:[e.jsx(z,{className:"py-0",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(Qe,{eventId:t.id,eventName:t.event,occurred:t.occurred}),e.jsx(ke,{event:t}),t.related&&t.related.length>0&&e.jsx($e,{related:t.related})]})}),e.jsx("div",{className:"px-6 pt-2",children:e.jsx(we,{asChild:!0,children:e.jsxs(U,{variant:"ghost",size:"sm",className:"w-full justify-center gap-2 text-muted-foreground","aria-label":a?"Collapse event details":"Expand event details",children:[e.jsx(X,{className:b("h-4 w-4 transition-transform duration-200",a&&"rotate-180")}),e.jsx("span",{className:"text-xs",children:a?"Hide raw event":"Show raw event"})]})})}),e.jsx(Se,{children:e.jsx(Y,{className:"pt-4",children:e.jsx(Ce,{value:JSON.stringify(t,null,2),className:"max-h-96 overflow-auto"})})})]})})]})}function Ge({events:t,className:s}){return!t||t.length===0?null:e.jsx("ol",{className:b("list-none p-0 m-0",s),children:t.map((a,n)=>e.jsx("li",{children:e.jsx(He,{event:a,isLast:n===t.length-1})},a.id))})}const L=2;function Je({filter:t,selectedEventTypes:s,onEventTypesChange:a}){const[n,o]=l.useState(""),c=l.useDeferredValue(n),{data:m=[]}=N(Z("event",t)),d=l.useMemo(()=>{const r=new Set;for(const u of m){const j=Pe(u.value);for(const p of j)r.add(p)}return Array.from(r).sort()},[m]),x=l.useMemo(()=>c?d.filter(r=>r.toLowerCase().includes(c.toLowerCase())):d,[d,c]),i=r=>{const u=s.includes(r);a(u?s.filter(j=>j!==r):[...s,r])},f=()=>{a([])},h=()=>{if(s.length===0)return"All event types";const r=s.slice(0,L),u=s.length-L;return e.jsxs("div",{className:"flex flex-1 min-w-0 items-center gap-2",children:[e.jsx("div",{className:"flex flex-1 min-w-0 items-center gap-2 overflow-hidden",children:e.jsx("span",{className:"truncate",children:r.join(", ")})}),u>0&&e.jsxs("p",{className:"text-sm shrink-0",children:["+ ",u]})]})};return e.jsxs(T,{children:[e.jsx(I,{"aria-label":"Filter by event type",selected:s.length===0,children:h()}),e.jsxs(_,{children:[e.jsx(O,{value:n,onValueChange:o,placeholder:"Search event types..."}),e.jsxs(M,{children:[e.jsx(F,{children:"No event types found"}),e.jsxs(A,{children:[e.jsxs(S,{"aria-label":"All event types",onSelect:f,closeOnSelect:!1,value:"__all__",children:[e.jsx(C,{checked:s.length===0}),"All event types"]}),x.map(r=>e.jsxs(S,{"aria-label":r,onSelect:()=>i(r),closeOnSelect:!1,value:r,children:[e.jsx(C,{checked:s.includes(r)}),r]},r))]})]})]})]})}const We=50;function qe({filter:t}){const[s,a]=l.useState(1),n=l.useRef(new Map),o=l.useRef(JSON.stringify(t));l.useEffect(()=>{const p=JSON.stringify(t);o.current!==p&&(n.current.clear(),a(1),o.current=p)},[t]);const c=N(ee(t));l.useEffect(()=>{c.data?.next_page&&n.current.set(1,c.data.next_page)},[c.data?.next_page]);const m=s>1?n.current.get(s-1):null,d=N({...te(m??""),enabled:s>1&&!!m});l.useEffect(()=>{d.data?.next_page&&s>1&&n.current.set(s,d.data.next_page)},[d.data?.next_page,s]);const x=c.data?.total??0,i=Math.ceil(x/We),f=s===1?c.data?.events??[]:d.data?.events??c.data?.events??[],h=s>1&&d.isLoading;return{events:f,currentPage:s,totalPages:i,total:x,isLoadingNextPage:h,goToPage:p=>{p<1||p>i||p>1&&!n.current.has(p-1)||a(p)},goToNextPage:()=>{s<i&&n.current.has(s)&&a(s+1)},goToPreviousPage:()=>{s>1&&a(s-1)}}}function ze({search:t,onSearchChange:s}){const a=se(t),n=ne(t),o=E({...t,rangeType:"range",start:a.from,end:a.to}),c=E({resource:t.resource,rangeType:"range",start:a.from,end:a.to}),{events:m,currentPage:d,totalPages:x,isLoadingNextPage:i,goToNextPage:f,goToPreviousPage:h}=qe({filter:n}),{data:r}=N(ae(o)),u=g=>{s({resource:g})},j=g=>{s({event:g})},p=g=>{g?.type==="span"?s({rangeType:"span",seconds:g.seconds}):g?.type==="range"&&s({rangeType:"range",start:g.startDate.toISOString(),end:g.endDate.toISOString()})},[H,G]=l.useState(!1);return l.useEffect(()=>{const g=()=>{G(window.scrollY>100)};return window.addEventListener("scroll",g),()=>window.removeEventListener("scroll",g)},[]),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(re,{children:e.jsx(oe,{children:e.jsx(le,{className:"text-xl font-semibold",children:"Event Feed"})})})})}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-[2fr_1fr]",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(P,{children:"Resource"}),e.jsx(l.Suspense,{fallback:e.jsx(v,{className:"h-10 w-full"}),children:e.jsx(Fe,{selectedResourceIds:t.resource??[],onResourceIdsChange:u})})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(P,{children:"Events"}),e.jsx(l.Suspense,{fallback:e.jsx(v,{className:"h-10 w-full"}),children:e.jsx(Je,{filter:c,selectedEventTypes:t.event??[],onEventTypesChange:j})})]})]}),e.jsx(B,{className:b("sticky top-0 z-10 transition-shadow",H&&"shadow-lg"),children:e.jsxs(Y,{className:"pt-6",children:[e.jsx(_e,{data:r??[],className:"h-32",startDate:new Date(a.from),endDate:new Date(a.to)}),e.jsx("div",{className:"flex justify-center pt-3",children:e.jsx(ce,{value:t.rangeType==="range"&&t.start&&t.end?{type:"range",startDate:new Date(t.start),endDate:new Date(t.end)}:{type:"span",seconds:t.seconds??-86400},onValueChange:p})})]})}),m.length===0?e.jsxs(ie,{children:[e.jsx(de,{id:"Calendar"}),e.jsx(ue,{children:"No events found"}),e.jsx(me,{children:"No events match your current filters. Try adjusting your date range or filters."})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ge,{events:m}),x>1&&e.jsx("div",{className:"flex items-center justify-center gap-2",children:e.jsx(xe,{children:e.jsxs(fe,{children:[e.jsx(w,{children:e.jsx(he,{onClick:h,disabled:d<=1})}),e.jsx(w,{children:e.jsxs("p",{className:"text-sm px-2",children:["Page ",d," of ",x]})}),e.jsx(w,{children:e.jsx(pe,{onClick:f,disabled:d>=x})})]})})}),i&&e.jsx("div",{className:"flex justify-center py-4",children:e.jsx(v,{className:"h-8 w-32"})})]})]})}function Ue(){return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(v,{className:"h-8 w-48"}),e.jsxs("div",{className:"flex flex-wrap gap-4",children:[e.jsx(v,{className:"h-10 w-48"}),e.jsx(v,{className:"h-10 w-48"}),e.jsx(v,{className:"h-10 w-48"})]}),e.jsx(v,{className:"h-32 w-full"}),e.jsx(v,{className:"h-64 w-full"})]})}function lt(){const t=k.useSearch(),s=k.useNavigate(),a=n=>{s({to:".",search:o=>({...o,...n}),replace:!0})};return e.jsx(l.Suspense,{fallback:e.jsx(Ue,{}),children:e.jsx(ze,{search:t,onSearchChange:a})})}export{lt as component};
|
|
2
|
+
//# sourceMappingURL=index-Bg45XS_V.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-Bg45XS_V.js","sources":["../../src/components/events/events-line-chart/events-line-chart.tsx","../../src/components/events/events-line-chart/interactive-events-chart.tsx","../../src/components/events/events-resource-filter/events-resource-filter.tsx","../../src/components/events/events-timeline/events-timeline.tsx","../../src/components/events/events-type-filter/events-type-filter.tsx","../../src/components/events/events-page/use-events-pagination.ts","../../src/components/events/events-page/events-page.tsx","../../src/routes/events/index.tsx?tsr-split=component"],"sourcesContent":["import { format } from \"date-fns\";\nimport { forwardRef, useImperativeHandle, useMemo, useRef } from \"react\";\nimport { Area, AreaChart, XAxis, YAxis } from \"recharts\";\nimport type { EventsCount } from \"@/api/events\";\nimport { ChartContainer, ChartTooltip } from \"@/components/ui/chart\";\nimport { cn } from \"@/utils\";\n\ntype ChartDataPoint = {\n\ttime: number;\n\tcount: number;\n\tlabel: string;\n};\n\ntype EventsTooltipProps = {\n\tactive?: boolean;\n\tpayload?: Array<{ payload?: ChartDataPoint }>;\n};\n\nconst EventsTooltipContent = ({ active, payload }: EventsTooltipProps) => {\n\tif (!active || !payload || !payload.length) return null;\n\n\tconst firstPayloadItem = payload[0];\n\tconst point = firstPayloadItem?.payload;\n\n\tif (\n\t\t!point ||\n\t\ttypeof point.time !== \"number\" ||\n\t\ttypeof point.count !== \"number\"\n\t) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div className=\"bg-popover border rounded-lg p-2 shadow-md\">\n\t\t\t<div className=\"text-sm font-medium\">{point.count} events</div>\n\t\t\t<div className=\"text-xs text-muted-foreground\">\n\t\t\t\t{format(new Date(point.time), \"PPp\")}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport type EventsLineChartProps = {\n\tdata: EventsCount[];\n\tclassName?: string;\n\t/** Whether to show the X-axis with time labels (default: true) */\n\tshowAxis?: boolean;\n\t/** Date range start for chart display */\n\tstartDate?: Date;\n\t/** Date range end for chart display */\n\tendDate?: Date;\n\t/** Called when mouse hovers over chart with timestamp */\n\tonCursorChange?: (timestamp: Date | null) => void;\n};\n\nexport type EventsLineChartRef = {\n\tclearSelection: () => void;\n};\n\nconst chartConfig = {\n\tcount: {\n\t\tlabel: \"Events\",\n\t\tcolor: \"hsl(262.1 83.3% 57.8%)\",\n\t},\n};\n\nexport const EventsLineChart = forwardRef<\n\tEventsLineChartRef,\n\tEventsLineChartProps\n>(function EventsLineChart(\n\t{ data, className, showAxis = true, startDate, endDate, onCursorChange },\n\tref,\n) {\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\n\tuseImperativeHandle(ref, () => ({\n\t\tclearSelection: () => {\n\t\t\t// Selection clearing logic handled by parent\n\t\t},\n\t}));\n\n\tconst chartData = useMemo(() => {\n\t\tconst points = data.map((item) => ({\n\t\t\ttime: new Date(item.start_time).getTime(),\n\t\t\tcount: item.count,\n\t\t\tlabel: item.label,\n\t\t}));\n\n\t\t// Ensure we have boundary points at startDate and endDate so the line\n\t\t// extends across the full chart width (matching Vue implementation)\n\t\tif (startDate && endDate) {\n\t\t\tconst startTime = startDate.getTime();\n\t\t\tconst endTime = endDate.getTime();\n\n\t\t\t// Add start boundary point if not present\n\t\t\tif (points.length === 0 || points[0].time > startTime) {\n\t\t\t\tpoints.unshift({ time: startTime, count: 0, label: \"\" });\n\t\t\t}\n\n\t\t\t// Add end boundary point if not present\n\t\t\tif (points.length === 0 || points[points.length - 1].time < endTime) {\n\t\t\t\tpoints.push({ time: endTime, count: 0, label: \"\" });\n\t\t\t}\n\t\t}\n\n\t\treturn points;\n\t}, [data, startDate, endDate]);\n\n\tconst handleMouseMove = (state: { activeLabel?: string | number }) => {\n\t\tif (state.activeLabel !== undefined && onCursorChange) {\n\t\t\tconst timestamp =\n\t\t\t\ttypeof state.activeLabel === \"number\"\n\t\t\t\t\t? state.activeLabel\n\t\t\t\t\t: Number(state.activeLabel);\n\t\t\tif (!Number.isNaN(timestamp)) {\n\t\t\t\tonCursorChange(new Date(timestamp));\n\t\t\t}\n\t\t}\n\t};\n\n\tconst handleMouseLeave = () => {\n\t\tonCursorChange?.(null);\n\t};\n\n\treturn (\n\t\t<div ref={containerRef} className={cn(\"relative\", className)}>\n\t\t\t<ChartContainer\n\t\t\t\tconfig={chartConfig}\n\t\t\t\tclassName=\"h-full w-[calc(100%+3rem)] -mx-6\"\n\t\t\t>\n\t\t\t\t<AreaChart\n\t\t\t\t\tdata={chartData}\n\t\t\t\t\tmargin={{ top: 0, right: 0, bottom: 0, left: 0 }}\n\t\t\t\t\tonMouseMove={handleMouseMove}\n\t\t\t\t\tonMouseLeave={handleMouseLeave}\n\t\t\t\t>\n\t\t\t\t\t<defs>\n\t\t\t\t\t\t<linearGradient id=\"eventsGradient\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n\t\t\t\t\t\t\t<stop\n\t\t\t\t\t\t\t\toffset=\"0%\"\n\t\t\t\t\t\t\t\tstopColor=\"var(--color-count)\"\n\t\t\t\t\t\t\t\tstopOpacity={0.3}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<stop\n\t\t\t\t\t\t\t\toffset=\"100%\"\n\t\t\t\t\t\t\t\tstopColor=\"var(--color-count)\"\n\t\t\t\t\t\t\t\tstopOpacity={0}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</linearGradient>\n\t\t\t\t\t</defs>\n\t\t\t\t\t<XAxis\n\t\t\t\t\t\tdataKey=\"time\"\n\t\t\t\t\t\ttickFormatter={(value: number) => format(new Date(value), \"HH:mm\")}\n\t\t\t\t\t\ttick={{ fontSize: 12 }}\n\t\t\t\t\t\taxisLine={false}\n\t\t\t\t\t\ttickLine={false}\n\t\t\t\t\t\tdomain={[\"dataMin\", \"dataMax\"]}\n\t\t\t\t\t\thide={!showAxis}\n\t\t\t\t\t/>\n\t\t\t\t\t<YAxis hide domain={[0, (max: number) => Math.max(1, max)]} />\n\t\t\t\t\t<ChartTooltip content={<EventsTooltipContent />} />\n\t\t\t\t\t<Area\n\t\t\t\t\t\ttype=\"monotone\"\n\t\t\t\t\t\tdataKey=\"count\"\n\t\t\t\t\t\tstroke=\"var(--color-count)\"\n\t\t\t\t\t\tstrokeWidth={2}\n\t\t\t\t\t\tfill=\"url(#eventsGradient)\"\n\t\t\t\t\t\tdot={false}\n\t\t\t\t\t\tactiveDot={false}\n\t\t\t\t\t\tisAnimationActive={false}\n\t\t\t\t\t/>\n\t\t\t\t</AreaChart>\n\t\t\t</ChartContainer>\n\t\t</div>\n\t);\n});\n","import type { EventsCount } from \"@/api/events\";\nimport { cn } from \"@/utils\";\nimport { EventsLineChart } from \"./events-line-chart\";\n\nexport type InteractiveEventsChartProps = {\n\tdata: EventsCount[];\n\tclassName?: string;\n\tstartDate: Date;\n\tendDate: Date;\n};\n\n/**\n * Interactive wrapper around EventsLineChart.\n */\nexport function InteractiveEventsChart({\n\tdata,\n\tclassName,\n\tstartDate,\n\tendDate,\n}: InteractiveEventsChartProps) {\n\treturn (\n\t\t<div className={cn(\"relative\", className)}>\n\t\t\t<EventsLineChart\n\t\t\t\tdata={data}\n\t\t\t\tclassName=\"h-full w-full\"\n\t\t\t\tshowAxis={false}\n\t\t\t\tstartDate={startDate}\n\t\t\t\tendDate={endDate}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n","import { Suspense, useDeferredValue, useMemo, useState } from \"react\";\nimport {\n\tCombobox,\n\tComboboxCommandEmtpy,\n\tComboboxCommandGroup,\n\tComboboxCommandInput,\n\tComboboxCommandItem,\n\tComboboxCommandList,\n\tComboboxContent,\n\tComboboxTrigger,\n} from \"@/components/ui/combobox\";\nimport {\n\ttype ResourceOption,\n\tuseResourceOptions,\n} from \"./use-resource-options\";\n\nexport type EventsResourceFilterProps = {\n\tselectedResourceIds: string[];\n\tonResourceIdsChange: (resourceIds: string[]) => void;\n};\n\nconst RESOURCE_TYPE_DISPLAY_NAMES: Record<ResourceOption[\"type\"], string> = {\n\tautomation: \"Automation\",\n\tblock: \"Block\",\n\tdeployment: \"Deployment\",\n\tflow: \"Flow\",\n\t\"work-pool\": \"Work Pool\",\n\t\"work-queue\": \"Work Queue\",\n};\n\nexport function EventsResourceFilter(props: EventsResourceFilterProps) {\n\treturn (\n\t\t<Suspense>\n\t\t\t<EventsResourceFilterImplementation {...props} />\n\t\t</Suspense>\n\t);\n}\n\nfunction EventsResourceFilterImplementation({\n\tselectedResourceIds,\n\tonResourceIdsChange,\n}: EventsResourceFilterProps) {\n\tconst [search, setSearch] = useState(\"\");\n\tconst deferredSearch = useDeferredValue(search);\n\n\tconst { resourceOptions } = useResourceOptions();\n\n\tconst filteredOptions = useMemo(() => {\n\t\tif (!deferredSearch) {\n\t\t\treturn resourceOptions;\n\t\t}\n\t\treturn resourceOptions.filter((option) =>\n\t\t\toption.name.toLowerCase().includes(deferredSearch.toLowerCase()),\n\t\t);\n\t}, [resourceOptions, deferredSearch]);\n\n\tconst groupedOptions = useMemo(() => {\n\t\tconst groups: Record<ResourceOption[\"type\"], ResourceOption[]> = {\n\t\t\tautomation: [],\n\t\t\tblock: [],\n\t\t\tdeployment: [],\n\t\t\tflow: [],\n\t\t\t\"work-pool\": [],\n\t\t\t\"work-queue\": [],\n\t\t};\n\n\t\tfor (const option of filteredOptions) {\n\t\t\tgroups[option.type].push(option);\n\t\t}\n\n\t\treturn groups;\n\t}, [filteredOptions]);\n\n\tconst handleToggleResource = (resourceId: string) => {\n\t\tconst isSelected = selectedResourceIds.includes(resourceId);\n\t\tif (isSelected) {\n\t\t\tonResourceIdsChange(\n\t\t\t\tselectedResourceIds.filter((id) => id !== resourceId),\n\t\t\t);\n\t\t} else {\n\t\t\tonResourceIdsChange([...selectedResourceIds, resourceId]);\n\t\t}\n\t\tsetSearch(\"\");\n\t};\n\n\treturn (\n\t\t<Combobox>\n\t\t\t<ComboboxTrigger\n\t\t\t\taria-label=\"Filter by resource\"\n\t\t\t\tselected={selectedResourceIds.length > 0}\n\t\t\t>\n\t\t\t\t{selectedResourceIds.length > 0\n\t\t\t\t\t? `${selectedResourceIds.length} resource${selectedResourceIds.length === 1 ? \"\" : \"s\"} selected`\n\t\t\t\t\t: \"All resources\"}\n\t\t\t</ComboboxTrigger>\n\t\t\t<ComboboxContent>\n\t\t\t\t<ComboboxCommandInput\n\t\t\t\t\tvalue={search}\n\t\t\t\t\tonValueChange={setSearch}\n\t\t\t\t\tplaceholder=\"Search resources...\"\n\t\t\t\t/>\n\t\t\t\t<ComboboxCommandEmtpy>No resources found</ComboboxCommandEmtpy>\n\t\t\t\t<ComboboxCommandList>\n\t\t\t\t\t{(\n\t\t\t\t\t\tObject.entries(groupedOptions) as [\n\t\t\t\t\t\t\tResourceOption[\"type\"],\n\t\t\t\t\t\t\tResourceOption[],\n\t\t\t\t\t\t][]\n\t\t\t\t\t).map(([type, options]) =>\n\t\t\t\t\t\toptions.length > 0 ? (\n\t\t\t\t\t\t\t<ComboboxCommandGroup\n\t\t\t\t\t\t\t\tkey={type}\n\t\t\t\t\t\t\t\theading={RESOURCE_TYPE_DISPLAY_NAMES[type]}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{options.map((option) => (\n\t\t\t\t\t\t\t\t\t<ComboboxCommandItem\n\t\t\t\t\t\t\t\t\t\tkey={option.resourceId}\n\t\t\t\t\t\t\t\t\t\tvalue={option.resourceId}\n\t\t\t\t\t\t\t\t\t\tselected={selectedResourceIds.includes(option.resourceId)}\n\t\t\t\t\t\t\t\t\t\tonSelect={handleToggleResource}\n\t\t\t\t\t\t\t\t\t\tcloseOnSelect={false}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{option.name}\n\t\t\t\t\t\t\t\t\t</ComboboxCommandItem>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</ComboboxCommandGroup>\n\t\t\t\t\t\t) : null,\n\t\t\t\t\t)}\n\t\t\t\t</ComboboxCommandList>\n\t\t\t</ComboboxContent>\n\t\t</Combobox>\n\t);\n}\n","import { Link } from \"@tanstack/react-router\";\nimport { format } from \"date-fns\";\nimport { ChevronDown } from \"lucide-react\";\nimport { useState } from \"react\";\nimport type { components } from \"@/api/prefect\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent, CardHeader } from \"@/components/ui/card\";\nimport {\n\tCollapsible,\n\tCollapsibleContent,\n\tCollapsibleTrigger,\n} from \"@/components/ui/collapsible\";\nimport { Icon } from \"@/components/ui/icons\";\nimport { JsonView } from \"@/components/ui/json-view\";\nimport { cn } from \"@/utils\";\nimport {\n\tEventResourceDisplay,\n\tEventResourceLink,\n} from \"../event-resource-display\";\nimport {\n\tparseResourceType,\n\tRESOURCE_ICONS,\n\tRESOURCE_TYPE_LABELS,\n} from \"../event-resource-display/resource-types\";\nimport { formatEventLabel } from \"./utilities\";\n\ntype Event = components[\"schemas\"][\"ReceivedEvent\"];\n\ntype EventsTimelineProps = {\n\tevents: Event[];\n\tclassName?: string;\n};\n\ntype EventTimelineItemProps = {\n\tevent: Event;\n\tisLast: boolean;\n};\n\nfunction EventTimestamp({ occurred }: { occurred: string }) {\n\tconst date = new Date(occurred);\n\tconst formattedTime = format(date, \"h:mm:ss a\");\n\tconst formattedDate = format(date, \"MMM do, yyyy\");\n\n\treturn (\n\t\t<div className=\"flex flex-col text-right text-sm w-24 shrink-0\">\n\t\t\t<span>{formattedTime}</span>\n\t\t\t<span className=\"text-xs text-muted-foreground\">{formattedDate}</span>\n\t\t</div>\n\t);\n}\n\nfunction TimelinePoint({ event, isLast }: { event: Event; isLast: boolean }) {\n\tconst resourceId = event.resource[\"prefect.resource.id\"] || \"\";\n\tconst resourceType = parseResourceType(resourceId);\n\tconst iconId = RESOURCE_ICONS[resourceType];\n\n\treturn (\n\t\t<div className=\"relative flex items-start justify-center w-10 h-full\">\n\t\t\t{/* Vertical line - extends from top to bottom, hidden for last item below the icon */}\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"absolute left-1/2 w-px -translate-x-1/2 bg-border\",\n\t\t\t\t\tisLast ? \"top-0 h-5\" : \"top-0 bottom-0\",\n\t\t\t\t)}\n\t\t\t\tstyle={{ top: \"-1rem\", bottom: isLast ? \"auto\" : \"-1rem\" }}\n\t\t\t/>\n\t\t\t{/* Icon circle */}\n\t\t\t<div className=\"relative flex items-center justify-center w-10 h-10 rounded-full bg-background border border-border\">\n\t\t\t\t<Icon id={iconId} className=\"h-5 w-5 text-muted-foreground\" />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\n/**\n * Formats a Date object as YYYY-MM-DD for use in route parameters.\n */\nfunction formatRouteDate(date: Date): string {\n\tconst year = date.getFullYear();\n\tconst month = String(date.getMonth() + 1).padStart(2, \"0\");\n\tconst day = String(date.getDate()).padStart(2, \"0\");\n\treturn `${year}-${month}-${day}`;\n}\n\nfunction EventNameWithPrefixes({\n\teventId,\n\teventName,\n\toccurred,\n}: {\n\teventId: string;\n\teventName: string;\n\toccurred: string;\n}) {\n\tconst label = formatEventLabel(eventName);\n\tconst eventDate = formatRouteDate(new Date(occurred));\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-0.5\">\n\t\t\t<Link\n\t\t\t\tto=\"/events/event/$eventDate/$eventId\"\n\t\t\t\tparams={{ eventDate, eventId }}\n\t\t\t\tclassName=\"text-left font-medium hover:underline\"\n\t\t\t>\n\t\t\t\t{label}\n\t\t\t</Link>\n\t\t\t<span className=\"text-xs text-muted-foreground font-mono\">\n\t\t\t\t{eventName}\n\t\t\t</span>\n\t\t</div>\n\t);\n}\n\nfunction getResourceRole(resource: Record<string, string>): string | undefined {\n\treturn resource[\"prefect.resource.role\"];\n}\n\nfunction getResourceId(resource: Record<string, string>): string {\n\treturn resource[\"prefect.resource.id\"] || \"\";\n}\n\nfunction getResourceName(resource: Record<string, string>): string | null {\n\treturn (\n\t\tresource[\"prefect.resource.name\"] ||\n\t\tresource[\"prefect.name\"] ||\n\t\tresource[\"prefect-cloud.name\"] ||\n\t\tnull\n\t);\n}\n\nfunction EventRelatedResources({\n\trelated,\n}: {\n\trelated: components[\"schemas\"][\"RelatedResource\"][];\n}) {\n\tif (!related || related.length === 0) {\n\t\treturn null;\n\t}\n\n\t// Separate tags from other resources\n\tconst tags: components[\"schemas\"][\"RelatedResource\"][] = [];\n\tconst resources: components[\"schemas\"][\"RelatedResource\"][] = [];\n\n\tfor (const resource of related) {\n\t\tconst role = getResourceRole(resource);\n\t\tif (role === \"tag\") {\n\t\t\ttags.push(resource);\n\t\t} else {\n\t\t\tresources.push(resource);\n\t\t}\n\t}\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t<span className=\"text-sm font-medium\">Related Resources</span>\n\t\t\t<div className=\"flex flex-wrap gap-2\">\n\t\t\t\t{resources.map((resource) => {\n\t\t\t\t\tconst resourceId = getResourceId(resource);\n\t\t\t\t\tconst resourceName = getResourceName(resource);\n\t\t\t\t\tconst displayText = resourceName || resourceId;\n\t\t\t\t\tconst resourceType = parseResourceType(resourceId);\n\t\t\t\t\tconst typeLabel = RESOURCE_TYPE_LABELS[resourceType];\n\t\t\t\t\tconst iconId = RESOURCE_ICONS[resourceType];\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<EventResourceLink\n\t\t\t\t\t\t\tkey={resourceId}\n\t\t\t\t\t\t\tresource={resource}\n\t\t\t\t\t\t\trelatedResources={related}\n\t\t\t\t\t\t\tclassName=\"flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground hover:underline\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{typeLabel && <span>{typeLabel}</span>}\n\t\t\t\t\t\t\t<Icon id={iconId} className=\"h-4 w-4\" />\n\t\t\t\t\t\t\t<span>{displayText}</span>\n\t\t\t\t\t\t</EventResourceLink>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t\t{tags.length > 0 && (\n\t\t\t\t\t<div className=\"flex flex-wrap gap-1\">\n\t\t\t\t\t\t{tags.map((tag) => {\n\t\t\t\t\t\t\tconst tagId = getResourceId(tag);\n\t\t\t\t\t\t\tconst tagName = getResourceName(tag) || tagId.split(\".\").pop();\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<Badge key={tagId} variant=\"secondary\">\n\t\t\t\t\t\t\t\t\t{tagName}\n\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nfunction EventTimelineItem({ event, isLast }: EventTimelineItemProps) {\n\tconst [isOpen, setIsOpen] = useState(false);\n\n\treturn (\n\t\t<div className=\"grid grid-cols-[6rem_2.5rem_1fr] gap-4 items-start py-4\">\n\t\t\t{/* Date column */}\n\t\t\t<EventTimestamp occurred={event.occurred} />\n\n\t\t\t{/* Point column with icon and vertical line */}\n\t\t\t<TimelinePoint event={event} isLast={isLast} />\n\n\t\t\t{/* Content column */}\n\t\t\t<Collapsible open={isOpen} onOpenChange={setIsOpen}>\n\t\t\t\t<Card className=\"py-4\">\n\t\t\t\t\t<CardHeader className=\"py-0\">\n\t\t\t\t\t\t<div className=\"flex flex-col gap-3\">\n\t\t\t\t\t\t\t<EventNameWithPrefixes\n\t\t\t\t\t\t\t\teventId={event.id}\n\t\t\t\t\t\t\t\teventName={event.event}\n\t\t\t\t\t\t\t\toccurred={event.occurred}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<EventResourceDisplay event={event} />\n\t\t\t\t\t\t\t{event.related && event.related.length > 0 && (\n\t\t\t\t\t\t\t\t<EventRelatedResources related={event.related} />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CardHeader>\n\t\t\t\t\t<div className=\"px-6 pt-2\">\n\t\t\t\t\t\t<CollapsibleTrigger asChild>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\tclassName=\"w-full justify-center gap-2 text-muted-foreground\"\n\t\t\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\t\t\tisOpen ? \"Collapse event details\" : \"Expand event details\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<ChevronDown\n\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\"h-4 w-4 transition-transform duration-200\",\n\t\t\t\t\t\t\t\t\t\tisOpen && \"rotate-180\",\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<span className=\"text-xs\">\n\t\t\t\t\t\t\t\t\t{isOpen ? \"Hide raw event\" : \"Show raw event\"}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</CollapsibleTrigger>\n\t\t\t\t\t</div>\n\t\t\t\t\t<CollapsibleContent>\n\t\t\t\t\t\t<CardContent className=\"pt-4\">\n\t\t\t\t\t\t\t<JsonView\n\t\t\t\t\t\t\t\tvalue={JSON.stringify(event, null, 2)}\n\t\t\t\t\t\t\t\tclassName=\"max-h-96 overflow-auto\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t</CollapsibleContent>\n\t\t\t\t</Card>\n\t\t\t</Collapsible>\n\t\t</div>\n\t);\n}\n\nexport function EventsTimeline({ events, className }: EventsTimelineProps) {\n\tif (!events || events.length === 0) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<ol className={cn(\"list-none p-0 m-0\", className)}>\n\t\t\t{events.map((event, index) => (\n\t\t\t\t<li key={event.id}>\n\t\t\t\t\t<EventTimelineItem\n\t\t\t\t\t\tevent={event}\n\t\t\t\t\t\tisLast={index === events.length - 1}\n\t\t\t\t\t/>\n\t\t\t\t</li>\n\t\t\t))}\n\t\t</ol>\n\t);\n}\n","import { useQuery } from \"@tanstack/react-query\";\nimport { useDeferredValue, useMemo, useState } from \"react\";\nimport { buildEventsCountQuery, type EventsCountFilter } from \"@/api/events\";\nimport { getEventPrefixes } from \"@/components/events/events-timeline/utilities\";\nimport { Checkbox } from \"@/components/ui/checkbox\";\nimport {\n\tCombobox,\n\tComboboxCommandEmtpy,\n\tComboboxCommandGroup,\n\tComboboxCommandInput,\n\tComboboxCommandItem,\n\tComboboxCommandList,\n\tComboboxContent,\n\tComboboxTrigger,\n} from \"@/components/ui/combobox\";\n\nconst MAX_EVENT_TYPES_DISPLAYED = 2;\n\nexport type EventsTypeFilterProps = {\n\tfilter: EventsCountFilter;\n\tselectedEventTypes: string[];\n\tonEventTypesChange: (eventTypes: string[]) => void;\n};\n\nexport function EventsTypeFilter({\n\tfilter,\n\tselectedEventTypes,\n\tonEventTypesChange,\n}: EventsTypeFilterProps) {\n\tconst [search, setSearch] = useState(\"\");\n\tconst deferredSearch = useDeferredValue(search);\n\n\tconst { data: eventCounts = [] } = useQuery(\n\t\tbuildEventsCountQuery(\"event\", filter),\n\t);\n\n\tconst eventTypeOptions = useMemo(() => {\n\t\tconst prefixSet = new Set<string>();\n\n\t\tfor (const eventCount of eventCounts) {\n\t\t\tconst prefixes = getEventPrefixes(eventCount.value);\n\t\t\tfor (const prefix of prefixes) {\n\t\t\t\tprefixSet.add(prefix);\n\t\t\t}\n\t\t}\n\n\t\treturn Array.from(prefixSet).sort();\n\t}, [eventCounts]);\n\n\tconst filteredOptions = useMemo(() => {\n\t\tif (!deferredSearch) {\n\t\t\treturn eventTypeOptions;\n\t\t}\n\t\treturn eventTypeOptions.filter((option) =>\n\t\t\toption.toLowerCase().includes(deferredSearch.toLowerCase()),\n\t\t);\n\t}, [eventTypeOptions, deferredSearch]);\n\n\tconst handleSelectEventType = (eventType: string) => {\n\t\tconst isSelected = selectedEventTypes.includes(eventType);\n\t\tif (isSelected) {\n\t\t\tonEventTypesChange(\n\t\t\t\tselectedEventTypes.filter((type) => type !== eventType),\n\t\t\t);\n\t\t} else {\n\t\t\tonEventTypesChange([...selectedEventTypes, eventType]);\n\t\t}\n\t};\n\n\tconst handleClearAll = () => {\n\t\tonEventTypesChange([]);\n\t};\n\n\tconst renderSelectedEventTypes = () => {\n\t\tif (selectedEventTypes.length === 0) {\n\t\t\treturn \"All event types\";\n\t\t}\n\n\t\tconst visible = selectedEventTypes.slice(0, MAX_EVENT_TYPES_DISPLAYED);\n\t\tconst extraCount = selectedEventTypes.length - MAX_EVENT_TYPES_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<span className=\"truncate\">{visible.join(\", \")}</span>\n\t\t\t\t</div>\n\t\t\t\t{extraCount > 0 && <p className=\"text-sm shrink-0\">+ {extraCount}</p>}\n\t\t\t</div>\n\t\t);\n\t};\n\n\treturn (\n\t\t<Combobox>\n\t\t\t<ComboboxTrigger\n\t\t\t\taria-label=\"Filter by event type\"\n\t\t\t\tselected={selectedEventTypes.length === 0}\n\t\t\t>\n\t\t\t\t{renderSelectedEventTypes()}\n\t\t\t</ComboboxTrigger>\n\t\t\t<ComboboxContent>\n\t\t\t\t<ComboboxCommandInput\n\t\t\t\t\tvalue={search}\n\t\t\t\t\tonValueChange={setSearch}\n\t\t\t\t\tplaceholder=\"Search event types...\"\n\t\t\t\t/>\n\t\t\t\t<ComboboxCommandList>\n\t\t\t\t\t<ComboboxCommandEmtpy>No event types found</ComboboxCommandEmtpy>\n\t\t\t\t\t<ComboboxCommandGroup>\n\t\t\t\t\t\t<ComboboxCommandItem\n\t\t\t\t\t\t\taria-label=\"All event types\"\n\t\t\t\t\t\t\tonSelect={handleClearAll}\n\t\t\t\t\t\t\tcloseOnSelect={false}\n\t\t\t\t\t\t\tvalue=\"__all__\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Checkbox checked={selectedEventTypes.length === 0} />\n\t\t\t\t\t\t\tAll event types\n\t\t\t\t\t\t</ComboboxCommandItem>\n\t\t\t\t\t\t{filteredOptions.map((eventType) => (\n\t\t\t\t\t\t\t<ComboboxCommandItem\n\t\t\t\t\t\t\t\tkey={eventType}\n\t\t\t\t\t\t\t\taria-label={eventType}\n\t\t\t\t\t\t\t\tonSelect={() => handleSelectEventType(eventType)}\n\t\t\t\t\t\t\t\tcloseOnSelect={false}\n\t\t\t\t\t\t\t\tvalue={eventType}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Checkbox checked={selectedEventTypes.includes(eventType)} />\n\t\t\t\t\t\t\t\t{eventType}\n\t\t\t\t\t\t\t</ComboboxCommandItem>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ComboboxCommandGroup>\n\t\t\t\t</ComboboxCommandList>\n\t\t\t</ComboboxContent>\n\t\t</Combobox>\n\t);\n}\n","import { useQuery } from \"@tanstack/react-query\";\nimport { useEffect, useRef, useState } from \"react\";\nimport {\n\tbuildEventsNextPageQuery,\n\tbuildFilterEventsQuery,\n\ttype Event,\n\ttype EventsFilter,\n} from \"@/api/events\";\n\nconst PAGE_SIZE = 50;\n\ntype UseEventsPaginationOptions = {\n\tfilter: EventsFilter;\n};\n\ntype UseEventsPaginationReturn = {\n\tevents: Event[];\n\tcurrentPage: number;\n\ttotalPages: number;\n\ttotal: number;\n\tisLoadingNextPage: boolean;\n\tgoToPage: (page: number) => void;\n\tgoToNextPage: () => void;\n\tgoToPreviousPage: () => void;\n};\n\n/**\n * Hook for cursor-based pagination of events using a token vault pattern.\n *\n * The backend uses cursor-based pagination where each page response includes\n * a `next_page` URL containing a token to fetch the next page. This hook\n * manages these tokens in a \"vault\" (a Map) to enable bidirectional navigation.\n *\n * Key features:\n * - `tokenVault[n]` contains the token to fetch page `n+1`\n * - Clears token vault when filter changes (detected via JSON.stringify comparison)\n * - Stores next page tokens from API responses as they're received\n * - Uses `useQuery` for both the first page and subsequent pages\n *\n * @param options - Configuration options\n * @param options.filter - The events filter to apply\n * @returns Pagination state and navigation functions\n *\n * @example\n * ```tsx\n * const {\n * events,\n * currentPage,\n * totalPages,\n * isLoadingNextPage,\n * goToPage,\n * goToNextPage,\n * goToPreviousPage,\n * } = useEventsPagination({ filter: myFilter });\n * ```\n */\nexport function useEventsPagination({\n\tfilter,\n}: UseEventsPaginationOptions): UseEventsPaginationReturn {\n\tconst [currentPage, setCurrentPage] = useState(1);\n\tconst tokenVault = useRef<Map<number, string>>(new Map());\n\tconst previousFilterRef = useRef<string>(JSON.stringify(filter));\n\n\t// Reset pagination when filter changes\n\tuseEffect(() => {\n\t\tconst currentFilterString = JSON.stringify(filter);\n\t\tif (previousFilterRef.current !== currentFilterString) {\n\t\t\ttokenVault.current.clear();\n\t\t\tsetCurrentPage(1);\n\t\t\tpreviousFilterRef.current = currentFilterString;\n\t\t}\n\t}, [filter]);\n\n\t// First page query - always fetches the first page\n\tconst firstPageQuery = useQuery(buildFilterEventsQuery(filter));\n\n\t// Store the next_page token from first page response\n\tuseEffect(() => {\n\t\tif (firstPageQuery.data?.next_page) {\n\t\t\ttokenVault.current.set(1, firstPageQuery.data.next_page);\n\t\t}\n\t}, [firstPageQuery.data?.next_page]);\n\n\t// Get the token for the current page (if not page 1)\n\tconst currentPageToken =\n\t\tcurrentPage > 1 ? tokenVault.current.get(currentPage - 1) : null;\n\n\t// Subsequent page query - only enabled when we have a token and not on page 1\n\tconst nextPageQuery = useQuery({\n\t\t...buildEventsNextPageQuery(currentPageToken ?? \"\"),\n\t\tenabled: currentPage > 1 && !!currentPageToken,\n\t});\n\n\t// Store the next_page token from subsequent page responses\n\tuseEffect(() => {\n\t\tif (nextPageQuery.data?.next_page && currentPage > 1) {\n\t\t\ttokenVault.current.set(currentPage, nextPageQuery.data.next_page);\n\t\t}\n\t}, [nextPageQuery.data?.next_page, currentPage]);\n\n\t// Calculate total pages from the first page total count\n\tconst total = firstPageQuery.data?.total ?? 0;\n\tconst totalPages = Math.ceil(total / PAGE_SIZE);\n\n\t// Determine current events based on which page we're on\n\tconst events =\n\t\tcurrentPage === 1\n\t\t\t? (firstPageQuery.data?.events ?? [])\n\t\t\t: (nextPageQuery.data?.events ?? firstPageQuery.data?.events ?? []);\n\n\tconst isLoadingNextPage = currentPage > 1 && nextPageQuery.isLoading;\n\n\tconst goToPage = (page: number) => {\n\t\tif (page < 1 || page > totalPages) return;\n\t\tif (page > 1 && !tokenVault.current.has(page - 1)) {\n\t\t\treturn;\n\t\t}\n\t\tsetCurrentPage(page);\n\t};\n\n\tconst goToNextPage = () => {\n\t\tif (currentPage < totalPages && tokenVault.current.has(currentPage)) {\n\t\t\tsetCurrentPage(currentPage + 1);\n\t\t}\n\t};\n\n\tconst goToPreviousPage = () => {\n\t\tif (currentPage > 1) {\n\t\t\tsetCurrentPage(currentPage - 1);\n\t\t}\n\t};\n\n\treturn {\n\t\tevents,\n\t\tcurrentPage,\n\t\ttotalPages,\n\t\ttotal,\n\t\tisLoadingNextPage,\n\t\tgoToPage,\n\t\tgoToNextPage,\n\t\tgoToPreviousPage,\n\t};\n}\n","import { useQuery } from \"@tanstack/react-query\";\nimport { Suspense, useEffect, useState } from \"react\";\nimport { buildEventsHistoryQuery } from \"@/api/events\";\nimport {\n\tbuildEventsCountFilterFromSearch,\n\tbuildEventsFilterFromSearch,\n\ttype EventsSearchParams,\n\tgetDateRangeFromSearch,\n} from \"@/api/events/filters\";\nimport {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbList,\n} from \"@/components/ui/breadcrumb\";\nimport { Card, CardContent } from \"@/components/ui/card\";\nimport {\n\ttype DateRangeSelectValue,\n\tRichDateRangeSelector,\n} from \"@/components/ui/date-range-select\";\nimport {\n\tEmptyState,\n\tEmptyStateDescription,\n\tEmptyStateIcon,\n\tEmptyStateTitle,\n} from \"@/components/ui/empty-state\";\nimport { Label } from \"@/components/ui/label\";\nimport {\n\tPagination,\n\tPaginationContent,\n\tPaginationItem,\n\tPaginationNextButton,\n\tPaginationPreviousButton,\n} from \"@/components/ui/pagination\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\nimport { cn } from \"@/utils\";\nimport { InteractiveEventsChart } from \"../events-line-chart\";\nimport { EventsResourceFilter } from \"../events-resource-filter\";\nimport { EventsTimeline } from \"../events-timeline\";\nimport { EventsTypeFilter } from \"../events-type-filter\";\nimport { useEventsPagination } from \"./use-events-pagination\";\n\nexport type EventsPageProps = {\n\tsearch: EventsSearchParams;\n\tonSearchChange: (search: Partial<EventsSearchParams>) => void;\n};\n\nexport function EventsPage({ search, onSearchChange }: EventsPageProps) {\n\t// Get the date range using the same logic as the route loader\n\t// This ensures query keys match and prevents infinite Suspense retries\n\tconst dateRange = getDateRangeFromSearch(search);\n\n\tconst eventsFilter = buildEventsFilterFromSearch(search);\n\tconst countFilter = buildEventsCountFilterFromSearch({\n\t\t...search,\n\t\trangeType: \"range\",\n\t\tstart: dateRange.from,\n\t\tend: dateRange.to,\n\t});\n\n\t// Create separate filter for type dropdown (without event filter)\n\t// This ensures all event types are shown regardless of current selection\n\tconst countFilterForTypeDropdown = buildEventsCountFilterFromSearch({\n\t\tresource: search.resource,\n\t\trangeType: \"range\",\n\t\tstart: dateRange.from,\n\t\tend: dateRange.to,\n\t});\n\n\t// Pagination\n\tconst {\n\t\tevents,\n\t\tcurrentPage,\n\t\ttotalPages,\n\t\tisLoadingNextPage,\n\t\tgoToNextPage,\n\t\tgoToPreviousPage,\n\t} = useEventsPagination({ filter: eventsFilter });\n\n\t// Chart histogram data\n\tconst { data: historyData } = useQuery(buildEventsHistoryQuery(countFilter));\n\n\t// Handlers - using correct property names that match EventsSearchParams\n\tconst handleResourceIdsChange = (resourceIds: string[]) => {\n\t\tonSearchChange({ resource: resourceIds });\n\t};\n\n\tconst handleEventTypesChange = (eventPrefixes: string[]) => {\n\t\tonSearchChange({ event: eventPrefixes });\n\t};\n\n\tconst handleDateRangeChange = (value: DateRangeSelectValue) => {\n\t\tif (value?.type === \"span\") {\n\t\t\tonSearchChange({ rangeType: \"span\", seconds: value.seconds });\n\t\t} else if (value?.type === \"range\") {\n\t\t\tonSearchChange({\n\t\t\t\trangeType: \"range\",\n\t\t\t\tstart: value.startDate.toISOString(),\n\t\t\t\tend: value.endDate.toISOString(),\n\t\t\t});\n\t\t}\n\t};\n\n\t// Sticky chart behavior\n\tconst [isChartSticky, setIsChartSticky] = useState(false);\n\n\tuseEffect(() => {\n\t\tconst handleScroll = () => {\n\t\t\t// Chart becomes sticky when scrolled past 100px\n\t\t\tsetIsChartSticky(window.scrollY > 100);\n\t\t};\n\n\t\twindow.addEventListener(\"scroll\", handleScroll);\n\t\treturn () => window.removeEventListener(\"scroll\", handleScroll);\n\t}, []);\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t<Breadcrumb>\n\t\t\t\t\t\t<BreadcrumbList>\n\t\t\t\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t\t\t\tEvent Feed\n\t\t\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t\t\t</BreadcrumbList>\n\t\t\t\t\t</Breadcrumb>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t{/* Filters */}\n\t\t\t<div className=\"grid grid-cols-1 gap-4 sm:grid-cols-[2fr_1fr]\">\n\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t<Label>Resource</Label>\n\t\t\t\t\t<Suspense fallback={<Skeleton className=\"h-10 w-full\" />}>\n\t\t\t\t\t\t<EventsResourceFilter\n\t\t\t\t\t\t\tselectedResourceIds={search.resource ?? []}\n\t\t\t\t\t\t\tonResourceIdsChange={handleResourceIdsChange}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Suspense>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t<Label>Events</Label>\n\t\t\t\t\t<Suspense fallback={<Skeleton className=\"h-10 w-full\" />}>\n\t\t\t\t\t\t<EventsTypeFilter\n\t\t\t\t\t\t\tfilter={countFilterForTypeDropdown}\n\t\t\t\t\t\t\tselectedEventTypes={search.event ?? []}\n\t\t\t\t\t\t\tonEventTypesChange={handleEventTypesChange}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Suspense>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t{/* Chart - sticky when scrolling */}\n\t\t\t<Card\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"sticky top-0 z-10 transition-shadow\",\n\t\t\t\t\tisChartSticky && \"shadow-lg\",\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<CardContent className=\"pt-6\">\n\t\t\t\t\t<InteractiveEventsChart\n\t\t\t\t\t\tdata={historyData ?? []}\n\t\t\t\t\t\tclassName=\"h-32\"\n\t\t\t\t\t\tstartDate={new Date(dateRange.from)}\n\t\t\t\t\t\tendDate={new Date(dateRange.to)}\n\t\t\t\t\t/>\n\t\t\t\t\t<div className=\"flex justify-center pt-3\">\n\t\t\t\t\t\t<RichDateRangeSelector\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tsearch.rangeType === \"range\" && search.start && search.end\n\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\ttype: \"range\",\n\t\t\t\t\t\t\t\t\t\t\tstartDate: new Date(search.start),\n\t\t\t\t\t\t\t\t\t\t\tendDate: new Date(search.end),\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t: { type: \"span\", seconds: search.seconds ?? -86400 }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonValueChange={handleDateRangeChange}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\n\t\t\t{/* Events timeline or empty state */}\n\t\t\t{events.length === 0 ? (\n\t\t\t\t<EmptyState>\n\t\t\t\t\t<EmptyStateIcon id=\"Calendar\" />\n\t\t\t\t\t<EmptyStateTitle>No events found</EmptyStateTitle>\n\t\t\t\t\t<EmptyStateDescription>\n\t\t\t\t\t\tNo events match your current filters. Try adjusting your date range\n\t\t\t\t\t\tor filters.\n\t\t\t\t\t</EmptyStateDescription>\n\t\t\t\t</EmptyState>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<EventsTimeline events={events} />\n\n\t\t\t\t\t{/* Pagination */}\n\t\t\t\t\t{totalPages > 1 && (\n\t\t\t\t\t\t<div className=\"flex items-center justify-center gap-2\">\n\t\t\t\t\t\t\t<Pagination>\n\t\t\t\t\t\t\t\t<PaginationContent>\n\t\t\t\t\t\t\t\t\t<PaginationItem>\n\t\t\t\t\t\t\t\t\t\t<PaginationPreviousButton\n\t\t\t\t\t\t\t\t\t\t\tonClick={goToPreviousPage}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={currentPage <= 1}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</PaginationItem>\n\t\t\t\t\t\t\t\t\t<PaginationItem>\n\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm px-2\">\n\t\t\t\t\t\t\t\t\t\t\tPage {currentPage} of {totalPages}\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t</PaginationItem>\n\t\t\t\t\t\t\t\t\t<PaginationItem>\n\t\t\t\t\t\t\t\t\t\t<PaginationNextButton\n\t\t\t\t\t\t\t\t\t\t\tonClick={goToNextPage}\n\t\t\t\t\t\t\t\t\t\t\tdisabled={currentPage >= totalPages}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</PaginationItem>\n\t\t\t\t\t\t\t\t</PaginationContent>\n\t\t\t\t\t\t\t</Pagination>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{isLoadingNextPage && (\n\t\t\t\t\t\t<div className=\"flex justify-center py-4\">\n\t\t\t\t\t\t\t<Skeleton className=\"h-8 w-32\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n","import { createFileRoute } from \"@tanstack/react-router\";\nimport { zodValidator } from \"@tanstack/zod-adapter\";\nimport { Suspense } from \"react\";\nimport { z } from \"zod\";\nimport { buildEventsHistoryQuery, buildFilterEventsQuery } from \"@/api/events\";\nimport {\n\tbuildEventsCountFilterFromSearch,\n\tbuildEventsFilterFromSearch,\n\ttype EventsSearchParams,\n} from \"@/api/events/filters\";\nimport { EventsPage } from \"@/components/events/events-page\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\n\n/**\n * Schema for validating URL search parameters for the events page.\n * Uses existing parameter names (resource, event) for compatibility with API infrastructure.\n */\nconst searchParams = z.object({\n\tresource: z.array(z.string()).optional(),\n\tevent: z.array(z.string()).optional(),\n\trangeType: z.enum([\"span\", \"range\"]).optional().default(\"span\"),\n\tseconds: z.number().optional().default(-86400),\n\tstart: z.string().optional(),\n\tend: z.string().optional(),\n\torder: z.enum([\"ASC\", \"DESC\"]).optional(),\n});\n\n/**\n * Skeleton component shown while the events page is loading.\n * Displays placeholder elements for header, filters, chart, and timeline.\n */\nfunction EventsPageSkeleton() {\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t{/* Header skeleton */}\n\t\t\t<Skeleton className=\"h-8 w-48\" />\n\t\t\t{/* Filters skeleton */}\n\t\t\t<div className=\"flex flex-wrap gap-4\">\n\t\t\t\t<Skeleton className=\"h-10 w-48\" />\n\t\t\t\t<Skeleton className=\"h-10 w-48\" />\n\t\t\t\t<Skeleton className=\"h-10 w-48\" />\n\t\t\t</div>\n\t\t\t{/* Chart area skeleton */}\n\t\t\t<Skeleton className=\"h-32 w-full\" />\n\t\t\t{/* Timeline area skeleton */}\n\t\t\t<Skeleton className=\"h-64 w-full\" />\n\t\t</div>\n\t);\n}\n\nexport const Route = createFileRoute(\"/events/\")({\n\tvalidateSearch: zodValidator(searchParams),\n\tloaderDeps: ({ search }) => search,\n\twrapInSuspense: true,\n\tpendingComponent: EventsPageSkeleton,\n\tloader: ({ deps: search, context: { queryClient } }) => {\n\t\tconst eventsFilter = buildEventsFilterFromSearch(search);\n\t\tconst countFilter = buildEventsCountFilterFromSearch(search);\n\n\t\t// Prefetch queries without blocking route loading\n\t\tvoid queryClient.prefetchQuery(buildFilterEventsQuery(eventsFilter));\n\t\tvoid queryClient.prefetchQuery(buildEventsHistoryQuery(countFilter));\n\t},\n\tcomponent: RouteComponent,\n});\n\nfunction RouteComponent() {\n\tconst search = Route.useSearch();\n\tconst navigate = Route.useNavigate();\n\n\tconst handleSearchChange = (updates: Partial<EventsSearchParams>) => {\n\t\tvoid navigate({\n\t\t\tto: \".\",\n\t\t\tsearch: (prev) => ({ ...prev, ...updates }),\n\t\t\treplace: true,\n\t\t});\n\t};\n\n\treturn (\n\t\t<Suspense fallback={<EventsPageSkeleton />}>\n\t\t\t<EventsPage search={search} onSearchChange={handleSearchChange} />\n\t\t</Suspense>\n\t);\n}\n"],"names":["EventsTooltipContent","active","payload","point","jsxs","jsx","format","chartConfig","EventsLineChart","forwardRef","data","className","showAxis","startDate","endDate","onCursorChange","ref","containerRef","useRef","useImperativeHandle","chartData","useMemo","points","item","startTime","endTime","handleMouseMove","state","timestamp","handleMouseLeave","cn","ChartContainer","AreaChart","XAxis","value","YAxis","max","ChartTooltip","Area","InteractiveEventsChart","RESOURCE_TYPE_DISPLAY_NAMES","EventsResourceFilter","props","Suspense","EventsResourceFilterImplementation","selectedResourceIds","onResourceIdsChange","search","setSearch","useState","deferredSearch","useDeferredValue","resourceOptions","useResourceOptions","filteredOptions","option","groupedOptions","groups","handleToggleResource","resourceId","isSelected","id","Combobox","ComboboxTrigger","ComboboxContent","ComboboxCommandInput","ComboboxCommandEmtpy","ComboboxCommandList","type","options","ComboboxCommandGroup","ComboboxCommandItem","EventTimestamp","occurred","date","formattedTime","formattedDate","TimelinePoint","event","isLast","resourceType","parseResourceType","iconId","RESOURCE_ICONS","Icon","formatRouteDate","year","month","day","EventNameWithPrefixes","eventId","eventName","label","formatEventLabel","eventDate","Link","getResourceRole","resource","getResourceId","getResourceName","EventRelatedResources","related","tags","resources","displayText","typeLabel","RESOURCE_TYPE_LABELS","EventResourceLink","tag","tagId","tagName","Badge","EventTimelineItem","isOpen","setIsOpen","Collapsible","Card","CardHeader","EventResourceDisplay","CollapsibleTrigger","Button","ChevronDown","CollapsibleContent","CardContent","JsonView","EventsTimeline","events","index","MAX_EVENT_TYPES_DISPLAYED","EventsTypeFilter","filter","selectedEventTypes","onEventTypesChange","eventCounts","useQuery","buildEventsCountQuery","eventTypeOptions","prefixSet","eventCount","prefixes","getEventPrefixes","prefix","handleSelectEventType","eventType","handleClearAll","renderSelectedEventTypes","visible","extraCount","Checkbox","PAGE_SIZE","useEventsPagination","currentPage","setCurrentPage","tokenVault","previousFilterRef","useEffect","currentFilterString","firstPageQuery","buildFilterEventsQuery","currentPageToken","nextPageQuery","buildEventsNextPageQuery","total","totalPages","isLoadingNextPage","page","EventsPage","onSearchChange","dateRange","getDateRangeFromSearch","eventsFilter","buildEventsFilterFromSearch","countFilter","buildEventsCountFilterFromSearch","countFilterForTypeDropdown","goToNextPage","goToPreviousPage","historyData","buildEventsHistoryQuery","handleResourceIdsChange","resourceIds","handleEventTypesChange","eventPrefixes","handleDateRangeChange","isChartSticky","setIsChartSticky","handleScroll","Breadcrumb","BreadcrumbList","BreadcrumbItem","Label","Skeleton","RichDateRangeSelector","EmptyState","EmptyStateIcon","EmptyStateTitle","EmptyStateDescription","Fragment","Pagination","PaginationContent","PaginationItem","PaginationPreviousButton","PaginationNextButton","EventsPageSkeleton","RouteComponent","Route","useSearch","navigate","useNavigate","handleSearchChange","updates","to","prev","replace"],"mappings":"y3BAkBA,MAAMA,GAAuB,CAAC,CAAE,OAAAC,EAAQ,QAAAC,KAAkC,CACzE,GAAI,CAACD,GAAU,CAACC,GAAW,CAACA,EAAQ,OAAQ,OAAO,KAGnD,MAAMC,EADmBD,EAAQ,CAAC,GACF,QAEhC,MACC,CAACC,GACD,OAAOA,EAAM,MAAS,UACtB,OAAOA,EAAM,OAAU,SAEhB,KAIPC,EAAAA,KAAC,MAAA,CAAI,UAAU,6CACd,SAAA,CAAAA,EAAAA,KAAC,MAAA,CAAI,UAAU,sBAAuB,SAAA,CAAAD,EAAM,MAAM,SAAA,EAAO,EACzDE,EAAAA,IAAC,MAAA,CAAI,UAAU,gCACb,SAAAC,EAAO,IAAI,KAAKH,EAAM,IAAI,EAAG,KAAK,CAAA,CACpC,CAAA,EACD,CAEF,EAmBMI,GAAc,CACnB,MAAO,CACN,MAAO,SACP,MAAO,wBAAA,CAET,EAEaC,GAAkBC,EAAAA,WAG7B,SACD,CAAE,KAAAC,EAAM,UAAAC,EAAW,SAAAC,EAAW,GAAM,UAAAC,EAAW,QAAAC,EAAS,eAAAC,CAAA,EACxDC,EACC,CACD,MAAMC,EAAeC,EAAAA,OAAuB,IAAI,EAEhDC,EAAAA,oBAAoBH,EAAK,KAAO,CAC/B,eAAgB,IAAM,CAEtB,CAAA,EACC,EAEF,MAAMI,EAAYC,EAAAA,QAAQ,IAAM,CAC/B,MAAMC,EAASZ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A,IAAC0L,EAAA,CAAS,UAAU,UAAA,CAAW,CAAA,CAChC,CAAA,CAAA,CAEF,CAAA,EAEF,CAEF,CC1MA,SAASY,IAAqB,CAC7B,OACCvM,EAAAA,KAAC,MAAA,CAAI,UAAU,sBAEd,SAAA,CAAAC,EAAAA,IAAC0L,EAAA,CAAS,UAAU,UAAA,CAAU,EAE9B3L,EAAAA,KAAC,MAAA,CAAI,UAAU,uBACd,SAAA,CAAAC,EAAAA,IAAC0L,EAAA,CAAS,UAAU,WAAA,CAAW,EAC/B1L,EAAAA,IAAC0L,EAAA,CAAS,UAAU,WAAA,CAAW,EAC/B1L,EAAAA,IAAC0L,EAAA,CAAS,UAAU,WAAA,CAAW,CAAA,EAChC,EAEA1L,EAAAA,IAAC0L,EAAA,CAAS,UAAU,aAAA,CAAa,EAEjC1L,EAAAA,IAAC0L,EAAA,CAAS,UAAU,aAAA,CAAa,CAAA,EAClC,CAEF,CAkBA,SAASa,IAAiB,CACzB,MAAM7J,EAAS8J,EAAMC,UAAAA,EACfC,EAAWF,EAAMG,YAAAA,EAEjBC,EAAsBC,GAAyC,CAC/DH,EAAS,CACbI,GAAI,IACJpK,OAASqK,IAAU,CAAE,GAAGA,EAAM,GAAGF,CAAAA,GACjCG,QAAS,EAAA,CACT,CACF,EAEA,OACChN,EAAAA,IAACsC,EAAAA,SAAA,CAAS,SAAUtC,EAAAA,IAACsM,GAAA,EAAkB,EACtC,SAAAtM,EAAAA,IAACiK,GAAA,CAAW,OAAAvH,EAAgB,eAAgBkK,CAAAA,CAAmB,EAChE,CAEF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as o}from"./vendor-tanstack-BdLtprmr.js";import{s as i}from"./index-
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{j as o}from"./vendor-tanstack-BdLtprmr.js";import{s as i}from"./index-CPpeVt8m.js";import{A as m}from"./automations-header-Dr6v5dPp.js";import{R as s}from"./route-error-state-BqbnZCc-.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-radix-CJc458uP.js";import"./vendor-recharts-CY3PKigC.js";import"./vendor-forms-BlFSCfFw.js";import"./vendor-date-Cl1Jav-N.js";function j({error:t,reset:e}){const r=i(t,"Failed to load automations");if(r.type!=="server-error"&&r.type!=="client-error")throw t;return o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsx(m,{}),o.jsx(s,{error:r,onRetry:e})]})}export{j as errorComponent};
|
|
2
|
+
//# sourceMappingURL=index-BleYpDoN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BleYpDoN.js","sources":["../../src/routes/automations/index.tsx?tsr-split=errorComponent"],"sourcesContent":["import type { ErrorComponentProps } from \"@tanstack/react-router\";\nimport { createFileRoute } from \"@tanstack/react-router\";\nimport { buildListAutomationsQuery } from \"@/api/automations\";\nimport { categorizeError } from \"@/api/error-utils\";\nimport { AutomationsHeader } from \"@/components/automations/automations-header\";\nimport { AutomationsPage } from \"@/components/automations/automations-page\";\nimport { PrefectLoading } from \"@/components/ui/loading\";\nimport { RouteErrorState } from \"@/components/ui/route-error-state\";\n\nfunction AutomationsErrorComponent({ error, reset }: ErrorComponentProps) {\n\tconst serverError = categorizeError(error, \"Failed to load automations\");\n\n\t// Only handle API errors (server-error, client-error) at route level\n\t// Let network errors and unknown errors bubble up to root error component\n\tif (\n\t\tserverError.type !== \"server-error\" &&\n\t\tserverError.type !== \"client-error\"\n\t) {\n\t\tthrow error;\n\t}\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<AutomationsHeader />\n\t\t\t<RouteErrorState error={serverError} onRetry={reset} />\n\t\t</div>\n\t);\n}\n\n// nb: Currently there is no filtering or search params used on this page\nexport const Route = createFileRoute(\"/automations/\")({\n\tcomponent: AutomationsPage,\n\terrorComponent: AutomationsErrorComponent,\n\tloader: ({ context }) =>\n\t\tcontext.queryClient.ensureQueryData(buildListAutomationsQuery()),\n\twrapInSuspense: true,\n\tpendingComponent: PrefectLoading,\n});\n"],"names":["AutomationsErrorComponent","error","reset","serverError","categorizeError","type","jsxs","jsx","AutomationsHeader","RouteErrorState"],"mappings":"oXASA,SAASA,EAA0B,CAAEC,MAAAA,EAAOC,MAAAA,CAA2B,EAAG,CACzE,MAAMC,EAAcC,EAAgBH,EAAO,4BAA4B,EAIvE,GACCE,EAAYE,OAAS,gBACrBF,EAAYE,OAAS,eAErB,MAAMJ,EAGP,OACCK,EAAAA,KAAC,MAAA,CAAI,UAAU,sBACd,SAAA,CAAAC,EAAAA,IAACC,EAAA,EAAiB,EAClBD,EAAAA,IAACE,EAAA,CAAgB,MAAON,EAAa,QAASD,CAAAA,CAAM,CAAA,EACrD,CAEF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e}from"./vendor-tanstack-BdLtprmr.js";import{S as C,a as S,b as D,
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{j as e}from"./vendor-tanstack-BdLtprmr.js";import{S as C,a as S,b as D,at as a,c as A,e as L}from"./index-CPpeVt8m.js";const E={COMPLETED:"Completed",RUNNING:"Running",SCHEDULED:"Scheduled",PENDING:"Pending",FAILED:"Failed",CANCELLED:"Cancelled",CANCELLING:"Cancelling",CRASHED:"Crashed",PAUSED:"Paused"},N=["Scheduled","Late","Resuming","AwaitingRetry","AwaitingConcurrencySlot","Pending","Paused","Suspended","Running","Retrying","Completed","Cached","Cancelled","Cancelling","Crashed","Failed","TimedOut"],g={Scheduled:"SCHEDULED",Late:"SCHEDULED",Resuming:"SCHEDULED",AwaitingRetry:"SCHEDULED",AwaitingConcurrencySlot:"SCHEDULED",Pending:"PENDING",Paused:"PAUSED",Suspended:"PAUSED",Running:"RUNNING",Retrying:"RUNNING",Completed:"COMPLETED",Cached:"COMPLETED",Cancelled:"CANCELLED",Cancelling:"CANCELLING",Crashed:"CRASHED",Failed:"FAILED",TimedOut:"FAILED"},R=N.filter(t=>t!=="Scheduled"),u=["COMPLETED","FAILED","CANCELLED","CRASHED"],P=({value:t,onValueChange:l,placeholder:i="Select state",terminalOnly:c=!1,excludeState:s})=>{const d=Object.entries(E).filter(([n])=>!(c&&!u.includes(n)||s&&n===s));return e.jsxs(C,{value:t,onValueChange:l,children:[e.jsx(S,{"aria-label":"select state",className:"w-full",children:e.jsx(D,{placeholder:i,children:t&&e.jsx(a,{type:t,name:E[t]})})}),e.jsx(A,{className:"w-full min-w-[300px]",children:d.map(([n,r])=>e.jsx(L,{value:n,className:"flex items-center",children:e.jsx(a,{type:n,name:r})},n))})]})};export{E as R,P as S,N as a,g as b,R as c};
|
|
2
|
+
//# sourceMappingURL=index-C63VUjOh.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-C63VUjOh.js","sources":["../../src/api/flow-runs/constants.ts","../../src/components/ui/state-select/index.tsx"],"sourcesContent":["import type { components } from \"@/api/prefect\";\n\nexport const RUN_STATES = {\n\tCOMPLETED: \"Completed\",\n\tRUNNING: \"Running\",\n\tSCHEDULED: \"Scheduled\",\n\tPENDING: \"Pending\",\n\tFAILED: \"Failed\",\n\tCANCELLED: \"Cancelled\",\n\tCANCELLING: \"Cancelling\",\n\tCRASHED: \"Crashed\",\n\tPAUSED: \"Paused\",\n} as const satisfies Record<\n\tcomponents[\"schemas\"][\"StateType\"],\n\tCapitalize<Lowercase<components[\"schemas\"][\"StateType\"]>>\n>;\n\nexport type RunStates = keyof typeof RUN_STATES;\n\nexport type StateType = components[\"schemas\"][\"StateType\"];\n\n/**\n * All possible state names that can be used in automations.\n * This list is intentionally ordered by state type progression\n * to match the Vue implementation.\n */\nexport const STATE_NAMES = [\n\t\"Scheduled\",\n\t\"Late\",\n\t\"Resuming\",\n\t\"AwaitingRetry\",\n\t\"AwaitingConcurrencySlot\",\n\t\"Pending\",\n\t\"Paused\",\n\t\"Suspended\",\n\t\"Running\",\n\t\"Retrying\",\n\t\"Completed\",\n\t\"Cached\",\n\t\"Cancelled\",\n\t\"Cancelling\",\n\t\"Crashed\",\n\t\"Failed\",\n\t\"TimedOut\",\n] as const;\n\nexport type StateName = (typeof STATE_NAMES)[number];\n\n/**\n * Maps state names to their corresponding state types.\n * Multiple state names can map to the same state type.\n */\nexport const STATE_NAME_TO_TYPE: Record<StateName, StateType> = {\n\tScheduled: \"SCHEDULED\",\n\tLate: \"SCHEDULED\",\n\tResuming: \"SCHEDULED\",\n\tAwaitingRetry: \"SCHEDULED\",\n\tAwaitingConcurrencySlot: \"SCHEDULED\",\n\tPending: \"PENDING\",\n\tPaused: \"PAUSED\",\n\tSuspended: \"PAUSED\",\n\tRunning: \"RUNNING\",\n\tRetrying: \"RUNNING\",\n\tCompleted: \"COMPLETED\",\n\tCached: \"COMPLETED\",\n\tCancelled: \"CANCELLED\",\n\tCancelling: \"CANCELLING\",\n\tCrashed: \"CRASHED\",\n\tFailed: \"FAILED\",\n\tTimedOut: \"FAILED\",\n} as const;\n\n/**\n * State names that are not \"Scheduled\" - used for the \"All except scheduled\" convenience option.\n */\nexport const STATE_NAMES_WITHOUT_SCHEDULED = STATE_NAMES.filter(\n\t(name) => name !== \"Scheduled\",\n);\n","import { RUN_STATES } from \"@/api/flow-runs/constants\";\nimport type { components } from \"@/api/prefect\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { StateBadge } from \"@/components/ui/state-badge\";\n\ntype StateType = components[\"schemas\"][\"StateType\"];\n\nconst TERMINAL_STATES: StateType[] = [\n\t\"COMPLETED\",\n\t\"FAILED\",\n\t\"CANCELLED\",\n\t\"CRASHED\",\n];\n\nexport type StateSelectProps = {\n\tvalue?: StateType;\n\tonValueChange: (value: StateType) => void;\n\tplaceholder?: string;\n\tterminalOnly?: boolean;\n\texcludeState?: StateType;\n};\n\nexport const StateSelect = ({\n\tvalue,\n\tonValueChange,\n\tplaceholder = \"Select state\",\n\tterminalOnly = false,\n\texcludeState,\n}: StateSelectProps) => {\n\tconst stateEntries = Object.entries(RUN_STATES) as [StateType, string][];\n\n\tconst filteredStates = stateEntries.filter(([key]) => {\n\t\tif (terminalOnly && !TERMINAL_STATES.includes(key)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (excludeState && key === excludeState) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t});\n\n\treturn (\n\t\t<Select value={value} onValueChange={onValueChange}>\n\t\t\t<SelectTrigger aria-label=\"select state\" className=\"w-full\">\n\t\t\t\t<SelectValue placeholder={placeholder}>\n\t\t\t\t\t{value && <StateBadge type={value} name={RUN_STATES[value]} />}\n\t\t\t\t</SelectValue>\n\t\t\t</SelectTrigger>\n\t\t\t<SelectContent className=\"w-full min-w-[300px]\">\n\t\t\t\t{filteredStates.map(([key, displayName]) => (\n\t\t\t\t\t<SelectItem key={key} value={key} className=\"flex items-center\">\n\t\t\t\t\t\t<StateBadge type={key} name={displayName} />\n\t\t\t\t\t</SelectItem>\n\t\t\t\t))}\n\t\t\t</SelectContent>\n\t\t</Select>\n\t);\n};\n"],"names":["RUN_STATES","STATE_NAMES","STATE_NAME_TO_TYPE","STATE_NAMES_WITHOUT_SCHEDULED","name","TERMINAL_STATES","StateSelect","value","onValueChange","placeholder","terminalOnly","excludeState","filteredStates","key","jsxs","Select","jsx","SelectTrigger","SelectValue","StateBadge","SelectContent","displayName","SelectItem"],"mappings":"8HAEO,MAAMA,EAAa,CACzB,UAAW,YACX,QAAS,UACT,UAAW,YACX,QAAS,UACT,OAAQ,SACR,UAAW,YACX,WAAY,aACZ,QAAS,UACT,OAAQ,QACT,EAcaC,EAAc,CAC1B,YACA,OACA,WACA,gBACA,0BACA,UACA,SACA,YACA,UACA,WACA,YACA,SACA,YACA,aACA,UACA,SACA,UACD,EAQaC,EAAmD,CAC/D,UAAW,YACX,KAAM,YACN,SAAU,YACV,cAAe,YACf,wBAAyB,YACzB,QAAS,UACT,OAAQ,SACR,UAAW,SACX,QAAS,UACT,SAAU,UACV,UAAW,YACX,OAAQ,YACR,UAAW,YACX,WAAY,aACZ,QAAS,UACT,OAAQ,SACR,SAAU,QACX,EAKaC,EAAgCF,EAAY,OACvDG,GAASA,IAAS,WACpB,EChEMC,EAA+B,CACpC,YACA,SACA,YACA,SACD,EAUaC,EAAc,CAAC,CAC3B,MAAAC,EACA,cAAAC,EACA,YAAAC,EAAc,eACd,aAAAC,EAAe,GACf,aAAAC,CACD,IAAwB,CAGvB,MAAMC,EAFe,OAAO,QAAQZ,CAAU,EAEV,OAAO,CAAC,CAACa,CAAG,IAC3C,EAAAH,GAAgB,CAACL,EAAgB,SAASQ,CAAG,GAG7CF,GAAgBE,IAAQF,EAI5B,EAED,OACCG,EAAAA,KAACC,EAAA,CAAO,MAAAR,EAAc,cAAAC,EACrB,SAAA,CAAAQ,EAAAA,IAACC,GAAc,aAAW,eAAe,UAAU,SAClD,SAAAD,EAAAA,IAACE,GAAY,YAAAT,EACX,SAAAF,GAASS,MAACG,EAAA,CAAW,KAAMZ,EAAO,KAAMP,EAAWO,CAAK,EAAG,EAC7D,CAAA,CACD,EACAS,EAAAA,IAACI,EAAA,CAAc,UAAU,uBACvB,SAAAR,EAAe,IAAI,CAAC,CAACC,EAAKQ,CAAW,IACrCL,EAAAA,IAACM,EAAA,CAAqB,MAAOT,EAAK,UAAU,oBAC3C,SAAAG,EAAAA,IAACG,EAAA,CAAW,KAAMN,EAAK,KAAMQ,CAAA,CAAa,CAAA,EAD1BR,CAEjB,CACA,CAAA,CACF,CAAA,EACD,CAEF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as o}from"./vendor-tanstack-BdLtprmr.js";import{s as a}from"./index-
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{j as o}from"./vendor-tanstack-BdLtprmr.js";import{s as a}from"./index-CPpeVt8m.js";import{R as i}from"./route-error-state-BqbnZCc-.js";import{V as s}from"./header-qlcK4NLD.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-radix-CJc458uP.js";import"./vendor-recharts-CY3PKigC.js";import"./vendor-forms-BlFSCfFw.js";import"./vendor-date-Cl1Jav-N.js";function E({error:e,reset:t}){const r=a(e,"Failed to load variables");if(r.type!=="server-error"&&r.type!=="client-error")throw e;return o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsx(s,{}),o.jsx(i,{error:r,onRetry:t})]})}export{E as errorComponent};
|
|
2
|
+
//# sourceMappingURL=index-C6LgWyJb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-C6LgWyJb.js","sources":["../../src/routes/variables/index.tsx?tsr-split=errorComponent"],"sourcesContent":["import { useSuspenseQueries } from \"@tanstack/react-query\";\nimport type { ErrorComponentProps } from \"@tanstack/react-router\";\nimport { createFileRoute } from \"@tanstack/react-router\";\nimport type {\n\tColumnFiltersState,\n\tPaginationState,\n} from \"@tanstack/react-table\";\nimport { zodValidator } from \"@tanstack/zod-adapter\";\nimport { useCallback, useMemo } from \"react\";\nimport { z } from \"zod\";\nimport { categorizeError } from \"@/api/error-utils\";\nimport type { components } from \"@/api/prefect\";\nimport {\n\tbuildCountVariablesQuery,\n\tbuildFilterVariablesQuery,\n\ttype VariablesFilter,\n} from \"@/api/variables\";\nimport { PrefectLoading } from \"@/components/ui/loading\";\nimport { RouteErrorState } from \"@/components/ui/route-error-state\";\nimport { VariablesDataTable } from \"@/components/variables/data-table\";\nimport { VariablesEmptyState } from \"@/components/variables/empty-state\";\nimport { VariablesPageHeader } from \"@/components/variables/header\";\nimport {\n\tuseVariableDialog,\n\tVariableDialog,\n} from \"@/components/variables/variable-dialog\";\n\n/**\n * Schema for validating URL search parameters for the variables page.\n * @property {number} offset - The number of items to skip (for pagination). Must be non-negative. Defaults to 0.\n * @property {number} limit - The maximum number of items to return. Must be positive. Defaults to 10.\n * @property {string} sort - The sort order for variables. Can be \"CREATED_DESC\", \"UPDATED_DESC\", \"NAME_ASC\", or \"NAME_DESC\". Defaults to \"CREATED_DESC\".\n * @property {string} name - Optional filter to search variables by name.\n * @property {string[]} tags - Optional array of tags to filter variables by.\n */\nconst searchParams = z.object({\n\toffset: z.number().int().nonnegative().optional().default(0).catch(0),\n\tlimit: z.number().int().positive().optional().default(10).catch(10),\n\tsort: z\n\t\t.enum([\"CREATED_DESC\", \"UPDATED_DESC\", \"NAME_ASC\", \"NAME_DESC\"])\n\t\t.optional()\n\t\t.default(\"CREATED_DESC\")\n\t\t.catch(\"CREATED_DESC\"),\n\tname: z.string().optional().catch(undefined),\n\ttags: z.array(z.string()).optional().catch(undefined),\n});\n\n/**\n * Builds a filter body for the variables API based on search parameters.\n * @param search - Optional search parameters containing offset, limit, sort, name filter, and tags filter\n * @returns An object containing pagination parameters and variable filters that can be passed to the variables API\n */\nconst buildFilterBody = (\n\tsearch?: z.infer<typeof searchParams>,\n): VariablesFilter => ({\n\toffset: search?.offset ?? 0,\n\tlimit: search?.limit ?? 10,\n\tsort: search?.sort ?? \"CREATED_DESC\",\n\tvariables: {\n\t\toperator: \"and_\" as const,\n\t\t...(search?.name && { name: { like_: search.name } }),\n\t\t...(search?.tags?.length && {\n\t\t\ttags: { operator: \"and_\" as const, all_: search.tags },\n\t\t}),\n\t},\n});\n\nfunction VariablesErrorComponent({ error, reset }: ErrorComponentProps) {\n\tconst serverError = categorizeError(error, \"Failed to load variables\");\n\n\t// Only handle API errors (server-error, client-error) at route level\n\t// Let network errors and unknown errors bubble up to root error component\n\tif (\n\t\tserverError.type !== \"server-error\" &&\n\t\tserverError.type !== \"client-error\"\n\t) {\n\t\tthrow error;\n\t}\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<VariablesPageHeader />\n\t\t\t<RouteErrorState error={serverError} onRetry={reset} />\n\t\t</div>\n\t);\n}\n\nexport const Route = createFileRoute(\"/variables/\")({\n\tvalidateSearch: zodValidator(searchParams),\n\tcomponent: RouteComponent,\n\terrorComponent: VariablesErrorComponent,\n\tloaderDeps: ({ search }) => buildFilterBody(search),\n\tloader: ({ deps, context }) => {\n\t\t// Prefetch filtered variables\n\t\tvoid context.queryClient.prefetchQuery(buildFilterVariablesQuery(deps));\n\t\t// Prefetch filtered count\n\t\tvoid context.queryClient.prefetchQuery(buildCountVariablesQuery(deps));\n\t\t// Prefetch total count (no filter)\n\t\tvoid context.queryClient.prefetchQuery(buildCountVariablesQuery());\n\t},\n\twrapInSuspense: true,\n\tpendingComponent: PrefectLoading,\n});\n\n/**\n * Hook to manage pagination state and navigation for variables table\n *\n * Calculates current page index and size from URL search parameters and provides\n * a callback to update pagination state. Updates the URL when pagination changes.\n *\n * @returns A tuple containing:\n * - pagination: Current pagination state with pageIndex and pageSize\n * - onPaginationChange: Callback to update pagination and navigate with new search params\n */\nconst usePagination = () => {\n\tconst search = Route.useSearch();\n\tconst navigate = Route.useNavigate();\n\n\tconst pageIndex = search.offset ? Math.ceil(search.offset / search.limit) : 0;\n\tconst pageSize = search.limit ?? 10;\n\tconst pagination: PaginationState = useMemo(\n\t\t() => ({\n\t\t\tpageIndex,\n\t\t\tpageSize,\n\t\t}),\n\t\t[pageIndex, pageSize],\n\t);\n\n\tconst onPaginationChange = useCallback(\n\t\t(newPagination: PaginationState) => {\n\t\t\tvoid navigate({\n\t\t\t\tto: \".\",\n\t\t\t\tsearch: (prev) => ({\n\t\t\t\t\t...prev,\n\t\t\t\t\toffset: newPagination.pageIndex * newPagination.pageSize,\n\t\t\t\t\tlimit: newPagination.pageSize,\n\t\t\t\t}),\n\t\t\t\treplace: true,\n\t\t\t});\n\t\t},\n\t\t[navigate],\n\t);\n\n\treturn [pagination, onPaginationChange] as const;\n};\n\n/**\n * Hook to manage column filtering state and navigation for variables table\n *\n * Handles filtering by name and tags, updating the URL search parameters when filters change.\n * Resets pagination offset when filters are updated.\n *\n * @returns A tuple containing:\n * - columnFilters: Current column filter state for name and tags\n * - onColumnFiltersChange: Callback to update filters and navigate with new search params\n */\nconst useVariableColumnFilters = () => {\n\tconst search = Route.useSearch();\n\tconst navigate = Route.useNavigate();\n\tconst columnFilters: ColumnFiltersState = useMemo(\n\t\t() => [\n\t\t\t{ id: \"name\", value: search.name },\n\t\t\t{ id: \"tags\", value: search.tags },\n\t\t],\n\t\t[search.name, search.tags],\n\t);\n\n\tconst onColumnFiltersChange = useCallback(\n\t\t(newColumnFilters: ColumnFiltersState) => {\n\t\t\tvoid navigate({\n\t\t\t\tto: \".\",\n\t\t\t\tsearch: (prev) => {\n\t\t\t\t\tconst name = newColumnFilters.find((filter) => filter.id === \"name\")\n\t\t\t\t\t\t?.value as string | undefined;\n\t\t\t\t\tconst tags = newColumnFilters.find((filter) => filter.id === \"tags\")\n\t\t\t\t\t\t?.value as string[] | undefined;\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...prev,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\ttags,\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\treplace: true,\n\t\t\t});\n\t\t},\n\t\t[navigate],\n\t);\n\n\treturn [columnFilters, onColumnFiltersChange] as const;\n};\n\n/**\n * Hook to manage sorting state and navigation for variables table\n *\n * Handles updating the URL search parameters when sort key changes.\n * Uses the current sort value from search params and provides a callback\n * to update sorting.\n *\n * @returns A tuple containing:\n * - sorting: Current sort key from search params\n * - onSortingChange: Callback to update sort and navigate with new search params\n */\nconst useVariableSorting = () => {\n\tconst search = Route.useSearch();\n\tconst navigate = Route.useNavigate();\n\n\tconst onSortingChange = useCallback(\n\t\t(sortKey: components[\"schemas\"][\"VariableSort\"]) => {\n\t\t\tvoid navigate({\n\t\t\t\tto: \".\",\n\t\t\t\tsearch: (prev) => ({ ...prev, sort: sortKey }),\n\t\t\t\treplace: true,\n\t\t\t});\n\t\t},\n\t\t[navigate],\n\t);\n\n\treturn [search.sort, onSortingChange] as const;\n};\n\nfunction RouteComponent() {\n\tconst search = Route.useSearch();\n\tconst [pagination, onPaginationChange] = usePagination();\n\tconst [columnFilters, onColumnFiltersChange] = useVariableColumnFilters();\n\tconst [sorting, onSortingChange] = useVariableSorting();\n\tconst [variableDialogState, onVariableAddOrEdit] = useVariableDialog();\n\n\tconst [{ data: variables }, { data: filteredCount }, { data: totalCount }] =\n\t\tuseSuspenseQueries({\n\t\t\tqueries: [\n\t\t\t\tbuildFilterVariablesQuery(buildFilterBody(search)),\n\t\t\t\tbuildCountVariablesQuery(buildFilterBody(search)),\n\t\t\t\tbuildCountVariablesQuery(),\n\t\t\t],\n\t\t});\n\n\tconst hasVariables = (totalCount ?? 0) > 0;\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<VariablesPageHeader onAddVariableClick={onVariableAddOrEdit} />\n\t\t\t<VariableDialog {...variableDialogState} />\n\t\t\t{hasVariables ? (\n\t\t\t\t<VariablesDataTable\n\t\t\t\t\tvariables={variables ?? []}\n\t\t\t\t\tcurrentVariableCount={filteredCount ?? 0}\n\t\t\t\t\tpagination={pagination}\n\t\t\t\t\tonPaginationChange={onPaginationChange}\n\t\t\t\t\tcolumnFilters={columnFilters}\n\t\t\t\t\tonColumnFiltersChange={onColumnFiltersChange}\n\t\t\t\t\tsorting={sorting}\n\t\t\t\t\tonSortingChange={onSortingChange}\n\t\t\t\t\tonVariableEdit={onVariableAddOrEdit}\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<VariablesEmptyState onAddVariableClick={onVariableAddOrEdit} />\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"names":["VariablesErrorComponent","error","reset","serverError","categorizeError","type","jsxs","jsx","VariablesPageHeader","RouteErrorState"],"mappings":"wWAmEA,SAASA,EAAwB,CAAEC,MAAAA,EAAOC,MAAAA,CAA2B,EAAG,CACvE,MAAMC,EAAcC,EAAgBH,EAAO,0BAA0B,EAIrE,GACCE,EAAYE,OAAS,gBACrBF,EAAYE,OAAS,eAErB,MAAMJ,EAGP,OACCK,EAAAA,KAAC,MAAA,CAAI,UAAU,sBACd,SAAA,CAAAC,EAAAA,IAACC,EAAA,EAAmB,EACpBD,EAAAA,IAACE,EAAA,CAAgB,MAAON,EAAa,QAASD,CAAAA,CAAM,CAAA,EACrD,CAEF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as p,t as A,j as e,L as D,C as T,D as B,B as E}from"./vendor-tanstack-BdLtprmr.js";import{u as I,a as k}from"./use-quick-run-Cpy0t7dX.js";import{bP as M,aQ as z,aU as O,q as _,I as P,y as $,U as Q,V,S as U,a as G,b as W,c as H,e as j,c6 as L,c7 as Z,$ as q}from"./index-CPpeVt8m.js";import{D as J}from"./data-table-bk-0xKWT.js";import{D as K}from"./delete-confirmation-dialog-BZg9EOfN.js";import{S as X}from"./index-cp6PTdHp.js";import{S as Y}from"./index-ELo08q04.js";import{T as F}from"./tags-input-DqZ8v99z.js";import{s as ee,U as se}from"./vendor-date-Cl1Jav-N.js";import{D as ae,a as le,b as te,c as ne,d}from"./dropdown-menu-fRiq5bS-.js";const ie=({row:n,onDelete:s})=>{const{id:l,parameters:o}=n.original,{onQuickRun:u,isPending:i}=I();return l?e.jsx("div",{className:"flex flex-row justify-end",children:e.jsxs(ae,{children:[e.jsx(le,{asChild:!0,children:e.jsxs(_,{variant:"outline",className:"size-8 p-0",children:[e.jsx("span",{className:"sr-only",children:"Open menu"}),e.jsx(P,{id:"MoreVertical",className:"size-4"})]})}),e.jsxs(te,{align:"end",children:[e.jsx(ne,{children:"Actions"}),e.jsx(d,{disabled:i,onClick:()=>u(l),children:"Quick Run"}),e.jsx(d,{children:e.jsx(D,{to:"/deployments/deployment/$id/run",params:{id:l},search:{parameters:o},children:"Custom Run"})}),e.jsx(d,{onClick:()=>{navigator.clipboard.writeText(l),$.success("ID copied")},children:"Copy ID"}),e.jsx(d,{children:e.jsx(D,{to:"/deployments/deployment/$id/edit",params:{id:l},children:"Edit"})}),e.jsx(d,{onClick:()=>s(n.original),children:"Delete"}),e.jsx(d,{children:e.jsx(D,{to:"/deployments/deployment/$id/duplicate",params:{id:l},children:"Duplicate"})})]})]})}):null},C=8,re=4,oe=({row:n})=>{const[s,l]=p.useState(0),o=M(s,150),u=p.useCallback(r=>{if(!r)return;const x=()=>{const v=r.getBoundingClientRect().width;l(Math.floor(v/(C+re)))};x();const g=new ResizeObserver(x);return g.observe(r),()=>{g.disconnect()}},[]),{data:i}=A(z({deployments:{operator:"and_",id:{any_:[n.original.id]}},sort:"START_TIME_DESC",limit:o||s,offset:0})),{flow:h,...y}=n.original,c=i?.map(r=>({...r,deployment:y,flow:h}))??[];return e.jsx("div",{className:"w-full",ref:u,children:e.jsx(O,{startDate:ee(new Date,se),endDate:new Date,numberOfBars:o||s,barWidth:C,enrichedFlowRuns:c,className:"h-12 w-full",chartId:n.original.id})})},m=E(),ce=({onDelete:n})=>[m.display({id:"name",header:"Deployment",cell:({row:s})=>e.jsxs("div",{className:"flex flex-col",children:[e.jsx(D,{to:"/deployments/deployment/$id",params:{id:s.original.id},children:e.jsx("span",{className:"text-sm font-medium truncate",title:s.original.name,children:s.original.name})}),s.original.flow&&e.jsx(Z,{flow:s.original.flow,className:"text-xs text-muted-foreground flex items-center gap-1",iconSize:12})]}),size:100}),m.accessor("status",{id:"status",header:"Status",cell:({row:s})=>{const l=s.original.status;return l?e.jsx("div",{className:"min-w-28",children:e.jsx(Y,{status:l})}):null},size:50}),m.display({id:"activity",header:"Activity",cell:s=>e.jsx("div",{className:"flex flex-row gap-2 items-center min-w-28",children:e.jsx(oe,{...s})}),size:300}),m.display({id:"tags",header:()=>null,cell:({row:s})=>e.jsx(q,{tags:s.original.tags??[]})}),m.display({id:"schedules",header:"Schedules",cell:({row:s})=>{const l=s.original.schedules;return!l||l.length===0?null:e.jsx(X,{schedules:l})},size:150}),m.display({id:"actions",cell:s=>e.jsx(ie,{...s,onDelete:n})})],ye=({deployments:n,currentDeploymentsCount:s,pagination:l,pageCount:o,sort:u,columnFilters:i,onPaginationChange:h,onSortChange:y,onColumnFiltersChange:c})=>{const[r,x]=k(),g=i.find(a=>a.id==="flowOrDeploymentName")?.value??"",v=i.find(a=>a.id==="tags")?.value??[],b=p.useCallback(a=>{const t=i.filter(f=>f.id!=="flowOrDeploymentName");c(a?[...t,{id:"flowOrDeploymentName",value:a}]:t)},[c,i]),S=p.useCallback(a=>{const t=Array.isArray(a)?a:a.target.value,f=i.filter(R=>R.id!=="tags");c(t.length?[...f,{id:"tags",value:t}]:f)},[c,i]),w=p.useCallback(a=>{let t=l;typeof a=="function"?t=a(l):t=a,h(t)},[l,h]),N=T({data:n,columns:ce({onDelete:a=>{const t=a.flow?.name?`${a.flow?.name}/${a.name}`:a.name;x({...a,name:t})}}),getCoreRowModel:B(),pageCount:o,manualPagination:!0,defaultColumn:{maxSize:300},state:{pagination:l},onPaginationChange:w});return e.jsxs("div",{children:[e.jsxs("div",{className:"grid sm:grid-cols-2 md:grid-cols-6 lg:grid-cols-12 gap-2 pb-4 items-center",children:[e.jsx("div",{className:"sm:col-span-2 md:col-span-6 lg:col-span-4 order-last lg:order-first",children:e.jsxs("p",{className:"text-sm text-muted-foreground",children:[s," ",Q(s,"Deployment")]})}),e.jsx("div",{className:"sm:col-span-2 md:col-span-2 lg:col-span-3",children:e.jsx(V,{placeholder:"Search deployments",value:g,onChange:a=>b(a.target.value)})}),e.jsx("div",{className:"xs:col-span-1 md:col-span-2 lg:col-span-3",children:e.jsx(F,{placeholder:"Filter by tags",onChange:S,value:v})}),e.jsx("div",{className:"xs:col-span-1 md:col-span-2 lg:col-span-2",children:e.jsxs(U,{value:u,onValueChange:y,children:[e.jsx(G,{"aria-label":"Deployment sort order",className:"w-full",children:e.jsx(W,{placeholder:"Sort by"})}),e.jsxs(H,{children:[e.jsx(j,{value:"CREATED_DESC",children:"Created"}),e.jsx(j,{value:"UPDATED_DESC",children:"Updated"}),e.jsx(j,{value:"NAME_ASC",children:"A to Z"}),e.jsx(j,{value:"NAME_DESC",children:"Z to A"})]})]})})]}),e.jsx(K,{...r}),e.jsx(L,{children:e.jsx(J,{table:N})})]})};export{ye as D};
|
|
2
|
+
//# sourceMappingURL=index-CE-bVgqj.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-DlAHvqFx.js","sources":["../../src/components/deployments/data-table/cells.tsx","../../src/components/deployments/data-table/index.tsx"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport { Link } from \"@tanstack/react-router\";\nimport type { CellContext } from \"@tanstack/react-table\";\nimport { subSeconds } from \"date-fns\";\nimport { secondsInWeek } from \"date-fns/constants\";\nimport { useCallback, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport type { DeploymentWithFlow } from \"@/api/deployments\";\nimport { buildFilterFlowRunsQuery } from \"@/api/flow-runs\";\nimport { useQuickRun } from \"@/components/deployments/use-quick-run\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { FlowRunActivityBarChart } from \"@/components/ui/flow-run-activity-bar-graph\";\nimport { Icon } from \"@/components/ui/icons\";\nimport useDebounce from \"@/hooks/use-debounce\";\n\ntype ActionsCellProps = CellContext<DeploymentWithFlow, unknown> & {\n\tonDelete: (deployment: DeploymentWithFlow) => void;\n};\n\nexport const ActionsCell = ({ row, onDelete }: ActionsCellProps) => {\n\tconst { id, parameters } = row.original;\n\tconst { onQuickRun, isPending } = useQuickRun();\n\n\tif (!id) return null;\n\n\treturn (\n\t\t<div className=\"flex flex-row justify-end\">\n\t\t\t<DropdownMenu>\n\t\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t\t<Button variant=\"outline\" className=\"size-8 p-0\">\n\t\t\t\t\t\t<span className=\"sr-only\">Open menu</span>\n\t\t\t\t\t\t<Icon id=\"MoreVertical\" className=\"size-4\" />\n\t\t\t\t\t</Button>\n\t\t\t\t</DropdownMenuTrigger>\n\t\t\t\t<DropdownMenuContent align=\"end\">\n\t\t\t\t\t<DropdownMenuLabel>Actions</DropdownMenuLabel>\n\t\t\t\t\t<DropdownMenuItem disabled={isPending} onClick={() => onQuickRun(id)}>\n\t\t\t\t\t\tQuick Run\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t<DropdownMenuItem>\n\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\tto=\"/deployments/deployment/$id/run\"\n\t\t\t\t\t\t\tparams={{ id }}\n\t\t\t\t\t\t\tsearch={{ parameters }}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tCustom Run\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t</DropdownMenuItem>\n\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tvoid navigator.clipboard.writeText(id);\n\t\t\t\t\t\t\ttoast.success(\"ID copied\");\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tCopy ID\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t<DropdownMenuItem>\n\t\t\t\t\t\t<Link to=\"/deployments/deployment/$id/edit\" params={{ id }}>\n\t\t\t\t\t\t\tEdit\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t<DropdownMenuItem onClick={() => onDelete(row.original)}>\n\t\t\t\t\t\tDelete\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t<DropdownMenuItem>\n\t\t\t\t\t\t<Link to=\"/deployments/deployment/$id/duplicate\" params={{ id }}>\n\t\t\t\t\t\t\tDuplicate\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t</DropdownMenuContent>\n\t\t\t</DropdownMenu>\n\t\t</div>\n\t);\n};\n\nconst BAR_WIDTH = 8;\nconst BAR_GAP = 4;\n\nexport const ActivityCell = ({\n\trow,\n}: CellContext<DeploymentWithFlow, unknown>) => {\n\tconst [numberOfBars, setNumberOfBars] = useState<number>(0);\n\tconst debouncedNumberOfBars = useDebounce(numberOfBars, 150);\n\n\tconst chartRef = useCallback((node: HTMLDivElement | null) => {\n\t\tif (!node) return;\n\n\t\tconst updateBars = () => {\n\t\t\tconst chartWidth = node.getBoundingClientRect().width;\n\t\t\tsetNumberOfBars(Math.floor(chartWidth / (BAR_WIDTH + BAR_GAP)));\n\t\t};\n\n\t\t// Set the initial number of bars based on the chart width\n\t\tupdateBars();\n\n\t\t// Observe the chart for resize events\n\t\tconst resizeObserver = new ResizeObserver(updateBars);\n\t\tresizeObserver.observe(node);\n\t\treturn () => {\n\t\t\t// Clean up the observer\n\t\t\tresizeObserver.disconnect();\n\t\t};\n\t}, []);\n\n\tconst { data: flowRuns } = useQuery(\n\t\tbuildFilterFlowRunsQuery({\n\t\t\tdeployments: {\n\t\t\t\toperator: \"and_\",\n\t\t\t\tid: {\n\t\t\t\t\tany_: [row.original.id],\n\t\t\t\t},\n\t\t\t},\n\t\t\tsort: \"START_TIME_DESC\",\n\t\t\tlimit: debouncedNumberOfBars || numberOfBars,\n\t\t\toffset: 0,\n\t\t}),\n\t);\n\n\tconst { flow, ...deployment } = row.original;\n\tconst enrichedFlowRuns =\n\t\tflowRuns?.map((flowRun) => ({\n\t\t\t...flowRun,\n\t\t\tdeployment,\n\t\t\tflow,\n\t\t})) ?? [];\n\n\treturn (\n\t\t<div className=\"w-full\" ref={chartRef}>\n\t\t\t<FlowRunActivityBarChart\n\t\t\t\tstartDate={subSeconds(new Date(), secondsInWeek)}\n\t\t\t\tendDate={new Date()}\n\t\t\t\t// If debouncedNumberOfBars is 0, use numberOfBars for an asymmetric debounce to avoid rendering an empty chart on initial paint.\n\t\t\t\tnumberOfBars={debouncedNumberOfBars || numberOfBars}\n\t\t\t\tbarWidth={BAR_WIDTH}\n\t\t\t\tenrichedFlowRuns={enrichedFlowRuns}\n\t\t\t\tclassName=\"h-12 w-full\"\n\t\t\t\tchartId={row.original.id}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n","import { Link } from \"@tanstack/react-router\";\nimport type {\n\tColumnFiltersState,\n\tOnChangeFn,\n\tPaginationState,\n} from \"@tanstack/react-table\";\nimport {\n\tcreateColumnHelper,\n\tgetCoreRowModel,\n\tuseReactTable,\n} from \"@tanstack/react-table\";\nimport { useCallback } from \"react\";\nimport type { DeploymentWithFlow } from \"@/api/deployments\";\nimport type { components } from \"@/api/prefect\";\nimport { useDeleteDeploymentConfirmationDialog } from \"@/components/deployments/use-delete-deployment-confirmation-dialog\";\nimport { FlowIconText } from \"@/components/flows/flow-icon-text\";\nimport { DataTable } from \"@/components/ui/data-table\";\nimport { DeleteConfirmationDialog } from \"@/components/ui/delete-confirmation-dialog\";\nimport { FlowRunActivityBarGraphTooltipProvider } from \"@/components/ui/flow-run-activity-bar-graph\";\nimport { SearchInput } from \"@/components/ui/input\";\nimport { ScheduleBadgeGroup } from \"@/components/ui/schedule-badge\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { StatusBadge } from \"@/components/ui/status-badge\";\nimport { TagBadgeGroup } from \"@/components/ui/tag-badge-group\";\nimport { TagsInput } from \"@/components/ui/tags-input\";\nimport { pluralize } from \"@/utils\";\nimport { ActionsCell, ActivityCell } from \"./cells\";\n\nexport type DeploymentsDataTableProps = {\n\tdeployments: DeploymentWithFlow[];\n\tcurrentDeploymentsCount: number;\n\tpageCount: number;\n\tpagination: PaginationState;\n\tsort: components[\"schemas\"][\"DeploymentSort\"];\n\tcolumnFilters: ColumnFiltersState;\n\tonPaginationChange: (pagination: PaginationState) => void;\n\tonSortChange: (sort: components[\"schemas\"][\"DeploymentSort\"]) => void;\n\tonColumnFiltersChange: (columnFilters: ColumnFiltersState) => void;\n};\n\nconst columnHelper = createColumnHelper<DeploymentWithFlow>();\n\nconst createColumns = ({\n\tonDelete,\n}: {\n\tonDelete: (deployment: DeploymentWithFlow) => void;\n}) => [\n\tcolumnHelper.display({\n\t\tid: \"name\",\n\t\theader: \"Deployment\",\n\t\tcell: ({ row }) => (\n\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t<Link to=\"/deployments/deployment/$id\" params={{ id: row.original.id }}>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName=\"text-sm font-medium truncate\"\n\t\t\t\t\t\ttitle={row.original.name}\n\t\t\t\t\t>\n\t\t\t\t\t\t{row.original.name}\n\t\t\t\t\t</span>\n\t\t\t\t</Link>\n\n\t\t\t\t{row.original.flow && (\n\t\t\t\t\t<FlowIconText\n\t\t\t\t\t\tflow={row.original.flow}\n\t\t\t\t\t\tclassName=\"text-xs text-muted-foreground flex items-center gap-1\"\n\t\t\t\t\t\ticonSize={12}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t),\n\t\tsize: 100,\n\t}),\n\tcolumnHelper.accessor(\"status\", {\n\t\tid: \"status\",\n\t\theader: \"Status\",\n\t\tcell: ({ row }) => {\n\t\t\tconst status = row.original.status;\n\t\t\tif (!status) return null;\n\t\t\treturn (\n\t\t\t\t<div className=\"min-w-28\">\n\t\t\t\t\t<StatusBadge status={status} />\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t\tsize: 50,\n\t}),\n\tcolumnHelper.display({\n\t\tid: \"activity\",\n\t\theader: \"Activity\",\n\t\tcell: (props) => (\n\t\t\t<div className=\"flex flex-row gap-2 items-center min-w-28\">\n\t\t\t\t<ActivityCell {...props} />\n\t\t\t</div>\n\t\t),\n\t\tsize: 300,\n\t}),\n\tcolumnHelper.display({\n\t\tid: \"tags\",\n\t\theader: () => null,\n\t\tcell: ({ row }) => <TagBadgeGroup tags={row.original.tags ?? []} />,\n\t}),\n\tcolumnHelper.display({\n\t\tid: \"schedules\",\n\t\theader: \"Schedules\",\n\t\tcell: ({ row }) => {\n\t\t\tconst schedules = row.original.schedules;\n\t\t\tif (!schedules || schedules.length === 0) return null;\n\t\t\treturn <ScheduleBadgeGroup schedules={schedules} />;\n\t\t},\n\t\tsize: 150,\n\t}),\n\tcolumnHelper.display({\n\t\tid: \"actions\",\n\t\tcell: (props) => <ActionsCell {...props} onDelete={onDelete} />,\n\t}),\n];\n\nexport const DeploymentsDataTable = ({\n\tdeployments,\n\tcurrentDeploymentsCount,\n\tpagination,\n\tpageCount,\n\tsort,\n\tcolumnFilters,\n\tonPaginationChange,\n\tonSortChange,\n\tonColumnFiltersChange,\n}: DeploymentsDataTableProps) => {\n\tconst [deleteConfirmationDialogState, confirmDelete] =\n\t\tuseDeleteDeploymentConfirmationDialog();\n\n\tconst nameSearchValue = (columnFilters.find(\n\t\t(filter) => filter.id === \"flowOrDeploymentName\",\n\t)?.value ?? \"\") as string;\n\tconst tagsSearchValue = (columnFilters.find((filter) => filter.id === \"tags\")\n\t\t?.value ?? []) as string[];\n\n\tconst handleNameSearchChange = useCallback(\n\t\t(value?: string) => {\n\t\t\tconst filters = columnFilters.filter(\n\t\t\t\t(filter) => filter.id !== \"flowOrDeploymentName\",\n\t\t\t);\n\t\t\tonColumnFiltersChange(\n\t\t\t\tvalue ? [...filters, { id: \"flowOrDeploymentName\", value }] : filters,\n\t\t\t);\n\t\t},\n\t\t[onColumnFiltersChange, columnFilters],\n\t);\n\n\tconst handleTagsSearchChange: React.ChangeEventHandler<HTMLInputElement> &\n\t\t((tags: string[]) => void) = useCallback(\n\t\t(e: string[] | React.ChangeEvent<HTMLInputElement>) => {\n\t\t\tconst tags = Array.isArray(e) ? e : e.target.value;\n\t\t\tconst filters = columnFilters.filter((filter) => filter.id !== \"tags\");\n\t\t\tonColumnFiltersChange(\n\t\t\t\ttags.length ? [...filters, { id: \"tags\", value: tags }] : filters,\n\t\t\t);\n\t\t},\n\t\t[onColumnFiltersChange, columnFilters],\n\t);\n\n\tconst handlePaginationChange: OnChangeFn<PaginationState> = useCallback(\n\t\t(updater) => {\n\t\t\tlet newPagination = pagination;\n\t\t\tif (typeof updater === \"function\") {\n\t\t\t\tnewPagination = updater(pagination);\n\t\t\t} else {\n\t\t\t\tnewPagination = updater;\n\t\t\t}\n\t\t\tonPaginationChange(newPagination);\n\t\t},\n\t\t[pagination, onPaginationChange],\n\t);\n\n\tconst table = useReactTable({\n\t\tdata: deployments,\n\t\tcolumns: createColumns({\n\t\t\tonDelete: (deployment) => {\n\t\t\t\tconst name = deployment.flow?.name\n\t\t\t\t\t? `${deployment.flow?.name}/${deployment.name}`\n\t\t\t\t\t: deployment.name;\n\t\t\t\tconfirmDelete({ ...deployment, name });\n\t\t\t},\n\t\t}),\n\t\tgetCoreRowModel: getCoreRowModel(),\n\t\tpageCount,\n\t\tmanualPagination: true,\n\t\tdefaultColumn: {\n\t\t\tmaxSize: 300,\n\t\t},\n\t\tstate: {\n\t\t\tpagination,\n\t\t},\n\t\tonPaginationChange: handlePaginationChange,\n\t});\n\treturn (\n\t\t<div>\n\t\t\t<div className=\"grid sm:grid-cols-2 md:grid-cols-6 lg:grid-cols-12 gap-2 pb-4 items-center\">\n\t\t\t\t<div className=\"sm:col-span-2 md:col-span-6 lg:col-span-4 order-last lg:order-first\">\n\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t{currentDeploymentsCount}{\" \"}\n\t\t\t\t\t\t{pluralize(currentDeploymentsCount, \"Deployment\")}\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"sm:col-span-2 md:col-span-2 lg:col-span-3\">\n\t\t\t\t\t<SearchInput\n\t\t\t\t\t\tplaceholder=\"Search deployments\"\n\t\t\t\t\t\tvalue={nameSearchValue}\n\t\t\t\t\t\tonChange={(e) => handleNameSearchChange(e.target.value)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"xs:col-span-1 md:col-span-2 lg:col-span-3\">\n\t\t\t\t\t<TagsInput\n\t\t\t\t\t\tplaceholder=\"Filter by tags\"\n\t\t\t\t\t\tonChange={handleTagsSearchChange}\n\t\t\t\t\t\tvalue={tagsSearchValue}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"xs:col-span-1 md:col-span-2 lg:col-span-2\">\n\t\t\t\t\t<Select value={sort} onValueChange={onSortChange}>\n\t\t\t\t\t\t<SelectTrigger\n\t\t\t\t\t\t\taria-label=\"Deployment sort order\"\n\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SelectValue placeholder=\"Sort by\" />\n\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t<SelectItem value=\"CREATED_DESC\">Created</SelectItem>\n\t\t\t\t\t\t\t<SelectItem value=\"UPDATED_DESC\">Updated</SelectItem>\n\t\t\t\t\t\t\t<SelectItem value=\"NAME_ASC\">A to Z</SelectItem>\n\t\t\t\t\t\t\t<SelectItem value=\"NAME_DESC\">Z to A</SelectItem>\n\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t</Select>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<DeleteConfirmationDialog {...deleteConfirmationDialogState} />\n\t\t\t<FlowRunActivityBarGraphTooltipProvider>\n\t\t\t\t<DataTable table={table} />\n\t\t\t</FlowRunActivityBarGraphTooltipProvider>\n\t\t</div>\n\t);\n};\n"],"names":["ActionsCell","row","onDelete","id","parameters","onQuickRun","isPending","useQuickRun","jsx","DropdownMenu","DropdownMenuTrigger","jsxs","Button","Icon","DropdownMenuContent","DropdownMenuLabel","DropdownMenuItem","Link","toast","BAR_WIDTH","BAR_GAP","ActivityCell","numberOfBars","setNumberOfBars","useState","debouncedNumberOfBars","useDebounce","chartRef","useCallback","node","updateBars","chartWidth","resizeObserver","flowRuns","useQuery","buildFilterFlowRunsQuery","flow","deployment","enrichedFlowRuns","flowRun","FlowRunActivityBarChart","subSeconds","secondsInWeek","columnHelper","createColumnHelper","createColumns","FlowIconText","status","StatusBadge","props","TagBadgeGroup","schedules","ScheduleBadgeGroup","DeploymentsDataTable","deployments","currentDeploymentsCount","pagination","pageCount","sort","columnFilters","onPaginationChange","onSortChange","onColumnFiltersChange","deleteConfirmationDialogState","confirmDelete","useDeleteDeploymentConfirmationDialog","nameSearchValue","filter","tagsSearchValue","handleNameSearchChange","value","filters","handleTagsSearchChange","e","tags","handlePaginationChange","updater","newPagination","table","useReactTable","name","getCoreRowModel","pluralize","SearchInput","TagsInput","Select","SelectTrigger","SelectValue","SelectContent","SelectItem","DeleteConfirmationDialog","FlowRunActivityBarGraphTooltipProvider","DataTable"],"mappings":"kpBA0BO,MAAMA,GAAc,CAAC,CAAE,IAAAC,EAAK,SAAAC,KAAiC,CACnE,KAAM,CAAE,GAAAC,EAAI,WAAAC,CAAA,EAAeH,EAAI,SACzB,CAAE,WAAAI,EAAY,UAAAC,CAAA,EAAcC,EAAA,EAElC,OAAKJ,EAGJK,EAAAA,IAAC,MAAA,CAAI,UAAU,4BACd,gBAACC,GAAA,CACA,SAAA,CAAAD,EAAAA,IAACE,GAAA,CAAoB,QAAO,GAC3B,SAAAC,EAAAA,KAACC,GAAO,QAAQ,UAAU,UAAU,aACnC,SAAA,CAAAJ,EAAAA,IAAC,OAAA,CAAK,UAAU,UAAU,SAAA,YAAS,EACnCA,EAAAA,IAACK,EAAA,CAAK,GAAG,eAAe,UAAU,QAAA,CAAS,CAAA,CAAA,CAC5C,CAAA,CACD,EACAF,EAAAA,KAACG,GAAA,CAAoB,MAAM,MAC1B,SAAA,CAAAN,EAAAA,IAACO,IAAkB,SAAA,SAAA,CAAO,EAC1BP,EAAAA,IAACQ,GAAiB,SAAUV,EAAW,QAAS,IAAMD,EAAWF,CAAE,EAAG,SAAA,WAAA,CAEtE,QACCa,EAAA,CACA,SAAAR,EAAAA,IAACS,EAAA,CACA,GAAG,kCACH,OAAQ,CAAE,GAAAd,CAAA,EACV,OAAQ,CAAE,WAAAC,CAAA,EACV,SAAA,YAAA,CAAA,EAGF,EAEAI,EAAAA,IAACQ,EAAA,CACA,QAAS,IAAM,CACT,UAAU,UAAU,UAAUb,CAAE,EACrCe,EAAM,QAAQ,WAAW,CAC1B,EACA,SAAA,SAAA,CAAA,EAGDV,EAAAA,IAACQ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ACZ,SAAUZ,EACV,MAAOJ,CAAA,CAAA,EAET,EACA5D,EAAAA,IAAC,OAAI,UAAU,4CACd,gBAAC6E,EAAA,CAAO,MAAO3B,EAAM,cAAeG,EACnC,SAAA,CAAArD,EAAAA,IAAC8E,EAAA,CACA,aAAW,wBACX,UAAU,SAEV,SAAA9E,EAAAA,IAAC+E,EAAA,CAAY,YAAY,SAAA,CAAU,CAAA,CAAA,SAEnCC,EAAA,CACA,SAAA,CAAAhF,EAAAA,IAACiF,EAAA,CAAW,MAAM,eAAe,SAAA,UAAO,EACxCjF,EAAAA,IAACiF,EAAA,CAAW,MAAM,eAAe,SAAA,UAAO,EACxCjF,EAAAA,IAACiF,EAAA,CAAW,MAAM,WAAW,SAAA,SAAM,EACnCjF,EAAAA,IAACiF,EAAA,CAAW,MAAM,YAAY,SAAA,QAAA,CAAM,CAAA,CAAA,CACrC,CAAA,CAAA,CACD,CAAA,CACD,CAAA,EACD,EAEAjF,EAAAA,IAACkF,EAAA,CAA0B,GAAG3B,EAA+B,EAC7DvD,EAAAA,IAACmF,EAAA,CACA,SAAAnF,EAAAA,IAACoF,EAAA,CAAU,MAAAd,EAAc,CAAA,CAC1B,CAAA,EACD,CAEF"}
|
|
1
|
+
{"version":3,"file":"index-CE-bVgqj.js","sources":["../../src/components/deployments/data-table/cells.tsx","../../src/components/deployments/data-table/index.tsx"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport { Link } from \"@tanstack/react-router\";\nimport type { CellContext } from \"@tanstack/react-table\";\nimport { subSeconds } from \"date-fns\";\nimport { secondsInWeek } from \"date-fns/constants\";\nimport { useCallback, useState } from \"react\";\nimport { toast } from \"sonner\";\nimport type { DeploymentWithFlow } from \"@/api/deployments\";\nimport { buildFilterFlowRunsQuery } from \"@/api/flow-runs\";\nimport { useQuickRun } from \"@/components/deployments/use-quick-run\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { FlowRunActivityBarChart } from \"@/components/ui/flow-run-activity-bar-graph\";\nimport { Icon } from \"@/components/ui/icons\";\nimport useDebounce from \"@/hooks/use-debounce\";\n\ntype ActionsCellProps = CellContext<DeploymentWithFlow, unknown> & {\n\tonDelete: (deployment: DeploymentWithFlow) => void;\n};\n\nexport const ActionsCell = ({ row, onDelete }: ActionsCellProps) => {\n\tconst { id, parameters } = row.original;\n\tconst { onQuickRun, isPending } = useQuickRun();\n\n\tif (!id) return null;\n\n\treturn (\n\t\t<div className=\"flex flex-row justify-end\">\n\t\t\t<DropdownMenu>\n\t\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t\t<Button variant=\"outline\" className=\"size-8 p-0\">\n\t\t\t\t\t\t<span className=\"sr-only\">Open menu</span>\n\t\t\t\t\t\t<Icon id=\"MoreVertical\" className=\"size-4\" />\n\t\t\t\t\t</Button>\n\t\t\t\t</DropdownMenuTrigger>\n\t\t\t\t<DropdownMenuContent align=\"end\">\n\t\t\t\t\t<DropdownMenuLabel>Actions</DropdownMenuLabel>\n\t\t\t\t\t<DropdownMenuItem disabled={isPending} onClick={() => onQuickRun(id)}>\n\t\t\t\t\t\tQuick Run\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t<DropdownMenuItem>\n\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\tto=\"/deployments/deployment/$id/run\"\n\t\t\t\t\t\t\tparams={{ id }}\n\t\t\t\t\t\t\tsearch={{ parameters }}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tCustom Run\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t</DropdownMenuItem>\n\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tvoid navigator.clipboard.writeText(id);\n\t\t\t\t\t\t\ttoast.success(\"ID copied\");\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tCopy ID\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t<DropdownMenuItem>\n\t\t\t\t\t\t<Link to=\"/deployments/deployment/$id/edit\" params={{ id }}>\n\t\t\t\t\t\t\tEdit\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t<DropdownMenuItem onClick={() => onDelete(row.original)}>\n\t\t\t\t\t\tDelete\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t<DropdownMenuItem>\n\t\t\t\t\t\t<Link to=\"/deployments/deployment/$id/duplicate\" params={{ id }}>\n\t\t\t\t\t\t\tDuplicate\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t</DropdownMenuContent>\n\t\t\t</DropdownMenu>\n\t\t</div>\n\t);\n};\n\nconst BAR_WIDTH = 8;\nconst BAR_GAP = 4;\n\nexport const ActivityCell = ({\n\trow,\n}: CellContext<DeploymentWithFlow, unknown>) => {\n\tconst [numberOfBars, setNumberOfBars] = useState<number>(0);\n\tconst debouncedNumberOfBars = useDebounce(numberOfBars, 150);\n\n\tconst chartRef = useCallback((node: HTMLDivElement | null) => {\n\t\tif (!node) return;\n\n\t\tconst updateBars = () => {\n\t\t\tconst chartWidth = node.getBoundingClientRect().width;\n\t\t\tsetNumberOfBars(Math.floor(chartWidth / (BAR_WIDTH + BAR_GAP)));\n\t\t};\n\n\t\t// Set the initial number of bars based on the chart width\n\t\tupdateBars();\n\n\t\t// Observe the chart for resize events\n\t\tconst resizeObserver = new ResizeObserver(updateBars);\n\t\tresizeObserver.observe(node);\n\t\treturn () => {\n\t\t\t// Clean up the observer\n\t\t\tresizeObserver.disconnect();\n\t\t};\n\t}, []);\n\n\tconst { data: flowRuns } = useQuery(\n\t\tbuildFilterFlowRunsQuery({\n\t\t\tdeployments: {\n\t\t\t\toperator: \"and_\",\n\t\t\t\tid: {\n\t\t\t\t\tany_: [row.original.id],\n\t\t\t\t},\n\t\t\t},\n\t\t\tsort: \"START_TIME_DESC\",\n\t\t\tlimit: debouncedNumberOfBars || numberOfBars,\n\t\t\toffset: 0,\n\t\t}),\n\t);\n\n\tconst { flow, ...deployment } = row.original;\n\tconst enrichedFlowRuns =\n\t\tflowRuns?.map((flowRun) => ({\n\t\t\t...flowRun,\n\t\t\tdeployment,\n\t\t\tflow,\n\t\t})) ?? [];\n\n\treturn (\n\t\t<div className=\"w-full\" ref={chartRef}>\n\t\t\t<FlowRunActivityBarChart\n\t\t\t\tstartDate={subSeconds(new Date(), secondsInWeek)}\n\t\t\t\tendDate={new Date()}\n\t\t\t\t// If debouncedNumberOfBars is 0, use numberOfBars for an asymmetric debounce to avoid rendering an empty chart on initial paint.\n\t\t\t\tnumberOfBars={debouncedNumberOfBars || numberOfBars}\n\t\t\t\tbarWidth={BAR_WIDTH}\n\t\t\t\tenrichedFlowRuns={enrichedFlowRuns}\n\t\t\t\tclassName=\"h-12 w-full\"\n\t\t\t\tchartId={row.original.id}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n","import { Link } from \"@tanstack/react-router\";\nimport type {\n\tColumnFiltersState,\n\tOnChangeFn,\n\tPaginationState,\n} from \"@tanstack/react-table\";\nimport {\n\tcreateColumnHelper,\n\tgetCoreRowModel,\n\tuseReactTable,\n} from \"@tanstack/react-table\";\nimport { useCallback } from \"react\";\nimport type { DeploymentWithFlow } from \"@/api/deployments\";\nimport type { components } from \"@/api/prefect\";\nimport { useDeleteDeploymentConfirmationDialog } from \"@/components/deployments/use-delete-deployment-confirmation-dialog\";\nimport { FlowIconText } from \"@/components/flows/flow-icon-text\";\nimport { DataTable } from \"@/components/ui/data-table\";\nimport { DeleteConfirmationDialog } from \"@/components/ui/delete-confirmation-dialog\";\nimport { FlowRunActivityBarGraphTooltipProvider } from \"@/components/ui/flow-run-activity-bar-graph\";\nimport { SearchInput } from \"@/components/ui/input\";\nimport { ScheduleBadgeGroup } from \"@/components/ui/schedule-badge\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { StatusBadge } from \"@/components/ui/status-badge\";\nimport { TagBadgeGroup } from \"@/components/ui/tag-badge-group\";\nimport { TagsInput } from \"@/components/ui/tags-input\";\nimport { pluralize } from \"@/utils\";\nimport { ActionsCell, ActivityCell } from \"./cells\";\n\nexport type DeploymentsDataTableProps = {\n\tdeployments: DeploymentWithFlow[];\n\tcurrentDeploymentsCount: number;\n\tpageCount: number;\n\tpagination: PaginationState;\n\tsort: components[\"schemas\"][\"DeploymentSort\"];\n\tcolumnFilters: ColumnFiltersState;\n\tonPaginationChange: (pagination: PaginationState) => void;\n\tonSortChange: (sort: components[\"schemas\"][\"DeploymentSort\"]) => void;\n\tonColumnFiltersChange: (columnFilters: ColumnFiltersState) => void;\n};\n\nconst columnHelper = createColumnHelper<DeploymentWithFlow>();\n\nconst createColumns = ({\n\tonDelete,\n}: {\n\tonDelete: (deployment: DeploymentWithFlow) => void;\n}) => [\n\tcolumnHelper.display({\n\t\tid: \"name\",\n\t\theader: \"Deployment\",\n\t\tcell: ({ row }) => (\n\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t<Link to=\"/deployments/deployment/$id\" params={{ id: row.original.id }}>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName=\"text-sm font-medium truncate\"\n\t\t\t\t\t\ttitle={row.original.name}\n\t\t\t\t\t>\n\t\t\t\t\t\t{row.original.name}\n\t\t\t\t\t</span>\n\t\t\t\t</Link>\n\n\t\t\t\t{row.original.flow && (\n\t\t\t\t\t<FlowIconText\n\t\t\t\t\t\tflow={row.original.flow}\n\t\t\t\t\t\tclassName=\"text-xs text-muted-foreground flex items-center gap-1\"\n\t\t\t\t\t\ticonSize={12}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t),\n\t\tsize: 100,\n\t}),\n\tcolumnHelper.accessor(\"status\", {\n\t\tid: \"status\",\n\t\theader: \"Status\",\n\t\tcell: ({ row }) => {\n\t\t\tconst status = row.original.status;\n\t\t\tif (!status) return null;\n\t\t\treturn (\n\t\t\t\t<div className=\"min-w-28\">\n\t\t\t\t\t<StatusBadge status={status} />\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t\tsize: 50,\n\t}),\n\tcolumnHelper.display({\n\t\tid: \"activity\",\n\t\theader: \"Activity\",\n\t\tcell: (props) => (\n\t\t\t<div className=\"flex flex-row gap-2 items-center min-w-28\">\n\t\t\t\t<ActivityCell {...props} />\n\t\t\t</div>\n\t\t),\n\t\tsize: 300,\n\t}),\n\tcolumnHelper.display({\n\t\tid: \"tags\",\n\t\theader: () => null,\n\t\tcell: ({ row }) => <TagBadgeGroup tags={row.original.tags ?? []} />,\n\t}),\n\tcolumnHelper.display({\n\t\tid: \"schedules\",\n\t\theader: \"Schedules\",\n\t\tcell: ({ row }) => {\n\t\t\tconst schedules = row.original.schedules;\n\t\t\tif (!schedules || schedules.length === 0) return null;\n\t\t\treturn <ScheduleBadgeGroup schedules={schedules} />;\n\t\t},\n\t\tsize: 150,\n\t}),\n\tcolumnHelper.display({\n\t\tid: \"actions\",\n\t\tcell: (props) => <ActionsCell {...props} onDelete={onDelete} />,\n\t}),\n];\n\nexport const DeploymentsDataTable = ({\n\tdeployments,\n\tcurrentDeploymentsCount,\n\tpagination,\n\tpageCount,\n\tsort,\n\tcolumnFilters,\n\tonPaginationChange,\n\tonSortChange,\n\tonColumnFiltersChange,\n}: DeploymentsDataTableProps) => {\n\tconst [deleteConfirmationDialogState, confirmDelete] =\n\t\tuseDeleteDeploymentConfirmationDialog();\n\n\tconst nameSearchValue = (columnFilters.find(\n\t\t(filter) => filter.id === \"flowOrDeploymentName\",\n\t)?.value ?? \"\") as string;\n\tconst tagsSearchValue = (columnFilters.find((filter) => filter.id === \"tags\")\n\t\t?.value ?? []) as string[];\n\n\tconst handleNameSearchChange = useCallback(\n\t\t(value?: string) => {\n\t\t\tconst filters = columnFilters.filter(\n\t\t\t\t(filter) => filter.id !== \"flowOrDeploymentName\",\n\t\t\t);\n\t\t\tonColumnFiltersChange(\n\t\t\t\tvalue ? [...filters, { id: \"flowOrDeploymentName\", value }] : filters,\n\t\t\t);\n\t\t},\n\t\t[onColumnFiltersChange, columnFilters],\n\t);\n\n\tconst handleTagsSearchChange: React.ChangeEventHandler<HTMLInputElement> &\n\t\t((tags: string[]) => void) = useCallback(\n\t\t(e: string[] | React.ChangeEvent<HTMLInputElement>) => {\n\t\t\tconst tags = Array.isArray(e) ? e : e.target.value;\n\t\t\tconst filters = columnFilters.filter((filter) => filter.id !== \"tags\");\n\t\t\tonColumnFiltersChange(\n\t\t\t\ttags.length ? [...filters, { id: \"tags\", value: tags }] : filters,\n\t\t\t);\n\t\t},\n\t\t[onColumnFiltersChange, columnFilters],\n\t);\n\n\tconst handlePaginationChange: OnChangeFn<PaginationState> = useCallback(\n\t\t(updater) => {\n\t\t\tlet newPagination = pagination;\n\t\t\tif (typeof updater === \"function\") {\n\t\t\t\tnewPagination = updater(pagination);\n\t\t\t} else {\n\t\t\t\tnewPagination = updater;\n\t\t\t}\n\t\t\tonPaginationChange(newPagination);\n\t\t},\n\t\t[pagination, onPaginationChange],\n\t);\n\n\tconst table = useReactTable({\n\t\tdata: deployments,\n\t\tcolumns: createColumns({\n\t\t\tonDelete: (deployment) => {\n\t\t\t\tconst name = deployment.flow?.name\n\t\t\t\t\t? `${deployment.flow?.name}/${deployment.name}`\n\t\t\t\t\t: deployment.name;\n\t\t\t\tconfirmDelete({ ...deployment, name });\n\t\t\t},\n\t\t}),\n\t\tgetCoreRowModel: getCoreRowModel(),\n\t\tpageCount,\n\t\tmanualPagination: true,\n\t\tdefaultColumn: {\n\t\t\tmaxSize: 300,\n\t\t},\n\t\tstate: {\n\t\t\tpagination,\n\t\t},\n\t\tonPaginationChange: handlePaginationChange,\n\t});\n\treturn (\n\t\t<div>\n\t\t\t<div className=\"grid sm:grid-cols-2 md:grid-cols-6 lg:grid-cols-12 gap-2 pb-4 items-center\">\n\t\t\t\t<div className=\"sm:col-span-2 md:col-span-6 lg:col-span-4 order-last lg:order-first\">\n\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t{currentDeploymentsCount}{\" \"}\n\t\t\t\t\t\t{pluralize(currentDeploymentsCount, \"Deployment\")}\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"sm:col-span-2 md:col-span-2 lg:col-span-3\">\n\t\t\t\t\t<SearchInput\n\t\t\t\t\t\tplaceholder=\"Search deployments\"\n\t\t\t\t\t\tvalue={nameSearchValue}\n\t\t\t\t\t\tonChange={(e) => handleNameSearchChange(e.target.value)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"xs:col-span-1 md:col-span-2 lg:col-span-3\">\n\t\t\t\t\t<TagsInput\n\t\t\t\t\t\tplaceholder=\"Filter by tags\"\n\t\t\t\t\t\tonChange={handleTagsSearchChange}\n\t\t\t\t\t\tvalue={tagsSearchValue}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"xs:col-span-1 md:col-span-2 lg:col-span-2\">\n\t\t\t\t\t<Select value={sort} onValueChange={onSortChange}>\n\t\t\t\t\t\t<SelectTrigger\n\t\t\t\t\t\t\taria-label=\"Deployment sort order\"\n\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SelectValue placeholder=\"Sort by\" />\n\t\t\t\t\t\t</SelectTrigger>\n\t\t\t\t\t\t<SelectContent>\n\t\t\t\t\t\t\t<SelectItem value=\"CREATED_DESC\">Created</SelectItem>\n\t\t\t\t\t\t\t<SelectItem value=\"UPDATED_DESC\">Updated</SelectItem>\n\t\t\t\t\t\t\t<SelectItem value=\"NAME_ASC\">A to Z</SelectItem>\n\t\t\t\t\t\t\t<SelectItem value=\"NAME_DESC\">Z to A</SelectItem>\n\t\t\t\t\t\t</SelectContent>\n\t\t\t\t\t</Select>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<DeleteConfirmationDialog {...deleteConfirmationDialogState} />\n\t\t\t<FlowRunActivityBarGraphTooltipProvider>\n\t\t\t\t<DataTable table={table} />\n\t\t\t</FlowRunActivityBarGraphTooltipProvider>\n\t\t</div>\n\t);\n};\n"],"names":["ActionsCell","row","onDelete","id","parameters","onQuickRun","isPending","useQuickRun","jsx","DropdownMenu","DropdownMenuTrigger","jsxs","Button","Icon","DropdownMenuContent","DropdownMenuLabel","DropdownMenuItem","Link","toast","BAR_WIDTH","BAR_GAP","ActivityCell","numberOfBars","setNumberOfBars","useState","debouncedNumberOfBars","useDebounce","chartRef","useCallback","node","updateBars","chartWidth","resizeObserver","flowRuns","useQuery","buildFilterFlowRunsQuery","flow","deployment","enrichedFlowRuns","flowRun","FlowRunActivityBarChart","subSeconds","secondsInWeek","columnHelper","createColumnHelper","createColumns","FlowIconText","status","StatusBadge","props","TagBadgeGroup","schedules","ScheduleBadgeGroup","DeploymentsDataTable","deployments","currentDeploymentsCount","pagination","pageCount","sort","columnFilters","onPaginationChange","onSortChange","onColumnFiltersChange","deleteConfirmationDialogState","confirmDelete","useDeleteDeploymentConfirmationDialog","nameSearchValue","filter","tagsSearchValue","handleNameSearchChange","value","filters","handleTagsSearchChange","e","tags","handlePaginationChange","updater","newPagination","table","useReactTable","name","getCoreRowModel","pluralize","SearchInput","TagsInput","Select","SelectTrigger","SelectValue","SelectContent","SelectItem","DeleteConfirmationDialog","FlowRunActivityBarGraphTooltipProvider","DataTable"],"mappings":"6oBA0BO,MAAMA,GAAc,CAAC,CAAE,IAAAC,EAAK,SAAAC,KAAiC,CACnE,KAAM,CAAE,GAAAC,EAAI,WAAAC,CAAA,EAAeH,EAAI,SACzB,CAAE,WAAAI,EAAY,UAAAC,CAAA,EAAcC,EAAA,EAElC,OAAKJ,EAGJK,EAAAA,IAAC,MAAA,CAAI,UAAU,4BACd,gBAACC,GAAA,CACA,SAAA,CAAAD,EAAAA,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