Refactoring of Duo UI components before adding Duo with Amazon Q

What does this MR do and why?

We want to introduce Duo with Amazon Q to the Duo frontend. For this we want to make this change as easy as possible and because of that I want to introduce this refactoring here.

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

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

Before After
http://localhost:3000/admin/gitlab_duo image.png image.png
http://localhost:3000/admin/gitlab_duo/seat_utilization image.png image.png
http://localhost:3000/admin/gitlab_duo/configuration image.png image.png

How to set up and validate locally

Simple verification

The logic does not change, so a green test suite is sufficient.

Extended verification

Requirement

  • Local GitLab instance
  • Self-Managed Ultimate license

Steps

  1. Start your GitLab instance in Self-Managed mode.
    • Execute for that the following command export GITLAB_SIMULATE_SAAS=0; gdk restart
  2. Ensure you have applied a Self-Managed Ultimate license
  3. Provision yourself a Duo Enterprise add-on purchase
    • Go to the Rails console and execute the following command

      GitlabSubscriptions::AddOnPurchase.create!(
        subscription_add_on_id: GitlabSubscriptions::AddOn.find_by(name: "duo_enterprise").id,
        expires_on: 1.month.from_now,
        quantity: 1,
        purchase_xid: 123,
        started_at: 1.day.ago,
        namespace_id: nil,
        organization: Organizations::Organization.first
      )
  4. Surf through the following pages and ensure that the components get rendered and you can assign and unassign seats
Edited by Lukas Wanko

Merge request reports

Loading