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 @@
|
|
|
1
|
+
{"version":3,"file":"flow-run-graph-CycKStSg.js","sources":["../../src/components/flow-runs/flow-run-graph/api.ts","../../src/components/flow-runs/flow-run-graph/consts.ts","../../src/components/flow-runs/flow-run-graph/utilities.ts","../../src/components/flow-runs/flow-run-graph/flow-run-graph-center-button.tsx","../../src/components/flow-runs/flow-run-graph/flow-run-graph-fullscreen-button.tsx","../../src/components/flow-runs/flow-run-graph/flow-run-graph-settings.tsx","../../src/components/flow-runs/flow-run-graph/flow-run-graph-settings-button.tsx","../../src/components/flow-runs/flow-run-graph/flow-run-graph-actions.tsx","../../src/components/flow-runs/flow-run-graph/flow-run-graph-artifact-drawer.tsx","../../src/components/flow-runs/flow-run-graph/flow-run-graph-artifacts-popover.tsx","../../src/components/flow-runs/flow-run-graph/flow-run-graph-event-popover.tsx","../../src/components/flow-runs/flow-run-graph/flow-run-graph-events-popover.tsx","../../src/components/flow-runs/flow-run-graph/flow-run-graph-selection-panel.tsx","../../src/components/flow-runs/flow-run-graph/flow-run-graph-state-popover.tsx","../../src/components/flow-runs/flow-run-graph/flow-run-graph.tsx"],"sourcesContent":["import type {\n\tEventRelatedResource,\n\tRunGraphArtifact,\n\tRunGraphData,\n\tRunGraphEvent,\n\tRunGraphEventResource,\n\tRunGraphFetchEventsContext,\n\tRunGraphNode,\n\tRunGraphStateEvent,\n} from \"@prefecthq/graphs\";\nimport { parseISO } from \"date-fns\";\nimport type { components } from \"@/api/prefect\";\nimport { getQueryService } from \"@/api/service\";\n\n/**\n * Fetches the graph data for a flow run.\n * @param id - The ID of the flow run.\n * @returns The graph data for the flow run.\n */\nexport async function fetchFlowRunGraph(id: string): Promise<RunGraphData> {\n\tconst { data } = await (await getQueryService()).GET(\n\t\t\"/flow_runs/{id}/graph-v2\",\n\t\t{\n\t\t\tparams: { path: { id } },\n\t\t},\n\t);\n\n\tif (!data) {\n\t\tthrow new Error(\"No data returned from API\");\n\t}\n\n\treturn mapApiResponseToRunGraphData(data);\n}\n\n/**\n * Fetches events for a flow run.\n * @param since - The start date of the events to fetch.\n * @param until - The end date of the events to fetch.\n * @param nodeId - The flowRunId of the node to fetch events for.\n * @returns The events for the flow run.\n */\nexport async function fetchFlowRunEvents({\n\tsince,\n\tuntil,\n\tnodeId,\n}: RunGraphFetchEventsContext): Promise<RunGraphEvent[]> {\n\tconst { data } = await (await getQueryService()).POST(\"/events/filter\", {\n\t\tbody: {\n\t\t\tfilter: {\n\t\t\t\tany_resource: {\n\t\t\t\t\tid: [`prefect.flow-run.${nodeId}`],\n\t\t\t\t},\n\t\t\t\tevent: {\n\t\t\t\t\texclude_prefix: [\"prefect.log.write\", \"prefect.task-run.\"],\n\t\t\t\t},\n\t\t\t\toccurred: {\n\t\t\t\t\tsince: since.toISOString(),\n\t\t\t\t\tuntil: until.toISOString(),\n\t\t\t\t},\n\t\t\t\torder: \"ASC\",\n\t\t\t},\n\t\t\tlimit: 50,\n\t\t},\n\t});\n\n\tif (!data) {\n\t\tthrow new Error(\"No data returned from API\");\n\t}\n\n\treturn mapApiResponseToRunGraphEvents(data);\n}\n\ntype GraphResponse = components[\"schemas\"][\"Graph\"];\ntype GraphResponseNode = GraphResponse[\"nodes\"][number];\ntype GraphResponseArtifact = GraphResponse[\"artifacts\"][number];\ntype GraphResponseState = NonNullable<GraphResponse[\"states\"]>[number];\ntype EventsResponse = components[\"schemas\"][\"EventPage\"];\n\nfunction mapApiResponseToRunGraphData(response: GraphResponse): RunGraphData {\n\tif (!response.start_time) {\n\t\tthrow new Error(\"Start time is required\");\n\t}\n\n\treturn {\n\t\troot_node_ids: response.root_node_ids,\n\t\tstart_time: parseISO(response.start_time),\n\t\tend_time: response.end_time ? parseISO(response.end_time) : null,\n\t\tnodes: new Map(response.nodes.map((node) => mapNode(node))),\n\t\tstates: response.states?.map(mapState) ?? [],\n\t};\n}\n\nexport function mapApiResponseToRunGraphEvents(\n\tresponse: EventsResponse,\n): RunGraphEvent[] {\n\treturn response.events.map((event) => {\n\t\tif (!event.received) {\n\t\t\tthrow new Error(\"Received is required\");\n\t\t}\n\n\t\tconst runGraphEvent: RunGraphEvent = {\n\t\t\tid: event.id,\n\t\t\treceived: parseISO(event.received),\n\t\t\toccurred: parseISO(event.occurred),\n\t\t\tevent: event.event,\n\t\t\tresource: event.resource as RunGraphEventResource,\n\t\t\tpayload: event.payload,\n\t\t\trelated: (event.related ?? []) as EventRelatedResource[],\n\t\t};\n\n\t\treturn runGraphEvent;\n\t});\n}\n\nfunction mapNode([id, node]: GraphResponseNode): [string, RunGraphNode] {\n\tif (!node.start_time) {\n\t\tthrow new Error(\"Start time is required\");\n\t}\n\n\treturn [\n\t\tid,\n\t\t{\n\t\t\tkind: node.kind,\n\t\t\tid: node.id,\n\t\t\tlabel: node.label,\n\t\t\tstate_type: node.state_type,\n\t\t\tstart_time: parseISO(node.start_time),\n\t\t\tend_time: node.end_time ? parseISO(node.end_time) : null,\n\t\t\tparents: node.parents,\n\t\t\tchildren: node.children,\n\t\t\tartifacts: node.artifacts.map(mapArtifact),\n\t\t},\n\t];\n}\n\nfunction mapState(state: GraphResponseState): RunGraphStateEvent {\n\treturn {\n\t\tid: state.id,\n\t\ttimestamp: parseISO(state.timestamp),\n\t\ttype: state.type,\n\t\tname: state.name,\n\t};\n}\n\nfunction mapArtifact(artifact: GraphResponseArtifact): RunGraphArtifact {\n\tif (!artifact.type) {\n\t\tthrow new Error(\"Artifact type is required\");\n\t}\n\n\tif (artifact.type === \"progress\" && typeof artifact.data === \"number\") {\n\t\treturn {\n\t\t\tid: artifact.id,\n\t\t\tcreated: parseISO(artifact.created),\n\t\t\tkey: artifact.key ?? undefined,\n\t\t\ttype: artifact.type,\n\t\t\tdata: artifact.data,\n\t\t};\n\t}\n\n\treturn {\n\t\tid: artifact.id,\n\t\tcreated: parseISO(artifact.created),\n\t\tkey: artifact.key ?? undefined,\n\t\ttype: artifact.type as Exclude<RunGraphArtifact[\"type\"], \"progress\">,\n\t};\n}\n","import type { StateType } from \"@prefecthq/graphs\";\n\n/**\n * Shade values for each state type, used with getStateColor().\n * Different states use different shades for visual distinction.\n * See: ui-v2/src/index.css for the CSS variable definitions.\n */\nexport const stateTypeShades: Record<StateType, number> = {\n\tCOMPLETED: 600,\n\tRUNNING: 700,\n\tSCHEDULED: 700,\n\tPENDING: 800,\n\tFAILED: 700,\n\tCANCELLED: 600,\n\tCANCELLING: 600,\n\tCRASHED: 600,\n\tPAUSED: 800,\n};\n","export function isEventTargetInput(target: EventTarget | null): boolean {\n\tif (!target || !(target instanceof HTMLElement)) {\n\t\treturn false;\n\t}\n\treturn [\"INPUT\", \"TEXTAREA\", \"SELECT\"].includes(target.tagName);\n}\n","import { centerViewport } from \"@prefecthq/graphs\";\nimport { useEffect } from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport { Icon } from \"@/components/ui/icons/icon\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { isEventTargetInput } from \"./utilities\";\n\nconst center = () => {\n\tvoid centerViewport({ animate: true });\n};\n\nexport function FlowRunGraphCenterButton() {\n\tuseEffect(() => {\n\t\tconst controller = new AbortController();\n\n\t\tdocument.addEventListener(\n\t\t\t\"keydown\",\n\t\t\t(event: KeyboardEvent) => {\n\t\t\t\tif (\n\t\t\t\t\tisEventTargetInput(event.target) ||\n\t\t\t\t\tevent.metaKey ||\n\t\t\t\t\tevent.ctrlKey\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (event.key === \"c\") {\n\t\t\t\t\tcenter();\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ signal: controller.signal },\n\t\t);\n\n\t\treturn () => controller.abort();\n\t}, []);\n\n\treturn (\n\t\t<Tooltip>\n\t\t\t<TooltipTrigger asChild>\n\t\t\t\t<Button variant=\"ghost\" size=\"icon\" onClick={center}>\n\t\t\t\t\t<Icon id=\"Crosshair\" className=\"size-4\" />\n\t\t\t\t</Button>\n\t\t\t</TooltipTrigger>\n\t\t\t<TooltipContent>Recenter (c)</TooltipContent>\n\t\t</Tooltip>\n\t);\n}\n","import { useCallback, useEffect } from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport { Icon } from \"@/components/ui/icons/icon\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { isEventTargetInput } from \"./utilities\";\n\ntype FlowRunGraphFullscreenButtonProps = {\n\tfullscreen: boolean;\n\tonFullscreenChange: (fullscreen: boolean) => void;\n};\n\nexport function FlowRunGraphFullscreenButton({\n\tfullscreen,\n\tonFullscreenChange,\n}: FlowRunGraphFullscreenButtonProps) {\n\tconst toggleFullscreen = useCallback(() => {\n\t\tonFullscreenChange(!fullscreen);\n\t}, [fullscreen, onFullscreenChange]);\n\n\tuseEffect(() => {\n\t\tconst controller = new AbortController();\n\n\t\tdocument.addEventListener(\n\t\t\t\"keydown\",\n\t\t\t(event: KeyboardEvent) => {\n\t\t\t\tif (\n\t\t\t\t\tisEventTargetInput(event.target) ||\n\t\t\t\t\tevent.metaKey ||\n\t\t\t\t\tevent.ctrlKey\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (event.key === \"f\") {\n\t\t\t\t\ttoggleFullscreen();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (event.key === \"Escape\") {\n\t\t\t\t\ttoggleFullscreen();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ signal: controller.signal },\n\t\t);\n\n\t\treturn () => controller.abort();\n\t}, [toggleFullscreen]);\n\n\treturn (\n\t\t<Tooltip>\n\t\t\t<TooltipTrigger asChild>\n\t\t\t\t<Button variant=\"ghost\" size=\"icon\" onClick={toggleFullscreen}>\n\t\t\t\t\t<Icon id=\"Expand\" className=\"size-4\" />\n\t\t\t\t</Button>\n\t\t\t</TooltipTrigger>\n\t\t\t<TooltipContent>Fullscreen (f)</TooltipContent>\n\t\t</Tooltip>\n\t);\n}\n","import {\n\tDEFAULT_HORIZONTAL_SCALE_MULTIPLIER,\n\ttype HorizontalMode,\n\tisHorizontalMode,\n\tisVerticalMode,\n\tlayout,\n\tresetHorizontalScaleMultiplier,\n\tsetDisabledArtifacts,\n\tsetDisabledEdges,\n\tsetDisabledEvents,\n\tsetHorizontalMode,\n\tsetHorizontalScaleMultiplier,\n\tsetVerticalMode,\n\ttype VerticalMode,\n} from \"@prefecthq/graphs\";\nimport { useCallback, useState } from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport { Label } from \"@/components/ui/label\";\nimport { Switch } from \"@/components/ui/switch\";\n\ntype LayoutOption = `${HorizontalMode}_${VerticalMode}`;\n\nconst layoutOptions: { label: string; value: LayoutOption }[] = [\n\t{\n\t\tlabel: \"Temporal dependency\",\n\t\tvalue: \"temporal_nearest-parent\",\n\t},\n\t{\n\t\tlabel: \"Temporal sequence\",\n\t\tvalue: \"temporal_waterfall\",\n\t},\n\t{\n\t\tlabel: \"Dependency grid\",\n\t\tvalue: \"dependency_nearest-parent\",\n\t},\n\t{\n\t\tlabel: \"Sequential grid\",\n\t\tvalue: \"dependency_waterfall\",\n\t},\n\t{\n\t\tlabel: \"Comparative duration\",\n\t\tvalue: \"left-aligned_duration-sorted\",\n\t},\n];\n\nconst increaseScale = () => {\n\tconst multiplier = DEFAULT_HORIZONTAL_SCALE_MULTIPLIER + 1;\n\tconst scale = layout.horizontalScaleMultiplier * multiplier;\n\tsetHorizontalScaleMultiplier(scale);\n};\n\nconst decreaseScale = () => {\n\tconst multiplier = Math.abs(DEFAULT_HORIZONTAL_SCALE_MULTIPLIER - 1);\n\tconst scale = layout.horizontalScaleMultiplier * multiplier;\n\tsetHorizontalScaleMultiplier(scale);\n};\n\nconst resetScale = () => {\n\tresetHorizontalScaleMultiplier();\n};\n\nfunction isLayoutOption(value: string): value is LayoutOption {\n\tconst [horizontal, vertical] = value.split(\"_\");\n\treturn isHorizontalMode(horizontal) && isVerticalMode(vertical);\n}\n\nexport function FlowRunGraphSettings() {\n\tconst [selectedLayoutOption, setSelectedLayoutOption] = useState(\n\t\t`${layout.horizontal}_${layout.vertical}`,\n\t);\n\tconst [hideEdges, setHideEdges] = useState(layout.disableEdges);\n\tconst [hideArtifacts, setHideArtifacts] = useState(layout.disableArtifacts);\n\tconst [hideEvents, setHideEvents] = useState(layout.disableEvents);\n\n\tconst handleLayoutChange = useCallback((value: string) => {\n\t\tif (!isLayoutOption(value)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst [horizontal, vertical] = value.split(\"_\");\n\n\t\tif (!isHorizontalMode(horizontal) || !isVerticalMode(vertical)) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetSelectedLayoutOption(value);\n\t\tsetHorizontalMode(horizontal);\n\t\tsetVerticalMode(vertical);\n\t}, []);\n\n\tconst handleHideEdgesChange = useCallback((value: boolean) => {\n\t\tsetHideEdges(value);\n\t\tsetDisabledEdges(value);\n\t}, []);\n\n\tconst handleHideArtifactsChange = useCallback((value: boolean) => {\n\t\tsetHideArtifacts(value);\n\t\tsetDisabledArtifacts(value);\n\t}, []);\n\n\tconst handleHideEventsChange = useCallback((value: boolean) => {\n\t\tsetHideEvents(value);\n\t\tsetDisabledEvents(value);\n\t}, []);\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t<p className=\"text-lg\">Layout</p>\n\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t{layoutOptions.map((option) => (\n\t\t\t\t\t\t<div key={option.value} className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\tid={option.value}\n\t\t\t\t\t\t\t\tname=\"layout\"\n\t\t\t\t\t\t\t\tvalue={option.value}\n\t\t\t\t\t\t\t\tchecked={selectedLayoutOption === option.value}\n\t\t\t\t\t\t\t\tonChange={(e) => handleLayoutChange(e.target.value)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Label htmlFor={option.value}>{option.label}</Label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t{(layout.isTemporal() || layout.isLeftAligned()) && (\n\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t<p className=\"text-lg\">Scaling</p>\n\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\tonClick={decreaseScale}\n\t\t\t\t\t\t\ttitle=\"Decrease scale (-)\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t-\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\tonClick={increaseScale}\n\t\t\t\t\t\t\ttitle=\"Increase scale (+)\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t+\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button variant=\"outline\" size=\"sm\" onClick={resetScale}>\n\t\t\t\t\t\t\tReset\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t<hr className=\"my-4\" />\n\n\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t<Switch\n\t\t\t\t\t\tid=\"hideEdges\"\n\t\t\t\t\t\tchecked={hideEdges}\n\t\t\t\t\t\tonCheckedChange={handleHideEdgesChange}\n\t\t\t\t\t/>\n\t\t\t\t\t<Label htmlFor=\"hideEdges\">Hide dependency arrows</Label>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t<Switch\n\t\t\t\t\t\tid=\"hideArtifacts\"\n\t\t\t\t\t\tchecked={hideArtifacts}\n\t\t\t\t\t\tonCheckedChange={handleHideArtifactsChange}\n\t\t\t\t\t/>\n\t\t\t\t\t<Label htmlFor=\"hideArtifacts\">Hide artifacts</Label>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t<Switch\n\t\t\t\t\t\tid=\"hideEvents\"\n\t\t\t\t\t\tchecked={hideEvents}\n\t\t\t\t\t\tonCheckedChange={handleHideEventsChange}\n\t\t\t\t\t/>\n\t\t\t\t\t<Label htmlFor=\"hideEvents\">Hide events</Label>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","import { Button } from \"@/components/ui/button\";\nimport { Icon } from \"@/components/ui/icons/icon\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { FlowRunGraphSettings } from \"./flow-run-graph-settings\";\n\nexport function FlowRunGraphSettingsButton() {\n\treturn (\n\t\t<Popover>\n\t\t\t<PopoverTrigger>\n\t\t\t\t<Tooltip>\n\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t<Button variant=\"ghost\" size=\"icon\">\n\t\t\t\t\t\t\t<Icon id=\"Cog\" className=\"size-4\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t<TooltipContent>Settings</TooltipContent>\n\t\t\t\t</Tooltip>\n\t\t\t</PopoverTrigger>\n\t\t\t<PopoverContent>\n\t\t\t\t<FlowRunGraphSettings />\n\t\t\t</PopoverContent>\n\t\t</Popover>\n\t);\n}\n","import { FlowRunGraphCenterButton } from \"./flow-run-graph-center-button\";\nimport { FlowRunGraphFullscreenButton } from \"./flow-run-graph-fullscreen-button\";\nimport { FlowRunGraphSettingsButton } from \"./flow-run-graph-settings-button\";\n\ntype FlowRunGraphActionsProps = {\n\tfullscreen: boolean;\n\tonFullscreenChange: (fullscreen: boolean) => void;\n};\n\nexport function FlowRunGraphActions({\n\tfullscreen,\n\tonFullscreenChange,\n}: FlowRunGraphActionsProps) {\n\treturn (\n\t\t<div className=\"flex gap-2\">\n\t\t\t<FlowRunGraphCenterButton />\n\t\t\t<FlowRunGraphFullscreenButton\n\t\t\t\tfullscreen={fullscreen}\n\t\t\t\tonFullscreenChange={onFullscreenChange}\n\t\t\t/>\n\t\t\t<FlowRunGraphSettingsButton />\n\t\t</div>\n\t);\n}\n","import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { Suspense } from \"react\";\nimport { buildGetArtifactQuery } from \"@/api/artifacts\";\nimport { FormattedDate } from \"@/components/ui/formatted-date/formatted-date\";\nimport { KeyValue } from \"@/components/ui/key-value\";\nimport {\n\tSheet,\n\tSheetContent,\n\tSheetHeader,\n\tSheetTitle,\n} from \"@/components/ui/sheet\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\n\ntype FlowRunGraphArtifactDrawerProps = {\n\tartifactId: string | null;\n\tonClose: () => void;\n};\n\nexport function FlowRunGraphArtifactDrawer({\n\tartifactId,\n\tonClose,\n}: FlowRunGraphArtifactDrawerProps) {\n\treturn (\n\t\t<Sheet\n\t\t\topen={artifactId !== null}\n\t\t\tonOpenChange={(open) => !open && onClose()}\n\t\t>\n\t\t\t<SheetContent>\n\t\t\t\t<SheetHeader>\n\t\t\t\t\t<SheetTitle>Artifact Details</SheetTitle>\n\t\t\t\t</SheetHeader>\n\t\t\t\t{artifactId && (\n\t\t\t\t\t<Suspense fallback={<ArtifactContentSkeleton />}>\n\t\t\t\t\t\t<ArtifactContent artifactId={artifactId} />\n\t\t\t\t\t</Suspense>\n\t\t\t\t)}\n\t\t\t</SheetContent>\n\t\t</Sheet>\n\t);\n}\n\nfunction ArtifactContentSkeleton() {\n\treturn (\n\t\t<div className=\"space-y-4 p-4\">\n\t\t\t<Skeleton className=\"h-6 w-32\" />\n\t\t\t<Skeleton className=\"h-4 w-24\" />\n\t\t\t<Skeleton className=\"h-4 w-48\" />\n\t\t\t<Skeleton className=\"h-32 w-full\" />\n\t\t</div>\n\t);\n}\n\nfunction ArtifactContent({ artifactId }: { artifactId: string }) {\n\tconst { data: artifact } = useSuspenseQuery(\n\t\tbuildGetArtifactQuery(artifactId),\n\t);\n\n\treturn (\n\t\t<div className=\"space-y-4 p-4\">\n\t\t\t<KeyValue\n\t\t\t\tlabel=\"Key\"\n\t\t\t\tvalue={\n\t\t\t\t\t<p className=\"text-sm font-medium\">{artifact.key ?? \"Unnamed\"}</p>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{artifact.type && (\n\t\t\t\t<KeyValue\n\t\t\t\t\tlabel=\"Type\"\n\t\t\t\t\tvalue={<p className=\"text-sm uppercase\">{artifact.type}</p>}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{artifact.description && (\n\t\t\t\t<KeyValue\n\t\t\t\t\tlabel=\"Description\"\n\t\t\t\t\tvalue={<p className=\"text-sm\">{artifact.description}</p>}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{artifact.created && (\n\t\t\t\t<KeyValue\n\t\t\t\t\tlabel=\"Created\"\n\t\t\t\t\tvalue={<FormattedDate date={artifact.created} />}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{artifact.data !== undefined && artifact.data !== null && (\n\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">Data</p>\n\t\t\t\t\t<pre className=\"bg-muted p-3 rounded-md text-sm overflow-auto max-h-64\">\n\t\t\t\t\t\t{typeof artifact.data === \"string\"\n\t\t\t\t\t\t\t? artifact.data\n\t\t\t\t\t\t\t: JSON.stringify(artifact.data, null, 2)}\n\t\t\t\t\t</pre>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n","import type { ArtifactsSelection } from \"@prefecthq/graphs\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport { buildListArtifactsQuery } from \"@/api/artifacts\";\nimport { Button } from \"@/components/ui/button\";\nimport { Icon } from \"@/components/ui/icons\";\nimport {\n\tPopover,\n\tPopoverAnchor,\n\tPopoverContent,\n} from \"@/components/ui/popover\";\n\ntype FlowRunGraphArtifactsPopoverProps = {\n\tselection: ArtifactsSelection;\n\tonClose: () => void;\n\tonViewArtifact: (artifactId: string) => void;\n};\n\nexport function FlowRunGraphArtifactsPopover({\n\tselection,\n\tonClose,\n\tonViewArtifact,\n}: FlowRunGraphArtifactsPopoverProps) {\n\tconst { data: artifacts, isLoading } = useQuery(\n\t\tbuildListArtifactsQuery({\n\t\t\tartifacts: {\n\t\t\t\toperator: \"and_\",\n\t\t\t\tid: { any_: selection.ids },\n\t\t\t},\n\t\t\tsort: \"CREATED_DESC\",\n\t\t\toffset: 0,\n\t\t}),\n\t);\n\n\tconst position = selection.position;\n\tif (!position) {\n\t\treturn null;\n\t}\n\n\tconst anchorStyle = {\n\t\tposition: \"absolute\" as const,\n\t\tleft: `${position.x + position.width / 2}px`,\n\t\ttop: `${position.y + position.height}px`,\n\t};\n\n\treturn (\n\t\t<Popover open onOpenChange={(open) => !open && onClose()}>\n\t\t\t<PopoverAnchor style={anchorStyle} />\n\t\t\t<PopoverContent align=\"center\" side=\"bottom\" className=\"w-72\">\n\t\t\t\t<div className=\"flex items-center justify-between mb-3\">\n\t\t\t\t\t<p className=\"text-sm font-semibold\">Artifacts</p>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tonClick={onClose}\n\t\t\t\t\t\taria-label=\"Close popover\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon id=\"X\" className=\"size-4\" />\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t\t{isLoading ? (\n\t\t\t\t\t<div className=\"flex items-center justify-center py-4\">\n\t\t\t\t\t\t<Icon id=\"Loader2\" className=\"size-4 animate-spin\" />\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div className=\"space-y-2 max-h-64 overflow-y-auto\">\n\t\t\t\t\t\t{artifacts\n\t\t\t\t\t\t\t?.filter((artifact) => artifact.id !== undefined)\n\t\t\t\t\t\t\t.map((artifact) => (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tkey={artifact.id}\n\t\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-between gap-2 p-2 rounded-md border bg-muted/50\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col min-w-0 flex-1\">\n\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm font-medium truncate\">\n\t\t\t\t\t\t\t\t\t\t\t{artifact.key ?? \"Unnamed\"}\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t{artifact.type && (\n\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-xs text-muted-foreground uppercase\">\n\t\t\t\t\t\t\t\t\t\t\t\t{artifact.type}\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => onViewArtifact(artifact.id as string)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tView\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</PopoverContent>\n\t\t</Popover>\n\t);\n}\n","import type { EventSelection } from \"@prefecthq/graphs\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport { Link } from \"@tanstack/react-router\";\nimport { format, isValid, parseISO } from \"date-fns\";\nimport { Suspense } from \"react\";\nimport { buildGetEventQuery, type Event } from \"@/api/events\";\nimport type { components } from \"@/api/prefect\";\nimport {\n\tEventResourceLink,\n\textractResourceId,\n\tparseResourceType,\n\tResourceDisplaySkeleton,\n\tResourceDisplayWithIcon,\n} from \"@/components/events/event-resource-display\";\nimport { ResolvedResourceDisplay } from \"@/components/events/event-resource-display/resolved-resource-display\";\nimport { Button } from \"@/components/ui/button\";\nimport { Icon } from \"@/components/ui/icons\";\nimport { KeyValue } from \"@/components/ui/key-value\";\nimport {\n\tPopover,\n\tPopoverAnchor,\n\tPopoverContent,\n} from \"@/components/ui/popover\";\n\ntype RelatedResource = components[\"schemas\"][\"RelatedResource\"];\n\ntype FlowRunGraphEventPopoverProps = {\n\tselection: EventSelection;\n\tonClose: () => void;\n};\n\n/**\n * Converts an event name like \"prefect.flow-run.Running\" to a human-readable label\n * like \"Flow run running\"\n */\nfunction getEventLabel(eventName: string): string {\n\t// Remove \"prefect.\" or \"prefect-cloud.\" prefix\n\tlet label = eventName;\n\tif (label.startsWith(\"prefect.\")) {\n\t\tlabel = label.slice(8);\n\t} else if (label.startsWith(\"prefect-cloud.\")) {\n\t\tlabel = label.slice(14);\n\t}\n\n\t// Replace dots, dashes, and underscores with spaces\n\tlabel = label.replace(/[._-]/g, \" \");\n\n\t// Capitalize first letter, lowercase the rest\n\treturn label.charAt(0).toUpperCase() + label.slice(1).toLowerCase();\n}\n\n/**\n * Formats a date to numeric format like \"2026/01/25 08:18:11 PM\"\n */\nfunction formatDateNumeric(date: string | Date): string {\n\tlet parsedDate: Date;\n\tif (typeof date === \"string\") {\n\t\tparsedDate = parseISO(date);\n\t} else {\n\t\tparsedDate = date;\n\t}\n\n\tif (!isValid(parsedDate)) {\n\t\treturn \"Invalid date\";\n\t}\n\n\treturn format(parsedDate, \"yyyy/MM/dd hh:mm:ss a\");\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\ntype EventResourceSectionProps = {\n\tevent: Event;\n};\n\nfunction EventResourceSection({ event }: EventResourceSectionProps) {\n\tconst resourceName = getResourceName(event.resource);\n\tconst prefectResourceId = event.resource[\"prefect.resource.id\"] || \"\";\n\tconst resourceType = parseResourceType(prefectResourceId);\n\tconst extractedId = extractResourceId(prefectResourceId);\n\tconst relatedResources = event.related ?? [];\n\n\t// If we have a resource name, display it with the appropriate icon\n\tif (resourceName) {\n\t\treturn (\n\t\t\t<Suspense fallback={<ResourceDisplaySkeleton />}>\n\t\t\t\t<EventResourceLink\n\t\t\t\t\tresource={event.resource as RelatedResource}\n\t\t\t\t\trelatedResources={relatedResources}\n\t\t\t\t\tclassName=\"hover:underline text-primary\"\n\t\t\t\t>\n\t\t\t\t\t<ResourceDisplayWithIcon\n\t\t\t\t\t\tresourceType={resourceType}\n\t\t\t\t\t\tdisplayText={resourceName}\n\t\t\t\t\t\tclassName=\"text-sm\"\n\t\t\t\t\t/>\n\t\t\t\t</EventResourceLink>\n\t\t\t</Suspense>\n\t\t);\n\t}\n\n\t// If we have an extracted ID but no name, try to fetch the resource name via API\n\tif (extractedId && resourceType !== \"unknown\") {\n\t\treturn (\n\t\t\t<Suspense fallback={<ResourceDisplaySkeleton />}>\n\t\t\t\t<EventResourceLink\n\t\t\t\t\tresource={event.resource as RelatedResource}\n\t\t\t\t\trelatedResources={relatedResources}\n\t\t\t\t\tclassName=\"hover:underline text-primary\"\n\t\t\t\t>\n\t\t\t\t\t<ResolvedResourceDisplay\n\t\t\t\t\t\tresourceType={resourceType}\n\t\t\t\t\t\tresourceId={extractedId}\n\t\t\t\t\t\tclassName=\"text-sm\"\n\t\t\t\t\t/>\n\t\t\t\t</EventResourceLink>\n\t\t\t</Suspense>\n\t\t);\n\t}\n\n\t// Fallback: show the raw resource ID\n\treturn (\n\t\t<span className=\"text-sm text-muted-foreground font-mono\">\n\t\t\t{prefectResourceId || \"Unknown\"}\n\t\t</span>\n\t);\n}\n\ntype RelatedResourcesSectionProps = {\n\trelatedResources: RelatedResource[];\n};\n\nfunction RelatedResourcesSection({\n\trelatedResources,\n}: RelatedResourcesSectionProps) {\n\t// Filter out tag resources and only show meaningful related resources\n\tconst filteredResources = relatedResources.filter((resource) => {\n\t\tconst role = resource[\"prefect.resource.role\"];\n\t\tconst resourceId = resource[\"prefect.resource.id\"] || \"\";\n\t\t// Exclude tags and resources without a valid type\n\t\tif (role === \"tag\" || resourceId.startsWith(\"prefect.tag.\")) {\n\t\t\treturn false;\n\t\t}\n\t\tconst resourceType = parseResourceType(resourceId);\n\t\treturn resourceType !== \"unknown\";\n\t});\n\n\tif (filteredResources.length === 0) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<KeyValue\n\t\t\tlabel=\"Related Resources\"\n\t\t\tvalue={\n\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t{filteredResources.map((resource) => {\n\t\t\t\t\t\tconst resourceName = getResourceName(resource);\n\t\t\t\t\t\tconst prefectResourceId = resource[\"prefect.resource.id\"] || \"\";\n\t\t\t\t\t\tconst resourceType = parseResourceType(prefectResourceId);\n\t\t\t\t\t\tconst extractedId = extractResourceId(prefectResourceId);\n\n\t\t\t\t\t\tif (resourceName) {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<Suspense\n\t\t\t\t\t\t\t\t\tkey={prefectResourceId}\n\t\t\t\t\t\t\t\t\tfallback={<ResourceDisplaySkeleton />}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<EventResourceLink\n\t\t\t\t\t\t\t\t\t\tresource={resource}\n\t\t\t\t\t\t\t\t\t\trelatedResources={relatedResources}\n\t\t\t\t\t\t\t\t\t\tclassName=\"hover:underline text-primary\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<ResourceDisplayWithIcon\n\t\t\t\t\t\t\t\t\t\t\tresourceType={resourceType}\n\t\t\t\t\t\t\t\t\t\t\tdisplayText={resourceName}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-sm\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</EventResourceLink>\n\t\t\t\t\t\t\t\t</Suspense>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (extractedId && resourceType !== \"unknown\") {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<Suspense\n\t\t\t\t\t\t\t\t\tkey={prefectResourceId}\n\t\t\t\t\t\t\t\t\tfallback={<ResourceDisplaySkeleton />}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<EventResourceLink\n\t\t\t\t\t\t\t\t\t\tresource={resource}\n\t\t\t\t\t\t\t\t\t\trelatedResources={relatedResources}\n\t\t\t\t\t\t\t\t\t\tclassName=\"hover:underline text-primary\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<ResolvedResourceDisplay\n\t\t\t\t\t\t\t\t\t\t\tresourceType={resourceType}\n\t\t\t\t\t\t\t\t\t\t\tresourceId={extractedId}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-sm\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</EventResourceLink>\n\t\t\t\t\t\t\t\t</Suspense>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tkey={prefectResourceId}\n\t\t\t\t\t\t\t\tclassName=\"text-sm text-muted-foreground font-mono\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{prefectResourceId}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t}\n\t\t/>\n\t);\n}\n\nexport function FlowRunGraphEventPopover({\n\tselection,\n\tonClose,\n}: FlowRunGraphEventPopoverProps) {\n\tconst { data: event, isLoading } = useQuery(\n\t\tbuildGetEventQuery(selection.id, selection.occurred),\n\t);\n\n\tconst position = selection.position;\n\tif (!position) {\n\t\treturn null;\n\t}\n\n\tconst anchorStyle = {\n\t\tposition: \"absolute\" as const,\n\t\tleft: `${position.x + position.width / 2}px`,\n\t\ttop: `${position.y + position.height}px`,\n\t};\n\n\tconst eventName = event?.event ?? \"\";\n\tconst eventLabel = eventName ? getEventLabel(eventName) : \"Loading...\";\n\tconst relatedResources = event?.related ?? [];\n\n\treturn (\n\t\t<Popover open onOpenChange={(open) => !open && onClose()}>\n\t\t\t<PopoverAnchor style={anchorStyle} />\n\t\t\t<PopoverContent align=\"center\" side=\"bottom\" className=\"w-80\">\n\t\t\t\t<div className=\"flex justify-between items-start mb-3\">\n\t\t\t\t\t<span className=\"text-sm text-muted-foreground\">Event</span>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tonClick={onClose}\n\t\t\t\t\t\taria-label=\"Close popover\"\n\t\t\t\t\t\tclassName=\"-mt-1 -mr-2\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon id=\"X\" className=\"size-4\" />\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t\t{isLoading ? (\n\t\t\t\t\t<div className=\"flex items-center justify-center py-4\">\n\t\t\t\t\t\t<Icon id=\"Loader2\" className=\"size-4 animate-spin\" />\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div className=\"space-y-3\">\n\t\t\t\t\t\t<div className=\"flex flex-col gap-0.5\">\n\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\tto=\"/events\"\n\t\t\t\t\t\t\t\tsearch={{ event: [eventName] }}\n\t\t\t\t\t\t\t\tclassName=\"text-sm text-primary hover:underline font-medium\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{eventLabel}\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t<span className=\"text-xs text-muted-foreground\">{eventName}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<KeyValue\n\t\t\t\t\t\t\tlabel=\"Occurred\"\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\t<span className=\"text-sm\">\n\t\t\t\t\t\t\t\t\t{formatDateNumeric(selection.occurred)}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{event && (\n\t\t\t\t\t\t\t<KeyValue\n\t\t\t\t\t\t\t\tlabel=\"Resource\"\n\t\t\t\t\t\t\t\tvalue={<EventResourceSection event={event} />}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{relatedResources.length > 0 && (\n\t\t\t\t\t\t\t<RelatedResourcesSection relatedResources={relatedResources} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</PopoverContent>\n\t\t</Popover>\n\t);\n}\n","import type { EventsSelection } from \"@prefecthq/graphs\";\nimport { useQueries } from \"@tanstack/react-query\";\nimport { buildGetEventQuery } from \"@/api/events\";\nimport { Button } from \"@/components/ui/button\";\nimport { FormattedDate } from \"@/components/ui/formatted-date/formatted-date\";\nimport { Icon } from \"@/components/ui/icons\";\nimport {\n\tPopover,\n\tPopoverAnchor,\n\tPopoverContent,\n} from \"@/components/ui/popover\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\n\ntype FlowRunGraphEventsPopoverProps = {\n\tselection: EventsSelection;\n\tonClose: () => void;\n};\n\nexport function FlowRunGraphEventsPopover({\n\tselection,\n\tonClose,\n}: FlowRunGraphEventsPopoverProps) {\n\tconst eventQueries = useQueries({\n\t\tqueries: selection.ids.map((id) =>\n\t\t\tbuildGetEventQuery(id, selection.occurred ?? new Date()),\n\t\t),\n\t});\n\n\tconst position = selection.position;\n\tif (!position) {\n\t\treturn null;\n\t}\n\n\tconst anchorStyle = {\n\t\tposition: \"absolute\" as const,\n\t\tleft: `${position.x + position.width / 2}px`,\n\t\ttop: `${position.y + position.height}px`,\n\t};\n\n\tconst isLoading = eventQueries.some((q) => q.isLoading);\n\tconst events = eventQueries\n\t\t.map((q) => q.data)\n\t\t.filter((e): e is NonNullable<typeof e> => e !== undefined);\n\n\treturn (\n\t\t<Popover open onOpenChange={(open) => !open && onClose()}>\n\t\t\t<PopoverAnchor style={anchorStyle} />\n\t\t\t<PopoverContent align=\"center\" side=\"bottom\" className=\"w-80\">\n\t\t\t\t<div className=\"flex items-center justify-between mb-2\">\n\t\t\t\t\t<span className=\"text-sm font-medium\">\n\t\t\t\t\t\t{selection.ids.length} Events\n\t\t\t\t\t</span>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tonClick={onClose}\n\t\t\t\t\t\taria-label=\"Close popover\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon id=\"X\" className=\"size-4\" />\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t\t{isLoading ? (\n\t\t\t\t\t<div className=\"flex items-center justify-center py-4\">\n\t\t\t\t\t\t<Icon id=\"Loader2\" className=\"size-4 animate-spin\" />\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<ScrollArea className=\"max-h-64\">\n\t\t\t\t\t\t<div className=\"space-y-3\">\n\t\t\t\t\t\t\t{events.map((event) => (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tkey={event.id}\n\t\t\t\t\t\t\t\t\tclassName=\"border-b pb-2 last:border-b-0 last:pb-0\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tclassName=\"text-sm font-mono truncate\"\n\t\t\t\t\t\t\t\t\t\ttitle={event.event}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{event.event}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t<FormattedDate date={new Date(event.occurred)} />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</ScrollArea>\n\t\t\t\t)}\n\t\t\t</PopoverContent>\n\t\t</Popover>\n\t);\n}\n","import { type GraphItemSelection, isNodeSelection } from \"@prefecthq/graphs\";\nimport { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { Link } from \"@tanstack/react-router\";\nimport { Suspense } from \"react\";\nimport { buildGetFlowRunDetailsQuery } from \"@/api/flow-runs\";\nimport { buildGetTaskRunQuery } from \"@/api/task-runs\";\nimport { Button } from \"@/components/ui/button\";\nimport { FormattedDate } from \"@/components/ui/formatted-date/formatted-date\";\nimport { Icon } from \"@/components/ui/icons\";\nimport { KeyValue } from \"@/components/ui/key-value\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\nimport { StateBadge } from \"@/components/ui/state-badge\";\nimport { TagBadgeGroup } from \"@/components/ui/tag-badge-group\";\nimport { secondsToApproximateString } from \"@/utils/seconds\";\n\ntype FlowRunGraphSelectionPanelProps = {\n\tselection: GraphItemSelection;\n\tonClose: () => void;\n};\n\nexport function FlowRunGraphSelectionPanel({\n\tselection,\n\tonClose,\n}: FlowRunGraphSelectionPanelProps) {\n\tif (!isNodeSelection(selection)) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div className=\"absolute top-4 right-4 z-10 w-72 rounded-lg border bg-card p-4 shadow-md\">\n\t\t\t<Suspense fallback={<SelectionPanelSkeleton onClose={onClose} />}>\n\t\t\t\t{selection.kind === \"task-run\" && (\n\t\t\t\t\t<TaskRunDetails taskRunId={selection.id} onClose={onClose} />\n\t\t\t\t)}\n\t\t\t\t{selection.kind === \"flow-run\" && (\n\t\t\t\t\t<FlowRunDetails flowRunId={selection.id} onClose={onClose} />\n\t\t\t\t)}\n\t\t\t</Suspense>\n\t\t</div>\n\t);\n}\n\ntype SelectionPanelSkeletonProps = {\n\tonClose: () => void;\n};\n\nfunction SelectionPanelSkeleton({ onClose }: SelectionPanelSkeletonProps) {\n\treturn (\n\t\t<div className=\"space-y-3\">\n\t\t\t<div className=\"flex items-start justify-between gap-2\">\n\t\t\t\t<Skeleton className=\"h-6 w-3/4\" />\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\tonClick={onClose}\n\t\t\t\t\taria-label=\"Close panel\"\n\t\t\t\t\tclassName=\"shrink-0 -mt-1 -mr-2\"\n\t\t\t\t>\n\t\t\t\t\t<Icon id=\"X\" className=\"size-4\" />\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t\t<Skeleton className=\"h-5 w-1/2\" />\n\t\t\t<Skeleton className=\"h-5 w-full\" />\n\t\t\t<Skeleton className=\"h-5 w-2/3\" />\n\t\t\t<Skeleton className=\"h-5 w-1/2\" />\n\t\t</div>\n\t);\n}\n\ntype TaskRunDetailsProps = {\n\ttaskRunId: string;\n\tonClose: () => void;\n};\n\nfunction TaskRunDetails({ taskRunId, onClose }: TaskRunDetailsProps) {\n\tconst { data: taskRun } = useSuspenseQuery(buildGetTaskRunQuery(taskRunId));\n\n\tconst duration =\n\t\ttaskRun.estimated_run_time && taskRun.estimated_run_time > 0\n\t\t\t? taskRun.estimated_run_time\n\t\t\t: (taskRun.total_run_time ?? 0);\n\n\treturn (\n\t\t<div className=\"space-y-3\">\n\t\t\t<div className=\"flex items-start justify-between gap-2\">\n\t\t\t\t<h3 className=\"font-semibold text-base\">\n\t\t\t\t\t<Link\n\t\t\t\t\t\tto=\"/runs/task-run/$id\"\n\t\t\t\t\t\tparams={{ id: taskRunId }}\n\t\t\t\t\t\tclassName=\"hover:underline text-foreground\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{taskRun.name}\n\t\t\t\t\t</Link>\n\t\t\t\t</h3>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\tonClick={onClose}\n\t\t\t\t\taria-label=\"Close panel\"\n\t\t\t\t\tclassName=\"shrink-0 -mt-1 -mr-2\"\n\t\t\t\t>\n\t\t\t\t\t<Icon id=\"X\" className=\"size-4\" />\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t\t<div className=\"space-y-3\">\n\t\t\t\t{taskRun.state && (\n\t\t\t\t\t<KeyValue\n\t\t\t\t\t\tlabel=\"State\"\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t<StateBadge type={taskRun.state.type} name={taskRun.state.name} />\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t<KeyValue label=\"Task Run ID\" value={taskRun.id} copyable />\n\t\t\t\t<KeyValue\n\t\t\t\t\tlabel=\"Duration\"\n\t\t\t\t\tvalue={duration > 0 ? secondsToApproximateString(duration) : \"-\"}\n\t\t\t\t/>\n\t\t\t\t<KeyValue\n\t\t\t\t\tlabel=\"Created\"\n\t\t\t\t\tvalue={<FormattedDate date={taskRun.created} />}\n\t\t\t\t/>\n\t\t\t\t{taskRun.tags && taskRun.tags.length > 0 && (\n\t\t\t\t\t<KeyValue\n\t\t\t\t\t\tlabel=\"Tags\"\n\t\t\t\t\t\tvalue={<TagBadgeGroup tags={taskRun.tags} />}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\ntype FlowRunDetailsProps = {\n\tflowRunId: string;\n\tonClose: () => void;\n};\n\nfunction FlowRunDetails({ flowRunId, onClose }: FlowRunDetailsProps) {\n\tconst { data: flowRun } = useSuspenseQuery(\n\t\tbuildGetFlowRunDetailsQuery(flowRunId),\n\t);\n\n\tconst duration = flowRun.total_run_time ?? 0;\n\n\treturn (\n\t\t<div className=\"space-y-3\">\n\t\t\t<div className=\"flex items-start justify-between gap-2\">\n\t\t\t\t<h3 className=\"font-semibold text-base\">\n\t\t\t\t\t<Link\n\t\t\t\t\t\tto=\"/runs/flow-run/$id\"\n\t\t\t\t\t\tparams={{ id: flowRunId }}\n\t\t\t\t\t\tclassName=\"hover:underline text-foreground\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{flowRun.name}\n\t\t\t\t\t</Link>\n\t\t\t\t</h3>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\tonClick={onClose}\n\t\t\t\t\taria-label=\"Close panel\"\n\t\t\t\t\tclassName=\"shrink-0 -mt-1 -mr-2\"\n\t\t\t\t>\n\t\t\t\t\t<Icon id=\"X\" className=\"size-4\" />\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t\t<div className=\"space-y-3\">\n\t\t\t\t{flowRun.state && (\n\t\t\t\t\t<KeyValue\n\t\t\t\t\t\tlabel=\"State\"\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t<StateBadge type={flowRun.state.type} name={flowRun.state.name} />\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t<KeyValue label=\"Flow Run ID\" value={flowRun.id} copyable />\n\t\t\t\t<KeyValue\n\t\t\t\t\tlabel=\"Duration\"\n\t\t\t\t\tvalue={duration > 0 ? secondsToApproximateString(duration) : \"-\"}\n\t\t\t\t/>\n\t\t\t\t<KeyValue\n\t\t\t\t\tlabel=\"Created\"\n\t\t\t\t\tvalue={<FormattedDate date={flowRun.created} />}\n\t\t\t\t/>\n\t\t\t\t{flowRun.tags && flowRun.tags.length > 0 && (\n\t\t\t\t\t<KeyValue\n\t\t\t\t\t\tlabel=\"Tags\"\n\t\t\t\t\t\tvalue={<TagBadgeGroup tags={flowRun.tags} />}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","import type { StateSelection } from \"@prefecthq/graphs\";\nimport { useEffect, useRef } from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport { FormattedDate } from \"@/components/ui/formatted-date/formatted-date\";\nimport { Icon } from \"@/components/ui/icons\";\nimport { KeyValue } from \"@/components/ui/key-value\";\nimport { StateBadge } from \"@/components/ui/state-badge\";\n\ntype FlowRunGraphStatePopoverProps = {\n\tselection: StateSelection;\n\tonClose: () => void;\n};\n\nexport function FlowRunGraphStatePopover({\n\tselection,\n\tonClose,\n}: FlowRunGraphStatePopoverProps) {\n\tconst popoverRef = useRef<HTMLDivElement>(null);\n\n\tuseEffect(() => {\n\t\tconst handleClickOutside = (event: MouseEvent) => {\n\t\t\tif (\n\t\t\t\tpopoverRef.current &&\n\t\t\t\t!popoverRef.current.contains(event.target as Node)\n\t\t\t) {\n\t\t\t\tonClose();\n\t\t\t}\n\t\t};\n\n\t\tconst handleEscape = (event: KeyboardEvent) => {\n\t\t\tif (event.key === \"Escape\") {\n\t\t\t\tonClose();\n\t\t\t}\n\t\t};\n\n\t\tdocument.addEventListener(\"mousedown\", handleClickOutside);\n\t\tdocument.addEventListener(\"keydown\", handleEscape);\n\n\t\treturn () => {\n\t\t\tdocument.removeEventListener(\"mousedown\", handleClickOutside);\n\t\t\tdocument.removeEventListener(\"keydown\", handleEscape);\n\t\t};\n\t}, [onClose]);\n\n\tconst position = selection.position;\n\tif (!position) {\n\t\treturn null;\n\t}\n\n\tconst popoverStyle = {\n\t\tposition: \"absolute\" as const,\n\t\tleft: `${position.x + position.width / 2}px`,\n\t\ttop: `${position.y + position.height}px`,\n\t\ttransform: \"translateX(-50%)\",\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tref={popoverRef}\n\t\t\tclassName=\"z-50 w-64 rounded-lg border bg-card p-4 shadow-md\"\n\t\t\tstyle={popoverStyle}\n\t\t>\n\t\t\t<div className=\"flex justify-end absolute top-2 right-2\">\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\tonClick={onClose}\n\t\t\t\t\taria-label=\"Close popover\"\n\t\t\t\t>\n\t\t\t\t\t<Icon id=\"X\" className=\"size-4\" />\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t\t<div className=\"space-y-3\">\n\t\t\t\t<KeyValue\n\t\t\t\t\tlabel=\"State\"\n\t\t\t\t\tvalue={<StateBadge type={selection.type} name={selection.name} />}\n\t\t\t\t/>\n\t\t\t\t<KeyValue\n\t\t\t\t\tlabel=\"Occurred\"\n\t\t\t\t\tvalue={\n\t\t\t\t\t\t<FormattedDate date={selection.timestamp} format=\"timestamp\" />\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","import {\n\temitter,\n\ttype GraphItemSelection,\n\tisArtifactsSelection,\n\tisEventSelection,\n\tisEventsSelection,\n\tisNodeSelection,\n\tisStateSelection,\n\ttype RunGraphConfig,\n\ttype RunGraphNode,\n\ttype RunGraphStateEvent,\n\tselectItem,\n\tsetConfig,\n\tstart,\n\tstop,\n\tupdateViewportFromDateRange,\n\ttype ViewportDateRange,\n} from \"@prefecthq/graphs\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport { useTheme } from \"next-themes\";\nimport {\n\ttype CSSProperties,\n\tuseCallback,\n\tuseEffect,\n\tuseMemo,\n\tuseRef,\n\tuseState,\n} from \"react\";\nimport { buildCountFlowRunsQuery } from \"@/api/flow-runs\";\nimport { buildCountTaskRunsQuery } from \"@/api/task-runs\";\nimport { getStateColor } from \"@/utils/state-colors\";\nimport { fetchFlowRunEvents, fetchFlowRunGraph } from \"./api\";\nimport { stateTypeShades } from \"./consts\";\nimport { FlowRunGraphActions } from \"./flow-run-graph-actions\";\nimport { FlowRunGraphArtifactDrawer } from \"./flow-run-graph-artifact-drawer\";\nimport { FlowRunGraphArtifactsPopover } from \"./flow-run-graph-artifacts-popover\";\nimport { FlowRunGraphEventPopover } from \"./flow-run-graph-event-popover\";\nimport { FlowRunGraphEventsPopover } from \"./flow-run-graph-events-popover\";\nimport { FlowRunGraphSelectionPanel } from \"./flow-run-graph-selection-panel\";\nimport { FlowRunGraphStatePopover } from \"./flow-run-graph-state-popover\";\n\nconst TERMINAL_STATES = [\"COMPLETED\", \"FAILED\", \"CANCELLED\", \"CRASHED\"];\n\ntype FlowRunGraphProps = {\n\tflowRunId: string;\n\tstateType?: string;\n\tviewport?: ViewportDateRange;\n\tonViewportChange?: (viewport: ViewportDateRange) => void;\n\tselected?: GraphItemSelection;\n\tonSelectedChange?: (selected: GraphItemSelection | undefined) => void;\n\tfullscreen?: boolean;\n\tonFullscreenChange?: (fullscreen: boolean) => void;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n};\n\nexport function FlowRunGraph({\n\tflowRunId,\n\tstateType,\n\tviewport,\n\tonViewportChange,\n\tselected: controlledSelected,\n\tonSelectedChange,\n\tclassName,\n\tstyle,\n\tfullscreen: controlledFullscreen,\n\tonFullscreenChange,\n}: FlowRunGraphProps) {\n\tconst stageRef = useRef<HTMLDivElement>(null);\n\tconst [internalFullscreen, setInternalFullscreen] = useState(false);\n\tconst [internalSelected, setInternalSelected] = useState<\n\t\tGraphItemSelection | undefined\n\t>(undefined);\n\tconst [selectedArtifactId, setSelectedArtifactId] = useState<string | null>(\n\t\tnull,\n\t);\n\tconst { resolvedTheme } = useTheme();\n\n\tconst fullscreen = controlledFullscreen ?? internalFullscreen;\n\tconst selected = controlledSelected ?? internalSelected;\n\tconst isTerminal = stateType && TERMINAL_STATES.includes(stateType);\n\n\tconst { data: taskRunCount } = useQuery(\n\t\tbuildCountTaskRunsQuery({\n\t\t\ttask_runs: {\n\t\t\t\toperator: \"and_\",\n\t\t\t\tflow_run_id: { operator: \"and_\", any_: [flowRunId], is_null_: false },\n\t\t\t},\n\t\t}),\n\t);\n\n\tconst { data: subflowRunCount } = useQuery(\n\t\tbuildCountFlowRunsQuery({\n\t\t\tflow_runs: {\n\t\t\t\toperator: \"and_\",\n\t\t\t\tparent_flow_run_id: {\n\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\tany_: [flowRunId],\n\t\t\t\t},\n\t\t\t},\n\t\t}),\n\t);\n\n\tconst hasNodes =\n\t\ttaskRunCount === undefined ||\n\t\tsubflowRunCount === undefined ||\n\t\ttaskRunCount > 0 ||\n\t\tsubflowRunCount > 0;\n\n\tconst updateFullscreen = useCallback(\n\t\t(value: boolean) => {\n\t\t\tsetInternalFullscreen(value);\n\t\t\tonFullscreenChange?.(value);\n\t\t},\n\t\t[onFullscreenChange],\n\t);\n\n\tconst config = useMemo<RunGraphConfig>(\n\t\t() => ({\n\t\t\trunId: flowRunId,\n\t\t\tfetch: fetchFlowRunGraph,\n\t\t\tfetchEvents: fetchFlowRunEvents,\n\t\t\tstyles: () => ({\n\t\t\t\tnode: (node: RunGraphNode) => ({\n\t\t\t\t\tbackground: getStateColor(\n\t\t\t\t\t\tnode.state_type,\n\t\t\t\t\t\tstateTypeShades[node.state_type],\n\t\t\t\t\t),\n\t\t\t\t}),\n\t\t\t\tstate: (event: RunGraphStateEvent) => ({\n\t\t\t\t\tbackground: getStateColor(event.type, stateTypeShades[event.type]),\n\t\t\t\t}),\n\t\t\t}),\n\t\t\ttheme: resolvedTheme === \"dark\" ? \"dark\" : \"light\",\n\t\t}),\n\t\t[flowRunId, resolvedTheme],\n\t);\n\n\tuseEffect(() => {\n\t\tsetConfig(config);\n\t}, [config]);\n\n\tuseEffect(() => {\n\t\tif (!stageRef.current) {\n\t\t\tthrow new Error(\"Stage does not exist\");\n\t\t}\n\n\t\tstart({\n\t\t\tstage: stageRef.current,\n\t\t\tconfig,\n\t\t});\n\n\t\treturn () => {\n\t\t\tstop();\n\t\t};\n\t}, [config]);\n\n\tuseEffect(() => {\n\t\tselectItem(selected ?? null);\n\t}, [selected]);\n\n\tuseEffect(() => {\n\t\tvoid updateViewportFromDateRange(viewport);\n\t}, [viewport]);\n\n\tuseEffect(() => {\n\t\tconst offItemSelected = emitter.on(\"itemSelected\", (nodeId) => {\n\t\t\tconst selection = nodeId ?? undefined;\n\t\t\tsetInternalSelected(selection);\n\t\t\tonSelectedChange?.(selection);\n\t\t});\n\t\tconst offViewportDateRangeUpdated = emitter.on(\n\t\t\t\"viewportDateRangeUpdated\",\n\t\t\t(range) => onViewportChange?.(range),\n\t\t);\n\n\t\treturn () => {\n\t\t\toffItemSelected();\n\t\t\toffViewportDateRangeUpdated();\n\t\t};\n\t}, [onSelectedChange, onViewportChange]);\n\n\tconst heightClass = fullscreen\n\t\t? \"fixed inset-0 z-50 bg-background\"\n\t\t: hasNodes\n\t\t\t? \"relative h-96 w-full\"\n\t\t\t: \"relative h-40 w-full\";\n\n\treturn (\n\t\t<div className={`${heightClass} ${className ?? \"\"}`} style={style}>\n\t\t\t<div ref={stageRef} className=\"size-full [&>canvas]:size-full\" />\n\t\t\t{!hasNodes && (\n\t\t\t\t<div className=\"absolute inset-0 flex items-center justify-center bg-background/50\">\n\t\t\t\t\t<p className=\"text-muted-foreground\">\n\t\t\t\t\t\t{isTerminal\n\t\t\t\t\t\t\t? \"This flow run did not generate any task or subflow runs\"\n\t\t\t\t\t\t\t: \"This flow run has not yet generated any task or subflow runs\"}\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t<div className=\"absolute bottom-2 right-2\">\n\t\t\t\t<FlowRunGraphActions\n\t\t\t\t\tfullscreen={fullscreen}\n\t\t\t\t\tonFullscreenChange={updateFullscreen}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t{selected && isNodeSelection(selected) && (\n\t\t\t\t<FlowRunGraphSelectionPanel\n\t\t\t\t\tselection={selected}\n\t\t\t\t\tonClose={() => {\n\t\t\t\t\t\tsetInternalSelected(undefined);\n\t\t\t\t\t\tonSelectedChange?.(undefined);\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{selected && isStateSelection(selected) && (\n\t\t\t\t<FlowRunGraphStatePopover\n\t\t\t\t\tselection={selected}\n\t\t\t\t\tonClose={() => {\n\t\t\t\t\t\tsetInternalSelected(undefined);\n\t\t\t\t\t\tonSelectedChange?.(undefined);\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{selected && isEventSelection(selected) && (\n\t\t\t\t<FlowRunGraphEventPopover\n\t\t\t\t\tselection={selected}\n\t\t\t\t\tonClose={() => {\n\t\t\t\t\t\tsetInternalSelected(undefined);\n\t\t\t\t\t\tonSelectedChange?.(undefined);\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{selected && isEventsSelection(selected) && (\n\t\t\t\t<FlowRunGraphEventsPopover\n\t\t\t\t\tselection={selected}\n\t\t\t\t\tonClose={() => {\n\t\t\t\t\t\tsetInternalSelected(undefined);\n\t\t\t\t\t\tonSelectedChange?.(undefined);\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{selected && isArtifactsSelection(selected) && (\n\t\t\t\t<FlowRunGraphArtifactsPopover\n\t\t\t\t\tselection={selected}\n\t\t\t\t\tonClose={() => {\n\t\t\t\t\t\tsetInternalSelected(undefined);\n\t\t\t\t\t\tonSelectedChange?.(undefined);\n\t\t\t\t\t}}\n\t\t\t\t\tonViewArtifact={(artifactId) => {\n\t\t\t\t\t\tsetSelectedArtifactId(artifactId);\n\t\t\t\t\t\tsetInternalSelected(undefined);\n\t\t\t\t\t\tonSelectedChange?.(undefined);\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<FlowRunGraphArtifactDrawer\n\t\t\t\tartifactId={selectedArtifactId}\n\t\t\t\tonClose={() => setSelectedArtifactId(null)}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"names":["fetchFlowRunGraph","id","data","getQueryService","mapApiResponseToRunGraphData","fetchFlowRunEvents","since","until","nodeId","mapApiResponseToRunGraphEvents","response","parseISO","node","mapNode","mapState","event","mapArtifact","state","artifact","stateTypeShades","isEventTargetInput","target","center","centerViewport","FlowRunGraphCenterButton","useEffect","controller","Tooltip","jsx","TooltipTrigger","Button","Icon","TooltipContent","FlowRunGraphFullscreenButton","fullscreen","onFullscreenChange","toggleFullscreen","useCallback","layoutOptions","increaseScale","multiplier","DEFAULT_HORIZONTAL_SCALE_MULTIPLIER","scale","layout","setHorizontalScaleMultiplier","decreaseScale","resetScale","resetHorizontalScaleMultiplier","isLayoutOption","value","horizontal","vertical","isHorizontalMode","isVerticalMode","FlowRunGraphSettings","selectedLayoutOption","setSelectedLayoutOption","useState","hideEdges","setHideEdges","hideArtifacts","setHideArtifacts","hideEvents","setHideEvents","handleLayoutChange","setHorizontalMode","setVerticalMode","handleHideEdgesChange","setDisabledEdges","handleHideArtifactsChange","setDisabledArtifacts","handleHideEventsChange","setDisabledEvents","jsxs","option","e","Label","Switch","FlowRunGraphSettingsButton","Popover","PopoverTrigger","PopoverContent","FlowRunGraphActions","FlowRunGraphArtifactDrawer","artifactId","onClose","Sheet","open","SheetContent","SheetHeader","SheetTitle","Suspense","ArtifactContentSkeleton","ArtifactContent","Skeleton","useSuspenseQuery","buildGetArtifactQuery","KeyValue","FormattedDate","FlowRunGraphArtifactsPopover","selection","onViewArtifact","artifacts","isLoading","useQuery","buildListArtifactsQuery","position","anchorStyle","PopoverAnchor","getEventLabel","eventName","label","formatDateNumeric","date","parsedDate","isValid","format","getResourceName","resource","EventResourceSection","resourceName","prefectResourceId","resourceType","parseResourceType","extractedId","extractResourceId","relatedResources","ResourceDisplaySkeleton","EventResourceLink","ResourceDisplayWithIcon","ResolvedResourceDisplay","RelatedResourcesSection","filteredResources","role","resourceId","FlowRunGraphEventPopover","buildGetEventQuery","eventLabel","Link","FlowRunGraphEventsPopover","eventQueries","useQueries","q","events","ScrollArea","FlowRunGraphSelectionPanel","isNodeSelection","SelectionPanelSkeleton","TaskRunDetails","FlowRunDetails","taskRunId","taskRun","buildGetTaskRunQuery","duration","StateBadge","secondsToApproximateString","TagBadgeGroup","flowRunId","flowRun","buildGetFlowRunDetailsQuery","FlowRunGraphStatePopover","popoverRef","useRef","handleClickOutside","handleEscape","popoverStyle","TERMINAL_STATES","FlowRunGraph","stateType","viewport","onViewportChange","controlledSelected","onSelectedChange","className","style","controlledFullscreen","stageRef","internalFullscreen","setInternalFullscreen","internalSelected","setInternalSelected","selectedArtifactId","setSelectedArtifactId","resolvedTheme","useTheme","selected","isTerminal","taskRunCount","buildCountTaskRunsQuery","subflowRunCount","buildCountFlowRunsQuery","hasNodes","updateFullscreen","config","useMemo","getStateColor","setConfig","start","stop","selectItem","updateViewportFromDateRange","offItemSelected","emitter","offViewportDateRangeUpdated","range","heightClass","isStateSelection","isEventSelection","isEventsSelection","isArtifactsSelection"],"mappings":"w9BAmBA,eAAsBA,GAAkBC,EAAmC,CAC1E,KAAM,CAAE,KAAAC,CAAA,EAAS,MAAO,MAAMC,MAAmB,IAChD,2BACA,CACC,OAAQ,CAAE,KAAM,CAAE,GAAAF,EAAG,CAAE,CACxB,EAGD,GAAI,CAACC,EACJ,MAAM,IAAI,MAAM,2BAA2B,EAG5C,OAAOE,GAA6BF,CAAI,CACzC,CASA,eAAsBG,GAAmB,CACxC,MAAAC,EACA,MAAAC,EACA,OAAAC,CACD,EAAyD,CACxD,KAAM,CAAE,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AAA,CAAA,EAEtB,EACCP,GAAYvC,GAAgBuC,CAAQ,GACpC7J,EAAAA,IAACqH,GAAA,CACA,UAAWwC,EACX,QAAS,IAAM,CACdL,EAAoB,MAAS,EAC7BR,IAAmB,MAAS,CAC7B,CAAA,CAAA,EAGDa,GAAYqB,GAAiBrB,CAAQ,GACrC7J,EAAAA,IAACoI,GAAA,CACA,UAAWyB,EACX,QAAS,IAAM,CACdL,EAAoB,MAAS,EAC7BR,IAAmB,MAAS,CAC7B,CAAA,CAAA,EAGDa,GAAYsB,GAAiBtB,CAAQ,GACrC7J,EAAAA,IAAC2G,GAAA,CACA,UAAWkD,EACX,QAAS,IAAM,CACdL,EAAoB,MAAS,EAC7BR,IAAmB,MAAS,CAC7B,CAAA,CAAA,EAGDa,GAAYuB,GAAkBvB,CAAQ,GACtC7J,EAAAA,IAAC+G,GAAA,CACA,UAAW8C,EACX,QAAS,IAAM,CACdL,EAAoB,MAAS,EAC7BR,IAAmB,MAAS,CAC7B,CAAA,CAAA,EAGDa,GAAYwB,GAAqBxB,CAAQ,GACzC7J,EAAAA,IAACuE,GAAA,CACA,UAAWsF,EACX,QAAS,IAAM,CACdL,EAAoB,MAAS,EAC7BR,IAAmB,MAAS,CAC7B,EACA,eAAiBxF,GAAe,CAC/BkG,EAAsBlG,CAAU,EAChCgG,EAAoB,MAAS,EAC7BR,IAAmB,MAAS,CAC7B,CAAA,CAAA,EAGFhJ,EAAAA,IAACuD,GAAA,CACA,WAAYkG,GACZ,QAAS,IAAMC,EAAsB,IAAI,CAAA,CAAA,CAC1C,EACD,CAEF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as r}from"./vendor-tanstack-BdLtprmr.js";import{s}from"./index-
|
|
2
|
-
//# sourceMappingURL=flow-run._id-
|
|
1
|
+
import{j as r}from"./vendor-tanstack-BdLtprmr.js";import{s}from"./index-CPpeVt8m.js";import{R as a}from"./route-error-state-BqbnZCc-.js";import{o as i,e as m}from"./vendor-forms-BlFSCfFw.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-radix-CJc458uP.js";import"./vendor-recharts-CY3PKigC.js";import"./vendor-date-Cl1Jav-N.js";i({tab:m(["Logs","TaskRuns","SubflowRuns","Artifacts","Details","Parameters","JobVariables"]).default("Logs").catch("Logs")});function R({error:o,reset:e}){const t=s(o,"Failed to load flow run");return r.jsxs("div",{className:"flex flex-col gap-4",children:[r.jsx("div",{children:r.jsx("h1",{className:"text-2xl font-semibold",children:"Flow Run"})}),r.jsx(a,{error:t,onRetry:e})]})}export{R as errorComponent};
|
|
2
|
+
//# sourceMappingURL=flow-run._id-Dn9R_Tjy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow-run._id-Dn9R_Tjy.js","sources":["../../src/routes/runs/flow-run.$id.tsx?tsr-split=errorComponent"],"sourcesContent":["import type { ErrorComponentProps } from \"@tanstack/react-router\";\nimport { createFileRoute, notFound, useNavigate } from \"@tanstack/react-router\";\nimport { zodValidator } from \"@tanstack/zod-adapter\";\nimport { z } from \"zod\";\nimport { buildListArtifactsQuery } from \"@/api/artifacts\";\nimport { categorizeError } from \"@/api/error-utils\";\nimport { buildGetFlowRunDetailsQuery } from \"@/api/flow-runs\";\nimport { buildInfiniteFilterLogsQuery } from \"@/api/logs\";\nimport { buildPaginateTaskRunsQuery } from \"@/api/task-runs\";\nimport { FlowRunDetailsPage } from \"@/components/flow-runs/flow-run-details-page\";\nimport { FlowRunNotFound } from \"@/components/flow-runs/flow-run-not-found\";\nimport { PrefectLoading } from \"@/components/ui/loading\";\nimport { RouteErrorState } from \"@/components/ui/route-error-state\";\n\nconst searchParams = z.object({\n\ttab: z\n\t\t.enum([\n\t\t\t\"Logs\",\n\t\t\t\"TaskRuns\",\n\t\t\t\"SubflowRuns\",\n\t\t\t\"Artifacts\",\n\t\t\t\"Details\",\n\t\t\t\"Parameters\",\n\t\t\t\"JobVariables\",\n\t\t])\n\t\t.default(\"Logs\")\n\t\t.catch(\"Logs\"),\n});\n\nexport type FlowRunDetailsTabOptions = z.infer<typeof searchParams>[\"tab\"];\n\nfunction FlowRunErrorComponent({ error, reset }: ErrorComponentProps) {\n\tconst serverError = categorizeError(error, \"Failed to load flow run\");\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<div>\n\t\t\t\t<h1 className=\"text-2xl font-semibold\">Flow Run</h1>\n\t\t\t</div>\n\t\t\t<RouteErrorState error={serverError} onRetry={reset} />\n\t\t</div>\n\t);\n}\n\nexport const Route = createFileRoute(\"/runs/flow-run/$id\")({\n\tvalidateSearch: zodValidator(searchParams),\n\tcomponent: RouteComponent,\n\tloader: async ({ params, context: { queryClient } }) => {\n\t\t// ----- Deferred data\n\t\tvoid queryClient.prefetchInfiniteQuery(\n\t\t\tbuildInfiniteFilterLogsQuery({\n\t\t\t\tlimit: 50,\n\t\t\t\tsort: \"TIMESTAMP_ASC\",\n\t\t\t\tlogs: {\n\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\tlevel: {\n\t\t\t\t\t\tge_: 0,\n\t\t\t\t\t},\n\t\t\t\t\tflow_run_id: {\n\t\t\t\t\t\tany_: [params.id],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}),\n\t\t);\n\n\t\tvoid queryClient.prefetchQuery(\n\t\t\tbuildListArtifactsQuery({\n\t\t\t\tartifacts: {\n\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\tflow_run_id: {\n\t\t\t\t\t\tany_: [params.id],\n\t\t\t\t\t},\n\t\t\t\t\ttype: {\n\t\t\t\t\t\tnot_any_: [\"result\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tsort: \"ID_DESC\",\n\t\t\t\toffset: 0,\n\t\t\t}),\n\t\t);\n\n\t\tvoid queryClient.prefetchQuery(\n\t\t\tbuildPaginateTaskRunsQuery({\n\t\t\t\tpage: 1,\n\t\t\t\tsort: \"EXPECTED_START_TIME_DESC\",\n\t\t\t\tflow_runs: {\n\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\tid: {\n\t\t\t\t\t\tany_: [params.id],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}),\n\t\t);\n\n\t\t// ----- Critical data\n\t\ttry {\n\t\t\tawait queryClient.ensureQueryData(buildGetFlowRunDetailsQuery(params.id));\n\t\t} catch (error) {\n\t\t\t// Only treat \"not found\" errors as 404, rethrow other errors\n\t\t\tif (error instanceof Error && /not found/i.test(error.message)) {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/only-throw-error\n\t\t\t\tthrow notFound();\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t},\n\twrapInSuspense: true,\n\tpendingComponent: PrefectLoading,\n\terrorComponent: FlowRunErrorComponent,\n\tnotFoundComponent: FlowRunNotFound,\n});\n\nfunction RouteComponent() {\n\tconst { id } = Route.useParams();\n\tconst { tab } = Route.useSearch();\n\tconst navigate = useNavigate();\n\n\tconst onTabChange = (tab: FlowRunDetailsTabOptions) => {\n\t\tvoid navigate({\n\t\t\tto: \".\",\n\t\t\tsearch: (prev) => ({\n\t\t\t\t...prev,\n\t\t\t\ttab,\n\t\t\t}),\n\t\t});\n\t};\n\n\treturn <FlowRunDetailsPage id={id} tab={tab} onTabChange={onTabChange} />;\n}\n"],"names":["z","tab","default","catch","FlowRunErrorComponent","error","reset","serverError","categorizeError","jsxs","jsx","RouteErrorState"],"mappings":"6UAcqBA,EAAS,CAC7BC,IAAKD,EACE,CACL,OACA,WACA,cACA,YACA,UACA,aACA,cAAc,CACd,EACAE,QAAQ,MAAM,EACdC,MAAM,MAAM,CACf,CAAC,EAID,SAASC,EAAsB,CAAEC,MAAAA,EAAOC,MAAAA,CAA2B,EAAG,CACrE,MAAMC,EAAcC,EAAgBH,EAAO,yBAAyB,EACpE,OACCI,EAAAA,KAAC,MAAA,CAAI,UAAU,sBACd,SAAA,CAAAC,EAAAA,IAAC,OACA,SAAAA,EAAAA,IAAC,KAAA,CAAG,UAAU,yBAAyB,oBAAQ,CAAA,CAChD,EACAA,EAAAA,IAACC,EAAA,CAAgB,MAAOJ,EAAa,QAASD,CAAAA,CAAM,CAAA,EACrD,CAEF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as t,L as o}from"./vendor-tanstack-BdLtprmr.js";import{E as s,t as e,v as n,w as r,x as a,q as i}from"./index-
|
|
2
|
-
//# sourceMappingURL=flow-run._id-
|
|
1
|
+
import{j as t,L as o}from"./vendor-tanstack-BdLtprmr.js";import{E as s,t as e,v as n,w as r,x as a,q as i}from"./index-CPpeVt8m.js";import{o as m,e as p}from"./vendor-forms-BlFSCfFw.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-radix-CJc458uP.js";import"./vendor-recharts-CY3PKigC.js";import"./vendor-date-Cl1Jav-N.js";function u(){return t.jsxs(s,{children:[t.jsx(e,{id:"Search"}),t.jsx(n,{children:"Flow Run Not Found"}),t.jsx(r,{children:"The flow run you are looking for does not exist or has been deleted."}),t.jsx(a,{children:t.jsx(i,{asChild:!0,children:t.jsx(o,{to:"/runs",children:"Back to Runs"})})})]})}m({tab:p(["Logs","TaskRuns","SubflowRuns","Artifacts","Details","Parameters","JobVariables"]).default("Logs").catch("Logs")});const y=u;export{y as notFoundComponent};
|
|
2
|
+
//# sourceMappingURL=flow-run._id-Dwx7ojcj.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow-run._id-Dwx7ojcj.js","sources":["../../src/components/flow-runs/flow-run-not-found.tsx","../../src/routes/runs/flow-run.$id.tsx?tsr-split=notFoundComponent"],"sourcesContent":["import { Link } from \"@tanstack/react-router\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tEmptyState,\n\tEmptyStateActions,\n\tEmptyStateDescription,\n\tEmptyStateIcon,\n\tEmptyStateTitle,\n} from \"@/components/ui/empty-state\";\n\nexport function FlowRunNotFound() {\n\treturn (\n\t\t<EmptyState>\n\t\t\t<EmptyStateIcon id=\"Search\" />\n\t\t\t<EmptyStateTitle>Flow Run Not Found</EmptyStateTitle>\n\t\t\t<EmptyStateDescription>\n\t\t\t\tThe flow run you are looking for does not exist or has been deleted.\n\t\t\t</EmptyStateDescription>\n\t\t\t<EmptyStateActions>\n\t\t\t\t<Button asChild>\n\t\t\t\t\t<Link to=\"/runs\">Back to Runs</Link>\n\t\t\t\t</Button>\n\t\t\t</EmptyStateActions>\n\t\t</EmptyState>\n\t);\n}\n","import type { ErrorComponentProps } from \"@tanstack/react-router\";\nimport { createFileRoute, notFound, useNavigate } from \"@tanstack/react-router\";\nimport { zodValidator } from \"@tanstack/zod-adapter\";\nimport { z } from \"zod\";\nimport { buildListArtifactsQuery } from \"@/api/artifacts\";\nimport { categorizeError } from \"@/api/error-utils\";\nimport { buildGetFlowRunDetailsQuery } from \"@/api/flow-runs\";\nimport { buildInfiniteFilterLogsQuery } from \"@/api/logs\";\nimport { buildPaginateTaskRunsQuery } from \"@/api/task-runs\";\nimport { FlowRunDetailsPage } from \"@/components/flow-runs/flow-run-details-page\";\nimport { FlowRunNotFound } from \"@/components/flow-runs/flow-run-not-found\";\nimport { PrefectLoading } from \"@/components/ui/loading\";\nimport { RouteErrorState } from \"@/components/ui/route-error-state\";\n\nconst searchParams = z.object({\n\ttab: z\n\t\t.enum([\n\t\t\t\"Logs\",\n\t\t\t\"TaskRuns\",\n\t\t\t\"SubflowRuns\",\n\t\t\t\"Artifacts\",\n\t\t\t\"Details\",\n\t\t\t\"Parameters\",\n\t\t\t\"JobVariables\",\n\t\t])\n\t\t.default(\"Logs\")\n\t\t.catch(\"Logs\"),\n});\n\nexport type FlowRunDetailsTabOptions = z.infer<typeof searchParams>[\"tab\"];\n\nfunction FlowRunErrorComponent({ error, reset }: ErrorComponentProps) {\n\tconst serverError = categorizeError(error, \"Failed to load flow run\");\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<div>\n\t\t\t\t<h1 className=\"text-2xl font-semibold\">Flow Run</h1>\n\t\t\t</div>\n\t\t\t<RouteErrorState error={serverError} onRetry={reset} />\n\t\t</div>\n\t);\n}\n\nexport const Route = createFileRoute(\"/runs/flow-run/$id\")({\n\tvalidateSearch: zodValidator(searchParams),\n\tcomponent: RouteComponent,\n\tloader: async ({ params, context: { queryClient } }) => {\n\t\t// ----- Deferred data\n\t\tvoid queryClient.prefetchInfiniteQuery(\n\t\t\tbuildInfiniteFilterLogsQuery({\n\t\t\t\tlimit: 50,\n\t\t\t\tsort: \"TIMESTAMP_ASC\",\n\t\t\t\tlogs: {\n\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\tlevel: {\n\t\t\t\t\t\tge_: 0,\n\t\t\t\t\t},\n\t\t\t\t\tflow_run_id: {\n\t\t\t\t\t\tany_: [params.id],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}),\n\t\t);\n\n\t\tvoid queryClient.prefetchQuery(\n\t\t\tbuildListArtifactsQuery({\n\t\t\t\tartifacts: {\n\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\tflow_run_id: {\n\t\t\t\t\t\tany_: [params.id],\n\t\t\t\t\t},\n\t\t\t\t\ttype: {\n\t\t\t\t\t\tnot_any_: [\"result\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tsort: \"ID_DESC\",\n\t\t\t\toffset: 0,\n\t\t\t}),\n\t\t);\n\n\t\tvoid queryClient.prefetchQuery(\n\t\t\tbuildPaginateTaskRunsQuery({\n\t\t\t\tpage: 1,\n\t\t\t\tsort: \"EXPECTED_START_TIME_DESC\",\n\t\t\t\tflow_runs: {\n\t\t\t\t\toperator: \"and_\",\n\t\t\t\t\tid: {\n\t\t\t\t\t\tany_: [params.id],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}),\n\t\t);\n\n\t\t// ----- Critical data\n\t\ttry {\n\t\t\tawait queryClient.ensureQueryData(buildGetFlowRunDetailsQuery(params.id));\n\t\t} catch (error) {\n\t\t\t// Only treat \"not found\" errors as 404, rethrow other errors\n\t\t\tif (error instanceof Error && /not found/i.test(error.message)) {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/only-throw-error\n\t\t\t\tthrow notFound();\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t},\n\twrapInSuspense: true,\n\tpendingComponent: PrefectLoading,\n\terrorComponent: FlowRunErrorComponent,\n\tnotFoundComponent: FlowRunNotFound,\n});\n\nfunction RouteComponent() {\n\tconst { id } = Route.useParams();\n\tconst { tab } = Route.useSearch();\n\tconst navigate = useNavigate();\n\n\tconst onTabChange = (tab: FlowRunDetailsTabOptions) => {\n\t\tvoid navigate({\n\t\t\tto: \".\",\n\t\t\tsearch: (prev) => ({\n\t\t\t\t...prev,\n\t\t\t\ttab,\n\t\t\t}),\n\t\t});\n\t};\n\n\treturn <FlowRunDetailsPage id={id} tab={tab} onTabChange={onTabChange} />;\n}\n"],"names":["FlowRunNotFound","EmptyState","jsx","EmptyStateIcon","EmptyStateTitle","EmptyStateDescription","EmptyStateActions","Button","Link","z","tab","default","catch","SplitNotFoundComponent"],"mappings":"wUAUO,SAASA,GAAkB,CACjC,cACEC,EAAA,CACA,SAAA,CAAAC,EAAAA,IAACC,EAAA,CAAe,GAAG,QAAA,CAAS,EAC5BD,EAAAA,IAACE,GAAgB,SAAA,oBAAA,CAAkB,EACnCF,EAAAA,IAACG,GAAsB,SAAA,sEAAA,CAEvB,EACAH,EAAAA,IAACI,EAAA,CACA,SAAAJ,EAAAA,IAACK,EAAA,CAAO,QAAO,GACd,SAAAL,EAAAA,IAACM,EAAA,CAAK,GAAG,QAAQ,SAAA,cAAA,CAAY,CAAA,CAC9B,CAAA,CACD,CAAA,EACD,CAEF,CCXqBC,EAAS,CAC7BC,IAAKD,EACE,CACL,OACA,WACA,cACA,YACA,UACA,aACA,cAAc,CACd,EACAE,QAAQ,MAAM,EACdC,MAAM,MAAM,CACf,CAAC,EAE0E,MAAAC,EAnBlEb"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/flow-run-graph-CycKStSg.js","assets/vendor-tanstack-BdLtprmr.js","assets/vendor-react-HBv6Kpyp.js","assets/vendor-graphs-_sWgqfe-.js","assets/index-CPpeVt8m.js","assets/vendor-radix-CJc458uP.js","assets/vendor-recharts-CY3PKigC.js","assets/vendor-forms-BlFSCfFw.js","assets/vendor-date-Cl1Jav-N.js","assets/index-DJXBzX1E.css","assets/state-colors-CAAf0Eg3.js","assets/key-value-DI27Dv4P.js","assets/event-resource-display-C1ZAey-o.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{j as e,r as n,s as q,t as D,L as U,I as Ue,n as H,g as Ge,d as Qe}from"./vendor-tanstack-BdLtprmr.js";import{b8 as x,ce as Ve,cf as qe,q as b,cg as Be,aZ as J,by as $e,C as xe,o as pe,c8 as We,bO as ae,$ as he,ch as B,aQ as je,ci as ge,cj as fe,ck as ye,cl as Ne,cm as ve,at as C,ao as V,i as _e,cn as be,co as Se,cp as Ce,y,a2 as K,a3 as X,a4 as Y,a5 as Z,a6 as ee,p as He,cq as we,a7 as se,cr as ke,cs as te,ct as Je,aG as De,B as Ke,g as Xe,h as re,bv as Ye,bE as Ze,bG as es,H as ss,I as _,aP as as,c7 as ts,bS as rs,bT as ls,bU as ns,bV as is,cu as os,ca as cs,S as Fe,a as Te,c as Ee,e as W,b as ds,bP as Ae,aF as us,aH as le,af as ms,V as Le,cv as ne,cw as $,aI as ie,aq as xs,cx as ps,cy as hs,cz as js,cA as gs,cB as fs,L as oe,az as ys,aA as Ns,aB as L,aC as P,cC as ce}from"./index-CPpeVt8m.js";import{R as vs,b as _s,C as bs,a as Ss,u as Cs}from"./use-state-favicon-CMsL9s6j.js";import{A as ws}from"./artifact-card-BnPKAfkY.js";import{T as ks,a as de}from"./toggle-group-EMgSOoYH.js";import{K as S}from"./key-value-DI27Dv4P.js";import{u as Ds,L as Fs}from"./schema-form-input-string-format-datetime-Dg3zVAp5.js";import{L as Ts}from"./lazy-markdown-D_y73qoD.js";import{D as Es}from"./delete-confirmation-dialog-BZg9EOfN.js";import{u as As}from"./use-delete-confirmation-dialog-CkL-rSsp.js";import{D as Pe,a as Ie,b as ze,d as w,e as Ls}from"./dropdown-menu-fRiq5bS-.js";import{S as Ps}from"./sort-filter-X6JyRc0-.js";import{S as Is,a as zs,F as Rs}from"./flow-runs-pagination-DMLZFM1m.js";import{T as Ms,b as Os,a as Us}from"./task-runs-pagination-B2fSdB1t.js";import{T as Gs}from"./tags-input-DqZ8v99z.js";import{o as Qs,e as Vs}from"./vendor-forms-BlFSCfFw.js";import"./vendor-react-HBv6Kpyp.js";import"./vendor-radix-CJc458uP.js";import"./vendor-recharts-CY3PKigC.js";import"./vendor-date-Cl1Jav-N.js";import"./index-C63VUjOh.js";import"./zod-B1GLD-Zc.js";import"./use-debounce-callback-Dk7Ebi48.js";import"./timezone-select-NViFNNLz.js";import"./form-Cl5Hk9bq.js";const qs=["RUNNING","SCHEDULED","PENDING","PAUSED"],Bs=["COMPLETED","FAILED","CANCELLED","CRASHED"];function $s(s){return s!=null&&qs.includes(s)}function Ws(s){return s==="RUNNING"}function Hs(s){return s==="PAUSED"}function Js(s){return s!=null&&Bs.includes(s)}const Ks=n.lazy(()=>Ve(()=>import("./flow-run-graph-CycKStSg.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])).then(s=>({default:s.FlowRunGraph})));function Xs(s){return e.jsx(n.Suspense,{fallback:e.jsx(x,{className:"h-[500px] w-full"}),children:e.jsx(Ks,{...s})})}class G extends n.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}render(){if(this.state.hasError){const{fallback:t}=this.props;return typeof t=="function"?t(this.state.error??new Error("Unknown error")):t}return this.props.children}}function Q({error:s,onRetry:t,isRetrying:a}){return e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[e.jsx("div",{className:"rounded-full bg-destructive/10 p-2 mb-3",children:e.jsx(qe,{className:"size-6 text-destructive"})}),e.jsxs("div",{className:"space-y-1 mb-4",children:[e.jsx("p",{className:"font-medium",children:s.message}),s.details&&e.jsx("p",{className:"text-xs text-muted-foreground max-w-sm",children:s.details})]}),t&&e.jsxs(b,{variant:"outline",size:"sm",onClick:t,disabled:a,className:"gap-2",children:[e.jsx(Be,{className:J("size-3",a&&"animate-spin")}),a?"Retrying...":"Retry"]})]})}const Ys=({flowRun:s})=>{const[t,a]=n.useState("grid"),{data:c}=q($e({artifacts:{operator:"and_",flow_run_id:{any_:[s.id]},type:{not_any_:["result"]}},sort:"ID_DESC",offset:0}));return c.length===0?e.jsx(xe,{children:e.jsx(pe,{className:"text-center",children:e.jsxs("p",{children:["This flow run did not produce any artifacts; for more information on creating artifacts, see the"," ",e.jsx("a",{href:"https://docs.prefect.io/v3/develop/artifacts",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500",children:"documentation"}),"."]})})}):e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"flex justify-end",children:e.jsxs(ks,{type:"single",variant:"outline",value:t,onValueChange:r=>a(r),children:[e.jsx(de,{value:"grid","aria-label":"Grid view",children:e.jsx(We,{className:"w-4 h-4"})}),e.jsx(de,{value:"list","aria-label":"List view",children:e.jsx(vs,{className:"w-4 h-4"})})]})}),e.jsx("div",{className:J("grid",t==="grid"?"grid-cols-1 lg:grid-cols-2 xl:grid-cols-3":"grid-cols-1","gap-4"),"data-testid":"flow-run-artifacts-grid",children:c.map(r=>e.jsx(ws,{artifact:r,compact:t==="list"},r.id))})]})};function Zs({flowRun:s}){return s?e.jsxs("div",{className:"space-y-4",children:[e.jsx(S,{label:"Run Count",value:s.run_count}),e.jsx(S,{label:"Created",value:e.jsx(ae,{date:s.created})}),s.created_by?.display_value&&e.jsx(S,{label:"Created By",value:s.created_by.display_value}),e.jsx(S,{label:"Last Updated",value:e.jsx(ae,{date:s.updated})}),s.idempotency_key&&e.jsx(S,{label:"Idempotency Key",value:s.idempotency_key}),s.tags&&s.tags.length>0&&e.jsx(S,{label:"Tags",value:e.jsx(he,{tags:s.tags})}),e.jsx(S,{label:"Flow Run ID",value:s.id,copyable:!0}),s.state?.message&&e.jsx(S,{label:"State Message",value:s.state.message}),s.flow_version&&e.jsx(S,{label:"Flow Version",value:s.flow_version}),s.empirical_policy?.retries!=null&&e.jsxs(e.Fragment,{children:[e.jsx(S,{label:"Retries",value:s.empirical_policy.retries}),e.jsx(S,{label:"Retry Delay",value:s.empirical_policy.retry_delay})]})]}):e.jsx("div",{className:"flex flex-col gap-2 bg-gray-100 p-4 rounded-md",children:e.jsx("span",{className:"text-gray-500",children:"No flow run details available"})})}const ea=({flowRun:s,open:t,onOpenChange:a})=>{const[c,r]=n.useState(!1),{setFlowRunState:m,isPending:o}=B(),{data:d=[]}=D({...je({flow_runs:{operator:"and_",parent_flow_run_id:{operator:"and_",any_:[s.id]},state:{operator:"and_",type:{any_:["RUNNING","SCHEDULED","PENDING","PAUSED"]}}},sort:"START_TIME_DESC",limit:100,offset:0}),enabled:t}),i=d.length>0,j=u=>{for(const p of d)m({id:p.id,state:{type:"CANCELLING",name:"Cancelling"},force:!0},{onError:()=>{u.push(p.name??p.id)}})},l=()=>{m({id:s.id,state:{type:"CANCELLING",name:"Cancelling"},force:!0},{onSuccess:()=>{if(c&&d.length>0){const u=[];j(u),u.length>0?y.error(`Failed to cancel some sub-flows: ${u.join(", ")}`):y.success(`Flow run and ${d.length} sub-flow${d.length===1?"":"s"} cancelled`)}else y.success("Flow run cancelled");a(!1)},onError:u=>{y.error(u.message||"Failed to cancel flow run")}})};return e.jsx(ge,{open:t,onOpenChange:a,children:e.jsxs(fe,{children:[e.jsxs(ye,{children:[e.jsx(Ne,{children:"Cancel Flow Run"}),e.jsx(ve,{asChild:!0,children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{children:["Are you sure you want to cancel"," ",e.jsx("span",{className:"font-medium",children:s.name}),"?"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Current state:"}),s.state_type&&s.state_name&&e.jsx(C,{type:s.state_type,name:s.state_name})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Will become:"}),e.jsx(C,{type:"CANCELLING",name:"Cancelling"})]})]})})]}),i&&e.jsxs("div",{className:"flex items-center space-x-2 py-2",children:[e.jsx(V,{id:"cancel-subflows",checked:c,onCheckedChange:u=>r(u===!0)}),e.jsxs(_e,{htmlFor:"cancel-subflows",className:"text-sm cursor-pointer",children:["Also cancel ",d.length," sub-flow run",d.length===1?"":"s"]})]}),e.jsxs(be,{children:[e.jsx(Se,{disabled:o,children:"Cancel"}),e.jsx(Ce,{onClick:u=>{u.preventDefault(),l()},disabled:o,children:o?"Cancelling...":"Cancel Flow Run"})]})]})})},sa=({flowRun:s,open:t,onOpenChange:a})=>{const[c,r]=n.useState(300),{setFlowRunState:m,isPending:o}=B(),d=()=>{const j=new Date(Date.now()+c*1e3).toISOString();m({id:s.id,state:{type:"PAUSED",name:"Suspended",state_details:{pause_timeout:j,pause_reschedule:!0,deferred:!1,untrackable_result:!1}},force:!0},{onSuccess:()=>{y.success("Flow run paused"),a(!1)},onError:l=>{y.error(l.message||"Failed to pause flow run")}})},i=c>=5;return e.jsx(K,{open:t,onOpenChange:a,children:e.jsxs(X,{children:[e.jsxs(Y,{children:[e.jsx(Z,{children:"Pause Flow Run"}),e.jsx(ee,{asChild:!0,children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{children:["Pause ",e.jsx("span",{className:"font-medium",children:s.name})," for a specified duration. The flow will automatically resume after the timeout."]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Current state:"}),s.state_type&&s.state_name&&e.jsx(C,{type:s.state_type,name:s.state_name})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Will become:"}),e.jsx(C,{type:"PAUSED",name:"Suspended"})]})]})})]}),e.jsxs("div",{className:"space-y-2 py-4",children:[e.jsx(_e,{htmlFor:"timeout",children:"Timeout (seconds)"}),e.jsx(He,{id:"timeout",type:"number",min:5,value:c,onChange:j=>r(Number.parseInt(j.target.value,10)||5)}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Will pause for ",we(c),". Minimum 5 seconds."]})]}),e.jsxs(se,{children:[e.jsx(b,{type:"button",variant:"outline",onClick:()=>a(!1),disabled:o,children:"Cancel"}),e.jsx(b,{onClick:d,disabled:o||!i,loading:o,children:"Pause Flow Run"})]})]})})},aa=({flowRun:s,open:t,onOpenChange:a})=>{const c=s.state?.state_details?.run_input_keyset;return c&&c.schema?e.jsx(K,{open:t,onOpenChange:a,children:e.jsx(X,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:e.jsx(n.Suspense,{fallback:e.jsx(Re,{}),children:e.jsx(ra,{flowRun:s,keyset:c,onOpenChange:a})})})}):e.jsx(ta,{flowRun:s,open:t,onOpenChange:a})},ta=({flowRun:s,open:t,onOpenChange:a})=>{const{resumeFlowRun:c,isPending:r}=ke(),m=()=>{c({id:s.id},{onSuccess:()=>{y.success("Flow run resumed"),a(!1)},onError:o=>{y.error(o.message||"Failed to resume flow run")}})};return e.jsx(K,{open:t,onOpenChange:a,children:e.jsxs(X,{children:[e.jsxs(Y,{children:[e.jsx(Z,{children:"Resume Flow Run"}),e.jsx(ee,{asChild:!0,children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{children:["Resume the paused flow run"," ",e.jsx("span",{className:"font-medium",children:s.name}),"?"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Current state:"}),s.state_type&&s.state_name&&e.jsx(C,{type:s.state_type,name:s.state_name})]})]})})]}),e.jsxs(se,{children:[e.jsx(b,{type:"button",variant:"outline",onClick:()=>a(!1),disabled:r,children:"Cancel"}),e.jsx(b,{onClick:m,disabled:r,loading:r,children:"Resume"})]})]})})},ra=({flowRun:s,keyset:t,onOpenChange:a})=>{const{resumeFlowRun:c,isPending:r}=ke(),{values:m,setValues:o,errors:d,validateForm:i}=Ds(),{data:j}=D({...te(s.id,t.schema),select:p=>p}),{data:l}=D({...te(s.id,t.description??""),enabled:!!t.description,select:p=>p});n.useEffect(()=>{o({})},[o]);const u=async()=>{if(j)try{if(await i({schema:m}),d.length>0)return;c({id:s.id,runInput:m},{onSuccess:()=>{y.success("Flow run resumed"),a(!1)},onError:p=>{y.error(p.message||"Failed to resume flow run")}})}catch{y.error("Failed to validate input")}};return j?e.jsxs(e.Fragment,{children:[e.jsxs(Y,{children:[e.jsx(Z,{children:"Resume Flow Run"}),e.jsx(ee,{asChild:!0,children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{children:["Provide input to resume"," ",e.jsx("span",{className:"font-medium",children:s.name})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Current state:"}),s.state_type&&s.state_name&&e.jsx(C,{type:s.state_type,name:s.state_name})]})]})})]}),l&&e.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none py-2 px-3 bg-muted/50 rounded-md",children:e.jsx(Ts,{children:l})}),e.jsx("div",{className:"py-4",children:e.jsx(Fs,{schema:j,values:m,onValuesChange:o,errors:d,kinds:["json"]})}),e.jsxs(se,{children:[e.jsx(b,{type:"button",variant:"outline",onClick:()=>a(!1),disabled:r,children:"Cancel"}),e.jsx(b,{onClick:()=>{u()},disabled:r,loading:r,children:"Resume"})]})]}):e.jsx(Re,{})},Re=()=>e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(x,{className:"h-6 w-48"}),e.jsx(x,{className:"h-4 w-full"}),e.jsx(x,{className:"h-32 w-full"}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(x,{className:"h-10 w-20"}),e.jsx(x,{className:"h-10 w-20"})]})]}),la=({flowRun:s,open:t,onOpenChange:a})=>{const{setFlowRunState:c,isPending:r}=B(),m=()=>{c({id:s.id,state:{type:"SCHEDULED",name:"AwaitingRetry",message:"Retry from the UI"},force:!0},{onSuccess:()=>{y.success("Flow run scheduled for retry"),a(!1)},onError:o=>{y.error(o.message||"Failed to retry flow run")}})};return e.jsx(ge,{open:t,onOpenChange:a,children:e.jsxs(fe,{children:[e.jsxs(ye,{children:[e.jsx(Ne,{children:"Retry Flow Run"}),e.jsx(ve,{asChild:!0,children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{children:["Retry the flow run"," ",e.jsx("span",{className:"font-medium",children:s.name}),"?"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Current state:"}),s.state_type&&s.state_name&&e.jsx(C,{type:s.state_type,name:s.state_name})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Will become:"}),e.jsx(C,{type:"SCHEDULED",name:"AwaitingRetry"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Task runs with persisted results will use cached values. Task runs without persisted results will be re-executed."})]})})]}),e.jsxs(be,{children:[e.jsx(Se,{disabled:r,children:"Cancel"}),e.jsx(Ce,{onClick:o=>{o.preventDefault(),m()},disabled:r,children:r?"Retrying...":"Retry"})]})]})})};function na({flowRun:s,onDeleteClick:t}){const[a,c]=As(),{open:r,onOpenChange:m,openDialog:o}=_s(),[d,i]=n.useState(!1),[j,l]=n.useState(!1),[u,p]=n.useState(!1),[v,g]=n.useState(!1),{setFlowRunState:F,isPending:T}=B(),E=s.state_type&&["COMPLETED","FAILED","CANCELLED","CRASHED"].includes(s.state_type),A=$s(s.state_type)&&s.deployment_id,I=Ws(s.state_type)&&s.deployment_id,z=Hs(s.state_type),R=Js(s.state_type)&&s.deployment_id,M=k=>{F({id:s.id,state:{type:k.type,name:k.type.charAt(0)+k.type.slice(1).toLowerCase(),message:k.message},force:!0},{onSuccess:()=>{y.success("Flow run state changed"),m(!1)},onError:Oe=>{y.error(Oe.message||"Failed to change state")}})},{data:N}=D({...Je(s.deployment_id??""),enabled:!!s.deployment_id}),{data:h}=D({...De({task_runs:{operator:"and_",flow_run_id:{operator:"and_",any_:[s.id],is_null_:!1}}})}),{data:f}=D({...je({sort:"START_TIME_DESC",offset:0,limit:1,task_runs:{operator:"and_",id:{any_:[s.parent_task_run_id??""]}}}),enabled:!!s.parent_task_run_id}),O=f?.[0],Me=k=>k===void 0?"...":k===0?"None":`${k} Task run${k===1?"":"s"}`;return e.jsxs("div",{className:"flex flex-row justify-between",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(Ke,{children:e.jsxs(Xe,{children:[e.jsx(re,{children:e.jsx(Ye,{to:"/runs",className:"text-xl font-semibold",children:"Runs"})}),e.jsx(Ze,{}),e.jsxs(re,{className:"text-xl",children:[e.jsx(es,{className:"font-semibold",children:s.name}),s.work_pool_name&&e.jsx(ss,{variant:"outline",className:"ml-2",children:s.work_pool_name}),s.tags&&s.tags.length>0&&e.jsx("div",{className:"ml-2",children:e.jsx(he,{tags:s.tags,maxTagsDisplayed:3})})]})]})}),e.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[s.state_type&&s.state_name&&e.jsx(C,{type:s.state_type,name:s.state_name}),s.start_time&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(_,{id:"Calendar",className:"size-4"}),e.jsx("span",{children:as(s.start_time,"dateTimeNumeric")})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(_,{id:"Clock",className:"size-4"}),e.jsx("span",{children:we(s.total_run_time??0)})]}),e.jsxs("div",{className:`flex items-center gap-1 ${h===0?"text-muted-foreground/60":""}`,children:[e.jsx(_,{id:"ListTodo",className:"size-4"}),e.jsx("span",{children:Me(h)})]})]}),e.jsxs("div",{className:"flex items-center gap-4 text-sm flex-wrap",children:[s.flow_id&&e.jsx(ts,{flowId:s.flow_id}),s.deployment_id&&e.jsxs(U,{to:"/deployments/deployment/$id",params:{id:s.deployment_id},className:"flex items-center gap-1 hover:underline",children:[e.jsx(_,{id:"Rocket",className:"size-4"}),e.jsx("span",{className:"text-muted-foreground",children:"Deployment"}),e.jsx("span",{children:N?.name??"..."})]}),s.work_pool_name&&e.jsxs(U,{to:"/work-pools/work-pool/$workPoolName",params:{workPoolName:s.work_pool_name},className:"flex items-center gap-1 hover:underline",children:[e.jsx(_,{id:"Server",className:"size-4"}),e.jsx("span",{className:"text-muted-foreground",children:"Work Pool"}),e.jsx("span",{children:s.work_pool_name})]}),s.work_pool_name&&s.work_queue_name&&e.jsxs(U,{to:"/work-pools/work-pool/$workPoolName",params:{workPoolName:s.work_pool_name},search:{tab:"Work Queues"},className:"flex items-center gap-1 hover:underline",children:[e.jsx(_,{id:"ListOrdered",className:"size-4"}),e.jsx("span",{className:"text-muted-foreground",children:"Work Queue"}),e.jsx("span",{children:s.work_queue_name})]}),O&&e.jsxs(U,{to:"/runs/flow-run/$id",params:{id:O.id},className:"flex items-center gap-1 hover:underline",children:[e.jsx(_,{id:"Workflow",className:"size-4"}),e.jsx("span",{className:"text-muted-foreground",children:"Parent Run"}),e.jsx("span",{children:O.name??"..."})]})]})]}),e.jsxs(Pe,{children:[e.jsx(Ie,{asChild:!0,children:e.jsx(b,{variant:"outline",className:"p-2",children:e.jsx(rs,{className:"w-4 h-4"})})}),e.jsxs(ze,{children:[A&&e.jsx(w,{onClick:()=>i(!0),children:"Cancel"}),I&&e.jsx(w,{onClick:()=>l(!0),children:"Pause"}),z&&e.jsx(w,{onClick:()=>p(!0),children:"Resume"}),R&&e.jsx(w,{onClick:()=>g(!0),children:"Retry"}),E&&e.jsx(w,{onClick:o,children:"Change state"}),(A||I||z||R||E)&&e.jsx(Ls,{}),e.jsx(w,{onClick:()=>{navigator.clipboard.writeText(s.id),y.success("Copied flow run ID to clipboard")},children:"Copy ID"}),e.jsx(w,{onClick:()=>c({title:"Delete Flow Run",description:`Are you sure you want to delete flow run ${s.name}?`,onConfirm:t}),children:"Delete"})]})]}),e.jsx(Es,{...a}),e.jsx(bs,{open:r,onOpenChange:m,currentState:s.state?{type:s.state.type,name:s.state.name??s.state.type.charAt(0)+s.state.type.slice(1).toLowerCase()}:null,label:"Flow Run",onConfirm:M,isLoading:T}),e.jsx(ea,{flowRun:s,open:d,onOpenChange:i}),e.jsx(sa,{flowRun:s,open:j,onOpenChange:l}),e.jsx(aa,{flowRun:s,open:u,onOpenChange:p}),e.jsx(la,{flowRun:s,open:v,onOpenChange:g})]})}function ia({flowRun:s}){const[t,a]=n.useState(!1),c=async()=>{a(!0);try{const m=await(await os()).GET("/flow_runs/{id}/logs/download",{params:{path:{id:s.id}},parseAs:"blob"});if(!m.data)throw new Error("No data received from server");const o=URL.createObjectURL(m.data),d=document.createElement("a"),i=s.name??"logs";d.href=o,d.setAttribute("download",`${i}.csv`),d.click(),URL.revokeObjectURL(o)}catch(r){console.error(r),y.error("Failed to download logs")}finally{a(!1)}};return e.jsxs(ls,{children:[e.jsx(ns,{asChild:!0,children:e.jsx(b,{variant:"outline",size:"icon",onClick:()=>{c()},disabled:t,"aria-label":"Download logs",children:t?e.jsx(_,{id:"Loader2",className:"size-4 animate-spin"}):e.jsx(_,{id:"Download",className:"size-4"})})}),e.jsx(is,{children:"Download all logs as CSV"})]})}const oa=({flowRun:s,virtualize:t=!0})=>{const[a,c]=n.useState(0),[r,m]=n.useState("TIMESTAMP_ASC"),o=n.useMemo(()=>({...cs({limit:50,sort:r,logs:{operator:"and_",level:{ge_:a},flow_run_id:{any_:[s.id]}}}),refetchInterval:s.state_type==="RUNNING"?5e3:!1}),[a,r,s.id,s.state_type]),{data:d,hasNextPage:i,fetchNextPage:j,isFetchingNextPage:l}=Ue(o),u=d.pages.length===1&&d.pages[0].length===0;let p="This run did not produce any logs.";return u&&(a>0?p="No logs match your filter criteria":s.state_type==="SCHEDULED"&&s.state_name==="Scheduled"?p="Run has not yet started. Check back soon for logs.":s.state_type==="RUNNING"&&(p="Waiting for logs...")),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-row gap-2 justify-end",children:[e.jsx(ca,{levelFilter:a,setLevelFilter:c}),e.jsx(da,{sortOrder:r,setSortOrder:m}),e.jsx(ia,{flowRun:s})]}),u?e.jsx("div",{className:"flex flex-col gap-2 text-center bg-muted p-2 rounded-md",children:e.jsx("span",{className:"text-muted-foreground",children:p})}):e.jsx("div",{className:"rounded-md",children:e.jsx(Ss,{logs:d.pages.flat(),onBottomReached:()=>{i&&!l&&j().catch(v=>{console.error(v)})},className:"max-h-[85vh]",virtualize:t})})]})},ue=[{label:"All",value:0},{label:"Critical only",value:50},{label:"Error and above",value:40},{label:"Warning and above",value:30},{label:"Info and above",value:20},{label:"Debug and above",value:10}],ca=({levelFilter:s,setLevelFilter:t})=>e.jsxs(Fe,{value:s.toString(),onValueChange:a=>t(Number(a)),children:[e.jsx(Te,{"aria-label":"log level filter",children:e.jsx("span",{children:`Level:
|
|
3
|
+
${ue.find(a=>a.value===s)?.label}`})}),e.jsx(Ee,{children:ue.map(a=>e.jsx(W,{value:a.value.toString(),children:a.label},a.value))})]}),da=({sortOrder:s,setSortOrder:t})=>e.jsxs(Fe,{value:s,onValueChange:a=>t(a),children:[e.jsx(Te,{"aria-label":"log sort order",children:e.jsx(ds,{placeholder:"Sort log order"})}),e.jsxs(Ee,{children:[e.jsx(W,{value:"TIMESTAMP_ASC",children:"Oldest to newest"}),e.jsx(W,{value:"TIMESTAMP_DESC",children:"Newest to oldest"})]})]}),ua=({parentFlowRunId:s})=>{const t=H(),[a,c]=n.useState(""),[r,m]=n.useState(new Set),[o,d]=n.useState("START_TIME_DESC"),[i,j]=n.useState({page:1,limit:10}),l=Ae(a,300),u=n.useMemo(()=>({flow_runs:{operator:"and_",parent_flow_run_id:{operator:"and_",any_:[s]}}}),[s]),{data:p}=q(us(u,3e4)),v=n.useMemo(()=>({page:i.page,limit:i.limit,sort:o,flow_runs:{operator:"and_",parent_flow_run_id:{operator:"and_",any_:[s]},name:l?{like_:l}:void 0,state:r.size>0?{operator:"and_",name:{any_:Array.from(r)}}:void 0}}),[s,i,o,l,r]),{data:g}=D(le(v,3e4)),F=n.useMemo(()=>[...new Set((g?.results??[]).map(h=>h.flow_id))],[g?.results]),{data:T}=D(ms({flows:{operator:"and_",id:{any_:F}},offset:0,sort:"NAME_ASC"},{enabled:F.length>0})),E=n.useMemo(()=>{if(!g?.results)return[];const h=new Map(T?.map(f=>[f.id,f])??[]);return g.results.map(f=>{const O=h.get(f.flow_id);return O?{...f,flow:O}:{...f,flow:void 0}}).filter(f=>f!==null)},[g?.results,T]),A=h=>{c(h.target.value),j(f=>({...f,page:1}))},I=h=>{m(h),j(f=>({...f,page:1}))},z=h=>{d(h),j(f=>({...f,page:1}))},R=()=>{c(""),m(new Set),j(h=>({...h,page:1}))},M=h=>{t.prefetchQuery(le({...v,page:h},3e4))},N=a||r.size>0;return p===0?e.jsx("div",{className:"flex items-center justify-center h-48 border rounded-lg bg-muted/50",children:e.jsx("p",{className:"text-base text-muted-foreground",children:"No subflow runs found for this flow run."})}):e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"grid grid-cols-12 items-center gap-2",children:[e.jsx("div",{className:"flex flex-col gap-1 xl:col-span-3 md:col-span-12 col-span-6 md:order-0 order-2",children:e.jsxs("p",{className:"text-sm text-muted-foreground",children:[p," Subflow run",p!==1?"s":""]})}),e.jsx("div",{className:"xl:col-span-4 col-span-12 md:order-1 order-0",children:e.jsx(Le,{value:a,onChange:A,placeholder:"Search by run name","aria-label":"Search by run name",debounceMs:300})}),e.jsx("div",{className:"xl:col-span-3 md:col-span-6 col-span-12 md:order-2 order-1",children:e.jsx(Is,{selectedFilters:r,onSelectFilter:I})}),e.jsx("div",{className:"xl:border-l xl:border-border xl:pl-2 xl:col-span-2 md:col-span-6 col-span-6 md:order-3 order-3",children:e.jsx(Ps,{value:o,onSelect:z})})]}),e.jsx(zs,{flowRuns:E,onClearFilters:N?R:void 0}),g&&g.pages>0&&e.jsx(Rs,{pagination:i,onChangePagination:j,count:g.count,pages:g.pages,onPrefetchPage:M})]})},me=2,ma=({selectedFilters:s,onSelectFilter:t,className:a})=>{const[c,r]=n.useState(!1),m=n.useMemo(()=>{const l=new Set(ne);return s.has("Scheduled")||l.size!==s.size?!1:Array.from(s).every(u=>l.has(u))},[s]),o=()=>{t(new Set(ne))},d=()=>{t(new Set)},i=l=>{if(m){t(new Set([l]));return}const u=new Set(s);s.has(l)?u.delete(l):u.add(l),t(u)},j=()=>{if(s.size===0)return"All run states";if(m)return"All except scheduled";const l=Array.from(s),u=l.slice(0,me),p=l.length-me;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:u.map(v=>e.jsx(C,{name:v,type:$[v]},v))}),p>0&&e.jsxs("p",{className:"text-sm shrink-0",children:["+ ",p]})]})};return e.jsxs(Pe,{open:c,onOpenChange:r,children:[e.jsx(Ie,{asChild:!0,children:e.jsxs(b,{variant:"outline",className:J("justify-between w-full",a),children:[e.jsx("span",{className:"flex-1 min-w-0",children:j()}),e.jsx(_,{id:"ChevronDown",className:"ml-2 size-4 shrink-0"})]})}),e.jsxs(ze,{className:"max-h-96 overflow-x-hidden overflow-y-auto",children:[e.jsxs(w,{onSelect:l=>{l.preventDefault(),o()},children:[e.jsx(V,{checked:m,className:"mr-2"}),"All except scheduled"]}),e.jsxs(w,{onSelect:l=>{l.preventDefault(),d()},children:[e.jsx(V,{checked:s.size===0,className:"mr-2"}),"All run states"]}),Object.keys($).map(l=>e.jsxs(w,{"aria-label":l,onSelect:u=>{u.preventDefault(),i(l)},children:[e.jsx(V,{"aria-label":l,className:"mr-2",checked:!m&&s.has(l)}),e.jsx(C,{name:l,type:$[l]})]},l))]})]})},xa=({flowRunId:s})=>{const t=H(),[a,c]=n.useState(""),[r,m]=n.useState(new Set),[o,d]=n.useState(new Set),[i,j]=n.useState("EXPECTED_START_TIME_DESC"),[l,u]=n.useState({page:1,limit:20}),p=Ae(a,300),{data:v}=q(De({task_runs:{operator:"and_",flow_run_id:{operator:"and_",any_:[s],is_null_:!1},subflow_runs:{exists_:!1}}},3e4)),{data:g}=D(ie({task_runs:{operator:"and_",flow_run_id:{operator:"and_",any_:[s],is_null_:!1},subflow_runs:{exists_:!1},name:p?{like_:p}:void 0,state:r.size>0?{operator:"and_",name:{any_:Array.from(r)}}:void 0,tags:o.size>0?{operator:"and_",all_:Array.from(o)}:void 0},sort:i,page:l.page,limit:l.limit},3e4)),F=N=>{c(N.target.value),u(h=>({...h,page:1}))},T=N=>{m(N),u(h=>({...h,page:1}))},E=N=>{j(N),u(h=>({...h,page:1}))},A=N=>{const h=Array.isArray(N)?N:[];d(new Set(h)),u(f=>({...f,page:1}))},I=()=>{c(""),m(new Set),d(new Set),u(N=>({...N,page:1}))},z=N=>{t.prefetchQuery(ie({task_runs:{operator:"and_",flow_run_id:{operator:"and_",any_:[s],is_null_:!1},subflow_runs:{exists_:!1},name:p?{like_:p}:void 0,state:r.size>0?{operator:"and_",name:{any_:Array.from(r)}}:void 0,tags:o.size>0?{operator:"and_",all_:Array.from(o)}:void 0},sort:i,page:N,limit:l.limit},3e4))},R=a||r.size>0||o.size>0,M=n.useMemo(()=>{if(!g?.results)return null;const N=new Map;for(const h of g.results){const f=String(h.state?.name??"Unknown");N.set(f,(N.get(f)??0)+1)}return Array.from(N.entries()).map(([h,f])=>`${f} ${h}`).join(", ")},[g?.results]);return v===0?e.jsx("div",{className:"flex items-center justify-center h-48 border rounded-lg bg-muted/50",children:e.jsx("p",{className:"text-base text-muted-foreground",children:"No task runs found for this flow run."})}):e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"grid grid-cols-12 items-center gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-1 xl:col-span-3 md:col-span-12 col-span-6 md:order-0 order-3",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:[v," Task run",v!==1?"s":""]}),M&&e.jsxs("p",{className:"text-sm text-muted-foreground text-xs capitalize",children:["(",M,")"]})]}),e.jsx("div",{className:"xl:col-span-3 md:col-span-6 col-span-12 md:order-1 order-0",children:e.jsx(Le,{value:a,onChange:F,placeholder:"Search by run name","aria-label":"Search by run name",debounceMs:300})}),e.jsx("div",{className:"xl:col-span-2 md:col-span-6 col-span-12 md:order-2 order-1",children:e.jsx(ma,{selectedFilters:r,onSelectFilter:T})}),e.jsx("div",{className:"xl:col-span-2 md:col-span-6 col-span-12 md:order-3 order-2",children:e.jsx(Gs,{value:Array.from(o),onChange:A,placeholder:"All tags"})}),e.jsx("div",{className:"xl:border-l xl:border-border xl:pl-2 xl:col-span-2 md:col-span-6 col-span-6 md:order-4 order-4",children:e.jsx(Ms,{value:i,onSelect:E})})]}),e.jsx(Os,{taskRuns:g?.results,onClearFilters:R?I:void 0}),g&&g.pages>0&&e.jsx(Us,{pagination:l,onChangePagination:u,count:g.count,pages:g.pages,onPrefetchPage:z})]})},pa=({id:s,tab:t,onTabChange:a})=>{const[c,r]=n.useState(!1),[m,o]=n.useState(!1),d=H(),{data:i}=q({...xs(s),refetchInterval:c}),{deleteFlowRun:j}=ps(),{navigate:l}=Ge(),u=i.state_type==="PENDING";Cs(i?.state_type),n.useEffect(()=>{i.state_type==="RUNNING"||i.state_type==="PENDING"?r(5e3):r(!1)},[i]);const p=()=>{j(i.id,{onSuccess:()=>{r(!1),y.success("Flow run deleted"),l({to:"/runs",replace:!0})},onError:E=>{const A=E.message||"Unknown error while deleting flow run.";y.error(A)}})},v=n.useCallback(()=>{d.invalidateQueries({queryKey:hs.all()})},[d]),g=n.useCallback(()=>{d.invalidateQueries({queryKey:js.all()})},[d]),F=n.useCallback(()=>{d.invalidateQueries({queryKey:gs.lists()})},[d]),T=n.useCallback(()=>{d.invalidateQueries({queryKey:fs.all()})},[d]);return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"flex flex-col gap-2",children:e.jsx(na,{flowRun:i,onDeleteClick:p})}),!u&&e.jsx(xe,{className:"py-0",children:e.jsx(pe,{className:"p-0",children:e.jsx(Xs,{flowRunId:i.id,stateType:i.state_type??void 0,fullscreen:m,onFullscreenChange:o})})}),e.jsx("div",{className:"flex flex-col gap-4",children:e.jsx(ha,{currentTab:t,onTabChange:a,flowRun:i,logsContent:e.jsx(G,{fallback:e.jsx(Q,{error:{type:"unknown-error",message:"Failed to load logs",details:"An error occurred while loading log data. Please try again."},onRetry:v}),children:e.jsx(n.Suspense,{fallback:e.jsx(ja,{}),children:e.jsx(oa,{flowRun:i})})}),taskRunsContent:e.jsx(G,{fallback:e.jsx(Q,{error:{type:"unknown-error",message:"Failed to load task runs",details:"An error occurred while loading task run data. Please try again."},onRetry:g}),children:e.jsx(n.Suspense,{fallback:e.jsx(ga,{}),children:e.jsx(xa,{flowRunId:s})})}),subflowRunsContent:e.jsx(G,{fallback:e.jsx(Q,{error:{type:"unknown-error",message:"Failed to load subflow runs",details:"An error occurred while loading subflow run data. Please try again."},onRetry:F}),children:e.jsx(n.Suspense,{fallback:e.jsx(ya,{}),children:e.jsx(ua,{parentFlowRunId:s})})}),artifactsContent:e.jsx(G,{fallback:e.jsx(Q,{error:{type:"unknown-error",message:"Failed to load artifacts",details:"An error occurred while loading artifact data. Please try again."},onRetry:T}),children:e.jsx(n.Suspense,{fallback:e.jsx(fa,{}),children:e.jsx(Ys,{flowRun:i})})}),detailsContent:e.jsx(n.Suspense,{fallback:e.jsx(Na,{}),children:e.jsx(Zs,{flowRun:i})}),parametersContent:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex justify-end",children:e.jsxs(b,{variant:"outline",size:"sm",onClick:()=>{y.success("Copied parameters to clipboard"),navigator.clipboard.writeText(JSON.stringify(i.parameters??{},null,2))},children:[e.jsx(_,{id:"Copy",className:"size-4 mr-2"}),"Copy parameters"]})}),e.jsx(oe,{value:JSON.stringify(i.parameters??{},null,2),disabled:!0})]}),jobVariablesContent:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex justify-end",children:e.jsxs(b,{variant:"outline",size:"sm",onClick:()=>{y.success("Copied job variables to clipboard"),navigator.clipboard.writeText(JSON.stringify(i.job_variables??{},null,2))},children:[e.jsx(_,{id:"Copy",className:"size-4 mr-2"}),"Copy job variables"]})}),e.jsx(oe,{value:JSON.stringify(i.job_variables??{},null,2),disabled:!0})]})})})]})},ha=({currentTab:s,onTabChange:t,flowRun:a,logsContent:c,taskRunsContent:r,subflowRunsContent:m,artifactsContent:o,detailsContent:d,parametersContent:i,jobVariablesContent:j})=>e.jsxs(ys,{value:s,onValueChange:l=>t(l),children:[e.jsxs(Ns,{children:[e.jsx(L,{value:"Details",children:"Details"}),e.jsx(L,{value:"Logs",children:"Logs"}),a.state_type!=="PENDING"&&e.jsx(L,{value:"TaskRuns",children:"Task Runs"}),a.state_type!=="PENDING"&&e.jsx(L,{value:"SubflowRuns",children:"Subflow Runs"}),e.jsx(L,{value:"Artifacts",children:"Artifacts"}),e.jsx(L,{value:"Parameters",children:"Parameters"}),e.jsx(L,{value:"JobVariables",children:"Job Variables"})]}),e.jsx(P,{value:"Details",children:d}),e.jsx(P,{value:"Logs",children:c}),e.jsx(P,{value:"TaskRuns",children:r}),e.jsx(P,{value:"SubflowRuns",children:m}),e.jsx(P,{value:"Artifacts",children:o}),e.jsx(P,{value:"Parameters",children:i}),e.jsx(P,{value:"JobVariables",children:j})]}),ja=()=>e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-row gap-2 justify-end",children:[e.jsx(x,{className:"h-8 w-25"}),e.jsx(x,{className:"h-8 w-32"}),e.jsx(x,{className:"h-8 w-8"})," "]}),e.jsx(x,{className:"h-32"})]}),ga=()=>e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(x,{className:"h-4 w-24"})}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[e.jsx(x,{className:"h-9 flex-1"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(x,{className:"h-9 w-48"}),e.jsx(x,{className:"h-9 w-40"})]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(x,{className:"h-24"}),e.jsx(x,{className:"h-24"}),e.jsx(x,{className:"h-24"})]})]}),fa=()=>e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("div",{className:"flex flex-row justify-end",children:e.jsx(x,{className:"h-8 w-12"})}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2 xl:grid-cols-3",children:[e.jsx(x,{className:"h-40"}),e.jsx(x,{className:"h-40"}),e.jsx(x,{className:"h-40"}),e.jsx(x,{className:"h-40"})]})]}),ya=()=>e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(x,{className:"h-4 w-24"})}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[e.jsx(x,{className:"h-9 flex-1"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(x,{className:"h-9 w-48"}),e.jsx(x,{className:"h-9 w-40"})]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(x,{className:"h-24"}),e.jsx(x,{className:"h-24"}),e.jsx(x,{className:"h-24"})]})]}),Na=()=>e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(x,{className:"h-4 w-20"}),e.jsx(x,{className:"h-5 w-12"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(x,{className:"h-4 w-16"}),e.jsx(x,{className:"h-5 w-32"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(x,{className:"h-4 w-24"}),e.jsx(x,{className:"h-5 w-32"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(x,{className:"h-4 w-24"}),e.jsx(x,{className:"h-5 w-64"})]})]});Qs({tab:Vs(["Logs","TaskRuns","SubflowRuns","Artifacts","Details","Parameters","JobVariables"]).default("Logs").catch("Logs")});function $a(){const{id:s}=ce.useParams(),{tab:t}=ce.useSearch(),a=Qe(),c=r=>{a({to:".",search:m=>({...m,tab:r})})};return e.jsx(pa,{id:s,tab:t,onTabChange:c})}export{$a as component};
|
|
4
|
+
//# sourceMappingURL=flow-run._id-YzRd5jrC.js.map
|