import{g}from"./cache.69a338c9.js";import"./index.2809c208.js";import{G as x,r as u,d as f,o as t,c as a,e as n,w as _,l as e,f as s,A as o,m as c,v as w}from"./index.064676a5.js";import{ai as p}from"./linkSeriesData.e74eae00.js";const C={class:"app-container"},I=e("span",null,"\u57FA\u672C\u4FE1\u606F",-1),O={class:"el-table el-table--enable-row-hover el-table--medium"},B={cellspacing:"0",style:{width:"100%"}},F=e("td",{class:"el-table__cell is-leaf"},[e("div",{class:"cell"},"Redis\u7248\u672C")],-1),S={class:"el-table__cell is-leaf"},D={key:0,class:"cell"},N=e("td",{class:"el-table__cell is-leaf"},[e("div",{class:"cell"},"\u8FD0\u884C\u6A21\u5F0F")],-1),V={class:"el-table__cell is-leaf"},z={key:0,class:"cell"},A=e("td",{class:"el-table__cell is-leaf"},[e("div",{class:"cell"},"\u7AEF\u53E3")],-1),E={class:"el-table__cell is-leaf"},L={key:0,class:"cell"},R=e("td",{class:"el-table__cell is-leaf"},[e("div",{class:"cell"},"\u5BA2\u6237\u7AEF\u6570")],-1),$={class:"el-table__cell is-leaf"},j={key:0,class:"cell"},G=e("td",{class:"el-table__cell is-leaf"},[e("div",{class:"cell"},"\u8FD0\u884C\u65F6\u95F4(\u5929)")],-1),K={class:"el-table__cell is-leaf"},P={key:0,class:"cell"},T=e("td",{class:"el-table__cell is-leaf"},[e("div",{class:"cell"},"\u4F7F\u7528\u5185\u5B58")],-1),U={class:"el-table__cell is-leaf"},q={key:0,class:"cell"},H=e("td",{class:"el-table__cell is-leaf"},[e("div",{class:"cell"},"\u4F7F\u7528CPU")],-1),J={class:"el-table__cell is-leaf"},M={key:0,class:"cell"},Q=e("td",{class:"el-table__cell is-leaf"},[e("div",{class:"cell"},"\u5185\u5B58\u914D\u7F6E")],-1),W={class:"el-table__cell is-leaf"},X={key:0,class:"cell"},Y=e("td",{class:"el-table__cell is-leaf"},[e("div",{class:"cell"},"AOF\u662F\u5426\u5F00\u542F")],-1),Z={class:"el-table__cell is-leaf"},ee={key:0,class:"cell"},le=e("td",{class:"el-table__cell is-leaf"},[e("div",{class:"cell"},"RDB\u662F\u5426\u6210\u529F")],-1),se={class:"el-table__cell is-leaf"},te={key:0,class:"cell"},ae=e("td",{class:"el-table__cell is-leaf"},[e("div",{class:"cell"},"Key\u6570\u91CF")],-1),oe={class:"el-table__cell is-leaf"},ce={key:0,class:"cell"},_e=e("td",{class:"el-table__cell is-leaf"},[e("div",{class:"cell"},"\u7F51\u7EDC\u5165\u53E3/\u51FA\u53E3")],-1),ne={class:"el-table__cell is-leaf"},ie={key:0,class:"cell"},de=e("span",null,"\u547D\u4EE4\u7EDF\u8BA1",-1),re={class:"el-table el-table--enable-row-hover el-table--medium"},ue=e("span",null,"\u5185\u5B58\u4FE1\u606F",-1),fe={class:"el-table el-table--enable-row-hover el-table--medium"},me=x({name:"Cache"}),ke=Object.assign(me,{setup(he){const l=u([]),m=u(null),h=u(null),{proxy:b}=w();function v(){b.$modal.loading("\u6B63\u5728\u52A0\u8F7D\u7F13\u5B58\u76D1\u63A7\u6570\u636E\uFF0C\u8BF7\u7A0D\u5019\uFF01"),g().then(d=>{b.$modal.closeLoading(),l.value=d.data,p(m.value,"macarons").setOption({tooltip:{trigger:"item",formatter:"{a}
{b} : {c} ({d}%)"},series:[{name:"\u547D\u4EE4",type:"pie",roseType:"radius",radius:[15,95],center:["50%","38%"],data:d.data.commandStats,animationEasing:"cubicInOut",animationDuration:1e3}]}),p(h.value,"macarons").setOption({tooltip:{formatter:"{b}
{a} : "+l.value.info.used_memory_human},series:[{name:"\u5CF0\u503C",type:"gauge",min:0,max:1e3,detail:{formatter:l.value.info.used_memory_human},data:[{value:parseFloat(l.value.info.used_memory_human),name:"\u5185\u5B58\u6D88\u8017"}]}]})})}return v(),(d,y)=>{const i=f("el-card"),r=f("el-col"),k=f("el-row");return t(),a("div",C,[n(k,null,{default:_(()=>[n(r,{span:24,class:"card-box"},{default:_(()=>[n(i,null,{header:_(()=>[I]),default:_(()=>[e("div",O,[e("table",B,[e("tbody",null,[e("tr",null,[F,e("td",S,[s(l).info?(t(),a("div",D,o(s(l).info.redis_version),1)):c("",!0)]),N,e("td",V,[s(l).info?(t(),a("div",z,o(s(l).info.redis_mode=="standalone"?"\u5355\u673A":"\u96C6\u7FA4"),1)):c("",!0)]),A,e("td",E,[s(l).info?(t(),a("div",L,o(s(l).info.tcp_port),1)):c("",!0)]),R,e("td",$,[s(l).info?(t(),a("div",j,o(s(l).info.connected_clients),1)):c("",!0)])]),e("tr",null,[G,e("td",K,[s(l).info?(t(),a("div",P,o(s(l).info.uptime_in_days),1)):c("",!0)]),T,e("td",U,[s(l).info?(t(),a("div",q,o(s(l).info.used_memory_human),1)):c("",!0)]),H,e("td",J,[s(l).info?(t(),a("div",M,o(parseFloat(s(l).info.used_cpu_user_children).toFixed(2)),1)):c("",!0)]),Q,e("td",W,[s(l).info?(t(),a("div",X,o(s(l).info.maxmemory_human),1)):c("",!0)])]),e("tr",null,[Y,e("td",Z,[s(l).info?(t(),a("div",ee,o(s(l).info.aof_enabled=="0"?"\u5426":"\u662F"),1)):c("",!0)]),le,e("td",se,[s(l).info?(t(),a("div",te,o(s(l).info.rdb_last_bgsave_status),1)):c("",!0)]),ae,e("td",oe,[s(l).dbSize?(t(),a("div",ce,o(s(l).dbSize),1)):c("",!0)]),_e,e("td",ne,[s(l).info?(t(),a("div",ie,o(s(l).info.instantaneous_input_kbps)+"kps/"+o(s(l).info.instantaneous_output_kbps)+"kps",1)):c("",!0)])])])])])]),_:1})]),_:1}),n(r,{span:12,class:"card-box"},{default:_(()=>[n(i,null,{header:_(()=>[de]),default:_(()=>[e("div",re,[e("div",{ref_key:"commandstats",ref:m,style:{height:"420px"}},null,512)])]),_:1})]),_:1}),n(r,{span:12,class:"card-box"},{default:_(()=>[n(i,null,{header:_(()=>[ue]),default:_(()=>[e("div",fe,[e("div",{ref_key:"usedmemory",ref:h,style:{height:"420px"}},null,512)])]),_:1})]),_:1})]),_:1})])}}});export{ke as default};