headplane/src/pages/machines.astro
Ryan Malloy 09b1bae157 ui: shadcn-ui + React island shells for pages, Redis session store
Rewrite the dashboard, machines, users, dns, and settings pages as thin
Astro shells that mount a matching React island (Dashboard, MachinesPage,
UsersPage, DnsPage, SettingsPage) built on the shadcn-ui component
library. Alpine.js templates in those pages are replaced wholesale;
Alpine still ships as the runtime for the ACL editor's dependencies.

- src/components/ui/*: shadcn primitives (button, card, tabs, select,
  dropdown-menu, avatar, badge, input, switch, separator)
- src/components/{dashboard,dns,machines,settings,users}/*: page-level
  React shells that consume server props from the Astro parent
- src/components/shell/AppShell.tsx: shared chrome (nav, user menu)
- src/lib/utils.ts: shadcn's cn() helper
- src/lib/auth/session-manager.ts: pluggable SessionStore interface with
  Redis (via REDIS_URL) or in-memory backends; both honor absolute
  expiration via TTL. In-memory logs a warning that sessions vanish on
  restart.
- src/lib/auth/oidc-client.ts, oidc-state.ts: shrink OIDC handlers now
  that PKCE + nonce state travels in a signed JWT cookie
- src/pages/api/auth/*: match the simplified handlers
- src/styles/global.css, tailwind.config.mjs, tsconfig.json: shadcn
  design tokens and the '@/*' path alias
- docker-compose.local.yml: local dev tweaks
- package.json, pnpm-lock.yaml: shadcn + Radix + ioredis + zod
2026-08-20 10:25:35 -06:00

25 lines
675 B
Text

---
// 🤠 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>