graphs: make interval configurable

This commit is contained in:
Girish Ramakrishnan
2025-05-20 19:09:12 +02:00
parent 3428b95672
commit 892ff38a3f
8 changed files with 44 additions and 41 deletions
+2 -2
View File
@@ -83,10 +83,10 @@ function create() {
if (error || result.status !== 201) return [error || result];
return [null, result.body.taskId];
},
async graphs(fromMinutes) {
async graphs(options) {
let error, result;
try {
result = await fetcher.get(`${API_ORIGIN}/api/v1/system/graphs`, { fromMinutes, access_token: accessToken });
result = await fetcher.get(`${API_ORIGIN}/api/v1/system/graphs`, { fromSecs: options.fromSecs, intervalSecs: options.intervalSecs, access_token: accessToken });
} catch (e) {
error = e;
}