File: /www/server/panel/BTPanel/static/js/index200.js
import{_ as y}from"./index118.js?v=1777008528";import{_ as P}from"./index217.js?v=1777008528";import{M as k,a2 as I,o as h,R as S,e as b,_ as w,w as C,k as D,d3 as A}from"./utils-lib.js?v=1777008528";import{r as d,H as B,V as L,e as c,c as O,o as T,I as R,j as x,k as $,v as p,J as E,p as i}from"./base-lib.js?v=1777008528";import{g as U}from"./index3.js?v=1777008528";import{u as N}from"./useStore2.js?v=1777008528";import{getPhpSiteSafeLog as H,addPhpSiteIpWhite as V,addPhpSiteSafeWhite as J}from"./site.js?v=1777008528";const{siteInfo:M}=N();d();const _=d(),u=d(),a=B({list:[],p:1,limit:10,total:100,load:!1}),W=()=>L([{label:"时间",prop:"addtime",render:e=>c("div",{class:"flex !items-center inline-block truncate"},[S(e.addtime)])},{label:"用户IP",prop:"address",render:e=>c("div",{class:"bt-link truncate",onClick:()=>{F(e)}},[e.address])},{label:"恶意类型",prop:"intercept"},{label:"url地址",prop:"url",width:270},U([{onClick:e=>{z(e)},title:"URL加白",width:80},{onClick:q,title:"详情"},{onClick:G,title:"HTTP"}])]),q=async e=>{u.value={data:e},b({title:"【".concat(e.address,"】详情"),area:60,isAsync:!0,component:()=>w(()=>import("./log-detail4.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),showFooter:!1})},F=async e=>{await C({title:"加入IP白名单",width:"35rem",icon:"warning-filled",content:"是否将【".concat(e.address,"】添加到IP白名单?")}),D({loading:"正在加入IP白名单,请稍后...",request:V({start_ip:e.address,end_ip:e.address}),message:!0})},z=async e=>{await C({title:"加入URL白名单",width:"35rem",icon:"warning-filled",content:"加入URL白名单后此URL将不再进行防御,是否继续操作?"}),D({loading:"正在加入URL白名单,请稍后...",request:J({url_rule:e.url}),message:!0})},G=async e=>{u.value={data:e},b({title:"【".concat(e.address,"】HTTP详情"),area:80,isAsync:!0,component:()=>w(()=>import("./http-detail.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),showFooter:!1})},K=async()=>{a.load=!1;try{a.load=!0;const e=await H({siteName:M.value.name,p:a.p,rows:a.limit});e.status||k.error(e.msg),a.list=I(e.data.data,"array",[]),a.total=h(e.data.page)}catch(e){}finally{a.load=!1}},Q=W(),X=e=>{var r;_.value=e,a.list=((r=_.value)==null?void 0:r.data)||[],a.total=h(_.value.page)},Y=d(""),Z=(e,r)=>{let t=null,l="",s=0,f=" ";return r=r||{},r.newlineAfterColonIfBeforeBraceOrBracket=r.newlineAfterColonIfBeforeBraceOrBracket===!0,r.spaceAfterColon=r.spaceAfterColon!==!1,typeof e!="string"||(e=JSON.parse(e)),e=JSON.stringify(e),t=/([\{\}])/g,e=e.replace(t,"\r\n$1\r\n"),t=/([\[\]])/g,e=e.replace(t,"\r\n$1\r\n"),t=/(\,)/g,e=e.replace(t,"$1\r\n"),t=/(\r\n\r\n)/g,e=e.replace(t,"\r\n"),t=/\r\n\,/g,e=e.replace(t,","),r.newlineAfterColonIfBeforeBraceOrBracket||(t=/\:\r\n\{/g,e=e.replace(t,":{"),t=/\:\r\n\[/g,e=e.replace(t,":[")),r.spaceAfterColon&&(t=/\:/g,e=e.replace(t,": ")),e.split("\r\n").forEach(function(o,m){var n=0,g=0,v="";for(o.match(/\{$/)||o.match(/\[$/)?g=1:o.match(/\}/)||o.match(/\]/)?s!==0&&(s-=1):g=0,n=0;n<s;n++)v+=f;l+=v+o+"\r\n",s+=g}),l},ce=()=>{Y.value=Z(u.value.data)},j=d({}),de=()=>{j.value=u.value.data},ee={class:"relative p-[16px]"},te=O({__name:"index",props:{compData:{default:()=>({})}},setup(e){const r=e;return T(()=>{X(r.compData)}),(t,l)=>{const s=A,f=P,o=y,m=R("bt-loading");return x(),$("div",ee,[c(o,null,{"header-left":p(()=>[...l[3]||(l[3]=[])]),"header-right":p(()=>[...l[4]||(l[4]=[])]),content:p(()=>[E(c(s,{ref:"ftpTable",column:i(Q),"max-height":360,data:i(a).list,description:"暂无数据"},null,8,["column","data"]),[[m,i(a).load],[m,"正在加载中,请稍后...","title"]])]),"footer-right":p(()=>[c(f,{page:i(a).p,"onUpdate:page":l[0]||(l[0]=n=>i(a).p=n),row:i(a).limit,"onUpdate:row":l[1]||(l[1]=n=>i(a).limit=n),total:i(a).total,onChange:l[2]||(l[2]=n=>i(K)())},null,8,["page","row","total"])]),_:1})])}}}),pe=Object.freeze(Object.defineProperty({__proto__:null,default:te},Symbol.toStringTag,{value:"Module"}));export{de as a,j as b,F as c,u as d,z as e,pe as f,ce as i,Y as l};
function __vite__mapDeps(indexes) {
if (!__vite__mapDeps.viteFileDeps) {
__vite__mapDeps.viteFileDeps = []
}
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}