Loading
Add override modal wired to UpsertUserBudgetCapOverrides mutation
What does this MR do and why?
Integrate user credit cap overrides modal addition with the UpsertUserBudgetCapOverrides mutation.
MR series
| # | MR | Status |
|---|---|---|
| 1 | Add UserOverridesList component with data fetching and pagination | |
| 2 | Replace JSON output with GlTableLite in UserOverridesList | |
| 3 | Add Save and Remove mutation wiring to UserOverridesList | |
| 4 | Add override modal UI | |
| 5 | Add override modal wired to UpsertUserBudgetCapOverrides mutation |
References
- Part of https://gitlab.com/gitlab-org/gitlab/-/work_items/596232
- Related to https://gitlab.com/gitlab-org/gitlab/-/work_items/624327
Screenshots or screen recordings
note: the recording uses this patch to submit a negative number:
diff --git a/ee/app/assets/javascripts/usage_quotas/wallet_agnostic_credits_dashboard/credit_caps/components/add_user_override_modal.vue b/ee/app/assets/javascripts/usage_quotas/wallet_agnostic_credits_dashboard/credit_caps/components/add_user_override_modal.vue
index f684d6ea565e..93d61c0f8b12 100644
--- a/ee/app/assets/javascripts/usage_quotas/wallet_agnostic_credits_dashboard/credit_caps/components/add_user_override_modal.vue
+++ b/ee/app/assets/javascripts/usage_quotas/wallet_agnostic_credits_dashboard/credit_caps/components/add_user_override_modal.vue
@@ -160,7 +160,7 @@ export default {
id="add-cap-override-cap-input"
v-model.number="cap"
type="number"
- min="0"
+ min="-100"
step="1"
required
:disabled="isSaving"
How to set up and validate locally
Prerequisites: self-managed GitLab instance with the Credits Dashboard enabled.
- Enable SM instance.
- Open
http://localhost:3000/admin/gitlab_credits_dashboard/credit_caps. - Click the Add override button in the "Per-user cap overrides" card header.
- Verify the modal opens with a user input field and a cap/enabled inputs.
- Enter a user GID, cap value, and toggle status.
- Click Add override — verify the override is created via the
UpsertUserBudgetCapOverridesmutation and the list refreshes. - Ensure that:
- On save the modal closes
- On cancel the modal closes
- On open the form is cleared
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
-
Edited by Kos Palchyk