intermine / bluegenes

A friendly next-generation interface for Genomic data discovery powered by InterMine
http://bluegenes.apps.intermine.org
Other
76 stars 56 forks source link

Permanent URL points to backing legacy mine, not Bluegenes. #840

Open sammyjava opened 1 year ago

sammyjava commented 1 year ago

I've got bluegenes running on:

https://bluegenes.legumeinfo.org/

And my legacy mines are on:

https://mines.legumeinfo.org/

The permanent URL generated on Bluegenes points to the legacy mine, not Bluegenes, report page, e.g.

https://bluegenes.legumeinfo.org/cajanusmine/report/Gene/4512440

Permanent URL is https://mines.legumeinfo.org/cajanusmine/gene:cajca.ICPL87119.gnm1.ann1.C.cajan_33392

Which is the correct legacy mine URL, but not the Bluegenes URL.

Any way I can get the Permanent URL to be to the Bluegenes site, or are permanent URIs not yet supported under Bluegenes? I haven't been able to guess one that works.

heralden commented 1 year ago

The URL passed is unedited from what is received from the Intermine server, which uses some baseurl defined in $MINE_NAME.properties. This works on humanmine and flymine as the web services are accessible on the same address behind a reverse proxy (http://intermine.org/im-docs/docs/webapp/bluegenes/index#proxy-requests-to-intermine-web-service-paths).

I understand this won't fit everyone, so we might need a new config variable. The BG frontend doesn't know what address it's hosted at, and reading it from window.location isn't good practice. BG will also only resolve permanent URLs for configured mines. So I think the correct logic would be to add a new optional config variable BLUEGENES_BASE_URL which if defined along with a configured mine being active: take the path of the received permanent URL and append it to the variable instead.

sammyjava commented 1 year ago

I totally agree. If I knew where to implement it, I'd do it and PR it but I have a feeling I'd miss some spots or stomp on some spots that should point to the Tomcat server. But if you'd like me to give it a shot, just say.