diff --git a/src/views/app.js b/src/views/app.js index b4c4fdd1e..7238725cd 100644 --- a/src/views/app.js +++ b/src/views/app.js @@ -730,7 +730,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location' // fill holes with previous value var cur = 0; - content.data.datapoints.forEach(function (d) { + content.data.forEach(function (d) { if (d[0] === null) d[0] = cur; else cur = d[0]; }); @@ -738,7 +738,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location' var datapoints = Array(steps).map(function () { return '0'; }); // walk backwards and fill up the datapoints - content.data.datapoints.reverse().forEach(function (d, index) { + content.data.reverse().forEach(function (d, index) { datapoints[datapoints.length-1-index] = (d[0] / divisor).toFixed(2); // return parseInt((d[0] / divisor).toFixed(2)); }); diff --git a/src/views/system.js b/src/views/system.js index 90cbcc8ac..d4292c6f8 100644 --- a/src/views/system.js +++ b/src/views/system.js @@ -173,7 +173,7 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati // fill holes with previous value var cur = 0; - content.data.datapoints.forEach(function (d) { + content.data.forEach(function (d) { if (d[0] === null) d[0] = cur; else cur = d[0]; }); @@ -181,7 +181,7 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati var datapoints = Array(steps).map(function () { return '0'; }); // walk backwards and fill up the datapoints - content.data.datapoints.reverse().forEach(function (d, index) { + content.data.reverse().forEach(function (d, index) { datapoints[datapoints.length-1-index] = (d[0] / divisor).toFixed(2); }); @@ -249,7 +249,7 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati return result.apps[appId]; }).filter(function (app) { if (!app.cpu) return false; // not sure why we get empty objects - return app.cpu.datapoints.some(function (d) { return d[0] > cpuThreshold; }); + return app.cpu.some(function (d) { return d[0] > cpuThreshold; }); }).map(function (app) { return { data: app.cpu, label: app.label }; }); @@ -265,7 +265,7 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati return result.apps[appId]; }).filter(function (app) { if (!app.memory) return false; // not sure why we get empty objects - return app.memory.datapoints.some(function (d) { return d[0] > memoryThreshold; }); + return app.memory.some(function (d) { return d[0] > memoryThreshold; }); }).map(function (app) { return { data: app.memory, label: app.label }; });