Fix dashboard system usage refresh bug

This commit is contained in:
Manson Wang 2013-11-06 09:29:57 +08:00
parent 3c4f22234b
commit 18d0657321
1 changed files with 2 additions and 3 deletions

View File

@ -48,18 +48,17 @@ $(function () {
valueFontColor: '#666', valueFontColor: '#666',
labelFontColor: '#666', labelFontColor: '#666',
label: '%', label: '%',
refreshAnimationTime: 200 refreshAnimationTime: 800
}); });
update_usage(Gage); update_usage(Gage);
setInterval(function() { update_usage(Gage); }, Gage['update_interval']);
}); });
}); });
function update_usage(Gage){ function update_usage(Gage){
$.get('/admin/dashboards/'+Gage['fn'],function(usage){ $.get('/admin/dashboards/'+Gage['fn'],function(usage){
Gage['JustGage'].refresh(parseInt(usage)); Gage['JustGage'].refresh(parseInt(usage));
setTimeout(function(){update_usage(Gage);},Gage['update_interval']);
}); });
} }