import{d as y,bU as S,h as t,aV as V,aW as W,b,o as a,x as C,n as D,k as n,l as e,bV as $,a$ as N,e as T,W as E,ao as J,f as O,by as P,bW as U,c as i,i as o,j as F,u as Z,bX as j,a as p,bY as H,bZ as M,bH as X,a6 as Y,bo as q}from"./index-CibiDZQv.js";import{s as z,b as A}from"./index-0yGGjo7r.js";import{u as G}from"./usePageTitle-DYAZWMh1.js";const K={class:"flow-stats"},L={class:"flow-stats__cards"},Q=y({__name:"FlowStats",props:{flowId:{}},setup(w){const f=w,r={range:{type:"span",seconds:-A},tags:[]},{flowId:u}=S(f),c=t(()=>({flowId:u.value,range:r.range}));V(W,{interval:z(30)});const l=t(()=>b.map("FlowStatsFilter",c.value,"FlowRunsFilter")),d=t(()=>b.map("FlowStatsFilter",c.value,"TaskRunsFilter"));return(_,m)=>(a(),C("div",K,[D("div",L,[n(e($),{filter:l.value},null,8,["filter"]),n(e(N),{filter:d.value},null,8,["filter"])])]))}}),oe=y({__name:"Flow",setup(w){const f=T(),r=E("flowId"),u=t(()=>[r.value]),c=Z(),l=J("tab","Runs"),d=["Runs","Deployments","Details"],_={interval:3e5},m=O(f.flows.getFlow,[r.value],_),s=t(()=>m.response),{filter:k}=P({flows:{id:u}}),{filter:R}=U({flows:{id:u}});function x(){c.push(q.flows())}const I=t(()=>s.value?`Flow: ${s.value.name}`:"Flow");return G(I),(ee,v)=>{const h=F("p-tabs"),g=F("p-layout-default");return a(),i(g,{class:"flow"},{header:o(()=>[s.value?(a(),i(e(j),{key:0,flow:s.value,onDelete:x},null,8,["flow"])):p("",!0)]),default:o(()=>[s.value?(a(),i(Q,{key:0,"flow-id":s.value.id},null,8,["flow-id"])):p("",!0),n(h,{selected:e(l),"onUpdate:selected":v[0]||(v[0]=B=>Y(l)?l.value=B:null),tabs:d},{details:o(()=>[s.value?(a(),i(e(H),{key:0,flow:s.value},null,8,["flow"])):p("",!0)]),deployments:o(()=>[n(e(M),{filter:e(R),prefix:"deployments"},null,8,["filter"])]),runs:o(()=>[n(e(X),{filter:e(k),selectable:"",prefix:"runs"},null,8,["filter"])]),_:1},8,["selected"])]),_:1})}}});export{oe as default};
//# sourceMappingURL=Flow-C5k4IGHy.js.map
