prefect 3.6.16.dev4__py3-none-any.whl → 3.6.16.dev5__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.
Files changed (121) hide show
  1. prefect/__init__.py +5 -4
  2. prefect/_build_info.py +3 -3
  3. prefect/_experimental/plugins/__init__.py +1 -1
  4. prefect/cli/deploy/_core.py +8 -1
  5. prefect/client/orchestration/routes.py +0 -3
  6. prefect/server/api/admin.py +0 -60
  7. prefect/server/api/deployments.py +267 -1
  8. prefect/server/api/flow_runs.py +139 -0
  9. prefect/server/api/flows.py +49 -1
  10. prefect/server/models/deployments.py +53 -0
  11. prefect/server/models/flow_runs.py +42 -0
  12. prefect/server/models/flows.py +40 -1
  13. prefect/server/schemas/filters.py +5 -0
  14. prefect/server/schemas/responses.py +50 -0
  15. prefect/server/ui/assets/404-DG3AGnT0.js +2 -0
  16. prefect/server/ui/assets/{404-K6PaZiye.js.map → 404-DG3AGnT0.js.map} +1 -1
  17. prefect/server/ui/assets/{AppRouterView-DwDQtyvQ.js → AppRouterView-C0FcJnhj.js} +2 -2
  18. prefect/server/ui/assets/{AppRouterView-DwDQtyvQ.js.map → AppRouterView-C0FcJnhj.js.map} +1 -1
  19. prefect/server/ui/assets/{Artifact-C7r-iu_n.js → Artifact-sGuFYSde.js} +2 -2
  20. prefect/server/ui/assets/{Artifact-C7r-iu_n.js.map → Artifact-sGuFYSde.js.map} +1 -1
  21. prefect/server/ui/assets/{ArtifactKey-BEMo4yoK.js → ArtifactKey-9Q9Vx-fc.js} +2 -2
  22. prefect/server/ui/assets/{ArtifactKey-BEMo4yoK.js.map → ArtifactKey-9Q9Vx-fc.js.map} +1 -1
  23. prefect/server/ui/assets/{Artifacts-jFQdgIdh.js → Artifacts-B53vn988.js} +2 -2
  24. prefect/server/ui/assets/{Artifacts-jFQdgIdh.js.map → Artifacts-B53vn988.js.map} +1 -1
  25. prefect/server/ui/assets/{Automation-CoPk3WhK.js → Automation-BaE0He4N.js} +2 -2
  26. prefect/server/ui/assets/{Automation-CoPk3WhK.js.map → Automation-BaE0He4N.js.map} +1 -1
  27. prefect/server/ui/assets/{AutomationCreate-DC7QapQA.js → AutomationCreate-CYfB5QDE.js} +2 -2
  28. prefect/server/ui/assets/{AutomationCreate-DC7QapQA.js.map → AutomationCreate-CYfB5QDE.js.map} +1 -1
  29. prefect/server/ui/assets/{AutomationEdit-DEqdGB6r.js → AutomationEdit-CUrFmfaN.js} +2 -2
  30. prefect/server/ui/assets/{AutomationEdit-DEqdGB6r.js.map → AutomationEdit-CUrFmfaN.js.map} +1 -1
  31. prefect/server/ui/assets/{AutomationWizard.vue_vue_type_script_setup_true_lang-Cx_Qey3p.js → AutomationWizard.vue_vue_type_script_setup_true_lang-CRRm91Zq.js} +2 -2
  32. prefect/server/ui/assets/{AutomationWizard.vue_vue_type_script_setup_true_lang-Cx_Qey3p.js.map → AutomationWizard.vue_vue_type_script_setup_true_lang-CRRm91Zq.js.map} +1 -1
  33. prefect/server/ui/assets/{Automations-BSljFu5U.js → Automations--PyqO2IS.js} +2 -2
  34. prefect/server/ui/assets/{Automations-BSljFu5U.js.map → Automations--PyqO2IS.js.map} +1 -1
  35. prefect/server/ui/assets/{BlockEdit-PBHxWs2I.js → BlockEdit-BnyuldVn.js} +2 -2
  36. prefect/server/ui/assets/{BlockEdit-PBHxWs2I.js.map → BlockEdit-BnyuldVn.js.map} +1 -1
  37. prefect/server/ui/assets/{BlockView-D0GWTwFv.js → BlockView-B2WHGgyQ.js} +2 -2
  38. prefect/server/ui/assets/{BlockView-D0GWTwFv.js.map → BlockView-B2WHGgyQ.js.map} +1 -1
  39. prefect/server/ui/assets/{Blocks-D_9GkxFk.js → Blocks-CCtj7wrz.js} +2 -2
  40. prefect/server/ui/assets/{Blocks-D_9GkxFk.js.map → Blocks-CCtj7wrz.js.map} +1 -1
  41. prefect/server/ui/assets/{BlocksCatalog-kqMThRld.js → BlocksCatalog-CMTvZPfa.js} +2 -2
  42. prefect/server/ui/assets/{BlocksCatalog-kqMThRld.js.map → BlocksCatalog-CMTvZPfa.js.map} +1 -1
  43. prefect/server/ui/assets/{BlocksCatalogCreate-DMhVoHqt.js → BlocksCatalogCreate-BvAnp5Nv.js} +2 -2
  44. prefect/server/ui/assets/{BlocksCatalogCreate-DMhVoHqt.js.map → BlocksCatalogCreate-BvAnp5Nv.js.map} +1 -1
  45. prefect/server/ui/assets/{BlocksCatalogView-30zvf2Zf.js → BlocksCatalogView-dqnPzpRL.js} +2 -2
  46. prefect/server/ui/assets/{BlocksCatalogView-30zvf2Zf.js.map → BlocksCatalogView-dqnPzpRL.js.map} +1 -1
  47. prefect/server/ui/assets/{ConcurrencyLimit-BW7Bnl17.js → ConcurrencyLimit-ontTM1oT.js} +2 -2
  48. prefect/server/ui/assets/{ConcurrencyLimit-BW7Bnl17.js.map → ConcurrencyLimit-ontTM1oT.js.map} +1 -1
  49. prefect/server/ui/assets/{ConcurrencyLimits-Ct9fPcPd.js → ConcurrencyLimits-Ctczt53J.js} +2 -2
  50. prefect/server/ui/assets/{ConcurrencyLimits-Ct9fPcPd.js.map → ConcurrencyLimits-Ctczt53J.js.map} +1 -1
  51. prefect/server/ui/assets/{Dashboard-C9HbsW9C.js → Dashboard-o-S3xTqz.js} +2 -2
  52. prefect/server/ui/assets/{Dashboard-C9HbsW9C.js.map → Dashboard-o-S3xTqz.js.map} +1 -1
  53. prefect/server/ui/assets/{Deployment-BnhoLgTP.js → Deployment-DY8bGLAc.js} +2 -2
  54. prefect/server/ui/assets/{Deployment-BnhoLgTP.js.map → Deployment-DY8bGLAc.js.map} +1 -1
  55. prefect/server/ui/assets/{DeploymentDuplicate-B8_LrQLl.js → DeploymentDuplicate-CMMz8lrd.js} +2 -2
  56. prefect/server/ui/assets/{DeploymentDuplicate-B8_LrQLl.js.map → DeploymentDuplicate-CMMz8lrd.js.map} +1 -1
  57. prefect/server/ui/assets/{DeploymentEdit-B4W9AHKw.js → DeploymentEdit-BlRSxdKn.js} +2 -2
  58. prefect/server/ui/assets/{DeploymentEdit-B4W9AHKw.js.map → DeploymentEdit-BlRSxdKn.js.map} +1 -1
  59. prefect/server/ui/assets/Deployments-lcIIbm1i.js +2 -0
  60. prefect/server/ui/assets/Deployments-lcIIbm1i.js.map +1 -0
  61. prefect/server/ui/assets/{Event-DQwLIzdd.js → Event-0j-HIfsu.js} +2 -2
  62. prefect/server/ui/assets/{Event-DQwLIzdd.js.map → Event-0j-HIfsu.js.map} +1 -1
  63. prefect/server/ui/assets/{Events-D62-llVt.js → Events-UuQjwz0L.js} +2 -2
  64. prefect/server/ui/assets/{Events-D62-llVt.js.map → Events-UuQjwz0L.js.map} +1 -1
  65. prefect/server/ui/assets/{Flow-Cq4u3Hyv.js → Flow-RmpH3LjK.js} +2 -2
  66. prefect/server/ui/assets/{Flow-Cq4u3Hyv.js.map → Flow-RmpH3LjK.js.map} +1 -1
  67. prefect/server/ui/assets/{FlowRun-3dhHtN2i.js → FlowRun-C3yAz7L4.js} +2 -2
  68. prefect/server/ui/assets/{FlowRun-3dhHtN2i.js.map → FlowRun-C3yAz7L4.js.map} +1 -1
  69. prefect/server/ui/assets/{FlowRunCreate-BwLIWkPS.js → FlowRunCreate-UNkalFWW.js} +2 -2
  70. prefect/server/ui/assets/{FlowRunCreate-BwLIWkPS.js.map → FlowRunCreate-UNkalFWW.js.map} +1 -1
  71. prefect/server/ui/assets/{Flows-DDhFukcU.js → Flows-BrSJzZzX.js} +2 -2
  72. prefect/server/ui/assets/{Flows-DDhFukcU.js.map → Flows-BrSJzZzX.js.map} +1 -1
  73. prefect/server/ui/assets/{Runs-CAwq35x9.js → Runs-DlwKZ4nz.js} +2 -2
  74. prefect/server/ui/assets/{Runs-CAwq35x9.js.map → Runs-DlwKZ4nz.js.map} +1 -1
  75. prefect/server/ui/assets/{RunsPageWithDefaultFilter-VUJP7e64-CnkYar0q.js → RunsPageWithDefaultFilter-VUJP7e64-C4FVTl9j.js} +2 -2
  76. prefect/server/ui/assets/{RunsPageWithDefaultFilter-VUJP7e64-CnkYar0q.js.map → RunsPageWithDefaultFilter-VUJP7e64-C4FVTl9j.js.map} +1 -1
  77. prefect/server/ui/assets/{Settings-DBdmXrdg.js → Settings-CrsUm3c9.js} +2 -2
  78. prefect/server/ui/assets/{Settings-DBdmXrdg.js.map → Settings-CrsUm3c9.js.map} +1 -1
  79. prefect/server/ui/assets/{TaskRun-DWfpXthA.js → TaskRun-BPnbcZPW.js} +2 -2
  80. prefect/server/ui/assets/{TaskRun-DWfpXthA.js.map → TaskRun-BPnbcZPW.js.map} +1 -1
  81. prefect/server/ui/assets/{Unauthenticated-C8GRLLPD.js → Unauthenticated-2pBvXwGA.js} +2 -2
  82. prefect/server/ui/assets/{Unauthenticated-C8GRLLPD.js.map → Unauthenticated-2pBvXwGA.js.map} +1 -1
  83. prefect/server/ui/assets/{Variables-EylxYrv9.js → Variables-Bjlboyhp.js} +2 -2
  84. prefect/server/ui/assets/{Variables-EylxYrv9.js.map → Variables-Bjlboyhp.js.map} +1 -1
  85. prefect/server/ui/assets/{WorkPool-CfgEuRe7.js → WorkPool-lRyupHlB.js} +2 -2
  86. prefect/server/ui/assets/{WorkPool-CfgEuRe7.js.map → WorkPool-lRyupHlB.js.map} +1 -1
  87. prefect/server/ui/assets/{WorkPoolCreate-C4DC7Wtp.js → WorkPoolCreate-_lyGs-1E.js} +2 -2
  88. prefect/server/ui/assets/{WorkPoolCreate-C4DC7Wtp.js.map → WorkPoolCreate-_lyGs-1E.js.map} +1 -1
  89. prefect/server/ui/assets/{WorkPoolEdit-D1PFei0l.js → WorkPoolEdit-FAAVeANy.js} +2 -2
  90. prefect/server/ui/assets/{WorkPoolEdit-D1PFei0l.js.map → WorkPoolEdit-FAAVeANy.js.map} +1 -1
  91. prefect/server/ui/assets/{WorkPoolQueue-CisaZ0pF.js → WorkPoolQueue-CRctEElk.js} +2 -2
  92. prefect/server/ui/assets/{WorkPoolQueue-CisaZ0pF.js.map → WorkPoolQueue-CRctEElk.js.map} +1 -1
  93. prefect/server/ui/assets/{WorkPoolQueueCreate-30kVnfeo.js → WorkPoolQueueCreate-BDTuIRGA.js} +2 -2
  94. prefect/server/ui/assets/{WorkPoolQueueCreate-30kVnfeo.js.map → WorkPoolQueueCreate-BDTuIRGA.js.map} +1 -1
  95. prefect/server/ui/assets/{WorkPoolQueueEdit-DBsgToTG.js → WorkPoolQueueEdit-qqk5OXB2.js} +2 -2
  96. prefect/server/ui/assets/{WorkPoolQueueEdit-DBsgToTG.js.map → WorkPoolQueueEdit-qqk5OXB2.js.map} +1 -1
  97. prefect/server/ui/assets/{WorkPools-Dt8Bj0YS.js → WorkPools-CLW1U3iu.js} +2 -2
  98. prefect/server/ui/assets/{WorkPools-Dt8Bj0YS.js.map → WorkPools-CLW1U3iu.js.map} +1 -1
  99. prefect/server/ui/assets/{WorkQueueToWorkPoolQueueRedirect-DJZTvjVT-D9qSz7kl.js → WorkQueueToWorkPoolQueueRedirect-DJZTvjVT-B__6dQYl.js} +2 -2
  100. prefect/server/ui/assets/{WorkQueueToWorkPoolQueueRedirect-DJZTvjVT-D9qSz7kl.js.map → WorkQueueToWorkPoolQueueRedirect-DJZTvjVT-B__6dQYl.js.map} +1 -1
  101. prefect/server/ui/assets/{index-C9FkjDpZ.js → index-DS86r6aC.js} +4 -4
  102. prefect/server/ui/assets/{index-C9FkjDpZ.js.map → index-DS86r6aC.js.map} +1 -1
  103. prefect/server/ui/assets/{mapper-NwaeXCHc.js → mapper-Bm5aN_dh.js} +2 -2
  104. prefect/server/ui/assets/{mapper-NwaeXCHc.js.map → mapper-Bm5aN_dh.js.map} +1 -1
  105. prefect/server/ui/assets/useCan-DzvhQ1fT.js +2 -0
  106. prefect/server/ui/assets/{useCan-DDmEnNFg.js.map → useCan-DzvhQ1fT.js.map} +1 -1
  107. prefect/server/ui/assets/{usePageTitle-B0Hz_El0.js → usePageTitle-BXVkHaWQ.js} +2 -2
  108. prefect/server/ui/assets/{usePageTitle-B0Hz_El0.js.map → usePageTitle-BXVkHaWQ.js.map} +1 -1
  109. prefect/server/ui/assets/{usePrefectApi-B2fKZYDa.js → usePrefectApi-Cn-hX9ms.js} +2 -2
  110. prefect/server/ui/assets/{usePrefectApi-B2fKZYDa.js.map → usePrefectApi-Cn-hX9ms.js.map} +1 -1
  111. prefect/server/ui/index.html +1 -1
  112. prefect/utilities/collections.py +5 -1
  113. {prefect-3.6.16.dev4.dist-info → prefect-3.6.16.dev5.dist-info}/METADATA +1 -1
  114. {prefect-3.6.16.dev4.dist-info → prefect-3.6.16.dev5.dist-info}/RECORD +117 -117
  115. prefect/server/ui/assets/404-K6PaZiye.js +0 -2
  116. prefect/server/ui/assets/Deployments-DAHDVCIs.js +0 -2
  117. prefect/server/ui/assets/Deployments-DAHDVCIs.js.map +0 -1
  118. prefect/server/ui/assets/useCan-DDmEnNFg.js +0 -2
  119. {prefect-3.6.16.dev4.dist-info → prefect-3.6.16.dev5.dist-info}/WHEEL +0 -0
  120. {prefect-3.6.16.dev4.dist-info → prefect-3.6.16.dev5.dist-info}/entry_points.txt +0 -0
  121. {prefect-3.6.16.dev4.dist-info → prefect-3.6.16.dev5.dist-info}/licenses/LICENSE +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"Dashboard-C9HbsW9C.js","sources":["../../src/pages/Dashboard.vue"],"sourcesContent":["<template>\n <p-layout-default class=\"workspace-dashboard\">\n <template #header>\n <PageHeading :crumbs=\"crumbs\" class=\"workspace-dashboard__page-heading\">\n <template v-if=\"loaded && !empty\" #actions>\n <div class=\"workspace-dashboard__header-actions\">\n <div class=\"workspace-dashboard__subflows-toggle\">\n <p-toggle v-model=\"filter.hideSubflows\" append=\"Hide subflows\" />\n </div>\n <FlowRunTagsInput v-model:selected=\"filter.tags\" empty-message=\"All tags\" />\n <DateRangeSelect v-model=\"filter.range\" class=\"workspace-dashboard__date-select\" />\n </div>\n </template>\n </PageHeading>\n </template>\n <template v-if=\"loaded\">\n <template v-if=\"empty\">\n <FlowRunsPageEmptyState />\n </template>\n <template v-else>\n <div class=\"workspace-dashboard__grid\">\n <WorkspaceDashboardFlowRunsCard :filter=\"filter\" />\n <div class=\"workspace-dashboard__side\">\n <CumulativeTaskRunsCard :filter=\"tasksFilter\" />\n <DashboardWorkPoolsCard class=\"workspace-dashboard__work-pools\" :filter=\"filter\" />\n </div>\n </div>\n </template>\n </template>\n <MarketingBanner\n v-if=\"showPromotionalContent\"\n title=\"Ready to scale?\"\n subtitle=\"Webhooks, role and object-level security, and serverless push work pools on Prefect Cloud\"\n >\n <template #actions>\n <p-button to=\"https://www.prefect.io/cloud-vs-oss?utm_source=oss&utm_medium=oss&utm_campaign=oss&utm_term=none&utm_content=none\" target=\"_blank\" primary>\n Upgrade to Cloud\n </p-button>\n </template>\n </MarketingBanner>\n </p-layout-default>\n</template>\n\n<script setup lang=\"ts\">\n import { Crumb } from '@prefecthq/prefect-design'\n import {\n DashboardWorkPoolsCard,\n WorkspaceDashboardFlowRunsCard,\n CumulativeTaskRunsCard,\n PageHeading,\n FlowRunTagsInput,\n FlowRunsPageEmptyState,\n useWorkspaceApi,\n subscriptionIntervalKey,\n mapper,\n TaskRunsFilter,\n MarketingBanner,\n Getter,\n DateRangeSelect,\n useWorkspaceDashboardFilterFromRoute,\n dateFunctions,\n secondsInDay\n } from '@prefecthq/prefect-ui-library'\n import { useSubscription } from '@prefecthq/vue-compositions'\n import { computed, provide } from 'vue'\n import { usePrefectApi } from '@/compositions/usePrefectApi'\n\n provide(subscriptionIntervalKey, {\n interval: dateFunctions.secondsToMilliseconds(30),\n })\n\n const api = useWorkspaceApi()\n const prefectApi = usePrefectApi()\n const serverSettings = await prefectApi.admin.getSettings()\n const showPromotionalContent = computed(() => serverSettings.server.ui.show_promotional_content)\n\n // Cache to localStorage for use in error toasts\n localStorage.setItem('prefect-show-promotional-content', String(showPromotionalContent.value))\n const flowRunsCountAllSubscription = useSubscription(api.flowRuns.getFlowRunsCount, [{}])\n const loaded = computed(() => flowRunsCountAllSubscription.executed)\n const empty = computed(() => flowRunsCountAllSubscription.response === 0)\n const crumbs: Crumb[] = [{ text: 'Dashboard' }]\n\n const filter = useWorkspaceDashboardFilterFromRoute({\n range: { type: 'span', seconds: -secondsInDay },\n tags: [],\n })\n\n const tasksFilter: Getter<TaskRunsFilter> = () => mapper.map('WorkspaceDashboardFilter', filter, 'TaskRunsFilter')\n</script>\n\n<style>\n.workspace-dashboard__page-heading { @apply\n grid\n md:flex\n md:flex-row\n md:items-center\n min-h-11\n}\n\n.workspace-dashboard__header-actions { @apply\n flex\n flex-col\n w-full\n max-w-full\n gap-2\n md:w-auto\n md:inline-flex\n md:flex-row\n items-center\n}\n\n.workspace-dashboard__date-select { @apply\n min-w-0\n}\n\n.workspace-dashboard__grid { @apply\n grid\n grid-cols-1\n gap-4\n items-start\n xl:grid-cols-2\n}\n\n.workspace-dashboard__side { @apply\n grid\n grid-cols-1\n gap-4\n}\n\n.workspace-dashboard__subflows-toggle { @apply\n pr-2\n w-full\n md:w-auto\n}\n</style>"],"names":["provide","subscriptionIntervalKey","dateFunctions","api","useWorkspaceApi","prefectApi","usePrefectApi","serverSettings","__temp","__restore","_withAsyncContext","showPromotionalContent","computed","flowRunsCountAllSubscription","useSubscription","loaded","empty","crumbs","filter","useWorkspaceDashboardFilterFromRoute","secondsInDay","tasksFilter","mapper","_createBlock","_component_p_layout_default","_createVNode","_unref","PageHeading","_createElementVNode","_hoisted_1","_hoisted_2","_component_p_toggle","_cache","$event","FlowRunTagsInput","DateRangeSelect","_createElementBlock","_Fragment","FlowRunsPageEmptyState","_openBlock","_hoisted_3","WorkspaceDashboardFlowRunsCard","_hoisted_4","CumulativeTaskRunsCard","DashboardWorkPoolsCard","MarketingBanner","_component_p_button"],"mappings":"4jBAmEEA,EAAQC,EAAyB,CAC/B,SAAUC,EAAc,sBAAsB,EAAE,CAAA,CACjD,EAED,MAAMC,EAAMC,EAAA,EACNC,EAAaC,EAAA,EACbC,GAAiB,CAAAC,EAAAC,CAAA,EAAAC,EA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E,MAAM,kCAAA,iEAKtD,IAaW,CAbKlB,EAAA,WAAhBqB,EAaWC,EAAA,CAAA,IAAA,GAAA,CAZOrB,EAAA,WACdO,EAA0BG,EAAAY,CAAA,EAAA,CAAA,IAAA,EAAA,IAG1BC,IAAAH,EAMM,MANNI,EAMM,CALJf,EAAmDC,EAAAe,CAAA,EAAA,CAAlB,OAAQf,EAAAR,CAAA,CAAA,EAAM,KAAA,EAAA,CAAA,QAAA,CAAA,EAC/CU,EAGM,MAHNc,EAGM,CAFJjB,EAAgDC,EAAAiB,CAAA,EAAA,CAAvB,OAAQtB,EAAW,EAC5CI,EAAmFC,EAAAkB,CAAA,EAAA,CAA3D,MAAM,kCAAmC,OAAQlB,EAAAR,CAAA,CAAA,yCAMzEP,EAAA,WADRY,EAUkBG,EAAAmB,CAAA,EAAA,OARhB,MAAM,kBACN,SAAS,2FAAA,GAEE,UACT,IAEW,CAFXpB,EAEWqB,EAAA,CAFD,GAAG,oHAAoH,OAAO,SAAS,QAAA,EAAA,aAAQ,IAEzJ,CAAA,GAAAd,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAFyJ,qBAEzJ,EAAA,CAAA"}
