Main Pages¶
Guide for creating list-style “main pages” in the FreeIPA Modern WebUI. A main page is the top-level landing page for an entity (e.g. Active Users, Hosts, DNS Zones). It displays a searchable, paginated table with bulk selection, toolbar actions, and modals for add/delete operations.
Main pages live under src/pages/<EntityName>/ and are named after the entity itself (e.g. Hosts.tsx, DnsZones.tsx). Files with suffixes like Settings, Tabs, Table, or PreSettings are not main pages — they are sub-components consumed by main pages or detail views.
Guide Files¶
Each file below covers a specific, self-contained topic (~100–200 lines). Load only the file(s) relevant to your task.
File |
Contents |
Lines |
|---|---|---|
What is a main page, required & optional inputs, example prompt, what gets generated |
~85 |
|
Folder structure, page anatomy (10-step pattern), required & optional imports |
~105 |
|
Route setup, API version, data fetching with |
~195 |
|
Selection management, button state, modal state, data wrappers, toolbar items |
~200 |
|
JSX render, |
~200 |
|
Files to create/modify checklist, |
~105 |
|
Add modal structure, props interface, code organization, error handling, template |
~175 |
|
Add modal field types, UI components, validation, naming conventions |
~130 |
|
Delete modal props, |
~195 |
|
RPC service file template (find+show pattern, add/delete/show/mod endpoints) |
~190 |
|
|
~130 |
Quick Reference¶
To generate a new main page: read 01-overview.md for input requirements, then provide all required inputs alongside this index and the relevant sub-files as context.
To implement a specific part:
Add modal → 07-add-modal.md, 07b-add-modal-fields.md
Delete modal → 08-delete-modal-and-utils.md
Entity utils (
apiToEntity,createEmpty) → 08-delete-modal-and-utils.mdRPC service file → 09-rpc-service.md
Navigation registration → 10-routing-and-conventions.md
Files checklist → 06-checklist-and-types.md