import{_ as x}from"./index.vue_vue_type_script_setup_true_lang-DgjjuUjT.js?v=1773287522785";import{_ as h}from"./index.vue_vue_type_script_setup_true_lang-BeO8Hyma.js?v=1773287522785";import{u as k}from"./useTableColumns-DDeyYvje.js?v=1773287522785";import{u as S}from"./useTableData-BmkIKQ_R.js?v=1773287522785";import{f as B,h as P}from"./index-BVqS1ZM4.js?v=1773287522785";import{i as C,c as I}from"./index-BTglIPU2.js?v=1773287522785";import{k as w,R as D,e as F,$ as s,Z as _,a0 as r,a9 as l,F as L,P as T,S as n,a8 as $,_ as u,aa as d}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{k as j}from"./naive-ui--dJnpVcV.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-B7YvCBmY.js?v=1773287522785";import"./data-BVsViUMm.js?v=1773287522785";import"./index-S15tYq5l.js?v=1773287522785";import"./copy-D-wIKr0q.js?v=1773287522785";import"./index-DIKmrNCq.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-DeTfbeeM.js?v=1773287522785";import"./index-Cg6fMjw6.js?v=1773287522785";import"./index-DLN4sTNp.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785";import"./index-CZps0rIN.js?v=1773287522785";import"./useLoading-CZ2gSAW7.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-DG86e1NA.js?v=1773287522785";import"./index-K4YGya6V.js?v=1773287522785";import"./check-CNel7fTH.js?v=1773287522785";import"./index-BRQskX9P.js?v=1773287522785";import"./ssl-lets-progress-6I5lHATh.js?v=1773287522785";import"./ssl-Bm8jcneQ.js?v=1773287522785";import"./ssh-g_xvV-TS.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";const N={class:"p-16px"},V={class:"text-2xl font-bold"},A=w({__name:"ssh-protection-log",setup(E,{expose:f}){const{t:e}=D(),a=F([{type:e("Total banned IP"),value:"-"},{type:e("Total failed connection"),value:"-"},{type:e("Current banned IP"),value:"-"},{type:e("Current failed connection"),value:"-"}]),{table:o,columns:b}=S([{title:"IP",key:"ip"},k({width:200,options:t=>[{label:e("Public.Btn.Delete"),onClick:async()=>{await B({ip:t.ip}),i()}}]})]),i=async()=>{try{o.loading=!0;const{message:t}=await P();C(t)&&(a[0].value=t.total_banned,a[1].value=t.total_failed,a[2].value=t.currently_banned,a[3].value=t.currently_failed,o.data=t.banned_ip_list.map(c=>({ip:c})))}finally{o.loading=!1}};return i(),f({init:i}),(t,c)=>{const p=j,y=h,g=x;return s(),_("div",N,[r(p,{class:"stat-box justify-around!"},{default:l(()=>[(s(!0),_(L,null,T(n(a),(m,v)=>(s(),$(p,{class:"flex-col! items-center",key:v},{default:l(()=>[u("span",null,d(m.type),1),u("span",V,d(m.value),1)]),_:2},1024))),128))]),_:1}),r(g,null,{table:l(()=>[r(y,{loading:n(o).loading,data:n(o).data,columns:n(b),"loading-num":3,"max-height":200},null,8,["loading","data","columns"])]),_:1})])}}}),_t=I(A,[["__scopeId","data-v-d420b8b4"]]);export{_t as default};
