index-86022646.js 5.0 KB

1
  1. import{ap as k,d as z,r as A,e as w,k as C,o as E,q as L,w as l,f as a,m as i,t as r,a as s,E as B,i as O,bn as P,__tla as R}from"./index-2eab2d23.js";import{_ as T,__tla as q}from"./Echart.vue_vue_type_script_setup_true_lang-16d8243c.js";import{E as I,__tla as K}from"./el-card-c558f0ec.js";import{E as N,a as U,__tla as W}from"./el-descriptions-item-fd42286f.js";let F,X=Promise.all([(()=>{try{return R}catch{}})(),(()=>{try{return q}catch{}})(),(()=>{try{return K}catch{}})(),(()=>{try{return W}catch{}})()]).then(async()=>{let c;c=()=>k.get({url:"/infra/redis/get-monitor-info"}),F=z({__name:"index",setup(j){const o=A(),_=w({title:{text:"\u5185\u5B58\u4F7F\u7528\u60C5\u51B5",left:"center",show:!0,offsetCenter:[0,"20%"],color:"yellow",fontSize:20},toolbox:{show:!1,feature:{restore:{show:!0},saveAsImage:{show:!0}}},series:[{name:"\u5CF0\u503C",type:"gauge",min:0,max:50,splitNumber:10,color:"#F5C74E",radius:"85%",center:["50%","50%"],startAngle:225,endAngle:-45,axisLine:{lineStyle:{color:[[.2,"#7FFF00"],[.8,"#00FFFF"],[1,"#FF0000"]],width:10}},axisTick:{length:5,lineStyle:{color:"#76D9D7"}},splitLine:{length:20,lineStyle:{color:"#76D9D7"}},axisLabel:{color:"#76D9D7",distance:15,fontSize:15},pointer:{width:7,show:!0},detail:{textStyle:{fontWeight:"normal",fontSize:15,color:"#FFFFFF"},valueAnimation:!0},progress:{show:!0}}]}),m=w({title:{text:"\u547D\u4EE4\u7EDF\u8BA1",left:"center"},tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c} ({d}%)"},legend:{type:"scroll",orient:"vertical",right:30,top:10,bottom:20,data:[],textStyle:{color:"#a1a1a1"}},series:[{name:"\u547D\u4EE4",type:"pie",radius:[20,120],center:["40%","60%"],data:[],roseType:"radius",label:{show:!0},emphasis:{label:{show:!0},itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]}),x=async()=>{_.series[0].data=[];try{const u=await c();o.value=u;const h=[],n=[];u.commandStats.forEach(d=>{h.push({name:d.command,value:d.calls}),n.push(d.command)}),m.legend.data=n,m.series[0].data=h}catch{}},v=async()=>{try{const u=await c();o.value=u,_.series[0].detail={show:!0,offsetCenter:[0,"50%"],color:"auto",fontSize:30,formatter:o.value.info.used_memory_human},_.series[0].data[0]={value:o.value.info.used_memory_human,name:"\u5185\u5B58\u6D88\u8017"},_.tooltip={formatter:"{b} <br/>{a} : "+o.value.info.used_memory_human}}catch{}};return C(()=>{(async()=>{const u=await c();o.value=u})(),x(),v()}),(u,h)=>{const n=N,d=U,p=I,b=B,y=T,S=O,D=P;return E(),L(D,{height:"calc(100vh - 88px - 40px - 50px)"},{default:l(()=>[a(S,null,{default:l(()=>[a(b,{span:24,class:"card-box",shadow:"hover"},{default:l(()=>[a(p,null,{default:l(()=>[a(d,{title:"\u57FA\u672C\u4FE1\u606F",column:6,border:""},{default:l(()=>[a(n,{label:"Redis\u7248\u672C :"},{default:l(()=>{var e,t;return[i(r((t=(e=s(o))==null?void 0:e.info)==null?void 0:t.redis_version),1)]}),_:1}),a(n,{label:"\u8FD0\u884C\u6A21\u5F0F :"},{default:l(()=>{var e,t;return[i(r(((t=(e=s(o))==null?void 0:e.info)==null?void 0:t.redis_mode)=="standalone"?"\u5355\u673A":"\u96C6\u7FA4"),1)]}),_:1}),a(n,{label:"\u7AEF\u53E3 :"},{default:l(()=>{var e,t;return[i(r((t=(e=s(o))==null?void 0:e.info)==null?void 0:t.tcp_port),1)]}),_:1}),a(n,{label:"\u5BA2\u6237\u7AEF\u6570 :"},{default:l(()=>{var e,t;return[i(r((t=(e=s(o))==null?void 0:e.info)==null?void 0:t.connected_clients),1)]}),_:1}),a(n,{label:"\u8FD0\u884C\u65F6\u95F4(\u5929) :"},{default:l(()=>{var e,t;return[i(r((t=(e=s(o))==null?void 0:e.info)==null?void 0:t.uptime_in_days),1)]}),_:1}),a(n,{label:"\u4F7F\u7528\u5185\u5B58 :"},{default:l(()=>{var e,t;return[i(r((t=(e=s(o))==null?void 0:e.info)==null?void 0:t.used_memory_human),1)]}),_:1}),a(n,{label:"\u4F7F\u7528CPU :"},{default:l(()=>{var e,t,f;return[i(r((e=s(o))!=null&&e.info?parseFloat((f=(t=s(o))==null?void 0:t.info)==null?void 0:f.used_cpu_user_children).toFixed(2):""),1)]}),_:1}),a(n,{label:"\u5185\u5B58\u914D\u7F6E :"},{default:l(()=>{var e,t;return[i(r((t=(e=s(o))==null?void 0:e.info)==null?void 0:t.maxmemory_human),1)]}),_:1}),a(n,{label:"AOF\u662F\u5426\u5F00\u542F :"},{default:l(()=>{var e,t;return[i(r(((t=(e=s(o))==null?void 0:e.info)==null?void 0:t.aof_enabled)=="0"?"\u5426":"\u662F"),1)]}),_:1}),a(n,{label:"RDB\u662F\u5426\u6210\u529F :"},{default:l(()=>{var e,t;return[i(r((t=(e=s(o))==null?void 0:e.info)==null?void 0:t.rdb_last_bgsave_status),1)]}),_:1}),a(n,{label:"Key\u6570\u91CF :"},{default:l(()=>{var e;return[i(r((e=s(o))==null?void 0:e.dbSize),1)]}),_:1}),a(n,{label:"\u7F51\u7EDC\u5165\u53E3/\u51FA\u53E3 :"},{default:l(()=>{var e,t,f,g;return[i(r((t=(e=s(o))==null?void 0:e.info)==null?void 0:t.instantaneous_input_kbps)+"kps/ "+r((g=(f=s(o))==null?void 0:f.info)==null?void 0:g.instantaneous_output_kbps)+"kps ",1)]}),_:1})]),_:1})]),_:1})]),_:1}),a(b,{span:12,class:"mt-3"},{default:l(()=>[a(p,{gutter:12,shadow:"hover"},{default:l(()=>[a(y,{options:s(m),height:420},null,8,["options"])]),_:1})]),_:1}),a(b,{span:12,class:"mt-3"},{default:l(()=>[a(p,{class:"ml-3",gutter:12,shadow:"hover"},{default:l(()=>[a(y,{options:s(_),height:420},null,8,["options"])]),_:1})]),_:1})]),_:1})]),_:1})}}})});export{X as __tla,F as default};