biohubbc icon indicating copy to clipboard operation
biohubbc copied to clipboard

Paginate Sampling Sites & Separate Spatial Data in API Responses

Open mauberti-bc opened this issue 1 year ago • 3 comments

Links to Jira Tickets

  • https://apps.nrs.gov.bc.ca/int/jira/browse/SIMSBIOHUB-629

Description of Changes

  • Adds a /sample-site/spatial endpoint for retrieving the geojson data for all sites in the survey
  • Removes geojson property from the response when requesting all sampling sites in the survey
  • Paginates sampling sites on the frontend (backend pagination was already in place)
  • For the sampling site accordions on the observations page, does not load accordion content until expanded

Testing Notes

  • Should not be any double requests for sampling site data

mauberti-bc avatar Oct 10 '24 17:10 mauberti-bc

Openshift URLs for the PR Deployment:

  • App Route: https://biohubbc-app-1393-af2668-dev.apps.silver.devops.gov.bc.ca/
  • Api Route: https://biohubbc-api-1393-af2668-dev.apps.silver.devops.gov.bc.ca/
  • Pods: https://console.apps.silver.devops.gov.bc.ca/k8s/ns/af2668-dev/pods?name=1393

github-actions[bot] avatar Oct 10 '24 17:10 github-actions[bot]

Codecov Report

Attention: Patch coverage is 13.79310% with 600 lines in your changes missing coverage. Please review.

Project coverage is 45.72%. Comparing base (5203f31) to head (5e75350). Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
...c/repositories/sample-location-repository/utils.ts 18.98% 64 Missing :warning:
...rmation/sites/table/SamplingSiteTableContainer.tsx 0.00% 51 Missing :warning:
...nts/sampling-data/SurveySamplingTableContainer.tsx 0.00% 41 Missing :warning:
...g-information/sites/SampleSiteDataGridEditCell.tsx 2.94% 33 Missing :warning:
...tions/sampling-sites/SamplingSiteListContainer.tsx 0.00% 32 Missing :warning:
...-location-repository/sample-location-repository.ts 44.64% 27 Missing and 4 partials :warning:
api/src/paths/sampling-locations/methods/index.ts 0.00% 29 Missing :warning:
api/src/paths/sampling-locations/periods/index.ts 0.00% 29 Missing :warning:
api/src/paths/sampling-locations/sites/index.ts 0.00% 28 Missing :warning:
...d-column-definitions/sampling-information/utils.ts 25.71% 26 Missing :warning:
... and 37 more
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1393      +/-   ##
==========================================
- Coverage   46.30%   45.72%   -0.58%     
==========================================
  Files         784      801      +17     
  Lines       21225    21639     +414     
  Branches     3194     3253      +59     
==========================================
+ Hits         9828     9895      +67     
- Misses      10810    11155     +345     
- Partials      587      589       +2     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 10 '24 17:10 codecov[bot]

Openshift URLs for the PR Deployment:

  • App Route: https://biohubbc-app-1393-af2668-dev.apps.silver.devops.gov.bc.ca/
  • Api Route: https://biohubbc-api-1393-af2668-dev.apps.silver.devops.gov.bc.ca/
  • Pods: https://console.apps.silver.devops.gov.bc.ca/k8s/ns/af2668-dev/pods?name=1393

github-actions[bot] avatar Oct 24 '24 15:10 github-actions[bot]

Just going to change this to a draft temporarily as we are hitting the limit on our openshift resources.

NickPhura avatar Oct 25 '24 00:10 NickPhura

Openshift URLs for the PR Deployment:

  • App Route: https://biohubbc-app-1393-af2668-dev.apps.silver.devops.gov.bc.ca/
  • Api Route: https://biohubbc-api-1393-af2668-dev.apps.silver.devops.gov.bc.ca/
  • Pods: https://console.apps.silver.devops.gov.bc.ca/k8s/ns/af2668-dev/pods?name=1393

github-actions[bot] avatar Nov 01 '24 17:11 github-actions[bot]

@mauberti-bc Okay, other than any minor CSS tweaks, etc, you might have, it should be good to go.

I'll do the other TODOs in a separate PR:

  • Add pagination to the period table on the survey page.
  • See if I can make the dropdown modal wider (somehow its working for the taxon/site control, but not the technique/period, even though they use the same autocomplete under the hood. But havent poked at it too hard yet)

NickPhura avatar Nov 09 '24 00:11 NickPhura

Quality Gate Failed Quality Gate failed

Failed conditions
19.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

sonarqubecloud[bot] avatar Nov 12 '24 22:11 sonarqubecloud[bot]