ome / omero-iviewer

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

Tile load error warning #464

Closed will-moore closed 3 months ago

will-moore commented 5 months ago

As discussed at IDR meeting, instead of failing silently and showing white background when tiles fail to load, we should warn the user and encourage them to refresh the viewer since tiles may load on 2nd attempt.

Screenshot 2024-02-22 at 15 00 22

EDIT: also added a spinner when the map loads, based on example at https://openlayers.org/en/latest/examples/load-events.html

To test,

pwalczysko commented 4 months ago

Tested on merge-ci, user-3.

After logging out from webclient, got the following in the iviewer after z-scrolling or panning:

Screenshot 2024-02-27 at 09 51 52

jburel commented 4 months ago

@will-moore you may want to revert the changes made for testing in the dev file.

will-moore commented 4 months ago

@jburel - I wanted those dev changes because "Flip-Y" was enabled by default and loading by "Datasets" rather than images which is usually not what you want. When developing I would like to just be able to update the image ID each time to point to an appropriate image, instead of making these other changes every time. I could move these changes to a different PR but probably not worth it?

jburel commented 4 months ago

Thanks for the clarification

will-moore commented 4 months ago

I added a spinner to the viewer in this PR, based on https://openlayers.org/en/latest/examples/load-events.html It will be displayed until all tiles have loaded.

will-moore commented 4 months ago

Trying to install on idr-testing...

sudo /opt/omero/web/venv3/bin/pip install build
git clone -b tile_load_error_warning https://github.com/will-moore/omero-iviewer.git
cd omero-iviewer/plugin
/opt/omero/web/venv3/bin/python -m build

Fails due to lack of npm install. Tried installing with

sudo yum install nodejs20

as described at https://nodejs.org/en/download/package-manager/#ibm-i but got

No package nodejs20 available.

Same for all versions 10-20.

[wmoore@test120-omeroreadwrite plugin]$ curl -sL https://rpm.nodesource.com/setup_20.x | sudo bash -
$ sudo yum install nodejs
--> Finished Dependency Resolution
Error: Package: 2:nodejs-20.11.1-1nodesource.x86_64 (nodesource-nodejs)
           Requires: glibc >= 2.28
           Installed: glibc-2.17-326.el7_9.x86_64 (@updates)
               glibc = 2.17-326.el7_9
           Available: glibc-2.17-317.el7.i686 (base)
               glibc = 2.17-317.el7
           Available: glibc-2.17-322.el7_9.i686 (updates)
               glibc = 2.17-322.el7_9
           Available: glibc-2.17-323.el7_9.i686 (updates)
               glibc = 2.17-323.el7_9
           Available: glibc-2.17-324.el7_9.i686 (updates)
               glibc = 2.17-324.el7_9
           Available: glibc-2.17-325.el7_9.i686 (updates)
               glibc = 2.17-325.el7_9
Error: Package: 2:nodejs-20.11.1-1nodesource.x86_64 (nodesource-nodejs)
           Requires: libc.so.6(GLIBC_2.28)(64bit)
Error: Package: 2:nodejs-20.11.1-1nodesource.x86_64 (nodesource-nodejs)
           Requires: libstdc++.so.6(CXXABI_1.3.9)(64bit)
Error: Package: 2:nodejs-20.11.1-1nodesource.x86_64 (nodesource-nodejs)
           Requires: libm.so.6(GLIBC_2.27)(64bit)
Error: Package: 2:nodejs-20.11.1-1nodesource.x86_64 (nodesource-nodejs)
           Requires: libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
Error: Package: 2:nodejs-20.11.1-1nodesource.x86_64 (nodesource-nodejs)
           Requires: libstdc++.so.6(GLIBCXX_3.4.20)(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Try older version...

curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash -

Lots of deprecation warnings, and ended with similar failure.

Next steps

cd dist
for x in *.tar.gz; do
    /opt/omero/web/venv3/bin/pip install -U $x # Install iviewer
done
will-moore commented 4 months ago

JM ran this on the readonly servers on idr-testing:

sudo yum install -y gcc-c++ make ant
curl -sL https://rpm.nodesource.com/setup_16.x | sudo -E bash -
sudo yum install -y nodejs
sudo /opt/omero/web/venv3/bin/pip install -U build

EDIT: now I've run those commands on idr-testing:omeroreadwrite too:

Testing on omeroreadonly-1...

[wmoore@test120-proxy ~]$ ssh omeroreadonly-1
git clone -b tile_load_error_warning https://github.com/will-moore/omero-iviewer.git
cd omero-iviewer/plugin
/opt/omero/web/venv3/bin/python -m build
...
Successfully built omero-iviewer-0.14.0.dev0.tar.gz and omero_iviewer-0.14.0.dev0-py3-none-any.whl

cd dist
for x in *.tar.gz; do sudo /opt/omero/web/venv3/bin/pip install -U $x; done
...
Successfully installed omero-iviewer-0.14.0.dev0

Repeated for other omeroreadonly servers...

jburel commented 4 months ago

Spinner is displayed the first time but when moving the z-slider, it can take a long time to load the plane and in that case, the user has not feedback

will-moore commented 3 months ago

This is deployed on idr-testing now where the re-rendering (Z/T or channels change) is displaying a spinner. Should also be deployed on merge-ci for testing.

will-moore commented 3 months ago

Closing in favour of #470.