import{p as s,P as e,Q as a,aC as r}from"./utils-lib.js?v=1761009159";import{c as t}from"./useMethod6.js?v=1761009159";import{g as o}from"./useStore5.js?v=1761009159";import{c as l,aG as n,r as i,V as m,q as u,v as c,x as d,z as p,e as _,y as S,A as b,an as j,Q as y}from"./base-lib.js?v=1761009159";import{e as f,f as v}from"./firewall.js?v=1761009159";import{a as x}from"./useController7.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./column.js?v=1761009159";import"./index106.js?v=1761009159";import"./validator.js?v=1761009159";import"./useStore6.js?v=1761009159";import"./useStore7.js?v=1761009159";import"./site.js?v=1761009159";const h={class:"tab-header-operate"},g={class:"flex items-center"},H=l({__name:"index",setup(a){const r=n(),{refs:{sshInfo:l,sshTabActive:y,sshLoginType:H}}=o(),V=i(!1),A=m({success:0,today_success:0,error:0,today_error:0}),w=async a=>{l.status=!a,await s({title:"SSH服务开关",content:a?"确定启用SSH服务吗？":"停用SSH服务后您将无法使用终端工具连接服务器，继续吗？"}),await e({loading:"正在"+(a?"启用SSH服务":"禁用SSH服务")+"，请稍后...",request:f({status:a?"0":"1"}),message:!0}),l.status=a,t()},E=s=>{x.value=s,r.push("/logs/ssh")};return u(async()=>{const s=await e({loading:V,request:v(),data:{success:Number,today_success:Number,error:Number,today_error:Number}});s&&(A.value=s)}),(s,e)=>{const a=j;return c(),d("div",h,[e[6]||(e[6]=p("div",{class:"mr-4"},"SSH开关",-1)),_(a,{modelValue:S(l).status,"onUpdate:modelValue":e[0]||(e[0]=s=>S(l).status=s),width:36,onChange:w},null,8,["modelValue"]),p("div",g,[e[3]||(e[3]=p("div",{class:"bg-darker w-[1px] h-2rem mx-8"},null,-1)),e[4]||(e[4]=p("div",{class:"mr-4"},"SSH登录详情：",-1)),p("span",{class:"bt-link",onClick:e[1]||(e[1]=s=>E("Accepted"))}," 成功总数："+b(S(A).success)+"（今日新增："+b(S(A).today_success)+"） ",1),e[5]||(e[5]=p("span",{class:"mx-4"},"/",-1)),p("span",{onClick:e[2]||(e[2]=s=>E("Failed")),class:"!text-danger bt-link"}," 失败："+b(S(A).error)+"（今日新增："+b(S(A).today_error)+"） ",1)])])}}}),V=l({__name:"index",setup(s){const{refs:{sshTabActive:e}}=o(),l=[{label:"基础设置",name:"basic",lazy:!0,render:()=>a(()=>import("./index278.js?v=1761009159"),__vite__mapDeps([]),import.meta.url)},{label:"SSH系统账号管理",name:"account",lazy:!0,render:()=>a(()=>import("./index279.js?v=1761009159"),__vite__mapDeps([]),import.meta.url)},{label:"SSH登录日志",name:"login",lazy:!0,render:()=>a(()=>import("./index52.js?v=1761009159"),__vite__mapDeps([]),import.meta.url)}];return u(t),(s,a)=>{const t=r;return c(),d("div",null,[_(H),_(t,{type:"card",modelValue:S(e),"onUpdate:modelValue":a[0]||(a[0]=s=>y(e)?e.value=s:null),options:l},null,8,["modelValue"])])}}});export{V as default};
function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = []
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}
