headplane/src/pages/machines.astro

26 lines
675 B
Text
Raw Normal View History

---
// 🤠 Heady Machines — Astro shell, React island.
import { getCollection } from 'astro:content';
import Layout from '@/layouts/Layout.astro';
import { MachinesPage } from '@/components/machines/MachinesPage';
const allMachines = await getCollection('machines');
const machines = allMachines.map((m) => ({
id: m.data.id,
name: m.data.name,
hostname: m.data.hostname,
ip_address: m.data.ip_address,
online: m.data.online,
expired: m.data.expired,
os: m.data.os ?? 'unknown',
user: m.data.user,
tags: m.data.tags,
last_seen: m.data.last_seen,
}));
---
<Layout title="Machines" hideChrome={true}>
<MachinesPage client:load machines={machines} />
</Layout>