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