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