import{d as v,aV as y,aW as V,e as C,t as F,i,aX as x,c as _,j as l,k as d,o as n,l as a,D,q as r,n as e,aY as R,aC as S,K as B,y as m,aZ as N,a_ as U,a$ as A,b0 as T,F as W,a as j,A as K,b1 as M,u as P}from"./index-BvWlZEEM.js";import{s as q,a as E}from"./index-Vv9yEoRy.js";const H={class:"workspace-dashboard__header-actions"},I={class:"workspace-dashboard__subflows-toggle"},O={key:1,class:"workspace-dashboard__grid"},X={class:"workspace-dashboard__side"},G=v({__name:"Dashboard",setup(Y){y(V,{interval:q(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=()=>P.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(B),{crumbs:b,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(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"}:void 0]),1024)]),default:l(()=>[u.value?(n(),m(W,{key:0},[p.value?(n(),_(e(N),{key:0})):(n(),m("div",O,[a(e(U),{filter:e(s)},null,8,["filter"]),r("div",X,[a(e(A),{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:"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(()=>[K(" Upgrade to Cloud ")]),_:1})]),_:1})]),_:1})}}});export{G as default};
//# sourceMappingURL=Dashboard-FB3tzcRp.js.map
