import{_ as w}from"./BLJwFLQ5.js";import{f as i}from"./5LXQy1qV.js";import{v as b,A as v,E as g,_ as f,o as d,p as _,q as k,y as P,w as x,a as m,c as h,t as N,b as H}from"./CibDhUcP.js";import{u as y}from"./fWHo1AcK.js";import{_ as T}from"./BECNrDz6.js";import{_ as B}from"./xhP_boNp.js";import{u as C}from"./CJnKyk0K.js";import"./CTMooejj.js";import"./Cw-gY-k8.js";import"./BCJxuefG.js";import"./CW5dyef9.js";import"./nOI-3DST.js";import"./BpJC44XK.js";import"./CBXHUQO1.js";const K=b({__name:"TableProcesses",props:{data:{type:Object,default:()=>({})}},setup(c,{expose:l}){l();const o=c,{t:r}=v(),n=[{id:"id",isHidden:!0},{id:"ppid",label:r("ParentProcessId")},{id:"pid",sortKey:"pid",label:r("PID")},{id:"user",sortKey:"user",label:r("User")},{id:"program",sortKey:"program",label:r("Program")},{id:"cpu",sortKey:"cpu",label:r("CPU")},{id:"memory",sortKey:"memory",label:r("Memory")},{id:"br",label:r("BytesRead"),sortKey:"br"},{id:"bw",label:r("BytesWrite"),sortKey:"bw"}],p=g(()=>o.data?o.data.map((e,u)=>({url:{value:e.detailUrl,isHidden:!0},id:{value:e.pid,isHidden:!0},ppid:{value:e.parentProcessId,label:e.parentProcessId,columnName:"parentProcessId"},pid:{value:e.pid,label:e.pid,columnName:"pid"},user:{value:e.user,label:e.user,columnName:"user"},program:{value:e.program,label:e.program,columnName:"program"},cpu:{value:e.cpu,showValue:`${e.cpu}`},memory:e.memory,br:{value:Number(e.bytesRead)||0,showValue:i(+e.bytesRead)},bw:{value:Number(e.bytesWrite)||0,showValue:i(+e.bytesWrite)}})):[]),{tracker:s}=y(),t={props:o,t:r,cols:n,rows:p,tracker:s,clickHandler:e=>{const u=e.url.value;u&&(s("process_detail","click_on",u),window.open(u,"_blank"))}};return Object.defineProperty(t,"__isScriptSetup",{enumerable:!1,value:!0}),t}});function S(c,l,o,r,n,p){var a;const s=w;return(a=r.rows)!=null&&a.length?(d(),_(s,{key:0,cols:r.cols,rows:r.rows,name:"processes","disable-footer":["count","pagination"],"clickable-rows":!0,onClickRow:r.clickHandler},null,8,["rows"])):k("",!0)}const I=Object.assign(f(K,[["render",S],["__file","TableProcesses.vue"]]),{__name:"TableProcesses"}),U=b({__name:"process",async setup(c,{expose:l}){l();let o,r;const{getProcessesData:n}=C(),{data:p,error:s,status:a}=([o,r]=P(()=>n()),o=await o,r(),o),{tracker:t}=y();t("page_view","page","process");const e={getProcessesData:n,data:p,error:s,status:a,tracker:t};return Object.defineProperty(e,"__isScriptSetup",{enumerable:!1,value:!0}),e}}),V={key:0,class:"card bg-white"},$={class:"p-4 border-b border-neutral-200 font-medium"};function j(c,l,o,r,n,p){const s=I,a=T,t=B;return d(),_(t,{"modal-style":!0},{default:x(()=>[m("div",null,[r.status!=="pending"?(d(),h("div",V,[m("div",$,N(c.$t("Top10Processes")),1),H(s,{data:r.data.data,class:"m-px"},null,8,["data"])])):(d(),_(a,{key:1,error:r.error},null,8,["error"]))])]),_:1})}const X=f(U,[["render",j],["__file","process.vue"]]);export{X as default};
