console/SWSCloudWeb/templates/default/containers/stats.html

47 lines
1.6 KiB
HTML
Raw Normal View History

2015-12-01 02:45:57 +03:00
{% extends "default/_layout.html" %}
{% block title %}Статистика{% endblock %}
2016-01-20 12:15:49 +03:00
{% block head %}
<script type="text/javascript">
window.onload = function () {
2016-01-23 17:49:03 +03:00
var chart = new CanvasJS.Chart("chartContainer", {
title:{text: "Использование оперативной памяти"},
2016-01-20 12:15:49 +03:00
animationEnabled: true,
2016-01-23 17:49:03 +03:00
axisY: { title: "", valueFormatString: "#0,,.", suffix: "MB" },
data: [{
toolTipContent: "{y} байт",
2016-01-20 12:15:49 +03:00
type: "splineArea",
markerSize: 5,
color: "rgba(54,158,173,.7)",
dataPoints: [
2016-01-21 02:52:54 +03:00
{% for s in stats_memory %}
2016-06-12 01:33:23 +03:00
{ x: new Date({{ s.year }}, {{ s.month }}, {{ s.day }}, {{ s.hour }}, {{ s.minute }}), {
{
s.data
}
} },
2016-01-21 02:52:54 +03:00
{% endfor %}
2016-01-20 12:15:49 +03:00
]
}
]
}
2016-06-12 01:33:23 +03:00
)
2016-01-20 12:15:49 +03:00
chart.render();
}
</script>
2016-01-20 12:52:04 +03:00
<script type="text/javascript" src="{{ url_for('static', filename='js/vendor/canvasjs.min.js') }}"></script>
2016-01-20 12:15:49 +03:00
{% endblock %}
2015-12-01 02:45:57 +03:00
{% block content %}
<div class="row">
<div class="large-12 columns">
<h3>Статистика</h3>
</div>
</div>
<div class="row">
2016-01-20 12:15:49 +03:00
<div id="chartContainer" style="height: 300px; width: 100%;">
</div>
2015-12-01 02:45:57 +03:00
</div>
{% endblock %}