import{P as e,k as l,$ as s}from"./utils-lib.js?v=1761009159";import{c as a,r as m,q as t,v as o,x as r,z as i,C as n,e as c,y as u,B as d,G as p}from"./base-lib.js?v=1761009159";import{bx as _,by as f}from"./firewall.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";const y={class:"px-[1.6rem] py-[1.6rem]"},b={class:"flex flex-row justify-between border-b border-darker pb-[1.6rem]"},w={class:"flex flex-row items-center reinforce_ssh"},x=a({__name:"row-ssh-config",setup(a){const x=m({cycle:0,limit:0,limit_count:0,name:"",open:!1,ps:""}),V=m([{content:"触发以上策略后，客户端IP将被封锁一段时间"},{content:"请在面板日志或操作日志中查看封锁记录"},{content:"在面板日志或操作日志中查看SSH成功登录的记录(非继承),关闭保护后权限自动还原"}]),j=async()=>{const l=await e({loading:"正在获取配置列表，请稍后...",request:_()});x.value=l.data};return t(()=>j()),(a,m)=>{const t=l,_=p,v=s;return o(),r("div",y,[i("div",b,[i("span",w,[m[4]||(m[4]=n(" 在(检测周期) ",-1)),c(t,{class:"!w-[8rem] mr-[.8rem] ml-[.4rem]",modelValue:u(x).cycle,"onUpdate:modelValue":m[0]||(m[0]=e=>u(x).cycle=e)},null,8,["modelValue"]),m[5]||(m[5]=n(" 秒内, 登录错误(检测阈值) ",-1)),c(t,{class:"!w-[8rem] mr-[.8rem] ml-[.4rem]",modelValue:u(x).limit_count,"onUpdate:modelValue":m[1]||(m[1]=e=>u(x).limit_count=e)},null,8,["modelValue"]),m[6]||(m[6]=n(" 次, 封锁(封锁时间) ",-1)),c(t,{class:"!w-[8rem] mr-[.8rem] ml-[.4rem]",modelValue:u(x).limit,"onUpdate:modelValue":m[2]||(m[2]=e=>u(x).limit=e)},null,8,["modelValue"]),m[7]||(m[7]=n(" 秒 ",-1))]),c(_,{type:"primary",onClick:m[3]||(m[3]=l=>(async()=>{const{cycle:l,limit:s,limit_count:a}=x.value;e({loading:"正在保存配置，请稍后...",request:f({cycle:l,limit:s,limit_count:a}),message:!0,success:e=>{e.status&&j()}})})())},{default:d(()=>m[8]||(m[8]=[n("保存",-1)])),_:1,__:[8]})]),c(v,{options:u(V),class:"mx-[1.6rem] mt-[1.6rem]"},null,8,["options"])])}}});export{x as default};
