mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
Added graph scale for instance
This commit is contained in:
parent
02570cd826
commit
4a17f08740
5 changed files with 302 additions and 16 deletions
|
|
@ -81,7 +81,7 @@
|
|||
</div>
|
||||
{% endblock %}
|
||||
{% block script %}
|
||||
<script src="{{ STATIC_URL }}/js/Chart.min.js"></script>
|
||||
<script src="{{ STATIC_URL }}js/Chart.min.js"></script>
|
||||
<script>
|
||||
var cpuLineData = {
|
||||
labels : [0, 0, 0, 0, 0],
|
||||
|
|
@ -133,7 +133,7 @@
|
|||
responsive: true
|
||||
});
|
||||
|
||||
function hostusage() {
|
||||
function graph_usage() {
|
||||
$.getJSON('{% url 'compute_graph' compute_id %}', function (data) {
|
||||
cpuChart.scale.xLabels = data.timeline;
|
||||
memChart.scale.xLabels = data.timeline;
|
||||
|
|
@ -145,8 +145,9 @@
|
|||
memChart.update();
|
||||
});
|
||||
}
|
||||
|
||||
$(function () {
|
||||
window.setInterval('hostusage()', 4000);
|
||||
window.setInterval(graph_usage(), 4000);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue