import{d as y,bP as D,aW as h,e as l,aU as B,aV as C,b,o as r,q as T,m as U,h as a,i as e,bQ as W,a_ as N,aA as $,aE as E,W as M,am as O,t as P,bt as Q,bR as q,c,f as n,g as F,u as A,bS as X,a as w,bT as j,bU as z,bD as G,a5 as H,bl as J}from"./index-BOEdKJ1D.js";import{a as K,s as L}from"./index-Vv9yEoRy.js";import{u as Y}from"./usePageTitle-BkurcLK2.js";const Z={class:"flow-stats"},ee={class:"flow-stats__cards"},se=y({__name:"FlowStats",props:{flowId:{}},setup(m){const d=m,{flowId:u}=D(d),t=h({range:{type:"span",seconds:-K},tags:[]}),f=l(()=>({flowId:u.value,range:t.range}));B(C,{interval:L(30)});const o=l(()=>b.map("FlowStatsFilter",f.value,"FlowRunsFilter")),p=l(()=>b.map("FlowStatsFilter",f.value,"TaskRunsFilter"));return(_,i)=>(r(),T("div",Z,[U("div",ee,[a(e(W),{filter:o.value},null,8,["filter"]),a(e(N),{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=E(),u=M("flowId"),t=l(()=>[u.value]),f=A(),o=O("tab","Runs"),p=["Runs","Deployments","Details"],_={interval:3e5},i=P(d.flows.getFlow,[u.value],_),s=l(()=>i.response),{filter:R}=Q({flows:{id:t}}),{filter:g}=q({flows:{id:t}});function k(){f.push(J.flows())}const x=l(()=>s.value?`Flow: ${s.value.name}`:"Flow");return Y(x),(te,v)=>{const I=F("p-tabs"),S=F("p-layout-default");return r(),c(S,{class:"flow"},{header:n(()=>[s.value?(r(),c(e(X),{key:0,flow:s.value,onDelete:k},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(I,{selected:e(o),"onUpdate:selected":v[0]||(v[0]=V=>H(o)?o.value=V:null),tabs:p},{details:n(()=>[s.value?(r(),c(e(j),{key:0,flow:s.value},null,8,["flow"])):w("",!0)]),deployments:n(()=>[a(e(z),{filter:e(g),prefix:"deployments"},null,8,["filter"])]),runs:n(()=>[a(e(G),{filter:e(R),selectable:"",prefix:"runs"},null,8,["filter"])]),_:1},8,["selected"])]),_:1})}}});export{ne as default};
//# sourceMappingURL=Flow-DK70_5CM.js.map
