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