|
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
export default {
data() {
return {
time: '',
loading: true,
tableLoading: true,
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 渲染出颜色、描述和单位
textInfo: {
'jvm.memory.max': {color: 'purple', text: 'JVM 最大内存', unit: 'MB'},
'jvm.memory.committed': {color: 'purple', text: 'JVM 可用内存', unit: 'MB'},
'jvm.memory.used': {color: 'purple', text: 'JVM 已用内存', unit: 'MB'},
'jvm.buffer.memory.used': {color: 'cyan', text: 'JVM 缓冲区已用内存', unit: 'MB'},
'jvm.buffer.count': {color: 'cyan', text: '当前缓冲区数量', unit: '个'},
'jvm.threads.daemon': {color: 'green', text: 'JVM 守护线程数量', unit: '个'},
'jvm.threads.live': {color: 'green', text: 'JVM 当前活跃线程数量', unit: '个'},
'jvm.threads.peak': {color: 'green', text: 'JVM 峰值线程数量', unit: '个'},
'jvm.classes.loaded': {color: 'orange', text: 'JVM 已加载 Class 数量', unit: '个'},
'jvm.classes.unloaded': {color: 'orange', text: 'JVM 未加载 Class 数量', unit: '个'},
'jvm.gc.memory.allocated': {color: 'pink', text: 'GC 时, 年轻代分配的内存空间', unit: 'MB'},
'jvm.gc.memory.promoted': {color: 'pink', text: 'GC 时, 老年代分配的内存空间', unit: 'MB'},
'jvm.gc.max.data.size': {color: 'pink', text: 'GC 时, 老年代的最大内存空间', unit: 'MB'},
'jvm.gc.live.data.size': {color: 'pink', text: 'FullGC 时, 老年代的内存空间', unit: 'MB'},
'jvm.gc.pause.count': {color: 'blue', text: '系统启动以来GC 次数', unit: '次'},
'jvm.gc.pause.totalTime': {color: 'blue', text: '系统启动以来GC 总耗时', unit: '秒'}
},
// 当一条记录中需要取出多条数据的时候需要配置该字段
moreInfo: {
'jvm.gc.pause': ['.count', '.totalTime']
|
|
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
loadTomcatInfo() {
this.tableLoading = true
this.time = moment().format('YYYY年MM月DD日 HH时mm分ss秒')
Promise.all([
getAction('actuator/metrics/jvm.memory.max'),
getAction('actuator/metrics/jvm.memory.committed'),
getAction('actuator/metrics/jvm.memory.used'),
getAction('actuator/metrics/jvm.buffer.memory.used'),
getAction('actuator/metrics/jvm.buffer.count'),
getAction('actuator/metrics/jvm.threads.daemon'),
getAction('actuator/metrics/jvm.threads.live'),
getAction('actuator/metrics/jvm.threads.peak'),
getAction('actuator/metrics/jvm.classes.loaded'),
getAction('actuator/metrics/jvm.classes.unloaded'),
getAction('actuator/metrics/jvm.gc.memory.allocated'),
getAction('actuator/metrics/jvm.gc.memory.promoted'),
getAction('actuator/metrics/jvm.gc.max.data.size'),
getAction('actuator/metrics/jvm.gc.live.data.size'),
getAction('actuator/metrics/jvm.gc.pause')
]).then((res) => {
|