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