Closed djbrooke closed 4 years ago
Here's what shows up in my externaltools table:
dvndb=> select * from externaltool;
id | contenttype | description | displayname |
toolparameters | toolurl | type
----+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+------------------+---------------------------------------------------
---------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+---------
1 | text/plain | Read the text file. | Read Text | {"queryParameters":[{"fileid":"{fileId}"},{"siteUr
l":"{siteUrl}"},{"key":"{apiToken}"},{"datasetid":"{datasetId}"},{"datasetversion":"{datasetVersion}"}]} | https://qualitativedatarepository.github.io/dataverse-previewers/previewers/TextPreview.html | EXPLORE
2 | text/html | View the html file. | View Html | {"queryParameters":[{"fileid":"{fileId}"},{"siteUr
l":"{siteUrl}"},{"key":"{apiToken}"},{"datasetid":"{datasetId}"},{"datasetversion":"{datasetVersion}"}]} | https://qualitativedatarepository.github.io/dataverse-previewers/previewers/HtmlPreview.html | EXPLORE
3 | audio/mp3 | Listen to an audio file. | Play Audio | {"queryParameters":[{"fileid":"{fileId}"},{"siteUr
l":"{siteUrl}"},{"key":"{apiToken}"},{"datasetid":"{datasetId}"},{"datasetversion":"{datasetVersion}"}]} | https://qualitativedatarepository.github.io/dataverse-previewers/previewers/AudioPreview.html | EXPLORE
4 | audio/ogg | Listen to an audio file. | Play Audio | {"queryParameters":[{"fileid":"{fileId}"},{"siteUr
l":"{siteUrl}"},{"key":"{apiToken}"},{"datasetid":"{datasetId}"},{"datasetversion":"{datasetVersion}"}]} | https://qualitativedatarepository.github.io/dataverse-previewers/previewers/AudioPreview.html | EXPLORE
5 | image/gif | Preview an image file. | View Image | {"queryParameters":[{"fileid":"{fileId}"},{"siteUr
l":"{siteUrl}"},{"key":"{apiToken}"},{"datasetid":"{datasetId}"},{"datasetversion":"{datasetVersion}"}]} | https://qualitativedatarepository.github.io/dataverse-previewers/previewers/ImagePreview.html | EXPLORE
6 | image/jpeg | Preview an image file. | View Image | {"queryParameters":[{"fileid":"{fileId}"},{"siteUr
l":"{siteUrl}"},{"key":"{apiToken}"},{"datasetid":"{datasetId}"},{"datasetversion":"{datasetVersion}"}]} | https://qualitativedatarepository.github.io/dataverse-previewers/previewers/ImagePreview.html | EXPLORE
7 | image/png | Preview an image file. | View Image | {"queryParameters":[{"fileid":"{fileId}"},{"siteUr
l":"{siteUrl}"},{"key":"{apiToken}"},{"datasetid":"{datasetId}"},{"datasetversion":"{datasetVersion}"}]} | https://qualitativedatarepository.github.io/dataverse-previewers/previewers/ImagePreview.html | EXPLORE
8 | image/tiff | Preview an image file. | View Image | {"queryParameters":[{"fileid":"{fileId}"},{"siteUr
l":"{siteUrl}"},{"key":"{apiToken}"},{"datasetid":"{datasetId}"},{"datasetversion":"{datasetVersion}"}]} | https://qualitativedatarepository.github.io/dataverse-previewers/previewers/ImagePreview.html | EXPLORE
9 | application/pdf | Read a pdf document. | Read Document | {"queryParameters":[{"fileid":"{fileId}"},{"siteUr
l":"{siteUrl}"},{"key":"{apiToken}"},{"datasetid":"{datasetId}"},{"datasetversion":"{datasetVersion}"}]} | https://qualitativedatarepository.github.io/dataverse-previewers/previewers/PDFPreview.html | EXPLORE
10 | video/mp4 | Watch a video file. | Play Video | {"queryParameters":[{"fileid":"{fileId}"},{"siteUr
l":"{siteUrl}"},{"key":"{apiToken}"},{"datasetid":"{datasetId}"},{"datasetversion":"{datasetVersion}"}]} | https://qualitativedatarepository.github.io/dataverse-previewers/previewers/VideoPreview.html | EXPLORE
11 | video/ogg | Watch a video file. | Play Video | {"queryParameters":[{"fileid":"{fileId}"},{"siteUr
l":"{siteUrl}"},{"key":"{apiToken}"},{"datasetid":"{datasetId}"},{"datasetversion":"{datasetVersion}"}]} | https://qualitativedatarepository.github.io/dataverse-previewers/previewers/VideoPreview.html | EXPLORE
12 | video/quicktime | Watch a video file. | Play Video | {"queryParameters":[{"fileid":"{fileId}"},{"siteUr
l":"{siteUrl}"},{"key":"{apiToken}"},{"datasetid":"{datasetId}"},{"datasetversion":"{datasetVersion}"}]} | https://qualitativedatarepository.github.io/dataverse-previewers/previewers/VideoPreview.html | EXPLORE
13 | application/x-json-hypothesis | View the annotation entries in a file. | View Annotations | {"queryParameters":[{"fileid":"{fileId}"},{"siteUr
l":"{siteUrl}"},{"key":"{apiToken}"},{"datasetid":"{datasetId}"},{"datasetversion":"{datasetVersion}"}]} | https://qualitativedatarepository.github.io/dataverse-previewers/previewers/HypothesisPreview.html | EXPLORE
14 | text/tab-separated-values | Analyze in Whole Tale | Whole Tale | {"queryParameters":[{"fileId":"{fileId}"},{"siteUr
l":"{siteUrl}"},{"key":"{apiToken}"}]} | https://data.wholetale.org/api/v1/integration/dataverse | EXPLORE
15 | text/tab-separated-values | The Data Explorer provides a GUI which lists the variables in a tabular data file allowing searching, charting and cross tabulation analysis. | Data Explorer | {"queryParameters":[{"fileId":"{fileId}"},{"siteUr
l":"{siteUrl}"},{"key":"{apiToken}"}]} | https://scholarsportal.github.io/Dataverse-Data-Explorer/ | EXPLORE
(15 rows)
Is the behavior consistently inconsistent? I'm currently getting the correct behavior out of a test box.
Note that when only Data Explorer is included, Dataverse reads the contenttype (so instead of a drop-down menu I only get an Explore button which opens the appropriate tool based on mime-type). I would've expected a "Preview" button for the QDR previewers and a drop-down for the other external tools, but maybe that's just in QDR's fork?
Edit: I meant to point out that postgres doesn't always return rows in the same order unless you sort, so it's conceivable that merely selecting for contenttype might explain the inconsistency you're seeing.
With both Data Explorer and WholeTale in the externaltools table; I lose access to the QDR previewers.
I don't believe this is an issue with dataverse-ansible. Closing.
We use dataverse-ansible over at dataverse-sample-data and we're seeing some inconsistent behavior when multiple external tools are defined. For example, this file brings up both Data Explorer and WholeTale as expected:
http://ec2-3-80-234-144.compute-1.amazonaws.com/file.xhtml?fileId=255&datasetVersionId=40
... but this file brings up WholeTale when either Data Explorer or WholeTale is selected:
http://ec2-3-80-234-144.compute-1.amazonaws.com/file.xhtml?fileId=250&datasetVersionId=38
I moved around the order of the external tools in https://github.com/IQSS/dataverse-sample-data/blob/master/ec2config.yaml but it doesn't seem to have fixed it.