Adapt Duo UI for Duo with Amazon Q

What does this MR do and why?

Add support for the new Duo with Amazon Q add-on to the Duo interface for self-managed instances.

This merge request is based on the branch lw/517922-refactoring-duo-ui that should merge before this code change. See also the following table for a better understanding:

Description Merge request
Preceding refactoring before the introduction of Duo with Amazon Q to the frontend Refactoring of Duo UI components before adding ... (!183079 - merged).
Introduction of Duo with Amazon Q to the frontend 👈 You're 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

  • With Duo with Amazon Q add-on purchase
  • Without code change

After

  • With Duo with Amazon Q add-on purchase
  • With code change

http://localhost:3000/admin/gitlab_duo

image.png

image.png

http://localhost:3000/admin/gitlab_duo/seat_utilization

image.png

image.png

How to set up and validate locally

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 with Amazon Q add-on purchase
    • Go to the Rails console and execute the following command

      GitlabSubscriptions::AddOnPurchase.create!(
        subscription_add_on_id: GitlabSubscriptions::AddOn.find_or_create_by(
          name: 'duo_amazon_q',
          description: GitlabSubscriptions::AddOn.descriptions[:duo_amazon_q]
        ).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, you can assign and unassign seats and that there are no errors in the web console.
Edited by Lukas Wanko

Merge request reports

Loading