Add modal to Buy storage button
What does this MR do and why?
Add a modal window with information for customers that have limitations to buy storage. Currently feature is behind limited_access_modal
FF.
Criteria to show the modal:
-
limited_access_modal
FF is ON - ramp or reseller subscription (in this case API returns
canAddSeats: false
. We rely on this field even though we add not seats but storage here
We have this modal already implemented for Add seats
button !131533 (merged)
Related to #409750 (closed)
Screenshots or screen recordings
Buy Storage on a standard card | Buy storage on Excess Breakdown card |
---|---|
Screen_Recording_2023-09-20_at_16.12.25 | Screen_Recording_2023-09-20_at_14.05.12 |
How to set up and validate locally
- Create a ramp subscription
- Create a reseller subscription
- Create a subscription without either reseller or ramp attributes
- Run
rails c
and then `Feature.enable(:limited_access_modal)
For both ramp + reseller subscriptions:
- Link it to a GL namespace either in the CDot UI (
subscriptions/SUBSCRIPTION_NAME/edit?transaction=change_gitlab_group
) or via the rails console - In GL, navigate to
/groups/GROUP_NAME/-/usage_quotas#storage-quota-tab
- Verify that
Buy storage
button appears as usual - Verify that clicking the button displays the modal and it has a different text for RAMP and RESELLER
- Verify that closing out of the modal functions properly
For old flow - hardcode isUsingProjectEnforcement: false
in ee/app/assets/javascripts/usage_quotas/storage/init_namespace_storage.js#L46
For the regular subscription:
- Link it to a GL namespace either in the CDot UI (
subscriptions/SUBSCRIPTION_NAME/edit?transaction=change_gitlab_group
) or via the rails console - In GL, navigate to
/groups/GROUP_NAME/-/usage_quotas#storage-quota-tab
- Verify that
Buy storage
button appears as usual - Verify that clicking the button takes you to CDot to add seats
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.
Edited by Diana Zubova