magda-io / magda

A federated, open-source data catalog for all your big data and small data
https://magda.io
Apache License 2.0
506 stars 92 forks source link

Hide map preview if we get a mixed-content error #1462

Open aneesha09 opened 6 years ago

aneesha09 commented 6 years ago

Problem description

Map is not loading for the data set - https://dev.magda.io/dataset/ds-aims-6f61137b-8baa-40fa-bde1-670655254afa/details?q=csiro

seabed_biodiversity_on_the_continental_shelf_of_the_great_barrier_reef_world_heritage_area_2003_-_2006__crc_reef__csiro__data_gov_au

Also merging - #1344

If you go to this dataset: https://dev.magda.io/dataset/ds-nsw-d5874805-6397-414b-a53b-1ee5537b761d/details?q=greater%20sydney%20water%20supply (Greater Sydney Water Supply), the TerriaMap isn't able to download the underlying data because it's loaded via HTTP (not HTTPS) from a .com.au address. This is usual, but we should have detected that and stopped the map from loading.

Problem reproduction steps Go to https://dev.magda.io/dataset/ds-nsw-d5874805-6397-414b-a53b-1ee5537b761d/details?q=greater%20sydney%20water%20supply and watch the map.

Problem reproduction steps

Screenshot / Design / File reference

AlexGilleran commented 6 years ago

This is happening because of

CatalogGroup.js:6 Mixed Content: The page at 'https://dev.magda.io/dataset/ds-aims-6f61137b-8baa-40fa-bde1-670655254afa/details?q=csiro' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://maps.eatlas.org.au/geoserver/wms?service=WMS&request=GetCapabilities&version=1.3.0&tiled=true'. This request has been blocked; the content must be served over HTTPS.

maps.eatlas.org.au isn't on the list of domains that terria wants to proxy, so it fails. This causes the map to load forever.

@tkeuneman @philipgrimmett do you think we should hide the map in this case or show an error message?

tkeuneman commented 6 years ago

Hide it

aneesha09 commented 6 years ago

Hey @chloeleichen - Could you kindly look at this next week?