Ability to filter add on eligible users by assigned seats
What does this MR do and why?
This MR implements frontend functionality to be able to sort eligible users list by assigned seat. Context here: [Duo Provisioning] Iteration 2: Add ability to ... (&14683 - closed)
The search bar takes in filter params as input and they are passed to Grpahql which will be implemented in the next step as a part of Adjust eligible users list API to return filter... (#488507 - closed).
Note:
-
backend is not implemented yet, and this functionality is behind a FF
enable_add_on_users_filtering
- Due to shift in priorities and partial implementation in the past, we will be releasing
Assigned seat
filtering first, prior toProject
andGroups
based filtering under https://gitlab.com/groups/gitlab-org/-/epics/14983+. So we momentarily limit filter option to only includeAssigned seat
, but keep the core codes of Project and Groups based filtering to be fully implemented at the later point of time.
Screenshots or screen recordings
Section | Screenshot |
---|---|
Usage Quotas |
![]() |
Gitlab Duo |
![]() |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Needs both
gdk
and CustomersDot running forSaaS/SM
(setup guide) - In Rails console, enable Code Suggestions
Feature.enable(:hamilton_seat_management)
- In Rails console, enable the filtering FF
Feature.enable(:enable_add_on_users_filtering)
To assign Code Suggestions seats to your group:
SaaS:
- In Rails console,
add_on = GitlabSubscriptions::AddOn.find_or_create_by!(name: "code_suggestions") {|e| e.description = "Test"}
- In Rails console,
GitlabSubscriptions::AddOnPurchase.create!(add_on: add_on, namespace: Namespace.find(<you-name-space-id>), expires_on: 21.month.from_now, quantity: 5, purchase_xid: 'A-S0002')
- Visit any group or project member pages such as
http://localhost:3000/groups/flightjs/-/usage_quotas#code-suggestions-usage-tab
Self-managed:
- In Rails console,
add_on = GitlabSubscriptions::AddOn.find_or_create_by!(name: "code_suggestions") {|e| e.description = "Test"}
- In Rails console,
GitlabSubscriptions::AddOnPurchase.create!(add_on: add_on, expires_on: 21.month.from_now, quantity: 5, purchase_xid: 'A-S0002')
- Visit admin section's Duo area
http://localhost:3000/admin/code_suggestions
Related to #488507 (closed)
Edited by Divya Mahadevan