prefect 3.6.12__py3-none-any.whl → 3.6.13.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/_build_info.py +3 -3
- prefect/_internal/urls.py +29 -0
- prefect/_states.py +4 -1
- prefect/client/orchestration/_concurrency_limits/client.py +16 -16
- prefect/client/subscriptions.py +1 -1
- prefect/events/clients.py +52 -13
- prefect/runner/storage.py +3 -23
- prefect/server/ui-v2/assets/{artifact-card-Ds2tntMW.js → artifact-card-C8JEQRHl.js} +2 -2
- prefect/server/ui-v2/assets/{artifact-card-Ds2tntMW.js.map → artifact-card-C8JEQRHl.js.map} +1 -1
- prefect/server/ui-v2/assets/{artifact._id-erPNL0a8.js → artifact._id-67V8kTg9.js} +2 -2
- prefect/server/ui-v2/assets/{artifact._id-erPNL0a8.js.map → artifact._id-67V8kTg9.js.map} +1 -1
- prefect/server/ui-v2/assets/{automation-wizard-Bx9AQxRV.js → automation-wizard-DuxZ47Nn.js} +2 -2
- prefect/server/ui-v2/assets/{automation-wizard-Bx9AQxRV.js.map → automation-wizard-DuxZ47Nn.js.map} +1 -1
- prefect/server/ui-v2/assets/automation._id-D8S8r4Ji.js +2 -0
- prefect/server/ui-v2/assets/{automation._id-IHh5QJwE.js.map → automation._id-D8S8r4Ji.js.map} +1 -1
- prefect/server/ui-v2/assets/{automation_._id.edit-Ds8vO0c5.js → automation_._id.edit-C1fOM0Hx.js} +2 -2
- prefect/server/ui-v2/assets/{automation_._id.edit-Ds8vO0c5.js.map → automation_._id.edit-C1fOM0Hx.js.map} +1 -1
- prefect/server/ui-v2/assets/{automations-header-C6aUe5Tw.js → automations-header-DrijTNGi.js} +2 -2
- prefect/server/ui-v2/assets/{automations-header-C6aUe5Tw.js.map → automations-header-DrijTNGi.js.map} +1 -1
- prefect/server/ui-v2/assets/{base-job-template-form-section-a-9TFMcW.js → base-job-template-form-section-BDkqOkpe.js} +2 -2
- prefect/server/ui-v2/assets/{base-job-template-form-section-a-9TFMcW.js.map → base-job-template-form-section-BDkqOkpe.js.map} +1 -1
- prefect/server/ui-v2/assets/{block-type-details-eq3Wg2ht.js → block-type-details-CrFHWH5D.js} +2 -2
- prefect/server/ui-v2/assets/{block-type-details-eq3Wg2ht.js.map → block-type-details-CrFHWH5D.js.map} +1 -1
- prefect/server/ui-v2/assets/block-type-logo-WQNm0PzP.js +2 -0
- prefect/server/ui-v2/assets/{block-type-logo-B31LJm5H.js.map → block-type-logo-WQNm0PzP.js.map} +1 -1
- prefect/server/ui-v2/assets/{block._id-OVdz3htC.js → block._id-C3gN1Ae8.js} +2 -2
- prefect/server/ui-v2/assets/{block._id-OVdz3htC.js.map → block._id-C3gN1Ae8.js.map} +1 -1
- prefect/server/ui-v2/assets/block_._id.edit-DzPuSvat.js +2 -0
- prefect/server/ui-v2/assets/{block_._id.edit-CIhIBJrm.js.map → block_._id.edit-DzPuSvat.js.map} +1 -1
- prefect/server/ui-v2/assets/catalog-T-7MqsyE.js +2 -0
- prefect/server/ui-v2/assets/{catalog-CfniU0UV.js.map → catalog-T-7MqsyE.js.map} +1 -1
- prefect/server/ui-v2/assets/catalog_._slug-DMOI61fc.js +2 -0
- prefect/server/ui-v2/assets/{catalog_._slug-C9p86T4s.js.map → catalog_._slug-DMOI61fc.js.map} +1 -1
- prefect/server/ui-v2/assets/catalog_._slug_.create-l9bGUPi-.js +2 -0
- prefect/server/ui-v2/assets/{catalog_._slug_.create-BhSunL__.js.map → catalog_._slug_.create-l9bGUPi-.js.map} +1 -1
- prefect/server/ui-v2/assets/{collapsible-DBD7wjpi.js → collapsible-DM-Ze5-Y.js} +2 -2
- prefect/server/ui-v2/assets/{collapsible-DBD7wjpi.js.map → collapsible-DM-Ze5-Y.js.map} +1 -1
- prefect/server/ui-v2/assets/{concurrency-limit._id-C-XWq7Tf.js → concurrency-limit._id-BHEt9viF.js} +2 -2
- prefect/server/ui-v2/assets/{concurrency-limit._id-C-XWq7Tf.js.map → concurrency-limit._id-BHEt9viF.js.map} +1 -1
- prefect/server/ui-v2/assets/{create-Bj2t5YQq.js → create-BMxUOyN5.js} +2 -2
- prefect/server/ui-v2/assets/{create-Bj2t5YQq.js.map → create-BMxUOyN5.js.map} +1 -1
- prefect/server/ui-v2/assets/{create-noFojqGL.js → create-Cq-EAHVk.js} +2 -2
- prefect/server/ui-v2/assets/{create-noFojqGL.js.map → create-Cq-EAHVk.js.map} +1 -1
- prefect/server/ui-v2/assets/{data-table-BjFlVIyC.js → data-table-Bw8TZx9D.js} +2 -2
- prefect/server/ui-v2/assets/{data-table-BjFlVIyC.js.map → data-table-Bw8TZx9D.js.map} +1 -1
- prefect/server/ui-v2/assets/{delete-confirmation-dialog-COdZmNfa.js → delete-confirmation-dialog-CTdWZlGM.js} +2 -2
- prefect/server/ui-v2/assets/{delete-confirmation-dialog-COdZmNfa.js.map → delete-confirmation-dialog-CTdWZlGM.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment-action-header-C6v2kZ6V.js → deployment-action-header-BObYqmI_.js} +2 -2
- prefect/server/ui-v2/assets/{deployment-action-header-C6v2kZ6V.js.map → deployment-action-header-BObYqmI_.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment-form-D9d5sZM2.js → deployment-form-CntyhRrK.js} +3 -3
- prefect/server/ui-v2/assets/{deployment-form-D9d5sZM2.js.map → deployment-form-CntyhRrK.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment-links-Dy-M1Que.js → deployment-links-DBUSCaxB.js} +2 -2
- prefect/server/ui-v2/assets/{deployment-links-Dy-M1Que.js.map → deployment-links-DBUSCaxB.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment._id-CZlY9261.js → deployment._id-BXanVFA8.js} +2 -2
- prefect/server/ui-v2/assets/{deployment._id-CZlY9261.js.map → deployment._id-BXanVFA8.js.map} +1 -1
- prefect/server/ui-v2/assets/deployment._id-Q5cvHMX9.js +2 -0
- prefect/server/ui-v2/assets/{deployment._id-DVmqclRz.js.map → deployment._id-Q5cvHMX9.js.map} +1 -1
- prefect/server/ui-v2/assets/deployment_._id.duplicate-DB-4hHHc.js +2 -0
- prefect/server/ui-v2/assets/{deployment_._id.duplicate-DVMjpk5m.js.map → deployment_._id.duplicate-DB-4hHHc.js.map} +1 -1
- prefect/server/ui-v2/assets/deployment_._id.edit-CWf1RIGy.js +2 -0
- prefect/server/ui-v2/assets/{deployment_._id.edit-Ck_P6KDn.js.map → deployment_._id.edit-CWf1RIGy.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment_._id.run-Cht7AHDG.js → deployment_._id.run-CoHGXFoM.js} +2 -2
- prefect/server/ui-v2/assets/{deployment_._id.run-Cht7AHDG.js.map → deployment_._id.run-CoHGXFoM.js.map} +1 -1
- prefect/server/ui-v2/assets/{dropdown-menu-xZ_3w9OP.js → dropdown-menu-CT-s-V7d.js} +2 -2
- prefect/server/ui-v2/assets/{dropdown-menu-xZ_3w9OP.js.map → dropdown-menu-CT-s-V7d.js.map} +1 -1
- prefect/server/ui-v2/assets/{event._eventDate._eventId-CpexuXd6.js → event._eventDate._eventId-BITo_GYL.js} +2 -2
- prefect/server/ui-v2/assets/{event._eventDate._eventId-CpexuXd6.js.map → event._eventDate._eventId-BITo_GYL.js.map} +1 -1
- prefect/server/ui-v2/assets/flow-run-graph-DxIl6fzW.js +2 -0
- prefect/server/ui-v2/assets/flow-run-graph-DxIl6fzW.js.map +1 -0
- prefect/server/ui-v2/assets/{flow-run._id-ZBlKBwPO.js → flow-run._id-Bbm9OpDi.js} +2 -2
- prefect/server/ui-v2/assets/{flow-run._id-ZBlKBwPO.js.map → flow-run._id-Bbm9OpDi.js.map} +1 -1
- prefect/server/ui-v2/assets/flow-run._id-BtSgRDtA.js +2 -0
- prefect/server/ui-v2/assets/{flow-run._id-OL0YhyLW.js.map → flow-run._id-BtSgRDtA.js.map} +1 -1
- prefect/server/ui-v2/assets/flow-run._id-DJuMECRh.js +4 -0
- prefect/server/ui-v2/assets/flow-run._id-DJuMECRh.js.map +1 -0
- prefect/server/ui-v2/assets/flow-runs-pagination-LrU9Aio8.js +2 -0
- prefect/server/ui-v2/assets/flow-runs-pagination-LrU9Aio8.js.map +1 -0
- prefect/server/ui-v2/assets/flow._id-BJBRokk4.js +2 -0
- prefect/server/ui-v2/assets/{flow._id-DhrCicwR.js.map → flow._id-BJBRokk4.js.map} +1 -1
- prefect/server/ui-v2/assets/{form-BTub_PhK.js → form-CVSlEnl8.js} +2 -2
- prefect/server/ui-v2/assets/{form-BTub_PhK.js.map → form-CVSlEnl8.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-Dp9qi8fq.js → header-4plZZheZ.js} +2 -2
- prefect/server/ui-v2/assets/{header-Dp9qi8fq.js.map → header-4plZZheZ.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-B75eb688.js → header-9rXZ4r39.js} +2 -2
- prefect/server/ui-v2/assets/{header-B75eb688.js.map → header-9rXZ4r39.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-6wmrKLU3.js → header-D3uM8_xM.js} +2 -2
- prefect/server/ui-v2/assets/{header-6wmrKLU3.js.map → header-D3uM8_xM.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-BA7ACCoL.js → index-6OsEYhIi.js} +2 -2
- prefect/server/ui-v2/assets/{index-BA7ACCoL.js.map → index-6OsEYhIi.js.map} +1 -1
- prefect/server/ui-v2/assets/index-B7xsJ-QH.js +2 -0
- prefect/server/ui-v2/assets/{index-CT_nG86y.js.map → index-B7xsJ-QH.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-CGWoVV2s.js → index-BeoNC2tJ.js} +2 -2
- prefect/server/ui-v2/assets/{index-CGWoVV2s.js.map → index-BeoNC2tJ.js.map} +1 -1
- prefect/server/ui-v2/assets/index-BfJLUM7N.js +2 -0
- prefect/server/ui-v2/assets/index-BfJLUM7N.js.map +1 -0
- prefect/server/ui-v2/assets/{index-DzMGV8GV.js → index-Bj0OOguP.js} +2 -2
- prefect/server/ui-v2/assets/{index-DzMGV8GV.js.map → index-Bj0OOguP.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-zpb5iSCL.js → index-BlpD74iH.js} +2 -2
- prefect/server/ui-v2/assets/{index-zpb5iSCL.js.map → index-BlpD74iH.js.map} +1 -1
- prefect/server/ui-v2/assets/index-BvSl3DKP.js +17 -0
- prefect/server/ui-v2/assets/index-BvSl3DKP.js.map +1 -0
- prefect/server/ui-v2/assets/index-CDwJvjUM.js +2 -0
- prefect/server/ui-v2/assets/{index-Cs8eFQKw.js.map → index-CDwJvjUM.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-UN2Tx4jH.js → index-CDyLkbVG.js} +2 -2
- prefect/server/ui-v2/assets/{index-UN2Tx4jH.js.map → index-CDyLkbVG.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-D08xgmV0.js → index-ChIrfjIW.js} +2 -2
- prefect/server/ui-v2/assets/{index-D08xgmV0.js.map → index-ChIrfjIW.js.map} +1 -1
- prefect/server/ui-v2/assets/index-CzCSgCK-.js +2 -0
- prefect/server/ui-v2/assets/{index-qPlIYf3i.js.map → index-CzCSgCK-.js.map} +1 -1
- prefect/server/ui-v2/assets/index-D5v9S-lB.js +2 -0
- prefect/server/ui-v2/assets/{index-B_3f8Hcb.js.map → index-D5v9S-lB.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-DfiNsXba.js → index-D6GJ4go1.js} +2 -2
- prefect/server/ui-v2/assets/{index-DfiNsXba.js.map → index-D6GJ4go1.js.map} +1 -1
- prefect/server/ui-v2/assets/index-DJyKqsFO.js +2 -0
- prefect/server/ui-v2/assets/{index-H6bwm6L6.js.map → index-DJyKqsFO.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-DSaSov8V.js → index-DODEq1Pi.js} +2 -2
- prefect/server/ui-v2/assets/{index-DSaSov8V.js.map → index-DODEq1Pi.js.map} +1 -1
- prefect/server/ui-v2/assets/index-DicK6p3K.js +2 -0
- prefect/server/ui-v2/assets/{index-7-r4ia_S.js.map → index-DicK6p3K.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-DYOACRXY.js → index-DqCPbST9.js} +2 -2
- prefect/server/ui-v2/assets/{index-DYOACRXY.js.map → index-DqCPbST9.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-DOkFJdYY.js → index-DxPoKag8.js} +2 -2
- prefect/server/ui-v2/assets/{index-DOkFJdYY.js.map → index-DxPoKag8.js.map} +1 -1
- prefect/server/ui-v2/assets/index-NY089eTx.css +1 -0
- prefect/server/ui-v2/assets/{index-HGoNWFfP.js → index-h9-QgNjZ.js} +2 -2
- prefect/server/ui-v2/assets/{index-HGoNWFfP.js.map → index-h9-QgNjZ.js.map} +1 -1
- prefect/server/ui-v2/assets/{index-D3ILnEzm.js → index-tBdv6kBF.js} +2 -2
- prefect/server/ui-v2/assets/{index-D3ILnEzm.js.map → index-tBdv6kBF.js.map} +1 -1
- prefect/server/ui-v2/assets/index-udb79rgq.js +2 -0
- prefect/server/ui-v2/assets/{index-7ThYp9SY.js.map → index-udb79rgq.js.map} +1 -1
- prefect/server/ui-v2/assets/{json-input-9UPGqxTw.js → json-input-Dt1icmrn.js} +2 -2
- prefect/server/ui-v2/assets/{json-input-9UPGqxTw.js.map → json-input-Dt1icmrn.js.map} +1 -1
- prefect/server/ui-v2/assets/{key._key-CTFfXO_k.js → key._key-Cyh5MBX_.js} +2 -2
- prefect/server/ui-v2/assets/{key._key-CTFfXO_k.js.map → key._key-Cyh5MBX_.js.map} +1 -1
- prefect/server/ui-v2/assets/{lazy-markdown-BHwIrC8E.js → lazy-markdown-BwIwKFRF.js} +2 -2
- prefect/server/ui-v2/assets/{lazy-markdown-BHwIrC8E.js.map → lazy-markdown-BwIwKFRF.js.map} +1 -1
- prefect/server/ui-v2/assets/{login-kqmT29n7.js → login-DKXFVSwk.js} +2 -2
- prefect/server/ui-v2/assets/{login-kqmT29n7.js.map → login-DKXFVSwk.js.map} +1 -1
- prefect/server/ui-v2/assets/{markdown-input-BesmAbLS.js → markdown-input-Dp0mBlkV.js} +2 -2
- prefect/server/ui-v2/assets/{markdown-input-BesmAbLS.js.map → markdown-input-Dp0mBlkV.js.map} +1 -1
- prefect/server/ui-v2/assets/{python-example-snippet-COTWYn1Y.js → python-example-snippet-BYwPjHI5.js} +3 -3
- prefect/server/ui-v2/assets/{python-example-snippet-COTWYn1Y.js.map → python-example-snippet-BYwPjHI5.js.map} +1 -1
- prefect/server/ui-v2/assets/{python-input-Bjccebi0.js → python-input-y26XMqXw.js} +2 -2
- prefect/server/ui-v2/assets/{python-input-Bjccebi0.js.map → python-input-y26XMqXw.js.map} +1 -1
- prefect/server/ui-v2/assets/{radio-group-DkAK0M2h.js → radio-group-D0van45v.js} +2 -2
- prefect/server/ui-v2/assets/{radio-group-DkAK0M2h.js.map → radio-group-D0van45v.js.map} +1 -1
- prefect/server/ui-v2/assets/route-error-state-CGGpuCGN.js +2 -0
- prefect/server/ui-v2/assets/{route-error-state-ALftyvGl.js.map → route-error-state-CGGpuCGN.js.map} +1 -1
- prefect/server/ui-v2/assets/{schema-form-BR4E-WXE.js → schema-form-2tg5SXM4.js} +2 -2
- prefect/server/ui-v2/assets/{schema-form-BR4E-WXE.js.map → schema-form-2tg5SXM4.js.map} +1 -1
- prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-BhL8C5NS.js → schema-form-input-string-format-datetime-CZt6AJ4z.js} +4 -4
- prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-BhL8C5NS.js.map → schema-form-input-string-format-datetime-CZt6AJ4z.js.map} +1 -1
- prefect/server/ui-v2/assets/settings-DDUadk_N.js +2 -0
- prefect/server/ui-v2/assets/settings-DDUadk_N.js.map +1 -0
- prefect/server/ui-v2/assets/{sort-filter-BD4vwJXt.js → sort-filter-D9p3cPx9.js} +2 -2
- prefect/server/ui-v2/assets/{sort-filter-BD4vwJXt.js.map → sort-filter-D9p3cPx9.js.map} +1 -1
- prefect/server/ui-v2/assets/state-colors-CAAf0Eg3.js +2 -0
- prefect/server/ui-v2/assets/state-colors-CAAf0Eg3.js.map +1 -0
- prefect/server/ui-v2/assets/table-vo9Do8sA.js +2 -0
- prefect/server/ui-v2/assets/table-vo9Do8sA.js.map +1 -0
- prefect/server/ui-v2/assets/tags-input-Ci2JQ-k3.js +2 -0
- prefect/server/ui-v2/assets/tags-input-Ci2JQ-k3.js.map +1 -0
- prefect/server/ui-v2/assets/task-run-concurrency-limits-reset-dialog-CJzPc2gw.js +2 -0
- prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-CG3den1B.js.map → task-run-concurrency-limits-reset-dialog-CJzPc2gw.js.map} +1 -1
- prefect/server/ui-v2/assets/{task-run._id-DOcIzVi0.js → task-run._id-CjevSs79.js} +3 -3
- prefect/server/ui-v2/assets/{task-run._id-DOcIzVi0.js.map → task-run._id-CjevSs79.js.map} +1 -1
- prefect/server/ui-v2/assets/task-run._id-D8QKG5UZ.js +2 -0
- prefect/server/ui-v2/assets/{task-run._id-CnIVqU6v.js.map → task-run._id-D8QKG5UZ.js.map} +1 -1
- prefect/server/ui-v2/assets/task-runs-pagination-CifoSGct.js +2 -0
- prefect/server/ui-v2/assets/{task-runs-pagination-DLSAz-Ur.js.map → task-runs-pagination-CifoSGct.js.map} +1 -1
- prefect/server/ui-v2/assets/{textarea-D8LjlIx7.js → textarea-BAtfAxtV.js} +2 -2
- prefect/server/ui-v2/assets/{textarea-D8LjlIx7.js.map → textarea-BAtfAxtV.js.map} +1 -1
- prefect/server/ui-v2/assets/{timezone-select-BG3cL3-U.js → timezone-select-QlQTZSsF.js} +2 -2
- prefect/server/ui-v2/assets/{timezone-select-BG3cL3-U.js.map → timezone-select-QlQTZSsF.js.map} +1 -1
- prefect/server/ui-v2/assets/{toggle-group-D3zeurIL.js → toggle-group-BJN1vjEh.js} +2 -2
- prefect/server/ui-v2/assets/{toggle-group-D3zeurIL.js.map → toggle-group-BJN1vjEh.js.map} +1 -1
- prefect/server/ui-v2/assets/use-delete-automation-confirmation-dialog-eOWJYPkD.js +2 -0
- prefect/server/ui-v2/assets/{use-delete-automation-confirmation-dialog-Bzy2ML2T.js.map → use-delete-automation-confirmation-dialog-eOWJYPkD.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-DRAP-Tnu.js → use-delete-block-document-confirmation-dialog-BTwSeHRM.js} +2 -2
- prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-DRAP-Tnu.js.map → use-delete-block-document-confirmation-dialog-BTwSeHRM.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-D4yWonR8.js → use-flow-runs-selected-rows-BL_Gv9CC.js} +2 -2
- prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-D4yWonR8.js.map → use-flow-runs-selected-rows-BL_Gv9CC.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-DZeBiVd9.js → use-get-artifacts-flow-task-runs-TSCoomjQ.js} +2 -2
- prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-DZeBiVd9.js.map → use-get-artifacts-flow-task-runs-TSCoomjQ.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-quick-run-BxAMqZDM.js → use-quick-run-BMnCkwSv.js} +2 -2
- prefect/server/ui-v2/assets/{use-quick-run-BxAMqZDM.js.map → use-quick-run-BMnCkwSv.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-stepper-T3wAKNvM.js → use-stepper-C1wm66U2.js} +2 -2
- prefect/server/ui-v2/assets/{use-stepper-T3wAKNvM.js.map → use-stepper-C1wm66U2.js.map} +1 -1
- prefect/server/ui-v2/assets/{utilities-B2JMf8iI.js → utilities-DxRXxFOF.js} +2 -2
- prefect/server/ui-v2/assets/{utilities-B2JMf8iI.js.map → utilities-DxRXxFOF.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool-filter-CZz0AJlt.js → work-pool-filter-PudrkZYj.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool-filter-CZz0AJlt.js.map → work-pool-filter-PudrkZYj.js.map} +1 -1
- prefect/server/ui-v2/assets/work-pool-queue-toggle-BAOrV_0R.js +2 -0
- prefect/server/ui-v2/assets/{work-pool-queue-toggle-D4eeo-hi.js.map → work-pool-queue-toggle-BAOrV_0R.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool._workPoolName-DrWddu9K.js → work-pool._workPoolName-BOM3849e.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool._workPoolName-DrWddu9K.js.map → work-pool._workPoolName-BOM3849e.js.map} +1 -1
- prefect/server/ui-v2/assets/work-pool_._workPoolName.edit-CIhcG6yr.js +2 -0
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-CA0ePjCk.js.map → work-pool_._workPoolName.edit-CIhcG6yr.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-DpUnE86v.js → work-pool_._workPoolName.queue._workQueueName-CjoM77tu.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-DpUnE86v.js.map → work-pool_._workPoolName.queue._workQueueName-CjoM77tu.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-queue-icon-text-BjiA7vAW.js → work-queue-icon-text-CP4yX3uM.js} +2 -2
- prefect/server/ui-v2/assets/{work-queue-icon-text-BjiA7vAW.js.map → work-queue-icon-text-CP4yX3uM.js.map} +1 -1
- prefect/server/ui-v2/index.html +2 -2
- prefect/task_engine.py +16 -0
- prefect/task_worker.py +98 -16
- prefect/testing/fixtures.py +18 -1
- {prefect-3.6.12.dist-info → prefect-3.6.13.dev2.dist-info}/METADATA +1 -1
- {prefect-3.6.12.dist-info → prefect-3.6.13.dev2.dist-info}/RECORD +211 -210
- prefect/server/ui-v2/assets/automation._id-IHh5QJwE.js +0 -2
- prefect/server/ui-v2/assets/block-type-logo-B31LJm5H.js +0 -2
- prefect/server/ui-v2/assets/block_._id.edit-CIhIBJrm.js +0 -2
- prefect/server/ui-v2/assets/catalog-CfniU0UV.js +0 -2
- prefect/server/ui-v2/assets/catalog_._slug-C9p86T4s.js +0 -2
- prefect/server/ui-v2/assets/catalog_._slug_.create-BhSunL__.js +0 -2
- prefect/server/ui-v2/assets/deployment._id-DVmqclRz.js +0 -2
- prefect/server/ui-v2/assets/deployment_._id.duplicate-DVMjpk5m.js +0 -2
- prefect/server/ui-v2/assets/deployment_._id.edit-Ck_P6KDn.js +0 -2
- prefect/server/ui-v2/assets/flow-run-graph-CfoPEAgQ.js +0 -2
- prefect/server/ui-v2/assets/flow-run-graph-CfoPEAgQ.js.map +0 -1
- prefect/server/ui-v2/assets/flow-run._id-C-qxwEBp.js +0 -4
- prefect/server/ui-v2/assets/flow-run._id-C-qxwEBp.js.map +0 -1
- prefect/server/ui-v2/assets/flow-run._id-OL0YhyLW.js +0 -2
- prefect/server/ui-v2/assets/flow-runs-pagination-DnwkJapB.js +0 -2
- prefect/server/ui-v2/assets/flow-runs-pagination-DnwkJapB.js.map +0 -1
- prefect/server/ui-v2/assets/flow._id-DhrCicwR.js +0 -2
- prefect/server/ui-v2/assets/index-7-r4ia_S.js +0 -2
- prefect/server/ui-v2/assets/index-7ThYp9SY.js +0 -2
- prefect/server/ui-v2/assets/index-B7zHzWQW.css +0 -1
- prefect/server/ui-v2/assets/index-B_3f8Hcb.js +0 -2
- prefect/server/ui-v2/assets/index-BiCd-Iuz.js +0 -2
- prefect/server/ui-v2/assets/index-BiCd-Iuz.js.map +0 -1
- prefect/server/ui-v2/assets/index-CT_nG86y.js +0 -2
- prefect/server/ui-v2/assets/index-Cs8eFQKw.js +0 -2
- prefect/server/ui-v2/assets/index-H6bwm6L6.js +0 -2
- prefect/server/ui-v2/assets/index-WYPZo52S.js +0 -17
- prefect/server/ui-v2/assets/index-WYPZo52S.js.map +0 -1
- prefect/server/ui-v2/assets/index-qPlIYf3i.js +0 -2
- prefect/server/ui-v2/assets/route-error-state-ALftyvGl.js +0 -2
- prefect/server/ui-v2/assets/settings-BL0X8cDU.js +0 -2
- prefect/server/ui-v2/assets/settings-BL0X8cDU.js.map +0 -1
- prefect/server/ui-v2/assets/table-CEAx-qHs.js +0 -2
- prefect/server/ui-v2/assets/table-CEAx-qHs.js.map +0 -1
- prefect/server/ui-v2/assets/tags-input-D1RJZEUA.js +0 -2
- prefect/server/ui-v2/assets/tags-input-D1RJZEUA.js.map +0 -1
- prefect/server/ui-v2/assets/task-run-concurrency-limits-reset-dialog-CG3den1B.js +0 -2
- prefect/server/ui-v2/assets/task-run._id-CnIVqU6v.js +0 -2
- prefect/server/ui-v2/assets/task-runs-pagination-DLSAz-Ur.js +0 -2
- prefect/server/ui-v2/assets/use-delete-automation-confirmation-dialog-Bzy2ML2T.js +0 -2
- prefect/server/ui-v2/assets/use-local-storage-CpxMp5wR.js +0 -2
- prefect/server/ui-v2/assets/use-local-storage-CpxMp5wR.js.map +0 -1
- prefect/server/ui-v2/assets/work-pool-queue-toggle-D4eeo-hi.js +0 -2
- prefect/server/ui-v2/assets/work-pool_._workPoolName.edit-CA0ePjCk.js +0 -2
- {prefect-3.6.12.dist-info → prefect-3.6.13.dev2.dist-info}/WHEEL +0 -0
- {prefect-3.6.12.dist-info → prefect-3.6.13.dev2.dist-info}/entry_points.txt +0 -0
- {prefect-3.6.12.dist-info → prefect-3.6.13.dev2.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{bF as y,aU as N,G as C,cm as S,Z as k,_ as D,$ as R,a0 as w,i as v,ap as I,o as E,a2 as L,p as b}from"./index-WYPZo52S.js";import{r,J as O,j as e}from"./vendor-tanstack-BK8oseNA.js";import{I as M,Z as j}from"./vendor-date-7GxEwcQM.js";import{S as B}from"./index-DSaSov8V.js";const F=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]],W=y("rows-3",F),Z=({logs:s,taskRun:t,onBottomReached:n,virtualize:d=!0,className:h})=>{const c=r.useRef(null),i=r.useRef(s);i.current=s;const m=r.useCallback(a=>i.current[a]?.id??a,[]),o=O({count:s.length,getScrollElement:()=>c.current,estimateSize:()=>75,overscan:5,getItemKey:m}),g=r.useCallback(a=>{a&&o.measureElement(a)},[o]),x=d?o.getVirtualItems():Array.from({length:s.length},(a,l)=>({index:l,size:75,start:l*75})),u=x.at(-1)?.index;r.useEffect(()=>{u!==void 0&&u>=s.length-1&&n()},[s.length,u,n]);const p=a=>{if(a===0)return!0;const l=s[a-1],f=s[a];return!M(l.timestamp,f.timestamp)};return s.length===0?e.jsx("div",{className:"flex flex-col gap-2 bg-muted p-2 rounded-md font-mono",children:e.jsx("span",{className:"text-muted-foreground",children:"No logs found"})}):e.jsx("div",{ref:c,className:N("bg-muted rounded-md font-mono p-4 overflow-y-auto",h),role:"log",children:e.jsx("ol",{className:"relative",style:{height:`${o.getTotalSize()}px`},children:x.map(a=>{const l=s[a.index],f=p(a.index);return e.jsxs("li",{"data-index":a.index,ref:g,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${a.start}px)`},children:[f&&e.jsx(A,{date:new Date(l.timestamp)}),e.jsx(T,{log:l,taskRunName:t?.name})]},l.id)})})})},T=({log:s,taskRunName:t})=>e.jsxs("div",{className:"grid grid-cols-[84px_minmax(0,1fr)_150px] gap-2 text-sm",children:[e.jsx("div",{children:e.jsx(_,{level:s.level})}),e.jsx("div",{className:"select-auto whitespace-pre-wrap break-words",children:s.message}),e.jsxs("div",{className:"text-xs grid grid-cols-1 gap-1 justify-items-end text-muted-foreground truncate",children:[e.jsx("span",{children:j(s.timestamp,"pp")}),t&&e.jsx("span",{children:t}),e.jsx("span",{className:"font-bold break-all whitespace-normal",children:s.name})]})]}),U=S("gap-1",{variants:{level:{CRITICAL:"bg-red-600 text-red-50 hover:bg-red-600",ERROR:"bg-red-600 text-red-50 hover:bg-red-600",WARNING:"bg-orange-600 text-orange-50 hover:bg-orange-600",INFO:"bg-sky-600 text-blue-50 hover:bg-sky-600",DEBUG:"bg-gray-700 text-gray-50 hover:bg-gray-700",CUSTOM:"bg-gray-700 text-gray-50 hover:bg-gray-700"}}}),_=({level:s})=>{const t=z(s);return e.jsx(C,{className:U({level:t}),children:t})};function z(s){const[t]=s.toString();switch(t){case"5":return"CRITICAL";case"4":return"ERROR";case"3":return"WARNING";case"2":return"INFO";case"1":return"DEBUG";default:return"CUSTOM"}}const A=({date:s})=>e.jsxs("div",{className:"flex flex-row justify-center items-center gap-2",children:[e.jsx("div",{className:"h-[1px] w-full bg-muted-foreground/30"}),e.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:j(s,"MMM d, yyyy")}),e.jsx("div",{className:"h-[1px] w-full bg-muted-foreground/30"})]}),J=({open:s,onOpenChange:t,currentState:n,label:d,onConfirm:h,isLoading:c=!1})=>{const[i,m]=r.useState(void 0),[o,g]=r.useState("");r.useEffect(()=>{s||(m(void 0),g(""))},[s]);const x=()=>{i&&h({type:i,message:o||void 0})},u=!i||c;return e.jsx(k,{open:s,onOpenChange:t,children:e.jsxs(D,{"aria-describedby":void 0,children:[e.jsx(R,{children:e.jsxs(w,{children:["Change ",d," State"]})}),e.jsxs("div",{className:"space-y-4",children:[n&&e.jsxs("div",{children:[e.jsx(v,{className:"mb-2 block",children:"Current State"}),e.jsx(I,{type:n.type,name:n.name})]}),e.jsxs("div",{children:[e.jsx(v,{htmlFor:"desired-state",className:"mb-2 block",children:"Desired State"}),e.jsx(B,{value:i,onValueChange:m,terminalOnly:!0})]}),e.jsxs("div",{children:[e.jsx(v,{htmlFor:"message",className:"mb-2 block",children:"Reason (Optional)"}),e.jsx(E,{id:"message",value:o,onChange:p=>g(p.target.value),placeholder:"State changed manually via UI"})]})]}),e.jsxs(L,{children:[e.jsx(b,{type:"button",variant:"outline",onClick:()=>t(!1),disabled:c,children:"Close"}),e.jsx(b,{type:"button",onClick:x,disabled:u,loading:c,children:"Change"})]})]})})},K=()=>{const[s,t]=r.useState(!1),n=r.useCallback(()=>t(!0),[]),d=r.useCallback(()=>t(!1),[]);return{open:s,onOpenChange:t,openDialog:n,closeDialog:d}};export{J as C,W as R,Z as a,K as u};
|
|
2
|
-
//# sourceMappingURL=index-qPlIYf3i.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as s,j as e}from"./vendor-tanstack-BK8oseNA.js";import{C as f,n as R,cb as h,p,cc as g,aU as j}from"./index-WYPZo52S.js";const N=5e3,v=3e4;function u(a){const t=N*2**a;return Math.min(t,v)}function E({error:a,onRetry:t}){const r=s.useRef(0),[m,c]=s.useState(u(0)/1e3),[l,n]=s.useState(!1),d=s.useCallback(()=>{n(!0),t(),r.current+=1;const i=u(r.current);c(i/1e3),setTimeout(()=>n(!1),500)},[t]),x=s.useCallback(()=>{n(!0),t(),r.current=0,c(u(0)/1e3),setTimeout(()=>n(!1),500)},[t]);return s.useEffect(()=>{const i=setInterval(()=>{c(o=>o<=1?(d(),o):o-1)},1e3);return()=>clearInterval(i)},[d]),e.jsx(f,{className:"mx-auto max-w-md",children:e.jsxs(R,{className:"flex flex-col items-center gap-4 pt-6 text-center",children:[e.jsx("div",{className:"rounded-full bg-destructive/10 p-3",children:e.jsx(h,{className:"size-8 text-destructive"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-lg font-semibold",children:a.message}),a.details&&e.jsx("p",{className:"text-sm text-muted-foreground",children:a.details})]}),e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsxs(p,{onClick:x,disabled:l,variant:"outline",className:"gap-2",children:[e.jsx(g,{className:j("size-4",l&&"animate-spin")}),l?"Retrying...":"Retry"]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Retrying in ",m,"s"]})]})]})})}export{E as R};
|
|
2
|
-
//# sourceMappingURL=route-error-state-ALftyvGl.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as e,p as c}from"./vendor-tanstack-BK8oseNA.js";import{S as d,a as n,b as i,c as m,d as x,e as p,f as h,B as u,g as j,h as g,L as v,z as b,i as t,I as l,j as f,k as S}from"./index-WYPZo52S.js";import{u as N}from"./use-local-storage-CpxMp5wR.js";import{R as y,a as o}from"./radio-group-DkAK0M2h.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CznP1SOq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-forms-DxqqmhL5.js";import"./vendor-date-7GxEwcQM.js";const C=["default","achromatopsia","deuteranopia","deuteranomaly","protaponia","protanomaly","tritanomaly","tritanopia"],k=()=>{const[s,r]=N("prefect-color-mode","default");return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{htmlFor:"color-mode-select",children:"Color Mode"}),e.jsxs(d,{value:s,onValueChange:a=>r(a),children:[e.jsx(n,{className:"w-96",id:"color-mode-select",children:e.jsx(i,{placeholder:"Select a color mode"})}),e.jsx(m,{children:e.jsx(x,{children:C.map(a=>e.jsx(p,{value:a,children:h(a)},a))})})]})]})},L=({version:s})=>e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx(u,{children:e.jsx(j,{children:e.jsx(g,{className:"text-xl font-semibold",children:"Settings"})})}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Version"}),e.jsx("div",{className:"text-xs",children:s})]})]}),w=({settings:s})=>e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{htmlFor:"server-settings",children:"Server Settings"}),e.jsx(v,{id:"server-settings",className:"p-2 rounded-sm",value:JSON.stringify(s,null,2),disabled:!0,hideLineNumbers:!0})]}),F=()=>{const{theme:s,setTheme:r}=b();return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{htmlFor:"color-mode-select",children:"Theme"}),e.jsx("div",{className:"space-y-3",children:e.jsxs(y,{value:s,onValueChange:r,className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{children:[e.jsx(o,{value:"light",id:"light",className:"peer sr-only"}),e.jsxs(t,{htmlFor:"light",className:"flex items-center space-x-2 rounded-md border-2 border-muted bg-popover p-4 hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary cursor-pointer",children:[e.jsx(l,{id:"Sun",className:"h-6 w-6"}),e.jsx("span",{children:"Light"})]})]}),e.jsxs("div",{children:[e.jsx(o,{value:"dark",id:"dark",className:"peer sr-only"}),e.jsxs(t,{htmlFor:"dark",className:"flex items-center space-x-2 rounded-md border-2 border-muted bg-popover p-4 hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary cursor-pointer",children:[e.jsx(l,{id:"Moon",className:"h-6 w-6"}),e.jsx("span",{children:"Dark"})]})]}),e.jsxs("div",{children:[e.jsx(o,{value:"system",id:"system",className:"peer sr-only"}),e.jsxs(t,{htmlFor:"system",className:"flex items-center space-x-2 rounded-md border-2 border-muted bg-popover p-4 hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary cursor-pointer",children:[e.jsx(l,{id:"Monitor",className:"h-6 w-6"}),e.jsx("span",{children:"System"})]})]})]})})]})},I=()=>{const{data:s}=c(f()),{data:r}=c(S());return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(L,{version:r}),e.jsx(F,{}),e.jsx(k,{}),e.jsx(w,{settings:s})]})},Q=I;export{Q as component};
|
|
2
|
-
//# sourceMappingURL=settings-BL0X8cDU.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"settings-BL0X8cDU.js","sources":["../../src/components/settings/color-mode-select.tsx","../../src/components/settings/heading.tsx","../../src/components/settings/server-settings.tsx","../../src/components/settings/theme-switch.tsx","../../src/components/settings/settings-page.tsx","../../src/routes/settings.tsx?tsr-split=component"],"sourcesContent":["import {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"@/components/ui/select\";\nimport { useLocalStorage } from \"@/hooks/use-local-storage\";\nimport { capitalize } from \"@/utils\";\n\n// TODO: Add colors in select content\nconst COLOR_MODES = [\n\t\"default\",\n\t\"achromatopsia\",\n\t\"deuteranopia\",\n\t\"deuteranomaly\",\n\t\"protaponia\",\n\t\"protanomaly\",\n\t\"tritanomaly\",\n\t\"tritanopia\",\n] as const;\ntype ColorMode = (typeof COLOR_MODES)[number];\n\nexport const ColorModeSelect = () => {\n\tconst [selectedColorMode, setSelectedColorMode] = useLocalStorage<ColorMode>(\n\t\t\"prefect-color-mode\",\n\t\t\"default\",\n\t);\n\treturn (\n\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t<label htmlFor=\"color-mode-select\">Color Mode</label>\n\t\t\t<Select\n\t\t\t\tvalue={selectedColorMode}\n\t\t\t\tonValueChange={(colorMode: ColorMode) =>\n\t\t\t\t\tsetSelectedColorMode(colorMode)\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<SelectTrigger className=\"w-96\" id=\"color-mode-select\">\n\t\t\t\t\t<SelectValue placeholder=\"Select a color mode\" />\n\t\t\t\t</SelectTrigger>\n\t\t\t\t<SelectContent>\n\t\t\t\t\t<SelectGroup>\n\t\t\t\t\t\t{COLOR_MODES.map((colorMode) => (\n\t\t\t\t\t\t\t<SelectItem key={colorMode} value={colorMode}>\n\t\t\t\t\t\t\t\t{capitalize(colorMode)}\n\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</SelectGroup>\n\t\t\t\t</SelectContent>\n\t\t\t</Select>\n\t\t</div>\n\t);\n};\n","import {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbList,\n} from \"@/components/ui/breadcrumb\";\n\ntype HeadingProps = {\n\tversion: string;\n};\n\nexport const Heading = ({ version }: HeadingProps) => {\n\treturn (\n\t\t<div className=\"flex justify-between items-center\">\n\t\t\t<Breadcrumb>\n\t\t\t\t<BreadcrumbList>\n\t\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t\tSettings\n\t\t\t\t\t</BreadcrumbItem>\n\t\t\t\t</BreadcrumbList>\n\t\t\t</Breadcrumb>\n\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t<div className=\"text-xs text-muted-foreground\">Version</div>\n\t\t\t\t<div className=\"text-xs\">{version}</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n","import { LazyJsonInput as JsonInput } from \"@/components/ui/json-input-lazy\";\n\ntype ServerSettingsProps = {\n\tsettings: Record<string, unknown>;\n};\n\nexport const ServerSettings = ({ settings }: ServerSettingsProps) => {\n\treturn (\n\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t<label htmlFor=\"server-settings\">Server Settings</label>\n\t\t\t<JsonInput\n\t\t\t\tid=\"server-settings\"\n\t\t\t\tclassName=\"p-2 rounded-sm\"\n\t\t\t\tvalue={JSON.stringify(settings, null, 2)}\n\t\t\t\tdisabled\n\t\t\t\thideLineNumbers\n\t\t\t/>\n\t\t</div>\n\t);\n};\n","import { useTheme } from \"next-themes\";\nimport { Icon } from \"@/components/ui/icons\";\nimport { Label } from \"@/components/ui/label\";\nimport { RadioGroup, RadioGroupItem } from \"@/components/ui/radio-group\";\n\nexport const ThemeSwitch = () => {\n\tconst { theme, setTheme } = useTheme();\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t<label htmlFor=\"color-mode-select\">Theme</label>\n\t\t\t<div className=\"space-y-3\">\n\t\t\t\t<RadioGroup\n\t\t\t\t\tvalue={theme}\n\t\t\t\t\tonValueChange={setTheme}\n\t\t\t\t\tclassName=\"grid grid-cols-3 gap-4\"\n\t\t\t\t>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<RadioGroupItem value=\"light\" id=\"light\" className=\"peer sr-only\" />\n\t\t\t\t\t\t<Label\n\t\t\t\t\t\t\thtmlFor=\"light\"\n\t\t\t\t\t\t\tclassName=\"flex items-center space-x-2 rounded-md border-2 border-muted bg-popover p-4 hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary cursor-pointer\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Icon id=\"Sun\" className=\"h-6 w-6\" />\n\t\t\t\t\t\t\t<span>Light</span>\n\t\t\t\t\t\t</Label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<RadioGroupItem value=\"dark\" id=\"dark\" className=\"peer sr-only\" />\n\t\t\t\t\t\t<Label\n\t\t\t\t\t\t\thtmlFor=\"dark\"\n\t\t\t\t\t\t\tclassName=\"flex items-center space-x-2 rounded-md border-2 border-muted bg-popover p-4 hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary cursor-pointer\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Icon id=\"Moon\" className=\"h-6 w-6\" />\n\t\t\t\t\t\t\t<span>Dark</span>\n\t\t\t\t\t\t</Label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<RadioGroupItem\n\t\t\t\t\t\t\tvalue=\"system\"\n\t\t\t\t\t\t\tid=\"system\"\n\t\t\t\t\t\t\tclassName=\"peer sr-only\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Label\n\t\t\t\t\t\t\thtmlFor=\"system\"\n\t\t\t\t\t\t\tclassName=\"flex items-center space-x-2 rounded-md border-2 border-muted bg-popover p-4 hover:bg-accent hover:text-accent-foreground peer-data-[state=checked]:border-primary cursor-pointer\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Icon id=\"Monitor\" className=\"h-6 w-6\" />\n\t\t\t\t\t\t\t<span>System</span>\n\t\t\t\t\t\t</Label>\n\t\t\t\t\t</div>\n\t\t\t\t</RadioGroup>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n","import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { buildGetSettingsQuery, buildGetVersionQuery } from \"@/api/admin\";\n\nimport { ColorModeSelect } from \"./color-mode-select\";\nimport { Heading } from \"./heading\";\nimport { ServerSettings } from \"./server-settings\";\nimport { ThemeSwitch } from \"./theme-switch\";\n\nexport const SettingsPage = () => {\n\tconst { data: settingsData } = useSuspenseQuery(buildGetSettingsQuery());\n\tconst { data: versionData } = useSuspenseQuery(buildGetVersionQuery());\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<Heading version={versionData} />\n\t\t\t<ThemeSwitch />\n\t\t\t<ColorModeSelect />\n\t\t\t{/** nb: open API needs to update schema */}\n\t\t\t<ServerSettings settings={settingsData as Record<string, unknown>} />\n\t\t</div>\n\t);\n};\n","import { createFileRoute } from \"@tanstack/react-router\";\nimport { buildGetSettingsQuery, buildGetVersionQuery } from \"@/api/admin\";\nimport { SettingsPage } from \"@/components/settings/settings-page\";\n\nexport const Route = createFileRoute(\"/settings\")({\n\tcomponent: SettingsPage,\n\tloader: ({ context }) =>\n\t\tPromise.all([\n\t\t\tcontext.queryClient.ensureQueryData(buildGetSettingsQuery()),\n\t\t\tcontext.queryClient.ensureQueryData(buildGetVersionQuery()),\n\t\t]),\n\twrapInSuspense: true,\n});\n"],"names":["COLOR_MODES","ColorModeSelect","selectedColorMode","setSelectedColorMode","useLocalStorage","jsxs","jsx","Select","colorMode","SelectTrigger","SelectValue","SelectContent","SelectGroup","SelectItem","capitalize","Heading","version","Breadcrumb","BreadcrumbList","BreadcrumbItem","ServerSettings","settings","JsonInput","ThemeSwitch","theme","setTheme","useTheme","RadioGroup","RadioGroupItem","Label","Icon","SettingsPage","settingsData","useSuspenseQuery","buildGetSettingsQuery","versionData","buildGetVersionQuery","SplitComponent"],"mappings":"oeAYA,MAAMA,EAAc,CACnB,UACA,gBACA,eACA,gBACA,aACA,cACA,cACA,YACD,EAGaC,EAAkB,IAAM,CACpC,KAAM,CAACC,EAAmBC,CAAoB,EAAIC,EACjD,qBACA,SAAA,EAED,OACCC,EAAAA,KAAC,MAAA,CAAI,UAAU,sBACd,SAAA,CAAAC,EAAAA,IAAC,QAAA,CAAM,QAAQ,oBAAoB,SAAA,aAAU,EAC7CD,EAAAA,KAACE,EAAA,CACA,MAAOL,EACP,cAAgBM,GACfL,EAAqBK,CAAS,EAG/B,SAAA,CAAAF,EAAAA,IAACG,EAAA,CAAc,UAAU,OAAO,GAAG,oBAClC,SAAAH,EAAAA,IAACI,EAAA,CAAY,YAAY,qBAAA,CAAsB,CAAA,CAChD,QACCC,EAAA,CACA,SAAAL,EAAAA,IAACM,GACC,SAAAZ,EAAY,IAAKQ,GACjBF,MAACO,EAAA,CAA2B,MAAOL,EACjC,SAAAM,EAAWN,CAAS,GADLA,CAEjB,CACA,EACF,CAAA,CACD,CAAA,CAAA,CAAA,CACD,EACD,CAEF,EC3CaO,EAAU,CAAC,CAAE,QAAAC,KAExBX,EAAAA,KAAC,MAAA,CAAI,UAAU,oCACd,SAAA,CAAAC,EAAAA,IAACW,EAAA,CACA,eAACC,EAAA,CACA,SAAAZ,EAAAA,IAACa,GAAe,UAAU,wBAAwB,SAAA,UAAA,CAElD,CAAA,CACD,EACD,EACAd,EAAAA,KAAC,MAAA,CAAI,UAAU,sBACd,SAAA,CAAAC,EAAAA,IAAC,MAAA,CAAI,UAAU,gCAAgC,SAAA,UAAO,EACtDA,EAAAA,IAAC,MAAA,CAAI,UAAU,UAAW,SAAAU,CAAA,CAAQ,CAAA,CAAA,CACnC,CAAA,EACD,EClBWI,EAAiB,CAAC,CAAE,SAAAC,KAE/BhB,EAAAA,KAAC,MAAA,CAAI,UAAU,sBACd,SAAA,CAAAC,EAAAA,IAAC,QAAA,CAAM,QAAQ,kBAAkB,SAAA,kBAAe,EAChDA,EAAAA,IAACgB,EAAA,CACA,GAAG,kBACH,UAAU,iBACV,MAAO,KAAK,UAAUD,EAAU,KAAM,CAAC,EACvC,SAAQ,GACR,gBAAe,EAAA,CAAA,CAChB,EACD,ECZWE,EAAc,IAAM,CAChC,KAAM,CAAE,MAAAC,EAAO,SAAAC,CAAA,EAAaC,EAAA,EAE5B,OACCrB,EAAAA,KAAC,MAAA,CAAI,UAAU,sBACd,SAAA,CAAAC,EAAAA,IAAC,QAAA,CAAM,QAAQ,oBAAoB,SAAA,QAAK,EACxCA,EAAAA,IAAC,MAAA,CAAI,UAAU,YACd,SAAAD,EAAAA,KAACsB,EAAA,CACA,MAAOH,EACP,cAAeC,EACf,UAAU,yBAEV,SAAA,CAAApB,OAAC,MAAA,CACA,SAAA,CAAAC,MAACsB,GAAe,MAAM,QAAQ,GAAG,QAAQ,UAAU,eAAe,EAClEvB,EAAAA,KAACwB,EAAA,CACA,QAAQ,QACR,UAAU,mLAEV,SAAA,CAAAvB,EAAAA,IAACwB,EAAA,CAAK,GAAG,MAAM,UAAU,UAAU,EACnCxB,EAAAA,IAAC,QAAK,SAAA,OAAA,CAAK,CAAA,CAAA,CAAA,CACZ,EACD,SACC,MAAA,CACA,SAAA,CAAAA,MAACsB,GAAe,MAAM,OAAO,GAAG,OAAO,UAAU,eAAe,EAChEvB,EAAAA,KAACwB,EAAA,CACA,QAAQ,OACR,UAAU,mLAEV,SAAA,CAAAvB,EAAAA,IAACwB,EAAA,CAAK,GAAG,OAAO,UAAU,UAAU,EACpCxB,EAAAA,IAAC,QAAK,SAAA,MAAA,CAAI,CAAA,CAAA,CAAA,CACX,EACD,SACC,MAAA,CACA,SAAA,CAAAA,EAAAA,IAACsB,EAAA,CACA,MAAM,SACN,GAAG,SACH,UAAU,cAAA,CAAA,EAEXvB,EAAAA,KAACwB,EAAA,CACA,QAAQ,SACR,UAAU,mLAEV,SAAA,CAAAvB,EAAAA,IAACwB,EAAA,CAAK,GAAG,UAAU,UAAU,UAAU,EACvCxB,EAAAA,IAAC,QAAK,SAAA,QAAA,CAAM,CAAA,CAAA,CAAA,CACb,CAAA,CACD,CAAA,CAAA,CAAA,CACD,CACD,CAAA,EACD,CAEF,EC/CayB,EAAe,IAAM,CACjC,KAAM,CAAE,KAAMC,CAAA,EAAiBC,EAAiBC,GAAuB,EACjE,CAAE,KAAMC,CAAA,EAAgBF,EAAiBG,GAAsB,EAErE,OACC/B,EAAAA,KAAC,MAAA,CAAI,UAAU,sBACd,SAAA,CAAAC,EAAAA,IAACS,EAAA,CAAQ,QAASoB,CAAA,CAAa,QAC9BZ,EAAA,EAAY,QACZtB,EAAA,EAAgB,EAEjBK,EAAAA,IAACc,EAAA,CAAe,SAAUY,CAAA,CAAyC,CAAA,EACpE,CAEF,ECnBmEK,EAA1DN"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./vendor-tanstack-BK8oseNA.js";import{aU as l}from"./index-WYPZo52S.js";function r({className:a,...e}){return t.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:t.jsx("table",{"data-slot":"table",className:l("w-full caption-bottom text-sm",a),...e})})}function d({className:a,...e}){return t.jsx("thead",{"data-slot":"table-header",className:l("[&_tr]:border-b",a),...e})}function n({className:a,...e}){return t.jsx("tbody",{"data-slot":"table-body",className:l("[&_tr:last-child]:border-0",a),...e})}function c({className:a,...e}){return t.jsx("tr",{"data-slot":"table-row",className:l("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",a),...e})}function b({className:a,...e}){return t.jsx("th",{"data-slot":"table-head",className:l("text-muted-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...e})}function i({className:a,...e}){return t.jsx("td",{"data-slot":"table-cell",className:l("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...e})}export{r as T,d as a,c as b,b as c,n as d,i as e};
|
|
2
|
-
//# sourceMappingURL=table-CEAx-qHs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"table-CEAx-qHs.js","sources":["../../src/components/ui/table.tsx"],"sourcesContent":["import type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nfunction Table({ className, ...props }: React.ComponentProps<\"table\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"table-container\"\n\t\t\tclassName=\"relative w-full overflow-x-auto\"\n\t\t>\n\t\t\t<table\n\t\t\t\tdata-slot=\"table\"\n\t\t\t\tclassName={cn(\"w-full caption-bottom text-sm\", className)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<\"thead\">) {\n\treturn (\n\t\t<thead\n\t\t\tdata-slot=\"table-header\"\n\t\t\tclassName={cn(\"[&_tr]:border-b\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<\"tbody\">) {\n\treturn (\n\t\t<tbody\n\t\t\tdata-slot=\"table-body\"\n\t\t\tclassName={cn(\"[&_tr:last-child]:border-0\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<\"tfoot\">) {\n\treturn (\n\t\t<tfoot\n\t\t\tdata-slot=\"table-footer\"\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-muted/50 border-t font-medium [&>tr]:last:border-b-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<\"tr\">) {\n\treturn (\n\t\t<tr\n\t\t\tdata-slot=\"table-row\"\n\t\t\tclassName={cn(\n\t\t\t\t\"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<\"th\">) {\n\treturn (\n\t\t<th\n\t\t\tdata-slot=\"table-head\"\n\t\t\tclassName={cn(\n\t\t\t\t\"text-muted-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<\"td\">) {\n\treturn (\n\t\t<td\n\t\t\tdata-slot=\"table-cell\"\n\t\t\tclassName={cn(\n\t\t\t\t\"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction TableCaption({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"caption\">) {\n\treturn (\n\t\t<caption\n\t\t\tdata-slot=\"table-caption\"\n\t\t\tclassName={cn(\"text-muted-foreground mt-4 text-sm\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tTable,\n\tTableHeader,\n\tTableBody,\n\tTableFooter,\n\tTableHead,\n\tTableRow,\n\tTableCell,\n\tTableCaption,\n};\n"],"names":["Table","className","props","jsx","cn","TableHeader","TableBody","TableRow","TableHead","TableCell"],"mappings":"2FAIA,SAASA,EAAM,CAAE,UAAAC,EAAW,GAAGC,GAAwC,CACtE,OACCC,EAAAA,IAAC,MAAA,CACA,YAAU,kBACV,UAAU,kCAEV,SAAAA,EAAAA,IAAC,QAAA,CACA,YAAU,QACV,UAAWC,EAAG,gCAAiCH,CAAS,EACvD,GAAGC,CAAA,CAAA,CACL,CAAA,CAGH,CAEA,SAASG,EAAY,CAAE,UAAAJ,EAAW,GAAGC,GAAwC,CAC5E,OACCC,EAAAA,IAAC,QAAA,CACA,YAAU,eACV,UAAWC,EAAG,kBAAmBH,CAAS,EACzC,GAAGC,CAAA,CAAA,CAGP,CAEA,SAASI,EAAU,CAAE,UAAAL,EAAW,GAAGC,GAAwC,CAC1E,OACCC,EAAAA,IAAC,QAAA,CACA,YAAU,aACV,UAAWC,EAAG,6BAA8BH,CAAS,EACpD,GAAGC,CAAA,CAAA,CAGP,CAeA,SAASK,EAAS,CAAE,UAAAN,EAAW,GAAGC,GAAqC,CACtE,OACCC,EAAAA,IAAC,KAAA,CACA,YAAU,YACV,UAAWC,EACV,8EACAH,CAAA,EAEA,GAAGC,CAAA,CAAA,CAGP,CAEA,SAASM,EAAU,CAAE,UAAAP,EAAW,GAAGC,GAAqC,CACvE,OACCC,EAAAA,IAAC,KAAA,CACA,YAAU,aACV,UAAWC,EACV,2JACAH,CAAA,EAEA,GAAGC,CAAA,CAAA,CAGP,CAEA,SAASO,EAAU,CAAE,UAAAR,EAAW,GAAGC,GAAqC,CACvE,OACCC,EAAAA,IAAC,KAAA,CACA,YAAU,aACV,UAAWC,EACV,yGACAH,CAAA,EAEA,GAAGC,CAAA,CAAA,CAGP"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as h,j as o}from"./vendor-tanstack-BK8oseNA.js";import{V as x,o as w}from"./index-WYPZo52S.js";const b=({onChange:r,value:t=[],onBlur:g,placeholder:a="Enter tags",...u}={})=>{const[e,i]=h.useState(""),l=n=>{i(n.target.value)},d=n=>{n.key==="Enter"&&e.trim()!==""?(n.preventDefault(),c(e.trim())):n.key==="Backspace"&&e===""&&t.length>0&&p(t.length-1)},f=n=>s=>{e.trim()!==""&&c(e.trim()),n?.(s)},c=n=>{if(!t.includes(n)){const s=[...t,n];i(""),r?.(s)}},p=n=>{const s=t.filter((T,m)=>m!==n);r?.(s)};return o.jsxs("div",{className:"flex items-center border rounded-md focus-within:ring-1 focus-within:ring-ring ",children:[o.jsx(x,{tags:t,onTagsChange:r,variant:"secondary"}),o.jsx(w,{type:"text",value:e,onChange:l,onKeyDown:d,onBlur:f(g),className:"grow border-none shadow-none focus-visible:ring-0 focus-visible:ring-offset-0",placeholder:a,"aria-label":a,...u})]})};export{b as T};
|
|
2
|
-
//# sourceMappingURL=tags-input-D1RJZEUA.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tags-input-D1RJZEUA.js","sources":["../../src/components/ui/tags-input.tsx"],"sourcesContent":["import type { ChangeEvent, FocusEvent, KeyboardEvent } from \"react\";\nimport { useState } from \"react\";\nimport { Input, type InputProps } from \"@/components/ui/input\";\nimport { TagBadgeGroup } from \"./tag-badge-group\";\n\nexport type TagsInputProps = Omit<InputProps, \"onChange\" | \"value\"> & {\n\tvalue?: string[];\n\tonChange?: (tags: string[]) => void;\n\tplaceholder?: string;\n};\n\nexport const TagsInput = ({\n\tonChange,\n\tvalue = [],\n\tonBlur,\n\tplaceholder = \"Enter tags\",\n\t...props\n}: TagsInputProps = {}) => {\n\tconst [inputValue, setInputValue] = useState(\"\");\n\n\tconst handleInputChange = (e: ChangeEvent<HTMLInputElement>) => {\n\t\tsetInputValue(e.target.value);\n\t};\n\n\tconst handleInputKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {\n\t\tif (e.key === \"Enter\" && inputValue.trim() !== \"\") {\n\t\t\te.preventDefault();\n\t\t\taddTag(inputValue.trim());\n\t\t} else if (e.key === \"Backspace\" && inputValue === \"\" && value.length > 0) {\n\t\t\tremoveTag(value.length - 1);\n\t\t}\n\t};\n\n\tconst handleInputBlur =\n\t\t(childOnBlur?: (e: FocusEvent<HTMLInputElement>) => void) =>\n\t\t(e: FocusEvent<HTMLInputElement>) => {\n\t\t\tif (inputValue.trim() !== \"\") {\n\t\t\t\taddTag(inputValue.trim());\n\t\t\t}\n\t\t\tchildOnBlur?.(e);\n\t\t};\n\n\tconst addTag = (tag: string) => {\n\t\tif (!value.includes(tag)) {\n\t\t\tconst newTags = [...value, tag];\n\t\t\tsetInputValue(\"\");\n\t\t\tonChange?.(newTags);\n\t\t}\n\t};\n\n\tconst removeTag = (index: number) => {\n\t\tconst newTags = value.filter((_, i) => i !== index);\n\t\tonChange?.(newTags);\n\t};\n\n\treturn (\n\t\t<div className=\"flex items-center border rounded-md focus-within:ring-1 focus-within:ring-ring \">\n\t\t\t<TagBadgeGroup tags={value} onTagsChange={onChange} variant=\"secondary\" />\n\t\t\t<Input\n\t\t\t\ttype=\"text\"\n\t\t\t\tvalue={inputValue}\n\t\t\t\tonChange={handleInputChange}\n\t\t\t\tonKeyDown={handleInputKeyDown}\n\t\t\t\tonBlur={handleInputBlur(onBlur)}\n\t\t\t\tclassName=\"grow border-none shadow-none focus-visible:ring-0 focus-visible:ring-offset-0\"\n\t\t\t\tplaceholder={placeholder}\n\t\t\t\taria-label={placeholder}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n"],"names":["TagsInput","onChange","value","onBlur","placeholder","props","inputValue","setInputValue","useState","handleInputChange","e","handleInputKeyDown","addTag","removeTag","handleInputBlur","childOnBlur","tag","newTags","index","_","i","jsxs","jsx","TagBadgeGroup","Input"],"mappings":"wGAWO,MAAMA,EAAY,CAAC,CACzB,SAAAC,EACA,MAAAC,EAAQ,CAAA,EACR,OAAAC,EACA,YAAAC,EAAc,aACd,GAAGC,CACJ,EAAoB,KAAO,CAC1B,KAAM,CAACC,EAAYC,CAAa,EAAIC,EAAAA,SAAS,EAAE,EAEzCC,EAAqBC,GAAqC,CAC/DH,EAAcG,EAAE,OAAO,KAAK,CAC7B,EAEMC,EAAsBD,GAAuC,CAC9DA,EAAE,MAAQ,SAAWJ,EAAW,KAAA,IAAW,IAC9CI,EAAE,eAAA,EACFE,EAAON,EAAW,MAAM,GACdI,EAAE,MAAQ,aAAeJ,IAAe,IAAMJ,EAAM,OAAS,GACvEW,EAAUX,EAAM,OAAS,CAAC,CAE5B,EAEMY,EACJC,GACAL,GAAoC,CAChCJ,EAAW,KAAA,IAAW,IACzBM,EAAON,EAAW,MAAM,EAEzBS,IAAcL,CAAC,CAChB,EAEKE,EAAUI,GAAgB,CAC/B,GAAI,CAACd,EAAM,SAASc,CAAG,EAAG,CACzB,MAAMC,EAAU,CAAC,GAAGf,EAAOc,CAAG,EAC9BT,EAAc,EAAE,EAChBN,IAAWgB,CAAO,CACnB,CACD,EAEMJ,EAAaK,GAAkB,CACpC,MAAMD,EAAUf,EAAM,OAAO,CAACiB,EAAGC,IAAMA,IAAMF,CAAK,EAClDjB,IAAWgB,CAAO,CACnB,EAEA,OACCI,EAAAA,KAAC,MAAA,CAAI,UAAU,kFACd,SAAA,CAAAC,MAACC,GAAc,KAAMrB,EAAO,aAAcD,EAAU,QAAQ,YAAY,EACxEqB,EAAAA,IAACE,EAAA,CACA,KAAK,OACL,MAAOlB,EACP,SAAUG,EACV,UAAWE,EACX,OAAQG,EAAgBX,CAAM,EAC9B,UAAU,gFACV,YAAAC,EACA,aAAYA,EACX,GAAGC,CAAA,CAAA,CACL,EACD,CAEF"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./vendor-tanstack-BK8oseNA.js";import{p as c,I as y,x as h,cP as k,Z as x,_ as g,$ as j,a0 as m,a1 as C,a2 as D,bf as p,cQ as T}from"./index-WYPZo52S.js";import{D as R,a as w,b as L,c as v,d as u}from"./dropdown-menu-xZ_3w9OP.js";const f=({id:n,onDelete:s,onReset:r})=>{const i=o=>{navigator.clipboard.writeText(o),h.success("ID copied")};return e.jsxs(R,{children:[e.jsx(w,{asChild:!0,children:e.jsxs(c,{variant:"outline",className:"size-8 p-0",children:[e.jsx("span",{className:"sr-only",children:"Open menu"}),e.jsx(y,{id:"MoreVertical",className:"size-4"})]})}),e.jsxs(L,{align:"end",children:[e.jsx(v,{children:"Actions"}),e.jsx(u,{onClick:()=>i(n),children:"Copy ID"}),e.jsx(u,{onClick:s,children:"Delete"}),e.jsx(u,{onClick:r,children:"Reset"})]})]})},S=({data:n,onOpenChange:s,onDelete:r})=>{const{deleteTaskRunConcurrencyLimit:i,isPending:o}=k(),t=l=>{i(l,{onSuccess:()=>{h.success("Concurrency limit deleted")},onError:a=>{const d=a.message||"Unknown error while deleting concurrency limit.";console.error(d)},onSettled:r})};return e.jsx(x,{open:!0,onOpenChange:s,children:e.jsxs(g,{children:[e.jsx(j,{children:e.jsx(m,{children:"Delete Concurrency Limit"})}),e.jsxs(C,{children:["Are you sure you want to delete ",n.tag]}),e.jsxs(D,{children:[e.jsx(p,{asChild:!0,children:e.jsx(c,{variant:"outline",children:"Close"})}),e.jsx(c,{variant:"destructive",onClick:()=>t(n.id),loading:o,children:"Delete"})]})]})})},A=({data:n,onOpenChange:s,onReset:r})=>{const{resetTaskRunConcurrencyLimitTag:i,isPending:o}=T(),t=l=>{i(l,{onSuccess:()=>{h.success("Concurrency limit reset")},onError:a=>{const d=a.message||"Unknown error while resetting concurrency limit.";console.error(d)},onSettled:r})};return e.jsx(x,{open:!0,onOpenChange:s,children:e.jsxs(g,{children:[e.jsx(j,{children:e.jsxs(m,{children:["Reset concurrency limit for tag ",n.tag]})}),e.jsx(C,{children:"This will reset the active task run count to 0."}),e.jsxs(D,{children:[e.jsx(p,{asChild:!0,children:e.jsx(c,{variant:"outline",children:"Close"})}),e.jsx(c,{onClick:()=>t(n.tag),loading:o,children:"Reset"})]})]})})};export{f as T,S as a,A as b};
|
|
2
|
-
//# sourceMappingURL=task-run-concurrency-limits-reset-dialog-CG3den1B.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./vendor-tanstack-BK8oseNA.js";import{r as s}from"./index-WYPZo52S.js";import{R as a}from"./route-error-state-ALftyvGl.js";import{o as i,e as m}from"./vendor-forms-DxqqmhL5.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CznP1SOq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-date-7GxEwcQM.js";i({tab:m(["Logs","Artifacts","TaskInputs","Details"]).default("Logs").catch("Logs")});function j({error:o,reset:t}){const e=s(o,"Failed to load task run");return r.jsxs("div",{className:"flex flex-col gap-4",children:[r.jsx("div",{children:r.jsx("h1",{className:"text-2xl font-semibold",children:"Task Run"})}),r.jsx(a,{error:e,onRetry:t})]})}export{j as errorComponent};
|
|
2
|
-
//# sourceMappingURL=task-run._id-CnIVqU6v.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as e,r as _,p as b}from"./vendor-tanstack-BK8oseNA.js";import{S,a as w,b as P,c as E,e as u,C as j,cm as $,aj as O,V as U,ap as W,am as q,an as H,B as X,g as K,h as x,bq as m,bz as g,aK as N,bS as v,bP as y,bQ as C,I as D,bR as I,aq as T,ak as J,p as Y,b3 as d,b4 as Z,b5 as R,b6 as o,cn as ee,b7 as se,b8 as te,co as ae}from"./index-WYPZo52S.js";const he=({defaultValue:t,value:a,onSelect:s})=>e.jsxs(S,{defaultValue:t,value:a,onValueChange:s,children:[e.jsx(w,{"aria-label":"Task run sort order",className:"w-full",children:e.jsx(P,{placeholder:"Sort by"})}),e.jsxs(E,{children:[e.jsx(u,{value:"EXPECTED_START_TIME_DESC",children:"Newest to oldest"}),e.jsx(u,{value:"EXPECTED_START_TIME_ASC",children:"Oldest to newest"})]})]}),L=({taskRun:t,flow:a,flowRun:s,checked:r,onCheckedChange:l})=>{const i=typeof l=="function";return e.jsxs(j,{className:re({state:t.state?.type}),children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[i&&e.jsx(O,{checked:r??!1,onCheckedChange:l}),e.jsx(le,{taskRun:t,flow:a,flowRun:s})]}),e.jsx("div",{children:e.jsx(U,{tags:t.tags??[]})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[t.state&&e.jsx(W,{type:t.state.type,name:t.state.name}),e.jsx(ie,{taskRun:t}),e.jsx(ne,{taskRun:t})]})]})},re=$("flex flex-col gap-2 p-4 border-l-8",{variants:{state:{COMPLETED:"border-l-green-600",FAILED:"border-l-red-600",RUNNING:"border-l-blue-700",CANCELLED:"border-l-gray-800",CANCELLING:"border-l-gray-800",CRASHED:"border-l-orange-600",PAUSED:"border-l-gray-800",PENDING:"border-l-gray-800",SCHEDULED:"border-l-yellow-700"}}}),le=({taskRun:t,flow:a,flowRun:s})=>e.jsx("div",{className:"flex items-center",children:e.jsx(X,{children:e.jsxs(K,{children:[a&&e.jsxs(e.Fragment,{children:[e.jsx(x,{children:e.jsx(m,{to:"/flows/flow/$id",params:{id:a.id},className:"font-semibold text-foreground",children:a.name})}),e.jsx(g,{})]}),s&&e.jsxs(e.Fragment,{children:[e.jsx(x,{children:e.jsx(m,{to:"/runs/flow-run/$id",params:{id:s.id},children:s.name})}),e.jsx(g,{})]}),e.jsx(x,{className:"font-bold text-foreground",children:e.jsx(m,{to:"/runs/task-run/$id",params:{id:t.id},children:t.name})})]})})}),ie=({taskRun:t})=>{const a="start_time"in t?t.start_time:null,s="expected_start_time"in t?t.expected_start_time:null,{text:r,tooltipText:l}=_.useMemo(()=>{let i,n;return a?(i=N(a,"dateTimeNumeric"),n=new Date(a).toString()):s&&(i=`Scheduled for ${N(s,"dateTimeNumeric")}`,n=new Date(s).toString()),{text:i,tooltipText:n}},[s,a]);return e.jsx(v,{children:e.jsxs(y,{children:[e.jsx(C,{asChild:!0,disabled:!r,children:e.jsxs("div",{className:"text-xs font-mono flex gap-2 items-center",children:[e.jsx(D,{id:"Calendar",className:"size-4"}),r??"No start time"]})}),e.jsx(I,{children:l})]})})},ne=({taskRun:t})=>{const a="estimated_run_time"in t?t.estimated_run_time:null,s="total_run_time"in t?t.total_run_time:null,r=a??s??0;if(r===0)return null;const l=T(r*1e3,{maxDecimalPoints:2,units:["h","m","s"],round:!0}),i=T(r*1e3,{maxDecimalPoints:5,units:["h","m","s"]});return e.jsx(v,{children:e.jsxs(y,{children:[e.jsx(C,{asChild:!0,children:e.jsxs("div",{className:"flex gap-2 items-center text-xs font-mono",children:[e.jsx(D,{id:"Clock",className:"size-4"}),l]})}),e.jsx(I,{children:i})]})})},ce=({taskRun:t,flowRunId:a,checked:s,onCheckedChange:r})=>{const{data:l}=b(q(a)),{data:i}=b(H(l.flow_id));return e.jsx(L,{taskRun:t,flow:i,flowRun:l,checked:s,onCheckedChange:r})},de=({taskRun:t,checked:a,onCheckedChange:s})=>{const r=t.flow_run_id;return r?e.jsx(ce,{taskRun:t,flowRunId:r,checked:a,onCheckedChange:s}):e.jsx(L,{taskRun:t,checked:a,onCheckedChange:s})},oe=({taskRun:t,checked:a,onCheckedChange:s})=>e.jsx(_.Suspense,{fallback:e.jsxs(j,{className:"flex flex-col gap-2 p-4 border-l-8 border-l-gray-300 animate-pulse",children:[e.jsx("div",{className:"h-5 bg-gray-200 rounded w-1/3"}),e.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/4"})]}),children:e.jsx(de,{taskRun:t,checked:a,onCheckedChange:s})}),fe=({taskRuns:t,onClearFilters:a,onSelect:s,selectedRows:r})=>t?t.length===0?e.jsx("div",{className:"flex justify-center py-4",children:e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(J,{children:"No runs found"}),a&&e.jsx(Y,{onClick:a,children:"Clear Filters"})]})}):e.jsx("ul",{className:"flex flex-col gap-2",children:t.map(l=>e.jsx("li",{children:e.jsx(oe,{taskRun:l,checked:r?.has(l.id),onCheckedChange:s?i=>s(l.id,i):void 0})},l.id))}):e.jsx(xe,{numSkeletons:5}),xe=({numSkeletons:t=1})=>e.jsx("ul",{className:"flex flex-col gap-1",children:Array.from({length:t}).map((a,s)=>e.jsx("li",{children:e.jsxs(j,{className:"flex flex-col gap-2 p-4",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx(d,{className:"h-4 w-[350px]"}),e.jsx(d,{className:"h-4 w-[400px]"})]}),e.jsx(d,{className:"h-4 w-[400px]"}),e.jsx(d,{className:"h-4 w-[200px]"})]})},s))}),me=[5,10,25,50,100],pe=({count:t,pages:a,pagination:s,onChangePagination:r,onPrefetchPage:l})=>{const i=()=>r({limit:s.limit,page:1}),n=()=>r({limit:s.limit,page:s.page-1}),B=()=>r({limit:s.limit,page:s.page+1}),A=()=>r({limit:s.limit,page:a}),M=()=>{s.page>1&&l?.(1)},F=()=>{s.page>1&&l?.(s.page-1)},G=()=>{s.page<a&&l?.(s.page+1)},V=()=>{s.page<a&&l?.(a)},h=s.page<=1,f=s.page>=a,k=c=>{const p=Number(c),z=Math.ceil(t/p),Q=Math.min(s.page,z);r({limit:p,page:Q})};return e.jsxs("div",{className:"flex flex-row justify-between items-center",children:[e.jsxs("div",{className:"flex flex-row items-center gap-2 text-xs text-muted-foreground",children:[e.jsx("span",{className:"whitespace-nowrap",children:"Items per page"}),e.jsxs(S,{value:String(s.limit),onValueChange:k,children:[e.jsx(w,{"aria-label":"Items per page",children:e.jsx(P,{placeholder:"Theme"})}),e.jsx(E,{children:me.map(c=>e.jsx(u,{value:String(c),children:c},c))})]})]}),e.jsx(Z,{className:"justify-end",children:e.jsxs(R,{children:[e.jsxs(o,{children:[e.jsx(ee,{onClick:i,onMouseEnter:M,disabled:h}),e.jsx(se,{onClick:n,onMouseEnter:F,disabled:h})]}),e.jsxs(o,{className:"text-sm",children:["Page ",a===0?0:s.page," of ",a]}),e.jsx(o,{children:e.jsx(te,{onClick:B,onMouseEnter:G,disabled:f})}),e.jsx(o,{children:e.jsx(ae,{onClick:A,onMouseEnter:V,disabled:f})})]})})]})};export{he as T,pe as a,fe as b};
|
|
2
|
-
//# sourceMappingURL=task-runs-pagination-DLSAz-Ur.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as z,j as t,L as m,r as Y,p as oe,s as re,E as ae,u as ce}from"./vendor-tanstack-BK8oseNA.js";import{bn as ie,cL as le,K as B,c_ as ue,d1 as de,C as G,ak as u,ap as K,I as j,Z as pe,bf as me,p as H,f as fe,_ as he,$ as xe,a0 as ye,L as je,b3 as N,cJ as we,d4 as v,V as ke,d5 as Ae,M as _,d2 as _e,d6 as De,F as be,x as D,by as Se,d7 as ge}from"./index-WYPZo52S.js";import{F as Te,W as Ee,a as Ne}from"./work-queue-icon-text-BjiA7vAW.js";import{D as ve,a as Re,b as Ce,c as Le,d as k}from"./dropdown-menu-xZ_3w9OP.js";import{u as Pe}from"./use-delete-confirmation-dialog-CvQEyyhU.js";const We=e=>{const{automationIds:s,blockDocumentIds:n,deploymentIds:o,workPoolIds:c,workQueueIds:a}=Qe(e.actions),{data:r,loading:i}=qe(Array.from(s)),l=z({queries:[ie({offset:0,sort:"BLOCK_TYPE_AND_NAME_ASC",include_secrets:!1,block_documents:{operator:"and_",id:{any_:Array.from(n)},is_anonymous:{}}},{enabled:n.size>0}),le({offset:0,sort:"CREATED_DESC",deployments:{id:{any_:Array.from(o)},operator:"and_"}},{enabled:o.size>0}),B({offset:0,work_pools:{id:{any_:Array.from(c)},operator:"and_"}},{enabled:c.size>0}),ue({offset:0,work_queues:{id:{any_:Array.from(a)},operator:"and_"}},{enabled:a.size>0})],combine:d=>{const[y,ee,te,se]=d;return{data:{blockDocuments:y.data,deployments:ee.data,workPools:te.data,workQueues:se.data},loading:d.some(ne=>ne.isLoading)}}});return{loading:i||l.loading,data:{automationsMap:r,blockDocumentsMap:A(l.data.blockDocuments),deploymentsMap:A(l.data.deployments),workPoolsMap:A(l.data.workPools),workQueuesMap:A(l.data.workQueues)}}},qe=e=>z({queries:Array.from(e).map(s=>de(s)),combine:s=>{const n=new Map;for(const o of s)o.data&&n.set(o.data.id,o.data);return{data:n,loading:s.some(o=>o.isLoading)}}}),Qe=e=>{const s=new Set,n=new Set,o=new Set,c=new Set,a=new Set;for(const r of e)switch(r.type){case"run-deployment":case"pause-deployment":case"resume-deployment":r.deployment_id&&o.add(r.deployment_id);break;case"pause-work-queue":case"resume-work-queue":r.work_queue_id&&a.add(r.work_queue_id);break;case"pause-automation":case"resume-automation":r.automation_id&&s.add(r.automation_id);break;case"pause-work-pool":case"resume-work-pool":r.work_pool_id&&c.add(r.work_pool_id);break;case"send-notification":case"call-webhook":r.block_document_id&&n.add(r.block_document_id);break}return{automationIds:s,blockDocumentIds:n,deploymentIds:o,workPoolIds:c,workQueueIds:a}};function A(e){const s=new Map;for(const n of e??[])s.set(n.id,n);return s}const Ie={"cancel-flow-run":"Cancel flow run","suspend-flow-run":"Suspend flow run","resume-flow-run":"Resume a flow run","change-flow-run-state":"Change state of a flow run","run-deployment":"Run deployment","pause-deployment":"Pause deployment","resume-deployment":"Resume deployment","pause-work-queue":"Pause work queue","resume-work-queue":"Resume work queue","pause-work-pool":"Pause work pool","resume-work-pool":"Resume work pool","pause-automation":"Pause automation","resume-automation":"Resume automation","call-webhook":"Call a custom webhook notification","send-notification":"Send a notification using","do-nothing":"Do nothing"},Me=({action:e,automationsMap:s,blockDocumentsMap:n,deploymentsMap:o,workPoolsMap:c,workQueuesMap:a})=>t.jsx(G,{className:"p-4",children:t.jsx($e,{action:e,automationsMap:s,blockDocumentsMap:n,deploymentsMap:o,workPoolsMap:c,workQueuesMap:a})}),$e=({action:e,automationsMap:s,blockDocumentsMap:n,deploymentsMap:o,workPoolsMap:c,workQueuesMap:a})=>{const r=Ie[e.type];switch(e.type){case"cancel-flow-run":case"suspend-flow-run":case"resume-flow-run":case"call-webhook":case"do-nothing":return t.jsx(Oe,{label:r});case"run-deployment":if(e.deployment_id&&e.source==="selected"){const i=o.get(e.deployment_id);return i?t.jsx(P,{label:r,deployment:i,parameters:e.parameters,job_variables:e.job_variables}):t.jsx(u,{children:"Deployment not found"})}return t.jsx(f,{label:r});case"pause-deployment":case"resume-deployment":if(e.deployment_id&&e.source==="selected"){const i=o.get(e.deployment_id);return i?t.jsx(P,{label:r,deployment:i}):t.jsx(u,{children:"Deployment not found"})}return t.jsx(f,{label:r});case"pause-work-queue":case"resume-work-queue":if(e.work_queue_id&&e.source==="selected"){const i=a.get(e.work_queue_id);return i?t.jsx(Ye,{label:r,workQueue:i}):t.jsx(u,{children:"Work queue not found"})}return t.jsx(f,{label:r});case"pause-automation":case"resume-automation":if(e.automation_id&&e.source==="selected"){const i=s.get(e.automation_id);return i?t.jsx(Fe,{label:r,automation:i}):t.jsx(u,{children:"Automation not found"})}return t.jsx(f,{label:r});case"pause-work-pool":case"resume-work-pool":if(e.work_pool_id&&e.source==="selected"){const i=c.get(e.work_pool_id);return i?t.jsx(ze,{label:r,workPool:i}):t.jsx(u,{children:"Workpool not found"})}return t.jsx(f,{label:r});case"send-notification":{const i=n.get(e.block_document_id);return i?t.jsx(Ve,{label:r,blockDocument:i}):t.jsx(u,{children:"Block document not found"})}case"change-flow-run-state":return t.jsx(Ue,{label:r,type:e.state,name:e.name});default:return null}},x=({children:e})=>t.jsx("div",{className:"text-sm flex items-center gap-1",children:e}),w=({iconId:e,name:s})=>t.jsxs("div",{className:"text-xs flex items-center",children:[t.jsx(j,{id:e,className:"size-4 mr-1"}),s]}),Oe=({label:e})=>t.jsxs(u,{variant:"bodySmall",children:[e," from the triggering event"]}),f=({label:e})=>t.jsxs(u,{variant:"bodySmall",children:[e," inferred from the triggering event"]}),Ue=({label:e,type:s,name:n})=>t.jsxs(x,{children:[t.jsx(f,{label:e})," to ",t.jsx(K,{type:s,name:n})]}),P=({label:e,deployment:s,parameters:n,job_variables:o})=>t.jsxs(x,{children:[t.jsxs("label",{htmlFor:`${e}-${s.id}`,children:[e,":"]}),t.jsx(m,{to:"/deployments/deployment/$id",params:{id:s.id},"aria-label":s.name,children:t.jsx(w,{iconId:"Rocket",name:s.name})}),n!==void 0&&t.jsx(W,{title:"Parameters",payload:n}),o!==void 0&&t.jsx(W,{title:"Job Variables",payload:o})]}),W=({title:e,payload:s})=>t.jsxs(pe,{children:[t.jsx(me,{asChild:!0,children:t.jsxs(H,{variant:"secondary",size:"sm",children:["Show ",fe(e)]})}),t.jsxs(he,{"aria-describedby":void 0,children:[t.jsx(xe,{children:t.jsx(ye,{children:e})}),t.jsx(je,{value:JSON.stringify(s),disabled:!0})]})]}),Fe=({label:e,automation:s})=>t.jsxs(x,{children:[t.jsxs("label",{htmlFor:`${e}-${s.id}`,children:[e,":"]}),t.jsx(m,{to:"/automations/automation/$id",params:{id:s.id},"aria-label":s.name,children:t.jsx(w,{iconId:"Bot",name:s.name})})]}),Ve=({label:e,blockDocument:s})=>{if(!s.name)return t.jsx(u,{children:"Block not found"});const n=s.block_type_name?`Send a ${s.block_type_name.toLowerCase()} using`:e;return t.jsxs(x,{children:[t.jsx("label",{htmlFor:`${e}-${s.id}`,children:n}),t.jsx(m,{to:"/blocks/block/$id",params:{id:s.id},"aria-label":s.name,children:t.jsx(w,{iconId:"Box",name:s.name})})]})},ze=({label:e,workPool:s})=>t.jsxs(x,{children:[t.jsxs("label",{htmlFor:`${e}-${s.id}`,children:[e,":"]}),t.jsx(m,{to:"/work-pools/work-pool/$workPoolName",params:{workPoolName:s.name},"aria-label":s.name,children:t.jsx(w,{iconId:"Cpu",name:s.name})})]}),Ye=({label:e,workQueue:s})=>t.jsxs(x,{children:[t.jsxs("label",{htmlFor:`${e}-${s.id}`,children:[e,":"]}),t.jsx(m,{to:"/work-pools/work-pool/$workPoolName/queue/$workQueueName",params:{workPoolName:s.name,workQueueName:s.name},"aria-label":s.name,children:t.jsx(w,{iconId:"Cpu",name:s.name})})]}),Be=({trigger:e})=>{const s=e.triggers?.length??0,n=e.require;let o;return n==="all"?o="all":n==="any"?o="any":typeof n=="number"?o=`at least ${n}`:o="all",t.jsx("div",{className:"flex flex-wrap gap-1 items-center",children:t.jsxs(u,{variant:"bodySmall",children:["A compound trigger requiring ",o," of ",s," nested"," ",s===1?"trigger":"triggers"," to fire"]})})},q=()=>t.jsx(u,{variant:"bodySmall",children:"A custom trigger"}),Ge=({deploymentId:e})=>t.jsx(Y.Suspense,{fallback:t.jsx(N,{className:"h-4 w-full"}),children:t.jsx(Ke,{deploymentId:e})}),Ke=({deploymentId:e})=>{const{data:s}=oe(we(e));return t.jsxs("div",{className:"flex items-center gap-1 text-xs",children:["Deployment",t.jsxs(m,{to:"/deployments/deployment/$id",params:{id:s.id},className:"flex items-center gap-1",children:[t.jsx(j,{id:"Rocket",className:"size-4"}),s.name]})]})},b=1,He=["prefect.deployment.ready","prefect.deployment.not-ready","prefect.deployment.disabled"],Je=["prefect.work-pool.ready","prefect.work-pool.not-ready","prefect.work-pool.paused","prefect.work-pool.not_ready"],Ze=["prefect.work-queue.ready","prefect.work-queue.not-ready","prefect.work-queue.paused"];function R(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function p(e){return R(e)&&e.type==="event"&&(e.posture==="Reactive"||e.posture==="Proactive")}function Xe(e){return R(e)&&e.type==="compound"&&Array.isArray(e.triggers)}function et(e){return R(e)&&e.type==="sequence"&&Array.isArray(e.triggers)}function J(e){return e==null?[]:Array.isArray(e)?e:[e]}function tt(e,s){if(p(e)){const n=e.match;if(n&&typeof n=="object"){const o=n[s];return o?J(o):[]}}return[]}function S(e,s){const n=tt(e,"prefect.resource.id");return n.length===0?!1:s(n)}function g(e,s){return p(e)?(e.for_each??[]).every(o=>o.startsWith(s)):!1}function T(e,s){return p(e)?s(e.after??[]):!1}function E(e,s){return p(e)?s(e.expect??[]):!1}function Q(e){return He.includes(e)}function I(e){return Je.includes(e)}function M(e){return Ze.includes(e)}function st(e){return p(e)&&S(e,s=>s.every(n=>n.startsWith("prefect.deployment")))&&g(e,"prefect.resource.id")&&T(e,s=>s.every(n=>Q(n)))&&E(e,s=>s.every(n=>Q(n)))&&e.threshold===b}function nt(e,s){const n=e.match_related;if(!n)return[];const o=Array.isArray(n)?n:[n],c=[];for(const a of o)if(a&&typeof a=="object"){const r=a[s];r&&c.push(...J(r))}return c}function ot(e){const s=e.match_related;return s?Array.isArray(s)?s.length===0:Object.keys(s).length===0:!0}function $(e,s){const n=nt(e,"prefect.resource.id");return n.length===0?!1:n.every(o=>o.startsWith(s))}function rt(e){return ot(e)||$(e,"prefect.flow")||$(e,"prefect.tag")}function at(e){return p(e)&&S(e,s=>s.every(n=>n.startsWith("prefect.flow-run")))&&g(e,"prefect.resource.id")&&T(e,s=>s.every(n=>n.startsWith("prefect.flow-run")))&&E(e,s=>s.every(n=>n.startsWith("prefect.flow-run")))&&rt(e)&&e.threshold===b}function ct(e){return p(e)&&S(e,s=>s.every(n=>n.startsWith("prefect.work-pool")))&&g(e,"prefect.resource.id")&&T(e,s=>s.every(n=>I(n)))&&E(e,s=>s.every(n=>I(n)))&&e.threshold===b}function it(e){return p(e)&&S(e,s=>s.every(n=>n.startsWith("prefect.work-queue")))&&g(e,"prefect.resource.id")&&T(e,s=>s.every(n=>M(n)))&&E(e,s=>s.every(n=>M(n)))&&e.threshold===b}const lt={"deployment-status":st,"flow-run-state":at,"work-pool-status":ct,"work-queue-status":it};function ut(e){for(const[s,n]of Object.entries(lt))if(n(e))return s;return"custom"}function C(e){switch(e){case"Reactive":return"enters";case"Proactive":return"stays in"}}function dt(e){switch(e){case"READY":return"Ready";case"NOT_READY":return"Not Ready";case"PAUSED":return"Paused";default:{const s=e;throw new Error(`getWorkQueueStatusLabel missing case for ${s}`)}}}function pt(e){switch(e){case"ready":return"ready";case"not_ready":return"not ready"}}const mt=({deploymentIds:e,posture:s,status:n,time:o})=>{const c=e.length===0,a=C(s),r=pt(n);return t.jsxs("div",{className:"flex flex-wrap gap-1 items-center",children:[t.jsx("span",{children:"When"}),c?t.jsx("span",{children:"any deployment"}):e.map((i,l)=>t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx(Ge,{deploymentId:i}),l===e.length-2&&t.jsx("span",{children:"or"})]},i)),t.jsx("span",{children:a}),t.jsx("span",{children:r}),s==="Proactive"&&o!==void 0&&o>0&&t.jsxs("span",{children:["for ",v(o)]})]})};function ft(e){const s=e.toUpperCase();return["COMPLETED","FAILED","RUNNING","CANCELLED","CANCELLING","CRASHED","PAUSED","PENDING","SCHEDULED"].includes(s)?s:null}const ht=({flowIds:e,tags:s,posture:n,states:o,time:c})=>{const a=C(n);return t.jsxs("div",{className:"flex flex-wrap gap-1 items-center",children:[t.jsx("span",{children:"When any flow run"}),e.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("span",{children:"of flow"}),e.map((r,i)=>t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx(Te,{flowId:r}),i===e.length-2&&t.jsx("span",{children:"or"})]},r))]}),s.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("span",{children:"with the tag"}),t.jsx(ke,{tags:s})]}),t.jsx("span",{children:a}),o.length>0?o.map(r=>{const i=ft(r);return i?t.jsx(K,{type:i},r):null}):t.jsx("span",{children:"any state"}),n==="Proactive"&&c!==void 0&&c>0&&t.jsxs("span",{children:["for ",Ae(c)]})]})},xt=({trigger:e})=>{const s=e.triggers?.length??0;return t.jsx("div",{className:"flex flex-wrap gap-1 items-center",children:t.jsxs(u,{variant:"bodySmall",children:["A sequence trigger with ",s," nested"," ",s===1?"trigger":"triggers"," that must fire in order"]})})},yt=e=>{switch(e){case"READY":return"Ready";case"NOT_READY":return"Not Ready";case"PAUSED":return"Paused"}},jt=({workPoolName:e})=>t.jsxs(m,{to:"/work-pools/work-pool/$workPoolName",params:{workPoolName:e},className:"inline-flex items-center gap-1",children:[t.jsx(j,{id:"Cpu",className:"size-4"}),e]}),wt=e=>e.length===0?null:e.map((s,n)=>t.jsxs("span",{className:"inline-flex items-center gap-1",children:[t.jsx(jt,{workPoolName:s.name}),n===e.length-2&&" or ",n<e.length-2&&", "]},s.id)),kt=({workPoolIds:e,posture:s,status:n,time:o})=>{const{data:c=[]}=re(B({offset:0,work_pools:{id:{any_:e},operator:"and_"}},{enabled:e.length>0})),a=s==="Reactive"?"enters":"stays in",r=yt(n).toLowerCase(),i=e.length===0?"any work pool":`${_(e.length,"work pool")} `;return t.jsxs("div",{className:"flex flex-wrap gap-1 items-center",children:[t.jsx("span",{children:"When"}),t.jsx("span",{children:i}),e.length>0&&wt(c),t.jsx("span",{children:a}),t.jsx("span",{children:r}),s==="Proactive"&&o!==void 0&&t.jsxs("span",{children:["for ",v(o)]})]})},At=e=>t.jsx(Y.Suspense,{fallback:t.jsx(N,{className:"h-4 w-full"}),children:t.jsx(_t,{...e})}),_t=({workQueueIds:e,workPoolNames:s,posture:n,status:o,time:c})=>{const a=e.length===0,r=s.length===0,l=ae({queries:e.map(d=>_e(d))}).map(d=>d.data);return t.jsxs("div",{className:"flex flex-wrap gap-1 items-center text-sm",children:[t.jsx("span",{children:"When"}),a?t.jsx("span",{children:"any work queue"}):t.jsxs(t.Fragment,{children:[t.jsx("span",{children:_(l.length,"work queue")}),l.map((d,y)=>t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx(Ee,{workPoolName:d.work_pool_name??"",workQueueName:d.name,showLabel:!0,showStatus:!0}),y===l.length-2&&t.jsx("span",{children:"or"})]},d.id))]}),!r&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{children:["from the ",_(s.length,"work pool")]}),s.map((d,y)=>t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx(Ne,{workPoolName:d}),y===s.length-2&&t.jsx("span",{children:"or"})]},d))]}),t.jsx("span",{children:C(n)}),t.jsx("span",{children:dt(o).toLowerCase()}),n==="Proactive"&&c!==void 0&&t.jsxs("span",{children:["for ",v(c)]})]})};function Z(e){return e==null?[]:Array.isArray(e)?e:[e]}function L(e,s){const n=e.match;if(n&&typeof n=="object")return n[s]}function X(e,s){const n=e.match_related;if(!n)return[];const o=Array.isArray(n)?n:[n],c=[];for(const a of o)if(a&&typeof a=="object"){const r=a[s];r&&c.push(...Z(r))}return c}function h(e,s){if(s==null)return[];const n=Z(s);return n.includes(`${e}.*`)?[]:n.filter(o=>o.startsWith(e)).map(o=>o.split(`${e}.`)[1]??"").filter(o=>o!==""&&o!=="*")}function O(e){return e.includes("prefect.flow-run.*")?[]:e.filter(s=>s.startsWith("prefect.flow-run.")).map(s=>s.split("prefect.flow-run.")[1]??"").filter(s=>s!=="")}function Dt(e){const s=X(e,"prefect.resource.id"),n=h("prefect.flow",s),o=h("prefect.tag",s),c=e.posture,a=O(c==="Reactive"?e.expect??[]:e.after??[]);return{flowIds:n,tags:o,posture:c,states:a,time:e.within}}const U={"prefect.deployment.ready":"ready","prefect.deployment.not-ready":"not_ready","prefect.deployment.disabled":"not_ready"};function bt(e){const s=L(e,"prefect.resource.id"),n=h("prefect.deployment",s),o=e.posture,c=o==="Reactive"?e.expect:e.after;let a="ready";for(const r of c??[])if(r in U){a=U[r];break}return{deploymentIds:n,posture:o,status:a,time:e.within}}const F={"prefect.work-pool.ready":"READY","prefect.work-pool.not-ready":"NOT_READY","prefect.work-pool.not_ready":"NOT_READY","prefect.work-pool.paused":"PAUSED"};function St(e){const s=L(e,"prefect.resource.id"),n=h("prefect.work-pool",s),o=e.posture,c=o==="Reactive"?e.expect:e.after;let a="READY";for(const r of c??[])if(r in F){a=F[r];break}return{workPoolIds:n,posture:o,status:a,time:e.within}}const V={"prefect.work-queue.ready":"READY","prefect.work-queue.not-ready":"NOT_READY","prefect.work-queue.paused":"PAUSED"};function gt(e){const s=L(e,"prefect.resource.id"),n=h("prefect.work-queue",s),o=X(e,"prefect.resource.id"),c=h("prefect.work-pool",o),a=e.posture,r=a==="Reactive"?e.expect:e.after;let i="READY";for(const l of r??[])if(l in V){i=V[l];break}return{workQueueIds:n,workPoolNames:c,posture:a,status:i,time:e.within}}const Tt=({trigger:e})=>{if(Xe(e))return t.jsx(Be,{trigger:e});if(et(e))return t.jsx(xt,{trigger:e});if(!p(e))return t.jsx(q,{});switch(ut(e)){case"flow-run-state":return t.jsx(ht,{...Dt(e)});case"deployment-status":return t.jsx(mt,{...bt(e)});case"work-pool-status":return t.jsx(kt,{...St(e)});case"work-queue-status":return t.jsx(At,{...gt(e)});default:return t.jsx(q,{})}},Lt=({automation:e})=>t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx(u,{className:"text-muted-foreground",variant:"bodySmall",children:"Description"}),t.jsx(u,{className:"text-muted-foreground",children:e.description||"None"})]}),Pt=({automation:e})=>{const{trigger:s}=e;return t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx(u,{children:"Trigger"}),t.jsx(Tt,{trigger:s})]})},Wt=({automation:e})=>{const{data:s,loading:n}=We(e),{automationsMap:o,blockDocumentsMap:c,deploymentsMap:a,workPoolsMap:r,workQueuesMap:i}=s;return t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx(u,{children:_(e.actions.length,"Action")}),t.jsx("ul",{className:"flex flex-col gap-2",children:n?Array.from({length:e.actions.length},(l,d)=>t.jsx(G,{className:"p-4",children:t.jsx(N,{className:"p-2 h-2 w-full"})},d)):e.actions.map(l=>t.jsx("li",{children:t.jsx(Me,{action:l,automationsMap:o,blockDocumentsMap:c,deploymentsMap:a,workPoolsMap:r,workQueuesMap:i})},l.type))})]})},qt=({automation:e})=>{const{updateAutomation:s}=De(),n=(o,c)=>{s({enabled:o,id:c},{onSuccess:()=>{D.success(`Automation ${o?"enabled":"disabled"}`)},onError:a=>{const r=a.message||"Unknown error while updating automation";console.error(r)}})};return t.jsx(be,{"aria-label":"toggle automation",checked:e.enabled,onCheckedChange:o=>n(o,e.id)})},Qt=({id:e,onDelete:s})=>{const n=o=>{navigator.clipboard.writeText(o),D.success("ID copied")};return t.jsxs(ve,{children:[t.jsx(Re,{asChild:!0,children:t.jsxs(H,{variant:"outline",className:"size-8 p-0",children:[t.jsx("span",{className:"sr-only",children:"Open menu"}),t.jsx(j,{id:"MoreVertical",className:"size-4"})]})}),t.jsxs(Ce,{align:"end",children:[t.jsx(Le,{children:"Actions"}),t.jsx(k,{onClick:()=>n(e),children:"Copy ID"}),t.jsx(k,{asChild:!0,children:t.jsx(m,{to:"/automations/automation/$id/edit",params:{id:e},children:"Edit"})}),t.jsx(k,{onClick:s,children:"Delete"}),t.jsx(k,{asChild:!0,children:t.jsxs("a",{href:Se["automations-guide"],className:"flex items-center",children:["Documentation ",t.jsx(j,{id:"ExternalLink",className:"ml-2 size-4"})]})})]})]})},It=()=>{const e=ce(),[s,n]=Pe(),{deleteAutomation:o}=ge();return[s,(a,{shouldNavigate:r=!1}={})=>n({title:"Delete Automation",description:`Are you sure you want to delete ${a.name}?`,onConfirm:()=>{o(a.id,{onSuccess:()=>{D.success("Automation deleted"),r&&e({to:"/automations"})},onError:i=>{const l=i.message||"Unknown error while deleting automation.";D.error(l),console.error(l)}})}})]};export{qt as A,Qt as a,Lt as b,Pt as c,Wt as d,It as u};
|
|
2
|
-
//# sourceMappingURL=use-delete-automation-confirmation-dialog-Bzy2ML2T.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as s}from"./vendor-tanstack-BK8oseNA.js";function f(t,r){const[o,n]=s.useState(()=>{if(typeof window<"u")try{const e=localStorage.getItem(t);return e?JSON.parse(e):r}catch(e){return console.log(e),r}else return r});return s.useEffect(()=>{typeof window<"u"&&localStorage.setItem(t,JSON.stringify(o))},[t,o]),[o,n]}export{f as u};
|
|
2
|
-
//# sourceMappingURL=use-local-storage-CpxMp5wR.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-local-storage-CpxMp5wR.js","sources":["../../src/hooks/use-local-storage.ts"],"sourcesContent":["import { useEffect, useState } from \"react\";\n\n/**\n *\n * @param key local storage key\n * @param initialValue initial value of stored state\n * @returns a hook to synchronize state with local storage\n *\n * @example\n * ```ts\n * function MyComponent() {\n * const [name, setName] = useLocalStorage<string>('name', '');\n * return (\n * <div>\n * <input type=\"text\" value={name} onChange={e => setName(e.target.value)} />\n * <p>Hello, {name}!</p>\n * </div>\n * );\n * }\n * ```\n */\nexport function useLocalStorage<T>(\n\tkey: string,\n\tinitialValue: T,\n): [T, (value: T | ((prevValue: T) => T)) => void] {\n\tconst [storedValue, setStoredValue] = useState<T>(() => {\n\t\tif (typeof window !== \"undefined\") {\n\t\t\ttry {\n\t\t\t\tconst item = localStorage.getItem(key);\n\t\t\t\treturn item ? (JSON.parse(item) as T) : initialValue;\n\t\t\t} catch (error) {\n\t\t\t\tconsole.log(error);\n\t\t\t\treturn initialValue;\n\t\t\t}\n\t\t} else {\n\t\t\treturn initialValue;\n\t\t}\n\t});\n\n\tuseEffect(() => {\n\t\tif (typeof window !== \"undefined\") {\n\t\t\tlocalStorage.setItem(key, JSON.stringify(storedValue));\n\t\t}\n\t}, [key, storedValue]);\n\n\treturn [storedValue, setStoredValue];\n}\n"],"names":["useLocalStorage","key","initialValue","storedValue","setStoredValue","useState","item","error","useEffect"],"mappings":"kDAqBO,SAASA,EACfC,EACAC,EACkD,CAClD,KAAM,CAACC,EAAaC,CAAc,EAAIC,EAAAA,SAAY,IAAM,CACvD,GAAI,OAAO,OAAW,IACrB,GAAI,CACH,MAAMC,EAAO,aAAa,QAAQL,CAAG,EACrC,OAAOK,EAAQ,KAAK,MAAMA,CAAI,EAAUJ,CACzC,OAASK,EAAO,CACf,eAAQ,IAAIA,CAAK,EACVL,CACR,KAEA,QAAOA,CAET,CAAC,EAEDM,OAAAA,EAAAA,UAAU,IAAM,CACX,OAAO,OAAW,KACrB,aAAa,QAAQP,EAAK,KAAK,UAAUE,CAAW,CAAC,CAEvD,EAAG,CAACF,EAAKE,CAAW,CAAC,EAEd,CAACA,EAAaC,CAAc,CACpC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as e,r as y,u as E}from"./vendor-tanstack-BK8oseNA.js";import{bF as T,bS as S,bP as v,bQ as C,G as F,aU as g,bH as M,bR as W,di as I,dj as L,x as d,Z as A,_ as U,$ as O,a0 as R,o as P,I as z,a2 as $,bf as B,p as N,dk as H,bG as V,bM as Z,bN as q,bO as G,dl as Y,dm as J,F as K}from"./index-WYPZo52S.js";import{D as X,a as ee,b as oe,d as se}from"./dropdown-menu-xZ_3w9OP.js";import{a as re}from"./zod-DgSl2Nua.js";import{c as ne,o as ae,k as _,b as te,s as x,n as Q}from"./vendor-forms-DxqqmhL5.js";import{F as ie,a as h,b as j,c as b,d as w,e as k}from"./form-BTub_PhK.js";import{T as le}from"./textarea-D8LjlIx7.js";import{D as ce}from"./delete-confirmation-dialog-COdZmNfa.js";const ue=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],de=T("square-pen",ue),me={READY:{label:"Ready",color:"bg-green-500",tooltip:"Work queue has at least one actively polling worker ready to execute work."},PAUSED:{label:"Paused",color:"bg-yellow-500",tooltip:"Work queue is paused. No work will be executed."},NOT_READY:{label:"Not Ready",color:"bg-red-500",tooltip:"Work queue does not have any actively polling workers ready to execute work."}},Ce=({status:o,className:s})=>{const r=me[o];return e.jsx(S,{children:e.jsxs(v,{children:[e.jsx(C,{asChild:!0,children:e.jsxs(F,{variant:"secondary",className:g("flex items-center space-x-1 cursor-help",s),children:[o==="PAUSED"?e.jsx(M,{className:"h-2 w-2 text-muted-foreground"}):e.jsx("div",{className:g("h-2 w-2 rounded-full",r.color)}),e.jsx("span",{children:r.label})]})}),e.jsx(W,{children:e.jsx("p",{children:r.tooltip})})]})})},pe=ae({name:x().min(1,{message:"Name is required"}).regex(/^[a-zA-Z0-9_-]+$/,{message:"Name can only contain letters, numbers, hyphens, and underscores"}),description:x().nullable().optional(),is_paused:te().default(!1),concurrency_limit:_([x().transform(o=>{if(o===""||o===null||o===void 0)return null;const s=Number(o);if(Number.isNaN(s))return null;if(s<=0)throw new Error("Flow run concurrency must be greater than 0");return s}),Q().positive({message:"Flow run concurrency must be greater than 0"}).nullable()]).nullable().optional(),priority:_([x().transform(o=>{if(o===""||o===null||o===void 0)return null;const s=Number(o);if(Number.isNaN(s))return null;if(s<=0)throw new Error("Priority must be greater than 0");if(!Number.isInteger(s))throw new Error("Priority must be a whole number");return s}),Q().int({message:"Priority must be a whole number"}).positive({message:"Priority must be greater than 0"}).nullable()]).nullable().optional()}),f={name:"",description:"",is_paused:!1,concurrency_limit:null,priority:null},he=({workPoolName:o,queueToEdit:s,onSubmit:r})=>{const{mutate:i,isPending:l}=I(),{mutate:n,isPending:c}=L(),a=ne({resolver:re(pe),defaultValues:f});return y.useEffect(()=>{s?a.reset({name:s.name,description:s.description??"",is_paused:s.is_paused??!1,concurrency_limit:s.concurrency_limit??null,priority:s.priority??null}):a.reset(f)},[a,s]),{form:a,saveOrUpdate:u=>{const m={...u,description:u.description||null};s?n({workPoolName:o,queueName:s.name,workQueueData:{...m,is_paused:m.is_paused??s.is_paused??!1}},{onSuccess:()=>{d.success("Work queue updated"),a.reset(f),r()},onError:t=>{const D=t.message||"Unknown error while updating work queue.";a.setError("root",{message:D})}}):i({workPoolName:o,workQueueData:m},{onSuccess:()=>{d.success("Work queue created"),a.reset(f),r()},onError:t=>{const D=t.message||"Unknown error while creating work queue.";a.setError("root",{message:D})}})},isLoading:l||c}},ge=({workPoolName:o,queueToEdit:s,open:r,onOpenChange:i,onSubmit:l})=>{const{form:n,isLoading:c,saveOrUpdate:a}=he({workPoolName:o,queueToEdit:s,onSubmit:l}),p=!!s,u=p?"Edit Work Queue":"Create Work Queue",m=p?"Save":"Create Work Queue";return e.jsx(A,{open:r,onOpenChange:i,children:e.jsxs(U,{"aria-describedby":void 0,children:[e.jsx(O,{children:e.jsx(R,{children:u})}),e.jsx(ie,{...n,children:e.jsxs("form",{onSubmit:t=>{n.handleSubmit(a)(t)},className:"space-y-4",children:[e.jsx(h,{children:n.formState.errors.root?.message}),e.jsx(j,{control:n.control,name:"name",render:({field:t})=>e.jsxs(b,{children:[e.jsx(w,{children:"Name"}),e.jsx(k,{children:e.jsx(P,{type:"text",autoComplete:"off",...t})}),e.jsx(h,{})]})}),e.jsx(j,{control:n.control,name:"description",render:({field:t})=>e.jsxs(b,{children:[e.jsx(w,{children:"Description"}),e.jsx(k,{children:e.jsx(le,{...t,value:t.value||""})}),e.jsx(h,{})]})}),e.jsx(j,{control:n.control,name:"concurrency_limit",render:({field:t})=>e.jsxs(b,{children:[e.jsx(w,{children:"Flow Run Concurrency"}),e.jsx(k,{children:e.jsx(P,{type:"number",...t,value:t.value||""})}),e.jsx(h,{})]})}),e.jsx(j,{control:n.control,name:"priority",render:({field:t})=>e.jsxs(b,{children:[e.jsxs(w,{className:"flex items-center gap-2",children:["Priority",e.jsxs(v,{children:[e.jsx(C,{asChild:!0,children:e.jsx("button",{type:"button",className:"cursor-help",children:e.jsx(z,{id:"Info",className:"size-4"})})}),e.jsx(W,{children:e.jsx("p",{className:"text-xs",children:"Work on higher priority queues is executed first. Lower numbers have higher priority."})})]})]}),e.jsx(k,{children:e.jsx(P,{type:"number",...t,value:t.value||""})}),e.jsx(h,{})]})}),e.jsxs($,{children:[e.jsx(B,{asChild:!0,children:e.jsx(N,{variant:"outline",children:"Cancel"})}),e.jsx(N,{type:"submit",loading:c,children:m})]})]})})]})})},xe=({queue:o,open:s,onOpenChange:r,onDeleted:i})=>{const l=H(),n=()=>{if(!o.work_pool_name){d.error("Work pool name is required");return}l.mutate({workPoolName:o.work_pool_name,queueName:o.name},{onSuccess:()=>{d.success("Work pool queue deleted successfully"),i?.(),r(!1)},onError:()=>{d.error("Failed to delete work pool queue")}})};return e.jsx(ce,{isOpen:s,title:"Delete Work Pool Queue",description:`Are you sure you want to delete the work pool queue "${o.name}"? This action cannot be undone.`,confirmText:o.name,isLoading:l.isPending,loadingText:"Deleting...",onConfirm:n,onClose:()=>r(!1)})},je=o=>{const s=E(),[r,i]=y.useState(!1),[l,n]=y.useState(!1),c=()=>{navigator.clipboard.writeText(o.id),d.success("ID copied to clipboard")},a=()=>{n(!0)},p=()=>{s({to:"/automations/create"})},u=o.name==="default";return{menuItems:[{label:"Copy ID",icon:V,action:c,show:!0},{label:"Edit",icon:de,action:a,show:!0},{label:"Delete",icon:Z,action:()=>i(!0),show:!u,variant:"destructive"},{label:"Automate",icon:q,action:p,show:!0}].filter(t=>t.show),showDeleteDialog:r,setShowDeleteDialog:i,showEditDialog:l,setShowEditDialog:n,triggerIcon:G}},We=({queue:o,onUpdate:s,className:r})=>{const{menuItems:i,showDeleteDialog:l,setShowDeleteDialog:n,showEditDialog:c,setShowEditDialog:a,triggerIcon:p}=je(o);return e.jsxs(e.Fragment,{children:[e.jsxs(X,{children:[e.jsx(ee,{asChild:!0,children:e.jsxs(N,{variant:"outline",size:"icon",className:g("size-8",r),children:[e.jsx("span",{className:"sr-only",children:"Open menu"}),e.jsx(p,{className:"size-4"})]})}),e.jsx(oe,{align:"end",children:i.map(u=>{const m=u.icon;return e.jsxs(se,{onClick:u.action,className:g(u.variant==="destructive"&&"text-destructive"),children:[e.jsx(m,{className:"mr-2 h-4 w-4"}),u.label]},u.label)})})]}),e.jsx(xe,{queue:o,open:l,onOpenChange:n,onDeleted:s}),e.jsx(ge,{workPoolName:o.work_pool_name??"",queueToEdit:o,open:c,onOpenChange:a,onSubmit:()=>{a(!1),s?.()}})]})},be=(o,s)=>{const r=Y(),i=J();return{handleToggle:y.useCallback(n=>{if(!o.work_pool_name){d.error("Work pool name is required");return}const c=n?i:r,a=n?"resumed":"paused";c.mutate({workPoolName:o.work_pool_name,queueName:o.name},{onSuccess:()=>{d.success(`Queue ${a} successfully`),s?.()},onError:()=>{d.error(`Failed to ${a.slice(0,-1)} queue`)}})},[o,r,i,s]),isLoading:r.isPending||i.isPending}},_e=({queue:o,onUpdate:s,disabled:r=!1,className:i})=>{const{handleToggle:l,isLoading:n}=be(o,s),c=o.status==="PAUSED",a=r||n;return e.jsx(S,{children:e.jsxs(v,{children:[e.jsx(C,{asChild:!0,children:e.jsx("div",{children:e.jsx(K,{checked:!c,onCheckedChange:l,disabled:a,"aria-label":c?"Resume work pool queue":"Pause work pool queue",className:g(i)})})}),e.jsx(W,{children:e.jsx("p",{children:"Pause or resume this work pool queue"})})]})})};export{de as S,Ce as W,_e as a,We as b,ge as c};
|
|
2
|
-
//# sourceMappingURL=work-pool-queue-toggle-D4eeo-hi.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{f as g,j as e,p as F}from"./vendor-tanstack-BK8oseNA.js";import{dv as B,C,n as S,i as m,o as l,p,x as d,B as P,g as J,h as i,bq as u,bz as x,bB as E,dw as L,bY as W}from"./index-WYPZo52S.js";import{o as _,r as R,n as I,s as U,u as $,c as O}from"./vendor-forms-DxqqmhL5.js";import{a as Q}from"./zod-DgSl2Nua.js";import{F as V,b,c as j,d as h,e as y,a as k}from"./form-BTub_PhK.js";import{T as q}from"./textarea-D8LjlIx7.js";import{B as z}from"./base-job-template-form-section-a-9TFMcW.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CznP1SOq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-date-7GxEwcQM.js";import"./schema-form-input-string-format-datetime-BhL8C5NS.js";import"./use-debounce-callback-ClAx-Wwx.js";import"./toggle-group-D3zeurIL.js";import"./timezone-select-BG3cL3-U.js";import"./dropdown-menu-xZ_3w9OP.js";import"./schema-form-BR4E-WXE.js";const D=_({description:U().nullable().optional(),concurrencyLimit:I().min(0).nullable().optional(),baseJobTemplate:R($()).optional()}),G=({workPool:s})=>{const a=g(),{updateWorkPool:v,isPending:t}=B(),r=O({resolver:Q(D),defaultValues:{description:s.description??"",concurrencyLimit:s.concurrency_limit??null,baseJobTemplate:s.base_job_template}}),w=r.watch("baseJobTemplate"),f=s.type!=="prefect-agent",N=()=>{a.history.back()},T=o=>{v({name:s.name,workPool:{description:o.description||null,concurrency_limit:o.concurrencyLimit,base_job_template:o.baseJobTemplate}},{onSuccess:()=>{d.success("Work pool updated"),a.navigate({to:"/work-pools/work-pool/$workPoolName",params:{workPoolName:s.name}})},onError:n=>{d.error(`Failed to update work pool: ${n instanceof Error?n.message:"Unknown error"}`)}})};return e.jsx(V,{...r,children:e.jsxs("form",{onSubmit:o=>{r.handleSubmit(T)(o)},className:"space-y-6",children:[e.jsx(C,{children:e.jsxs(S,{className:"pt-6 space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(m,{htmlFor:"work-pool-name",children:"Name"}),e.jsx(l,{id:"work-pool-name",value:s.name,disabled:!0})]}),e.jsx(b,{control:r.control,name:"description",render:({field:o})=>e.jsxs(j,{children:[e.jsx(h,{children:"Description (Optional)"}),e.jsx(y,{children:e.jsx(q,{...o,value:o.value??"",rows:7,placeholder:"Enter a description for your work pool"})}),e.jsx(k,{})]})}),e.jsx(b,{control:r.control,name:"concurrencyLimit",render:({field:o})=>e.jsxs(j,{children:[e.jsx(h,{children:"Flow Run Concurrency (Optional)"}),e.jsx(y,{children:e.jsx(l,{...o,type:"number",min:0,placeholder:"Unlimited",value:o.value??"",onChange:n=>{const c=n.target.value;o.onChange(c===""?null:Number(c))}})}),e.jsx(k,{})]})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(m,{htmlFor:"work-pool-type",children:"Type"}),e.jsx(l,{id:"work-pool-type",value:s.type,disabled:!0})]})]})}),f&&e.jsx(z,{baseJobTemplate:w,onBaseJobTemplateChange:o=>{r.setValue("baseJobTemplate",o)}}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(p,{type:"button",variant:"outline",onClick:N,disabled:t,children:"Cancel"}),e.jsx(p,{type:"submit",disabled:t,children:t?"Saving...":"Save"})]})]})})},H=({workPool:s})=>e.jsx("header",{className:"mb-6",children:e.jsx(P,{children:e.jsxs(J,{children:[e.jsx(i,{children:e.jsx(u,{to:"/work-pools",className:"text-xl font-semibold",children:"Work Pools"})}),e.jsx(x,{}),e.jsx(i,{children:e.jsx(u,{to:"/work-pools/work-pool/$workPoolName",params:{workPoolName:s.name},className:"text-xl font-semibold",children:s.name})}),e.jsx(x,{}),e.jsx(i,{className:"text-xl font-semibold",children:e.jsx(E,{children:"Edit"})})]})})});function pe(){const{workPoolName:s}=L.useParams(),{data:a}=F(W(s));return e.jsxs("div",{className:"container max-w-4xl py-6",children:[e.jsx(H,{workPool:a}),e.jsx(G,{workPool:a})]})}export{pe as component};
|
|
2
|
-
//# sourceMappingURL=work-pool_._workPoolName.edit-CA0ePjCk.js.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|