ome / omero-iviewer

An OMERO.web app allowing to view images
https://www.openmicroscopy.org/omero/iviewer/
Other
18 stars 29 forks source link

Rename ?server query parameter to ?host #414

Closed will-moore closed 2 years ago

will-moore commented 2 years ago

This prevents collision with ?server=2 used by webclient @login_required decorator

This testing is the same omero-web functionality as recently tested in https://github.com/ome/omero-web/pull/386, that was previously broken because iviewer uses the ?server=2 parameter from the URL which causes errors (this parameter was originally added for dev functionality but not used now). This has been re-named to host to prevent the collision, allowing the omero-web workflow to function as normal...

See https://github.com/ome/omero-web/issues/379

To test, get a session ID, e.g via cli to e.g. nightshade

$ omero login
$ omero sessions list

Try to login to a server that is not the first on the list. E.g. for merge-ci, try to login to nightshade, listed 3rd (server=3) First you need to look up an Image ID on target server (nightshade) that you can access with the session created above.

Then go to:

https://merge-ci.openmicroscopy.org/web/webclient/img_detail/IMAGE_ID/?bsession=SESSION_ID&server=3

You should be able to see the image.

will-moore commented 2 years ago

Today on merge-ci I'm seeing Unhandled rejection Error: BindingLanguage must implement inspectTextContent(). errors in inviewer - Googling found https://discourse.aurelia.io/t/bindinglanguage-must-implement-inspecttextcontent/1967 and https://github.com/aurelia/skeleton-navigation/issues/759 suggesting a clean node_modules should fix...

Hard to see how this error is related to this PR...

joshmoore commented 2 years ago

Is there any chance someone could have been relying on the previous naming? (Despite or because of (??) the collision)

will-moore commented 2 years ago

Ah, I see https://github.com/ome/omero-iviewer/pull/413 dependabot[bot] 'Bump aurelia-framework from 1.1.4 to 1.4.1' got created yesterday, which is a more likely candidate for these issues!

will-moore commented 2 years ago

@joshmoore This is not documented anywhere that I can see, and it's not a feature that I've ever used (or even been aware of till now), and I still haven't understood the need for it. This code e.g. https://github.com/ome/omero-iviewer/commit/6dfa178 was added before the dev config at https://github.com/ome/omero-iviewer/commit/7348ec4#diff-03651daa986b59c8421cba91a0ff6e7ffdfc40623e571f6525f648c2a6e19308R59 which is what I've been using to achieve the same thing (point iviewer dev server at your localhost). So I think it's unlikely that someone is using it.

pwalczysko commented 2 years ago

Tested on workshop (server=4). All worked fine.