Skip to content

Connect environment actions to folder

What does this MR do and why?

This MR implements #433112 (closed) and is a part of a bigger effort to refactor the Folder page of Environments area.

In the scope of this MR we add the necessary elements for environment actions. We add and connect to apollo the modal dialogs shown before environment actions, as well as Active and Stopped tabs to show the environments

Implementation of pagination will come in the following MR.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Active tab Stopped tab
Screenshot_2023-12-04_at_17.53.18 Screenshot_2023-12-04_at_17.53.33

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Enable a feature toggle:
Feature.enable(:environments_folder_new_look)
  1. Navigate to a project that has environments with folders. If you don't have one, use the following gitlab-ci configuration:
deploy:dev/static-files-1:
  stage: deploy
  script: echo "done"
  environment: dev/static-files-1

deploy:dev/static-files-2:
  stage: deploy
  script: echo "done"
  environment: dev/static-files-2

deploy:stg/static-files-1:
  stage: deploy
  script: echo "done"
  environment: stg/static-files-1
  
deploy:stg/static-files-2:
  stage: deploy
  script: echo "done"
  environment: stg/static-files-2

deploy:prd/static-files-1:
  stage: deploy
  script: echo "done"
  environment: prd/static-files-1

deploy:prd/static-files-2:
  stage: deploy
  script: echo "done"
  environment: prd/static-files-2
  1. Navigate to Environments page
  2. Expand an environment folder and click Show All link Screenshot_2023-11-16_at_12.33.44
  3. Check that the new folder page contains environments located in that folder and has Active and Stopped tabs.
  4. Interact with the environment and try to stop it, redeploy, etc. All the associated modals and actions should be shown and executed properly
  5. Check that when switching between Active and Stopped tabs a scope query parameter is changed accordingly
  6. Check that the correct tab is opened when the page is refreshed while scope query parameter is present

MR acceptance checklist

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

Edited by Andrei Zubov

Merge request reports