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