Do not throw exception if no app graph data is yet available

This commit is contained in:
Johannes Zellner
2020-05-15 11:49:02 +02:00
parent 29b0785594
commit c38c440e63

View File

@@ -607,6 +607,8 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
var timeBucketSize = $scope.graphs.period > 24 ? (6*60) : 5;
function fillGraph(canvasId, data, label, chartPropertyName, max) {
if (!data) return; // no data available yet
// 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) {