Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 2.12 KB

File metadata and controls

61 lines (41 loc) · 2.12 KB

Admin Dashboard Ingest Trigger

Overview

The Admin Dashboard now includes a Trigger Ingestion action accessible from the hamburger menu under admin options.

This is intended for administrators who need to pull new advisories immediately instead of waiting for the scheduled ingestion job.

How it works

  • The button is visible only to users with the ADMIN role.
  • Access it via the hamburger menu (☰) → Trigger Ingestion.
  • Clicking opens a confirmation modal.
  • Confirming the action sends a POST request to:
POST /api/v1/admin/ingest/trigger
  • The request is CSRF-protected and respects the same Spring Security rules as the rest of the application.
  • A success or error toast is shown after the request completes.

What to expect

After the trigger request is accepted:

  • The API responds with 202 Accepted.
  • Ingestion continues asynchronously in the background.
  • You can check progress through:
GET /api/v1/admin/ingest/status

Audit and observability

The trigger endpoint logs the action server-side so the manual ingestion request is visible in application logs and operational traces.

Testing notes

When testing locally:

  1. Sign in with an ADMIN user.
  2. Open the dashboard at /dashboard.
  3. Click the hamburger menu (☰) icon in the top-right corner.
  4. Click Trigger Ingestion in the menu.
  5. Confirm the modal action.
  6. Verify that the 202 Accepted response is returned and the ingest status endpoint reflects the background run.

UI placement and accessibility

  • The button is now part of the hamburger menu, positioned under User Management as an admin-only option.
  • The trigger button markup is in templates/dashboard/fragments/nav.html (within the nav-dropdown).
  • The modal includes proper ARIA attributes (role="dialog", aria-modal="true") and keyboard focus management.
  • Modal functions (openIngestModal, closeIngestModal, confirmIngest) are defined in templates/dashboard/index.html.

Related documentation