import{d as y,bt as V,aA as D,b as l,ay as S,az as B,l as F,o as r,p as T,k as N,g as a,h as e,bu as W,aF as A,aC as O,al as P,W as U,am as $,t as z,b6 as E,bv as H,c as f,e as n,f as b,u as L,bw as M,a as w,bx as Q,by as X,bh as j,a5 as q,aX as G}from"./index-BjFilUfY.js";import{a as J,s as K}from"./index-Vv9yEoRy.js";import{u as Y}from"./usePageTitle-J4-vayug.js";const Z={class:"flow-stats"},ee={class:"flow-stats__cards"},se=y({__name:"FlowStats",props:{flowId:{}},setup(m){const d=m,{flowId:u}=V(d),t=D({range:{type:"span",seconds:-J},tags:[]}),i=l(()=>({flowId:u.value,range:t.range}));S(B,{interval:K(30)});const o=l(()=>F.map("FlowStatsFilter",i.value,"FlowRunsFilter")),p=l(()=>F.map("FlowStatsFilter",i.value,"TaskRunsFilter"));return(_,c)=>(r(),T("div",Z,[N("div",ee,[a(e(W),{filter:o.value},null,8,["filter"]),a(e(A),{filter:p.value},null,8,["filter"])]),a(e(O),{modelValue:e(t).range,"onUpdate:modelValue":c[0]||(c[0]=s=>e(t).range=s),small:""},null,8,["modelValue"])]))}}),ne=y({__name:"Flow",setup(m){const d=P(),u=U("flowId"),t=l(()=>[u.value]),i=L(),o=$("tab","Runs"),p=["Runs","Deployments","Details"],_={interval:3e5},c=z(d.flows.getFlow,[u.value],_),s=l(()=>c.response),{filter:R}=E({flows:{id:t}}),{filter:g}=H({flows:{id:t}});function k(){i.push(G.flows())}const x=l(()=>s.value?`Flow: ${s.value.name}`:"Flow");return Y(x),(te,v)=>{const h=b("p-tabs"),I=b("p-layout-default");return r(),f(I,{class:"flow"},{header:n(()=>[s.value?(r(),f(e(M),{key:0,flow:s.value,onDelete:k},null,8,["flow"])):w("",!0)]),default:n(()=>[s.value?(r(),f(se,{key:0,"flow-id":s.value.id},null,8,["flow-id"])):w("",!0),a(h,{selected:e(o),"onUpdate:selected":v[0]||(v[0]=C=>q(o)?o.value=C:null),tabs:p},{details:n(()=>[s.value?(r(),f(e(Q),{key:0,flow:s.value},null,8,["flow"])):w("",!0)]),deployments:n(()=>[a(e(X),{filter:e(g),prefix:"deployments"},null,8,["filter"])]),runs:n(()=>[a(e(j),{filter:e(R),selectable:"",prefix:"runs"},null,8,["filter"])]),_:1},8,["selected"])]),_:1})}}});export{ne as default};
//# sourceMappingURL=Flow-BvKNddLa.js.map
