-
Notifications
You must be signed in to change notification settings - Fork 3
AAP-57069 Optimize initial loading #158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
☂️ Python Coverage
Overall Coverage
New Files
Modified Files
|
|
@kcagran do you have an issue that is tracking this work? |
AlexSCorey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good start. I haven't spun up the code locally yet, as I just had time to look at the code. I've left a few questions, and found some things in the code we need to address.
No, we don't have any at the moment, This PR is a result of https://aap2-prod-bastion-us-west-2.ops.demo.redhat.com:8447/, where initial loading takes 30+s. At the previous sync it was announced that @Priya would create a jira ticket regarding this. |
AAP-57069 |
ff086f8 to
627bee6
Compare
627bee6 to
3173dad
Compare
3173dad to
ad511ab
Compare
|
cursor review |
5caec20 to
ec66d6e
Compare
This pull request refactors the backend API to provide dedicated endpoints for listing labels, projects, organizations, and job templates, instead of returning these lists as part of the template options endpoint. It introduces new serializers, views, and URL routes for these resources, updates related tests, and removes their serialization from the template options logic. The frontend is also updated to handle the new data format for filters.
Backend API restructuring:
LabelSerializer,ProjectSerializer,OrganizationSerializer,JobTemplateSerializer) and corresponding views and URL routes for labels, projects, organizations, and job templates, enabling paginated listing via dedicated endpoints. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]template_options/serializers.pyandtemplate_options/views.py. The template options endpoint no longer returns lists of labels, projects, organizations, or job templates. [1] [2] [3]Testing updates:
Frontend compatibility:
These changes improve API clarity, maintainability, and scalability by separating concerns and providing paginated access to key resources.
Note
Introduce separate paginated endpoints for
labels,organizations,projects, andtemplates, remove these fromtemplate_options, and update the frontend filters to fetch/search/paginate options via the new APIs; tests updated accordingly.labels,organizations,projects, andtemplates(serializers,views,urls), and wire them inapi/v1/urls.py.TemplateViewto support list/retrieve with search/ordering and splitTemplatesSerializervsJobTemplateSerializer.template_optionsserializers/views; endpoint now returns only meta (dates, currencies, costs, settings, filter sets).keyvalues when saving/applying filters.filterOptionsStore(zustand) and selectors for fetching, paging, searching, and retrieving single options; update types to useFilterOptionWithId.MultiChoiceDropdownwith async search, loading indicator, and bottom-reach fetch; updateBaseTableand Dashboard to use external pagination state and reset on filter/sort changes.AddEditViewto await saves and convert selections to ids; add minor styling (.dropdown-loader).template_optionsshape and add coverage for new list endpoints.Written by Cursor Bugbot for commit ad511ab. This will update automatically on new commits. Configure here.