Sub-Pages — Overview¶
Part of: Sub-Pages guide See also: Best Practices | Tabs Component | Checklist
A sub-page is a detail view for a single entity, accessed by clicking a row in a main page table.
Tab Types¶
Type |
Description |
Example |
|---|---|---|
Settings |
Form with editable properties |
|
Member Of |
Groups entity belongs to |
|
Members |
Entities inside this one |
|
Managed By |
Entities that manage this |
|
Independent |
Entity-specific table with Add/Delete |
|
Required Input¶
Input |
Example |
|---|---|
Entity name |
|
IPA API object |
|
Primary key |
|
Parent pathname |
|
Tabs |
|
Tab Shorthand¶
Shorthand |
Component |
|---|---|
|
|
|
|
|
|
|
|
|
|
Example Prompts¶
Settings-only:
Based on the sub-pages guide, generate a sub-page for 'Roles' with:
- IPA API object: `role`
- Primary key: `cn`
- Parent pathname: `roles`
- Settings title: "Role settings"
- Settings fields: `cn` → "Name" (read-only), `description` → "Description"
Settings + Membership:
- Tabs: `memberof_group`, `managedby_host`
Independent Sub-Page:
Based on the sub-pages guide, generate a 'Privileges' independent page for 'Roles' with:
- IPA API object: `role`
- Data field: `memberof_privilege` (string[])
- Table column: "Privilege name"
- 'Add' modal: `privilege_find` with `no_members: true`, `role_add_privilege`
- 'Delete' modal: `role_remove_privilege`
Files Generated¶
Condition |
Files |
|---|---|
Settings |
|
Membership |
|
Independent |
|
Always |
Routes in |
⚠️ Enable Clicking from Main Page¶
In <Entity>.tsx:
<MainTable showLink={true} pathname="<parent-pathname>" />
Without showLink={true}, rows are not clickable!
RPC Endpoints Needed¶
Reference: API.txt contains the full specification (options, inputs, outputs) for every IPA API command. Use it to determine which fields a command accepts and what parameters are required.
Tab Type |
Commands |
|---|---|
Settings |
|
Membership |
|
Independent |
|