Skip to main content

Module layout

Module layout 

Source
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§

AppliedFileView
LegacyEntryModel
Adapter that implements AdminUiModel for a legacy crate::admin::AdminEntry so the template-based list_render can serve its rows without a separate rendering path. No form / mutation behaviour — legacy create / edit / delete still flow through mount_model’s literal routes; this adapter only needs to describe the table shape well enough for the list view.
SuggestionAppliedView
SuggestionReviewView
UserAdmin
Demo AdminUiModel registered as "users". Backs the /admin-new/users route. 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 minijinja render admin/dashboard.html.
enrich_fields_for_form
Produce model.fields() with FK options populated when the source is a legacy AdminEntry. 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 (when editing_id = None) or GET /admin/:model/:id/edit (when editing_id = Some(id)).
list_render
0.10+ list-page renderer. Searchable / filter / sort / paginate query runs through fetch_users_table_state; the page renders via minijinja. 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. UserAdmin is 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. error shows 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 renders admin/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.