← Back
Editing: anti-blast-view.js
import{c as e,r as a,p as l,q as t,v as s,e as m,A as r,x as d,B as o,y as i,aa as n,a8 as u}from"./base-lib.js?v=1765440387";import{K as p,j as f}from"./utils-lib.js?v=1765440387";import{b3 as b,O as _}from"./firewall.js?v=1765440387";import"./__commonjsHelpers__.js?v=1765440387";const c={class:"p-[2rem]"},y=e({__name:"anti-blast-view",setup(e,{expose:y}){const x=a(),V=a({maxretry:0,findtime:0,bantime:0});return y({onConfirm:async e=>{await p({loading:"正在设置防暴破配置,请稍后...",request:_(V.value),message:!0}),e()}}),l(()=>{(async()=>{const e=await p({loading:"正在获取配置,请稍后...",request:b()});V.value=e.data})()}),(e,a)=>{const l=f,p=n,b=u;return t(),s("div",c,[m(b,{model:d(V),ref_key:"blastFormRef",ref:x},{default:r(()=>[m(p,{label:"最大重试次数"},{default:r(()=>[m(l,{type:"number",modelValue:d(V).maxretry,"onUpdate:modelValue":a[0]||(a[0]=e=>d(V).maxretry=e),width:"24rem"},{append:r(()=>[...a[3]||(a[3]=[o("次",-1)])]),_:1},8,["modelValue"])]),_:1}),m(p,{label:"周期"},{default:r(()=>[m(l,{type:"number",modelValue:d(V).findtime,"onUpdate:modelValue":a[1]||(a[1]=e=>d(V).findtime=e),width:"24rem"},{append:r(()=>[...a[4]||(a[4]=[o("秒",-1)])]),_:1},8,["modelValue"])]),_:1}),m(p,{label:"禁止时间"},{default:r(()=>[m(l,{type:"number",modelValue:d(V).bantime,"onUpdate:modelValue":a[2]||(a[2]=e=>d(V).bantime=e),width:"24rem"},{append:r(()=>[...a[5]||(a[5]=[o("秒",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"]),a[6]||(a[6]=i("ul",{class:"mt-8px leading-8 text-[1.2rem] list-disc ml-20px"},[i("li",null,"监控SSHD服务日志,在设置周期内(300秒)有超过最大重试次数(5次)的IP访问,将禁止该IP访问86400秒(默认禁止时间)")],-1))])}}});export{y as default};
Save File
Cancel