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