prefect 3.6.15__py3-none-any.whl → 3.6.16.dev2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- prefect/__init__.py +20 -0
- prefect/_build_info.py +3 -3
- prefect/_internal/analytics/__init__.py +80 -0
- prefect/_internal/analytics/_config.py +2 -0
- prefect/_internal/analytics/ci_detection.py +39 -0
- prefect/_internal/analytics/client.py +132 -0
- prefect/_internal/analytics/device_id.py +55 -0
- prefect/_internal/analytics/emit.py +90 -0
- prefect/_internal/analytics/enabled.py +33 -0
- prefect/_internal/analytics/events.py +14 -0
- prefect/_internal/analytics/milestones.py +177 -0
- prefect/_internal/analytics/notice.py +60 -0
- prefect/_internal/analytics/service.py +238 -0
- prefect/analytics/__init__.py +67 -0
- prefect/deployments/runner.py +20 -0
- prefect/flow_engine.py +16 -0
- prefect/flows.py +8 -0
- prefect/server/ui-v2/assets/{artifact-card-BBzQR-Cj.js → artifact-card-BclosG8t.js} +2 -2
- prefect/server/ui-v2/assets/{artifact-card-BBzQR-Cj.js.map → artifact-card-BclosG8t.js.map} +1 -1
- prefect/server/ui-v2/assets/artifact._id-C0r4BJr2.js +2 -0
- prefect/server/ui-v2/assets/artifact._id-C0r4BJr2.js.map +1 -0
- prefect/server/ui-v2/assets/{automation-wizard-EYSfXlQ7.js → automation-wizard-Bmgt6nn8.js} +2 -2
- prefect/server/ui-v2/assets/{automation-wizard-EYSfXlQ7.js.map → automation-wizard-Bmgt6nn8.js.map} +1 -1
- prefect/server/ui-v2/assets/automation._id-Ccke3KJz.js +2 -0
- prefect/server/ui-v2/assets/{automation._id-Dn7jABys.js.map → automation._id-Ccke3KJz.js.map} +1 -1
- prefect/server/ui-v2/assets/{automation_._id.edit-COrqswD3.js → automation_._id.edit-BlKPUTVf.js} +2 -2
- prefect/server/ui-v2/assets/{automation_._id.edit-COrqswD3.js.map → automation_._id.edit-BlKPUTVf.js.map} +1 -1
- prefect/server/ui-v2/assets/{automations-header-DN_dmMXW.js → automations-header-Df2zw3SC.js} +2 -2
- prefect/server/ui-v2/assets/{automations-header-DN_dmMXW.js.map → automations-header-Df2zw3SC.js.map} +1 -1
- prefect/server/ui-v2/assets/{base-job-template-form-section-De2ACYbw.js → base-job-template-form-section-oZD6U-RW.js} +2 -2
- prefect/server/ui-v2/assets/{base-job-template-form-section-De2ACYbw.js.map → base-job-template-form-section-oZD6U-RW.js.map} +1 -1
- prefect/server/ui-v2/assets/{block-type-details-Cklc7TkK.js → block-type-details-CYrdaLot.js} +2 -2
- prefect/server/ui-v2/assets/{block-type-details-Cklc7TkK.js.map → block-type-details-CYrdaLot.js.map} +1 -1
- prefect/server/ui-v2/assets/block-type-logo-CyAWq7mC.js +2 -0
- prefect/server/ui-v2/assets/block-type-logo-CyAWq7mC.js.map +1 -0
- prefect/server/ui-v2/assets/{block._id-tuz1Bcj2.js → block._id-CBgHrpTP.js} +2 -2
- prefect/server/ui-v2/assets/{block._id-tuz1Bcj2.js.map → block._id-CBgHrpTP.js.map} +1 -1
- prefect/server/ui-v2/assets/{block_._id.edit-CFEYhF5R.js → block_._id.edit-CW-kdi4O.js} +2 -2
- prefect/server/ui-v2/assets/{block_._id.edit-CFEYhF5R.js.map → block_._id.edit-CW-kdi4O.js.map} +1 -1
- prefect/server/ui-v2/assets/{catalog-CCPRo7nY.js → catalog-Brh0kn1I.js} +2 -2
- prefect/server/ui-v2/assets/{catalog-CCPRo7nY.js.map → catalog-Brh0kn1I.js.map} +1 -1
- prefect/server/ui-v2/assets/catalog_._slug-MCgzguIZ.js +2 -0
- prefect/server/ui-v2/assets/{catalog_._slug-Bl2J2oI3.js.map → catalog_._slug-MCgzguIZ.js.map} +1 -1
- prefect/server/ui-v2/assets/{catalog_._slug_.create-9UD_SxDN.js → catalog_._slug_.create-DBaeHi9Q.js} +2 -2
- prefect/server/ui-v2/assets/{catalog_._slug_.create-9UD_SxDN.js.map → catalog_._slug_.create-DBaeHi9Q.js.map} +1 -1
- prefect/server/ui-v2/assets/{collapsible-BVQTBG_U.js → collapsible-B_NJS0uJ.js} +2 -2
- prefect/server/ui-v2/assets/{collapsible-BVQTBG_U.js.map → collapsible-B_NJS0uJ.js.map} +1 -1
- prefect/server/ui-v2/assets/{concurrency-limit._id-CsgRxA0a.js → concurrency-limit._id-qzNUQzQa.js} +2 -2
- prefect/server/ui-v2/assets/{concurrency-limit._id-CsgRxA0a.js.map → concurrency-limit._id-qzNUQzQa.js.map} +1 -1
- prefect/server/ui-v2/assets/create-BwXG6EIb.js +2 -0
- prefect/server/ui-v2/assets/{create-D--LHaji.js.map → create-BwXG6EIb.js.map} +1 -1
- prefect/server/ui-v2/assets/{create-BycfZHGQ.js → create-MoiIE9Ms.js} +2 -2
- prefect/server/ui-v2/assets/{create-BycfZHGQ.js.map → create-MoiIE9Ms.js.map} +1 -1
- prefect/server/ui-v2/assets/data-table-CPkppyg6.js +2 -0
- prefect/server/ui-v2/assets/data-table-CPkppyg6.js.map +1 -0
- prefect/server/ui-v2/assets/delete-confirmation-dialog-CwDK_2QS.js +2 -0
- prefect/server/ui-v2/assets/{delete-confirmation-dialog-DHkm2p8m.js.map → delete-confirmation-dialog-CwDK_2QS.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment-action-header-D5GOooPm.js → deployment-action-header-Vp9YsCJO.js} +2 -2
- prefect/server/ui-v2/assets/{deployment-action-header-D5GOooPm.js.map → deployment-action-header-Vp9YsCJO.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment-form-wfg6HeAJ.js → deployment-form-CJcg_6DJ.js} +3 -3
- prefect/server/ui-v2/assets/{deployment-form-wfg6HeAJ.js.map → deployment-form-CJcg_6DJ.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment-links-6iugOgDh.js → deployment-links-CIkJIuHh.js} +2 -2
- prefect/server/ui-v2/assets/{deployment-links-6iugOgDh.js.map → deployment-links-CIkJIuHh.js.map} +1 -1
- prefect/server/ui-v2/assets/deployment._id-C6XrGMp_.js +2 -0
- prefect/server/ui-v2/assets/{deployment._id-Ci9zge5n.js.map → deployment._id-C6XrGMp_.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment._id-whsGcHdu.js → deployment._id-CWgTYmTG.js} +2 -2
- prefect/server/ui-v2/assets/{deployment._id-whsGcHdu.js.map → deployment._id-CWgTYmTG.js.map} +1 -1
- prefect/server/ui-v2/assets/deployment_._id.duplicate-Bg0s0ZJn.js +2 -0
- prefect/server/ui-v2/assets/{deployment_._id.duplicate-D9ZWkh8H.js.map → deployment_._id.duplicate-Bg0s0ZJn.js.map} +1 -1
- prefect/server/ui-v2/assets/deployment_._id.edit-CnoB0UeG.js +2 -0
- prefect/server/ui-v2/assets/{deployment_._id.edit-CS7sObzC.js.map → deployment_._id.edit-CnoB0UeG.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment_._id.run-g7SZuDFi.js → deployment_._id.run-BqPK6rTB.js} +2 -2
- prefect/server/ui-v2/assets/{deployment_._id.run-g7SZuDFi.js.map → deployment_._id.run-BqPK6rTB.js.map} +1 -1
- prefect/server/ui-v2/assets/{dropdown-menu-0atiOSFo.js → dropdown-menu-D7Gwbd15.js} +2 -2
- prefect/server/ui-v2/assets/{dropdown-menu-0atiOSFo.js.map → dropdown-menu-D7Gwbd15.js.map} +1 -1
- prefect/server/ui-v2/assets/{event-resource-display-DHiAb1Up.js → event-resource-display-CDRgVKd4.js} +2 -2
- prefect/server/ui-v2/assets/{event-resource-display-DHiAb1Up.js.map → event-resource-display-CDRgVKd4.js.map} +1 -1
- prefect/server/ui-v2/assets/event._eventDate._eventId-C73GMDkK.js +2 -0
- prefect/server/ui-v2/assets/{event._eventDate._eventId-D7Twzb22.js.map → event._eventDate._eventId-C73GMDkK.js.map} +1 -1
- prefect/server/ui-v2/assets/{flow-run-graph-BhzuSJLm.js → flow-run-graph-ckiE3mA9.js} +2 -2
- prefect/server/ui-v2/assets/{flow-run-graph-BhzuSJLm.js.map → flow-run-graph-ckiE3mA9.js.map} +1 -1
- prefect/server/ui-v2/assets/{flow-run._id-CqpH6bvx.js → flow-run._id-BukrNCAq.js} +2 -2
- prefect/server/ui-v2/assets/{flow-run._id-CqpH6bvx.js.map → flow-run._id-BukrNCAq.js.map} +1 -1
- prefect/server/ui-v2/assets/{flow-run._id-lIIQBD7H.js → flow-run._id-CtI5VZ2M.js} +2 -2
- prefect/server/ui-v2/assets/{flow-run._id-lIIQBD7H.js.map → flow-run._id-CtI5VZ2M.js.map} +1 -1
- prefect/server/ui-v2/assets/flow-run._id-s1UJuakA.js +4 -0
- prefect/server/ui-v2/assets/{flow-run._id-RLy2kBh0.js.map → flow-run._id-s1UJuakA.js.map} +1 -1
- prefect/server/ui-v2/assets/{flow-runs-pagination-BATUweRV.js → flow-runs-pagination-SLbYtvaR.js} +2 -2
- prefect/server/ui-v2/assets/{flow-runs-pagination-BATUweRV.js.map → flow-runs-pagination-SLbYtvaR.js.map} +1 -1
- prefect/server/ui-v2/assets/flow._id-CZ5P0v4N.js +2 -0
- prefect/server/ui-v2/assets/{flow._id-BdQGWPKP.js.map → flow._id-CZ5P0v4N.js.map} +1 -1
- prefect/server/ui-v2/assets/{form-DLrbC7rV.js → form-mws4law8.js} +2 -2
- prefect/server/ui-v2/assets/{form-DLrbC7rV.js.map → form-mws4law8.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-BTAWyeXv.js → header-Bes1LmY7.js} +2 -2
- prefect/server/ui-v2/assets/{header-BTAWyeXv.js.map → header-Bes1LmY7.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-ChFAx5uR.js → header-Bj_zBR-a.js} +2 -2
- prefect/server/ui-v2/assets/{header-ChFAx5uR.js.map → header-Bj_zBR-a.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-CyQqOj1w.js → header-CPxTHSvz.js} +2 -2
- prefect/server/ui-v2/assets/{header-CyQqOj1w.js.map → header-CPxTHSvz.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-m48E4KcG.js → index-B8vo2Lrg.js} +5 -5
- prefect/server/ui-v2/assets/{index-m48E4KcG.js.map → index-B8vo2Lrg.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-D5RT-SAp.js → index-BBeh-3Nh.js} +2 -2
- prefect/server/ui-v2/assets/{index-D5RT-SAp.js.map → index-BBeh-3Nh.js.map} +1 -1
- prefect/server/ui-v2/assets/index-BLnEvHia.js +2 -0
- prefect/server/ui-v2/assets/{index-7i4X9TeK.js.map → index-BLnEvHia.js.map} +1 -1
- prefect/server/ui-v2/assets/index-BpKoubXu.js +2 -0
- prefect/server/ui-v2/assets/index-BpKoubXu.js.map +1 -0
- prefect/server/ui-v2/assets/index-By6YGqR3.js +2 -0
- prefect/server/ui-v2/assets/index-By6YGqR3.js.map +1 -0
- prefect/server/ui-v2/assets/index-CEi3BlKI.js +2 -0
- prefect/server/ui-v2/assets/index-CEi3BlKI.js.map +1 -0
- prefect/server/ui-v2/assets/{index-BaWDC4da.js → index-CS-zxv7Z.js} +2 -2
- prefect/server/ui-v2/assets/{index-BaWDC4da.js.map → index-CS-zxv7Z.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-kP_I5Qfd.js → index-CToHKh4q.js} +2 -2
- prefect/server/ui-v2/assets/{index-kP_I5Qfd.js.map → index-CToHKh4q.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-CKGj5lSu.js → index-CUVvZndW.js} +2 -2
- prefect/server/ui-v2/assets/{index-CKGj5lSu.js.map → index-CUVvZndW.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-CxUfZRkN.js → index-CYVn-I3i.js} +2 -2
- prefect/server/ui-v2/assets/{index-CxUfZRkN.js.map → index-CYVn-I3i.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-CnlN-VC_.js → index-Cun0JN4t.js} +2 -2
- prefect/server/ui-v2/assets/{index-CnlN-VC_.js.map → index-Cun0JN4t.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-BwCLKpNb.js → index-D6ynV6U7.js} +2 -2
- prefect/server/ui-v2/assets/{index-BwCLKpNb.js.map → index-D6ynV6U7.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-CHf6xi9j.js → index-DdNUJLRW.js} +2 -2
- prefect/server/ui-v2/assets/{index-CHf6xi9j.js.map → index-DdNUJLRW.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-CQnWiUE5.js → index-DlHOXQhu.js} +2 -2
- prefect/server/ui-v2/assets/{index-CQnWiUE5.js.map → index-DlHOXQhu.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-Eqdr6Ff7.js → index-DyVw8YE8.js} +2 -2
- prefect/server/ui-v2/assets/{index-Eqdr6Ff7.js.map → index-DyVw8YE8.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-Btb_-PDp.js → index-DzRz7D2P.js} +2 -2
- prefect/server/ui-v2/assets/{index-Btb_-PDp.js.map → index-DzRz7D2P.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-DQGif3jm.js → index-DzUcVNZg.js} +2 -2
- prefect/server/ui-v2/assets/{index-DQGif3jm.js.map → index-DzUcVNZg.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-DNh9ZBy4.js → index-IBvMMs6S.js} +2 -2
- prefect/server/ui-v2/assets/{index-DNh9ZBy4.js.map → index-IBvMMs6S.js.map} +1 -1
- prefect/server/ui-v2/assets/index-_kpA__te.js +2 -0
- prefect/server/ui-v2/assets/{index-CiSFHkhI.js.map → index-_kpA__te.js.map} +1 -1
- prefect/server/ui-v2/assets/index-m9O-nIOl.css +1 -0
- prefect/server/ui-v2/assets/{index-lyQav_XM.js → index-wOvyf10b.js} +2 -2
- prefect/server/ui-v2/assets/{index-lyQav_XM.js.map → index-wOvyf10b.js.map} +1 -1
- prefect/server/ui-v2/assets/{json-input-Ba-BeBcw.js → json-input-Ce-HlRqa.js} +2 -2
- prefect/server/ui-v2/assets/{json-input-Ba-BeBcw.js.map → json-input-Ce-HlRqa.js.map} +1 -1
- prefect/server/ui-v2/assets/{key-value-DkSKn6jE.js → key-value-XHEZOtZX.js} +2 -2
- prefect/server/ui-v2/assets/{key-value-DkSKn6jE.js.map → key-value-XHEZOtZX.js.map} +1 -1
- prefect/server/ui-v2/assets/{key._key-Cjx57ymg.js → key._key-LpsMf3zD.js} +2 -2
- prefect/server/ui-v2/assets/{key._key-Cjx57ymg.js.map → key._key-LpsMf3zD.js.map} +1 -1
- prefect/server/ui-v2/assets/{lazy-markdown-Du2Xu3Yp.js → lazy-markdown-1Hz0xzca.js} +2 -2
- prefect/server/ui-v2/assets/{lazy-markdown-Du2Xu3Yp.js.map → lazy-markdown-1Hz0xzca.js.map} +1 -1
- prefect/server/ui-v2/assets/{login-DxMF9Jvj.js → login-D5uepl9L.js} +2 -2
- prefect/server/ui-v2/assets/{login-DxMF9Jvj.js.map → login-D5uepl9L.js.map} +1 -1
- prefect/server/ui-v2/assets/{markdown-input-DPi8zyRr.js → markdown-input-CG6M9zD0.js} +2 -2
- prefect/server/ui-v2/assets/{markdown-input-DPi8zyRr.js.map → markdown-input-CG6M9zD0.js.map} +1 -1
- prefect/server/ui-v2/assets/python-example-snippet-DRHcUlCX.js +3 -0
- prefect/server/ui-v2/assets/{python-example-snippet-DfCFYPN_.js.map → python-example-snippet-DRHcUlCX.js.map} +1 -1
- prefect/server/ui-v2/assets/{python-input-mr6GD840.js → python-input-BsUS8fw1.js} +2 -2
- prefect/server/ui-v2/assets/{python-input-mr6GD840.js.map → python-input-BsUS8fw1.js.map} +1 -1
- prefect/server/ui-v2/assets/{radio-group-Co3cN0Kv.js → radio-group-BUsmwdrt.js} +2 -2
- prefect/server/ui-v2/assets/{radio-group-Co3cN0Kv.js.map → radio-group-BUsmwdrt.js.map} +1 -1
- prefect/server/ui-v2/assets/{route-error-state-DnBaNT2T.js → route-error-state-BFBpiIhD.js} +2 -2
- prefect/server/ui-v2/assets/{route-error-state-DnBaNT2T.js.map → route-error-state-BFBpiIhD.js.map} +1 -1
- prefect/server/ui-v2/assets/{schema-form-CWDHSME9.js → schema-form-BwTmkvJk.js} +2 -2
- prefect/server/ui-v2/assets/{schema-form-CWDHSME9.js.map → schema-form-BwTmkvJk.js.map} +1 -1
- prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-BSWlW_aQ.js → schema-form-input-string-format-datetime-nrb3g-JJ.js} +4 -4
- prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-BSWlW_aQ.js.map → schema-form-input-string-format-datetime-nrb3g-JJ.js.map} +1 -1
- prefect/server/ui-v2/assets/{settings-DU5y6tJE.js → settings-CUBtK5aW.js} +2 -2
- prefect/server/ui-v2/assets/{settings-DU5y6tJE.js.map → settings-CUBtK5aW.js.map} +1 -1
- prefect/server/ui-v2/assets/{sort-filter-DpuWNkQo.js → sort-filter-Cv8zAXMp.js} +2 -2
- prefect/server/ui-v2/assets/{sort-filter-DpuWNkQo.js.map → sort-filter-Cv8zAXMp.js.map} +1 -1
- prefect/server/ui-v2/assets/{table-bBL6C0ZK.js → table-BBNGfPra.js} +2 -2
- prefect/server/ui-v2/assets/{table-bBL6C0ZK.js.map → table-BBNGfPra.js.map} +1 -1
- prefect/server/ui-v2/assets/{tags-input-BLPMVWpZ.js → tags-input-DHrnkwjQ.js} +2 -2
- prefect/server/ui-v2/assets/{tags-input-BLPMVWpZ.js.map → tags-input-DHrnkwjQ.js.map} +1 -1
- prefect/server/ui-v2/assets/task-run-concurrency-limits-reset-dialog-Z8-yFZ2_.js +2 -0
- prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-S69sih55.js.map → task-run-concurrency-limits-reset-dialog-Z8-yFZ2_.js.map} +1 -1
- prefect/server/ui-v2/assets/{task-run._id-Dl3Azs8t.js → task-run._id-BY58gqs2.js} +2 -2
- prefect/server/ui-v2/assets/{task-run._id-Dl3Azs8t.js.map → task-run._id-BY58gqs2.js.map} +1 -1
- prefect/server/ui-v2/assets/{task-run._id-B_tIDm4K.js → task-run._id-u73Jxfqw.js} +3 -3
- prefect/server/ui-v2/assets/{task-run._id-B_tIDm4K.js.map → task-run._id-u73Jxfqw.js.map} +1 -1
- prefect/server/ui-v2/assets/task-runs-pagination-DUy3147A.js +2 -0
- prefect/server/ui-v2/assets/{task-runs-pagination-VdR-LO4r.js.map → task-runs-pagination-DUy3147A.js.map} +1 -1
- prefect/server/ui-v2/assets/{textarea-B3_TtPRi.js → textarea-DUhh6-kq.js} +2 -2
- prefect/server/ui-v2/assets/{textarea-B3_TtPRi.js.map → textarea-DUhh6-kq.js.map} +1 -1
- prefect/server/ui-v2/assets/timezone-select-D4Q6VBtD.js +2 -0
- prefect/server/ui-v2/assets/{timezone-select-BuPYznge.js.map → timezone-select-D4Q6VBtD.js.map} +1 -1
- prefect/server/ui-v2/assets/{toggle-group-Cn07UIim.js → toggle-group-7WUJn2Tx.js} +2 -2
- prefect/server/ui-v2/assets/{toggle-group-Cn07UIim.js.map → toggle-group-7WUJn2Tx.js.map} +1 -1
- prefect/server/ui-v2/assets/use-delete-automation-confirmation-dialog-D4AD5Ndf.js +2 -0
- prefect/server/ui-v2/assets/{use-delete-automation-confirmation-dialog-DpdsLH4t.js.map → use-delete-automation-confirmation-dialog-D4AD5Ndf.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-Cq5nGhzr.js → use-delete-block-document-confirmation-dialog-DnwWEGUY.js} +2 -2
- prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-Cq5nGhzr.js.map → use-delete-block-document-confirmation-dialog-DnwWEGUY.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-DmQSWBTu.js → use-flow-runs-selected-rows-C-tehPRB.js} +2 -2
- prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-DmQSWBTu.js.map → use-flow-runs-selected-rows-C-tehPRB.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-DTwcWiqW.js → use-get-artifacts-flow-task-runs-DRWRrmrb.js} +2 -2
- prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-DTwcWiqW.js.map → use-get-artifacts-flow-task-runs-DRWRrmrb.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-quick-run-CPempwLh.js → use-quick-run-B4Xj-YQQ.js} +2 -2
- prefect/server/ui-v2/assets/{use-quick-run-CPempwLh.js.map → use-quick-run-B4Xj-YQQ.js.map} +1 -1
- prefect/server/ui-v2/assets/use-state-favicon-au2TZdMV.js +2 -0
- prefect/server/ui-v2/assets/{use-state-favicon-M09DmrNy.js.map → use-state-favicon-au2TZdMV.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-stepper-CDucnvzp.js → use-stepper-DyIb3vlq.js} +2 -2
- prefect/server/ui-v2/assets/{use-stepper-CDucnvzp.js.map → use-stepper-DyIb3vlq.js.map} +1 -1
- prefect/server/ui-v2/assets/{utilities-BRCNRcQl.js → utilities-D9Y2wo66.js} +2 -2
- prefect/server/ui-v2/assets/{utilities-BRCNRcQl.js.map → utilities-D9Y2wo66.js.map} +1 -1
- prefect/server/ui-v2/assets/vendor-recharts-BvvJP9Po.js +34 -0
- prefect/server/ui-v2/assets/vendor-recharts-BvvJP9Po.js.map +1 -0
- prefect/server/ui-v2/assets/{work-pool-filter-C2tpSS-w.js → work-pool-filter-CSOATj2D.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool-filter-C2tpSS-w.js.map → work-pool-filter-CSOATj2D.js.map} +1 -1
- prefect/server/ui-v2/assets/work-pool-queue-toggle-Dh7B1zMo.js +2 -0
- prefect/server/ui-v2/assets/{work-pool-queue-toggle-BQ9b-Wxy.js.map → work-pool-queue-toggle-Dh7B1zMo.js.map} +1 -1
- prefect/server/ui-v2/assets/work-pool._workPoolName-B_NFWXKS.js +2 -0
- prefect/server/ui-v2/assets/{work-pool._workPoolName-C_LiL3SE.js.map → work-pool._workPoolName-B_NFWXKS.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-DBHlrVVx.js → work-pool_._workPoolName.edit-Cyzn8g-S.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-DBHlrVVx.js.map → work-pool_._workPoolName.edit-Cyzn8g-S.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-DkITxJOP.js → work-pool_._workPoolName.queue._workQueueName-DQzqQWPT.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-DkITxJOP.js.map → work-pool_._workPoolName.queue._workQueueName-DQzqQWPT.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-queue-icon-text-D4BWBVDN.js → work-queue-icon-text-BOpcJ8YU.js} +2 -2
- prefect/server/ui-v2/assets/{work-queue-icon-text-D4BWBVDN.js.map → work-queue-icon-text-BOpcJ8YU.js.map} +1 -1
- prefect/server/ui-v2/index.html +3 -3
- {prefect-3.6.15.dist-info → prefect-3.6.16.dev2.dist-info}/METADATA +2 -1
- {prefect-3.6.15.dist-info → prefect-3.6.16.dev2.dist-info}/RECORD +222 -210
- prefect/server/ui-v2/assets/artifact._id-BFdf1WUA.js +0 -2
- prefect/server/ui-v2/assets/artifact._id-BFdf1WUA.js.map +0 -1
- prefect/server/ui-v2/assets/automation._id-Dn7jABys.js +0 -2
- prefect/server/ui-v2/assets/block-type-logo-Cbpfxded.js +0 -2
- prefect/server/ui-v2/assets/block-type-logo-Cbpfxded.js.map +0 -1
- prefect/server/ui-v2/assets/catalog_._slug-Bl2J2oI3.js +0 -2
- prefect/server/ui-v2/assets/create-D--LHaji.js +0 -2
- prefect/server/ui-v2/assets/data-table-rlbkLcrY.js +0 -2
- prefect/server/ui-v2/assets/data-table-rlbkLcrY.js.map +0 -1
- prefect/server/ui-v2/assets/delete-confirmation-dialog-DHkm2p8m.js +0 -2
- prefect/server/ui-v2/assets/deployment._id-Ci9zge5n.js +0 -2
- prefect/server/ui-v2/assets/deployment_._id.duplicate-D9ZWkh8H.js +0 -2
- prefect/server/ui-v2/assets/deployment_._id.edit-CS7sObzC.js +0 -2
- prefect/server/ui-v2/assets/event._eventDate._eventId-D7Twzb22.js +0 -2
- prefect/server/ui-v2/assets/flow-run._id-RLy2kBh0.js +0 -4
- prefect/server/ui-v2/assets/flow._id-BdQGWPKP.js +0 -2
- prefect/server/ui-v2/assets/index-7i4X9TeK.js +0 -2
- prefect/server/ui-v2/assets/index-BkiGTHwU.js +0 -2
- prefect/server/ui-v2/assets/index-BkiGTHwU.js.map +0 -1
- prefect/server/ui-v2/assets/index-COouj_0-.css +0 -1
- prefect/server/ui-v2/assets/index-CiSFHkhI.js +0 -2
- prefect/server/ui-v2/assets/index-DATPYZfT.js +0 -2
- prefect/server/ui-v2/assets/index-DATPYZfT.js.map +0 -1
- prefect/server/ui-v2/assets/index-VH4TnZ4e.js +0 -2
- prefect/server/ui-v2/assets/index-VH4TnZ4e.js.map +0 -1
- prefect/server/ui-v2/assets/python-example-snippet-DfCFYPN_.js +0 -3
- prefect/server/ui-v2/assets/task-run-concurrency-limits-reset-dialog-S69sih55.js +0 -2
- prefect/server/ui-v2/assets/task-runs-pagination-VdR-LO4r.js +0 -2
- prefect/server/ui-v2/assets/timezone-select-BuPYznge.js +0 -2
- prefect/server/ui-v2/assets/use-delete-automation-confirmation-dialog-DpdsLH4t.js +0 -2
- prefect/server/ui-v2/assets/use-state-favicon-M09DmrNy.js +0 -2
- prefect/server/ui-v2/assets/vendor-recharts-BAN776s_.js +0 -34
- prefect/server/ui-v2/assets/vendor-recharts-BAN776s_.js.map +0 -1
- prefect/server/ui-v2/assets/work-pool-queue-toggle-BQ9b-Wxy.js +0 -2
- prefect/server/ui-v2/assets/work-pool._workPoolName-C_LiL3SE.js +0 -2
- {prefect-3.6.15.dist-info → prefect-3.6.16.dev2.dist-info}/WHEEL +0 -0
- {prefect-3.6.15.dist-info → prefect-3.6.16.dev2.dist-info}/entry_points.txt +0 -0
- {prefect-3.6.15.dist-info → prefect-3.6.16.dev2.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e}from"./vendor-tanstack-BcZfOOfy.js";import{as as d,at as r,au as i,av as u,aw as p,ax as m,ay as c,az as l}from"./vendor-radix-BTiKGWfR.js";import{
|
|
2
|
-
//# sourceMappingURL=dropdown-menu-
|
|
1
|
+
import{j as e}from"./vendor-tanstack-BcZfOOfy.js";import{as as d,at as r,au as i,av as u,aw as p,ax as m,ay as c,az as l}from"./vendor-radix-BTiKGWfR.js";import{a_ as n}from"./index-B8vo2Lrg.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-D7Gwbd15.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu-0atiOSFo.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-D7Gwbd15.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 r,L as h,s as a,r as m}from"./vendor-tanstack-BcZfOOfy.js";import{
|
|
2
|
-
//# sourceMappingURL=event-resource-display-
|
|
1
|
+
import{j as r,L as h,s as a,r as m}from"./vendor-tanstack-BcZfOOfy.js";import{d8 as T,d9 as b,da as N,db as g,c1 as D,as as W,cu as Q,cc as P,ar as E,a_ as l,I as L,b9 as w}from"./index-B8vo2Lrg.js";const S={"flow-run":"Play","task-run":"Cog",deployment:"Rocket",flow:"Workflow","work-pool":"Server","work-queue":"ListOrdered",automation:"Zap","block-document":"Box","concurrency-limit":"Gauge",unknown:"Circle"},$={"flow-run":"Flow run","task-run":"Task run",flow:"Flow",deployment:"Deployment","work-pool":"Work pool","work-queue":"Work queue",automation:"Automation","block-document":"Block document","concurrency-limit":"Concurrency limit",unknown:"Resource"};function k(e){return!e||typeof e!="string"?"unknown":e.startsWith("prefect.flow-run.")?"flow-run":e.startsWith("prefect.task-run.")?"task-run":e.startsWith("prefect.deployment.")?"deployment":e.startsWith("prefect.flow.")?"flow":e.startsWith("prefect.work-pool.")?"work-pool":e.startsWith("prefect.work-queue.")?"work-queue":e.startsWith("prefect.automation.")?"automation":e.startsWith("prefect.block-document.")?"block-document":e.startsWith("prefect.concurrency-limit.")?"concurrency-limit":"unknown"}function x(e){if(!e||typeof e!="string")return null;const t=e.split(".");return t.length<3?null:t.slice(2).join(".")}function p(e){return e["prefect.resource.name"]||e["prefect.name"]||e["prefect-cloud.name"]||null}function q(e){for(const t of e){const o=t["prefect.resource.id"]||"";if(k(o)==="work-pool")return t}return null}function C(e,t=[]){const o=e["prefect.resource.id"]||"",s=k(o),n=x(o);if(!n)return null;switch(s){case"flow-run":return{to:"/runs/flow-run/$id",params:{id:n}};case"task-run":return{to:"/runs/task-run/$id",params:{id:n}};case"deployment":return{to:"/deployments/deployment/$id",params:{id:n}};case"flow":return{to:"/flows/flow/$id",params:{id:n}};case"work-pool":return{to:"/work-pools/work-pool/$workPoolName",params:{workPoolName:p(e)||n}};case"automation":return{to:"/automations/automation/$id",params:{id:n}};case"block-document":return{to:"/blocks/block/$id",params:{id:n}};case"concurrency-limit":return{to:"/concurrency-limits/concurrency-limit/$id",params:{id:n}};case"work-queue":{const c=p(e);if(!c)return null;const d=q(t);if(!d)return null;const j=d["prefect.resource.id"]||"",R=x(j),y=p(d)||R;return y?{to:"/work-pools/work-pool/$workPoolName/queue/$workQueueName",params:{workPoolName:y,workQueueName:c}}:null}default:return null}}function i({resource:e,relatedResources:t=[],children:o,className:s}){const n=C(e,t);return n?r.jsx(h,{to:n.to,params:n.params,className:s,children:o}):r.jsx("span",{className:s,children:o})}function v({resourceId:e,className:t}){const{data:o}=a(E(e));return r.jsx(u,{resourceType:"flow-run",displayText:o.name??e,className:t})}function G({resourceId:e,className:t}){const{data:o}=a(P(e));return r.jsx(u,{resourceType:"task-run",displayText:o.name??e,className:t})}function F({resourceId:e,className:t}){const{data:o}=a(Q(e));return r.jsx(u,{resourceType:"deployment",displayText:o.name,className:t})}function B({resourceId:e,className:t}){const{data:o}=a(W(e));return r.jsx(u,{resourceType:"flow",displayText:o.name,className:t})}function A({resourceId:e,className:t}){const{data:o}=a(D(e));return r.jsx(u,{resourceType:"work-pool",displayText:o.name,className:t})}function O({resourceId:e,className:t}){const{data:o}=a(g(e));return r.jsx(u,{resourceType:"work-queue",displayText:o.name,className:t})}function _({resourceId:e,className:t}){const{data:o}=a(N(e));return r.jsx(u,{resourceType:"automation",displayText:o.name,className:t})}function U({resourceId:e,className:t}){const{data:o}=a(b(e));return r.jsx(u,{resourceType:"block-document",displayText:o.name??e,className:t})}function Y({resourceId:e,className:t}){const{data:o}=a(T(e));return r.jsx(u,{resourceType:"concurrency-limit",displayText:o.tag??e,className:t})}function Z({resourceType:e,resourceId:t,className:o}){switch(e){case"flow-run":return r.jsx(v,{resourceId:t,className:o});case"task-run":return r.jsx(G,{resourceId:t,className:o});case"deployment":return r.jsx(F,{resourceId:t,className:o});case"flow":return r.jsx(B,{resourceId:t,className:o});case"work-pool":return r.jsx(A,{resourceId:t,className:o});case"work-queue":return r.jsx(O,{resourceId:t,className:o});case"automation":return r.jsx(_,{resourceId:t,className:o});case"block-document":return r.jsx(U,{resourceId:t,className:o});case"concurrency-limit":return r.jsx(Y,{resourceId:t,className:o});default:return null}}function z(e){return e["prefect.resource.name"]||e["prefect.name"]||e["prefect-cloud.name"]||null}function H(e){return e["prefect.resource.id"]||""}function u({resourceType:e,displayText:t,className:o}){const s=S[e],n=$[e];return r.jsxs("div",{className:l("flex items-center gap-2",o),children:[n&&r.jsx("span",{children:n}),r.jsx(L,{id:s,className:"h-4 w-4 text-muted-foreground"}),r.jsx("span",{children:t})]})}function f(){return r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(w,{className:"h-4 w-4 rounded-full"}),r.jsx(w,{className:"h-4 w-24"})]})}function M({event:e,className:t}){const o=z(e.resource),s=H(e.resource),n=k(s),c=x(s);return o?r.jsxs("div",{className:l("flex flex-col gap-0.5",t),children:[r.jsx("span",{className:"text-sm font-medium",children:"Resource"}),r.jsx(m.Suspense,{fallback:r.jsx(f,{}),children:r.jsx(i,{resource:e.resource,relatedResources:e.related??[],className:"hover:underline",children:r.jsx(u,{resourceType:n,displayText:o,className:"text-sm"})})})]}):c&&n!=="unknown"?r.jsxs("div",{className:l("flex flex-col gap-0.5",t),children:[r.jsx("span",{className:"text-sm font-medium",children:"Resource"}),r.jsx(m.Suspense,{fallback:r.jsx(f,{}),children:r.jsx(i,{resource:e.resource,relatedResources:e.related??[],className:"hover:underline",children:r.jsx(Z,{resourceType:n,resourceId:c,className:"text-sm"})})})]}):c?r.jsxs("div",{className:l("flex flex-col gap-0.5",t),children:[r.jsx("span",{className:"text-sm font-medium",children:"Resource"}),r.jsx(m.Suspense,{fallback:r.jsx(f,{}),children:r.jsx(i,{resource:e.resource,relatedResources:e.related??[],className:"hover:underline",children:r.jsx(u,{resourceType:n,displayText:c,className:"text-sm text-muted-foreground font-mono"})})})]}):s?r.jsxs("div",{className:l("flex flex-col gap-0.5",t),children:[r.jsx("span",{className:"text-sm font-medium",children:"Resource"}),r.jsx(i,{resource:e.resource,relatedResources:e.related??[],className:"hover:underline",children:r.jsx("div",{className:"text-sm text-muted-foreground",children:r.jsx("span",{className:"font-mono text-xs",children:s})})})]}):r.jsxs("div",{className:l("flex flex-col gap-0.5",t),children:[r.jsx("span",{className:"text-sm font-medium",children:"Resource"}),r.jsx("div",{className:"text-sm text-muted-foreground",children:r.jsx("span",{className:"text-muted-foreground",children:"Unknown"})})]})}export{M as E,S as R,i as a,$ as b,u as c,f as d,x as e,Z as f,k as p};
|
|
2
|
+
//# sourceMappingURL=event-resource-display-CDRgVKd4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-resource-display-DHiAb1Up.js","sources":["../../src/components/events/event-resource-display/resource-types.ts","../../src/components/events/event-resource-display/resource-routes.ts","../../src/components/events/event-resource-display/event-resource-link.tsx","../../src/components/events/event-resource-display/resource-displays.tsx","../../src/components/events/event-resource-display/resolved-resource-display.tsx","../../src/components/events/event-resource-display/event-resource-display.tsx"],"sourcesContent":["import type { IconId } from \"@/components/ui/icons\";\n\nexport type ResourceType =\n\t| \"flow-run\"\n\t| \"task-run\"\n\t| \"deployment\"\n\t| \"flow\"\n\t| \"work-pool\"\n\t| \"work-queue\"\n\t| \"automation\"\n\t| \"block-document\"\n\t| \"concurrency-limit\"\n\t| \"unknown\";\n\nexport const RESOURCE_ICONS: Record<ResourceType, IconId> = {\n\t\"flow-run\": \"Play\",\n\t\"task-run\": \"Cog\",\n\tdeployment: \"Rocket\",\n\tflow: \"Workflow\",\n\t\"work-pool\": \"Server\",\n\t\"work-queue\": \"ListOrdered\",\n\tautomation: \"Zap\",\n\t\"block-document\": \"Box\",\n\t\"concurrency-limit\": \"Gauge\",\n\tunknown: \"Circle\",\n};\n\nexport const RESOURCE_TYPE_LABELS: Record<ResourceType, string> = {\n\t\"flow-run\": \"Flow run\",\n\t\"task-run\": \"Task run\",\n\tflow: \"Flow\",\n\tdeployment: \"Deployment\",\n\t\"work-pool\": \"Work pool\",\n\t\"work-queue\": \"Work queue\",\n\tautomation: \"Automation\",\n\t\"block-document\": \"Block document\",\n\t\"concurrency-limit\": \"Concurrency limit\",\n\tunknown: \"Resource\",\n};\n\n/**\n * Parses a Prefect resource ID to determine its type.\n * Resource IDs follow the format: prefect.{resource-type}.{uuid}\n *\n * @param resourceId - The full resource ID string (e.g., \"prefect.flow-run.abc-123\")\n * @returns The parsed ResourceType, or \"unknown\" if the format is unrecognized\n */\nexport function parseResourceType(resourceId: string): ResourceType {\n\tif (!resourceId || typeof resourceId !== \"string\") {\n\t\treturn \"unknown\";\n\t}\n\n\tif (resourceId.startsWith(\"prefect.flow-run.\")) {\n\t\treturn \"flow-run\";\n\t}\n\tif (resourceId.startsWith(\"prefect.task-run.\")) {\n\t\treturn \"task-run\";\n\t}\n\tif (resourceId.startsWith(\"prefect.deployment.\")) {\n\t\treturn \"deployment\";\n\t}\n\tif (resourceId.startsWith(\"prefect.flow.\")) {\n\t\treturn \"flow\";\n\t}\n\tif (resourceId.startsWith(\"prefect.work-pool.\")) {\n\t\treturn \"work-pool\";\n\t}\n\tif (resourceId.startsWith(\"prefect.work-queue.\")) {\n\t\treturn \"work-queue\";\n\t}\n\tif (resourceId.startsWith(\"prefect.automation.\")) {\n\t\treturn \"automation\";\n\t}\n\tif (resourceId.startsWith(\"prefect.block-document.\")) {\n\t\treturn \"block-document\";\n\t}\n\tif (resourceId.startsWith(\"prefect.concurrency-limit.\")) {\n\t\treturn \"concurrency-limit\";\n\t}\n\n\treturn \"unknown\";\n}\n\n/**\n * Extracts the resource identifier from a Prefect resource ID.\n * Resource IDs follow the format: prefect.{resource-type}.{uuid}\n *\n * @param prefectResourceId - The full resource ID string (e.g., \"prefect.flow-run.abc-123\")\n * @returns The extracted ID portion (e.g., \"abc-123\"), or null if the format is invalid\n */\nexport function extractResourceId(prefectResourceId: string): string | null {\n\tif (!prefectResourceId || typeof prefectResourceId !== \"string\") {\n\t\treturn null;\n\t}\n\n\tconst parts = prefectResourceId.split(\".\");\n\tif (parts.length < 3) {\n\t\treturn null;\n\t}\n\n\t// Join parts after index 1 (skip \"prefect\" and resource type)\n\treturn parts.slice(2).join(\".\");\n}\n","import type { components } from \"@/api/prefect\";\nimport { extractResourceId, parseResourceType } from \"./resource-types\";\n\ntype RelatedResource = components[\"schemas\"][\"RelatedResource\"];\n\nexport type ResourceRouteConfig = {\n\tto: string;\n\tparams: Record<string, string>;\n};\n\nfunction getResourceName(resource: RelatedResource): string | null {\n\treturn (\n\t\tresource[\"prefect.resource.name\"] ||\n\t\tresource[\"prefect.name\"] ||\n\t\tresource[\"prefect-cloud.name\"] ||\n\t\tnull\n\t);\n}\n\nfunction findWorkPoolInRelated(\n\trelatedResources: RelatedResource[],\n): RelatedResource | null {\n\tfor (const resource of relatedResources) {\n\t\tconst resourceId = resource[\"prefect.resource.id\"] || \"\";\n\t\tconst resourceType = parseResourceType(resourceId);\n\t\tif (resourceType === \"work-pool\") {\n\t\t\treturn resource;\n\t\t}\n\t}\n\treturn null;\n}\n\nexport function getResourceRoute(\n\tresource: RelatedResource,\n\trelatedResources: RelatedResource[] = [],\n): ResourceRouteConfig | null {\n\tconst resourceId = resource[\"prefect.resource.id\"] || \"\";\n\tconst resourceType = parseResourceType(resourceId);\n\tconst extractedId = extractResourceId(resourceId);\n\n\tif (!extractedId) {\n\t\treturn null;\n\t}\n\n\tswitch (resourceType) {\n\t\tcase \"flow-run\":\n\t\t\treturn {\n\t\t\t\tto: \"/runs/flow-run/$id\",\n\t\t\t\tparams: { id: extractedId },\n\t\t\t};\n\t\tcase \"task-run\":\n\t\t\treturn {\n\t\t\t\tto: \"/runs/task-run/$id\",\n\t\t\t\tparams: { id: extractedId },\n\t\t\t};\n\t\tcase \"deployment\":\n\t\t\treturn {\n\t\t\t\tto: \"/deployments/deployment/$id\",\n\t\t\t\tparams: { id: extractedId },\n\t\t\t};\n\t\tcase \"flow\":\n\t\t\treturn {\n\t\t\t\tto: \"/flows/flow/$id\",\n\t\t\t\tparams: { id: extractedId },\n\t\t\t};\n\t\tcase \"work-pool\": {\n\t\t\t// Work pools use name instead of id in the route\n\t\t\tconst workPoolName = getResourceName(resource) || extractedId;\n\t\t\treturn {\n\t\t\t\tto: \"/work-pools/work-pool/$workPoolName\",\n\t\t\t\tparams: { workPoolName },\n\t\t\t};\n\t\t}\n\t\tcase \"automation\":\n\t\t\treturn {\n\t\t\t\tto: \"/automations/automation/$id\",\n\t\t\t\tparams: { id: extractedId },\n\t\t\t};\n\t\tcase \"block-document\":\n\t\t\treturn {\n\t\t\t\tto: \"/blocks/block/$id\",\n\t\t\t\tparams: { id: extractedId },\n\t\t\t};\n\t\tcase \"concurrency-limit\":\n\t\t\treturn {\n\t\t\t\tto: \"/concurrency-limits/concurrency-limit/$id\",\n\t\t\t\tparams: { id: extractedId },\n\t\t\t};\n\t\tcase \"work-queue\": {\n\t\t\t// Work queues require both work pool name and queue name\n\t\t\t// Try to find the work pool in related resources\n\t\t\tconst workQueueName = getResourceName(resource);\n\t\t\tif (!workQueueName) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tconst workPool = findWorkPoolInRelated(relatedResources);\n\t\t\tif (!workPool) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tconst workPoolId = workPool[\"prefect.resource.id\"] || \"\";\n\t\t\tconst workPoolExtractedId = extractResourceId(workPoolId);\n\t\t\tconst workPoolName = getResourceName(workPool) || workPoolExtractedId;\n\t\t\tif (!workPoolName) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tto: \"/work-pools/work-pool/$workPoolName/queue/$workQueueName\",\n\t\t\t\tparams: { workPoolName, workQueueName },\n\t\t\t};\n\t\t}\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n","import { Link } from \"@tanstack/react-router\";\nimport type { components } from \"@/api/prefect\";\nimport { getResourceRoute } from \"./resource-routes\";\n\ntype RelatedResource = components[\"schemas\"][\"RelatedResource\"];\n\ntype EventResourceLinkProps = {\n\tresource: RelatedResource;\n\trelatedResources?: RelatedResource[];\n\tchildren: React.ReactNode;\n\tclassName?: string;\n};\n\nexport function EventResourceLink({\n\tresource,\n\trelatedResources = [],\n\tchildren,\n\tclassName,\n}: EventResourceLinkProps) {\n\tconst routeConfig = getResourceRoute(resource, relatedResources);\n\n\tif (!routeConfig) {\n\t\treturn <span className={className}>{children}</span>;\n\t}\n\n\treturn (\n\t\t<Link to={routeConfig.to} params={routeConfig.params} className={className}>\n\t\t\t{children}\n\t\t</Link>\n\t);\n}\n","import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { buildGetAutomationQuery } from \"@/api/automations\";\nimport { buildGetBlockDocumentQuery } from \"@/api/block-documents\";\nimport { buildDeploymentDetailsQuery } from \"@/api/deployments\";\nimport { buildGetFlowRunDetailsQuery } from \"@/api/flow-runs\";\nimport { buildFLowDetailsQuery } from \"@/api/flows\";\nimport { buildGetConcurrencyLimitQuery } from \"@/api/task-run-concurrency-limits\";\nimport { buildGetTaskRunDetailsQuery } from \"@/api/task-runs\";\nimport { buildGetWorkPoolQuery } from \"@/api/work-pools\";\nimport { buildGetWorkQueueQuery } from \"@/api/work-queues\";\nimport { ResourceDisplayWithIcon } from \"./event-resource-display\";\n\ntype ResourceDisplayProps = {\n\tresourceId: string;\n\tclassName?: string;\n};\n\nexport function FlowRunResourceDisplay({\n\tresourceId,\n\tclassName,\n}: ResourceDisplayProps) {\n\tconst { data: flowRun } = useSuspenseQuery(\n\t\tbuildGetFlowRunDetailsQuery(resourceId),\n\t);\n\treturn (\n\t\t<ResourceDisplayWithIcon\n\t\t\tresourceType=\"flow-run\"\n\t\t\tdisplayText={flowRun.name ?? resourceId}\n\t\t\tclassName={className}\n\t\t/>\n\t);\n}\n\nexport function TaskRunResourceDisplay({\n\tresourceId,\n\tclassName,\n}: ResourceDisplayProps) {\n\tconst { data: taskRun } = useSuspenseQuery(\n\t\tbuildGetTaskRunDetailsQuery(resourceId),\n\t);\n\treturn (\n\t\t<ResourceDisplayWithIcon\n\t\t\tresourceType=\"task-run\"\n\t\t\tdisplayText={taskRun.name ?? resourceId}\n\t\t\tclassName={className}\n\t\t/>\n\t);\n}\n\nexport function DeploymentResourceDisplay({\n\tresourceId,\n\tclassName,\n}: ResourceDisplayProps) {\n\tconst { data: deployment } = useSuspenseQuery(\n\t\tbuildDeploymentDetailsQuery(resourceId),\n\t);\n\treturn (\n\t\t<ResourceDisplayWithIcon\n\t\t\tresourceType=\"deployment\"\n\t\t\tdisplayText={deployment.name}\n\t\t\tclassName={className}\n\t\t/>\n\t);\n}\n\nexport function FlowResourceDisplay({\n\tresourceId,\n\tclassName,\n}: ResourceDisplayProps) {\n\tconst { data: flow } = useSuspenseQuery(buildFLowDetailsQuery(resourceId));\n\treturn (\n\t\t<ResourceDisplayWithIcon\n\t\t\tresourceType=\"flow\"\n\t\t\tdisplayText={flow.name}\n\t\t\tclassName={className}\n\t\t/>\n\t);\n}\n\nexport function WorkPoolResourceDisplay({\n\tresourceId,\n\tclassName,\n}: ResourceDisplayProps) {\n\tconst { data: workPool } = useSuspenseQuery(\n\t\tbuildGetWorkPoolQuery(resourceId),\n\t);\n\treturn (\n\t\t<ResourceDisplayWithIcon\n\t\t\tresourceType=\"work-pool\"\n\t\t\tdisplayText={workPool.name}\n\t\t\tclassName={className}\n\t\t/>\n\t);\n}\n\nexport function WorkQueueResourceDisplay({\n\tresourceId,\n\tclassName,\n}: ResourceDisplayProps) {\n\tconst { data: workQueue } = useSuspenseQuery(\n\t\tbuildGetWorkQueueQuery(resourceId),\n\t);\n\treturn (\n\t\t<ResourceDisplayWithIcon\n\t\t\tresourceType=\"work-queue\"\n\t\t\tdisplayText={workQueue.name}\n\t\t\tclassName={className}\n\t\t/>\n\t);\n}\n\nexport function AutomationResourceDisplay({\n\tresourceId,\n\tclassName,\n}: ResourceDisplayProps) {\n\tconst { data: automation } = useSuspenseQuery(\n\t\tbuildGetAutomationQuery(resourceId),\n\t);\n\treturn (\n\t\t<ResourceDisplayWithIcon\n\t\t\tresourceType=\"automation\"\n\t\t\tdisplayText={automation.name}\n\t\t\tclassName={className}\n\t\t/>\n\t);\n}\n\nexport function BlockDocumentResourceDisplay({\n\tresourceId,\n\tclassName,\n}: ResourceDisplayProps) {\n\tconst { data: blockDocument } = useSuspenseQuery(\n\t\tbuildGetBlockDocumentQuery(resourceId),\n\t);\n\treturn (\n\t\t<ResourceDisplayWithIcon\n\t\t\tresourceType=\"block-document\"\n\t\t\tdisplayText={blockDocument.name ?? resourceId}\n\t\t\tclassName={className}\n\t\t/>\n\t);\n}\n\nexport function ConcurrencyLimitResourceDisplay({\n\tresourceId,\n\tclassName,\n}: ResourceDisplayProps) {\n\tconst { data: concurrencyLimit } = useSuspenseQuery(\n\t\tbuildGetConcurrencyLimitQuery(resourceId),\n\t);\n\treturn (\n\t\t<ResourceDisplayWithIcon\n\t\t\tresourceType=\"concurrency-limit\"\n\t\t\tdisplayText={concurrencyLimit.tag ?? resourceId}\n\t\t\tclassName={className}\n\t\t/>\n\t);\n}\n","import {\n\tAutomationResourceDisplay,\n\tBlockDocumentResourceDisplay,\n\tConcurrencyLimitResourceDisplay,\n\tDeploymentResourceDisplay,\n\tFlowResourceDisplay,\n\tFlowRunResourceDisplay,\n\tTaskRunResourceDisplay,\n\tWorkPoolResourceDisplay,\n\tWorkQueueResourceDisplay,\n} from \"./resource-displays\";\nimport type { ResourceType } from \"./resource-types\";\n\ntype ResolvedResourceDisplayProps = {\n\tresourceType: Exclude<ResourceType, \"unknown\">;\n\tresourceId: string;\n\tclassName?: string;\n};\n\nexport function ResolvedResourceDisplay({\n\tresourceType,\n\tresourceId,\n\tclassName,\n}: ResolvedResourceDisplayProps) {\n\tswitch (resourceType) {\n\t\tcase \"flow-run\":\n\t\t\treturn (\n\t\t\t\t<FlowRunResourceDisplay resourceId={resourceId} className={className} />\n\t\t\t);\n\t\tcase \"task-run\":\n\t\t\treturn (\n\t\t\t\t<TaskRunResourceDisplay resourceId={resourceId} className={className} />\n\t\t\t);\n\t\tcase \"deployment\":\n\t\t\treturn (\n\t\t\t\t<DeploymentResourceDisplay\n\t\t\t\t\tresourceId={resourceId}\n\t\t\t\t\tclassName={className}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"flow\":\n\t\t\treturn (\n\t\t\t\t<FlowResourceDisplay resourceId={resourceId} className={className} />\n\t\t\t);\n\t\tcase \"work-pool\":\n\t\t\treturn (\n\t\t\t\t<WorkPoolResourceDisplay\n\t\t\t\t\tresourceId={resourceId}\n\t\t\t\t\tclassName={className}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"work-queue\":\n\t\t\treturn (\n\t\t\t\t<WorkQueueResourceDisplay\n\t\t\t\t\tresourceId={resourceId}\n\t\t\t\t\tclassName={className}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"automation\":\n\t\t\treturn (\n\t\t\t\t<AutomationResourceDisplay\n\t\t\t\t\tresourceId={resourceId}\n\t\t\t\t\tclassName={className}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"block-document\":\n\t\t\treturn (\n\t\t\t\t<BlockDocumentResourceDisplay\n\t\t\t\t\tresourceId={resourceId}\n\t\t\t\t\tclassName={className}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"concurrency-limit\":\n\t\t\treturn (\n\t\t\t\t<ConcurrencyLimitResourceDisplay\n\t\t\t\t\tresourceId={resourceId}\n\t\t\t\t\tclassName={className}\n\t\t\t\t/>\n\t\t\t);\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n","import { Suspense } from \"react\";\nimport type { Event } from \"@/api/events\";\nimport { Icon } from \"@/components/ui/icons\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\nimport { cn } from \"@/utils\";\nimport { EventResourceLink } from \"./event-resource-link\";\nimport { ResolvedResourceDisplay } from \"./resolved-resource-display\";\nimport {\n\textractResourceId,\n\tparseResourceType,\n\tRESOURCE_ICONS,\n\tRESOURCE_TYPE_LABELS,\n\ttype ResourceType,\n} from \"./resource-types\";\n\nexport type EventResourceDisplayProps = {\n\tevent: Event;\n\tclassName?: string;\n};\n\nfunction getResourceName(resource: Record<string, string>): string | null {\n\treturn (\n\t\tresource[\"prefect.resource.name\"] ||\n\t\tresource[\"prefect.name\"] ||\n\t\tresource[\"prefect-cloud.name\"] ||\n\t\tnull\n\t);\n}\n\nfunction getResourceId(resource: Record<string, string>): string {\n\treturn resource[\"prefect.resource.id\"] || \"\";\n}\n\ntype ResourceDisplayWithIconProps = {\n\tresourceType: ResourceType;\n\tdisplayText: string;\n\tclassName?: string;\n};\n\nexport function ResourceDisplayWithIcon({\n\tresourceType,\n\tdisplayText,\n\tclassName,\n}: ResourceDisplayWithIconProps) {\n\tconst iconId = RESOURCE_ICONS[resourceType];\n\tconst typeLabel = RESOURCE_TYPE_LABELS[resourceType];\n\n\treturn (\n\t\t<div className={cn(\"flex items-center gap-2\", className)}>\n\t\t\t{typeLabel && <span>{typeLabel}</span>}\n\t\t\t<Icon id={iconId} className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t<span>{displayText}</span>\n\t\t</div>\n\t);\n}\n\nexport function ResourceDisplaySkeleton() {\n\treturn (\n\t\t<div className=\"flex items-center gap-2\">\n\t\t\t<Skeleton className=\"h-4 w-4 rounded-full\" />\n\t\t\t<Skeleton className=\"h-4 w-24\" />\n\t\t</div>\n\t);\n}\n\nexport function EventResourceDisplay({\n\tevent,\n\tclassName,\n}: EventResourceDisplayProps) {\n\tconst resourceName = getResourceName(event.resource);\n\tconst prefectResourceId = getResourceId(event.resource);\n\tconst resourceType = parseResourceType(prefectResourceId);\n\tconst extractedId = extractResourceId(prefectResourceId);\n\n\t// If we have a resource name, display it with the appropriate icon\n\tif (resourceName) {\n\t\treturn (\n\t\t\t<div className={cn(\"flex flex-col gap-0.5\", className)}>\n\t\t\t\t<span className=\"text-sm font-medium\">Resource</span>\n\t\t\t\t<Suspense fallback={<ResourceDisplaySkeleton />}>\n\t\t\t\t\t<EventResourceLink\n\t\t\t\t\t\tresource={event.resource}\n\t\t\t\t\t\trelatedResources={event.related ?? []}\n\t\t\t\t\t\tclassName=\"hover:underline\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ResourceDisplayWithIcon\n\t\t\t\t\t\t\tresourceType={resourceType}\n\t\t\t\t\t\t\tdisplayText={resourceName}\n\t\t\t\t\t\t\tclassName=\"text-sm\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</EventResourceLink>\n\t\t\t\t</Suspense>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// If we have an extracted ID but no name, try to fetch the resource name via API\n\tif (extractedId && resourceType !== \"unknown\") {\n\t\treturn (\n\t\t\t<div className={cn(\"flex flex-col gap-0.5\", className)}>\n\t\t\t\t<span className=\"text-sm font-medium\">Resource</span>\n\t\t\t\t<Suspense fallback={<ResourceDisplaySkeleton />}>\n\t\t\t\t\t<EventResourceLink\n\t\t\t\t\t\tresource={event.resource}\n\t\t\t\t\t\trelatedResources={event.related ?? []}\n\t\t\t\t\t\tclassName=\"hover:underline\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ResolvedResourceDisplay\n\t\t\t\t\t\t\tresourceType={resourceType}\n\t\t\t\t\t\t\tresourceId={extractedId}\n\t\t\t\t\t\t\tclassName=\"text-sm\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</EventResourceLink>\n\t\t\t\t</Suspense>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// If we have an extracted ID but unknown type, show the ID with the icon\n\tif (extractedId) {\n\t\treturn (\n\t\t\t<div className={cn(\"flex flex-col gap-0.5\", className)}>\n\t\t\t\t<span className=\"text-sm font-medium\">Resource</span>\n\t\t\t\t<Suspense fallback={<ResourceDisplaySkeleton />}>\n\t\t\t\t\t<EventResourceLink\n\t\t\t\t\t\tresource={event.resource}\n\t\t\t\t\t\trelatedResources={event.related ?? []}\n\t\t\t\t\t\tclassName=\"hover:underline\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ResourceDisplayWithIcon\n\t\t\t\t\t\t\tresourceType={resourceType}\n\t\t\t\t\t\t\tdisplayText={extractedId}\n\t\t\t\t\t\t\tclassName=\"text-sm text-muted-foreground font-mono\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</EventResourceLink>\n\t\t\t\t</Suspense>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Fallback: show the raw resource ID if nothing else is available\n\tif (prefectResourceId) {\n\t\treturn (\n\t\t\t<div className={cn(\"flex flex-col gap-0.5\", className)}>\n\t\t\t\t<span className=\"text-sm font-medium\">Resource</span>\n\t\t\t\t<EventResourceLink\n\t\t\t\t\tresource={event.resource}\n\t\t\t\t\trelatedResources={event.related ?? []}\n\t\t\t\t\tclassName=\"hover:underline\"\n\t\t\t\t>\n\t\t\t\t\t<div className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t<span className=\"font-mono text-xs\">{prefectResourceId}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</EventResourceLink>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// No resource information available\n\treturn (\n\t\t<div className={cn(\"flex flex-col gap-0.5\", className)}>\n\t\t\t<span className=\"text-sm font-medium\">Resource</span>\n\t\t\t<div className=\"text-sm text-muted-foreground\">\n\t\t\t\t<span className=\"text-muted-foreground\">Unknown</span>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"names":["RESOURCE_ICONS","RESOURCE_TYPE_LABELS","parseResourceType","resourceId","extractResourceId","prefectResourceId","parts","getResourceName","resource","findWorkPoolInRelated","relatedResources","getResourceRoute","resourceType","extractedId","workQueueName","workPool","workPoolId","workPoolExtractedId","workPoolName","EventResourceLink","children","className","routeConfig","jsx","Link","FlowRunResourceDisplay","flowRun","useSuspenseQuery","buildGetFlowRunDetailsQuery","ResourceDisplayWithIcon","TaskRunResourceDisplay","taskRun","buildGetTaskRunDetailsQuery","DeploymentResourceDisplay","deployment","buildDeploymentDetailsQuery","FlowResourceDisplay","flow","buildFLowDetailsQuery","WorkPoolResourceDisplay","buildGetWorkPoolQuery","WorkQueueResourceDisplay","workQueue","buildGetWorkQueueQuery","AutomationResourceDisplay","automation","buildGetAutomationQuery","BlockDocumentResourceDisplay","blockDocument","buildGetBlockDocumentQuery","ConcurrencyLimitResourceDisplay","concurrencyLimit","buildGetConcurrencyLimitQuery","ResolvedResourceDisplay","getResourceId","displayText","iconId","typeLabel","cn","Icon","ResourceDisplaySkeleton","jsxs","Skeleton","EventResourceDisplay","event","resourceName","Suspense"],"mappings":"uMAcO,MAAMA,EAA+C,CAC3D,WAAY,OACZ,WAAY,MACZ,WAAY,SACZ,KAAM,WACN,YAAa,SACb,aAAc,cACd,WAAY,MACZ,iBAAkB,MAClB,oBAAqB,QACrB,QAAS,QACV,EAEaC,EAAqD,CACjE,WAAY,WACZ,WAAY,WACZ,KAAM,OACN,WAAY,aACZ,YAAa,YACb,aAAc,aACd,WAAY,aACZ,iBAAkB,iBAClB,oBAAqB,oBACrB,QAAS,UACV,EASO,SAASC,EAAkBC,EAAkC,CACnE,MAAI,CAACA,GAAc,OAAOA,GAAe,SACjC,UAGJA,EAAW,WAAW,mBAAmB,EACrC,WAEJA,EAAW,WAAW,mBAAmB,EACrC,WAEJA,EAAW,WAAW,qBAAqB,EACvC,aAEJA,EAAW,WAAW,eAAe,EACjC,OAEJA,EAAW,WAAW,oBAAoB,EACtC,YAEJA,EAAW,WAAW,qBAAqB,EACvC,aAEJA,EAAW,WAAW,qB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sB,SAAA,WAAQ,EAC9CA,EAAAA,IAACJ,EAAA,CACA,SAAU6C,EAAM,SAChB,iBAAkBA,EAAM,SAAW,CAAA,EACnC,UAAU,kBAEV,SAAAzC,EAAAA,IAAC,OAAI,UAAU,gCACd,eAAC,OAAA,CAAK,UAAU,oBAAqB,SAAAlB,CAAA,CAAkB,CAAA,CACxD,CAAA,CAAA,CACD,EACD,SAMA,MAAA,CAAI,UAAWqD,EAAG,wBAAyBrC,CAAS,EACpD,SAAA,CAAAE,EAAAA,IAAC,OAAA,CAAK,UAAU,sBAAsB,SAAA,WAAQ,EAC9CA,EAAAA,IAAC,OAAI,UAAU,gCACd,eAAC,OAAA,CAAK,UAAU,wBAAwB,SAAA,SAAA,CAAO,CAAA,CAChD,CAAA,EACD,CAEF"}
|
|
1
|
+
{"version":3,"file":"event-resource-display-CDRgVKd4.js","sources":["../../src/components/events/event-resource-display/resource-types.ts","../../src/components/events/event-resource-display/resource-routes.ts","../../src/components/events/event-resource-display/event-resource-link.tsx","../../src/components/events/event-resource-display/resource-displays.tsx","../../src/components/events/event-resource-display/resolved-resource-display.tsx","../../src/components/events/event-resource-display/event-resource-display.tsx"],"sourcesContent":["import type { IconId } from \"@/components/ui/icons\";\n\nexport type ResourceType =\n\t| \"flow-run\"\n\t| \"task-run\"\n\t| \"deployment\"\n\t| \"flow\"\n\t| \"work-pool\"\n\t| \"work-queue\"\n\t| \"automation\"\n\t| \"block-document\"\n\t| \"concurrency-limit\"\n\t| \"unknown\";\n\nexport const RESOURCE_ICONS: Record<ResourceType, IconId> = {\n\t\"flow-run\": \"Play\",\n\t\"task-run\": \"Cog\",\n\tdeployment: \"Rocket\",\n\tflow: \"Workflow\",\n\t\"work-pool\": \"Server\",\n\t\"work-queue\": \"ListOrdered\",\n\tautomation: \"Zap\",\n\t\"block-document\": \"Box\",\n\t\"concurrency-limit\": \"Gauge\",\n\tunknown: \"Circle\",\n};\n\nexport const RESOURCE_TYPE_LABELS: Record<ResourceType, string> = {\n\t\"flow-run\": \"Flow run\",\n\t\"task-run\": \"Task run\",\n\tflow: \"Flow\",\n\tdeployment: \"Deployment\",\n\t\"work-pool\": \"Work pool\",\n\t\"work-queue\": \"Work queue\",\n\tautomation: \"Automation\",\n\t\"block-document\": \"Block document\",\n\t\"concurrency-limit\": \"Concurrency limit\",\n\tunknown: \"Resource\",\n};\n\n/**\n * Parses a Prefect resource ID to determine its type.\n * Resource IDs follow the format: prefect.{resource-type}.{uuid}\n *\n * @param resourceId - The full resource ID string (e.g., \"prefect.flow-run.abc-123\")\n * @returns The parsed ResourceType, or \"unknown\" if the format is unrecognized\n */\nexport function parseResourceType(resourceId: string): ResourceType {\n\tif (!resourceId || typeof resourceId !== \"string\") {\n\t\treturn \"unknown\";\n\t}\n\n\tif (resourceId.startsWith(\"prefect.flow-run.\")) {\n\t\treturn \"flow-run\";\n\t}\n\tif (resourceId.startsWith(\"prefect.task-run.\")) {\n\t\treturn \"task-run\";\n\t}\n\tif (resourceId.startsWith(\"prefect.deployment.\")) {\n\t\treturn \"deployment\";\n\t}\n\tif (resourceId.startsWith(\"prefect.flow.\")) {\n\t\treturn \"flow\";\n\t}\n\tif (resourceId.startsWith(\"prefect.work-pool.\")) {\n\t\treturn \"work-pool\";\n\t}\n\tif (resourceId.startsWith(\"prefect.work-queue.\")) {\n\t\treturn \"work-queue\";\n\t}\n\tif (resourceId.startsWith(\"prefect.automation.\")) {\n\t\treturn \"automation\";\n\t}\n\tif (resourceId.startsWith(\"prefect.block-document.\")) {\n\t\treturn \"block-document\";\n\t}\n\tif (resourceId.startsWith(\"prefect.concurrency-limit.\")) {\n\t\treturn \"concurrency-limit\";\n\t}\n\n\treturn \"unknown\";\n}\n\n/**\n * Extracts the resource identifier from a Prefect resource ID.\n * Resource IDs follow the format: prefect.{resource-type}.{uuid}\n *\n * @param prefectResourceId - The full resource ID string (e.g., \"prefect.flow-run.abc-123\")\n * @returns The extracted ID portion (e.g., \"abc-123\"), or null if the format is invalid\n */\nexport function extractResourceId(prefectResourceId: string): string | null {\n\tif (!prefectResourceId || typeof prefectResourceId !== \"string\") {\n\t\treturn null;\n\t}\n\n\tconst parts = prefectResourceId.split(\".\");\n\tif (parts.length < 3) {\n\t\treturn null;\n\t}\n\n\t// Join parts after index 1 (skip \"prefect\" and resource type)\n\treturn parts.slice(2).join(\".\");\n}\n","import type { components } from \"@/api/prefect\";\nimport { extractResourceId, parseResourceType } from \"./resource-types\";\n\ntype RelatedResource = components[\"schemas\"][\"RelatedResource\"];\n\nexport type ResourceRouteConfig = {\n\tto: string;\n\tparams: Record<string, string>;\n};\n\nfunction getResourceName(resource: RelatedResource): string | null {\n\treturn (\n\t\tresource[\"prefect.resource.name\"] ||\n\t\tresource[\"prefect.name\"] ||\n\t\tresource[\"prefect-cloud.name\"] ||\n\t\tnull\n\t);\n}\n\nfunction findWorkPoolInRelated(\n\trelatedResources: RelatedResource[],\n): RelatedResource | null {\n\tfor (const resource of relatedResources) {\n\t\tconst resourceId = resource[\"prefect.resource.id\"] || \"\";\n\t\tconst resourceType = parseResourceType(resourceId);\n\t\tif (resourceType === \"work-pool\") {\n\t\t\treturn resource;\n\t\t}\n\t}\n\treturn null;\n}\n\nexport function getResourceRoute(\n\tresource: RelatedResource,\n\trelatedResources: RelatedResource[] = [],\n): ResourceRouteConfig | null {\n\tconst resourceId = resource[\"prefect.resource.id\"] || \"\";\n\tconst resourceType = parseResourceType(resourceId);\n\tconst extractedId = extractResourceId(resourceId);\n\n\tif (!extractedId) {\n\t\treturn null;\n\t}\n\n\tswitch (resourceType) {\n\t\tcase \"flow-run\":\n\t\t\treturn {\n\t\t\t\tto: \"/runs/flow-run/$id\",\n\t\t\t\tparams: { id: extractedId },\n\t\t\t};\n\t\tcase \"task-run\":\n\t\t\treturn {\n\t\t\t\tto: \"/runs/task-run/$id\",\n\t\t\t\tparams: { id: extractedId },\n\t\t\t};\n\t\tcase \"deployment\":\n\t\t\treturn {\n\t\t\t\tto: \"/deployments/deployment/$id\",\n\t\t\t\tparams: { id: extractedId },\n\t\t\t};\n\t\tcase \"flow\":\n\t\t\treturn {\n\t\t\t\tto: \"/flows/flow/$id\",\n\t\t\t\tparams: { id: extractedId },\n\t\t\t};\n\t\tcase \"work-pool\": {\n\t\t\t// Work pools use name instead of id in the route\n\t\t\tconst workPoolName = getResourceName(resource) || extractedId;\n\t\t\treturn {\n\t\t\t\tto: \"/work-pools/work-pool/$workPoolName\",\n\t\t\t\tparams: { workPoolName },\n\t\t\t};\n\t\t}\n\t\tcase \"automation\":\n\t\t\treturn {\n\t\t\t\tto: \"/automations/automation/$id\",\n\t\t\t\tparams: { id: extractedId },\n\t\t\t};\n\t\tcase \"block-document\":\n\t\t\treturn {\n\t\t\t\tto: \"/blocks/block/$id\",\n\t\t\t\tparams: { id: extractedId },\n\t\t\t};\n\t\tcase \"concurrency-limit\":\n\t\t\treturn {\n\t\t\t\tto: \"/concurrency-limits/concurrency-limit/$id\",\n\t\t\t\tparams: { id: extractedId },\n\t\t\t};\n\t\tcase \"work-queue\": {\n\t\t\t// Work queues require both work pool name and queue name\n\t\t\t// Try to find the work pool in related resources\n\t\t\tconst workQueueName = getResourceName(resource);\n\t\t\tif (!workQueueName) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tconst workPool = findWorkPoolInRelated(relatedResources);\n\t\t\tif (!workPool) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tconst workPoolId = workPool[\"prefect.resource.id\"] || \"\";\n\t\t\tconst workPoolExtractedId = extractResourceId(workPoolId);\n\t\t\tconst workPoolName = getResourceName(workPool) || workPoolExtractedId;\n\t\t\tif (!workPoolName) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tto: \"/work-pools/work-pool/$workPoolName/queue/$workQueueName\",\n\t\t\t\tparams: { workPoolName, workQueueName },\n\t\t\t};\n\t\t}\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n","import { Link } from \"@tanstack/react-router\";\nimport type { components } from \"@/api/prefect\";\nimport { getResourceRoute } from \"./resource-routes\";\n\ntype RelatedResource = components[\"schemas\"][\"RelatedResource\"];\n\ntype EventResourceLinkProps = {\n\tresource: RelatedResource;\n\trelatedResources?: RelatedResource[];\n\tchildren: React.ReactNode;\n\tclassName?: string;\n};\n\nexport function EventResourceLink({\n\tresource,\n\trelatedResources = [],\n\tchildren,\n\tclassName,\n}: EventResourceLinkProps) {\n\tconst routeConfig = getResourceRoute(resource, relatedResources);\n\n\tif (!routeConfig) {\n\t\treturn <span className={className}>{children}</span>;\n\t}\n\n\treturn (\n\t\t<Link to={routeConfig.to} params={routeConfig.params} className={className}>\n\t\t\t{children}\n\t\t</Link>\n\t);\n}\n","import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { buildGetAutomationQuery } from \"@/api/automations\";\nimport { buildGetBlockDocumentQuery } from \"@/api/block-documents\";\nimport { buildDeploymentDetailsQuery } from \"@/api/deployments\";\nimport { buildGetFlowRunDetailsQuery } from \"@/api/flow-runs\";\nimport { buildFLowDetailsQuery } from \"@/api/flows\";\nimport { buildGetConcurrencyLimitQuery } from \"@/api/task-run-concurrency-limits\";\nimport { buildGetTaskRunDetailsQuery } from \"@/api/task-runs\";\nimport { buildGetWorkPoolQuery } from \"@/api/work-pools\";\nimport { buildGetWorkQueueQuery } from \"@/api/work-queues\";\nimport { ResourceDisplayWithIcon } from \"./event-resource-display\";\n\ntype ResourceDisplayProps = {\n\tresourceId: string;\n\tclassName?: string;\n};\n\nexport function FlowRunResourceDisplay({\n\tresourceId,\n\tclassName,\n}: ResourceDisplayProps) {\n\tconst { data: flowRun } = useSuspenseQuery(\n\t\tbuildGetFlowRunDetailsQuery(resourceId),\n\t);\n\treturn (\n\t\t<ResourceDisplayWithIcon\n\t\t\tresourceType=\"flow-run\"\n\t\t\tdisplayText={flowRun.name ?? resourceId}\n\t\t\tclassName={className}\n\t\t/>\n\t);\n}\n\nexport function TaskRunResourceDisplay({\n\tresourceId,\n\tclassName,\n}: ResourceDisplayProps) {\n\tconst { data: taskRun } = useSuspenseQuery(\n\t\tbuildGetTaskRunDetailsQuery(resourceId),\n\t);\n\treturn (\n\t\t<ResourceDisplayWithIcon\n\t\t\tresourceType=\"task-run\"\n\t\t\tdisplayText={taskRun.name ?? resourceId}\n\t\t\tclassName={className}\n\t\t/>\n\t);\n}\n\nexport function DeploymentResourceDisplay({\n\tresourceId,\n\tclassName,\n}: ResourceDisplayProps) {\n\tconst { data: deployment } = useSuspenseQuery(\n\t\tbuildDeploymentDetailsQuery(resourceId),\n\t);\n\treturn (\n\t\t<ResourceDisplayWithIcon\n\t\t\tresourceType=\"deployment\"\n\t\t\tdisplayText={deployment.name}\n\t\t\tclassName={className}\n\t\t/>\n\t);\n}\n\nexport function FlowResourceDisplay({\n\tresourceId,\n\tclassName,\n}: ResourceDisplayProps) {\n\tconst { data: flow } = useSuspenseQuery(buildFLowDetailsQuery(resourceId));\n\treturn (\n\t\t<ResourceDisplayWithIcon\n\t\t\tresourceType=\"flow\"\n\t\t\tdisplayText={flow.name}\n\t\t\tclassName={className}\n\t\t/>\n\t);\n}\n\nexport function WorkPoolResourceDisplay({\n\tresourceId,\n\tclassName,\n}: ResourceDisplayProps) {\n\tconst { data: workPool } = useSuspenseQuery(\n\t\tbuildGetWorkPoolQuery(resourceId),\n\t);\n\treturn (\n\t\t<ResourceDisplayWithIcon\n\t\t\tresourceType=\"work-pool\"\n\t\t\tdisplayText={workPool.name}\n\t\t\tclassName={className}\n\t\t/>\n\t);\n}\n\nexport function WorkQueueResourceDisplay({\n\tresourceId,\n\tclassName,\n}: ResourceDisplayProps) {\n\tconst { data: workQueue } = useSuspenseQuery(\n\t\tbuildGetWorkQueueQuery(resourceId),\n\t);\n\treturn (\n\t\t<ResourceDisplayWithIcon\n\t\t\tresourceType=\"work-queue\"\n\t\t\tdisplayText={workQueue.name}\n\t\t\tclassName={className}\n\t\t/>\n\t);\n}\n\nexport function AutomationResourceDisplay({\n\tresourceId,\n\tclassName,\n}: ResourceDisplayProps) {\n\tconst { data: automation } = useSuspenseQuery(\n\t\tbuildGetAutomationQuery(resourceId),\n\t);\n\treturn (\n\t\t<ResourceDisplayWithIcon\n\t\t\tresourceType=\"automation\"\n\t\t\tdisplayText={automation.name}\n\t\t\tclassName={className}\n\t\t/>\n\t);\n}\n\nexport function BlockDocumentResourceDisplay({\n\tresourceId,\n\tclassName,\n}: ResourceDisplayProps) {\n\tconst { data: blockDocument } = useSuspenseQuery(\n\t\tbuildGetBlockDocumentQuery(resourceId),\n\t);\n\treturn (\n\t\t<ResourceDisplayWithIcon\n\t\t\tresourceType=\"block-document\"\n\t\t\tdisplayText={blockDocument.name ?? resourceId}\n\t\t\tclassName={className}\n\t\t/>\n\t);\n}\n\nexport function ConcurrencyLimitResourceDisplay({\n\tresourceId,\n\tclassName,\n}: ResourceDisplayProps) {\n\tconst { data: concurrencyLimit } = useSuspenseQuery(\n\t\tbuildGetConcurrencyLimitQuery(resourceId),\n\t);\n\treturn (\n\t\t<ResourceDisplayWithIcon\n\t\t\tresourceType=\"concurrency-limit\"\n\t\t\tdisplayText={concurrencyLimit.tag ?? resourceId}\n\t\t\tclassName={className}\n\t\t/>\n\t);\n}\n","import {\n\tAutomationResourceDisplay,\n\tBlockDocumentResourceDisplay,\n\tConcurrencyLimitResourceDisplay,\n\tDeploymentResourceDisplay,\n\tFlowResourceDisplay,\n\tFlowRunResourceDisplay,\n\tTaskRunResourceDisplay,\n\tWorkPoolResourceDisplay,\n\tWorkQueueResourceDisplay,\n} from \"./resource-displays\";\nimport type { ResourceType } from \"./resource-types\";\n\ntype ResolvedResourceDisplayProps = {\n\tresourceType: Exclude<ResourceType, \"unknown\">;\n\tresourceId: string;\n\tclassName?: string;\n};\n\nexport function ResolvedResourceDisplay({\n\tresourceType,\n\tresourceId,\n\tclassName,\n}: ResolvedResourceDisplayProps) {\n\tswitch (resourceType) {\n\t\tcase \"flow-run\":\n\t\t\treturn (\n\t\t\t\t<FlowRunResourceDisplay resourceId={resourceId} className={className} />\n\t\t\t);\n\t\tcase \"task-run\":\n\t\t\treturn (\n\t\t\t\t<TaskRunResourceDisplay resourceId={resourceId} className={className} />\n\t\t\t);\n\t\tcase \"deployment\":\n\t\t\treturn (\n\t\t\t\t<DeploymentResourceDisplay\n\t\t\t\t\tresourceId={resourceId}\n\t\t\t\t\tclassName={className}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"flow\":\n\t\t\treturn (\n\t\t\t\t<FlowResourceDisplay resourceId={resourceId} className={className} />\n\t\t\t);\n\t\tcase \"work-pool\":\n\t\t\treturn (\n\t\t\t\t<WorkPoolResourceDisplay\n\t\t\t\t\tresourceId={resourceId}\n\t\t\t\t\tclassName={className}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"work-queue\":\n\t\t\treturn (\n\t\t\t\t<WorkQueueResourceDisplay\n\t\t\t\t\tresourceId={resourceId}\n\t\t\t\t\tclassName={className}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"automation\":\n\t\t\treturn (\n\t\t\t\t<AutomationResourceDisplay\n\t\t\t\t\tresourceId={resourceId}\n\t\t\t\t\tclassName={className}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"block-document\":\n\t\t\treturn (\n\t\t\t\t<BlockDocumentResourceDisplay\n\t\t\t\t\tresourceId={resourceId}\n\t\t\t\t\tclassName={className}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"concurrency-limit\":\n\t\t\treturn (\n\t\t\t\t<ConcurrencyLimitResourceDisplay\n\t\t\t\t\tresourceId={resourceId}\n\t\t\t\t\tclassName={className}\n\t\t\t\t/>\n\t\t\t);\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n","import { Suspense } from \"react\";\nimport type { Event } from \"@/api/events\";\nimport { Icon } from \"@/components/ui/icons\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\nimport { cn } from \"@/utils\";\nimport { EventResourceLink } from \"./event-resource-link\";\nimport { ResolvedResourceDisplay } from \"./resolved-resource-display\";\nimport {\n\textractResourceId,\n\tparseResourceType,\n\tRESOURCE_ICONS,\n\tRESOURCE_TYPE_LABELS,\n\ttype ResourceType,\n} from \"./resource-types\";\n\nexport type EventResourceDisplayProps = {\n\tevent: Event;\n\tclassName?: string;\n};\n\nfunction getResourceName(resource: Record<string, string>): string | null {\n\treturn (\n\t\tresource[\"prefect.resource.name\"] ||\n\t\tresource[\"prefect.name\"] ||\n\t\tresource[\"prefect-cloud.name\"] ||\n\t\tnull\n\t);\n}\n\nfunction getResourceId(resource: Record<string, string>): string {\n\treturn resource[\"prefect.resource.id\"] || \"\";\n}\n\ntype ResourceDisplayWithIconProps = {\n\tresourceType: ResourceType;\n\tdisplayText: string;\n\tclassName?: string;\n};\n\nexport function ResourceDisplayWithIcon({\n\tresourceType,\n\tdisplayText,\n\tclassName,\n}: ResourceDisplayWithIconProps) {\n\tconst iconId = RESOURCE_ICONS[resourceType];\n\tconst typeLabel = RESOURCE_TYPE_LABELS[resourceType];\n\n\treturn (\n\t\t<div className={cn(\"flex items-center gap-2\", className)}>\n\t\t\t{typeLabel && <span>{typeLabel}</span>}\n\t\t\t<Icon id={iconId} className=\"h-4 w-4 text-muted-foreground\" />\n\t\t\t<span>{displayText}</span>\n\t\t</div>\n\t);\n}\n\nexport function ResourceDisplaySkeleton() {\n\treturn (\n\t\t<div className=\"flex items-center gap-2\">\n\t\t\t<Skeleton className=\"h-4 w-4 rounded-full\" />\n\t\t\t<Skeleton className=\"h-4 w-24\" />\n\t\t</div>\n\t);\n}\n\nexport function EventResourceDisplay({\n\tevent,\n\tclassName,\n}: EventResourceDisplayProps) {\n\tconst resourceName = getResourceName(event.resource);\n\tconst prefectResourceId = getResourceId(event.resource);\n\tconst resourceType = parseResourceType(prefectResourceId);\n\tconst extractedId = extractResourceId(prefectResourceId);\n\n\t// If we have a resource name, display it with the appropriate icon\n\tif (resourceName) {\n\t\treturn (\n\t\t\t<div className={cn(\"flex flex-col gap-0.5\", className)}>\n\t\t\t\t<span className=\"text-sm font-medium\">Resource</span>\n\t\t\t\t<Suspense fallback={<ResourceDisplaySkeleton />}>\n\t\t\t\t\t<EventResourceLink\n\t\t\t\t\t\tresource={event.resource}\n\t\t\t\t\t\trelatedResources={event.related ?? []}\n\t\t\t\t\t\tclassName=\"hover:underline\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ResourceDisplayWithIcon\n\t\t\t\t\t\t\tresourceType={resourceType}\n\t\t\t\t\t\t\tdisplayText={resourceName}\n\t\t\t\t\t\t\tclassName=\"text-sm\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</EventResourceLink>\n\t\t\t\t</Suspense>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// If we have an extracted ID but no name, try to fetch the resource name via API\n\tif (extractedId && resourceType !== \"unknown\") {\n\t\treturn (\n\t\t\t<div className={cn(\"flex flex-col gap-0.5\", className)}>\n\t\t\t\t<span className=\"text-sm font-medium\">Resource</span>\n\t\t\t\t<Suspense fallback={<ResourceDisplaySkeleton />}>\n\t\t\t\t\t<EventResourceLink\n\t\t\t\t\t\tresource={event.resource}\n\t\t\t\t\t\trelatedResources={event.related ?? []}\n\t\t\t\t\t\tclassName=\"hover:underline\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ResolvedResourceDisplay\n\t\t\t\t\t\t\tresourceType={resourceType}\n\t\t\t\t\t\t\tresourceId={extractedId}\n\t\t\t\t\t\t\tclassName=\"text-sm\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</EventResourceLink>\n\t\t\t\t</Suspense>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// If we have an extracted ID but unknown type, show the ID with the icon\n\tif (extractedId) {\n\t\treturn (\n\t\t\t<div className={cn(\"flex flex-col gap-0.5\", className)}>\n\t\t\t\t<span className=\"text-sm font-medium\">Resource</span>\n\t\t\t\t<Suspense fallback={<ResourceDisplaySkeleton />}>\n\t\t\t\t\t<EventResourceLink\n\t\t\t\t\t\tresource={event.resource}\n\t\t\t\t\t\trelatedResources={event.related ?? []}\n\t\t\t\t\t\tclassName=\"hover:underline\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ResourceDisplayWithIcon\n\t\t\t\t\t\t\tresourceType={resourceType}\n\t\t\t\t\t\t\tdisplayText={extractedId}\n\t\t\t\t\t\t\tclassName=\"text-sm text-muted-foreground font-mono\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</EventResourceLink>\n\t\t\t\t</Suspense>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Fallback: show the raw resource ID if nothing else is available\n\tif (prefectResourceId) {\n\t\treturn (\n\t\t\t<div className={cn(\"flex flex-col gap-0.5\", className)}>\n\t\t\t\t<span className=\"text-sm font-medium\">Resource</span>\n\t\t\t\t<EventResourceLink\n\t\t\t\t\tresource={event.resource}\n\t\t\t\t\trelatedResources={event.related ?? []}\n\t\t\t\t\tclassName=\"hover:underline\"\n\t\t\t\t>\n\t\t\t\t\t<div className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t<span className=\"font-mono text-xs\">{prefectResourceId}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</EventResourceLink>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// No resource information available\n\treturn (\n\t\t<div className={cn(\"flex flex-col gap-0.5\", className)}>\n\t\t\t<span className=\"text-sm font-medium\">Resource</span>\n\t\t\t<div className=\"text-sm text-muted-foreground\">\n\t\t\t\t<span className=\"text-muted-foreground\">Unknown</span>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"names":["RESOURCE_ICONS","RESOURCE_TYPE_LABELS","parseResourceType","resourceId","extractResourceId","prefectResourceId","parts","getResourceName","resource","findWorkPoolInRelated","relatedResources","getResourceRoute","resourceType","extractedId","workQueueName","workPool","workPoolId","workPoolExtractedId","workPoolName","EventResourceLink","children","className","routeConfig","jsx","Link","FlowRunResourceDisplay","flowRun","useSuspenseQuery","buildGetFlowRunDetailsQuery","ResourceDisplayWithIcon","TaskRunResourceDisplay","taskRun","buildGetTaskRunDetailsQuery","DeploymentResourceDisplay","deployment","buildDeploymentDetailsQuery","FlowResourceDisplay","flow","buildFLowDetailsQuery","WorkPoolResourceDisplay","buildGetWorkPoolQuery","WorkQueueResourceDisplay","workQueue","buildGetWorkQueueQuery","AutomationResourceDisplay","automation","buildGetAutomationQuery","BlockDocumentResourceDisplay","blockDocument","buildGetBlockDocumentQuery","ConcurrencyLimitResourceDisplay","concurrencyLimit","buildGetConcurrencyLimitQuery","ResolvedResourceDisplay","getResourceId","displayText","iconId","typeLabel","cn","Icon","ResourceDisplaySkeleton","jsxs","Skeleton","EventResourceDisplay","event","resourceName","Suspense"],"mappings":"uMAcO,MAAMA,EAA+C,CAC3D,WAAY,OACZ,WAAY,MACZ,WAAY,SACZ,KAAM,WACN,YAAa,SACb,aAAc,cACd,WAAY,MACZ,iBAAkB,MAClB,oBAAqB,QACrB,QAAS,QACV,EAEaC,EAAqD,CACjE,WAAY,WACZ,WAAY,WACZ,KAAM,OACN,WAAY,aACZ,YAAa,YACb,aAAc,aACd,WAAY,aACZ,iBAAkB,iBAClB,oBAAqB,oBACrB,QAAS,UACV,EASO,SAASC,EAAkBC,EAAkC,CACnE,MAAI,CAACA,GAAc,OAAOA,GAAe,SACjC,UAGJA,EAAW,WAAW,mBAAmB,EACrC,WAEJA,EAAW,WAAW,mBAAmB,EACrC,WAEJA,EAAW,WAAW,qBAAqB,EACvC,aAEJA,EAAW,WAAW,eAAe,EACjC,OAEJA,EAAW,WAAW,oBAAoB,EACtC,YAEJA,EAAW,WAAW,qBAAqB,EACvC,aAEJA,EAAW,WAAW,qBAAqB,EACvC,aAEJA,EAAW,WAAW,yBAAyB,EAC3C,iBAEJA,EAAW,WAAW,4BAA4B,EAC9C,oBAGD,SACR,CASO,SAASC,EAAkBC,EAA0C,CAC3E,GAAI,CAACA,GAAqB,OAAOA,GAAsB,SACtD,OAAO,KAGR,MAAMC,EAAQD,EAAkB,MAAM,GAAG,EACzC,OAAIC,EAAM,OAAS,EACX,KAIDA,EAAM,MAAM,CAAC,EAAE,KAAK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AAyBrC,CAAS,EACpD,SAAA,CAAAE,EAAAA,IAAC,OAAA,CAAK,UAAU,sBAAsB,SAAA,WAAQ,EAC9CA,EAAAA,IAAC,OAAI,UAAU,gCACd,eAAC,OAAA,CAAK,UAAU,wBAAwB,SAAA,SAAA,CAAO,CAAA,CAChD,CAAA,EACD,CAEF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{j as e,L as D,s as y}from"./vendor-tanstack-BcZfOOfy.js";import{q as E,I as o,y as R,H as C,B as w,g as T,h as x,bw as I,bF as L,bH as B,aA as M,aB as S,aC as p,aD as h,bK as F,C as O,o as V,dF as i}from"./index-B8vo2Lrg.js";import"./automation-schema-BIBsyp0j.js";import"./form-mws4law8.js";import"./radio-group-BUsmwdrt.js";import{f as k}from"./event-to-trigger-BEzU9b5I.js";import{D as z,a as A,b as P,d as j}from"./dropdown-menu-D7Gwbd15.js";import{f as H,J}from"./utilities-D9Y2wo66.js";import{E as _,p as Q,a as U,b as q,R as G}from"./event-resource-display-CDRgVKd4.js";import{f as K}from"./vendor-date-wwuDAncJ.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-BTiKGWfR.js";import"./vendor-recharts-BvvJP9Po.js";import"./vendor-forms-ClCIacbh.js";function Y({event:s}){const t=()=>{navigator.clipboard.writeText(s.id),R.success("ID copied")};return e.jsxs(z,{children:[e.jsx(A,{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(P,{align:"end",children:[e.jsx(D,{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 Z(s){return s["prefect.resource.name"]||s["prefect.name"]||s["prefect-cloud.name"]||null}function W({event:s}){const t=K(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(_,{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=Z(a),u=Q(r),b=G[u],m=q[u],N=l||r.split(".").pop()||r;return e.jsxs(U,{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=H(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(J,{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}=y(F(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(Y,{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 je(){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{je as component};
|
|
2
|
+
//# sourceMappingURL=event._eventDate._eventId-C73GMDkK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event._eventDate._eventId-D7Twzb22.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":"0wBAiBO,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,CAE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AAA,EAAYgB,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-C73GMDkK.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":"qwBAiBO,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,SAAA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OM,IACnB,YAAaD,CAAAA,CAAgB,CAGhC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as c,j as e,s as G,t as _,L as O,u as ge}from"./vendor-tanstack-BcZfOOfy.js";import{A as be,u as v,l as se,h as te,f as Ne,p as we,m as ke,g as Ee,y as Se,_ as ae,d as Ce,a as re,U as ne,i as _e,v as Re,x as De,b as Ae,c as Te,e as J,j as Le,k as ze,n as Fe,o as Ie}from"./vendor-graphs-_sWgqfe-.js";import{cs as ie,bR as P,bS as $,q as x,I as p,bT as H,al as g,i as C,G as F,cR as A,cS as Ge,cT as T,dV as Oe,dW as Pe,dX as $e,dY as He,dy as Me,bM as E,b5 as y,bv as Qe,dZ as M,bG as le,d_ as Ue,d$ as Xe,aq as Q,co as ce,X as oe,an as qe,z as Ke,aD as Be,aC as Ve}from"./index-m48E4KcG.js";import{g as Y}from"./state-colors-CAAf0Eg3.js";import{p as j,a as We,f as Je}from"./vendor-date-wwuDAncJ.js";import{K as d}from"./key-value-DkSKn6jE.js";import{p as I,e as de,a as R,c as ue,d as D,f as me}from"./event-resource-display-DHiAb1Up.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-BTiKGWfR.js";import"./vendor-recharts-BAN776s_.js";import"./vendor-forms-ClCIacbh.js";async function Ye(s){const{data:t}=await(await ie()).GET("/flow_runs/{id}/graph-v2",{params:{path:{id:s}}});if(!t)throw new Error("No data returned from API");return es(t)}async function Ze({since:s,until:t,nodeId:a}){const{data:r}=await(await ie()).POST("/events/filter",{body:{filter:{any_resource:{id:[`prefect.flow-run.${a}`]},event:{exclude_prefix:["prefect.log.write","prefect.task-run."]},occurred:{since:s.toISOString(),until:t.toISOString()},order:"ASC"},limit:50}});if(!r)throw new Error("No data returned from API");return ss(r)}function es(s){if(!s.start_time)throw new Error("Start time is required");return{root_node_ids:s.root_node_ids,start_time:j(s.start_time),end_time:s.end_time?j(s.end_time):null,nodes:new Map(s.nodes.map(t=>ts(t))),states:s.states?.map(as)??[]}}function ss(s){return s.events.map(t=>{if(!t.received)throw new Error("Received is required");return{id:t.id,received:j(t.received),occurred:j(t.occurred),event:t.event,resource:t.resource,payload:t.payload,related:t.related??[]}})}function ts([s,t]){if(!t.start_time)throw new Error("Start time is required");return[s,{kind:t.kind,id:t.id,label:t.label,state_type:t.state_type,start_time:j(t.start_time),end_time:t.end_time?j(t.end_time):null,parents:t.parents,children:t.children,artifacts:t.artifacts.map(rs)}]}function as(s){return{id:s.id,timestamp:j(s.timestamp),type:s.type,name:s.name}}function rs(s){if(!s.type)throw new Error("Artifact type is required");return s.type==="progress"&&typeof s.data=="number"?{id:s.id,created:j(s.created),key:s.key??void 0,type:s.type,data:s.data}:{id:s.id,created:j(s.created),key:s.key??void 0,type:s.type}}const Z={COMPLETED:600,RUNNING:700,SCHEDULED:700,PENDING:800,FAILED:700,CANCELLED:600,CANCELLING:600,CRASHED:600,PAUSED:800};function xe(s){return!s||!(s instanceof HTMLElement)?!1:["INPUT","TEXTAREA","SELECT"].includes(s.tagName)}const ee=()=>{be({animate:!0})};function ns(){return c.useEffect(()=>{const s=new AbortController;return document.addEventListener("keydown",t=>{xe(t.target)||t.metaKey||t.ctrlKey||t.key==="c"&&ee()},{signal:s.signal}),()=>s.abort()},[]),e.jsxs(P,{children:[e.jsx($,{asChild:!0,children:e.jsx(x,{variant:"ghost",size:"icon",onClick:ee,children:e.jsx(p,{id:"Crosshair",className:"size-4"})})}),e.jsx(H,{children:"Recenter (c)"})]})}function is({fullscreen:s,onFullscreenChange:t}){const a=c.useCallback(()=>{t(!s)},[s,t]);return c.useEffect(()=>{const r=new AbortController;return document.addEventListener("keydown",n=>{if(!(xe(n.target)||n.metaKey||n.ctrlKey)){if(n.key==="f"){a();return}if(n.key==="Escape"){a();return}}},{signal:r.signal}),()=>r.abort()},[a]),e.jsxs(P,{children:[e.jsx($,{asChild:!0,children:e.jsx(x,{variant:"ghost",size:"icon",onClick:a,children:e.jsx(p,{id:"Expand",className:"size-4"})})}),e.jsx(H,{children:"Fullscreen (f)"})]})}const ls=[{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"}],cs=()=>{const s=re+1,t=v.horizontalScaleMultiplier*s;ae(t)},os=()=>{const s=Math.abs(re-1),t=v.horizontalScaleMultiplier*s;ae(t)},ds=()=>{Ce()};function us(s){const[t,a]=s.split("_");return se(t)&&te(a)}function ms(){const[s,t]=c.useState(`${v.horizontal}_${v.vertical}`),[a,r]=c.useState(v.disableEdges),[n,l]=c.useState(v.disableArtifacts),[u,i]=c.useState(v.disableEvents),b=c.useCallback(o=>{if(!us(o))return;const[w,f]=o.split("_");!se(w)||!te(f)||(t(o),Ne(w),we(f))},[]),N=c.useCallback(o=>{r(o),ke(o)},[]),k=c.useCallback(o=>{l(o),Ee(o)},[]),L=c.useCallback(o=>{i(o),Se(o)},[]);return e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(g,{variant:"bodyLarge",children:"Layout"}),e.jsx("div",{className:"flex flex-col gap-2",children:ls.map(o=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"radio",id:o.value,name:"layout",value:o.value,checked:s===o.value,onChange:w=>b(w.target.value)}),e.jsx(C,{htmlFor:o.value,children:o.label})]},o.value))})]}),(v.isTemporal()||v.isLeftAligned())&&e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(g,{variant:"bodyLarge",children:"Scaling"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(x,{variant:"outline",size:"sm",onClick:os,title:"Decrease scale (-)",children:"-"}),e.jsx(x,{variant:"outline",size:"sm",onClick:cs,title:"Increase scale (+)",children:"+"}),e.jsx(x,{variant:"outline",size:"sm",onClick:ds,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(F,{id:"hideEdges",checked:a,onCheckedChange:N}),e.jsx(C,{htmlFor:"hideEdges",children:"Hide dependency arrows"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(F,{id:"hideArtifacts",checked:n,onCheckedChange:k}),e.jsx(C,{htmlFor:"hideArtifacts",children:"Hide artifacts"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(F,{id:"hideEvents",checked:u,onCheckedChange:L}),e.jsx(C,{htmlFor:"hideEvents",children:"Hide events"})]})]})]})}function xs(){return e.jsxs(A,{children:[e.jsx(Ge,{children:e.jsxs(P,{children:[e.jsx($,{asChild:!0,children:e.jsx(x,{variant:"ghost",size:"icon",children:e.jsx(p,{id:"Cog",className:"size-4"})})}),e.jsx(H,{children:"Settings"})]})}),e.jsx(T,{children:e.jsx(ms,{})})]})}function ps({fullscreen:s,onFullscreenChange:t}){return e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ns,{}),e.jsx(is,{fullscreen:s,onFullscreenChange:t}),e.jsx(xs,{})]})}function hs({artifactId:s,onClose:t}){return e.jsx(Oe,{open:s!==null,onOpenChange:a=>!a&&t(),children:e.jsxs(Pe,{children:[e.jsx($e,{children:e.jsx(He,{children:"Artifact Details"})}),s&&e.jsx(c.Suspense,{fallback:e.jsx(fs,{}),children:e.jsx(js,{artifactId:s})})]})})}function fs(){return e.jsxs("div",{className:"space-y-4 p-4",children:[e.jsx(y,{className:"h-6 w-32"}),e.jsx(y,{className:"h-4 w-24"}),e.jsx(y,{className:"h-4 w-48"}),e.jsx(y,{className:"h-32 w-full"})]})}function js({artifactId:s}){const{data:t}=G(Me(s));return e.jsxs("div",{className:"space-y-4 p-4",children:[e.jsx(d,{label:"Key",value:e.jsx(g,{variant:"bodySmall",className:"font-medium",children:t.key??"Unnamed"})}),t.type&&e.jsx(d,{label:"Type",value:e.jsx(g,{variant:"bodySmall",className:"uppercase",children:t.type})}),t.description&&e.jsx(d,{label:"Description",value:e.jsx(g,{variant:"bodySmall",children:t.description})}),t.created&&e.jsx(d,{label:"Created",value:e.jsx(E,{date:t.created})}),t.data!==void 0&&t.data!==null&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(g,{variant:"bodySmall",className:"text-muted-foreground",children:"Data"}),e.jsx("pre",{className:"bg-muted p-3 rounded-md text-sm overflow-auto max-h-64",children:typeof t.data=="string"?t.data:JSON.stringify(t.data,null,2)})]})]})}function vs({selection:s,onClose:t,onViewArtifact:a}){const{data:r,isLoading:n}=_(Qe({artifacts:{operator:"and_",id:{any_:s.ids}},sort:"CREATED_DESC",offset:0})),l=s.position;if(!l)return null;const u={position:"absolute",left:`${l.x+l.width/2}px`,top:`${l.y+l.height}px`};return e.jsxs(A,{open:!0,onOpenChange:i=>!i&&t(),children:[e.jsx(M,{style:u}),e.jsxs(T,{align:"center",side:"bottom",className:"w-72",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx(g,{variant:"bodySmall",className:"font-semibold",children:"Artifacts"}),e.jsx(x,{variant:"ghost",size:"icon",onClick:t,"aria-label":"Close popover",children:e.jsx(p,{id:"X",className:"size-4"})})]}),n?e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(p,{id:"Loader2",className:"size-4 animate-spin"})}):e.jsx("div",{className:"space-y-2 max-h-64 overflow-y-auto",children:r?.filter(i=>i.id!==void 0).map(i=>e.jsxs("div",{className:"flex items-center justify-between gap-2 p-2 rounded-md border bg-muted/50",children:[e.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[e.jsx(g,{variant:"bodySmall",className:"font-medium truncate",children:i.key??"Unnamed"}),i.type&&e.jsx(g,{variant:"xsmall",className:"text-muted-foreground uppercase",children:i.type})]}),e.jsx(x,{variant:"outline",size:"sm",onClick:()=>a(i.id),children:"View"})]},i.id))})]})]})}function ys(s){let t=s;return t.startsWith("prefect.")?t=t.slice(8):t.startsWith("prefect-cloud.")&&(t=t.slice(14)),t=t.replace(/[._-]/g," "),t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function gs(s){let t;return typeof s=="string"?t=j(s):t=s,We(t)?Je(t,"yyyy/MM/dd hh:mm:ss a"):"Invalid date"}function pe(s){return s["prefect.resource.name"]||s["prefect.name"]||s["prefect-cloud.name"]||null}function bs({event:s}){const t=pe(s.resource),a=s.resource["prefect.resource.id"]||"",r=I(a),n=de(a),l=s.related??[];return t?e.jsx(c.Suspense,{fallback:e.jsx(D,{}),children:e.jsx(R,{resource:s.resource,relatedResources:l,className:"hover:underline text-primary",children:e.jsx(ue,{resourceType:r,displayText:t,className:"text-sm"})})}):n&&r!=="unknown"?e.jsx(c.Suspense,{fallback:e.jsx(D,{}),children:e.jsx(R,{resource:s.resource,relatedResources:l,className:"hover:underline text-primary",children:e.jsx(me,{resourceType:r,resourceId:n,className:"text-sm"})})}):e.jsx("span",{className:"text-sm text-muted-foreground font-mono",children:a||"Unknown"})}function Ns({relatedResources:s}){const t=s.filter(a=>{const r=a["prefect.resource.role"],n=a["prefect.resource.id"]||"";return r==="tag"||n.startsWith("prefect.tag.")?!1:I(n)!=="unknown"});return t.length===0?null:e.jsx(d,{label:"Related Resources",value:e.jsx("div",{className:"flex flex-col gap-1",children:t.map(a=>{const r=pe(a),n=a["prefect.resource.id"]||"",l=I(n),u=de(n);return r?e.jsx(c.Suspense,{fallback:e.jsx(D,{}),children:e.jsx(R,{resource:a,relatedResources:s,className:"hover:underline text-primary",children:e.jsx(ue,{resourceType:l,displayText:r,className:"text-sm"})})},n):u&&l!=="unknown"?e.jsx(c.Suspense,{fallback:e.jsx(D,{}),children:e.jsx(R,{resource:a,relatedResources:s,className:"hover:underline text-primary",children:e.jsx(me,{resourceType:l,resourceId:u,className:"text-sm"})})},n):e.jsx("span",{className:"text-sm text-muted-foreground font-mono",children:n},n)})})})}function ws({selection:s,onClose:t}){const{data:a,isLoading:r}=_(le(s.id,s.occurred)),n=s.position;if(!n)return null;const l={position:"absolute",left:`${n.x+n.width/2}px`,top:`${n.y+n.height}px`},u=a?.event??"",i=u?ys(u):"Loading...",b=a?.related??[];return e.jsxs(A,{open:!0,onOpenChange:N=>!N&&t(),children:[e.jsx(M,{style:l}),e.jsxs(T,{align:"center",side:"bottom",className:"w-80",children:[e.jsxs("div",{className:"flex justify-between items-start mb-3",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Event"}),e.jsx(x,{variant:"ghost",size:"icon",onClick:t,"aria-label":"Close popover",className:"-mt-1 -mr-2",children:e.jsx(p,{id:"X",className:"size-4"})})]}),r?e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(p,{id:"Loader2",className:"size-4 animate-spin"})}):e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx(O,{to:"/events",search:{event:[u]},className:"text-sm text-primary hover:underline font-medium",children:i}),e.jsx("span",{className:"text-xs text-muted-foreground",children:u})]}),e.jsx(d,{label:"Occurred",value:e.jsx("span",{className:"text-sm",children:gs(s.occurred)})}),a&&e.jsx(d,{label:"Resource",value:e.jsx(bs,{event:a})}),b.length>0&&e.jsx(Ns,{relatedResources:b})]})]})]})}function ks({selection:s,onClose:t}){const a=ge({queries:s.ids.map(i=>le(i,s.occurred??new Date))}),r=s.position;if(!r)return null;const n={position:"absolute",left:`${r.x+r.width/2}px`,top:`${r.y+r.height}px`},l=a.some(i=>i.isLoading),u=a.map(i=>i.data).filter(i=>i!==void 0);return e.jsxs(A,{open:!0,onOpenChange:i=>!i&&t(),children:[e.jsx(M,{style:n}),e.jsxs(T,{align:"center",side:"bottom",className:"w-80",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("span",{className:"text-sm font-medium",children:[s.ids.length," Events"]}),e.jsx(x,{variant:"ghost",size:"icon",onClick:t,"aria-label":"Close popover",children:e.jsx(p,{id:"X",className:"size-4"})})]}),l?e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(p,{id:"Loader2",className:"size-4 animate-spin"})}):e.jsx(Ue,{className:"max-h-64",children:e.jsx("div",{className:"space-y-3",children:u.map(i=>e.jsxs("div",{className:"border-b pb-2 last:border-b-0 last:pb-0",children:[e.jsx("div",{className:"text-sm font-mono truncate",title:i.event,children:i.event}),e.jsx("div",{className:"text-xs text-muted-foreground",children:e.jsx(E,{date:new Date(i.occurred)})})]},i.id))})})]})]})}function Es({selection:s,onClose:t}){return ne(s)?e.jsx("div",{className:"absolute top-4 right-4 z-10 w-72 rounded-lg border bg-card p-4 shadow-md",children:e.jsxs(c.Suspense,{fallback:e.jsx(Ss,{onClose:t}),children:[s.kind==="task-run"&&e.jsx(Cs,{taskRunId:s.id,onClose:t}),s.kind==="flow-run"&&e.jsx(_s,{flowRunId:s.id,onClose:t})]})}):null}function Ss({onClose:s}){return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx(y,{className:"h-6 w-3/4"}),e.jsx(x,{variant:"ghost",size:"icon",onClick:s,"aria-label":"Close panel",className:"shrink-0 -mt-1 -mr-2",children:e.jsx(p,{id:"X",className:"size-4"})})]}),e.jsx(y,{className:"h-5 w-1/2"}),e.jsx(y,{className:"h-5 w-full"}),e.jsx(y,{className:"h-5 w-2/3"}),e.jsx(y,{className:"h-5 w-1/2"})]})}function Cs({taskRunId:s,onClose:t}){const{data:a}=G(Xe(s)),r=a.estimated_run_time&&a.estimated_run_time>0?a.estimated_run_time:a.total_run_time??0;return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("h3",{className:"font-semibold text-base",children:e.jsx(O,{to:"/runs/task-run/$id",params:{id:s},className:"hover:underline text-foreground",children:a.name})}),e.jsx(x,{variant:"ghost",size:"icon",onClick:t,"aria-label":"Close panel",className:"shrink-0 -mt-1 -mr-2",children:e.jsx(p,{id:"X",className:"size-4"})})]}),e.jsxs("div",{className:"space-y-3",children:[a.state&&e.jsx(d,{label:"State",value:e.jsx(Q,{type:a.state.type,name:a.state.name})}),e.jsx(d,{label:"Task Run ID",value:a.id,copyable:!0}),e.jsx(d,{label:"Duration",value:r>0?ce(r):"-"}),e.jsx(d,{label:"Created",value:e.jsx(E,{date:a.created})}),a.tags&&a.tags.length>0&&e.jsx(d,{label:"Tags",value:e.jsx(oe,{tags:a.tags})})]})]})}function _s({flowRunId:s,onClose:t}){const{data:a}=G(qe(s)),r=a.total_run_time??0;return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("h3",{className:"font-semibold text-base",children:e.jsx(O,{to:"/runs/flow-run/$id",params:{id:s},className:"hover:underline text-foreground",children:a.name})}),e.jsx(x,{variant:"ghost",size:"icon",onClick:t,"aria-label":"Close panel",className:"shrink-0 -mt-1 -mr-2",children:e.jsx(p,{id:"X",className:"size-4"})})]}),e.jsxs("div",{className:"space-y-3",children:[a.state&&e.jsx(d,{label:"State",value:e.jsx(Q,{type:a.state.type,name:a.state.name})}),e.jsx(d,{label:"Flow Run ID",value:a.id,copyable:!0}),e.jsx(d,{label:"Duration",value:r>0?ce(r):"-"}),e.jsx(d,{label:"Created",value:e.jsx(E,{date:a.created})}),a.tags&&a.tags.length>0&&e.jsx(d,{label:"Tags",value:e.jsx(oe,{tags:a.tags})})]})]})}function Rs({selection:s,onClose:t}){const a=c.useRef(null);c.useEffect(()=>{const l=i=>{a.current&&!a.current.contains(i.target)&&t()},u=i=>{i.key==="Escape"&&t()};return document.addEventListener("mousedown",l),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("keydown",u)}},[t]);const r=s.position;if(!r)return null;const n={position:"absolute",left:`${r.x+r.width/2}px`,top:`${r.y+r.height}px`,transform:"translateX(-50%)"};return e.jsxs("div",{ref:a,className:"z-50 w-64 rounded-lg border bg-card p-4 shadow-md",style:n,children:[e.jsx("div",{className:"flex justify-end absolute top-2 right-2",children:e.jsx(x,{variant:"ghost",size:"icon",onClick:t,"aria-label":"Close popover",children:e.jsx(p,{id:"X",className:"size-4"})})}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(d,{label:"State",value:e.jsx(Q,{type:s.type,name:s.name})}),e.jsx(d,{label:"Occurred",value:e.jsx(E,{date:s.timestamp,format:"timestamp"})})]})]})}const Ds=["COMPLETED","FAILED","CANCELLED","CRASHED"];function Ms({flowRunId:s,stateType:t,viewport:a,onViewportChange:r,selected:n,onSelectedChange:l,className:u,style:i,fullscreen:b,onFullscreenChange:N}){const k=c.useRef(null),[L,o]=c.useState(!1),[w,f]=c.useState(void 0),[he,U]=c.useState(null),{resolvedTheme:X}=Ke(),q=b??L,m=n??w,fe=t&&Ds.includes(t),{data:K}=_(Be({task_runs:{operator:"and_",flow_run_id:{operator:"and_",any_:[s],is_null_:!1}}})),{data:B}=_(Ve({flow_runs:{operator:"and_",parent_flow_run_id:{operator:"and_",any_:[s]}}})),V=K===void 0||B===void 0||K>0||B>0,je=c.useCallback(h=>{o(h),N?.(h)},[N]),S=c.useMemo(()=>({runId:s,fetch:Ye,fetchEvents:Ze,styles:()=>({node:h=>({background:Y(h.state_type,Z[h.state_type])}),state:h=>({background:Y(h.type,Z[h.type])})}),theme:X==="dark"?"dark":"light"}),[s,X]);c.useEffect(()=>{_e(S)},[S]),c.useEffect(()=>{if(!k.current)throw new Error("Stage does not exist");return Re({stage:k.current,config:S}),()=>{De()}},[S]),c.useEffect(()=>{Ae(m??null)},[m]),c.useEffect(()=>{Te(a)},[a]),c.useEffect(()=>{const h=J.on("itemSelected",z=>{const W=z??void 0;f(W),l?.(W)}),ye=J.on("viewportDateRangeUpdated",z=>r?.(z));return()=>{h(),ye()}},[l,r]);const ve=q?"fixed inset-0 z-50 bg-background":V?"relative h-96 w-full":"relative h-40 w-full";return e.jsxs("div",{className:`${ve} ${u??""}`,style:i,children:[e.jsx("div",{ref:k,className:"size-full [&>canvas]:size-full"}),!V&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/50",children:e.jsx("p",{className:"text-muted-foreground",children:fe?"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-2 right-2",children:e.jsx(ps,{fullscreen:q,onFullscreenChange:je})}),m&&ne(m)&&e.jsx(Es,{selection:m,onClose:()=>{f(void 0),l?.(void 0)}}),m&&Le(m)&&e.jsx(Rs,{selection:m,onClose:()=>{f(void 0),l?.(void 0)}}),m&&ze(m)&&e.jsx(ws,{selection:m,onClose:()=>{f(void 0),l?.(void 0)}}),m&&Fe(m)&&e.jsx(ks,{selection:m,onClose:()=>{f(void 0),l?.(void 0)}}),m&&Ie(m)&&e.jsx(vs,{selection:m,onClose:()=>{f(void 0),l?.(void 0)},onViewArtifact:h=>{U(h),f(void 0),l?.(void 0)}}),e.jsx(hs,{artifactId:he,onClose:()=>U(null)})]})}export{Ms as FlowRunGraph};
|
|
2
|
-
//# sourceMappingURL=flow-run-graph-
|
|
1
|
+
import{r as c,j as e,s as G,t as _,L as P,u as ge}from"./vendor-tanstack-BcZfOOfy.js";import{A as be,u as v,l as se,h as te,f as Ne,p as we,m as ke,g as Ee,y as Se,_ as ae,d as Ce,a as re,U as ne,i as _e,v as Re,x as De,b as Ae,c as Te,e as J,j as Le,k as ze,n as Fe,o as Ie}from"./vendor-graphs-_sWgqfe-.js";import{cv as ie,bU as O,bV as $,q as x,I as p,bW as H,ap as g,i as C,G as F,cU as A,cV as Ge,cW as T,dY as Pe,dZ as Oe,d_ as $e,d$ as He,dB as Ue,bP as E,b9 as y,bz as Qe,e0 as U,bK as le,e1 as Me,e2 as Xe,au as Q,cr as ce,$ as oe,ar as qe,z as Ke,aH as Be,aG as Ve}from"./index-B8vo2Lrg.js";import{g as Y}from"./state-colors-CAAf0Eg3.js";import{p as j,a as We,f as Je}from"./vendor-date-wwuDAncJ.js";import{K as d}from"./key-value-XHEZOtZX.js";import{p as I,e as de,a as R,c as ue,d as D,f as me}from"./event-resource-display-CDRgVKd4.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-BTiKGWfR.js";import"./vendor-recharts-BvvJP9Po.js";import"./vendor-forms-ClCIacbh.js";async function Ye(s){const{data:t}=await(await ie()).GET("/flow_runs/{id}/graph-v2",{params:{path:{id:s}}});if(!t)throw new Error("No data returned from API");return es(t)}async function Ze({since:s,until:t,nodeId:a}){const{data:r}=await(await ie()).POST("/events/filter",{body:{filter:{any_resource:{id:[`prefect.flow-run.${a}`]},event:{exclude_prefix:["prefect.log.write","prefect.task-run."]},occurred:{since:s.toISOString(),until:t.toISOString()},order:"ASC"},limit:50}});if(!r)throw new Error("No data returned from API");return ss(r)}function es(s){if(!s.start_time)throw new Error("Start time is required");return{root_node_ids:s.root_node_ids,start_time:j(s.start_time),end_time:s.end_time?j(s.end_time):null,nodes:new Map(s.nodes.map(t=>ts(t))),states:s.states?.map(as)??[]}}function ss(s){return s.events.map(t=>{if(!t.received)throw new Error("Received is required");return{id:t.id,received:j(t.received),occurred:j(t.occurred),event:t.event,resource:t.resource,payload:t.payload,related:t.related??[]}})}function ts([s,t]){if(!t.start_time)throw new Error("Start time is required");return[s,{kind:t.kind,id:t.id,label:t.label,state_type:t.state_type,start_time:j(t.start_time),end_time:t.end_time?j(t.end_time):null,parents:t.parents,children:t.children,artifacts:t.artifacts.map(rs)}]}function as(s){return{id:s.id,timestamp:j(s.timestamp),type:s.type,name:s.name}}function rs(s){if(!s.type)throw new Error("Artifact type is required");return s.type==="progress"&&typeof s.data=="number"?{id:s.id,created:j(s.created),key:s.key??void 0,type:s.type,data:s.data}:{id:s.id,created:j(s.created),key:s.key??void 0,type:s.type}}const Z={COMPLETED:600,RUNNING:700,SCHEDULED:700,PENDING:800,FAILED:700,CANCELLED:600,CANCELLING:600,CRASHED:600,PAUSED:800};function xe(s){return!s||!(s instanceof HTMLElement)?!1:["INPUT","TEXTAREA","SELECT"].includes(s.tagName)}const ee=()=>{be({animate:!0})};function ns(){return c.useEffect(()=>{const s=new AbortController;return document.addEventListener("keydown",t=>{xe(t.target)||t.metaKey||t.ctrlKey||t.key==="c"&&ee()},{signal:s.signal}),()=>s.abort()},[]),e.jsxs(O,{children:[e.jsx($,{asChild:!0,children:e.jsx(x,{variant:"ghost",size:"icon",onClick:ee,children:e.jsx(p,{id:"Crosshair",className:"size-4"})})}),e.jsx(H,{children:"Recenter (c)"})]})}function is({fullscreen:s,onFullscreenChange:t}){const a=c.useCallback(()=>{t(!s)},[s,t]);return c.useEffect(()=>{const r=new AbortController;return document.addEventListener("keydown",n=>{if(!(xe(n.target)||n.metaKey||n.ctrlKey)){if(n.key==="f"){a();return}if(n.key==="Escape"){a();return}}},{signal:r.signal}),()=>r.abort()},[a]),e.jsxs(O,{children:[e.jsx($,{asChild:!0,children:e.jsx(x,{variant:"ghost",size:"icon",onClick:a,children:e.jsx(p,{id:"Expand",className:"size-4"})})}),e.jsx(H,{children:"Fullscreen (f)"})]})}const ls=[{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"}],cs=()=>{const s=re+1,t=v.horizontalScaleMultiplier*s;ae(t)},os=()=>{const s=Math.abs(re-1),t=v.horizontalScaleMultiplier*s;ae(t)},ds=()=>{Ce()};function us(s){const[t,a]=s.split("_");return se(t)&&te(a)}function ms(){const[s,t]=c.useState(`${v.horizontal}_${v.vertical}`),[a,r]=c.useState(v.disableEdges),[n,l]=c.useState(v.disableArtifacts),[u,i]=c.useState(v.disableEvents),b=c.useCallback(o=>{if(!us(o))return;const[w,f]=o.split("_");!se(w)||!te(f)||(t(o),Ne(w),we(f))},[]),N=c.useCallback(o=>{r(o),ke(o)},[]),k=c.useCallback(o=>{l(o),Ee(o)},[]),L=c.useCallback(o=>{i(o),Se(o)},[]);return e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(g,{variant:"bodyLarge",children:"Layout"}),e.jsx("div",{className:"flex flex-col gap-2",children:ls.map(o=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"radio",id:o.value,name:"layout",value:o.value,checked:s===o.value,onChange:w=>b(w.target.value)}),e.jsx(C,{htmlFor:o.value,children:o.label})]},o.value))})]}),(v.isTemporal()||v.isLeftAligned())&&e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(g,{variant:"bodyLarge",children:"Scaling"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(x,{variant:"outline",size:"sm",onClick:os,title:"Decrease scale (-)",children:"-"}),e.jsx(x,{variant:"outline",size:"sm",onClick:cs,title:"Increase scale (+)",children:"+"}),e.jsx(x,{variant:"outline",size:"sm",onClick:ds,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(F,{id:"hideEdges",checked:a,onCheckedChange:N}),e.jsx(C,{htmlFor:"hideEdges",children:"Hide dependency arrows"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(F,{id:"hideArtifacts",checked:n,onCheckedChange:k}),e.jsx(C,{htmlFor:"hideArtifacts",children:"Hide artifacts"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(F,{id:"hideEvents",checked:u,onCheckedChange:L}),e.jsx(C,{htmlFor:"hideEvents",children:"Hide events"})]})]})]})}function xs(){return e.jsxs(A,{children:[e.jsx(Ge,{children:e.jsxs(O,{children:[e.jsx($,{asChild:!0,children:e.jsx(x,{variant:"ghost",size:"icon",children:e.jsx(p,{id:"Cog",className:"size-4"})})}),e.jsx(H,{children:"Settings"})]})}),e.jsx(T,{children:e.jsx(ms,{})})]})}function ps({fullscreen:s,onFullscreenChange:t}){return e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ns,{}),e.jsx(is,{fullscreen:s,onFullscreenChange:t}),e.jsx(xs,{})]})}function hs({artifactId:s,onClose:t}){return e.jsx(Pe,{open:s!==null,onOpenChange:a=>!a&&t(),children:e.jsxs(Oe,{children:[e.jsx($e,{children:e.jsx(He,{children:"Artifact Details"})}),s&&e.jsx(c.Suspense,{fallback:e.jsx(fs,{}),children:e.jsx(js,{artifactId:s})})]})})}function fs(){return e.jsxs("div",{className:"space-y-4 p-4",children:[e.jsx(y,{className:"h-6 w-32"}),e.jsx(y,{className:"h-4 w-24"}),e.jsx(y,{className:"h-4 w-48"}),e.jsx(y,{className:"h-32 w-full"})]})}function js({artifactId:s}){const{data:t}=G(Ue(s));return e.jsxs("div",{className:"space-y-4 p-4",children:[e.jsx(d,{label:"Key",value:e.jsx(g,{variant:"bodySmall",className:"font-medium",children:t.key??"Unnamed"})}),t.type&&e.jsx(d,{label:"Type",value:e.jsx(g,{variant:"bodySmall",className:"uppercase",children:t.type})}),t.description&&e.jsx(d,{label:"Description",value:e.jsx(g,{variant:"bodySmall",children:t.description})}),t.created&&e.jsx(d,{label:"Created",value:e.jsx(E,{date:t.created})}),t.data!==void 0&&t.data!==null&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(g,{variant:"bodySmall",className:"text-muted-foreground",children:"Data"}),e.jsx("pre",{className:"bg-muted p-3 rounded-md text-sm overflow-auto max-h-64",children:typeof t.data=="string"?t.data:JSON.stringify(t.data,null,2)})]})]})}function vs({selection:s,onClose:t,onViewArtifact:a}){const{data:r,isLoading:n}=_(Qe({artifacts:{operator:"and_",id:{any_:s.ids}},sort:"CREATED_DESC",offset:0})),l=s.position;if(!l)return null;const u={position:"absolute",left:`${l.x+l.width/2}px`,top:`${l.y+l.height}px`};return e.jsxs(A,{open:!0,onOpenChange:i=>!i&&t(),children:[e.jsx(U,{style:u}),e.jsxs(T,{align:"center",side:"bottom",className:"w-72",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx(g,{variant:"bodySmall",className:"font-semibold",children:"Artifacts"}),e.jsx(x,{variant:"ghost",size:"icon",onClick:t,"aria-label":"Close popover",children:e.jsx(p,{id:"X",className:"size-4"})})]}),n?e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(p,{id:"Loader2",className:"size-4 animate-spin"})}):e.jsx("div",{className:"space-y-2 max-h-64 overflow-y-auto",children:r?.filter(i=>i.id!==void 0).map(i=>e.jsxs("div",{className:"flex items-center justify-between gap-2 p-2 rounded-md border bg-muted/50",children:[e.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[e.jsx(g,{variant:"bodySmall",className:"font-medium truncate",children:i.key??"Unnamed"}),i.type&&e.jsx(g,{variant:"xsmall",className:"text-muted-foreground uppercase",children:i.type})]}),e.jsx(x,{variant:"outline",size:"sm",onClick:()=>a(i.id),children:"View"})]},i.id))})]})]})}function ys(s){let t=s;return t.startsWith("prefect.")?t=t.slice(8):t.startsWith("prefect-cloud.")&&(t=t.slice(14)),t=t.replace(/[._-]/g," "),t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function gs(s){let t;return typeof s=="string"?t=j(s):t=s,We(t)?Je(t,"yyyy/MM/dd hh:mm:ss a"):"Invalid date"}function pe(s){return s["prefect.resource.name"]||s["prefect.name"]||s["prefect-cloud.name"]||null}function bs({event:s}){const t=pe(s.resource),a=s.resource["prefect.resource.id"]||"",r=I(a),n=de(a),l=s.related??[];return t?e.jsx(c.Suspense,{fallback:e.jsx(D,{}),children:e.jsx(R,{resource:s.resource,relatedResources:l,className:"hover:underline text-primary",children:e.jsx(ue,{resourceType:r,displayText:t,className:"text-sm"})})}):n&&r!=="unknown"?e.jsx(c.Suspense,{fallback:e.jsx(D,{}),children:e.jsx(R,{resource:s.resource,relatedResources:l,className:"hover:underline text-primary",children:e.jsx(me,{resourceType:r,resourceId:n,className:"text-sm"})})}):e.jsx("span",{className:"text-sm text-muted-foreground font-mono",children:a||"Unknown"})}function Ns({relatedResources:s}){const t=s.filter(a=>{const r=a["prefect.resource.role"],n=a["prefect.resource.id"]||"";return r==="tag"||n.startsWith("prefect.tag.")?!1:I(n)!=="unknown"});return t.length===0?null:e.jsx(d,{label:"Related Resources",value:e.jsx("div",{className:"flex flex-col gap-1",children:t.map(a=>{const r=pe(a),n=a["prefect.resource.id"]||"",l=I(n),u=de(n);return r?e.jsx(c.Suspense,{fallback:e.jsx(D,{}),children:e.jsx(R,{resource:a,relatedResources:s,className:"hover:underline text-primary",children:e.jsx(ue,{resourceType:l,displayText:r,className:"text-sm"})})},n):u&&l!=="unknown"?e.jsx(c.Suspense,{fallback:e.jsx(D,{}),children:e.jsx(R,{resource:a,relatedResources:s,className:"hover:underline text-primary",children:e.jsx(me,{resourceType:l,resourceId:u,className:"text-sm"})})},n):e.jsx("span",{className:"text-sm text-muted-foreground font-mono",children:n},n)})})})}function ws({selection:s,onClose:t}){const{data:a,isLoading:r}=_(le(s.id,s.occurred)),n=s.position;if(!n)return null;const l={position:"absolute",left:`${n.x+n.width/2}px`,top:`${n.y+n.height}px`},u=a?.event??"",i=u?ys(u):"Loading...",b=a?.related??[];return e.jsxs(A,{open:!0,onOpenChange:N=>!N&&t(),children:[e.jsx(U,{style:l}),e.jsxs(T,{align:"center",side:"bottom",className:"w-80",children:[e.jsxs("div",{className:"flex justify-between items-start mb-3",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Event"}),e.jsx(x,{variant:"ghost",size:"icon",onClick:t,"aria-label":"Close popover",className:"-mt-1 -mr-2",children:e.jsx(p,{id:"X",className:"size-4"})})]}),r?e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(p,{id:"Loader2",className:"size-4 animate-spin"})}):e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx(P,{to:"/events",search:{event:[u]},className:"text-sm text-primary hover:underline font-medium",children:i}),e.jsx("span",{className:"text-xs text-muted-foreground",children:u})]}),e.jsx(d,{label:"Occurred",value:e.jsx("span",{className:"text-sm",children:gs(s.occurred)})}),a&&e.jsx(d,{label:"Resource",value:e.jsx(bs,{event:a})}),b.length>0&&e.jsx(Ns,{relatedResources:b})]})]})]})}function ks({selection:s,onClose:t}){const a=ge({queries:s.ids.map(i=>le(i,s.occurred??new Date))}),r=s.position;if(!r)return null;const n={position:"absolute",left:`${r.x+r.width/2}px`,top:`${r.y+r.height}px`},l=a.some(i=>i.isLoading),u=a.map(i=>i.data).filter(i=>i!==void 0);return e.jsxs(A,{open:!0,onOpenChange:i=>!i&&t(),children:[e.jsx(U,{style:n}),e.jsxs(T,{align:"center",side:"bottom",className:"w-80",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("span",{className:"text-sm font-medium",children:[s.ids.length," Events"]}),e.jsx(x,{variant:"ghost",size:"icon",onClick:t,"aria-label":"Close popover",children:e.jsx(p,{id:"X",className:"size-4"})})]}),l?e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(p,{id:"Loader2",className:"size-4 animate-spin"})}):e.jsx(Me,{className:"max-h-64",children:e.jsx("div",{className:"space-y-3",children:u.map(i=>e.jsxs("div",{className:"border-b pb-2 last:border-b-0 last:pb-0",children:[e.jsx("div",{className:"text-sm font-mono truncate",title:i.event,children:i.event}),e.jsx("div",{className:"text-xs text-muted-foreground",children:e.jsx(E,{date:new Date(i.occurred)})})]},i.id))})})]})]})}function Es({selection:s,onClose:t}){return ne(s)?e.jsx("div",{className:"absolute top-4 right-4 z-10 w-72 rounded-lg border bg-card p-4 shadow-md",children:e.jsxs(c.Suspense,{fallback:e.jsx(Ss,{onClose:t}),children:[s.kind==="task-run"&&e.jsx(Cs,{taskRunId:s.id,onClose:t}),s.kind==="flow-run"&&e.jsx(_s,{flowRunId:s.id,onClose:t})]})}):null}function Ss({onClose:s}){return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx(y,{className:"h-6 w-3/4"}),e.jsx(x,{variant:"ghost",size:"icon",onClick:s,"aria-label":"Close panel",className:"shrink-0 -mt-1 -mr-2",children:e.jsx(p,{id:"X",className:"size-4"})})]}),e.jsx(y,{className:"h-5 w-1/2"}),e.jsx(y,{className:"h-5 w-full"}),e.jsx(y,{className:"h-5 w-2/3"}),e.jsx(y,{className:"h-5 w-1/2"})]})}function Cs({taskRunId:s,onClose:t}){const{data:a}=G(Xe(s)),r=a.estimated_run_time&&a.estimated_run_time>0?a.estimated_run_time:a.total_run_time??0;return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("h3",{className:"font-semibold text-base",children:e.jsx(P,{to:"/runs/task-run/$id",params:{id:s},className:"hover:underline text-foreground",children:a.name})}),e.jsx(x,{variant:"ghost",size:"icon",onClick:t,"aria-label":"Close panel",className:"shrink-0 -mt-1 -mr-2",children:e.jsx(p,{id:"X",className:"size-4"})})]}),e.jsxs("div",{className:"space-y-3",children:[a.state&&e.jsx(d,{label:"State",value:e.jsx(Q,{type:a.state.type,name:a.state.name})}),e.jsx(d,{label:"Task Run ID",value:a.id,copyable:!0}),e.jsx(d,{label:"Duration",value:r>0?ce(r):"-"}),e.jsx(d,{label:"Created",value:e.jsx(E,{date:a.created})}),a.tags&&a.tags.length>0&&e.jsx(d,{label:"Tags",value:e.jsx(oe,{tags:a.tags})})]})]})}function _s({flowRunId:s,onClose:t}){const{data:a}=G(qe(s)),r=a.total_run_time??0;return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("h3",{className:"font-semibold text-base",children:e.jsx(P,{to:"/runs/flow-run/$id",params:{id:s},className:"hover:underline text-foreground",children:a.name})}),e.jsx(x,{variant:"ghost",size:"icon",onClick:t,"aria-label":"Close panel",className:"shrink-0 -mt-1 -mr-2",children:e.jsx(p,{id:"X",className:"size-4"})})]}),e.jsxs("div",{className:"space-y-3",children:[a.state&&e.jsx(d,{label:"State",value:e.jsx(Q,{type:a.state.type,name:a.state.name})}),e.jsx(d,{label:"Flow Run ID",value:a.id,copyable:!0}),e.jsx(d,{label:"Duration",value:r>0?ce(r):"-"}),e.jsx(d,{label:"Created",value:e.jsx(E,{date:a.created})}),a.tags&&a.tags.length>0&&e.jsx(d,{label:"Tags",value:e.jsx(oe,{tags:a.tags})})]})]})}function Rs({selection:s,onClose:t}){const a=c.useRef(null);c.useEffect(()=>{const l=i=>{a.current&&!a.current.contains(i.target)&&t()},u=i=>{i.key==="Escape"&&t()};return document.addEventListener("mousedown",l),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("keydown",u)}},[t]);const r=s.position;if(!r)return null;const n={position:"absolute",left:`${r.x+r.width/2}px`,top:`${r.y+r.height}px`,transform:"translateX(-50%)"};return e.jsxs("div",{ref:a,className:"z-50 w-64 rounded-lg border bg-card p-4 shadow-md",style:n,children:[e.jsx("div",{className:"flex justify-end absolute top-2 right-2",children:e.jsx(x,{variant:"ghost",size:"icon",onClick:t,"aria-label":"Close popover",children:e.jsx(p,{id:"X",className:"size-4"})})}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(d,{label:"State",value:e.jsx(Q,{type:s.type,name:s.name})}),e.jsx(d,{label:"Occurred",value:e.jsx(E,{date:s.timestamp,format:"timestamp"})})]})]})}const Ds=["COMPLETED","FAILED","CANCELLED","CRASHED"];function Us({flowRunId:s,stateType:t,viewport:a,onViewportChange:r,selected:n,onSelectedChange:l,className:u,style:i,fullscreen:b,onFullscreenChange:N}){const k=c.useRef(null),[L,o]=c.useState(!1),[w,f]=c.useState(void 0),[he,M]=c.useState(null),{resolvedTheme:X}=Ke(),q=b??L,m=n??w,fe=t&&Ds.includes(t),{data:K}=_(Be({task_runs:{operator:"and_",flow_run_id:{operator:"and_",any_:[s],is_null_:!1}}})),{data:B}=_(Ve({flow_runs:{operator:"and_",parent_flow_run_id:{operator:"and_",any_:[s]}}})),V=K===void 0||B===void 0||K>0||B>0,je=c.useCallback(h=>{o(h),N?.(h)},[N]),S=c.useMemo(()=>({runId:s,fetch:Ye,fetchEvents:Ze,styles:()=>({node:h=>({background:Y(h.state_type,Z[h.state_type])}),state:h=>({background:Y(h.type,Z[h.type])})}),theme:X==="dark"?"dark":"light"}),[s,X]);c.useEffect(()=>{_e(S)},[S]),c.useEffect(()=>{if(!k.current)throw new Error("Stage does not exist");return Re({stage:k.current,config:S}),()=>{De()}},[S]),c.useEffect(()=>{Ae(m??null)},[m]),c.useEffect(()=>{Te(a)},[a]),c.useEffect(()=>{const h=J.on("itemSelected",z=>{const W=z??void 0;f(W),l?.(W)}),ye=J.on("viewportDateRangeUpdated",z=>r?.(z));return()=>{h(),ye()}},[l,r]);const ve=q?"fixed inset-0 z-50 bg-background":V?"relative h-96 w-full":"relative h-40 w-full";return e.jsxs("div",{className:`${ve} ${u??""}`,style:i,children:[e.jsx("div",{ref:k,className:"size-full [&>canvas]:size-full"}),!V&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/50",children:e.jsx("p",{className:"text-muted-foreground",children:fe?"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-2 right-2",children:e.jsx(ps,{fullscreen:q,onFullscreenChange:je})}),m&&ne(m)&&e.jsx(Es,{selection:m,onClose:()=>{f(void 0),l?.(void 0)}}),m&&Le(m)&&e.jsx(Rs,{selection:m,onClose:()=>{f(void 0),l?.(void 0)}}),m&&ze(m)&&e.jsx(ws,{selection:m,onClose:()=>{f(void 0),l?.(void 0)}}),m&&Fe(m)&&e.jsx(ks,{selection:m,onClose:()=>{f(void 0),l?.(void 0)}}),m&&Ie(m)&&e.jsx(vs,{selection:m,onClose:()=>{f(void 0),l?.(void 0)},onViewArtifact:h=>{M(h),f(void 0),l?.(void 0)}}),e.jsx(hs,{artifactId:he,onClose:()=>M(null)})]})}export{Us as FlowRunGraph};
|
|
2
|
+
//# sourceMappingURL=flow-run-graph-ckiE3mA9.js.map
|