import{_ as e}from"./index245.js?v=1763625242172";import{_ as t,a}from"./index.vue_vue_type_script_setup_true_lang18.js?v=1763625242172";import{_ as s}from"./index.vue_vue_type_script_setup_true_lang19.js?v=1763625242172";import{c as n,d as i,h as o}from"./public.js?v=1763625242172";import{f0 as l,c,n as r,f1 as p,T as u}from"./page_layout.js?v=1763625242172";import{k as m,P as d,R as _,S as x,X as v,V as y,e as b,a2 as g,a3 as h,U as f,a4 as w,j,r as C,aj as P}from"./vue.js?v=1763625242172";import{au as M,d9 as k,df as z,aC as E}from"./naive.js?v=1763625242172";import"./php.js?v=1763625242172";import"./soft.js?v=1763625242172";import"./site.js?v=1763625242172";import"./alarm.js?v=1763625242172";import"./index.vue_vue_type_script_setup_true_lang.js?v=1763625242172";import"./index.vue_vue_type_script_setup_true_lang11.js?v=1763625242172";import"./index100.js?v=1763625242172";import"./theme-monokai.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";import"./file.js?v=1763625242172";import"./common.js?v=1763625242172";const L=m({__name:"index",setup(e,{expose:t}){const{t:a}=d(),{table:s,columns:p}=n([{key:"title",title:a("Plugin.Apache.index_12")},{key:"value",title:a("Plugin.Apache.index_13")},{key:"ps",title:a("Public.Table.Note")}]),u={bind:"Listening IP",port:"Listening Port",maxconn:"Maximum Connection Limit",cachesize:"Maximum Cache Size",curr_connections:"Current Open Connections",cmd_get:"GET Request Count",get_hits:"GET Hits Count",get_misses:"GET Misses Count",bytes_read:"Bytes Read",bytes_written:"Bytes Written",limit_maxbytes:"Limit Max Bytes",bytes:"Current Memory Usage",curr_items:"Current Cached Items",evictions:"Evicted Items Due to Memory Limit",hit:"GET Hit Rate"},{loading:m,setLoading:b}=i(),g=async()=>{try{b(!0);const{message:e}=await l();if(c(e)){const t=["bytes","bytes_read","bytes_written"];s.data=Object.entries(e).filter((([e])=>"limit_maxbytes"!==e)).map((([e,a])=>({title:e,value:t.includes(e)?r(Number(a)):a,ps:u[e]})))}}finally{b(!1)}};return g(),t({init:g}),(e,t)=>{const a=o;return _(),x("div",null,[v(a,{data:y(s).data,columns:y(p),loading:y(m)},null,8,["data","columns","loading"])])}}}),T={class:"w-350px! color-#666"},U={class:"w-350px! color-#666"},H={class:"w-350px! color-#666"},I={class:"w-350px! color-#666"},S={class:"ml-90px"},B=m({__name:"index",setup(e,{expose:t}){const a=b({bind:"127.0.0.1",port:11211,cachesize:64,maxconn:1024}),s=async()=>{await p(a)},{loading:n,setLoading:o}=i(),r=async()=>{try{o(!0);const{message:e}=await l();c(e)&&(a.bind=e.bind,a.port=e.port,a.cachesize=e.cachesize,a.maxconn=e.maxconn)}finally{o(!1)}};return r(),t({init:r}),(e,t)=>{const i=M,o=k,l=z,c=E,r=u;return _(),g(r,{show:y(n)},{default:h((()=>[v(o,{class:"items-center flex-nowrap! py-2px mb-16px"},{default:h((()=>[t[4]||(t[4]=f("div",{class:"w-80px! text-right"},"BindIp",-1)),v(i,{class:"w-150px!",value:y(a).bind,"onUpdate:value":t[0]||(t[0]=e=>y(a).bind=e)},null,8,["value"]),f("div",T,w(e.$t("Plugin.Mencached.index_1")),1)])),_:1,__:[4]}),v(o,{class:"items-center flex-nowrap! py-2px mb-16px"},{default:h((()=>[t[5]||(t[5]=f("div",{class:"w-80px! text-right"},"PORT",-1)),v(l,{class:"w-150px!",value:y(a).port,"onUpdate:value":t[1]||(t[1]=e=>y(a).port=e),min:0,"show-button":!1},null,8,["value"]),f("div",U,w(e.$t("Plugin.Mencached.index_2")),1)])),_:1,__:[5]}),v(o,{class:"items-center flex-nowrap! py-2px mb-16px"},{default:h((()=>[t[6]||(t[6]=f("div",{class:"w-80px! text-right"},"CACHESIZE",-1)),v(l,{class:"w-150px!",value:y(a).cachesize,"onUpdate:value":t[2]||(t[2]=e=>y(a).cachesize=e),min:0,"show-button":!1},null,8,["value"]),f("div",H,w(e.$t("Plugin.Mencached.index_3")),1)])),_:1,__:[6]}),v(o,{class:"items-center flex-nowrap! py-2px mb-16px"},{default:h((()=>[t[7]||(t[7]=f("div",{class:"w-80px! text-right"},"MAXCONN",-1)),v(l,{class:"w-150px!",value:y(a).maxconn,"onUpdate:value":t[3]||(t[3]=e=>y(a).maxconn=e),min:0,"show-button":!1},null,8,["value"]),f("div",I,w(e.$t("Plugin.Mencached.index_4")),1)])),_:1,__:[7]}),f("div",S,[v(c,{type:"primary",onClick:s},{default:h((()=>[j(w(e.$t("Public.Btn.Save")),1)])),_:1})])])),_:1},8,["show"])}}}),R=m({__name:"index",setup(n){const{t:i}=d(),o=C("service"),l=[{key:"service",label:i("Security.History.Index_10"),component:t},{key:"file",label:i("Site.Config.index_15"),data:{path:"/etc/init.d/memcached"},component:a},{key:"version",label:i("Plugin.Ftp.index_9"),component:s},{key:"load",label:i("Home.index_30"),component:L},{key:"optimization",label:i("Plugin.Mysql.index_27"),component:B}];return(t,a)=>{const s=e;return _(),g(s,{value:y(o),"onUpdate:value":a[0]||(a[0]=e=>P(o)?o.value=e:null),data:l},null,8,["value"])}}});export{R as default};
