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