From 18d0657321404cfe68e7a8c0de2bfc2977c1af4a Mon Sep 17 00:00:00 2001 From: Manson Wang Date: Wed, 6 Nov 2013 09:29:57 +0800 Subject: [PATCH] Fix dashboard system usage refresh bug --- app/views/admin/dashboards/_server_loading.erb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/views/admin/dashboards/_server_loading.erb b/app/views/admin/dashboards/_server_loading.erb index 04ae6003..443010d4 100644 --- a/app/views/admin/dashboards/_server_loading.erb +++ b/app/views/admin/dashboards/_server_loading.erb @@ -48,18 +48,17 @@ $(function () { valueFontColor: '#666', labelFontColor: '#666', label: '%', - refreshAnimationTime: 200 + refreshAnimationTime: 800 }); update_usage(Gage); - - setInterval(function() { update_usage(Gage); }, Gage['update_interval']); }); }); function update_usage(Gage){ $.get('/admin/dashboards/'+Gage['fn'],function(usage){ Gage['JustGage'].refresh(parseInt(usage)); + setTimeout(function(){update_usage(Gage);},Gage['update_interval']); }); }