-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Existing Previewers to support new Preview Mode #6210
Comments
@4tikhonov, @pdurbin suggested that I ping you in regards to our plans as well. |
Right. Specifically I was thinking of notes for 2019-09-10 Dataverse Community Call at https://groups.google.com/d/msg/dataverse-community/hxRBTbKUjXQ/xyGG92N7AAAJ "* (Slava) We started to work on a spreadsheet viewer to add to https://github.com/QualitativeDataRepository/dataverse-previewers" |
@juancorr as we discussed in IRC today, let's see if we can work on this together. (Thanks again for contributing a Spanish translation to the File Previewers!) I'll spin up the branch at https://github.com/IQSS/dataverse/compare/3758-file-pg-preview on EC2 so we have a place to play around with the new code on the Dataverse side. |
Thanks @pdurbin.
I will do my best.
Juan Corrales
El jue., 17 oct. 2019 a las 22:37, Philip Durbin (<notifications@github.com>)
escribió:
… @juancorr <https://github.com/juancorr> as we discussed in IRC today,
let's see if we can work on this together. (Thanks again for contributing a
Spanish translation to the File Previewers!) I'll spin up the branch at
https://github.com/IQSS/dataverse/compare/3758-file-pg-preview on EC2 so
we have a place to play around with the new code on the Dataverse side.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6210?email_source=notifications&email_token=AACPSCFLULYMDVBNM2ONBELQPDEKFA5CNFSM4I2AVHW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBROHCA#issuecomment-543351688>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACPSCHF3YU6YI2X3MSHJA3QPDEKFANCNFSM4I2AVHWQ>
.
|
@juancorr thanks! To all, the work and discussion has moved (at least for now) to https://github.com/QualitativeDataRepository/dataverse-previewers/issues/24 |
My pull request is in: https://github.com/QualitativeDataRepository/dataverse-previewers/pull/25 |
Here's an example of a file landing page of a PDF where one can see the current state of the pull request above: http://ec2-34-230-54-112.compute-1.amazonaws.com:8080/file.xhtml?fileId=51&datasetVersionId=5 HTTPS version: https://ec2-34-230-54-112.compute-1.amazonaws.com/file.xhtml?fileId=51&datasetVersionId=5 |
I'm seeing an error in the console: net::ERR_CERT_COMMON_NAME_INVALID for the metadata call https://ec2-34-230-54-112.compute-1.amazonaws.com/api/datasets/39/versions/1.0. So - I don't think this is related to your change, just a problem in doing ajax to URLs with bad certs . |
Hi @pdurbin, @qqmyers and @djbrooke I have not achieved to load by AJAX external content in our test server. I have tried the instructions of this page (and anothers) https://stackoverflow.com/questions/10343892/glassfish-how-to-set-access-control-allow-origin-header , but Glassfish refuse to load external content with the message: "Solicitud desde otro origen bloqueada: la política de mismo origen impide leer el recurso remoto en http://oaimadrono.uned.es/dataverse-previewers/previewers/Te…://oaimadrono.uned.es:8080&datasetid=4125&datasetversion=1.0 (razón: falta la cabecera CORS 'Access-Control-Allow-Origin')." . Any idea about how load external content using Ajax in Glassfish? |
@juancorr are you talking about http://oaimadrono.uned.es:8080/file.xhtml?persistentId=doi:10.21950/VJADUC/SXOIDE or some other server? I see you're in http://chat.dataverse.org if it's easier to chat about the problem there. |
@juancorr - I think that your issue is in the apache server that is serving the TextPreviewer.html file rather than glassfish. The issue is because your glassfish server is on port 8080 which is considered a different server than the same machine with port 80 where the TextPreviewer.html is coming from. There are lots of web sources for how to enable CORS in apache. I think this is supported by the github.io server if you use the previewers there. For development, an alternative might be to put the prievewers in glassfish/dataverse. I used to have them at /src/main/webapp/resources/previewers in our fork and could access them at /resources/previewers./* . In your case, that would cause the previewers to be on the same server (same 8080 port) and thereby avoid the CORS issue. |
@qqmyers you've got me thinking... maybe in https://github.com/QualitativeDataRepository/dataverse-previewers#installation we could write a bit more about self hosting the previewers. I put mine in /var/www/html and added |
@pdurbin - sure. (It was your idea to host them though...). Unless you think using the hosted ones is not the preferred/recommendable option at this point, I'd suggest we put 'alternate install methods' on a separate page. Also - I think your method (or variant) would also solve @juancorr 's issue since it would make the previewers come from the same host/port. |
Was it? 😄 I'm just thinking people should have options. 😄 When I make an issue, I'll circle back and leave a comment here. |
I just closed my original pull request (lots of noise about line endings in there and now merge conflicts) and opened a fresh one at https://github.com/QualitativeDataRepository/dataverse-previewers/pull/27 where I tried to incorporate feedback from the original pull request. I'll move this issue into code review. |
Thanks @philip and @qqmeyers,
I was stubborn in use the CORS in the Glassfish side.
I will try it tomorrow.
Juan Corrales
El jue., 24 oct. 2019 a las 22:50, Philip Durbin (<notifications@github.com>)
escribió:
… I just closed my original pull request (lots of noise about line endings
in there and now merge conflicts) and opened a fresh one at
QualitativeDataRepository/dataverse-previewers#27
<https://github.com/QualitativeDataRepository/dataverse-previewers/pull/27>
where I tried to incorporate feedback from the original pull request.
I'll move this issue into code review.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6210?email_source=notifications&email_token=AACPSCHVCNTIAPY53TZNS6DQQIDCXA5CNFSM4I2AVHW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECGMTOA#issuecomment-546097592>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACPSCCXBJXGWIIAJ24W3BLQQIDCXANCNFSM4I2AVHWQ>
.
|
Moving to Done based on @qqmyers closing https://github.com/QualitativeDataRepository/dataverse-previewers/pull/27 |
QDR (@qqmyers, @adam3smith) has created a few previewers for common data formats. These previewers make use of the Dataverse external tools framework. They are here: https://github.com/QualitativeDataRepository/dataverse-previewers
In #3758, we'll introduce the idea of "preview mode" for external tools. This basically allows an external tool to be iframed in to Dataverse using a preview friendly, slimmed down version. Proof of concept code for this work is on this branch: https://github.com/IQSS/dataverse/tree/3758-file-pg-preview.
We should update the preview tools that QDR has made to allow for preview mode so that installations can iframe in these helpful previewers. We'll add additional previewers in other issues.
The text was updated successfully, but these errors were encountered: