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