import{_ as a}from"./index105.js?v=1761009159";import{u as e,P as l,p as s,l as t,k as r,$ as o,j as n}from"./utils-lib.js?v=1761009159";import{c as i,r as d,o as m,e as u,q as c,H as p,v as f,x as _,B as b,C as g,I as w,y as h,Q as j,G as y,ab as v,a9 as x}from"./base-lib.js?v=1761009159";import{aE as V,aF as q,aG as k}from"./firewall.js?v=1761009159";import{u as C}from"./column.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index106.js?v=1761009159";const F=i({__name:"index",setup(i){e();const F=d(!1),G=d([]),H=d(!1),P=m({cmd:""}),U=d(),A={cmd:[{trigger:["blur","change"],required:!0,message:"请输入进程名称"}]},B=async()=>{await l({loading:F,request:V(),data:[Array,G]})},E=async()=>{await U.value.validate(),await l({loading:"正在添加进程白名单，请稍后...",request:k(P),message:!0}),B(),H.value=!1,P.cmd=""},I=[{label:"进程名",render:a=>u("span",null,[a])},C([{onClick:async a=>{await s({icon:"warning-filled",title:"删除进程白名单【"+a+"】",width:"34rem",content:"删除选中的进程后，该进程将不再进行收到保护，是否继续操作？"}),await l({loading:"正在删除进程白名单，请稍后...",request:q({cmd:a}),message:!0}),B()},title:"删除"}])];return c(()=>{B()}),(e,l)=>{const s=y,i=t,d=r,m=v,c=o,V=x,q=n,k=a,C=p("bt-loading");return f(),_("div",null,[u(k,null,{"header-left":b(()=>[u(s,{type:"primary",onClick:l[0]||(l[0]=a=>H.value=!0)},{default:b(()=>l[3]||(l[3]=[g(" 添加进程白名单 ",-1)])),_:1,__:[3]})]),content:b(()=>[w(u(i,{column:I,data:h(G),description:"进程白名单列表为空"},null,8,["data"]),[[C,h(F)],[C,"正在加载进程白名单列表，请稍后...","title"]])]),popup:b(()=>[u(q,{title:"添加进程",modelValue:h(H),"onUpdate:modelValue":l[2]||(l[2]=a=>j(H)?H.value=a:null),area:42,onConfirm:E,showFooter:""},{default:b(()=>[u(V,{ref_key:"addProcessWhiteRef",ref:U,rules:A,model:h(P),class:"p-[2rem]","label-width":"5rem"},{default:b(()=>[u(m,{label:"进程名称",prop:"cmd"},{default:b(()=>[u(d,{modelValue:h(P).cmd,"onUpdate:modelValue":l[1]||(l[1]=a=>h(P).cmd=a),width:"20rem",placeholder:"例:/bin/bash",clearable:""},null,8,["modelValue"])]),_:1}),u(c,{options:[{class:"text-danger",content:"命令需要填写全路径例如：/usr/bin/curl"}],class:"pl-[3.6rem] pt-[.4rem]"})]),_:1},8,["model"])]),_:1},8,["modelValue"])]),_:1})])}}});export{F as default};
