(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-59b1983b"],{"1c6f":function(e,t,a){},"21fb":function(e,t,a){"use strict";a("1c6f")},a04e:function(e,t,a){"use strict";a.r(t);a("b680");var n=function(){var e=this,t=e._self._c;return t("div",{staticClass:"padding-card"},[t("a-spin",{attrs:{tip:"玩命加载中...",spinning:e.loading}},[t("a-row",{attrs:{gutter:16}},[t("a-col",{attrs:{span:24}},[t("a-card",{attrs:{title:"基本信息",bordered:!1}},[t("a-descriptions",{attrs:{column:5}},[t("a-descriptions-item",{attrs:{label:"Redis版本"}},[e.cache.info?t("span",[e._v(e._s(e.cache.info.redis_version))]):e._e()]),t("a-descriptions-item",{attrs:{label:"运行模式"}},[e.cache.info?t("span",[e._v(e._s("standalone"==e.cache.info.redis_mode?"单机":"集群"))]):e._e()]),t("a-descriptions-item",{attrs:{label:"端口"}},[e.cache.info?t("span",[e._v(e._s(e.cache.info.tcp_port))]):e._e()]),t("a-descriptions-item",{attrs:{label:"客户端数"}},[e.cache.info?t("span",[e._v(e._s(e.cache.info.connected_clients))]):e._e()]),t("a-descriptions-item",{attrs:{label:"运行时间(天)"}},[e.cache.info?t("span",[e._v(e._s(e.cache.info.uptime_in_days))]):e._e()]),t("a-descriptions-item",{attrs:{label:"使用内存"}},[e.cache.info?t("span",[e._v(e._s(e.cache.info.used_memory_human))]):e._e()]),t("a-descriptions-item",{attrs:{label:"使用CPU"}},[e.cache.info?t("span",[e._v(e._s(parseFloat(e.cache.info.used_cpu_user_children).toFixed(2)))]):e._e()]),t("a-descriptions-item",{attrs:{label:"内存配置"}},[e.cache.info?t("span",[e._v(e._s(e.cache.info.maxmemory_human))]):e._e()]),t("a-descriptions-item",{attrs:{label:"AOF是否开启"}},[e.cache.info?t("span",[e._v(e._s("0"==e.cache.info.aof_enabled?"否":"是"))]):e._e()]),t("a-descriptions-item",{attrs:{label:"RDB是否成功"}},[e.cache.info?t("span",[e._v(e._s(e.cache.info.rdb_last_bgsave_status))]):e._e()]),t("a-descriptions-item",{attrs:{label:"Key数量"}},[e.cache.dbSize?t("span",[e._v(e._s(e.cache.dbSize))]):e._e()]),t("a-descriptions-item",{attrs:{label:"系统架构"}},[e.cache.info?t("span",[e._v(" "+e._s(e.cache.info.instantaneous_input_kbps)+"kps/"+e._s(e.cache.info.instantaneous_output_kbps)+"kps")]):e._e()])],1)],1)],1)],1),t("a-row",{staticStyle:{"margin-top":"16px"},attrs:{gutter:16}},[t("a-col",{attrs:{span:12}},[t("a-card",{attrs:{title:"命令统计",bordered:!1}},[t("div",{ref:"commandstats",staticStyle:{height:"420px","z-index":"2"}}),t("div",{staticClass:"commandstats_bg"})])],1),t("a-col",{attrs:{span:12}},[t("a-card",{attrs:{title:"内存信息",bordered:!1}},[t("div",{ref:"usedmemory",staticStyle:{height:"420px"}})])],1)],1)],1)],1)},i=[],c=a("ceee"),s=a("313e"),o={name:"Cache",data:function(){return{loading:!0,commandstats:null,usedmemory:null,cache:[]}},filters:{},created:function(){this.getList()},computed:{},watch:{},methods:{getList:function(){var e=this;this.loading=!0,Object(c["c"])().then((function(t){var a=t.data;e.cache=a,e.loading=!1,e.$nextTick((function(){e.commandstats=s["b"](e.$refs.commandstats,"macarons"),e.commandstats.setOption({tooltip:{trigger:"item",formatter:"{a} <br/> {b} : {c} ({d}%)"},color:["#36cfc9","#4CAF50","#F44336","#FF9800","#c8d2e0","#4782DA","#9254de"],legend:{bottom:"1%",left:"center",itemGap:8},series:[{name:"命令",type:"pie",radius:["60%","70%"],center:["50%","45%"],data:t.data.commandStats,animationEasing:"cubicInOut",animationDuration:1e3,label:{fontSize:"18",fontWeight:"bold",position:"center",formatter:"{b}\r\n\r\n {c}({d}%) ",show:!0,textBorderWidth:"16"},itemStyle:{borderRadius:0,borderColor:"#fff",borderWidth:2},emphasis:{label:{fontSize:"18",show:!0,textBorderWidth:"16"}}}]}),e.usedmemory=s["b"](e.$refs.usedmemory,"macarons"),e.usedmemory.setOption({tooltip:{formatter:"{b} <br/>{a} : "+e.cache.info.used_memory_human},series:[{name:"峰值",type:"gauge",progress:{show:!0,width:14},color:["#4782DA"],axisLine:{lineStyle:{width:14}},axisTick:{show:!1},splitLine:{length:4,lineStyle:{width:2,color:"#999"}},anchor:{show:!0,showAbove:!0,size:20,itemStyle:{borderWidth:4,borderColor:["#4782DA"]}},axisLabel:{distance:25,color:"#999",fontSize:14},radius:"90%",center:["50%","50%"],min:0,max:1e3,detail:{fontSize:24,valueAnimation:!0,formatter:e.cache.info.used_memory_human},data:[{value:parseFloat(e.cache.info.used_memory_human),name:"内存消耗"}]}]})}))}))}}},r=o,d=(a("21fb"),a("2877")),l=Object(d["a"])(r,n,i,!1,null,null,null);t["default"]=l.exports},ceee:function(e,t,a){"use strict";a.d(t,"c",(function(){return i})),a.d(t,"f",(function(){return c})),a.d(t,"a",(function(){return s})),a.d(t,"e",(function(){return o})),a.d(t,"b",(function(){return r})),a.d(t,"d",(function(){return d}));var n=a("b775");function i(){return Object(n["b"])({url:"/monitor/cache",method:"get"})}function c(){return Object(n["b"])({url:"/monitor/cache/listCacheName",method:"get"})}function s(e){return Object(n["b"])({url:"/monitor/cache/clearCache/"+e,method:"post"})}function o(e){return Object(n["b"])({url:"/monitor/cache/listCacheKey/"+e,method:"get"})}function r(e,t){return Object(n["b"])({url:"/monitor/cache/clearCacheByKey/"+e+"/"+t,method:"post"})}function d(e,t){return Object(n["b"])({url:"/monitor/cache/getCacheValue/"+e+"/"+t,method:"get"})}}}]);