import{_ as k}from"./Zi85nIMD.js";import{d as T,r as v,c as D,b as c,e as _,w as l,j as t,f as e,H as I,J as N,K as B,E as s,Q as V,l as x,U as P,R as H,A as S,s as b,F as j,y as w,D as n,_ as z}from"./DGA3dmy8.js";import{S as A}from"./Ctc_nflK.js";import{T as L,a as R,b as y,c as u,d as U,e as r}from"./Fi_gCvF0.js";import{I as $}from"./CCeWr_SP.js";import{u as E}from"./DA91-Zfy.js";const F={class:"z-20 flex gap-2 px-3"},h={class:"line-clamp-3 max-w-48 overflow-scroll break-words"},q={key:1,class:"py-8 text-center text-sm text-muted-foreground"},X=T({__name:"index",setup(G){const d=v(""),{data:g,refresh:C}=E("get-port",()=>$fetch("/api/process/get-port",{query:{port:d.value}}),{watch:[d]}),p=D(()=>{var f,a;return(a=(f=g.value)==null?void 0:f.sort)==null?void 0:a.call(f,(i,m)=>i.pid-m.pid)});return(f,a)=>{const i=k,m=z;return _(),c(m,{name:"default",path:["Processes"]},{default:l(()=>[t(e(I),{class:"flex h-full shrink-0 flex-col"},{default:l(()=>[t(e(N),null,{default:l(()=>[t(e(B),null,{default:l(()=>a[2]||(a[2]=[s("Port")])),_:1,__:[2]})]),_:1}),t(e(V),{class:"flex h-full min-h-0 flex-col px-0 pb-0"},{default:l(()=>[x("div",F,[t(e(P),{modelValue:e(d),"onUpdate:modelValue":a[0]||(a[0]=o=>H(d)?d.value=o:null),placeholder:"12345"},null,8,["modelValue"]),t(e(S),{onClick:a[1]||(a[1]=o=>e(C)()),size:"icon"},{default:l(()=>[t(e($),{icon:"lucide:refresh-cw"})]),_:1})]),t(e(A),{class:"justify-content-flex-start flex h-full flex-col justify-center"},{default:l(()=>[a[9]||(a[9]=x("div",{class:"absolute z-10 h-4 w-full bg-gradient-to-t from-card/0 to-card/100"},null,-1)),e(p)&&e(p).length>0?(_(),c(e(L),{key:0},{default:l(()=>[t(e(R),null,{default:l(()=>[t(e(y),null,{default:l(()=>[t(e(u),{class:"pl-3"},{default:l(()=>a[3]||(a[3]=[s("Process ID")])),_:1,__:[3]}),t(e(u),null,{default:l(()=>a[4]||(a[4]=[s("Name")])),_:1,__:[4]}),t(e(u),null,{default:l(()=>a[5]||(a[5]=[s("Command")])),_:1,__:[5]}),t(e(u),null,{default:l(()=>a[6]||(a[6]=[s("GID")])),_:1,__:[6]}),t(e(u),null,{default:l(()=>a[7]||(a[7]=[s("Parent Process ID")])),_:1,__:[7]}),t(e(u),{class:"pr-3"},{default:l(()=>a[8]||(a[8]=[s("User ID")])),_:1,__:[8]})]),_:1})]),_:1}),t(e(U),null,{default:l(()=>[(_(!0),b(j,null,w(e(p),o=>(_(),c(e(y),{asChild:""},{default:l(()=>[t(i,{href:`/processes/${o.pid}`},{default:l(()=>[t(e(r),{class:"pl-3"},{default:l(()=>[s(n(o.pid),1)]),_:2},1024),t(e(r),null,{default:l(()=>[s(n(o.name),1)]),_:2},1024),t(e(r),null,{default:l(()=>[x("span",h,n(o.cmd),1)]),_:2},1024),t(e(r),null,{default:l(()=>[s(n(o.gid),1)]),_:2},1024),t(e(r),null,{default:l(()=>[s(n(o.ppid),1)]),_:2},1024),t(e(r),{class:"pr-3"},{default:l(()=>[s(n(o.uid),1)]),_:2},1024)]),_:2},1032,["href"])]),_:2},1024))),256))]),_:1})]),_:1})):(_(),b("p",q,"No logs yet."))]),_:1,__:[9]})]),_:1})]),_:1})]),_:1})}}});export{X as default};
//# sourceMappingURL=BhjcVB3b.js.map
