Feature/minified dropdowns#266
Draft
mateodurante wants to merge 2 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new "minified" API endpoint for analyzers and updates the frontend to use optimized, minimal data fetches for analyzers, states, contacts, and priorities in various forms. Additionally, it updates permissions and serializers to support these changes, and refines the minified data returned for contacts. These changes streamline data loading and improve performance in the UI.
Backend: Minified Analyzer API and Permissions
AnalyzerMinifiedViewSetwith a correspondingAnalyzerMinifiedSerializerthat exposes only essential fields (url,name,type,enabled) for analyzers, registered at the endpointminified/analyzer/. This is protected by a newview_minified_analyzerpermission. [1] [2] [3]view_minified_analyzerand added a migration to persist this permission. [1] [2]Frontend: Use Minified Endpoints
getAllAnalyzers,getAllStates,getAllContacts, andgetAllPrioritieswith their respective minified versions (getMinifiedAnalyzer,getMinifiedState,getMinifiedContact,getMinifiedPriority) in analyzer mapping, case, edge, network, and task creation/editing forms to reduce payload size and improve performance. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]analyzerMinifiedListroute to the frontend constants.Serializer Improvements
ContactMinifiedSerializerto includeusernameandrolefields for more informative contact listings.Fixtures and Miscellaneous
These changes collectively improve the efficiency of data retrieval for large select lists and ensure proper permissioning for the new endpoints.