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