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