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