Task #12670 (closed)
Opened 5 years ago
Closed 3 years ago
Bug: Plate thumbs don't have 'version'
| Reported by: | pwalczysko | Owned by: | wmoore |
|---|---|---|---|
| Priority: | major | Milestone: | OMERO-5.2.2 |
| Component: | Web | Version: | n.a. |
| Keywords: | n.a. | Cc: | ux@… |
| Resources: | n.a. | Referenced By: | n.a. |
| References: | n.a. | Remaining Time: | n.a. |
| Sprint: | n.a. |
Description (last modified by wmoore)
Edit: ticket updated to new issue (see below).
In Web
Bug:
- Set imported and Save does not work also on datasets, see http://trout.openmicroscopy.org/merge/webclient/?show=dataset-1430
- right-click content menu on Plate Run , select Set imported and Save -> does not work
- see example (user-4, read-only-1) http://trout.openmicroscopy.org/merge/webclient/?show=run-902
Change History (6)
comment:1 Changed 5 years ago by pwalczysko
comment:2 Changed 5 years ago by wmoore
- Description modified (diff)
- Summary changed from Bug: Set imported and Save not working to Bug: Plate thumbs don't have 'version'
The right-click menu "Imported and Save" seems to be working OK on trout just now, for Datasets, Plates and Runs.
The only minor issue is that if performed on a Plate, the thumbnails are not visible so the browser cache of thumbnails doesn't get refreshed (since we don't have version on plate thumbnails.
Re-naming ticket to fix this issuel
comment:3 Changed 5 years ago by wmoore
- Milestone changed from 5.1.0-m4 to 5.1.0
- Priority changed from blocker to critical
- Version 5.1.0-m1 deleted
Tried adding ?version to thumbnail src in plates, but this doesn't help the workflow above, since there is still nothing to force new thumbnail generation after applying settings to the Run.
So, a more fundamental change in the functionality is required. Pushing....
Here is what I did to add ?version to thumbnails:
diff --git a/components/tools/OmeroPy/src/omero/gateway/__init__.py b/components/tools/OmeroPy/src/omero/gateway/__init__.py
index 8ff5d4c..e45e3af 100644
--- a/components/tools/OmeroPy/src/omero/gateway/__init__.py
+++ b/components/tools/OmeroPy/src/omero/gateway/__init__.py
@@ -5458,7 +5458,7 @@ class _PlateWrapper (BlitzObjectWrapper):
pass
return fields
- def _listChildren(self, **kwargs):
+ def _listChildren(self, loadPixels=False, **kwargs):
"""
Lists Wells in this plate, not sorted. Saves wells to
:attr:`_childcache` map, where key is (row, column).
@@ -5471,15 +5471,18 @@ class _PlateWrapper (BlitzObjectWrapper):
params = omero.sys.Parameters()
params.map = {}
params.map["oid"] = omero_type(self.getId())
+ pix = ""
+ if loadPixels:
+ pix = ("join fetch img.pixels as pix "
+ "left outer join fetch pix.thumbnails ")
query = ("select well from Well as well "
"join fetch well.details.creationEvent "
"join fetch well.details.owner "
"join fetch well.details.group "
"left outer join fetch well.plate as pt "
"left outer join fetch well.wellSamples as ws "
- "left outer join fetch ws.image as img "
- "where well.plate.id = :oid")
-
+ "left outer join fetch ws.image as img %s"
+ "where well.plate.id = :oid" % pix)
self._childcache = {}
and
diff --git a/components/tools/OmeroWeb/omeroweb/webgateway/views.py b/components/tools/OmeroWeb/omeroweb/webgateway/views.py
index 9f2349a..15e9726 100644
--- a/components/tools/OmeroWeb/omeroweb/webgateway/views.py
+++ b/components/tools/OmeroWeb/omeroweb/webgateway/views.py
@@ -1348,6 +1348,7 @@ def plateGrid_json(request, pid, field=0, conn=None, **kwargs):
rv = webgateway_cache.getJson(request, server_id, plate,
'plategrid-%d-%d' % (field, thumbsize))
if rv is None:
+ plate._listChildren(loadPixels=True)
plate.setGridSizeConstraints(8, 12)
for row in plate.getWellGrid(field):
tr = []
@@ -1358,6 +1359,7 @@ def plateGrid_json(request, pid, field=0, conn=None, **kwargs):
t = i.simpleMarshal(xtra=xtra)
t['wellId'] = e.getId()
t['field'] = field
+ t['thumb_url'] += "?version=%s" % i.getThumbVersion()
tr.append(t)
continue
comment:4 Changed 4 years ago by wmoore
- Milestone changed from 5.1.0 to 5.1.1
comment:5 Changed 4 years ago by wmoore
- Milestone changed from 5.1.1 to Unscheduled
- Priority changed from critical to major
comment:6 Changed 3 years ago by jburel
- Milestone changed from Unscheduled to OMERO-5.2.2
- Resolution set to fixed
- Status changed from new to closed
Re-tested today, everything is working as expected.
This works as of now - 4 hours ago it patently did not work. It cannot be that this is because of cashing - I have been working in private browsing.