View Source AshAdmin.Resource (ash_admin v0.10.0)
An API extension to alter the behaviour of a resource in the admin UI.
Table of Contents:
- admin
- form
- field
- form
DSL Docs:
admin
Configure the admin dashboard for a given resource.
- form
- field
:name
(String.t/0
) - The proper name to use when this resource appears in the admin interface.:actor?
(boolean/0
) - Whether or not this resource can be used as the actor for requests.:show_action
(atom/0
) - The action to use when linking to the resource/viewing a single record. Defaults to the primary read action.:read_actions
(list ofatom/0
) - A list of read actions that can be used to show resource details. By default, all actions are included.:create_actions
(list ofatom/0
) - A list of create actions that can create records. By default, all actions are included.:update_actions
(list ofatom/0
) - A list of update actions that can be used to update records. By default, all actions are included.:destroy_actions
(list ofatom/0
) - A list of destroy actions that can be used to destroy records. By default, all actions are included.:polymorphic_tables
(list ofString.t/0
) - For resources that use ash_postgres' polymorphism capabilities, you can provide a list of tables that should be available to select. These will be added to the list of derivable tables based on scanning all APIs and resources provided to ash_admin.:polymorphic_actions
(list ofatom/0
) - For resources that use ash_postgres' polymorphism capabilities, you can provide a list of actions that should require a table to be set. If this is not set, then all actions will require tables.:table_columns
(list ofatom/0
) - The list of attributes to render on the table view.:format_fields
(list ofterm/0
) - The list of fields and their formats.:relationship_display_fields
(list ofatom/0
) - The list of attributes to render when it's shown as a relationship on a datatable:resource_group
(atom/0
) - The group in the top resource dropdown that the resource appears in.
form
Configure the appearance of fields in admin forms.
field
Declare non-default behavior for a specific attribute.
:name
(atom/0
) - Required. The name of the field to be modified:type
- Required. The type of the value in the form. Usedefault
if you are just specifying field order Valid values are :default, :long_text, :short_text, :markdown