import{_ as e}from"./index245.js?v=1763625242172";import{k as a,P as s,R as n,S as t,X as l,V as o,r as i,a2 as r,a3 as u,F as p,O as c,U as m,a4 as d,an as v,j as _,a0 as g,aj as x}from"./vue.js?v=1763625242172";import{eH as y,c as f,eI as w,eJ as j,x as k,T as b,eK as h,u as P}from"./page_layout.js?v=1763625242172";import{_ as S,a as U}from"./index.vue_vue_type_script_setup_true_lang18.js?v=1763625242172";import{O as C}from"./index259.js?v=1763625242172";import{_ as W}from"./index.vue_vue_type_script_setup_true_lang19.js?v=1763625242172";import{c as H,d as N,h as T}from"./public.js?v=1763625242172";import{df as q,au as z,dV as A,d9 as L,aC as O}from"./naive.js?v=1763625242172";import{_ as R}from"./index104.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";import"./common.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"./file.js?v=1763625242172";import"./leader-line-vue.js?v=1763625242172";const F=a({__name:"index",setup(e,{expose:a}){const{t:i}=s(),{table:r,columns:u}=H([{key:"title",title:i("Plugin.Apache.index_12")},{width:"30%",key:"value",title:i("Plugin.Apache.index_13")}]),p={active:"Active connections",accepts:"Total accepts",handled:"Total handled",requests:"Total requests",Reading:"Reading",Writing:"Writing",Waiting:"Waiting",worker:"Worker process",workercpu:"Nginx CPU usage",workermen:"Nginx memory usage"},{loading:c,setLoading:m}=N(),d=async()=>{try{m(!0);const{message:e}=await y();f(e)&&(r.data=Object.keys(e).map((a=>({title:p[a],value:e[a]}))))}finally{m(!1)}};return d(),a({init:d}),(e,a)=>{const s=T;return n(),t("div",null,[l(s,{data:o(r).data,columns:o(u),loading:o(c)},null,8,["data","columns","loading"])])}}}),I={class:"w-150px! text-right"},J={class:"w-250px! color-#666"},V={class:"text-center"},B=a({__name:"index",setup(e,{expose:a}){const{t:g}=s(),x=i(),y=[{label:g("Config.Panel.index_83_1"),value:"on"},{label:g("Config.Safe.index_84"),value:"off"}],f=async()=>{const e=x.value.reduce(((e,a)=>(e[a.name]=a.value,e)),{});await w(e)},{loading:h,setLoading:P}=N(),S=async()=>{try{P(!0);const{message:e}=await j();k(e)&&(x.value=e)}finally{P(!1)}};return S(),a({init:S}),(e,a)=>{const s=q,i=z,g=A,w=L,j=O,k=b;return n(),r(k,{show:o(h)},{default:u((()=>[(n(!0),t(p,null,c(o(x),((e,a)=>(n(),r(w,{class:"items-center flex-nowrap! py-2px mb-16px",key:a},{default:u((()=>[m("div",I,d(e.name),1),"gzip"!==e.name&&"worker_processes"!==e.name?(n(),r(s,{key:0,class:"w-150px!",value:e.value,"onUpdate:value":a=>e.value=a,min:0,"show-button":!1},null,8,["value","onUpdate:value"])):v("",!0),"worker_processes"===e.name?(n(),r(i,{key:1,class:"w-150px!",value:e.value,"onUpdate:value":a=>e.value=a},null,8,["value","onUpdate:value"])):v("",!0),"gzip"===e.name?(n(),r(g,{key:2,class:"w-150px!",value:e.value,"onUpdate:value":a=>e.value=a,options:y},null,8,["value","onUpdate:value"])):v("",!0),m("div",J,d(e.ps),1)])),_:2},1024)))),128)),m("div",V,[l(j,{type:"primary",onClick:f},{default:u((()=>[_(d(e.$t("Public.Btn.Save")),1)])),_:1})])])),_:1},8,["show"])}}}),K=a({__name:"index",setup(e,{expose:a}){const s=i("None"),{loading:t,setLoading:p}=N(),c=async()=>{try{p(!0);const{message:e}=await h({path:"/www/wwwlogs/nginx_error.log"});f(e)&&(s.value=e.result?e.result:"None")}finally{p(!1)}};return c(),a({init:c}),(e,a)=>{const i=R,p=b;return n(),r(p,{class:"h-580px",show:o(t)},{default:u((()=>[l(i,{log:o(s)},null,8,["log"])])),_:1},8,["show"])}}}),M=a({__name:"index",setup(a){const{multiService:t,isWebServerJump:l}=g(P()),{t:u}=s(),p=i("service"),c=[{key:"service",label:u("Security.History.Index_10"),component:S},{key:"webserver",label:u("Soft.Plugin.index_1"),component:C},{key:"file",label:u("Site.Config.index_15"),data:{path:"/www/server/nginx/conf/nginx.conf"},component:U},{key:"version",label:u("Plugin.Ftp.index_9"),component:W},{key:"load",label:u("Home.index_30"),component:F},{key:"optimization",label:u("Plugin.Mysql.index_27"),component:B},{key:"logs",label:u("Site.Config.index_101"),component:K}];return p.value=t.value||l.value?"webserver":"service",l.value&&(l.value=!1),(a,s)=>{const t=e;return n(),r(t,{value:o(p),"onUpdate:value":s[0]||(s[0]=e=>x(p)?p.value=e:null),data:c},null,8,["value"])}}});export{M as default};
