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