BioplatformsAustralia / bpaotu

OTU database access for the Australian Microbiome
GNU Affero General Public License v3.0
5 stars 1 forks source link

Handle empty graph data #234

Closed hou098 closed 2 years ago

hou098 commented 2 years ago

If there are no matching samples the graph popup hangs with the spinning loading helix.

e.g. metagenome search for Bacteria Cyanobacteria Cyanobacteria Subgroup1 (with https://github.com/BioplatformsAustralia/bpaotu/tree/metagenome-feature-WIP-demo )

i.e. requests to /private/api/v1/taxonomy-graph-fields can return

{"graphdata": {"traits": {}, "amplicon": {}, "taxonomy": {}, "am_environment_all": [], "am_environment": {}, "am_environment_selected": {}, "am_environment_non_selected": {}, "traits_am_environment_all": [], "traits_am_environment": {}, "traits_am_environment_selected": {}, "traits_am_environment_non_selected": {}}}

and /private/api/v1/contextual-graph-fields

{"graphdata": {}}