metrics: add route to query app metrics with the system
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user