Show graph minutes, since we now have a smaller resolution

This commit is contained in:
Johannes Zellner
2020-05-22 16:33:27 +02:00
parent 034b2b2ddd
commit 87c895bd76
2 changed files with 3 additions and 3 deletions

View File

@@ -615,8 +615,8 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
// translate the data from bytes to MB
var datapoints = data.datapoints.map(function (d) { return parseInt((d[0] / 1024 / 1024).toFixed(2)); });
var labels = datapoints.map(function (d, index) {
var dateTime = new Date(Date.now() - ((timePeriod - (index * timeBucketSize)) * 60 *1000));
return ('0' + dateTime.getHours()).slice(-2) + ':00';
var dateTime = new Date(Date.now() - ((timePeriod - (index * timeBucketSize)) * 60 * 1000));
return ('0' + dateTime.getHours()).slice(-2) + ':' + ('0' + dateTime.getMinutes()).slice(-2);
});
var data = {