-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add redirect for e.g. /mapr/gene/?value=PAX7 #45
Conversation
750a59d
to
bc52d14
Compare
Tested a few too. Seems to work fine 👍 With that PR we could redirect |
In order to remove mapr searches, we also need to redirect mapr API requests (direct users to searchengine page at https://idr-testing.openmicroscopy.org/searchengine/apidocs/#/ ) Looking at existing nginx config... - everything under
https://superuser.com/questions/1256843/nginx-return-custom-410-page-with-map
According to link above, this "works"
So with https://idr.openmicroscopy.org/mapr/api/gene/
Create a 410.html...
After reload that didn't work..
Seb "try restart" instead of reload...
Oh :( |
Fixed missing Editing
But new line added doesnt
because it's not included in...
Let's add
Now https://idr-testing.openmicroscopy.org/mapr/api/antibody/ redirects to https://idr-testing.openmicroscopy.org/searchengine/apidocs/ but all other mapr/api urls redirect to https://idr-testing.openmicroscopy.org/ (need /mapr/api/config to NOT be redirected. So, undo the
After reststart, this is working for all those |
Instead of adding
It works!
|
We want to recognise ALL E.g. /mapr/api/autocomplete/... should be included, as well as /mapr/api/autocomplete/gene/ etc. This should work...
This seems to be working. But https://idr-testing.openmicroscopy.org/mapr/api/config/ still works! |
Deployed on idr-testing and tested and approved as part of #47 |
This provides support for URLs that correspond to omero-mapr URLs containing key and value of the form:
and also the "home" page for each key, e.g.
We handle them in this PR at e.g.
But, since
/idr-gallery/
is deployed for IDR as the "root" app (so that the/idr-gallery/
home page is/
) the/idr-gallery/mapr/gene/?value=PAX7
page is actually at/mapr/gene/?value=PAX7
and replaces mapr at the same URL (no redirect needed).This requires that
idr-gallery
is listed inomero.web.apps
BEFORE omero-mapr.changes made to idr-deployment (to be copied to playbooks):
I have deployed this change (ordering of omero.web.apps) on idr-testing.
For each omeroreadonly-1-4 (and omeroreadwrite):
omero-web-apps.omero:
Also needed to disable mapr caching on the idr-testing proxy server
Alternatively, we can use
/mapr2gallery/
instead of/mapr/
to avoid uncertainty about caching, since the same behaviour is provided at both URLs. E.g.In these examples, the key is an identifier of a mapr config: e.g.
gene
config is:We need to know the correct Key to use for the Search engine. In this case there are 2 possible keys:
"Gene Symbol", "Gene Identifier"
so we use the searchengine to find keys that match the Value e.g. https://idr.openmicroscopy.org/searchengine/api/v1/resources/image/searchvalues/?value=PAX7This allows us to pick "Gene Symbol" as the correct key.
Then we redirect to
idr_gallery/search/?key=Gene+Symbol&value=PAX7&operator=equals
using theequals
operator since we want to show only exact matches.To test: See testing sheet (Sheet 2) at https://docs.google.com/spreadsheets/d/1cPtsMSMY-5Rd-ob8xA9XCJrmogO6glGt5kM9_8ISONY/edit?gid=1203223646#gid=1203223646
/search/?key=Gene+Symbol&operator=contains
with the primary attribute e.g.Gene Symbol
selected./mapr/gene/?value=YFL009W
and Gene Symbol/mapr/gene/?value=CDC4
and open in a new tab (or just click on the link)/mapr/
in the URL with/mapr2gallery/
or add e.g.&test=abc123
.Previously tested:
Mus musculus found 135159 images in 34 experiments
and https://idr.openmicroscopy.org/mapr/organism/?value=Mus%20musculusMus musculus (134972) [34]