import{d as v,aV as y,aW as V,aF as C,t as F,f as i,aX as x,c as _,g as l,h as d,o as n,j as a,C as R,p as r,k as e,aY as U,aB as A,U as B,x as m,aZ as S,a_ as D,a$ as N,b0 as T,F as W,a as j,A as I,b1 as K,e as M}from"./index-BqDjVCF_.js";import{s as Z,a as E}from"./index-Vv9yEoRy.js";const H={class:"workspace-dashboard__header-actions"},O={class:"workspace-dashboard__subflows-toggle"},P={key:1,class:"workspace-dashboard__grid"},X={class:"workspace-dashboard__side"},G=v({__name:"Dashboard",setup(Y){y(V,{interval:Z(30)});const f=C(),c=F(f.flowRuns.getFlowRunsCount,[{}]),u=i(()=>c.executed),p=i(()=>c.response===0),b=[{text:"Dashboard"}],s=x({range:{type:"span",seconds:-E},tags:[]}),g=()=>M.map("WorkspaceDashboardFilter",s,"TaskRunsFilter");return($,o)=>{const k=d("p-toggle"),h=d("p-button"),w=d("p-layout-default");return n(),_(w,{class:"workspace-dashboard"},{header:l(()=>[a(e(B),{crumbs:b,class:"workspace-dashboard__page-heading"},R({_:2},[u.value&&!p.value?{name:"actions",fn:l(()=>[r("div",H,[r("div",O,[a(k,{modelValue:e(s).hideSubflows,"onUpdate:modelValue":o[0]||(o[0]=t=>e(s).hideSubflows=t),append:"Hide subflows"},null,8,["modelValue"])]),a(e(U),{selected:e(s).tags,"onUpdate:selected":o[1]||(o[1]=t=>e(s).tags=t),"empty-message":"All tags"},null,8,["selected"]),a(e(A),{modelValue:e(s).range,"onUpdate:modelValue":o[2]||(o[2]=t=>e(s).range=t),class:"workspace-dashboard__date-select"},null,8,["modelValue"])])]),key:"0"}:void 0]),1024)]),default:l(()=>[u.value?(n(),m(W,{key:0},[p.value?(n(),_(e(S),{key:0})):(n(),m("div",P,[a(e(D),{filter:e(s)},null,8,["filter"]),r("div",X,[a(e(N),{filter:g}),a(e(T),{class:"workspace-dashboard__work-pools",filter:e(s)},null,8,["filter"])])]))],64)):j("",!0),a(e(K),{title:"Ready to scale?",subtitle:"Automations, role and object-level security, and serverless push work pools on Prefect Cloud"},{actions:l(()=>[a(h,{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:""},{default:l(()=>[I(" Upgrade to Cloud ")]),_:1})]),_:1})]),_:1})}}});export{G as default};
//# sourceMappingURL=Dashboard-CBZmG6L5.js.map
