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