Skip to content

Add "Load more" button to environment dropdown

Alexander Turinske requested to merge 340339-infinite-scroll-envs into master

What does this MR do and why?

Add "Load more" button to environment dropdown

  • previously the dropdown would load all environments
  • limit the number of environments loaded and add a button to explicitely load more
  • consolidate Vuex logic into one file
  • create new Vuex state to track environments status
  • update tests (I did get a little carried away with updating the tests, but they all look a lot better now)

How to set up and validate locally

  1. Upload a GitLab Ultimate license
  2. Navigate to a project with Security & Compliance enabled
  3. Create some environments in Infastructure => Environments
  4. Navigate to Security & Compliage => Policies
  5. Verify the Environment filter
  6. Click the New Policy button
  7. Verify the Environment filter on the Policy Editor page
  8. Navigate to Security & Compliage => Threat Monitoring => Statistics tab
  9. Use this snippet to create some data
  10. Verify the Environment filter on the Policy Editor page

Screenshots or screen recordings

Page Screenshot
Policies List - All Environments option
Policies List - Load more button
Changing Environments changing_environments
Loading dropdown-loading
Policies List - when there are no more environments to load
Policy Editor policy_editor
Statistics Tab statistics

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #340339 (closed)

Edited by Alexander Turinske

Merge request reports