Add time to admin graph

This commit is contained in:
2019-07-07 13:00:14 +02:00
parent af82db3b3e
commit 6f0cbee326

View File

@@ -20,7 +20,7 @@
<script src="/res/script/jquery.js"></script> <script src="/res/script/jquery.js"></script>
<script src="/res/misc/chartjs/Chart.min.js"></script> <script src="/res/misc/chartjs/Chart.min.js"></script>
<script> <script>
$.get(apiEndpoint+"/admin/files/timeseries", function(response){ $.get(apiEndpoint+"/admin/files/timeseries/10", function(response){
console.log(response); console.log(response);
if (response.success) { if (response.success) {
var ctx = document.getElementById('bandwidth_chart'); var ctx = document.getElementById('bandwidth_chart');
@@ -70,7 +70,7 @@
id: "y_bandwidth", id: "y_bandwidth",
scaleLabel: { scaleLabel: {
display: true, display: true,
labelString: "Downloads" labelString: "Bandwidth"
} }
}, { }, {
type: "linear", type: "linear",
@@ -99,6 +99,8 @@
}); });
</script> </script>
{{else}}
<h1 style="text-align: center;">;)</h1>
{{end}} {{end}}
{{template "footer"}} {{template "footer"}}
</div> </div>