Skip to content

Feature/minified dropdowns#266

Draft
mateodurante wants to merge 2 commits into
developfrom
feature/minified-dropdowns
Draft

Feature/minified dropdowns#266
mateodurante wants to merge 2 commits into
developfrom
feature/minified-dropdowns

Conversation

@mateodurante

Copy link
Copy Markdown
Contributor

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

  • Added a new AnalyzerMinifiedViewSet with a corresponding AnalyzerMinifiedSerializer that exposes only essential fields (url, name, type, enabled) for analyzers, registered at the endpoint minified/analyzer/. This is protected by a new view_minified_analyzer permission. [1] [2] [3]
  • Updated custom permissions to include view_minified_analyzer and added a migration to persist this permission. [1] [2]

Frontend: Use Minified Endpoints

  • Replaced all usages of getAllAnalyzers, getAllStates, getAllContacts, and getAllPriorities with 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]
  • Added the new analyzerMinifiedList route to the frontend constants.

Serializer Improvements

  • Extended ContactMinifiedSerializer to include username and role fields for more informative contact listings.

Fixtures and Miscellaneous

  • Updated group fixtures to include a new group (id 298).

These changes collectively improve the efficiency of data retrieval for large select lists and ensure proper permissioning for the new endpoints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant