Skip to content

Partial rebase of 4744 Use client-side protocol/host in URL#4792

Merged
joshmoore merged 4 commits intoome:developfrom
manics:partial-rebase-4744
Aug 26, 2016
Merged

Partial rebase of 4744 Use client-side protocol/host in URL#4792
joshmoore merged 4 commits intoome:developfrom
manics:partial-rebase-4744

Conversation

@manics
Copy link
Copy Markdown
Member

@manics manics commented Aug 19, 2016

Partial rebase of #4744

What this PR does

The web metadata panel Link to this <object> contains a server side URL created from the HTTP Host header. This causes problems with server-side caching.

  • Wherever possible client-side URLs should be constructed in javascript using the location object, so that the /path will be cached but the protocol://host will be handled by the client browser

Testing this PR

  1. Setup OMERO.web, optionally with a public user (makes testing easier)
  2. Check Link to this <object> in the web RH metadata panel. The URL should use whatever the browser has in the location bar, and in additional examination of the returned html such as http://host/webclient/metadata_details/image/ID/ should show var lnk = location.protocol + "//" + location.host + "/webclient/"; instead of a URL.

The following additions from #4744 related to twitter/opengraph support (#4613) have not been rebased:

  • URLs in embedded non-javascript metadata such as URLs parsed by social media can be overridden using omero.web.ui.omero.web.ui.external_link_baseurl (this must include the protocol).

Related reading

Link to cards, tickets, other PRs:

Note

The only other place I'm aware of that let's you copy a link is in the full image viewer where it is already generated by client-side javascript: https://github.com/manics/openmicroscopy/blob/metadata52-linkto/components/tools/OmeroWeb/omeroweb/webgateway/templates/webgateway/viewport/omero_image.html#L665

This is unchanged, but maybe it should be unified?

@manics
Copy link
Copy Markdown
Member Author

manics commented Aug 19, 2016

Partially
--rebased-from #4744

@manics manics changed the title Partial rebase of 4744 Use client-side protocl/host in URL Partial rebase of 4744 Use client-side protocol/host in URL Aug 19, 2016
@will-moore
Copy link
Copy Markdown
Member

Sorry - missed this yesterday. Looking now...

@will-moore
Copy link
Copy Markdown
Member

Not sure that I understand the "problems with server-side caching" but this certainly seems to be working fine.
On cowfish I see

var lnk = location.protocol + "//" + location.host + "/webmerge/webclient/";

and all the link functionality works fine as described.

Good to merge.

@joshmoore
Copy link
Copy Markdown
Member

Not sure that I understand the "problems with server-side caching" but this certainly seems to be working fine.

@will-moore, the problem we were seeing is that the URL that someone used to access a resource (http://idr-demo.openmicroscopy.org/webclient/?show=plate-2551 vs http://idr-demo2.openmicroscopy.org/webclient/?show=plate-2551, aliases for each other) was being stored in the metadata cache for the right-hand panel.

@joshmoore joshmoore merged commit 69342a7 into ome:develop Aug 26, 2016
@sbesson sbesson added this to the 5.3.0 milestone Sep 10, 2016
@manics manics deleted the partial-rebase-4744 branch September 19, 2016 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants