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