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