1
+ {"version":3,"file":"Dashboard-o-S3xTqz.js","sources":["../../src/pages/Dashboard.vue"],"sourcesContent":["<template>\n <p-layout-default class=\"workspace-dashboard\">\n <template #header>\n <PageHeading :crumbs=\"crumbs\" class=\"workspace-dashboard__page-heading\">\n <template v-if=\"loaded && !empty\" #actions>\n <div class=\"workspace-dashboard__header-actions\">\n <div class=\"workspace-dashboard__subflows-toggle\">\n <p-toggle v-model=\"filter.hideSubflows\" append=\"Hide subflows\" />\n </div>\n <FlowRunTagsInput v-model:selected=\"filter.tags\" empty-message=\"All tags\" />\n <DateRangeSelect v-model=\"filter.range\" class=\"workspace-dashboard__date-select\" />\n </div>\n </template>\n </PageHeading>\n </template>\n <template v-if=\"loaded\">\n <template v-if=\"empty\">\n <FlowRunsPageEmptyState />\n </template>\n <template v-else>\n <div class=\"workspace-dashboard__grid\">\n <WorkspaceDashboardFlowRunsCard :filter=\"filter\" />\n <div class=\"workspace-dashboard__side\">\n <CumulativeTaskRunsCard :filter=\"tasksFilter\" />\n <DashboardWorkPoolsCard class=\"workspace-dashboard__work-pools\" :filter=\"filter\" />\n </div>\n </div>\n </template>\n </template>\n <MarketingBanner\n v-if=\"showPromotionalContent\"\n title=\"Ready to scale?\"\n subtitle=\"Webhooks, role and object-level security, and serverless push work pools on Prefect Cloud\"\n >\n <template #actions>\n <p-button to=\"https://www.prefect.io/cloud-vs-oss?utm_source=oss&utm_medium=oss&utm_campaign=oss&utm_term=none&utm_content=none\" target=\"_blank\" primary>\n Upgrade to Cloud\n </p-button>\n </template>\n </MarketingBanner>\n </p-layout-default>\n</template>\n\n<script setup lang=\"ts\">\n import { Crumb } from '@prefecthq/prefect-design'\n import {\n DashboardWorkPoolsCard,\n WorkspaceDashboardFlowRunsCard,\n CumulativeTaskRunsCard,\n PageHeading,\n FlowRunTagsInput,\n FlowRunsPageEmptyState,\n useWorkspaceApi,\n subscriptionIntervalKey,\n mapper,\n TaskRunsFilter,\n MarketingBanner,\n Getter,\n DateRangeSelect,\n useWorkspaceDashboardFilterFromRoute,\n dateFunctions,\n secondsInDay\n } from '@prefecthq/prefect-ui-library'\n import { useSubscription } from '@prefecthq/vue-compositions'\n import { computed, provide } from 'vue'\n import { usePrefectApi } from '@/compositions/usePrefectApi'\n\n provide(subscriptionIntervalKey, {\n interval: dateFunctions.secondsToMilliseconds(30),\n })\n\n const api = useWorkspaceApi()\n const prefectApi = usePrefectApi()\n const serverSettings = await prefectApi.admin.getSettings()\n const showPromotionalContent = computed(() => serverSettings.server.ui.show_promotional_content)\n\n // Cache to localStorage for use in error toasts\n localStorage.setItem('prefect-show-promotional-content', String(showPromotionalContent.value))\n const flowRunsCountAllSubscription = useSubscription(api.flowRuns.getFlowRunsCount, [{}])\n const loaded = computed(() => flowRunsCountAllSubscription.executed)\n const empty = computed(() => flowRunsCountAllSubscription.response === 0)\n const crumbs: Crumb[] = [{ text: 'Dashboard' }]\n\n const filter = useWorkspaceDashboardFilterFromRoute({\n range: { type: 'span', seconds: -secondsInDay },\n tags: [],\n })\n\n const tasksFilter: Getter<TaskRunsFilter> = () => mapper.map('WorkspaceDashboardFilter', filter, 'TaskRunsFilter')\n</script>\n\n<style>\n.workspace-dashboard__page-heading { @apply\n grid\n md:flex\n md:flex-row\n md:items-center\n min-h-11\n}\n\n.workspace-dashboard__header-actions { @apply\n flex\n flex-col\n w-full\n max-w-full\n gap-2\n md:w-auto\n md:inline-flex\n md:flex-row\n items-center\n}\n\n.workspace-dashboard__date-select { @apply\n min-w-0\n}\n\n.workspace-dashboard__grid { @apply\n grid\n grid-cols-1\n gap-4\n items-start\n xl:grid-cols-2\n}\n\n.workspace-dashboard__side { @apply\n grid\n grid-cols-1\n gap-4\n}\n\n.workspace-dashboard__subflows-toggle { @apply\n pr-2\n w-full\n md:w-auto\n}\n</style>"],"names":["provide","subscriptionIntervalKey","dateFunctions","api","useWorkspaceApi","prefectApi","usePrefectApi","serverSettings","__temp","__restore","_withAsyncContext","showPromotionalContent","computed","flowRunsCountAllSubscription","useSubscription","loaded","empty","crumbs","filter","useWorkspaceDashboardFilterFromRoute","secondsInDay","tasksFilter","mapper","_createBlock","_component_p_layout_default","_createVNode","_unref","PageHeading","_createElementVNode","_hoisted_1","_hoisted_2","_component_p_toggle","_cache","$event","FlowRunTagsInput","DateRangeSelect","_createElementBlock","_Fragment","FlowRunsPageEmptyState","_openBlock","_hoisted_3","WorkspaceDashboardFlowRunsCard","_hoisted_4","CumulativeTaskRunsCard","DashboardWorkPoolsCard","MarketingBanner","_component_p_button"],"mappings":"4jBAmEEA,EAAQC,EAAyB,CAC/B,SAAUC,EAAc,sBAAsB,EAAE,CAAA,CACjD,EAED,MAAMC,EAAMC,EAAA,EACNC,EAAaC,EAAA,EACbC,GAAiB,CAAAC,EAAAC,CAAA,EAAAC,EAAA,IAAML,EAAW,MAAM,YA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IAaW,CAbKlB,EAAA,WAAhBqB,EAaWC,EAAA,CAAA,IAAA,GAAA,CAZOrB,EAAA,WACdO,EAA0BG,EAAAY,CAAA,EAAA,CAAA,IAAA,EAAA,IAG1BC,IAAAH,EAMM,MANNI,EAMM,CALJf,EAAmDC,EAAAe,CAAA,EAAA,CAAlB,OAAQf,EAAAR,CAAA,CAAA,EAAM,KAAA,EAAA,CAAA,QAAA,CAAA,EAC/CU,EAGM,MAHNc,EAGM,CAFJjB,EAAgDC,EAAAiB,CAAA,EAAA,CAAvB,OAAQtB,EAAW,EAC5CI,EAAmFC,EAAAkB,CAAA,EAAA,CAA3D,MAAM,kCAAmC,OAAQlB,EAAAR,CAAA,CAAA,yCAMzEP,EAAA,WADRY,EAUkBG,EAAAmB,CAAA,EAAA,OARhB,MAAM,kBACN,SAAS,2FAAA,GAEE,UACT,IAEW,CAFXpB,EAEWqB,EAAA,CAFD,GAAG,oHAAoH,OAAO,SAAS,QAAA,EAAA,aAAQ,IAEzJ,CAAA,GAAAd,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAFyJ,qBAEzJ,EAAA,CAAA"}
@@ -1,2 +1,2 @@
1
- import{d as V,v as $,g as u,u as j,S as q,j as A,aJ as E,al as O,bv as P,bw as f,bZ as z,h as o,c as r,a as v,o as a,i as l,k as n,m as e,a6 as J,bB as _,n as M,F as Z,B as G,b_ as H,b$ as b,c0 as K,c1 as L,c2 as Q,c3 as W,c4 as X,c5 as Y,bg as ee,c6 as te}from"./index-C9FkjDpZ.js";import{u as ne}from"./usePageTitle-B0Hz_El0.js";const se=V({__name:"Deployment",setup(le){const i=$("deploymentId"),c=u(()=>[i.value]),g=j(),w=q(),h={interval:3e5},s=A(w.deployments.getDeployment,[i.value],h),t=u(()=>s.response),R=u(()=>[{label:"Details",hidden:E.xl},{label:"Runs"},{label:"Upcoming"},{label:"Parameters",hidden:t.value?.deprecated},{label:"Configuration",hidden:t.value?.deprecated},{label:"Description"}]),p=O("tab","Details"),{tabs:x}=P(R,p);function D(){g.push(ee.deployments())}const{filter:k}=f({deployments:{id:c},flowRuns:{state:{name:te.filter(y=>y!=="Scheduled")}}}),{filter:U}=f({sort:"START_TIME_ASC",deployments:{id:c},flowRuns:{state:{name:["Scheduled"]}}}),{flowRun:m}=z(()=>({deployments:{id:c.value}})),S=u(()=>t.value?`Deployment: ${t.value.name}`:"Deployment");return ne(S),(y,d)=>{const T=o("p-content"),C=o("p-heading"),B=o("p-divider"),F=o("p-tabs"),N=o("p-layout-well");return t.value?(a(),r(N,{key:0,class:"deployment"},{header:l(()=>[n(e(Y),{deployment:t.value,onUpdate:e(s).refresh,onDelete:D},null,8,["deployment","onUpdate"])]),well:l(()=>[n(e(b),{deployment:t.value,alternate:"",onUpdate:e(s).refresh},null,8,["deployment","onUpdate"])]),default:l(()=>[n(F,{selected:e(p),"onUpdate:selected":d[0]||(d[0]=I=>J(p)?p.value=I:null),tabs:e(x)},{description:l(()=>[n(T,{secondary:""},{default:l(()=>[t.value.deprecated?(a(),r(e(Q),{key:0})):t.value.description?(a(),r(e(W),{key:1,description:t.value.description},null,8,["description"])):(a(),r(e(X),{key:2,deployment:t.value},null,8,["deployment"]))]),_:1})]),parameters:l(()=>[n(e(L),{deployment:t.value},null,8,["deployment"])]),configuration:l(()=>[n(e(K),{deployment:t.value},null,8,["deployment"])]),details:l(()=>[n(e(b),{deployment:t.value,onUpdate:e(s).refresh},null,8,["deployment","onUpdate"])]),runs:l(()=>[e(m)?(a(),M(Z,{key:0},[n(C,{heading:"6",class:"deployment__next-run"},{default:l(()=>[...d[1]||(d[1]=[G(" Next Run ",-1)])]),_:1}),n(e(H),{"flow-run":e(m)},null,8,["flow-run"]),n(B)],64)):v("",!0),n(e(_),{filter:e(k),selectable:"",prefix:"runs"},null,8,["filter"])]),upcoming:l(()=>[n(e(_),{filter:e(U),selectable:"",prefix:"upcoming"},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})):v("",!0)}}});export{se as default};
2
- //# sourceMappingURL=Deployment-BnhoLgTP.js.map
1
+ import{d as V,v as $,g as u,u as j,S as q,j as A,aJ as E,al as O,bv as P,bw as f,bZ as z,h as o,c as r,a as v,o as a,i as l,k as n,m as e,a6 as J,bB as _,n as M,F as Z,B as G,b_ as H,b$ as b,c0 as K,c1 as L,c2 as Q,c3 as W,c4 as X,c5 as Y,bg as ee,c6 as te}from"./index-DS86r6aC.js";import{u as ne}from"./usePageTitle-BXVkHaWQ.js";const se=V({__name:"Deployment",setup(le){const i=$("deploymentId"),c=u(()=>[i.value]),g=j(),w=q(),h={interval:3e5},s=A(w.deployments.getDeployment,[i.value],h),t=u(()=>s.response),R=u(()=>[{label:"Details",hidden:E.xl},{label:"Runs"},{label:"Upcoming"},{label:"Parameters",hidden:t.value?.deprecated},{label:"Configuration",hidden:t.value?.deprecated},{label:"Description"}]),p=O("tab","Details"),{tabs:x}=P(R,p);function D(){g.push(ee.deployments())}const{filter:k}=f({deployments:{id:c},flowRuns:{state:{name:te.filter(y=>y!=="Scheduled")}}}),{filter:U}=f({sort:"START_TIME_ASC",deployments:{id:c},flowRuns:{state:{name:["Scheduled"]}}}),{flowRun:m}=z(()=>({deployments:{id:c.value}})),S=u(()=>t.value?`Deployment: ${t.value.name}`:"Deployment");return ne(S),(y,d)=>{const T=o("p-content"),C=o("p-heading"),B=o("p-divider"),F=o("p-tabs"),N=o("p-layout-well");return t.value?(a(),r(N,{key:0,class:"deployment"},{header:l(()=>[n(e(Y),{deployment:t.value,onUpdate:e(s).refresh,onDelete:D},null,8,["deployment","onUpdate"])]),well:l(()=>[n(e(b),{deployment:t.value,alternate:"",onUpdate:e(s).refresh},null,8,["deployment","onUpdate"])]),default:l(()=>[n(F,{selected:e(p),"onUpdate:selected":d[0]||(d[0]=I=>J(p)?p.value=I:null),tabs:e(x)},{description:l(()=>[n(T,{secondary:""},{default:l(()=>[t.value.deprecated?(a(),r(e(Q),{key:0})):t.value.description?(a(),r(e(W),{key:1,description:t.value.description},null,8,["description"])):(a(),r(e(X),{key:2,deployment:t.value},null,8,["deployment"]))]),_:1})]),parameters:l(()=>[n(e(L),{deployment:t.value},null,8,["deployment"])]),configuration:l(()=>[n(e(K),{deployment:t.value},null,8,["deployment"])]),details:l(()=>[n(e(b),{deployment:t.value,onUpdate:e(s).refresh},null,8,["deployment","onUpdate"])]),runs:l(()=>[e(m)?(a(),M(Z,{key:0},[n(C,{heading:"6",class:"deployment__next-run"},{default:l(()=>[...d[1]||(d[1]=[G(" Next Run ",-1)])]),_:1}),n(e(H),{"flow-run":e(m)},null,8,["flow-run"]),n(B)],64)):v("",!0),n(e(_),{filter:e(k),selectable:"",prefix:"runs"},null,8,["filter"])]),upcoming:l(()=>[n(e(_),{filter:e(U),selectable:"",prefix:"upcoming"},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})):v("",!0)}}});export{se as default};
2
+ //# sourceMappingURL=Deployment-DY8bGLAc.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Deployment-BnhoLgTP.js","sources":["../../src/pages/Deployment.vue"],"sourcesContent":["<template>\n <p-layout-well v-if=\"deployment\" class=\"deployment\">\n <template #header>\n <PageHeadingDeployment\n :deployment=\"deployment\"\n @update=\"deploymentSubscription.refresh\"\n @delete=\"routeToDeployments\"\n />\n </template>\n\n\n <p-tabs v-model:selected=\"tab\" :tabs=\"tabs\">\n <template #description>\n <p-content secondary>\n <DeploymentDeprecatedMessage v-if=\"deployment.deprecated\" />\n <template v-else-if=\"deployment.description\">\n <DeploymentDescription :description=\"deployment.description\" />\n </template>\n <template v-else>\n <DeploymentDescriptionEmptyState :deployment=\"deployment\" />\n </template>\n </p-content>\n </template>\n\n <template #parameters>\n <ParametersTable :deployment=\"deployment\" />\n </template>\n\n <template #configuration>\n <DeploymentConfiguration :deployment=\"deployment\" />\n </template>\n\n <template #details>\n <DeploymentDetails :deployment=\"deployment\" @update=\"deploymentSubscription.refresh\" />\n </template>\n\n <template #runs>\n <template v-if=\"nextRun\">\n <p-heading heading=\"6\" class=\"deployment__next-run\">\n Next Run\n </p-heading>\n <FlowRunListItem :flow-run=\"nextRun\" />\n <p-divider />\n </template>\n <FlowRunFilteredList :filter=\"flowRunsFilter\" selectable prefix=\"runs\" />\n </template>\n\n <template #upcoming>\n <FlowRunFilteredList :filter=\"upcomingFlowRunsFilter\" selectable prefix=\"upcoming\" />\n </template>\n </p-tabs>\n\n <template #well>\n <DeploymentDetails :deployment=\"deployment\" alternate @update=\"deploymentSubscription.refresh\" />\n </template>\n </p-layout-well>\n</template>\n\n<script lang=\"ts\" setup>\n import { media } from '@prefecthq/prefect-design'\n import { DeploymentDescription, FlowRunListItem, DeploymentDetails, DeploymentDescriptionEmptyState, PageHeadingDeployment, ParametersTable, DeploymentDeprecatedMessage, useTabs, useWorkspaceApi, useFlowRunsFilter, prefectStateNames, DeploymentConfiguration, useNextFlowRun, FlowRunFilteredList } from '@prefecthq/prefect-ui-library'\n import { useRouteParam, useRouteQueryParam, useSubscription } from '@prefecthq/vue-compositions'\n import { computed } from 'vue'\n import { useRouter } from 'vue-router'\n import { usePageTitle } from '@/compositions/usePageTitle'\n import { routes } from '@/router'\n\n\n const deploymentId = useRouteParam('deploymentId')\n const deploymentIds = computed(() => [deploymentId.value])\n const router = useRouter()\n const api = useWorkspaceApi()\n\n const subscriptionOptions = {\n interval: 300000,\n }\n\n const deploymentSubscription = useSubscription(api.deployments.getDeployment, [deploymentId.value], subscriptionOptions)\n const deployment = computed(() => deploymentSubscription.response)\n\n const computedTabs = computed(() => [\n { label: 'Details', hidden: media.xl },\n { label: 'Runs' },\n { label: 'Upcoming' },\n { label: 'Parameters', hidden: deployment.value?.deprecated },\n { label: 'Configuration', hidden: deployment.value?.deprecated },\n { label: 'Description' },\n ])\n const tab = useRouteQueryParam('tab', 'Details')\n const { tabs } = useTabs(computedTabs, tab)\n\n function routeToDeployments(): void {\n router.push(routes.deployments())\n }\n\n const { filter: flowRunsFilter } = useFlowRunsFilter({\n deployments: {\n id: deploymentIds,\n },\n flowRuns: {\n state: {\n name: prefectStateNames.filter(stateName => stateName !== 'Scheduled'),\n },\n },\n })\n\n const { filter: upcomingFlowRunsFilter } = useFlowRunsFilter({\n sort: 'START_TIME_ASC',\n deployments: {\n id: deploymentIds,\n },\n flowRuns: {\n state: {\n name: ['Scheduled'],\n },\n },\n })\n\n const { flowRun: nextRun } = useNextFlowRun(() => ({\n deployments: {\n id: deploymentIds.value,\n },\n }))\n\n\n const title = computed(() => {\n if (!deployment.value) {\n return 'Deployment'\n }\n return `Deployment: ${deployment.value.name}`\n })\n usePageTitle(title)\n</script>\n\n<style>\n.deployment__next-run { @apply\n mb-2\n}\n</style>"],"names":["deploymentId","useRouteParam","deploymentIds","computed","router","useRouter","api","useWorkspaceApi","subscriptionOptions","deploymentSubscription","useSubscription","deployment","computedTabs","media","tab","useRouteQueryParam","tabs","useTabs","routeToDeployments","routes","flowRunsFilter","useFlowRunsFilter","prefectStateNames","stateName","upcomingFlowRunsFilter","nextRun","useNextFlowRun","title","usePageTitle","_createBlock","_component_p_layout_well","_createVNode","_unref","PageHeadingDeployment","DeploymentDetails","_component_p_tabs","$event","_component_p_content","DeploymentDeprecatedMessage","DeploymentDescription","DeploymentDescriptionEmptyState","ParametersTable","DeploymentConfiguration","_createElementBlock","_Fragment","_component_p_heading","_cache","FlowRunListItem","_component_p_divider","FlowRunFilteredList"],"mappings":"qXAoEE,MAAMA,EAAeC,EAAc,cAAc,EAC3CC,EAAgBC,EAAS,IAAM,CAACH,EAAa,KAAK,CAAC,EACnDI,EAASC,EAAA,EACTC,EAAMC,EAAA,EAENC,EAAsB,CAC1B,SAAU,GAAA,EAGNC,EAAyBC,EAAgBJ,EAAI,YAAY,cAAe,CAACN,EAAa,KAAK,EAAGQ,CAAmB,EACjHG,EAAaR,EAAS,IAAMM,EAAuB,QAAQ,EAE3DG,EAAeT,EAAS,IAAM,CAClC,CAAE,MAAO,UAAW,OAAQU,EAAM,EAAA,EAClC,CAAE,MAAO,MAAA,EACT,CAAE,MAAO,UAAA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AAwB,WAAA,GAAW,OAAO,UAAA"}
1
+ {"version":3,"file":"Deployment-DY8bGLAc.js","sources":["../../src/pages/Deployment.vue"],"sourcesContent":["<template>\n <p-layout-well v-if=\"deployment\" class=\"deployment\">\n <template #header>\n <PageHeadingDeployment\n :deployment=\"deployment\"\n @update=\"deploymentSubscription.refresh\"\n @delete=\"routeToDeployments\"\n />\n </template>\n\n\n <p-tabs v-model:selected=\"tab\" :tabs=\"tabs\">\n <template #description>\n <p-content secondary>\n <DeploymentDeprecatedMessage v-if=\"deployment.deprecated\" />\n <template v-else-if=\"deployment.description\">\n <DeploymentDescription :description=\"deployment.description\" />\n </template>\n <template v-else>\n <DeploymentDescriptionEmptyState :deployment=\"deployment\" />\n </template>\n </p-content>\n </template>\n\n <template #parameters>\n <ParametersTable :deployment=\"deployment\" />\n </template>\n\n <template #configuration>\n <DeploymentConfiguration :deployment=\"deployment\" />\n </template>\n\n <template #details>\n <DeploymentDetails :deployment=\"deployment\" @update=\"deploymentSubscription.refresh\" />\n </template>\n\n <template #runs>\n <template v-if=\"nextRun\">\n <p-heading heading=\"6\" class=\"deployment__next-run\">\n Next Run\n </p-heading>\n <FlowRunListItem :flow-run=\"nextRun\" />\n <p-divider />\n </template>\n <FlowRunFilteredList :filter=\"flowRunsFilter\" selectable prefix=\"runs\" />\n </template>\n\n <template #upcoming>\n <FlowRunFilteredList :filter=\"upcomingFlowRunsFilter\" selectable prefix=\"upcoming\" />\n </template>\n </p-tabs>\n\n <template #well>\n <DeploymentDetails :deployment=\"deployment\" alternate @update=\"deploymentSubscription.refresh\" />\n </template>\n </p-layout-well>\n</template>\n\n<script lang=\"ts\" setup>\n import { media } from '@prefecthq/prefect-design'\n import { DeploymentDescription, FlowRunListItem, DeploymentDetails, DeploymentDescriptionEmptyState, PageHeadingDeployment, ParametersTable, DeploymentDeprecatedMessage, useTabs, useWorkspaceApi, useFlowRunsFilter, prefectStateNames, DeploymentConfiguration, useNextFlowRun, FlowRunFilteredList } from '@prefecthq/prefect-ui-library'\n import { useRouteParam, useRouteQueryParam, useSubscription } from '@prefecthq/vue-compositions'\n import { computed } from 'vue'\n import { useRouter } from 'vue-router'\n import { usePageTitle } from '@/compositions/usePageTitle'\n import { routes } from '@/router'\n\n\n const deploymentId = useRouteParam('deploymentId')\n const deploymentIds = computed(() => [deploymentId.value])\n const router = useRouter()\n const api = useWorkspaceApi()\n\n const subscriptionOptions = {\n interval: 300000,\n }\n\n const deploymentSubscription = useSubscription(api.deployments.getDeployment, [deploymentId.value], subscriptionOptions)\n const deployment = computed(() => deploymentSubscription.response)\n\n const computedTabs = computed(() => [\n { label: 'Details', hidden: media.xl },\n { label: 'Runs' },\n { label: 'Upcoming' },\n { label: 'Parameters', hidden: deployment.value?.deprecated },\n { label: 'Configuration', hidden: deployment.value?.deprecated },\n { label: 'Description' },\n ])\n const tab = useRouteQueryParam('tab', 'Details')\n const { tabs } = useTabs(computedTabs, tab)\n\n function routeToDeployments(): void {\n router.push(routes.deployments())\n }\n\n const { filter: flowRunsFilter } = useFlowRunsFilter({\n deployments: {\n id: deploymentIds,\n },\n flowRuns: {\n state: {\n name: prefectStateNames.filter(stateName => stateName !== 'Scheduled'),\n },\n },\n })\n\n const { filter: upcomingFlowRunsFilter } = useFlowRunsFilter({\n sort: 'START_TIME_ASC',\n deployments: {\n id: deploymentIds,\n },\n flowRuns: {\n state: {\n name: ['Scheduled'],\n },\n },\n })\n\n const { flowRun: nextRun } = useNextFlowRun(() => ({\n deployments: {\n id: deploymentIds.value,\n },\n }))\n\n\n const title = computed(() => {\n if (!deployment.value) {\n return 'Deployment'\n }\n return `Deployment: ${deployment.value.name}`\n })\n usePageTitle(title)\n</script>\n\n<style>\n.deployment__next-run { @apply\n mb-2\n}\n</style>"],"names":["deploymentId","useRouteParam","deploymentIds","computed","router","useRouter","api","useWorkspaceApi","subscriptionOptions","deploymentSubscription","useSubscription","deployment","computedTabs","media","tab","useRouteQueryParam","tabs","useTabs","routeToDeployments","routes","flowRunsFilter","useFlowRunsFilter","prefectStateNames","stateName","upcomingFlowRunsFilter","nextRun","useNextFlowRun","title","usePageTitle","_createBlock","_component_p_layout_well","_createVNode","_unref","PageHeadingDeployment","DeploymentDetails","_component_p_tabs","$event","_component_p_content","DeploymentDeprecatedMessage","DeploymentDescription","DeploymentDescriptionEmptyState","ParametersTable","DeploymentConfiguration","_createElementBlock","_Fragment","_component_p_heading","_cache","FlowRunListItem","_component_p_divider","FlowRunFilteredList"],"mappings":"qXAoEE,MAAMA,EAAeC,EAAc,cAAc,EAC3CC,EAAgBC,EAAS,IAAM,CAACH,EAAa,KAAK,CAAC,EACnDI,EAASC,EAAA,EACTC,EAAMC,EAAA,EAENC,EAAsB,CAC1B,SAAU,GAAA,EAGNC,EAAyBC,EAAgBJ,EAAI,YAAY,cAAe,CAACN,EAAa,KAAK,EAAGQ,CAAmB,EACjHG,EAAaR,EAAS,IAAMM,EAAuB,QAAQ,EAE3DG,EAAeT,EAAS,IAAM,CAClC,CAAE,MAAO,UAAW,OAAQU,EAAM,EAAA,EAClC,CAAE,MAAO,MAAA,EACT,CAAE,MAAO,UAAA,EACT,CAAE,MAAO,aAAc,OAAQF,EAAW,OAAO,UAAA,EACjD,CAAE,MAAO,gBAAiB,OAAQA,EAAW,OAAO,UAAA,EACpD,CAAE,MAAO,aAAA,CAAc,CACxB,EACKG,EAAMC,EAAmB,MAAO,SAAS,EACzC,CAAE,KAAAC,CAAA,EAASC,EAAQL,EAAcE,CAAG,EAE1C,SAASI,GAA2B,CAClCd,EAAO,KAAKe,GAAO,aAAa,CAClC,CAEA,KAAM,CAAE,OAAQC,CAAA,EAAmBC,EAAkB,CACnD,YAAa,CACX,GAAInB,CAAA,EAEN,SAAU,CACR,MAAO,CACL,KAAMoB,GAAkB,OAAOC,GAAaA,IAAc,WAAW,CAAA,CACvE,CACF,CACD,EAEK,CAAE,OAAQC,CAAA,EAA2BH,EAAkB,CAC3D,KAAM,iBACN,YAAa,CACX,GAAInB,CAAA,EAEN,SAAU,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A,CAAA,YAAA,CAAA,CAAA,GAGvC,UACT,IAAuF,CAAvFoB,EAAuFC,EAAAE,CAAA,EAAA,CAAnE,WAAYvB,EAAA,MAAa,SAAQqB,EAAAvB,CAAA,EAAuB,OAAA,sCAGnE,OACT,IAMW,CANKuB,EAAAP,CAAA,OAAhBkB,EAMWC,EAAA,CAAA,IAAA,GAAA,CALTb,EAEYc,EAAA,CAFD,QAAQ,IAAI,MAAM,sBAAA,aAAuB,IAEpD,CAAA,GAAAC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAFoD,aAEpD,EAAA,CAAA,WACAf,EAAuCC,EAAAe,CAAA,EAAA,CAArB,WAAUf,EAAAP,CAAA,CAAA,EAAO,KAAA,EAAA,CAAA,UAAA,CAAA,EACnCM,EAAaiB,CAAA,CAAA,gBAEfjB,EAAyEC,EAAAiB,CAAA,EAAA,CAAnD,OAAQjB,EAAAZ,CAAA,EAAgB,WAAA,GAAW,OAAO,MAAA,uBAGvD,WACT,IAAqF,CAArFW,EAAqFC,EAAAiB,CAAA,EAAA,CAA/D,OAAQjB,EAAAR,CAAA,EAAwB,WAAA,GAAW,OAAO,UAAA"}
@@ -1,2 +1,2 @@
1
- import{d as v,S as D,v as h,j as g,g as s,h as w,c as C,a as b,o as k,i as l,k as r,m as c,c7 as S,c8 as x,J as p,c9 as m,bg as E,Y as I}from"./index-C9FkjDpZ.js";import{u as j}from"./usePageTitle-B0Hz_El0.js";const V=v({__name:"DeploymentDuplicate",setup(B){const a=D(),u=h("deploymentId"),d=g(a.deployments.getDeployment,[u.value],{}),e=s(()=>d.response);function i(t){return"name"in t}async function y(t){try{if(!i(t))throw new Error("Invalid request");const n=await a.deployments.createDeployment(t);p("Deployment created","success"),m.push(E.deployment(n.id))}catch(n){const o=I(n,"Error creating deployment");p(o,"error"),console.warn(n)}}function f(){m.back()}const _=s(()=>e.value?`Duplicate Deployment: ${e.value.name}`:"Duplicate Deployment");return j(_),(t,n)=>{const o=w("p-layout-default");return e.value?(k(),C(o,{key:0,class:"deployment-edit"},{header:l(()=>[r(c(x),{deployment:e.value},null,8,["deployment"])]),default:l(()=>[r(c(S),{deployment:e.value,mode:"duplicate",onCancel:f,onSubmit:y},null,8,["deployment"])]),_:1})):b("",!0)}}});export{V as default};
2
- //# sourceMappingURL=DeploymentDuplicate-B8_LrQLl.js.map
1
+ import{d as v,S as D,v as h,j as g,g as s,h as w,c as C,a as b,o as k,i as l,k as r,m as c,c7 as S,c8 as x,J as p,c9 as m,bg as E,Y as I}from"./index-DS86r6aC.js";import{u as j}from"./usePageTitle-BXVkHaWQ.js";const V=v({__name:"DeploymentDuplicate",setup(B){const a=D(),u=h("deploymentId"),d=g(a.deployments.getDeployment,[u.value],{}),e=s(()=>d.response);function i(t){return"name"in t}async function y(t){try{if(!i(t))throw new Error("Invalid request");const n=await a.deployments.createDeployment(t);p("Deployment created","success"),m.push(E.deployment(n.id))}catch(n){const o=I(n,"Error creating deployment");p(o,"error"),console.warn(n)}}function f(){m.back()}const _=s(()=>e.value?`Duplicate Deployment: ${e.value.name}`:"Duplicate Deployment");return j(_),(t,n)=>{const o=w("p-layout-default");return e.value?(k(),C(o,{key:0,class:"deployment-edit"},{header:l(()=>[r(c(x),{deployment:e.value},null,8,["deployment"])]),default:l(()=>[r(c(S),{deployment:e.value,mode:"duplicate",onCancel:f,onSubmit:y},null,8,["deployment"])]),_:1})):b("",!0)}}});export{V as default};
2
+ //# sourceMappingURL=DeploymentDuplicate-CMMz8lrd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DeploymentDuplicate-B8_LrQLl.js","sources":["../../src/pages/DeploymentDuplicate.vue"],"sourcesContent":["<template>\n <p-layout-default v-if=\"deployment\" class=\"deployment-edit\">\n <template #header>\n <PageHeadingDeploymentDuplicate :deployment=\"deployment\" />\n </template>\n\n <DeploymentForm :deployment=\"deployment\" mode=\"duplicate\" @cancel=\"cancel\" @submit=\"submit\" />\n </p-layout-default>\n</template>\n\n<script lang=\"ts\" setup>\n import { showToast } from '@prefecthq/prefect-design'\n import { PageHeadingDeploymentDuplicate, useWorkspaceApi, getApiErrorMessage, DeploymentForm, DeploymentCreate, DeploymentUpdateV2 } from '@prefecthq/prefect-ui-library'\n import { useSubscription, useRouteParam } from '@prefecthq/vue-compositions'\n import { computed } from 'vue'\n import { usePageTitle } from '@/compositions/usePageTitle'\n import router, { routes } from '@/router'\n\n const api = useWorkspaceApi()\n const deploymentId = useRouteParam('deploymentId')\n\n const deploymentSubscription = useSubscription(api.deployments.getDeployment, [deploymentId.value], {})\n const deployment = computed(() => deploymentSubscription.response)\n\n function isDeploymentCreate(request: DeploymentCreate | DeploymentUpdateV2): request is DeploymentCreate {\n return 'name' in request\n }\n\n async function submit(request: DeploymentCreate | DeploymentUpdateV2): Promise<void> {\n try {\n if (!isDeploymentCreate(request)) {\n throw new Error('Invalid request')\n }\n const newDeployment = await api.deployments.createDeployment(request)\n showToast('Deployment created', 'success')\n router.push(routes.deployment(newDeployment.id))\n } catch (error) {\n const message = getApiErrorMessage(error, 'Error creating deployment')\n showToast(message, 'error')\n console.warn(error)\n }\n }\n\n function cancel(): void {\n router.back()\n }\n\n const title = computed(() => {\n if (!deployment.value) {\n return 'Duplicate Deployment'\n }\n return `Duplicate Deployment: ${deployment.value.name}`\n })\n usePageTitle(title)\n</script>\n\n"],"names":["api","useWorkspaceApi","deploymentId","useRouteParam","deploymentSubscription","useSubscription","deployment","computed","isDeploymentCreate","request","submit","newDeployment","showToast","router","routes","error","message","getApiErrorMessage","cancel","title","usePageTitle","_createBlock","_component_p_layout_default","_createVNode","_unref","PageHeadingDeploymentDuplicate","DeploymentForm"],"mappings":"mQAkBE,MAAMA,EAAMC,EAAA,EACNC,EAAeC,EAAc,cAAc,EAE3CC,EAAyBC,EAAgBL,EAAI,YAAY,cAAe,CAACE,EAAa,KAAK,EAAG,EAAE,EAChGI,EAAaC,EAAS,IAAMH,EAAuB,QAAQ,EAEjE,SAASI,EAAmBC,EAA6E,CACvG,MAAO,SAAUA,CACnB,CAEA,eAAeC,EAAOD,EAA+D,CACnF,GAAI,CACF,GAAI,CAACD,EAAmBC,CAAO,EAC7B,MAAM,IAAI,MAAM,iBAAiB,EAEnC,MAAME,EAAgB,MAAMX,EAAI,YAAY,iBAAiBS,CAAO,EACpEG,EAAU,qBAAsB,SAAS,EACzCC,EAAO,KAAKC,EAAO,WAAWH,EAAc,EAAE,CAAC,CACjD,OAASI,EAAO,CACd,MAAMC,EAAUC,EAAmBF,EAAO,2BAA2B,EACrEH,EAAUI,EAAS,OAAO,EAC1B,QAAQ,KAAKD,CAAK,CACpB,CACF,CAEA,SAASG,GAAe,CACtBL,EAAO,KAAA,CACT,CAEA,MAAMM,EAAQZ,EAAS,IAChBD,EAAW,MAGT,yBAAyBA,EAAW,MAAM,IAAI,GAF5C,sBAGV,EACD,OAAAc,EAAaD,CAAK,+CApDMb,EAAA,WAAxBe,EAMmBC,EAAA,OANiB,MAAM,iBAAA,GAC7B,SACT,IAA2D,CAA3DC,EAA2DC,EAAAC,CAAA,EAAA,CAA1B,WAAYnB,EAAA,OAAU,KAAA,EAAA,CAAA,YAAA,CAAA,CAAA,aAGzD,IAA8F,CAA9FiB,EAA8FC,EAAAE,CAAA,EAAA,CAA7E,WAAYpB,EAAA,MAAY,KAAK,YAAa,SAAQY,EAAS,SAAQR,CAAA"}
1
+ {"version":3,"file":"DeploymentDuplicate-CMMz8lrd.js","sources":["../../src/pages/DeploymentDuplicate.vue"],"sourcesContent":["<template>\n <p-layout-default v-if=\"deployment\" class=\"deployment-edit\">\n <template #header>\n <PageHeadingDeploymentDuplicate :deployment=\"deployment\" />\n </template>\n\n <DeploymentForm :deployment=\"deployment\" mode=\"duplicate\" @cancel=\"cancel\" @submit=\"submit\" />\n </p-layout-default>\n</template>\n\n<script lang=\"ts\" setup>\n import { showToast } from '@prefecthq/prefect-design'\n import { PageHeadingDeploymentDuplicate, useWorkspaceApi, getApiErrorMessage, DeploymentForm, DeploymentCreate, DeploymentUpdateV2 } from '@prefecthq/prefect-ui-library'\n import { useSubscription, useRouteParam } from '@prefecthq/vue-compositions'\n import { computed } from 'vue'\n import { usePageTitle } from '@/compositions/usePageTitle'\n import router, { routes } from '@/router'\n\n const api = useWorkspaceApi()\n const deploymentId = useRouteParam('deploymentId')\n\n const deploymentSubscription = useSubscription(api.deployments.getDeployment, [deploymentId.value], {})\n const deployment = computed(() => deploymentSubscription.response)\n\n function isDeploymentCreate(request: DeploymentCreate | DeploymentUpdateV2): request is DeploymentCreate {\n return 'name' in request\n }\n\n async function submit(request: DeploymentCreate | DeploymentUpdateV2): Promise<void> {\n try {\n if (!isDeploymentCreate(request)) {\n throw new Error('Invalid request')\n }\n const newDeployment = await api.deployments.createDeployment(request)\n showToast('Deployment created', 'success')\n router.push(routes.deployment(newDeployment.id))\n } catch (error) {\n const message = getApiErrorMessage(error, 'Error creating deployment')\n showToast(message, 'error')\n console.warn(error)\n }\n }\n\n function cancel(): void {\n router.back()\n }\n\n const title = computed(() => {\n if (!deployment.value) {\n return 'Duplicate Deployment'\n }\n return `Duplicate Deployment: ${deployment.value.name}`\n })\n usePageTitle(title)\n</script>\n\n"],"names":["api","useWorkspaceApi","deploymentId","useRouteParam","deploymentSubscription","useSubscription","deployment","computed","isDeploymentCreate","request","submit","newDeployment","showToast","router","routes","error","message","getApiErrorMessage","cancel","title","usePageTitle","_createBlock","_component_p_layout_default","_createVNode","_unref","PageHeadingDeploymentDuplicate","DeploymentForm"],"mappings":"mQAkBE,MAAMA,EAAMC,EAAA,EACNC,EAAeC,EAAc,cAAc,EAE3CC,EAAyBC,EAAgBL,EAAI,YAAY,cAAe,CAACE,EAAa,KAAK,EAAG,EAAE,EAChGI,EAAaC,EAAS,IAAMH,EAAuB,QAAQ,EAEjE,SAASI,EAAmBC,EAA6E,CACvG,MAAO,SAAUA,CACnB,CAEA,eAAeC,EAAOD,EAA+D,CACnF,GAAI,CACF,GAAI,CAACD,EAAmBC,CAAO,EAC7B,MAAM,IAAI,MAAM,iBAAiB,EAEnC,MAAME,EAAgB,MAAMX,EAAI,YAAY,iBAAiBS,CAAO,EACpEG,EAAU,qBAAsB,SAAS,EACzCC,EAAO,KAAKC,EAAO,WAAWH,EAAc,EAAE,CAAC,CACjD,OAASI,EAAO,CACd,MAAMC,EAAUC,EAAmBF,EAAO,2BAA2B,EACrEH,EAAUI,EAAS,OAAO,EAC1B,QAAQ,KAAKD,CAAK,CACpB,CACF,CAEA,SAASG,GAAe,CACtBL,EAAO,KAAA,CACT,CAEA,MAAMM,EAAQZ,EAAS,IAChBD,EAAW,MAGT,yBAAyBA,EAAW,MAAM,IAAI,GAF5C,sBAGV,EACD,OAAAc,EAAaD,CAAK,+CApDMb,EAAA,WAAxBe,EAMmBC,EAAA,OANiB,MAAM,iBAAA,GAC7B,SACT,IAA2D,CAA3DC,EAA2DC,EAAAC,CAAA,EAAA,CAA1B,WAAYnB,EAAA,OAAU,KAAA,EAAA,CAAA,YAAA,CAAA,CAAA,aAGzD,IAA8F,CAA9FiB,EAA8FC,EAAAE,CAAA,EAAA,CAA7E,WAAYpB,EAAA,MAAY,KAAK,YAAa,SAAQY,EAAS,SAAQR,CAAA"}
@@ -1,2 +1,2 @@
1
- import{d as _,S as h,v as b,j as g,g as p,h as D,c as k,a as C,o as E,i as r,k as c,m as u,c7 as S,ca as w,J as m,c9 as d,bg as x,Y as V}from"./index-C9FkjDpZ.js";import{u as Y}from"./usePageTitle-B0Hz_El0.js";const J=_({__name:"DeploymentEdit",setup(j){const a=h(),t=b("deploymentId"),i={interval:3e5},s=g(a.deployments.getDeployment,[t.value],i),e=p(()=>s.response);async function y(l){try{await a.deployments.updateDeploymentV2(t.value,l),m("Deployment updated","success"),s.refresh(),d.push(x.deployment(t.value))}catch(o){const n=V(o,"Error updating deployment");m(n,"error"),console.warn(o)}}function f(){d.back()}const v=p(()=>e.value?`Edit Deployment: ${e.value.name}`:"Edit Deployment");return Y(v),(l,o)=>{const n=D("p-layout-default");return e.value?(E(),k(n,{key:0,class:"deployment-edit"},{header:r(()=>[c(u(w),{deployment:e.value},null,8,["deployment"])]),default:r(()=>[c(u(S),{deployment:e.value,onCancel:f,onSubmit:y},null,8,["deployment"])]),_:1})):C("",!0)}}});export{J as default};
2
- //# sourceMappingURL=DeploymentEdit-B4W9AHKw.js.map
1
+ import{d as _,S as h,v as b,j as g,g as p,h as D,c as k,a as C,o as E,i as r,k as c,m as u,c7 as S,ca as w,J as m,c9 as d,bg as x,Y as V}from"./index-DS86r6aC.js";import{u as Y}from"./usePageTitle-BXVkHaWQ.js";const J=_({__name:"DeploymentEdit",setup(j){const a=h(),t=b("deploymentId"),i={interval:3e5},s=g(a.deployments.getDeployment,[t.value],i),e=p(()=>s.response);async function y(l){try{await a.deployments.updateDeploymentV2(t.value,l),m("Deployment updated","success"),s.refresh(),d.push(x.deployment(t.value))}catch(o){const n=V(o,"Error updating deployment");m(n,"error"),console.warn(o)}}function f(){d.back()}const v=p(()=>e.value?`Edit Deployment: ${e.value.name}`:"Edit Deployment");return Y(v),(l,o)=>{const n=D("p-layout-default");return e.value?(E(),k(n,{key:0,class:"deployment-edit"},{header:r(()=>[c(u(w),{deployment:e.value},null,8,["deployment"])]),default:r(()=>[c(u(S),{deployment:e.value,onCancel:f,onSubmit:y},null,8,["deployment"])]),_:1})):C("",!0)}}});export{J as default};
2
+ //# sourceMappingURL=DeploymentEdit-BlRSxdKn.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DeploymentEdit-B4W9AHKw.js","sources":["../../src/pages/DeploymentEdit.vue"],"sourcesContent":["<template>\n <p-layout-default v-if=\"deployment\" class=\"deployment-edit\">\n <template #header>\n <PageHeadingDeploymentEdit :deployment=\"deployment\" />\n </template>\n\n <DeploymentForm :deployment=\"deployment\" @cancel=\"cancel\" @submit=\"submit\" />\n </p-layout-default>\n</template>\n\n<script lang=\"ts\" setup>\n import { showToast } from '@prefecthq/prefect-design'\n import { PageHeadingDeploymentEdit, useWorkspaceApi, DeploymentUpdateV2, getApiErrorMessage, DeploymentForm } from '@prefecthq/prefect-ui-library'\n import { useSubscription, useRouteParam } from '@prefecthq/vue-compositions'\n import { computed } from 'vue'\n import { usePageTitle } from '@/compositions/usePageTitle'\n import router, { routes } from '@/router'\n\n const api = useWorkspaceApi()\n const deploymentId = useRouteParam('deploymentId')\n const subscriptionOptions = {\n interval: 300000,\n }\n\n const deploymentSubscription = useSubscription(api.deployments.getDeployment, [deploymentId.value], subscriptionOptions)\n const deployment = computed(() => deploymentSubscription.response)\n\n async function submit(request: DeploymentUpdateV2): Promise<void> {\n try {\n await api.deployments.updateDeploymentV2(deploymentId.value, request)\n showToast('Deployment updated', 'success')\n deploymentSubscription.refresh()\n router.push(routes.deployment(deploymentId.value))\n } catch (error) {\n const message = getApiErrorMessage(error, 'Error updating deployment')\n showToast(message, 'error')\n console.warn(error)\n }\n }\n\n function cancel(): void {\n router.back()\n }\n\n const title = computed(() => {\n if (!deployment.value) {\n return 'Edit Deployment'\n }\n return `Edit Deployment: ${deployment.value.name}`\n })\n usePageTitle(title)\n</script>\n\n"],"names":["api","useWorkspaceApi","deploymentId","useRouteParam","subscriptionOptions","deploymentSubscription","useSubscription","deployment","computed","submit","request","showToast","router","routes","error","message","getApiErrorMessage","cancel","title","usePageTitle","_createBlock","_component_p_layout_default","_createVNode","_unref","PageHeadingDeploymentEdit","DeploymentForm"],"mappings":"8PAkBE,MAAMA,EAAMC,EAAA,EACNC,EAAeC,EAAc,cAAc,EAC3CC,EAAsB,CAC1B,SAAU,GAAA,EAGNC,EAAyBC,EAAgBN,EAAI,YAAY,cAAe,CAACE,EAAa,KAAK,EAAGE,CAAmB,EACjHG,EAAaC,EAAS,IAAMH,EAAuB,QAAQ,EAEjE,eAAeI,EAAOC,EAA4C,CAChE,GAAI,CACF,MAAMV,EAAI,YAAY,mBAAmBE,EAAa,MAAOQ,CAAO,EACpEC,EAAU,qBAAsB,SAAS,EACzCN,EAAuB,QAAA,EACvBO,EAAO,KAAKC,EAAO,WAAWX,EAAa,KAAK,CAAC,CACnD,OAASY,EAAO,CACd,MAAMC,EAAUC,EAAmBF,EAAO,2BAA2B,EACrEH,EAAUI,EAAS,OAAO,EAC1B,QAAQ,KAAKD,CAAK,CACpB,CACF,CAEA,SAASG,GAAe,CACtBL,EAAO,KAAA,CACT,CAEA,MAAMM,EAAQV,EAAS,IAChBD,EAAW,MAGT,oBAAoBA,EAAW,MAAM,IAAI,GAFvC,iBAGV,EACD,OAAAY,EAAaD,CAAK,+CAjDMX,EAAA,WAAxBa,EAMmBC,EAAA,OANiB,MAAM,iBAAA,GAC7B,SACT,IAAsD,CAAtDC,EAAsDC,EAAAC,CAAA,EAAA,CAA1B,WAAYjB,EAAA,OAAU,KAAA,EAAA,CAAA,YAAA,CAAA,CAAA,aAGpD,IAA6E,CAA7Ee,EAA6EC,EAAAE,CAAA,EAAA,CAA5D,WAAYlB,EAAA,MAAa,SAAQU,EAAS,SAAQR,CAAA"}
1
+ {"version":3,"file":"DeploymentEdit-BlRSxdKn.js","sources":["../../src/pages/DeploymentEdit.vue"],"sourcesContent":["<template>\n <p-layout-default v-if=\"deployment\" class=\"deployment-edit\">\n <template #header>\n <PageHeadingDeploymentEdit :deployment=\"deployment\" />\n </template>\n\n <DeploymentForm :deployment=\"deployment\" @cancel=\"cancel\" @submit=\"submit\" />\n </p-layout-default>\n</template>\n\n<script lang=\"ts\" setup>\n import { showToast } from '@prefecthq/prefect-design'\n import { PageHeadingDeploymentEdit, useWorkspaceApi, DeploymentUpdateV2, getApiErrorMessage, DeploymentForm } from '@prefecthq/prefect-ui-library'\n import { useSubscription, useRouteParam } from '@prefecthq/vue-compositions'\n import { computed } from 'vue'\n import { usePageTitle } from '@/compositions/usePageTitle'\n import router, { routes } from '@/router'\n\n const api = useWorkspaceApi()\n const deploymentId = useRouteParam('deploymentId')\n const subscriptionOptions = {\n interval: 300000,\n }\n\n const deploymentSubscription = useSubscription(api.deployments.getDeployment, [deploymentId.value], subscriptionOptions)\n const deployment = computed(() => deploymentSubscription.response)\n\n async function submit(request: DeploymentUpdateV2): Promise<void> {\n try {\n await api.deployments.updateDeploymentV2(deploymentId.value, request)\n showToast('Deployment updated', 'success')\n deploymentSubscription.refresh()\n router.push(routes.deployment(deploymentId.value))\n } catch (error) {\n const message = getApiErrorMessage(error, 'Error updating deployment')\n showToast(message, 'error')\n console.warn(error)\n }\n }\n\n function cancel(): void {\n router.back()\n }\n\n const title = computed(() => {\n if (!deployment.value) {\n return 'Edit Deployment'\n }\n return `Edit Deployment: ${deployment.value.name}`\n })\n usePageTitle(title)\n</script>\n\n"],"names":["api","useWorkspaceApi","deploymentId","useRouteParam","subscriptionOptions","deploymentSubscription","useSubscription","deployment","computed","submit","request","showToast","router","routes","error","message","getApiErrorMessage","cancel","title","usePageTitle","_createBlock","_component_p_layout_default","_createVNode","_unref","PageHeadingDeploymentEdit","DeploymentForm"],"mappings":"8PAkBE,MAAMA,EAAMC,EAAA,EACNC,EAAeC,EAAc,cAAc,EAC3CC,EAAsB,CAC1B,SAAU,GAAA,EAGNC,EAAyBC,EAAgBN,EAAI,YAAY,cAAe,CAACE,EAAa,KAAK,EAAGE,CAAmB,EACjHG,EAAaC,EAAS,IAAMH,EAAuB,QAAQ,EAEjE,eAAeI,EAAOC,EAA4C,CAChE,GAAI,CACF,MAAMV,EAAI,YAAY,mBAAmBE,EAAa,MAAOQ,CAAO,EACpEC,EAAU,qBAAsB,SAAS,EACzCN,EAAuB,QAAA,EACvBO,EAAO,KAAKC,EAAO,WAAWX,EAAa,KAAK,CAAC,CACnD,OAASY,EAAO,CACd,MAAMC,EAAUC,EAAmBF,EAAO,2BAA2B,EACrEH,EAAUI,EAAS,OAAO,EAC1B,QAAQ,KAAKD,CAAK,CACpB,CACF,CAEA,SAASG,GAAe,CACtBL,EAAO,KAAA,CACT,CAEA,MAAMM,EAAQV,EAAS,IAChBD,EAAW,MAGT,oBAAoBA,EAAW,MAAM,IAAI,GAFvC,iBAGV,EACD,OAAAY,EAAaD,CAAK,+CAjDMX,EAAA,WAAxBa,EAMmBC,EAAA,OANiB,MAAM,iBAAA,GAC7B,SACT,IAAsD,CAAtDC,EAAsDC,EAAAC,CAAA,EAAA,CAA1B,WAAYjB,EAAA,OAAU,KAAA,EAAA,CAAA,YAAA,CAAA,CAAA,aAGpD,IAA6E,CAA7Ee,EAA6EC,EAAAE,CAAA,EAAA,CAA5D,WAAYlB,EAAA,MAAa,SAAQU,EAAS,SAAQR,CAAA"}
@@ -0,0 +1,2 @@
1
+ import{d,S as i,j as y,g as s,h as _,c as a,o as t,i as n,n as f,a as k,F as v,m as o,bX as C,bU as b,k as h,bY as x}from"./index-DS86r6aC.js";import{u as D}from"./usePageTitle-BXVkHaWQ.js";const N=d({__name:"Deployments",setup(g){const l=i(),c={interval:3e4},e=y(l.deployments.getDeploymentsCount,[{}],c),p=s(()=>e.response??0),r=s(()=>e.executed&&p.value===0),u=s(()=>e.executed);return D("Deployments"),(B,S)=>{const m=_("p-layout-default");return t(),a(m,{class:"deployments"},{header:n(()=>[h(o(x))]),default:n(()=>[u.value?(t(),f(v,{key:0},[r.value?(t(),a(o(C),{key:0})):(t(),a(o(b),{key:1,onDelete:o(e).refresh},null,8,["onDelete"]))],64)):k("",!0)]),_:1})}}});export{N as default};
2
+ //# sourceMappingURL=Deployments-lcIIbm1i.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Deployments-lcIIbm1i.js","sources":["../../src/pages/Deployments.vue"],"sourcesContent":["<template>\n <p-layout-default class=\"deployments\">\n <template #header>\n <PageHeadingDeployments />\n </template>\n\n <template v-if=\"loaded\">\n <template v-if=\"empty\">\n <DeploymentsPageEmptyState />\n </template>\n\n <template v-else>\n <DeploymentList @delete=\"deploymentsCountSubscription.refresh\" />\n </template>\n </template>\n </p-layout-default>\n</template>\n\n<script lang=\"ts\" setup>\n import { DeploymentList, PageHeadingDeployments, DeploymentsPageEmptyState, useWorkspaceApi } from '@prefecthq/prefect-ui-library'\n import { useSubscription } from '@prefecthq/vue-compositions'\n import { computed } from 'vue'\n import { usePageTitle } from '@/compositions/usePageTitle'\n\n const api = useWorkspaceApi()\n const subscriptionOptions = {\n interval: 30000,\n }\n\n const deploymentsCountSubscription = useSubscription(api.deployments.getDeploymentsCount, [{}], subscriptionOptions)\n const deploymentsCount = computed(() => deploymentsCountSubscription.response ?? 0)\n const empty = computed(() => deploymentsCountSubscription.executed && deploymentsCount.value === 0)\n const loaded = computed(() => deploymentsCountSubscription.executed)\n\n usePageTitle('Deployments')\n</script>"],"names":["api","useWorkspaceApi","subscriptionOptions","deploymentsCountSubscription","useSubscription","deploymentsCount","computed","empty","loaded","usePageTitle","_createBlock","_component_p_layout_default","_createVNode","_unref","PageHeadingDeployments","_createElementBlock","_Fragment","DeploymentsPageEmptyState","DeploymentList"],"mappings":"uOAwBE,MAAMA,EAAMC,EAAA,EACNC,EAAsB,CAC1B,SAAU,GAAA,EAGNC,EAA+BC,EAAgBJ,EAAI,YAAY,oBAAqB,CAAC,CAAA,CAAE,EAAGE,CAAmB,EAC7GG,EAAmBC,EAAS,IAAMH,EAA6B,UAAY,CAAC,EAC5EI,EAAQD,EAAS,IAAMH,EAA6B,UAAYE,EAAiB,QAAU,CAAC,EAC5FG,EAASF,EAAS,IAAMH,EAA6B,QAAQ,EAEnE,OAAAM,EAAa,aAAa,mDAjC1BC,EAcmBC,EAAA,CAdD,MAAM,eAAa,CACxB,SACT,IAA0B,CAA1BC,EAA0BC,EAAAC,CAAA,CAAA,CAAA,aAG5B,IAQW,CARKN,EAAA,WAAhBO,EAQWC,EAAA,CAAA,IAAA,GAAA,CAPOT,EAAA,WACdG,EAA6BG,EAAAI,CAAA,EAAA,CAAA,IAAA,CAAA,CAAA,QAI7BP,EAAiEG,EAAAK,CAAA,EAAA,OAAhD,SAAQL,EAAAV,CAAA,EAA6B,OAAA"}
@@ -1,2 +1,2 @@
1
- import{d as f,S as x,f as b,v as c,g as r,aD as h,aE as k,I as y,h as C,c as E,a as F,m as e,o as D,i as n,k as s,aF as I,z as g,aG as w}from"./index-C9FkjDpZ.js";import{u as L}from"./usePageTitle-B0Hz_El0.js";const j=f({__name:"Event",async setup(B){let a,o;const v=x(),u=b(),l=c("eventDate"),m=c("eventId"),_=r(()=>h(l.value)),d=k({startDate:_,eventId:[m.value]}),t=([a,o]=y(()=>v.events.getFirstEvent(d.value)),a=await a,o(),a),p=r(()=>[{text:"Event Feed",to:u.events()},{text:t.eventLabel}]);return L(`Event: ${t.eventLabel}`),(N,S)=>{const i=C("p-layout-default");return e(t)?(D(),E(i,{key:0,class:"event"},{header:n(()=>[s(e(g),{crumbs:p.value},{actions:n(()=>[s(e(w),{event:e(t)},null,8,["event"])]),_:1},8,["crumbs"])]),default:n(()=>[s(e(I),{event:e(t)},null,8,["event"])]),_:1})):F("",!0)}}});export{j as default};
2
- //# sourceMappingURL=Event-DQwLIzdd.js.map
1
+ import{d as f,S as x,f as b,v as c,g as r,aD as h,aE as k,I as y,h as C,c as E,a as F,m as e,o as D,i as n,k as s,aF as I,z as g,aG as w}from"./index-DS86r6aC.js";import{u as L}from"./usePageTitle-BXVkHaWQ.js";const j=f({__name:"Event",async setup(B){let a,o;const v=x(),u=b(),l=c("eventDate"),m=c("eventId"),_=r(()=>h(l.value)),d=k({startDate:_,eventId:[m.value]}),t=([a,o]=y(()=>v.events.getFirstEvent(d.value)),a=await a,o(),a),p=r(()=>[{text:"Event Feed",to:u.events()},{text:t.eventLabel}]);return L(`Event: ${t.eventLabel}`),(N,S)=>{const i=C("p-layout-default");return e(t)?(D(),E(i,{key:0,class:"event"},{header:n(()=>[s(e(g),{crumbs:p.value},{actions:n(()=>[s(e(w),{event:e(t)},null,8,["event"])]),_:1},8,["crumbs"])]),default:n(()=>[s(e(I),{event:e(t)},null,8,["event"])]),_:1})):F("",!0)}}});export{j as default};
2
+ //# sourceMappingURL=Event-0j-HIfsu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Event-DQwLIzdd.js","sources":["../../src/pages/Event.vue"],"sourcesContent":["<template>\n <p-layout-default v-if=\"event\" class=\"event\">\n <template #header>\n <PageHeading :crumbs=\"crumbs\">\n <template #actions>\n <WorkspaceEventMenu :event=\"event\" />\n </template>\n </PageHeading>\n </template>\n\n <WorkspaceEventDetails :event />\n </p-layout-default>\n</template>\n\n<script lang=\"ts\" setup>\n import { Crumb } from '@prefecthq/prefect-design'\n import { PageHeading, parseRouteDate, WorkspaceEventMenu, WorkspaceEventDetails, useWorkspaceApi, useWorkspaceRoutes, useTimeScopedWorkspaceEventsFilter } from '@prefecthq/prefect-ui-library'\n import { useRouteParam } from '@prefecthq/vue-compositions'\n import { computed } from 'vue'\n import { usePageTitle } from '@/compositions/usePageTitle'\n\n const api = useWorkspaceApi()\n const routes = useWorkspaceRoutes()\n const date = useRouteParam('eventDate')\n const eventId = useRouteParam('eventId')\n const eventDate = computed(() => parseRouteDate(date.value))\n const filter = useTimeScopedWorkspaceEventsFilter({ startDate: eventDate, eventId: [eventId.value] })\n const event = await api.events.getFirstEvent(filter.value)\n\n const crumbs = computed<Crumb[]>(() => [\n { text: 'Event Feed', to: routes.events() },\n { text: event.eventLabel },\n ])\n\n usePageTitle(`Event: ${event.eventLabel}`)\n</script>"],"names":["api","useWorkspaceApi","routes","useWorkspaceRoutes","date","useRouteParam","eventId","eventDate","computed","parseRouteDate","filter","useTimeScopedWorkspaceEventsFilter","event","__temp","__restore","_withAsyncContext","crumbs","usePageTitle","_unref","_createBlock","_component_p_layout_default","_createVNode","PageHeading","WorkspaceEventMenu","WorkspaceEventDetails"],"mappings":"mQAqBE,MAAMA,EAAMC,EAAA,EACNC,EAASC,EAAA,EACTC,EAAOC,EAAc,WAAW,EAChCC,EAAUD,EAAc,SAAS,EACjCE,EAAYC,EAAS,IAAMC,EAAeL,EAAK,KAAK,CAAC,EACrDM,EAASC,EAAmC,CAAE,UAAWJ,EAAW,QAAS,CAACD,EAAQ,KAAK,EAAG,EAC9FM,GAAQ,CAAAC,EAAAC,CAAA,EAAAC,EAAA,IAAMf,EAAI,OAAO,cAAcU,EAAO,KAAK,CAAA,mBAEnDM,EAASR,EAAkB,IAAM,CACrC,CAAE,KAAM,aAAc,GAAIN,EAAO,QAAO,EACxC,CAAE,KAAMU,EAAM,UAAA,CAAW,CAC1B,EAED,OAAAK,EAAa,UAAUL,EAAM,UAAU,EAAE,+CAjCjBM,EAAAN,CAAA,OAAxBO,EAUmBC,EAAA,OAVY,MAAM,OAAA,GACxB,SACT,IAIc,CAJdC,EAIcH,EAAAI,CAAA,EAAA,CAJA,OAAQN,EAAA,OAAM,CACf,UACT,IAAqC,CAArCK,EAAqCH,EAAAK,CAAA,EAAA,CAAhB,MAAOL,EAAAN,CAAA,GAAK,KAAA,EAAA,CAAA,OAAA,CAAA,CAAA,kCAKvC,IAAgC,CAAhCS,EAAgCH,EAAAM,CAAA,EAAA,CAAR,MAAAN,EAAAN,CAAA,GAAK,KAAA,EAAA,CAAA,OAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"Event-0j-HIfsu.js","sources":["../../src/pages/Event.vue"],"sourcesContent":["<template>\n <p-layout-default v-if=\"event\" class=\"event\">\n <template #header>\n <PageHeading :crumbs=\"crumbs\">\n <template #actions>\n <WorkspaceEventMenu :event=\"event\" />\n </template>\n </PageHeading>\n </template>\n\n <WorkspaceEventDetails :event />\n </p-layout-default>\n</template>\n\n<script lang=\"ts\" setup>\n import { Crumb } from '@prefecthq/prefect-design'\n import { PageHeading, parseRouteDate, WorkspaceEventMenu, WorkspaceEventDetails, useWorkspaceApi, useWorkspaceRoutes, useTimeScopedWorkspaceEventsFilter } from '@prefecthq/prefect-ui-library'\n import { useRouteParam } from '@prefecthq/vue-compositions'\n import { computed } from 'vue'\n import { usePageTitle } from '@/compositions/usePageTitle'\n\n const api = useWorkspaceApi()\n const routes = useWorkspaceRoutes()\n const date = useRouteParam('eventDate')\n const eventId = useRouteParam('eventId')\n const eventDate = computed(() => parseRouteDate(date.value))\n const filter = useTimeScopedWorkspaceEventsFilter({ startDate: eventDate, eventId: [eventId.value] })\n const event = await api.events.getFirstEvent(filter.value)\n\n const crumbs = computed<Crumb[]>(() => [\n { text: 'Event Feed', to: routes.events() },\n { text: event.eventLabel },\n ])\n\n usePageTitle(`Event: ${event.eventLabel}`)\n</script>"],"names":["api","useWorkspaceApi","routes","useWorkspaceRoutes","date","useRouteParam","eventId","eventDate","computed","parseRouteDate","filter","useTimeScopedWorkspaceEventsFilter","event","__temp","__restore","_withAsyncContext","crumbs","usePageTitle","_unref","_createBlock","_component_p_layout_default","_createVNode","PageHeading","WorkspaceEventMenu","WorkspaceEventDetails"],"mappings":"mQAqBE,MAAMA,EAAMC,EAAA,EACNC,EAASC,EAAA,EACTC,EAAOC,EAAc,WAAW,EAChCC,EAAUD,EAAc,SAAS,EACjCE,EAAYC,EAAS,IAAMC,EAAeL,EAAK,KAAK,CAAC,EACrDM,EAASC,EAAmC,CAAE,UAAWJ,EAAW,QAAS,CAACD,EAAQ,KAAK,EAAG,EAC9FM,GAAQ,CAAAC,EAAAC,CAAA,EAAAC,EAAA,IAAMf,EAAI,OAAO,cAAcU,EAAO,KAAK,CAAA,mBAEnDM,EAASR,EAAkB,IAAM,CACrC,CAAE,KAAM,aAAc,GAAIN,EAAO,QAAO,EACxC,CAAE,KAAMU,EAAM,UAAA,CAAW,CAC1B,EAED,OAAAK,EAAa,UAAUL,EAAM,UAAU,EAAE,+CAjCjBM,EAAAN,CAAA,OAAxBO,EAUmBC,EAAA,OAVY,MAAM,OAAA,GACxB,SACT,IAIc,CAJdC,EAIcH,EAAAI,CAAA,EAAA,CAJA,OAAQN,EAAA,OAAM,CACf,UACT,IAAqC,CAArCK,EAAqCH,EAAAK,CAAA,EAAA,CAAhB,MAAOL,EAAAN,CAAA,GAAK,KAAA,EAAA,CAAA,OAAA,CAAA,CAAA,kCAKvC,IAAgC,CAAhCS,EAAgCH,EAAAM,CAAA,EAAA,CAAR,MAAAN,EAAAN,CAAA,GAAK,KAAA,EAAA,CAAA,OAAA,CAAA,CAAA"}
@@ -1,2 +1,2 @@
1
- import{d as de,g as ee,ae as fe,ak as me,al as te,am as pe,an as ge,ao as ve,ap as be,aq as ye,ar as _e,as as xe,at as ke,w as ne,h as L,c as U,a as X,m as n,o as O,i as T,l as z,n as De,k as _,au as Te,a6 as R,av as Re,aw as je,ax as Ee,ay as Se,B as ae,F as Ie,az as Oe,z as he,aA as Ne,aB as Be,aC as Ce}from"./index-C9FkjDpZ.js";import{c as w,g as Ve}from"./_commonjsHelpers-Cpj98o6Y.js";import{u as Fe}from"./usePageTitle-B0Hz_El0.js";import{m as se}from"./mapper-NwaeXCHc.js";var Q,re;function Le(){if(re)return Q;re=1;var J="Expected a function",h=NaN,N="[object Symbol]",M=/^\s+|\s+$/g,x=/^[-+]0x[0-9a-f]+$/i,k=/^0b[01]+$/i,p=/^0o[0-7]+$/i,l=parseInt,i=typeof w=="object"&&w&&w.Object===Object&&w,P=typeof self=="object"&&self&&self.Object===Object&&self,W=i||P||Function("return this")(),A=Object.prototype,B=A.toString,j=Math.max,E=Math.min,S=function(){return W.Date.now()};function C(e,a,u){var g,c,t,d,o,f,b=0,r=!1,m=!1,v=!0;if(typeof e!="function")throw new TypeError(J);a=V(a)||0,D(u)&&(r=!!u.leading,m="maxWait"in u,t=m?j(V(u.maxWait)||0,a):t,v="trailing"in u?!!u.trailing:v);function q(s){var y=g,I=c;return g=c=void 0,b=s,d=e.apply(I,y),d}function le(s){return b=s,o=setTimeout(F,a),r?q(s):d}function ie(s){var y=s-f,I=s-b,Z=a-y;return m?E(Z,t-I):Z}function K(s){var y=s-f,I=s-b;return f===void 0||y>=a||y<0||m&&I>=t}function F(){var s=S();if(K(s))return Y(s);o=setTimeout(F,ie(s))}function Y(s){return o=void 0,v&&g?q(s):(g=c=void 0,d)}function ue(){o!==void 0&&clearTimeout(o),b=0,g=f=c=o=void 0}function ce(){return o===void 0?d:Y(S())}function H(){var s=S(),y=K(s);if(g=arguments,c=this,f=s,y){if(o===void 0)return le(f);if(m)return o=setTimeout(F,a),q(f)}return o===void 0&&(o=setTimeout(F,a)),d}return H.cancel=ue,H.flush=ce,H}function D(e){var a=typeof e;return!!e&&(a=="object"||a=="function")}function G(e){return!!e&&typeof e=="object"}function $(e){return typeof e=="symbol"||G(e)&&B.call(e)==N}function V(e){if(typeof e=="number")return e;if($(e))return h;if(D(e)){var a=typeof e.valueOf=="function"?e.valueOf():e;e=D(a)?a+"":a}if(typeof e!="string")return e===0?e:+e;e=e.replace(M,"");var u=k.test(e);return u||p.test(e)?l(e.slice(2),u?2:8):x.test(e)?h:+e}return Q=C,Q}var Ue=Le();const ze=Ve(Ue),we={class:"events__content"},Me={class:"events__filters"},Pe={class:"events__controls"},oe=6e4,qe=de({__name:"Events",setup(J){const h=ee(()=>[{text:"Event Feed"}]),N=fe(),{now:M}=me({interval:oe});Fe("Event Feed");const x=te("resource",[]),k=te("events",[]),p=pe({type:"span",seconds:-Ce}),{startDate:l,endDate:i}=ge(),{selectionStart:P,selectionEnd:W}=ve(),A={minRangeInSeconds:Be-1,maxRangeInSeconds:Ne-1},B=be(()=>{const{startDate:c,endDate:t}=se.map("DateRangeSelectValue",p.range,"DateRange"),[d,o]=ye(k.value,v=>v.endsWith("*")),f=d.map(v=>v.replace(".*",".")),r=["prefect.log.write"].filter(v=>!o.includes(v));return{occurred:{since:P.value??c,until:W.value??t},anyResource:{idPrefix:x.value},event:{prefix:f,name:o,excludeName:r}}}),{page:j,pages:E,loading:S,events:C,empty:D}=_e(B,{interval:oe}),{margin:G}=xe(),$=()=>({rootMargin:G.value}),{stuck:V}=ke(N,$),e=ee(()=>({chart:{"events__chart--stuck":V.value}}));let a=!1;const u=ze(()=>{if(!(!l.value||!i.value)){if(a){a=!1;return}p.range={type:"range",startDate:l.value,endDate:i.value}}},1e3);ne([l,i],()=>u());function g(){if(!p.range)return;const{startDate:c,endDate:t}=se.map("DateRangeSelectValue",p.range,"DateRange");l.value?.getTime()!==c.getTime()&&(a=!0,l.value=c),i.value?.getTime()!==t.getTime()&&(a=!0,i.value=t)}return ne(()=>p.range,()=>g()),g(),(c,t)=>{const d=L("p-label"),o=L("p-empty-results"),f=L("p-pager"),b=L("p-layout-default");return n(l)&&n(i)?(O(),U(b,{key:0,class:"events"},{header:T(()=>[_(n(he),{crumbs:h.value},null,8,["crumbs"])]),default:T(()=>[z("div",we,[z("div",Me,[_(d,{label:"Resource"},{default:T(({id:r})=>[_(n(Te),{id:r,selected:n(x),"onUpdate:selected":t[0]||(t[0]=m=>R(x)?x.value=m:null),multiple:""},null,8,["id","selected"])]),_:1}),_(d,{label:"Events"},{default:T(({id:r})=>[_(n(Re),{id:r,selected:n(k),"onUpdate:selected":t[1]||(t[1]=m=>R(k)?k.value=m:null),multiple:""},null,8,["id","selected"])]),_:1})]),z("div",{ref_key:"chart",ref:N,class:je(["events__chart p-background",e.value.chart])},[_(n(Ee),{"start-date":n(l),"onUpdate:startDate":t[2]||(t[2]=r=>R(l)?l.value=r:null),"end-date":n(i),"onUpdate:endDate":t[3]||(t[3]=r=>R(i)?i.value=r:null),filter:B.value,"zoom-options":A},null,8,["start-date","end-date","filter"]),z("div",Pe,[_(n(Se),{modelValue:n(p).range,"onUpdate:modelValue":t[4]||(t[4]=r=>n(p).range=r),max:n(M)},null,8,["modelValue","max"])])],2),n(S)&&n(D)?(O(),U(o,{key:0},{message:T(()=>[...t[7]||(t[7]=[ae(" Loading events ",-1)])]),_:1})):(O(),De(Ie,{key:1},[n(D)?(O(),U(o,{key:0},{message:T(()=>[...t[8]||(t[8]=[ae(" No events ",-1)])]),_:1})):X("",!0),_(n(Oe),{class:"events__timeline",events:n(C),"start-date":n(l),"end-date":n(i)},null,8,["events","start-date","end-date"]),n(C).length?(O(),U(f,{key:1,page:n(j),"onUpdate:page":t[5]||(t[5]=r=>R(j)?j.value=r:null),pages:n(E),"onUpdate:pages":t[6]||(t[6]=r=>R(E)?E.value=r:null),class:"events__pager"},null,8,["page","pages"])):X("",!0)],64))])]),_:1})):X("",!0)}}});export{qe as default};
2
- //# sourceMappingURL=Events-D62-llVt.js.map
1
+ import{d as de,g as ee,ae as fe,ak as me,al as te,am as pe,an as ge,ao as ve,ap as be,aq as ye,ar as _e,as as xe,at as ke,w as ne,h as L,c as U,a as X,m as n,o as O,i as T,l as z,n as De,k as _,au as Te,a6 as R,av as Re,aw as je,ax as Ee,ay as Se,B as ae,F as Ie,az as Oe,z as he,aA as Ne,aB as Be,aC as Ce}from"./index-DS86r6aC.js";import{c as w,g as Ve}from"./_commonjsHelpers-Cpj98o6Y.js";import{u as Fe}from"./usePageTitle-BXVkHaWQ.js";import{m as se}from"./mapper-Bm5aN_dh.js";var Q,re;function Le(){if(re)return Q;re=1;var J="Expected a function",h=NaN,N="[object Symbol]",M=/^\s+|\s+$/g,x=/^[-+]0x[0-9a-f]+$/i,k=/^0b[01]+$/i,p=/^0o[0-7]+$/i,l=parseInt,i=typeof w=="object"&&w&&w.Object===Object&&w,P=typeof self=="object"&&self&&self.Object===Object&&self,W=i||P||Function("return this")(),A=Object.prototype,B=A.toString,j=Math.max,E=Math.min,S=function(){return W.Date.now()};function C(e,a,u){var g,c,t,d,o,f,b=0,r=!1,m=!1,v=!0;if(typeof e!="function")throw new TypeError(J);a=V(a)||0,D(u)&&(r=!!u.leading,m="maxWait"in u,t=m?j(V(u.maxWait)||0,a):t,v="trailing"in u?!!u.trailing:v);function q(s){var y=g,I=c;return g=c=void 0,b=s,d=e.apply(I,y),d}function le(s){return b=s,o=setTimeout(F,a),r?q(s):d}function ie(s){var y=s-f,I=s-b,Z=a-y;return m?E(Z,t-I):Z}function K(s){var y=s-f,I=s-b;return f===void 0||y>=a||y<0||m&&I>=t}function F(){var s=S();if(K(s))return Y(s);o=setTimeout(F,ie(s))}function Y(s){return o=void 0,v&&g?q(s):(g=c=void 0,d)}function ue(){o!==void 0&&clearTimeout(o),b=0,g=f=c=o=void 0}function ce(){return o===void 0?d:Y(S())}function H(){var s=S(),y=K(s);if(g=arguments,c=this,f=s,y){if(o===void 0)return le(f);if(m)return o=setTimeout(F,a),q(f)}return o===void 0&&(o=setTimeout(F,a)),d}return H.cancel=ue,H.flush=ce,H}function D(e){var a=typeof e;return!!e&&(a=="object"||a=="function")}function G(e){return!!e&&typeof e=="object"}function $(e){return typeof e=="symbol"||G(e)&&B.call(e)==N}function V(e){if(typeof e=="number")return e;if($(e))return h;if(D(e)){var a=typeof e.valueOf=="function"?e.valueOf():e;e=D(a)?a+"":a}if(typeof e!="string")return e===0?e:+e;e=e.replace(M,"");var u=k.test(e);return u||p.test(e)?l(e.slice(2),u?2:8):x.test(e)?h:+e}return Q=C,Q}var Ue=Le();const ze=Ve(Ue),we={class:"events__content"},Me={class:"events__filters"},Pe={class:"events__controls"},oe=6e4,qe=de({__name:"Events",setup(J){const h=ee(()=>[{text:"Event Feed"}]),N=fe(),{now:M}=me({interval:oe});Fe("Event Feed");const x=te("resource",[]),k=te("events",[]),p=pe({type:"span",seconds:-Ce}),{startDate:l,endDate:i}=ge(),{selectionStart:P,selectionEnd:W}=ve(),A={minRangeInSeconds:Be-1,maxRangeInSeconds:Ne-1},B=be(()=>{const{startDate:c,endDate:t}=se.map("DateRangeSelectValue",p.range,"DateRange"),[d,o]=ye(k.value,v=>v.endsWith("*")),f=d.map(v=>v.replace(".*",".")),r=["prefect.log.write"].filter(v=>!o.includes(v));return{occurred:{since:P.value??c,until:W.value??t},anyResource:{idPrefix:x.value},event:{prefix:f,name:o,excludeName:r}}}),{page:j,pages:E,loading:S,events:C,empty:D}=_e(B,{interval:oe}),{margin:G}=xe(),$=()=>({rootMargin:G.value}),{stuck:V}=ke(N,$),e=ee(()=>({chart:{"events__chart--stuck":V.value}}));let a=!1;const u=ze(()=>{if(!(!l.value||!i.value)){if(a){a=!1;return}p.range={type:"range",startDate:l.value,endDate:i.value}}},1e3);ne([l,i],()=>u());function g(){if(!p.range)return;const{startDate:c,endDate:t}=se.map("DateRangeSelectValue",p.range,"DateRange");l.value?.getTime()!==c.getTime()&&(a=!0,l.value=c),i.value?.getTime()!==t.getTime()&&(a=!0,i.value=t)}return ne(()=>p.range,()=>g()),g(),(c,t)=>{const d=L("p-label"),o=L("p-empty-results"),f=L("p-pager"),b=L("p-layout-default");return n(l)&&n(i)?(O(),U(b,{key:0,class:"events"},{header:T(()=>[_(n(he),{crumbs:h.value},null,8,["crumbs"])]),default:T(()=>[z("div",we,[z("div",Me,[_(d,{label:"Resource"},{default:T(({id:r})=>[_(n(Te),{id:r,selected:n(x),"onUpdate:selected":t[0]||(t[0]=m=>R(x)?x.value=m:null),multiple:""},null,8,["id","selected"])]),_:1}),_(d,{label:"Events"},{default:T(({id:r})=>[_(n(Re),{id:r,selected:n(k),"onUpdate:selected":t[1]||(t[1]=m=>R(k)?k.value=m:null),multiple:""},null,8,["id","selected"])]),_:1})]),z("div",{ref_key:"chart",ref:N,class:je(["events__chart p-background",e.value.chart])},[_(n(Ee),{"start-date":n(l),"onUpdate:startDate":t[2]||(t[2]=r=>R(l)?l.value=r:null),"end-date":n(i),"onUpdate:endDate":t[3]||(t[3]=r=>R(i)?i.value=r:null),filter:B.value,"zoom-options":A},null,8,["start-date","end-date","filter"]),z("div",Pe,[_(n(Se),{modelValue:n(p).range,"onUpdate:modelValue":t[4]||(t[4]=r=>n(p).range=r),max:n(M)},null,8,["modelValue","max"])])],2),n(S)&&n(D)?(O(),U(o,{key:0},{message:T(()=>[...t[7]||(t[7]=[ae(" Loading events ",-1)])]),_:1})):(O(),De(Ie,{key:1},[n(D)?(O(),U(o,{key:0},{message:T(()=>[...t[8]||(t[8]=[ae(" No events ",-1)])]),_:1})):X("",!0),_(n(Oe),{class:"events__timeline",events:n(C),"start-date":n(l),"end-date":n(i)},null,8,["events","start-date","end-date"]),n(C).length?(O(),U(f,{key:1,page:n(j),"onUpdate:page":t[5]||(t[5]=r=>R(j)?j.value=r:null),pages:n(E),"onUpdate:pages":t[6]||(t[6]=r=>R(E)?E.value=r:null),class:"events__pager"},null,8,["page","pages"])):X("",!0)],64))])]),_:1})):X("",!0)}}});export{qe as default};
2
+ //# sourceMappingURL=Events-UuQjwz0L.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Events-D62-llVt.js","sources":["../../node_modules/lodash.debounce/index.js","../../src/pages/Events.vue"],"sourcesContent":["/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = debounce;\n","<template>\n <p-layout-default v-if=\"startDate && endDate\" class=\"events\">\n <template #header>\n <PageHeading :crumbs=\"crumbs\" />\n </template>\n\n <div class=\"events__content\">\n <div class=\"events__filters\">\n <p-label label=\"Resource\">\n <template #default=\"{ id }\">\n <EventResourceCombobox :id v-model:selected=\"resources\" multiple />\n </template>\n </p-label>\n\n <p-label label=\"Events\">\n <template #default=\"{ id }\">\n <EventsCombobox :id v-model:selected=\"eventsQueryParam\" multiple />\n </template>\n </p-label>\n </div>\n\n <div ref=\"chart\" class=\"events__chart p-background\" :class=\"classes.chart\">\n <WorkspaceEventsLineChart v-model:start-date=\"startDate\" v-model:end-date=\"endDate\" :filter :zoom-options />\n <div class=\"events__controls\">\n <DateRangeSelect v-model=\"dateRange.range\" :max=\"now\" />\n </div>\n </div>\n\n <template v-if=\"loading && empty\">\n <p-empty-results>\n <template #message>\n Loading events\n </template>\n </p-empty-results>\n </template>\n\n <template v-else>\n <template v-if=\"empty\">\n <p-empty-results>\n <template #message>\n No events\n </template>\n </p-empty-results>\n </template>\n\n <WorkspaceEventsTimeline class=\"events__timeline\" :events :start-date :end-date />\n\n <p-pager\n v-if=\"events.length\"\n v-model:page=\"page\"\n v-model:pages=\"pages\"\n class=\"events__pager\"\n />\n </template>\n </div>\n </p-layout-default>\n</template>\n\n<script lang=\"ts\" setup>\n import { Crumb, useOffsetStickyRootMargin } from '@prefecthq/prefect-design'\n import {\n Getter,\n PageHeading,\n separate,\n DateRangeSelect,\n useDateRangeSelectValueFromRoute,\n secondsInDay,\n useWorkspaceEventsSubscription,\n EventsCombobox,\n EventResourceCombobox,\n WorkspaceEventsFilter,\n WorkspaceEventsTimeline,\n WorkspaceEventsLineChart,\n secondsInHour,\n secondsInWeek\n } from '@prefecthq/prefect-ui-library'\n import { ChartZoomOptions, useChartSelection, useChartZoom } from '@prefecthq/vue-charts'\n import { UsePositionStickyObserverOptions, useNow, usePositionStickyObserver, useRouteQueryParam } from '@prefecthq/vue-compositions'\n import debounce from 'lodash.debounce'\n import { computed, ref, toRef, watch } from 'vue'\n import { usePageTitle } from '@/compositions/usePageTitle'\n import { mapper } from '@/services/mapper'\n\n const crumbs = computed<Crumb[]>(() => [{ text: 'Event Feed' }])\n const chart = ref()\n const interval = 60_000\n const { now } = useNow({ interval })\n\n usePageTitle('Event Feed')\n\n const resources = useRouteQueryParam('resource', [])\n const eventsQueryParam = useRouteQueryParam('events', [])\n\n const dateRange = useDateRangeSelectValueFromRoute({\n type: 'span',\n seconds: -secondsInDay,\n })\n\n const { startDate, endDate } = useChartZoom()\n const { selectionStart, selectionEnd } = useChartSelection()\n\n // minus one second from each to get clean dates like 10:00AM - 10:59AM\n const zoomOptions: ChartZoomOptions = {\n minRangeInSeconds: secondsInHour - 1,\n maxRangeInSeconds: secondsInWeek - 1,\n }\n\n const filter = toRef(() => {\n const { startDate, endDate } = mapper.map('DateRangeSelectValue', dateRange.range, 'DateRange')!\n const [prefixed, name] = separate(eventsQueryParam.value, event => event.endsWith('*'))\n const prefix = prefixed.map(prefix => prefix.replace('.*', '.'))\n\n // Exclude some events by default unless they are explicitly requested\n const excludedByDefault = ['prefect.log.write']\n const excludeName = excludedByDefault.filter(excluded => !name.includes(excluded))\n\n const filter: WorkspaceEventsFilter = {\n occurred: {\n since: selectionStart.value ?? startDate,\n until: selectionEnd.value ?? endDate,\n },\n anyResource: {\n idPrefix: resources.value,\n },\n event: {\n prefix,\n name,\n excludeName,\n },\n }\n\n return filter\n })\n\n const { page, pages, loading, events, empty } = useWorkspaceEventsSubscription(filter, { interval })\n\n const { margin } = useOffsetStickyRootMargin()\n const stickyObserverOptions: Getter<UsePositionStickyObserverOptions> = () => ({\n rootMargin: margin.value,\n })\n const { stuck } = usePositionStickyObserver(chart, stickyObserverOptions)\n const classes = computed(() => ({\n chart: {\n 'events__chart--stuck': stuck.value,\n },\n }))\n\n let updatedDateRange = false\n\n const updateDateRangeSelectValue = debounce(() => {\n if (!startDate.value || !endDate.value) {\n return\n }\n\n if (updatedDateRange) {\n updatedDateRange = false\n return\n }\n\n dateRange.range = {\n type: 'range',\n startDate: startDate.value,\n endDate: endDate.value,\n }\n }, 1000)\n\n watch([startDate, endDate], () => updateDateRangeSelectValue())\n\n function updateDateRangeValue(): void {\n if (!dateRange.range) {\n return\n }\n\n const { startDate: newStart, endDate: newEnd } = mapper.map('DateRangeSelectValue', dateRange.range, 'DateRange')\n\n if (startDate.value?.getTime() !== newStart.getTime()) {\n updatedDateRange = true\n startDate.value = newStart\n }\n\n if (endDate.value?.getTime() !== newEnd.getTime()) {\n updatedDateRange = true\n endDate.value = newEnd\n }\n }\n\n watch(() => dateRange.range, () => updateDateRangeValue())\n\n updateDateRangeValue()\n</script>\n\n<style>\n.events__content { @apply\n grid\n gap-1\n grid-cols-1\n}\n\n.events__filters { @apply\n flex\n flex-col\n gap-4\n sm:flex-row\n mb-7\n}\n\n.events__chart { @apply\n sticky\n top-0\n z-10\n pb-3\n grid\n grid-cols-1\n gap-3\n rounded-t-default\n}\n\n.events__chart--stuck { @apply\n bg-floating-sticky\n backdrop-blur-sm\n shadow-md\n rounded-t-none\n rounded-b-default\n}\n\n.events__controls { @apply\n flex\n justify-center\n p-3\n}\n\n.events__timeline { @apply\n mt-7\n}\n\n.events__pager { @apply\n mt-4\n}\n</style>\n"],"names":["FUNC_ERROR_TEXT","NAN","symbolTag","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","freeGlobal","global","freeSelf","root","objectProto","objectToString","nativeMax","nativeMin","now","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","toNumber","isObject","invokeFunc","time","args","thisArg","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","value","type","isObjectLike","isSymbol","other","isBinary","lodash_debounce","interval","crumbs","computed","chart","ref","useNow","usePageTitle","resources","useRouteQueryParam","eventsQueryParam","dateRange","useDateRangeSelectValueFromRoute","secondsInDay","startDate","endDate","useChartZoom","selectionStart","selectionEnd","useChartSelection","zoomOptions","secondsInHour","secondsInWeek","filter","toRef","mapper","prefixed","name","separate","event","prefix","excludeName","excluded","page","pages","loading","events","empty","useWorkspaceEventsSubscription","margin","useOffsetStickyRootMargin","stickyObserverOptions","stuck","usePositionStickyObserver","classes","updatedDateRange","updateDateRangeSelectValue","watch","updateDateRangeValue","newStart","newEnd","_unref","_createBlock","_component_p_layout_default","_createVNode","PageHeading","_createElementVNode","_hoisted_1","_hoisted_2","_component_p_label","_withCtx","id","EventResourceCombobox","$event","EventsCombobox","_normalizeClass","WorkspaceEventsLineChart","_hoisted_3","DateRangeSelect","_cache","_component_p_empty_results","_createElementBlock","_Fragment","WorkspaceEventsTimeline","_component_p_pager"],"mappings":"6gBAUA,IAAIA,EAAkB,sBAGlBC,EAAM,IAGNC,EAAY,kBAGZC,EAAS,aAGTC,EAAa,qBAGbC,EAAa,aAGbC,EAAY,cAGZC,EAAe,SAGfC,EAAa,OAAOC,GAAU,UAAYA,GAAUA,EAAO,SAAW,QAAUA,EAGhFC,EAAW,OAAO,MAAQ,UAAY,MAAQ,KAAK,SAAW,QAAU,KAGxEC,EAAOH,GAAcE,GAAY,SAAS,aAAa,EAAC,EAGxDE,EAAc,OAAO,UAOrBC,EAAiBD,EAAY,SAG7BE,EAAY,KAAK,IACjBC,EAAY,KAAK,IAkBjBC,EAAM,UAAW,CACnB,OAAOL,EAAK,KAAK,IAAG,CACtB,EAwDA,SAASM,EAASC,EAAMC,EAAMC,EAAS,CACrC,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAAiB,EACjBC,EAAU,GACVC,EAAS,GACTC,EAAW,GAEf,GAAI,OAAOZ,GAAQ,WACjB,MAAM,IAAI,UAAUlB,CAAe,EAErCmB,EAAOY,EAASZ,CAAI,GAAK,EACrBa,EAASZ,CAAO,IAClBQ,EAAU,CAAC,CAACR,EAAQ,QACpBS,EAAS,YAAaT,EACtBG,EAAUM,EAASf,EAAUiB,EAASX,EAAQ,OAAO,GAAK,EAAGD,CAAI,EAAII,EACrEO,EAAW,aAAcV,EAAU,CAAC,CAACA,EAAQ,SAAWU,GAG1D,SAASG,EAAWC,EAAM,CACxB,IAAIC,EAAOd,EACPe,EAAUd,EAEd,OAAAD,EAAWC,EAAW,OACtBK,EAAiBO,EACjBV,EAASN,EAAK,MAAMkB,EAASD,CAAI,EAC1BX,CACX,CAEE,SAASa,GAAYH,EAAM,CAEzB,OAAAP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AA6B,EAAA,MACpB,MAAM,eAAA","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"Events-UuQjwz0L.js","sources":["../../node_modules/lodash.debounce/index.js","../../src/pages/Events.vue"],"sourcesContent":["/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = debounce;\n","<template>\n <p-layout-default v-if=\"startDate && endDate\" class=\"events\">\n <template #header>\n <PageHeading :crumbs=\"crumbs\" />\n </template>\n\n <div class=\"events__content\">\n <div class=\"events__filters\">\n <p-label label=\"Resource\">\n <template #default=\"{ id }\">\n <EventResourceCombobox :id v-model:selected=\"resources\" multiple />\n </template>\n </p-label>\n\n <p-label label=\"Events\">\n <template #default=\"{ id }\">\n <EventsCombobox :id v-model:selected=\"eventsQueryParam\" multiple />\n </template>\n </p-label>\n </div>\n\n <div ref=\"chart\" class=\"events__chart p-background\" :class=\"classes.chart\">\n <WorkspaceEventsLineChart v-model:start-date=\"startDate\" v-model:end-date=\"endDate\" :filter :zoom-options />\n <div class=\"events__controls\">\n <DateRangeSelect v-model=\"dateRange.range\" :max=\"now\" />\n </div>\n </div>\n\n <template v-if=\"loading && empty\">\n <p-empty-results>\n <template #message>\n Loading events\n </template>\n </p-empty-results>\n </template>\n\n <template v-else>\n <template v-if=\"empty\">\n <p-empty-results>\n <template #message>\n No events\n </template>\n </p-empty-results>\n </template>\n\n <WorkspaceEventsTimeline class=\"events__timeline\" :events :start-date :end-date />\n\n <p-pager\n v-if=\"events.length\"\n v-model:page=\"page\"\n v-model:pages=\"pages\"\n class=\"events__pager\"\n />\n </template>\n </div>\n </p-layout-default>\n</template>\n\n<script lang=\"ts\" setup>\n import { Crumb, useOffsetStickyRootMargin } from '@prefecthq/prefect-design'\n import {\n Getter,\n PageHeading,\n separate,\n DateRangeSelect,\n useDateRangeSelectValueFromRoute,\n secondsInDay,\n useWorkspaceEventsSubscription,\n EventsCombobox,\n EventResourceCombobox,\n WorkspaceEventsFilter,\n WorkspaceEventsTimeline,\n WorkspaceEventsLineChart,\n secondsInHour,\n secondsInWeek\n } from '@prefecthq/prefect-ui-library'\n import { ChartZoomOptions, useChartSelection, useChartZoom } from '@prefecthq/vue-charts'\n import { UsePositionStickyObserverOptions, useNow, usePositionStickyObserver, useRouteQueryParam } from '@prefecthq/vue-compositions'\n import debounce from 'lodash.debounce'\n import { computed, ref, toRef, watch } from 'vue'\n import { usePageTitle } from '@/compositions/usePageTitle'\n import { mapper } from '@/services/mapper'\n\n const crumbs = computed<Crumb[]>(() => [{ text: 'Event Feed' }])\n const chart = ref()\n const interval = 60_000\n const { now } = useNow({ interval })\n\n usePageTitle('Event Feed')\n\n const resources = useRouteQueryParam('resource', [])\n const eventsQueryParam = useRouteQueryParam('events', [])\n\n const dateRange = useDateRangeSelectValueFromRoute({\n type: 'span',\n seconds: -secondsInDay,\n })\n\n const { startDate, endDate } = useChartZoom()\n const { selectionStart, selectionEnd } = useChartSelection()\n\n // minus one second from each to get clean dates like 10:00AM - 10:59AM\n const zoomOptions: ChartZoomOptions = {\n minRangeInSeconds: secondsInHour - 1,\n maxRangeInSeconds: secondsInWeek - 1,\n }\n\n const filter = toRef(() => {\n const { startDate, endDate } = mapper.map('DateRangeSelectValue', dateRange.range, 'DateRange')!\n const [prefixed, name] = separate(eventsQueryParam.value, event => event.endsWith('*'))\n const prefix = prefixed.map(prefix => prefix.replace('.*', '.'))\n\n // Exclude some events by default unless they are explicitly requested\n const excludedByDefault = ['prefect.log.write']\n const excludeName = excludedByDefault.filter(excluded => !name.includes(excluded))\n\n const filter: WorkspaceEventsFilter = {\n occurred: {\n since: selectionStart.value ?? startDate,\n until: selectionEnd.value ?? endDate,\n },\n anyResource: {\n idPrefix: resources.value,\n },\n event: {\n prefix,\n name,\n excludeName,\n },\n }\n\n return filter\n })\n\n const { page, pages, loading, events, empty } = useWorkspaceEventsSubscription(filter, { interval })\n\n const { margin } = useOffsetStickyRootMargin()\n const stickyObserverOptions: Getter<UsePositionStickyObserverOptions> = () => ({\n rootMargin: margin.value,\n })\n const { stuck } = usePositionStickyObserver(chart, stickyObserverOptions)\n const classes = computed(() => ({\n chart: {\n 'events__chart--stuck': stuck.value,\n },\n }))\n\n let updatedDateRange = false\n\n const updateDateRangeSelectValue = debounce(() => {\n if (!startDate.value || !endDate.value) {\n return\n }\n\n if (updatedDateRange) {\n updatedDateRange = false\n return\n }\n\n dateRange.range = {\n type: 'range',\n startDate: startDate.value,\n endDate: endDate.value,\n }\n }, 1000)\n\n watch([startDate, endDate], () => updateDateRangeSelectValue())\n\n function updateDateRangeValue(): void {\n if (!dateRange.range) {\n return\n }\n\n const { startDate: newStart, endDate: newEnd } = mapper.map('DateRangeSelectValue', dateRange.range, 'DateRange')\n\n if (startDate.value?.getTime() !== newStart.getTime()) {\n updatedDateRange = true\n startDate.value = newStart\n }\n\n if (endDate.value?.getTime() !== newEnd.getTime()) {\n updatedDateRange = true\n endDate.value = newEnd\n }\n }\n\n watch(() => dateRange.range, () => updateDateRangeValue())\n\n updateDateRangeValue()\n</script>\n\n<style>\n.events__content { @apply\n grid\n gap-1\n grid-cols-1\n}\n\n.events__filters { @apply\n flex\n flex-col\n gap-4\n sm:flex-row\n mb-7\n}\n\n.events__chart { @apply\n sticky\n top-0\n z-10\n pb-3\n grid\n grid-cols-1\n gap-3\n rounded-t-default\n}\n\n.events__chart--stuck { @apply\n bg-floating-sticky\n backdrop-blur-sm\n shadow-md\n rounded-t-none\n rounded-b-default\n}\n\n.events__controls { @apply\n flex\n justify-center\n p-3\n}\n\n.events__timeline { @apply\n mt-7\n}\n\n.events__pager { @apply\n mt-4\n}\n</style>\n"],"names":["FUNC_ERROR_TEXT","NAN","symbolTag","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","freeGlobal","global","freeSelf","root","objectProto","objectToString","nativeMax","nativeMin","now","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","toNumber","isObject","invokeFunc","time","args","thisArg","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","value","type","isObjectLike","isSymbol","other","isBinary","lodash_debounce","interval","crumbs","computed","chart","ref","useNow","usePageTitle","resources","useRouteQueryParam","eventsQueryParam","dateRange","useDateRangeSelectValueFromRoute","secondsInDay","startDate","endDate","useChartZoom","selectionStart","selectionEnd","useChartSelection","zoomOptions","secondsInHour","secondsInWeek","filter","toRef","mapper","prefixed","name","separate","event","prefix","excludeName","excluded","page","pages","loading","events","empty","useWorkspaceEventsSubscription","margin","useOffsetStickyRootMargin","stickyObserverOptions","stuck","usePositionStickyObserver","classes","updatedDateRange","updateDateRangeSelectValue","watch","updateDateRangeValue","newStart","newEnd","_unref","_createBlock","_component_p_layout_default","_createVNode","PageHeading","_createElementVNode","_hoisted_1","_hoisted_2","_component_p_label","_withCtx","id","EventResourceCombobox","$event","EventsCombobox","_normalizeClass","WorkspaceEventsLineChart","_hoisted_3","DateRangeSelect","_cache","_component_p_empty_results","_createElementBlock","_Fragment","WorkspaceEventsTimeline","_component_p_pager"],"mappings":"6gBAUA,IAAIA,EAAkB,sBAGlBC,EAAM,IAGNC,EAAY,kBAGZC,EAAS,aAGTC,EAAa,qBAGbC,EAAa,aAGbC,EAAY,cAGZC,EAAe,SAGfC,EAAa,OAAOC,GAAU,UAAYA,GAAUA,EAAO,SAAW,QAAUA,EAGhFC,EAAW,OAAO,MAAQ,UAAY,MAAQ,KAAK,SAAW,QAAU,KAGxEC,EAAOH,GAAcE,GAAY,SAAS,aAAa,EAAC,EAGxDE,EAAc,OAAO,UAOrBC,EAAiBD,EAAY,SAG7BE,EAAY,KAAK,IACjBC,EAAY,KAAK,IAkBjBC,EAAM,UAAW,CACnB,OAAOL,EAAK,KAAK,IAAG,CACtB,EAwDA,SAASM,EAASC,EAAMC,EAAMC,EAAS,CACrC,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAAiB,EACjBC,EAAU,GACVC,EAAS,GACTC,EAAW,GAEf,GAAI,OAAOZ,GAAQ,WACjB,MAAM,IAAI,UAAUlB,CAAe,EAErCmB,EAAOY,EAASZ,CAAI,GAAK,EACrBa,EAASZ,CAAO,IAClBQ,EAAU,CAAC,CAACR,EAAQ,QACpBS,EAAS,YAAaT,EACtBG,EAAUM,EAASf,EAAUiB,EAASX,EAAQ,OAAO,GAAK,EAAGD,CAAI,EAAII,EACrEO,EAAW,aAAcV,EAAU,CAAC,CAACA,EAAQ,SAAWU,GAG1D,SAASG,EAAWC,EAAM,CACxB,IAAIC,EAAOd,EACPe,EAAUd,EAEd,OAAAD,EAAWC,EAAW,OACtBK,EAAiBO,EACjBV,EAASN,EAAK,MAAMkB,EAASD,CAAI,EAC1BX,CACX,CAEE,SA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AAAjB,CAAA,uCAAAA,EAAK,MAAA6B,EAAA,MACpB,MAAM,eAAA","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- import{d as y,bR as B,g as t,aS as T,aT as C,aU as D,y as F,n as V,o,l as N,k as n,m as e,bS as U,aY as $,aA as j,S as O,v as P,u as Y,al as z,j as A,bw as E,bT as K,h as b,c,i as a,a as p,a6 as M,bB as W,bU as q,bV as G,bW as H,bg as J}from"./index-C9FkjDpZ.js";import{u as L}from"./usePageTitle-B0Hz_El0.js";const Q={class:"flow-stats"},X={class:"flow-stats__cards"},Z=y({__name:"FlowStats",props:{flowId:{}},setup(w){const f=w,r={range:{type:"span",seconds:-j}},{flowId:u}=B(f),i=t(()=>({flowId:u.value,range:r.range}));T(D,{interval:C.secondsToMilliseconds(30)});const l=t(()=>F.map("FlowStatsFilter",i.value,"FlowRunsFilter")),d=t(()=>F.map("FlowStatsFilter",i.value,"TaskRunsFilter"));return(_,v)=>(o(),V("div",Q,[N("div",X,[n(e(U),{filter:l.value},null,8,["filter"]),n(e($),{filter:d.value},null,8,["filter"])])]))}}),le=y({__name:"Flow",setup(w){const f=O(),r=P("flowId"),u=t(()=>[r.value]),i=Y(),l=z("tab","Runs"),d=["Runs","Deployments","Details"],_={interval:3e5},v=A(f.flows.getFlow,[r.value],_),s=t(()=>v.response),{filter:R}=E({flows:{id:u}}),{filter:k}=K({flows:{id:u}});function S(){i.push(J.flows())}const I=t(()=>s.value?`Flow: ${s.value.name}`:"Flow");return L(I),(ee,m)=>{const g=b("p-tabs"),h=b("p-layout-default");return o(),c(h,{class:"flow"},{header:a(()=>[s.value?(o(),c(e(H),{key:0,flow:s.value,onDelete:S},null,8,["flow"])):p("",!0)]),default:a(()=>[s.value?(o(),c(Z,{key:0,"flow-id":s.value.id},null,8,["flow-id"])):p("",!0),n(g,{selected:e(l),"onUpdate:selected":m[0]||(m[0]=x=>M(l)?l.value=x:null),tabs:d},{details:a(()=>[s.value?(o(),c(e(G),{key:0,flow:s.value},null,8,["flow"])):p("",!0)]),deployments:a(()=>[n(e(q),{filter:e(k),prefix:"deployments"},null,8,["filter"])]),runs:a(()=>[n(e(W),{filter:e(R),selectable:"",prefix:"runs"},null,8,["filter"])]),_:1},8,["selected"])]),_:1})}}});export{le as default};
2
- //# sourceMappingURL=Flow-Cq4u3Hyv.js.map
1
+ import{d as y,bR as B,g as t,aS as T,aT as C,aU as D,y as F,n as V,o,l as N,k as n,m as e,bS as U,aY as $,aA as j,S as O,v as P,u as Y,al as z,j as A,bw as E,bT as K,h as b,c,i as a,a as p,a6 as M,bB as W,bU as q,bV as G,bW as H,bg as J}from"./index-DS86r6aC.js";import{u as L}from"./usePageTitle-BXVkHaWQ.js";const Q={class:"flow-stats"},X={class:"flow-stats__cards"},Z=y({__name:"FlowStats",props:{flowId:{}},setup(w){const f=w,r={range:{type:"span",seconds:-j}},{flowId:u}=B(f),i=t(()=>({flowId:u.value,range:r.range}));T(D,{interval:C.secondsToMilliseconds(30)});const l=t(()=>F.map("FlowStatsFilter",i.value,"FlowRunsFilter")),d=t(()=>F.map("FlowStatsFilter",i.value,"TaskRunsFilter"));return(_,v)=>(o(),V("div",Q,[N("div",X,[n(e(U),{filter:l.value},null,8,["filter"]),n(e($),{filter:d.value},null,8,["filter"])])]))}}),le=y({__name:"Flow",setup(w){const f=O(),r=P("flowId"),u=t(()=>[r.value]),i=Y(),l=z("tab","Runs"),d=["Runs","Deployments","Details"],_={interval:3e5},v=A(f.flows.getFlow,[r.value],_),s=t(()=>v.response),{filter:R}=E({flows:{id:u}}),{filter:k}=K({flows:{id:u}});function S(){i.push(J.flows())}const I=t(()=>s.value?`Flow: ${s.value.name}`:"Flow");return L(I),(ee,m)=>{const g=b("p-tabs"),h=b("p-layout-default");return o(),c(h,{class:"flow"},{header:a(()=>[s.value?(o(),c(e(H),{key:0,flow:s.value,onDelete:S},null,8,["flow"])):p("",!0)]),default:a(()=>[s.value?(o(),c(Z,{key:0,"flow-id":s.value.id},null,8,["flow-id"])):p("",!0),n(g,{selected:e(l),"onUpdate:selected":m[0]||(m[0]=x=>M(l)?l.value=x:null),tabs:d},{details:a(()=>[s.value?(o(),c(e(G),{key:0,flow:s.value},null,8,["flow"])):p("",!0)]),deployments:a(()=>[n(e(q),{filter:e(k),prefix:"deployments"},null,8,["filter"])]),runs:a(()=>[n(e(W),{filter:e(R),selectable:"",prefix:"runs"},null,8,["filter"])]),_:1},8,["selected"])]),_:1})}}});export{le as default};
2
+ //# sourceMappingURL=Flow-RmpH3LjK.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Flow-Cq4u3Hyv.js","sources":["../../src/components/FlowStats.vue","../../src/pages/Flow.vue"],"sourcesContent":["<template>\n <div class=\"flow-stats\">\n <div class=\"flow-stats__cards\">\n <FlowRunHistoryCard :filter=\"flowRunsFilter\" />\n\n <CumulativeTaskRunsCard :filter=\"taskRunsFilter\" />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import {\n CumulativeTaskRunsCard,\n FlowRunHistoryCard,\n subscriptionIntervalKey,\n mapper,\n FlowStatsFilter,\n WorkspaceDashboardFilter,\n dateFunctions,\n secondsInWeek\n } from '@prefecthq/prefect-ui-library'\n import { computed, provide, toRefs } from 'vue'\n\n const props = defineProps<{\n flowId: string,\n }>()\n\n const filter: WorkspaceDashboardFilter = {\n range: { type: 'span', seconds: -secondsInWeek },\n tags: [],\n }\n\n const { flowId } = toRefs(props)\n\n const flowStats = computed<FlowStatsFilter>(() => {\n return {\n flowId: flowId.value,\n range: filter.range,\n }\n })\n\n provide(subscriptionIntervalKey, {\n interval: dateFunctions.secondsToMilliseconds(30),\n })\n\n const flowRunsFilter = computed(() => mapper.map('FlowStatsFilter', flowStats.value, 'FlowRunsFilter'))\n const taskRunsFilter = computed(() => mapper.map('FlowStatsFilter', flowStats.value, 'TaskRunsFilter'))\n</script>\n\n<style>\n.flow-stats { @apply\n w-full\n flex\n flex-col\n gap-4\n items-center\n}\n\n.flow-stats__cards { @apply\n w-full\n grid\n gap-5\n sm:grid-cols-3\n md:grid-cols-[2fr_1fr]\n}\n</style>","<template>\n <p-layout-default class=\"flow\">\n <template #header>\n <PageHeadingFlow v-if=\"flow\" :flow=\"flow\" @delete=\"deleteFlow\" />\n </template>\n\n <FlowStats v-if=\"flow\" :flow-id=\"flow.id\" />\n\n <p-tabs v-model:selected=\"tab\" :tabs=\"tabs\">\n <template #details>\n <FlowDetails v-if=\"flow\" :flow=\"flow\" />\n </template>\n\n <template #deployments>\n <DeploymentList :filter=\"deploymentsFilter\" prefix=\"deployments\" />\n </template>\n\n <template #runs>\n <FlowRunFilteredList :filter=\"flowRunsFilter\" selectable prefix=\"runs\" />\n </template>\n </p-tabs>\n </p-layout-default>\n</template>\n\n<script lang=\"ts\" setup>\n import { DeploymentList, PageHeadingFlow, FlowDetails, FlowRunFilteredList, useWorkspaceApi, useFlowRunsFilter, useDeploymentsFilter } from '@prefecthq/prefect-ui-library'\n import { useSubscription, useRouteParam, useRouteQueryParam } from '@prefecthq/vue-compositions'\n import { computed } from 'vue'\n import { useRouter } from 'vue-router'\n import FlowStats from '@/components/FlowStats.vue'\n import { usePageTitle } from '@/compositions/usePageTitle'\n import { routes } from '@/router/routes'\n\n const api = useWorkspaceApi()\n const flowId = useRouteParam('flowId')\n const flowIds = computed(() => [flowId.value])\n const router = useRouter()\n const tab = useRouteQueryParam('tab', 'Runs')\n const tabs = ['Runs', 'Deployments', 'Details']\n\n const subscriptionOptions = {\n interval: 300000,\n }\n\n const flowSubscription = useSubscription(api.flows.getFlow, [flowId.value], subscriptionOptions)\n const flow = computed(() => flowSubscription.response)\n\n const { filter: flowRunsFilter } = useFlowRunsFilter({\n flows: {\n id: flowIds,\n },\n })\n\n const { filter: deploymentsFilter } = useDeploymentsFilter({\n flows: {\n id: flowIds,\n },\n })\n\n function deleteFlow(): void {\n router.push(routes.flows())\n }\n\n const title = computed(() => {\n if (!flow.value) {\n return 'Flow'\n }\n return `Flow: ${flow.value.name}`\n })\n usePageTitle(title)\n</script>"],"names":["props","__props","filter","secondsInWeek","flowId","toRefs","flowStats","computed","provide","subscriptionIntervalKey","dateFunctions","flowRunsFilter","mapper","taskRunsFilter","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_hoisted_2","_createVNode","_unref","FlowRunHistoryCard","CumulativeTaskRunsCard","api","useWorkspaceApi","useRouteParam","flowIds","router","useRouter","tab","useRouteQueryParam","tabs","subscriptionOptions","flowSubscription","useSubscription","flow","useFlowRunsFilter","deploymentsFilter","useDeploymentsFilter","deleteFlow","routes","title","usePageTitle","_createBlock","_component_p_layout_default","PageHeadingFlow","FlowStats","_component_p_tabs","$event","FlowDetails","DeploymentList","FlowRunFilteredList"],"mappings":"oaAuBE,MAAMA,EAAQC,EAIRC,EAAmC,CACvC,MAAO,CAAE,KAAM,OAAQ,QAAS,CAACC,CAAA,CAEnC,EAEM,CAAE,OAAAC,CAAA,EAAWC,EAAOL,CAAK,EAEzBM,EAAYC,EAA0B,KACnC,CACL,OAAQH,EAAO,MACf,MAAOF,EAAO,KAAA,EAEjB,EAEDM,EAAQC,EAAyB,CAC/B,SAAUC,EAAc,sBAAsB,EAAE,CAAA,CACjD,EAED,MAAMC,EAAiBJ,EAAS,IAAMK,EAAO,IAAI,kBAAmBN,EAAU,MAAO,gBAAgB,CAAC,EAChGO,EAAiBN,EAAS,IAAMK,EAAO,IAAI,kBAAmBN,EAAU,MAAO,gBAAgB,CAAC,gBA7CtGQ,EAAA,EAAAC,EAMM,MANNC,EAMM,CALJC,EAIM,MAJNC,EAIM,CAHJC,EAA+CC,EAAAC,CAAA,EAAA,CAA1B,OAAQV,EAAA,KAAA,EAAc,KAAA,EAAA,CAAA,QAAA,CAAA,EAE3CQ,EAAmDC,EAAAE,CAAA,EAAA,CAA1B,OAAQT,EAAA,OAAc,KAAA,EAAA,CAAA,QAAA,CAAA,CAAA,sCC4BnD,MAAMU,EAAMC,EAAA,EACNpB,EAASqB,EAAc,QAAQ,EAC/BC,EAAUnB,EAAS,IAA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AAT,CAAA,EAAgB,WAAA,GAAW,OAAO,MAAA"}
1
+ {"version":3,"file":"Flow-RmpH3LjK.js","sources":["../../src/components/FlowStats.vue","../../src/pages/Flow.vue"],"sourcesContent":["<template>\n <div class=\"flow-stats\">\n <div class=\"flow-stats__cards\">\n <FlowRunHistoryCard :filter=\"flowRunsFilter\" />\n\n <CumulativeTaskRunsCard :filter=\"taskRunsFilter\" />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import {\n CumulativeTaskRunsCard,\n FlowRunHistoryCard,\n subscriptionIntervalKey,\n mapper,\n FlowStatsFilter,\n WorkspaceDashboardFilter,\n dateFunctions,\n secondsInWeek\n } from '@prefecthq/prefect-ui-library'\n import { computed, provide, toRefs } from 'vue'\n\n const props = defineProps<{\n flowId: string,\n }>()\n\n const filter: WorkspaceDashboardFilter = {\n range: { type: 'span', seconds: -secondsInWeek },\n tags: [],\n }\n\n const { flowId } = toRefs(props)\n\n const flowStats = computed<FlowStatsFilter>(() => {\n return {\n flowId: flowId.value,\n range: filter.range,\n }\n })\n\n provide(subscriptionIntervalKey, {\n interval: dateFunctions.secondsToMilliseconds(30),\n })\n\n const flowRunsFilter = computed(() => mapper.map('FlowStatsFilter', flowStats.value, 'FlowRunsFilter'))\n const taskRunsFilter = computed(() => mapper.map('FlowStatsFilter', flowStats.value, 'TaskRunsFilter'))\n</script>\n\n<style>\n.flow-stats { @apply\n w-full\n flex\n flex-col\n gap-4\n items-center\n}\n\n.flow-stats__cards { @apply\n w-full\n grid\n gap-5\n sm:grid-cols-3\n md:grid-cols-[2fr_1fr]\n}\n</style>","<template>\n <p-layout-default class=\"flow\">\n <template #header>\n <PageHeadingFlow v-if=\"flow\" :flow=\"flow\" @delete=\"deleteFlow\" />\n </template>\n\n <FlowStats v-if=\"flow\" :flow-id=\"flow.id\" />\n\n <p-tabs v-model:selected=\"tab\" :tabs=\"tabs\">\n <template #details>\n <FlowDetails v-if=\"flow\" :flow=\"flow\" />\n </template>\n\n <template #deployments>\n <DeploymentList :filter=\"deploymentsFilter\" prefix=\"deployments\" />\n </template>\n\n <template #runs>\n <FlowRunFilteredList :filter=\"flowRunsFilter\" selectable prefix=\"runs\" />\n </template>\n </p-tabs>\n </p-layout-default>\n</template>\n\n<script lang=\"ts\" setup>\n import { DeploymentList, PageHeadingFlow, FlowDetails, FlowRunFilteredList, useWorkspaceApi, useFlowRunsFilter, useDeploymentsFilter } from '@prefecthq/prefect-ui-library'\n import { useSubscription, useRouteParam, useRouteQueryParam } from '@prefecthq/vue-compositions'\n import { computed } from 'vue'\n import { useRouter } from 'vue-router'\n import FlowStats from '@/components/FlowStats.vue'\n import { usePageTitle } from '@/compositions/usePageTitle'\n import { routes } from '@/router/routes'\n\n const api = useWorkspaceApi()\n const flowId = useRouteParam('flowId')\n const flowIds = computed(() => [flowId.value])\n const router = useRouter()\n const tab = useRouteQueryParam('tab', 'Runs')\n const tabs = ['Runs', 'Deployments', 'Details']\n\n const subscriptionOptions = {\n interval: 300000,\n }\n\n const flowSubscription = useSubscription(api.flows.getFlow, [flowId.value], subscriptionOptions)\n const flow = computed(() => flowSubscription.response)\n\n const { filter: flowRunsFilter } = useFlowRunsFilter({\n flows: {\n id: flowIds,\n },\n })\n\n const { filter: deploymentsFilter } = useDeploymentsFilter({\n flows: {\n id: flowIds,\n },\n })\n\n function deleteFlow(): void {\n router.push(routes.flows())\n }\n\n const title = computed(() => {\n if (!flow.value) {\n return 'Flow'\n }\n return `Flow: ${flow.value.name}`\n })\n usePageTitle(title)\n</script>"],"names":["props","__props","filter","secondsInWeek","flowId","toRefs","flowStats","computed","provide","subscriptionIntervalKey","dateFunctions","flowRunsFilter","mapper","taskRunsFilter","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_hoisted_2","_createVNode","_unref","FlowRunHistoryCard","CumulativeTaskRunsCard","api","useWorkspaceApi","useRouteParam","flowIds","router","useRouter","tab","useRouteQueryParam","tabs","subscriptionOptions","flowSubscription","useSubscription","flow","useFlowRunsFilter","deploymentsFilter","useDeploymentsFilter","deleteFlow","routes","title","usePageTitle","_createBlock","_component_p_layout_default","PageHeadingFlow","FlowStats","_component_p_tabs","$event","FlowDetails","DeploymentList","FlowRunFilteredList"],"mappings":"oaAuBE,MAAMA,EAAQC,EAIRC,EAAmC,CACvC,MAAO,CAAE,KAAM,OAAQ,QAAS,CAACC,CAAA,CAEnC,EAEM,CAAE,OAAAC,CAAA,EAAWC,EAAOL,CAAK,EAEzBM,EAAYC,EAA0B,KACnC,CACL,OAAQH,EAAO,MACf,MAAOF,EAAO,KAAA,EAEjB,EAEDM,EAAQC,EAAyB,CAC/B,SAAUC,EAAc,sBAAsB,EAAE,CAAA,CACjD,EAED,MAAMC,EAAiBJ,EAAS,IAAMK,EAAO,IAAI,kBAAmBN,EAAU,MAAO,gBAAgB,CAAC,EAChGO,EAAiBN,EAAS,IAAMK,EAAO,IAAI,kBAAmBN,EAAU,MAAO,gBAAgB,CAAC,gBA7CtGQ,EAAA,EAAAC,EAMM,MANNC,EAMM,CALJC,EAIM,MAJNC,EAIM,CAHJC,EAA+CC,EAAAC,CAAA,EAAA,CAA1B,OAAQV,EAAA,KAAA,EAAc,KAAA,EAAA,CAAA,QAAA,CAAA,EAE3CQ,EAAmDC,EAAAE,CAAA,EAAA,CAA1B,OAAQT,EAAA,OAAc,KAAA,EAAA,CAAA,QAAA,CAAA,CAAA,sCC4BnD,MAAMU,EAAMC,EAAA,EACNpB,EAASqB,EAAc,QAAQ,EAC/BC,EAAUnB,EAAS,IAAM,CAACH,EAAO,KAAK,CAAC,EACvCuB,EAASC,EAAA,EACTC,EAAMC,EAAmB,MAAO,MAAM,EACtCC,EAAO,CAAC,OAAQ,cAAe,SAAS,EAExCC,EAAsB,CAC1B,SAAU,GAAA,EAGNC,EAAmBC,EAAgBX,EAAI,MAAM,QAAS,CAACnB,EAAO,KAAK,EAAG4B,CAAmB,EACzFG,EAAO5B,EAAS,IAAM0B,EAAiB,QAAQ,EAE/C,CAAE,OAAQtB,CAAA,EAAmByB,EAAkB,CACnD,MAAO,CACL,GAAIV,CAAA,CACN,CACD,EAEK,CAAE,OAAQW,CAAA,EAAsBC,EAAqB,CACzD,MAAO,CACL,GAAIZ,CAAA,CACN,CACD,EAED,SAASa,GAAmB,CAC1BZ,EAAO,KAAKa,EAAO,OAAO,CAC5B,CAEA,MAAMC,EAAQlC,EAAS,IAChB4B,EAAK,MAGH,SAASA,EAAK,MAAM,IAAI,GAFtB,MAGV,EACD,OAAAO,EAAaD,CAAK,kEApElBE,EAoBmBC,EAAA,CApBD,MAAM,QAAM,CACjB,SACT,IAAiE,CAA1CT,EAAA,WAAvBQ,EAAiEvB,EAAAyB,CAAA,EAAA,OAAnC,KAAMV,EAAA,MAAO,SAAQI,CAAA,yCAGrD,IAA4C,CAA3BJ,EAAA,WAAjBQ,EAA4CG,EAAA,OAApB,UAASX,EAAA,MAAK,EAAA,gCAEtChB,EAYS4B,EAAA,CAZO,SAAU3B,EAAAS,CAAA,0CAAAA,EAAG,MAAAmB,EAAA,MAAG,KAAAjB,CAAA,GACnB,UACT,IAAwC,CAArBI,EAAA,WAAnBQ,EAAwCvB,EAAA6B,CAAA,EAAA,OAAd,KAAMd,EAAA,KAAA,+BAGvB,cACT,IAAmE,CAAnEhB,EAAmEC,EAAA8B,CAAA,EAAA,CAAlD,OAAQ9B,EAAAiB,CAAA,EAAmB,OAAO,aAAA,uBAG1C,OACT,IAAyE,CAAzElB,EAAyEC,EAAA+B,CAAA,EAAA,CAAnD,OAAQ/B,EAAAT,CAAA,EAAgB,WAAA,GAAW,OAAO,MAAA"}
@@ -1,2 +1,2 @@
1
- import{d as F,S as G,ae as _,g as r,n as P,o as u,l as m,c as i,a as f,k as a,m as l,bm as S,bn as z,bo as D,bp as N,bq as $,br as q,bs as A,aw as L,u as J,v as H,bt as K,ah as h,bu as M,al as Q,bv as W,bw as X,bx as Y,by as Z,bz as ee,bg as U,h as k,i as o,a6 as le,bA as O,bB as te,bC as ne,bD as se,bE as ae,bF as oe,bG as ue}from"./index-C9FkjDpZ.js";import{u as re}from"./usePageTitle-B0Hz_El0.js";const ie={class:"flow-run-graphs__graph-panel-container"},fe={class:"flow-run-graphs__graphs"},ce={class:"flow-run-graphs__panel p-background"},de=F({__name:"FlowRunGraphs",props:{flowRun:{}},setup(R){const v=G(),d=_(),s=_(!1),e=_(null),w=r(()=>({root:{"flow-run-graphs--fullscreen":s.value,"flow-run-graphs--show-panel":e.value?.kind==="task-run"||e.value?.kind==="flow-run"}})),c=async({nodeId:p,since:n,until:t})=>{const b={anyResource:{id:[`prefect.flow-run.${p}`]},event:{excludePrefix:["prefect.log.write","prefect.task-run."]},occurred:{since:n,until:t}},{events:g}=await v.events.getEvents(b);return g};return(p,n)=>(u(),P("div",{class:L(["flow-run-graphs",w.value.root])},[m("div",ie,[m("div",fe,[a(l(S),{fullscreen:s.value,"onUpdate:fullscreen":n[0]||(n[0]=t=>s.value=t),viewport:d.value,"onUpdate:viewport":n[1]||(n[1]=t=>d.value=t),selected:e.value,"onUpdate:selected":n[2]||(n[2]=t=>e.value=t),"flow-run":R.flowRun,"fetch-events":c,class:"flow-run-graphs__flow-run"},null,8,["fullscreen","viewport","selected","flow-run"])]),m("div",ce,[e.value?.kind==="task-run"||e.value?.kind==="flow-run"?(u(),i(l(z),{key:0,selection:e.value,"onUpdate:selection":n[3]||(n[3]=t=>e.value=t),floating:s.value},null,8,["selection","floating"])):f("",!0)])]),e.value&&e.value.kind==="event"?(u(),i(l(D),{key:0,selection:e.value,"onUpdate:selection":n[4]||(n[4]=t=>e.value=t)},null,8,["selection"])):f("",!0),e.value&&e.value.kind==="events"?(u(),i(l(N),{key:1,selection:e.value,"onUpdate:selection":n[5]||(n[5]=t=>e.value=t)},null,8,["selection"])):f("",!0),e.value&&e.value.kind==="artifacts"?(u(),i(l($),{key:2,selection:e.value,"onUpdate:selection":n[6]||(n[6]=t=>e.value=t)},null,8,["selection"])):f("",!0),e.value?.kind==="state"?(u(),i(l(q),{key:3,selection:e.value,"onUpdate:selection":n[7]||(n[7]=t=>e.value=t)},null,8,["selection"])):f("",!0),a(l(A),{selection:e.value,"onUpdate:selection":n[8]||(n[8]=t=>e.value=t)},null,8,["selection"])],2))}}),we=F({__name:"FlowRun",setup(R){const v=J(),d=H("flowRunId"),{flowRun:s,subscription:e}=K(d,{interval:5e3}),w=r(()=>h(s.value?.parameters??{})),c=r(()=>s.value?.stateType?M(s.value.stateType):!0),p=r(()=>h(s.value?.jobVariables??{})),n=r(()=>[{label:"Logs"},{label:"Task Runs",hidden:c.value},{label:"Subflow Runs",hidden:c.value},{label:"Artifacts",hidden:c.value},{label:"Details"},{label:"Parameters"},{label:"Job Variables"}]),t=Q("tab","Logs"),{tabs:b}=W(n,t),g=r(()=>[d.value]),{filter:B}=X({flowRuns:{parentFlowRunId:g}});function E(){v.push(U.runs())}Y(s);const T=r(()=>s.value?`Flow Run: ${s.value.name}`:"Flow Run");return re(T),Z(()=>{e.error&&ee(e.error).isInRange("clientError")&&v.replace(U[404]())}),(V,y)=>{const x=k("p-code-highlight"),j=k("p-tabs"),C=k("p-layout-default");return l(s)?(u(),i(C,{key:l(s).id,class:"flow-run"},{header:o(()=>[a(l(ue),{"flow-run-id":l(s).id,onDelete:E},null,8,["flow-run-id"])]),default:o(()=>[c.value?f("",!0):(u(),i(de,{key:0,"flow-run":l(s)},null,8,["flow-run"])),a(j,{selected:l(t),"onUpdate:selected":y[0]||(y[0]=I=>le(t)?t.value=I:null),tabs:l(b)},{details:o(()=>[a(l(oe),{"flow-run":l(s)},null,8,["flow-run"])]),logs:o(()=>[a(l(ae),{"flow-run":l(s)},null,8,["flow-run"])]),artifacts:o(()=>[a(l(se),{"flow-run":l(s)},null,8,["flow-run"])]),"task-runs":o(()=>[a(l(ne),{"flow-run-id":l(s).id},null,8,["flow-run-id"])]),"subflow-runs":o(()=>[a(l(te),{filter:l(B)},null,8,["filter"])]),parameters:o(()=>[a(l(O),{"text-to-copy":w.value},{default:o(()=>[a(x,{lang:"json",text:w.value,class:"flow-run__parameters"},null,8,["text"])]),_:1},8,["text-to-copy"])]),"job-variables":o(()=>[a(l(O),{"text-to-copy":p.value},{default:o(()=>[a(x,{lang:"json",text:p.value,class:"flow-run__job-variables"},null,8,["text"])]),_:1},8,["text-to-copy"])]),_:1},8,["selected","tabs"])]),_:1})):f("",!0)}}});export{we as default};
2
- //# sourceMappingURL=FlowRun-3dhHtN2i.js.map
1
+ import{d as F,S as G,ae as _,g as r,n as P,o as u,l as m,c as i,a as f,k as a,m as l,bm as S,bn as z,bo as D,bp as N,bq as $,br as q,bs as A,aw as L,u as J,v as H,bt as K,ah as h,bu as M,al as Q,bv as W,bw as X,bx as Y,by as Z,bz as ee,bg as U,h as k,i as o,a6 as le,bA as O,bB as te,bC as ne,bD as se,bE as ae,bF as oe,bG as ue}from"./index-DS86r6aC.js";import{u as re}from"./usePageTitle-BXVkHaWQ.js";const ie={class:"flow-run-graphs__graph-panel-container"},fe={class:"flow-run-graphs__graphs"},ce={class:"flow-run-graphs__panel p-background"},de=F({__name:"FlowRunGraphs",props:{flowRun:{}},setup(R){const v=G(),d=_(),s=_(!1),e=_(null),w=r(()=>({root:{"flow-run-graphs--fullscreen":s.value,"flow-run-graphs--show-panel":e.value?.kind==="task-run"||e.value?.kind==="flow-run"}})),c=async({nodeId:p,since:n,until:t})=>{const b={anyResource:{id:[`prefect.flow-run.${p}`]},event:{excludePrefix:["prefect.log.write","prefect.task-run."]},occurred:{since:n,until:t}},{events:g}=await v.events.getEvents(b);return g};return(p,n)=>(u(),P("div",{class:L(["flow-run-graphs",w.value.root])},[m("div",ie,[m("div",fe,[a(l(S),{fullscreen:s.value,"onUpdate:fullscreen":n[0]||(n[0]=t=>s.value=t),viewport:d.value,"onUpdate:viewport":n[1]||(n[1]=t=>d.value=t),selected:e.value,"onUpdate:selected":n[2]||(n[2]=t=>e.value=t),"flow-run":R.flowRun,"fetch-events":c,class:"flow-run-graphs__flow-run"},null,8,["fullscreen","viewport","selected","flow-run"])]),m("div",ce,[e.value?.kind==="task-run"||e.value?.kind==="flow-run"?(u(),i(l(z),{key:0,selection:e.value,"onUpdate:selection":n[3]||(n[3]=t=>e.value=t),floating:s.value},null,8,["selection","floating"])):f("",!0)])]),e.value&&e.value.kind==="event"?(u(),i(l(D),{key:0,selection:e.value,"onUpdate:selection":n[4]||(n[4]=t=>e.value=t)},null,8,["selection"])):f("",!0),e.value&&e.value.kind==="events"?(u(),i(l(N),{key:1,selection:e.value,"onUpdate:selection":n[5]||(n[5]=t=>e.value=t)},null,8,["selection"])):f("",!0),e.value&&e.value.kind==="artifacts"?(u(),i(l($),{key:2,selection:e.value,"onUpdate:selection":n[6]||(n[6]=t=>e.value=t)},null,8,["selection"])):f("",!0),e.value?.kind==="state"?(u(),i(l(q),{key:3,selection:e.value,"onUpdate:selection":n[7]||(n[7]=t=>e.value=t)},null,8,["selection"])):f("",!0),a(l(A),{selection:e.value,"onUpdate:selection":n[8]||(n[8]=t=>e.value=t)},null,8,["selection"])],2))}}),we=F({__name:"FlowRun",setup(R){const v=J(),d=H("flowRunId"),{flowRun:s,subscription:e}=K(d,{interval:5e3}),w=r(()=>h(s.value?.parameters??{})),c=r(()=>s.value?.stateType?M(s.value.stateType):!0),p=r(()=>h(s.value?.jobVariables??{})),n=r(()=>[{label:"Logs"},{label:"Task Runs",hidden:c.value},{label:"Subflow Runs",hidden:c.value},{label:"Artifacts",hidden:c.value},{label:"Details"},{label:"Parameters"},{label:"Job Variables"}]),t=Q("tab","Logs"),{tabs:b}=W(n,t),g=r(()=>[d.value]),{filter:B}=X({flowRuns:{parentFlowRunId:g}});function E(){v.push(U.runs())}Y(s);const T=r(()=>s.value?`Flow Run: ${s.value.name}`:"Flow Run");return re(T),Z(()=>{e.error&&ee(e.error).isInRange("clientError")&&v.replace(U[404]())}),(V,y)=>{const x=k("p-code-highlight"),j=k("p-tabs"),C=k("p-layout-default");return l(s)?(u(),i(C,{key:l(s).id,class:"flow-run"},{header:o(()=>[a(l(ue),{"flow-run-id":l(s).id,onDelete:E},null,8,["flow-run-id"])]),default:o(()=>[c.value?f("",!0):(u(),i(de,{key:0,"flow-run":l(s)},null,8,["flow-run"])),a(j,{selected:l(t),"onUpdate:selected":y[0]||(y[0]=I=>le(t)?t.value=I:null),tabs:l(b)},{details:o(()=>[a(l(oe),{"flow-run":l(s)},null,8,["flow-run"])]),logs:o(()=>[a(l(ae),{"flow-run":l(s)},null,8,["flow-run"])]),artifacts:o(()=>[a(l(se),{"flow-run":l(s)},null,8,["flow-run"])]),"task-runs":o(()=>[a(l(ne),{"flow-run-id":l(s).id},null,8,["flow-run-id"])]),"subflow-runs":o(()=>[a(l(te),{filter:l(B)},null,8,["filter"])]),parameters:o(()=>[a(l(O),{"text-to-copy":w.value},{default:o(()=>[a(x,{lang:"json",text:w.value,class:"flow-run__parameters"},null,8,["text"])]),_:1},8,["text-to-copy"])]),"job-variables":o(()=>[a(l(O),{"text-to-copy":p.value},{default:o(()=>[a(x,{lang:"json",text:p.value,class:"flow-run__job-variables"},null,8,["text"])]),_:1},8,["text-to-copy"])]),_:1},8,["selected","tabs"])]),_:1})):f("",!0)}}});export{we as default};
2
+ //# sourceMappingURL=FlowRun-C3yAz7L4.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FlowRun-3dhHtN2i.js","sources":["../../src/components/FlowRunGraphs.vue","../../src/pages/FlowRun.vue"],"sourcesContent":["<template>\n <div class=\"flow-run-graphs\" :class=\"classes.root\">\n <div class=\"flow-run-graphs__graph-panel-container\">\n <div class=\"flow-run-graphs__graphs\">\n <FlowRunGraph\n v-model:fullscreen=\"fullscreen\"\n v-model:viewport=\"dateRange\"\n v-model:selected=\"selection\"\n :flow-run\n :fetch-events\n class=\"flow-run-graphs__flow-run\"\n />\n </div>\n <div class=\"flow-run-graphs__panel p-background\">\n <FlowRunGraphSelectionPanel\n v-if=\"selection?.kind === 'task-run' || selection?.kind === 'flow-run'\"\n v-model:selection=\"selection\"\n :floating=\"fullscreen\"\n />\n </div>\n </div>\n <FlowRunGraphEventPopover\n v-if=\"selection && selection.kind === 'event'\"\n v-model:selection=\"selection\"\n />\n <FlowRunGraphEventsPopover\n v-if=\"selection && selection.kind === 'events'\"\n v-model:selection=\"selection\"\n />\n <FlowRunGraphArtifactsPopover\n v-if=\"selection && selection.kind === 'artifacts'\"\n v-model:selection=\"selection\"\n />\n <FlowRunGraphStatePopover\n v-if=\"selection?.kind === 'state'\"\n v-model:selection=\"selection\"\n />\n <FlowRunGraphArtifactDrawer v-model:selection=\"selection\" />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import {\n FlowRunGraph,\n RunGraphItemSelection,\n RunGraphViewportDateRange,\n FlowRun,\n FlowRunGraphSelectionPanel,\n FlowRunGraphArtifactDrawer,\n FlowRunGraphArtifactsPopover,\n FlowRunGraphStatePopover,\n RunGraphFetchEventsContext,\n FlowRunGraphEventPopover,\n FlowRunGraphEventsPopover,\n RunGraphEvent,\n WorkspaceEventsFilter,\n useWorkspaceApi\n } from '@prefecthq/prefect-ui-library'\n import { computed, ref } from 'vue'\n\n defineProps<{\n flowRun: FlowRun,\n }>()\n\n const api = useWorkspaceApi()\n const dateRange = ref<RunGraphViewportDateRange>()\n\n const fullscreen = ref(false)\n const selection = ref<RunGraphItemSelection | null>(null)\n\n const classes = computed(() => {\n return {\n root: {\n 'flow-run-graphs--fullscreen': fullscreen.value,\n 'flow-run-graphs--show-panel': Boolean(\n selection.value?.kind === 'task-run'\n || selection.value?.kind === 'flow-run',\n ),\n },\n }\n })\n\n const fetchEvents = async ({ nodeId, since, until }: RunGraphFetchEventsContext): Promise<RunGraphEvent[]> => {\n const filter: WorkspaceEventsFilter = {\n anyResource: {\n id: [`prefect.flow-run.${nodeId}`],\n },\n event: {\n excludePrefix: ['prefect.log.write', 'prefect.task-run.'],\n },\n occurred: {\n since,\n until,\n },\n }\n\n const { events } = await api.events.getEvents(filter)\n\n return events\n }\n</script>\n\n<style>\n.flow-run-graphs { @apply\n relative;\n --flow-run-graphs-panel-width: 320px;\n}\n\n.flow-run-graphs__graph-panel-container { @apply\n relative\n grid\n grid-cols-1\n gap-2\n overflow-hidden\n}\n\n.flow-run-graphs--fullscreen { @apply\n z-20\n static\n}\n\n.flow-run-graphs__graphs { @apply\n transition-[width];\n width: 100%;\n}\n\n.flow-run-graphs--show-panel .flow-run-graphs__graphs {\n width: calc(100% - var(--flow-run-graphs-panel-width) - theme(spacing.2));\n}\n\n.flow-run-graphs__flow-run { @apply\n overflow-hidden\n rounded\n}\n\n.flow-run-graphs__panel { @apply\n absolute\n right-0\n top-0\n bottom-0\n translate-x-full\n transition-transform\n rounded;\n width: var(--flow-run-graphs-panel-width)\n}\n\n.flow-run-graphs--fullscreen .flow-run-graphs__panel { @apply\n bg-floating\n top-4\n right-4\n bottom-auto\n}\n\n.flow-run-graphs--show-panel .flow-run-graphs__panel { @apply\n translate-x-0\n}\n</style>\n","<template>\n <p-layout-default v-if=\"flowRun\" :key=\"flowRun.id\" class=\"flow-run\">\n <template #header>\n <PageHeadingFlowRun :flow-run-id=\"flowRun.id\" @delete=\"goToRuns\" />\n </template>\n\n <FlowRunGraphs v-if=\"!isPending\" :flow-run=\"flowRun\" />\n\n <p-tabs v-model:selected=\"tab\" :tabs=\"tabs\">\n <template #details>\n <FlowRunDetails :flow-run=\"flowRun\" />\n </template>\n\n <template #logs>\n <FlowRunLogs :flow-run=\"flowRun\" />\n </template>\n\n <template #artifacts>\n <FlowRunArtifacts :flow-run=\"flowRun\" />\n </template>\n\n <template #task-runs>\n <FlowRunTaskRuns :flow-run-id=\"flowRun.id\" />\n </template>\n\n <template #subflow-runs>\n <FlowRunFilteredList :filter=\"subflowsFilter\" />\n </template>\n\n <template #parameters>\n <CopyableWrapper :text-to-copy=\"parameters\">\n <p-code-highlight lang=\"json\" :text=\"parameters\" class=\"flow-run__parameters\" />\n </CopyableWrapper>\n </template>\n\n <template #job-variables>\n <CopyableWrapper :text-to-copy=\"jobVariables\">\n <p-code-highlight lang=\"json\" :text=\"jobVariables\" class=\"flow-run__job-variables\" />\n </CopyableWrapper>\n </template>\n </p-tabs>\n </p-layout-default>\n</template>\n\n<script lang=\"ts\" setup>\n import {\n PageHeadingFlowRun,\n FlowRunArtifacts,\n FlowRunDetails,\n FlowRunLogs,\n FlowRunTaskRuns,\n FlowRunFilteredList,\n useFlowRunFavicon,\n CopyableWrapper,\n isPendingStateType,\n useTabs,\n httpStatus,\n useFlowRun,\n useFlowRunsFilter,\n stringify\n } from '@prefecthq/prefect-ui-library'\n import { useRouteParam, useRouteQueryParam } from '@prefecthq/vue-compositions'\n import { computed, watchEffect } from 'vue'\n import { useRouter } from 'vue-router'\n import FlowRunGraphs from '@/components/FlowRunGraphs.vue'\n import { usePageTitle } from '@/compositions/usePageTitle'\n import { routes } from '@/router'\n\n\n const router = useRouter()\n const flowRunId = useRouteParam('flowRunId')\n\n const { flowRun, subscription: flowRunSubscription } = useFlowRun(flowRunId, { interval: 5000 })\n const parameters = computed(() => stringify(flowRun.value?.parameters ?? {}))\n\n const isPending = computed(() => {\n return flowRun.value?.stateType ? isPendingStateType(flowRun.value.stateType) : true\n })\n\n const jobVariables = computed(() => stringify(flowRun.value?.jobVariables ?? {}))\n\n const computedTabs = computed(() => [\n { label: 'Logs' },\n { label: 'Task Runs', hidden: isPending.value },\n { label: 'Subflow Runs', hidden: isPending.value },\n { label: 'Artifacts', hidden: isPending.value },\n { label: 'Details' },\n { label: 'Parameters' },\n { label: 'Job Variables' },\n ])\n const tab = useRouteQueryParam('tab', 'Logs')\n const { tabs } = useTabs(computedTabs, tab)\n\n const parentFlowRunIds = computed(() => [flowRunId.value])\n const { filter: subflowsFilter } = useFlowRunsFilter({\n flowRuns: {\n parentFlowRunId: parentFlowRunIds,\n },\n })\n\n function goToRuns(): void {\n router.push(routes.runs())\n }\n\n useFlowRunFavicon(flowRun)\n\n const title = computed(() => {\n if (!flowRun.value) {\n return 'Flow Run'\n }\n return `Flow Run: ${flowRun.value.name}`\n })\n usePageTitle(title)\n\n watchEffect(() => {\n if (flowRunSubscription.error) {\n const status = httpStatus(flowRunSubscription.error)\n\n if (status.isInRange('clientError')) {\n router.replace(routes[404]())\n }\n }\n })\n</script>\n\n<style>\n.flow-run { @apply\n items-start\n}\n\n.flow-run__logs { @apply\n max-h-screen\n}\n\n.flow-run__header-meta { @apply\n flex\n gap-2\n items-center\n xl:hidden\n}\n\n.flow-run__job-variables,\n.flow-run__parameters { @apply\n px-4\n py-3\n}\n</style>\n"],"names":["api","useWorkspaceApi","dateRange","ref","fullscreen","selection","classes","computed","fetchEvents","nodeId","since","until","filter","events","_createElementBlock","_normalizeClass","_createElementVNode","_hoisted_1","_hoisted_2","_createVNode","_unref","FlowRunGraph","$event","__props","_hoisted_3","_createBlock","FlowRunGraphSelectionPanel","FlowRunGraphEventPopover","FlowRunGraphEventsPopover","FlowRunGraphArtifactsPopover","FlowRunGraphStatePopover","FlowRunGraphArtifactDrawer","router","useRouter","flowRunId","useRouteParam","flowRun","flowRunSubscription","useFlowRun","parameters","stringify","isPending","isPendingStateType","jobVariables","computedTabs","tab","useRouteQueryParam","tabs","useTabs","parentFlowRunIds","subflowsFilter","useFlowRunsFilter","goToRuns","routes","useFlowRunFavicon","title","usePageTitle","watchEffect","httpStatus","_component_p_layout_default","PageHeadingFlowRun","FlowRunGraphs","_component_p_tabs","FlowRunDetails","FlowRunLogs","FlowRunArtifacts","FlowRunTaskRuns","FlowRunFilteredList","CopyableWrapper","_component_p_code_highlight"],"mappings":"4lBAgEE,MAAMA,EAAMC,EAAA,EACNC,EAAYC,EAAA,EAEZC,EAAaD,EAAI,EAAK,EACtBE,EAAYF,EAAkC,IAAI,EAElDG,EAAUC,EAAS,KAChB,CACL,KAAM,CACJ,8BAA+BH,EAAW,MAC1C,8BACEC,EAAU,OAAO,OAAS,YACrBA,EAAU,OAAO,OAAS,UACjC,CACF,EAEH,EAEKG,EAAc,MAAO,CAAE,OAAAC,EAAQ,MAAAC,EAAO,MAAAC,KAAkE,CAC5G,MAAMC,EAAgC,CAC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c7B,EAAA,OAAU,WACxC,IAAgF,CAAhFpB,EAAgFkD,EAAA,CAA9D,KAAK,OAAQ,KAAM9B,EAAA,MAAY,MAAM,sBAAA,gDAIhD,kBACT,IAEkB,CAFlBpB,EAEkBC,EAAAgD,CAAA,EAAA,CAFA,eAAczB,EAAA,OAAY,WAC1C,IAAqF,CAArFxB,EAAqFkD,EAAA,CAAnE,KAAK,OAAQ,KAAM1B,EAAA,MAAc,MAAM,yBAAA"}
1
+ {"version":3,"file":"FlowRun-C3yAz7L4.js","sources":["../../src/components/FlowRunGraphs.vue","../../src/pages/FlowRun.vue"],"sourcesContent":["<template>\n <div class=\"flow-run-graphs\" :class=\"classes.root\">\n <div class=\"flow-run-graphs__graph-panel-container\">\n <div class=\"flow-run-graphs__graphs\">\n <FlowRunGraph\n v-model:fullscreen=\"fullscreen\"\n v-model:viewport=\"dateRange\"\n v-model:selected=\"selection\"\n :flow-run\n :fetch-events\n class=\"flow-run-graphs__flow-run\"\n />\n </div>\n <div class=\"flow-run-graphs__panel p-background\">\n <FlowRunGraphSelectionPanel\n v-if=\"selection?.kind === 'task-run' || selection?.kind === 'flow-run'\"\n v-model:selection=\"selection\"\n :floating=\"fullscreen\"\n />\n </div>\n </div>\n <FlowRunGraphEventPopover\n v-if=\"selection && selection.kind === 'event'\"\n v-model:selection=\"selection\"\n />\n <FlowRunGraphEventsPopover\n v-if=\"selection && selection.kind === 'events'\"\n v-model:selection=\"selection\"\n />\n <FlowRunGraphArtifactsPopover\n v-if=\"selection && selection.kind === 'artifacts'\"\n v-model:selection=\"selection\"\n />\n <FlowRunGraphStatePopover\n v-if=\"selection?.kind === 'state'\"\n v-model:selection=\"selection\"\n />\n <FlowRunGraphArtifactDrawer v-model:selection=\"selection\" />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import {\n FlowRunGraph,\n RunGraphItemSelection,\n RunGraphViewportDateRange,\n FlowRun,\n FlowRunGraphSelectionPanel,\n FlowRunGraphArtifactDrawer,\n FlowRunGraphArtifactsPopover,\n FlowRunGraphStatePopover,\n RunGraphFetchEventsContext,\n FlowRunGraphEventPopover,\n FlowRunGraphEventsPopover,\n RunGraphEvent,\n WorkspaceEventsFilter,\n useWorkspaceApi\n } from '@prefecthq/prefect-ui-library'\n import { computed, ref } from 'vue'\n\n defineProps<{\n flowRun: FlowRun,\n }>()\n\n const api = useWorkspaceApi()\n const dateRange = ref<RunGraphViewportDateRange>()\n\n const fullscreen = ref(false)\n const selection = ref<RunGraphItemSelection | null>(null)\n\n const classes = computed(() => {\n return {\n root: {\n 'flow-run-graphs--fullscreen': fullscreen.value,\n 'flow-run-graphs--show-panel': Boolean(\n selection.value?.kind === 'task-run'\n || selection.value?.kind === 'flow-run',\n ),\n },\n }\n })\n\n const fetchEvents = async ({ nodeId, since, until }: RunGraphFetchEventsContext): Promise<RunGraphEvent[]> => {\n const filter: WorkspaceEventsFilter = {\n anyResource: {\n id: [`prefect.flow-run.${nodeId}`],\n },\n event: {\n excludePrefix: ['prefect.log.write', 'prefect.task-run.'],\n },\n occurred: {\n since,\n until,\n },\n }\n\n const { events } = await api.events.getEvents(filter)\n\n return events\n }\n</script>\n\n<style>\n.flow-run-graphs { @apply\n relative;\n --flow-run-graphs-panel-width: 320px;\n}\n\n.flow-run-graphs__graph-panel-container { @apply\n relative\n grid\n grid-cols-1\n gap-2\n overflow-hidden\n}\n\n.flow-run-graphs--fullscreen { @apply\n z-20\n static\n}\n\n.flow-run-graphs__graphs { @apply\n transition-[width];\n width: 100%;\n}\n\n.flow-run-graphs--show-panel .flow-run-graphs__graphs {\n width: calc(100% - var(--flow-run-graphs-panel-width) - theme(spacing.2));\n}\n\n.flow-run-graphs__flow-run { @apply\n overflow-hidden\n rounded\n}\n\n.flow-run-graphs__panel { @apply\n absolute\n right-0\n top-0\n bottom-0\n translate-x-full\n transition-transform\n rounded;\n width: var(--flow-run-graphs-panel-width)\n}\n\n.flow-run-graphs--fullscreen .flow-run-graphs__panel { @apply\n bg-floating\n top-4\n right-4\n bottom-auto\n}\n\n.flow-run-graphs--show-panel .flow-run-graphs__panel { @apply\n translate-x-0\n}\n</style>\n","<template>\n <p-layout-default v-if=\"flowRun\" :key=\"flowRun.id\" class=\"flow-run\">\n <template #header>\n <PageHeadingFlowRun :flow-run-id=\"flowRun.id\" @delete=\"goToRuns\" />\n </template>\n\n <FlowRunGraphs v-if=\"!isPending\" :flow-run=\"flowRun\" />\n\n <p-tabs v-model:selected=\"tab\" :tabs=\"tabs\">\n <template #details>\n <FlowRunDetails :flow-run=\"flowRun\" />\n </template>\n\n <template #logs>\n <FlowRunLogs :flow-run=\"flowRun\" />\n </template>\n\n <template #artifacts>\n <FlowRunArtifacts :flow-run=\"flowRun\" />\n </template>\n\n <template #task-runs>\n <FlowRunTaskRuns :flow-run-id=\"flowRun.id\" />\n </template>\n\n <template #subflow-runs>\n <FlowRunFilteredList :filter=\"subflowsFilter\" />\n </template>\n\n <template #parameters>\n <CopyableWrapper :text-to-copy=\"parameters\">\n <p-code-highlight lang=\"json\" :text=\"parameters\" class=\"flow-run__parameters\" />\n </CopyableWrapper>\n </template>\n\n <template #job-variables>\n <CopyableWrapper :text-to-copy=\"jobVariables\">\n <p-code-highlight lang=\"json\" :text=\"jobVariables\" class=\"flow-run__job-variables\" />\n </CopyableWrapper>\n </template>\n </p-tabs>\n </p-layout-default>\n</template>\n\n<script lang=\"ts\" setup>\n import {\n PageHeadingFlowRun,\n FlowRunArtifacts,\n FlowRunDetails,\n FlowRunLogs,\n FlowRunTaskRuns,\n FlowRunFilteredList,\n useFlowRunFavicon,\n CopyableWrapper,\n isPendingStateType,\n useTabs,\n httpStatus,\n useFlowRun,\n useFlowRunsFilter,\n stringify\n } from '@prefecthq/prefect-ui-library'\n import { useRouteParam, useRouteQueryParam } from '@prefecthq/vue-compositions'\n import { computed, watchEffect } from 'vue'\n import { useRouter } from 'vue-router'\n import FlowRunGraphs from '@/components/FlowRunGraphs.vue'\n import { usePageTitle } from '@/compositions/usePageTitle'\n import { routes } from '@/router'\n\n\n const router = useRouter()\n const flowRunId = useRouteParam('flowRunId')\n\n const { flowRun, subscription: flowRunSubscription } = useFlowRun(flowRunId, { interval: 5000 })\n const parameters = computed(() => stringify(flowRun.value?.parameters ?? {}))\n\n const isPending = computed(() => {\n return flowRun.value?.stateType ? isPendingStateType(flowRun.value.stateType) : true\n })\n\n const jobVariables = computed(() => stringify(flowRun.value?.jobVariables ?? {}))\n\n const computedTabs = computed(() => [\n { label: 'Logs' },\n { label: 'Task Runs', hidden: isPending.value },\n { label: 'Subflow Runs', hidden: isPending.value },\n { label: 'Artifacts', hidden: isPending.value },\n { label: 'Details' },\n { label: 'Parameters' },\n { label: 'Job Variables' },\n ])\n const tab = useRouteQueryParam('tab', 'Logs')\n const { tabs } = useTabs(computedTabs, tab)\n\n const parentFlowRunIds = computed(() => [flowRunId.value])\n const { filter: subflowsFilter } = useFlowRunsFilter({\n flowRuns: {\n parentFlowRunId: parentFlowRunIds,\n },\n })\n\n function goToRuns(): void {\n router.push(routes.runs())\n }\n\n useFlowRunFavicon(flowRun)\n\n const title = computed(() => {\n if (!flowRun.value) {\n return 'Flow Run'\n }\n return `Flow Run: ${flowRun.value.name}`\n })\n usePageTitle(title)\n\n watchEffect(() => {\n if (flowRunSubscription.error) {\n const status = httpStatus(flowRunSubscription.error)\n\n if (status.isInRange('clientError')) {\n router.replace(routes[404]())\n }\n }\n })\n</script>\n\n<style>\n.flow-run { @apply\n items-start\n}\n\n.flow-run__logs { @apply\n max-h-screen\n}\n\n.flow-run__header-meta { @apply\n flex\n gap-2\n items-center\n xl:hidden\n}\n\n.flow-run__job-variables,\n.flow-run__parameters { @apply\n px-4\n py-3\n}\n</style>\n"],"names":["api","useWorkspaceApi","dateRange","ref","fullscreen","selection","classes","computed","fetchEvents","nodeId","since","until","filter","events","_createElementBlock","_normalizeClass","_createElementVNode","_hoisted_1","_hoisted_2","_createVNode","_unref","FlowRunGraph","$event","__props","_hoisted_3","_createBlock","FlowRunGraphSelectionPanel","FlowRunGraphEventPopover","FlowRunGraphEventsPopover","FlowRunGraphArtifactsPopover","FlowRunGraphStatePopover","FlowRunGraphArtifactDrawer","router","useRouter","flowRunId","useRouteParam","flowRun","flowRunSubscription","useFlowRun","parameters","stringify","isPending","isPendingStateType","jobVariables","computedTabs","tab","useRouteQueryParam","tabs","useTabs","parentFlowRunIds","subflowsFilter","useFlowRunsFilter","goToRuns","routes","useFlowRunFavicon","title","usePageTitle","watchEffect","httpStatus","_component_p_layout_default","PageHeadingFlowRun","FlowRunGraphs","_component_p_tabs","FlowRunDetails","FlowRunLogs","FlowRunArtifacts","FlowRunTaskRuns","FlowRunFilteredList","CopyableWrapper","_component_p_code_highlight"],"mappings":"4lBAgEE,MAAMA,EAAMC,EAAA,EACNC,EAAYC,EAAA,EAEZC,EAAaD,EAAI,EAAK,EACtBE,EAAYF,EAAkC,IAAI,EAElDG,EAAUC,EAAS,KAChB,CACL,KAAM,CACJ,8BAA+BH,EAAW,MAC1C,8BACEC,EAAU,OAAO,OAAS,YACrBA,EAAU,OAAO,OAAS,UACjC,CACF,EAEH,EAEKG,EAAc,MAAO,CAAE,OAAAC,EAAQ,MAAAC,EAAO,MAAAC,KAAkE,CAC5G,MAAMC,EAAgC,CACpC,YAAa,CACX,GAAI,CAAC,oBAAoBH,CAAM,EAAE,CAAA,EAEnC,MAAO,CACL,cAAe,CAAC,oBAAqB,mBAAmB,CAAA,EAE1D,SAAU,CACR,MAAAC,EACA,MAAAC,CAAA,CACF,EAGI,CAAE,OAAAE,CAAA,EAAW,MAAMb,EAAI,OAAO,UAAUY,CAAM,EAEpD,OAAOC,CACT,oBAlGAC,EAqCM,MAAA,CArCD,MAAKC,EAAA,CAAC,kBAA0BT,EAAA,MAAQ,IAAI,CAAA,CAAA,GAC/CU,EAkBM,MAlBNC,GAkBM,CAjBJD,EASM,MATNE,GASM,CARJC,EAOEC,EAAAC,CAAA,EAAA,CANQ,WAAYjB,EAAA,2CAAAA,EAAU,MAAAkB,GACtB,SAAU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AAAyB,CAAA,2CAAAA,EAAG,MAAAvB,EAAA,MAAG,KAAMF,EAAA2B,CAAA,CAAA,GACzB,UACT,IAAsC,CAAtC5B,EAAsCC,EAAA2C,EAAA,EAAA,CAArB,WAAU3C,EAAAgB,CAAA,GAAO,KAAA,EAAA,CAAA,UAAA,CAAA,CAAA,GAGzB,OACT,IAAmC,CAAnCjB,EAAmCC,EAAA4C,EAAA,EAAA,CAArB,WAAU5C,EAAAgB,CAAA,GAAO,KAAA,EAAA,CAAA,UAAA,CAAA,CAAA,GAGtB,YACT,IAAwC,CAAxCjB,EAAwCC,EAAA6C,EAAA,EAAA,CAArB,WAAU7C,EAAAgB,CAAA,GAAO,KAAA,EAAA,CAAA,UAAA,CAAA,CAAA,GAG3B,cACT,IAA6C,CAA7CjB,EAA6CC,EAAA8C,EAAA,EAAA,CAA3B,cAAa9C,EAAAgB,CAAA,EAAQ,EAAA,4BAG9B,iBACT,IAAgD,CAAhDjB,EAAgDC,EAAA+C,EAAA,EAAA,CAA1B,OAAQ/C,EAAA8B,CAAA,GAAc,KAAA,EAAA,CAAA,QAAA,CAAA,CAAA,GAGnC,aACT,IAEkB,CAFlB/B,EAEkBC,EAAAgD,CAAA,EAAA,CAFA,eAAc7B,EAAA,OAAU,WACxC,IAAgF,CAAhFpB,EAAgFkD,EAAA,CAA9D,KAAK,OAAQ,KAAM9B,EAAA,MAAY,MAAM,sBAAA,gDAIhD,kBACT,IAEkB,CAFlBpB,EAEkBC,EAAAgD,CAAA,EAAA,CAFA,eAAczB,EAAA,OAAY,WAC1C,IAAqF,CAArFxB,EAAqFkD,EAAA,CAAnE,KAAK,OAAQ,KAAM1B,EAAA,MAAc,MAAM,yBAAA"}
@@ -1,2 +1,2 @@
1
- import{cb as g,d as C,S as h,v as S,u as b,al as k,cc as J,ae as F,g as N,h as x,c as D,a as I,m as t,o as B,i as u,k as m,cd as O,ce as T,cf as P,cg as U,bg as d,J as p,Y as V}from"./index-C9FkjDpZ.js";import{u as Y}from"./usePageTitle-B0Hz_El0.js";class z extends g{parse(a){return JSON.parse(decodeURIComponent(a??""))}format(a){return encodeURIComponent(JSON.stringify(a))}}const j=C({__name:"FlowRunCreate",setup(i){const a=h(),r=S("deploymentId"),l=b(),f=k("parameters",z,void 0),{deployment:o}=J(r),n=F(!1),y=async c=>{if(!n.value)try{n.value=!0;const s=await a.deployments.createDeploymentFlowRun(r.value,c),e=c.state?.stateDetails?.scheduledTime??void 0,w=!e,R=P(U,{flowRun:s,flowRunRoute:d.flowRun,router:l,immediate:w,startTime:e});p(R,"success"),l.push(d.deployment(r.value))}catch(s){const e=V(s,"Something went wrong trying to create a flow run");p(e,"error"),console.error(s)}finally{n.value=!1}},_=()=>{l.back()},v=N(()=>o.value?`Create Flow Run for Deployment: ${o.value.name}`:"Create Flow Run for Deployment");return Y(v),(c,s)=>{const e=x("p-layout-default");return t(o)?(B(),D(e,{key:0},{header:u(()=>[m(t(T),{deployment:t(o)},null,8,["deployment"])]),default:u(()=>[m(t(O),{deployment:t(o),parameters:t(f),disabled:n.value,onSubmit:y,onCancel:_},null,8,["deployment","parameters","disabled"])]),_:1})):I("",!0)}}});export{j as default};
2
- //# sourceMappingURL=FlowRunCreate-BwLIWkPS.js.map
1
+ import{cb as g,d as C,S as h,v as S,u as b,al as k,cc as J,ae as F,g as N,h as x,c as D,a as I,m as t,o as B,i as u,k as m,cd as O,ce as T,cf as P,cg as U,bg as d,J as p,Y as V}from"./index-DS86r6aC.js";import{u as Y}from"./usePageTitle-BXVkHaWQ.js";class z extends g{parse(a){return JSON.parse(decodeURIComponent(a??""))}format(a){return encodeURIComponent(JSON.stringify(a))}}const j=C({__name:"FlowRunCreate",setup(i){const a=h(),r=S("deploymentId"),l=b(),f=k("parameters",z,void 0),{deployment:o}=J(r),n=F(!1),y=async c=>{if(!n.value)try{n.value=!0;const s=await a.deployments.createDeploymentFlowRun(r.value,c),e=c.state?.stateDetails?.scheduledTime??void 0,w=!e,R=P(U,{flowRun:s,flowRunRoute:d.flowRun,router:l,immediate:w,startTime:e});p(R,"success"),l.push(d.deployment(r.value))}catch(s){const e=V(s,"Something went wrong trying to create a flow run");p(e,"error"),console.error(s)}finally{n.value=!1}},_=()=>{l.back()},v=N(()=>o.value?`Create Flow Run for Deployment: ${o.value.name}`:"Create Flow Run for Deployment");return Y(v),(c,s)=>{const e=x("p-layout-default");return t(o)?(B(),D(e,{key:0},{header:u(()=>[m(t(T),{deployment:t(o)},null,8,["deployment"])]),default:u(()=>[m(t(O),{deployment:t(o),parameters:t(f),disabled:n.value,onSubmit:y,onCancel:_},null,8,["deployment","parameters","disabled"])]),_:1})):I("",!0)}}});export{j as default};
2
+ //# sourceMappingURL=FlowRunCreate-UNkalFWW.js.map