修改展示
This commit is contained in:
parent
a8fbb1d572
commit
fbcf8e48fd
@ -38,16 +38,25 @@
|
||||
<div :id="'disk_' + index" class="disk-info"></div>
|
||||
</div>
|
||||
</div>
|
||||
<blockquote class="layui-elem-quote">
|
||||
<span><b>CPU使用情况(%)</b></span>
|
||||
</blockquote>
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-sm12">
|
||||
<div id="cpu" class="cpu-info"></div>
|
||||
</div>
|
||||
</div>
|
||||
<blockquote class="layui-elem-quote">
|
||||
<span><b>内存使用情况(GB)</b></span>
|
||||
</blockquote>
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-sm12">
|
||||
<div id="memory" class="cpu-info"></div>
|
||||
</div>
|
||||
</div>
|
||||
<blockquote class="layui-elem-quote">
|
||||
<span><b>JVM使用情况(MB)</b></span>
|
||||
</blockquote>
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-sm12">
|
||||
<div id="jvm" class="cpu-info"></div>
|
||||
@ -67,6 +76,7 @@
|
||||
}).use(['index', 'laydate'], function(){
|
||||
var $ = layui.$;
|
||||
var clientId = top.restAjax.params(window.location.href).clientId;
|
||||
var firstLoading = true;
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
@ -97,7 +107,7 @@
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '磁盘占用',
|
||||
name: '磁盘占用情况',
|
||||
type: 'gauge',
|
||||
radius: '85%',
|
||||
axisLine: {
|
||||
@ -111,7 +121,7 @@
|
||||
min: 0,
|
||||
max: disk.total,
|
||||
detail: {formatter: '{value}GB'},
|
||||
data: [{value: (parseFloat(disk.total) - parseFloat(disk.usable)).toFixed(2), name: '磁盘使用'}]
|
||||
data: [{value: (parseFloat(disk.total) - parseFloat(disk.usable)).toFixed(2), name: '磁盘占用'}]
|
||||
}
|
||||
]
|
||||
});
|
||||
@ -133,9 +143,6 @@
|
||||
}
|
||||
var echart = echarts.init(document.getElementById('cpu'));
|
||||
echart.setOption({
|
||||
title: {
|
||||
text: 'CPU使用情况(%)'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
formatter: function(params, ticket, callback) {
|
||||
@ -218,9 +225,6 @@
|
||||
}
|
||||
var echart = echarts.init(document.getElementById('memory'));
|
||||
echart.setOption({
|
||||
title: {
|
||||
text: '内存使用情况(GB)'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
formatter: function(params, ticket, callback) {
|
||||
@ -298,9 +302,6 @@
|
||||
}
|
||||
var echart = echarts.init(document.getElementById('jvm'));
|
||||
echart.setOption({
|
||||
title: {
|
||||
text: 'JVM使用情况(MB)'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
formatter: function(params, ticket, callback) {
|
||||
@ -366,6 +367,7 @@
|
||||
},
|
||||
initClientInfo: function() {
|
||||
var self = this;
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/client/getclientinfobyclientid/{clientId}', [clientId]), {}, null, function(code, data) {
|
||||
self.system = data.data.system;
|
||||
self.diskList = data.data.diskList;
|
||||
@ -386,7 +388,14 @@
|
||||
})
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
})
|
||||
}, function() {
|
||||
if(firstLoading) {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||
firstLoading = false;
|
||||
}
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
|
Loading…
Reference in New Issue
Block a user