longhorn support

* longhorn widget for showing storage stats as "disks"
This commit is contained in:
James Wynn 2022-10-25 13:35:38 -05:00
parent c4333fd2dc
commit 8887fcc3ee
5 changed files with 173 additions and 13 deletions

View file

@ -39,19 +39,7 @@ export default async function handler(req, res) {
}
});
}
// Maybe Storage CSI can provide this information
// if (type === "disk") {
// if (!existsSync(target)) {
// return res.status(404).json({
// error: "Target not found",
// });
// }
//
// return res.status(200).json({
// drive: await drive.info(target || "/"),
// });
// }
//
if (type === "memory") {
const SCALE_MB = 1024 * 1024;
const usedMemMb = memUsage / SCALE_MB;