import{_ as w}from"./Cc3064wI.js";import{f as i}from"./4Fu3KWqy.js";import{v as b,A as v,B as g,_ as f,o as u,p as _,q as k,y as P,w as x,a as m,c as h,t as N,b as B}from"./CChoqk00.js";import{u as y}from"./DTzhji9-.js";import{_ as H}from"./BR_ubjDa.js";import{_ as T}from"./ncYpbZOT.js";import{u as C}from"./B1YZX18f.js";import"./DgZ9OEJo.js";import"./MHEJVwNG.js";import"./BBOawLyY.js";import"./Du23p2ZK.js";import"./oBAm95WQ.js";import"./dbr-bJEC.js";import"./D7TmchvX.js";const K=b({__name:"TableProcesses",props:{data:{type:Object,default:()=>({})}},setup(l,{expose:p}){p();const o=l,{t:r}=v(),c=[{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"}],d=g(()=>o.data?o.data.map((e,n)=>({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:c,rows:d,tracker:s,clickHandler:e=>{const n=e.url.value;n&&(s("process_detail","click_on",n),window.open(n,"_blank"))}};return Object.defineProperty(t,"__isScriptSetup",{enumerable:!1,value:!0}),t}});function S(l,p,o,r,c,d){var a;const s=w;return(a=r.rows)!=null&&a.length?(u(),_(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(l,{expose:p}){p();let o,r;const{getProcessesData:c}=C(),{data:d,error:s,status:a}=([o,r]=P(()=>c()),o=await o,r(),o),{tracker:t}=y();t("page_view","page","process");const e={getProcessesData:c,data:d,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(l,p,o,r,c,d){const s=I,a=H,t=T;return u(),_(t,{"modal-style":!0},{default:x(()=>{var e,n;return[m("div",null,[r.status!=="pending"&&((e=r.data)!=null&&e.data)?(u(),h("div",V,[m("div",$,N(l.$t("Top10Processes")),1),B(s,{data:(n=r.data)==null?void 0:n.data,class:"m-px"},null,8,["data"])])):(u(),_(a,{key:1,error:r.error},null,8,["error"]))])]}),_:1})}const X=f(U,[["render",j],["__file","process.vue"]]);export{X as default};
