Add statistics page showing redirect preference usage counts

Closes #3570991

Added a "Statistics" page as a tab next to the settings page. The page displays a table showing:

  • Route label
  • Route path
  • Number of users with that preference

It also shows:

  • Deleted routes (routes in user data but no longer in config) - helps detect broken settings
  • Users with no preference set (using default)

Changes made

  1. Added src/Controller/StatisticsController.php - Controller that queries the users_data table and builds the statistics table
  2. Updated user_preference_login_redirect.routing.yml - Added route for /admin/config/people/user-preference-login-redirect/statistics
  3. Updated user_preference_login_redirect.links.task.yml - Added tab link to settings page
  4. Updated tests/src/Functional/UserPreferenceLoginRedirectTest.php - Added tests for statistics page

Merge request reports

Loading