Add options to graphs

This commit is contained in:
Girish Ramakrishnan
2019-08-20 19:38:32 -07:00
parent f80bf65076
commit 22664bea62
2 changed files with 9 additions and 7 deletions

View File

@@ -1215,7 +1215,7 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
});
};
Client.prototype.graphs = function (targets, from, callback) {
Client.prototype.graphs = function (targets, from, options, callback) {
var config = {
params: {
target: targets,
@@ -1224,6 +1224,8 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}
};
if (options.noNullPoints) config.params.noNullPoints = true;
get('/api/v1/cloudron/graphs', config, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));