代码拉取完成,页面将自动刷新
同步操作将从 sanluan/dwz for Public CMS 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<title>使用报表</title>
<script src="resource/js/jquery-1.9.1.min.js"></script>
<script src="resource/js/echarts.common.min.js"></script>
</head>
<body>
<a href=""><h1 style="margin:20px;">系统监控</h1></a>
<div id="memory" style="width:300px;margin:20px;float:left;"></div>
<div id="memory_count" style="width:300px;margin:20px;float:left;"></div>
<div id="disk" style="width:300px;margin:20px;float:left;"></div>
<script>
document.getElementById('memory').style.height=document.getElementById('memory').offsetWidth+'px';
document.getElementById('memory_count').style.height=document.getElementById('memory_count').offsetWidth+'px';
document.getElementById('disk').style.height=document.getElementById('disk').offsetWidth+'px';
var memoryChart={
chart:echarts.init(document.getElementById('memory')),
countChart:echarts.init(document.getElementById('memory_count')),
data:{
freeMemory:[300,200,100,300,200,100,300,200,100],
usedMemory:[100,200,300,100,200,300,100,200,300],
unUsedMemory:[200,200,200,200,200,200,200,200,200]
},
time:[1,2,3,4,5,6,7,8,9],
toDecimal:function(number) {
var value = parseFloat(number);
if (isNaN(value)) {
return 0;
}
value = Math.round(number*100)/100;
return value;
}
};
memoryChart.chart.setOption({
title: {
text: '内存监测'
},
tooltip : {
trigger: 'axis'
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: memoryChart.time
},
yAxis: {
type: 'value'
},
series: [
{
name:'实际使用',
type:'line',
stack: '总量',
areaStyle: {normal: {}},
data:memoryChart.data.usedMemory
},
{
name:'闲置内存',
type:'line',
stack: '总量',
areaStyle: {normal: {}},
data:memoryChart.data.freeMemory
},
{
name:'可用剩余',
type:'line',
stack: '总量',
areaStyle: {normal: {}},
data:memoryChart.data.unUsedMemory
}]
});
memoryChart.countChart.setOption({
title : {
text: '内存使用',
subtext: '占用内存',
x:'center'
},
tooltip : {
trigger: 'item',
formatter: "{a} <br/>{b} : {c} ({d}%)",
position: [10, 10]
},
toolbox: {
feature: {
saveAsImage: {}
}
},
series : [
{
name: '内存使用',
type: 'pie',
radius : '55%',
center: ['50%', '60%'],
data:[
{value:40, name:'已用'},
{value:60, name:'闲置'}
]
}
]
});
echarts.init(document.getElementById('disk')).setOption({
title : {
text: '站点磁盘:20G',
subtext: '/data/publiccms/',
x:'center'
},
tooltip : {
trigger: 'item',
formatter: "{a} <br/>{b} : {c} ({d}%)",
position: [10, 10]
},
toolbox: {
feature: {
saveAsImage: {}
}
},
series : [
{
name: '磁盘空间',
type: 'pie',
radius : '55%',
center: ['50%', '60%'],
data:[
{value:60, name:'已用'},
{value:40, name:'空闲'}
]
}
]
});
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。