import{d as y,bU as C,e as t,aV as S,aW as V,i as b,o as a,p as W,m as N,j as n,k as e,bV as D,a$ as T,v as Z,W as $,ao as U,b as j,by as z,bW as E,c,g as o,h as F,u as H,bX as M,a as p,bY as O,bZ as P,bH as X,a6 as Y,bo as q}from"./index-Bp1Bhxow.js";import{s as A,b as G}from"./index-0yGGjo7r.js";import{u as J}from"./usePageTitle-CccNdtFw.js";const K={class:"flow-stats"},L={class:"flow-stats__cards"},Q=y({__name:"FlowStats",props:{flowId:{}},setup(w){const f=w,r={range:{type:"span",seconds:-G},tags:[]},{flowId:u}=C(f),i=t(()=>({flowId:u.value,range:r.range}));S(V,{interval:A(30)});const l=t(()=>b.map("FlowStatsFilter",i.value,"FlowRunsFilter")),d=t(()=>b.map("FlowStatsFilter",i.value,"TaskRunsFilter"));return(_,m)=>(a(),W("div",K,[N("div",L,[n(e(D),{filter:l.value},null,8,["filter"]),n(e(T),{filter:d.value},null,8,["filter"])])]))}}),oe=y({__name:"Flow",setup(w){const f=Z(),r=$("flowId"),u=t(()=>[r.value]),i=H(),l=U("tab","Runs"),d=["Runs","Deployments","Details"],_={interval:3e5},m=j(f.flows.getFlow,[r.value],_),s=t(()=>m.response),{filter:k}=z({flows:{id:u}}),{filter:R}=E({flows:{id:u}});function I(){i.push(q.flows())}const g=t(()=>s.value?`Flow: ${s.value.name}`:"Flow");return J(g),(ee,v)=>{const x=F("p-tabs"),h=F("p-layout-default");return a(),c(h,{class:"flow"},{header:o(()=>[s.value?(a(),c(e(M),{key:0,flow:s.value,onDelete:I},null,8,["flow"])):p("",!0)]),default:o(()=>[s.value?(a(),c(Q,{key:0,"flow-id":s.value.id},null,8,["flow-id"])):p("",!0),n(x,{selected:e(l),"onUpdate:selected":v[0]||(v[0]=B=>Y(l)?l.value=B:null),tabs:d},{details:o(()=>[s.value?(a(),c(e(O),{key:0,flow:s.value},null,8,["flow"])):p("",!0)]),deployments:o(()=>[n(e(P),{filter:e(R),prefix:"deployments"},null,8,["filter"])]),runs:o(()=>[n(e(X),{filter:e(k),selectable:"",prefix:"runs"},null,8,["filter"])]),_:1},8,["selected"])]),_:1})}}});export{oe as default};
//# sourceMappingURL=Flow-BvZQctIj.js.map
