import{_ as a}from"./index105.js?v=1761009159";import{V as e,P as s,O as l,l as t,b as o}from"./utils-lib.js?v=1761009159";import{_ as r}from"./index126.js?v=1761009159";import{c as i,r as n,o as d,q as c,H as m,v as u,x as p,e as h,B as f,y as _,Q as j,C as v,I as g,V as b,aj as w,ah as V}from"./base-lib.js?v=1761009159";import{processForCreate as x,processInfoForCreate as y}from"./site.js?v=1761009159";import{u as k}from"./column.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index106.js?v=1761009159";const q={class:"p-[16px]"},C=i({__name:"take-over-started-project",props:{compData:{default:()=>{}}},emits:["close"],setup(i,{emit:C}){const D=i,P=C,T=o(),H=n("java"),I=d({list:[],search:"",loading:!1}),O=(a="")=>{I.search=a,U()},U=async()=>{I.loading=!0;const a=await s({request:x({is_java_process:"java"===H.value?1:0,search:I.search}),data:Array});I.loading=!1,I.list=a},z=b([{label:"PID",prop:"pid",width:100},{label:"启动指令",prop:"cmdline",showOverflowTooltip:!0,render:a=>{var e,s;return h("div",{class:"truncate"},[(null==(e=a.cmdline)?void 0:e.length)?null==(s=a.cmdline)?void 0:s.join(" "):"--"])}},{label:"运行用户",prop:"username",width:100},{label:"启动时间",render:a=>e(1e3*a.create_time),width:150},k([{onClick:async a=>{const e=await s({loading:"获取进程信息中...",request:y({pid:a.pid})});e.status?(T.success("获取进程信息成功"),D.compData.setProject(e.data),P("close")):T.error(e.msg)},width:100,title:"解析该进程"}])]);return c(()=>{U()}),(e,s)=>{const o=w,i=V,n=l,d=r,c=t,b=a,x=m("bt-loading");return u(),p("div",q,[h(b,null,{"header-left":f(()=>[h(i,{modelValue:_(H),"onUpdate:modelValue":s[0]||(s[0]=a=>j(H)?H.value=a:null),size:"default",onChange:U},{default:f(()=>[h(o,{value:"java"},{default:f(()=>s[2]||(s[2]=[v("Java进程",-1)])),_:1,__:[2]}),h(o,{value:"more"},{default:f(()=>s[3]||(s[3]=[v("更多进程信息",-1)])),_:1,__:[3]})]),_:1},8,["modelValue"])]),"header-right":f(()=>[h(n,{modelValue:_(I).search,"onUpdate:modelValue":s[1]||(s[1]=a=>_(I).search=a),placeholder:"输入关键字搜索",onSearch:O},null,8,["modelValue"]),h(d,{class:"ml-1rem",onRefresh:U})]),content:f(()=>[g(h(c,{ref:"Table",key:"netTable",column:_(z),"max-height":450,data:_(I).list,description:"进程列表为空"},null,8,["column","data"]),[[x,_(I).loading],[x,"正在加载进程列表，请稍后...","title"]])]),"footer-left":f(()=>s[4]||(s[4]=[])),"footer-right":f(()=>s[5]||(s[5]=[])),popup:f(()=>s[6]||(s[6]=[])),_:1})])}}});export{C as default};
