Use explicit app graphs api

This commit is contained in:
Johannes Zellner
2022-09-14 13:03:24 +02:00
parent be72bfdb9f
commit 380b41a1b4
2 changed files with 13 additions and 8 deletions

View File

@@ -1797,6 +1797,15 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
});
};
Client.prototype.getAppGraphs = function (appId, fromMinutes, callback) {
get('/api/v1/apps/' + appId + '/graphs', { params: { fromMinutes: fromMinutes } }, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data);
});
};
Client.prototype.graphs = function (targets, from, options, callback) {
// if we have a lot of apps, targets can be very large. node will just disconnect since it exceeds header size
var size = 10, chunks = [];