1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

Change timers for ajax

This commit is contained in:
Retspen 2015-03-23 15:47:47 +02:00
parent a2d1314a75
commit a4fffee182
3 changed files with 14 additions and 7 deletions

View file

@ -133,7 +133,7 @@
responsive: true
});
function graph_usage() {
window.setInterval(function graph_usage() {
$.getJSON('{% url 'compute_graph' compute_id %}', function (data) {
cpuChart.scale.xLabels = data.timeline;
memChart.scale.xLabels = data.timeline;
@ -144,10 +144,6 @@
cpuChart.update();
memChart.update();
});
}
$(function () {
window.setInterval(graph_usage(), 4000);
});
}, 5000);
</script>
{% endblock %}