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