Loading
Replace JSON output with GlTableLite in UserOverridesList
What does this MR do and why?
Replace JSON output with GlTableLite in UserOverridesList, displaying real users in a form, in a preparation for edit actions
MR series
|
# |
MR |
Status |
|---|---|---|
| 1 |
Add UserOverridesList component with data fetching and pagination |
|
| 2 | Add read-only table with editable inputs and toggles |
|
| 3 | Add Save and Remove buttons with mutation |
|
| 4 | Add no-op "Add override" button |
|
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 table, with an edit form (currently non-interactive)
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

