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