Add options to graphs
This commit is contained in:
@@ -43,7 +43,7 @@ angular.module('Application').controller('GraphsController', ['$scope', '$locati
|
||||
if (app === 'system') target = 'summarize(collectd.localhost.memory.memory-used, "' + timeBucketSize + 'min", "avg")';
|
||||
else target = 'summarize(collectd.localhost.table-' + app.id + '-memory.gauge-rss, "' + timeBucketSize + 'min", "avg")';
|
||||
|
||||
Client.graphs([target], '-' + timePeriod + 'min', function (error, result) {
|
||||
Client.graphs([target], '-' + timePeriod + 'min', {}, function (error, result) {
|
||||
if (error) return console.log('Unable to get graphs.', error);
|
||||
|
||||
// translate the data from bytes to MB
|
||||
@@ -137,7 +137,7 @@ angular.module('Application').controller('GraphsController', ['$scope', '$locati
|
||||
'absolute(collectd.localhost.df-' + diskName + '.df_complex-free)',
|
||||
'absolute(collectd.localhost.df-' + diskName + '.df_complex-reserved)',
|
||||
'absolute(collectd.localhost.df-' + diskName + '.df_complex-used)'
|
||||
], '-1min', function (error, data) {
|
||||
], '-1min', {}, function (error, data) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
disk.size = bytesToGigaBytes(data[2].datapoints[0][0] + data[1].datapoints[0][0] + data[0].datapoints[0][0]);
|
||||
@@ -149,11 +149,11 @@ angular.module('Application').controller('GraphsController', ['$scope', '$locati
|
||||
return 'absolute(collectd.localhost.du-' + content.id + '.capacity-usage)';
|
||||
});
|
||||
|
||||
Client.graphs(graphiteQueries, '-1min', function (error, data) {
|
||||
Client.graphs(graphiteQueries, '-1min', {}, function (error, data) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
disk.contains.forEach(function (content, index) {
|
||||
content.usage = bytesToGigaBytes(data[index].datapoints[0][0]);
|
||||
content.usage = bytesToGigaBytes(data[index].datapoints[0][1]);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -174,7 +174,7 @@ angular.module('Application').controller('GraphsController', ['$scope', '$locati
|
||||
targets.push('summarize(collectd.localhost.memory.memory-free, "1min", "avg")');
|
||||
targetsInfo.push({ label: 'Free', color: '#27CE65' });
|
||||
|
||||
Client.graphs(targets, '-1min', function (error, result) {
|
||||
Client.graphs(targets, '-1min', {}, function (error, result) {
|
||||
if (error) return console.log(error);
|
||||
|
||||
$scope.memoryUsageSystem = result.map(function (data, index) {
|
||||
@@ -223,7 +223,7 @@ angular.module('Application').controller('GraphsController', ['$scope', '$locati
|
||||
while (targets.length > 0) tmp.push(targets.splice(0, 10));
|
||||
|
||||
asyncForEach(tmp, function (targets, callback) {
|
||||
Client.graphs(targets, '-1min', function (error, result) {
|
||||
Client.graphs(targets, '-1min', {}, function (error, result) {
|
||||
if (error) return callback(error);
|
||||
|
||||
aggregatedResult = aggregatedResult.concat(result);
|
||||
|
||||
Reference in New Issue
Block a user