Fix dashboard system usage refresh bug
This commit is contained in:
parent
3c4f22234b
commit
18d0657321
|
@ -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']);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue