Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • nomad-FAIR nomad-FAIR
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 217
    • Issues 217
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 28
    • Merge requests 28
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • nomad-labnomad-lab
  • nomad-FAIRnomad-FAIR
  • Merge requests
  • !464

SearchContext refactor and optimization of API queries made by the GUI

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Lauri Himanen requested to merge aggregation-improvement-gui into v1.0.0 Nov 24, 2021
  • Overview 9
  • Commits 17
  • Pipelines 2
  • Changes 32
  • Now the GUI employs the refactored API queries that include the exclude_from_search parameter. In practice, this means that the requests for search results and aggregations are now done with a single API call (whereas previously there was a separate API call for each statistic shown on screen).
  • Fixed API issue with models.Range queries inside nested dictionaries, added new API tests for such cases.
  • Moved the registration of search filters into a separate file: FilterRegistry.js
  • Completely refactored SearchContext: API calls are now optimized based on the changed filters and required aggregations. Each SearchContext now has a completely separate state: this also means that multiple SearchContexts can be kept alive simultaneously.
  • The three search pages (entry search, material search, own data search) are now cached using react-router-cache-route library. Caching can be enabled individually for each page and also the caching direction can be specified (e.g. cache only when going forward in browser history state). The library works by simply using the CacheRoute component instead of the traditional Route component from react-router-dom. The benefits of caching become most evident when quickly navigating between the search page and individual entry pages.
Edited Nov 24, 2021 by Lauri Himanen
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: aggregation-improvement-gui