1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d216d93"],{c3e2:function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t._self._c;return e("a-skeleton",{attrs:{active:"",loading:t.loading,paragraph:{rows:17}}},[e("a-card",{attrs:{bordered:!1}},[e("a-alert",{attrs:{type:"info",showIcon:!0}},[e("div",{attrs:{slot:"message"},slot:"message"},[t._v("\n 上次更新时间:"+t._s(this.time)+"\n "),e("a-divider",{attrs:{type:"vertical"}}),e("a",{on:{click:t.handleClickUpdate}},[t._v("立即更新")])],1)]),e("a-table",{staticStyle:{"margin-top":"20px"},attrs:{rowKey:"id",size:"middle",columns:t.columns,dataSource:t.dataSource,pagination:!1,loading:t.tableLoading},scopedSlots:t._u([{key:"param",fn:function(a,o){return[e("a-tag",{attrs:{color:t.textInfo[o.param].color}},[t._v(t._s(a))])]}},{key:"text",fn:function(e,a){return[t._v("\n "+t._s(t.textInfo[a.param].text)+"\n ")]}},{key:"value",fn:function(e,a){return[t._v("\n "+t._s(e)+" "+t._s(t.textInfo[a.param].unit)+"\n ")]}}])})],1)],1)},c=[],s=a("c1df"),n=a.n(s),r=a("0fea");n.a.locale("zh-cn");var i={data:function(){return{time:"",loading:!0,tableLoading:!0,columns:[{title:"参数",width:"30%",dataIndex:"param",scopedSlots:{customRender:"param"}},{title:"描述",width:"40%",dataIndex:"text",scopedSlots:{customRender:"text"}},{title:"当前值",width:"30%",dataIndex:"value",scopedSlots:{customRender:"value"}}],dataSource:[],textInfo:{"tomcat.sessions.created":{color:"green",text:"tomcat 已创建 session 数",unit:"个"},"tomcat.sessions.expired":{color:"green",text:"tomcat 已过期 session 数",unit:"个"},"tomcat.sessions.active.current":{color:"green",text:"tomcat 当前活跃 session 数",unit:"个"},"tomcat.sessions.active.max":{color:"green",text:"tomcat 活跃 session 数峰值",unit:"个"},"tomcat.sessions.rejected":{color:"green",text:"超过session 最大配置后,拒绝的 session 个数",unit:"个"},"tomcat.global.sent":{color:"purple",text:"发送的字节数",unit:"bytes"},"tomcat.global.request.max":{color:"purple",text:"request 请求最长耗时",unit:"秒"},"tomcat.global.request.count":{color:"purple",text:"全局 request 请求次数",unit:"次"},"tomcat.global.request.totalTime":{color:"purple",text:"全局 request 请求总耗时",unit:"秒"},"tomcat.servlet.request.max":{color:"cyan",text:"servlet 请求最长耗时",unit:"秒"},"tomcat.servlet.request.count":{color:"cyan",text:"servlet 总请求次数",unit:"次"},"tomcat.servlet.request.totalTime":{color:"cyan",text:"servlet 请求总耗时",unit:"秒"},"tomcat.threads.current":{color:"pink",text:"tomcat 当前线程数(包括守护线程)",unit:"个"},"tomcat.threads.config.max":{color:"pink",text:"tomcat 配置的线程最大数",unit:"个"}},moreInfo:{"tomcat.global.request":[".count",".totalTime"],"tomcat.servlet.request":[".count",".totalTime"]}}},mounted:function(){this.loadTomcatInfo()},methods:{handleClickUpdate:function(){this.loadTomcatInfo()},loadTomcatInfo:function(){var t=this;this.tableLoading=!0,this.time=n()().format("YYYY年MM月DD日 HH时mm分ss秒"),Promise.all([Object(r["c"])("actuator/metrics/tomcat.sessions.created"),Object(r["c"])("actuator/metrics/tomcat.sessions.expired"),Object(r["c"])("actuator/metrics/tomcat.sessions.active.current"),Object(r["c"])("actuator/metrics/tomcat.sessions.active.max"),Object(r["c"])("actuator/metrics/tomcat.sessions.rejected"),Object(r["c"])("actuator/metrics/tomcat.global.sent"),Object(r["c"])("actuator/metrics/tomcat.global.request.max"),Object(r["c"])("actuator/metrics/tomcat.global.request"),Object(r["c"])("actuator/metrics/tomcat.threads.current"),Object(r["c"])("actuator/metrics/tomcat.threads.config.max")]).then((function(e){var a=[];e.forEach((function(e,o){var c=t.moreInfo[e.name];c instanceof Array||(c=[""]),c.forEach((function(t,c){var s=e.name+t;a.push({id:s+o,param:s,text:"false value",value:e.measurements[c].value})}))})),t.dataSource=a})).catch((function(e){t.$message.error("获取Tomcat信息失败")})).finally((function(){t.loading=!1,t.tableLoading=!1}))}}},l=i,u=a("2877"),m=Object(u["a"])(l,o,c,!1,null,null,null);e["default"]=m.exports}}]);
|