Expand description
Admin page assembler.
Every admin page is rendered by minijinja against the templates
bundled under rustio-core/assets/templates/. The functions here
build the typed context dicts the templates consume — no HTML is
concatenated in Rust. Bootstrap 5 CSS/JS and admin.css/app.js
ship from rustio-core/assets/static/ and are served under
/admin/static/… by the core (see admin::templating).
Structs§
- Applied
File View - Legacy
Entry Model - Adapter that implements
AdminUiModelfor a legacycrate::admin::AdminEntryso the template-basedlist_rendercan serve its rows without a separate rendering path. No form / mutation behaviour — legacy create / edit / delete still flow throughmount_model’s literal routes; this adapter only needs to describe the table shape well enough for the list view. - Suggestion
Applied View - Suggestion
Review View - User
Admin - Demo
AdminUiModelregistered as"users". Backs the/admin-new/usersroute. The struct is unit; all metadata lives in the trait impl.
Functions§
- actions_
render - Render
admin/actions.html— the project-wide audit timeline. - dashboard_
render - 0.10+ dashboard renderer. Collects the registry-driven entry list,
builds a typed context, and lets
minijinjarenderadmin/dashboard.html. - enrich_
fields_ for_ form - Produce
model.fields()with FK options populated when the source is a legacyAdminEntry. For new-engine models the registration code is responsible for its own options — we pass those through unchanged. - form_
render - Render the form page for
GET /admin/:model/new(whenediting_id = None) orGET /admin/:model/:id/edit(whenediting_id = Some(id)). - list_
render - 0.10+ list-page renderer. Searchable / filter / sort / paginate
query runs through
fetch_users_table_state; the page renders viaminijinja. Create / edit / delete actions are RBAC-gated by the caller. - new_
user_ admin - Factory used by the registry to produce a fresh boxed model per
request.
UserAdminis zero-sized so the allocation is free. - password_
change_ done_ render - Render
admin/password_change_done.html. - password_
change_ render - Render
admin/password_change.html.errorshows as an alert banner on top when the previous submit failed. - profile_
render - 0.10+ renderer for
GET /admin/profile. Builds the merged sidebar (same as dashboard / list) and rendersadmin/profile.html. - suggestion_
applied_ render - Render
admin/suggestion_applied.html— success page after a suggestion is applied. - suggestion_
review_ render - Render
admin/suggestion_review.html. All AI-pipeline work (planner, reviewer, diff, confidence) happens in the caller; this function only lays out the values.