"use strict"; const React = require("react"); const Layout = require("../layout.jsx"); const DebugView = require("../../components/debug-view.jsx"); module.exports = { query: { resources: { lvm: { volumeGroups: { name: true, totalSpace: true, freeSpace: true, physicalVolumes: { path: true, format: true, totalSpace: true, freeSpace: true, isAllocatable: true, isUsed: true, isDuplicate: true, }, logicalVolumes: { name: true, path: true, size: true, status: true, type: true, healthStatus: true, isReadOnly: true, creationTime: true } } } } }, template: function ({ data }) { function SegmentBar({ items }) { let columns = items .map((item) => `${item.value}fr`) .join(" "); return (
{items.map((item) => { return (
{item.label}
); })}
); } return ( {data.resources.lvm.volumeGroups.map((volumeGroup) => { return (<>

{volumeGroup.name}

Physical volumes:
{ return { key: physicalVolume.path, value: Math.round(physicalVolume.totalSpace.toMiB().amount), label: `${physicalVolume.path} (${physicalVolume.totalSpace.toDisplay(2)})` }; })} />
Volume group:
Logical volumes:
{ return { key: logicalVolume.name, value: Math.round(logicalVolume.size.toMiB().amount), label: `${logicalVolume.name} (${logicalVolume.size.toDisplay(2)})` }; })} />
); })}
); } };