This commit is contained in:
guange 2019-01-22 14:48:56 +08:00
parent 5b21458e0d
commit f1528326be
1 changed files with 6 additions and 2 deletions

View File

@ -2,6 +2,10 @@ var symptomName = last_month_day();
$(function(){ $(function(){
var to_g = function(v){
return (parseInt(v)/1024/1024).toFixed(1);
}
//更新抓取信息 //更新抓取信息
setInterval(function(){ setInterval(function(){
@ -18,8 +22,8 @@ $(function(){
$.ajax('/myapp/api/platform_info.json').done(function(data){ $.ajax('/myapp/api/platform_info.json').done(function(data){
$('#disk_freed').html(data.disk_freed+'G'); $('#disk_freed').html(data.disk_freed+'G');
$('#disk_used').html(data.disk_used+'G'); $('#disk_used').html(data.disk_used+'G');
$('#mem_free').html(data.mem_free+'G'); $('#mem_free').html(to_g(data.mem_total-data.mem_used)+'G');
$('#mem_used').html(data.mem_used+'G'); $('#mem_used').html(to_g(data.mem_used)+'G');
$('#tasks_count').html(data.tasks); $('#tasks_count').html(data.tasks);
}); });