"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,
						status: true
					},
					logicalVolumes: {
						name: true,
						path: true,
						size: true,
						status: true,
						type: true,
						healthStatus: true,
						isReadOnly: true,
						creationTime: true
					}
				}
			}
		}
	},
	template: function ({ data }) {
		return (
			<Layout title="LVM">
				<DebugView value={data} />
			</Layout>
		);
	}
};
