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