abcd-j / data-catalog

https://data.abcd-j.de
0 stars 1 forks source link

Download with GIN button not showing for EMA_Pilot dataset #24

Closed tmheunis closed 5 months ago

tmheunis commented 6 months ago

Since the EMA_Pilot is hosted on GIN, I expected there to be a "Download with GIN" button next to the Download with DataLad one. But this is not showing up. When i tested this locally, I thought it might have to do with the "url" field of the dataset metadata entry, which was empty. I added this in https://github.com/abcd-j/data-catalog/commit/29ae750eca73ccab9b8c418f704b6aa8e0ccb267.

However, this doesn't seem to solve the issue.

@jsheunis can you have a look?

jsheunis commented 6 months ago

It looks like this is a problem with the javascript code: https://github.com/abcd-j/data-catalog/blob/main/catalog/assets/app_component_dataset.js#L129-L159

The url in question is a string, and according to the schema it could be an array or string. But the javascript code only handles the case of an array, and it doesn't set the correct flags for displaying the GIN button when the url is a string, see: https://github.com/abcd-j/data-catalog/blob/main/catalog/assets/app_component_dataset.js#L158

This would be useful to update in the main package as well.