system: dmi information

This commit is contained in:
Girish Ramakrishnan
2023-12-04 00:31:18 +01:00
parent 8a20b603f5
commit 72083f59cd
5 changed files with 43 additions and 3 deletions

View File

@@ -11,7 +11,8 @@ exports = module.exports = {
getLogStream,
getSystemGraphs,
getBlockDevices,
getCpus
getCpus,
getDmi
};
const assert = require('assert'),
@@ -151,3 +152,10 @@ async function getCpus(req, res, next) {
next(new HttpSuccess(200, { cpus }));
}
async function getDmi(req, res, next) {
const [error, dmi] = await safe(system.getDmi());
if (error) return next(BoxError.toHttpError(error));
next(new HttpSuccess(200, { dmi }));
}