prefect 3.6.12__py3-none-any.whl → 3.6.13__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/_internal/compatibility/blocks.py +18 -0
- prefect/_internal/urls.py +29 -0
- prefect/_states.py +4 -1
- prefect/client/orchestration/_concurrency_limits/client.py +16 -16
- prefect/client/schemas/filters.py +24 -0
- prefect/client/subscriptions.py +1 -1
- prefect/events/clients.py +52 -13
- prefect/flow_engine.py +192 -10
- prefect/flows.py +61 -2
- prefect/results.py +262 -21
- prefect/runner/runner.py +29 -82
- prefect/runner/storage.py +6 -25
- prefect/server/schemas/filters.py +45 -0
- prefect/server/ui-v2/assets/{artifact-card-Ds2tntMW.js → artifact-card-CUEaRDGw.js} +2 -2
- prefect/server/ui-v2/assets/{artifact-card-Ds2tntMW.js.map → artifact-card-CUEaRDGw.js.map} +1 -1
- prefect/server/ui-v2/assets/{artifact._id-erPNL0a8.js → artifact._id-Ca6VCUS0.js} +2 -2
- prefect/server/ui-v2/assets/{artifact._id-erPNL0a8.js.map → artifact._id-Ca6VCUS0.js.map} +1 -1
- prefect/server/ui-v2/assets/{automation-wizard-Bx9AQxRV.js → automation-wizard-z26pICBl.js} +2 -2
- prefect/server/ui-v2/assets/{automation-wizard-Bx9AQxRV.js.map → automation-wizard-z26pICBl.js.map} +1 -1
- prefect/server/ui-v2/assets/automation._id-DuodjY5t.js +2 -0
- prefect/server/ui-v2/assets/{automation._id-IHh5QJwE.js.map → automation._id-DuodjY5t.js.map} +1 -1
- prefect/server/ui-v2/assets/{automation_._id.edit-Ds8vO0c5.js → automation_._id.edit-CcuJhc-y.js} +2 -2
- prefect/server/ui-v2/assets/{automation_._id.edit-Ds8vO0c5.js.map → automation_._id.edit-CcuJhc-y.js.map} +1 -1
- prefect/server/ui-v2/assets/{automations-header-C6aUe5Tw.js → automations-header-CgOWwuc6.js} +2 -2
- prefect/server/ui-v2/assets/{automations-header-C6aUe5Tw.js.map → automations-header-CgOWwuc6.js.map} +1 -1
- prefect/server/ui-v2/assets/{base-job-template-form-section-a-9TFMcW.js → base-job-template-form-section-DN9HyjM5.js} +2 -2
- prefect/server/ui-v2/assets/{base-job-template-form-section-a-9TFMcW.js.map → base-job-template-form-section-DN9HyjM5.js.map} +1 -1
- prefect/server/ui-v2/assets/{block-type-details-eq3Wg2ht.js → block-type-details-rrToxL5r.js} +2 -2
- prefect/server/ui-v2/assets/{block-type-details-eq3Wg2ht.js.map → block-type-details-rrToxL5r.js.map} +1 -1
- prefect/server/ui-v2/assets/block-type-logo-DURScH8H.js +2 -0
- prefect/server/ui-v2/assets/{block-type-logo-B31LJm5H.js.map → block-type-logo-DURScH8H.js.map} +1 -1
- prefect/server/ui-v2/assets/{block._id-OVdz3htC.js → block._id-Bue6lnrN.js} +2 -2
- prefect/server/ui-v2/assets/{block._id-OVdz3htC.js.map → block._id-Bue6lnrN.js.map} +1 -1
- prefect/server/ui-v2/assets/block_._id.edit-QY0OzN_b.js +2 -0
- prefect/server/ui-v2/assets/{block_._id.edit-CIhIBJrm.js.map → block_._id.edit-QY0OzN_b.js.map} +1 -1
- prefect/server/ui-v2/assets/catalog-CGjRGWv6.js +2 -0
- prefect/server/ui-v2/assets/{catalog-CfniU0UV.js.map → catalog-CGjRGWv6.js.map} +1 -1
- prefect/server/ui-v2/assets/catalog_._slug-BMFNZhEb.js +2 -0
- prefect/server/ui-v2/assets/{catalog_._slug-C9p86T4s.js.map → catalog_._slug-BMFNZhEb.js.map} +1 -1
- prefect/server/ui-v2/assets/catalog_._slug_.create-CuFA3kUC.js +2 -0
- prefect/server/ui-v2/assets/{catalog_._slug_.create-BhSunL__.js.map → catalog_._slug_.create-CuFA3kUC.js.map} +1 -1
- prefect/server/ui-v2/assets/{collapsible-DBD7wjpi.js → collapsible-Ell2FjrX.js} +2 -2
- prefect/server/ui-v2/assets/{collapsible-DBD7wjpi.js.map → collapsible-Ell2FjrX.js.map} +1 -1
- prefect/server/ui-v2/assets/{concurrency-limit._id-C-XWq7Tf.js → concurrency-limit._id-Rr1ysUct.js} +2 -2
- prefect/server/ui-v2/assets/{concurrency-limit._id-C-XWq7Tf.js.map → concurrency-limit._id-Rr1ysUct.js.map} +1 -1
- prefect/server/ui-v2/assets/{create-noFojqGL.js → create-CQK8-uO1.js} +2 -2
- prefect/server/ui-v2/assets/{create-noFojqGL.js.map → create-CQK8-uO1.js.map} +1 -1
- prefect/server/ui-v2/assets/{create-Bj2t5YQq.js → create-ewA3uq_h.js} +2 -2
- prefect/server/ui-v2/assets/{create-Bj2t5YQq.js.map → create-ewA3uq_h.js.map} +1 -1
- prefect/server/ui-v2/assets/{data-table-BjFlVIyC.js → data-table-Bx1uYX_M.js} +2 -2
- prefect/server/ui-v2/assets/{data-table-BjFlVIyC.js.map → data-table-Bx1uYX_M.js.map} +1 -1
- prefect/server/ui-v2/assets/delete-confirmation-dialog-CqKsUEj_.js +2 -0
- prefect/server/ui-v2/assets/{delete-confirmation-dialog-COdZmNfa.js.map → delete-confirmation-dialog-CqKsUEj_.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment-action-header-C6v2kZ6V.js → deployment-action-header-Bz5COdER.js} +2 -2
- prefect/server/ui-v2/assets/{deployment-action-header-C6v2kZ6V.js.map → deployment-action-header-Bz5COdER.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment-form-D9d5sZM2.js → deployment-form-CrlZlNoj.js} +3 -3
- prefect/server/ui-v2/assets/{deployment-form-D9d5sZM2.js.map → deployment-form-CrlZlNoj.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment-links-Dy-M1Que.js → deployment-links-D9ZR_vmp.js} +2 -2
- prefect/server/ui-v2/assets/{deployment-links-Dy-M1Que.js.map → deployment-links-D9ZR_vmp.js.map} +1 -1
- prefect/server/ui-v2/assets/deployment._id-BV0rSqba.js +2 -0
- prefect/server/ui-v2/assets/{deployment._id-DVmqclRz.js.map → deployment._id-BV0rSqba.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment._id-CZlY9261.js → deployment._id-DvHhx-qN.js} +2 -2
- prefect/server/ui-v2/assets/{deployment._id-CZlY9261.js.map → deployment._id-DvHhx-qN.js.map} +1 -1
- prefect/server/ui-v2/assets/deployment_._id.duplicate-BrEOenqP.js +2 -0
- prefect/server/ui-v2/assets/{deployment_._id.duplicate-DVMjpk5m.js.map → deployment_._id.duplicate-BrEOenqP.js.map} +1 -1
- prefect/server/ui-v2/assets/deployment_._id.edit-BbYKPK42.js +2 -0
- prefect/server/ui-v2/assets/{deployment_._id.edit-Ck_P6KDn.js.map → deployment_._id.edit-BbYKPK42.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment_._id.run-Cht7AHDG.js → deployment_._id.run-Dv7S_MJR.js} +2 -2
- prefect/server/ui-v2/assets/{deployment_._id.run-Cht7AHDG.js.map → deployment_._id.run-Dv7S_MJR.js.map} +1 -1
- prefect/server/ui-v2/assets/{dropdown-menu-xZ_3w9OP.js → dropdown-menu-e0Fqb6aw.js} +2 -2
- prefect/server/ui-v2/assets/{dropdown-menu-xZ_3w9OP.js.map → dropdown-menu-e0Fqb6aw.js.map} +1 -1
- prefect/server/ui-v2/assets/{event._eventDate._eventId-CpexuXd6.js → event._eventDate._eventId-Cp4UmGqq.js} +2 -2
- prefect/server/ui-v2/assets/{event._eventDate._eventId-CpexuXd6.js.map → event._eventDate._eventId-Cp4UmGqq.js.map} +1 -1
- prefect/server/ui-v2/assets/flow-run-graph-BrqoR3E2.js +2 -0
- prefect/server/ui-v2/assets/flow-run-graph-BrqoR3E2.js.map +1 -0
- prefect/server/ui-v2/assets/{flow-run._id-ZBlKBwPO.js → flow-run._id-BOp38Pbq.js} +2 -2
- prefect/server/ui-v2/assets/{flow-run._id-ZBlKBwPO.js.map → flow-run._id-BOp38Pbq.js.map} +1 -1
- prefect/server/ui-v2/assets/flow-run._id-DJnTDEN_.js +2 -0
- prefect/server/ui-v2/assets/{flow-run._id-OL0YhyLW.js.map → flow-run._id-DJnTDEN_.js.map} +1 -1
- prefect/server/ui-v2/assets/flow-run._id-D_wY_rBe.js +4 -0
- prefect/server/ui-v2/assets/flow-run._id-D_wY_rBe.js.map +1 -0
- prefect/server/ui-v2/assets/flow-runs-pagination-Bq2ZUzM6.js +2 -0
- prefect/server/ui-v2/assets/flow-runs-pagination-Bq2ZUzM6.js.map +1 -0
- prefect/server/ui-v2/assets/flow._id-eCBL95rg.js +2 -0
- prefect/server/ui-v2/assets/{flow._id-DhrCicwR.js.map → flow._id-eCBL95rg.js.map} +1 -1
- prefect/server/ui-v2/assets/{form-BTub_PhK.js → form-DNerk3LS.js} +2 -2
- prefect/server/ui-v2/assets/{form-BTub_PhK.js.map → form-DNerk3LS.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-6wmrKLU3.js → header-B0ejRncu.js} +2 -2
- prefect/server/ui-v2/assets/{header-6wmrKLU3.js.map → header-B0ejRncu.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-Dp9qi8fq.js → header-DwagHBlF.js} +2 -2
- prefect/server/ui-v2/assets/{header-Dp9qi8fq.js.map → header-DwagHBlF.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-B75eb688.js → header-huSvwxKI.js} +2 -2
- prefect/server/ui-v2/assets/{header-B75eb688.js.map → header-huSvwxKI.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-DSaSov8V.js → index-BO3SOwdV.js} +2 -2
- prefect/server/ui-v2/assets/{index-DSaSov8V.js.map → index-BO3SOwdV.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-DOkFJdYY.js → index-BTPE3vs7.js} +2 -2
- prefect/server/ui-v2/assets/{index-DOkFJdYY.js.map → index-BTPE3vs7.js.map} +1 -1
- prefect/server/ui-v2/assets/index-BU4yZRd3.js +2 -0
- prefect/server/ui-v2/assets/{index-Cs8eFQKw.js.map → index-BU4yZRd3.js.map} +1 -1
- prefect/server/ui-v2/assets/index-BhALpenO.js +2 -0
- prefect/server/ui-v2/assets/{index-qPlIYf3i.js.map → index-BhALpenO.js.map} +1 -1
- prefect/server/ui-v2/assets/index-BzN9bQeM.js +2 -0
- prefect/server/ui-v2/assets/{index-CT_nG86y.js.map → index-BzN9bQeM.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-zpb5iSCL.js → index-CBhi1P9g.js} +2 -2
- prefect/server/ui-v2/assets/{index-zpb5iSCL.js.map → index-CBhi1P9g.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-UN2Tx4jH.js → index-CRDz4nhM.js} +2 -2
- prefect/server/ui-v2/assets/{index-UN2Tx4jH.js.map → index-CRDz4nhM.js.map} +1 -1
- prefect/server/ui-v2/assets/index-CTnoa3Ho.js +2 -0
- prefect/server/ui-v2/assets/index-CTnoa3Ho.js.map +1 -0
- prefect/server/ui-v2/assets/{index-DzMGV8GV.js → index-CWkbSdxY.js} +2 -2
- prefect/server/ui-v2/assets/{index-DzMGV8GV.js.map → index-CWkbSdxY.js.map} +1 -1
- prefect/server/ui-v2/assets/index-CgOsOj5t.js +2 -0
- prefect/server/ui-v2/assets/{index-7ThYp9SY.js.map → index-CgOsOj5t.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-CGWoVV2s.js → index-CnIJUujl.js} +2 -2
- prefect/server/ui-v2/assets/{index-CGWoVV2s.js.map → index-CnIJUujl.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-D08xgmV0.js → index-Cutg_A1j.js} +2 -2
- prefect/server/ui-v2/assets/{index-D08xgmV0.js.map → index-Cutg_A1j.js.map} +1 -1
- prefect/server/ui-v2/assets/index-D5RdrxkU.js +17 -0
- prefect/server/ui-v2/assets/index-D5RdrxkU.js.map +1 -0
- prefect/server/ui-v2/assets/{index-DfiNsXba.js → index-DDiyFpIV.js} +2 -2
- prefect/server/ui-v2/assets/{index-DfiNsXba.js.map → index-DDiyFpIV.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-BA7ACCoL.js → index-DI2DC5gd.js} +2 -2
- prefect/server/ui-v2/assets/{index-BA7ACCoL.js.map → index-DI2DC5gd.js.map} +1 -1
- prefect/server/ui-v2/assets/index-Dg_duvDx.js +2 -0
- prefect/server/ui-v2/assets/{index-B_3f8Hcb.js.map → index-Dg_duvDx.js.map} +1 -1
- prefect/server/ui-v2/assets/index-Dspw5HFj.js +2 -0
- prefect/server/ui-v2/assets/{index-7-r4ia_S.js.map → index-Dspw5HFj.js.map} +1 -1
- prefect/server/ui-v2/assets/index-NY089eTx.css +1 -0
- prefect/server/ui-v2/assets/{index-DYOACRXY.js → index-VOOLxiSE.js} +2 -2
- prefect/server/ui-v2/assets/{index-DYOACRXY.js.map → index-VOOLxiSE.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-HGoNWFfP.js → index-Wfs7Cjew.js} +2 -2
- prefect/server/ui-v2/assets/{index-HGoNWFfP.js.map → index-Wfs7Cjew.js.map} +1 -1
- prefect/server/ui-v2/assets/index-dSUEBAqg.js +2 -0
- prefect/server/ui-v2/assets/{index-H6bwm6L6.js.map → index-dSUEBAqg.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-D3ILnEzm.js → index-uvH5a3zO.js} +2 -2
- prefect/server/ui-v2/assets/{index-D3ILnEzm.js.map → index-uvH5a3zO.js.map} +1 -1
- prefect/server/ui-v2/assets/{json-input-9UPGqxTw.js → json-input-gXz7BuJj.js} +2 -2
- prefect/server/ui-v2/assets/{json-input-9UPGqxTw.js.map → json-input-gXz7BuJj.js.map} +1 -1
- prefect/server/ui-v2/assets/{key._key-CTFfXO_k.js → key._key-CJPbLXwU.js} +2 -2
- prefect/server/ui-v2/assets/{key._key-CTFfXO_k.js.map → key._key-CJPbLXwU.js.map} +1 -1
- prefect/server/ui-v2/assets/{lazy-markdown-BHwIrC8E.js → lazy-markdown-wPid80zf.js} +2 -2
- prefect/server/ui-v2/assets/{lazy-markdown-BHwIrC8E.js.map → lazy-markdown-wPid80zf.js.map} +1 -1
- prefect/server/ui-v2/assets/{login-kqmT29n7.js → login-DC63bGXK.js} +2 -2
- prefect/server/ui-v2/assets/{login-kqmT29n7.js.map → login-DC63bGXK.js.map} +1 -1
- prefect/server/ui-v2/assets/{markdown-input-BesmAbLS.js → markdown-input-BhqrU6Eo.js} +2 -2
- prefect/server/ui-v2/assets/{markdown-input-BesmAbLS.js.map → markdown-input-BhqrU6Eo.js.map} +1 -1
- prefect/server/ui-v2/assets/{python-example-snippet-COTWYn1Y.js → python-example-snippet-3jtXWQZN.js} +3 -3
- prefect/server/ui-v2/assets/{python-example-snippet-COTWYn1Y.js.map → python-example-snippet-3jtXWQZN.js.map} +1 -1
- prefect/server/ui-v2/assets/{python-input-Bjccebi0.js → python-input-ZVi-v324.js} +2 -2
- prefect/server/ui-v2/assets/{python-input-Bjccebi0.js.map → python-input-ZVi-v324.js.map} +1 -1
- prefect/server/ui-v2/assets/{radio-group-DkAK0M2h.js → radio-group-BBMLpHGc.js} +2 -2
- prefect/server/ui-v2/assets/{radio-group-DkAK0M2h.js.map → radio-group-BBMLpHGc.js.map} +1 -1
- prefect/server/ui-v2/assets/route-error-state-BJXl8qkX.js +2 -0
- prefect/server/ui-v2/assets/{route-error-state-ALftyvGl.js.map → route-error-state-BJXl8qkX.js.map} +1 -1
- prefect/server/ui-v2/assets/{schema-form-BR4E-WXE.js → schema-form-BEqYjsM-.js} +2 -2
- prefect/server/ui-v2/assets/{schema-form-BR4E-WXE.js.map → schema-form-BEqYjsM-.js.map} +1 -1
- prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-BhL8C5NS.js → schema-form-input-string-format-datetime-l3xt3PWf.js} +4 -4
- prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-BhL8C5NS.js.map → schema-form-input-string-format-datetime-l3xt3PWf.js.map} +1 -1
- prefect/server/ui-v2/assets/settings-txD0dR5Q.js +2 -0
- prefect/server/ui-v2/assets/settings-txD0dR5Q.js.map +1 -0
- prefect/server/ui-v2/assets/{sort-filter-BD4vwJXt.js → sort-filter-DHPFdKZ2.js} +2 -2
- prefect/server/ui-v2/assets/{sort-filter-BD4vwJXt.js.map → sort-filter-DHPFdKZ2.js.map} +1 -1
- prefect/server/ui-v2/assets/state-colors-CAAf0Eg3.js +2 -0
- prefect/server/ui-v2/assets/state-colors-CAAf0Eg3.js.map +1 -0
- prefect/server/ui-v2/assets/table-ULfpXJXB.js +2 -0
- prefect/server/ui-v2/assets/table-ULfpXJXB.js.map +1 -0
- prefect/server/ui-v2/assets/tags-input-BLzMOTDb.js +2 -0
- prefect/server/ui-v2/assets/tags-input-BLzMOTDb.js.map +1 -0
- prefect/server/ui-v2/assets/task-run-concurrency-limits-reset-dialog-BpeKHk7g.js +2 -0
- prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-CG3den1B.js.map → task-run-concurrency-limits-reset-dialog-BpeKHk7g.js.map} +1 -1
- prefect/server/ui-v2/assets/{task-run._id-DOcIzVi0.js → task-run._id-CkOl9MJs.js} +3 -3
- prefect/server/ui-v2/assets/{task-run._id-DOcIzVi0.js.map → task-run._id-CkOl9MJs.js.map} +1 -1
- prefect/server/ui-v2/assets/task-run._id-udkz1lhh.js +2 -0
- prefect/server/ui-v2/assets/{task-run._id-CnIVqU6v.js.map → task-run._id-udkz1lhh.js.map} +1 -1
- prefect/server/ui-v2/assets/task-runs-pagination-B7D5K_FM.js +2 -0
- prefect/server/ui-v2/assets/{task-runs-pagination-DLSAz-Ur.js.map → task-runs-pagination-B7D5K_FM.js.map} +1 -1
- prefect/server/ui-v2/assets/{textarea-D8LjlIx7.js → textarea-C4bdj7Jk.js} +2 -2
- prefect/server/ui-v2/assets/{textarea-D8LjlIx7.js.map → textarea-C4bdj7Jk.js.map} +1 -1
- prefect/server/ui-v2/assets/{timezone-select-BG3cL3-U.js → timezone-select-AdlSRQxZ.js} +2 -2
- prefect/server/ui-v2/assets/{timezone-select-BG3cL3-U.js.map → timezone-select-AdlSRQxZ.js.map} +1 -1
- prefect/server/ui-v2/assets/{toggle-group-D3zeurIL.js → toggle-group-C-vxYz4l.js} +2 -2
- prefect/server/ui-v2/assets/{toggle-group-D3zeurIL.js.map → toggle-group-C-vxYz4l.js.map} +1 -1
- prefect/server/ui-v2/assets/use-delete-automation-confirmation-dialog-Cqhaqtqe.js +2 -0
- prefect/server/ui-v2/assets/{use-delete-automation-confirmation-dialog-Bzy2ML2T.js.map → use-delete-automation-confirmation-dialog-Cqhaqtqe.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-DRAP-Tnu.js → use-delete-block-document-confirmation-dialog-GjNhFxZe.js} +2 -2
- prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-DRAP-Tnu.js.map → use-delete-block-document-confirmation-dialog-GjNhFxZe.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-D4yWonR8.js → use-flow-runs-selected-rows-DfwmswyR.js} +2 -2
- prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-D4yWonR8.js.map → use-flow-runs-selected-rows-DfwmswyR.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-DZeBiVd9.js → use-get-artifacts-flow-task-runs-BEBpG_5J.js} +2 -2
- prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-DZeBiVd9.js.map → use-get-artifacts-flow-task-runs-BEBpG_5J.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-quick-run-BxAMqZDM.js → use-quick-run-BYBRcDwC.js} +2 -2
- prefect/server/ui-v2/assets/{use-quick-run-BxAMqZDM.js.map → use-quick-run-BYBRcDwC.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-stepper-T3wAKNvM.js → use-stepper-Bk97vOTm.js} +2 -2
- prefect/server/ui-v2/assets/{use-stepper-T3wAKNvM.js.map → use-stepper-Bk97vOTm.js.map} +1 -1
- prefect/server/ui-v2/assets/{utilities-B2JMf8iI.js → utilities-BQwGFLk5.js} +2 -2
- prefect/server/ui-v2/assets/{utilities-B2JMf8iI.js.map → utilities-BQwGFLk5.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool-filter-CZz0AJlt.js → work-pool-filter-Ddhp_M-L.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool-filter-CZz0AJlt.js.map → work-pool-filter-Ddhp_M-L.js.map} +1 -1
- prefect/server/ui-v2/assets/work-pool-queue-toggle-DX3eV3R_.js +2 -0
- prefect/server/ui-v2/assets/{work-pool-queue-toggle-D4eeo-hi.js.map → work-pool-queue-toggle-DX3eV3R_.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool._workPoolName-DrWddu9K.js → work-pool._workPoolName-BaRIsXBX.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool._workPoolName-DrWddu9K.js.map → work-pool._workPoolName-BaRIsXBX.js.map} +1 -1
- prefect/server/ui-v2/assets/work-pool_._workPoolName.edit-dhS_Xz32.js +2 -0
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-CA0ePjCk.js.map → work-pool_._workPoolName.edit-dhS_Xz32.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-DpUnE86v.js → work-pool_._workPoolName.queue._workQueueName-BlstL9Se.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-DpUnE86v.js.map → work-pool_._workPoolName.queue._workQueueName-BlstL9Se.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-queue-icon-text-BjiA7vAW.js → work-queue-icon-text-_Ez8e2dw.js} +2 -2
- prefect/server/ui-v2/assets/{work-queue-icon-text-BjiA7vAW.js.map → work-queue-icon-text-_Ez8e2dw.js.map} +1 -1
- prefect/server/ui-v2/index.html +2 -2
- prefect/settings/models/flows.py +14 -1
- prefect/settings/models/runner.py +16 -6
- prefect/task_engine.py +17 -3
- prefect/task_worker.py +99 -17
- prefect/tasks.py +2 -2
- prefect/testing/fixtures.py +41 -6
- {prefect-3.6.12.dist-info → prefect-3.6.13.dist-info}/METADATA +1 -1
- {prefect-3.6.12.dist-info → prefect-3.6.13.dist-info}/RECORD +221 -220
- prefect/server/ui-v2/assets/automation._id-IHh5QJwE.js +0 -2
- prefect/server/ui-v2/assets/block-type-logo-B31LJm5H.js +0 -2
- prefect/server/ui-v2/assets/block_._id.edit-CIhIBJrm.js +0 -2
- prefect/server/ui-v2/assets/catalog-CfniU0UV.js +0 -2
- prefect/server/ui-v2/assets/catalog_._slug-C9p86T4s.js +0 -2
- prefect/server/ui-v2/assets/catalog_._slug_.create-BhSunL__.js +0 -2
- prefect/server/ui-v2/assets/delete-confirmation-dialog-COdZmNfa.js +0 -2
- prefect/server/ui-v2/assets/deployment._id-DVmqclRz.js +0 -2
- prefect/server/ui-v2/assets/deployment_._id.duplicate-DVMjpk5m.js +0 -2
- prefect/server/ui-v2/assets/deployment_._id.edit-Ck_P6KDn.js +0 -2
- prefect/server/ui-v2/assets/flow-run-graph-CfoPEAgQ.js +0 -2
- prefect/server/ui-v2/assets/flow-run-graph-CfoPEAgQ.js.map +0 -1
- prefect/server/ui-v2/assets/flow-run._id-C-qxwEBp.js +0 -4
- prefect/server/ui-v2/assets/flow-run._id-C-qxwEBp.js.map +0 -1
- prefect/server/ui-v2/assets/flow-run._id-OL0YhyLW.js +0 -2
- prefect/server/ui-v2/assets/flow-runs-pagination-DnwkJapB.js +0 -2
- prefect/server/ui-v2/assets/flow-runs-pagination-DnwkJapB.js.map +0 -1
- prefect/server/ui-v2/assets/flow._id-DhrCicwR.js +0 -2
- prefect/server/ui-v2/assets/index-7-r4ia_S.js +0 -2
- prefect/server/ui-v2/assets/index-7ThYp9SY.js +0 -2
- prefect/server/ui-v2/assets/index-B7zHzWQW.css +0 -1
- prefect/server/ui-v2/assets/index-B_3f8Hcb.js +0 -2
- prefect/server/ui-v2/assets/index-BiCd-Iuz.js +0 -2
- prefect/server/ui-v2/assets/index-BiCd-Iuz.js.map +0 -1
- prefect/server/ui-v2/assets/index-CT_nG86y.js +0 -2
- prefect/server/ui-v2/assets/index-Cs8eFQKw.js +0 -2
- prefect/server/ui-v2/assets/index-H6bwm6L6.js +0 -2
- prefect/server/ui-v2/assets/index-WYPZo52S.js +0 -17
- prefect/server/ui-v2/assets/index-WYPZo52S.js.map +0 -1
- prefect/server/ui-v2/assets/index-qPlIYf3i.js +0 -2
- prefect/server/ui-v2/assets/route-error-state-ALftyvGl.js +0 -2
- prefect/server/ui-v2/assets/settings-BL0X8cDU.js +0 -2
- prefect/server/ui-v2/assets/settings-BL0X8cDU.js.map +0 -1
- prefect/server/ui-v2/assets/table-CEAx-qHs.js +0 -2
- prefect/server/ui-v2/assets/table-CEAx-qHs.js.map +0 -1
- prefect/server/ui-v2/assets/tags-input-D1RJZEUA.js +0 -2
- prefect/server/ui-v2/assets/tags-input-D1RJZEUA.js.map +0 -1
- prefect/server/ui-v2/assets/task-run-concurrency-limits-reset-dialog-CG3den1B.js +0 -2
- prefect/server/ui-v2/assets/task-run._id-CnIVqU6v.js +0 -2
- prefect/server/ui-v2/assets/task-runs-pagination-DLSAz-Ur.js +0 -2
- prefect/server/ui-v2/assets/use-delete-automation-confirmation-dialog-Bzy2ML2T.js +0 -2
- prefect/server/ui-v2/assets/use-local-storage-CpxMp5wR.js +0 -2
- prefect/server/ui-v2/assets/use-local-storage-CpxMp5wR.js.map +0 -1
- prefect/server/ui-v2/assets/work-pool-queue-toggle-D4eeo-hi.js +0 -2
- prefect/server/ui-v2/assets/work-pool_._workPoolName.edit-CA0ePjCk.js +0 -2
- {prefect-3.6.12.dist-info → prefect-3.6.13.dist-info}/WHEEL +0 -0
- {prefect-3.6.12.dist-info → prefect-3.6.13.dist-info}/entry_points.txt +0 -0
- {prefect-3.6.12.dist-info → prefect-3.6.13.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e}from"./vendor-tanstack-BK8oseNA.js";import{am as d,an as r,ao as i,ap as u,aq as p,ar as m,as as c,at as l}from"./vendor-radix-CznP1SOq.js";import{
|
|
2
|
-
//# sourceMappingURL=dropdown-menu-
|
|
1
|
+
import{j as e}from"./vendor-tanstack-BK8oseNA.js";import{am as d,an as r,ao as i,ap as u,aq as p,ar as m,as as c,at as l}from"./vendor-radix-CznP1SOq.js";import{aW as n}from"./index-D5RdrxkU.js";function g({...t}){return e.jsx(d,{"data-slot":"dropdown-menu",...t})}function w({...t}){return e.jsx(r,{"data-slot":"dropdown-menu-trigger",...t})}function b({className:t,sideOffset:a=4,...o}){return e.jsx(i,{children:e.jsx(u,{"data-slot":"dropdown-menu-content",sideOffset:a,className:n("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md",t),...o})})}function j({...t}){return e.jsx(l,{"data-slot":"dropdown-menu-group",...t})}function h({className:t,inset:a,variant:o="default",...s}){return e.jsx(m,{"data-slot":"dropdown-menu-item","data-inset":a,"data-variant":o,className:n("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...s})}function D({className:t,inset:a,...o}){return e.jsx(p,{"data-slot":"dropdown-menu-label","data-inset":a,className:n("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),...o})}function M({className:t,...a}){return e.jsx(c,{"data-slot":"dropdown-menu-separator",className:n("bg-border -mx-1 my-1 h-px",t),...a})}export{g as D,w as a,b,D as c,h as d,M as e,j as f};
|
|
2
|
+
//# sourceMappingURL=dropdown-menu-e0Fqb6aw.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu-xZ_3w9OP.js","sources":["../../src/components/ui/dropdown-menu.tsx"],"sourcesContent":["import * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nfunction DropdownMenu({\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n\treturn <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n\t);\n}\n\nfunction DropdownMenuTrigger({\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Trigger\n\t\t\tdata-slot=\"dropdown-menu-trigger\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuContent({\n\tclassName,\n\tsideOffset = 4,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Portal>\n\t\t\t<DropdownMenuPrimitive.Content\n\t\t\t\tdata-slot=\"dropdown-menu-content\"\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</DropdownMenuPrimitive.Portal>\n\t);\n}\n\nfunction DropdownMenuGroup({\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n\t);\n}\n\nfunction DropdownMenuItem({\n\tclassName,\n\tinset,\n\tvariant = \"default\",\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n\tinset?: boolean;\n\tvariant?: \"default\" | \"destructive\";\n}) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Item\n\t\t\tdata-slot=\"dropdown-menu-item\"\n\t\t\tdata-inset={inset}\n\t\t\tdata-variant={variant}\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuCheckboxItem({\n\tclassName,\n\tchildren,\n\tchecked,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.CheckboxItem\n\t\t\tdata-slot=\"dropdown-menu-checkbox-item\"\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tchecked={checked}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n\t\t\t\t<DropdownMenuPrimitive.ItemIndicator>\n\t\t\t\t\t<CheckIcon className=\"size-4\" />\n\t\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t\t</span>\n\t\t\t{children}\n\t\t</DropdownMenuPrimitive.CheckboxItem>\n\t);\n}\n\nfunction DropdownMenuRadioGroup({\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.RadioGroup\n\t\t\tdata-slot=\"dropdown-menu-radio-group\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuRadioItem({\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.RadioItem\n\t\t\tdata-slot=\"dropdown-menu-radio-item\"\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n\t\t\t\t<DropdownMenuPrimitive.ItemIndicator>\n\t\t\t\t\t<CircleIcon className=\"size-2 fill-current\" />\n\t\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t\t</span>\n\t\t\t{children}\n\t\t</DropdownMenuPrimitive.RadioItem>\n\t);\n}\n\nfunction DropdownMenuLabel({\n\tclassName,\n\tinset,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n\tinset?: boolean;\n}) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Label\n\t\t\tdata-slot=\"dropdown-menu-label\"\n\t\t\tdata-inset={inset}\n\t\t\tclassName={cn(\n\t\t\t\t\"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuSeparator({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Separator\n\t\t\tdata-slot=\"dropdown-menu-separator\"\n\t\t\tclassName={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuShortcut({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"span\">) {\n\treturn (\n\t\t<span\n\t\t\tdata-slot=\"dropdown-menu-shortcut\"\n\t\t\tclassName={cn(\n\t\t\t\t\"text-muted-foreground ml-auto text-xs tracking-widest\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuSub({\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n\treturn <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n\tclassName,\n\tinset,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n\tinset?: boolean;\n}) {\n\treturn (\n\t\t<DropdownMenuPrimitive.SubTrigger\n\t\t\tdata-slot=\"dropdown-menu-sub-trigger\"\n\t\t\tdata-inset={inset}\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<ChevronRightIcon className=\"ml-auto size-4\" />\n\t\t</DropdownMenuPrimitive.SubTrigger>\n\t);\n}\n\nfunction DropdownMenuSubContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.SubContent\n\t\t\tdata-slot=\"dropdown-menu-sub-content\"\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tDropdownMenu,\n\tDropdownMenuPortal,\n\tDropdownMenuTrigger,\n\tDropdownMenuContent,\n\tDropdownMenuGroup,\n\tDropdownMenuLabel,\n\tDropdownMenuItem,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuRadioGroup,\n\tDropdownMenuRadioItem,\n\tDropdownMenuSeparator,\n\tDropdownMenuShortcut,\n\tDropdownMenuSub,\n\tDropdownMenuSubTrigger,\n\tDropdownMenuSubContent,\n};\n"],"names":["DropdownMenu","props","DropdownMenuPrimitive.Root","DropdownMenuTrigger","jsx","DropdownMenuPrimitive.Trigger","DropdownMenuContent","className","sideOffset","DropdownMenuPrimitive.Portal","DropdownMenuPrimitive.Content","cn","DropdownMenuGroup","DropdownMenuPrimitive.Group","DropdownMenuItem","inset","variant","DropdownMenuPrimitive.Item","DropdownMenuLabel","DropdownMenuPrimitive.Label","DropdownMenuSeparator","DropdownMenuPrimitive.Separator"],"mappings":"mMAMA,SAASA,EAAa,CACrB,GAAGC,CACJ,EAA4D,CAC3D,aAAQC,EAAA,CAA2B,YAAU,gBAAiB,GAAGD,EAAO,CACzE,CAUA,SAASE,EAAoB,CAC5B,GAAGF,CACJ,EAA+D,CAC9D,OACCG,EAAAA,IAACC,EAAA,CACA,YAAU,wBACT,GAAGJ,CAAA,CAAA,CAGP,CAEA,SAASK,EAAoB,CAC5B,UAAAC,EACA,WAAAC,EAAa,EACb,GAAGP,CACJ,EAA+D,CAC9D,OACCG,MAACK,EAAA,CACA,SAAAL,EAAAA,IAACM,EAAA,CACA,YAAU,wBACV,WAAAF,EACA,UAAWG,EACV,wbACAJ,CAAA,EAEA,GAAGN,CAAA,CAAA,EAEN,CAEF,CAEA,SAASW,EAAkB,CAC1B,GAAGX,CACJ,EAA6D,CAC5D,aACEY,EAAA,CAA4B,YAAU,sBAAuB,GAAGZ,EAAO,CAE1E,CAEA,SAASa,EAAiB,CACzB,UAAAP,EACA,MAAAQ,EACA,QAAAC,EAAU,UACV,GAAGf,CACJ,EAGG,CACF,OACCG,EAAAA,IAACa,EAAA,CACA,YAAU,qBACV,aAAYF,EACZ,eAAcC,EACd,UAAWL,EACV,8mBACAJ,CAAA,EAEA,GAAGN,CAAA,CAAA,CAGP,CA+DA,SAASiB,EAAkB,CAC1B,UAAAX,EACA,MAAAQ,EACA,GAAGd,CACJ,EAEG,CACF,OACCG,EAAAA,IAACe,EAAA,CACA,YAAU,sBACV,aAAYJ,EACZ,UAAWJ,EACV,oDACAJ,CAAA,EAEA,GAAGN,CAAA,CAAA,CAGP,CAEA,SAASmB,EAAsB,CAC9B,UAAAb,EACA,GAAGN,CACJ,EAAiE,CAChE,OACCG,EAAAA,IAACiB,EAAA,CACA,YAAU,0BACV,UAAWV,EAAG,4BAA6BJ,CAAS,EACnD,GAAGN,CAAA,CAAA,CAGP"}
|
|
1
|
+
{"version":3,"file":"dropdown-menu-e0Fqb6aw.js","sources":["../../src/components/ui/dropdown-menu.tsx"],"sourcesContent":["import * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nfunction DropdownMenu({\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n\treturn <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n\t);\n}\n\nfunction DropdownMenuTrigger({\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Trigger\n\t\t\tdata-slot=\"dropdown-menu-trigger\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuContent({\n\tclassName,\n\tsideOffset = 4,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Portal>\n\t\t\t<DropdownMenuPrimitive.Content\n\t\t\t\tdata-slot=\"dropdown-menu-content\"\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</DropdownMenuPrimitive.Portal>\n\t);\n}\n\nfunction DropdownMenuGroup({\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n\t);\n}\n\nfunction DropdownMenuItem({\n\tclassName,\n\tinset,\n\tvariant = \"default\",\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n\tinset?: boolean;\n\tvariant?: \"default\" | \"destructive\";\n}) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Item\n\t\t\tdata-slot=\"dropdown-menu-item\"\n\t\t\tdata-inset={inset}\n\t\t\tdata-variant={variant}\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuCheckboxItem({\n\tclassName,\n\tchildren,\n\tchecked,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.CheckboxItem\n\t\t\tdata-slot=\"dropdown-menu-checkbox-item\"\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tchecked={checked}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n\t\t\t\t<DropdownMenuPrimitive.ItemIndicator>\n\t\t\t\t\t<CheckIcon className=\"size-4\" />\n\t\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t\t</span>\n\t\t\t{children}\n\t\t</DropdownMenuPrimitive.CheckboxItem>\n\t);\n}\n\nfunction DropdownMenuRadioGroup({\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.RadioGroup\n\t\t\tdata-slot=\"dropdown-menu-radio-group\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuRadioItem({\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.RadioItem\n\t\t\tdata-slot=\"dropdown-menu-radio-item\"\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n\t\t\t\t<DropdownMenuPrimitive.ItemIndicator>\n\t\t\t\t\t<CircleIcon className=\"size-2 fill-current\" />\n\t\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t\t</span>\n\t\t\t{children}\n\t\t</DropdownMenuPrimitive.RadioItem>\n\t);\n}\n\nfunction DropdownMenuLabel({\n\tclassName,\n\tinset,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n\tinset?: boolean;\n}) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Label\n\t\t\tdata-slot=\"dropdown-menu-label\"\n\t\t\tdata-inset={inset}\n\t\t\tclassName={cn(\n\t\t\t\t\"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuSeparator({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Separator\n\t\t\tdata-slot=\"dropdown-menu-separator\"\n\t\t\tclassName={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuShortcut({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"span\">) {\n\treturn (\n\t\t<span\n\t\t\tdata-slot=\"dropdown-menu-shortcut\"\n\t\t\tclassName={cn(\n\t\t\t\t\"text-muted-foreground ml-auto text-xs tracking-widest\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuSub({\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n\treturn <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n\tclassName,\n\tinset,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n\tinset?: boolean;\n}) {\n\treturn (\n\t\t<DropdownMenuPrimitive.SubTrigger\n\t\t\tdata-slot=\"dropdown-menu-sub-trigger\"\n\t\t\tdata-inset={inset}\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<ChevronRightIcon className=\"ml-auto size-4\" />\n\t\t</DropdownMenuPrimitive.SubTrigger>\n\t);\n}\n\nfunction DropdownMenuSubContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.SubContent\n\t\t\tdata-slot=\"dropdown-menu-sub-content\"\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tDropdownMenu,\n\tDropdownMenuPortal,\n\tDropdownMenuTrigger,\n\tDropdownMenuContent,\n\tDropdownMenuGroup,\n\tDropdownMenuLabel,\n\tDropdownMenuItem,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuRadioGroup,\n\tDropdownMenuRadioItem,\n\tDropdownMenuSeparator,\n\tDropdownMenuShortcut,\n\tDropdownMenuSub,\n\tDropdownMenuSubTrigger,\n\tDropdownMenuSubContent,\n};\n"],"names":["DropdownMenu","props","DropdownMenuPrimitive.Root","DropdownMenuTrigger","jsx","DropdownMenuPrimitive.Trigger","DropdownMenuContent","className","sideOffset","DropdownMenuPrimitive.Portal","DropdownMenuPrimitive.Content","cn","DropdownMenuGroup","DropdownMenuPrimitive.Group","DropdownMenuItem","inset","variant","DropdownMenuPrimitive.Item","DropdownMenuLabel","DropdownMenuPrimitive.Label","DropdownMenuSeparator","DropdownMenuPrimitive.Separator"],"mappings":"mMAMA,SAASA,EAAa,CACrB,GAAGC,CACJ,EAA4D,CAC3D,aAAQC,EAAA,CAA2B,YAAU,gBAAiB,GAAGD,EAAO,CACzE,CAUA,SAASE,EAAoB,CAC5B,GAAGF,CACJ,EAA+D,CAC9D,OACCG,EAAAA,IAACC,EAAA,CACA,YAAU,wBACT,GAAGJ,CAAA,CAAA,CAGP,CAEA,SAASK,EAAoB,CAC5B,UAAAC,EACA,WAAAC,EAAa,EACb,GAAGP,CACJ,EAA+D,CAC9D,OACCG,MAACK,EAAA,CACA,SAAAL,EAAAA,IAACM,EAAA,CACA,YAAU,wBACV,WAAAF,EACA,UAAWG,EACV,wbACAJ,CAAA,EAEA,GAAGN,CAAA,CAAA,EAEN,CAEF,CAEA,SAASW,EAAkB,CAC1B,GAAGX,CACJ,EAA6D,CAC5D,aACEY,EAAA,CAA4B,YAAU,sBAAuB,GAAGZ,EAAO,CAE1E,CAEA,SAASa,EAAiB,CACzB,UAAAP,EACA,MAAAQ,EACA,QAAAC,EAAU,UACV,GAAGf,CACJ,EAGG,CACF,OACCG,EAAAA,IAACa,EAAA,CACA,YAAU,qBACV,aAAYF,EACZ,eAAcC,EACd,UAAWL,EACV,8mBACAJ,CAAA,EAEA,GAAGN,CAAA,CAAA,CAGP,CA+DA,SAASiB,EAAkB,CAC1B,UAAAX,EACA,MAAAQ,EACA,GAAGd,CACJ,EAEG,CACF,OACCG,EAAAA,IAACe,EAAA,CACA,YAAU,sBACV,aAAYJ,EACZ,UAAWJ,EACV,oDACAJ,CAAA,EAEA,GAAGN,CAAA,CAAA,CAGP,CAEA,SAASmB,EAAsB,CAC9B,UAAAb,EACA,GAAGN,CACJ,EAAiE,CAChE,OACCG,EAAAA,IAACiB,EAAA,CACA,YAAU,0BACV,UAAWV,EAAG,4BAA6BJ,CAAS,EACnD,GAAGN,CAAA,CAAA,CAGP"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e,L as
|
|
2
|
-
//# sourceMappingURL=event._eventDate._eventId-
|
|
1
|
+
import{j as e,L as y,p as D}from"./vendor-tanstack-BK8oseNA.js";import{q as E,I as o,y as R,H as C,B as w,g as T,h as x,bs as I,bB as L,bD as B,aw as M,ax as S,ay as p,az as h,bG as z,C as O,o as V,dz as i}from"./index-D5RdrxkU.js";import"./automation-schema-ClcP8M93.js";import"./form-DNerk3LS.js";import"./radio-group-BBMLpHGc.js";import{f as k}from"./event-to-trigger-BEzU9b5I.js";import{D as F,a as P,b as A,d as j}from"./dropdown-menu-e0Fqb6aw.js";import{E as J,p as _,a as G,b as H,R as Q,f as U,J as q}from"./utilities-BQwGFLk5.js";import{f as Y}from"./vendor-date-7GxEwcQM.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CznP1SOq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-forms-DxqqmhL5.js";function Z({event:s}){const t=()=>{navigator.clipboard.writeText(s.id),R.success("ID copied")};return e.jsxs(F,{children:[e.jsx(P,{asChild:!0,children:e.jsxs(E,{variant:"outline",className:"size-8 p-0","aria-label":"Event actions",children:[e.jsx("span",{className:"sr-only",children:"Open menu"}),e.jsx(o,{id:"MoreVertical",className:"size-4"})]})}),e.jsxs(A,{align:"end",children:[e.jsx(y,{to:"/automations/create",search:{eventId:s.id,eventDate:k(s.occurred)},children:e.jsxs(j,{children:[e.jsx(o,{id:"Zap",className:"mr-2 size-4"}),"Automate"]})}),e.jsxs(j,{onClick:t,children:[e.jsx(o,{id:"Copy",className:"mr-2 size-4"}),"Copy ID"]})]})]})}const d=({children:s})=>e.jsx("dt",{className:"text-sm font-medium",children:s}),f=({children:s})=>e.jsx("dd",{className:"text-sm",children:s});function g(s){return s["prefect.resource.role"]||null}function v(s){return s["prefect.resource.id"]||""}function K(s){return s["prefect.resource.name"]||s["prefect.name"]||s["prefect-cloud.name"]||null}function W({event:s}){const t=Y(new Date(s.occurred),"yyyy/MM/dd hh:mm:ss a"),n=(s.related??[]).filter(a=>g(a)!=="tag"),c=(s.related??[]).filter(a=>g(a)==="tag");return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("dl",{children:[e.jsx(d,{children:"Event"}),e.jsx(f,{children:s.event})]}),e.jsxs("dl",{children:[e.jsx(d,{children:"Occurred"}),e.jsx(f,{children:t})]}),e.jsx(J,{event:s}),(n.length>0||c.length>0)&&e.jsxs("dl",{children:[e.jsx(d,{children:"Related Resources"}),e.jsxs("dd",{className:"flex flex-col gap-2 text-sm",children:[n.map(a=>{const r=v(a),l=K(a),u=_(r),b=Q[u],m=H[u],N=l||r.split(".").pop()||r;return e.jsxs(G,{resource:a,relatedResources:s.related??[],className:"flex items-center gap-2 hover:underline",children:[m&&e.jsx("span",{children:m}),e.jsx(o,{id:b,className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:N})]},r)}),c.length>0&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{children:"Tags"}),c.map(a=>{const r=v(a),l=r.split(".").pop()||r;return e.jsx(C,{variant:"secondary",children:l},r)})]})]})]})]})}function X({event:s}){const t=U(s.event);return e.jsx(w,{children:e.jsxs(T,{children:[e.jsx(x,{children:e.jsx(I,{to:"/events",className:"text-xl font-semibold",children:"Event Feed"})}),e.jsx(L,{}),e.jsx(x,{className:"text-xl font-semibold",children:e.jsx(B,{children:t})})]})})}function $({event:s,defaultTab:t="details",onTabChange:n}){return e.jsxs(M,{defaultValue:t,onValueChange:n,children:[e.jsxs(S,{children:[e.jsx(p,{value:"details",children:"Details"}),e.jsx(p,{value:"raw",children:"Raw"})]}),e.jsx(h,{value:"details",className:"pt-4",children:e.jsx(W,{event:s})}),e.jsx(h,{value:"raw",className:"pt-4",children:e.jsx(q,{value:JSON.stringify(s,null,2),className:"max-h-[600px] overflow-auto"})})]})}function ee({eventId:s,eventDate:t,defaultTab:n,onTabChange:c}){const{data:a}=D(z(s,t));return e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(X,{event:a}),e.jsx(Z,{event:a})]}),e.jsx(O,{children:e.jsx(V,{children:e.jsx($,{event:a,defaultTab:n,onTabChange:c})})})]})}function se(s){const[t,n,c]=s.split("-").map(Number);return new Date(t,n-1,c)}function he(){const{eventDate:s,eventId:t}=i.useParams(),n=i.useSearch(),c=i.useNavigate(),a=se(s),r=l=>{c({to:".",search:{tab:l},replace:!0})};return e.jsx(ee,{eventId:t,eventDate:a,defaultTab:n.tab,onTabChange:r})}export{he as component};
|
|
2
|
+
//# sourceMappingURL=event._eventDate._eventId-Cp4UmGqq.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event._eventDate._eventId-CpexuXd6.js","sources":["../../src/components/events/event-details-page/event-action-menu.tsx","../../src/components/events/event-details-page/event-details-display.tsx","../../src/components/events/event-details-page/event-details-header.tsx","../../src/components/events/event-details-page/event-details-tabs.tsx","../../src/components/events/event-details-page/event-details-page.tsx","../../src/routes/events/event.$eventDate.$eventId.tsx?tsr-split=component"],"sourcesContent":["import { Link } from \"@tanstack/react-router\";\nimport { toast } from \"sonner\";\nimport type { Event } from \"@/api/events\";\nimport { formatEventDate } from \"@/components/automations/automations-wizard\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype EventActionMenuProps = {\n\tevent: Event;\n};\n\nexport function EventActionMenu({ event }: EventActionMenuProps) {\n\tconst handleCopyId = () => {\n\t\tvoid navigator.clipboard.writeText(event.id);\n\t\ttoast.success(\"ID copied\");\n\t};\n\n\treturn (\n\t\t<DropdownMenu>\n\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tclassName=\"size-8 p-0\"\n\t\t\t\t\taria-label=\"Event actions\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"sr-only\">Open menu</span>\n\t\t\t\t\t<Icon id=\"MoreVertical\" className=\"size-4\" />\n\t\t\t\t</Button>\n\t\t\t</DropdownMenuTrigger>\n\t\t\t<DropdownMenuContent align=\"end\">\n\t\t\t\t<Link\n\t\t\t\t\tto=\"/automations/create\"\n\t\t\t\t\tsearch={{\n\t\t\t\t\t\teventId: event.id,\n\t\t\t\t\t\teventDate: formatEventDate(event.occurred),\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<DropdownMenuItem>\n\t\t\t\t\t\t<Icon id=\"Zap\" className=\"mr-2 size-4\" />\n\t\t\t\t\t\tAutomate\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t</Link>\n\t\t\t\t<DropdownMenuItem onClick={handleCopyId}>\n\t\t\t\t\t<Icon id=\"Copy\" className=\"mr-2 size-4\" />\n\t\t\t\t\tCopy ID\n\t\t\t\t</DropdownMenuItem>\n\t\t\t</DropdownMenuContent>\n\t\t</DropdownMenu>\n\t);\n}\n","import { format } from \"date-fns\";\nimport type { Event } from \"@/api/events\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Icon } from \"@/components/ui/icons\";\nimport {\n\tEventResourceDisplay,\n\tEventResourceLink,\n} from \"../event-resource-display\";\nimport {\n\tparseResourceType,\n\tRESOURCE_ICONS,\n\tRESOURCE_TYPE_LABELS,\n} from \"../event-resource-display/resource-types\";\n\ntype EventDetailsDisplayProps = {\n\tevent: Event;\n};\n\nconst FieldLabel = ({ children }: { children: React.ReactNode }) => (\n\t<dt className=\"text-sm font-medium\">{children}</dt>\n);\n\nconst FieldValue = ({ children }: { children: React.ReactNode }) => (\n\t<dd className=\"text-sm\">{children}</dd>\n);\n\nfunction getResourceRole(resource: Record<string, string>): string | null {\n\treturn resource[\"prefect.resource.role\"] || null;\n}\n\nfunction getResourceId(resource: Record<string, string>): string {\n\treturn resource[\"prefect.resource.id\"] || \"\";\n}\n\nfunction getResourceName(resource: Record<string, string>): string | null {\n\treturn (\n\t\tresource[\"prefect.resource.name\"] ||\n\t\tresource[\"prefect.name\"] ||\n\t\tresource[\"prefect-cloud.name\"] ||\n\t\tnull\n\t);\n}\n\nexport function EventDetailsDisplay({ event }: EventDetailsDisplayProps) {\n\tconst occurredFormatted = format(\n\t\tnew Date(event.occurred),\n\t\t\"yyyy/MM/dd hh:mm:ss a\",\n\t);\n\n\tconst relatedResources = (event.related ?? []).filter((resource) => {\n\t\tconst role = getResourceRole(resource);\n\t\treturn role !== \"tag\";\n\t});\n\n\tconst tags = (event.related ?? []).filter((resource) => {\n\t\tconst role = getResourceRole(resource);\n\t\treturn role === \"tag\";\n\t});\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<dl>\n\t\t\t\t<FieldLabel>Event</FieldLabel>\n\t\t\t\t<FieldValue>{event.event}</FieldValue>\n\t\t\t</dl>\n\n\t\t\t<dl>\n\t\t\t\t<FieldLabel>Occurred</FieldLabel>\n\t\t\t\t<FieldValue>{occurredFormatted}</FieldValue>\n\t\t\t</dl>\n\n\t\t\t<EventResourceDisplay event={event} />\n\n\t\t\t{(relatedResources.length > 0 || tags.length > 0) && (\n\t\t\t\t<dl>\n\t\t\t\t\t<FieldLabel>Related Resources</FieldLabel>\n\t\t\t\t\t<dd className=\"flex flex-col gap-2 text-sm\">\n\t\t\t\t\t\t{relatedResources.map((resource) => {\n\t\t\t\t\t\t\tconst resourceId = getResourceId(resource);\n\t\t\t\t\t\t\tconst resourceName = getResourceName(resource);\n\t\t\t\t\t\t\tconst resourceType = parseResourceType(resourceId);\n\t\t\t\t\t\t\tconst iconId = RESOURCE_ICONS[resourceType];\n\t\t\t\t\t\t\tconst typeLabel = RESOURCE_TYPE_LABELS[resourceType];\n\n\t\t\t\t\t\t\tconst displayText =\n\t\t\t\t\t\t\t\tresourceName || resourceId.split(\".\").pop() || resourceId;\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<EventResourceLink\n\t\t\t\t\t\t\t\t\tkey={resourceId}\n\t\t\t\t\t\t\t\t\tresource={resource}\n\t\t\t\t\t\t\t\t\trelatedResources={event.related ?? []}\n\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-2 hover:underline\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{typeLabel && <span>{typeLabel}</span>}\n\t\t\t\t\t\t\t\t\t<Icon id={iconId} className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t<span>{displayText}</span>\n\t\t\t\t\t\t\t\t</EventResourceLink>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\n\t\t\t\t\t\t{tags.length > 0 && (\n\t\t\t\t\t\t\t<div className=\"flex flex-wrap items-center gap-2\">\n\t\t\t\t\t\t\t\t<span>Tags</span>\n\t\t\t\t\t\t\t\t{tags.map((resource) => {\n\t\t\t\t\t\t\t\t\tconst resourceId = getResourceId(resource);\n\t\t\t\t\t\t\t\t\tconst tagName = resourceId.split(\".\").pop() || resourceId;\n\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<Badge key={resourceId} variant=\"secondary\">\n\t\t\t\t\t\t\t\t\t\t\t{tagName}\n\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</dd>\n\t\t\t\t</dl>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n","import type { Event } from \"@/api/events\";\nimport {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbLink,\n\tBreadcrumbList,\n\tBreadcrumbPage,\n\tBreadcrumbSeparator,\n} from \"@/components/ui/breadcrumb\";\nimport { formatEventLabel } from \"../events-timeline\";\n\ntype EventDetailsHeaderProps = {\n\tevent: Event;\n};\n\nexport function EventDetailsHeader({ event }: EventDetailsHeaderProps) {\n\tconst eventLabel = formatEventLabel(event.event);\n\n\treturn (\n\t\t<Breadcrumb>\n\t\t\t<BreadcrumbList>\n\t\t\t\t<BreadcrumbItem>\n\t\t\t\t\t<BreadcrumbLink to=\"/events\" className=\"text-xl font-semibold\">\n\t\t\t\t\t\tEvent Feed\n\t\t\t\t\t</BreadcrumbLink>\n\t\t\t\t</BreadcrumbItem>\n\t\t\t\t<BreadcrumbSeparator />\n\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t<BreadcrumbPage>{eventLabel}</BreadcrumbPage>\n\t\t\t\t</BreadcrumbItem>\n\t\t\t</BreadcrumbList>\n\t\t</Breadcrumb>\n\t);\n}\n","import type { Event } from \"@/api/events\";\nimport { JsonView } from \"@/components/ui/json-view\";\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@/components/ui/tabs\";\nimport { EventDetailsDisplay } from \"./event-details-display\";\n\ntype EventDetailsTabsProps = {\n\tevent: Event;\n\tdefaultTab?: \"details\" | \"raw\";\n\tonTabChange?: (tab: string) => void;\n};\n\nexport function EventDetailsTabs({\n\tevent,\n\tdefaultTab = \"details\",\n\tonTabChange,\n}: EventDetailsTabsProps) {\n\treturn (\n\t\t<Tabs defaultValue={defaultTab} onValueChange={onTabChange}>\n\t\t\t<TabsList>\n\t\t\t\t<TabsTrigger value=\"details\">Details</TabsTrigger>\n\t\t\t\t<TabsTrigger value=\"raw\">Raw</TabsTrigger>\n\t\t\t</TabsList>\n\t\t\t<TabsContent value=\"details\" className=\"pt-4\">\n\t\t\t\t<EventDetailsDisplay event={event} />\n\t\t\t</TabsContent>\n\t\t\t<TabsContent value=\"raw\" className=\"pt-4\">\n\t\t\t\t<JsonView\n\t\t\t\t\tvalue={JSON.stringify(event, null, 2)}\n\t\t\t\t\tclassName=\"max-h-[600px] overflow-auto\"\n\t\t\t\t/>\n\t\t\t</TabsContent>\n\t\t</Tabs>\n\t);\n}\n","import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { buildGetEventQuery } from \"@/api/events\";\nimport { Card, CardContent } from \"@/components/ui/card\";\nimport { EventActionMenu } from \"./event-action-menu\";\nimport { EventDetailsHeader } from \"./event-details-header\";\nimport { EventDetailsTabs } from \"./event-details-tabs\";\n\ntype EventDetailsPageProps = {\n\teventId: string;\n\teventDate: Date;\n\tdefaultTab?: \"details\" | \"raw\";\n\tonTabChange?: (tab: string) => void;\n};\n\nexport function EventDetailsPage({\n\teventId,\n\teventDate,\n\tdefaultTab,\n\tonTabChange,\n}: EventDetailsPageProps) {\n\tconst { data: event } = useSuspenseQuery(\n\t\tbuildGetEventQuery(eventId, eventDate),\n\t);\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-6\">\n\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t<EventDetailsHeader event={event} />\n\t\t\t\t<EventActionMenu event={event} />\n\t\t\t</div>\n\t\t\t<Card>\n\t\t\t\t<CardContent>\n\t\t\t\t\t<EventDetailsTabs\n\t\t\t\t\t\tevent={event}\n\t\t\t\t\t\tdefaultTab={defaultTab}\n\t\t\t\t\t\tonTabChange={onTabChange}\n\t\t\t\t\t/>\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\t\t</div>\n\t);\n}\n","import { createFileRoute } from \"@tanstack/react-router\";\nimport { zodValidator } from \"@tanstack/zod-adapter\";\nimport { z } from \"zod\";\nimport { buildGetEventQuery } from \"@/api/events\";\nimport { EventDetailsPage } from \"@/components/events/event-details-page\";\n\nconst searchParams = z.object({\n\ttab: z.enum([\"details\", \"raw\"]).optional().default(\"details\"),\n});\n\nfunction parseRouteDate(dateStr: string): Date {\n\tconst [year, month, day] = dateStr.split(\"-\").map(Number);\n\treturn new Date(year, month - 1, day);\n}\n\nexport const Route = createFileRoute(\"/events/event/$eventDate/$eventId\")({\n\tvalidateSearch: zodValidator(searchParams),\n\tcomponent: RouteComponent,\n\tloader: async ({ params, context: { queryClient } }) => {\n\t\tconst eventDate = parseRouteDate(params.eventDate);\n\t\tawait queryClient.ensureQueryData(\n\t\t\tbuildGetEventQuery(params.eventId, eventDate),\n\t\t);\n\t},\n\twrapInSuspense: true,\n});\n\nfunction RouteComponent() {\n\tconst { eventDate, eventId } = Route.useParams();\n\tconst search = Route.useSearch();\n\tconst navigate = Route.useNavigate();\n\n\tconst parsedDate = parseRouteDate(eventDate);\n\n\tconst handleTabChange = (tab: string) => {\n\t\tvoid navigate({\n\t\t\tto: \".\",\n\t\t\tsearch: { tab: tab as \"details\" | \"raw\" },\n\t\t\treplace: true,\n\t\t});\n\t};\n\n\treturn (\n\t\t<EventDetailsPage\n\t\t\teventId={eventId}\n\t\t\teventDate={parsedDate}\n\t\t\tdefaultTab={search.tab}\n\t\t\tonTabChange={handleTabChange}\n\t\t/>\n\t);\n}\n"],"names":["EventActionMenu","event","handleCopyId","toast","DropdownMenu","jsx","DropdownMenuTrigger","jsxs","Button","Icon","DropdownMenuContent","Link","formatEventDate","DropdownMenuItem","FieldLabel","children","FieldValue","getResourceRole","resource","getResourceId","getResourceName","EventDetailsDisplay","occurredFormatted","format","relatedResources","tags","EventResourceDisplay","resourceId","resourceName","resourceType","parseResourceType","iconId","RESOURCE_ICONS","typeLabel","RESOURCE_TYPE_LABELS","displayText","EventResourceLink","tagName","Badge","EventDetailsHeader","eventLabel","formatEventLabel","Breadcrumb","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbSeparator","BreadcrumbPage","EventDetailsTabs","defaultTab","onTabChange","Tabs","TabsList","TabsTrigger","TabsContent","JsonView","EventDetailsPage","eventId","eventDate","useSuspenseQuery","buildGetEventQuery","Card","CardContent","parseRouteDate","dateStr","year","month","day","split","map","Number","Date","RouteComponent","Route","useParams","search","useSearch","navigate","useNavigate","parsedDate","handleTabChange","tab","to","replace"],"mappings":"wtBAiBO,SAASA,EAAgB,CAAE,MAAAC,GAA+B,CAChE,MAAMC,EAAe,IAAM,CACrB,UAAU,UAAU,UAAUD,EAAM,EAAE,EAC3CE,EAAM,QAAQ,WAAW,CAC1B,EAEA,cACEC,EAAA,CACA,SAAA,CAAAC,EAAAA,IAACC,EAAA,CAAoB,QAAO,GAC3B,SAAAC,EAAAA,KAACC,EAAA,CACA,QAAQ,UACR,UAAU,aACV,aAAW,gBAEX,SAAA,CAAAH,EAAAA,IAAC,OAAA,CAAK,UAAU,UAAU,SAAA,YAAS,EACnCA,EAAAA,IAACI,EAAA,CAAK,GAAG,eAAe,UAAU,QAAA,CAAS,CAAA,CAAA,CAAA,EAE7C,EACAF,EAAAA,KAACG,EAAA,CAAoB,MAAM,MAC1B,SAAA,CAAAL,EAAAA,IAACM,EAAA,CACA,GAAG,sBACH,OAAQ,CACP,QAASV,EAAM,GACf,UAAWW,EAAgBX,EAAM,QAAQ,CAAA,EAG1C,gBAACY,EAAA,CACA,SAAA,CAAAR,EAAAA,IAACI,EAAA,CAAK,GAAG,MAAM,UAAU,cAAc,EAAE,UAAA,CAAA,CAE1C,CAAA,CAAA,EAEDF,EAAAA,KAACM,EAAA,CAAiB,QAASX,EAC1B,SAAA,CAAAG,EAAAA,IAACI,EAAA,CAAK,GAAG,OAAO,UAAU,cAAc,EAAE,SAAA,CAAA,CAE3C,CAAA,CAAA,CACD,CAAA,EACD,CAEF,CCrCA,MAAMK,EAAa,CAAC,CAAE,SAAAC,CAAA,IACrBV,EAAAA,IAAC,KAAA,CAAG,UAAU,sBAAuB,SAAAU,EAAS,EAGzCC,EAAa,CAAC,CAAE,SAAAD,CAAA,IACrBV,EAAAA,IAAC,KAAA,CAAG,UAAU,UAAW,SAAAU,EAAS,EAGnC,SAASE,EAAgBC,EAAiD,CACzE,OAAOA,EAAS,uBAAuB,GAAK,IAC7C,CAEA,SAAS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AAYgB,EAAMC,UAAAA,EAC/BC,EAASF,EAAMG,UAAAA,EACfC,EAAWJ,EAAMK,YAAAA,EAEjBC,EAAahB,GAAeL,CAAS,EAErCsB,EAAmBC,GAAgB,CACnCJ,EAAS,CACbK,GAAI,IACJP,OAAQ,CAAEM,IAAAA,CAAAA,EACVE,QAAS,EAAA,CACT,CACF,EAEA,OACC9E,MAACmD,IACA,QAAAC,EACA,UAAWsB,EACX,WAAYJ,EAAOM,IACnB,YAAaD,CAAAA,CAAgB,CAGhC"}
|
|
1
|
+
{"version":3,"file":"event._eventDate._eventId-Cp4UmGqq.js","sources":["../../src/components/events/event-details-page/event-action-menu.tsx","../../src/components/events/event-details-page/event-details-display.tsx","../../src/components/events/event-details-page/event-details-header.tsx","../../src/components/events/event-details-page/event-details-tabs.tsx","../../src/components/events/event-details-page/event-details-page.tsx","../../src/routes/events/event.$eventDate.$eventId.tsx?tsr-split=component"],"sourcesContent":["import { Link } from \"@tanstack/react-router\";\nimport { toast } from \"sonner\";\nimport type { Event } from \"@/api/events\";\nimport { formatEventDate } from \"@/components/automations/automations-wizard\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDropdownMenu,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { Icon } from \"@/components/ui/icons\";\n\ntype EventActionMenuProps = {\n\tevent: Event;\n};\n\nexport function EventActionMenu({ event }: EventActionMenuProps) {\n\tconst handleCopyId = () => {\n\t\tvoid navigator.clipboard.writeText(event.id);\n\t\ttoast.success(\"ID copied\");\n\t};\n\n\treturn (\n\t\t<DropdownMenu>\n\t\t\t<DropdownMenuTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\tclassName=\"size-8 p-0\"\n\t\t\t\t\taria-label=\"Event actions\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"sr-only\">Open menu</span>\n\t\t\t\t\t<Icon id=\"MoreVertical\" className=\"size-4\" />\n\t\t\t\t</Button>\n\t\t\t</DropdownMenuTrigger>\n\t\t\t<DropdownMenuContent align=\"end\">\n\t\t\t\t<Link\n\t\t\t\t\tto=\"/automations/create\"\n\t\t\t\t\tsearch={{\n\t\t\t\t\t\teventId: event.id,\n\t\t\t\t\t\teventDate: formatEventDate(event.occurred),\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<DropdownMenuItem>\n\t\t\t\t\t\t<Icon id=\"Zap\" className=\"mr-2 size-4\" />\n\t\t\t\t\t\tAutomate\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t</Link>\n\t\t\t\t<DropdownMenuItem onClick={handleCopyId}>\n\t\t\t\t\t<Icon id=\"Copy\" className=\"mr-2 size-4\" />\n\t\t\t\t\tCopy ID\n\t\t\t\t</DropdownMenuItem>\n\t\t\t</DropdownMenuContent>\n\t\t</DropdownMenu>\n\t);\n}\n","import { format } from \"date-fns\";\nimport type { Event } from \"@/api/events\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Icon } from \"@/components/ui/icons\";\nimport {\n\tEventResourceDisplay,\n\tEventResourceLink,\n} from \"../event-resource-display\";\nimport {\n\tparseResourceType,\n\tRESOURCE_ICONS,\n\tRESOURCE_TYPE_LABELS,\n} from \"../event-resource-display/resource-types\";\n\ntype EventDetailsDisplayProps = {\n\tevent: Event;\n};\n\nconst FieldLabel = ({ children }: { children: React.ReactNode }) => (\n\t<dt className=\"text-sm font-medium\">{children}</dt>\n);\n\nconst FieldValue = ({ children }: { children: React.ReactNode }) => (\n\t<dd className=\"text-sm\">{children}</dd>\n);\n\nfunction getResourceRole(resource: Record<string, string>): string | null {\n\treturn resource[\"prefect.resource.role\"] || null;\n}\n\nfunction getResourceId(resource: Record<string, string>): string {\n\treturn resource[\"prefect.resource.id\"] || \"\";\n}\n\nfunction getResourceName(resource: Record<string, string>): string | null {\n\treturn (\n\t\tresource[\"prefect.resource.name\"] ||\n\t\tresource[\"prefect.name\"] ||\n\t\tresource[\"prefect-cloud.name\"] ||\n\t\tnull\n\t);\n}\n\nexport function EventDetailsDisplay({ event }: EventDetailsDisplayProps) {\n\tconst occurredFormatted = format(\n\t\tnew Date(event.occurred),\n\t\t\"yyyy/MM/dd hh:mm:ss a\",\n\t);\n\n\tconst relatedResources = (event.related ?? []).filter((resource) => {\n\t\tconst role = getResourceRole(resource);\n\t\treturn role !== \"tag\";\n\t});\n\n\tconst tags = (event.related ?? []).filter((resource) => {\n\t\tconst role = getResourceRole(resource);\n\t\treturn role === \"tag\";\n\t});\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<dl>\n\t\t\t\t<FieldLabel>Event</FieldLabel>\n\t\t\t\t<FieldValue>{event.event}</FieldValue>\n\t\t\t</dl>\n\n\t\t\t<dl>\n\t\t\t\t<FieldLabel>Occurred</FieldLabel>\n\t\t\t\t<FieldValue>{occurredFormatted}</FieldValue>\n\t\t\t</dl>\n\n\t\t\t<EventResourceDisplay event={event} />\n\n\t\t\t{(relatedResources.length > 0 || tags.length > 0) && (\n\t\t\t\t<dl>\n\t\t\t\t\t<FieldLabel>Related Resources</FieldLabel>\n\t\t\t\t\t<dd className=\"flex flex-col gap-2 text-sm\">\n\t\t\t\t\t\t{relatedResources.map((resource) => {\n\t\t\t\t\t\t\tconst resourceId = getResourceId(resource);\n\t\t\t\t\t\t\tconst resourceName = getResourceName(resource);\n\t\t\t\t\t\t\tconst resourceType = parseResourceType(resourceId);\n\t\t\t\t\t\t\tconst iconId = RESOURCE_ICONS[resourceType];\n\t\t\t\t\t\t\tconst typeLabel = RESOURCE_TYPE_LABELS[resourceType];\n\n\t\t\t\t\t\t\tconst displayText =\n\t\t\t\t\t\t\t\tresourceName || resourceId.split(\".\").pop() || resourceId;\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<EventResourceLink\n\t\t\t\t\t\t\t\t\tkey={resourceId}\n\t\t\t\t\t\t\t\t\tresource={resource}\n\t\t\t\t\t\t\t\t\trelatedResources={event.related ?? []}\n\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-2 hover:underline\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{typeLabel && <span>{typeLabel}</span>}\n\t\t\t\t\t\t\t\t\t<Icon id={iconId} className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t\t\t\t\t\t\t<span>{displayText}</span>\n\t\t\t\t\t\t\t\t</EventResourceLink>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\n\t\t\t\t\t\t{tags.length > 0 && (\n\t\t\t\t\t\t\t<div className=\"flex flex-wrap items-center gap-2\">\n\t\t\t\t\t\t\t\t<span>Tags</span>\n\t\t\t\t\t\t\t\t{tags.map((resource) => {\n\t\t\t\t\t\t\t\t\tconst resourceId = getResourceId(resource);\n\t\t\t\t\t\t\t\t\tconst tagName = resourceId.split(\".\").pop() || resourceId;\n\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<Badge key={resourceId} variant=\"secondary\">\n\t\t\t\t\t\t\t\t\t\t\t{tagName}\n\t\t\t\t\t\t\t\t\t\t</Badge>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</dd>\n\t\t\t\t</dl>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n","import type { Event } from \"@/api/events\";\nimport {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbLink,\n\tBreadcrumbList,\n\tBreadcrumbPage,\n\tBreadcrumbSeparator,\n} from \"@/components/ui/breadcrumb\";\nimport { formatEventLabel } from \"../events-timeline\";\n\ntype EventDetailsHeaderProps = {\n\tevent: Event;\n};\n\nexport function EventDetailsHeader({ event }: EventDetailsHeaderProps) {\n\tconst eventLabel = formatEventLabel(event.event);\n\n\treturn (\n\t\t<Breadcrumb>\n\t\t\t<BreadcrumbList>\n\t\t\t\t<BreadcrumbItem>\n\t\t\t\t\t<BreadcrumbLink to=\"/events\" className=\"text-xl font-semibold\">\n\t\t\t\t\t\tEvent Feed\n\t\t\t\t\t</BreadcrumbLink>\n\t\t\t\t</BreadcrumbItem>\n\t\t\t\t<BreadcrumbSeparator />\n\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t<BreadcrumbPage>{eventLabel}</BreadcrumbPage>\n\t\t\t\t</BreadcrumbItem>\n\t\t\t</BreadcrumbList>\n\t\t</Breadcrumb>\n\t);\n}\n","import type { Event } from \"@/api/events\";\nimport { JsonView } from \"@/components/ui/json-view\";\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@/components/ui/tabs\";\nimport { EventDetailsDisplay } from \"./event-details-display\";\n\ntype EventDetailsTabsProps = {\n\tevent: Event;\n\tdefaultTab?: \"details\" | \"raw\";\n\tonTabChange?: (tab: string) => void;\n};\n\nexport function EventDetailsTabs({\n\tevent,\n\tdefaultTab = \"details\",\n\tonTabChange,\n}: EventDetailsTabsProps) {\n\treturn (\n\t\t<Tabs defaultValue={defaultTab} onValueChange={onTabChange}>\n\t\t\t<TabsList>\n\t\t\t\t<TabsTrigger value=\"details\">Details</TabsTrigger>\n\t\t\t\t<TabsTrigger value=\"raw\">Raw</TabsTrigger>\n\t\t\t</TabsList>\n\t\t\t<TabsContent value=\"details\" className=\"pt-4\">\n\t\t\t\t<EventDetailsDisplay event={event} />\n\t\t\t</TabsContent>\n\t\t\t<TabsContent value=\"raw\" className=\"pt-4\">\n\t\t\t\t<JsonView\n\t\t\t\t\tvalue={JSON.stringify(event, null, 2)}\n\t\t\t\t\tclassName=\"max-h-[600px] overflow-auto\"\n\t\t\t\t/>\n\t\t\t</TabsContent>\n\t\t</Tabs>\n\t);\n}\n","import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { buildGetEventQuery } from \"@/api/events\";\nimport { Card, CardContent } from \"@/components/ui/card\";\nimport { EventActionMenu } from \"./event-action-menu\";\nimport { EventDetailsHeader } from \"./event-details-header\";\nimport { EventDetailsTabs } from \"./event-details-tabs\";\n\ntype EventDetailsPageProps = {\n\teventId: string;\n\teventDate: Date;\n\tdefaultTab?: \"details\" | \"raw\";\n\tonTabChange?: (tab: string) => void;\n};\n\nexport function EventDetailsPage({\n\teventId,\n\teventDate,\n\tdefaultTab,\n\tonTabChange,\n}: EventDetailsPageProps) {\n\tconst { data: event } = useSuspenseQuery(\n\t\tbuildGetEventQuery(eventId, eventDate),\n\t);\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-6\">\n\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t<EventDetailsHeader event={event} />\n\t\t\t\t<EventActionMenu event={event} />\n\t\t\t</div>\n\t\t\t<Card>\n\t\t\t\t<CardContent>\n\t\t\t\t\t<EventDetailsTabs\n\t\t\t\t\t\tevent={event}\n\t\t\t\t\t\tdefaultTab={defaultTab}\n\t\t\t\t\t\tonTabChange={onTabChange}\n\t\t\t\t\t/>\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\t\t</div>\n\t);\n}\n","import { createFileRoute } from \"@tanstack/react-router\";\nimport { zodValidator } from \"@tanstack/zod-adapter\";\nimport { z } from \"zod\";\nimport { buildGetEventQuery } from \"@/api/events\";\nimport { EventDetailsPage } from \"@/components/events/event-details-page\";\n\nconst searchParams = z.object({\n\ttab: z.enum([\"details\", \"raw\"]).optional().default(\"details\"),\n});\n\nfunction parseRouteDate(dateStr: string): Date {\n\tconst [year, month, day] = dateStr.split(\"-\").map(Number);\n\treturn new Date(year, month - 1, day);\n}\n\nexport const Route = createFileRoute(\"/events/event/$eventDate/$eventId\")({\n\tvalidateSearch: zodValidator(searchParams),\n\tcomponent: RouteComponent,\n\tloader: async ({ params, context: { queryClient } }) => {\n\t\tconst eventDate = parseRouteDate(params.eventDate);\n\t\tawait queryClient.ensureQueryData(\n\t\t\tbuildGetEventQuery(params.eventId, eventDate),\n\t\t);\n\t},\n\twrapInSuspense: true,\n});\n\nfunction RouteComponent() {\n\tconst { eventDate, eventId } = Route.useParams();\n\tconst search = Route.useSearch();\n\tconst navigate = Route.useNavigate();\n\n\tconst parsedDate = parseRouteDate(eventDate);\n\n\tconst handleTabChange = (tab: string) => {\n\t\tvoid navigate({\n\t\t\tto: \".\",\n\t\t\tsearch: { tab: tab as \"details\" | \"raw\" },\n\t\t\treplace: true,\n\t\t});\n\t};\n\n\treturn (\n\t\t<EventDetailsPage\n\t\t\teventId={eventId}\n\t\t\teventDate={parsedDate}\n\t\t\tdefaultTab={search.tab}\n\t\t\tonTabChange={handleTabChange}\n\t\t/>\n\t);\n}\n"],"names":["EventActionMenu","event","handleCopyId","toast","DropdownMenu","jsx","DropdownMenuTrigger","jsxs","Button","Icon","DropdownMenuContent","Link","formatEventDate","DropdownMenuItem","FieldLabel","children","FieldValue","getResourceRole","resource","getResourceId","getResourceName","EventDetailsDisplay","occurredFormatted","format","relatedResources","tags","EventResourceDisplay","resourceId","resourceName","resourceType","parseResourceType","iconId","RESOURCE_ICONS","typeLabel","RESOURCE_TYPE_LABELS","displayText","EventResourceLink","tagName","Badge","EventDetailsHeader","eventLabel","formatEventLabel","Breadcrumb","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbSeparator","BreadcrumbPage","EventDetailsTabs","defaultTab","onTabChange","Tabs","TabsList","TabsTrigger","TabsContent","JsonView","EventDetailsPage","eventId","eventDate","useSuspenseQuery","buildGetEventQuery","Card","CardContent","parseRouteDate","dateStr","year","month","day","split","map","Number","Date","RouteComponent","Route","useParams","search","useSearch","navigate","useNavigate","parsedDate","handleTabChange","tab","to","replace"],"mappings":"wtBAiBO,SAASA,EAAgB,CAAE,MAAAC,GAA+B,CAChE,MAAMC,EAAe,IAAM,CACrB,UAAU,UAAU,UAAUD,EAAM,EAAE,EAC3CE,EAAM,QAAQ,WAAW,CAC1B,EAEA,cACEC,EAAA,CACA,SAAA,CAAAC,EAAAA,IAACC,EAAA,CAAoB,QAAO,GAC3B,SAAAC,E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IACnB,YAAaD,CAAAA,CAAgB,CAGhC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as a,j as e,s as R}from"./vendor-tanstack-BK8oseNA.js";import{A as J,u as o,l as H,h as P,f as X,p as V,m as W,g as Y,y as Z,_ as O,d as ee,a as M,i as te,v as se,x as re,b as ae,c as ne,e as L}from"./vendor-graphs-Diy0Lo-N.js";import{ci as q,bR as b,bS as k,q as h,I as S,bT as N,al as F,i as y,G as w,cH as ie,cI as le,cJ as ce,z as oe,aD as de,aC as ue}from"./index-D5RdrxkU.js";import{g as z}from"./state-colors-CAAf0Eg3.js";import{p as d}from"./vendor-date-7GxEwcQM.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CznP1SOq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-forms-DxqqmhL5.js";async function he(t){const{data:s}=await(await q()).GET("/flow_runs/{id}/graph-v2",{params:{path:{id:t}}});if(!s)throw new Error("No data returned from API");return pe(s)}async function fe({since:t,until:s,nodeId:n}){const{data:i}=await(await q()).POST("/events/filter",{body:{filter:{any_resource:{id:[`prefect.flow-run.${n}`]},event:{exclude_prefix:["prefect.log.write","prefect.task-run."]},occurred:{since:t.toISOString(),until:s.toISOString()},order:"ASC"},limit:200}});if(!i)throw new Error("No data returned from API");return me(i)}function pe(t){if(!t.start_time)throw new Error("Start time is required");return{root_node_ids:t.root_node_ids,start_time:d(t.start_time),end_time:t.end_time?d(t.end_time):null,nodes:new Map(t.nodes.map(s=>xe(s)))}}function me(t){return t.events.map(s=>{if(!s.received)throw new Error("Received is required");return{id:s.id,received:d(s.received),occurred:d(s.occurred),event:s.event,resource:s.resource,payload:s.payload,related:s.related??[]}})}function xe([t,s]){if(!s.start_time)throw new Error("Start time is required");return[t,{kind:s.kind,id:s.id,label:s.label,state_type:s.state_type,start_time:d(s.start_time),end_time:s.end_time?d(s.end_time):null,parents:s.parents,children:s.children,artifacts:s.artifacts.map(ge)}]}function ge(t){if(!t.type)throw new Error("Artifact type is required");return t.type==="progress"&&typeof t.data=="number"?{id:t.id,created:d(t.created),key:t.key??void 0,type:t.type,data:t.data}:{id:t.id,created:d(t.created),key:t.key??void 0,type:t.type}}const I={COMPLETED:600,RUNNING:700,SCHEDULED:700,PENDING:800,FAILED:700,CANCELLED:600,CANCELLING:600,CRASHED:600,PAUSED:800};function U(t){return!t||!(t instanceof HTMLElement)?!1:["INPUT","TEXTAREA","SELECT"].includes(t.tagName)}const G=()=>{J({animate:!0})};function ye(){return a.useEffect(()=>{const t=new AbortController;return document.addEventListener("keydown",s=>{U(s.target)||s.metaKey||s.ctrlKey||s.key==="c"&&G()},{signal:t.signal}),()=>t.abort()},[]),e.jsxs(b,{children:[e.jsx(k,{asChild:!0,children:e.jsx(h,{variant:"outline",size:"icon",onClick:G,children:e.jsx(S,{id:"Crosshair",className:"size-4"})})}),e.jsx(N,{children:"Recenter (c)"})]})}function Ee({fullscreen:t,onFullscreenChange:s}){const n=a.useCallback(()=>{s(!t)},[t,s]);return a.useEffect(()=>{const i=new AbortController;return document.addEventListener("keydown",l=>{if(!(U(l.target)||l.metaKey||l.ctrlKey)){if(l.key==="f"){n();return}if(l.key==="Escape"){n();return}}},{signal:i.signal}),()=>i.abort()},[n]),e.jsxs(b,{children:[e.jsx(k,{asChild:!0,children:e.jsx(h,{variant:"outline",size:"icon",onClick:n,children:e.jsx(S,{id:"Expand",className:"size-4"})})}),e.jsx(N,{children:"Fullscreen (f)"})]})}const ve=[{label:"Temporal dependency",value:"temporal_nearest-parent"},{label:"Temporal sequence",value:"temporal_waterfall"},{label:"Dependency grid",value:"dependency_nearest-parent"},{label:"Sequential grid",value:"dependency_waterfall"},{label:"Comparative duration",value:"left-aligned_duration-sorted"}],je=()=>{const t=M+1,s=o.horizontalScaleMultiplier*t;O(s)},_e=()=>{const t=Math.abs(M-1),s=o.horizontalScaleMultiplier*t;O(s)},Ce=()=>{ee()};function we(t){const[s,n]=t.split("_");return H(s)&&P(n)}function be(){const[t,s]=a.useState(`${o.horizontal}_${o.vertical}`),[n,i]=a.useState(o.disableEdges),[l,m]=a.useState(o.disableArtifacts),[E,v]=a.useState(o.disableEvents),j=a.useCallback(r=>{if(!we(r))return;const[u,p]=r.split("_");!H(u)||!P(p)||(s(r),X(u),V(p))},[]),x=a.useCallback(r=>{i(r),W(r)},[]),f=a.useCallback(r=>{m(r),Y(r)},[]),_=a.useCallback(r=>{v(r),Z(r)},[]);return e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(F,{variant:"bodyLarge",children:"Layout"}),e.jsx("div",{className:"flex flex-col gap-2",children:ve.map(r=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"radio",id:r.value,name:"layout",value:r.value,checked:t===r.value,onChange:u=>j(u.target.value)}),e.jsx(y,{htmlFor:r.value,children:r.label})]},r.value))})]}),(o.isTemporal()||o.isLeftAligned())&&e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(F,{variant:"bodyLarge",children:"Scaling"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(h,{variant:"outline",size:"sm",onClick:_e,title:"Decrease scale (-)",children:"-"}),e.jsx(h,{variant:"outline",size:"sm",onClick:je,title:"Increase scale (+)",children:"+"}),e.jsx(h,{variant:"outline",size:"sm",onClick:Ce,children:"Reset"})]})]}),e.jsx("hr",{className:"my-4"}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(w,{id:"hideEdges",checked:n,onCheckedChange:x}),e.jsx(y,{htmlFor:"hideEdges",children:"Hide dependency arrows"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(w,{id:"hideArtifacts",checked:l,onCheckedChange:f}),e.jsx(y,{htmlFor:"hideArtifacts",children:"Hide artifacts"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(w,{id:"hideEvents",checked:E,onCheckedChange:_}),e.jsx(y,{htmlFor:"hideEvents",children:"Hide events"})]})]})]})}function ke(){return e.jsxs(ie,{children:[e.jsx(le,{children:e.jsxs(b,{children:[e.jsx(k,{asChild:!0,children:e.jsx(h,{variant:"outline",size:"icon",children:e.jsx(S,{id:"Cog",className:"size-4"})})}),e.jsx(N,{children:"Settings"})]})}),e.jsx(ce,{children:e.jsx(be,{})})]})}function Se({fullscreen:t,onFullscreenChange:s}){return e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ye,{}),e.jsx(Ee,{fullscreen:t,onFullscreenChange:s}),e.jsx(ke,{})]})}const Ne=["COMPLETED","FAILED","CANCELLED","CRASHED"];function He({flowRunId:t,stateType:s,viewport:n,onViewportChange:i,selected:l,onSelectedChange:m,className:E,style:v,fullscreen:j,onFullscreenChange:x}){const f=a.useRef(null),[_,r]=a.useState(!1),{resolvedTheme:u}=oe(),p=j??_,$=s&&Ne.includes(s),{data:A}=R(de({task_runs:{operator:"and_",flow_run_id:{operator:"and_",any_:[t],is_null_:!1}}})),{data:D}=R(ue({flow_runs:{operator:"and_",parent_flow_run_id:{operator:"and_",any_:[t]}}})),T=A===void 0||D===void 0||A>0||D>0,B=a.useCallback(c=>{r(c),x?.(c)},[x]),g=a.useMemo(()=>({runId:t,fetch:he,fetchEvents:fe,styles:()=>({node:c=>({background:z(c.state_type,I[c.state_type])}),state:c=>({background:z(c.type,I[c.type])})}),theme:u==="dark"?"dark":"light"}),[t,u]);a.useEffect(()=>{te(g)},[g]),a.useEffect(()=>{if(!f.current)throw new Error("Stage does not exist");return se({stage:f.current,config:g}),()=>{re()}},[g]),a.useEffect(()=>{ae(l??null)},[l]),a.useEffect(()=>{ne(n)},[n]),a.useEffect(()=>{const c=L.on("itemSelected",C=>m?.(C??void 0)),Q=L.on("viewportDateRangeUpdated",C=>i?.(C));return()=>{c(),Q()}},[m,i]);const K=p?"fixed h-screen w-screen z-20":T?"relative h-96 w-full":"relative h-40 w-full";return e.jsxs("div",{className:`${K} ${E??""}`,style:v,children:[e.jsx("div",{ref:f,className:"size-full [&>canvas]:size-full"}),!T&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/50",children:e.jsx("p",{className:"text-muted-foreground",children:$?"This flow run did not generate any task or subflow runs":"This flow run has not yet generated any task or subflow runs"})}),e.jsx("div",{className:"absolute bottom-0 right-0",children:e.jsx(Se,{fullscreen:p,onFullscreenChange:B})})]})}export{He as FlowRunGraph};
|
|
2
|
+
//# sourceMappingURL=flow-run-graph-BrqoR3E2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow-run-graph-BrqoR3E2.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.tsx"],"sourcesContent":["import type {\n\tEventRelatedResource,\n\tRunGraphArtifact,\n\tRunGraphData,\n\tRunGraphEvent,\n\tRunGraphEventResource,\n\tRunGraphFetchEventsContext,\n\tRunGraphNode,\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: 200,\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 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};\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 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=\"outline\" 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=\"outline\" 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\";\nimport { Typography } from \"@/components/ui/typography\";\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<Typography variant=\"bodyLarge\">Layout</Typography>\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<Typography variant=\"bodyLarge\">Scaling</Typography>\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=\"outline\" 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 {\n\temitter,\n\ttype GraphItemSelection,\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\";\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,\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 { resolvedTheme } = useTheme();\n\n\tconst fullscreen = controlledFullscreen ?? internalFullscreen;\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\tonSelectedChange?.(nodeId ?? undefined),\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 h-screen w-screen z-20\"\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-0 right-0\">\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</div>\n\t);\n}\n"],"names":["fetchFlowRunGraph","id","data","getQueryService","mapApiResponseToRunGraphData","fetchFlowRunEvents","since","until","nodeId","mapApiResponseToRunGraphEvents","response","parseISO","node","mapNode","event","mapArtifact","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","Typography","option","e","Label","Switch","FlowRunGraphSettingsButton","Popover","PopoverTrigger","PopoverContent","FlowRunGraphActions","TERMINAL_STATES","FlowRunGraph","flowRunId","stateType","viewport","onViewportChange","selected","onSelectedChange","className","style","controlledFullscreen","stageRef","useRef","internalFullscreen","setInternalFullscreen","resolvedTheme","useTheme","isTerminal","taskRunCount","useQuery","buildCountTaskRunsQuery","subflowRunCount","buildCountFlowRunsQuery","hasNodes","updateFullscreen","config","useMemo","getStateColor","setConfig","start","stop","selectItem","updateViewportFromDateRange","offItemSelected","emitter","offViewportDateRangeUpdated","range","heightClass"],"mappings":"mnBAkBA,eAAsBA,GAAkBC,EAAmC,CAC1E,KAAM,CAAE,KAAAC,CAAA,EA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AI,IAAKmE,EAAU,UAAU,iCAAiC,EAC9D,CAACY,GACD/E,EAAAA,IAAC,MAAA,CAAI,UAAU,qEACd,SAAAA,EAAAA,IAAC,IAAA,CAAE,UAAU,wBACX,SAAAyE,EACE,0DACA,+DACJ,EACD,EAEDzE,EAAAA,IAAC,MAAA,CAAI,UAAU,4BACd,SAAAA,EAAAA,IAACuD,GAAA,CACA,WAAAjD,EACA,mBAAoB0E,CAAA,CAAA,CACrB,CACD,CAAA,EACD,CAEF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as t,L as o}from"./vendor-tanstack-BK8oseNA.js";import{E as s,
|
|
2
|
-
//# sourceMappingURL=flow-run._id-
|
|
1
|
+
import{j as t,L as o}from"./vendor-tanstack-BK8oseNA.js";import{E as s,t as e,v as n,w as r,x as a,q as i}from"./index-D5RdrxkU.js";import{o as m,e as p}from"./vendor-forms-DxqqmhL5.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CznP1SOq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-date-7GxEwcQM.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-BOp38Pbq.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-run._id-
|
|
1
|
+
{"version":3,"file":"flow-run._id-BOp38Pbq.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 { 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\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,CCZqBC,EAAS,CAC7BC,IAAKD,EACE,CACL,OACA,WACA,cACA,YACA,UACA,aACA,cAAc,CACd,EACAE,QAAQ,MAAM,EACdC,MAAM,MAAM,CACf,CAAC,EAE0E,MAAAC,EAlBlEb"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{j as r}from"./vendor-tanstack-BK8oseNA.js";import{s}from"./index-D5RdrxkU.js";import{R as a}from"./route-error-state-BJXl8qkX.js";import{o as i,e as m}from"./vendor-forms-DxqqmhL5.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CznP1SOq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-date-7GxEwcQM.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-DJnTDEN_.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-run._id-
|
|
1
|
+
{"version":3,"file":"flow-run._id-DJnTDEN_.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 { 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\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":"6UAaqBA,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"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/flow-run-graph-BrqoR3E2.js","assets/vendor-tanstack-BK8oseNA.js","assets/vendor-react-Bce9NwRC.js","assets/vendor-graphs-Diy0Lo-N.js","assets/index-D5RdrxkU.js","assets/vendor-radix-CznP1SOq.js","assets/vendor-recharts-D4imLXNl.js","assets/vendor-forms-DxqqmhL5.js","assets/vendor-date-7GxEwcQM.js","assets/index-NY089eTx.css","assets/state-colors-CAAf0Eg3.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{j as e,r as n,p as O,s as F,L as I,I as fe,m as U,f as ve,u as ye}from"./vendor-tanstack-BK8oseNA.js";import{b5 as i,cc as Ne,cd as be,q as D,ce as _e,aW as W,bv as Se,C as ne,o as oe,c6 as we,I as b,y as S,bM as H,X as ie,cf as Ce,cg as ke,aD as ce,aN as Te,B as De,g as Fe,h as K,bs as Ee,bB as Le,bD as Ae,H as Pe,aq as G,aM as Ie,ch as ze,c5 as Me,bQ as Oe,bR as Qe,bS as Re,bT as qe,ci as Ve,c8 as Be,S as de,a as ue,c as me,e as $,b as Ge,bN as xe,aC as $e,aE as X,ab as Ue,al as E,O as pe,cj as Y,ak as V,ck as B,aF as Z,an as We,cl as Je,cm as He,cn as Ke,co as Xe,cp as Ye,L as ee,aw as Ze,ax as es,ay as k,az as T,cq as se}from"./index-D5RdrxkU.js";import{A as ss}from"./artifact-card-CUEaRDGw.js";import{T as as,a as ae}from"./toggle-group-C-vxYz4l.js";import{R as ts,u as rs,C as ls,a as ns}from"./index-BhALpenO.js";import{D as os}from"./delete-confirmation-dialog-CqKsUEj_.js";import{u as is}from"./use-delete-confirmation-dialog-CvQEyyhU.js";import{D as he,a as ge,b as je,d as L}from"./dropdown-menu-e0Fqb6aw.js";import{S as cs}from"./sort-filter-DHPFdKZ2.js";import{S as ds,a as us,F as ms}from"./flow-runs-pagination-Bq2ZUzM6.js";import{T as xs,b as ps,a as hs}from"./task-runs-pagination-B7D5K_FM.js";import{T as gs}from"./tags-input-BLzMOTDb.js";import{o as js,e as fs}from"./vendor-forms-DxqqmhL5.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CznP1SOq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-date-7GxEwcQM.js";import"./lazy-markdown-wPid80zf.js";import"./index-BO3SOwdV.js";const vs=n.lazy(()=>Ne(()=>import("./flow-run-graph-BrqoR3E2.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(s=>({default:s.FlowRunGraph})));function ys(s){return e.jsx(n.Suspense,{fallback:e.jsx(i,{className:"h-[500px] w-full"}),children:e.jsx(vs,{...s})})}class z extends n.Component{constructor(a){super(a),this.state={hasError:!1,error:null}}static getDerivedStateFromError(a){return{hasError:!0,error:a}}render(){if(this.state.hasError){const{fallback:a}=this.props;return typeof a=="function"?a(this.state.error??new Error("Unknown error")):a}return this.props.children}}function M({error:s,onRetry:a,isRetrying:t}){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(be,{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})]}),a&&e.jsxs(D,{variant:"outline",size:"sm",onClick:a,disabled:t,className:"gap-2",children:[e.jsx(_e,{className:W("size-3",t&&"animate-spin")}),t?"Retrying...":"Retry"]})]})}const Ns=({flowRun:s})=>{const[a,t]=n.useState("grid"),{data:x}=O(Se({artifacts:{operator:"and_",flow_run_id:{any_:[s.id]},type:{not_any_:["result"]}},sort:"ID_DESC",offset:0}));return x.length===0?e.jsx(ne,{children:e.jsx(oe,{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(as,{type:"single",variant:"outline",value:a,onValueChange:l=>t(l),children:[e.jsx(ae,{value:"grid","aria-label":"Grid view",children:e.jsx(we,{className:"w-4 h-4"})}),e.jsx(ae,{value:"list","aria-label":"List view",children:e.jsx(ts,{className:"w-4 h-4"})})]})}),e.jsx("div",{className:W("grid",a==="grid"?"grid-cols-1 lg:grid-cols-2 xl:grid-cols-3":"grid-cols-1","gap-4"),"data-testid":"flow-run-artifacts-grid",children:x.map(l=>e.jsx(ss,{artifact:l,compact:a==="list"},l.id))})]})};function _({label:s,value:a,copyable:t,copyValue:x}){const l=()=>{const u=x??(typeof a=="string"?a:"");navigator.clipboard.writeText(u),S.success(`${s} copied`)};return e.jsxs("dl",{className:"flex flex-col gap-1",children:[e.jsx("dt",{className:"text-muted-foreground text-sm",children:s}),e.jsxs("dd",{className:"text-sm flex items-center gap-2",children:[a,t&&e.jsx(D,{variant:"ghost",size:"icon",onClick:l,children:e.jsx(b,{id:"Copy",className:"size-4"})})]})]})}function te({flowRun:s}){return s?e.jsxs("div",{className:"space-y-4",children:[e.jsx(_,{label:"Run Count",value:s.run_count}),e.jsx(_,{label:"Created",value:e.jsx(H,{date:s.created})}),s.created_by?.display_value&&e.jsx(_,{label:"Created By",value:s.created_by.display_value}),e.jsx(_,{label:"Last Updated",value:e.jsx(H,{date:s.updated})}),s.idempotency_key&&e.jsx(_,{label:"Idempotency Key",value:s.idempotency_key}),s.tags&&s.tags.length>0&&e.jsx(_,{label:"Tags",value:e.jsx(ie,{tags:s.tags})}),e.jsx(_,{label:"Flow Run ID",value:s.id,copyable:!0}),s.state?.message&&e.jsx(_,{label:"State Message",value:s.state.message}),s.flow_version&&e.jsx(_,{label:"Flow Version",value:s.flow_version}),s.empirical_policy?.retries!=null&&e.jsxs(e.Fragment,{children:[e.jsx(_,{label:"Retries",value:s.empirical_policy.retries}),e.jsx(_,{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"})})}function bs({flowRun:s,onDeleteClick:a}){const[t,x]=is(),{open:l,onOpenChange:u,openDialog:g}=rs(),{setFlowRunState:d,isPending:o}=Ce(),v=s.state_type&&["COMPLETED","FAILED","CANCELLED","CRASHED"].includes(s.state_type),r=N=>{d({id:s.id,state:{type:N.type,name:N.type.charAt(0)+N.type.slice(1).toLowerCase(),message:N.message},force:!0},{onSuccess:()=>{S.success("Flow run state changed"),u(!1)},onError:C=>{S.error(C.message||"Failed to change state")}})},{data:c}=F({...ke(s.deployment_id??""),enabled:!!s.deployment_id}),{data:p}=F({...ce({task_runs:{operator:"and_",flow_run_id:{operator:"and_",any_:[s.id],is_null_:!1}}})}),{data:y}=F({...Te({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}),h=y?.[0],w=N=>N===void 0?"...":N===0?"None":`${N} Task run${N===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(De,{children:e.jsxs(Fe,{children:[e.jsx(K,{children:e.jsx(Ee,{to:"/runs",className:"text-xl font-semibold",children:"Runs"})}),e.jsx(Le,{}),e.jsxs(K,{className:"text-xl",children:[e.jsx(Ae,{className:"font-semibold",children:s.name}),s.work_pool_name&&e.jsx(Pe,{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(ie,{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(G,{type:s.state_type,name:s.state_name}),s.start_time&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(b,{id:"Calendar",className:"size-4"}),e.jsx("span",{children:Ie(s.start_time,"dateTimeNumeric")})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(b,{id:"Clock",className:"size-4"}),e.jsx("span",{children:ze(s.total_run_time??0)})]}),e.jsxs("div",{className:`flex items-center gap-1 ${p===0?"text-muted-foreground/60":""}`,children:[e.jsx(b,{id:"ListTodo",className:"size-4"}),e.jsx("span",{children:w(p)})]})]}),e.jsxs("div",{className:"flex items-center gap-4 text-sm flex-wrap",children:[s.flow_id&&e.jsx(Me,{flowId:s.flow_id}),s.deployment_id&&e.jsxs(I,{to:"/deployments/deployment/$id",params:{id:s.deployment_id},className:"flex items-center gap-1 hover:underline",children:[e.jsx(b,{id:"Rocket",className:"size-4"}),e.jsx("span",{className:"text-muted-foreground",children:"Deployment"}),e.jsx("span",{children:c?.name??"..."})]}),s.work_pool_name&&e.jsxs(I,{to:"/work-pools/work-pool/$workPoolName",params:{workPoolName:s.work_pool_name},className:"flex items-center gap-1 hover:underline",children:[e.jsx(b,{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(I,{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(b,{id:"ListOrdered",className:"size-4"}),e.jsx("span",{className:"text-muted-foreground",children:"Work Queue"}),e.jsx("span",{children:s.work_queue_name})]}),h&&e.jsxs(I,{to:"/runs/flow-run/$id",params:{id:h.id},className:"flex items-center gap-1 hover:underline",children:[e.jsx(b,{id:"Workflow",className:"size-4"}),e.jsx("span",{className:"text-muted-foreground",children:"Parent Run"}),e.jsx("span",{children:h.name??"..."})]})]})]}),e.jsxs(he,{children:[e.jsx(ge,{asChild:!0,children:e.jsx(D,{variant:"outline",className:"p-2",children:e.jsx(Oe,{className:"w-4 h-4"})})}),e.jsxs(je,{children:[v&&e.jsx(L,{onClick:g,children:"Change state"}),e.jsx(L,{onClick:()=>{navigator.clipboard.writeText(s.id),S.success("Copied flow run ID to clipboard")},children:"Copy ID"}),e.jsx(L,{onClick:()=>x({title:"Delete Flow Run",description:`Are you sure you want to delete flow run ${s.name}?`,onConfirm:a}),children:"Delete"})]})]}),e.jsx(os,{...t}),e.jsx(ls,{open:l,onOpenChange:u,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:r,isLoading:o})]})}function _s({flowRun:s}){const[a,t]=n.useState(!1),x=async()=>{t(!0);try{const u=await(await Ve()).GET("/flow_runs/{id}/logs/download",{params:{path:{id:s.id}},parseAs:"blob"});if(!u.data)throw new Error("No data received from server");const g=URL.createObjectURL(u.data),d=document.createElement("a"),o=s.name??"logs";d.href=g,d.setAttribute("download",`${o}.csv`),d.click(),URL.revokeObjectURL(g)}catch(l){console.error(l),S.error("Failed to download logs")}finally{t(!1)}};return e.jsxs(Qe,{children:[e.jsx(Re,{asChild:!0,children:e.jsx(D,{variant:"outline",size:"icon",onClick:()=>{x()},disabled:a,"aria-label":"Download logs",children:a?e.jsx(b,{id:"Loader2",className:"size-4 animate-spin"}):e.jsx(b,{id:"Download",className:"size-4"})})}),e.jsx(qe,{children:"Download all logs as CSV"})]})}const Ss=({flowRun:s,virtualize:a=!0})=>{const[t,x]=n.useState(0),[l,u]=n.useState("TIMESTAMP_ASC"),g=n.useMemo(()=>({...Be({limit:50,sort:l,logs:{operator:"and_",level:{ge_:t},flow_run_id:{any_:[s.id]}}}),refetchInterval:s.state_type==="RUNNING"?5e3:!1}),[t,l,s.id,s.state_type]),{data:d,hasNextPage:o,fetchNextPage:v,isFetchingNextPage:r}=fe(g),c=d.pages.length===1&&d.pages[0].length===0;let p="This run did not produce any logs.";return c&&(t>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(ws,{levelFilter:t,setLevelFilter:x}),e.jsx(Cs,{sortOrder:l,setSortOrder:u}),e.jsx(_s,{flowRun:s})]}),c?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(ns,{logs:d.pages.flat(),onBottomReached:()=>{o&&!r&&v().catch(y=>{console.error(y)})},className:"max-h-[85vh]",virtualize:a})})]})},re=[{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}],ws=({levelFilter:s,setLevelFilter:a})=>e.jsxs(de,{value:s.toString(),onValueChange:t=>a(Number(t)),children:[e.jsx(ue,{"aria-label":"log level filter",children:e.jsx("span",{children:`Level:
|
|
3
|
+
${re.find(t=>t.value===s)?.label}`})}),e.jsx(me,{children:re.map(t=>e.jsx($,{value:t.value.toString(),children:t.label},t.value))})]}),Cs=({sortOrder:s,setSortOrder:a})=>e.jsxs(de,{value:s,onValueChange:t=>a(t),children:[e.jsx(ue,{"aria-label":"log sort order",children:e.jsx(Ge,{placeholder:"Sort log order"})}),e.jsxs(me,{children:[e.jsx($,{value:"TIMESTAMP_ASC",children:"Oldest to newest"}),e.jsx($,{value:"TIMESTAMP_DESC",children:"Newest to oldest"})]})]}),ks=({parentFlowRunId:s})=>{const a=U(),[t,x]=n.useState(""),[l,u]=n.useState(new Set),[g,d]=n.useState("START_TIME_DESC"),[o,v]=n.useState({page:1,limit:10}),r=xe(t,300),c=n.useMemo(()=>({flow_runs:{operator:"and_",parent_flow_run_id:{operator:"and_",any_:[s]}}}),[s]),{data:p}=O($e(c,3e4)),y=n.useMemo(()=>({page:o.page,limit:o.limit,sort:g,flow_runs:{operator:"and_",parent_flow_run_id:{operator:"and_",any_:[s]},name:r?{like_:r}:void 0,state:l.size>0?{operator:"and_",name:{any_:Array.from(l)}}:void 0}}),[s,o,g,r,l]),{data:h}=F(X(y,3e4)),w=n.useMemo(()=>[...new Set((h?.results??[]).map(m=>m.flow_id))],[h?.results]),{data:N}=F(Ue({flows:{operator:"and_",id:{any_:w}},offset:0,sort:"NAME_ASC"},{enabled:w.length>0})),C=n.useMemo(()=>{if(!h?.results)return[];const m=new Map(N?.map(j=>[j.id,j])??[]);return h.results.map(j=>{const J=m.get(j.flow_id);return J?{...j,flow:J}:{...j,flow:void 0}}).filter(j=>j!==null)},[h?.results,N]),A=m=>{x(m.target.value),v(j=>({...j,page:1}))},Q=m=>{u(m),v(j=>({...j,page:1}))},R=m=>{d(m),v(j=>({...j,page:1}))},q=()=>{x(""),u(new Set),v(m=>({...m,page:1}))},P=m=>{a.prefetchQuery(X({...y,page:m},3e4))},f=t||l.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(E,{className:"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(E,{variant:"bodySmall",className:"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(pe,{value:t,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(ds,{selectedFilters:l,onSelectFilter:Q})}),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(cs,{value:g,onSelect:R})})]}),e.jsx(us,{flowRuns:C,onClearFilters:f?q:void 0}),h&&h.pages>0&&e.jsx(ms,{pagination:o,onChangePagination:v,count:h.count,pages:h.pages,onPrefetchPage:P})]})},le=2,Ts=({selectedFilters:s,onSelectFilter:a,className:t})=>{const[x,l]=n.useState(!1),u=n.useMemo(()=>{const r=new Set(Y);return s.has("Scheduled")||r.size!==s.size?!1:Array.from(s).every(c=>r.has(c))},[s]),g=()=>{a(new Set(Y))},d=()=>{a(new Set)},o=r=>{if(u){a(new Set([r]));return}const c=new Set(s);s.has(r)?c.delete(r):c.add(r),a(c)},v=()=>{if(s.size===0)return"All run states";if(u)return"All except scheduled";const r=Array.from(s),c=r.slice(0,le),p=r.length-le;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:c.map(y=>e.jsx(G,{name:y,type:B[y]},y))}),p>0&&e.jsxs(E,{variant:"bodySmall",className:"shrink-0",children:["+ ",p]})]})};return e.jsxs(he,{open:x,onOpenChange:l,children:[e.jsx(ge,{asChild:!0,children:e.jsxs(D,{variant:"outline",className:W("justify-between w-full",t),children:[e.jsx("span",{className:"flex-1 min-w-0",children:v()}),e.jsx(b,{id:"ChevronDown",className:"ml-2 size-4 shrink-0"})]})}),e.jsxs(je,{className:"max-h-96 overflow-x-hidden overflow-y-auto",children:[e.jsxs(L,{onSelect:r=>{r.preventDefault(),g()},children:[e.jsx(V,{checked:u,className:"mr-2"}),"All except scheduled"]}),e.jsxs(L,{onSelect:r=>{r.preventDefault(),d()},children:[e.jsx(V,{checked:s.size===0,className:"mr-2"}),"All run states"]}),Object.keys(B).map(r=>e.jsxs(L,{"aria-label":r,onSelect:c=>{c.preventDefault(),o(r)},children:[e.jsx(V,{"aria-label":r,className:"mr-2",checked:!u&&s.has(r)}),e.jsx(G,{name:r,type:B[r]})]},r))]})]})},Ds=({flowRunId:s})=>{const a=U(),[t,x]=n.useState(""),[l,u]=n.useState(new Set),[g,d]=n.useState(new Set),[o,v]=n.useState("EXPECTED_START_TIME_DESC"),[r,c]=n.useState({page:1,limit:20}),p=xe(t,300),{data:y}=O(ce({task_runs:{operator:"and_",flow_run_id:{operator:"and_",any_:[s],is_null_:!1},subflow_runs:{exists_:!1}}},3e4)),{data:h}=F(Z({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:l.size>0?{operator:"and_",name:{any_:Array.from(l)}}:void 0,tags:g.size>0?{operator:"and_",all_:Array.from(g)}:void 0},sort:o,page:r.page,limit:r.limit},3e4)),w=f=>{x(f.target.value),c(m=>({...m,page:1}))},N=f=>{u(f),c(m=>({...m,page:1}))},C=f=>{v(f),c(m=>({...m,page:1}))},A=f=>{const m=Array.isArray(f)?f:[];d(new Set(m)),c(j=>({...j,page:1}))},Q=()=>{x(""),u(new Set),d(new Set),c(f=>({...f,page:1}))},R=f=>{a.prefetchQuery(Z({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:l.size>0?{operator:"and_",name:{any_:Array.from(l)}}:void 0,tags:g.size>0?{operator:"and_",all_:Array.from(g)}:void 0},sort:o,page:f,limit:r.limit},3e4))},q=t||l.size>0||g.size>0,P=n.useMemo(()=>{if(!h?.results)return null;const f=new Map;for(const m of h.results){const j=String(m.state?.name??"Unknown");f.set(j,(f.get(j)??0)+1)}return Array.from(f.entries()).map(([m,j])=>`${j} ${m}`).join(", ")},[h?.results]);return y===0?e.jsx("div",{className:"flex items-center justify-center h-48 border rounded-lg bg-muted/50",children:e.jsx(E,{className:"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(E,{variant:"bodySmall",className:"text-muted-foreground",children:[y," Task run",y!==1?"s":""]}),P&&e.jsxs(E,{variant:"bodySmall",className:"text-muted-foreground text-xs capitalize",children:["(",P,")"]})]}),e.jsx("div",{className:"xl:col-span-3 md:col-span-6 col-span-12 md:order-1 order-0",children:e.jsx(pe,{value:t,onChange:w,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(Ts,{selectedFilters:l,onSelectFilter:N})}),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(g),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(xs,{value:o,onSelect:C})})]}),e.jsx(ps,{taskRuns:h?.results,onClearFilters:q?Q:void 0}),h&&h.pages>0&&e.jsx(hs,{pagination:r,onChangePagination:c,count:h.count,pages:h.pages,onPrefetchPage:R})]})},Fs=({id:s,tab:a,onTabChange:t})=>{const[x,l]=n.useState(!1),[u,g]=n.useState(!1),d=U(),{data:o}=O({...We(s),refetchInterval:x}),{deleteFlowRun:v}=Je(),{navigate:r}=ve(),c=o.state_type==="PENDING";n.useEffect(()=>{o.state_type==="RUNNING"||o.state_type==="PENDING"?l(5e3):l(!1)},[o]);const p=()=>{v(o.id,{onSuccess:()=>{l(!1),S.success("Flow run deleted"),r({to:"/runs",replace:!0})},onError:C=>{const A=C.message||"Unknown error while deleting flow run.";S.error(A)}})},y=n.useCallback(()=>{d.invalidateQueries({queryKey:He.all()})},[d]),h=n.useCallback(()=>{d.invalidateQueries({queryKey:Ke.all()})},[d]),w=n.useCallback(()=>{d.invalidateQueries({queryKey:Xe.lists()})},[d]),N=n.useCallback(()=>{d.invalidateQueries({queryKey:Ye.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(bs,{flowRun:o,onDeleteClick:p})}),!c&&e.jsx(ne,{children:e.jsx(oe,{className:"p-0",children:e.jsx(ys,{flowRunId:o.id,stateType:o.state_type??void 0,fullscreen:u,onFullscreenChange:g})})}),e.jsxs("div",{className:"grid lg:grid-cols-[1fr_250px] grid-cols-[1fr] gap-4",children:[e.jsx(Es,{currentTab:a,onTabChange:t,flowRun:o,logsContent:e.jsx(z,{fallback:e.jsx(M,{error:{type:"unknown-error",message:"Failed to load logs",details:"An error occurred while loading log data. Please try again."},onRetry:y}),children:e.jsx(n.Suspense,{fallback:e.jsx(Ls,{}),children:e.jsx(Ss,{flowRun:o})})}),taskRunsContent:e.jsx(z,{fallback:e.jsx(M,{error:{type:"unknown-error",message:"Failed to load task runs",details:"An error occurred while loading task run data. Please try again."},onRetry:h}),children:e.jsx(n.Suspense,{fallback:e.jsx(As,{}),children:e.jsx(Ds,{flowRunId:s})})}),subflowRunsContent:e.jsx(z,{fallback:e.jsx(M,{error:{type:"unknown-error",message:"Failed to load subflow runs",details:"An error occurred while loading subflow run data. Please try again."},onRetry:w}),children:e.jsx(n.Suspense,{fallback:e.jsx(Is,{}),children:e.jsx(ks,{parentFlowRunId:s})})}),artifactsContent:e.jsx(z,{fallback:e.jsx(M,{error:{type:"unknown-error",message:"Failed to load artifacts",details:"An error occurred while loading artifact data. Please try again."},onRetry:N}),children:e.jsx(n.Suspense,{fallback:e.jsx(Ps,{}),children:e.jsx(Ns,{flowRun:o})})}),detailsContent:e.jsx(n.Suspense,{fallback:e.jsx(zs,{}),children:e.jsx(te,{flowRun:o})}),parametersContent:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex justify-end",children:e.jsxs(D,{variant:"outline",size:"sm",onClick:()=>{S.success("Copied parameters to clipboard"),navigator.clipboard.writeText(JSON.stringify(o.parameters??{},null,2))},children:[e.jsx(b,{id:"Copy",className:"size-4 mr-2"}),"Copy parameters"]})}),e.jsx(ee,{value:JSON.stringify(o.parameters??{},null,2),disabled:!0,className:"min-h-[200px]"})]}),jobVariablesContent:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex justify-end",children:e.jsxs(D,{variant:"outline",size:"sm",onClick:()=>{S.success("Copied job variables to clipboard"),navigator.clipboard.writeText(JSON.stringify(o.job_variables??{},null,2))},children:[e.jsx(b,{id:"Copy",className:"size-4 mr-2"}),"Copy job variables"]})}),e.jsx(ee,{value:JSON.stringify(o.job_variables??{},null,2),disabled:!0,className:"min-h-[200px]"})]})}),e.jsx("div",{className:"hidden lg:block",children:e.jsx(te,{flowRun:o})})]})]})},Es=({currentTab:s,onTabChange:a,flowRun:t,logsContent:x,taskRunsContent:l,subflowRunsContent:u,artifactsContent:g,detailsContent:d,parametersContent:o,jobVariablesContent:v})=>(n.useEffect(()=>{const r=getComputedStyle(document.documentElement).getPropertyValue("--breakpoint-lg").trim(),c=window.matchMedia(`(max-width: ${r})`),p=()=>{s==="Details"&&a("Logs")};return c.addEventListener("change",p),()=>c.removeEventListener("change",p)},[s,a]),e.jsxs(Ze,{value:s,onValueChange:r=>a(r),children:[e.jsxs(es,{children:[e.jsx(k,{value:"Details",className:"lg:hidden",children:"Details"}),e.jsx(k,{value:"Logs",children:"Logs"}),t.state_type!=="PENDING"&&e.jsx(k,{value:"TaskRuns",children:"Task Runs"}),t.state_type!=="PENDING"&&e.jsx(k,{value:"SubflowRuns",children:"Subflow Runs"}),e.jsx(k,{value:"Artifacts",children:"Artifacts"}),e.jsx(k,{value:"Parameters",children:"Parameters"}),e.jsx(k,{value:"JobVariables",children:"Job Variables"})]}),e.jsx(T,{value:"Details",children:d}),e.jsx(T,{value:"Logs",children:x}),e.jsx(T,{value:"TaskRuns",children:l}),e.jsx(T,{value:"SubflowRuns",children:u}),e.jsx(T,{value:"Artifacts",children:g}),e.jsx(T,{value:"Parameters",children:o}),e.jsx(T,{value:"JobVariables",children:v})]})),Ls=()=>e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-row gap-2 justify-end",children:[e.jsx(i,{className:"h-8 w-25"}),e.jsx(i,{className:"h-8 w-32"}),e.jsx(i,{className:"h-8 w-8"})," "]}),e.jsx(i,{className:"h-32"})]}),As=()=>e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(i,{className:"h-4 w-24"})}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[e.jsx(i,{className:"h-9 flex-1"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(i,{className:"h-9 w-48"}),e.jsx(i,{className:"h-9 w-40"})]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(i,{className:"h-24"}),e.jsx(i,{className:"h-24"}),e.jsx(i,{className:"h-24"})]})]}),Ps=()=>e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("div",{className:"flex flex-row justify-end",children:e.jsx(i,{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(i,{className:"h-40"}),e.jsx(i,{className:"h-40"}),e.jsx(i,{className:"h-40"}),e.jsx(i,{className:"h-40"})]})]}),Is=()=>e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(i,{className:"h-4 w-24"})}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[e.jsx(i,{className:"h-9 flex-1"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(i,{className:"h-9 w-48"}),e.jsx(i,{className:"h-9 w-40"})]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(i,{className:"h-24"}),e.jsx(i,{className:"h-24"}),e.jsx(i,{className:"h-24"})]})]}),zs=()=>e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(i,{className:"h-4 w-20"}),e.jsx(i,{className:"h-5 w-12"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(i,{className:"h-4 w-16"}),e.jsx(i,{className:"h-5 w-32"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(i,{className:"h-4 w-24"}),e.jsx(i,{className:"h-5 w-32"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(i,{className:"h-4 w-24"}),e.jsx(i,{className:"h-5 w-64"})]})]});js({tab:fs(["Logs","TaskRuns","SubflowRuns","Artifacts","Details","Parameters","JobVariables"]).default("Logs").catch("Logs")});function aa(){const{id:s}=se.useParams(),{tab:a}=se.useSearch(),t=ye(),x=l=>{t({to:".",search:u=>({...u,tab:l})})};return e.jsx(Fs,{id:s,tab:a,onTabChange:x})}export{aa as component};
|
|
4
|
+
//# sourceMappingURL=flow-run._id-D_wY_rBe.js.map
|