import{d as R,aN as x,I as B,e as l,G as D,H as N,m as F,o as r,l as T,L as C,n as a,j as e,aO as L,R as O,O as Q,b as P,W as U,Q as W,t as $,ap as j,aP as z,c as f,g as n,h as y,a1 as A,aQ as E,a as w,aR as G,aS as H,aB as M,y as q,ae as J}from"./index-CPxpbp4R.js";import{a as K,s as X}from"./index-Vv9yEoRy.js";import{u as Y}from"./usePageTitle-CcH2lmI6.js";const Z={class:"flow-stats"},ee={class:"flow-stats__cards"},se=R({__name:"FlowStats",props:{flowId:{}},setup(m){const d=m,{flowId:u}=x(d),t=B({range:{type:"span",seconds:-K},tags:[]}),i=l(()=>({flowId:u.value,range:t.range}));D(N,{interval:X(30)});const o=l(()=>F.map("FlowStatsFilter",i.value,"FlowRunsFilter")),p=l(()=>F.map("FlowStatsFilter",i.value,"TaskRunsFilter"));return(_,c)=>(r(),T("div",Z,[C("div",ee,[a(e(L),{filter:o.value},null,8,["filter"]),a(e(O),{filter:p.value},null,8,["filter"])]),a(e(Q),{modelValue:e(t).range,"onUpdate:modelValue":c[0]||(c[0]=s=>e(t).range=s),small:""},null,8,["modelValue"])]))}}),ne=R({__name:"Flow",setup(m){const d=P(),u=U("flowId"),t=l(()=>[u.value]),i=A(),o=W("tab","Runs"),p=["Runs","Deployments","Details"],_={interval:3e5},c=$(d.flows.getFlow,[u.value],_),s=l(()=>c.response),{filter:g}=j({flows:{id:t}}),{filter:b}=z({flows:{id:t}});function k(){i.push(J.flows())}const I=l(()=>s.value?`Flow: ${s.value.name}`:"Flow");return Y(I),(te,v)=>{const S=y("p-tabs"),V=y("p-layout-default");return r(),f(V,{class:"flow"},{header:n(()=>[s.value?(r(),f(e(E),{key:0,flow:s.value,onDelete:k},null,8,["flow"])):w("",!0)]),default:n(()=>[s.value?(r(),f(se,{key:0,"flow-id":s.value.id},null,8,["flow-id"])):w("",!0),a(S,{selected:e(o),"onUpdate:selected":v[0]||(v[0]=h=>q(o)?o.value=h:null),tabs:p},{details:n(()=>[s.value?(r(),f(e(G),{key:0,flow:s.value},null,8,["flow"])):w("",!0)]),deployments:n(()=>[a(e(H),{filter:e(b),prefix:"deployments"},null,8,["filter"])]),runs:n(()=>[a(e(M),{filter:e(g),selectable:"",prefix:"runs"},null,8,["filter"])]),_:1},8,["selected"])]),_:1})}}});export{ne as default};
//# sourceMappingURL=Flow-CO78Lu03.js.map
