import{d as y,bS as B,aX as W,f as l,aV as h,aW as C,e as F,o as r,x as D,p as T,j as a,k as e,bT as N,a$ as U,aB as $,aF as O,W as P,an as X,t as j,bw as A,bU as E,c,g as n,h as b,u as G,bV as K,a as w,bW as M,bX as Q,bG as q,a5 as z,bo as H}from"./index-BqDjVCF_.js";import{a as J,s as L}from"./index-Vv9yEoRy.js";import{u as Y}from"./usePageTitle-CZh_IXm2.js";const Z={class:"flow-stats"},ee={class:"flow-stats__cards"},se=y({__name:"FlowStats",props:{flowId:{}},setup(m){const d=m,{flowId:u}=B(d),t=W({range:{type:"span",seconds:-J},tags:[]}),f=l(()=>({flowId:u.value,range:t.range}));h(C,{interval:L(30)});const o=l(()=>F.map("FlowStatsFilter",f.value,"FlowRunsFilter")),p=l(()=>F.map("FlowStatsFilter",f.value,"TaskRunsFilter"));return(_,i)=>(r(),D("div",Z,[T("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":i[0]||(i[0]=s=>e(t).range=s),small:""},null,8,["modelValue"])]))}}),ne=y({__name:"Flow",setup(m){const d=O(),u=P("flowId"),t=l(()=>[u.value]),f=G(),o=X("tab","Runs"),p=["Runs","Deployments","Details"],_={interval:3e5},i=j(d.flows.getFlow,[u.value],_),s=l(()=>i.response),{filter:k}=A({flows:{id:t}}),{filter:R}=E({flows:{id:t}});function g(){f.push(H.flows())}const V=l(()=>s.value?`Flow: ${s.value.name}`:"Flow");return Y(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(K),{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=>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(R),prefix:"deployments"},null,8,["filter"])]),runs:n(()=>[a(e(q),{filter:e(k),selectable:"",prefix:"runs"},null,8,["filter"])]),_:1},8,["selected"])]),_:1})}}});export{ne as default};
//# sourceMappingURL=Flow-BktTl6g4.js.map
