metrics: add route to query app metrics with the system

This commit is contained in:
Girish Ramakrishnan
2025-07-07 10:09:36 +02:00
parent 24975d670e
commit 369474a0bc
4 changed files with 30 additions and 15 deletions
+8 -1
View File
@@ -66,7 +66,14 @@ async function onPeriodChange() {
if (period.value.hours === 0) return await liveRefresh();
const [error, metrics] = await systemModel.getMetrics({ fromSecs: period.value.hours * 60 * 60, intervalSecs: period.value.intervalSecs });
const options = {
fromSecs: period.value.hours * 60 * 60,
intervalSecs: period.value.intervalSecs,
system: true,
appIds: [],
serviceIds: []
};
const [error, metrics] = await systemModel.getMetrics(options);
if (error) return console.error(error);
cpuGraphItem.value.setData(metrics.system.cpu);