← Back
Editing: index470.js
import{_ as t}from"./index94.js?v=1765440387";import{o as e,L as a,M as s,at as o,q as n,K as i,n as r,W as l,_ as p}from"./utils-lib.js?v=1765440387";import{_ as m}from"./index116.js?v=1765440387";import{r as c,k as d,U as f,e as h,c as u,p as _,G as j,q as y,v as x,A as b,x as g,B as v,H as w,D as k}from"./base-lib.js?v=1765440387";import{o as I,u as C}from"./column.js?v=1765440387";import{u as A}from"./useStore3.js?v=1765440387";import{dI as q,fZ as D}from"./site.js?v=1765440387";import{m as H}from"./index429.js?v=1765440387";import"./__commonjsHelpers__.js?v=1765440387";import"./index95.js?v=1765440387";import"./index123.js?v=1765440387";import"./validator.js?v=1765440387";import"./index.vue_vue_type_style_index_0_scoped_d317a360_lang.js?v=1765440387";import"./index93.js?v=1765440387";import"./useStore4.js?v=1765440387";import"./useController6.js?v=1765440387";const{siteInfo:O}=A();c();const R=d({list:[],load:!1}),B=[{content:"安全告警默认会监视当前网站访问非当前网站文件的行为(例:你的站点A.com访问了站点B.com的文件或者目录),通过添加监视器路径,当路径被访问时发送告警"},{content:"告警频率:60秒某一个告警行为只会发送一次告警"},{isHtml:!0,content:'<a class="bt-link" href="https://www.bt.cn/bbs/thread-112442-1-1.html" target="_blank" rel="noreferrer noopener">使用教程</a>'}],E=async t=>{await n({title:"删除监视器",width:"35rem",icon:"warning-filled",content:"您真的要删除路径【".concat(t.path,"】的监视器吗?")});(await i({loading:"正在删除监视器,请稍后...",request:D({domain:O.value.name,type:t.type,path:t.path}),message:!0})).status&&P()},L=async t=>{let s={name:O.value.name,path:t?t.path:H.path,refresh:P};t&&(s.row=t),e({title:"".concat(t?"编辑":"添加","文件监视器"),area:47,isAsync:!0,component:()=>a((()=>import("./add-file-monitor.js?v=1765440387")),__vite__mapDeps([]),import.meta.url),compData:s,showFooter:!0})},P=async()=>{try{R.load=!0;const t=await q();t.status||s.error(t.msg);const e=t.data.sites.find((t=>t.path===H.path&&t.site_name===O.value.name));if(e){const t=[];for(const a in e.config.file_info)Object.prototype.hasOwnProperty.call(e.config.file_info,a)&&t.push({...e.config.file_info[a],path:a});R.list=t}}catch(t){o(t)}finally{R.load=!1}},S=f([{label:"路径",prop:"path",render:t=>h("div",{class:"truncate bt-link",onClick:()=>{"dir"===t.type&&I({path:t.path})}},[t.path])},{label:"类型",prop:"type",render:t=>"".concat("dir"===t.type?"文件夹":"文件")},{label:"告警操作",prop:"type",render:t=>{const e=[];return parseInt(t.read)&&e.push("读取"),parseInt(t.del)&&e.push("删除"),parseInt(t.reit)&&(e.push("修改"),e.push("增加")),e.join(" / ")}},C([{onClick:L,title:"编辑"},{onClick:E,title:"删除"}])]),T={class:"relative p-[16px]"},U=p(u({__name:"index",setup:e=>(_((()=>{P()})),(e,a)=>{const s=k,o=m,n=r,i=l,p=t,c=j("bt-loading");return y(),x("div",T,[h(p,null,{"header-left":b((()=>[h(s,{type:"primary",onClick:a[0]||(a[0]=t=>g(L)())},{default:b((()=>a[1]||(a[1]=[v("添加监视器")]))),_:1})])),"header-right":b((()=>[h(o,{onRefresh:g(P)},null,8,["onRefresh"])])),content:b((()=>[w(h(n,{ref:"ftpTable",column:g(S),"max-height":360,data:g(R).list,description:"暂无数据"},null,8,["column","data"]),[[c,g(R).load],[c,"正在加载中,请稍后...","title"]])])),"footer-left":b((()=>[h(i,{options:g(B),class:"ml-[20px] mt-[20px]"},null,8,["options"])])),_:1})])})}),[["__file","/Users/chudong/project/linux-10/src/views/site/views/php-model/php-setting/safe-monitor/index.vue"]]);export{U as default}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { __vite__mapDeps.viteFileDeps = [] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) }
Save File
Cancel