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