2023-05-12 18:10:29 +08:00
|
|
|
import{_ as g,O as x,r as f,d as u,o as t,c as a,e as _,w as i,l as e,f as l,x as o,g as c,s as w}from"./index.be11ec00.js";import{g as C}from"./cache.03ff3e79.js";import{i as b}from"./index.7fec779c.js";const I={class:"app-container"},O=e("span",null,"\u57FA\u672C\u4FE1\u606F",-1),B={class:"el-table el-table--enable-row-hover el-table--medium"},D={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"},N={key:0,class:"cell"},V=e("td",{class:"el-table__cell is-leaf"},[e("div",{class:"cell"},"\u8FD0\u884C\u6A21\u5F0F")],-1),z={class:"el-table__cell is-leaf"},A={key:0,class:"cell"},E=e("td",{class:"el-table__cell is-leaf"},[e("div",{class:"cell"},"\u7AEF\u53E3")],-1),L={class:"el-table__cell is-leaf"},R={key:0,class:"cell"},U=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"},K=e("td",{class:"el-table__cell is-leaf"},[e("div",{class:"cell"},"\u8FD0\u884C\u65F6\u95F4(\u5929)")],-1),P={class:"el-table__cell is-leaf"},T={key:0,class:"cell"},q=e("td",{class:"el-table__cell is-leaf"},[e("div",{class:"cell"},"\u4F7F\u7528\u5185\u5B58")],-1),G={class:"el-table__cell is-leaf"},H={key:0,class:"cell"},J=e("td",{class:"el-table__cell is-leaf"},[e("div",{class:"cell"},"\u4F7F\u7528CPU")],-1),M={class:"el-table__cell is-leaf"},Q={key:0,class:"cell"},W=e("td",{class:"el-table__cell is-leaf"},[e("div",{class:"cell"},"\u5185\u5B58\u914D\u7F6E")],-1),X={class:"el-table__cell is-leaf"},Y={key:0,class:"cell"},Z=e("td",{class:"el-table__cell is-leaf"},[e("div",{class:"cell"},"AOF\u662F\u5426\u5F00\u542F")],-1),ee={class:"el-table__cell is-leaf"},se={key:0,class:"cell"},le=e("td",{class:"el-table__cell is-leaf"},[e("div",{class:"cell"},"RDB\u662F\u5426\u6210\u529F")],-1),te={class:"el-table__cell is-leaf"},ae={key:0,class:"cell"},oe=e("td",{class:"el-table__cell is-leaf"},[e("div",{class:"cell"},"Key\u6570\u91CF")],-1),ce={class:"el-table__cell is-leaf"},ie={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"},de={key:0,class:"cell"},re=e("span",null,"\u547D\u4EE4\u7EDF\u8BA1",-1),fe={class:"el-table el-table--enable-row-hover el-table--medium"},ue=e("span",null,"\u5185\u5B58\u4FE1\u606F",-1),me={class:"el-table el-table--enable-row-hover el-table--medium"},he=x({name:"Cache"}),ve=Object.assign(he,{setup(be){const s=f([]),m=f(null),h=f(null),{proxy:v}=w();function p(){v.$modal.loading("\u6B63\u5728\u52A0\u8F7D\u7F13\u5B58\u76D1\u63A7\u6570\u636E\uFF0C\u8BF7\u7A0D\u5019\uFF01"),C().then(d=>{v.$modal.closeLoading(),s.value=d.data,b(m.value,"macarons").setOption({tooltip:{trigger:"item",formatter:"{a} <br/>{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}]}),b(h.value,"macarons").setOption({tooltip:{formatter:"{b} <br/>{a} : "+s.value.info.used_memory_human},series:[{name:"\u5CF0\u503C",type:"gauge",min:0,max:1e3,detail:{formatter:s.value.info.used_memory_human},data:[{value:parseFloat(s.value.info.used_memory_human),name:"\u5185\u5B58\u6D88\u8017"}]}]})})}return p(),(d,y)=>{const n=u("el-card"),r=u("el-col"),k=u("el-row");return t(),a("div",I,[_(k,null,{default:i(()=>[_(r,{span:24,class:"card-box"},{default:i(()=>[_(n,null,{header:i(()=>[O]),default:i(()=>[e("div",B,[e("table",D,[e("tbody",null,[e("tr",null,[F,e("td",S,[l(s).info?(t(),a("div",N,o(l(s).info.redis_version),1)):c("v-if",!0)]),V,e("td",z,[l(s).info?(t(),a("div",A,o(l(s).info.redis_mode=="standalone"?"\u5355\u673A":"\u96C6\u7FA4"),1)):c("v-if",!0)]),E,e("td",L,[l(s).info?(t(),a("div",R,o(l(s).info.tcp_port),1)):c("v-if",!0)]),U,e("td",$,[l(s).info?(t(),a("div",j,o(l(s).info.connected_clients),1)):c("v-if",!0)])]),e("tr",null,[K,e("td",P,[l(s).info?(t(),a("div",T,o(l(s).info.uptime_in_days),1)):c("v-if",!0)]),q,e("td",G,[l(
|