(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d873dda6"],{"402e":function(e,t,a){},5911: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:"380px","z-index":"2"}})])],1),t("a-col",{attrs:{span:12}},[t("a-card",{attrs:{title:"内存信息",bordered:!1}},[t("div",{ref:"usedmemory",staticStyle:{height:"380px"}})])],1)],1)],1)],1)},o=[],i=(a("b0c0"),a("d3b7"),a("159b"),a("ceee")),s=a("313e"),c={name:"Cache",data:function(){return{loading:!0,commandstats:null,usedmemory:null,cache:[]}},filters:{},created:function(){this.getList("0")},mounted:function(){var e=this;window.addEventListener("resize",(function(){e.commandstats.resize(),e.usedmemory.resize()}))},computed:{},watch:{},methods:{getList:function(e){var t=this;"0"===e&&(this.loading=!0),Object(i["c"])().then((function(a){var n=a.data;t.cache=n,"0"===e&&(t.loading=!1),t.$nextTick((function(){var e=a.data.commandStats,n=[],o=[];e.forEach((function(e){return n.push(e.name)})),e.forEach((function(e){return o.push(e.value)})),t.commandstats=s["b"](t.$refs.commandstats,"macarons"),t.commandstats.setOption({title:{textStyle:{fontSize:16,fontWeight:"600",color:"#333"},left:8,top:8},tooltip:{trigger:"axis"},grid:{left:"2%",right:"2%",bottom:"2%",top:"8%",containLabel:!0},xAxis:[{type:"category",data:n,axisTick:{alignWithLabel:!0},axisLabel:{show:!0,rotate:0,margin:8,textStyle:{color:"#666",fontSize:"14"}},axisLine:{lineStyle:{color:"#dfe6ff",width:1}}}],yAxis:[{type:"value"}],series:[{name:"使用次数",type:"bar",barWidth:"20%",itemStyle:{barBorderRadius:[4,4,0,0],color:new s["a"].LinearGradient(0,0,0,1,[{offset:0,color:"#2881e6"},{offset:.5,color:"#308bf2"},{offset:1,color:"#3693fb"}])},data:o}]}),t.usedmemory=s["b"](t.$refs.usedmemory,"macarons"),t.usedmemory.setOption({tooltip:{formatter:"{b} <br/>{a} : "+t.cache.info.used_memory_human},series:[{name:"峰值",type:"gauge",progress:{show:!0,width:14},color:new s["a"].LinearGradient(0,0,0,1,[{offset:0,color:"#2881e6"},{offset:.5,color:"#308bf2"},{offset:1,color:"#3693fb"}]),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:new s["a"].LinearGradient(0,0,0,1,[{offset:0,color:"#2881e6"},{offset:.5,color:"#308bf2"},{offset:1,color:"#3693fb"}])}},axisLabel:{distance:25,color:"#999",fontSize:14},radius:"90%",center:["50%","56%"],min:0,max:1e3,detail:{fontSize:24,valueAnimation:!0,formatter:t.cache.info.used_memory_human},data:[{value:parseFloat(t.cache.info.used_memory_human),name:"内存消耗"}]}]})}))}))}}},r=c,d=(a("6e9d"),a("2877")),l=Object(d["a"])(r,n,o,!1,null,null,null);t["default"]=l.exports},"6e9d":function(e,t,a){"use strict";a("402e")},ceee:function(e,t,a){"use strict";a.d(t,"c",(function(){return o})),a.d(t,"f",(function(){return i})),a.d(t,"a",(function(){return s})),a.d(t,"e",(function(){return c})),a.d(t,"b",(function(){return r})),a.d(t,"d",(function(){return d}));var n=a("b775");function o(){return Object(n["b"])({url:"/monitor/cache",method:"get"})}function i(){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 c(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"})}}}]);