2 lines
4.9 KiB
JavaScript
2 lines
4.9 KiB
JavaScript
|
import{g as l}from"./cache.64e28add.js";import"./index.2809c208.js";import{G as e,r as a,d as s,o as t,c,e as i,w as d,l as n,f as o,A as _,m as r,v as f}from"./index.e5c8b0d6.js";import{ai as u}from"./linkSeriesData.e74eae00.js";const b={class:"app-container"},m=n("span",null,"基本信息",-1),v={class:"el-table el-table--enable-row-hover el-table--medium"},p={cellspacing:"0",style:{width:"100%"}},y=n("td",{class:"el-table__cell is-leaf"},[n("div",{class:"cell"},"Redis版本")],-1),h={class:"el-table__cell is-leaf"},k={key:0,class:"cell"},g=n("td",{class:"el-table__cell is-leaf"},[n("div",{class:"cell"},"运行模式")],-1),x={class:"el-table__cell is-leaf"},w={key:0,class:"cell"},j=n("td",{class:"el-table__cell is-leaf"},[n("div",{class:"cell"},"端口")],-1),O={class:"el-table__cell is-leaf"},F={key:0,class:"cell"},S=n("td",{class:"el-table__cell is-leaf"},[n("div",{class:"cell"},"客户端数")],-1),D={class:"el-table__cell is-leaf"},z={key:0,class:"cell"},A=n("td",{class:"el-table__cell is-leaf"},[n("div",{class:"cell"},"运行时间(天)")],-1),C={class:"el-table__cell is-leaf"},R={key:0,class:"cell"},$=n("td",{class:"el-table__cell is-leaf"},[n("div",{class:"cell"},"使用内存")],-1),B={class:"el-table__cell is-leaf"},E={key:0,class:"cell"},G=n("td",{class:"el-table__cell is-leaf"},[n("div",{class:"cell"},"使用CPU")],-1),I={class:"el-table__cell is-leaf"},K={key:0,class:"cell"},L=n("td",{class:"el-table__cell is-leaf"},[n("div",{class:"cell"},"内存配置")],-1),P={class:"el-table__cell is-leaf"},T={key:0,class:"cell"},U=n("td",{class:"el-table__cell is-leaf"},[n("div",{class:"cell"},"AOF是否开启")],-1),q={class:"el-table__cell is-leaf"},H={key:0,class:"cell"},J=n("td",{class:"el-table__cell is-leaf"},[n("div",{class:"cell"},"RDB是否成功")],-1),M={class:"el-table__cell is-leaf"},N={key:0,class:"cell"},Q=n("td",{class:"el-table__cell is-leaf"},[n("div",{class:"cell"},"Key数量")],-1),V={class:"el-table__cell is-leaf"},W={key:0,class:"cell"},X=n("td",{class:"el-table__cell is-leaf"},[n("div",{class:"cell"},"网络入口/出口")],-1),Y={class:"el-table__cell is-leaf"},Z={key:0,class:"cell"},ll=n("span",null,"命令统计",-1),el={class:"el-table el-table--enable-row-hover el-table--medium"},al=n("span",null,"内存信息",-1),sl={class:"el-table el-table--enable-row-hover el-table--medium"},tl=e({name:"Cache"}),cl=Object.assign(tl,{setup(e){const tl=a([]),cl=a(null),il=a(null),{proxy:dl}=f();return dl.$modal.loading("正在加载缓存监控数据,请稍候!"),l().then((l=>{dl.$modal.closeLoading(),tl.value=l.data,u(cl.value,"macarons").setOption({tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c} ({d}%)"},series:[{name:"命令",type:"pie",roseType:"radius",radius:[15,95],center:["50%","38%"],data:l.data.commandStats,animationEasing:"cubicInOut",animationDuration:1e3}]}),u(il.value,"macarons").setOption({tooltip:{formatter:"{b} <br/>{a} : "+tl.value.info.used_memory_human},series:[{name:"峰值",type:"gauge",min:0,max:1e3,detail:{formatter:tl.value.info.used_memory_human},data:[{value:parseFloat(tl.value.info.used_memory_human),name:"内存消耗"}]}]})})),(l,e)=>{const a=s("el-card"),f=s("el-col"),u=s("el-row");return t(),c("div",b,[i(u,null,{default:d((()=>[i(f,{span:24,class:"card-box"},{default:d((()=>[i(a,null,{header:d((()=>[m])),default:d((()=>[n("div",v,[n("table",p,[n("tbody",null,[n("tr",null,[y,n("td",h,[o(tl).info?(t(),c("div",k,_(o(tl).info.redis_version),1)):r("",!0)]),g,n("td",x,[o(tl).info?(t(),c("div",w,_("standalone"==o(tl).info.redis_mode?"单机":"集群"),1)):r("",!0)]),j,n("td",O,[o(tl).info?(t(),c("div",F,_(o(tl).info.tcp_port),1)):r("",!0)]),S,n("td",D,[o(tl).info?(t(),c("div",z,_(o(tl).info.connected_clients),1)):r("",!0)])]),n("tr",null,[A,n("td",C,[o(tl).info?(t(),c("div",R,_(o(tl).info.uptime_in_days),1)):r("",!0)]),$,n("td",B,[o(tl).info?(t(),c("div",E,_(o(tl).info.used_memory_human),1)):r("",!0)]),G,n("td",I,[o(tl).info?(t(),c("div",K,_(parseFloat(o(tl).info.used_cpu_user_children).toFixed(2)),1)):r("",!0)]),L,n("td",P,[o(tl).info?(t(),c("div",T,_(o(tl).info.maxme
|