Loading
Add UserOverridesList component with data fetching and pagination
What does this MR do and why?
Adds a draft per-user budget cap overrides list on the Credit Caps page. This MR focuses on API integration, error handling and pagination.
MR series
| # | MR | Status |
|---|---|---|
| 1 | Add UserOverridesList component with data fetching and pagination | |
| 2 | Add read-only table with editable inputs and toggles | TBC |
| 3 | Add Save and Remove buttons with mutation | TBC |
| 4 | Add no-op "Add override" button | TBC |
References
Screenshots or screen recordings
| before | after |
|---|---|
![]() |
![]() |
How to set up and validate locally
Prerequisites: self-managed GitLab instance with the Credits Dashboard enabled. .
-
Enable SM
-
Open
/-/graphql-explorer -
Find some user's Global IDs
query {
users { # OR users(usernames: ["alice.smith"])
nodes {
id
name
username
}
}
}- Create a per-user cap override for the found users (can use
gid://gitlab/User/1for admin)
mutation ($overrides: UpsertUserBudgetCapOverridesInput!) {
upsertUserBudgetCapOverrides(input: $overrides) {
userOverrides {
cap
capEnabled
user {
username
}
}
errors
}
}with variables:
{
"overrides": {
"overrides": [
{
"userId": "gid://gitlab/User/1",
"cap": 20,
"enabled": true
}
]
}
}- Open http://localhost:3000/admin/gitlab_credits_dashboard/credit_caps
- Verify that new records show-up in the JSON output
Alternatively
- Start Storybook
yarn storybook:start - Verify these stories work:
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

