Docs: user and administrator guides, screenshots; fix Generate and Leases layout
Generate credentials no longer shows a raw JSON box for roles that take no input, and lease rows get proper button styling. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3fa32b5076
commit
4d0740dd97
21 files changed
+389
-5
No files matched your search
@@ -99,6 +99,8 @@ export function RoleEditor({
|
||||
noun = 'role',
|
||||
showName = true,
|
||||
nameLabel,
|
||||
title: titleOverride,
|
||||
rawJson = true,
|
||||
submitLabel = 'Save',
|
||||
draft,
|
||||
pending,
|
||||
@@ -114,6 +116,10 @@ export function RoleEditor({
|
||||
showName?: boolean
|
||||
/** Label for the name field; defaults to "<Noun> name". */
|
||||
nameLabel?: string
|
||||
/** Replaces the generated form title. */
|
||||
title?: string
|
||||
/** Show a raw JSON box when the schema has no fields (generic engines). False for forms that take no input. */
|
||||
rawJson?: boolean
|
||||
submitLabel?: string
|
||||
draft: RoleDraft
|
||||
pending: boolean
|
||||
@@ -122,7 +128,7 @@ export function RoleEditor({
|
||||
onSubmit: () => void
|
||||
onCancel: () => void
|
||||
}) {
|
||||
const title = draft.isNew ? `New ${noun}` : showName ? `Edit ${draft.name}` : `Edit ${noun}`
|
||||
const title = titleOverride ?? (draft.isNew ? `New ${noun}` : showName ? `Edit ${draft.name}` : `Edit ${noun}`)
|
||||
function submit(e: FormEvent) {
|
||||
e.preventDefault()
|
||||
onSubmit()
|
||||
@@ -137,10 +143,12 @@ export function RoleEditor({
|
||||
</label>
|
||||
)}
|
||||
{kind.fields.length === 0 ? (
|
||||
<label>
|
||||
Role (JSON)
|
||||
rawJson && (
|
||||
<label>
|
||||
Role (JSON)
|
||||
<textarea value={draft.json} onChange={(e) => onChange({ ...draft, json: e.target.value })} rows={10} spellCheck={false} />
|
||||
</label>
|
||||
</label>
|
||||
)
|
||||
) : (
|
||||
kind.fields.map((f) => (
|
||||
<Field
|
||||
|
||||
Reference in new issue
Block a user