Extract namespace specific logic into new SaaS component
What does this MR do and why?
This MR is part of the preparatory work to be able to reuse Code Suggestions Usage related components for both SaaS and SM.
This MR extracts namespace specific logic into new SaaS component in Code Suggestions Usage flow
- Creates a new component for SaaS add-on eligible user list which has namespace specific logic and query and display it for SaaS
- There will be a similar component for SM alongside this file which will be used in SM instance
- Makes existing
add-on-eligible-list.vue
component more generic - Update
search_and_sort_bar.vue
component for optionalfullPath
- Renames GQL query props for pagination to be consistent
- Updates and adds tests for the above
More context around this approach can be found here - !138714 (closed)
List of MRs that do the preparatory work for reuse from both flows:
Related to #432440
Screenshots or screen recordings
No visual changes are introduced in this MR. Screenshots below are making sure that the existing functionality still works.
Before | After |
---|---|
Pagination |
Screenshot |
Search and search input validation |
Screenshot |
Add-on eligible users fetch error and error dismissal |
Screenshot |
Loading state | |
No pages state | |
No users to display |
How to set up and validate locally
Application setup
- Customers Dot needs to be setup in order to view the billing page for a group
- Start GDK in SaaS mode
GITLAB_SIMULATE_SAAS=1 gdk start
Group setup
- Create a Group
- Buy a Subscription for your group from
Settings
>Billing
Feature flag
Run the following in your rails console
Feature.enable(:hamilton_seat_management, Namespace.find(your-group-id))
Add-on purchase
Purchase an add-on for the subscription purchased above in Group setup
step by following the instructions here (under Add Code Suggestions Add-On to a subscription
section).
Code Suggestions tab
- Visit
/groups/<your-namespace-name>/-/usage_quotas#code-suggestions-usage-tab
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.