Skip to content
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

Scan Report Fields/Values Concepts server side #866

Open
AndyRae opened this issue Sep 5, 2024 · 0 comments
Open

Scan Report Fields/Values Concepts server side #866

AndyRae opened this issue Sep 5, 2024 · 0 comments

Comments

@AndyRae
Copy link
Member

AndyRae commented Sep 5, 2024

Currently viewing the Scan Report fields / values along with their Scan Report Concepts happens on the "frontend" Next client.

For example to display the values page UI, it runs as:

  1. Fetches the Scan Report Values by API
  2. Fetches the Scan Report Concepts based on the values ID's by API
  3. Combined them into an object.
  4. Renders in a table.

This is annoying for a few reasons:

  1. Multiple database queries, and serialisation to API
  2. Prevents any filtering / sorting model on the Scan Report Concepts.
  3. Combining on the client can be slow.

Instead I propose moving this functionality completely to the backend API. A new endpoint named ?? will list the combined Scan Report Values + Concepts in nested objects.

By moving to the backend, it will:

  1. Enable filtering/sorting on the Concept level.
  2. Possibly make this page faster, but this depends on how the database queries are able to be produced.
    • Fetching all Values/Concepts in one query might be cleaner and easier to enable filter/sort.
    • But it is possible that duplicate Concepts are being fetched / serialised, and we are losing this optimisation.
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

No branches or pull requests

1 participant